/**
 * The page under the app.
 *
 * Same problem as the chat surface, same two answers: every selector carries
 * `.astro-sections` or `.astro-faq` as well as its own class, so a host theme's
 * element rules cannot repaint it, and nothing here uses `!important`. See the
 * long note in astro-chat/assets/app.css.
 *
 * The visual job is different, though. This copy used to render as the theme's
 * ordinary article body — heading, paragraph, heading, paragraph, all the way
 * down — and read like a blog post. Someone deciding whether to ask a question
 * does not read a blog post. Cards with a heading and a mark each can be
 * skimmed: cost is findable without reading the disclaimer first.
 */

.astro-sections,
.astro-faq {
	--astro-paper: #faf7f2;
	--astro-card: #ffffff;
	--astro-raise: #fbf9f5;
	--astro-ink: #252a44;
	--astro-ink-2: #4d5271;
	--astro-muted: #63687f;
	--astro-line: #e7dfd2;
	--astro-accent: #a4551f;
	--astro-accent-soft: rgba(164, 85, 31, 0.08);
	--astro-radius: 14px;
	--astro-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
	--astro-serif: Georgia, "Noto Serif", "Noto Serif Devanagari", "Times New Roman", serif;

	max-width: 1240px;
	margin: 0 auto;
	padding: 0 16px;
	box-sizing: border-box;
	color: var(--astro-ink);
	font-family: var(--astro-sans);
	font-size: 16px;
	line-height: 1.7;
}

.astro-sections :where(p, ul, ol, li, h2, h3, span, strong, em, div),
.astro-faq :where(p, ul, ol, li, h2, h3, summary, span, strong, em, div) {
	color: inherit;
	font-family: inherit;
	letter-spacing: normal;
	text-transform: none;
	text-shadow: none;
	background: none;
}

.astro-sections.astro-sections {
	display: grid;
	gap: 14px;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	margin: 28px auto;
}

.astro-sections .astro-sec {
	background: var(--astro-card);
	border: 1px solid var(--astro-line);
	border-radius: var(--astro-radius);
	padding: 20px 22px;
	margin: 0;
}

.astro-sections .astro-sec__title {
	display: flex;
	align-items: center;
	gap: 9px;
	margin: 0 0 10px;
	padding: 0;
	border: 0;
	font-family: var(--astro-serif);
	font-size: 1.12rem;
	font-weight: 600;
	line-height: 1.35;
	color: var(--astro-ink);
}

.astro-sections .astro-sec__icon {
	flex: 0 0 auto;
	color: var(--astro-accent);
}

.astro-sections .astro-sec p {
	margin: 0 0 10px;
	color: var(--astro-ink-2);
}

.astro-sections .astro-sec p:last-child { margin-bottom: 0; }

/* The one line somebody will remember from the section. */
.astro-sections .astro-sec__lede {
	font-family: var(--astro-serif);
	font-size: 1.05rem;
	color: var(--astro-ink);
}

.astro-sections .astro-sec__note {
	margin-top: 14px;
	padding-top: 12px;
	border-top: 1px solid var(--astro-line);
	font-size: 0.88rem;
	color: var(--astro-muted);
}

.astro-sections .astro-sec__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 9px;
}

.astro-sections .astro-sec__list li {
	position: relative;
	margin: 0;
	padding-left: 20px;
	color: var(--astro-ink-2);
}

.astro-sections .astro-sec__list li::before {
	content: "";
	position: absolute;
	left: 3px;
	top: 0.72em;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--astro-accent);
}

.astro-sections .astro-sec__list strong { color: var(--astro-ink); font-weight: 600; }

/* ---------- FAQ ---------- */

.astro-faq.astro-faq {
	margin: 28px auto 40px;
}

.astro-faq .astro-faq__head {
	margin: 0 0 12px;
	padding: 0;
	border: 0;
	font-family: var(--astro-serif);
	font-size: 1.25rem;
	font-weight: 600;
	color: var(--astro-ink);
}

.astro-faq .astro-faq__item {
	background: var(--astro-card);
	border: 1px solid var(--astro-line);
	border-radius: var(--astro-radius);
	margin: 0 0 8px;
	padding: 0;
}

.astro-faq .astro-faq__item summary {
	display: block;
	list-style: none;
	cursor: pointer;
	padding: 14px 44px 14px 18px;
	position: relative;
	font-weight: 600;
	line-height: 1.5;
	color: var(--astro-ink);
}

.astro-faq .astro-faq__item summary::-webkit-details-marker { display: none; }

.astro-faq .astro-faq__item summary::after {
	content: "+";
	position: absolute;
	right: 18px;
	top: 12px;
	font-size: 1.2rem;
	font-weight: 400;
	color: var(--astro-accent);
}

.astro-faq .astro-faq__item[open] summary::after { content: "−"; }

.astro-faq .astro-faq__item[open] summary { border-bottom: 1px solid var(--astro-line); }

