/* Compasso — one stylesheet for the site and the app. Calm and warm on
   purpose: the brief asks for something inviting and unhurried, the opposite of
   a productivity dashboard. Soft paper, deep green, a little brass — and
   motion stops for anyone who asks the system for less of it. */

:root {
  color-scheme: light dark;
  --ink: #1f2a26;
  --bg: #f7f3ec;
  --paper: #fffdf9;
  --line: #e4dccd;
  --muted: #5d6762;
  --brand: #2f6b5e;
  --brand-ink: #ffffff;
  --brand-2: #b07d2b;
  --sun: #e2b04a;
  --good: #2f7d58;
  --bad: #b2453f;
  --warn-bg: #f6ecd6;
  --warn-line: #dcc28c;
  --radius: 14px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e9efe9; --bg: #141a18; --paper: #1b2320; --line: #2e3a35; --muted: #a7b3ad;
    --brand: #79b8a6; --brand-ink: #0f1513; --brand-2: #d9a856; --good: #6fc59a; --bad: #ef8a83;
    --warn-bg: #2a2618; --warn-line: #5a4d2a;
  }
}

* { box-sizing: border-box; }
/* Classes that set display (.claim, .btn, .card…) must not win over hidden. */
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

a { color: var(--brand); }
h1 { font: 600 clamp(30px, 5vw, 48px)/1.1 ui-serif, Georgia, "Iowan Old Style", serif; letter-spacing: -0.01em; margin: 0 0 14px; }
h2 { font: 600 24px/1.25 ui-serif, Georgia, "Iowan Old Style", serif; margin: 36px 0 10px; }
h3 { font-size: 18px; margin: 20px 0 8px; }
p { margin: 0 0 12px; }
.muted { color: var(--muted); }
.small, .hint { font-size: 14px; }
.hint { color: var(--muted); margin-top: 6px; }
.error { color: var(--bad); min-height: 1em; }
.ok { color: var(--good); }
.pre { white-space: pre-wrap; }
.lede { font-size: 20px; color: var(--muted); max-width: 660px; }
.kicker { display: inline-block; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; font-size: 12px; color: var(--brand-2); margin-bottom: 8px; }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; background: var(--paper); padding: 8px 12px; z-index: 10; }

main { max-width: 860px; margin: 0 auto; padding: 36px 20px 72px; }

/* ── Header and footer ─────────────────────────────────────────────────── */

.site-header {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  padding: 12px 20px; background: var(--paper); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 8px; font: 600 22px/1 ui-serif, Georgia, serif; color: var(--ink); text-decoration: none; }
.brand span { color: var(--brand); }
.site-header nav { display: flex; gap: 16px; flex-wrap: wrap; }
.site-header nav a { color: var(--muted); text-decoration: none; font-weight: 700; }
.site-header nav a[aria-current="page"], .site-header nav a:hover { color: var(--ink); }
.site-header .account { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.sync-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); }
.sync-dot[data-state="synced"] { background: var(--good); }
.sync-dot[data-state="syncing"] { background: var(--sun); }
.sync-dot[data-state="error"], .sync-dot[data-state="offline"] { background: var(--bad); }

.claim { display: flex; gap: 12px; align-items: center; justify-content: center; flex-wrap: wrap; padding: 10px 20px; background: var(--warn-bg); border-bottom: 1px solid var(--warn-line); }

.site-footer {
  display: flex; gap: 18px; justify-content: space-between; flex-wrap: wrap;
  padding: 26px 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px;
}
.site-footer nav { display: flex; gap: 16px; flex-wrap: wrap; }

/* ── Controls ──────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; gap: 6px; justify-content: center;
  padding: 11px 20px; border-radius: 999px; border: 2px solid var(--brand);
  background: var(--brand); color: var(--brand-ink); font: inherit; font-weight: 650;
  text-decoration: none; cursor: pointer; transition: transform 0.12s ease, box-shadow 0.12s ease;
  box-shadow: none;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: default; transform: none; }
.btn.big { padding: 15px 28px; font-size: 19px; }
.btn.ghost { background: transparent; color: var(--brand); box-shadow: none; }
.btn.danger { background: transparent; color: var(--bad); border-color: var(--bad); box-shadow: none; }
.btn.small { padding: 5px 13px; font-size: 14px; box-shadow: none; }
.btn.link { background: none; border: 0; padding: 0; color: var(--brand); text-decoration: underline; font-weight: 600; box-shadow: none; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }

label { display: block; font-weight: 700; font-size: 14px; margin: 12px 0 4px; }
label.inline { display: inline-flex; gap: 8px; align-items: center; font-weight: 600; margin: 0; }
input, select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--paper);
  border: 1px solid var(--line); border-radius: 12px; padding: 9px 12px;
}
input[type="checkbox"], input[type="radio"] { width: auto; }
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 3px solid color-mix(in srgb, var(--brand) 45%, transparent); outline-offset: 1px; }
.honeypot { position: absolute; left: -5000px; }

/* ── Blocks ────────────────────────────────────────────────────────────── */

