@font-face { font-family: 'Bricolage'; src: url('../fonts/bricolage.woff2') format('woff2'); font-weight: 200 800; font-stretch: 75% 100%; font-display: swap; }
@font-face { font-family: 'Atkinson'; src: url('../fonts/atkinson-hyperlegible-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Atkinson'; src: url('../fonts/atkinson-hyperlegible-latin-700-normal.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Atkinson'; src: url('../fonts/atkinson-hyperlegible-latin-400-italic.woff2') format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }

:root {
  --ink: #1f1a2e;
  --paper: #f4f4f8;
  --surface: #ffffff;
  --line: #d9d7e3;
  --line-strong: #b9b5c9;
  --muted: #5e5a70;
  --plum: #3d2559;
  --plum-2: #563a78;
  --brass: #9a6a12;
  --brass-soft: #f3e6c8;
  --ok: #1f7a4d; --ok-bg: #e3f2ea;
  --risk: #8f4f00; --risk-bg: #fbeedb;
  --blocked: #b3261e; --blocked-bg: #fbe4e2;
  --c-prod: #6b3fa0; --c-table: #2f6f8f; --c-crowd: #a23b5a; --c-merch: #84661a; --c-elec: #2e7d6b; --c-tech: #4a5a7a;
  --radius-s: 4px; --radius-m: 8px;
  --display: 'Bricolage', 'Avenir Next Condensed', 'Arial Narrow', sans-serif;
  --body: 'Atkinson', 'Segoe UI', system-ui, sans-serif;
  --side: 224px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--body); font-size: 15px; line-height: 1.5; color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--display); font-weight: 650; line-height: 1.15; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: 30px; font-stretch: 88%; }
