/* Restwell legal pages. Deliberately plain: these are read, not browsed. */

:root {
  --ground: #FBFAF8;
  --surface: #FFFFFF;
  --text: #1A1D24;
  --muted: #5A6270;
  --line: #E3E1DC;
  --accent: #3C5BC4;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #0B0F1A;
    --surface: #131926;
    --text: #E9ECF2;
    --muted: #99A1B0;
    --line: #232B3A;
    --accent: #6B8AFF;
  }
}

* { box-sizing: border-box; }

body {
  background: var(--ground);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  margin: 0;
  padding: 0 22px 80px;
  -webkit-font-smoothing: antialiased;
}

main { max-width: 44rem; margin: 0 auto; }

header {
  padding: 56px 0 28px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 36px;
}

.brand {
  font-size: 14px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

h1 {
  font-size: clamp(1.9rem, 5vw, 2.5rem);
  line-height: 1.15;
  margin: 18px 0 10px;
  letter-spacing: -.02em;
}

.updated { color: var(--muted); font-size: 15px; margin: 0; }

h2 {
  font-size: 1.22rem;
  margin: 40px 0 12px;
  letter-spacing: -.01em;
}

h3 { font-size: 1.02rem; margin: 26px 0 8px; }

p, li { margin: 0 0 15px; }
ul { padding-left: 22px; }
li { margin-bottom: 9px; }

strong { font-weight: 600; }

a { color: var(--accent); }

.lede {
  font-size: 1.12rem;
  color: var(--muted);
  border-left: 3px solid var(--accent);
  padding-left: 18px;
  margin-bottom: 34px;
}

.callout {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px 22px;
  margin: 26px 0;
}
.callout p:last-child { margin-bottom: 0; }

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 15.5px;
  margin: 18px 0 24px;
}
th, td {
  text-align: left;
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
th { font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }

.scroll { overflow-x: auto; }

footer {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 15px;
}
footer a { margin-right: 16px; }

/* Three columns cannot work at phone width — the words break mid-syllable and
   the whole table becomes unreadable. Below 640px each row becomes a stacked
   block with its column name as a label. People reach these pages from inside
   the app, so a phone is the likely screen, not the exception. */
@media (max-width: 640px) {
  table, thead, tbody, tr, th, td { display: block; }

  thead { display: none; }

  tr {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 4px 16px 12px;
    margin-bottom: 14px;
  }

  td { border: none; padding: 10px 0 0; }

  td::before {
    content: attr(data-label);
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--muted);
    margin-bottom: 3px;
  }

  td:first-child::before { content: none; }
  td:first-child { font-size: 1.05rem; padding-top: 12px; }
}
