/*
 * The "Gold control room" look (BRAND-001, 25-Sep-2026), carried from the homepage
 * (`src/app/home.css`, scoped `.rt-home`) onto the privacy, terms, support and
 * search pages, scoped `.rt-page` so the two stylesheets never collide. The
 * colour tokens, the gutter and the max content width are copied verbatim from
 * `.rt-home`'s own token block (`tests/unit/brand-page-stylesheet.test.ts` checks
 * that the values never drift apart). The homepage itself is untouched: this
 * file is never linked from it.
 *
 * Fonts: Unbounded, Instrument Sans and JetBrains Mono, the same latin-subset
 * variable files `next/font/google` already serves the homepage, self-hosted
 * here as static files so these pages make no request to a font service either.
 * All three families are distributed under the SIL Open Font License 1.1.
 */

@font-face {
  font-family: "RT Unbounded";
  src: url("/brand/fonts/unbounded-latin.woff2") format("woff2");
  font-weight: 500 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "RT Instrument Sans";
  src: url("/brand/fonts/instrument-sans-latin.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "RT JetBrains Mono";
  src: url("/brand/fonts/jetbrains-mono-latin.woff2") format("woff2");
  font-weight: 400 500;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/*
 * The search page is a raw HTML document with no Tailwind preflight, so it needs
 * its own minimal reset. Scoped to `body.rt-page` so it never reaches the legal
 * pages, where `.rt-page` is a `div` inside a layout Tailwind already reset.
 */
body.rt-page {
  margin: 0;
}

body.rt-page,
body.rt-page *,
body.rt-page *::before,
body.rt-page *::after {
  box-sizing: border-box;
}

.rt-page {
  --ink-0: #030406;
  --ink-1: #07080c;
  --ink-2: #0b1120;
  --ink-3: #131d35;
  --gold: #d4a84b;
  --gold-hi: #e7c66e;
  --gold-lo: #b08a3a;
  --glow: #ffe9a8;
  --ivory: #f5f3ee;
  --text: #c8cfda;
  --muted: #8c97a8;
  --line: rgba(212, 168, 75, 0.22);
  --line-soft: rgba(212, 168, 75, 0.1);
  --gutter: clamp(16px, 4vw, 56px);
  --max: 1240px;
  --display: "RT Unbounded", "Arial Black", sans-serif;
  --body: "RT Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: "RT JetBrains Mono", ui-monospace, Menlo, monospace;

  position: relative;
  isolation: isolate;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: clip;
  background: var(--ink-1);
  color: var(--text);
  font: 400 17px/1.7 var(--body);
  -webkit-font-smoothing: antialiased;
  color-scheme: dark;
}

/* The engineering grid and the warm glow, the same recipe as the homepage's backdrop. */
.rt-page::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60rem 40rem at 78% -8%, rgba(212, 168, 75, 0.16), transparent 60%),
    radial-gradient(40rem 30rem at -10% 40%, rgba(19, 29, 53, 0.8), transparent 70%),
    linear-gradient(var(--line-soft) 1px, transparent 1px) 0 0 / 64px 64px,
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px) 0 0 / 64px 64px,
    var(--ink-1);
  -webkit-mask-image: linear-gradient(#000 0 40%, rgba(0, 0, 0, 0.35));
  mask-image: linear-gradient(#000 0 40%, rgba(0, 0, 0, 0.35));
}

.rt-page a {
  color: var(--gold-hi);
  text-decoration: underline;
  text-decoration-color: var(--gold-lo);
  text-underline-offset: 5px;
  transition: color 0.2s;
}

.rt-page a:hover {
  color: var(--glow);
}

.rt-page :focus-visible {
  outline: 2px solid var(--glow);
  outline-offset: 4px;
}

.rt-page main:focus {
  outline: none;
}

.rt-page .rt-wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* A narrower reading column for legal prose and result copy: 60 to 78 characters. */
.rt-page .rt-read {
  max-width: 68ch;
}

.rt-page .rt-skip {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 20;
  background: var(--gold);
  color: var(--ink-1);
  padding: 10px 16px;
  font: 600 14px/1 var(--body);
  text-decoration: none;
}

.rt-page .rt-skip:focus {
  top: 16px;
}

.rt-page .rt-skip:hover {
  color: var(--ink-1);
}

/* ---------- top bar ---------- */
.rt-page .rt-bar {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(7, 8, 12, 0.72);
  border-bottom: 1px solid var(--line-soft);
}

.rt-page .rt-bar .rt-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 64px;
}

