/**
 * Astro Chat — reader-facing styles.
 *
 * Three columns on a wide screen: what you can add, the conversation, what
 * people ask. Below 1100px the rails fold into collapsible sections under the
 * conversation and the centre column becomes the whole app.
 *
 * ---------------------------------------------------------------------------
 * First light.
 *
 * Every app in this category is a night sky with gold on it, and the effect is
 * fortune-telling: mystery, a little theatre, a hint that something is being
 * withheld. That is the wrong feeling for the person actually on the other end
 * — someone out of work at one in the morning, a parent worrying about a
 * child. What they need from a screen is calm, and a reason to trust it.
 *
 * So this is the hour before dawn instead, which the tradition calls Brahma
 * muhurta and treats as the quietest and most hopeful time of the day. Warm
 * unbleached paper, deep indigo ink, and a thin line of marigold. Light, not
 * dark. A letter, not a séance.
 *
 * Two decisions hold the whole thing up:
 *
 * Indigo carries the weight and marigold is only ever a highlight. Paper with
 * a terracotta accent is a look you have seen a thousand times; paper with
 * indigo buttons and marigold used as sparingly as a thread in cloth is not.
 *
 * The reading is set in a serif and the interface in a sans, which is the
 * reverse of the usual pairing and does real work: a reading in a serif reads
 * as something a person wrote to you, and the controls around it stay quietly
 * out of the way. The stack is the one already on the device — no web font, no
 * extra request on a slow connection, and no sending every reader's address to
 * a font host while the privacy policy promises we share nothing.
 * ---------------------------------------------------------------------------
 */

.astro-app.astro-app {
	/* Ground and surfaces */
	--astro-paper: #faf7f2;
	--astro-paper-2: #f3eee6;
	--astro-card: #ffffff;
	--astro-raise: #fbf9f5;
	--astro-raise-2: #f6f2ea;
	--astro-field: #fdfcfa;

	/* Ink */
	--astro-ink: #252a44;
	--astro-ink-2: #4d5271;
	--astro-muted: #63687f;
	--astro-on-ink: #fdfbf7;

	/* A hairline warm enough to belong to the paper rather than sit on it. */
	--astro-line: #e7dfd2;
	--astro-line-strong: #d6cbb8;

	/* Marigold. Thin. */
	--astro-accent: #a4551f;
	--astro-accent-soft: rgba(180, 98, 42, 0.09);
	--astro-accent-line: rgba(180, 98, 42, 0.28);

	--astro-bad: #9d3f38;
	--astro-bad-soft: rgba(157, 63, 56, 0.08);
	--astro-bad-line: rgba(157, 63, 56, 0.3);

	/* Shadows are warm and shallow. A black shadow on warm paper looks like
	   dirt; these read as light falling rather than as a raised box. */
	--astro-shadow: 0 1px 2px rgba(37, 42, 68, 0.04), 0 6px 16px rgba(37, 42, 68, 0.05);
	--astro-shadow-lg: 0 12px 34px rgba(37, 42, 68, 0.12);

	--astro-radius: 14px;
	--astro-radius-sm: 10px;

	--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: 16px;
	box-sizing: border-box;
	background: var(--astro-paper);
	color: var(--astro-ink);
	font-family: var(--astro-sans);
	font-size: 16px;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
}

/* ---------------------------------------------------------------------------
 * Living in somebody else's theme.
 *
 * This is a shortcode. It lands inside a WordPress theme we do not control,
 * and a theme is allowed to say things like
 *
 *     .aft-default-mode button { color: #ffffff; }
 *
 * which is (0,1,1) and beats a plain `.astro-addon { color: … }` at (0,1,0).
 * On yudh.in that rule painted every button in the app white on white — the
 * whole period selector, both rails, the language switch. The tokens were
 * fine; the cascade was not.
 *
 * So every selector in this file carries `.astro-app` as well as its own
 * class. That is one extra class on every rule, uniformly, which lifts the
 * entire sheet above a theme's element rules without changing any of the
 * relationships inside it — and without a single `!important`, which would
 * only move the same fight one level up.
 *
 * When you add a rule here, prefix it the same way. tests/ui/contrast-harness.mjs
 * measures the result against a saved copy of the live site, with the theme's
 * own stylesheets loaded, and fails on anything under 4.5:1.
 *
 * Below is the floor: generic elements inside the app inherit our ink and take
 * no colour, background or font from the theme. `:where()` contributes no
 * specificity, so every component rule further down still wins on source order.
 * --------------------------------------------------------------------------- */

