/* Sonorous Digital visual system: near-black canvas, cream display type,
   forest green actions, orange monospace labels, Geist / Geist Mono. */
:root {
  --bg: #0d0d0d;
  --bg-2: #121212;
  --ink: #e9e2d6;          /* cream text */
  --ink-2: #b8b0a3;
  --ink-3: #7d776d;
  --cream: #dcd1c3;
  --glass: rgba(255, 255, 255, 0.035);
  --glass-strong: rgba(255, 255, 255, 0.06);
  --line: rgba(255, 255, 255, 0.09);
  --line-2: rgba(255, 255, 255, 0.06);
  --green: #2d5339;
  --green-2: #3b593f;
  --green-bright: #7fb586;
  --orange: #ff9900;
  --gold: #d9b35a;
  --vis: #7fb586;
  --conv: #ff9900;
  --cta: #d9b35a;
  --danger: #ff6b57;
  --radius: 22px;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  --font: "Geist", "Geist Fallback", -apple-system, BlinkMacSystemFont, Inter, system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  color-scheme: dark;
}
::selection { background: var(--green-2); color: var(--ink); }

/* background: concentric rings + a faint green glow, like the hero */
.bg { position: fixed; inset: 0; overflow: hidden; z-index: 0; pointer-events: none; }
.bg::before {
  content: ""; position: absolute; inset: -20%;
  background: repeating-radial-gradient(circle at 18% 12%, rgba(255,255,255,0.028) 0 1px, transparent 1px 64px);
  mask-image: radial-gradient(circle at 18% 12%, #000 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(circle at 18% 12%, #000 0%, transparent 70%);
}
.blob { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.7; animation: drift 30s ease-in-out infinite alternate; }
.b1 { width: 60vw; height: 60vw; left: -25vw; top: -30vw; background: rgba(45, 83, 57, 0.55); }
.b2 { width: 40vw; height: 40vw; right: -15vw; top: 30vh; background: rgba(59, 89, 63, 0.28); animation-delay: -10s; }
.b3 { width: 34vw; height: 34vw; left: 35vw; bottom: -22vw; background: rgba(139, 115, 85, 0.16); animation-delay: -20s; }
@keyframes drift { from { transform: translate(0,0) scale(1); } to { transform: translate(5vw, 3vh) scale(1.06); } }

.shell { position: relative; z-index: 1; max-width: 1040px; margin: 0 auto; padding: 40px 16px 80px; display: flex; flex-direction: column; gap: 18px; }

/* header */
.top { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; padding: 0 6px; }
.brand { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--orange); margin: 0 0 10px; }
h1 { margin: 0; font-size: 40px; line-height: 0.95; letter-spacing: -0.03em; font-weight: 800; text-transform: uppercase; color: var(--cream); }
.sub { margin: 10px 0 0; color: var(--ink-2); font-size: 14px; max-width: 520px; }
.status { font-family: var(--mono); font-size: 11px; letter-spacing: 0.04em; color: var(--ink-3); text-align: right; }
.status .bad { color: var(--orange); }

/* step rail */
.rail { display: flex; gap: 4px; padding: 5px; border-radius: 999px; background: var(--glass); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border: 1px solid var(--line); width: fit-content; }
.rail-step { border: 0; background: transparent; color: var(--ink-2); font: inherit; font-size: 13px; font-weight: 500; padding: 8px 16px 8px 10px; border-radius: 999px; cursor: pointer; display: flex; align-items: center; gap: 9px; transition: background .2s, color .2s; position: relative; }
.rail-step span { font-family: var(--mono); font-size: 11px; color: var(--ink-3); }
.rail-step span::before { content: "0"; }
.rail-step.is-active { background: rgba(45, 83, 57, 0.45); color: var(--ink); }
.rail-step.is-active span { color: var(--green-bright); }
.rail-step.is-done span { color: var(--green-bright); }

