/* One column: a progress strip, tabs, and one view at a time. */
@font-face { font-family: "Figtree"; src: url("/fonts/figtree-latin-wght-normal.woff2") format("woff2"); font-weight: 300 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Bricolage Grotesque"; src: url("/fonts/bricolage-grotesque-latin-wght-normal.woff2") format("woff2"); font-weight: 200 800; font-style: normal; font-display: swap; }
:root {
  --bg: #EEF1EC;
  --surface: #FBFCFA;
  --ink: #14201A;
  --muted: #56635B;
  --line: #D3DAD1;
  --accent: #0B7A5F;
  --accent-ink: #FFFFFF;
  --tint: #DCEBE2;
  --warn: #9A4A12;
  --warn-bg: #F6E7D5;
  --font-display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --font-body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
/* Dark follows the device unless the person chose Light in Settings. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0E1511; --surface: #151E19; --ink: #E6EEE8; --muted: #9AAA9F; --line: #263229;
    --accent: #3CCB9F; --accent-ink: #06251B; --tint: #1B2B23; --warn: #E9B27A; --warn-bg: #2E2113;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0E1511; --surface: #151E19; --ink: #E6EEE8; --muted: #9AAA9F; --line: #263229;
  --accent: #3CCB9F; --accent-ink: #06251B; --tint: #1B2B23; --warn: #E9B27A; --warn-bg: #2E2113;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.55 var(--font-body);
  padding: 28px max(16px, env(safe-area-inset-right, 0px)) 56px max(16px, env(safe-area-inset-left, 0px));
}
.wrap { max-width: 760px; margin: 0 auto; }
h1, h2, h3 { font-family: var(--font-display); margin: 0; text-wrap: balance; }
h2 { font-size: 21px; font-weight: 650; }
p { margin: 0; }
[hidden] { display: none !important; }

.top { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-bottom: 20px; }
.brand { display: flex; align-items: center; gap: 14px; }
.brand h1 { font-size: 30px; font-weight: 700; letter-spacing: -0.02em; }
.brand h1 a { color: inherit; text-decoration: none; }
.brand-mark { display: block; border-radius: 9px; }
.sub { color: var(--muted); max-width: 52ch; flex: 1 1 260px; }
.code { display: flex; flex-direction: column; gap: 4px; }

label, .lab { font: 600 13px/1.3 var(--font-body); color: var(--muted); }
input[type=text], input[type=url], input[type=email], input[type=password], input[type=number], textarea, select {
  width: 100%; font: inherit; color: var(--ink); background: var(--bg);
  border: 1px solid var(--line); border-radius: 6px; padding: 9px 10px; min-width: 0;
}
textarea { resize: vertical; min-height: 70px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; min-width: 0; }
.setup { margin-bottom: 16px; }
.setup summary { cursor: pointer; display: flex; align-items: baseline; gap: 14px; list-style: none; }
.setup summary::-webkit-details-marker { display: none; }
.sum-title { font: 650 19px var(--font-display); }
.sum-meta { color: var(--muted); font-size: 13.5px; min-width: 0; overflow-wrap: anywhere; }
.setup-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 16px 0; }
.setup-grid .wide { grid-column: 1 / -1; }
@media (max-width: 600px) { .setup-grid { grid-template-columns: minmax(0, 1fr); } }

.actions { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; margin-top: 14px; }
.btn {
  font: 600 14px var(--font-body); border-radius: 6px; padding: 9px 15px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; display: inline-block;
}
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.small { padding: 5px 10px; font-size: 12.5px; }
.btn:disabled { opacity: 0.55; cursor: progress; }
.status { min-height: 20px; margin-top: 8px; font: 500 13.5px var(--font-body); color: var(--muted); }
.status.err { color: var(--warn); }
.banner-msg { background: var(--warn-bg); color: var(--warn); border-radius: 6px; padding: 9px 12px; font-size: 13.5px; margin-bottom: 14px; }

/* Today card */
#today { margin-bottom: 22px; }
.today { border-left: 4px solid var(--accent); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; }
.today h2 { font-size: 26px; margin: 4px 0 6px; }
.today .why { color: var(--muted); max-width: 60ch; }
.today .late { color: var(--warn); font-size: 13.5px; margin-top: 6px; }
.today-main { min-width: 0; flex: 1 1 320px; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.tab { font: 600 15px var(--font-display); color: var(--muted); background: none; border: 0; padding: 10px 14px 12px; border-bottom: 3px solid transparent; margin-bottom: -1px; cursor: pointer; }
.tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.count { font: 500 12px var(--font-body); color: var(--muted); margin-left: 4px; }
.badge { font: 600 11px var(--font-body); color: var(--accent); border: 1px solid var(--accent); border-radius: 999px; padding: 1px 7px; margin-left: 6px; }
.badge:empty { display: none; }


.phase { margin-bottom: 20px; }
.phase-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 6px; }
.phase-head h3 { font-size: 17px; font-weight: 650; }
.phase-head .meta { font: 500 13px var(--font-body); font-variant-numeric: tabular-nums; color: var(--muted); white-space: nowrap; }
.phase-goal { color: var(--muted); font-size: 13.5px; margin-bottom: 8px; }
.bar { height: 4px; background: var(--line); border-radius: 2px; overflow: hidden; margin-bottom: 10px; }
.bar > i { display: block; height: 100%; background: var(--accent); }
.rows { display: grid; gap: 6px; }
.row {
  display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 10px; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px;
}
.rowmain {
  display: grid; grid-template-columns: 54px minmax(0, 1fr) auto; gap: 10px; align-items: center;
  background: none; border: 0; padding: 0; cursor: pointer; text-align: left; width: 100%; font: inherit; color: inherit; min-width: 0;
}
.row.open { border-color: var(--accent); background: var(--tint); }
.row.done .t { color: var(--muted); text-decoration: line-through; }
.row .day { font: 600 13px var(--font-body); font-variant-numeric: tabular-nums; color: var(--muted); }
.row .t { min-width: 0; overflow-wrap: anywhere; }
.row .min { font: 500 13px var(--font-body); font-variant-numeric: tabular-nums; color: var(--muted); white-space: nowrap; }
.tick { width: 22px; height: 22px; border-radius: 5px; border: 1.5px solid var(--line); background: var(--bg); cursor: pointer; padding: 0; display: grid; place-items: center; color: var(--accent-ink); font-size: 14px; line-height: 1; }
.row.done .tick { background: var(--accent); border-color: var(--accent); }
.row.due .day { color: var(--accent); font-weight: 500; }

#task .lab { margin-bottom: 4px; display: block; }
#task h2 { margin-bottom: 6px; }
#task .why { color: var(--muted); margin-bottom: 14px; }
.controls { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px 14px; margin-bottom: 4px; }
.controls .wide { grid-column: 1 / -1; }
.seg { display: flex; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; width: max-content; max-width: 100%; }
.seg label { display: flex; flex: 1 1 auto; text-transform: none; letter-spacing: 0; font: 500 13.5px var(--font-body); color: var(--muted); position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span { display: block; flex: 1; padding: 8px 14px; background: var(--bg); text-align: center; white-space: nowrap; }
.field:has(.seg) { grid-column: 1 / -1; }
.seg input:checked + span { background: var(--tint); color: var(--ink); font-weight: 600; }
.seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: -2px; }

/* three-step draft flow */
.steps { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font: 600 13px var(--font-body); color: var(--muted); }
.steps li { padding-bottom: 4px; border-bottom: 2px solid transparent; }
.steps li.past { color: var(--accent); }
.steps li.now { color: var(--ink); border-bottom-color: var(--accent); }
.angles { margin-top: 14px; }
.angle-list { display: grid; gap: 8px; margin: 6px 0 4px; }
label.angle, label.tone { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; align-items: start; text-transform: none; letter-spacing: 0; font: 400 15px/1.45 var(--font-body); color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; cursor: pointer; }
label.angle:has(input:checked), label.tone:has(input:checked) { border-color: var(--accent); background: var(--tint); }
label.angle input, label.tone input { margin: 3px 0 0; accent-color: var(--accent); }
.angle-line { display: block; color: var(--muted); font-size: 13.5px; margin-top: 2px; }
ul.checks { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 8px; }
label.check { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; align-items: start; text-transform: none; letter-spacing: 0; font: 400 14.5px/1.45 var(--font-body); color: var(--ink); cursor: pointer; }
label.check input { margin: 3px 0 0; accent-color: var(--accent); }
.out { display: grid; gap: 12px; margin-top: 14px; }
.out .card { padding: 14px 16px; background: var(--bg); }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; }
.card-head h3 { font: 650 15px var(--font-display); color: var(--accent); }
.text { white-space: pre-wrap; overflow-wrap: anywhere; }
.sub-note { margin-top: 10px; padding-top: 8px; border-top: 1px dashed var(--line); color: var(--muted); font-size: 13.5px; }
.sub-note ul, ul.plain { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 4px; }
.query { font: 400 13px var(--font-mono); background: var(--surface); border: 1px solid var(--line); padding: 8px 10px; border-radius: 6px; overflow-wrap: anywhere; margin-bottom: 8px; }
.row-links { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
.row-links .hint { flex: 1 1 100%; margin: 0; }
.done-bar { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.empty p { color: var(--muted); margin-top: 6px; }
.verdict { font: 600 17px/1.35 var(--font-display); }

/* creators */
.add-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px 14px; margin-top: 12px; }
.summary { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.pill { font: 600 12.5px var(--font-body); font-variant-numeric: tabular-nums; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 5px 11px; }
.pill b { color: var(--accent); font-weight: 500; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
table { border-collapse: collapse; width: 100%; min-width: 820px; }
th { text-align: left; font: 600 13px var(--font-body); color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); }
td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; overflow-wrap: anywhere; }
tr:last-child td { border-bottom: 0; }
td select { padding: 6px 8px; }
.empty-table { padding: 26px 20px; color: var(--muted); }

.note { color: var(--muted); font-size: 13px; margin-top: 26px; max-width: 70ch; }
@media (prefers-reduced-motion: no-preference) { .btn { transition: filter .15s; } .btn:hover:not(:disabled) { filter: brightness(0.96); } .bar > i { transition: width .25s; } }

/* onboarding: one question per screen */
.onboard { display: grid; place-items: center; min-height: 68vh; }
.ob-card { width: min(560px, 100%); display: grid; justify-items: center; gap: 16px; text-align: center; padding: 8px 0 28px; }
.ob-dots { list-style: none; margin: 0; padding: 0; display: flex; gap: 8px; }
.ob-dots li { width: 9px; height: 9px; border-radius: 50%; background: var(--line); overflow: hidden; text-indent: -999px; white-space: nowrap; }
.ob-dots li.past { background: var(--accent); }
.ob-dots li.now { background: var(--accent); box-shadow: 0 0 0 3px var(--tint); }
.ob-title { font-size: clamp(26px, 5vw, 34px); line-height: 1.15; letter-spacing: -0.02em; max-width: 20ch; }
.ob-sub { color: var(--muted); max-width: 46ch; }
.ob-field { width: 100%; text-align: left; display: grid; gap: 8px; }
.ob-field input[type=text], .ob-field textarea { font-size: 17px; padding: 13px 14px; border-radius: 12px; }
.ob-label { text-transform: none; letter-spacing: 0; font: 500 14px var(--font-body); color: var(--muted); margin-top: 10px; }
.hint { color: var(--muted); font-size: 13.5px; max-width: 60ch; }
.ob-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; align-items: center; margin-top: 4px; }
.btn.big { padding: 12px 24px; font-size: 16px; border-radius: 999px; white-space: nowrap; }
.btn.ghost { background: none; border-color: transparent; color: var(--muted); }
.tone-list { display: grid; gap: 8px; }
.ob-sample-box { width: 100%; display: grid; gap: 8px; justify-items: center; }
.ob-sample-box .out { width: 100%; text-align: left; margin-top: 4px; }
.ob-sample-box .status { text-align: center; }
.ob-card .status { text-align: left; width: 100%; margin: 0; }

/* simple main screen: one task at a time */
.strip { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 6px; }
.strip-day { font: 650 17px var(--font-display); }
.strip-count { color: var(--muted); font-size: 13.5px; }
.tab-aside { margin: 0 0 0 auto; align-self: center; font: 500 13.5px var(--font-body); color: var(--muted); background: none; border: 0; padding: 8px 4px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.upnext { display: flex; gap: 12px; align-items: baseline; width: 100%; margin-top: 12px; text-align: left; font: inherit; color: var(--muted); background: none; border: 1px dashed var(--line); border-radius: 12px; padding: 12px 14px; cursor: pointer; }
.upnext-l { font-weight: 600; color: var(--ink); white-space: nowrap; }

/* follow-up nudge, reply tool, data tools */
.nudge { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; background: var(--warn-bg); color: var(--warn); border-radius: 12px; padding: 10px 14px; margin-bottom: 14px; font-size: 14px; }
.due-tag { color: var(--warn); font-size: 12.5px; font-weight: 600; }
#replyTool, #scoreTool, #dataTool { margin-top: 20px; }
#dataTool .actions { margin-top: 10px; }
.filebtn { position: relative; overflow: hidden; }
.filebtn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
td .btn { white-space: nowrap; }
.card > .why { color: var(--muted); margin: 4px 0 14px; }
.brief-sec { margin-top: 12px; }
.brief-sec strong { display: block; margin-bottom: 2px; }
#scoreTool .table-wrap { margin-top: 12px; }
td select { min-width: 124px; }
td:first-child { min-width: 128px; overflow-wrap: normal; }

/* tabs, settings, frameworks, 404 */
.tabs { overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { white-space: nowrap; }
.tab-end { margin-left: auto; }
/* On a phone, six tabs do not fit in one row: wrap them into a tidy grid instead of hiding two. */
@media (max-width: 640px) {
  .tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: visible; gap: 0; border-bottom: 0; }
  .tab { font-size: 14px; text-align: center; padding: 11px 2px 9px; margin-bottom: 0; border-bottom: 3px solid var(--line); }
  .tab .badge { margin-left: 3px; padding: 0 5px; font-size: 10px; }
  .tab[aria-selected="true"] { border-bottom-color: var(--accent); }
  .tab-end { margin-left: 0; }
}
/* No empty gaps under buttons before anything has been written. */
.out:empty { display: none; }
.status:empty { min-height: 0; margin: 0; }
#view-settings > * + *, #frameworks > * + * { margin-top: 16px; }
#themeBox, #licenseBox { display: grid; gap: 10px; }
.unlock { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; }
.unlock .field { flex: 1 1 220px; }
.fw-parts { display: grid; gap: 12px; }
.fw-part h3 { font: 650 17px var(--font-display); margin-bottom: 2px; }
.fw-part .job { color: var(--muted); margin-bottom: 8px; }
.fw-check { margin-top: 10px; padding-top: 8px; border-top: 1px dashed var(--line); color: var(--muted); font-size: 14px; }
.fw-versions { display: grid; gap: 10px; margin-top: 8px; }
.fw-version { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; background: var(--bg); }
.fw-version strong { display: block; margin-bottom: 4px; }
dl.shapes { margin: 8px 0 0; display: grid; gap: 8px; }
dl.shapes dt { font-weight: 650; }
dl.shapes dd { margin: 0; color: var(--muted); }
.notfound { min-height: 60vh; display: grid; align-content: center; justify-items: start; gap: 8px; }
.notfound h1 { font-size: 30px; }

.funnel { display: grid; gap: 6px; margin: 10px 0 14px; }
.funnel-row { display: grid; grid-template-columns: 84px 1fr 76px; align-items: center; gap: 10px; font-size: 14px; }
.funnel-n { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }
.next-move { margin: 8px 0; }
.skip-note { margin: 8px 0; }

.fit { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--line); color: var(--ink); white-space: nowrap; }
.fit-good { background: var(--tint); color: var(--accent); }
.fit-big, .fit-low, .fit-weak { background: var(--warn-bg); color: var(--warn); }
.fit-box { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; }
.fit-box p { margin: 4px 0; }

.study summary { cursor: pointer; display: grid; gap: 2px; list-style-position: outside; }
.study[open] summary { margin-bottom: 8px; }

.logo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.logo-card { display: grid; justify-items: start; gap: 6px; }
.logo-card svg { border-radius: 22px; box-shadow: 0 0 0 1px var(--line); }
.name-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); }
.name-row:first-of-type { border-top: 0; }

