:root {
  --bg: #f4f6f3;
  --surface: #ffffff;
  --ink: #1d2a22;
  --muted: #5b6b61;
  --line: #d7ded8;
  --brand: #247036;
  --brand-ink: #ffffff;
  --brand-soft: #e3f2e6;
  --warn-soft: #fff4dc;
  --warn: #8a5a00;
  --phone: #1d2a22;
  --done: #247036;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121714;
    --surface: #1b221e;
    --ink: #e6ede8;
    --muted: #9fb0a5;
    --line: #2f3a33;
    --brand: #4fae66;
    --brand-ink: #0c140f;
    --brand-soft: #1f3326;
    --warn-soft: #3a2f17;
    --warn: #e9b65a;
    --phone: #000000;
    --done: #6fcf86;
  }
}
:root[data-theme="dark"] {
  --bg: #121714;
  --surface: #1b221e;
  --ink: #e6ede8;
  --muted: #9fb0a5;
  --line: #2f3a33;
  --brand: #4fae66;
  --brand-ink: #0c140f;
  --brand-soft: #1f3326;
  --warn-soft: #3a2f17;
  --warn: #e9b65a;
  --phone: #000000;
  --done: #6fcf86;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif;
}
a { color: var(--brand); }

.intro { max-width: 760px; margin: 0 auto; padding: 32px 16px 8px; }
.intro h1 { font-size: 1.8rem; line-height: 1.2; margin: 0 0 8px; }
.intro .lede { font-size: 1.15rem; margin: 0 0 16px; }
.notice {
  background: var(--warn-soft);
  color: var(--warn);
  border-radius: 8px;
  padding: 8px 12px;
  font-weight: 600;
  font-size: 0.9rem;
}
.principles { padding-left: 20px; }
.principles li { margin: 4px 0; }

.board {
  display: flex;
  flex-wrap: wrap;
  gap: 40px 32px;
  justify-content: center;
  padding: 24px 16px 48px;
}
.frame { width: min(360px, 100%); scroll-margin-top: 16px; }
.frame-head { margin-bottom: 10px; }
.step {
  display: inline-block;
  background: var(--brand);
  color: var(--brand-ink);
  font-weight: 700;
  font-size: 0.8rem;
  border-radius: 999px;
  padding: 1px 9px;
  margin-right: 6px;
}
.who { font-weight: 700; }
.caption { color: var(--muted); font-size: 0.9rem; margin: 4px 0 0; }

.phone {
  background: var(--phone);
  border-radius: 28px;
  padding: 10px;
}
.screen {
  background: var(--surface);
  border-radius: 20px;
  min-height: 560px;
  padding: 16px;
  overflow-wrap: anywhere;
}
.urlbar {
  font: 12px/1.2 ui-monospace, Menlo, monospace;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 10px;
  margin-bottom: 14px;
  text-align: center;
}
.screen h2 { font-size: 1.25rem; line-height: 1.25; margin: 0 0 4px; }
.screen h3 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); margin: 18px 0 6px; }
.meta { color: var(--muted); font-size: 0.9rem; margin: 0 0 4px; }
.small { font-size: 0.85rem; color: var(--muted); }

label { display: block; font-weight: 600; font-size: 0.9rem; margin: 12px 0 4px; }
.field {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  min-height: 38px;
  background: var(--bg);
}
.field.tall { min-height: 58px; }
.row { display: flex; gap: 8px; }
.row > * { flex: 1; }

.button {
  display: block;
  width: 100%;
  text-align: center;
  background: var(--brand);
  color: var(--brand-ink);
  border-radius: 10px;
  padding: 11px 12px;
  font-weight: 700;
  text-decoration: none;
  margin-top: 16px;
}
.button.quiet {
  background: transparent;
  color: var(--brand);
  border: 1.5px solid var(--brand);
}
.textlink { display: block; text-align: center; margin-top: 14px; font-size: 0.95rem; }

.linkbox {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  margin-top: 8px;
}
.linkbox .for { font-weight: 700; font-size: 0.9rem; }
.linkbox .url { font: 13px/1.3 ui-monospace, Menlo, monospace; margin: 4px 0 6px; }
.linkbox .copy { font-size: 0.85rem; font-weight: 700; color: var(--brand); }
.linkbox .copied { color: var(--done); }

.slot {
  display: block;
  border: 1.5px solid var(--brand);
  border-radius: 12px;
  padding: 12px;
  margin-top: 10px;
  text-decoration: none;
  color: var(--ink);
}
.slot strong { display: block; font-size: 1.05rem; }
.slot span { color: var(--muted); font-size: 0.85rem; }
.slot.chosen { background: var(--brand-soft); }
.slot.static { border-color: var(--line); }

.status {
  background: var(--brand-soft);
  border-radius: 12px;
  padding: 14px;
  margin: 4px 0 8px;
}
.status.waiting { background: var(--warn-soft); }
.status .big { font-size: 1.2rem; font-weight: 700; line-height: 1.3; }

