/* Styles AutoRouter's public legal documents in the landing page's brand, without tracking. */

/* Tokens mirror styles.css so these pages read as part of the landing site. */
:root {
  --surface: #141518;
  --fg: #f4f4f5;
  --muted: #a1a1aa;
  --soft: #cfcfd4;
  --faint: #6b6b74;
  --ring: rgba(255, 255, 255, 0.1);
  --accent: #9c8cff;

  --radius-sm: 6px;

  /* In-place changes (hover, colour, press, entrances) use quart. */
  --duration-hover: 150ms;
  --duration-row: 450ms;

  --ease-quart: cubic-bezier(0.165, 0.84, 0.44, 1);

  /* The walkthrough stage: near-black, lit violet from the bottom right,
     with a hairline rim. */
  --stage: #090909;
  --stage-glow: rgba(103, 117, 237, 0.12);
  --stage-rim: rgba(255, 255, 255, 0.14);
  --radius-stage: 22px;

  --rainbow: linear-gradient(
    90deg,
    #62d96b,
    #5c98ff,
    #9c62ff,
    #ff6fae,
    #ffa64f
  );
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  background:
    radial-gradient(60% 50% at 85% 100%, var(--stage-glow), transparent) fixed,
    #000;
  color: var(--fg);
  font:
    400 16px/1.7 system-ui,
    -apple-system,
    "SF Pro Text",
    sans-serif;
}

::selection {
  background: rgba(156, 140, 255, 0.35);
}

/* Layout -------------------------------------------------------------------- */

header,
main,
footer {
  max-width: 720px;
  margin-inline: auto;
  padding-inline: 24px;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 40px 0;
}

main {
  padding-block: 72px 80px;
}

/* Header and page focus in on load, as the landing blocks do. */
header,
main {
  animation: focus-in var(--duration-row) var(--ease-quart) both;
}

main {
  animation-delay: 150ms;
  transform-origin: 50% 0;
}

@keyframes focus-in {
  from {
    opacity: 0;
    transform: scale(0.98);
    filter: blur(2px);
  }
}

/* Header -------------------------------------------------------------------- */

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--fg);
  font-weight: 500;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand svg {
  width: 20px;
  height: 22px;
  overflow: visible;
}

/* The landing's quiet small button. */
.pill {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  box-shadow: 0 0 0 0.5px var(--ring);
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition:
    transform var(--duration-hover) var(--ease-quart),
    color var(--duration-hover) var(--ease-quart),
    background var(--duration-hover) var(--ease-quart);
}

.pill:hover {
  color: var(--fg);
  background: var(--surface);
}

.pill:active {
  transform: scale(0.98);
}

/* Document ------------------------------------------------------------------ */

h1 {
  margin: 0 0 20px;
  font-size: clamp(40px, 6vw, 56px);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

/* The dates sit in the landing's alpha badge, rainbow dot included. */
.updated {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 40px;
  padding: 5px 12px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 0.5px var(--ring);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.updated::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--rainbow);
}

/* Each numbered section opens with a hairline, like the landing's answers. */
h2 {
  margin: 56px 0 16px;
  padding-top: 24px;
  border-top: 0.5px solid var(--ring);
  font-size: 20px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.02em;
  scroll-margin-top: 24px;
}

h3 {
  margin: 28px 0 8px;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

p,
li {
  color: var(--soft);
  overflow-wrap: break-word;
}

p {
  margin: 14px 0;
}

ul {
  padding-left: 20px;
}

li + li {
  margin-top: 12px;
}

li::marker {
  color: var(--faint);
}

strong {
  color: var(--fg);
  font-weight: 500;
}

main a {
  color: var(--fg);
  text-decoration: underline 1px rgba(255, 255, 255, 0.28);
  text-underline-offset: 4px;
  transition: text-decoration-color var(--duration-hover) var(--ease-quart);
}

main a:hover {
  text-decoration-color: var(--accent);
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 5px;
  border-radius: 2px;
}

code {
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--fg);
  font:
    0.875em ui-monospace,
    "SF Mono",
    Menlo,
    monospace;
}

/* The plain-language summary sits on the walkthrough stage. */
.summary {
  margin: 40px 0;
  padding: 4px 28px 8px;
  border-radius: var(--radius-stage);
  background:
    radial-gradient(circle at 100% 100%, var(--stage-glow), transparent 70%),
    var(--stage);
  box-shadow: inset 0 0 0 0.5px var(--stage-rim);
}

.summary h2 {
  margin: 20px 0 8px;
  padding-top: 0;
  border-top: 0;
  font-size: 16px;
  letter-spacing: -0.01em;
}

.summary > p:last-child {
  color: var(--muted);
  font-size: 14px;
}

/* Contents: a quiet two-column index, numbered like the sections. */
.toc {
  margin: 40px 0 0;
}

.toc h2 {
  margin: 0 0 12px;
  padding-top: 0;
  border-top: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0;
}

.toc ol {
  margin: 0;
  padding: 0;
  columns: 2;
  column-gap: 32px;
  list-style: none;
  counter-reset: toc;
}

.toc li {
  display: grid;
  grid-template-columns: 1.75em 1fr;
  margin: 0;
  padding: 3px 0;
  break-inside: avoid;
  counter-increment: toc;
  font-size: 15px;
}

.toc li::before {
  content: counter(toc) ".";
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}

.toc a {
  color: var(--muted);
  text-decoration: none;
  transition: color var(--duration-hover) var(--ease-quart);
}

.toc a:hover {
  color: var(--fg);
}

/* Footer: the landing's legal links. */
footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 28px 40px;
  border-top: 0.5px solid var(--ring);
  font-size: 12px;
}

footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

footer a {
  color: var(--muted);
  text-decoration: none;
  transition: color var(--duration-hover) var(--ease-quart);
}

footer a:hover,
footer a[aria-current="page"] {
  color: var(--fg);
}

@media (prefers-reduced-motion: reduce) {
  header,
  main {
    animation: none;
  }
}

@media (max-width: 600px) {
  header,
  main,
  footer {
    padding-inline: 16px;
  }

  header {
    padding-top: 28px;
  }

  main {
    padding-block: 48px 56px;
  }

  /* Both dates wrap at phone widths, so the badge becomes a rounded tag. */
  .updated {
    align-items: flex-start;
    border-radius: 12px;
  }

  .updated::before {
    margin-top: 7px;
  }

  .summary {
    padding-inline: 20px;
  }

  .toc ol {
    columns: 1;
  }

  footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}