.astro-app.astro-app :where(button, input, select, textarea, summary, a, p, ul, ol, li, h1, h2, h3, h4, label, span, div) {
	color: inherit;
	font-family: inherit;
	letter-spacing: normal;
	text-transform: none;
	text-shadow: none;
}

.astro-app.astro-app :where(button, input, select, textarea, summary, a) {
	background: none;
	box-shadow: none;
	text-decoration: none;
}

/*
 * Size and spacing, which the theme also has opinions about. The rule that
 * made the send button a wide blue pill instead of a round one was
 *
 *     button, input[type="submit"] { height: 38px; padding: 5px 10px; font-size: 12px; }
 *
 * — none of which any component here was overriding, because on a page of our
 * own there would be nothing to override.
 */
.astro-app.astro-app :where(button, input, select, textarea) {
	box-sizing: border-box;
	height: auto;
	min-height: 0;
	max-height: none;
	width: auto;
	min-width: 0;
	max-width: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	font-size: inherit;
	line-height: inherit;
	text-align: inherit;
	vertical-align: baseline;
	float: none;
	-webkit-appearance: none;
	appearance: none;
}

/* Checkboxes and radios are the exception: stripping their appearance leaves
   an invisible control, and the browser's own is the one people recognise. */
.astro-app.astro-app :where(input[type="checkbox"], input[type="radio"]) {
	-webkit-appearance: auto;
	appearance: auto;
	width: 16px;
	height: 16px;
}

/* A theme that puts a marker on <summary> would show it twice. */
.astro-app.astro-app :where(summary) { display: block; list-style: none; }

/* Respected, but not the default: the point of this design is the light one.
   Warm-dark rather than blue-black, so it still reads as evening rather than
   as the night sky everybody else is using. */
@media (prefers-color-scheme: dark) {
	.astro-app.astro-app {
		--astro-paper: #15161d;
		--astro-paper-2: #1b1d26;
		--astro-card: #1e2029;
		--astro-raise: #20222c;
		--astro-raise-2: #252832;
		--astro-field: #191b23;

		--astro-ink: #ece7de;
		--astro-ink-2: #c3bfb5;
		--astro-muted: #948f88;
		--astro-on-ink: #1a1b22;

		--astro-line: #32343f;
		--astro-line-strong: #43454f;

		--astro-accent: #d98d52;
		--astro-accent-soft: rgba(217, 141, 82, 0.12);
		--astro-accent-line: rgba(217, 141, 82, 0.32);

		--astro-bad: #d98b84;
		--astro-bad-soft: rgba(217, 139, 132, 0.1);
		--astro-bad-line: rgba(217, 139, 132, 0.3);

		--astro-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 6px 16px rgba(0, 0, 0, 0.24);
		--astro-shadow-lg: 0 12px 34px rgba(0, 0, 0, 0.45);
	}
}


/* Stated, not inherited. The usual `box-sizing: inherit` idiom passes the value
   down from the container, which only works if nothing in between resets it —
   and inside a theme we do not control, something does. */
.astro-app.astro-app *,
.astro-app.astro-app *::before,
.astro-app.astro-app *::after {
	box-sizing: border-box;
}

.astro-app.astro-app [hidden] {
	display: none !important;
}

/* ---------- Three-column shell ---------- */

.astro-app .astro-shell {
	display: grid;
	gap: 20px;
	grid-template-columns: 220px minmax(0, 1fr) 264px;
	grid-template-areas: "left center right";
	align-items: start;
}

.astro-app .astro-rail--left { grid-area: left; }
.astro-app .astro-center { grid-area: center; min-width: 0; }
.astro-app .astro-rail--right { grid-area: right; }

@media (max-width: 1100px) {
	.astro-app .astro-shell {
		grid-template-columns: minmax(0, 1fr);
		/* The conversation comes first, then what people ask, then what you
		   can add — most to least useful on a small screen. */
		grid-template-areas: "center" "right" "left";
	}
}

/* ---------- Rails ---------- */