/* cards */
.card {
  background: var(--glass);
  backdrop-filter: blur(28px) saturate(120%);
  -webkit-backdrop-filter: blur(28px) saturate(120%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: opacity .25s, border-color .25s;
}
.card.is-locked { opacity: 0.45; }
.card.is-locked .card-body { display: none; }
.card.is-collapsed .card-body { display: none; }
.card.is-open, .card:not(.is-collapsed):not(.is-locked) { border-color: rgba(255, 255, 255, 0.14); }
.card-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px; cursor: pointer; }
.card-title { display: flex; align-items: center; gap: 14px; }
.card-title h2 { margin: 0; font-size: 16px; font-weight: 600; letter-spacing: -0.01em; color: var(--ink); }
.num { font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; color: var(--orange); min-width: 34px; height: 28px; padding: 0 9px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; border: 1px solid rgba(255, 153, 0, 0.35); background: rgba(255, 153, 0, 0.06); }
.num::before { content: "0"; }
.card.is-done .num { color: var(--green-bright); border-color: rgba(127, 181, 134, 0.4); background: rgba(45, 83, 57, 0.25); }
.pill { font-family: var(--mono); font-size: 11px; letter-spacing: 0.04em; color: var(--ink-2); background: var(--glass-strong); border: 1px solid var(--line-2); padding: 6px 11px; border-radius: 999px; white-space: nowrap; }
.pill.busy { color: var(--green-bright); }
.card-body { padding: 4px 22px 22px; display: flex; flex-direction: column; gap: 14px; }

/* today */
.today { display: grid; grid-template-columns: 1.4fr 1fr; gap: 26px; }
.today-meta { display: flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
.dot { width: 3px; height: 3px; border-radius: 50%; background: var(--ink-3); }
.cat { font-weight: 500; }
.cat.visibility { color: var(--vis); } .cat.converting { color: var(--conv); } .cat.cta { color: var(--cta); }
.today-type { font-size: 56px; font-weight: 800; letter-spacing: -0.03em; text-transform: uppercase; color: var(--cream); margin: 10px 0 8px; line-height: 0.95; }
.today-desc { margin: 0 0 8px; color: var(--ink); font-size: 15px; line-height: 1.5; }
.today-goal { margin: 0; color: var(--ink-2); font-size: 13px; line-height: 1.5; }
.today-side { display: flex; flex-direction: column; gap: 10px; padding-top: 6px; }
.mixbar { display: flex; height: 6px; border-radius: 999px; overflow: hidden; background: var(--line-2); gap: 2px; }
.mixbar i { display: block; height: 100%; }
.mixbar .visibility { background: var(--vis); } .mixbar .converting { background: var(--conv); } .mixbar .cta { background: var(--cta); }
.mix-legend { display: flex; gap: 14px; font-family: var(--mono); font-size: 11px; color: var(--ink-2); flex-wrap: wrap; }
.mix-legend b { color: var(--ink); font-weight: 500; }
.mix-legend .sw { display: inline-block; width: 7px; height: 7px; border-radius: 1px; margin-right: 6px; vertical-align: 1px; }
.label { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--orange); margin: 12px 0 7px; }
.label::before { content: "[ "; } .label::after { content: " ]"; }
.label:first-child { margin-top: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: 12px; font-weight: 500; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--glass-strong); color: var(--ink-2); }
.chip::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 7px; background: var(--ink-3); vertical-align: 1px; }
.chip.visibility::before { background: var(--vis); } .chip.converting::before { background: var(--conv); } .chip.cta::before { background: var(--cta); }
.chip.tag::before { display: none; }
.chip.tag { font-family: var(--mono); font-size: 11px; }