h2 { font-size: 21px; font-stretch: 92%; }
h3 { font-size: 16px; }
p { margin: 0 0 8px; }
a { color: var(--plum-2); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--brass); outline-offset: 2px; border-radius: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.nowrap { white-space: nowrap; }
[hidden] { display: none !important; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: var(--side) 1fr; min-height: 100vh; }
.side { background: var(--plum); color: #efeaf7; padding: 22px 14px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 18px; }
.brand { font-family: var(--display); font-size: 22px; font-weight: 700; font-stretch: 80%; line-height: 1; padding: 0 8px; }
.brand small { display: block; font-family: var(--body); font-size: 12px; font-weight: 400; color: #cdbfe2; margin-top: 6px; font-stretch: normal; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { color: #efeaf7; text-decoration: none; padding: 8px 10px; border-radius: var(--radius-s); display: flex; justify-content: space-between; align-items: center; }
.nav a:hover { background: rgba(255,255,255,.08); }
.nav a[aria-current='page'] { background: #f4f4f8; color: var(--plum); font-weight: 700; }
.nav .count { font-size: 12px; opacity: .8; }
.side .btn.primary { background: var(--brass); border-color: var(--brass); }
.side .btn.primary:hover { background: #7d560c; }
.side-foot { margin-top: auto; font-size: 13px; color: #cdbfe2; padding: 0 8px; display: flex; flex-direction: column; gap: 6px; }
.side-foot button { background: none; border: 0; color: #efeaf7; padding: 0; text-align: left; cursor: pointer; text-decoration: underline; }
.main { min-width: 0; padding: 24px 32px 64px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.page-head p { margin: 4px 0 0; color: var(--muted); max-width: 70ch; }
.sample-banner { background: var(--brass-soft); border: 1px solid #e0c98f; padding: 8px 12px; border-radius: var(--radius-s); margin-bottom: 16px; font-size: 14px; }

/* ---------- controls ---------- */
.btn { border: 1px solid var(--line-strong); background: var(--surface); padding: 7px 14px; border-radius: var(--radius-s); cursor: pointer; font-weight: 700; font-size: 14px; white-space: nowrap; }
.btn:hover { border-color: var(--ink); }
.btn.primary { background: var(--plum); color: #fff; border-color: var(--plum); }
.btn.primary:hover { background: var(--plum-2); }
.btn.danger { color: var(--blocked); border-color: #e3b1ad; }
.btn.small { padding: 4px 10px; font-size: 13px; }
.btn.link { border: 0; background: none; padding: 0; color: var(--plum-2); text-decoration: underline; font-weight: 400; }
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--radius-s); overflow: hidden; }
.seg button { border: 0; background: var(--surface); padding: 6px 12px; cursor: pointer; font-size: 14px; }
.seg button + button { border-left: 1px solid var(--line-strong); }
.seg button[aria-pressed='true'] { background: var(--ink); color: #fff; font-weight: 700; }
label.field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 700; }
label.field .hint { font-weight: 400; color: var(--muted); }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=url], input[type=search], select, textarea {
  border: 1px solid var(--line-strong); border-radius: var(--radius-s); padding: 7px 9px; background: var(--surface); font-size: 14px; font-weight: 400; width: 100%; }
textarea { min-height: 64px; resize: vertical; }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; font-weight: 400; }
.check input { margin-top: 3px; }

.filters { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: flex-end; padding: 12px 0 14px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.filters label { font-size: 12px; font-weight: 700; color: var(--muted); display: flex; flex-direction: column; gap: 3px; }
.filters select, .filters input:not([type=checkbox]) { width: auto; min-width: 128px; padding: 5px 8px; font-size: 14px; }
.filters input[type=search] { min-width: 180px; }
.filters label.check { flex-direction: row; align-items: center; color: var(--ink); font-weight: 400; font-size: 14px; padding-bottom: 6px; }
.filters .active { border-color: var(--plum); box-shadow: inset 0 0 0 1px var(--plum); }

/* ---------- badges (always text + symbol, never colour alone) ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 700; padding: 1px 8px 1px 6px; border-radius: 999px; border: 1px solid currentColor; white-space: nowrap; line-height: 1.6; }
.badge .ic { font-size: 10px; font-weight: 700; width: 14px; height: 14px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--hc); }
.badge .ic span { color: #fff; }
.h-on-track { --hc: var(--ok); color: var(--ok); background: var(--ok-bg); }
.h-at-risk { --hc: var(--risk); color: var(--risk); background: var(--risk-bg); }
.h-blocked { --hc: var(--blocked); color: var(--blocked); background: var(--blocked-bg); }
.timing { white-space: nowrap; display: inline-flex; gap: 6px; align-items: baseline; }
.stage { font-size: 12.5px; font-weight: 700; color: var(--ink); background: #e9e7f0; padding: 1px 8px; border-radius: var(--radius-s); white-space: nowrap; }
.conf { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.conf b { color: var(--ink); }
.tag { font-size: 12px; padding: 0 6px; border-radius: var(--radius-s); background: #ece9f3; color: var(--muted); white-space: nowrap; }
.tag.sample { background: var(--brass-soft); color: #6b4a0c; font-weight: 700; }
.flag { font-size: 12.5px; padding: 1px 7px; border-radius: var(--radius-s); border-left: 3px solid var(--risk); background: var(--risk-bg); color: #5e3500; white-space: nowrap; }
.flag.blocked { border-left-color: var(--blocked); background: var(--blocked-bg); color: #7a1a14; }
.flag.info { border-left-color: var(--plum-2); background: #ece6f5; color: var(--plum); }
.cat-dot { display: inline-block; width: 10px; height: 10px; border-radius: 2px; background: var(--cat, #888); flex: none; }

/* ---------- dashboard ---------- */
.stats { display: flex; flex-wrap: wrap; gap: 28px; padding: 4px 0 18px; }
.stat { display: flex; flex-direction: column; }
.stat strong { font-family: var(--display); font-size: 28px; font-stretch: 85%; line-height: 1.1; }
.stat span { font-size: 13px; color: var(--muted); }
.stat.warn strong { color: var(--risk); }
.section { margin: 0 0 28px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.attention { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); }
.attention li { display: grid; grid-template-columns: minmax(180px, 1.2fr) 2fr auto; gap: 12px; align-items: center; padding: 10px 14px; border-top: 1px solid var(--line); }
.attention li:first-child { border-top: 0; }
.attention .flags { display: flex; gap: 6px; flex-wrap: wrap; }
ul.plain { list-style: none; margin: 0; padding: 0; }
.lanes { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 18px; align-items: start; }
.lane { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); border-top: 4px solid var(--cat, var(--ink)); }
.lane > h3 { padding: 12px 14px 8px; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.lane > h3 .muted { font-family: var(--body); font-weight: 400; font-size: 13px; }
.prow { display: block; width: 100%; text-align: left; background: none; border: 0; border-top: 1px solid var(--line); padding: 10px 14px; cursor: pointer; }
.prow:hover { background: #f8f7fb; }
.prow.child { padding-left: 34px; position: relative; }
.prow.child::before { content: '↳'; position: absolute; left: 15px; top: 10px; color: var(--muted); }
.prow .title { font-weight: 700; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.prow .meta { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 5px; }
.prow .next { font-size: 13px; color: var(--muted); margin-top: 4px; }
.prow .next b { color: var(--ink); font-weight: 700; }
.empty { padding: 28px; text-align: center; color: var(--muted); background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--radius-m); }

/* ---------- legend ---------- */
.legend { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 13px; padding: 10px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); margin-bottom: 14px; align-items: center; }
.legend .grp { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.legend .grp > b { font-size: 12px; color: var(--muted); }
.legend .item { display: inline-flex; gap: 6px; align-items: center; }
.swatch { width: 26px; height: 12px; border-radius: 2px; display: inline-block; }
.sw-work { background: #e5e2ee; border: 1px solid var(--line-strong); }
.sw-win { background: repeating-linear-gradient(135deg, #cfc6e3 0 4px, #f2eff8 4px 8px); border: 2px solid var(--plum-2); }
.sw-committed { border-style: solid; }
.sw-targeted { border-style: dashed; }
.sw-exploratory { border-style: dotted; }

/* ---------- roadmap ---------- */
.roadmap-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); overflow-x: auto; position: relative; }
.roadmap { position: relative; min-width: 100%; }
.rm-head, .rm-row, .rm-group { display: grid; grid-template-columns: 250px 1fr; }
.rm-head { position: sticky; top: 0; z-index: 3; background: var(--surface); border-bottom: 1px solid var(--line-strong); }
.rm-label { position: sticky; left: 0; z-index: 2; background: inherit; padding: 6px 12px; border-right: 1px solid var(--line); min-width: 0; }
.rm-head .rm-label { font-size: 12px; color: var(--muted); display: flex; align-items: flex-end; }
.rm-cols { position: relative; height: 46px; }
.rm-col { position: absolute; top: 0; bottom: 0; border-left: 1px solid var(--line); padding: 4px 6px; font-size: 12px; white-space: nowrap; overflow: hidden; }
.rm-col b { display: block; font-size: 13px; }
.rm-col.year-start { border-left: 2px solid var(--line-strong); }
.rm-group { background: #f6f5fa; border-top: 1px solid var(--line); }
.rm-group .rm-label { font-family: var(--display); font-weight: 650; font-size: 15px; display: flex; gap: 8px; align-items: center; background: #f6f5fa; }
.rm-row { background: var(--surface); border-top: 1px solid #eceaf2; }
.rm-row:hover { background: #faf9fd; }
.rm-row .rm-label { background: var(--surface); }
.rm-row:hover .rm-label { background: #faf9fd; }
.rm-name { background: none; border: 0; padding: 0; cursor: pointer; text-align: left; font-weight: 700; font-size: 14px; line-height: 1.3; }
.rm-name:hover { text-decoration: underline; }
.rm-row.child .rm-label { padding-left: 28px; position: relative; }
.rm-row.child .rm-label::before { content: '↳'; position: absolute; left: 12px; top: 6px; color: var(--muted); }
.rm-sub { font-size: 12px; color: var(--muted); display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 2px; }
.rm-track { position: relative; min-height: 52px; }
.rm-grid { position: absolute; top: 0; bottom: 0; border-left: 1px solid #f0eef5; }
.rm-grid.year-start { border-left: 2px solid #e2dfeb; }
.bar { position: absolute; top: 9px; height: 22px; border-radius: 3px; }
.bar.work { background: color-mix(in srgb, var(--cat) 16%, #fff); border: 1px solid color-mix(in srgb, var(--cat) 45%, #fff); border-right: 0; border-radius: 3px 0 0 3px; }
.bar.win { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--cat) 35%, #fff) 0 4px, color-mix(in srgb, var(--cat) 8%, #fff) 4px 8px); border: 2px solid var(--cat); }
.bar.win.targeted { border-style: dashed; }
.bar.win.exploratory { border-style: dotted; }
.bar.clip-l { border-left-style: none; border-radius: 0 3px 3px 0; }
.bar.clip-r { border-right-style: none; }
.bar-label { position: absolute; top: 33px; font-size: 12px; white-space: nowrap; color: var(--ink); }
.bar-label b { font-weight: 700; }
.exact { position: absolute; top: 11px; width: 16px; height: 16px; margin-left: -8px; transform: rotate(45deg); background: var(--cat); border: 2px solid #fff; box-shadow: 0 0 0 1px var(--cat); }
.ms { position: absolute; top: 4px; margin-left: -6px; width: 12px; height: 12px; display: grid; place-items: center; font-size: 11px; line-height: 1; color: var(--ink); cursor: default; z-index: 1; }
.ms::before { content: ''; position: absolute; inset: 0; transform: rotate(45deg) scale(.72); background: #fff; border: 1.5px solid var(--ink); }
.ms.release::before { content: none; }
.ms.release { font-size: 15px; top: 1px; color: var(--brass); text-shadow: 0 0 2px #fff, 0 0 2px #fff; }
.ms.done::before { background: var(--ink); }
.today-line { position: absolute; top: 0; bottom: 0; width: 0; border-left: 2px solid var(--brass); z-index: 2; pointer-events: none; }
.today-tag { position: absolute; bottom: 3px; transform: translateX(-50%); background: var(--brass); color: #fff; font-size: 11.5px; font-weight: 700; padding: 1px 7px; border-radius: 3px; white-space: nowrap; z-index: 4; }
.rm-note { padding: 10px 14px; font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); }

/* ---------- tables ---------- */
.table-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th { text-align: left; font-size: 12.5px; color: var(--muted); font-weight: 700; padding: 9px 12px; border-bottom: 1px solid var(--line-strong); white-space: nowrap; background: #faf9fc; }
td { padding: 9px 12px; border-top: 1px solid var(--line); vertical-align: top; }
tr.overdue td:first-child { box-shadow: inset 4px 0 0 var(--blocked); }
td .linkish { background: none; border: 0; padding: 0; cursor: pointer; font-weight: 700; text-align: left; color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.quarter-block { margin-bottom: 22px; }
.quarter-block h2 { margin-bottom: 8px; display: flex; align-items: baseline; gap: 10px; }
.quarter-block h2 .muted { font-family: var(--body); font-size: 14px; font-weight: 400; }
.when { font-weight: 700; white-space: nowrap; }
.when.approx { font-weight: 400; font-style: italic; }

/* ---------- exploratory ---------- */
.ideas { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.idea { text-align: left; background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--radius-m); padding: 14px; cursor: pointer; border-left: 4px solid var(--cat); }
.idea:hover { border-color: var(--ink); border-left-color: var(--cat); }
.idea h3 { margin-bottom: 4px; }
.idea p { font-size: 14px; color: var(--muted); margin: 6px 0; }

/* ---------- drawer ---------- */
.scrim { position: fixed; inset: 0; background: rgba(31,26,46,.35); z-index: 20; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(640px, 100vw); background: var(--surface); z-index: 21; display: flex; flex-direction: column; box-shadow: -8px 0 30px rgba(31,26,46,.18); }
.drawer-head { padding: 18px 22px 12px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.drawer-head .badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; align-items: center; }
.drawer-body { padding: 16px 22px 40px; overflow-y: auto; flex: 1; }
.drawer-foot { padding: 12px 22px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; background: #faf9fc; flex-wrap: wrap; }
.close-x { background: none; border: 1px solid var(--line); border-radius: var(--radius-s); width: 34px; height: 34px; cursor: pointer; font-size: 18px; flex: none; }
.facts { display: grid; grid-template-columns: 150px 1fr; gap: 6px 14px; font-size: 14px; margin: 4px 0 16px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.block { margin: 18px 0; }
.block h3 { margin-bottom: 6px; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.callout { padding: 10px 12px; border-radius: var(--radius-s); background: var(--risk-bg); border-left: 3px solid var(--risk); white-space: pre-wrap; font-size: 14px; }
.callout.notes { background: #f1eff6; border-left-color: var(--muted); }
.quick { display: grid; grid-template-columns: repeat(3, 1fr) auto; gap: 8px; align-items: end; padding: 12px; background: #f6f5fa; border-radius: var(--radius-m); margin-bottom: 14px; }
.ms-list li { display: grid; grid-template-columns: 96px 1fr auto; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); align-items: start; font-size: 14px; }
.ms-list li.done .ms-title { text-decoration: line-through; color: var(--muted); }
.ms-list li.overdue .ms-date { color: var(--blocked); font-weight: 700; }
.ms-form { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 12px; background: #f6f5fa; border-radius: var(--radius-m); margin-top: 8px; }
.ms-form .full { grid-column: 1 / -1; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.form-grid .full { grid-column: 1 / -1; }
.form-section { font-family: var(--display); font-size: 15px; font-weight: 650; margin: 20px 0 8px; padding-top: 14px; border-top: 1px solid var(--line); grid-column: 1 / -1; }
.picklist { border: 1px solid var(--line-strong); border-radius: var(--radius-s); max-height: 150px; overflow-y: auto; padding: 6px 8px; display: flex; flex-direction: column; gap: 2px; font-weight: 400; }
.link-row { display: grid; grid-template-columns: 1fr 1.4fr auto; gap: 6px; margin-bottom: 6px; }
.links li { padding: 4px 0; display: flex; gap: 8px; align-items: baseline; }
.link-kind { font-size: 12px; color: var(--muted); min-width: 92px; }
.error-box { background: var(--blocked-bg); border-left: 3px solid var(--blocked); padding: 8px 12px; border-radius: var(--radius-s); margin-bottom: 12px; font-size: 14px; }

.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 9px 18px; border-radius: var(--radius-s); z-index: 50; font-size: 14px; max-width: 90vw; }
.toast.err { background: var(--blocked); }

/* ---------- login ---------- */
.login { min-height: 100vh; display: grid; place-items: center; background: var(--plum); padding: 20px; }
.login form { background: var(--surface); padding: 30px; border-radius: var(--radius-m); width: min(380px, 100%); display: flex; flex-direction: column; gap: 14px; }
.login h1 { font-size: 34px; font-stretch: 78%; }

/* ---------- presentation ---------- */
.present { max-width: 1180px; }
.present-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; border-bottom: 3px solid var(--ink); padding-bottom: 12px; margin-bottom: 24px; flex-wrap: wrap; }
.present-head h1 { font-size: 44px; font-stretch: 76%; font-weight: 700; letter-spacing: -0.02em; }
.present-head .asof { font-size: 15px; color: var(--muted); }
.present h2 { font-size: 24px; margin-bottom: 12px; }
.present-cols { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px 28px; }
.pcat h3 { display: flex; gap: 8px; align-items: center; padding-bottom: 6px; border-bottom: 2px solid var(--cat); margin-bottom: 8px; }
.pitem { padding: 8px 0; border-bottom: 1px solid var(--line); }
.pitem .nm { font-weight: 700; }
.pitem .ln { font-size: 13.5px; color: var(--muted); }
.coming { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0 28px; }
.coming .q { border-top: 2px solid var(--ink); padding-top: 8px; margin-bottom: 18px; }
.coming .q h3 { font-size: 18px; margin-bottom: 6px; }
.coming li { padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.present-tools { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 12px; gap: 10px; }
  .nav { flex-direction: row; flex-wrap: wrap; }
  .nav .count { display: none; }
  .side .btn.primary { background: var(--brass); border-color: var(--brass); }
.side .btn.primary:hover { background: #7d560c; }
.side-foot { margin: 0; flex-direction: row; gap: 12px; }
  .main { padding: 16px 16px 48px; }
  .attention li { grid-template-columns: 1fr; gap: 6px; }
  .form-grid, .ms-form, .quick { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 120px 1fr; }
  .rm-head, .rm-row, .rm-group { grid-template-columns: 170px 1fr; }
}

@media print {
  .side, .filters, .present-tools, .no-print { display: none !important; }
  .shell { display: block; }
  .main { padding: 0; }
  body { background: #fff; }
  .roadmap-wrap { overflow: visible; }
}

@media (prefers-reduced-motion: no-preference) {
  .drawer.enter { animation: slide .18s ease-out; }
  @keyframes slide { from { transform: translateX(24px); } to { transform: none; } }
}

/* ---------- kanban boards ---------- */
.kboard { display: flex; gap: 14px; overflow-x: auto; align-items: flex-start; padding: 2px 2px 14px; }
.kcol { flex: 0 0 292px; background: #ebe9f2; border: 1px solid var(--line); border-radius: var(--radius-m); display: flex; flex-direction: column; max-height: calc(100vh - 210px); min-height: 160px; }
.kboard.stages .kcol { flex-basis: 252px; }
.kcol.over-limit { background: var(--risk-bg); border-color: #e7c48f; }
.kcol-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; padding: 10px 12px 6px; }
.kcol-head h3 { font-size: 15px; display: flex; align-items: center; gap: 4px; }
.kcol.over-limit .kcol-head .small { color: var(--risk); font-weight: 700; }
.kcol-list { flex: 1; overflow-y: auto; padding: 4px 8px 8px; display: flex; flex-direction: column; gap: 8px; min-height: 64px; border-radius: 6px; }
.kcol-list.over { background: rgba(86, 58, 120, .08); outline: 2px dashed var(--plum-2); outline-offset: -4px; }
.kempty { margin: 6px 4px; font-size: 13px; color: var(--muted); }
.kcol-list.over .kempty { display: none; }
.kcard { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--cat, var(--line-strong)); border-radius: 6px; padding: 8px 10px; cursor: pointer; display: flex; flex-direction: column; gap: 5px; }
.kcard[draggable='true'] { cursor: grab; }
.kcard:hover { border-color: var(--line-strong); border-left-color: var(--cat, var(--line-strong)); box-shadow: 0 1px 3px rgba(31, 26, 46, .12); }
.kcard.dragging { opacity: .35; }
.kcard.done .kt { color: var(--muted); }
.kt { font-weight: 700; font-size: 14px; line-height: 1.3; }
.km { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; }
.km .who { font-size: 12.5px; background: #ece9f3; border-radius: 999px; padding: 0 8px; }
.drop-mark { height: 4px; background: var(--brass); border-radius: 2px; flex: none; margin: -2px 0; }
.kadd { display: flex; gap: 6px; padding: 8px; border-top: 1px solid var(--line); }
.kadd input { padding: 5px 8px; font-size: 14px; }
details summary { cursor: pointer; }

/* ---------- multi-select and bulk bars ---------- */
.prow.selectable { display: grid; grid-template-columns: 22px 1fr; gap: 8px; align-items: start; cursor: pointer; }
.prow.selectable input { margin-top: 3px; width: 16px; height: 16px; }
.prow.selectable > span { display: flex; flex-direction: column; gap: 5px; }
.prow.selectable .meta { margin-top: 0; }
.prow.selected { background: #efe8f8; box-shadow: inset 3px 0 0 var(--plum-2); }
.prow.locked { cursor: not-allowed; opacity: .7; }
.prow.child.selectable::before { content: none; }
.kcard.selected { outline: 2px solid var(--plum-2); outline-offset: -1px; background: #f5f0fb; }
.kt input[type=checkbox] { vertical-align: -2px; margin: 0 4px 0 0; }
.bulkbar { position: sticky; bottom: 0; z-index: 10; margin: 18px -32px -64px; padding: 12px 32px 14px; background: var(--surface); border-top: 2px solid var(--plum); box-shadow: 0 -6px 20px rgba(31,26,46,.12); display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: flex-end; }
.bulk-count { display: flex; flex-direction: column; gap: 2px; min-width: 120px; }
.bulk-count .btn.link { font-size: 13px; text-align: left; }
.bulk-fields { display: flex; flex-wrap: wrap; gap: 8px 10px; flex: 1; }
.bulk-fields label { display: flex; flex-direction: column; gap: 3px; font-size: 12px; font-weight: 700; color: var(--muted); }
.bulk-fields select, .bulk-fields input[type=text], .bulk-fields input[type=date] { width: auto; padding: 5px 8px; font-size: 14px; }
.bulk-actions { display: flex; gap: 8px; align-items: center; }

/* ---------- import & export ---------- */
.howto { margin: 6px 0 0; padding-left: 20px; font-size: 14px; display: flex; flex-direction: column; gap: 3px; }
.howto code, .data-card code { background: #ece9f3; padding: 0 4px; border-radius: 3px; }
.data-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 16px 18px; }
.import-row { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; margin-top: 8px; }
.file-btn { cursor: pointer; display: inline-block; }
.file-btn:focus-within { outline: 3px solid var(--brass); outline-offset: 2px; }
.import-row details { flex: 1; min-width: 260px; }
.import-row textarea.paste { margin: 8px 0; font-family: ui-monospace, Menlo, monospace; font-size: 13px; }
.import-preview { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.import-preview h3 { margin-bottom: 8px; }
.summary-line { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; align-items: center; }
.pill { font-size: 13px; font-weight: 700; padding: 2px 10px; border-radius: 999px; background: #ece6f5; color: var(--plum); }
.pill.muted { background: #f0eff4; color: var(--muted); font-weight: 400; }
ul.changes { margin: 0; padding-left: 16px; font-size: 13.5px; }
ul.changes s { color: var(--muted); }
.import-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 12px; }
@media (max-width: 900px) { .bulkbar { margin: 18px -16px -48px; padding: 12px 16px; } }
.bulk-fields label.check { flex-direction: row; align-items: center; gap: 6px; font-weight: 400; font-size: 14px; color: var(--ink); align-self: flex-end; padding-bottom: 8px; }

/* ---------- planned phases ---------- */
.rm-layer { position: absolute; left: 0; right: 0; height: 52px; }
.phase { position: absolute; height: 22px; border-radius: 3px; font-size: 12px; font-weight: 700; line-height: 20px; padding: 0 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border: 1px solid color-mix(in srgb, var(--cat) 70%, #000); color: var(--ink); z-index: 1; }
.phase span { overflow: hidden; text-overflow: ellipsis; display: block; }
.phase.ph0 { background: color-mix(in srgb, var(--cat) 18%, #fff); }
.phase.ph1 { background: color-mix(in srgb, var(--cat) 34%, #fff); }
.phase.ph2 { background: color-mix(in srgb, var(--cat) 52%, #fff); }
.phase.ph3 { background: color-mix(in srgb, var(--cat) 72%, #fff); color: #fff; }
.phase.ph4 { background: color-mix(in srgb, var(--cat) 90%, #000); color: #fff; }
.phase.now { box-shadow: 0 0 0 2px var(--brass); }
.phase.clip-l { border-left-style: dashed; border-radius: 0 3px 3px 0; }
.phase.clip-r { border-right-style: dashed; border-radius: 3px 0 0 3px; }
.sw-phase { background: color-mix(in srgb, var(--plum-2) 34%, #fff); border: 1px solid var(--plum-2); }
.phase-list li { display: grid; grid-template-columns: minmax(120px, auto) 1fr auto; gap: 10px; align-items: center; padding: 5px 0; border-top: 1px solid var(--line); font-size: 14px; }
.phase-list li.past { color: var(--muted); }
.phase-list li.now .phase-chip { box-shadow: 0 0 0 2px var(--brass); }
.phase-chip { display: inline-block; font-size: 12.5px; font-weight: 700; padding: 1px 8px; border-radius: 3px; border: 1px solid var(--plum-2); background: #ece6f5; }
.phase-chip.ph1 { background: #ddd2ee; } .phase-chip.ph2 { background: #c9b8e3; } .phase-chip.ph3 { background: #8f74b4; color: #fff; } .phase-chip.ph4 { background: #563a78; color: #fff; }
.phase-form { background: #f6f5fa; border-radius: var(--radius-m); padding: 12px; }
.phase-row { display: grid; grid-template-columns: 1.3fr 1fr 1fr auto; gap: 6px; margin-bottom: 6px; }
.phase-actions { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
@media (max-width: 900px) { .phase-row { grid-template-columns: 1fr 1fr; } }
.rm-layer.compact .bar-label { top: 6px; }
.rm-layer.compact .ms { top: -2px; }
.phase { min-width: 6px; }

/* ---------- repeating schedules ---------- */
:root { --c-stream: #b4511f; }
.phase.airing { background: color-mix(in srgb, var(--cat) 10%, #fff); border-style: solid; overflow: hidden; }
.phase.airing span { position: relative; z-index: 1; background: color-mix(in srgb, var(--cat) 10%, #fff); display: inline-block; padding-right: 4px; }
.phase.airing i { position: absolute; top: 3px; bottom: 3px; width: 2px; margin-left: -1px; background: var(--cat); border-radius: 1px; }