.astro-faq .astro-faq__answer {
	padding: 14px 18px 16px;
	color: var(--astro-ink-2);
}

.astro-faq .astro-faq__answer p { margin: 0; }

@media (max-width: 520px) {
	.astro-sections.astro-sections { gap: 12px; margin: 20px auto; }
	.astro-sections .astro-sec { padding: 16px 16px; }
}

/* Warm dark, to match the app rather than the theme. */
@media (prefers-color-scheme: dark) {
	.astro-sections,
	.astro-faq {
		--astro-card: #1e2029;
		--astro-raise: #20222c;
		--astro-ink: #ece7de;
		--astro-ink-2: #c7c1b6;
		--astro-muted: #9a958c;
		--astro-line: #33363f;
		--astro-accent: #e8a35f;
		--astro-accent-soft: rgba(232, 163, 95, 0.12);
	}
}

/* The one line above the app on a page somebody arrived at from a link. */
.astro-sections--intro.astro-sections--intro {
	display: block;
	margin: 0 auto 14px;
}

.astro-sections .astro-intro {
	margin: 0;
	font-family: var(--astro-serif);
	font-size: 1.05rem;
	line-height: 1.6;
	color: var(--astro-ink-2);
}

/* ---------- Reviews ----------
   A horizontal strip, because on a phone a vertical list of reviews is a wall
   to scroll past and a strip is a thing to flick through. Scroll snapping
   makes it land on a card rather than halfway between two, and the whole strip
   is focusable and arrow-key scrollable so it is not mouse-only. */

.astro-reviews {
	--astro-paper: #faf7f2;
	--astro-card: #ffffff;
	--astro-ink: #252a44;
	--astro-ink-2: #4d5271;
	--astro-muted: #63687f;
	--astro-line: #e7dfd2;
	--astro-accent: #a4551f;
	--astro-gold: #c88a2e;
	--astro-radius: 14px;
	--astro-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
	--astro-serif: Georgia, "Noto Serif", "Noto Serif Devanagari", "Times New Roman", serif;

	display: block;
	max-width: 1240px;
	margin: 26px auto;
	padding: 0 16px;
	box-sizing: border-box;
	color: var(--astro-ink);
	font-family: var(--astro-sans);
	font-size: 16px;
	line-height: 1.6;
}

.astro-reviews :where(p, h2, h3, span, label, button, input, textarea, fieldset, legend, article) {
	color: inherit;
	font-family: inherit;
	letter-spacing: normal;
	text-transform: none;
	box-sizing: border-box;
}

.astro-reviews__head {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px 14px;
	margin-bottom: 12px;
}

.astro-reviews__title {
	margin: 0;
	padding: 0;
	border: 0;
	font-family: var(--astro-serif);
	font-size: 1.25rem;
	font-weight: 600;
}

.astro-reviews__score {
	display: inline-flex;
	align-items: baseline;
	gap: 7px;
	margin: 0;
	font-size: 0.88rem;
	color: var(--astro-muted);
}

.astro-reviews__average { font-weight: 700; color: var(--astro-ink); }

.astro-stars { letter-spacing: 1px; }

.astro-star { color: var(--astro-line); }

.astro-star.is-on { color: var(--astro-gold); }

.astro-reviews__write {
	margin-left: auto;
	padding: 9px 16px;
	background: none;
	border: 1px solid var(--astro-accent);
	border-radius: 999px;
	color: var(--astro-accent);
	font: inherit;
	font-size: 0.88rem;
	cursor: pointer;
}

.astro-reviews__write:hover { background: rgba(164, 85, 31, 0.08); }

.astro-reviews__strip {
	display: flex;
	gap: 12px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	-webkit-overflow-scrolling: touch;
	padding: 2px 2px 10px;
	scrollbar-width: thin;
}

.astro-reviews__strip::-webkit-scrollbar { height: 6px; }

.astro-reviews__strip::-webkit-scrollbar-thumb {
	background: var(--astro-line);
	border-radius: 999px;
}

.astro-review {
	flex: 0 0 min(300px, 82vw);
	scroll-snap-align: start;
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin: 0;
	padding: 16px 18px;
	background: var(--astro-card);
	border: 1px solid var(--astro-line);
	border-radius: var(--astro-radius);
}

.astro-review__stars { margin: 0; font-size: 0.95rem; }

.astro-review__body {
	margin: 0;
	flex: 1 1 auto;
	font-family: var(--astro-serif);
	font-size: 0.97rem;
	line-height: 1.55;
	color: var(--astro-ink-2);
}

.astro-review__who { margin: 0; font-size: 0.82rem; color: var(--astro-muted); }

/* Before the first review: a line and a button, not an empty container.
   A dashed box saying nothing is here is a placeholder, and there are no
   placeholders on this site. */
.astro-reviews__invite {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px 14px;
	padding: 14px 18px;
	background: var(--astro-card);
	border: 1px solid var(--astro-line);
	border-radius: var(--astro-radius);
}