/* controls */
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.btn { font: inherit; font-size: 13.5px; font-weight: 500; padding: 10px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--glass-strong); color: var(--ink); cursor: pointer; transition: transform .12s, background .2s, border-color .2s, opacity .2s; }
.btn:hover { transform: translateY(-1px); border-color: rgba(255, 255, 255, 0.2); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn.primary { background: var(--green); color: var(--cream); border-color: rgba(127, 181, 134, 0.25); }
.btn.primary:hover { background: var(--green-2); }
.btn.primary::after { content: " →"; }
.btn.success { background: var(--cream); color: var(--bg); border-color: transparent; }
.btn.success:hover { background: #fff; }
.btn.ghost { background: transparent; }
.btn.small { padding: 6px 11px; font-size: 12px; }
.select { font: inherit; font-size: 13.5px; padding: 10px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--glass-strong); color: var(--ink); }
.select option { background: #161616; color: var(--ink); }
textarea { width: 100%; font: inherit; font-size: 15px; line-height: 1.55; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--line); background: rgba(0, 0, 0, 0.35); color: var(--ink); resize: vertical; outline: none; transition: border-color .2s, box-shadow .2s; }
textarea::placeholder { color: var(--ink-3); }
textarea:focus { border-color: var(--green-bright); box-shadow: 0 0 0 4px rgba(45, 83, 57, 0.35); }
.count { font-family: var(--mono); font-size: 11px; color: var(--ink-3); }
.count.over { color: var(--danger); }
.hint { margin: 0; font-family: var(--mono); font-size: 11px; color: var(--ink-3); }
.muted { color: var(--ink-3); font-weight: 400; text-transform: none; letter-spacing: 0; }
.empty { color: var(--ink-3); font-size: 14px; padding: 6px 0 4px; }
.hidden { display: none !important; }

/* structure */
.two { display: grid; grid-template-columns: 1.15fr 1fr; gap: 26px; }
.hook { margin: 0 0 4px; font-size: 18px; font-weight: 600; line-height: 1.4; color: var(--cream); }
.outline { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.outline b { display: block; color: var(--ink); font-weight: 600; }
.outline span { color: var(--ink-2); }
.format { display: inline-block; font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; padding: 7px 12px; border-radius: 999px; background: var(--cream); color: var(--bg); }
.notes { margin: 0; font-size: 13px; color: var(--ink-2); line-height: 1.55; white-space: pre-wrap; }
.direction { border: 1px solid var(--line); border-radius: 16px; padding: 14px; background: rgba(0, 0, 0, 0.3); display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.direction .style { font-weight: 600; font-size: 14px; color: var(--cream); }
.direction .k { font-family: var(--mono); color: var(--ink-3); font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 2px; }
.slides { display: flex; flex-direction: column; gap: 10px; }
.slide { border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; background: rgba(0, 0, 0, 0.3); font-size: 13px; }
.slide-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }
.slide-head b { font-size: 13px; color: var(--cream); }
.slide .text { color: var(--ink); white-space: pre-wrap; margin-bottom: 8px; }
.slide .prompt { font-family: var(--mono); color: var(--ink-2); white-space: pre-wrap; font-size: 11.5px; line-height: 1.55; }

/* final */
.checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.checklist label { display: flex; gap: 8px; align-items: flex-start; cursor: pointer; }
.checklist input { margin-top: 3px; accent-color: var(--green-bright); }

/* Claude app handoff */
.handoff { display: flex; flex-direction: column; gap: 10px; }
.handoff-steps { display: flex; gap: 8px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-2); }
.handoff-steps span { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 8px; border-radius: 999px; border: 1px solid var(--line); background: var(--glass-strong); }
.handoff-steps b { font-family: var(--mono); font-size: 10.5px; font-weight: 500; color: var(--orange); }
.handoff-steps b::before { content: "0"; }
textarea[readonly] { color: var(--ink-2); font-size: 12px; font-family: var(--mono); line-height: 1.5; }
a.btn { text-decoration: none; display: inline-flex; align-items: center; }
.hint.err { color: var(--danger); }

.foot { font-family: var(--mono); font-size: 11px; color: var(--ink-3); padding: 0 6px; line-height: 1.7; }
.foot code { font-family: inherit; color: var(--ink-2); background: var(--glass-strong); border: 1px solid var(--line-2); padding: 1px 6px; border-radius: 5px; }

.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); opacity: 0; background: var(--cream); color: var(--bg); padding: 10px 16px; border-radius: 999px; font-size: 13px; font-weight: 500; transition: all .25s; z-index: 5; pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.spinner { display: inline-block; width: 11px; height: 11px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; vertical-align: -1px; margin-right: 6px; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 760px) {
  .shell { padding: 24px 16px 60px; }
  .today, .two { grid-template-columns: 1fr; }
  .today-type { font-size: 40px; }
  h1 { font-size: 32px; }
  .top { flex-direction: column; align-items: flex-start; }
  .status { text-align: left; }
  .rail { width: 100%; justify-content: space-between; }
  .rail-step { padding: 8px 10px; }
}

