:root {
  color-scheme: light;
  --cp-bg: #f7f4ef;
  --cp-bg-elevated: #fcfbf8;
  --cp-surface: #ffffff;
  --cp-surface-soft: #f5f5f5;
  --cp-border: #dedede;
  --cp-border-strong: #919191;
  --cp-text: #242424;
  --cp-text-muted: #5c5c5c;
  --cp-text-soft: #6f6f6f;
  --cp-accent: #b11f4b;
  --cp-accent-hover: #9a1a41;
  --cp-accent-soft: rgba(177, 31, 75, 0.08);
  --cp-accent-fg: #ffffff;
  --cp-success: #16a34a;
  --cp-danger: #dc2626;
  --cp-warning: #f59e0b;
  --cp-link: #0078d4;
  --cp-shadow: 0 18px 48px rgba(0, 0, 0, 0.12);
  --cp-overlay: rgba(255, 255, 255, 0.8);
  --cp-panel: rgba(255, 255, 255, 0.86);
  --cp-panel-strong: rgba(255, 255, 255, 0.96);
  --cp-sheen: rgba(255, 255, 255, 0.55);
  --cp-highlight: rgba(177, 31, 75, 0.12);
}
html[data-theme="dark"] {
  color-scheme: dark;
  --cp-bg: #3d3b3a;
  --cp-bg-elevated: #343231;
  --cp-surface: #292929;
  --cp-surface-soft: #2e2e2e;
  --cp-border: #474747;
  --cp-border-strong: #5f5f5f;
  --cp-text: #dedede;
  --cp-text-muted: #919191;
  --cp-text-soft: #b0b0b0;
  --cp-accent: #fd8ea1;
  --cp-accent-hover: #fb7b91;
  --cp-accent-soft: rgba(253, 142, 161, 0.14);
  --cp-accent-fg: #1a1a1a;
  --cp-success: #4ade80;
  --cp-danger: #f87171;
  --cp-warning: #fbbf24;
  --cp-link: #4da6ff;
  --cp-shadow: 0 18px 48px rgba(0, 0, 0, 0.32);
  --cp-overlay: rgba(41, 41, 41, 0.88);
  --cp-panel: rgba(41, 41, 41, 0.72);
  --cp-panel-strong: rgba(41, 41, 41, 0.96);
  --cp-sheen: rgba(255, 255, 255, 0.04);
  --cp-highlight: rgba(253, 142, 161, 0.12);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--cp-bg); color: var(--cp-text); font: 15px/1.65 "Segoe UI", Aptos, Calibri, -apple-system, BlinkMacSystemFont, sans-serif; }
