body { min-width: 1120px; }
.app-shell { display: grid; grid-template-columns: 290px minmax(800px, 1fr); min-height: 100vh; }

.sidebar { position: sticky; top: 0; height: 100vh; overflow: auto; padding: 30px 23px; color: #f6f7f2; background: var(--navy); }
.sidebar .brand { margin-bottom: 34px; }
.sidebar .eyebrow { color: #98acb6; }
.sidebar h2 { margin: 0 0 10px; font-size: 22px; }
.sidebar-intro { margin: 0 0 22px; color: #b9c6cc; font-size: 12px; line-height: 1.65; }
.outcome-card { margin-bottom: 11px; padding: 15px; border: 1px solid rgba(255,255,255,.12); border-radius: 14px; background: rgba(255,255,255,.055); }
.outcome-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 12px; font-weight: 850; }
.outcome-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--coral); }
.outcome-card.site .outcome-dot { background: var(--mint); }
.outcome-card p { margin: 0; color: #d1dbdf; font-size: 11px; line-height: 1.65; }
.guardrail { margin-top: 20px; padding: 14px; color: #173326; background: var(--mint); border-radius: 13px; font-size: 11px; font-weight: 750; line-height: 1.55; }
.public-link { display: block; margin-top: 18px; color: #b9c6cc; font-size: 11px; text-decoration: none; }
.public-link:hover { color: white; }

.main { padding: 28px clamp(30px, 4vw, 60px) 52px; overflow: hidden; }
.topbar { display: flex; justify-content: space-between; align-items: flex-start; gap: 25px; margin-bottom: 19px; }
.mode-row { display: flex; align-items: center; gap: 7px; margin-bottom: 16px; }
.mode-badge { padding: 6px 9px; color: #153528; background: var(--mint); border-radius: 99px; font-size: 9px; font-weight: 900; letter-spacing: .08em; }
.mode-badge.visitor { color: #5f4612; background: #ffe7a7; }
.main h1 { margin: 0; font-size: clamp(30px, 3.2vw, 43px); line-height: 1.05; letter-spacing: -.045em; }
.lede { max-width: 700px; margin: 13px 0 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.sync-card { min-width: 190px; padding: 14px 16px; text-align: right; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.sync-card span { display: block; min-height: 16px; color: var(--green); font-size: 9px; font-weight: 800; }
.sync-retry { margin: 3px 0 2px auto; padding: 5px 8px; color: #8c2f26; background: #fff0ec; border: 1px solid #f0bcb4; border-radius: 7px; cursor: pointer; font-size: 9px; font-weight: 850; }
.sync-retry:hover { background: #ffe3dd; }
.sync-card strong { display: block; margin: 4px 0; font-size: 25px; letter-spacing: -.04em; }
.sync-card small { color: var(--muted); font-size: 10px; }

.week-rail { display: grid; grid-template-columns: repeat(6, minmax(112px, 1fr)); gap: 7px; padding: 7px; background: #e6e4dd; border: 1px solid var(--line); border-radius: 16px; }
.week-tab { position: relative; min-height: 82px; padding: 12px; text-align: left; border: 0; border-radius: 11px; background: transparent; cursor: pointer; transition: transform .17s ease, background .17s ease; }
.week-tab:hover { transform: translateY(-2px); background: rgba(255,255,255,.6); }
.week-tab.active { background: var(--card); box-shadow: 0 8px 22px rgba(20,35,45,.1); }
.week-tab strong, .week-tab span { display: block; }
.week-tab .week-no { color: var(--muted); font-size: 9px; letter-spacing: .09em; }
.week-tab strong { margin: 7px 0 4px; font-size: 13px; }
.week-tab .week-date { color: var(--muted); font-size: 9px; }
.week-pin { position: absolute; top: 11px; right: 11px; width: 8px; height: 8px; border: 2px solid #adb4b6; border-radius: 50%; }
.week-tab.doing .week-pin { border-color: var(--amber); background: var(--amber); }
.week-tab.done .week-pin { border-color: var(--green); background: var(--green); }

.judgement-strip { display: grid; grid-template-columns: 86px 1fr 330px; align-items: center; gap: 16px; margin: 17px 0; padding: 16px 18px; color: white; background: var(--ink); border-radius: 15px; }
.judgement-strip .label { color: var(--mint); font-size: 10px; font-weight: 900; letter-spacing: .1em; }
.judgement-strip .question { font-size: 15px; font-weight: 750; line-height: 1.45; }
.track-state-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.track-state-controls label { display: grid; grid-template-columns: 7px 1fr; gap: 5px 7px; align-items: center; color: #b9c7cd; font-size: 9px; font-weight: 800; }
.track-state-controls select { grid-column: 1 / -1; padding: 8px 26px 8px 9px; color: white; background: #293b44; border: 1px solid #4a6069; border-radius: 8px; font-size: 10px; }
.state-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--coral); }
.state-dot.site { background: var(--mint); }

.track-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 17px; }
.track-card { position: relative; min-height: 285px; padding: 21px; overflow: hidden; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.track-card::after { content: ""; position: absolute; top: -65px; right: -53px; width: 105px; height: 105px; border: 25px solid var(--coral); border-radius: 50%; }
.track-card.site::after { border-color: var(--mint); border-radius: 26px; transform: rotate(18deg); }
.track-label { display: inline-flex; margin-bottom: 11px; padding: 6px 9px; color: #a83c2e; background: #fff0ec; border-radius: 8px; font-size: 9px; font-weight: 900; letter-spacing: .08em; }
.track-card.site .track-label { color: #126740; background: #e4faed; }
.track-card h3 { margin: 0 0 8px; font-size: 20px; letter-spacing: -.025em; }
.purpose { margin: 0 0 17px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.evidence-list { display: grid; gap: 8px; }
.evidence-item { display: grid; grid-template-columns: 20px 1fr auto; gap: 8px; align-items: start; padding: 9px 10px; background: #faf9f4; border: 1px solid #e7e5dd; border-radius: 9px; font-size: 11px; line-height: 1.45; }
.evidence-item input { width: 15px; height: 15px; margin: 1px 0 0; accent-color: var(--blue); }
.evidence-item em { color: #8a9498; font-size: 8px; font-style: normal; font-weight: 850; white-space: nowrap; }
.evidence-item:has(input:checked) { color: #355e49; background: #f0f7f1; border-color: #cce2d3; }
.evidence-item:has(input:checked) em { color: var(--green); }

.working-grid { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(320px,.65fr); gap: 17px; margin-top: 17px; }
.panel { padding: 21px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 14px; }
.panel h3 { margin: 0 0 5px; font-size: 18px; }
.panel-head p { margin: 0; color: var(--muted); font-size: 10px; }
.editable-badge { padding: 7px 9px; color: #153528; background: var(--mint); border-radius: 99px; font-size: 9px; font-weight: 900; }
.sprint-list { display: grid; gap: 7px; }
.sprint-item { display: grid; grid-template-columns: 17px 65px 1fr 28px; gap: 9px; align-items: center; padding: 9px 10px; background: #f7f6f1; border: 1px solid #e6e4dc; border-radius: 9px; }
.sprint-item input[type="checkbox"] { width: 14px; height: 14px; accent-color: var(--green); }
.task-track { color: var(--blue); font-size: 9px; font-weight: 900; }
.task-track.site { color: var(--green); }
.task-track.shared { color: #8a5c13; }
.task-text { width: 100%; padding: 5px; background: transparent; border: 1px solid transparent; border-radius: 6px; font-size: 11px; }
.task-text:focus { outline: none; border-color: #b6c6ff; background: white; }
.remove-task { width: 25px; height: 25px; padding: 0; color: #8b9498; background: transparent; border: 0; border-radius: 6px; cursor: pointer; }
.remove-task:hover { color: #a9342b; background: #ffe7e2; }
.add-row { display: flex; gap: 7px; margin-top: 9px; }
.add-row select, .add-row input { padding: 9px; background: white; border: 1px solid var(--line); border-radius: 8px; font-size: 11px; }
.add-row input { min-width: 0; flex: 1; }
.context-panel textarea { width: 100%; min-height: 152px; resize: vertical; padding: 12px; color: var(--ink); background: #fbfaf5; border: 1px solid var(--line); border-radius: 10px; font-size: 11px; line-height: 1.6; }
.context-panel textarea:focus { outline: 2px solid rgba(40,103,240,.16); border-color: var(--blue); }
.review-questions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 17px; }
.review-questions div { padding: 12px; border-top: 3px solid var(--ink); background: rgba(255,255,255,.55); font-size: 10px; font-weight: 750; line-height: 1.45; }

.mode-overlay { position: fixed; z-index: 200; inset: 0; display: grid; place-items: center; padding: 24px; background: rgba(12,25,32,.78); backdrop-filter: blur(12px); }
.mode-card { width: min(520px, 100%); padding: 30px; background: var(--card); border: 1px solid rgba(255,255,255,.5); border-radius: 22px; box-shadow: 0 32px 90px rgba(0,0,0,.3); }
.mode-card .brand { margin-bottom: 34px; }
.mode-card h1 { margin: 0; font-size: 35px; letter-spacing: -.045em; }
.mode-lede { margin: 12px 0 24px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.mode-options { display: grid; gap: 10px; }
.mode-option { display: grid; grid-template-columns: 42px 1fr 20px; gap: 12px; align-items: center; width: 100%; padding: 15px; text-align: left; background: #f7f6f1; border: 1px solid var(--line); border-radius: 13px; cursor: pointer; }
.mode-option:hover { border-color: var(--blue); background: white; transform: translateY(-1px); }
.mode-icon { display: grid; place-items: center; width: 42px; height: 42px; color: #14382a; background: var(--mint); border-radius: 12px; font-size: 18px; }
.mode-option.visitor .mode-icon { color: #674a0c; background: #ffe7a7; }
.mode-option strong, .mode-option small { display: block; }
.mode-option strong { margin-bottom: 4px; font-size: 13px; }
.mode-option small { color: var(--muted); font-size: 10px; }
.mode-option i { font-style: normal; color: var(--muted); }
.pin-form label { display: block; margin-bottom: 7px; font-size: 11px; font-weight: 800; }
.pin-form input { width: 100%; padding: 13px; border: 1px solid var(--line); border-radius: 10px; font-size: 18px; letter-spacing: .25em; }
.pin-form input:focus { outline: 2px solid rgba(40,103,240,.16); border-color: var(--blue); }
.form-error { min-height: 18px; margin: 6px 0; color: #b5362b; font-size: 10px; }
.pin-actions { display: flex; justify-content: flex-end; gap: 8px; }
.visitor-entry { width: 100%; margin-top: 12px; padding: 10px; color: var(--muted); background: transparent; border: 0; border-radius: 9px; cursor: pointer; font-size: 11px; font-weight: 750; }
.visitor-entry:hover { color: var(--ink); background: #f5f4ee; }
.visitor-entry:active { transform: scale(.98); }

.visitor-mode .editable-badge { color: #5f4612; background: #ffe7a7; }
.visitor-mode .add-row { display: none; }
.visitor-mode .remove-task { display: none; }

@media (max-width: 1200px) {
  .app-shell { grid-template-columns: 265px minmax(800px, 1fr); }
  .main { padding-left: 26px; padding-right: 26px; }
}