.astro-app .astro-rail__box {
	background: var(--astro-raise);
	border: 1px solid var(--astro-line);
	border-radius: var(--astro-radius);
	padding: 14px 16px;
}

.astro-app .astro-rail__title {
	color: var(--astro-muted);
	font-size: 0.74rem;
	font-weight: 700;
	letter-spacing: 0.09em;
	text-transform: uppercase;
	cursor: pointer;
	list-style: none;
}

.astro-app .astro-rail__title::-webkit-details-marker { display: none; }

.astro-app .astro-rail__title::after {
	content: "＋";
	float: right;
	font-weight: 400;
	opacity: 0.6;
}

.astro-app .astro-rail__box[open] .astro-rail__title::after { content: "−"; }

/* On a wide screen the rails are always open and the marker is noise. */
@media (min-width: 1101px) {
	.astro-app .astro-rail__title { cursor: default; }
	.astro-app .astro-rail__title::after { display: none; }
}

.astro-app .astro-addons {
	list-style: none;
	margin: 12px 0 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.astro-app .astro-addon {
	display: block;
	width: 100%;
	padding: 10px 12px;
	text-align: left;
	background: var(--astro-card);
	border: 1px solid var(--astro-line);
	border-radius: var(--astro-radius-sm);
	color: var(--astro-ink);
	font: inherit;
	cursor: pointer;
}

.astro-app .astro-addon:hover {
	border-color: var(--astro-accent);
	background: var(--astro-accent-soft);
}

.astro-app .astro-addon__text { display: block; font-size: 0.86rem; font-weight: 600; }
.astro-app .astro-addon__hint { display: block; color: var(--astro-muted); font-size: 0.75rem; }

.astro-app .astro-asked {
	display: flex;
	flex-direction: column;
	gap: 7px;
	margin-top: 12px;
}

.astro-app .astro-asked__item {
	width: 100%;
	padding: 10px 12px;
	text-align: left;
	background: var(--astro-card);
	border: 1px solid var(--astro-line);
	border-radius: var(--astro-radius-sm);
	color: var(--astro-ink);
	font: inherit;
	font-size: 0.85rem;
	line-height: 1.4;
	cursor: pointer;
}

.astro-app .astro-asked__item:hover {
	border-color: var(--astro-accent);
	background: var(--astro-accent-soft);
}

/* ---------- Centre column ---------- */

.astro-app .astro-center__head { margin-bottom: 16px; overflow: hidden; }

.astro-app .astro-center__title {
	margin: 0 0 4px;
	font-size: clamp(1.35rem, 3.4vw, 1.7rem);
	line-height: 1.2;
	color: var(--astro-ink);
	text-wrap: balance;
}

.astro-app .astro-center__sub {
	margin: 0;
	color: var(--astro-muted);
	font-size: 0.92rem;
}

.astro-app .astro-panel {
	background: var(--astro-card);
	border: 1px solid var(--astro-line);
	border-radius: var(--astro-radius);
	padding: 20px;
	box-shadow: var(--astro-shadow);
}

/* The conversation is not a panel. Boxing it puts a border between the reader
   and the only thing on the page they came for; the readings are raised
   instead, and the thread sits on the paper like letters on a desk. */
.astro-app .astro-panel--chat {
	padding: 0;
	min-height: 260px;
	background: none;
	border: 0;
	box-shadow: none;
}

/* ---------- Form ---------- */

.astro-app .astro-field { margin-bottom: 16px; }
.astro-app .astro-field-row { display: flex; gap: 12px; }
.astro-app .astro-field-row .astro-field { flex: 1 1 0; min-width: 0; }

.astro-app .astro-field label {
	display: block;
	margin-bottom: 6px;
	font-size: 0.85rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	color: var(--astro-muted);
}

.astro-app.astro-app input[type="text"],
.astro-app.astro-app input[type="date"],
.astro-app.astro-app input[type="time"],
.astro-app.astro-app input[type="number"],
.astro-app.astro-app textarea {
	width: 100%;
	padding: 13px 14px;
	background: var(--astro-field);
	border: 1px solid var(--astro-line);
	border-radius: var(--astro-radius-sm);
	color: var(--astro-ink);
	/* 16px stops iOS Safari zooming the viewport when a field is focused. */
	font-size: 16px;
	font-family: inherit;
	color-scheme: light dark;
}

.astro-app.astro-app input:focus-visible,
.astro-app.astro-app textarea:focus-visible,
.astro-app.astro-app button:focus-visible,
.astro-app.astro-app summary:focus-visible {
	outline: 2px solid var(--astro-accent);
	outline-offset: 2px;
}

.astro-app .astro-check {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 16px;
	font-size: 0.9rem;
	color: var(--astro-muted);
	cursor: pointer;
}

.astro-app .astro-field--place { position: relative; }

.astro-app .astro-places {
	position: absolute;
	z-index: 20;
	top: calc(100% + 4px);
	left: 0;
	right: 0;
	margin: 0;
	padding: 4px;
	max-height: 240px;
	overflow-y: auto;
	list-style: none;
	background: var(--astro-card);
	border: 1px solid var(--astro-line);
	border-radius: var(--astro-radius-sm);
	box-shadow: var(--astro-shadow-lg);
}

.astro-app .astro-places li {
	padding: 10px 12px;
	border-radius: 8px;
	font-size: 0.9rem;
	cursor: pointer;
}

.astro-app .astro-places li:hover,
.astro-app .astro-places li[aria-selected="true"] { background: var(--astro-accent-soft); }

.astro-app .astro-form__error {
	margin: 0 0 12px;
	padding: 10px 12px;
	background: var(--astro-bad-soft);
	border: 1px solid var(--astro-bad-line);
	border-radius: var(--astro-radius-sm);
	color: var(--astro-bad);
	font-size: 0.9rem;
}

.astro-app .astro-form__reassure {
	margin: 12px 0 0;
	text-align: center;
	color: var(--astro-muted);
	font-size: 0.85rem;
}

.astro-app .astro-promise { list-style: none; margin: 18px 0 0; padding: 0; }

.astro-app .astro-promise li {
	position: relative;
	padding-left: 22px;
	margin-bottom: 7px;
	color: var(--astro-muted);
	font-size: 0.82rem;
	line-height: 1.45;
}

.astro-app .astro-promise li::before {
	content: "";
	position: absolute;
	left: 4px;
	top: 0.45em;
	width: 9px;
	height: 5px;
	border-left: 2px solid var(--astro-accent);
	border-bottom: 2px solid var(--astro-accent);
	transform: rotate(-45deg);
}

/* ---------- Buttons ---------- */

.astro-app .astro-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 14px 20px;
	border: 0;
	border-radius: var(--astro-radius-sm);
	font-size: 1rem;
	font-weight: 700;
	font-family: inherit;
	cursor: pointer;
	transition: transform 0.12s ease, filter 0.12s ease;
}

