/* AstriOnLine reviews: banner, cards, page, form, star widgets. Palette follows the theme and the courses plugin (dark, gold). */
.aor {
	--aor-ink: #f6f0e4;
	--aor-muted: #c9c4d2;
	--aor-dim: #8f8aa3;
	--aor-gold: #d3a967;
	--aor-gold-bright: #efcf91;
	--aor-line: rgba(211, 169, 103, .32);
	--aor-card: rgba(7, 9, 25, .55);
	--aor-star-off: rgba(201, 196, 210, .28);
	--aor-serif: Georgia, "Times New Roman", serif;
	color: var(--aor-ink);
	box-sizing: border-box;
	max-width: 100%;
}
.aor *, .aor *::before, .aor *::after { box-sizing: border-box; }
.aor [hidden] { display: none !important; }
.aor p { color: var(--aor-muted); line-height: 1.7; margin: 0 0 10px; }
.aor h2, .aor h3 { color: var(--aor-ink); font-family: var(--aor-serif); font-weight: 400; line-height: 1.25; margin: 0 0 8px; }
.aor a { color: var(--aor-gold-bright); }
.aor-sr { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Buttons */
.aor-button {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 46px; padding: 0 22px; border: 1px solid var(--aor-gold); border-radius: 4px;
	background: linear-gradient(135deg, #efcf91, #bd8d4e); color: #0b0b16 !important;
	font: inherit; font-weight: 650; text-decoration: none !important; cursor: pointer; list-style: none;
}
.aor-button:hover, .aor-button:focus-visible { filter: brightness(1.06); }
.aor-button[disabled] { opacity: .7; cursor: wait; }
.aor-button--wide { width: 100%; }
.aor-button--ghost { background: transparent; color: var(--aor-gold-bright) !important; }
.aor-button--ghost:hover, .aor-button--ghost:focus-visible { background: rgba(211, 169, 103, .12); filter: none; }
.aor-button:focus-visible, .aor-nav-btn:focus-visible, .aor-chip:focus-visible, .aor-link:focus-visible { outline: 2px solid var(--aor-gold-bright); outline-offset: 2px; }
summary.aor-button::-webkit-details-marker { display: none; }
summary.aor-button::marker { content: ""; }
.aor-link { color: var(--aor-gold-bright); font-weight: 650; text-decoration: none; }
.aor-link:hover { text-decoration: underline; }

/* Display stars: grey base, gold overlay clipped to rating / 5 */
.aor-stars { position: relative; display: inline-block; flex: none; font-size: 1.05rem; line-height: 1; letter-spacing: .08em; white-space: nowrap; vertical-align: middle; }
.aor-stars::before { content: "★★★★★"; color: var(--aor-star-off); }
.aor-stars::after { content: "★★★★★"; position: absolute; left: 0; top: 0; width: var(--aor-fill, 0%); overflow: hidden; color: var(--aor-gold-bright); }
.aor-stars--lg { font-size: 1.7rem; }

/* Banner */
.aor-banner, .aor-invite { margin: 40px 0 0; padding: clamp(18px, 4vw, 30px); border: 1px solid var(--aor-line); border-radius: 10px; background: linear-gradient(160deg, #13143a, #070919); }
.aor-banner__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.aor-banner__title, .aor-invite__title { font-size: clamp(1.3rem, 3vw, 1.7rem); }
.aor-banner__sum { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 0 !important; }
.aor-banner__sum strong { color: var(--aor-ink); font-family: var(--aor-serif); font-size: 1.25rem; font-weight: 400; }
.aor-banner__sum span:last-child { color: var(--aor-dim); font-size: .9rem; }
.aor-banner__nav { display: flex; gap: 8px; }
.aor-nav-btn { width: 42px; height: 42px; border: 1px solid var(--aor-line); border-radius: 50%; background: rgba(7, 9, 25, .6); color: var(--aor-gold-bright); font: inherit; font-size: 1.5rem; line-height: 1; cursor: pointer; }
.aor-nav-btn:hover:not([disabled]) { background: rgba(211, 169, 103, .16); }
.aor-nav-btn[disabled] { opacity: .35; cursor: default; }
.aor-track { display: flex; gap: 14px; overflow-x: auto; padding: 2px 2px 12px; scroll-snap-type: x mandatory; scroll-padding: 0 2px; -webkit-overflow-scrolling: touch; scrollbar-width: thin; scrollbar-color: var(--aor-line) transparent; }
.aor-track:focus-visible { outline: 2px solid var(--aor-gold-bright); outline-offset: 2px; border-radius: 6px; }
.aor-track .aor-card { flex: 0 0 min(84%, 320px); scroll-snap-align: start; }
.aor-banner__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 10px; }
.aor-banner--empty { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; }
.aor-banner--empty .aor-banner__invite { flex: 1 1 280px; }
.aor-banner--empty .aor-banner__invite p { margin: 0; }
.aor-banner--empty .aor-reveal { flex: 1 1 100%; }
.aor-banner--empty .aor-reveal[open] { flex-basis: 100%; }

/* Cards */
.aor-card { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 18px; border: 1px solid var(--aor-line); border-radius: 8px; background: var(--aor-card); }
.aor-card__head { display: flex; align-items: center; gap: 10px; }
.aor-card__score { color: var(--aor-dim); font-size: .85rem; }
.aor-card__text { margin: 0; padding: 0; border: 0; flex: 1; }
.aor-card__text p { margin: 0; color: var(--aor-ink); overflow-wrap: anywhere; }
.aor-card__foot { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.aor-card__name { color: var(--aor-gold-bright); font-weight: 650; }
.aor-card__date { color: var(--aor-dim); font-size: .85rem; }
.aor-card__product { flex: 1 0 100%; color: var(--aor-dim); font-size: .8rem; }

/* Reveal (details) */
.aor-reveal { margin-top: 4px; }
.aor-reveal[open] { flex-basis: 100%; width: 100%; }
.aor-reveal[open] > summary { margin-bottom: 18px; }
.aor-banner__foot .aor-reveal[open] { flex: 1 0 100%; }
.aor-invite p { margin-bottom: 14px; }

/* Reviews page */
.aor-page { max-width: 920px; margin: 0 auto; }
.aor-summary { display: grid; gap: 18px; margin-bottom: 26px; padding: clamp(18px, 4vw, 28px); border: 1px solid var(--aor-line); border-radius: 10px; background: linear-gradient(160deg, #13143a, #070919); }
.aor-summary__score { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; }
.aor-summary__num { color: var(--aor-ink); font-family: var(--aor-serif); font-size: clamp(2.6rem, 9vw, 3.6rem); line-height: 1; }
.aor-summary__count { color: var(--aor-muted); }
.aor-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.aor-chip { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-height: 40px; padding: 6px 14px; border: 1px solid var(--aor-line); border-radius: 999px; color: var(--aor-muted) !important; font-size: .9rem; text-decoration: none !important; }
.aor-chip:hover { border-color: var(--aor-gold); color: var(--aor-ink) !important; }
.aor-chip.is-active { background: rgba(211, 169, 103, .18); border-color: var(--aor-gold); color: var(--aor-gold-bright) !important; }
.aor-chip__meta { color: var(--aor-dim); font-size: .8rem; }
.aor-chip.is-active .aor-chip__meta { color: var(--aor-gold-bright); }
.aor-list { display: grid; gap: 14px; scroll-margin-top: 90px; }
.aor-empty, .aor-empty-note { padding: clamp(18px, 4vw, 28px); border: 1px dashed var(--aor-line); border-radius: 10px; }
.aor-empty p { margin: 0; }
.aor-empty-note { color: var(--aor-muted); margin: 0; }
.aor-pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-top: 20px; }
.aor-pager__link { padding: 8px 4px; font-weight: 650; text-decoration: none; }
.aor-pager__link.is-off { opacity: .35; }
.aor-pager__status { color: var(--aor-dim); font-size: .9rem; }
.aor-section { margin-top: 44px; }

/* Form */
.aor-formwrap { scroll-margin-top: 90px; }
.aor-form__title { font-size: clamp(1.4rem, 3vw, 1.8rem); }
.aor-form__intro { max-width: 620px; }
.aor-form { display: grid; gap: 16px; max-width: 620px; }
.aor-field { display: grid; gap: 6px; min-width: 0; margin: 0; padding: 0; border: 0; }
.aor-field > label, .aor-field > legend { color: var(--aor-gold-bright); font-size: .85rem; letter-spacing: .04em; padding: 0; }
.aor-field small { color: var(--aor-dim); font-size: .82rem; line-height: 1.5; }
.aor-field input[type="text"], .aor-field select, .aor-field textarea {
	width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid var(--aor-line); border-radius: 4px;
	background: rgba(7, 9, 25, .7); color: var(--aor-ink); font: inherit; color-scheme: dark;
}
.aor-field textarea { min-height: 130px; resize: vertical; line-height: 1.6; }
.aor-field input:focus-visible, .aor-field select:focus-visible, .aor-field textarea:focus-visible { outline: 2px solid var(--aor-gold-bright); outline-offset: 2px; }
.aor-field.is-invalid input[type="text"], .aor-field.is-invalid select, .aor-field.is-invalid textarea { border-color: #f3a28a; }
.aor-count { margin-left: 6px; font-variant-numeric: tabular-nums; }
.aor-count.is-near { color: var(--aor-gold-bright); }
.aor-error { margin: 0 !important; color: #f3a28a !important; font-size: .9rem; line-height: 1.5 !important; }
.aor-msg { max-width: 620px; margin: 0 0 14px; padding: 12px 16px; border: 1px solid var(--aor-line); border-radius: 6px; background: rgba(211, 169, 103, .1); color: var(--aor-ink); line-height: 1.6; }
.aor-msg.is-ok { border-color: rgba(143, 211, 160, .6); background: rgba(143, 211, 160, .1); }
.aor-msg.is-error { border-color: rgba(243, 162, 138, .6); background: rgba(243, 162, 138, .08); }
.aor-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Star input: 10 radios, 5 stars with half-star hit areas.
   DOM order is ascending (native arrow keys work), pairs are label + radio. A half is gold when a
   radio at or after it is checked (:has), or when it is at or before the hovered half. */
.aor-rate__row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; }
.aor-rate__stars { position: relative; display: flex; flex: none; }
.aor-rate__input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.aor-rate__half { position: relative; display: block; flex: none; width: 1.3rem; height: 2.6rem; overflow: hidden; cursor: pointer; }
.aor-rate__half::before {
	content: "★"; position: absolute; top: 0; display: block; width: 2.6rem; height: 2.6rem;
	font-size: 2.3rem; line-height: 2.6rem; text-align: center; color: var(--aor-star-off); transition: color .12s, transform .12s;
}
.aor-rate__half--l::before { left: 0; }
.aor-rate__half--r::before { left: -1.3rem; }
.aor-rate__half:has(~ .aor-rate__input:checked)::before { color: var(--aor-gold-bright); }
.aor-rate__stars:hover .aor-rate__half::before { color: var(--aor-star-off); }
.aor-rate__stars .aor-rate__half:hover::before,
.aor-rate__stars .aor-rate__half:has(~ .aor-rate__half:hover)::before { color: var(--aor-gold-bright); }
.aor-rate__input:focus-visible + .aor-rate__half,
.aor-rate__half:has(+ .aor-rate__input:focus-visible) { outline: 2px solid var(--aor-gold-bright); outline-offset: -2px; border-radius: 3px; }
.aor-rate__out { color: var(--aor-muted); font-size: .95rem; min-width: 8em; }
.aor-rate.is-invalid .aor-rate__out { color: #f3a28a; }

/* Browsers without :has() get plain visible radios with text labels. */
@supports not selector(:has(*)) {
	.aor-rate__stars { flex-wrap: wrap; gap: 6px 14px; }
	.aor-rate__input { position: static; opacity: 1; width: auto; height: auto; order: 0; pointer-events: auto; accent-color: var(--aor-gold); }
	.aor-rate__half { width: auto; height: auto; overflow: visible; order: 1; color: var(--aor-muted); }
	.aor-rate__half::before { display: none; }
	.aor-rate__half .aor-sr { position: static !important; width: auto; height: auto; margin: 0; clip: auto; overflow: visible; font-size: .9rem; }
}

@media (min-width: 720px) {
	.aor-summary { grid-template-columns: auto 1fr; align-items: center; gap: 26px 40px; }
	.aor-track .aor-card { flex-basis: 320px; }
}
@media (max-width: 400px) {
	.aor-banner__head { flex-direction: column; align-items: flex-start; }
	.aor-rate__half { width: 1.15rem; height: 2.4rem; }
	.aor-rate__half::before { width: 2.3rem; height: 2.4rem; line-height: 2.4rem; font-size: 2.1rem; }
	.aor-rate__half--r::before { left: -1.15rem; }
}
@media (prefers-reduced-motion: reduce) {
	.aor-track { scroll-behavior: auto; }
	.aor-rate__half::before { transition: none; }
}