/* feedback button and dialog */
.fb-open { position: fixed; right: 16px; bottom: 16px; z-index: 20; font: 600 13.5px var(--font-body); padding: 9px 15px; border-radius: 999px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); cursor: pointer; box-shadow: 0 2px 10px rgba(0,0,0,.12); }
.fb-open:hover { border-color: var(--accent); }
dialog.fb { width: min(440px, calc(100vw - 32px)); padding: 22px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); }
dialog.fb::backdrop { background: rgba(10, 18, 14, .5); }
dialog.fb h2 { margin: 0 0 14px; font-size: 22px; }
dialog.fb .field { margin-top: 14px; }
dialog.fb .actions { margin-top: 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font: 500 14px var(--font-body); padding: 7px 13px; border-radius: 999px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); cursor: pointer; }
.chip:hover { border-color: var(--accent); }
.chip[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

/* collapsible plan stages */
.phase { border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.phase > summary { list-style: none; cursor: pointer; }
.phase > summary::-webkit-details-marker { display: none; }
.phase-head { padding: 10px 0 4px; }
.phase-head h3::before { content: "\25B8"; display: inline-block; width: 1.1em; color: var(--muted); transition: transform .15s; }
.phase[open] .phase-head h3::before { transform: rotate(90deg); }
.phase:not([open]) .phase-goal, .phase:not([open]) .bar { display: none; }
.phase.complete .phase-head .meta { color: var(--accent); }
@media (prefers-reduced-motion: reduce) { .phase-head h3::before { transition: none; } }

.projbar { display: flex; align-items: center; gap: 8px; }
.projbar label { color: var(--muted); font-size: 13.5px; }
.projbar select { max-width: 220px; }
.card.inner { background: var(--bg); } .card.inner h3 { margin-bottom: 10px; }

.checklist { list-style: none; margin: 14px 0 8px; padding: 0; display: grid; gap: 4px; }
.checklist li { display: flex; align-items: flex-start; gap: 10px; padding: 8px 2px; border-bottom: 1px solid var(--line); }
.checklist input { width: 20px; height: 20px; margin-top: 2px; flex: none; accent-color: var(--accent); }
.checklist label { cursor: pointer; line-height: 1.4; }

.formats { display: grid; gap: 14px; margin-top: 12px; }
.card.format h3 { margin-bottom: 2px; }
.card.format .actions { margin-top: 12px; }
.field.wide > label + .chips { margin-top: 6px; } .controls + .field.wide, .field.wide + .field.wide { margin-top: 12px; }

.lock-tag { font-size: 11px; padding: 1px 7px; border-radius: 999px; border: 1px solid var(--line, #ccc); color: var(--muted, #666); margin-right: 8px; white-space: nowrap; }
.card.upgrade { border-style: dashed; }
.plans-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin: 12px 0; }
.plan-card h3 { margin: 0 0 2px; }
.plan-card.current { outline: 2px solid var(--accent, #2a6); }