.astro-app .astro-btn--primary {
	background: var(--astro-ink);
	color: var(--astro-on-ink);
}

.astro-app .astro-btn--primary:hover { filter: brightness(1.06); }
.astro-app .astro-btn:active { transform: translateY(1px); }
.astro-app .astro-btn--block { width: 100%; }
.astro-app .astro-btn[disabled] { opacity: 0.55; cursor: not-allowed; }

.astro-app .astro-linkbtn {
	padding: 0;
	background: none;
	border: 0;
	color: var(--astro-muted);
	font-size: 0.82rem;
	font-family: inherit;
	text-decoration: underline;
	cursor: pointer;
}

.astro-app .astro-linkbtn:hover { color: var(--astro-accent); }

/* ---------- Conversation ---------- */

.astro-app .astro-chat__who {
	display: flex;
	align-items: baseline;
	justify-content: flex-end;
	gap: 12px;
	margin-bottom: 10px;
}

.astro-app .astro-quota { margin: 0 0 12px; color: var(--astro-muted); font-size: 0.82rem; }
.astro-app .astro-quota--low { color: var(--astro-accent); }

.astro-app .astro-thread {
	display: flex;
	flex-direction: column;
	gap: 12px;
	min-height: 180px;
	max-height: min(58vh, 560px);
	overflow-y: auto;
	scrollbar-width: thin;
}

