* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: #dbe0db; color: #172820; font-family: "Avenir Next", Avenir, Inter, ui-sans-serif, system-ui, sans-serif; font-synthesis: none; }
button, select { font: inherit; }
button { cursor: pointer; }
button:focus-visible, select:focus-visible { outline: 3px solid #26a4bf; outline-offset: 2px; }
.review-toolbar { position: sticky; top: 0; z-index: 20; min-height: 72px; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 10px 24px; background: #17241f; color: #eef4ee; box-shadow: 0 3px 12px #14221a22; }
.review-identity { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.review-identity strong { display: block; font-size: 14px; font-weight: 600; letter-spacing: -.02em; }
.review-identity small { display: block; margin-top: 2px; color: #aec3b5; font-size: 11px; }
.review-mark { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 8px; background: #4d9e87; font-size: 18px; }
.review-controls { display: flex; align-items: center; gap: 10px; }
.view-switch { display: flex; padding: 3px; border: 1px solid #4a5e52; border-radius: 10px; background: #27392e; }
.view-switch button { min-height: 33px; min-width: 80px; padding: 6px 11px; border: 0; border-radius: 7px; background: transparent; color: #bdd0c2; font-size: 12px; font-weight: 600; }
.view-switch button[aria-pressed="true"] { background: #f2f5f0; color: #193b2c; }
.review-select { display: flex; align-items: center; gap: 6px; color: #b8cbbd; font-size: 11px; }
.review-select select { min-height: 38px; padding: 5px 23px 5px 9px; border: 1px solid #4a5e52; border-radius: 8px; color: #eef4ee; background: #27392e; font-size: 12px; }
.preview-stage { min-height: calc(100dvh - 72px); display: flex; justify-content: center; align-items: flex-start; padding: 22px; overflow-x: auto; }
.preview-frame { --bg: #f7f5f0; --surface: #fff; --tile: #fbfaf7; --ink: #1c3932; --muted: #60736b; --quiet: #788980; --line: #e1ded4; --sand: #f0e6d5; --sand-ink: #755e40; --accent: #2f705d; --accent-ink: #235744; --accent-soft: #e5eee4; --accent-line: #c9dccb; --badge: #edf3eb; width: min(1280px, 100%); min-height: 790px; flex: none; position: relative; overflow: hidden; border: 1px solid #bbc9bc; border-radius: 17px; background: var(--bg); color: var(--ink); box-shadow: 0 18px 48px #14271924; transition: width .2s ease; }
.preview-frame[data-palette="cobalt"] { --accent: #355f9a; --accent-ink: #2c548b; --accent-soft: #e7eef8; --accent-line: #c8d7eb; --badge: #eef3fb; }
.preview-frame[data-palette="terracotta"] { --accent: #a4553e; --accent-ink: #8b4734; --accent-soft: #f7ebe4; --accent-line: #eacdbd; --badge: #faeee7; }
.preview-frame[data-appearance="dark"] { --bg: #111d1a; --surface: #1d2a26; --tile: #24332e; --ink: #eaf1e9; --muted: #b2c3b6; --quiet: #94aa9b; --line: #34443b; --sand: #403727; --sand-ink: #ead3a7; --accent: #397d65; --accent-ink: #a9e2bb; --accent-soft: #223d32; --accent-line: #39664e; --badge: #284636; }
.preview-frame[data-palette="cobalt"][data-appearance="dark"] { --accent: #3d6aa9; --accent-ink: #bdd4ff; --accent-soft: #21354f; --accent-line: #3c5b86; --badge: #263c59; }
.preview-frame[data-palette="terracotta"][data-appearance="dark"] { --accent: #a95a42; --accent-ink: #ffd5bd; --accent-soft: #493228; --accent-line: #7a4b39; --badge: #4b3229; }
.preview-frame[data-view="mobile"] { width: 390px; height: 844px; min-height: 844px; border-radius: 27px; }
.app-shell { min-height: 790px; background: var(--bg); }
.app-topbar { height: 68px; padding: 0 27px; display: flex; align-items: center; gap: 25px; border-bottom: 1px solid var(--line); background: var(--surface); }
.brand { display: flex; align-items: center; gap: 9px; font-size: 19px; font-weight: 600; letter-spacing: -.035em; white-space: nowrap; }
.brand-mark { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; background: var(--accent); color: #fff; font-weight: 500; }
.app-nav { display: flex; gap: 4px; margin-left: 35px; }
.app-nav button { min-height: 38px; padding: 7px 14px; border: 0; border-radius: 8px; color: var(--muted); background: transparent; font-size: 13px; font-weight: 600; }
.app-nav button[aria-current="page"] { color: var(--accent-ink); background: var(--accent-soft); }
.app-nav button:hover { color: var(--accent-ink); }
.top-spacer { flex: 1; }
.demo-chip { padding: 7px 10px; border-radius: 999px; color: var(--sand-ink); background: var(--sand); font-size: 10px; font-weight: 700; letter-spacing: .035em; white-space: nowrap; }
.avatar { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 50%; color: var(--sand-ink); background: var(--sand); font-size: 13px; }
.content { padding: 26px 28px 30px; }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.eyebrow { color: var(--accent-ink); font-size: 11px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin: 6px 0 5px; font-size: 34px; line-height: 1.15; font-weight: 500; letter-spacing: -.04em; }
.page-heading p { margin: 0; color: var(--muted); font-size: 14px; }
.snapshot { color: var(--quiet); font-size: 11px; text-align: right; line-height: 1.4; }
.page-actions { display: flex; align-items: center; gap: 8px; }
.ghost-button { min-height: 38px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 9px; color: var(--accent-ink); background: var(--surface); font-size: 12px; font-weight: 600; }
.ghost-button:hover { border-color: var(--accent-line); }
.summary-strip { display: flex; gap: 9px; margin-bottom: 17px; }
.summary-pill { min-width: 120px; padding: 9px 13px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); }
.summary-pill strong { display: inline; margin-right: 6px; font-size: 21px; font-weight: 600; }
.summary-pill span { color: var(--muted); font-size: 11px; }
.focus-grid { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(330px, .88fr); grid-template-areas: "main todo" "main handoff" "state state"; gap: 13px; }
.focus-card, .support-card { min-width: 0; border-radius: 18px; }
.focus-card { grid-area: main; padding: 22px 23px; background: var(--accent-soft); border: 1px solid var(--accent-line); }
.support-card { padding: 17px 18px; background: var(--surface); border: 1px solid var(--line); }
.focus-card h2 { margin: 0; font-size: 23px; font-weight: 500; letter-spacing: -.03em; line-height: 1.2; }
.focus-card .card-intro { margin: 5px 0 15px; color: var(--muted); font-size: 12px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 11px; }
.card-head h3 { margin: 0; font-size: 18px; font-weight: 500; letter-spacing: -.02em; }
.card-head small { color: var(--accent-ink); font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; }
.sub-tabs { display: none; }
.support-card[data-slot="todo"] { grid-area: todo; }
.support-card[data-slot="handoff"] { grid-area: handoff; }
.support-card[data-slot="state"] { grid-area: state; }
.work-row { width: 100%; min-height: 74px; display: flex; align-items: flex-start; gap: 12px; padding: 10px 0; border: 0; border-top: 1px solid var(--accent-line); background: transparent; color: var(--ink); text-align: left; }
.work-row:first-of-type { border-top: 0; }
.work-row:hover .work-title, .mini-row:hover .mini-title { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; }
.work-date { flex: none; width: 65px; padding-top: 2px; color: var(--quiet); font-size: 10px; line-height: 1.3; }
.work-copy { flex: 1; min-width: 0; }
.work-title, .mini-title { display: block; font-size: 14px; font-weight: 600; line-height: 1.25; }
.work-meta { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; line-height: 1.3; }
.status { flex: none; display: inline-flex; align-items: center; min-height: 22px; padding: 3px 7px; border-radius: 999px; color: var(--accent-ink); background: var(--badge); font-size: 10px; font-weight: 600; white-space: nowrap; }
.status.half { color: var(--sand-ink); background: var(--sand); }
.status.done { color: var(--accent-ink); background: var(--badge); }
.status.handed { color: #57618a; background: #e8e9f3; }
[data-appearance="dark"] .status.handed { color: #d5dafa; background: #323950; }
.mini-list { display: grid; }
.mini-row { width: 100%; min-height: 52px; display: flex; align-items: center; gap: 10px; padding: 9px 0; border: 0; border-top: 1px solid var(--line); background: transparent; color: var(--ink); text-align: left; }
.mini-row:first-child { border-top: 0; }
.task-open { min-width: 0; flex: 1; display: flex; align-items: center; gap: 8px; align-self: stretch; padding: 0; border: 0; background: transparent; color: inherit; text-align: left; }
.task-quick { flex: none; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 9px; background: var(--tile); color: var(--accent-ink); font-size: 16px; font-weight: 700; cursor: pointer; }
.task-quick:hover { border-color: var(--accent-ink); background: var(--badge); }
.mini-number { flex: none; width: 25px; height: 25px; display: grid; place-items: center; border-radius: 7px; color: var(--sand-ink); background: var(--sand); font-size: 10px; font-weight: 600; }
.mini-copy { min-width: 0; flex: 1; }
.mini-title { font-size: 12px; }
.mini-meta { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; line-height: 1.3; }
.mini-chevron { color: var(--accent-ink); font-size: 17px; }
.state-pair { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.state-item { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--tile); color: var(--ink); font: inherit; text-align: left; }
button.state-item { cursor: pointer; }
button.state-item:hover { border-color: var(--accent-ink); }
.state-item .mini-copy { min-width: 0; }
.state-item .mini-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.empty-note { color: var(--muted); font-size: 12px; line-height: 1.4; }
.project-directory { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; }
.project-card { min-height: 175px; padding: 17px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--ink); text-align: left; }
.project-card:hover { border-color: var(--accent-line); background: var(--tile); }
.project-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.project-mark { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 9px; color: #182c28; font-size: 13px; font-weight: 600; }
.project-card h2 { margin: 23px 0 5px; font-size: 18px; font-weight: 600; letter-spacing: -.02em; }
.project-card p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.4; }
.project-card-foot { display: flex; justify-content: space-between; gap: 10px; margin-top: 18px; color: var(--accent-ink); font-size: 11px; font-weight: 600; }
.focus-title { margin: 13px 0 9px; font-size: 25px; font-weight: 500; line-height: 1.2; letter-spacing: -.035em; }
.focus-description { color: var(--muted); font-size: 13px; line-height: 1.5; max-width: 580px; }
.focus-footer { display: flex; align-items: center; gap: 9px; margin-top: 20px; flex-wrap: wrap; }
.primary-button, .secondary-button { min-height: 41px; padding: 9px 14px; border-radius: 10px; font-size: 12px; font-weight: 600; }
.primary-button { color: #fff; background: var(--accent); border: 1px solid var(--accent); }
.primary-button:hover { filter: brightness(.92); }
.secondary-button { color: var(--accent-ink); background: var(--surface); border: 1px solid var(--accent-line); }
.secondary-button:hover { background: var(--tile); }
.primary-button:disabled, .secondary-button:disabled { opacity: .5; cursor: not-allowed; }
.source-line { color: var(--quiet); font-size: 10px; margin-top: 11px; }
.back-link { padding: 0; border: 0; background: transparent; color: var(--accent-ink); font-size: 12px; font-weight: 600; }
.mobile-nav { display: none; }
.sheet-backdrop { position: absolute; inset: 0; z-index: 8; display: flex; align-items: center; justify-content: center; padding: 15px; background: #10231ba8; }
.sheet { width: min(460px,100%); padding: 19px; border: 1px solid var(--line); border-radius: 17px; background: var(--surface); box-shadow: 0 20px 46px #12231c44; }
.sheet-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sheet-top small { color: var(--accent-ink); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; }
.icon-button { width: 32px; height: 32px; border: 0; border-radius: 8px; background: var(--tile); color: var(--muted); font-size: 21px; }
.sheet h2 { margin: 12px 0 6px; font-size: 23px; font-weight: 500; letter-spacing: -.03em; }
.sheet p { color: var(--muted); font-size: 13px; line-height: 1.5; }
.source-box { margin: 13px 0; padding: 11px; border-radius: 9px; background: var(--tile); color: var(--muted); font-size: 11px; line-height: 1.4; }
.sheet-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.sheet-actions button { flex: 1; }
.handoff-preview { margin-top: 12px; padding: 11px; border: 1px solid var(--accent-line); border-radius: 9px; background: var(--accent-soft); color: var(--ink); font-size: 11px; line-height: 1.5; }
.toast { position: absolute; z-index: 10; left: 50%; bottom: 18px; transform: translateX(-50%); display: flex; align-items: center; gap: 20px; max-width: calc(100% - 20px); padding: 10px 13px; border-radius: 10px; color: white; background: #16372b; box-shadow: 0 8px 30px #0f2b2455; white-space: nowrap; font-size: 11px; }
.toast button { border: 0; background: transparent; color: #b4efcd; font-size: 11px; font-weight: 700; }
.preview-frame[data-view="mobile"] .app-shell { height: 844px; min-height: 844px; display: flex; flex-direction: column; }
.preview-frame[data-view="mobile"] .app-topbar { height: 55px; flex: none; padding: 0 15px; gap: 9px; }
.preview-frame[data-view="mobile"] .brand { font-size: 17px; }
.preview-frame[data-view="mobile"] .brand-mark { width: 28px; height: 28px; }
.preview-frame[data-view="mobile"] .app-nav, .preview-frame[data-view="mobile"] .avatar { display: none; }
.preview-frame[data-view="mobile"] .demo-chip { padding: 5px 8px; font-size: 8px; }
.preview-frame[data-view="mobile"] .content { flex: 1; overflow-y: auto; scrollbar-width: none; padding: 15px 15px 16px; }
.preview-frame[data-view="mobile"] .content::-webkit-scrollbar { display: none; }
.preview-frame[data-view="mobile"] .page-heading { display: block; margin-bottom: 12px; }
.preview-frame[data-view="mobile"] .eyebrow { font-size: 9px; }
.preview-frame[data-view="mobile"] h1 { margin: 4px 0 4px; font-size: 25px; }
.preview-frame[data-view="mobile"] .page-heading p { font-size: 11px; }
.preview-frame[data-view="mobile"] .snapshot { display: none; }
.preview-frame[data-view="mobile"] .summary-strip { gap: 5px; margin-bottom: 10px; }
.preview-frame[data-view="mobile"] .summary-pill { min-width: 0; flex: 1; padding: 7px 8px; }
.preview-frame[data-view="mobile"] .summary-pill strong { display: block; margin: 0; font-size: 18px; }
.preview-frame[data-view="mobile"] .summary-pill span { font-size: 9px; }
.preview-frame[data-view="mobile"] .focus-grid { display: block; }
.preview-frame[data-view="mobile"] .focus-card { padding: 13px 14px; border-radius: 15px; }
.preview-frame[data-view="mobile"] .focus-card h2 { font-size: 19px; }
.preview-frame[data-view="mobile"] .focus-card .card-intro { font-size: 10px; margin: 3px 0 9px; }
.preview-frame[data-view="mobile"] .work-row { min-height: 59px; padding: 7px 0; gap: 7px; }
.preview-frame[data-view="mobile"] .work-date { width: 44px; font-size: 9px; }
.preview-frame[data-view="mobile"] .work-title { font-size: 11px; }
.preview-frame[data-view="mobile"] .work-meta { margin-top: 3px; font-size: 9px; }
.preview-frame[data-view="mobile"] .status { min-height: 18px; padding: 2px 5px; font-size: 8px; }
.preview-frame[data-view="mobile"] .sub-tabs { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 3px; margin: 10px 0 8px; padding: 3px; border-radius: 10px; background: var(--line); }
.preview-frame[data-view="mobile"] .sub-tabs button { min-height: 36px; padding: 5px 4px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-size: 10px; font-weight: 600; }
.preview-frame[data-view="mobile"] .sub-tabs button[aria-selected="true"] { background: var(--surface); color: var(--accent-ink); box-shadow: 0 1px 4px #182b1c15; }
.preview-frame[data-view="mobile"] .support-card { display: none; padding: 12px; border-radius: 13px; }
.preview-frame[data-view="mobile"] .support-card.active { display: block; }
.preview-frame[data-view="mobile"] .card-head { margin-bottom: 7px; }
.preview-frame[data-view="mobile"] .card-head h3 { font-size: 15px; }
.preview-frame[data-view="mobile"] .card-head small { font-size: 9px; }
.preview-frame[data-view="mobile"] .mini-row { min-height: 47px; padding: 6px 0; }
.preview-frame[data-view="mobile"] .mini-title { font-size: 11px; }
.preview-frame[data-view="mobile"] .mini-meta { font-size: 9px; }
.preview-frame[data-view="mobile"] .state-pair { grid-template-columns: 1fr; gap: 6px; }
.preview-frame[data-view="mobile"] .state-item { padding: 7px 9px; }
.preview-frame[data-view="mobile"] .mobile-nav { height: 59px; flex: none; display: grid; grid-template-columns: repeat(3,1fr); border-top: 1px solid var(--line); background: var(--surface); }
.preview-frame[data-view="mobile"] .mobile-nav button { border: 0; background: transparent; color: var(--muted); font-size: 11px; font-weight: 600; }
.preview-frame[data-view="mobile"] .mobile-nav button[aria-current="page"] { color: var(--accent-ink); background: var(--accent-soft); }
.preview-frame[data-view="mobile"] .project-directory { grid-template-columns: 1fr; gap: 8px; }
.preview-frame[data-view="mobile"] .project-card { min-height: 103px; padding: 11px 13px; }
.preview-frame[data-view="mobile"] .project-card h2 { margin: 7px 0 3px; font-size: 15px; }
.preview-frame[data-view="mobile"] .project-card p { font-size: 10px; }
.preview-frame[data-view="mobile"] .project-card-foot { margin-top: 9px; font-size: 10px; }
.preview-frame[data-view="mobile"] .focus-title { margin: 8px 0 5px; font-size: 20px; }
.preview-frame[data-view="mobile"] .focus-description { font-size: 11px; line-height: 1.35; margin: 0; }
.preview-frame[data-view="mobile"] .focus-footer { margin-top: 10px; }
.preview-frame[data-view="mobile"] .primary-button, .preview-frame[data-view="mobile"] .secondary-button { min-height: 38px; font-size: 11px; }
.preview-frame[data-view="mobile"] .source-line { margin-top: 7px; font-size: 9px; }
.preview-frame[data-view="mobile"] .sheet-backdrop { align-items: end; padding: 0; }
.preview-frame[data-view="mobile"] .sheet { width: 100%; border-radius: 16px 16px 0 0; }
@media (max-width: 700px) {
  .review-toolbar { position: static; flex-wrap: wrap; justify-content: center; padding: 10px; }
  .review-identity { width: 100%; justify-content: center; }
  .review-controls { justify-content: center; flex-wrap: wrap; }
  .preview-stage { justify-content: flex-start; padding: 12px; }
  .preview-frame[data-view="desktop"] { width: 980px; }
  .preview-frame[data-view="mobile"] { width: min(390px, calc(100vw - 24px)); }
}
@media (prefers-reduced-motion: reduce) { .preview-frame { transition: none; } }
