/* Promptly — legal documents (/terms, /privacy).
   The app's surface, set as a document: dark ground, purple accent, Inter,
   one readable column. Shared so the two pages can never drift apart. */

:root {
  --ground: #0b0b10;
  --panel: #14141d;
  --panel-lift: #191922;
  --hairline: rgba(255, 255, 255, 0.09);
  --hairline-strong: rgba(255, 255, 255, 0.16);
  --ink: #f6f5fa;
  --ink-dim: #b3b1c0;
  --ink-faint: #7d7b8c;
  --accent: #6c5ce7;
  --accent-lift: #8f83f2;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    transition: none !important;
  }
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  background-image: radial-gradient(
    58rem 30rem at 50% -8rem,
    rgba(108, 92, 231, 0.16),
    transparent 72%
  );
  background-repeat: no-repeat;
}

.wrap {
  max-width: 43rem;
  margin: 0 auto;
  padding: 30px 22px 80px;
}

/* Masthead — the runner, the wordmark, and where you are. */
.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--hairline);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}

.brand img {
  width: 30px;
  height: 30px;
  display: block;
}

.brand span {
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.masthead nav {
  display: flex;
  gap: 18px;
  font-size: 0.875rem;
}

.masthead nav a {
  color: var(--ink-faint);
  text-decoration: none;
}

.masthead nav a:hover {
  color: var(--ink);
}

.masthead nav a[aria-current="page"] {
  color: var(--accent-lift);
}

h1 {
  margin: 40px 0 10px;
  font-size: clamp(2rem, 6vw, 2.6rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 700;
  text-wrap: balance;
}

.updated {
  margin: 0 0 6px;
  font-size: 0.8125rem;
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
}

.standfirst {
  margin: 0 0 36px;
  font-size: 1.0625rem;
  color: var(--ink-dim);
  text-wrap: pretty;
}

/* Contents — a real list of what follows, not decoration. */
.toc {
  margin: 0 0 44px;
  padding: 18px 20px;
  background: var(--panel);
  border: 1px solid var(--hairline);
  border-radius: 14px;
}

.toc h2 {
  margin: 0 0 10px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  columns: 2;
  column-gap: 26px;
  font-size: 0.9375rem;
}

.toc li {
  margin-bottom: 4px;
  break-inside: avoid;
}

.toc a {
  color: var(--ink-dim);
  text-decoration: none;
}

.toc a:hover {
  color: var(--ink);
  text-decoration: underline;
}

/* Two columns on the phone as well. Sixteen clauses in a single column put
   the whole first screen — and part of the second — before the document
   started, on the width most readers arrive at from the app. */
@media (max-width: 34rem) {
  .toc ol {
    column-gap: 16px;
    font-size: 0.875rem;
  }
  .toc li {
    margin-bottom: 6px;
  }
}

section {
  margin-bottom: 40px;
  scroll-margin-top: 20px;
}

h2 {
  margin: 0 0 12px;
  font-size: 1.3125rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
  font-weight: 600;
  text-wrap: balance;
}

/* The clause number sits in the type, not in a decorative chip — these
   documents genuinely are a numbered sequence and get cited by number. */
h2 .n {
  color: var(--accent-lift);
  font-variant-numeric: tabular-nums;
  margin-right: 0.5ch;
}

h3 {
  margin: 24px 0 8px;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 14px;
  color: var(--ink-dim);
}

ul {
  margin: 0 0 14px;
  padding-left: 1.15rem;
  color: var(--ink-dim);
}

li {
  margin-bottom: 7px;
}

strong {
  color: var(--ink);
  font-weight: 600;
}

a {
  color: var(--accent-lift);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover {
  color: var(--ink);
}

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

code {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
  font-size: 0.875em;
  background: rgba(255, 255, 255, 0.07);
  padding: 1px 6px;
  border-radius: 5px;
  color: var(--ink);
}

/* Where numbers matter — allowances, packs, processors — a table beats prose. */
.table-scroll {
  overflow-x: auto;
  margin: 0 0 16px;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  background: var(--panel);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

caption {
  caption-side: top;
  text-align: left;
  padding: 12px 16px 0;
  font-size: 0.8125rem;
  color: var(--ink-faint);
}

th,
td {
  text-align: left;
  padding: 11px 16px;
  border-bottom: 1px solid var(--hairline);
  vertical-align: top;
}

th {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  white-space: nowrap;
}

td {
  color: var(--ink-dim);
}

td:first-child {
  color: var(--ink);
  font-weight: 500;
  white-space: nowrap;
}

tbody tr:last-child th,
tbody tr:last-child td {
  border-bottom: 0;
}

.num {
  font-variant-numeric: tabular-nums;
}

/* One callout per document, for the thing people actually come to find. */
.callout {
  margin: 0 0 16px;
  padding: 16px 18px;
  background: var(--panel-lift);
  border: 1px solid var(--hairline-strong);
  border-left: 3px solid var(--accent);
  border-radius: 12px;
}

.callout p:last-child {
  margin-bottom: 0;
}

footer {
  margin-top: 56px;
  padding-top: 22px;
  border-top: 1px solid var(--hairline);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  align-items: center;
  font-size: 0.8125rem;
  color: var(--ink-faint);
}

footer a {
  color: var(--ink-faint);
  text-decoration: none;
}

footer a:hover {
  color: var(--ink-dim);
  text-decoration: underline;
}

footer .spacer {
  margin-left: auto;
}

/* On a phone a three-column table compresses each cell to three or four
   lines. Tighter metrics buy back the width without making the page scroll
   sideways, which is worse than wrapping in a document people read. */
@media (max-width: 34rem) {
  table {
    font-size: 0.875rem;
  }
  th,
  td {
    padding: 10px 11px;
  }
  caption {
    padding: 11px 11px 0;
  }
  td:first-child {
    white-space: normal;
  }
}
