* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #0b1020;
  --panel: #141a30;
  --raised: #1a2142;
  --line: #202950;
  --text: #e7ecf7;
  --dim: #7c88a8;
  --career: #6366f1;
  --fitness: #16a34a;
  --finance: #0d9488;
  --accent: #d97706;
  --danger: #f87171;
}

html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

#app { max-width: 1320px; margin: 0 auto; padding: 26px 34px 70px; }

/* ---------- chrome ---------- */

.top { display: flex; align-items: baseline; gap: 16px; }
.top h1 { font-size: 26px; font-weight: 200; letter-spacing: 8px; }
.tagline { color: var(--dim); font-size: 12px; letter-spacing: 2px; }
.top nav { margin-left: auto; display: flex; gap: 8px; }
.top nav button { min-width: 86px; }
.top nav button.on { background: var(--career); color: #fff; }

.strip { color: var(--dim); font-size: 13px; letter-spacing: 2px; margin-top: 14px; }

button {
  background: var(--panel); color: var(--text); border: none; border-radius: 9px;
  padding: 8px 14px; font-size: 14px; font-family: inherit; cursor: pointer;
}
button:disabled { opacity: 0.35; cursor: default; }
.ghost { background: none; border: 1px solid var(--line); color: var(--dim); }
.danger { color: var(--danger); }

input[type="text"], input[type="number"], select, textarea {
  background: var(--raised); border: 1px solid var(--line); border-radius: 8px;
  color: var(--text); font-family: inherit; font-size: 14px; padding: 7px 10px;
}
input[type="number"] { font-variant-numeric: tabular-nums; text-align: center; }
textarea { width: 100%; resize: vertical; line-height: 1.5; }

.card { background: var(--panel); border-radius: 14px; padding: 18px 22px; margin-top: 18px; }
.card > header { display: flex; align-items: baseline; gap: 12px; margin-bottom: 10px; }
.card h2 { font-size: 14px; font-weight: 600; letter-spacing: 3px; text-transform: uppercase; }
.dim { color: var(--dim); font-size: 12px; }
code { font-family: ui-monospace, "SF Mono", monospace; font-size: 12px; color: var(--dim); }

.banner {
  background: var(--raised); border-radius: 10px; padding: 10px 14px; margin-top: 14px;
  font-size: 13px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.banner.danger { border-left: 3px solid var(--danger); }

.dot { width: 11px; height: 11px; border-radius: 50%; flex: none; display: inline-block; }
.t-career { background: var(--career); }
.t-fitness { background: var(--fitness); }
.t-finance { background: var(--finance); }

/* ---------- the hole — deliberate, slightly uncomfortable ---------- */

.hole {
  border: 1.5px dashed color-mix(in srgb, var(--accent) 65%, transparent);
  background: color-mix(in srgb, var(--accent) 7%, transparent);
  color: #f0b35c; border-radius: 10px; padding: 10px 13px; font-size: 13px; margin: 6px 0;
}
.hole-mark { opacity: 0.85; margin-right: 4px; }
.hole-hint { color: var(--dim); font-size: 12px; margin-top: 4px; }

/* ---------- arc ---------- */

.arc-grid {
  display: grid; grid-template-columns: 30px repeat(13, 1fr); gap: 3px; margin-top: 6px;
}
.arc-corner { }
.arc-week {
  background: none; color: var(--dim); font-size: 12px; padding: 3px 0; border-radius: 6px;
  font-variant-numeric: tabular-nums;
}
.arc-week:hover { color: var(--text); background: var(--raised); }
.arc-dow { color: var(--dim); font-size: 11px; display: flex; align-items: center; justify-content: center; }
.arc-cell {
  height: 30px; border-radius: 6px; display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-variant-numeric: tabular-nums; font-weight: 600;
}
.arc-hole { border: 1px dashed color-mix(in srgb, var(--accent) 55%, transparent); }
.arc-future { border: 1px solid var(--raised); background: none; }
.arc-today { outline: 2px solid var(--accent); outline-offset: 1px; }
.arc-spacer { }
.seal-dot { height: 14px; display: flex; align-items: center; justify-content: center; }
.seal-dot.sealed::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--dim); }
.seal-dot.owed::after { content: ""; width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--dim); }

.band { margin-top: 16px; }
.band-title { color: var(--dim); font-size: 12px; letter-spacing: 1px; display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.band svg { width: 100%; height: auto; display: block; }
.wgrid { stroke: var(--line); stroke-width: 1; }
.wguide { stroke: var(--dim); stroke-width: 1.5; stroke-dasharray: 6 6; opacity: 0.55; }
.wline { fill: none; stroke: var(--fitness); stroke-width: 2.5; }
.wdot { fill: var(--fitness); stroke: var(--bg); stroke-width: 2; }
.wlabel { fill: var(--dim); font-size: 11px; font-variant-numeric: tabular-nums; }
.wvalue { fill: var(--text); font-size: 12px; font-weight: 600; }
.fbar { stroke-width: 2; }
.fbar.career { fill: none; stroke: var(--career); }
.fbar.career.met { fill: var(--career); stroke: none; }
.fbar.fitness { fill: none; stroke: var(--fitness); }
.fbar.fitness.met { fill: var(--fitness); stroke: none; }
.fbar.finance { fill: none; stroke: var(--finance); }
.fbar.finance.met { fill: var(--finance); stroke: none; }

/* ---------- canon ---------- */

.themes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 18px; }
.themes .card { margin-top: 0; }
.theme-card header { align-items: center; }
.theme-card h2 { text-transform: lowercase; letter-spacing: 2px; font-size: 16px; }
.prio { margin-left: auto; color: var(--dim); font-size: 11px; border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px; }
.outcome { font-size: 14px; line-height: 1.55; }
.pin-date { color: var(--dim); font-size: 11px; margin-top: 5px; }
.floors { margin-top: 12px; }
.floor-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 7px 0; border-top: 1px solid var(--raised); font-size: 13px;
}
.floor-last { font-variant-numeric: tabular-nums; font-size: 12px; }
.floor-last.met { color: #4ade80; }
.floor-last.missed { color: var(--danger); }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 18px; }
.two-col .card { margin-top: 0; }
.protocol { list-style: none; }
.protocol li { display: flex; gap: 12px; padding: 5px 0; font-size: 14px; border-top: 1px solid var(--raised); }
.protocol li:first-child { border-top: none; }
.pnum { color: var(--dim); font-variant-numeric: tabular-nums; width: 18px; text-align: right; flex: none; }

