:root {
  color-scheme: light;
  --bg: #f7f8fa;
  --surface: #fff;
  --nav: #f4f6f8;
  --ink: #1d2530;
  --ink-soft: #364354;
  --muted: #566375;
  --line: #d8dfe7;
  --line-strong: #8491a1;
  --accent: #2459c5;
  --accent-dark: #19449c;
  --accent-soft: #eaf1ff;
  --green: #23694b;
  --green-soft: #e8f4ed;
  --red: #a4333d;
  --red-soft: #fbecee;
  --amber: #81591d;
  --amber-soft: #f9f1e1;
  --radius: 11px;
  --shadow: 0 18px 55px rgb(27 39 55 / 14%);
}
* { box-sizing: border-box; }
html, body { min-width: 0; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif; }
body.drawer-open { overflow: hidden; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .58; }
a { color: var(--accent-dark); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.skip-link { position: fixed; top: -60px; left: 12px; z-index: 100; padding: 10px 14px; background: var(--ink); color: #fff; border-radius: 6px; }
.skip-link:focus { top: 10px; }
h1, h2, h3, h4, p { margin: 0; }

.app-shell { display: grid; grid-template-columns: 220px minmax(0, 1fr); max-width: 1900px; min-height: 100vh; margin: 0 auto; }
.workspace-nav { display: flex; flex-direction: column; min-width: 0; min-height: 100vh; padding: 22px 12px; border-right: 1px solid var(--line); background: var(--nav); }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 11px 30px; }
.brand-mark { display: grid; grid-template-columns: repeat(3, 4px); align-items: end; justify-content: center; gap: 3px; width: 32px; height: 32px; flex: none; padding: 7px; border-radius: 9px; background: var(--accent); }
.brand-mark span { background: #fff; border-radius: 2px; }
.brand-mark span:nth-child(1) { height: 9px; }
.brand-mark span:nth-child(2) { height: 14px; }
.brand-mark span:nth-child(3) { height: 18px; }
.brand-name, .brand-sub { display: block; line-height: 1.14; }
.brand-name { font-size: 16px; font-weight: 700; letter-spacing: -.035em; }
.brand-sub { margin-top: 3px; color: var(--muted); font-size: 11px; }
.project-switcher { display: grid; gap: 5px; margin: 0 5px 15px; }
.project-switcher label { color: var(--muted); font-size: 11px; font-weight: 700; }
.project-switcher select { min-width: 0; background: var(--surface); font-size: 12px; font-weight: 700; }
.project-type { width: fit-content; padding: 3px 7px; border: 1px solid var(--line); border-radius: 5px; color: var(--ink-soft); font-size: 10px; font-weight: 700; }
.project-nav { display: grid; gap: 4px; margin: 0 0 15px; padding-bottom: 13px; border-bottom: 1px solid var(--line); }
.project-nav-button { display: grid; align-content: center; gap: 2px; min-height: 48px; padding: 8px 11px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--ink-soft); text-align: left; }
.project-nav-button:hover { background: #e9edf3; }
.project-nav-button.is-active { border-color: #cfddf7; background: var(--accent-soft); color: var(--accent-dark); }
.project-nav-button span { font-size: 12px; font-weight: 750; line-height: 1.2; }
.project-nav-button small { color: var(--muted); font-size: 10px; }
.nav-section-label, .nav-footer-kicker { color: var(--muted); font-size: 11px; font-weight: 700; }
.nav-section-label { padding: 0 12px 8px; }
.quick-nav { display: grid; gap: 3px; }
.quick-view { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--ink-soft); text-align: left; font-size: 13px; font-weight: 600; }
.quick-view:hover { background: #e9edf3; }
.quick-view.is-active { background: var(--accent-soft); color: var(--accent-dark); }
.quick-view strong { font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; }
.nav-footer { margin-top: auto; padding: 19px 12px 0; border-top: 1px solid var(--line); }
.nav-footer p { margin: 7px 0 14px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.memory-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: 12px; font-weight: 700; text-underline-offset: 3px; }

.main-content { min-width: 0; padding: 0 clamp(20px, 2.8vw, 44px) 64px; }
.utility-bar { display: flex; justify-content: space-between; align-items: center; gap: 15px; min-height: 54px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.utility-breadcrumb { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.utility-breadcrumb span { padding: 0 6px; color: var(--muted); }
.utility-right { display: flex; align-items: center; gap: 10px; min-width: 0; }
.user-label { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-soft); font-size: 11px; }
.icon-button { display: inline-grid; place-items: center; width: 44px; height: 44px; flex: none; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink-soft); font-size: 23px; line-height: 1; }
.icon-button:hover { border-color: var(--accent); color: var(--accent); }
.signout-button { min-height: 44px; padding: 7px 5px; border: 0; background: transparent; color: var(--muted); font-size: 12px; font-weight: 600; white-space: nowrap; }
.signout-button:hover { color: var(--accent-dark); text-decoration: underline; text-underline-offset: 3px; }
.page-intro { display: flex; align-items: center; justify-content: space-between; gap: 26px; padding: 21px 0 19px; }
.intro-text { min-width: 0; }
.eyebrow { color: var(--accent-dark); font-size: 11px; font-weight: 700; letter-spacing: .04em; }
h1 { margin: 3px 0 4px; font-size: clamp(30px, 2.8vw, 39px); font-weight: 720; line-height: 1.1; letter-spacing: -.045em; }
.project-title-button { padding: 0; border: 0; border-radius: 4px; background: transparent; color: inherit; text-align: left; font: inherit; letter-spacing: inherit; }
.project-title-button:not(:disabled):hover { color: var(--accent-dark); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }
.project-title-button:disabled { cursor: default; opacity: 1; }
.intro-subtitle { color: var(--muted); font-size: 12px; }
.target-card { display: grid; gap: 2px; flex: none; min-width: 235px; padding: 8px 13px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--ink); text-align: left; }
.target-card:hover { border-color: var(--accent); background: #f9fbff; }
.target-kicker { color: var(--muted); font-size: 10px; font-weight: 700; }
.target-card strong { font-size: 15px; font-weight: 700; letter-spacing: -.02em; }
.target-card > span:last-child { color: var(--muted); font-size: 10px; }

.auth-card { display: grid; grid-template-columns: minmax(0, .85fr) minmax(280px, 1fr); align-items: center; gap: 40px; max-width: 850px; min-height: 240px; margin-top: 28px; padding: 32px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); box-shadow: 0 8px 24px rgb(27 39 55 / 5%); }
.auth-copy h2 { margin: 6px 0 10px; font-size: 26px; line-height: 1.15; letter-spacing: -.035em; }
.auth-copy p:last-of-type { max-width: 390px; color: var(--muted); font-size: 13px; }
.auth-followup { margin-top: 14px; }
.auth-form { min-width: 0; }
.auth-form label { display: block; margin: 0 0 5px; color: var(--ink-soft); font-size: 12px; font-weight: 650; }
.auth-form > input { margin-bottom: 13px; }
.auth-input-row { display: flex; gap: 8px; }
.auth-input-row input { min-width: 0; flex: 1; }
.form-message { min-height: 19px; margin-top: 9px; color: var(--red); font-size: 12px; font-weight: 650; }
.primary-button, .secondary-button { min-height: 44px; padding: 10px 15px; border: 1px solid var(--accent); border-radius: 8px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; white-space: nowrap; }
.primary-button:hover { border-color: var(--accent-dark); background: var(--accent-dark); }
.secondary-button { border-color: var(--line-strong); background: var(--surface); color: var(--ink-soft); }
.secondary-button:hover { border-color: var(--accent); color: var(--accent-dark); background: var(--accent-soft); }
input, select, textarea { width: 100%; min-height: 44px; padding: 9px 11px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); color: var(--ink); }
input::placeholder, textarea::placeholder { color: #697789; }
textarea { resize: vertical; }

.overview { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 9px; margin-bottom: 18px; }
.overview-stat { display: grid; gap: 1px; min-width: 0; padding: 11px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.overview-stat > span { color: var(--ink-soft); font-size: 11px; font-weight: 650; }
.overview-stat strong { font-size: 25px; font-weight: 700; line-height: 1.1; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.overview-stat small { color: var(--muted); font-size: 10px; }
.list-section { min-width: 0; }
.list-heading { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 13px; }
.list-heading h2 { margin: 2px 0 3px; font-size: 23px; line-height: 1.1; letter-spacing: -.035em; }
.section-subtitle { color: var(--muted); font-size: 12px; }
.register-context { margin-top: 3px; color: var(--ink-soft); font-size: 11px; }
.list-meta { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 11px; white-space: nowrap; }
.count-pill { padding: 5px 9px; border: 1px solid var(--line); border-radius: 7px; color: var(--ink-soft); font-weight: 650; }
.view-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; min-height: 41px; margin-bottom: 12px; }
.segmented-control { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: 9px; background: #ebeff3; }
.segment { min-width: 82px; min-height: 44px; padding: 7px 13px; border: 0; border-radius: 6px; background: transparent; color: var(--ink-soft); font-size: 12px; font-weight: 650; }
.segment.is-active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 4px rgb(27 39 55 / 12%); }
#viewHint { color: var(--muted); font-size: 11px; }
.filters-panel { min-width: 0; }
.filters-panel > summary { display: none; }
.toolbar { display: grid; grid-template-columns: minmax(180px, 1.8fr) repeat(6, minmax(100px, 1fr)); gap: 9px; align-items: end; margin-bottom: 11px; }
.search-field { grid-column: auto; }
.toolbar label { display: block; margin-bottom: 4px; color: var(--ink-soft); font-size: 11px; font-weight: 650; }
.toolbar input, .toolbar select { min-width: 0; font-size: 12px; }
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 17px; padding: 0 0 9px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--line-strong); }
.source-dot { background: var(--accent); }
.fresh-dot { background: var(--green); }
.stale-dot { background: var(--amber); }
.list-message { display: grid; align-content: center; justify-items: start; gap: 4px; min-height: 138px; margin-top: 12px; padding: 22px; border: 1px dashed var(--line-strong); border-radius: var(--radius); background: var(--surface); color: var(--muted); font-size: 13px; }
.list-message strong { color: var(--ink); font-size: 17px; }
.list-message button { margin-top: 9px; }
.work-list { min-width: 0; }
.list-column-head, .work-row { display: grid; grid-template-columns: minmax(0, 3fr) minmax(105px, 1.2fr) 108px 114px 135px; align-items: center; gap: 10px; }
.list-column-head { min-height: 33px; border-bottom: 1px solid var(--line-strong); color: var(--muted); font-size: 10px; font-weight: 700; }
.work-row { min-height: 66px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.work-row:hover { background: rgb(255 255 255 / 80%); }
.row-main, .row-cell { min-width: 0; }
.row-open { display: block; width: 100%; min-height: 44px; padding: 4px 2px; border: 0; border-radius: 4px; background: transparent; color: var(--ink); text-align: left; font-size: 12px; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.row-open:hover { color: var(--accent-dark); text-decoration: underline; text-underline-offset: 3px; }
.row-info { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: -2px; color: var(--muted); font-size: 10px; overflow-wrap: anywhere; }
.kind-label { color: var(--accent-dark); font-weight: 700; }
.row-cell { display: flex; flex-direction: column; align-items: start; gap: 2px; font-size: 11px; overflow-wrap: anywhere; }
.row-cell strong { font-weight: 700; }
.row-cell small { color: var(--muted); font-size: 10px; }
.row-cell .owner-source, .row-cell .source-date { color: var(--accent-dark); }
.row-cell .overdue-date, .row-cell .overdue-note { color: var(--red); }
.row-cell .due-note { color: var(--amber); }
.row-cell .not-scheduled { color: var(--amber); font-weight: 700; }
.muted { color: var(--muted); }
.mobile-cell-label { display: none; }
.badge, .freshness { display: inline-flex; align-items: center; max-width: 100%; min-height: 24px; padding: 3px 7px; border-radius: 6px; font-size: 10px; font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; }
.badge { background: #edf0f4; color: #465265; }
.status-not_started { background: #ecf0f5; color: #465265; }
.status-blocked { background: var(--red-soft); color: var(--red); }
.status-in_progress { background: var(--accent-soft); color: var(--accent-dark); }
.status-reported_done, .status-verified_done { background: var(--green-soft); color: var(--green); }
.status-confirmation_requested { background: var(--amber-soft); color: var(--amber); }
.status-not_required { background: #edf0f4; color: var(--muted); }
.freshness { gap: 5px; color: var(--amber); }
.freshness::before { content: ""; width: 6px; height: 6px; flex: none; border-radius: 50%; background: currentColor; }
.freshness-current { color: var(--green); }
.freshness-stale { color: var(--amber); }
.attention-badge { display: inline-flex; max-width: 100%; padding: 3px 6px; border: 1px solid #d9a4aa; border-radius: 5px; background: var(--red-soft); color: var(--red); font-size: 10px; font-weight: 750; line-height: 1.2; overflow-wrap: anywhere; }
.work-group { margin-top: 16px; }
.group-heading { display: flex; align-items: center; gap: 10px; min-height: 35px; border-bottom: 1px solid var(--line-strong); font-size: 14px; font-weight: 700; overflow-wrap: anywhere; }
.group-count { padding: 2px 7px; border-radius: 6px; background: #e8edf3; color: var(--ink-soft); font-size: 10px; }

.timeline-view { min-width: 0; padding-top: 10px; }
.timeline-key { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 15px; margin-bottom: 10px; color: var(--ink-soft); font-size: 11px; }
.key-heading { color: var(--ink); font-size: 11px; }
.timeline-key span { display: inline-flex; align-items: center; gap: 6px; }
.key-swatch { display: inline-block; width: 18px; height: 11px; flex: none; border-radius: 3px; }
.key-red { background: var(--red); }
.key-blue { background: var(--accent); }
.key-outline { border: 2px solid #667588; background: #f0f3f7; }
.key-green { background: var(--green); }
.key-grey { background: #8294aa; }
.key-amber { background: var(--amber-soft); border: 1px solid var(--amber); }
.timeline-summary { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 13px; margin-bottom: 10px; color: var(--muted); font-size: 11px; }
.timeline-summary strong { color: var(--ink); font-size: 12px; }
.summary-undated { padding: 3px 7px; border-radius: 5px; background: var(--amber-soft); color: var(--amber); font-weight: 700; }
.summary-critical { padding: 3px 7px; border-radius: 5px; background: var(--red-soft); color: var(--red); font-weight: 700; }
.timeline-summary-rule { margin-left: auto; }
.timeline-scroll { max-width: 100%; max-height: 540px; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); scrollbar-color: var(--line-strong) transparent; }
.timeline-canvas { width: max-content; min-width: 100%; }
.timeline-axis, .timeline-row, .timeline-group, .timeline-project-row, .timeline-more-row { display: grid; grid-template-columns: 260px max-content; align-items: stretch; }
.timeline-axis { min-height: 49px; border-bottom: 1px solid var(--line-strong); }
.timeline-project-row { min-height: 66px; border-bottom: 2px solid #a8c1ef; background: #f7faff; }
.timeline-project-row .timeline-label-column { background: #f7faff; }
.timeline-project-name { align-self: stretch; min-height: 44px; padding: 0; border: 0; border-radius: 4px; background: transparent; color: var(--ink); text-align: left; font-size: 12px; font-weight: 750; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.timeline-project-name:hover { color: var(--accent-dark); text-decoration: underline; }
.timeline-project-row .timeline-label-column small { color: var(--muted); font-size: 10px; }
.timeline-row { min-height: 64px; border-bottom: 1px solid var(--line); }
.timeline-row:last-child { border-bottom: 0; }
.timeline-row:hover .timeline-label-column { background: #f9fbfd; }
.timeline-label-column { position: sticky; left: 0; z-index: 3; display: flex; flex-direction: column; justify-content: center; min-width: 0; padding: 6px 12px; border-right: 1px solid var(--line); background: var(--surface); }
.timeline-axis > .timeline-label-column { color: var(--muted); font-size: 10px; font-weight: 700; }
.timeline-item-label { display: block; width: 100%; min-height: 44px; padding: 0; border: 0; background: transparent; color: var(--ink); text-align: left; font-size: 11px; font-weight: 700; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.timeline-item-label:hover { color: var(--accent-dark); text-decoration: underline; }
.timeline-item-meta { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.timeline-no-dates { align-self: flex-start; margin-top: 3px; padding: 2px 5px; border: 1px solid #e5c890; border-radius: 4px; background: var(--amber-soft); color: var(--amber); font-size: 9px; font-weight: 750; white-space: nowrap; }
.timeline-no-dates.is-closed { border-color: var(--line); background: #f0f3f6; color: var(--muted); }
.timeline-track { position: relative; flex: none; min-height: 100%; background: repeating-linear-gradient(to right, transparent 0, transparent calc(var(--day-width) - 1px), #eef1f5 calc(var(--day-width) - 1px), #eef1f5 var(--day-width)); }
.timeline-target-band { position: absolute; top: 0; bottom: 0; z-index: 0; background: rgb(36 89 197 / 9%); }
.timeline-today-line { position: absolute; top: 0; bottom: 0; z-index: 2; width: 2px; background: var(--ink-soft); }
.timeline-tick, .timeline-target-label, .timeline-today-label { position: absolute; top: 4px; z-index: 3; padding-left: 3px; color: var(--muted); font-size: 10px; white-space: nowrap; }
.timeline-target-label { top: 24px; color: var(--accent-dark); font-weight: 700; }
.timeline-today-label { top: 24px; color: var(--ink-soft); font-weight: 700; }
.timeline-project-window { position: absolute; top: 20px; z-index: 1; display: grid; place-items: center; height: 25px; overflow: hidden; border: 1px dashed var(--accent-dark); border-radius: 5px; background: #dce9ff; color: var(--accent-dark); font-size: 9px; font-weight: 750; white-space: nowrap; }
.timeline-project-window:hover { border-style: solid; background: #c7dbff; }
.timeline-project-window:focus-visible { outline-offset: 3px; }
.timeline-date-hit { position: absolute; top: 6px; z-index: 4; display: flex; align-items: center; min-width: 44px; height: 44px; padding: 0; border: 0; border-radius: 6px; background: transparent; }
.timeline-date-hit:hover .timeline-bar { filter: brightness(.86); }
.timeline-date-hit:focus-visible { outline-offset: 1px; }
.timeline-bar { position: absolute; top: 19px; z-index: 1; height: 19px; border-radius: 5px; background: var(--accent); }
.timeline-date-hit .timeline-bar { position: static; flex: none; }
.timeline-bar.status-not_started { border: 2px solid #667588; background: #f0f3f7; }
.timeline-bar.status-blocked { background: var(--red); }
.timeline-bar.status-verified_done { background: var(--green); }
.timeline-bar.status-reported_done { border: 2px dashed var(--green); background: var(--green-soft); }
.timeline-bar.status-not_required { border: 1px solid var(--line-strong); background: #e8edf3; }
.timeline-bar.status-unknown, .timeline-bar.status-confirmation_requested { background: #8294aa; }
.timeline-bar.is-urgent { border: 0; background: var(--red); }
.timeline-start-marker { position: absolute; top: 18px; z-index: 1; width: 6px; height: 22px; border-radius: 3px; background: var(--accent); }
.timeline-marker-hit { justify-content: center; width: 44px; }
.timeline-marker-hit .timeline-start-marker, .timeline-marker-hit .timeline-due-marker { position: static; flex: none; }
.timeline-marker-hit:hover .timeline-start-marker { width: 9px; }
.timeline-marker-hit:hover .timeline-due-marker { background: var(--accent-soft); }
.timeline-start-marker.is-urgent { background: var(--red); }
.timeline-due-marker { position: absolute; top: 20px; z-index: 1; width: 15px; height: 15px; transform: translateX(-7px) rotate(45deg); border: 2px solid var(--accent-dark); background: var(--surface); }
.timeline-marker-hit .timeline-due-marker { transform: rotate(45deg); }
.timeline-due-marker.is-urgent { border-color: var(--red); background: var(--red-soft); }
.timeline-group { min-height: 62px; color: var(--ink-soft); font-size: 11px; font-weight: 700; }
.timeline-group .timeline-label-column { background: #f0f3f7; }
.timeline-group-toggle { display: flex; align-items: center; gap: 5px; min-height: 44px; width: 100%; padding: 0; border: 0; border-radius: 4px; background: transparent; color: var(--ink-soft); text-align: left; }
.timeline-group-toggle:hover { color: var(--accent-dark); }
.timeline-group-toggle strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.timeline-chevron { display: inline-block; flex: none; width: 15px; color: var(--accent-dark); font-size: 20px; line-height: 1; transform: rotate(-90deg); transition: transform .15s ease; }
.timeline-group-toggle[aria-expanded="true"] .timeline-chevron { transform: rotate(0); }
.timeline-group .timeline-label-column small { color: var(--muted); font-size: 10px; font-weight: 450; }
.group-flags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.group-flags b { padding: 2px 5px; border-radius: 4px; font-size: 9px; font-weight: 700; }
.group-critical { background: var(--red-soft); color: var(--red); }
.group-undated { background: var(--amber-soft); color: var(--amber); }
.timeline-group .timeline-track { background-color: #f0f3f7; }
.timeline-more-row { min-height: 52px; border-bottom: 1px solid var(--line); background: #fbfcfd; }
.timeline-more-button { min-height: 44px; padding: 0 3px; border: 0; border-radius: 4px; background: transparent; color: var(--accent-dark); text-align: left; font-size: 11px; font-weight: 700; }
.timeline-more-button:hover { text-decoration: underline; text-underline-offset: 3px; }
.timeline-empty { position: sticky; left: 0; width: 260px; padding: 17px 12px; color: var(--muted); font-size: 12px; }
.unscheduled { margin-top: 18px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.unscheduled-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.unscheduled-heading h3 { font-size: 14px; }
.unscheduled-heading span { color: var(--muted); font-size: 11px; }
.unscheduled > p { margin: 3px 0 11px; color: var(--muted); font-size: 11px; }
.unscheduled-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px 12px; }
.unscheduled-item { display: grid; justify-items: start; align-content: center; gap: 3px; min-width: 0; min-height: 44px; padding: 7px 9px; border: 1px solid var(--line); border-left: 3px solid var(--amber); border-radius: 7px; background: var(--surface); color: var(--ink); text-align: left; font-size: 11px; font-weight: 650; overflow-wrap: anywhere; }
.unscheduled-item.is-closed { border-left-color: var(--line-strong); }
.unscheduled-item:hover { border-color: var(--accent); color: var(--accent-dark); }
.unscheduled-item small { color: var(--muted); font-size: 10px; font-weight: 400; }
.unscheduled-flag { color: var(--amber); font-size: 10px; font-weight: 700; }
.unscheduled-flag.is-closed { color: var(--muted); }
#showMoreUnscheduled { margin-top: 12px; }

.project-memory { min-width: 0; padding-top: 7px; }
.memory-intro { max-width: 750px; margin-bottom: 16px; }
.memory-intro h3 { margin: 3px 0 5px; font-size: 19px; letter-spacing: -.03em; }
.memory-intro p:last-child { color: var(--muted); font-size: 12px; line-height: 1.5; }
.memory-controls { display: flex; align-items: end; flex-wrap: wrap; gap: 10px 15px; margin-bottom: 9px; }
.memory-search { flex: 1 1 290px; max-width: 490px; }
.memory-search label { display: block; margin-bottom: 4px; color: var(--ink-soft); font-size: 11px; font-weight: 650; }
.memory-controls .segmented-control { flex-wrap: wrap; }
.memory-summary { margin-bottom: 12px; color: var(--muted); font-size: 11px; }
.memory-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 10px; }
.memory-card { display: grid; align-content: start; gap: 8px; min-width: 0; padding: 14px 15px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow-wrap: anywhere; }
.memory-card:hover { border-color: #b6c8e9; }
.memory-badges { display: flex; flex-wrap: wrap; gap: 5px; }
.memory-badge { display: inline-flex; padding: 3px 6px; border-radius: 5px; font-size: 10px; font-weight: 700; }
.memory-badge.is-current { background: var(--accent-soft); color: var(--accent-dark); }
.memory-badge.is-source { background: var(--amber-soft); color: var(--amber); }
.memory-card-open { width: 100%; min-height: 44px; padding: 0; border: 0; border-radius: 4px; background: transparent; color: var(--ink); text-align: left; font-size: 13px; font-weight: 750; line-height: 1.3; overflow-wrap: anywhere; }
.memory-card-open:hover { color: var(--accent-dark); text-decoration: underline; text-underline-offset: 3px; }
.memory-card-meta { color: var(--muted); font-size: 10px; }
.memory-current-detail { display: grid; gap: 5px; padding: 9px 10px; border-radius: 7px; background: #f5f8fc; }
.memory-line { color: var(--ink-soft); font-size: 11px; line-height: 1.45; }
.memory-line strong { color: var(--ink); }
.memory-evidence { display: grid; justify-items: start; gap: 3px; font-size: 11px; }
.memory-evidence strong { color: var(--ink); }
.memory-evidence-link, .memory-evidence-reference { max-width: 100%; overflow-wrap: anywhere; }
.memory-evidence-link { min-height: 28px; text-underline-offset: 2px; }
.memory-evidence-reference { color: var(--ink-soft); }
.memory-empty { grid-column: 1 / -1; padding: 24px; border: 1px dashed var(--line-strong); border-radius: var(--radius); background: var(--surface); color: var(--muted); font-size: 12px; }
#memoryShowMore { margin-top: 12px; }

.drawer-backdrop { position: fixed; inset: 0; z-index: 50; background: rgb(20 30 45 / 48%); }
.project-dialog { position: fixed; top: 50%; left: 50%; z-index: 51; width: min(92vw, 540px); max-height: min(90vh, 760px); overflow-y: auto; transform: translate(-50%, -50%); border: 1px solid var(--line); border-radius: 15px; background: var(--surface); box-shadow: var(--shadow); }
.project-dialog-header { display: flex; justify-content: space-between; align-items: start; gap: 15px; padding: 24px 24px 18px; border-bottom: 1px solid var(--line); }
.project-dialog-header h2 { margin: 5px 0; font-size: 24px; line-height: 1.2; letter-spacing: -.035em; overflow-wrap: anywhere; }
.project-dialog-header .icon-button { font-size: 27px; }
.project-dialog-content { padding: 22px 24px 24px; }
.project-window { display: grid; gap: 3px; padding: 15px; border: 1px solid #bbd0fa; border-radius: var(--radius); background: #f7faff; }
.project-window span, .project-window small { color: var(--muted); font-size: 11px; }
.project-window strong { color: var(--ink); font-size: 17px; }
.project-dialog-explain { margin: 17px 0; color: var(--ink-soft); font-size: 12px; line-height: 1.5; }
.project-counts { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 16px; margin: 0; border-top: 1px solid var(--line); }
.project-counts dt, .project-counts dd { min-width: 0; margin: 0; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
.project-counts dt { color: var(--ink-soft); }
.project-counts dd { color: var(--ink); font-weight: 750; font-variant-numeric: tabular-nums; text-align: right; }
.project-dialog-actions { display: flex; justify-content: flex-end; margin-top: 19px; }
.detail-panel { position: fixed; top: 0; right: 0; bottom: 0; z-index: 51; display: flex; flex-direction: column; width: min(100vw, 680px); background: var(--bg); box-shadow: -14px 0 45px rgb(20 30 45 / 18%); }
.detail-header { display: flex; justify-content: space-between; gap: 18px; padding: 23px 27px 19px; border-bottom: 1px solid var(--line); background: var(--surface); }
.detail-header h2 { max-width: 550px; margin: 5px 0 6px; font-size: clamp(21px, 2.6vw, 27px); line-height: 1.17; letter-spacing: -.035em; overflow-wrap: anywhere; }
.detail-meta { color: var(--muted); font-size: 11px; }
.close-detail { font-size: 27px; }
.detail-message { padding: 10px 27px; border-bottom: 1px solid var(--line); background: var(--green-soft); color: var(--green); font-size: 12px; font-weight: 650; }
.detail-message.is-error { background: var(--red-soft); color: var(--red); }
.detail-scroll { flex: 1; overflow-y: auto; padding: 0 27px 35px; }
.detail-section { padding: 22px 0 26px; border-bottom: 1px solid var(--line); }
.detail-section-heading { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 5px 10px; margin-bottom: 14px; }
.detail-section-heading h3 { font-size: 18px; letter-spacing: -.025em; }
.current-label, .source-label, .audit-count { color: var(--muted); font-size: 10px; font-weight: 650; }
.source-label { color: var(--accent-dark); }
#detailForm { display: grid; gap: 14px; }
#detailForm label { display: grid; gap: 5px; color: var(--ink-soft); font-size: 11px; font-weight: 650; }
#detailForm input, #detailForm select, #detailForm textarea { color: var(--ink); font-size: 13px; font-weight: 450; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.quantity-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.label-help { color: var(--muted); font-weight: 400; }
.evidence-box { display: grid; gap: 10px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.evidence-box h4 { font-size: 13px; }
.evidence-list { display: grid; gap: 5px; font-size: 12px; overflow-wrap: anywhere; }
.dependency-links { display: grid; justify-items: start; gap: 5px; font-size: 11px; }
.dependency-links strong { color: var(--ink-soft); }
.dependency-link { min-height: 44px; padding: 5px 0; border: 0; background: transparent; color: var(--accent-dark); text-align: left; text-decoration: underline; text-underline-offset: 2px; overflow-wrap: anywhere; }
.dependency-unknown { color: var(--muted); overflow-wrap: anywhere; }
.evidence-link, .evidence-reference { display: block; min-height: 26px; overflow-wrap: anywhere; }
.evidence-link { text-underline-offset: 2px; }
.help-text, .source-explain { color: var(--muted); font-size: 11px; line-height: 1.5; }
.confirm-row { display: flex !important; align-items: start; gap: 10px !important; padding: 12px; border: 1px solid #bbd0fa; border-radius: var(--radius); background: #f4f8ff; cursor: pointer; }
.confirm-row input { width: 20px; min-height: 20px !important; height: 20px; flex: none; margin: 2px 0 0; accent-color: var(--accent); }
.confirm-row span { display: grid; gap: 2px; }
.confirm-row strong { color: var(--ink); font-size: 12px; }
.confirm-row small { color: var(--muted); font-size: 11px; font-weight: 400; }
.critical-row { display: flex !important; align-items: start; gap: 10px !important; padding: 12px; border: 1px solid #e0b5b8; border-radius: var(--radius); background: #fff8f8; cursor: pointer; }
.critical-row input { width: 20px; min-height: 20px !important; height: 20px; flex: none; margin: 2px 0 0; accent-color: var(--red); }
.critical-row span { display: grid; gap: 2px; }
.critical-row strong { color: var(--red); font-size: 12px; }
.critical-row small { color: var(--muted); font-size: 11px; font-weight: 400; }
.save-message { min-height: 18px; color: var(--red); font-size: 12px; font-weight: 650; }
.conflict-actions { margin-top: -8px; }
.form-actions { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.form-actions span { color: var(--muted); font-size: 11px; }
.source-summary { display: grid; grid-template-columns: minmax(95px, .35fr) minmax(0, 1fr); gap: 8px 16px; margin: 15px 0 0; font-size: 12px; }
.source-summary dt { color: var(--muted); font-weight: 650; }
.source-summary dd { min-width: 0; margin: 0; overflow-wrap: anywhere; }
.source-links { margin-top: 10px; font-size: 12px; font-weight: 650; }
.source-link { display: inline-flex; align-items: center; min-height: 44px; }
.raw-source { margin-top: 15px; padding-top: 11px; border-top: 1px solid var(--line); font-size: 12px; }
.raw-source summary { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink-soft); font-weight: 650; cursor: pointer; }
.raw-source pre { max-height: 300px; overflow: auto; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink-soft); font: 11px/1.45 "Cascadia Mono", Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.audit-list { display: grid; gap: 9px; }
.audit-event { display: grid; gap: 5px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font-size: 11px; overflow-wrap: anywhere; }
.audit-top { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 5px 10px; }
.audit-top time { color: var(--muted); }
.audit-note { color: var(--ink-soft); }
.audit-change { display: grid; grid-template-columns: minmax(90px, .3fr) minmax(0, 1fr); gap: 8px; }
.audit-field { color: var(--muted); text-transform: capitalize; }
.audit-evidence { color: var(--green); }
.create-dialog { position: fixed; top: 50%; left: 50%; z-index: 52; width: min(92vw, 520px); max-height: min(90vh, 760px); overflow-y: auto; transform: translate(-50%, -50%); padding: 24px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); box-shadow: var(--shadow); }
.create-header { display: flex; justify-content: space-between; align-items: start; gap: 15px; margin-bottom: 18px; }
.create-header h2 { margin-top: 4px; font-size: 24px; letter-spacing: -.03em; }
.create-header .icon-button { font-size: 27px; }
#createForm { display: grid; gap: 14px; }
#createForm label { display: grid; gap: 5px; color: var(--ink-soft); font-size: 11px; font-weight: 650; }
#createForm input, #createForm select { font-size: 13px; font-weight: 450; }
.create-actions { display: flex; justify-content: flex-end; }

@media (max-width: 1200px) {
  .overview { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .toolbar { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .search-field { grid-column: span 2; }
  .list-column-head, .work-row { grid-template-columns: minmax(0, 2.4fr) minmax(100px, 1.1fr) 96px 105px 120px; gap: 7px; }
  .list-meta { gap: 6px; }
}
@media (max-width: 1030px) {
  .app-shell { display: block; }
  .workspace-nav { min-height: auto; padding: 9px 20px 8px; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { padding: 0 0 8px; }
  .project-switcher { grid-template-columns: minmax(0, 1fr) auto; align-items: center; margin: 0 0 8px; }
  .project-switcher label { grid-column: 1 / -1; }
  .project-nav { display: flex; gap: 5px; margin-bottom: 6px; padding-bottom: 6px; }
  .project-nav-button { min-width: 155px; }
  .nav-section-label, .nav-footer { display: none; }
  .quick-nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: thin; }
  .quick-view { width: auto; flex: none; min-height: 44px; white-space: nowrap; }
  .main-content { padding: 0 20px 58px; }
}
@media (max-width: 760px) {
  .filters-panel > summary { display: flex; align-items: center; min-height: 44px; margin-bottom: 9px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink-soft); font-size: 12px; font-weight: 700; cursor: pointer; }
  .filters-panel:not([open]) > summary { margin-bottom: 0; }
  .page-intro { align-items: start; }
  .target-card { min-width: 190px; }
  .target-card strong { font-size: 13px; }
  .overview-stat small { display: none; }
  .list-heading { align-items: start; }
  .list-meta { flex-direction: column; align-items: end; }
  .list-column-head { display: none; }
  .work-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; margin-top: 8px; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
  .row-main { grid-column: 1 / -1; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
  .row-open { padding: 0; }
  .mobile-cell-label { display: block; margin-bottom: 1px; color: var(--muted); font-size: 10px; font-weight: 650; }
  .timeline-axis, .timeline-row, .timeline-group, .timeline-project-row, .timeline-more-row { grid-template-columns: 210px max-content; }
  .timeline-empty { width: 210px; }
}
@media (max-width: 600px) {
  .workspace-nav { padding: 8px 14px; }
  .main-content { padding: 0 14px 50px; }
  .project-nav-button { min-width: 0; flex: 1 1 0; }
  .utility-bar { justify-content: flex-end; min-height: 50px; }
  .utility-breadcrumb { display: none; }
  .user-label { max-width: 140px; }
  .page-intro { display: grid; gap: 10px; padding: 16px 0; }
  h1 { font-size: 31px; }
  .intro-subtitle { display: none; }
  .target-card { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; padding: 7px 10px; }
  .target-card > span:last-child { flex-basis: 100%; }
  .auth-card { grid-template-columns: 1fr; gap: 20px; padding: 22px; }
  .auth-input-row { display: grid; }
  .overview { display: flex; gap: 7px; max-width: 100%; overflow-x: auto; padding-bottom: 5px; scrollbar-width: thin; }
  .overview-stat { flex: 0 0 132px; }
  .overview-stat strong { font-size: 23px; }
  .list-heading { display: grid; }
  .list-meta { flex-direction: row; flex-wrap: wrap; justify-content: space-between; align-items: center; }
  .toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .search-field, .group-field { grid-column: 1 / -1; }
  .legend { gap: 5px 11px; }
  .timeline-summary-rule { margin-left: 0; flex-basis: 100%; }
  .unscheduled-list { grid-template-columns: 1fr; }
  .memory-list { grid-template-columns: 1fr; }
  .memory-search { max-width: none; }
  .detail-header { padding: 17px 15px 15px; }
  .detail-scroll { padding: 0 15px 30px; }
  .quantity-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 390px) {
  .form-grid { grid-template-columns: 1fr; }
  .quantity-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .source-summary { grid-template-columns: 1fr; gap: 2px; }
  .source-summary dd { margin-bottom: 7px; }
  .timeline-axis, .timeline-row, .timeline-group, .timeline-project-row, .timeline-more-row { grid-template-columns: 180px max-content; }
  .timeline-empty { width: 180px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
