/* ============================================================
   Innovation Project Management — design system
   One stylesheet, one type scale, one font family for every page.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
  /* FONT SWAP POINT: the brand face is "Mark" (licensed, not bundled).
     Plus Jakarta Sans is the free stand-in. Change only this line. */
  --font-sans: 'Plus Jakarta Sans', -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;

  --navy-900: #00161d;
  --navy-800: #002937;
  --navy-700: #013b4d;
  --navy-600: #01566f;
  --navy-100: #e6edef;
  --navy-050: #f2f6f7;

  --paper: #f5f4f1;
  --surface: #ffffff;
  --surface-alt: #faf9f7;
  --hairline: #e4e1da;
  --hairline-strong: #cfcabe;

  --ink: #14232a;
  --ink-muted: #5d6b72;
  --ink-faint: #8e999e;
  --ink-on-navy: rgba(255, 255, 255, 0.92);
  --ink-on-navy-muted: rgba(255, 255, 255, 0.6);

  /* Brass: the one warm accent. Active states and small rules only. */
  --brass: #a9834f;
  --brass-light: #c9a877;
  --brass-tint: #f3ece1;

  /* Status. Reserved for state, never reused as a series colour, and
     always shown with its label. */
  --ok: #2c6b52;
  --ok-tint: #e7f0ec;
  --info: #01566f;
  --info-tint: #e3eef2;
  --warn: #8a6416;
  --warn-tint: #f6eeda;
  --danger: #9c3227;
  --danger-tint: #f6e8e6;
  --neutral: #7c878c;
  --neutral-tint: #eeefee;

  /* Data: one hue for magnitude. */
  --series: #01566f;
  --series-soft: #a9c6cf;
  --track: #edece8;

  --fs-micro: 0.6875rem;
  --fs-xs: 0.75rem;
  --fs-sm: 0.8125rem;
  --fs-base: 0.9375rem;
  --fs-md: 1.0625rem;
  --fs-lg: 1.375rem;
  --fs-xl: 1.75rem;
  --fs-2xl: 2.25rem;

  --tracking-label: 0.14em;
  --radius: 3px;
  --radius-lg: 5px;
  --shadow-card: 0 1px 2px rgba(0, 22, 29, 0.04), 0 6px 20px rgba(0, 22, 29, 0.045);
  --shadow-pop: 0 24px 60px rgba(0, 22, 29, 0.28);
  --topbar-h: 58px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3 { font-weight: 600; letter-spacing: -0.015em; margin: 0 0 0.4em; line-height: 1.25; }
h1 { font-size: var(--fs-xl); }
h2 { font-size: var(--fs-md); }
h3 { font-size: var(--fs-base); }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
a { color: var(--navy-600); text-underline-offset: 2px; }

.eyebrow, th, .pill, .tab, .stat-label, .brand-product {
  font-size: var(--fs-micro);
  text-transform: uppercase;
  letter-spacing: var(--tracking-label);
  font-weight: 600;
}
.eyebrow { color: var(--ink-faint); }
.muted { color: var(--ink-muted); }
.faint { color: var(--ink-faint); }
.small { font-size: var(--fs-sm); }
.nowrap { white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }
.right { text-align: right; }

/* ---------------- Topbar ---------------- */

.topbar {
  background: var(--navy-900);
  min-height: var(--topbar-h);
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 24px;
  position: sticky;
  top: 0;
  z-index: 50;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; flex: none; }
/* The Innovation Department mark: a paper plane. Its colours are set in
   the SVG itself (index.html, img/mark.svg), since it uses three. */