.systems { width: 100%; border-collapse: collapse; font-size: 13px; }
.systems td { padding: 6px 10px 6px 0; border-top: 1px solid var(--raised); vertical-align: top; line-height: 1.45; }
.systems tr:first-child td { border-top: none; }
.sys-name { font-weight: 600; white-space: nowrap; }
.sys-where { color: var(--dim); }
.sys-cadence { color: var(--dim); white-space: nowrap; }

footer { display: flex; align-items: center; gap: 14px; margin-top: 24px; flex-wrap: wrap; }
.file-label { position: relative; display: inline-block; padding: 8px 14px; border-radius: 9px; font-size: 14px; cursor: pointer; }
.file-label input[type="file"] { display: none; }

/* ---------- review ---------- */

.week-chips { display: flex; gap: 6px; margin-top: 16px; }
.week-chip {
  width: 38px; padding: 7px 0; font-variant-numeric: tabular-nums; color: var(--dim);
  border-bottom: 2px solid transparent; border-radius: 9px 9px 4px 4px;
}
.week-chip.sealed { border-bottom-color: var(--fitness); }
.week-chip.current { color: var(--text); }
.week-chip.future { opacity: 0.4; }
.week-chip.active { background: var(--career); color: #fff; }

.day-row {
  display: grid; grid-template-columns: 92px 60px 1fr 92px; gap: 12px; align-items: center;
  padding: 8px 0; border-top: 1px solid var(--raised);
}
.day-row:first-of-type { border-top: none; }
.day-row.future { opacity: 0.45; }
.day-date { color: var(--dim); font-size: 13px; white-space: nowrap; }
.score { width: 58px; font-size: 15px; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.chip {
  font-size: 11px; padding: 4px 9px; border-radius: 999px; background: var(--raised); color: var(--dim);
}
.chip.on { background: var(--accent); color: #0b1020; font-weight: 600; }
.untagged { color: #f0b35c; font-size: 11px; text-align: right; }
.sealed-row { grid-template-columns: 92px 70px 1fr; }
.day-score { font-variant-numeric: tabular-nums; font-weight: 600; font-size: 14px; }
.day-misses { color: var(--dim); font-size: 13px; }

.actual-row {
  display: flex; align-items: center; gap: 12px; padding: 8px 0; border-top: 1px solid var(--raised);
  font-size: 14px;
}
.actual-row:first-of-type { border-top: none; }
.actual-row .floor-name { flex: 0 0 240px; }
.actual-row input { width: 92px; }

.text-row { display: grid; grid-template-columns: 140px 1fr; gap: 12px; padding: 9px 0; border-top: 1px solid var(--raised); }
.text-row:first-of-type { border-top: none; }
.text-label { color: var(--dim); font-size: 13px; padding-top: 7px; }
.text-row p { font-size: 14px; line-height: 1.5; padding-top: 7px; white-space: pre-wrap; }

.amend-row { padding: 7px 0; border-top: 1px solid var(--raised); font-size: 14px; line-height: 1.5; }
.amend-row:first-of-type { border-top: none; }
.amend-date { color: var(--dim); font-size: 12px; font-variant-numeric: tabular-nums; margin-right: 12px; }
.amend-add { display: flex; gap: 8px; margin-top: 12px; }
.amend-add input { flex: 1; }
.canon-ops { display: flex; gap: 8px; align-items: center; margin-top: 14px; flex-wrap: wrap; }
.canon-form { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.canon-form input[type="text"] { min-width: 260px; flex: 1; }
.canon-form input[type="number"] { width: 90px; }

.seal-box { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.seal { background: var(--career); color: #fff; font-weight: 600; padding: 10px 24px; border-radius: 10px; }
.seal-box.confirm { border: 1.5px solid color-mix(in srgb, var(--accent) 60%, transparent); }
.row-actions { display: flex; gap: 10px; margin-top: 12px; }

.handoff {
  font-family: ui-monospace, "SF Mono", monospace; font-size: 13px; line-height: 1.6;
  background: #0d1226; border-radius: 10px; padding: 14px 16px; white-space: pre; overflow-x: auto;
}

@media (max-width: 960px) {
  .themes, .two-col { grid-template-columns: 1fr; }
  #app { padding: 18px 16px 60px; }
  .day-row { grid-template-columns: 84px 54px 1fr; }
  .untagged { display: none; }
}
