/* ragembed landing — the public face of the API.
   Same phosphor palette and monospace voice as the operator dashboard, but laid
   out for reading rather than for watching: one column, generous rhythm, and
   code blocks that are the loudest thing on the page because they are what a
   visitor actually came for. */

:root {
	--bg: #080b0c;
	--panel: #0e1517;
	--line: #1b262b;
	--line-2: #24333a;
	--ink: #cfdbd5;
	--ink-dim: #8a9c95;
	--ink-faint: #5a6b65;
	--amber: #ffb454;
	--amber-dim: #c98a3f;
	--green: #6fd08c;
	--red: #ff6a6a;
	--mono: ui-monospace, "SF Mono", SFMono-Regular, "Cascadia Code", "JetBrains Mono", Menlo, Consolas, monospace;
}

* {
	box-sizing: border-box;
}

html {
	color-scheme: dark;
}

body {
	margin: 0;
	min-height: 100dvh;
	font-family: var(--mono);
	font-size: 15px;
	line-height: 1.65;
	color: var(--ink);
	background:
		radial-gradient(1200px 520px at 78% -14%, rgba(255, 180, 84, 0.07), transparent 62%),
		repeating-linear-gradient(0deg, transparent 0 2px, rgba(255, 255, 255, 0.014) 2px 3px),
		var(--bg);
	-webkit-font-smoothing: antialiased;
}

.page {
	max-width: 780px;
	margin: 0 auto;
	padding: 26px 20px 64px;
}

/* --- masthead ---------------------------------------------------------- */

.top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding-bottom: 18px;
	border-bottom: 1px solid var(--line);
}

.brand {
	display: flex;
	align-items: baseline;
	gap: 10px;
}

.prompt {
	color: var(--amber);
	animation: blink 1.2s steps(1) infinite;
}

@keyframes blink {
	50% {
		opacity: 0.25;
	}
}

.brand-name {
	font-weight: 800;
	font-size: 18px;
	letter-spacing: 0.02em;
}

.chip {
	border: 1px solid var(--line-2);
	color: var(--green);
	padding: 2px 10px;
	border-radius: 999px;
	font-size: 12px;
}

/* --- hero -------------------------------------------------------------- */

.hero {
	padding: 40px 0 8px;
}

h1 {
	margin: 0 0 14px;
	font-size: clamp(28px, 7vw, 42px);
	line-height: 1.12;
	letter-spacing: -0.02em;
	font-weight: 800;
}

.lede {
	margin: 0 0 24px;
	color: var(--ink-dim);
	max-width: 60ch;
}
.lede b {
	color: var(--ink);
}

/* The base URL is the one fact every visitor needs, so it gets its own frame. */
.endpoint {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
	border: 1px solid var(--line-2);
	border-left: 3px solid var(--amber);
	border-radius: 8px;
	padding: 12px 14px;
	background: rgba(255, 180, 84, 0.04);
}

.endpoint-label {
	color: var(--ink-faint);
	text-transform: uppercase;
	letter-spacing: 0.18em;
	font-size: 9px;
}

.endpoint-url {
	color: var(--amber);
	font-size: 15px;
	word-break: break-all;
}

/* --- sections ---------------------------------------------------------- */

section {
	margin-top: 44px;
}

h2 {
	display: flex;
	align-items: baseline;
	gap: 12px;
	margin: 0 0 10px;
	font-size: 19px;
	font-weight: 700;
	letter-spacing: -0.01em;
}

/* The section number reads like a prompt counter rather than a heading. */
.tick {
	color: var(--amber-dim);
	font-size: 11px;
	letter-spacing: 0.1em;
	font-weight: 500;
}

p {
	margin: 0 0 16px;
	color: var(--ink-dim);
	max-width: 62ch;
}
p b {
	color: var(--ink);
}

.note {
	font-size: 13px;
	color: var(--ink-faint);
	border-left: 1px solid var(--line-2);
	padding-left: 12px;
}
.note b {
	color: var(--ink-dim);
}

code {
	font-family: var(--mono);
	color: var(--amber-dim);
	background: rgba(255, 180, 84, 0.07);
	padding: 0.05em 0.35em;
	border-radius: 3px;
	font-size: 0.92em;
}

/* --- code blocks ------------------------------------------------------- */

/* The block scrolls inside its own frame: a long curl line must never make the
   page scroll sideways on a phone. */