.astro-app .astro-msg {
	max-width: 88%;
	padding: 13px 16px;
	border-radius: var(--astro-radius);
	font-size: 0.97rem;
	white-space: pre-wrap;
	overflow-wrap: anywhere;
	animation: astro-rise 0.4s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

@keyframes astro-rise {
	from { opacity: 0; transform: translateY(4px); }
	to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
	.astro-app .astro-msg { animation: none; }
	.astro-app .astro-btn { transition: none; }
}

/* What the reader said, in the interface sans. Two voices that look different
   is worth more than any amount of colour. */
.astro-app .astro-msg--user {
	align-self: flex-end;
	background: var(--astro-accent-soft);
	border: 1px solid var(--astro-accent-line);
	border-bottom-right-radius: 4px;
	color: var(--astro-ink);
	font-size: 0.95rem;
}

/* The reading itself. Serif, a shade larger, generously leaded, and on white
   rather than a tinted panel — it is the only thing anybody came to read, and
   it should look like it was written to them rather than emitted at them. */
.astro-app .astro-msg--bot {
	align-self: flex-start;
	max-width: 92%;
	padding: 16px 18px;
	background: var(--astro-card);
	border: 1px solid var(--astro-line);
	border-bottom-left-radius: 4px;
	box-shadow: var(--astro-shadow);
	font-family: var(--astro-serif);
	font-size: 1.03rem;
	line-height: 1.75;
}

.astro-app .astro-msg--error {
	align-self: stretch;
	max-width: 100%;
	background: var(--astro-bad-soft);
	border: 1px solid var(--astro-bad-line);
	color: var(--astro-bad);
}

/* A chip whose question has already been asked. Kept on the rail, moved to
   the bottom and dimmed: asking it again is allowed and free, it is just not
   what the reader most needs offered. */
.astro-app .astro-asked__item--asked {
	background: none;
	border-style: dashed;
	color: var(--astro-muted);
}

.astro-app .astro-asked__item--asked:hover,
.astro-app .astro-asked__item--asked:focus-visible {
	opacity: 1;
}

/* A quiet line in the thread, not a message: it is the app explaining itself,
   not the astrologer speaking. */
.astro-app .astro-note {
	align-self: center;
	max-width: 90%;
	margin: 2px 0;
	color: var(--astro-muted);
	font-size: 0.78rem;
	text-align: center;
	line-height: 1.5;
}

.astro-app .astro-msg p { margin: 0 0 10px; }
.astro-app .astro-msg p:last-child { margin-bottom: 0; }
.astro-app .astro-msg strong { color: var(--astro-accent); }

.astro-app .astro-typing { display: inline-flex; gap: 5px; align-items: center; }

.astro-app .astro-typing span {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--astro-muted);
	animation: astro-blink 1.3s infinite ease-in-out;
}

.astro-app .astro-typing span:nth-child(2) { animation-delay: 0.18s; }
.astro-app .astro-typing span:nth-child(3) { animation-delay: 0.36s; }

@keyframes astro-blink {
	0%, 80%, 100% { opacity: 0.25; }
	40% { opacity: 1; }
}

/* A reading still being written.
   The caret rides the last line so it is obvious the answer is continuing
   rather than finished and short — the one thing a reader cannot otherwise
   tell from a bubble that has stopped growing for a moment. */
.astro-app .astro-msg--writing > p:last-child::after {
	content: "";
	display: inline-block;
	width: 2px;
	height: 1em;
	margin-left: 2px;
	vertical-align: -0.15em;
	background: var(--astro-accent);
	animation: astro-caret 1s steps(2, start) infinite;
}

@keyframes astro-caret {
	0%, 100% { opacity: 1; }
	50% { opacity: 0; }
}

/* A reading whose connection dropped part-way. Marked rather than deleted:
   what arrived is correct as far as it goes, and the error message below it
   says so. */
.astro-app .astro-msg--partial {
	border-left: 3px solid var(--astro-bad-line);
	opacity: 0.85;
}

@media (prefers-reduced-motion: reduce) {
	.astro-app .astro-msg--writing > p:last-child::after { animation: none; }
	.astro-app .astro-typing span { animation: none; opacity: 0.5; }
}

/* ---------- Dock: everything the reader acts on, together ---------- */

.astro-app .astro-dock {
	position: sticky;
	bottom: 0;
	margin-top: 12px;
	padding-top: 12px;
	background: linear-gradient(180deg, transparent, var(--astro-paper) 18%);
}

.astro-app .astro-capsules {
	display: flex;
	gap: 8px;
	margin-bottom: 10px;
	padding-bottom: 4px;
	overflow-x: auto;
	scrollbar-width: none;
}