.list { list-style: none; margin: 0; padding: 0; }
.list li { border-bottom: 1px solid var(--line); padding: 10px 0; }
.list li:last-child { border-bottom: 0; }
.tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 1px 8px;
  background: var(--brand-soft);
  color: var(--done);
}
.tag.waiting { background: var(--warn-soft); color: var(--warn); }

.email { font-size: 0.9rem; }
.email dl { display: grid; grid-template-columns: auto 1fr; gap: 2px 8px; margin: 0 0 12px; }
.email dt { color: var(--muted); }
.email dd { margin: 0; }
.email .body { border-top: 1px solid var(--line); padding-top: 12px; }
.attach {
  display: inline-block;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 0.85rem;
  margin-top: 8px;
}

.outro { max-width: 760px; margin: 0 auto; padding: 0 16px 48px; }
.outro h2 { font-size: 1.3rem; }
.outro table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.outro th, .outro td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.outro th { color: var(--muted); font-weight: 600; }

/* Time picker: a strip of days, then toggle buttons for times on that day. */
.days { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
.day {
  flex: 0 0 auto;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 6px 8px;
  font-size: 0.8rem;
  line-height: 1.2;
}
.day b { display: block; font-size: 1rem; }
.day.on { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.day.has { border-color: var(--brand); }
.times { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 10px; }
.time {
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 0;
  font-size: 0.85rem;
}
.time.on { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); font-weight: 700; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.chip {
  background: var(--brand-soft);
  color: var(--ink);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 0.85rem;
}
.chip.on { background: var(--brand); color: var(--brand-ink); font-weight: 700; }

/* A stand-in for the phone's own share sheet. */
.sheet {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  margin-top: 14px;
  background: var(--bg);
}
.sheet .message {
  background: var(--surface);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 0.9rem;
  margin: 6px 0 10px;
}
.apps { display: flex; gap: 8px; font-size: 0.75rem; color: var(--muted); }
.apps span { flex: 1; text-align: center; border: 1px solid var(--line); border-radius: 8px; padding: 6px 0; }

.flow-title { width: 100%; max-width: 1180px; margin: 8px auto 0; font-size: 1.3rem; }
.flow-title small { display: block; font-size: 0.95rem; font-weight: 400; color: var(--muted); }

.index { list-style: none; padding: 0; }
.index li { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin: 12px 0; }
.index a { font-weight: 700; font-size: 1.1rem; }

/* The three-way choice on the create screen: suggest, ask, or both. */
.choices { display: grid; gap: 6px; }
.choice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 0.9rem;
  line-height: 1.3;
}
.choice::before {
  content: "";
  flex: 0 0 14px;
  height: 14px;
  margin-top: 2px;
  border-radius: 50%;
  border: 2px solid var(--muted);
}
.choice b { display: block; }
.choice span { color: var(--muted); font-size: 0.82rem; }
.choice.on { border-color: var(--brand); background: var(--brand-soft); }
.choice.on::before { border-color: var(--brand); background: var(--brand); box-shadow: inset 0 0 0 2px var(--surface); }

.or {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.85rem;
  margin: 16px 0 4px;
}
.or::before, .or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }

/* Group screens: tap-all toggles, who can make each time, name buttons. */
.slot.on { background: var(--brand-soft); }
.slot.on strong::before { content: "✓ "; color: var(--done); }
.slot.everyone { border-width: 2.5px; background: var(--brand-soft); }
.who-can { display: block; margin-top: 4px; font-size: 0.82rem; color: var(--muted); }
.names { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 12px; }
.names a, .names span {
  text-align: center;
  border: 1.5px solid var(--brand);
  border-radius: 10px;
  padding: 12px 0;
  font-weight: 700;
  text-decoration: none;
  color: var(--ink);
}
.names .added { border-style: dashed; color: var(--muted); font-weight: 400; }
a.choice { color: var(--ink); text-decoration: none; }

/* Folder screens: one row per one-on-one thread, with its status and action. */
.threads { list-style: none; margin: 8px 0 0; padding: 0; }
.threads li {
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
}
.threads li:last-child { border-bottom: 0; }
.threads .person { flex: 1; min-width: 0; }
.threads .person b { display: block; }
.threads .person span { color: var(--muted); font-size: 0.82rem; }
.mini {
  flex: 0 0 auto;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  background: var(--brand);
  color: var(--brand-ink);
}
.mini.done { background: transparent; color: var(--done); padding-right: 0; }
.mini.quiet { background: transparent; color: var(--brand); border: 1.5px solid var(--brand); }
.threads a.person { color: var(--ink); text-decoration: none; }

/* Send buttons: each opens that app with the message written. */
.sendrow { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 12px; }
.sendrow a, .sendrow span {
  text-align: center;
  border-radius: 10px;
  padding: 11px 0;
  font-weight: 700;
  text-decoration: none;
  background: var(--brand);
  color: var(--brand-ink);
}
.sendrow .alt { background: transparent; color: var(--brand); border: 1.5px solid var(--brand); }