.code-scroll {
	overflow-x: auto;
	border: 1px solid var(--line);
	border-radius: 10px;
	background: linear-gradient(180deg, var(--panel), #0b1113);
	margin: 0 0 16px;
}

.code-scroll pre {
	margin: 0;
	padding: 14px 16px;
	font-size: 13px;
	line-height: 1.7;
}

.code-scroll code {
	background: none;
	color: var(--ink);
	padding: 0;
	font-size: inherit;
	white-space: pre;
}

/* --- limits ------------------------------------------------------------ */

.limits {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	gap: 10px;
	margin: 0 0 16px;
}

.limit {
	border: 1px solid var(--line);
	border-radius: 8px;
	padding: 11px 13px;
	background: rgba(255, 255, 255, 0.012);
}

.limit dt {
	color: var(--ink-faint);
	text-transform: uppercase;
	letter-spacing: 0.14em;
	font-size: 9px;
}

.limit dd {
	margin: 4px 0 0;
	font-size: 17px;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

.unit {
	color: var(--ink-faint);
	font-size: 10px;
	font-weight: 400;
	margin-left: 4px;
}

/* --- status table ------------------------------------------------------ */

.table-scroll {
	overflow-x: auto;
	margin: 0 0 16px;
}

.statuses {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
	text-align: left;
}

.statuses th,
.statuses td {
	padding: 9px 12px 9px 0;
	border-bottom: 1px solid var(--line);
	vertical-align: top;
	font-weight: 400;
}

.statuses thead th {
	color: var(--ink-faint);
	text-transform: uppercase;
	letter-spacing: 0.14em;
	font-size: 9px;
	white-space: nowrap;
}

.statuses tbody th {
	width: 1%;
}

.statuses .dim {
	color: var(--ink-faint);
}

/* Status codes carry their own colour so the table can be skimmed by outcome,
   with the code text itself as the label — never colour alone. */
.code {
	font-variant-numeric: tabular-nums;
	font-weight: 700;
	border: 1px solid currentColor;
	border-radius: 4px;
	padding: 1px 7px;
}
.code.ok {
	color: var(--green);
}
.code.warn {
	color: var(--amber);
}
.code.bad {
	color: var(--red);
}

/* --- footer ------------------------------------------------------------ */

.foot {
	margin-top: 52px;
	padding-top: 16px;
	border-top: 1px solid var(--line);
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 14px;
	flex-wrap: wrap;
	color: var(--ink-faint);
	font-size: 11px;
}

.admin-link {
	color: var(--ink-dim);
	text-decoration: none;
	border-bottom: 1px solid var(--line-2);
	padding: 6px 0;
	transition: color 0.14s ease, border-color 0.14s ease;
}
.admin-link:hover {
	color: var(--amber);
	border-color: var(--amber-dim);
}

/* --- focus + motion ---------------------------------------------------- */

:focus-visible {
	outline: 2px solid var(--amber);
	outline-offset: 3px;
	border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
	* {
		transition: none !important;
		animation: none !important;
	}
}

/* The one place a visitor is asked to do something: make it unmistakably a
   link, and give it a real touch target. */
.mailto {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	min-height: 44px;
	padding: 8px 14px;
	border: 1px solid var(--line-2);
	border-radius: 8px;
	color: var(--amber);
	text-decoration: none;
	background: rgba(255, 180, 84, 0.05);
	transition: border-color 0.14s ease, background 0.14s ease;
}
.mailto:hover {
	border-color: var(--amber-dim);
	background: rgba(255, 180, 84, 0.1);
}

/* --- article ------------------------------------------------------------ */

/* The long-form page reuses the landing page's voice, with the few extra parts
   a real article needs: a way back, a map of itself, and a question list. */

.brand-link {
	text-decoration: none;
	color: inherit;
}

.crumbs {
	font-size: 11px;
	color: var(--ink-faint);
	letter-spacing: 0.08em;
	text-transform: uppercase;
	margin: 34px 0 14px;
}
.crumbs a {
	color: var(--ink-dim);
	text-decoration: none;
	border-bottom: 1px solid var(--line-2);
	padding-bottom: 2px;
}
.crumbs a:hover {
	color: var(--amber);
	border-color: var(--amber-dim);
}

article h1 {
	margin-bottom: 18px;
}

/* A contents list earns its place on a page this long: it is the fastest route
   to the one section a reader actually came for. */
.toc {
	border: 1px solid var(--line);
	border-left: 3px solid var(--amber-dim);
	border-radius: 8px;
	padding: 16px 20px 18px;
	margin: 0 0 12px;
	background: rgba(255, 255, 255, 0.014);
}
.toc-title {
	margin: 0 0 10px;
	font-size: 9px;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--ink-faint);
	font-weight: 500;
}
.toc ol {
	margin: 0;
	padding-left: 20px;
	display: grid;
	gap: 7px;
	font-size: 14px;
}
.toc a {
	color: var(--ink-dim);
	text-decoration: none;
	border-bottom: 1px solid transparent;
}
.toc a:hover {
	color: var(--amber);
	border-color: var(--amber-dim);
}

/* Numbered and bulleted reasons: the lead clause of each is bold, so the list
   can be skimmed on its own and still make sense. */
.reasons {
	margin: 0 0 16px;
	padding-left: 22px;
	display: grid;
	gap: 12px;
	color: var(--ink-dim);
	max-width: 62ch;
}
.reasons li::marker {
	color: var(--amber-dim);
}
.reasons b {
	color: var(--ink);
}

article i {
	color: var(--ink);
	font-style: normal;
	border-bottom: 1px dotted var(--line-2);
}

article a:not(.mailto):not(.admin-link) {
	color: var(--amber);
	text-decoration: none;
	border-bottom: 1px solid var(--amber-dim);
}

/* Question list: each question reads as a heading, because that is how it is
   scanned — and how an assistant quoting the page will lift it. */
.faq {
	margin: 0;
	display: grid;
	gap: 18px;
}
.faq dt {
	font-weight: 700;
	color: var(--ink);
	margin-bottom: 6px;
}
.faq dd {
	margin: 0;
	color: var(--ink-dim);
	max-width: 62ch;
	border-left: 1px solid var(--line-2);
	padding-left: 14px;
}

.cta {
	border-top: 1px solid var(--line);
	padding-top: 26px;
}

/* Email and phone sit side by side on a wide screen and stack on a narrow one,
   so neither is buried and both keep a full-size touch target. */
.contact-row {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	max-width: none;
}
