/* ============================================================================
   TAS — the legal site.
   Three pages share this: privacy policy, terms, and the deletion form.
   Tokens carried over from the original standalone privacy.html so the page
   people have already been sent does not change colour under them.
   ========================================================================= */

:root {
  color-scheme: light dark;
  --bg: #fdfaf6;
  --card: #ffffff;
  --fg: #1c1917;
  --muted: #57534e;
  --faint: #8a827c;
  --line: #ece5dd;
  --accent: #d2500f;
  --note-bg: #fdf3ea;
  --field-bg: #ffffff;
  --danger: #b42318;
  --ok-bg: #edfaf0;
  --ok-line: #bfe6c8;
  --ok-fg: #166534;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141210;
    --card: #1d1a17;
    --fg: #f5f1ec;
    --muted: #b7ada4;
    --faint: #8a8077;
    --line: #2c2723;
    --accent: #f59741;
    --note-bg: #241c14;
    --field-bg: #17140f;
    --danger: #f98d80;
    --ok-bg: #16251a;
    --ok-line: #2f5236;
    --ok-fg: #86e0a0;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 46rem; margin: 0 auto; padding: 3rem 1.25rem 5rem; }

header { border-bottom: 1px solid var(--line); padding-bottom: 1.5rem; margin-bottom: 2rem; }

.eyebrow {
  font-size: .7rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--faint); font-weight: 700; margin: 0 0 .5rem;
}

h1 { font-size: 1.9rem; line-height: 1.2; margin: 0 0 .6rem; letter-spacing: -.02em; }
.dates { color: var(--muted); font-size: .875rem; margin: 0; }

h2 { font-size: 1.12rem; margin: 2.4rem 0 .7rem; letter-spacing: -.01em; padding-top: .3rem; }
h3 { font-size: .98rem; margin: 1.5rem 0 .4rem; color: var(--fg); }

p, li { color: var(--muted); }
p { margin: 0 0 .9rem; }
ul { margin: 0 0 .9rem; padding-left: 1.15rem; }
li { margin-bottom: .4rem; }
strong { color: var(--fg); font-weight: 650; }
a { color: var(--accent); }

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .875em; background: var(--note-bg); padding: .1em .35em;
  border-radius: 4px; color: var(--fg);
}

.note {
  background: var(--note-bg); border: 1px solid var(--line);
  border-radius: 10px; padding: 1rem 1.15rem; margin: 1.2rem 0;
}
.note p:last-child, .note ul:last-child { margin-bottom: 0; }

table { width: 100%; border-collapse: collapse; margin: .8rem 0 1.2rem; font-size: .93rem; }
th, td { text-align: left; padding: .55rem .6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--fg); font-weight: 650; font-size: .82rem; letter-spacing: .02em; }
td { color: var(--muted); }
.scroll { overflow-x: auto; }

footer {
  margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line);
  color: var(--faint); font-size: .85rem;
}

/* ------------------------------------------------------------------ nav --
   Three pages that constantly refer to each other; the current one is named
   but not a link, so the row also says where you are. */
nav.pages {
  display: flex; flex-wrap: wrap; gap: .4rem .5rem;
  margin: 0 0 2rem; font-size: .85rem;
}
nav.pages a, nav.pages span {
  padding: .3rem .7rem; border-radius: 999px; border: 1px solid var(--line);
  text-decoration: none; line-height: 1.4;
}
nav.pages a { color: var(--muted); background: var(--card); }
nav.pages a:hover { color: var(--accent); border-color: var(--accent); }
nav.pages span[aria-current] { color: var(--fg); background: var(--note-bg); border-color: var(--accent); font-weight: 650; }

/* ----------------------------------------------------------------- form --
   16px on inputs is not a style choice: iOS Safari zooms the whole page in
   when a focused field's text is smaller than that, and never zooms back out. */
form { margin: 1.5rem 0 0; }

.field { margin-bottom: 1.15rem; }
.field > label { display: block; font-size: .9rem; font-weight: 650; color: var(--fg); margin-bottom: .3rem; }
.hint { display: block; font-size: .82rem; color: var(--faint); font-weight: 400; margin-top: .15rem; }

input[type="text"], input[type="tel"], input[type="email"], textarea, select {
  width: 100%; font: inherit; font-size: 16px; color: var(--fg);
  background: var(--field-bg); border: 1px solid var(--line);
  border-radius: 9px; padding: .6rem .7rem; margin-top: .35rem;
}
textarea { min-height: 6.5rem; resize: vertical; }
input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--danger); }

.err { display: block; color: var(--danger); font-size: .82rem; margin-top: .3rem; }
.err:empty { display: none; }
/* The confirmation error sits under the checkbox row's own margin. */
.err-confirm { display: block; margin: -1rem 0 1rem; }

.check { display: flex; gap: .6rem; align-items: flex-start; margin: 1.4rem 0; }
.check input { margin: .25rem 0 0; width: 1.05rem; height: 1.05rem; accent-color: var(--accent); flex: none; }
.check label { font-size: .9rem; color: var(--muted); }

button {
  font: inherit; font-weight: 650; font-size: .95rem;
  background: var(--accent); color: #fff; border: 0;
  border-radius: 9px; padding: .7rem 1.4rem; cursor: pointer;
}
button:hover { filter: brightness(1.06); }
button[disabled] { opacity: .55; cursor: progress; }

.result { border-radius: 10px; padding: 1rem 1.15rem; margin: 1.4rem 0 0; border: 1px solid; }
.result.ok { background: var(--ok-bg); border-color: var(--ok-line); }
.result.ok strong, .result.ok p { color: var(--ok-fg); }
.result.bad { background: var(--note-bg); border-color: var(--danger); }
.result.bad strong, .result.bad p { color: var(--danger); }
.result p:last-child { margin-bottom: 0; }

/* A honeypot: a real person never sees it, a form-filling bot always does. */
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
