/* ChewySinew — chewysinew.com
   One stylesheet for the landing page and the legal pages. No JavaScript anywhere on this site:
   nothing to break, nothing to track, and the Content-Security-Policy in _headers can forbid it.
   The palette is the app's own (its mint primary on a near-black ground), darkened for paper in
   light mode so the same brand holds in both. */

:root {
  --ground: #f2f1e8;
  --surface: #fffefa;
  --surface-2: #e8e7db;
  --line: #d4d2c2;
  --text: #14170f;
  --muted: #5d6253;
  --accent: #106b49;
  --accent-soft: #dceee3;
  --on-accent: #ffffff;
  --rust: #9c4e28;
  --rust-soft: #f5e5db;
  --radius: 10px;
  --gutter: clamp(18px, 4vw, 40px);
  --measure: 62ch;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #0e100d;
    --surface: #191c17;
    --surface-2: #232720;
    --line: #333829;
    --text: #ecefe6;
    --muted: #99a08f;
    --accent: #6fdc9b;
    --accent-soft: #17251d;
    --on-accent: #08150e;
    --rust: #e2986c;
    --rust-soft: #2b1f16;
  }
}

:root[data-theme="dark"] {
  --ground: #0e100d;
  --surface: #191c17;
  --surface-2: #232720;
  --line: #333829;
  --text: #ecefe6;
  --muted: #99a08f;
  --accent: #6fdc9b;
  --accent-soft: #17251d;
  --on-accent: #08150e;
  --rust: #e2986c;
  --rust-soft: #2b1f16;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font-family: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
}

.wrap {
  max-width: 1000px;
  margin: 0 auto;
  padding-inline: var(--gutter);
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

/* ---- shared type ------------------------------------------------------------------------ */

.display {
  font-family: "Archivo Black", "Arial Black", sans-serif;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 0.92;
  text-wrap: balance;
  margin: 0;
}

.eyebrow {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 10px;
}

.data { font-family: "IBM Plex Mono", ui-monospace, monospace; font-variant-numeric: tabular-nums; }

/* ---- masthead --------------------------------------------------------------------------- */

.masthead {
  border-bottom: 1px solid var(--line);
  padding-block: 16px;
}
.masthead .wrap { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: baseline; justify-content: space-between; }
.mark {
  font-family: "Archivo Black", "Arial Black", sans-serif;
  font-size: 19px;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--text);
}
.mark .half { color: var(--accent); }
.masthead nav { display: flex; gap: 18px; font-size: 15px; }

/* ---- hero ------------------------------------------------------------------------------- */

.hero { padding-block: clamp(40px, 9vw, 88px) 12px; }

.hero h1 { font-size: clamp(64px, 17vw, 168px); }
.hero h1 .two { display: block; color: var(--accent); }

.thesis {
  font-size: clamp(20px, 2.6vw, 27px);
  line-height: 1.32;
  max-width: 24ch;
  margin: 26px 0 0;
  text-wrap: balance;
}

.sub { color: var(--muted); max-width: var(--measure); margin: 16px 0 0; }

.status {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 30px;
  padding: 10px 16px;
  border: 1px solid var(--rust);
  background: var(--rust-soft);
  border-radius: 999px;
  font-size: 15px;
}
.status .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--rust); flex: none; }
.status a { color: var(--rust); }

/* ---- the sinew rule: braided cords, the one ornament on the page ------------------------- */

.cords { display: block; width: 100%; height: 26px; margin-block: clamp(44px, 7vw, 76px); color: var(--accent); opacity: 0.45; }

/* ---- the week board, drawn the way the app draws it -------------------------------------- */

.board {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 5px;
}
.day {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 9px 3px 11px;
  text-align: center;
  min-height: 108px;
}
.day .dow { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 10.5px; letter-spacing: 0.1em; color: var(--muted); }
.day .letter { font-family: "Archivo Black", "Arial Black", sans-serif; font-size: 26px; line-height: 1.25; }
.day .detail { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 10.5px; color: var(--muted); line-height: 1.35; }
.day.done { background: var(--surface-2); border-color: color-mix(in srgb, var(--accent) 55%, transparent); }
.day.done .letter { color: var(--accent); }
.day.today { background: var(--surface-2); border: 2px solid var(--accent); }
.day.rest .letter { color: var(--muted); font-family: "IBM Plex Sans", sans-serif; }
.board-note { color: var(--muted); font-size: 15px; margin: 14px 0 0; max-width: var(--measure); }

/* ---- sections --------------------------------------------------------------------------- */

section { padding-block: clamp(34px, 6vw, 60px); }
section > .wrap > h2 { font-family: "Archivo Black", "Arial Black", sans-serif; font-weight: 400; font-size: clamp(28px, 4.4vw, 44px); line-height: 1.04; letter-spacing: -0.015em; margin: 0 0 8px; text-wrap: balance; }
section > .wrap > .lede { color: var(--muted); max-width: var(--measure); margin: 0 0 30px; }