.rt-page .rt-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  text-decoration: none;
  color: var(--ivory);
  font: 700 15px/1 var(--display);
  letter-spacing: 0.02em;
}

.rt-page .rt-brand:hover {
  color: var(--ivory);
}

.rt-page .rt-brand img,
.rt-page .rt-brand svg {
  width: 34px;
  height: 34px;
  flex: none;
  display: block;
}

/* ---------- main column ---------- */
.rt-page main {
  flex: 1 0 auto;
  padding: clamp(32px, 6vw, 72px) 0 clamp(48px, 8vw, 96px);
}

.rt-page .rt-eyebrow-link {
  display: inline-flex;
  align-items: center;
  font: 500 12px/1 var(--mono);
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold);
}

.rt-page .rt-eyebrow-link a {
  display: inline-block;
  padding: 18px 0;
  color: var(--gold);
  text-decoration-color: var(--gold-lo);
}

.rt-page .rt-eyebrow-link::before {
  content: "";
  display: inline-block;
  width: 28px;
  height: 1px;
  background: var(--gold);
  margin-right: 12px;
}

.rt-page .rt-eyebrow-link a:hover {
  color: var(--glow);
}

.rt-page h1 {
  margin: 20px 0 0;
  font: 500 clamp(1.7rem, 4.2vw, 3rem) / 1.08 var(--display);
  letter-spacing: -0.03em;
  color: var(--ivory);
}

.rt-page .rt-updated {
  margin: 16px 0 0;
  font: 400 13px/1.5 var(--mono);
  color: var(--muted);
}

.rt-page .rt-legal-head p:not(.rt-eyebrow-link):not(.rt-updated) {
  margin: 20px 0 0;
  max-width: 68ch;
  font-size: 17px;
  line-height: 1.7;
  color: var(--ivory);
}

/* ---------- section bands ---------- */
.rt-page .rt-band {
  padding: clamp(32px, 5vw, 56px) 0;
  border-top: 1px solid var(--line-soft);
}

.rt-page h2 {
  margin: 0;
  font: 500 clamp(1.3rem, 2.6vw, 1.9rem) / 1.2 var(--display);
  letter-spacing: -0.02em;
  color: var(--ivory);
}

.rt-page .rt-band p {
  margin: 14px 0 0;
  max-width: 68ch;
  font-size: 17px;
  line-height: 1.7;
}

.rt-page .rt-legal-list {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  max-width: 68ch;
  display: grid;
  gap: 14px;
}

.rt-page .rt-legal-list li {
  padding-left: 16px;
  border-left: 2px solid var(--gold);
  font-size: 17px;
  line-height: 1.7;
}

.rt-page code {
  font-family: var(--mono);
  font-size: 0.92em;
  color: var(--ivory);
  background: rgba(212, 168, 75, 0.1);
  padding: 0.1em 0.4em;
}

.rt-page address {
  font: 400 14px/1.8 var(--mono);
  color: var(--muted);
  font-style: normal;
}

.rt-page address p {
  margin: 0;
}

/* ---------- search form ---------- */
.rt-page form {
  margin: 24px 0 8px;
  max-width: 68ch;
}

.rt-page label {
  display: block;
  margin: 0 0 10px;
  font: 500 14px/1.5 var(--body);
  color: var(--text);
}

.rt-page input[type="text"] {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  background: var(--ink-2);
  border: 1px solid var(--line);
  color: var(--ivory);
  font: 400 16px/1.4 var(--body);
}

.rt-page input[type="text"]::placeholder {
  color: var(--muted);
}

.rt-page button[type="submit"] {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  margin-top: 16px;
  padding: 0 26px;
  background: linear-gradient(180deg, var(--gold-hi), var(--gold));
  color: var(--ink-1);
  font: 600 16px/1 var(--body);
  border: none;
  cursor: pointer;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
  transition: filter 0.2s;
}

.rt-page button[type="submit"]:hover {
  filter: brightness(1.1);
}