/* A stand-in for the phone's Messages compose screen. */
.compose { display: flex; flex-direction: column; gap: 10px; }
.compose .to { border-bottom: 1px solid var(--line); padding-bottom: 8px; font-size: 0.9rem; }
.bubble {
  align-self: flex-end;
  max-width: 85%;
  background: var(--brand);
  color: var(--brand-ink);
  border-radius: 16px 16px 4px 16px;
  padding: 8px 12px;
  font-size: 0.92rem;
}

/* Week grid picker: a column per day, a row per half hour. */
.weekgrid { display: grid; grid-template-columns: 44px repeat(7, 1fr); gap: 3px; font-size: 0.72rem; margin-top: 8px; }
.weekgrid .hd { text-align: center; color: var(--muted); line-height: 1.15; padding-bottom: 2px; }
.weekgrid .hd b { display: block; color: var(--ink); font-size: 0.85rem; }
.weekgrid .hr { color: var(--muted); text-align: right; padding-right: 4px; align-self: center; }
.weekgrid .c { height: 26px; border-radius: 5px; background: var(--bg); border: 1px solid var(--line); }
.weekgrid .c.on { background: var(--brand); border-color: var(--brand); }
.weekgrid .c.past { background: transparent; border-style: dashed; }

/* Month calendar picker. */
.month { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; font-size: 0.85rem; margin-top: 6px; }
.month .dow { color: var(--muted); font-size: 0.72rem; }
.month span { padding: 6px 0; border-radius: 8px; }
.month .out { color: var(--line); }
.month .past { color: var(--muted); }
.month .today { box-shadow: inset 0 0 0 1.5px var(--muted); }
.month .has { box-shadow: inset 0 0 0 1.5px var(--brand); font-weight: 700; }
.month .on { background: var(--brand); color: var(--brand-ink); font-weight: 700; }

/* A stand-in for the phone's own date and time wheels. */
.wheel {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  text-align: center;
  border-radius: 12px;
  background: var(--bg);
  padding: 6px 0;
  margin-top: 8px;
  font-size: 0.95rem;
}
.wheel span { padding: 3px 0; color: var(--muted); }
.wheel .sel { color: var(--ink); font-weight: 700; background: var(--surface); }

/* Agenda picker: one row per day, the open day shows its times. */
.agenda { list-style: none; margin: 8px 0 0; padding: 0; }
.agenda > li { border-bottom: 1px solid var(--line); padding: 9px 0; }
.agenda .dayline { display: flex; justify-content: space-between; font-weight: 600; }
.agenda .dayline span { color: var(--done); font-weight: 700; font-size: 0.85rem; }
.agenda .times { margin-top: 8px; }

/* Part-of-day picker. */
.pod { display: grid; grid-template-columns: 64px repeat(3, 1fr); gap: 5px; align-items: center; font-size: 0.8rem; margin-top: 8px; }
.pod .hd { color: var(--muted); text-align: center; }
.pod .d { font-weight: 600; }
.pod .c { text-align: center; border: 1px solid var(--line); border-radius: 8px; padding: 7px 0; }
.pod .c.on { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); font-weight: 700; }

/* Typed times. */
.typed { font: 15px/1.4 ui-monospace, Menlo, monospace; }
.chip.unsure { background: var(--warn-soft); color: var(--warn); font-weight: 700; }

/* Lists: section headings, filter chips, folder rows, swipe and move sheet. */
.section-h { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); margin: 14px 0 0; display: flex; justify-content: space-between; }
.section-h .n { font-weight: 700; }
.search { border: 1px solid var(--line); border-radius: 999px; padding: 7px 12px; color: var(--muted); font-size: 0.9rem; background: var(--bg); }
.chip.filter { background: transparent; border: 1px solid var(--line); }
.chip.filter.on { background: var(--ink); color: var(--surface); border-color: var(--ink); font-weight: 700; }
.foldertag { font-size: 0.72rem; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; margin-left: 4px; }
.turn { color: var(--warn); font-weight: 700; }
.threads .person .turn { color: var(--warn); }
.swipe { display: flex; margin: 0 -16px; }
.swipe .row-body { flex: 1; padding: 10px 16px; background: var(--surface); border-bottom: 1px solid var(--line); }
.swipe .act { width: 72px; display: flex; align-items: center; justify-content: center; font-size: 0.8rem; font-weight: 700; color: #ffffff; }
.swipe .act.move { background: #3c6e99; }
.swipe .act.archive { background: #7a6a3a; }
.dim { opacity: 0.35; }
.verdict { font-weight: 700; }
a.chip { text-decoration: none; color: var(--ink); }
a.chip.filter.on { color: var(--surface); }
/* Wide tables scroll inside their own box so the page never scrolls sideways. */
.outro .wide { overflow-x: auto; }
.outro .wide table { min-width: 560px; }