/* header right side + archive page */
.top-right { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.arch-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.arch-tools .search { flex: 1; min-width: 200px; font: inherit; font-size: 13.5px; padding: 10px 14px; border-radius: 999px; border: 1px solid var(--line); background: rgba(0,0,0,0.35); color: var(--ink); outline: none; }
.arch-tools .search:focus { border-color: var(--green-bright); }
.filter { font: inherit; font-size: 12.5px; font-weight: 500; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--ink-2); cursor: pointer; }
.filter.is-active { background: rgba(45, 83, 57, 0.45); color: var(--ink); border-color: rgba(127, 181, 134, 0.35); }
.arch-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.stat { border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; background: rgba(0,0,0,0.25); }
.stat .k { font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.stat .v { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; color: var(--cream); margin-top: 4px; line-height: 1; }
.stat .s { font-family: var(--mono); font-size: 11px; color: var(--ink-3); margin-top: 6px; }
.stat.visibility .v { color: var(--vis); } .stat.converting .v { color: var(--conv); } .stat.cta .v { color: var(--cta); }
.arch-list { display: flex; flex-direction: column; gap: 10px; }
.post { border: 1px solid var(--line); border-radius: 18px; background: var(--glass); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); overflow: hidden; }
.post-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 14px 18px; cursor: pointer; }
.post-meta { display: flex; gap: 10px; align-items: center; font-family: var(--mono); font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); flex-wrap: wrap; }
.post-title { font-size: 15px; font-weight: 600; color: var(--cream); margin-top: 5px; line-height: 1.35; }
.post-body { display: none; padding: 0 18px 18px; }
.post.is-open .post-body { display: grid; grid-template-columns: 1.3fr 1fr; gap: 22px; }
.post-text { margin: 0; white-space: pre-wrap; font: inherit; font-size: 14px; line-height: 1.55; color: var(--ink); padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: rgba(0,0,0,0.3); }
.post-side { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--ink-2); }
.post .row { margin-top: 12px; }
.btn.danger { color: var(--danger); }
@media (max-width: 760px) { .arch-stats { grid-template-columns: repeat(2, 1fr); } .post.is-open .post-body { grid-template-columns: 1fr; } }

/* calendar */
.cal-nav { display: flex; align-items: center; gap: 10px; margin: 14px 0 10px; }
.cal-month { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; color: var(--cream); min-width: 170px; text-transform: uppercase; }
.cal-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); padding: 0 2px 6px; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-cell { min-height: 96px; border: 1px solid var(--line-2); border-radius: 12px; padding: 8px; background: rgba(0,0,0,0.22); display: flex; flex-direction: column; gap: 6px; }
.cal-cell.is-other { opacity: 0.35; }
.cal-cell.is-today { border-color: rgba(127, 181, 134, 0.6); background: rgba(45, 83, 57, 0.18); }
.cal-day { font-family: var(--mono); font-size: 11px; color: var(--ink-3); }
.cal-cell.is-today .cal-day { color: var(--green-bright); }
.cal-chips { display: flex; flex-direction: column; gap: 4px; }
.cal-chip { font: inherit; font-size: 11.5px; font-weight: 500; text-align: left; padding: 5px 8px; border-radius: 8px; border: 1px solid transparent; cursor: pointer; color: var(--ink); background: var(--glass-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: transform .12s, border-color .2s; }
.cal-chip::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; background: var(--ink-3); }
.cal-chip.visibility { background: rgba(127, 181, 134, 0.16); } .cal-chip.visibility::before { background: var(--vis); }
.cal-chip.converting { background: rgba(255, 153, 0, 0.14); } .cal-chip.converting::before { background: var(--conv); }
.cal-chip.cta { background: rgba(217, 179, 90, 0.16); } .cal-chip.cta::before { background: var(--cta); }
.cal-chip:hover { transform: translateY(-1px); border-color: rgba(255,255,255,0.2); }
.cal-chip.is-selected { border-color: var(--cream); }
.cal-chip.ghost { background: transparent; border: 1px dashed var(--line); color: var(--ink-3); cursor: default; }
.cal-chip.ghost:hover { transform: none; border-color: var(--line); }
@media (max-width: 760px) {
  .cal { gap: 3px; } .cal-cell { min-height: 64px; padding: 5px; border-radius: 8px; }
  .cal-chip { font-size: 0; padding: 0; height: 8px; border-radius: 4px; } .cal-chip::before { display: none; }
  .cal-chip.visibility { background: var(--vis); } .cal-chip.converting { background: var(--conv); } .cal-chip.cta { background: var(--cta); }
  .cal-month { font-size: 15px; min-width: 0; }
}