/* feature rows: each one anchored by a number the engine actually uses */
.rows { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.row { background: var(--surface); display: grid; grid-template-columns: 138px 1fr; gap: 20px; padding: 20px; align-items: start; }
.row .figure { font-family: "Archivo Black", "Arial Black", sans-serif; font-size: 30px; line-height: 1; color: var(--accent); font-variant-numeric: tabular-nums; }
.row .figure small { display: block; font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-top: 7px; font-weight: 400; }
.row h3 { margin: 0 0 5px; font-size: 18px; }
.row p { margin: 0; color: var(--muted); max-width: 58ch; }

@media (max-width: 620px) {
  .row { grid-template-columns: 1fr; gap: 10px; }
  .row .figure { font-size: 26px; }
  .row .figure small { display: inline; margin-left: 8px; }
}

/* screenshots: the real app on a real phone, from an example profile */
.shots { display: grid; grid-template-columns: repeat(auto-fit, minmax(188px, 1fr)); gap: 20px; margin: 0; }
.shots figure { margin: 0; }
.shots img { border-radius: 13px; border: 1px solid var(--line); background: #0e100d; }
.shots figcaption { margin-top: 12px; font-size: 14.5px; color: var(--muted); }
.shots figcaption b { display: block; color: var(--text); font-weight: 600; margin-bottom: 2px; }

/* plain tile grid, used for the evidence counts and the two tiers */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.tile .n { font-family: "Archivo Black", "Arial Black", sans-serif; font-size: 34px; line-height: 1; font-variant-numeric: tabular-nums; }
.tile .k { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 11.5px; letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); margin-top: 8px; }
.tile p { margin: 8px 0 0; font-size: 15px; color: var(--muted); }

.tier { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.tier.pro { border-color: var(--accent); }
.tier h3 { font-family: "Archivo Black", "Arial Black", sans-serif; font-weight: 400; font-size: 22px; margin: 0 0 4px; }
.tier .price { font-family: "IBM Plex Mono", ui-monospace, monospace; color: var(--accent); font-size: 15px; margin-bottom: 12px; }
.tier ul { margin: 0; padding-left: 1.1em; color: var(--muted); font-size: 15px; }
.tier li { margin-bottom: 5px; }
.tier li::marker { color: var(--accent); }

.note {
  border-left: 4px solid var(--accent);
  background: var(--accent-soft);
  padding: 16px 20px;
  border-radius: 0 var(--radius) var(--radius) 0;
  max-width: var(--measure);
}
.note p { margin: 0; }
.note + .note { margin-top: 12px; }

.prose { max-width: var(--measure); }
.prose p { margin: 0 0 15px; }
.prose strong { color: var(--text); }

/* ---- footer ----------------------------------------------------------------------------- */

footer { border-top: 1px solid var(--line); padding-block: 34px 56px; margin-top: clamp(30px, 6vw, 56px); }
footer .cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 26px; }
footer h4 { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 11.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; font-weight: 500; }
footer ul { list-style: none; margin: 0; padding: 0; font-size: 15px; }
footer li { margin-bottom: 6px; }
footer .identity { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; max-width: 70ch; }

/* ---- legal pages ------------------------------------------------------------------------ */

.legal { padding-block: clamp(30px, 6vw, 56px); }
.legal .doc { max-width: 68ch; }
.legal h1 { font-family: "Archivo Black", "Arial Black", sans-serif; font-weight: 400; font-size: clamp(30px, 5vw, 46px); line-height: 1.04; letter-spacing: -0.015em; margin: 0 0 6px; }
.legal h2 { font-size: 21px; margin: 34px 0 8px; }
.legal h3 { font-size: 17px; margin: 24px 0 6px; }
.legal p, .legal li { color: var(--text); }
.legal ul, .legal ol { padding-left: 1.2em; }
.legal li { margin-bottom: 6px; }
.legal em { color: var(--muted); }
.legal hr { border: 0; border-top: 1px solid var(--line); margin: 30px 0; }
.legal table { border-collapse: collapse; width: 100%; font-size: 15px; }
.legal th, .legal td { text-align: left; padding: 9px 11px; border: 1px solid var(--line); vertical-align: top; }
.legal th { background: var(--surface-2); font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.tablewrap { overflow-x: auto; margin-bottom: 18px; }
.draft {
  border: 1px solid var(--rust);
  background: var(--rust-soft);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin: 0 0 26px;
  font-size: 15px;
  max-width: 68ch;
}
.draft strong { color: var(--rust); }
.backlink { font-size: 15px; margin-bottom: 22px; }