.rt-page button[type="submit"]:focus-visible {
  outline: 2px solid var(--ink-1);
  outline-offset: -6px;
  filter: brightness(1.15);
}

/* ---------- search results, styled by descendant selector only ---------- */
.rt-page .rt-wrap > p[role="alert"] {
  margin: 20px 0;
  max-width: 68ch;
  padding: 14px 18px;
  border-left: 3px solid var(--gold);
  background: rgba(212, 168, 75, 0.08);
  color: var(--ivory);
}

.rt-page .rt-wrap > p {
  max-width: 68ch;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
}

.rt-page .rt-wrap > ol {
  list-style: none;
  margin: 20px 0 32px;
  padding: 0;
  display: grid;
  gap: 16px;
}

.rt-page .rt-wrap > ol > li {
  position: relative;
  padding: 20px 24px;
  border: 1px solid var(--line);
  background: linear-gradient(165deg, rgba(19, 29, 53, 0.6), rgba(7, 8, 12, 0.4) 60%);
}

.rt-page .rt-wrap > ol > li::before {
  content: "";
  position: absolute;
  top: -1px;
  left: -1px;
  width: 56px;
  height: 3px;
  background: var(--gold);
}

.rt-page .rt-wrap > ol > li > a:first-child {
  font: 600 18px/1.35 var(--body);
}

.rt-page .rt-wrap > ol p {
  margin: 10px 0 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
}

.rt-page .rt-wrap > ol strong {
  color: var(--ivory);
}

.rt-page .rt-wrap > ol ul {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  border-top: 1px solid var(--line-soft);
}

.rt-page .rt-wrap > ol ul > li {
  padding: 12px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
}

.rt-page .rt-wrap > ol ul ul {
  margin: 10px 0 0;
  padding-left: 18px;
  border-top: none;
  list-style: disc;
}

.rt-page .rt-wrap > ol ul ul > li {
  border-bottom: none;
  padding: 4px 0;
}

.rt-page .rt-wrap > h2 {
  margin: 32px 0 0;
}

.rt-page .rt-wrap > ul {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  max-width: 68ch;
  display: grid;
  gap: 10px;
}

.rt-page .rt-wrap > ul > li {
  padding: 8px 0 8px 16px;
  border-left: 2px solid var(--gold);
  font-size: 15px;
  line-height: 1.7;
}

/*
 * The recall flag (META-010) beside a seller, and the edition's meaning once
 * below the list. Gold, not red: the flag informs and never blocks a purchase.
 */
.rt-page .recall-flag {
  display: block;
  margin-top: 8px;
  padding: 8px 12px;
  border-left: 3px solid var(--gold);
  background: rgba(212, 168, 75, 0.08);
  color: var(--ivory);
  font-size: 14px;
  line-height: 1.6;
}

.rt-page .recall-flag strong {
  color: var(--gold-hi);
}

.rt-page .rt-wrap > p.recall-flag-meaning {
  font-size: 14px;
  color: var(--muted);
}

/* ---------- the agent block ---------- */
.rt-page #robotrunk-agent-block {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--line-soft);
}

.rt-page #robotrunk-agent-block pre {
  font: 400 13px/1.65 var(--mono);
  color: var(--muted);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 0 0 16px;
}

.rt-page #robotrunk-agent-block ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
}

.rt-page #robotrunk-agent-block a {
  display: inline-block;
  padding: 14px 0;
  font: 500 14px/1.4 var(--mono);
}

/* ---------- footer ---------- */
.rt-page .rt-footer {
  border-top: 1px solid var(--line);
  padding: 32px 0 48px;
  background: var(--ink-0);
}

.rt-page .rt-footer .rt-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 32px;
}

.rt-page .rt-footer nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 26px;
  font: 400 14px/1.6 var(--mono);
}

.rt-page .rt-footer a {
  display: inline-block;
  padding: 14px 0;
}

.rt-page .rt-footer a[aria-current="page"] {
  color: var(--ivory);
  text-decoration: none;
}

@media (prefers-reduced-motion: reduce) {
  .rt-page *,
  .rt-page *::before,
  .rt-page *::after {
    transition: none !important;
  }
}

@media (max-width: 680px) {
  .rt-page {
    font-size: 16px;
  }
}