.astro-app .astro-capsules::-webkit-scrollbar { display: none; }

/* With seven periods the row runs off the end of a desktop window, and the
   child reading — the free one people come for — is the one that falls off.
   Wrap where there is room; keep the scroll row on a phone. */
@media (min-width: 700px) {
	.astro-app .astro-capsules { flex-wrap: wrap; overflow-x: visible; }
}

.astro-app .astro-capsule {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	flex: 0 0 auto;
	padding: 9px 15px;
	background: var(--astro-card);
	border: 1px solid var(--astro-line);
	border-radius: 999px;
	color: var(--astro-ink-2);
	font-size: 0.88rem;
	font-family: inherit;
	white-space: nowrap;
	cursor: pointer;
}

.astro-app .astro-capsule.is-active {
	background: var(--astro-ink);
	border-color: var(--astro-ink);
	color: var(--astro-on-ink);
	font-weight: 600;
}

.astro-app .astro-capsule__lock { font-size: 0.6rem; opacity: 0.75; }

.astro-app .astro-quick { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }

.astro-app .astro-chip {
	padding: 9px 14px;
	background: var(--astro-card);
	border: 1px solid var(--astro-line);
	border-radius: 999px;
	color: var(--astro-ink);
	font-size: 0.86rem;
	font-family: inherit;
	text-align: left;
	cursor: pointer;
}

.astro-app .astro-chip:hover { background: var(--astro-accent-soft); border-color: var(--astro-accent); }

.astro-app .astro-composer {
	display: flex;
	gap: 8px;
	align-items: flex-end;
	padding: 8px;
	background: var(--astro-card);
	border: 1px solid var(--astro-line);
	border-radius: var(--astro-radius);
}

/* The slot holds whichever control the current question needs — a textarea
   for a name, a date picker for a birthday — so it sizes the same either way. */
.astro-app .astro-composer__slot { flex: 1 1 auto; min-width: 0; display: flex; }

.astro-app .astro-composer__slot > * {
	flex: 1 1 auto;
	min-width: 0;
	width: 100%;
	margin: 0;
	padding: 9px 10px;
	background: none;
	border: 0;
	color: var(--astro-ink);
	font-family: inherit;
	font-size: 16px;
}

.astro-app .astro-composer__slot textarea { max-height: 140px; resize: none; }

.astro-app .astro-send {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	background: var(--astro-ink);
	border: 0;
	border-radius: 50%;
	color: var(--astro-on-ink);
	cursor: pointer;
}

.astro-app .astro-send[disabled] { opacity: 0.5; cursor: not-allowed; }

.astro-app .astro-disclaimer {
	margin: 10px 2px 0;
	color: var(--astro-muted);
	font-size: 0.75rem;
	line-height: 1.5;
}

/* ---------- Unlock ---------- */

.astro-app .astro-unlock {
	padding: 18px;
	background: var(--astro-accent-soft);
	border: 1px solid var(--astro-accent-line);
	border-radius: var(--astro-radius);
	text-align: center;
}

.astro-app .astro-unlock__title { margin: 0 0 6px; font-size: 1.05rem; color: var(--astro-accent); }
.astro-app .astro-unlock__body { margin: 0 0 14px; color: var(--astro-muted); font-size: 0.9rem; }

/* ---------- Install ---------- */

.astro-app .astro-install {
	position: sticky;
	bottom: 12px;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 14px auto 0;
	padding: 11px 18px;
	background: var(--astro-card);
	border: 1px solid var(--astro-accent);
	border-radius: 999px;
	color: var(--astro-accent);
	font-size: 0.88rem;
	font-family: inherit;
	cursor: pointer;
	box-shadow: var(--astro-shadow-lg);
}

.astro-app.astro-app .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ---------- Small screens ---------- */

@media (max-width: 480px) {
	.astro-app.astro-app { padding: 12px; }
	.astro-app .astro-panel { padding: 16px 14px; }
	.astro-app .astro-panel--chat { padding: 14px 12px; }
	.astro-app .astro-field-row { flex-direction: column; gap: 0; }
	.astro-app .astro-msg { max-width: 94%; }
	.astro-app .astro-thread { max-height: none; }
}

/* ---------- Language switch ---------- */