.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin: 14px 0; }
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin: 16px 0 20px; }
.stat { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stat .k { color: var(--muted); font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; }
.stat .v { font-size: 22px; font-weight: 900; letter-spacing: -0.01em; }
.bar { height: 10px; border-radius: 99px; background: var(--line); overflow: hidden; margin-top: 8px; }
.bar span { display: block; height: 100%; background: var(--brand); border-radius: 99px; }
.notice { background: var(--warn-bg); border: 2px solid var(--warn-line); border-radius: var(--radius); padding: 12px 14px; margin: 12px 0; }
.empty { color: var(--muted); padding: 22px; text-align: center; border: 2px dashed var(--line); border-radius: var(--radius); }
.pill { display: inline-block; padding: 1px 9px; margin-left: 6px; border-radius: 99px; font-size: 12px; font-weight: 700; border: 1px solid var(--line); color: var(--muted); }
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 50;
  background: var(--ink); color: var(--bg); padding: 12px 20px; border-radius: 999px; font-weight: 700;
  box-shadow: 0 10px 30px rgb(0 0 0 / 0.25); animation: rise 0.25s ease; max-width: calc(100% - 32px); text-align: center;
}
.toast.out { opacity: 0; transition: opacity 0.5s; }

table { width: 100%; border-collapse: collapse; }
dialog { border: 1px solid var(--line); border-radius: 22px; padding: 22px 24px; max-width: 560px; width: calc(100% - 32px); background: var(--paper); color: var(--ink); }
dialog::backdrop { background: rgb(15 25 20 / 0.45); }

/* ── App ───────────────────────────────────────────────────────────────── */

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: -6px 0 22px; }
.tabs a, .tabs .tab { padding: 7px 14px; text-decoration: none; color: var(--muted); font: inherit; font-weight: 650; font-size: 15px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); cursor: pointer; }
.tabs a[aria-current="page"], .tabs .tab[aria-pressed="true"] { color: var(--brand-ink); background: var(--brand); border-color: var(--brand); }
.app-top { display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; justify-content: space-between; }
.row.nowrap { flex-wrap: nowrap; }
.row.nowrap input { flex: 1; }