.astro-reviews__invite-text {
	margin: 0;
	flex: 1 1 200px;
	font-family: var(--astro-serif);
	font-size: 0.98rem;
	color: var(--astro-ink-2);
}

.astro-reviews__invite .astro-reviews__write { margin-left: 0; flex: 0 0 auto; }

/* ---------- Write-a-review dialog ---------- */

.astro-reviews__modal {
	position: fixed;
	inset: 0;
	z-index: 9998;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}

.astro-reviews__modal[hidden] { display: none; }

.astro-reviews__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(37, 42, 68, 0.42);
}

.astro-reviews__card {
	position: relative;
	width: 100%;
	max-width: 420px;
	max-height: calc(100vh - 32px);
	overflow-y: auto;
	padding: 22px 20px 18px;
	background: var(--astro-card);
	border: 1px solid var(--astro-line);
	border-radius: var(--astro-radius);
	box-shadow: 0 12px 34px rgba(37, 42, 68, 0.16);
}

.astro-reviews__close {
	position: absolute;
	top: 6px;
	right: 10px;
	width: 34px;
	height: 34px;
	background: none;
	border: 0;
	color: var(--astro-muted);
	font-size: 1.4rem;
	line-height: 1;
	cursor: pointer;
}

.astro-reviews__heading {
	margin: 0 0 14px;
	padding-right: 28px;
	border: 0;
	font-family: var(--astro-serif);
	font-size: 1.15rem;
	font-weight: 600;
}

/* The stars are radios in reverse order, so the CSS sibling selector can fill
   everything to the left of the one under the pointer without a line of JS. */
.astro-rate {
	display: flex;
	flex-direction: row-reverse;
	justify-content: flex-end;
	align-items: center;
	gap: 2px;
	margin: 0 0 14px;
	padding: 0;
	border: 0;
}

.astro-rate legend {
	float: left;
	width: 100%;
	margin-bottom: 4px;
	padding: 0;
	font-size: 0.85rem;
	color: var(--astro-muted);
}

.astro-rate input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
}

.astro-rate label {
	font-size: 1.7rem;
	line-height: 1;
	color: var(--astro-line);
	cursor: pointer;
}

.astro-rate input:checked ~ label,
.astro-rate label:hover,
.astro-rate label:hover ~ label { color: var(--astro-gold); }

.astro-rate input:focus-visible + label { outline: 2px solid var(--astro-accent); outline-offset: 2px; }

.astro-reviews__field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }

.astro-reviews__field label { font-size: 0.85rem; color: var(--astro-muted); }

.astro-reviews__field :where(input, textarea) {
	width: 100%;
	padding: 12px 13px;
	background: #fdfcfa;
	border: 1px solid #d6cbb8;
	border-radius: 10px;
	color: var(--astro-ink);
	font: inherit;
	resize: vertical;
}

.astro-reviews__field :where(input:focus-visible, textarea:focus-visible) {
	outline: 0;
	border-color: var(--astro-accent);
}

.astro-reviews__consent {
	display: flex;
	align-items: flex-start;
	gap: 9px;
	margin-bottom: 12px;
	font-size: 0.8rem;
	line-height: 1.45;
	color: var(--astro-muted);
}

.astro-reviews__consent input { margin-top: 3px; flex: 0 0 auto; }

.astro-reviews__error {
	margin: 0 0 10px;
	padding: 9px 11px;
	background: rgba(157, 63, 56, 0.08);
	border: 1px solid rgba(157, 63, 56, 0.3);
	border-radius: 10px;
	color: #9d3f38;
	font-size: 0.86rem;
}

.astro-reviews__submit {
	width: 100%;
	padding: 14px 20px;
	background: var(--astro-ink);
	border: 0;
	border-radius: 10px;
	color: #fdfbf7;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}

.astro-reviews__fine,
.astro-reviews__thanks {
	margin: 10px 0 0;
	font-size: 0.8rem;
	line-height: 1.45;
	color: var(--astro-muted);
	text-align: center;
}

.astro-reviews__thanks { font-size: 0.95rem; color: var(--astro-ink); }

@media (max-width: 520px) {
	.astro-reviews__modal { align-items: flex-end; padding: 0; }

	.astro-reviews__card {
		max-width: none;
		max-height: 90vh;
		border-radius: var(--astro-radius) var(--astro-radius) 0 0;
		border-bottom: 0;
	}

	.astro-reviews__write { margin-left: 0; }
}

@media (prefers-color-scheme: dark) {
	.astro-reviews {
		--astro-card: #1e2029;
		--astro-ink: #ece7de;
		--astro-ink-2: #c7c1b6;
		--astro-muted: #9a958c;
		--astro-line: #33363f;
		--astro-accent: #e8a35f;
		--astro-gold: #e8b45f;
	}

	.astro-reviews__field :where(input, textarea) { background: #191b23; border-color: #3d4049; }

	.astro-reviews__submit { background: #e8a35f; color: #15161d; }
}