.astro-app .astro-langbar {
	display: inline-flex;
	gap: 2px;
	float: right;
	padding: 2px;
	background: var(--astro-raise-2);
	border: 1px solid var(--astro-line);
	border-radius: 999px;
}

.astro-app .astro-lang {
	padding: 5px 13px;
	background: none;
	border: 0;
	border-radius: 999px;
	color: var(--astro-muted);
	font-family: inherit;
	font-size: 0.8rem;
	cursor: pointer;
}

.astro-app .astro-lang.is-on {
	background: var(--astro-card);
	box-shadow: var(--astro-shadow);
	color: var(--astro-ink);
	font-weight: 600;
}

/* ---------- Pass picker ---------- */

.astro-app .astro-pay {
	align-self: stretch;
	padding: 18px;
	background: var(--astro-accent-soft);
	border: 1px solid var(--astro-accent-line);
	border-radius: var(--astro-radius);
}

.astro-app .astro-pay__title { margin: 0 0 6px; font-size: 1.05rem; color: var(--astro-accent); font-weight: 700; }
.astro-app .astro-pay__body { margin: 0 0 14px; color: var(--astro-ink); font-size: 0.9rem; }

.astro-app .astro-pay__compare {
	margin: 12px 0 0;
	color: var(--astro-muted);
	font-size: 0.78rem;
	text-align: center;
}

.astro-app .astro-plans {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 8px;
}

@media (max-width: 520px) {
	.astro-app .astro-plans { grid-template-columns: 1fr; }
}

.astro-app .astro-plan {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: 14px 10px 12px;
	background: var(--astro-card);
	border: 1px solid var(--astro-line);
	border-radius: var(--astro-radius-sm);
	color: var(--astro-ink);
	font-family: inherit;
	text-align: center;
	cursor: pointer;
}

.astro-app .astro-plan:hover { border-color: var(--astro-accent); }

/* One recommendation, so the choice is easy rather than a comparison task. */
.astro-app .astro-plan.is-best {
	border-color: var(--astro-accent);
	background: var(--astro-accent-soft);
}

.astro-app .astro-plan__flag {
	position: absolute;
	top: -9px;
	left: 50%;
	transform: translateX(-50%);
	padding: 2px 9px;
	border-radius: 999px;
	background: var(--astro-accent);
	color: var(--astro-on-ink);
	font-size: 0.62rem;
	font-weight: 700;
	white-space: nowrap;
}

.astro-app .astro-plan__price { font-size: 1.25rem; font-weight: 700; color: var(--astro-accent); }
.astro-app .astro-plan__label { font-size: 0.86rem; font-weight: 600; }
.astro-app .astro-plan__note { color: var(--astro-muted); font-size: 0.72rem; line-height: 1.35; }

/* ---------- A question held from the rail ----------
   Tapped on the first screen, before there is a chart to answer it with. */

.astro-app .astro-pending {
	margin: 0 0 14px;
	padding: 11px 14px;
	background: var(--astro-accent-soft);
	border: 1px solid var(--astro-accent-line);
	border-radius: var(--astro-radius-sm);
	color: var(--astro-ink-2);
	font-size: 0.9rem;
	line-height: 1.5;
}

/* ---------- Notification sign-up ----------
   A dialog, not a wall: skipping it costs the reader nothing and the reading
   carries on underneath. Sized for a phone first, because that is where nearly
   all of this is read — the card is bottom-anchored on a small screen so the
   fields sit above the keyboard rather than under it. */

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

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

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

.astro-app .astro-modal__card {
	position: relative;
	width: 100%;
	max-width: 420px;
	max-height: calc(100vh - 32px);
	overflow-y: auto;
	padding: 24px 22px 20px;
	background: var(--astro-card);
	border: 1px solid var(--astro-line);
	border-radius: var(--astro-radius);
	box-shadow: var(--astro-shadow-lg);
}

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

.astro-app .astro-modal__close:hover { color: var(--astro-ink); background: var(--astro-raise-2); }

.astro-app .astro-modal__title {
	margin: 0 0 8px;
	padding-right: 28px;
	font-family: var(--astro-serif);
	font-size: 1.2rem;
	font-weight: 600;
	line-height: 1.3;
	color: var(--astro-ink);
}