.brand-mark { width: 26px; height: 26px; flex: none; }
.brand-product { color: var(--ink-on-navy); font-size: var(--fs-xs); }
.nav { display: flex; gap: 2px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.nav a {
  color: var(--ink-on-navy-muted);
  text-decoration: none;
  font-size: var(--fs-sm);
  font-weight: 500;
  padding: 19px 11px 17px;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.nav a:hover { color: #fff; }
.nav a.is-active { color: #fff; border-bottom-color: var(--brass-light); }
.nav .badge {
  display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 5px; border-radius: 9px;
  background: var(--brass); color: #fff; font-size: var(--fs-micro); text-align: center; line-height: 18px;
}
.topbar-user { display: flex; align-items: center; gap: 12px; flex: none; color: var(--ink-on-navy-muted); font-size: var(--fs-sm); }
.topbar-user strong { color: var(--ink-on-navy); font-weight: 500; }
.topbar-user input { width: 170px; padding: 4px 8px; font-size: var(--fs-xs); background: var(--navy-800); color: #fff; border-color: var(--navy-600); }
.topbar-user input::placeholder { color: var(--ink-on-navy-muted); }
.topbar-user select { width: auto; padding: 4px 8px; font-size: var(--fs-xs); background: var(--navy-800); color: #fff; border-color: var(--navy-600); }
.topbar-user button { background: transparent; color: var(--ink-on-navy-muted); border-color: rgba(255, 255, 255, 0.22); padding: 5px 11px; font-size: var(--fs-xs); }
.topbar-user button:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }

/* ---------------- Layout ---------------- */

.page { max-width: 1880px; margin: 0 auto; padding: 16px 20px 28px; }
.page-narrow { max-width: 1040px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.page-head h1 { margin: 0; }
.page-head .sub { color: var(--ink-muted); font-size: var(--fs-sm); margin-top: 2px; max-width: 80ch; }
.back { display: inline-block; font-size: var(--fs-sm); text-decoration: none; margin-bottom: 14px; color: var(--ink-muted); }
.back:hover { color: var(--navy-600); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.actions-end { justify-content: flex-end; margin-top: 22px; }

.grid { display: grid; gap: 14px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-main { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); align-items: start; }
.stack { display: grid; gap: 14px; align-content: start; min-width: 0; }
@media (max-width: 960px) { .grid-2, .grid-main { grid-template-columns: minmax(0, 1fr); } }

.card { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); padding: 14px 18px; min-width: 0; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.card-head h2 { margin: 0; }
.card-flush { padding: 0; overflow: hidden; }
.card-flush .card-head { padding: 14px 18px 0; }

/* ---------------- Buttons & forms ---------------- */

button, .button {
  font: inherit; font-size: var(--fs-sm); font-weight: 500;
  padding: 8px 14px; border-radius: var(--radius);
  border: 1px solid var(--hairline-strong); background: var(--surface); color: var(--ink);
  cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
}
button:hover, .button:hover { background: var(--surface-alt); border-color: var(--ink-faint); }
button:focus-visible, .button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--navy-600); outline-offset: 2px;
}
button.primary, .button.primary { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }
button.primary:hover, .button.primary:hover { background: var(--navy-700); }
button.danger { color: var(--danger); }
button.danger-solid { background: var(--danger); border-color: var(--danger); color: #fff; }
button.link { border: 0; background: none; padding: 0; color: var(--navy-600); text-decoration: underline; text-underline-offset: 2px; }
button:disabled { opacity: 0.5; cursor: not-allowed; }

label.field { display: block; font-size: var(--fs-sm); font-weight: 500; }
label.field > span { display: block; margin-bottom: 5px; }
.hint { display: block; font-size: var(--fs-xs); color: var(--ink-muted); font-weight: 400; margin-top: 4px; }
input, select, textarea {
  font: inherit; font-size: var(--fs-base); width: 100%;
  padding: 8px 10px; border: 1px solid var(--hairline-strong); border-radius: var(--radius);
  background: var(--surface); color: var(--ink);
}
input[type='checkbox'] { width: auto; margin: 0; accent-color: var(--navy-700); }
textarea { resize: vertical; min-height: 84px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.form-grid .span-2 { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: minmax(0, 1fr); } }
.form-section { font-size: var(--fs-micro); text-transform: uppercase; letter-spacing: var(--tracking-label); font-weight: 600; color: var(--brass); grid-column: 1 / -1; margin-top: 8px; padding-top: 14px; border-top: 1px solid var(--hairline); }
.form-section:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.check { display: inline-flex; align-items: center; gap: 7px; font-size: var(--fs-sm); cursor: pointer; }
.check-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.check-chips label { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1px solid var(--hairline-strong); border-radius: 14px; font-size: var(--fs-sm); font-weight: 400; cursor: pointer; background: var(--surface); }
.check-chips label:has(input:checked) { background: var(--navy-050); border-color: var(--navy-600); }

/* Managed lists under Settings: one value per row, with its actions. */
.list-values { list-style: none; margin: 0; padding: 0; }
.list-values li { display: flex; align-items: center; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--hairline); }
.list-values li:last-child { border-bottom: 0; }
.list-values label.check { flex: 1; min-width: 0; margin: 0; }

/* Person picker: a person is chosen from the staff list, never typed. */
.person { display: block; font-size: var(--fs-sm); }
.person-label { display: block; font-weight: 500; margin-bottom: 5px; }
.person-picked { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 12px; border: 1px solid var(--navy-100); background: var(--navy-050); border-radius: var(--radius); font-size: var(--fs-base); }
.person-picked[hidden], .person-search[hidden] { display: none; }
.person-results { display: grid; gap: 2px; margin-top: 4px; }
.person-results:empty { display: none; }
.person-results button { display: block; width: 100%; text-align: left; white-space: normal; border-color: var(--hairline); padding: 7px 10px; }
.person-results button:hover { border-color: var(--navy-600); background: var(--navy-050); }
.person-results button span { display: block; font-size: var(--fs-xs); color: var(--ink-muted); font-weight: 400; }
.person-results p { margin: 4px 0 0; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; align-items: center; }
.filters input, .filters select { width: auto; font-size: var(--fs-sm); padding: 7px 9px; }
.filters input[type='search'] { flex: 1 1 220px; min-width: 180px; }
.filters .count { margin-left: auto; color: var(--ink-muted); font-size: var(--fs-sm); }

/* ---------------- Pills & chips ---------------- */

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 10px; white-space: nowrap; background: var(--neutral-tint); color: var(--ink-muted); }
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.s-ok { background: var(--ok-tint); color: var(--ok); }
.pill.s-info { background: var(--info-tint); color: var(--info); }
.pill.s-warn { background: var(--warn-tint); color: var(--warn); }
.pill.s-danger { background: var(--danger-tint); color: var(--danger); }
.chip { display: inline-block; padding: 2px 8px; border-radius: 3px; background: var(--navy-050); border: 1px solid var(--navy-100); font-size: var(--fs-xs); color: var(--navy-700); white-space: nowrap; }
.chips { display: flex; flex-wrap: wrap; gap: 5px; }

/* ---------------- Tables ---------------- */

/* Wide tables scroll inside their own container; the page never does. */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
th { text-align: left; color: var(--ink-faint); padding: 8px 12px; border-bottom: 1px solid var(--hairline); white-space: nowrap; background: var(--surface-alt); }
td { padding: 8px 12px; border-bottom: 1px solid var(--hairline); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
tbody tr.is-link { cursor: pointer; }
tbody tr.is-link:hover { background: var(--navy-050); }
td .title { font-weight: 500; color: var(--ink); text-decoration: none; }
td .title:hover { text-decoration: underline; }
td .sub { color: var(--ink-muted); font-size: var(--fs-xs); margin-top: 3px; }
th.right, td.right { text-align: right; }

.empty { padding: 26px 20px; text-align: center; color: var(--ink-muted); }
.empty h3 { color: var(--ink); margin-bottom: 6px; }

/* ---------------- Dashboard ---------------- */

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 12px; }
.stat { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius-lg); padding: 11px 14px; text-decoration: none; color: inherit; display: block; box-shadow: var(--shadow-card); }
a.stat:hover { border-color: var(--navy-600); }
.stat-label { color: var(--ink-faint); }
.stat-value { font-size: var(--fs-2xl); font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; margin-top: 3px; font-variant-numeric: tabular-nums; }
.stat-note { font-size: var(--fs-xs); color: var(--ink-muted); margin-top: 2px; }

/* Part-to-whole: segments separated by a 2px surface gap. */
.stackbar { display: flex; gap: 2px; height: 14px; margin: 4px 0 16px; }
.stackbar span { min-width: 3px; border-radius: 2px; }
.legend { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px 16px; font-size: var(--fs-sm); }
.legend a { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); }
.legend a:hover .legend-name { text-decoration: underline; }
.legend i { width: 10px; height: 10px; border-radius: 2px; flex: none; }
.legend b { margin-left: auto; font-weight: 600; font-variant-numeric: tabular-nums; }
.c-ok { background: var(--ok); } .c-info { background: var(--info); } .c-neutral { background: var(--neutral); }
.c-warn { background: var(--warn); } .c-danger { background: var(--danger); }

/* Magnitude: one hue, thin bars, value labelled at the end. */
.bars { display: grid; gap: 9px; }
.bar-row { display: grid; grid-template-columns: minmax(90px, 150px) 1fr 44px; gap: 12px; align-items: center; font-size: var(--fs-sm); text-decoration: none; color: var(--ink); }
a.bar-row:hover .bar-name { text-decoration: underline; }
.bar-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { background: var(--track); height: 10px; border-radius: 0 4px 4px 0; position: relative; }
.bar-fill { background: var(--series); height: 100%; border-radius: 0 4px 4px 0; min-width: 2px; }
.bar-fill.soft { background: var(--series-soft); }
.bar-val { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.bar-group { font-size: var(--fs-micro); text-transform: uppercase; letter-spacing: var(--tracking-label); font-weight: 600; color: var(--ink-faint); margin: 12px 0 2px; }
.bar-group:first-child { margin-top: 0; }

.board td, .board th { padding: 6px 12px; }
.board .rank { width: 44px; font-weight: 600; font-size: var(--fs-md); color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.board tr.top .rank { color: var(--brass); }
.board tr.top td:nth-child(2) { font-weight: 600; }
.board .bar-track { min-width: 80px; }

.attn { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; align-items: start; }
@media (max-width: 800px) { .attn { grid-template-columns: minmax(0, 1fr); } }
.attn details { border-bottom: 1px solid var(--hairline); }
.attn summary { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; cursor: pointer; font-size: var(--fs-sm); font-weight: 500; list-style: none; }
.attn summary::-webkit-details-marker { display: none; }
.attn summary b { font-variant-numeric: tabular-nums; }
.attn ul { list-style: none; margin: 0 0 12px; padding: 0; font-size: var(--fs-sm); display: grid; gap: 6px; }
.attn li { display: flex; justify-content: space-between; gap: 12px; }
.attn li span { color: var(--ink-muted); white-space: nowrap; font-size: var(--fs-xs); }

/* ---------------- Project page ---------------- */

.stepper { display: flex; gap: 2px; margin: 4px 0 14px; }
.step { flex: 1; min-width: 0; padding: 10px 12px; background: var(--track); font-size: var(--fs-sm); }
.step:first-child { border-radius: var(--radius) 0 0 var(--radius); }
.step:last-child { border-radius: 0 var(--radius) var(--radius) 0; }
.step b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.step span { display: block; font-size: var(--fs-xs); color: var(--ink-muted); min-height: 1.4em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.step.done { background: var(--navy-100); }
.step.current { background: var(--navy-800); color: #fff; }
.step.current span { color: var(--ink-on-navy-muted); }
@media (max-width: 640px) { .stepper { flex-direction: column; } .step { border-radius: 0 !important; } }

.facts { display: grid; grid-template-columns: minmax(110px, 40%) 1fr; gap: 9px 14px; font-size: var(--fs-sm); margin: 0; }
.facts dt { color: var(--ink-muted); }
.facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 14px 1fr; gap: 12px; padding-bottom: 18px; position: relative; }
.timeline li::before { content: ''; position: absolute; left: 4px; top: 14px; bottom: 0; width: 1px; background: var(--hairline-strong); }
.timeline li:last-child::before { display: none; }
.timeline .dot { width: 9px; height: 9px; border-radius: 50%; margin-top: 6px; background: var(--hairline-strong); }
.timeline .k-update .dot { background: var(--navy-600); }
.timeline .k-stage .dot { background: var(--brass); }
.timeline .k-alert .dot { background: var(--warn); }
.timeline .meta { font-size: var(--fs-xs); color: var(--ink-muted); }
.timeline .meta b { color: var(--ink); font-weight: 600; }
.timeline .body { font-size: var(--fs-sm); white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 2px; }
.timeline .k-update .body { font-size: var(--fs-base); }

.composer textarea { min-height: 70px; }
.composer .actions { justify-content: space-between; margin-top: 8px; }

.banner { padding: 9px 12px; border-radius: var(--radius); font-size: var(--fs-sm); margin-bottom: 12px; border: 1px solid; }
.banner.warn { background: var(--warn-tint); color: var(--warn); border-color: #e6d5a8; }
.banner.danger { background: var(--danger-tint); color: var(--danger); border-color: #e7c8c3; }
.banner.info { background: var(--info-tint); color: var(--info); border-color: #c4dbe3; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--hairline); margin-bottom: 16px; overflow-x: auto; }
.tab { background: none; border: 0; border-bottom: 2px solid transparent; border-radius: 0; padding: 10px 12px; color: var(--ink-muted); }
.tab:hover { background: none; color: var(--ink); }
.tab.is-active { color: var(--ink); border-bottom-color: var(--brass); }

.prose { white-space: pre-wrap; overflow-wrap: anywhere; }

/* ---------------- Overlays ---------------- */

.modal-overlay { position: fixed; inset: 0; background: rgba(0, 22, 29, 0.5); display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px 16px; z-index: 100; overflow-y: auto; }
.modal { background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-pop); padding: 24px 26px; width: 100%; max-width: 720px; }
.modal-sm { max-width: 440px; }
.modal h2 { font-size: var(--fs-lg); margin-bottom: 14px; }
.modal-body { color: var(--ink-muted); }

.toast { position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 12px); background: var(--navy-900); color: #fff; padding: 10px 18px; border-radius: var(--radius); font-size: var(--fs-sm); box-shadow: var(--shadow-pop); opacity: 0; transition: opacity 0.2s, transform 0.2s; z-index: 200; max-width: 90vw; }
.toast.is-in { opacity: 1; transform: translate(-50%, 0); }
.toast-danger { background: var(--danger); }

/* ---------------- Sign-in ---------------- */

.signin { min-height: 100vh; display: grid; place-items: center; background: var(--navy-900); padding: 20px; }
.signin .card { max-width: 400px; width: 100%; padding: 34px; text-align: center; }
.signin-mark { display: block; margin: 0 auto 16px; }
.signin h1 { font-size: var(--fs-lg); margin: 10px 0 8px; }

/* ---------------- Filter drop-downs, links, footer ---------------- */

.ms { position: relative; }
/* Every control in a filter bar looks the same: one size, one weight, one chevron. */
.filters select, .ms-btn, .filters input[type='date'] { font-size: var(--fs-sm); font-weight: 500; line-height: 1.4; padding: 7px 10px; }
.filters select, .ms-btn {
  appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 28px;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%236b7780' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 10px center;
}
.ms-btn.is-on { background-color: var(--navy-050); border-color: var(--navy-600); }
.stats-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (max-width: 1100px) { .stats-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .stats-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.filtered-tag[hidden], .note-line[hidden] { display: none; }
.ms-panel { position: absolute; z-index: 30; top: calc(100% + 4px); left: 0; min-width: 220px; max-height: 320px; overflow-y: auto; background: var(--surface); border: 1px solid var(--hairline-strong); border-radius: var(--radius); box-shadow: var(--shadow-pop); padding: 6px; }
.ms-panel[hidden] { display: none; }
.ms-panel label { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 6px; font-size: var(--fs-sm); font-weight: 400; cursor: pointer; white-space: nowrap; }
.ms-panel label:hover { background: var(--navy-050); }
.period { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.period-range[hidden] { display: none; }
.period-range { display: inline-flex; align-items: center; gap: 6px; }
.filtered-tag { font-size: var(--fs-xs); color: var(--ink-muted); margin: -6px 0 12px; display: flex; gap: 10px; align-items: center; }
.note-line { font-size: var(--fs-sm); color: var(--ink-muted); margin: -4px 0 12px; }
a.ext { color: inherit; text-decoration: underline; text-decoration-color: var(--hairline-strong); white-space: nowrap; }
a.ext:hover { text-decoration-color: currentColor; }
.foot { text-align: center; padding: 26px 16px 30px; font-size: var(--fs-xs); color: var(--ink-faint); }
.foot a { color: inherit; text-decoration: none; }
.foot a:hover { text-decoration: underline; }
.stat.is-on { border-color: var(--navy-600); }
.release { margin-bottom: 22px; }
.release h2 { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.release h3 { font-size: var(--fs-sm); margin: 14px 0 4px; }
.release ul { margin: 0; padding-left: 20px; }
.modal-required h2 { color: var(--danger); }
.modal-required .skip { display: block; margin: 14px 0 0 auto; background: none; border: 0; padding: 4px; font-size: var(--fs-xs); color: var(--ink-faint); text-decoration: underline; cursor: pointer; box-shadow: none; }

/* ---------------- Links, long text, and the compact dashboard ---------------- */

/* A link in a list is an icon: no text to widen or wrap a row. */
.ext-btn { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 24px; border-radius: 6px; color: var(--navy-600); }
.ext-btn:hover { background: var(--navy-050); }
.ext-ico { display: block; }
.ext-more { font-size: var(--fs-xs); color: var(--ink-muted); margin-left: 2px; white-space: nowrap; }
/* An address shown as text is clipped to its box, full address in the tooltip. */
.url-clip { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.timeline .body, .prose, .facts dd, .banner, .hint { overflow-wrap: anywhere; }
.facts dd { min-width: 0; }
.legend-list { grid-template-columns: minmax(0, 1fr); gap: 6px; }
.legend-list a { gap: 10px; }
.legend-list .share { width: 38px; text-align: right; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.legend-list b { margin-left: auto; min-width: 28px; text-align: right; }
.pipeline-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 12px 28px; align-items: start; }
.pipeline-cols .bar-group { margin-top: 0; }

/* Two columns of cards end level: the last card on the right takes up the slack. */
.grid-fill { align-items: stretch; }
.stack-fill { align-content: stretch; grid-template-rows: auto 1fr; }

/* ---------------- One column system, and headers that carry their own notes ---------------- */

.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; }
.grid-cell { min-width: 0; display: grid; }
.grid-cell > .card { min-width: 0; }
@media (max-width: 1100px) { .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .span-2 { grid-column: 1 / -1; } }
@media (max-width: 720px) { .grid-3 { grid-template-columns: minmax(0, 1fr); } }
.head-count { font-size: var(--fs-md); font-weight: 400; color: var(--ink-muted); margin-left: 8px; font-variant-numeric: tabular-nums; }
.head-note { color: var(--ink-muted); font-size: var(--fs-xs); max-width: 62ch; text-align: right; line-height: 1.4; }
.head-search { flex: 1 1 260px; max-width: 420px; width: auto; font-size: var(--fs-sm); padding: 7px 10px; }
.page-head .actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: flex-end; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 16px 0 8px; }
.section-head h2 { margin: 0; }
.split { display: flex; gap: 22px; font-size: var(--fs-sm); color: var(--ink-muted); margin: -4px 0 10px; }
.split b { color: var(--ink); font-variant-numeric: tabular-nums; }
.releases { display: grid; grid-template-columns: repeat(auto-fill, minmax(440px, 1fr)); gap: 14px; align-items: start; }
.release { margin-bottom: 0; }
.list-values { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; }
.list-values li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 3px 0; }
.list-values li .check { flex: 1 1 auto; min-width: 0; }

.step[title], .bar-row[title], .ms-panel label[title] { cursor: help; }

/* Controls inside table rows are compact, so a row is one line high. */
td button, td select, td .button { padding: 3px 10px; font-size: var(--fs-sm); line-height: 1.3; }
td select { padding-right: 24px; }

.stack-flex { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.stack-flex > :last-child { flex: 1 1 auto; }
.releases { display: block; columns: 3 400px; column-gap: 14px; }
.release { break-inside: avoid; margin-bottom: 14px; }

/* The project form: four columns in a wide dialog, so it fits without scrolling far. */
.modal:has(.form-dense) { max-width: 1120px; padding: 18px 22px; }
.modal:has(.form-dense) h2 { margin-bottom: 10px; }
.form-dense { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px 14px; }
.form-dense .s2 { grid-column: span 2; }
.form-dense .s3 { grid-column: span 3; }
.form-dense .s4 { grid-column: 1 / -1; }
.form-dense .form-section { margin-top: 4px; padding-top: 10px; }
.form-dense label.field > span, .form-dense .field > span { margin-bottom: 3px; }
.form-dense textarea { min-height: 52px; height: 100%; }
.form-dense .s4 textarea { height: 56px; }
.form-dense input, .form-dense select { padding: 6px 9px; }
.form-dense .check-chips label { padding: 3px 9px; }
.stack-tight { display: grid; gap: 8px; align-content: start; }
@media (max-width: 900px) { .form-dense { grid-template-columns: repeat(2, minmax(0, 1fr)); } .form-dense .s3 { grid-column: 1 / -1; } }
@media (max-width: 560px) { .form-dense { grid-template-columns: minmax(0, 1fr); } .form-dense .s2 { grid-column: auto; } }
.form-dense label.field.s2:has(textarea) { display: flex; flex-direction: column; }
.form-dense label.field.s2 textarea { flex: 1; height: auto; min-height: 90px; }
.form-dense .field > span { font-weight: 500; }
.form-dense .field > span { font-size: var(--fs-sm); }

/* Project page: title, reference, status and actions share one row. */
.head-project { justify-content: flex-start; gap: 6px 12px; margin-bottom: 6px; }
.head-project .back { margin: 0; font-size: var(--fs-lg); padding: 0 4px; }
.head-project .head-end { margin-left: auto; }
.head-ref { color: var(--ink-faint); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: var(--tracking-label); }
.head-desc { margin: 0 0 12px; color: var(--ink-muted); font-size: var(--fs-sm); max-width: none; }
.life-note { margin-left: auto; text-align: left; max-width: none; }
.life-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.card-head:has(.life-actions) { align-items: center; }
.stepper { margin: 0; }
.step { padding: 7px 12px; }
.facts { gap: 6px 14px; }
.composer .actions { margin-top: 6px; }
.composer .hint { margin: 0; }
