/* TextAdmin — www.textadmin.ai
 *
 * The only stylesheet on the site. There is no build step and no JavaScript, so the Content-Security
 * -Policy in _headers can say `script-src 'none'; style-src 'self'` and mean it — which is what makes
 * the "no analytics, no tracking, no third-party requests" claim on /privacy/ verifiable rather than
 * asserted. Two consequences for whoever edits this:
 *
 *   1. `style="..."` attributes are FORBIDDEN by that CSP. Everything lives here. (SVG presentation
 *      attributes like fill= and stroke= are not CSS and are fine.) scripts/check-site.sh fails the
 *      build on a stray style= so this surfaces at CI rather than as a browser-dependent layout bug.
 *   2. No @font-face and no font CDN. A Google Fonts request would make the no-third-party-requests
 *      claim false; a self-hosted webfont would be a binary nobody in this repo can regenerate.
 *
 * The palette is not designed, it is DERIVED from scripts/make-app-icon.swift, which is the repo's
 * only brand definition. The four verbatim values are marked. Two colours only, per that file's own
 * note that three do not survive small sizes.
 */

:root {
  --indigo-700: #2E2D7A;  /* verbatim: icon gradient top */
  --indigo-900: #1B1A4F;  /* verbatim: icon gradient bottom */
  --indigo-500: #4A48B5;  /* derived: links/buttons on light — 7.3:1 on white */
  --indigo-300: #A9A7E8;  /* derived: links on dark — 8.2:1 on #12112E */
  --mark:       #FAFAFF;  /* verbatim: icon mark colour */

  --ink:      #14132E;
  --ink-dim:  #4A4866;
  --paper:    #FFFFFF;
  --paper-2:  #F5F5FA;
  --border:   #DEDEEA;
  --link:     var(--indigo-500);

  --wrap:     68rem;
  --measure:  38rem;   /* ~68ch of body text */
  --radius:   14px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink:     #E8E8F5;
    --ink-dim: #A8A6C4;
    --paper:   #12112E;
    --paper-2: #1B1A4F;
    --border:  #2E2D5A;
    --link:    var(--indigo-300);
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 1.25rem; }

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

:focus-visible {
  outline: 3px solid var(--indigo-500);
  outline-offset: 3px;
  border-radius: 3px;
}
@media (prefers-color-scheme: dark) {
  :focus-visible { outline-color: var(--indigo-300); }
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--paper);
  color: var(--ink);
  padding: 0.75rem 1rem;
  z-index: 10;
}
.skip:focus { left: 0; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ── Header ──────────────────────────────────────────────────────────────────────────────────── */

.site-head {
  border-bottom: 1px solid var(--border);
  background: var(--paper);
}

.head-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.5rem;
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--ink);
  text-decoration: none;
  margin-right: auto;
}

.mark { width: 1.75rem; height: 1.75rem; display: block; }

.wordmark { font-weight: 600; font-size: 1.1875rem; letter-spacing: -0.015em; }

.site-head nav { display: flex; flex-wrap: wrap; gap: 0 1.25rem; font-size: 0.9375rem; }
.site-head nav a { color: var(--ink-dim); text-decoration: none; }
.site-head nav a:hover { color: var(--link); text-decoration: underline; }

/* ── Typography ──────────────────────────────────────────────────────────────────────────────── */

h1, h2, h3 { line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 0.6em; }
h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 700; }
h2 { font-size: clamp(1.4rem, 3vw, 1.875rem); font-weight: 650; margin-top: 2.25em; }
h3 { font-size: 1.1875rem; font-weight: 650; margin-top: 2em; }
h2:first-child, h3:first-child { margin-top: 0; }

p, ul, ol, table, pre, blockquote { margin: 0 0 1.1rem; }
li { margin-bottom: 0.35rem; }
strong { font-weight: 650; }

.lede { font-size: 1.1875rem; color: var(--ink-dim); }

main { display: block; }

/* Long-form pages: privacy, terms, sms-terms, security. */
.prose { padding: 3rem 0 4rem; }
.prose > *:not(.table-scroll):not(.callout):not(.paste):not(hr) { max-width: var(--measure); }
.prose h1 { font-size: clamp(1.75rem, 4vw, 2.375rem); }
.prose h2 { font-size: 1.375rem; }
.prose .meta { color: var(--ink-dim); font-size: 0.9375rem; margin-bottom: 2rem; }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 2.5rem 0; }

/* ── Sections ────────────────────────────────────────────────────────────────────────────────── */

.section { padding: 3.5rem 0; }
.section-tint { background: var(--paper-2); }
.section h2 { margin-top: 0; }
.section > .wrap > p { max-width: var(--measure); }