.mode { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--paper); }
.mode button { font: inherit; font-size: 14px; font-weight: 650; padding: 7px 14px; border: 0; background: none; color: var(--muted); cursor: pointer; }
.mode button[aria-pressed="true"] { background: var(--brand-2); color: #fff; }

.statements { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.statements .card { margin: 0; }
.welcome { border-color: var(--brand); }
.intention { font: 600 20px/1.35 ui-serif, Georgia, serif; margin: 4px 0 10px; }

.compass { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.compass .card { margin: 0; }
.needle { border-top: 4px solid var(--brand); }
.needle.questioning { border-top-color: var(--brand-2); }
.needle-head, .item-head { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.needle-head h3, .item-head h3 { margin: 0; flex: 1 1 auto; }
.presence { font-size: 13px; color: var(--muted); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.chips.big { gap: 8px; margin: 16px 0; }
.chip { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: 13px; border: 1px solid var(--line); color: var(--muted); background: var(--bg); }
.chip.goal, .chip.value { border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); color: var(--brand); }
.chip.habit { border-color: color-mix(in srgb, var(--brand-2) 45%, var(--line)); color: var(--brand-2); }
.chip.pick { font: inherit; font-size: 15px; padding: 6px 14px; cursor: pointer; color: var(--ink); }
.chips.big .chip.pick { font-size: 16px; }
.chip.pick.on { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }

.item .why { border-left: 3px solid var(--line); padding-left: 10px; }
.goal.paused, .habit.paused, .habit.discontinued, .goal.completed, .goal.released { opacity: 0.85; }
.tick { font: inherit; font-size: 14px; font-weight: 650; padding: 5px 12px; border-radius: 99px; border: 1px solid var(--brand); background: none; color: var(--brand); cursor: pointer; }
.tick.on { background: var(--brand); color: var(--brand-ink); }
.days { display: grid; grid-template-columns: repeat(28, 1fr); gap: 3px; margin: 10px 0 6px; max-width: 420px; }
.days span { aspect-ratio: 1; border-radius: 3px; background: var(--line); }
.days span.on { background: color-mix(in srgb, var(--brand) 75%, var(--paper)); }
.meaningful { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin: 8px 0; }
.meaningful .chip.pick { font-size: 13px; padding: 3px 10px; }

.picker { border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px 10px; margin: 12px 0 0; }
.picker legend { font-weight: 700; font-size: 14px; padding: 0 4px; }
.picker label.inline { margin: 4px 14px 4px 0; }

.companion { border-color: color-mix(in srgb, var(--brand-2) 50%, var(--line)); background: color-mix(in srgb, var(--brand-2) 5%, var(--paper)); }
.companion.quiet { background: var(--paper); border-style: dashed; }
.question { font: 500 21px/1.4 ui-serif, Georgia, serif; margin: 2px 0 8px; }
.question-big { font-size: clamp(28px, 5vw, 42px); max-width: 720px; }
.practice { color: var(--brand); }
textarea.short { min-height: 70px; }
.observations li { margin-bottom: 6px; }
.moment { width: 100%; max-height: 380px; object-fit: cover; border-radius: 12px; margin: 6px 0; }

.timeline { list-style: none; padding: 0; border-left: 2px solid var(--line); margin-left: 6px; }
.timeline li { padding: 4px 0 8px 16px; position: relative; }
.timeline li::before { content: ''; position: absolute; left: -6px; top: 12px; width: 10px; height: 10px; border-radius: 50%; background: var(--brand); }
.when { color: var(--muted); font-size: 14px; }
.version { border-top: 1px solid var(--line); padding-top: 8px; margin-top: 8px; }
.conflict { border-top: 1px solid var(--warn-line); padding-top: 10px; margin-top: 10px; }
.versions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
blockquote { margin: 6px 0; padding: 8px 12px; background: var(--paper); border-radius: 10px; white-space: pre-wrap; font-size: 15px; }
details.past { margin-top: 22px; }
details.past > summary { font-weight: 650; color: var(--muted); }

/* ── Marketing ─────────────────────────────────────────────────────────── */

.hero { padding: 16px 0 6px; position: relative; }
.hero h1 { font-size: clamp(38px, 7vw, 66px); }
.hero .cta { margin-top: 20px; }
.rose { position: relative; width: min(340px, 80vw); aspect-ratio: 1; margin: 34px auto 0; border-radius: 50%; border: 1px solid var(--line);
  background: radial-gradient(circle, color-mix(in srgb, var(--brand) 10%, transparent) 0 34%, transparent 35%), var(--paper); }
.rose span { position: absolute; transform: translate(-50%, -50%); font-size: 14px; font-weight: 650; color: var(--brand); white-space: nowrap; }
.rose b { position: absolute; inset: 0; display: grid; place-items: center; font: italic 600 22px ui-serif, Georgia, serif; color: var(--brand-2); }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.features .card { margin: 0; }
.features h3 { margin-top: 0; }
.plan-plus { border-color: var(--brand-2); }
.steps { counter-reset: step; padding: 0; list-style: none; }
.steps li { counter-increment: step; position: relative; padding-left: 48px; margin: 0 0 16px; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: -2px; width: 34px; height: 34px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; font-weight: 700; }
.callout { background: color-mix(in srgb, var(--brand) 9%, var(--paper)); border-radius: 22px; padding: 6px 26px 18px; margin-top: 36px; }
.refusals li { margin-bottom: 8px; }
details summary { cursor: pointer; }

@media (max-width: 700px) {
  .versions { grid-template-columns: 1fr; }
  .site-header .account { margin-left: 0; }
}

/* ── Motion ────────────────────────────────────────────────────────────── */

@keyframes rise { from { transform: translate(var(--tx, 0), 10px); opacity: 0; } to { transform: translate(var(--tx, 0), 0); opacity: 1; } }
.toast { --tx: -50%; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