button, input, textarea, select { font: inherit; }
button, a, input, textarea, select, summary { -webkit-tap-highlight-color: var(--cp-highlight); }
button { cursor: pointer; border: 1px solid var(--cp-border); border-radius: .625rem; padding: 8px 16px; background: var(--cp-surface); color: var(--cp-text); font-weight: 600; }
button:hover { border-color: var(--cp-accent); color: var(--cp-accent); }
button:disabled { opacity: .6; cursor: wait; }
button.primary { background: var(--cp-accent); color: var(--cp-accent-fg); border-color: var(--cp-accent); }
button.primary:hover { background: var(--cp-accent-hover); }
button.quiet { background: none; border-color: var(--cp-bg); padding: 6px 10px; font-size: 13px; }
button.danger { color: var(--cp-danger); }
a { color: var(--cp-link); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid var(--cp-accent); outline-offset: 3px; }
h1, h2, h3, p { margin: 0 0 12px; }
h1 { font-size: clamp(26px, 3.2vw, 40px); line-height: 1.3; letter-spacing: -.8px; }
h2 { font-size: 22px; line-height: 1.4; }
h3 { font-size: 17px; }
label { display: block; font-size: 13px; font-weight: 600; margin: 12px 0 6px; }
input, textarea, select { width: 100%; padding: 10px 12px; border: 1px solid var(--cp-border); border-radius: .625rem; background: var(--cp-surface); color: var(--cp-text); }
textarea { resize: vertical; min-height: 92px; }
input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--cp-accent); cursor: pointer; }
.full { width: 100%; }
.muted, .fineprint { color: var(--cp-text-muted); }
.fineprint { font-size: 12px; margin-top: 20px; }
.error { color: var(--cp-danger); min-height: 24px; font-size: 13px; margin-top: 12px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--cp-text); font-size: 15px; font-weight: 700; line-height: 1.4; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 40px; height: 40px; border-radius: .625rem; background: var(--cp-accent); color: var(--cp-accent-fg); display: grid; place-items: center; font-size: 15px; letter-spacing: -.5px; }
.brand-sub { display: block; font-size: 11px; color: var(--cp-text-muted); font-weight: 400; margin-top: 3px; }
.eyebrow { display: block; font-size: 11px; font-weight: 700; letter-spacing: 2px; color: var(--cp-accent); margin-bottom: 12px; }
.login-layout { display: grid; grid-template-columns: 1.2fr 1fr; min-height: 100vh; max-width: 1440px; margin: auto; }
.login-story { padding: clamp(32px, 7vw, 104px); display: flex; flex-direction: column; justify-content: center; }
.login-story .brand { margin-bottom: 72px; }
.login-story h1 { font-size: clamp(32px, 4vw, 56px); }
.login-story > p { max-width: 440px; color: var(--cp-text-muted); }
.story-meta { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; margin-top: 24px; }
.story-meta span { border: 1px solid var(--cp-border); padding: 6px 12px; border-radius: .625rem; }
.login-panel { align-self: center; margin: 40px; padding: 44px; background: var(--cp-surface); border: 1px solid var(--cp-border); border-radius: 16px; max-width: 440px; }
.form-intro { margin-bottom: 24px; }
.form-intro p { color: var(--cp-text-muted); font-size: 14px; }
.topbar { background: var(--cp-surface); border-bottom: 1px solid var(--cp-border); padding: 16px max(24px, calc((100vw - 1200px)/2)); display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.account { display: flex; align-items: center; gap: 8px; font-size: 13px; flex-wrap: wrap; }
.account > span { margin-right: 12px; font-weight: 600; }
.shell { max-width: 1248px; margin: auto; padding: 0 24px; }
.tabs { display: flex; gap: 8px; padding: 24px 0; flex-wrap: wrap; }
.tabs button { background: none; border-color: var(--cp-bg); color: var(--cp-text-muted); }
.tabs button[aria-current="page"] { background: var(--cp-accent-soft); color: var(--cp-accent); border-color: var(--cp-accent-soft); }
.hero { background: var(--cp-bg-elevated); border: 1px solid var(--cp-border); border-radius: 16px; padding: 32px; display: flex; justify-content: space-between; align-items: center; gap: 32px; margin-bottom: 24px; }
.hero p { color: var(--cp-text-muted); max-width: 680px; }
.hero .date-pill { white-space: nowrap; border: 1px solid var(--cp-border); border-radius: .625rem; padding: 12px 20px; font-size: 13px; text-align: center; }
.hero .date-pill strong { display: block; font-size: 22px; color: var(--cp-accent); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 32px; }
.stat { background: var(--cp-surface); padding: 20px 24px; border: 1px solid var(--cp-border); border-radius: 16px; }
.stat-label { display: block; color: var(--cp-text-muted); font-size: 12px; }
.stat strong { font-size: 30px; font-weight: 650; letter-spacing: -1px; }
.stat small { color: var(--cp-text-muted); font-size: 12px; margin-left: 8px; }
.stat progress { margin-top: 8px; }
progress { display: block; width: 100%; height: 6px; border: 0; border-radius: 8px; overflow: hidden; background: var(--cp-surface-soft); color: var(--cp-accent); accent-color: var(--cp-accent); }
progress::-webkit-progress-bar { background: var(--cp-surface-soft); }
progress::-webkit-progress-value { background: var(--cp-accent); border-radius: 8px; }
progress::-moz-progress-bar { background: var(--cp-accent); }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: 28px 0 16px; flex-wrap: wrap; }
.section-heading h2 { margin: 0; font-size: 20px; }
.section-heading p { margin: 0; font-size: 12px; color: var(--cp-text-muted); }
.stage { border: 1px solid var(--cp-border); background: var(--cp-surface); border-radius: 16px; margin-bottom: 16px; }
.stage > summary { cursor: pointer; list-style: none; padding: 24px; display: flex; gap: 16px; align-items: center; }
.stage > summary::-webkit-details-marker { display: none; }
.stage > summary::after { content: "+"; color: var(--cp-text-soft); font-size: 24px; margin-left: 8px; }
.stage[open] > summary::after { content: "−"; }
.stage-index { width: 42px; height: 42px; flex: 0 0 42px; display: grid; place-items: center; background: var(--cp-accent-soft); color: var(--cp-accent); border-radius: .625rem; font-weight: 700; font-size: 16px; }
.stage-heading { flex: 1; }
.stage-heading h3 { margin-bottom: 2px; }
.stage-heading p { color: var(--cp-text-muted); font-size: 12px; margin: 0; }
.stage-meta { text-align: right; font-size: 12px; color: var(--cp-text-muted); }
.stage-meta strong { color: var(--cp-text); display: block; font-size: 14px; }
.task-list { padding: 0 24px 8px; }
.task { border-top: 1px solid var(--cp-border); padding: 20px 0; }
.task-main { display: flex; gap: 16px; align-items: flex-start; }
.check-label { margin: 0; padding-top: 4px; }
.task-copy { flex: 1; min-width: 0; }
.task-copy h3 { font-size: 15px; margin-bottom: 4px; }
.task-copy p { font-size: 13px; color: var(--cp-text-muted); margin-bottom: 8px; }
.task-meta { display: flex; align-items: center; gap: 12px; font-size: 12px; flex-wrap: wrap; }
.task.complete .task-title { color: var(--cp-text-muted); }
.task.complete .check-label { color: var(--cp-success); }
.badge { font-size: 11px; padding: 3px 8px; border-radius: 6px; background: var(--cp-surface-soft); color: var(--cp-text-muted); white-space: nowrap; }
.badge.success { color: var(--cp-success); }
.badge.warning { color: var(--cp-danger); }
.notes { margin: 12px 0 0 34px; font-size: 12px; }
.notes > summary { color: var(--cp-text-muted); cursor: pointer; }
.notes label { margin-top: 8px; }
.notes textarea { font-size: 13px; }
.notes .block-label { display: flex; align-items: center; gap: 8px; }
.note-actions { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.note-actions span { color: var(--cp-text-muted); font-size: 11px; }
.resources-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.resource { background: var(--cp-surface); border: 1px solid var(--cp-border); border-radius: 16px; padding: 24px; }
.resource h3 { font-size: 15px; }
.resource p { font-size: 13px; color: var(--cp-text-muted); margin: 0; }
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.toolbar input[type="search"] { width: 240px; }
.toolbar select { width: auto; }
.toolbar label { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 400; margin: 0; }
.toolbar .spacer { flex: 1; }
.table-wrap { background: var(--cp-surface); border: 1px solid var(--cp-border); border-radius: 16px; overflow: auto; }
table { border-collapse: collapse; width: 100%; font-size: 13px; text-align: left; }
th, td { padding: 16px; border-bottom: 1px solid var(--cp-border); white-space: nowrap; }
th { color: var(--cp-text-muted); font-size: 12px; background: var(--cp-bg-elevated); font-weight: 500; }
tbody tr:last-child td { border-bottom: 0; }
.person strong { display: block; }
.person small { color: var(--cp-text-muted); font-size: 11px; }
.person button { text-align: left; border: 0; background: none; padding: 0; }
.mini-progress { min-width: 120px; }
.mini-progress span { display: block; margin-bottom: 5px; }
.matrix-cell { text-align: center; font-size: 14px; }
.matrix-cell.done { color: var(--cp-success); }
.matrix-cell.blocked { color: var(--cp-danger); }
.matrix-cell.todo { color: var(--cp-text-muted); }
.legend { color: var(--cp-text-muted); font-size: 12px; margin: 12px 0; }
.empty { padding: 48px 24px; text-align: center; color: var(--cp-text-muted); }
.user-layout { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 24px; align-items: start; }
.panel { background: var(--cp-surface); border: 1px solid var(--cp-border); padding: 24px; border-radius: 16px; }
.panel .primary { margin-top: 16px; }
.inline-actions { display: flex; gap: 8px; }
.inline-actions button { padding: 5px 8px; font-size: 12px; }
.notice { border-left: 3px solid var(--cp-accent); background: var(--cp-accent-soft); color: var(--cp-text); padding: 12px 16px; font-size: 13px; margin-bottom: 20px; border-radius: 0 .625rem .625rem 0; }
footer { font-size: 11px; color: var(--cp-text-muted); padding: 32px 0; text-align: center; }
dialog { padding: 28px; border: 1px solid var(--cp-border); border-radius: 16px; background: var(--cp-surface); color: var(--cp-text); width: min(620px, calc(100vw - 32px)); max-height: 85vh; overflow-y: auto; box-shadow: var(--cp-shadow); }
dialog::backdrop { background: var(--cp-overlay); }
.dialog-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 16px; }
.dialog-heading h2 { margin: 0; font-size: 20px; }
.credentials { font: 14px/1.8 Consolas, "Courier New", Courier, monospace; padding: 16px; background: var(--cp-bg-elevated); border: 1px solid var(--cp-border); border-radius: .625rem; white-space: pre-wrap; overflow-wrap: anywhere; user-select: all; }
.detail-task { padding: 14px 0; border-bottom: 1px solid var(--cp-border); }
.detail-task p { font-size: 13px; color: var(--cp-text-muted); margin: 4px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.detail-task small { color: var(--cp-text-muted); font-size: 11px; }
#toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); max-width: min(560px, calc(100vw - 32px)); padding: 12px 24px; border: 1px solid var(--cp-border); border-radius: .625rem; background: var(--cp-surface); color: var(--cp-text); box-shadow: var(--cp-shadow); z-index: 20; }
#toast.error-toast { border-color: var(--cp-danger); color: var(--cp-danger); }
.boot { padding: 30vh 24px; text-align: center; color: var(--cp-text-muted); }
@media (max-width: 900px) {
  .login-layout { grid-template-columns: 1fr 1fr; }
  .login-story { padding: 32px; }
  .login-panel { margin: 24px; padding: 28px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .resources-grid { grid-template-columns: repeat(2, 1fr); }
  .user-layout { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .login-layout { display: block; padding: 24px; }
  .login-story { padding: 0; }
  .login-story .brand { margin-bottom: 32px; }
  .login-story h1 { font-size: 32px; }
  .login-story > p, .story-meta, .login-story > .fineprint { display: none; }
  .login-panel { margin: 24px 0 0; max-width: none; padding: 24px; }
  .topbar { padding: 16px; flex-wrap: wrap; gap: 12px; }
  .account { width: 100%; justify-content: flex-end; gap: 2px; }
  .account > span { margin-right: auto; }
  .shell { padding: 0 16px; }
  .tabs { gap: 0; padding: 16px 0; }
  .tabs button { font-size: 13px; padding: 8px 12px; }
  .hero { display: block; padding: 24px; }
  .hero .date-pill { display: inline-block; padding: 8px 16px; text-align: left; margin-top: 8px; }
  .hero .date-pill strong { display: inline; font-size: 18px; margin-left: 8px; }
  .stats { gap: 12px; margin-bottom: 24px; }
  .stat { padding: 16px; }
  .stat strong { font-size: 26px; }
  .stat small { display: block; margin: 0; }
  .stage > summary { padding: 16px; gap: 12px; }
  .stage-heading h3 { font-size: 15px; }
  .stage-heading p { display: none; }
  .stage-meta { max-width: 88px; }
  .task-list { padding: 0 16px 8px; }
  .resources-grid { grid-template-columns: 1fr; }
  .toolbar input[type="search"], .toolbar select { flex: 1; min-width: 120px; }
  .toolbar .spacer { display: none; }
  dialog { padding: 20px; }
}
