/* ─────────────────────────────────────────────────────────────
   SusHouse — legal pages
   Palette and type lifted from the app (Color+Brand.swift, Baloo 2).
   One stylesheet shared by privacy.html and terms.html.
   ───────────────────────────────────────────────────────────── */

:root {
  --paper:      #FEF6E4;
  --ink:        #0F0F1E;
  --coral:      #FF5A4E;
  --surface:    #FFFFFF;
  /* Secondary text is warmed toward the cream ground rather than a
     neutral grey, so it reads as chosen instead of inherited. */
  --ink-soft:   #5C5751;
  --hairline:   rgba(15, 15, 30, 0.12);
  --shadow:     rgba(15, 15, 30, 0.9);

  --display: "Baloo 2", "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
  --body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;

  --measure: 62ch;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper:    #17161C;
    --ink:      #F4EEE2;
    --surface:  #201E27;
    --ink-soft: #A9A296;
    --hairline: rgba(244, 238, 226, 0.14);
    --shadow:   rgba(0, 0, 0, 0.6);
  }
}

:root[data-theme="dark"] {
  --paper:    #17161C;
  --ink:      #F4EEE2;
  --surface:  #201E27;
  --ink-soft: #A9A296;
  --hairline: rgba(244, 238, 226, 0.14);
  --shadow:   rgba(0, 0, 0, 0.6);
}

:root[data-theme="light"] {
  --paper:    #FEF6E4;
  --ink:      #0F0F1E;
  --surface:  #FFFFFF;
  --ink-soft: #5C5751;
  --hairline: rgba(15, 15, 30, 0.12);
  --shadow:   rgba(15, 15, 30, 0.9);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* ── Top bar ─────────────────────────────────────────────── */

.bar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 24px;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--hairline);
}

.wordmark {
  font-family: var(--display);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}
.wordmark span { color: var(--coral); }

.bar nav {
  display: flex;
  gap: 18px;
  font-size: 14px;
  font-weight: 600;
}
.bar nav a { color: var(--ink-soft); text-decoration: none; }
.bar nav a:hover,
.bar nav a[aria-current="page"] { color: var(--coral); }

/* ── Page frame ──────────────────────────────────────────── */

main {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 56px 24px 96px;
}

.eyebrow {
  font-family: var(--display);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--coral);
  margin: 0 0 10px;
}

h1 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(38px, 8vw, 54px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin: 0;
  text-wrap: balance;
}

.updated {
  display: inline-block;
  margin-top: 18px;
  padding: 5px 12px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  background: var(--surface);
}

h2 {
  font-family: var(--display);
  font-weight: 800;
  font-size: 27px;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}

h3 {
  font-family: var(--display);
  font-weight: 800;
  font-size: 18px;
  margin: 0;
}

section {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 44px;
  margin-top: 44px;
  border-top: 1px solid var(--hairline);
}

section:first-of-type { border-top: 0; }

p { margin: 0; }

/* The plain-English line that opens every section. The whole point of
   these pages is that nothing is buried, so the summary comes first. */
.plain {
  font-family: var(--display);
  font-weight: 700;
  font-size: 18.5px;
  line-height: 1.4;
  color: var(--coral);
  margin: 0;
}

ul { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 9px; }
li::marker { color: var(--coral); }

a { color: var(--ink); text-underline-offset: 3px; }
a:hover { color: var(--coral); }

strong { font-weight: 700; }

/* ── Summary card ────────────────────────────────────────── */

.card {
  background: var(--surface);
  border: 2.5px solid var(--ink);
  border-radius: 20px;
  padding: 24px 26px;
  box-shadow: 5px 6px 0 var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card ul { gap: 11px; }

/* ── Data table ──────────────────────────────────────────── */

.table-wrap { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15.5px;
  min-width: 460px;
}

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

th {
  font-family: var(--display);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border-bottom: 2px solid var(--ink);
}

td:first-child { font-weight: 600; width: 38%; }

.stays {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: color-mix(in srgb, var(--coral) 16%, transparent);
  color: var(--coral);
  white-space: nowrap;
}

/* ── Placeholders you must replace before publishing ─────── */

mark.todo {
  background: #FFD23F;
  color: #0F0F1E;
  padding: 1px 7px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.95em;
}

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

footer {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 32px 24px 64px;
  border-top: 1px solid var(--hairline);
  color: var(--ink-soft);
  font-size: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  justify-content: space-between;
}
footer a { color: var(--ink-soft); }

/* ── Focus + motion ──────────────────────────────────────── */

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 3px;
  border-radius: 4px;
}

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

html { scroll-behavior: smooth; }

@media (max-width: 520px) {
  main { padding-top: 40px; }
  .bar { padding: 12px 18px; }
  .bar nav { gap: 14px; }
}