.hero {
  background: linear-gradient(180deg, var(--indigo-700), var(--indigo-900));
  color: var(--mark);
  padding: 4.5rem 0 4rem;
}
.hero h1 { max-width: 16ch; }
.hero p { max-width: 42ch; color: #D6D5F0; font-size: 1.1875rem; }
.hero .cta { margin-top: 0.5rem; }

.cta {
  display: inline-block;
  background: var(--mark);
  color: var(--indigo-900);
  font-weight: 650;
  text-decoration: none;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
}
.cta:hover { background: #FFFFFF; text-decoration: none; }

.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; }
.cta-note { color: #D6D5F0; font-size: 0.9375rem; margin: 0; max-width: 34ch; }

.section .cta { background: var(--indigo-500); color: #FFFFFF; }
.section .cta:hover { background: var(--indigo-700); }
@media (prefers-color-scheme: dark) {
  .section .cta { background: var(--indigo-300); color: var(--indigo-900); }
  .section .cta:hover { background: #C4C2F2; }
}

.banner {
  background: var(--indigo-900);
  color: #D6D5F0;
  font-size: 0.9375rem;
  padding: 0.7rem 0;
  text-align: center;
}
.banner p { margin: 0; }
.banner a { color: var(--indigo-300); }

/* ── Cards and lists ─────────────────────────────────────────────────────────────────────────── */

.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-top: 2rem;
}
@media (min-width: 48rem) {
  .cards { grid-template-columns: repeat(3, 1fr); }
  .cards-2 { grid-template-columns: repeat(2, 1fr); }
}

.card {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.card h3 { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }

.section-tint .card { background: var(--paper); }

.check { list-style: none; padding: 0; }
.check li { padding-left: 1.6rem; position: relative; }
.check li::before {
  content: "";
  position: absolute;
  left: 0.25rem;
  top: 0.62em;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--indigo-500);
}
@media (prefers-color-scheme: dark) {
  .check li::before { background: var(--indigo-300); }
}

.steps { counter-reset: step; list-style: none; padding: 0; max-width: var(--measure); }
.steps > li {
  counter-increment: step;
  position: relative;
  padding-left: 2.75rem;
  margin-bottom: 1.5rem;
}
.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.05em;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 50%;
  background: var(--indigo-500);
  color: #FFFFFF;
  font-size: 0.9375rem;
  font-weight: 650;
  display: grid;
  place-items: center;
}
@media (prefers-color-scheme: dark) {
  .steps > li::before { background: var(--indigo-300); color: var(--indigo-900); }
}
.steps h3 { margin: 0 0 0.25rem; }

.callout {
  border-left: 3px solid var(--indigo-500);
  background: var(--paper-2);
  padding: 1.1rem 1.25rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 1.75rem 0;
  max-width: var(--measure);
}
.callout p:last-child { margin-bottom: 0; }
@media (prefers-color-scheme: dark) {
  .callout { border-left-color: var(--indigo-300); }
}

/* ── Tables ──────────────────────────────────────────────────────────────────────────────────── */

.table-scroll { overflow-x: auto; margin-bottom: 1.1rem; }

table { border-collapse: collapse; width: 100%; font-size: 0.9375rem; }
th, td { text-align: left; vertical-align: top; padding: 0.6rem 0.85rem; border-bottom: 1px solid var(--border); }
th { font-weight: 650; }
thead th { border-bottom-width: 2px; }

/* ── The example SMS transcript ──────────────────────────────────────────────────────────────── */

.transcript {
  list-style: none;
  padding: 1.5rem;
  margin: 0;
  max-width: 26rem;
  background: var(--paper-2);
  border: 1px solid var(--border);
  border-radius: 22px;
}
.transcript li { display: flex; margin-bottom: 0.6rem; }
.transcript li:last-child { margin-bottom: 0; }
.transcript p {
  margin: 0;
  padding: 0.6rem 0.9rem;
  border-radius: 18px;
  max-width: 85%;
  font-size: 0.9375rem;
  line-height: 1.45;
}
.from-them { justify-content: flex-start; }
.from-them p {
  background: var(--border);
  color: var(--ink);
  border-bottom-left-radius: 6px;
}
.from-us { justify-content: flex-end; }
.from-us p {
  background: var(--indigo-500);
  color: #FFFFFF;
  border-bottom-right-radius: 6px;
}
@media (prefers-color-scheme: dark) {
  .from-us p { background: var(--indigo-700); color: var(--mark); }
}

.transcript-caption { font-size: 0.875rem; color: var(--ink-dim); max-width: 26rem; margin-top: 0.75rem; }

.split { display: grid; gap: 2.5rem; align-items: start; }
@media (min-width: 48rem) {
  .split { grid-template-columns: 1fr 1fr; gap: 3.5rem; }
}

/* ── The copy-and-paste block on /sms-terms/ ─────────────────────────────────────────────────── */

.paste {
  background: var(--paper-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.4rem;
  overflow-x: auto;
  white-space: pre-wrap;
  word-wrap: break-word;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.875rem;
  line-height: 1.55;
  max-width: var(--measure);
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: var(--paper-2);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}
.paste code { background: none; padding: 0; font-size: inherit; }

.keywords { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.9375rem; }

/* ── Footer ──────────────────────────────────────────────────────────────────────────────────── */

.site-foot {
  background: linear-gradient(180deg, var(--indigo-700), var(--indigo-900));
  color: #D6D5F0;
  padding: 3rem 0 3.5rem;
  margin-top: 4rem;
  font-size: 0.9375rem;
}
.site-foot a { color: var(--mark); text-decoration: none; }
.site-foot a:hover { text-decoration: underline; }
.foot-brand { font-weight: 650; font-size: 1.1875rem; color: var(--mark); margin: 0 0 1rem; letter-spacing: -0.015em; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; margin-bottom: 1.5rem; }
.foot-legal { margin: 0; max-width: 46ch; color: #B6B4DC; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