.astro-app .astro-modal__body {
	margin: 0 0 16px;
	color: var(--astro-ink-2);
	font-size: 0.94rem;
	line-height: 1.55;
}

.astro-app .astro-modal__form { gap: 12px; }

/* The +91 sits inside the field rather than in a dropdown of 200 countries
   nobody on this site needs to open. */
.astro-app .astro-phone {
	display: flex;
	align-items: stretch;
	border: 1px solid var(--astro-line-strong);
	border-radius: var(--astro-radius-sm);
	background: var(--astro-field);
	overflow: hidden;
}

.astro-app .astro-phone__cc {
	display: flex;
	align-items: center;
	padding: 0 11px;
	background: var(--astro-raise-2);
	border-right: 1px solid var(--astro-line);
	color: var(--astro-muted);
	font-size: 0.95rem;
}

.astro-app .astro-phone input {
	flex: 1 1 auto;
	min-width: 0;
	padding: 13px 14px;
	background: none;
	border: 0;
	color: var(--astro-ink);
	font: inherit;
}

.astro-app .astro-phone:focus-within { border-color: var(--astro-accent); }

.astro-app .astro-modal__consent {
	align-items: flex-start;
	font-size: 0.82rem;
	line-height: 1.45;
	color: var(--astro-muted);
}

.astro-app .astro-modal__fine {
	margin: 10px 0 0;
	text-align: center;
	font-size: 0.8rem;
}

.astro-app .astro-modal__fine a { color: var(--astro-muted); }

/* The page behind a dialog should not scroll away under it. */
.astro-app--modal { overflow: hidden; }

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

	.astro-app .astro-modal__card {
		max-width: none;
		max-height: 88vh;
		border-radius: var(--astro-radius) var(--astro-radius) 0 0;
		border-bottom: 0;
		padding: 20px 16px 18px;
	}
}

/* ---------- Points inside a reading ----------
   The bold label at the start of each point is what makes an answer skimmable,
   so it gets room to be seen: the marker is a thin accent rule rather than a
   bullet, and the lines are spaced like something to read rather than like a
   dense list. */

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

.astro-app .astro-msg__points li {
	position: relative;
	margin: 0;
	padding-left: 15px;
	line-height: 1.6;
}

.astro-app .astro-msg__points li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.55em;
	bottom: 0.3em;
	width: 2px;
	border-radius: 2px;
	background: var(--astro-accent-line);
}

.astro-app .astro-msg__points strong {
	color: var(--astro-accent);
	font-weight: 600;
}

.astro-app .astro-msg__points + p { margin-top: 12px; }

/* An ordered list keeps its numbers, since the model only uses them where the
   order is the point. */
.astro-app ol.astro-msg__points {
	list-style: decimal;
	padding-left: 20px;
}

.astro-app ol.astro-msg__points li { padding-left: 2px; }

.astro-app ol.astro-msg__points li::before { display: none; }

/* The button inside a note — asking for a review, mostly. It has to read as
   part of the sentence rather than as a second call to action competing with
   the composer. */
.astro-app .astro-note__action {
	margin-left: 2px;
	font-weight: 600;
	color: var(--astro-accent);
	text-decoration: underline;
	text-underline-offset: 2px;
}

/* ---------- Mobile and email, at the moment of paying ----------
   Inside the paywall box rather than on a page of its own: a reader who has
   decided to pay should not be sent anywhere to do it. */

.astro-app .astro-pay__details {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-top: 16px;
	padding-top: 16px;
	border-top: 1px solid var(--astro-accent-line);
}

.astro-app .astro-pay__detailsnote {
	margin: 0;
	color: var(--astro-ink-2);
	font-size: 0.9rem;
}

.astro-app .astro-pay__fine {
	margin: 0;
	color: var(--astro-muted);
	font-size: 0.8rem;
	line-height: 1.45;
	text-align: center;
}

/* A reader who has paid should be able to see that they have. */
.astro-app .astro-quota--paid {
	color: #2f6d4f;
	font-weight: 600;
}

@media (prefers-color-scheme: dark) {
	.astro-app .astro-quota--paid { color: #6fbf93; }
}

/* One line under a rail heading saying what tapping does. */
.astro-app .astro-rail__hint {
	margin: 8px 0 0;
	color: var(--astro-muted);
	font-size: 0.78rem;
	line-height: 1.45;
}
