/* FunCook task channel — LKK brand polish · Taskify-class stepper · 2026-10-09 */
@font-face {
  font-family: "ABC Arizona Flare";
  src: url("assets/fonts/ABCArizonaFlare-Light.woff2") format("woff2");
  font-weight: 300; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "ABC Arizona Flare";
  src: url("assets/fonts/ABCArizonaFlare-Regular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "ABC Arizona Flare";
  src: url("assets/fonts/ABCArizonaFlare-Medium.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "ABC Arizona Flare";
  src: url("assets/fonts/ABCArizonaFlare-Bold.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}

:root {
  --bg: #F4F1EB;
  --bg-deep: #EDE8E0;
  --surface: #FFFFFF;
  --ink: #1A1A1A;
  --muted: #6B6B6B;
  --line: #E0DBD3;
  --line-strong: #CFC8BC;
  --wash: #F0EBE3;
  --lkk: #E02923;
  --lkk-deep: #910209;
  --lkk-mid: #C9241F;
  --lkk-soft: #FCEDEB;
  --ok: #1F7A4C;
  --ok-soft: #E8F5EE;
  --warn-bg: #FFF4F3;
  --gold: #C4A35A;
  --gold-soft: #F7F1E3;
  --await: #8A6A2F; /* P22: ink on gold Wait/QC path */
  --ink-soft: #2C2C2C;
  --font: "ABC Arizona Flare", "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif;
  --r: 8px;
  --r-lg: 14px;
  --header-h: 60px;
  --bar-h: 68px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --focus: 0 0 0 3px rgba(224, 41, 35, 0.22);
  --shadow-bar: 0 -10px 28px rgba(26, 26, 26, 0.07);
  --shadow-card: 0 1px 0 rgba(26, 26, 26, 0.04);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, #F7F4EF 0%, var(--bg) 180px, var(--bg) 100%);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.5;
  padding-bottom: calc(var(--bar-h) + 20px);
}
[hidden] { display: none !important; }
a { color: var(--lkk); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* —— Brand header —— */
.app-header {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: var(--space-4);
  min-height: var(--header-h);
  padding: 0 20px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  box-shadow: inset 0 -2px 0 var(--lkk);
}
.app-brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--ink); flex-shrink: 0;
}
.app-brand:hover { text-decoration: none; }
.app-brand .plaque { height: 34px; width: auto; }
.app-brand .bridge {
  height: 22px; width: auto; opacity: 0.95;
}
.brand-text {
  display: flex; flex-direction: column; gap: 1px; line-height: 1.1;
  border-left: 1px solid var(--line); padding-left: 10px; margin-left: 2px;
}
.brand-text strong {
  font-weight: 500; font-size: 14px; letter-spacing: -0.01em;
}
.brand-text span {
  font-size: 11px; color: var(--muted); font-weight: 400;
}
.app-nav {
  display: flex; align-items: center; gap: 2px; margin-left: auto; flex-wrap: wrap;
}
.app-nav a {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 36px; padding: 6px 12px;
  border-radius: var(--r); color: var(--muted); font-weight: 500; font-size: 13px;
  text-decoration: none; position: relative;
}
.app-nav a:hover { color: var(--ink); background: var(--wash); text-decoration: none; }
.app-nav a[aria-current="page"] {
  color: var(--lkk-deep);
  background: var(--lkk-soft); /* P15: plaque accent wash */
  box-shadow: inset 0 0 0 1px rgba(224, 41, 35, 0.12);
}
.app-nav a[aria-current="page"]::after {
  content: "";
  position: absolute; left: 12px; right: 12px; bottom: 4px;
  height: 2px; background: var(--lkk); border-radius: 1px;
}

/* —— Page shell —— */
.wrap {
  width: min(800px, calc(100% - 40px));
  margin: 0 auto;
  padding: var(--space-5) 0 var(--space-4);
}
.wrap.wide { width: min(1080px, calc(100% - 40px)); }
.page-head { margin-bottom: var(--space-4); }
.page-head h1 {
  margin: 0 0 6px;
  font-size: clamp(1.45rem, 2.6vw, 1.75rem);
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.2;
}
.page-head .sub {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  max-width: 58ch;
  line-height: 1.45;
}
.banner {
  margin: 0 0 var(--space-4);
  padding: 12px 14px;
  background: var(--surface);
  border-radius: var(--r);
  border: 1px solid var(--line);
  border-left: 3px solid var(--lkk);
  font-size: 13px;
}

/* —— Stepper —— */
.stepper {
  display: flex; gap: 0; margin: 0 0 var(--space-5); padding: 0;
  list-style: none; overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 4px;
}
.stepper li { flex: 1; min-width: 0; position: relative; }
.stepper button {
  width: 100%;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border: 0; border-radius: 10px;
  background: transparent; cursor: pointer; text-align: left;
  color: var(--muted); font-weight: 400; font-size: 12px;
  min-height: 48px;
}
.stepper .step-num {
  flex-shrink: 0;
  width: 24px; height: 24px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  border: 1.5px solid var(--line-strong);
  background: var(--wash);
  font-weight: 500; font-size: 12px; color: var(--muted);
}
.stepper .step-label {
  font-size: 13px; font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.stepper li.is-current button {
  color: var(--lkk-deep);
  background: var(--lkk-soft);
}
.stepper li.is-current .step-num {
  border-color: var(--lkk);
  background: var(--lkk);
  color: #fff;
}
.stepper li.is-done button { color: var(--ok); cursor: pointer; }
.stepper li.is-done .step-num {
  border-color: var(--ok);
  background: var(--ok-soft);
  color: var(--ok);
}
.stepper li.is-done button:hover,
.stepper li.is-current button:hover { filter: brightness(0.98); }
.stepper li:not(.is-done):not(.is-current) button { cursor: default; }

.stage { animation: stageIn .2s ease; }
@keyframes stageIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}
.stage-title {
  margin: 0 0 4px;
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.stage-hint {
  margin: 0 0 var(--space-4);
  color: var(--muted);
  font-size: 13px;
}

/* —— Mission / select cards —— */
.card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
@media (max-width: 640px) {
  .card-grid { grid-template-columns: 1fr; }
}
.pick-card {
  position: relative;
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  min-height: 118px; padding: 16px 16px 14px;
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--r-lg);
  cursor: pointer; text-align: left;
  box-shadow: var(--shadow-card);
  transition: border-color .12s ease, background .12s ease, transform .12s ease, box-shadow .12s ease;
  overflow: hidden;
}
.pick-card::before {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: var(--accent, var(--line-strong));
  opacity: 0.85;
}
.pick-card:hover {
  border-color: var(--line-strong);
  background: #FFFEFC;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(26, 26, 26, 0.06);
}
.pick-card:focus-visible {
  outline: none;
  border-color: var(--lkk);
  box-shadow: var(--focus);
}
.pick-card:active { transform: translateY(0); }
.pick-card.is-selected {
  border-color: var(--lkk);
  border-width: 2px;
  padding: 15.5px 15.5px 13.5px;
  background: var(--lkk-soft);
  box-shadow: none;
}
.pick-card.is-selected::before {
  width: 4px;
  background: var(--lkk);
  opacity: 1;
}
.pick-card.is-selected::after {
  content: "";
  position: absolute;
  top: 14px; right: 14px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--lkk) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2' d='M2.5 6.5l2.5 2.5 4.5-5'/%3E%3C/svg%3E") center/12px no-repeat;
}

/* Type accents — quiet differentiation, same family */
.pick-card[data-task="soft_blast"] { --accent: var(--lkk); }
.pick-card[data-task="survey"] { --accent: #5B6B7A; }
.pick-card[data-task="cocreate"] { --accent: var(--gold); }
.pick-card[data-task="pugc"] { --accent: #D4563A; }
.pick-card[data-task="offline"] { --accent: var(--ok); }
.pick-card[data-task="other"] { --accent: var(--line-strong); }

.pick-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  border-radius: 9px;
  background: var(--wash);
  color: var(--ink-soft);
  font-size: 12px; font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 2px;
}
.pick-card[data-task="soft_blast"] .pick-mark { background: var(--lkk-soft); color: var(--lkk-deep); }
.pick-card[data-task="survey"] .pick-mark { background: #EEF1F4; color: #3D4A57; }
.pick-card[data-task="cocreate"] .pick-mark { background: var(--gold-soft); color: #8A6E2F; }
.pick-card[data-task="pugc"] .pick-mark { background: #FBECE7; color: #A13C26; }
.pick-card[data-task="offline"] .pick-mark { background: var(--ok-soft); color: var(--ok); }
.pick-card[data-task="other"] .pick-mark { background: var(--wash); color: var(--muted); }

.pick-card .pick-kicker {
  font-size: 11px; font-weight: 500; color: var(--muted); letter-spacing: 0.01em;
}
.pick-card .pick-title {
  font-size: 1.02rem; font-weight: 500; line-height: 1.25; color: var(--ink);
  padding-right: 28px;
}
.pick-card .pick-meta {
  font-size: 12px; color: var(--muted); line-height: 1.35;
}
.pick-card .pick-badge {
  margin-top: auto;
  display: inline-flex; align-items: center;
  min-height: 24px; padding: 2px 8px;
  border-radius: 999px;
  background: var(--wash);
  font-size: 11px; font-weight: 500; color: var(--ink-soft);
}
.pick-card.is-selected .pick-badge {
  background: #fff; color: var(--lkk-deep);
}
.pick-card.is-selected .pick-mark {
  background: #fff;
}

#team-tiles { margin-bottom: 8px; }
#team-tiles .pick-card { min-height: 88px; }
#team-tiles .pick-card::before { background: var(--lkk); opacity: 0.35; }
#team-tiles .pick-card.is-selected::before { opacity: 1; }
#team-people { margin: 8px 0 0; font-size: 13px; color: var(--muted); }

/* Group multi cards */
.checks {
  display: grid; grid-template-columns: 1fr; gap: 10px;
}
.check {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 16px;
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--r-lg);
  cursor: pointer;
  min-height: 56px;
  transition: border-color .12s, background .12s;
}
.check:hover { border-color: var(--line-strong); }
.check:has(input:checked) {
  border-color: var(--lkk);
  border-width: 2px;
  padding: 13.5px 15.5px;
  background: var(--lkk-soft);
}
.check input {
  width: 18px; height: 18px; margin-top: 2px; flex-shrink: 0;
  accent-color: var(--lkk);
}
.check strong { font-weight: 500; display: block; margin-bottom: 4px; }
.check ul {
  margin: 0; padding-left: 16px; color: var(--muted); font-size: 12px;
}

/* —— Form fields —— */
.section { margin: 0 0 var(--space-5); padding: 0; border: 0; }
.section > .section-label {
  display: block; margin: 0 0 10px;
  font-size: 14px; font-weight: 500;
}
.field {
  display: flex; flex-direction: column; gap: 6px;
  margin-bottom: 14px;
  font-weight: 500; font-size: 13px;
}
.field input,
.field select,
.field textarea {
  font-weight: 400;
  min-height: 44px;
  padding: 10px 12px;
  border: 1.5px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  width: 100%;
  transition: border-color .12s, box-shadow .12s;
}
.field textarea { min-height: 96px; resize: vertical; }
.field input:hover,
.field select:hover,
.field textarea:hover { border-color: var(--line-strong); }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--lkk);
  box-shadow: var(--focus);
}
.help, .note {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--muted);
  font-weight: 400;
}
.note {
  padding: 10px 12px;
  background: var(--wash);
  border-radius: var(--r);
  color: var(--ink);
  border: 1px solid transparent;
}
.warn {
  margin: 0 0 12px;
  padding: 10px 12px;
  background: var(--warn-bg);
  border-radius: var(--r);
  border-left: 3px solid var(--lkk);
  font-size: 13px;
}
.error {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--lkk-deep);
  font-weight: 500;
  min-height: 0;
}
.error:empty { display: none; }
.req { color: var(--lkk); }
.flag {
  margin: 0 0 12px;
  padding: 8px 10px;
  background: var(--warn-bg);
  border-radius: var(--r);
  font-size: 13px;
  color: var(--lkk-deep);
}

.choice {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 40px; padding: 6px 12px;
  margin: 0 8px 8px 0;
  background: var(--wash);
  border: 1.5px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  font-size: 13px; font-weight: 400;
}
.choice:has(input:checked) {
  background: var(--lkk-soft);
  border-color: var(--lkk);
  color: var(--lkk-deep);
  font-weight: 500;
}
.choice input { accent-color: var(--lkk); width: 16px; height: 16px; }

.screening-dims { display: flex; flex-direction: column; gap: 14px; margin-bottom: 12px; }
.screening-dim strong { display: block; margin-bottom: 8px; font-weight: 500; font-size: 13px; }
.checks-inline { display: flex; flex-wrap: wrap; gap: 0; }
.screening-block {
  margin-bottom: 16px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}

/* —— Buttons / sticky bar —— */
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
button.primary, a.btn.primary,
button.secondary, a.btn.secondary,
button.ghost, a.btn.ghost {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 18px;
  border-radius: var(--r);
  font-weight: 500; font-size: 14px;
  cursor: pointer; text-decoration: none;
  border: 1.5px solid transparent;
  transition: background .12s, border-color .12s, color .12s, transform .08s;
}
button.primary, a.btn.primary {
  background: var(--lkk); color: #fff; border-color: var(--lkk);
}
button.primary:hover, a.btn.primary:hover {
  background: var(--lkk-mid); border-color: var(--lkk-mid); text-decoration: none;
}
button.primary:active { background: var(--lkk-deep); border-color: var(--lkk-deep); transform: translateY(1px); }
button.primary:focus-visible,
button.secondary:focus-visible,
button.ghost:focus-visible {
  outline: none; box-shadow: var(--focus);
}
button.primary:disabled,
button.secondary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  background: var(--wash) !important;
  color: var(--muted) !important;
  border-color: var(--line) !important;
  transform: none !important;
}
button.secondary, a.btn.secondary {
  background: var(--surface); color: var(--ink); border-color: var(--line);
}
button.secondary:hover, a.btn.secondary:hover { background: var(--wash); border-color: var(--line-strong); text-decoration: none; }
button.secondary:active { transform: translateY(1px); }
button.ghost, a.btn.ghost {
  background: transparent; color: var(--muted); border-color: transparent;
  min-height: 36px; padding: 0 10px; font-size: 12px;
}
button.ghost:hover { color: var(--ink); background: var(--wash); }

button.btn-danger, a.btn.btn-danger {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 18px;
  border-radius: var(--r);
  font-weight: 500; font-size: 14px;
  cursor: pointer; text-decoration: none;
  border: 1.5px solid var(--lkk-deep);
  background: var(--lkk-deep); color: #fff;
  transition: background .12s, border-color .12s, transform .08s;
}
button.btn-danger:hover, a.btn.btn-danger:hover {
  background: #6e0107; border-color: #6e0107; text-decoration: none;
}
button.btn-danger:active { transform: translateY(1px); }
button.btn-danger:focus-visible { outline: none; box-shadow: var(--focus); }
button.btn-danger:disabled {
  opacity: 0.45; cursor: not-allowed;
  background: var(--wash) !important; color: var(--muted) !important;
  border-color: var(--line) !important; transform: none !important;
}

.edit-banner {
  margin: 0 0 12px;
  padding: 10px 14px;
  border-radius: var(--r);
  border: 1px solid var(--lkk);
  background: var(--lkk-soft);
  color: var(--lkk-deep);
  font-weight: 500;
}
.edit-banner.is-error {
  border-color: var(--lkk-deep);
  background: #fff5f5;
}

.file-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  display: flex; align-items: center; justify-content: center;
  min-height: var(--bar-h);
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  box-shadow: var(--shadow-bar);
}
.file-bar-inner {
  width: min(800px, 100%);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.file-bar .step-status {
  font-size: 13px; color: var(--muted); font-weight: 400;
}
.file-bar .step-status strong { color: var(--ink); font-weight: 500; }
.file-bar .primary { min-width: 120px; }

/* —— Review / confirmation —— */
.summary-card, .surface-card, .trend-edition {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 16px 18px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-card);
}
.summary-card h3, .surface-card h2, .trend-edition h2 {
  margin: 0 0 10px;
  font-size: 1.05rem;
  font-weight: 500;
}
.summary-card dl {
  margin: 0;
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 6px 12px;
  font-size: 13px;
}
.summary-card dt { color: var(--muted); font-weight: 400; }
.summary-card dd { margin: 0; font-weight: 500; }

#confirmation {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 24px;
  margin-top: 8px;
}
#confirmation h2 {
  margin: 0 0 8px;
  font-size: 1.25rem;
  font-weight: 500;
}
.draft-flag {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--wash);
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 16px;
}
.draft {
  white-space: pre-wrap;
  background: var(--wash);
  padding: 14px;
  border-radius: var(--r);
  font-size: 13px;
  overflow: auto;
}
.footer-save, .roadmap {
  margin: 24px 0 0;
  font-size: 12px;
  color: var(--muted);
}

/* —— Login (product entry) —— */
body.login-page {
  padding-bottom: 40px;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(224, 41, 35, 0.08), transparent 55%),
    linear-gradient(180deg, #F7F4EF 0%, var(--bg) 40%, var(--bg-deep) 100%);
}
body.login-page .app-header {
  background: transparent;
  border-bottom: none;
  box-shadow: none;
  backdrop-filter: none;
}
.login-wrap {
  width: min(420px, calc(100% - 32px));
  padding-top: 28px;
}
.login-hero {
  margin-bottom: 22px;
}
.login-hero .plaque {
  height: 44px; width: auto; margin-bottom: 18px;
}
.login-hero h1 {
  margin: 0 0 6px;
  font-size: clamp(1.55rem, 4vw, 1.85rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.login-hero p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  max-width: 34ch;
}
.login-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px 22px 18px;
  box-shadow: 0 8px 28px rgba(26, 26, 26, 0.06);
}
.login-panel .field { margin-bottom: 12px; }
.login-panel .actions { margin-top: 4px; }
.login-panel .actions .primary,
.login-panel .actions .secondary { width: 100%; }
.login-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 18px 0 14px;
  color: var(--muted); font-size: 12px;
}
.login-divider::before,
.login-divider::after {
  content: ""; flex: 1; height: 1px; background: var(--line);
}
.login-lark {
  display: flex; flex-direction: column; gap: 8px;
}
.login-lark .secondary { width: 100%; }
.login-lark .help { margin: 0; font-size: 12px; }
.uat-code-panel {
  margin: 12px 0;
  padding: 14px;
  background: var(--lkk-soft);
  border: 1.5px dashed var(--lkk);
  border-radius: var(--r);
  text-align: center;
}
.uat-code-label { margin: 0 0 6px; font-size: 12px; color: var(--muted); }
.uat-code-value {
  margin: 0;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  font-variant-numeric: tabular-nums;
  color: var(--lkk-deep);
}
.login-foot {
  margin-top: 18px;
  font-size: 12px;
  color: var(--muted);
  text-align: left;
  line-height: 1.4;
}

/* —— Calendar —— */
.row-tools {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end;
  margin-bottom: 16px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}
.row-tools .field { margin: 0; min-width: 200px; }
.month-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin: 16px 0;
}
.month-bar h2 { margin: 0; font-size: 1.15rem; font-weight: 500; }
.cal-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}
.cal { width: 100%; border-collapse: collapse; table-layout: fixed; }
.cal th {
  padding: 10px 6px;
  font-size: 12px; font-weight: 500;
  background: var(--wash);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}
.cal td {
  vertical-align: top;
  height: auto;
  min-height: 88px;
  padding: 6px;
  border: 1px solid var(--line);
  font-size: 12px;
}
.cal td.out { background: var(--wash); }
.cal td.today { box-shadow: inset 0 0 0 2px var(--lkk); }
.cal .day-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 76px;
}
.cal .num {
  display: block;
  font-weight: 600;
  font-size: 13px;
  color: var(--ink);
  line-height: 1.2;
  margin: 0 0 2px;
}
.cal .chip-stack {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}
.cal .chip {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 3px 6px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--team, #E02923) 18%, white);
  border: none;
  border-left: 3px solid var(--team, #E02923);
  color: var(--ink);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.25;
  white-space: normal;
  word-break: break-word;
  appearance: none;
  -webkit-appearance: none;
}
.legend { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.legend span {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--muted);
}
.legend .swatch {
  width: 12px; height: 12px; border-radius: 3px;
  background: var(--team, #E02923);
  flex: 0 0 auto;
}
.section-title {
  font-size: 1.05rem; font-weight: 500; margin: 24px 0 8px;
}

/* Date blocked notices (Leo) */
.date-block-notice {
  margin: 6px 0 10px;
  padding: 8px 10px;
  background: #FDECEC;
  border-left: 3px solid var(--lkk);
  border-radius: var(--r);
  color: var(--lkk-deep);
  font-size: 12px;
  font-weight: 500;
}
.date-block-notice:empty,
.date-block-notice[hidden] { display: none; }

.draft-preview-box {
  margin-top: 14px;
  padding: 12px;
  background: #FBF3E0;
  border: 1px solid #E8D4A8;
  border-radius: var(--r-lg);
}
.send-actions { flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.stepper li.is-reachable button { cursor: pointer; }
.stepper li.is-reachable:not(.is-done):not(.is-current) button { color: var(--muted); }
/* P26: Mission/Audience locked after Confirm & Send */
.stepper li.is-locked button { cursor: not-allowed; opacity: 0.55; }
.stepper li.is-locked button:disabled { pointer-events: auto; }

/* —— Trends —— */
.trend-edition { margin-bottom: 20px; }
.trend-edition h2 {
  margin: 0 0 4px;
  font-size: 1.1rem;
  font-weight: 500;
}
.trend-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.trend-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 12px;
  display: flex; flex-direction: column; gap: 8px;
  transition: border-color .12s, transform .12s;
}
.trend-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}
.trend-thumb {
  width: 100%; aspect-ratio: 4/5; object-fit: cover;
  border-radius: var(--r); background: var(--wash);
}
.trend-thumb.placeholder {
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: 12px;
}
.trend-card h3 { margin: 0; font-size: 0.95rem; font-weight: 500; }
.trend-meta { margin: 0; font-size: 12px; color: var(--muted); }

/* Taxonomy v2 filters + tags */
.trend-filters {
  margin-bottom: 16px;
  padding: 14px 16px;
}
.trend-filters h2 {
  margin: 0 0 10px;
  font-size: 1rem;
  font-weight: 500;
}
.trend-filter-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
}
.trend-filter-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.trend-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.trend-chip {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-family: inherit;
  font-size: 12px;
  line-height: 1.2;
  padding: 6px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: border-color .12s, background .12s, color .12s;
}
.trend-chip:hover {
  border-color: var(--lkk);
  color: var(--lkk-deep);
}
.trend-chip.is-active {
  background: var(--lkk);
  border-color: var(--lkk);
  color: #fff;
}
.trend-filter-hint { margin: 4px 0 0; }
.trend-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.trend-tag {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--wash);
  color: var(--ink-soft);
}
.trend-tag.cuisine {
  background: var(--lkk-soft);
  border-color: color-mix(in srgb, var(--lkk) 28%, transparent);
  color: var(--lkk-deep);
}
.trend-tag.dish {
  background: var(--gold-soft);
  border-color: color-mix(in srgb, var(--gold) 35%, transparent);
  color: #6B5420;
}
.trend-stamp {
  margin: 0;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.35;
}


/* Auth chip */
.auth-user-bar {
  display: flex; align-items: center; gap: 8px;
  margin-left: 4px;
  padding-left: 10px;
  border-left: 1px solid var(--line);
}
.auth-user-bar .auth-email {
  font-size: 12px; color: var(--muted); max-width: 150px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.auth-user-bar .auth-logout {
  min-height: 32px; padding: 0 10px; font-size: 12px;
}

@media (max-width: 720px) {
  .app-header { flex-wrap: wrap; padding: 8px 14px; gap: 8px; }
  .app-nav { margin-left: 0; width: 100%; }
  .brand-text { display: none; }
  .app-brand .bridge { display: none; }
  .summary-card dl { grid-template-columns: 1fr; }
  .file-bar-inner { flex-direction: column; align-items: stretch; }
  .file-bar .step-status { text-align: center; }
  .file-bar .actions { justify-content: stretch; }
  .file-bar .actions button:not(.ghost) { flex: 1; }
  .auth-user-bar {
    border-left: 0; padding-left: 0; margin-left: auto;
  }
  .auth-user-bar .auth-email { max-width: 110px; }
  .wrap, .wrap.wide { width: calc(100% - 28px); }
  .stepper button { flex-direction: column; align-items: flex-start; gap: 4px; padding: 8px; }
  .stepper .step-label { font-size: 11px; }
}
body.filing-done .file-bar { display: none; }
body[data-step="4"] .file-bar .primary#btn-submit { display: none; }

/* Legacy class used by trends.js empty/rollup */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 16px 18px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-card);
}
.card h2 { margin: 0 0 8px; font-size: 1.05rem; font-weight: 500; }

/* —— Deslop pass (screenshot critique) —— */
.wrap { width: min(860px, calc(100% - 40px)); }
.file-bar-inner { width: min(860px, 100%); }
.page-head { margin-bottom: var(--space-3); }
.stage {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px 20px 18px;
  box-shadow: var(--shadow-card);
  margin-bottom: 8px;
}
.stage-title { margin-top: 0; }
.stepper { margin-bottom: var(--space-4); }
.pick-card .pick-kicker { display: none; } /* marks + titles enough — less chrome */
.pick-card { gap: 5px; min-height: 112px; }
.file-bar .ghost { opacity: 0.55; }
.file-bar .ghost:hover { opacity: 1; }

body.login-page .app-header {
  justify-content: flex-start;
  padding-top: 8px;
}
.login-wrap { padding-top: 48px; }
.login-hero { margin-bottom: 18px; }
.login-hero h1 { font-size: clamp(1.7rem, 4vw, 2rem); }
.login-panel { padding: 24px; }
.login-panel .actions .primary { width: 100%; }
.status-pill {
  display: inline-flex; align-items: center;
  margin-left: 8px; vertical-align: middle;
  min-height: 22px; padding: 0 8px;
  border-radius: 999px;
  background: var(--warn-bg);
  color: var(--lkk-deep);
  font-size: 11px; font-weight: 500;
}
.trend-edition h2 { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.row-tools { margin-bottom: 12px; padding: 12px 14px; }
.month-bar { margin: 12px 0; }
.legend { margin-top: 4px; margin-bottom: 8px; }

/* field label: keep title + req on one line above control */
.field > input, .field > select, .field > textarea { margin-top: 0; }

/* Calendar removal request (Leo) */
.cal .chip {
  cursor: pointer;
  text-align: left;
  font-family: inherit;
}
.cal .chip:hover {
  filter: brightness(0.97);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--team, #E02923) 35%, transparent);
}
.cal .chip-pending {
  opacity: 0.85;
  border-style: dashed;
  border-left-style: solid;
}
.request-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.request-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: #fff;
}
.request-row.is-pending {
  border-color: #E8D4A8;
  background: #FBF3E0;
}
.request-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}
.request-meta strong { font-weight: 600; color: var(--ink); }
.request-meta span { font-size: 12px; color: var(--muted); }
.pending-badge {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #FDECEC;
  color: var(--lkk-deep);
  font-size: 11px;
  font-weight: 600;
  width: fit-content;
}
.request-actions { flex: 0 0 auto; }
.remove-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(20, 16, 14, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.remove-overlay[hidden] { display: none !important; }
.remove-panel {
  width: min(560px, 100%);
  max-height: min(90vh, 720px);
  overflow: auto;
  background: #fff;
  border-radius: var(--r-lg);
  padding: 20px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.18);
}
.remove-panel h2 {
  margin: 0 0 8px;
  font-size: 1.15rem;
  font-weight: 600;
}
.remove-panel .draft-text {
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 12px;
  line-height: 1.45;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 10px;
  max-height: 240px;
  overflow: auto;
  margin: 8px 0 0;
}
#remove-gate {
  color: var(--lkk-deep);
  background: #FDECEC;
  border-left: 3px solid var(--lkk);
  padding: 8px 10px;
  border-radius: var(--r);
}
.request-inline { margin-left: 8px; }

/* Community / PUGC brief attach */
.badge-optional {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  background: #F3F0EC;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  vertical-align: middle;
}
.file-field .file-label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
}
.file-field input[type="file"] {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--r);
  background: #FAF8F6;
  cursor: pointer;
}
.file-field input[type="file"]:hover {
  border-color: var(--lkk);
  background: #FDECEC;
}
.brief-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0;
}
#send-brief-attach-note {
  border-left: 3px solid var(--lkk);
  background: #FDECEC;
  padding: 10px 12px;
  border-radius: var(--r);
}

/* Month capacity (Leo 11 Oct — max 8 launches / month) */
.month-heading { text-align: center; }
.month-heading h2 { margin: 0; }
.month-cap-badge {
  margin: 4px 0 0;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}
.month-cap-badge.is-full {
  color: var(--lkk-deep);
  font-weight: 600;
}
/* P35-D: Tezign tokens — match ops-cap language (no slate pastel) */
.month-cap-meter {
  margin: 0 0 10px;
  padding: 8px 10px;
  background: var(--wash);
  border: 1px solid var(--line);
  border-left: 3px solid var(--line-strong);
  border-radius: var(--r);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink);
}
.month-cap-meter.is-full {
  background: var(--lkk-soft);
  border-left-color: var(--lkk);
  color: var(--lkk-deep);
}
.month-cap-meter[hidden] { display: none; }

/* —— Trends ops-shoot polish (12 Oct 2026) —— */
.trend-tabs {
  display: flex;
  gap: 4px;
  margin: 0 0 16px;
  padding: 4px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  flex-wrap: wrap;
  box-shadow: var(--shadow-card);
}
.trend-tabs [role="tab"] {
  appearance: none;
  font-family: inherit;
  font-weight: 500;
  font-size: 14px;
  border: 0;
  background: transparent;
  color: var(--muted);
  border-radius: var(--r);
  padding: 10px 16px;
  cursor: pointer;
  min-height: 40px;
  transition: background .12s, color .12s;
}
.trend-tabs [role="tab"]:hover {
  color: var(--ink);
  background: var(--wash);
}
.trend-tabs [role="tab"][aria-selected="true"] {
  color: var(--lkk-deep);
  background: var(--lkk-soft);
  box-shadow: inset 0 -2px 0 var(--lkk);
}
.trend-tabs [role="tab"]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(224, 41, 35, 0.22);
}
.trend-panel[hidden] { display: none !important; }

.shoot-grid {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}
.trend-card.shoot-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 14px;
  gap: 8px;
  box-shadow: var(--shadow-card);
  border-left: 3px solid var(--line-strong);
}
.trend-card.shoot-card:hover {
  border-color: var(--line-strong);
  border-left-color: var(--lkk);
  transform: translateY(-1px);
}
.trend-card.shoot-card.is-breakout {
  border-left-color: var(--lkk);
  /* P22: flat wash + left accent only — no gradient gimmick */
  background: var(--lkk-soft);
}
.trend-card.shoot-card.is-candidate {
  border-left-color: var(--gold);
}
.trend-card.shoot-card.is-stale {
  opacity: 0.92;
  border-left-color: #B8A992;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.trend-badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid transparent;
}
.trend-badge.breakout {
  background: var(--lkk);
  color: #fff;
  border-color: var(--lkk-deep);
}
.trend-badge.candidate {
  background: var(--gold-soft);
  color: #8A6E2F;
  border-color: color-mix(in srgb, var(--gold) 45%, transparent);
}
.trend-badge.stale {
  background: var(--wash);
  color: #7A6A55;
  border-color: var(--line-strong);
}

.shoot-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.25;
}
.trend-en {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.shoot-why, .shoot-format {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
}
.shoot-why strong, .shoot-format strong {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 2px;
}
.shoot-link {
  align-self: flex-start;
  font-size: 13px;
  font-weight: 500;
  color: var(--lkk-deep);
  margin-top: 2px;
}
.shoot-link:hover { text-decoration: underline; }

.insight-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.insight-table th,
.insight-table td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
}
.insight-table th {
  font-weight: 500;
  color: var(--muted);
  background: var(--wash);
  font-size: 12px;
}
.insight-row.heat-mid td:nth-child(3) {
  background: var(--gold-soft);
  font-weight: 500;
}
.insight-row.heat-high td:nth-child(3) {
  background: var(--lkk-soft);
  color: var(--lkk-deep);
  font-weight: 600;
}

.gap-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}
.gap-list li {
  background: var(--wash);
  border: 1px solid var(--line);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 13px;
}

.breakout-list, .edition-list {
  margin: 8px 0 0;
  padding-left: 18px;
  font-size: 13px;
  line-height: 1.5;
}
.algo-notes {
  padding: 14px 18px;
}
.algo-notes summary {
  cursor: pointer;
  font-weight: 500;
  font-size: 1.05rem;
  list-style: none;
}
.algo-notes summary::-webkit-details-marker { display: none; }
.algo-notes summary::before {
  content: "▸ ";
  color: var(--lkk);
  font-weight: 700;
}
.algo-notes[open] summary::before { content: "▾ "; }
.algo-notes ul {
  margin: 10px 0 0;
  padding-left: 18px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink);
}

@media (max-width: 720px) {
  .shoot-grid {
    grid-template-columns: 1fr;
  }
  .trend-tabs [role="tab"] {
    flex: 1;
    text-align: center;
  }
}


/* —— Polish pack P1 (12 Oct 2026) —— */
#community-brief-status.brief-missing-bytes {
  margin: 8px 0 0;
  padding: 10px 12px;
  background: var(--gold-soft);
  border-left: 3px solid var(--gold);
  border-radius: var(--r);
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
}
.brief-reattach-note {
  margin: 6px 0 0;
  padding: 6px 10px;
  background: var(--gold-soft);
  border-radius: var(--r);
  color: #8A6E2F;
  font-size: 12px;
}
.empty-state {
  margin: 8px 0;
  padding: 14px 16px;
  background: var(--wash);
  border: 1px dashed var(--line-strong);
  border-radius: var(--r);
  color: var(--muted);
  font-size: 13px;
}
.remove-pending-banner {
  margin: 0 0 12px;
}
.trend-badge.pending {
  background: var(--wash);
  color: var(--muted);
  border: 1px solid var(--line);
}

/* —— Polish pack P2 (12 Oct 2026) — denser form/calendar + trends ops —— */

/* A. Form denser — Details stage only */
.stage[data-stage="2"] {
  padding: 16px 16px 14px;
}
.stage[data-stage="2"] .field {
  gap: 4px;
  margin-bottom: 10px;
}
.stage[data-stage="2"] .help,
.stage[data-stage="2"] .note {
  margin-bottom: 8px;
}
.stage[data-stage="2"] .section {
  margin-bottom: var(--space-4);
}
.stage[data-stage="2"] .stage-hint {
  margin-bottom: 10px;
}
.stage[data-stage="2"] .screening-dims {
  gap: 8px;
  margin-bottom: 8px;
}
.stage[data-stage="2"] .screening-dim strong {
  margin-bottom: 4px;
}
.stage[data-stage="2"] .screening-block {
  margin-bottom: 10px;
  padding: 10px 12px;
}
.stage[data-stage="2"] .choice {
  margin: 0 6px 6px 0;
  min-height: 36px;
  padding: 4px 10px;
}
.stage[data-stage="2"] .month-cap-meter {
  margin: 0 0 6px;
  padding: 4px 8px;
  font-size: 11px;
  line-height: 1.35;
  display: inline-block;
  width: fit-content;
  max-width: 100%;
}

/* Sticky bottom bar — slightly less airy, keep 44px taps */
:root { --bar-h: 60px; }
.file-bar {
  padding: 6px 14px;
  min-height: var(--bar-h);
}

/* B. Calendar denser */
.row-tools {
  gap: 8px;
  margin-bottom: 10px;
  padding: 10px 12px;
}
.legend {
  gap: 6px;
  margin-bottom: 6px;
  margin-top: 2px;
}
.month-bar { margin: 8px 0; }
#month-cap-rule {
  margin-bottom: 10px;
  padding: 8px 10px;
  font-size: 12px;
  line-height: 1.4;
}
.cal td {
  min-height: 72px;
  padding: 4px;
}
.cal .day-cell {
  gap: 2px;
  min-height: 64px;
}
.cal .chip-stack { gap: 2px; }
.cal .chip {
  padding: 2px 5px;
  font-size: 10.5px;
  line-height: 1.2;
}
.request-list { gap: 6px; }
.request-row {
  gap: 8px;
  padding: 8px 10px;
}
.request-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.request-actions button,
.request-actions a.btn {
  min-height: 36px;
  padding: 0 12px;
  font-size: 13px;
}
.request-inline {
  margin-left: 6px;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  vertical-align: middle;
}
.section-title { margin: 16px 0 6px; }

/* C. Trends ops clarity */
.ops-criteria-strip {
  margin: 0 0 12px;
  padding: 8px 12px;
  background: var(--wash);
  border: 1px solid var(--line);
  border-left: 3px solid var(--lkk);
  border-radius: var(--r);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.4;
}
.ops-criteria-strip[hidden] { display: none !important; }
.mos-fit {
  margin: 0;
  font-size: 12px;
  color: var(--ink);
}
.mos-fit.is-pending {
  color: var(--muted);
}
.mos-fit.is-pending .trend-badge {
  margin-left: 4px;
  vertical-align: middle;
}


/* —— Polish pack P3 (12 Oct 2026) — Send/Confirm + overlay + archive + edit exit —— */

/* A. Send trial callout + mailto help */
.trial-send-callout {
  margin: 0 0 10px;
  font-weight: 500;
}
.mailto-fallback-help {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--muted);
}
.stage[data-stage="4"] .stage-hint { margin-bottom: 10px; }
.stage[data-stage="4"] .send-actions .ghost#open-mailto,
.send-actions #open-mailto {
  opacity: 0.85;
  font-weight: 400;
}

/* A. Confirm denser summary */
.stage[data-stage="3"] .summary-card {
  padding: 12px 14px;
  margin-bottom: 12px;
}
.stage[data-stage="3"] .summary-card h3 {
  margin: 0 0 6px;
  font-size: 1rem;
}
.stage[data-stage="3"] .summary-card dl {
  gap: 3px 10px;
  font-size: 12.5px;
  line-height: 1.35;
}
.stage[data-stage="3"] .stage-hint { margin-bottom: 8px; }

/* B. Calendar remove overlay denser + action hierarchy */
.remove-panel {
  padding: 14px 16px;
  gap: 0;
}
.remove-panel h2 { margin: 0 0 6px; }
.remove-panel > .note,
.remove-panel > .warn,
.remove-panel > .field {
  margin-bottom: 8px;
}
.remove-panel .field { gap: 4px; }
.remove-panel .field textarea { min-height: 64px; }
.remove-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 4px;
  margin-bottom: 8px;
}
.remove-actions-row .btn-danger {
  order: 0;
}
.remove-actions-row #remove-cancel {
  margin-left: auto;
}
.remove-pending-banner {
  margin: 0 0 8px;
}

/* C. Edit exit — Back to calendar */
.edit-back-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: -4px 0 12px;
}
.edit-back-row[hidden] { display: none !important; }
.edit-back-row .help { margin: 0; }
a.edit-back-cal.btn.ghost,
.edit-back-cal {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid var(--line-strong);
  border-radius: var(--r);
  background: transparent;
  color: var(--ink);
}
a.edit-back-cal.btn.ghost:hover,
.edit-back-cal:hover {
  border-color: var(--lkk);
  color: var(--lkk-deep);
  background: var(--lkk-soft);
}

/* D. Trends edition archive denser */
.edition-archive { padding: 12px 14px; }
.edition-list.denser {
  margin: 4px 0 0;
  padding-left: 16px;
  font-size: 12.5px;
  line-height: 1.35;
}
.edition-list.denser li {
  margin: 0 0 4px;
}
.edition-list .edition-meta {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}
.edition-list a {
  color: var(--lkk-deep);
  text-decoration: none;
  font-weight: 500;
}
.edition-list a:hover { text-decoration: underline; }

/* E. Login denser panel (match P2 density language) */
.login-panel-dense,
.login-panel {
  padding: 18px 18px 14px;
}
.login-panel-dense .field { margin-bottom: 10px; }
.login-panel-dense .login-divider { margin: 14px 0 12px; }

/* —— Polish pack P4 (12 Oct 2026) — mission/audience density + calendar/form/trends edges —— */

/* A. Stage 0 mission cards denser (keep type accent + mark + ≥44px tap) */
.stage[data-stage="0"] {
  padding: 16px 16px 14px;
}
.stage[data-stage="0"] .stage-hint { margin-bottom: 10px; }
.stage[data-stage="0"] .card-grid { gap: 8px; }
.stage[data-stage="0"] .pick-card {
  gap: 4px;
  min-height: 104px;
  padding: 12px 12px 10px;
}
.stage[data-stage="0"] .pick-card.is-selected {
  padding: 11.5px 11.5px 9.5px;
}
.stage[data-stage="0"] .pick-mark {
  width: 28px; height: 28px;
  margin-bottom: 0;
  border-radius: 8px;
  font-size: 11px;
}
.stage[data-stage="0"] .pick-card .pick-title { font-size: 14px; }
.stage[data-stage="0"] .pick-card .pick-meta { font-size: 12px; line-height: 1.3; }

/* A. Stage 1 audience tighter team/group stack (keep required help) */
.stage[data-stage="1"] {
  padding: 16px 16px 14px;
}
.stage[data-stage="1"] .stage-hint { margin-bottom: 10px; }
.stage[data-stage="1"] .section { margin-bottom: 12px; }
.stage[data-stage="1"] .section > .section-label { margin-bottom: 6px; }
.stage[data-stage="1"] .card-grid { gap: 8px; }
.stage[data-stage="1"] #team-tiles .pick-card {
  min-height: 72px;
  padding: 10px 12px;
  gap: 4px;
}
.stage[data-stage="1"] #team-tiles .pick-card.is-selected {
  padding: 9.5px 11.5px;
}
.stage[data-stage="1"] #team-people { margin: 4px 0 0; }
.stage[data-stage="1"] .checks { gap: 6px; }
.stage[data-stage="1"] .check {
  padding: 10px 12px;
  min-height: 48px;
  gap: 10px;
}
.stage[data-stage="1"] .check:has(input:checked) {
  padding: 9.5px 11.5px;
}
.stage[data-stage="1"] .help { margin-bottom: 6px; }

/* B. Calendar — chip focus ring + stable month/grid height (less filter jump) */
.cal .chip:focus-visible {
  outline: none;
  box-shadow: var(--focus);
  position: relative;
  z-index: 1;
}
.month-heading {
  min-height: 3.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.month-cap-badge {
  min-height: 1.2em;
  line-height: 1.3;
}
.cal-scroll {
  min-height: 400px;
}
.cal tbody#cal-body {
  min-height: 360px;
}
.cal td {
  height: 1%;
}

/* C. Form — month-cap block notices compact when full; meter kept */
.date-block-notice {
  margin: 4px 0 8px;
  padding: 6px 8px;
  font-size: 11.5px;
  line-height: 1.35;
}
.stage[data-stage="2"] .date-block-notice {
  margin: 2px 0 6px;
  padding: 5px 8px;
}

/* E. Auth bar denser / aligned with P2 header density */
.auth-user-bar {
  gap: 6px;
  margin-left: 2px;
  padding-left: 8px;
}
.auth-user-bar .auth-email {
  font-size: 11px;
  max-width: 136px;
  line-height: 1.2;
}
.auth-user-bar .auth-logout {
  min-height: 28px;
  padding: 0 8px;
  font-size: 11px;
  font-weight: 500;
}
@media (max-width: 720px) {
  .auth-user-bar .auth-email { max-width: 96px; }
  .auth-user-bar .auth-logout { min-height: 28px; }
}

/* D. Trends — truncated title/handle get full string via title attr (JS); keep badges */
.shoot-title,
.trend-meta {
  overflow: hidden;
  text-overflow: ellipsis;
}
.shoot-card .trend-meta {
  white-space: nowrap;
}

/* —— Polish pack P5 (12 Oct 2026) — mobile + motion + chip cap + post-send + overlay —— */

/* A. Mobile density — sticky bar, calendar tools, overlay */
@media (max-width: 720px) {
  .file-bar {
    padding: 8px 12px;
    padding-bottom: max(8px, env(safe-area-inset-bottom, 0px));
  }
  .file-bar-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .file-bar .step-status {
    text-align: center;
    font-size: 12px;
  }
  .file-bar .actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: stretch;
  }
  .file-bar .actions button,
  .file-bar .actions .btn {
    min-height: 44px;
  }
  .file-bar .actions #btn-back,
  .file-bar .actions .primary {
    flex: 1 1 auto;
    min-width: 120px;
  }
  .row-tools {
    flex-direction: column;
    align-items: stretch;
  }
  .row-tools .field {
    min-width: 0;
    width: 100%;
  }
  .month-bar {
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
  }
  .month-bar #prev-month,
  .month-bar #next-month {
    min-height: 44px;
    flex: 1 1 40%;
  }
  .month-heading {
    order: -1;
    width: 100%;
  }
  /* Overlay: near full-width, scrollable, actions wrap — never hide Force/Edit */
  .remove-overlay {
    align-items: flex-end;
    padding: 0;
  }
  .remove-panel {
    width: 100%;
    max-width: 100%;
    max-height: min(92vh, 100%);
    border-radius: 16px 16px 0 0;
    padding: 14px 14px calc(14px + env(safe-area-inset-bottom, 0px));
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }
  .remove-actions-row {
    flex-wrap: wrap;
    gap: 8px;
  }
  .remove-actions-row #remove-cancel {
    margin-left: 0;
  }
  .remove-actions-row .btn,
  .remove-actions-row button,
  .remove-actions-row a.btn {
    min-height: 44px;
  }
  .auth-user-bar .auth-email {
    max-width: 120px;
    font-size: 11px;
  }
}
@media (max-width: 640px) {
  .card-grid { grid-template-columns: 1fr; }
  .stage[data-stage="0"] .card-grid,
  .stage[data-stage="1"] .card-grid { grid-template-columns: 1fr; }
  .cal th { padding: 8px 2px; font-size: 11px; }
  .cal td { padding: 4px; min-height: 72px; }
  .cal .chip { font-size: 10px; padding: 2px 4px; }
}

/* B. Reduced motion — keep opacity instant; kill hover transforms / long transitions */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .pick-card,
  .pick-card:hover,
  .pick-card:active,
  .pick-card.is-selected,
  button.primary:active,
  button.secondary:active,
  button.btn-danger:active,
  .trend-card:hover,
  .trend-card.shoot-card:hover {
    transform: none !important;
  }
}

/* C. Calendar chip overflow — +N more control */
.cal .chip-more {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin-top: 2px;
  padding: 4px 6px;
  border: 1px dashed var(--line-strong);
  border-radius: 6px;
  background: var(--wash);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  font-family: inherit;
  line-height: 1.25;
  cursor: pointer;
  text-align: left;
  appearance: none;
  -webkit-appearance: none;
  min-height: 28px;
}
.cal .chip-more:hover {
  border-color: var(--lkk);
  color: var(--lkk-deep);
  background: var(--lkk-soft);
}
.cal .chip-more:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}
.cal .day-cell.is-expanded .chip-stack {
  /* expanded: all chips visible; no artificial max-height */
}

/* D. Post-send next-action row */
.send-next-row {
  margin: 14px 0 0;
  padding: 12px 14px;
  background: var(--wash);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}
.send-next-row[hidden] { display: none !important; }
.send-next-row .send-next-label {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  /* P22: sentence case — no ALL-CAPS eyebrow */
  text-transform: none;
  letter-spacing: normal;
  flex: 0 0 auto;
}
.send-next-row .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex: 1 1 auto;
}
.send-next-row .actions .primary,
.send-next-row .actions .btn,
.send-next-row .actions button {
  min-height: 44px;
}
.send-next-row.is-ready {
  background: var(--lkk-soft);
  border-color: var(--lkk);
}
.send-next-row.is-ready .send-next-label {
  color: var(--lkk-deep);
}
#copy-status.send-status-ok {
  color: var(--ok);
  font-weight: 500;
}

/* E. Overlay backdrop — click outside panel closes (JS); cursor hint */
.remove-overlay {
  cursor: pointer;
}
.remove-overlay .remove-panel {
  cursor: default;
}

/* ===== Polish pack P6 (12 Oct 2026) ===== */

/* B. Stepper current label under strip */
.stepper-current-label {
  margin: -8px 0 var(--space-4);
  padding: 0 4px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.35;
}
.stepper-current-label strong {
  color: var(--ink);
  font-weight: 500;
}
.stepper li.is-done button {
  text-decoration: none;
}
.stepper li.is-done button:hover .step-label {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* C. Calendar JSON export label */
.export-json-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 0;
}
.export-json-wrap .export-json-help {
  margin: 0;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.3;
}
#download-all {
  white-space: normal;
  text-align: left;
  max-width: 280px;
  line-height: 1.3;
}

/* D. Trends filter empty + reset */
.trend-filter-reset-row {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
button.trend-reset-filters {
  min-height: 36px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
}
button.trend-reset-filters:disabled {
  opacity: 0.45;
  cursor: default;
}
.insight-table .insight-empty-row td {
  color: var(--muted);
  font-style: italic;
  padding: 14px 10px;
  text-align: center;
}

/* E. Calendar Show less (same chip-more base + quieter) */
.cal .chip-more.chip-less {
  border-style: solid;
  color: var(--muted);
  background: transparent;
}
.cal .chip-more.chip-less:hover {
  border-color: var(--line-strong);
  color: var(--ink);
  background: var(--wash);
}


/* ===== Polish pack P7 (12 Oct 2026) ===== */
/* A. Import filings (JSON) — pairs with P6 export wrap */
.import-json-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 14px;
  margin: 0;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  border-radius: var(--r);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  white-space: normal;
  text-align: left;
  max-width: 280px;
}
.import-json-label:hover {
  border-color: var(--lkk);
  color: var(--lkk-deep);
}
.import-json-label:focus-within {
  outline: none;
  box-shadow: 0 0 0 3px rgba(224, 41, 35, 0.22);
}
#import-status,
.import-status {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.35;
  max-width: 320px;
  color: var(--muted);
}
#import-status.is-error,
.import-status.is-error {
  color: var(--lkk-deep);
}

/* B. Saved requests search */
.saved-search-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px 16px;
  margin: 0 0 12px;
}
.saved-search-field {
  flex: 1 1 220px;
  margin: 0;
  max-width: 360px;
}
.saved-search-field input[type="search"] {
  width: 100%;
}
#saved-search-count {
  margin: 0 0 6px;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

/* C. Calendar force toast — leave #month-cap-rule alone */
.cal-toast {
  position: fixed;
  z-index: 80;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  max-width: min(440px, calc(100vw - 32px));
  padding: 10px 16px;
  border-radius: var(--r);
  border: 1px solid var(--line-strong);
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  pointer-events: none;
}
.cal-toast[hidden] {
  display: none !important;
}
@media (prefers-reduced-motion: reduce) {
  .cal-toast {
    transition: none;
  }
}

/* ===== Polish pack P8 (12 Oct 2026) ===== */
/* A. Skip link — visually hidden until keyboard focus */
.skip-link {
  position: absolute;
  left: 12px;
  top: 8px;
  z-index: 100;
  padding: 8px 14px;
  border-radius: var(--r);
  background: var(--lkk);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: var(--focus);
  /* off-screen until focus */
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  width: 1px;
  height: 1px;
  overflow: hidden;
  white-space: nowrap;
}
.skip-link:focus,
.skip-link:focus-visible {
  clip: auto;
  clip-path: none;
  width: auto;
  height: auto;
  overflow: visible;
  outline: none;
}

/* B. Soft duplicate launch/mission warn */
.dup-launch-warn {
  margin: 8px 0 0;
  padding: 8px 12px;
  border-left: 3px solid var(--gold);
  background: var(--gold-soft);
  color: var(--ink);
  font-size: 13px;
  line-height: 1.4;
}
.dup-launch-warn[hidden] {
  display: none !important;
}

/* C. Clear this browser's filings — ghost / danger-adjacent */
.clear-local-btn,
button.ghost.clear-local-btn {
  margin-top: 4px;
  color: var(--lkk-deep);
  border: 1px solid transparent;
  font-size: 12px;
  font-weight: 600;
  opacity: 0.85;
  align-self: flex-start;
}
.clear-local-btn:hover,
button.ghost.clear-local-btn:hover {
  opacity: 1;
  color: var(--lkk-deep);
  background: var(--lkk-soft);
  border-color: rgba(224, 41, 35, 0.25);
}
.clear-local-btn:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

/* D. Trends Copy link meta */
.shoot-link-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-top: 8px;
}
.shoot-link-row .shoot-link {
  margin-top: 0;
}
button.ghost.shoot-copy-link {
  min-height: 32px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
}
button.ghost.shoot-copy-link:hover {
  color: var(--lkk-deep);
  border-color: var(--lkk);
  background: var(--lkk-soft);
}
.shoot-copy-status {
  font-size: 12px;
  font-weight: 600;
  color: var(--ok);
}
.shoot-copy-status[hidden] {
  display: none !important;
}

/* ===== Polish pack P9 (12 Oct 2026) ===== */

/* A. Print — hide chrome; ink-friendly body */
@media print {
  .skip-link,
  .app-header,
  .app-nav,
  .file-bar,
  #file-bar,
  #auth-user-bar,
  .auth-user-bar,
  .remove-overlay,
  .kb-help-overlay,
  #cal-toast,
  .cal-toast,
  .send-next-row,
  .edit-back-row,
  #draft-resume-banner,
  #offline-banner,
  .offline-banner,
  #trends-back-top,
  .trends-back-top,
  #copy-draft-cue,
  .copy-draft-cue {
    display: none !important;
  }
  body {
    background: #fff !important;
    color: #000 !important;
  }
  .wrap,
  .wrap.wide,
  main {
    max-width: none !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  .stage,
  .stage-panel,
  .confirm-summary,
  .draft-preview-box,
  .trend-card,
  .cal,
  .day-cell {
    background: #fff !important;
    box-shadow: none !important;
    border-color: #ccc !important;
    color: #000 !important;
  }
  .app-brand img { max-height: 28px; }
  a { color: #000; text-decoration: underline; }
  .month-cap-bar-track,
  .month-cap-bar-fill {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}

/* B. Sticky trends tabs under brand header (keep ops strip flow) */
.trend-tabs {
  position: sticky;
  top: var(--header-h);
  z-index: 30;
  margin-bottom: 12px;
  background: var(--surface);
  /* solid enough while stuck over scrolling cards */
  /* P22: single elevation — no soft grey stack */
  box-shadow: none;
  border-bottom: 1px solid var(--line);
}
.ops-criteria-strip {
  /* stays below sticky tabs in document flow (P2) */
  position: relative;
  z-index: 1;
}

/* C. Mid-filing draft resume banner */
#draft-resume-banner,
.draft-resume-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--lkk);
  border-radius: var(--r);
  background: var(--lkk-soft);
  font-size: 13px;
  color: var(--ink);
}
.draft-resume-banner[hidden] {
  display: none !important;
}
.draft-resume-banner .draft-resume-msg {
  flex: 1 1 160px;
  margin: 0;
  font-weight: 500;
}
.draft-resume-banner .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
}

/* D. Keyboard help — reuse remove-overlay tokens */
.kb-help-overlay {
  z-index: 90;
}
.kb-help-panel {
  max-width: 420px;
}
.kb-help-list {
  margin: 0 0 16px;
  padding-left: 1.15em;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink);
}
.kb-help-list li {
  margin-bottom: 6px;
}
.kb-help-list kbd {
  display: inline-block;
  min-width: 1.4em;
  padding: 1px 6px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--wash);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
}

/* E. Month-cap proportion bar */
.month-cap-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}
.month-cap-wrap .month-cap-badge {
  margin: 0;
}
.month-cap-bar-track {
  width: min(220px, 70vw);
  height: 6px;
  border-radius: 999px;
  background: var(--wash);
  border: 1px solid var(--line);
  overflow: hidden;
}
.month-cap-bar-fill {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: var(--line-strong);
  transition: width 0.18s ease, background 0.18s ease;
}
.month-cap-bar-fill.is-mid {
  background: var(--lkk-mid);
}
.month-cap-bar-fill.is-full,
.month-cap-wrap.is-full .month-cap-bar-fill {
  background: var(--lkk);
}
.month-cap-wrap.is-full .month-cap-bar-track {
  border-color: rgba(224, 41, 35, 0.35);
  background: var(--lkk-soft);
}
@media (prefers-reduced-motion: reduce) {
  .month-cap-bar-fill {
    transition: none;
  }
}

/* ===== Polish pack P10 (12 Oct 2026) ===== */

/* A. Dynamic --header-h is set by header-height.js; keep CSS fallback */
:root {
  --header-h: 60px;
}

/* B. Draft resume timestamp cue */
.draft-resume-banner .draft-resume-time {
  flex: 0 1 auto;
  margin: 0;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
}
.draft-resume-banner .draft-resume-time[hidden] {
  display: none !important;
}

/* C. Confirm — Print this summary (hidden in print) */
.confirm-extra-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 12px;
}
#confirm-print {
  min-height: 40px;
}
@media print {
  .confirm-extra-actions,
  #confirm-print,
  .cal-today-btn,
  #jump-today {
    display: none !important;
  }
}

/* D. Calendar Jump to today */
.month-heading .cal-today-btn,
#jump-today.cal-today-btn {
  margin-top: 4px;
  min-height: 36px;
  min-width: 64px;
  padding: 4px 12px;
  font-size: 13px;
  font-weight: 500;
}
.cal td.today:focus {
  outline: 2px solid var(--focus, var(--lkk));
  outline-offset: 1px;
}
.cal td.today-flash {
  animation: today-flash 0.85s ease;
}
@keyframes today-flash {
  0%, 100% { background-color: transparent; }
  35% { background-color: var(--lkk-soft); }
}
@media (prefers-reduced-motion: reduce) {
  .cal td.today-flash {
    animation: none;
    background-color: var(--lkk-soft);
  }
}
@media (max-width: 640px) {
  .month-heading .cal-today-btn,
  #jump-today.cal-today-btn {
    min-height: 44px;
    min-width: 72px;
    width: 100%;
    max-width: 200px;
  }
}


/* ===== Polish pack P11 (12 Oct 2026) ===== */

/* A. Offline / reconnect banner (client-only) */
#offline-banner,
.offline-banner {
  margin: 0;
  padding: 8px 16px;
  border: none;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  border-left: 0;
  background: var(--wash);
  color: var(--ink);
  font-size: 13px;
  line-height: 1.4;
  text-align: center;
}
#offline-banner[hidden],
.offline-banner[hidden] {
  display: none !important;
}

/* DI harden B6: UAT / not-production environment label (hidden on prod host by JS) */
.uat-env-banner {
  margin: 0;
  padding: 6px 16px;
  background: #FFF4CC;
  color: #5C4200;
  border-bottom: 2px solid #E0A800;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
}
@media print {
  .uat-env-banner {
    display: none !important;
  }
}

/* B. Copy draft cue near control (Send step) */
.copy-draft-cue {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 2px 10px;
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: var(--ink);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  pointer-events: none;
}
.copy-draft-cue.is-fail {
  background: var(--wash);
  color: var(--ink);
  border-color: var(--line-strong);
  font-weight: 500;
}
.copy-draft-cue[hidden] {
  display: none !important;
}

/* C. Trends Back to top */
.trends-back-top {
  position: fixed;
  z-index: 70;
  right: 16px;
  bottom: 24px;
  min-width: 48px;
  min-height: 44px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
  cursor: pointer;
}
.trends-back-top:hover {
  background: var(--wash);
  border-color: var(--lkk);
  color: var(--lkk-deep);
}
.trends-back-top:focus-visible {
  outline: 2px solid var(--lkk);
  outline-offset: 2px;
}
.trends-back-top[hidden] {
  display: none !important;
}
@media (max-width: 640px) {
  .trends-back-top {
    right: 12px;
    bottom: 16px;
    min-width: 48px;
    min-height: 44px;
  }
}


/* —— Polish pack P12 (12 Oct 2026) —— */

/* A. Form sticky draft-saved cue in file-bar */
.file-bar-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  min-width: 0;
  flex: 1 1 auto;
}
.file-bar-status .step-status { margin: 0; }

.draft-saved-cue {
  display: inline-flex;
  align-items: center;
  flex: 0 1 auto;
  min-height: 24px;
  padding: 2px 10px;
  margin: 0 4px;
  border-radius: var(--r);
  border: 1px solid transparent;
  background: var(--wash);
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3;
  opacity: 0;
  transition: opacity .35s ease;
  pointer-events: none;
  white-space: nowrap;
}
.draft-saved-cue.is-visible {
  opacity: 1;
  border-color: var(--line);
}
.draft-saved-cue[hidden] {
  display: none !important;
}
@media (prefers-reduced-motion: reduce) {
  .draft-saved-cue { transition: none; }
}

/* B. Calendar Clear search + denser empty */
.empty-state-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin: 4px 0 8px;
}
.empty-state-wrap .empty-state {
  margin: 0;
}
button.ghost.clear-search-btn {
  min-height: 44px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--lkk-deep);
  border-color: var(--line);
  background: var(--surface);
}
button.ghost.clear-search-btn:hover {
  border-color: var(--lkk);
  background: var(--lkk-soft);
}
button.ghost.clear-search-btn:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

/* C. Trends edition archive denser + Open / Copy */
.edition-list.edition-list-p12,
.edition-list.denser.edition-list-p12 {
  list-style: none;
  padding-left: 0;
  margin: 2px 0 0;
}
.edition-list-p12 .edition-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 12px;
  margin: 0;
  padding: 5px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12.5px;
  line-height: 1.3;
}
.edition-list-p12 .edition-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.edition-main {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
  min-width: 0;
  flex: 1 1 200px;
}
.edition-list-p12 .edition-meta {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  font-size: 11.5px;
}
.edition-list-p12 .edition-title {
  color: var(--ink);
  font-weight: 500;
}
.edition-actions {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  flex: 0 0 auto;
}
a.edition-open {
  color: var(--lkk-deep);
  font-weight: 600;
  font-size: 12.5px;
  text-decoration: none;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  padding: 0 4px;
}
a.edition-open:hover { text-decoration: underline; }
a.edition-open:focus-visible {
  outline: none;
  box-shadow: var(--focus);
  border-radius: 4px;
}
button.ghost.edition-copy-link {
  min-height: 32px;
  min-width: 44px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  border-color: var(--line);
  background: transparent;
}
button.ghost.edition-copy-link:hover {
  color: var(--lkk-deep);
  border-color: var(--lkk);
  background: var(--lkk-soft);
}
button.ghost.edition-copy-link:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

/* D. Login focus-visible + error scroll target readability */
.login-page #email:focus-visible,
.login-page #code:focus-visible {
  outline: none;
  border-color: var(--lkk);
  box-shadow: var(--focus);
}
.login-page #btn-request-code:focus-visible,
.login-page #btn-verify:focus-visible,
.login-page #btn-lark:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}
.login-page .error:not(:empty) {
  scroll-margin: 12px;
}


/* —— Polish pack P13 (12 Oct 2026) —— */

/* A. Form — denser Screening block (keep ≥44px taps + CRM options) */
#screening-fields .screening-block {
  margin-bottom: 8px;
  padding: 8px 10px;
}
#screening-fields .screening-dims {
  gap: 6px;
  margin-bottom: 6px;
}
#screening-fields .screening-dim strong {
  margin-bottom: 2px;
  font-size: 12.5px;
}
#screening-fields .screening-block > p {
  margin: 0 0 4px;
}
#screening-fields .screening-block > p.help,
#screening-fields .help {
  margin-bottom: 6px;
  font-size: 12px;
  line-height: 1.35;
}
#screening-fields .choice {
  margin: 0 4px 4px 0;
  min-height: 44px;
  padding: 6px 10px;
}
#screening-fields .field {
  gap: 4px;
  margin-bottom: 6px;
}
#screening-fields textarea {
  min-height: 56px;
}
#screening-fields #screening-survey {
  min-height: 88px;
}
#screening-fields .checks-inline {
  gap: 0;
}

/* B. Calendar — denser clash list + Jump */
.clash-list {
  margin: 0 0 16px;
}
.clash-list .clash-empty {
  margin: 0;
  font-size: 12.5px;
  color: var(--muted);
}
.clash-rows {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.clash-row {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 6px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
}
.clash-jump-range {
  flex: 1 1 220px;
  justify-content: flex-start;
  text-align: left;
  min-height: 44px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
  white-space: normal;
  border: 1px solid transparent;
  color: var(--ink);
}
.clash-jump-range:hover:not(:disabled) {
  border-color: var(--lkk);
  background: var(--lkk-soft);
  color: var(--lkk-deep);
  text-decoration: none;
}
.clash-jump-range:disabled {
  opacity: 0.55;
  cursor: default;
}
.clash-jump-btn {
  flex: 0 0 auto;
  min-height: 44px;
  min-width: 64px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
}
.clash-jump-btn:disabled {
  opacity: 0.45;
  cursor: default;
}
@media (max-width: 640px) {
  .clash-jump-btn {
    min-height: 44px;
  }
}

/* C. Trends — denser L1/L2 filter toolbar + sticky under tabs */
.trend-filters {
  position: sticky;
  top: calc(var(--header-h, 60px) + 44px);
  z-index: 25;
  margin-bottom: 10px;
  padding: 8px 10px;
  background: var(--surface);
  /* P22: single elevation — no soft grey stack */
  box-shadow: none;
  border-bottom: 1px solid var(--line);
}
.trend-filters h2 {
  margin: 0 0 6px;
  font-size: 0.92rem;
}
.trend-filter-row {
  gap: 4px;
  margin-bottom: 6px;
}
.trend-filter-label {
  font-size: 11px;
}
.trend-chip-row {
  gap: 4px;
}
.trend-chip {
  padding: 5px 9px;
  font-size: 11.5px;
  min-height: 32px;
}
.trend-filter-reset-row {
  margin-top: 6px;
}
button.trend-reset-filters {
  min-height: 36px;
  padding: 4px 10px;
  font-size: 12px;
}
@media (max-width: 640px) {
  .trend-filters {
    top: calc(var(--header-h, 60px) + 40px);
    padding: 6px 8px;
  }
  .trend-chip {
    min-height: 36px;
    padding: 6px 10px;
  }
}

/* D. Confirm — Copy summary (distinct from Send Copy draft) */
#confirm-copy-summary {
  min-height: 40px;
}
.copy-summary-cue {
  margin-left: 2px;
}
@media print {
  #confirm-copy-summary,
  .copy-summary-cue {
    display: none !important;
  }
}

/* ===== Polish pack P14 (12 Oct 2026) ===== */

/* A. Sticky stepper under measured --header-h (Details+ / step ≥1) */
.stepper-sticky {
  margin: 0 0 var(--space-4);
}
.stepper-sticky .stepper {
  margin-bottom: 0;
}
.stepper-sticky .stepper-current-label {
  margin: 6px 0 0;
  padding: 0 4px 2px;
}
body:not([data-step="0"]) .stepper-sticky {
  position: sticky;
  top: var(--header-h, 60px);
  z-index: 28;
  padding: 6px 0 4px;
  background: var(--bg);
  /* P22: single elevation — 1px line only */
  box-shadow: none;
  border-bottom: 1px solid var(--line);
}
@media (prefers-reduced-motion: reduce) {
  body:not([data-step="0"]) .stepper-sticky {
    box-shadow: none;
    border-bottom: 1px solid var(--line);
  }
}
@media print {
  .stepper-sticky {
    position: static !important;
    box-shadow: none !important;
  }
}

/* B. Calendar — denser team filter chips + All teams clear */
.team-filter-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-width: 0;
  flex: 1 1 240px;
}
.team-filter-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.3;
}
.team-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}
.team-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 32px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  line-height: 1.2;
}
.team-filter-chip::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--team, var(--line-strong));
  flex: 0 0 auto;
}
.team-filter-chip[data-team="all"]::before {
  background: var(--muted);
  opacity: 0.45;
}
.team-filter-chip.is-active {
  border-color: var(--lkk);
  background: var(--lkk-soft);
  color: var(--lkk-deep);
  box-shadow: inset 0 0 0 1px rgba(224, 41, 35, 0.18);
}
.team-filter-chip:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(224, 41, 35, 0.22);
}
@media (max-width: 640px) {
  .team-filter-chip {
    min-height: 36px;
    padding: 6px 10px;
  }
}
/* Keep legend denser (P2); chips are the interactive filter */
.legend {
  gap: 4px 8px;
  margin-bottom: 6px;
}

/* C. Trends — denser Shoot card metrics row */
.trend-card.shoot-card {
  padding: 12px;
  gap: 6px;
}
.shoot-card .shoot-metrics {
  margin: 0;
  padding: 4px 0 0;
  font-size: 11.5px;
  line-height: 1.35;
  color: var(--muted);
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.shoot-card .shoot-why,
.shoot-card .shoot-format,
.shoot-card .mos-fit {
  margin: 0;
  line-height: 1.35;
}
.shoot-card .trend-meta {
  margin: 0;
  line-height: 1.3;
}

/* D. Send stage — denser trial callout + To field stack */
.stage[data-stage="4"] .trial-send-callout {
  margin: 0 0 6px;
  padding: 8px 10px;
  font-size: 13px;
  line-height: 1.35;
}
.stage[data-stage="4"] .stage-hint {
  margin-bottom: 6px;
  line-height: 1.35;
}
.stage[data-stage="4"] .section {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
}
.stage[data-stage="4"] .section .field {
  gap: 3px;
  margin: 0;
}
.stage[data-stage="4"] .section .help {
  margin: 0 0 2px;
  font-size: 11.5px;
  line-height: 1.35;
}
.stage[data-stage="4"] .mailto-fallback-help {
  margin: 4px 0 0;
  font-size: 11.5px;
}
.stage[data-stage="4"] .draft-flag {
  margin: 0 0 6px;
}
.stage[data-stage="4"] #saved-id {
  margin: 0 0 6px;
}

/* E. Month announce is sr-only (calendar.html); do not hijack #cal-toast */


/* ===== Polish pack P15 (12 Oct 2026) ===== */

/* A. Audience stage — one more careful tighten (≥44px taps) */
.stage[data-stage="1"] {
  padding: 14px 14px 12px;
}
.stage[data-stage="1"] .stage-hint { margin-bottom: 8px; }
.stage[data-stage="1"] .section { margin-bottom: 10px; }
.stage[data-stage="1"] .section > .section-label { margin-bottom: 4px; }
.stage[data-stage="1"] .card-grid { gap: 6px; }
.stage[data-stage="1"] #team-tiles .pick-card {
  min-height: 64px;
  padding: 8px 10px;
  gap: 2px;
}
.stage[data-stage="1"] #team-tiles .pick-card.is-selected {
  padding: 7.5px 9.5px;
}
.stage[data-stage="1"] #team-tiles .pick-card .pick-title { font-size: 13.5px; }
.stage[data-stage="1"] #team-tiles .pick-card .pick-meta { font-size: 11.5px; line-height: 1.25; }
.stage[data-stage="1"] .checks { gap: 5px; }
.stage[data-stage="1"] .check {
  padding: 8px 10px;
  min-height: 44px;
  gap: 8px;
}
.stage[data-stage="1"] .check:has(input:checked) {
  padding: 7.5px 9.5px;
}
.stage[data-stage="1"] .help { margin-bottom: 4px; font-size: 12px; }
@media (max-width: 640px) {
  .stage[data-stage="1"] #team-tiles .pick-card {
    min-height: 72px;
    padding: 10px 12px;
  }
  .stage[data-stage="1"] .check {
    min-height: 48px;
    padding: 10px 12px;
  }
}

/* B. Calendar — legend collapse + denser tools row */
.legend-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  margin: 0 0 8px;
}
.legend-toggle {
  min-height: 36px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.legend-toggle:hover { color: var(--ink); }
.legend-block.legend-collapsed .legend {
  display: none;
}
.legend-block .legend {
  margin: 0;
}
.row-tools {
  /* P22: quieter tools chrome density */
  gap: 4px 8px;
  margin-bottom: 6px;
  padding: 6px 8px;
  border-color: var(--line);
  background: var(--wash);
}
.export-json-wrap {
  gap: 1px;
}
.export-json-wrap .export-json-help {
  font-size: 10.5px;
}
#download-all,
.import-json-label,
.clear-local-btn {
  min-height: 40px;
}
@media (max-width: 640px) {
  .legend-toggle {
    min-height: 44px;
  }
  #download-all,
  .import-json-label,
  .clear-local-btn {
    min-height: 44px;
  }
}

/* C. Trends — Insight sticky thead under tabs + filters */
:root {
  --trend-tabs-h: 44px;
  --trend-filters-h: 112px;
}
.insight-table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0;
}
.insight-table-sticky {
  min-width: 420px;
  border-collapse: separate;
  border-spacing: 0;
}
.insight-table-sticky thead th {
  position: sticky;
  top: calc(var(--header-h, 60px) + var(--trend-tabs-h, 44px) + var(--trend-filters-h, 112px));
  z-index: 22;
  background: var(--wash);
  box-shadow: 0 1px 0 var(--line);
}
@media (max-width: 640px) {
  .insight-table-sticky thead th {
    top: calc(var(--header-h, 60px) + var(--trend-tabs-h, 40px) + var(--trend-filters-h, 112px));
  }
}
@media print {
  .insight-table-sticky thead th {
    position: static;
    box-shadow: none;
  }
}

/* D. Confirm — denser summary dl + Copy/Print row (keep soft dup warn) */
.stage[data-stage="3"] .summary-card {
  padding: 10px 12px;
  margin-bottom: 8px;
}
.stage[data-stage="3"] .summary-card h3 {
  margin: 0 0 4px;
  font-size: 0.95rem;
}
.stage[data-stage="3"] .summary-card dl {
  gap: 2px 8px;
  font-size: 12px;
  line-height: 1.3;
}
.stage[data-stage="3"] .stage-hint { margin-bottom: 6px; }
.stage[data-stage="3"] .dup-launch-warn {
  margin: 6px 0 8px;
  padding: 8px 10px;
}
.confirm-extra-actions {
  gap: 6px;
  margin: 2px 0 8px;
  align-items: center;
}
#confirm-copy-summary,
#confirm-print {
  min-height: 40px;
  padding: 6px 12px;
}
@media (max-width: 640px) {
  #confirm-copy-summary,
  #confirm-print {
    min-height: 44px;
  }
}

/* ===== Polish pack P16 (12 Oct 2026) ===== */

/* A. Form — denser launch/completion date blocks + WD hints (COMPLETION_MIN_WD untouched) */
.stage[data-stage="2"] [data-field="launchDate"],
.stage[data-stage="2"] [data-field="completionDate"] {
  margin-bottom: 8px;
}
.stage[data-stage="2"] [data-field="launchDate"] .field,
.stage[data-stage="2"] [data-field="completionDate"] .field {
  margin-bottom: 4px;
  gap: 3px;
}
.stage[data-stage="2"] #lead-hint,
.stage[data-stage="2"] #draft-due-hint {
  margin: 0 0 6px;
  padding: 6px 8px;
  font-size: 11.5px;
  line-height: 1.35;
}
.stage[data-stage="2"] #draft-due-hint[hidden] { display: none; }
.stage[data-stage="2"] #process-note {
  margin: 4px 0 6px;
  font-size: 11.5px;
  line-height: 1.35;
}
.stage[data-stage="2"] #twelfth-warn {
  margin: 4px 0 6px;
  padding: 6px 8px;
  font-size: 11.5px;
  line-height: 1.35;
}
.stage[data-stage="2"] #completion-hint {
  margin: 2px 0 4px;
  font-size: 11.5px;
  line-height: 1.3;
}
.stage[data-stage="2"] .date-block-notice {
  margin: 2px 0 4px;
  padding: 5px 8px;
  font-size: 11.5px;
  line-height: 1.3;
}
.stage[data-stage="2"] .month-cap-meter {
  margin: 4px 0 6px;
  padding: 5px 8px;
  font-size: 11.5px;
}

/* B. Calendar — week-start cue + denser month heading cluster */
.week-start-cue {
  margin: 0 0 4px;
  padding: 0 2px;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.01em;
  line-height: 1.2;
}
.month-bar {
  gap: 8px;
  margin: 6px 0 8px;
  align-items: center;
}
.month-heading {
  min-height: 0;
  gap: 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.month-heading h2,
.month-bar h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 550;
  line-height: 1.2;
}
.month-heading .month-cap-wrap {
  margin: 0;
}
.month-heading .cal-today-btn {
  margin-top: 2px;
  min-height: 32px;
  padding: 2px 10px;
  font-size: 12px;
}
.month-bar #prev-month,
.month-bar #next-month {
  min-height: 36px;
  padding: 6px 12px;
  font-size: 13px;
}
.cal th {
  padding: 7px 4px;
  font-size: 11.5px;
}
@media (max-width: 640px) {
  .month-heading .cal-today-btn,
  .month-bar #prev-month,
  .month-bar #next-month {
    min-height: 44px;
  }
  .week-start-cue { font-size: 10.5px; }
}

/* C. Trends — denser ops criteria strip + clearer Shoot empty */
.ops-criteria-strip {
  margin: 0 0 8px;
  padding: 5px 10px;
  font-size: 11.5px;
  line-height: 1.3;
  font-weight: 500;
}
.shoot-empty-state {
  padding: 14px 14px 12px;
  text-align: left;
}
.shoot-empty-state h2 {
  margin: 0 0 6px;
  font-size: 1rem;
  font-weight: 550;
}
.shoot-empty-state .sub {
  margin: 0 0 10px;
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--muted);
}
.shoot-empty-state .trend-reset-filters {
  min-height: 36px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
}
@media (max-width: 640px) {
  .shoot-empty-state .trend-reset-filters {
    min-height: 44px;
  }
}

/* D. Login — denser magic panel + trial foot stickiness (CSS only) */
.login-page .login-wrap {
  min-height: calc(100dvh - var(--header-h, 56px) - 16px);
  display: flex;
  flex-direction: column;
  padding-top: 20px;
  padding-bottom: 12px;
  box-sizing: border-box;
}
.login-page .login-hero {
  margin-bottom: 14px;
}
.login-page .login-hero .plaque {
  height: 40px;
  margin-bottom: 12px;
}
.login-page .login-hero h1 {
  margin: 0 0 4px;
}
.login-page .login-panel-dense,
.login-page .login-panel {
  padding: 14px 14px 12px;
}
.login-page .login-panel-dense .field {
  margin-bottom: 8px;
  gap: 3px;
}
.login-page .login-panel-dense .actions {
  margin-top: 2px;
}
.login-page .login-panel-dense .login-divider {
  margin: 10px 0 8px;
}
.login-page .login-lark {
  gap: 4px;
}
.login-page .uat-code-panel {
  margin: 8px 0;
  padding: 10px;
}
.login-page .uat-code-value {
  font-size: 1.65rem;
}
.login-page .login-foot {
  margin-top: auto;
  padding-top: 12px;
  font-size: 11.5px;
  line-height: 1.35;
}
@supports not (height: 100dvh) {
  .login-page .login-wrap {
    min-height: calc(100vh - var(--header-h, 56px) - 16px);
  }
}

/* Boot: mission tiles missing (shared.js failed) */
.boot-tiles-miss { margin: 12px 0; }

/* ===== Polish pack P17 (12 Oct 2026) ===== */

/* A. Boot / serve hygiene cue — wash + danger-soft, readable (keep LKK guard) */
.boot-tiles-miss {
  margin: 12px 0 16px;
  padding: 12px 14px;
  background: var(--warn-bg);
  border-left: 3px solid var(--lkk);
  border-radius: var(--r);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px rgba(224, 41, 35, 0.08);
}
.boot-tiles-miss .boot-tiles-miss-title {
  margin: 0 0 6px;
  font-size: 14px;
  line-height: 1.35;
  color: var(--lkk-deep);
}
.boot-tiles-miss .boot-tiles-miss-body {
  margin: 0 0 6px;
  font-size: 13px;
  line-height: 1.4;
}
.boot-tiles-miss .boot-tiles-miss-help {
  margin: 0;
  padding: 6px 8px;
  font-size: 12px;
  line-height: 1.35;
  color: var(--ink-soft);
  background: var(--wash);
  border-radius: var(--r);
}
.boot-tiles-miss code {
  font-size: 0.92em;
  padding: 1px 4px;
  background: rgba(26, 26, 26, 0.06);
  border-radius: 3px;
}

/* B. Form — payout / Other denser + sticky field errors + denser soft dup */
.stage[data-stage="2"] .other-free-text,
.stage[data-stage="2"] #payout-other-wrap,
.stage[data-stage="2"] #cta-other-wrap {
  margin: 4px 0 6px;
  padding: 8px 10px;
  gap: 3px;
  background: var(--wash);
  border: 1px solid var(--line);
  border-radius: var(--r);
  border-left: 3px solid var(--lkk-mid);
}
.stage[data-stage="2"] .other-free-text[hidden],
.stage[data-stage="2"] #payout-other-wrap[hidden],
.stage[data-stage="2"] #cta-other-wrap[hidden] {
  display: none !important;
}
.stage[data-stage="2"] .other-free-text .req,
.stage[data-stage="2"] #payout-other-wrap .req {
  color: var(--lkk);
  font-weight: 700;
}
.stage[data-stage="2"] .other-free-text input,
.stage[data-stage="2"] #payout-other-wrap input,
.stage[data-stage="2"] #cta-other-wrap input {
  min-height: 36px;
  margin-top: 2px;
}
.stage[data-stage="2"] #err-payoutOther:not(:empty),
.stage[data-stage="2"] #err-payout:not(:empty),
.stage[data-stage="2"] .error:not(:empty) {
  position: sticky;
  top: calc(var(--header-h, 60px) + 44px);
  z-index: 4;
  margin: 4px 0 6px;
  padding: 6px 10px;
  background: var(--warn-bg);
  border-left: 3px solid var(--lkk);
  border-radius: var(--r);
  font-size: 12px;
  line-height: 1.35;
  color: var(--lkk-deep);
  box-shadow: 0 1px 0 rgba(26, 26, 26, 0.04);
}
.dup-launch-warn {
  margin: 6px 0 8px;
  padding: 6px 10px;
  font-size: 12.5px;
  line-height: 1.35;
}
.stage[data-stage="2"] .dup-launch-warn,
.stage[data-stage="3"] .dup-launch-warn {
  margin: 4px 0 6px;
  padding: 6px 10px;
  font-size: 12px;
  line-height: 1.3;
}

/* C. Calendar — denser undated requests + clearer empty */
#undated-list .undated-request-list {
  gap: 4px;
  margin: 4px 0 8px;
}
#undated-list .undated-row {
  gap: 6px 8px;
  padding: 6px 10px;
  align-items: center;
}
#undated-list .undated-row .request-meta {
  gap: 1px;
}
#undated-list .undated-row .request-meta strong {
  font-size: 13px;
  font-weight: 550;
  line-height: 1.25;
}
#undated-list .undated-row .request-meta span {
  font-size: 11.5px;
  line-height: 1.25;
}
#undated-list .undated-row .request-actions button,
#undated-list .undated-row .request-actions a.btn {
  min-height: 32px;
  padding: 0 10px;
  font-size: 12px;
}
#undated-list .undated-empty {
  margin: 4px 0 8px;
  gap: 6px;
}
#undated-list .undated-empty-state {
  margin: 0;
  padding: 10px 12px;
  font-size: 12.5px;
  line-height: 1.35;
}
@media (max-width: 640px) {
  #undated-list .undated-row .request-actions button,
  #undated-list .undated-row .request-actions a.btn {
    min-height: 44px;
  }
}

/* D. Trends — Shoot card image placeholder denser (trends-data untouched) */
.trend-card.shoot-card .trend-thumb {
  aspect-ratio: 16 / 10;
  border-radius: var(--r);
}
.trend-card.shoot-card .trend-thumb.placeholder {
  min-height: 0;
  aspect-ratio: 16 / 10;
  padding: 0;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--muted);
  background: linear-gradient(180deg, var(--wash) 0%, var(--bg-deep) 100%);
  border: 1px dashed var(--line-strong);
}

/* E. Shared — focus-visible audit gaps (team chips, legend, Open Insight Reset) */
.team-filter-chip:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}
.legend-toggle:focus-visible,
button.ghost.legend-toggle:focus-visible {
  outline: none;
  box-shadow: var(--focus);
  color: var(--ink);
}
button.trend-reset-filters:focus-visible,
.shoot-empty-state .trend-reset-filters:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}


/* ===== Polish pack P18 (12 Oct 2026) ===== */

/* A. Form — Confirm → Send ready cue (near trial callout; no auto-Send) */
.send-ready-cue {
  margin: 0 0 8px;
  padding: 6px 10px;
  border-radius: var(--r);
  border: 1px solid var(--line);
  border-left: 3px solid var(--lkk);
  background: var(--wash);
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
  opacity: 0;
  transition: opacity .3s ease;
}
.send-ready-cue.is-visible {
  opacity: 1;
}
.send-ready-cue[hidden] {
  display: none !important;
}
@media (prefers-reduced-motion: reduce) {
  .send-ready-cue { transition: none; opacity: 1; }
}

/* B. Calendar — denser chip tip (native title; no giant overlay) */
.cal .chip {
  /* title remains short via chipTip(); keep tap target */
  max-width: 100%;
}

/* C. Trends — denser Insight empty card */
.insight-table .insight-empty-row td {
  padding: 10px 8px;
  text-align: left;
  font-style: normal;
}
.insight-empty-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 10px 12px;
  border-radius: var(--r);
  border: 1px dashed var(--line-strong);
  background: var(--wash);
  max-width: 420px;
}
.insight-empty-title {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
}
.insight-empty-sub {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.35;
}
button.primary.insight-empty-reset {
  min-height: 44px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  margin-top: 2px;
}
button.primary.insight-empty-reset:disabled {
  opacity: 0.45;
  cursor: default;
}
button.primary.insight-empty-reset:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

/* D. Login — request-code cooldown cue (UI only) */
.request-code-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}
.request-cooldown-cue {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 2px 10px;
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: var(--wash);
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.3;
}
.request-cooldown-cue[hidden] {
  display: none !important;
}

/* E. Shared — reduced-motion pass for P10–P17 sticky/flash leftovers */
@media (prefers-reduced-motion: reduce) {
  .cal td.today-flash {
    animation: none !important;
    background-color: var(--lkk-soft);
  }
  .draft-saved-cue,
  .draft-saved-cue.is-visible {
    transition: none !important;
    opacity: 1;
  }
  .send-ready-cue,
  .send-ready-cue.is-visible {
    transition: none !important;
    opacity: 1;
  }
  .trends-back-top,
  #trends-back-top {
    transition: none !important;
  }
  html {
    scroll-behavior: auto !important;
  }
}


/* ===== Polish pack P19 (12 Oct 2026) ===== */

/* A. File-bar primary — stage-aware denser + clearer disabled */
.file-bar .actions .primary,
.file-bar .primary#btn-next,
.file-bar .primary#btn-submit {
  min-width: 112px;
  min-height: 40px;
  padding: 0 16px;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.file-bar .primary:disabled,
.file-bar .primary[aria-disabled="true"],
.file-bar button.primary:disabled,
.file-bar button.primary[aria-disabled="true"] {
  opacity: 0.38;
  cursor: not-allowed;
  background: var(--wash) !important;
  color: var(--muted) !important;
  border-color: var(--line) !important;
  box-shadow: none !important;
  transform: none !important;
  filter: grayscale(0.15);
}
.file-bar .draft-saved-cue,
.file-bar-status .draft-saved-cue {
  /* coexist with send-ready (P18) — cue stays compact */
  max-width: 140px;
}

/* B. Calendar — saved-requests sort cue */
.saved-search-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px 14px;
}
.saved-sort-field {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  padding: 2px 0 4px;
}
.saved-sort-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  margin-right: 2px;
}
button.ghost.saved-sort-btn {
  min-height: 32px;
  min-width: 44px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
}
button.ghost.saved-sort-btn:hover {
  color: var(--ink);
  border-color: var(--line-strong);
  background: var(--wash);
}
button.ghost.saved-sort-btn.is-active,
button.ghost.saved-sort-btn[aria-pressed="true"] {
  color: var(--lkk-deep);
  border-color: var(--lkk-mid);
  background: var(--lkk-soft);
  font-weight: 600;
}
button.ghost.saved-sort-btn:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

/* C. Trends — edition archive denser Open + Copy cluster */
.edition-list.edition-list-p19 .edition-row {
  padding: 4px 0;
  gap: 2px 10px;
}
.edition-actions.edition-actions-p19 {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 2px 4px;
  padding: 0;
  margin: 0;
}
.edition-actions-p19 a.edition-open {
  min-height: 28px;
  padding: 0 6px;
  font-size: 12px;
  font-weight: 600;
}
.edition-actions-p19 button.ghost.edition-copy-link {
  min-height: 28px;
  min-width: 40px;
  padding: 0 8px;
  font-size: 11.5px;
}
.edition-actions-p19 .shoot-copy-status {
  font-size: 11px;
  margin-left: 2px;
}

/* D. Confirm — denser screening summary chips */
.review-screening {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.review-screening-head {
  font-weight: 600;
  font-size: 13px;
  color: var(--ink);
  line-height: 1.25;
}
.review-screening-block {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
  margin: 0;
}
.review-screening-label {
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 600;
  /* P22: sentence case — no ALL-CAPS eyebrow */
  text-transform: none;
  letter-spacing: normal;
  color: var(--muted);
  min-width: 52px;
}
.review-screening-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
  min-width: 0;
  flex: 1 1 160px;
}
.review-screen-chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--wash);
  color: var(--ink);
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.35;
  word-break: break-word;
}
.review-screen-chip.is-note {
  border-style: dashed;
  color: var(--muted);
  background: var(--surface);
}
.stage[data-stage="3"] .summary-card .review-screening {
  margin-top: 0;
}

/* E. Shared — skip-link target: #main clears sticky header */
#main {
  scroll-margin-top: calc(var(--header-h, 60px) + 12px);
  padding-top: 4px;
}
main#main.wrap,
main#main.wrap.wide,
main#main.wrap.login-wrap {
  scroll-margin-top: calc(var(--header-h, 60px) + 12px);
}
#main > h1:first-child,
#main > .page-head:first-child,
#main > .login-panel:first-child,
#main > form:first-child > .stage:not([hidden]) .stage-title,
#main .stage-title:first-of-type {
  scroll-margin-top: calc(var(--header-h, 60px) + 8px);
}
@media print {
  #main,
  main#main.wrap,
  main#main.wrap.wide,
  main#main.wrap.login-wrap {
    scroll-margin-top: 0;
    padding-top: 0;
  }
}


/* ===== Polish pack P20 — This month insight A–E (13 Oct 2026) ===== */
.insight-head .insight-source {
  margin: 6px 0 0;
  font-size: 12px;
}
.insight-sec-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--lkk) 35%, var(--line));
  background: var(--lkk-soft);
  color: var(--lkk-deep);
  font-size: 11px;
  font-weight: 600;
  vertical-align: middle;
}
.insight-produce,
.insight-mos,
.insight-coverage,
.insight-shift,
.insight-doskip {
  margin-top: 14px;
}
.insight-produce h2,
.insight-mos h2,
.insight-coverage h2,
.insight-shift h2,
.insight-doskip h2 {
  margin: 0 0 6px;
  font-size: 1.1rem;
  color: var(--ink);
}
.insight-subh {
  margin: 14px 0 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--lkk-deep);
  letter-spacing: 0.01em;
}
.insight-line {
  margin: 4px 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink);
}
.insight-metrics { color: var(--muted); }
.insight-produce-list,
.insight-do-list {
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  counter-reset: produce;
}
.insight-produce-card,
.insight-do-item {
  position: relative;
  margin: 0;
  padding: 12px 14px 12px 44px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--lkk);
  border-radius: var(--r, 10px);
  background: var(--surface, #fff);
  min-height: 44px;
}
.insight-produce-list > .insight-produce-card { counter-increment: produce; }
.insight-produce-list > .insight-produce-card::before {
  content: counter(produce);
  position: absolute;
  left: 12px;
  top: 12px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--lkk);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.insight-do-list { counter-reset: doord; }
.insight-do-list > .insight-do-item { counter-increment: doord; padding-left: 44px; }
.insight-do-list > .insight-do-item::before {
  content: counter(doord);
  position: absolute;
  left: 12px;
  top: 12px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--lkk-deep);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.insight-produce-title {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
}
.insight-produce-title .trend-en {
  font-weight: 400;
  color: var(--muted);
  font-size: 13px;
}
.insight-held-off {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: var(--r, 10px);
  border: 1px dashed var(--line);
  background: var(--wash);
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--muted);
  min-height: 44px;
}
.insight-fact {
  margin: 6px 0;
  padding: 8px 10px;
  border-radius: var(--r, 8px);
  background: var(--wash);
  border: 1px solid var(--line);
  font-size: 12.5px;
  line-height: 1.45;
}
.insight-mos-list,
.insight-skip-list,
.insight-clears-bar,
.insight-changed-list,
.insight-pack-list {
  margin: 8px 0 0;
  padding-left: 18px;
  font-size: 13px;
  line-height: 1.5;
}
.insight-mos-list {
  list-style: none;
  padding-left: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.insight-mos-item {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r, 10px);
  background: var(--surface, #fff);
  min-height: 44px;
}
.insight-mos-head { margin: 0 0 4px; font-size: 13px; }
.insight-format-read {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-left: 3px solid var(--lkk);
  background: var(--lkk-soft);
  border-radius: 0 var(--r, 8px) var(--r, 8px) 0;
  font-size: 13px;
  line-height: 1.45;
}
.trend-badge.inference {
  background: var(--lkk-soft);
  color: var(--lkk-deep);
  border: 1px solid color-mix(in srgb, var(--lkk) 30%, transparent);
  font-weight: 600;
}
.insight-capacity { font-weight: 500; }
.insight-gaps-table th:nth-child(1),
.insight-gaps-table td:nth-child(1) { min-width: 9em; }
.insight-not-gap {
  margin: 10px 0 0;
  padding: 8px 10px;
  border-radius: var(--r, 8px);
  background: color-mix(in srgb, var(--gold-soft, #fff8e6) 80%, #fff);
  border: 1px solid var(--line);
  font-size: 12.5px;
  line-height: 1.45;
}
.insight-shift-summary {
  margin: 6px 0 0;
  font-size: 14px;
  line-height: 1.5;
  font-weight: 500;
}
.insight-packs {
  margin-top: 12px;
  padding: 8px 0 0;
}
.insight-packs summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  color: var(--lkk-deep);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  list-style: none;
}
.insight-packs summary::-webkit-details-marker { display: none; }
.insight-packs summary::before {
  content: "▸ ";
  color: var(--lkk);
  font-weight: 700;
}
.insight-packs[open] summary::before { content: "▾ "; }
.insight-pack-then,
.insight-pack-now {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12.5px;
}
.insight-only-note,
.insight-skip-paid {
  margin: 10px 0 0;
  padding: 8px 10px;
  border-radius: var(--r, 8px);
  background: var(--wash);
  border: 1px solid var(--line);
  font-size: 12.5px;
  line-height: 1.45;
}
.insight-legacy-taxonomy {
  margin-top: 14px;
}
.insight-legacy-taxonomy > summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 1.05rem;
  list-style: none;
  min-height: 44px;
  display: flex;
  align-items: center;
}
.insight-legacy-taxonomy > summary::-webkit-details-marker { display: none; }
.insight-legacy-taxonomy > summary::before {
  content: "▸ ";
  color: var(--muted);
  font-weight: 700;
}
.insight-legacy-taxonomy[open] > summary::before { content: "▾ "; }
.insight-legacy-filters {
  margin-top: 10px;
  padding: 0;
  border: none;
  box-shadow: none;
  background: transparent;
}
.insight-legacy-roll { margin-top: 8px; }
.shoot-card .mos-fit .trend-badge.inference {
  margin-right: 4px;
  vertical-align: middle;
}
@media (max-width: 640px) {
  .insight-produce-card,
  .insight-do-item,
  .insight-mos-item,
  .insight-held-off {
    padding-left: 12px;
  }
  .insight-produce-list > .insight-produce-card {
    padding-left: 44px;
  }
  .insight-do-list > .insight-do-item {
    padding-left: 44px;
  }
  .insight-gaps-table {
    font-size: 12px;
  }
  .insight-packs summary,
  .insight-legacy-taxonomy > summary {
    min-height: 44px;
  }
}

/* ===== Polish pack P21 Phase 1 — File trim + Shoot KPI chips (13 Oct 2026) ===== */
[data-prod-hide],
[data-uat-only],
[data-leo-ref] {
  display: none !important;
}
html.fc-show-uat [data-uat-only],
html.fc-show-uat [data-prod-hide],
html.fc-show-uat [data-leo-ref] {
  display: revert !important;
}
.shoot-kpi-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 4px;
  padding: 6px 0 4px;
  border-bottom: 1px solid var(--line);
}
.kpi-chip {
  display: inline-flex;
  flex-direction: column;
  min-width: 64px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--wash);
  line-height: 1.2;
}
.kpi-chip-label {
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: normal;
  color: var(--muted);
}
.kpi-chip-value {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
/* P22: secondary KPIs (V/F · age_h · Outlier× · Score) quieter */
.kpi-chip.is-secondary {
  background: var(--surface);
  border-color: var(--line);
  min-width: 56px;
  padding: 3px 7px;
}
.kpi-chip.is-secondary .kpi-chip-label {
  font-weight: 500;
  font-size: 10px;
}
.kpi-chip.is-secondary .kpi-chip-value {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-soft);
}
.kpi-chip.is-gap {
  background: var(--surface);
  border-style: dashed;
}
.kpi-chip.is-gap .kpi-chip-value {
  font-weight: 600;
  color: var(--muted);
}
.kpi-chip[title] { cursor: help; }
.shoot-card .shoot-capture-stamp { margin-top: 2px; }

/* Polish pack P21 Rank% + pack-score B (Leo lock 13 Oct) — Rank%/Score use .kpi-chip */
/* P21 Phase 1b — Shoot engagement breakdown + HKT metrics log (visible, not tooltip-only) */
.shoot-engage-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  margin: 2px 0 2px;
  padding: 2px 0;
  /* P22: engage secondary to primary KPI band */
  opacity: 0.92;
}
.engage-cell {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  min-width: 0;
  padding: 1px 0;
  font-size: 11.5px;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
}
.engage-label {
  font-weight: 500;
  color: var(--muted);
  text-transform: lowercase;
}
.engage-value {
  font-weight: 600;
  color: var(--ink-soft);
}
.engage-cell.is-gap .engage-value {
  font-weight: 600;
  color: var(--muted);
  font-style: italic;
}
.shoot-metrics-log {
  font-size: 11px;
  color: var(--muted);
  /* P22: metrics log secondary */
  opacity: 0.9;
}
.shoot-metrics-log[data-metrics-log-date-only="1"] {
  font-style: italic;
}

/* ===== Polish pack P21 Phase 2 — Leo A–F + D′ workflow gates (13 Oct 2026) ===== */
/* ===== Polish pack P22 — UX polish token→status map (13 Oct 2026) ===== */
/* P22 token map — hub/calendar workflow (Designer ship) */
.workflow-gates {
  margin: 1.25rem 0 1.5rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  background: var(--wash);
  border-radius: var(--r-lg);
}
.workflow-panel {
  margin-top: 0.75rem;
  padding: 0.85rem 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
}
.workflow-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.workflow-panel-head h3 {
  margin: 0;
  font-size: 1.05rem;
}
.wf-step {
  font-weight: 600;
  margin: 0.5rem 0;
}
.wf-step[data-step="submitted"] { color: var(--ink); }
.wf-step[data-step="accepted"],
.wf-step[data-step="materials_approved"],
.wf-step[data-step="cleared"] { color: var(--ok); }
.wf-step[data-step="materials_in"] { color: var(--await, #8A6A2F); }
.wf-step[data-step="materials_sent_back"] { color: var(--lkk-deep); }
.wf-row {
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--line);
}
.wf-row-title {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
}
.wf-row .field { margin-top: 0.5rem; }
.wf-open-btn { margin-left: 0.25rem; }
.chip-wf-accepted,
.chip-wf-approved,
.chip-wf-cleared { box-shadow: inset 0 -3px 0 var(--ok); }
.chip-wf-in { box-shadow: inset 0 -3px 0 var(--gold); }
.chip-wf-sentback { box-shadow: inset 0 -3px 0 var(--lkk); }
.leo-a-notify-status { margin: 0.35rem 0; }
#wf-status.send-status-ok,
.leo-a-notify-status.send-status-ok { color: var(--ok); }

/* P22 — role-aware status chips → brand families */
.wf-status-chip {
  display: inline-block;
  margin: 4px 0 2px;
  padding: 2px 8px;
  border-radius: var(--r); /* prefer 8px over SaaS pill */
  font-size: 12px;
  font-weight: 500;
  background: var(--wash);
  color: var(--ink);
  border: 1px solid var(--line);
}
.wf-status-chip.is-edit-loop,
.wf-status-chip[data-status-n="5"],
.wf-status-chip[data-status-n="10"] {
  background: var(--lkk-soft);
  color: var(--lkk-deep);
  border-color: var(--line);
}
.wf-status-chip[data-status-n="1"] {
  background: var(--wash);
  color: var(--ink);
  border-color: var(--line);
}
.wf-status-chip[data-status-n="3"],
.wf-status-chip[data-status-n="4"],
.wf-status-chip[data-status-n="7"] {
  background: var(--gold-soft);
  color: var(--await, #8A6A2F);
  border-color: var(--line);
}
.wf-status-chip[data-status-n="2"],
.wf-status-chip[data-status-n="6"],
.wf-status-chip[data-status-n="8"],
.wf-status-chip[data-status-n="9"] {
  background: var(--ok-soft);
  color: var(--ok);
  border-color: var(--line);
}

/* ===== Polish pack P21 Phase 2.1 — full-ladder visibility + notify matrix (13 Oct 2026) ===== */
/* Calendar list/chips: no role filter. Actions remain role-gated in workflow-gates. */

.wf-next-action {
  margin: 0 0 6px;
  font-size: 12px;
  color: var(--muted);
}
/* P22 ladder underline chips (month) */
.chip[data-status-n="1"] { box-shadow: inset 0 -3px 0 var(--line-strong); }
.chip[data-status-n="3"],
.chip[data-status-n="4"],
.chip[data-status-n="7"] { box-shadow: inset 0 -3px 0 var(--gold); }
.chip[data-status-n="2"],
.chip[data-status-n="6"],
.chip[data-status-n="8"],
.chip[data-status-n="9"] { box-shadow: inset 0 -3px 0 var(--ok); }
.chip[data-status-n="5"],
.chip[data-status-n="10"] { box-shadow: inset 0 -3px 0 var(--lkk); }


/* ===== Polish pack P23 — Phase 3 Insight four-panel + Discover meter (13 Oct 2026) ===== */
/* Craft: design/p23_insight_discover_craft_v20261013.md · P22 tokens inherit · anti-slop */

.discover-meter {
  position: sticky;
  top: calc(var(--header-h, 60px) + var(--trend-tabs-h, 44px));
  z-index: 24;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: var(--space-2, 8px) var(--space-4, 16px);
  box-shadow: none;
}
.discover-meter[hidden] { display: none; }
.discover-meter-primary {
  font-size: 13px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  line-height: 1.4;
}
.discover-meter-burn { font-weight: 600; color: var(--ink); }
.discover-meter-burn.is-hot { color: var(--lkk-deep); }
.discover-meter-role {
  display: inline-block;
  padding: 1px 8px;
  border-radius: var(--r, 8px);
  background: var(--lkk-soft);
  color: var(--lkk-deep);
  border: 1px solid var(--line);
  font-weight: 500;
  font-size: 12px;
  text-transform: none;
  letter-spacing: normal;
}
.discover-meter-qualify { color: var(--muted); }
.discover-meter-cc { color: var(--ink); font-weight: 600; }
.discover-meter-bars,
.discover-meter-secondary {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
  line-height: 1.4;
}
.discover-meter-track {
  height: 3px;
  margin-top: 6px;
  background: var(--wash);
  border-radius: 2px;
  overflow: hidden;
}
.discover-meter-track > span {
  display: block;
  height: 100%;
  background: var(--lkk);
}

.insight-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4, 16px);
  margin-top: var(--space-4, 16px);
}
@media (max-width: 900px) {
  .insight-grid { grid-template-columns: 1fr; }
}
.insight-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg, 12px);
  padding: var(--space-4, 16px);
  box-shadow: var(--shadow-card, none);
  border-left-width: 3px;
  border-left-style: solid;
  min-width: 0;
}
.insight-panel[data-panel="radar"] { border-left-color: var(--lkk); }
.insight-panel[data-panel="queue"] { border-left-color: var(--ok); }
.insight-panel[data-panel="patterns"] { border-left-color: var(--gold); }
.insight-panel[data-panel="benchmarks"] { border-left-color: var(--line-strong, var(--ink)); }
.insight-panel-verb {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: normal;
  text-transform: none;
  margin-bottom: 2px;
}
.insight-panel-title {
  margin: 0 0 var(--space-3, 12px);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--ink);
}
.insight-shift-dense {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.45;
}
.insight-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0;
}
.insight-clear-chip {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--ok-soft);
  color: var(--ok);
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 500;
}
.insight-floor-chip {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--wash);
  color: var(--ink);
  border: 1px solid var(--line);
  font-size: 12px;
}
.insight-aside {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}
.insight-queue {
  margin: 0;
  padding: 0;
  list-style: none;
}
.insight-queue-row {
  border-left-color: var(--ok);
}
.insight-queue-watch {
  margin-top: var(--space-3, 12px);
  padding: var(--space-3, 12px);
  background: var(--wash);
  border: 1px dashed var(--line);
  border-radius: var(--r, 8px);
}
.insight-watch-label {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.insight-pattern-hero {
  margin-top: 10px;
}
.insight-pattern-list {
  margin: 0 0 8px;
  padding-left: 0;
  list-style: none;
  font-size: 13px;
  line-height: 1.5;
}
.insight-pattern-list > li {
  margin: 0 0 6px;
  padding: 8px 10px;
  background: var(--wash);
  border: 1px solid var(--line);
  border-radius: var(--r, 8px);
}
.insight-capacity-track {
  height: 3px;
  margin-top: 6px;
  background: var(--wash);
  border-radius: 2px;
  overflow: hidden;
}
.insight-capacity-track > span {
  display: block;
  height: 100%;
  background: var(--lkk);
}
.insight-bench-card {
  margin: 8px 0;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.insight-bench-card:last-child { border-bottom: 0; }
.insight-skip-lane {
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: var(--r, 8px);
  background: var(--lkk-soft);
  border: 1px solid var(--line);
}
.insight-skip-lane.is-muted {
  background: var(--wash);
  color: var(--muted);
}
.insight-meta { margin-top: 14px; }
.insight-gaps-table th,
.insight-gaps-table td {
  padding: 8px 10px;
}
.insight-panel .insight-produce-card {
  border-left-color: var(--ok);
}
.insight-panel .insight-produce-list > .insight-produce-card::before {
  background: var(--ok);
}

/* P20 A–E essay stack classes retained only as panel aliases — no hero A–E titles */


/* ===== Polish pack P27 — Discover archive dense table + count chip (13 Oct 2026) ===== */
/* P22 Tezign tokens · dense table · ~48px thumbs · no second card grid · no pastel island */

.discover-count-chip {
  margin: 0 0 var(--space-3, 12px);
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  background: var(--wash);
  border: 1px solid var(--line);
  border-radius: var(--r, 8px);
  line-height: 1.4;
}
.discover-count-chip[hidden] { display: none !important; }

.discover-archive {
  margin-top: var(--space-6, 24px);
  padding-top: var(--space-4, 16px);
  border-top: 1px solid var(--line);
}
.discover-archive-head { margin-bottom: var(--space-3, 12px); }
.discover-archive-title {
  margin: 0 0 4px;
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--ink);
  text-transform: none;
  letter-spacing: normal;
}
.discover-archive-sub {
  margin: 0 0 6px;
  font-size: 13px;
  color: var(--muted);
}
.discover-archive-counts {
  margin: 0;
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}
.discover-archive-empty {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.discover-archive-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--r, 8px);
  background: var(--surface);
}
.discover-archive-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.discover-archive-table th,
.discover-archive-table td {
  padding: 8px 10px;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid var(--line);
  line-height: 1.35;
}
.discover-archive-table th {
  font-weight: 500;
  font-size: 11px;
  color: var(--muted);
  background: var(--wash);
  white-space: nowrap;
  text-transform: none;
  letter-spacing: normal;
}
.discover-archive-table tbody tr:last-child td { border-bottom: 0; }
.discover-archive-table tbody tr:hover { background: color-mix(in srgb, var(--wash) 70%, transparent); }

.da-thumb-cell { width: 56px; }
.da-thumb {
  display: block;
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--wash);
}
.da-thumb.placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  font-size: 12px;
  color: var(--muted);
  background: var(--wash);
  border: 1px dashed var(--line);
  border-radius: 6px;
}

.da-dish { font-weight: 500; color: var(--ink); max-width: 16em; }
.da-dish a { color: inherit; text-decoration: none; }
.da-dish a:hover { text-decoration: underline; color: var(--lkk-deep); }
.da-handle { color: var(--muted); white-space: nowrap; }
.da-views { white-space: nowrap; }
.da-er { color: var(--muted); font-size: 12px; white-space: nowrap; }
.da-date { white-space: nowrap; color: var(--muted); font-size: 12.5px; }

.da-reason-chip {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--r, 8px);
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.3;
  border: 1px solid var(--line);
  background: var(--wash);
  color: var(--ink);
  text-transform: none;
  letter-spacing: normal;
  white-space: nowrap;
}
.da-reason-chip.is-below-bar {
  background: var(--lkk-soft);
  color: var(--lkk-deep);
  border-color: color-mix(in srgb, var(--lkk) 28%, transparent);
}
.da-reason-chip.is-weak {
  background: var(--gold-soft, #fff8e6);
  color: var(--ink);
  border-color: color-mix(in srgb, var(--gold, #c9a227) 35%, transparent);
}
.da-reason-chip.is-na {
  background: var(--wash);
  color: var(--muted);
}
.da-reason-chip.is-paid {
  background: color-mix(in srgb, var(--ok-soft, #e8f5e9) 80%, #fff);
  color: var(--ink);
  border-color: color-mix(in srgb, var(--ok, #2e7d32) 30%, transparent);
}
.da-reason-chip.is-soft-dedup {
  background: var(--wash);
  color: var(--muted);
}

@media (max-width: 720px) {
  .discover-archive-table th:nth-child(5),
  .discover-archive-table td.da-er { display: none; }
  .da-dish { max-width: 10em; }
}


/* ===== Polish pack P29 — Calendar task drawer + FunCook-first gate (14 Oct 2026) ===== */
/* Craft: design/p29_drawer_gate_craft_v20261014.md · P22 tokens only · sentence case · no pastel island.
   A′ (Sent back to Task team) and D′ (Sent back to Agency) both Rework family but always distinct labels. */

/* Early-gate status families: Pending FunCook review = Wait; A′ / Rejected = Rework */
.wf-step[data-step="submitted"] { color: var(--await, #8A6A2F); }
.wf-step[data-step="sent_back_task_team"],
.wf-step[data-step="rejected"] { color: var(--lkk-deep); }
.wf-status-chip[data-status-n="1"] {
  background: var(--gold-soft);
  color: var(--await, #8A6A2F);
  border-color: var(--line);
}
.wf-status-chip[data-status-n="11"],
.wf-status-chip[data-status-n="12"] {
  background: var(--lkk-soft);
  color: var(--lkk-deep);
  border-color: var(--line);
}
.chip[data-status-n="1"],
.chip-wf-pending { box-shadow: inset 0 -3px 0 var(--gold); }
.chip[data-status-n="11"],
.chip-wf-sentback-task { box-shadow: inset 0 -3px 0 var(--lkk); }
.chip[data-status-n="12"],
.chip-wf-rejected { box-shadow: inset 0 -3px 0 var(--lkk-deep); text-decoration: line-through; text-decoration-color: var(--line-strong); }
.chip[aria-expanded="true"] { outline: 2px solid var(--lkk); outline-offset: 1px; }

.request-row.is-clickable { cursor: pointer; }
.request-row.is-clickable:hover { border-color: var(--line-strong); }
.request-row.is-clickable:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(224,41,35,.22); }

/* Hub gate row */
.wf-gate-row .actions,
.td-gate-row { display: flex; flex-wrap: wrap; gap: 8px; }
.td-danger { color: var(--lkk-deep); }
button.ghost.td-danger:hover { color: var(--lkk-deep); background: var(--lkk-soft); }
.td-reason-wrap {
  margin-top: 10px;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
}
.td-reason-wrap .field { margin-top: 0; }
.td-reason-wrap textarea { width: 100%; }
.td-confirm-title { margin: 0 0 4px; font-weight: 600; color: var(--ink); }
.td-callout {
  margin: 6px 0 8px;
  padding: 8px 10px;
  background: var(--lkk-soft);
  color: var(--ink);
  border-left: 3px solid var(--lkk);
  border-radius: var(--r);
  font-size: 13px;
}

/* Drawer shell */
.task-drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(26,26,26,.28);
  opacity: 0;
  transition: opacity 180ms ease;
}
.task-drawer-overlay.is-open { opacity: 1; }
.task-drawer-overlay[hidden],
.task-drawer[hidden] { display: none; }
.task-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 81;
  width: min(420px, 100vw);
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-left: 1px solid var(--line);
  box-shadow: -8px 0 24px rgba(26,26,26,.08); /* one soft rail shadow (craft exception) */
  transform: translateX(100%);
  transition: transform 180ms ease;
}
.task-drawer.is-open { transform: translateX(0); }
.task-drawer:focus { outline: none; }
body.td-open { overflow: hidden; }

.td-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.td-head-main { min-width: 0; }
.td-title {
  margin: 0;
  font-family: var(--font);
  font-weight: 500;
  font-size: 1.15rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.td-meta {
  margin: 4px 0 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  font-size: 12px;
  color: var(--muted);
}
.td-type { padding-left: 7px; border-left: 3px solid var(--team, var(--lkk)); color: var(--ink); }
.td-dot { color: var(--line-strong); }
.td-cap-chip {
  padding: 1px 6px;
  background: var(--wash);
  border: 1px solid var(--line);
  border-radius: var(--r);
  color: var(--ink);
}
.td-cap-chip.is-full { color: var(--lkk-deep); background: var(--lkk-soft); }
.td-status-chip { margin: 0; }
#td-close { min-height: 32px; min-width: 32px; flex: none; }

.td-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 16px 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.td-section { margin: 0; }
.td-section-title {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}
.td-empty { margin: 0; font-size: 13px; color: var(--muted); }

.td-dates-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; margin: 0; }
.td-dates-grid dt { font-size: 13px; color: var(--muted); }
.td-dates-grid dd { margin: 0; color: var(--ink); font-weight: 500; }

/* Vertical status rail */
.td-ladder { list-style: none; margin: 0; padding: 0; }
.td-step {
  position: relative;
  display: flex;
  gap: 10px;
  padding: 0 0 12px 0;
}
.td-step:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 14px;
  bottom: 0;
  width: 1px;
  background: var(--line);
}
.td-step-disc {
  flex: none;
  width: 11px;
  height: 11px;
  margin-top: 3px;
  border-radius: 50%;
  border: 1.5px solid var(--line-strong);
  background: var(--surface);
}
.td-step.is-past .td-step-disc { background: var(--ok); border-color: var(--ok); }
.td-step.is-past.fam-rework .td-step-disc { background: var(--lkk-deep); border-color: var(--lkk-deep); }
.td-step.is-current .td-step-disc { background: var(--lkk); border-color: var(--lkk); }
.td-step-body { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; flex: 1; min-width: 0; }
.td-step-label { font-size: 13px; color: var(--muted); }
.td-step.is-current .td-step-label { color: var(--ink); font-weight: 600; }
.td-step-time { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* Agency assets rows */
.td-asset-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.td-asset-label { color: var(--ink); }
.td-asset-row.is-ready .td-asset-value { color: var(--ok); font-weight: 500; }
.td-asset-row.is-not-ready .td-asset-value { color: var(--muted); }
.td-asset-row.is-gap .td-asset-value { color: var(--await, #8A6A2F); font-weight: 500; }

.td-note-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.td-note { padding: 8px 0; border-bottom: 1px solid var(--line); }
.td-note-meta { margin: 0; font-size: 12px; color: var(--muted); }
.td-note-body { margin: 2px 0 0; font-size: 13px; color: var(--ink); white-space: pre-wrap; }
.td-targets-line,
.td-notify-line { margin: 0; font-size: 13px; color: var(--ink); }
.td-notify-line { font-size: 12px; color: var(--muted); }

.td-fc-only,
.td-mail-history {
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 8px 12px;
  font-size: 13px;
}
.td-fc-only summary,
.td-mail-history summary { cursor: pointer; font-weight: 500; color: var(--ink); }
.td-fc-grid { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 8px 0 0; }
.td-fc-grid dt { color: var(--muted); }
.td-fc-grid dd { margin: 0; }
.td-mail-list { margin: 8px 0 0; padding-left: 16px; color: var(--muted); font-size: 12px; }

.td-foot {
  position: sticky;
  bottom: 0;
  padding: 12px 20px 16px;
  border-top: 1px solid var(--line);
  background: var(--wash);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.td-next { margin: 0; font-size: 13px; font-weight: 500; color: var(--ink); }
.td-foot .actions { margin: 0; }
.td-foot-tail { display: flex; justify-content: flex-end; }
.td-hub-link { font-size: 12px; color: var(--muted); }
.td-hub-link:hover { color: var(--ink); }
.td-status { margin: 0; font-size: 12px; }
.td-status:empty { display: none; }
.td-status.send-status-ok { color: var(--ok); }

/* Mobile ≤720px: bottom sheet, same IA */
@media (max-width: 720px) {
  .task-drawer {
    top: auto;
    left: 0;
    width: 100%;
    height: min(88vh, 640px);
    border-left: 0;
    border-top: 1px solid var(--line);
    border-radius: var(--r-lg) var(--r-lg) 0 0;
    box-shadow: 0 -8px 24px rgba(26,26,26,.08);
    transform: translateY(100%);
  }
  .task-drawer.is-open { transform: translateY(0); }
  .td-head { border-radius: var(--r-lg) var(--r-lg) 0 0; }
  .td-dates-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .task-drawer,
  .task-drawer-overlay { transition: none; }
}


/* ===== Polish pack P31 — Calendar Ops Board (thin queue v20261014b) · 2026-10-14 ===== */
.ops-cap-strip {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 12px 16px;
  margin: 0 0 var(--space-4);
}
.ops-cap-title {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  text-transform: none;
  letter-spacing: 0;
}
.ops-cap-cells {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.ops-cap-cell {
  flex: 1 1 140px;
  min-width: 140px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ops-cap-month {
  font-family: "ABC Arizona Flare", var(--font);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
}
.ops-cap-n {
  font-size: 1.35rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  line-height: 1.2;
}
.ops-cap-cell.is-full .ops-cap-n { color: var(--lkk-deep); }
.ops-cap-track {
  display: block;
  height: 4px;
  border-radius: 2px;
  background: var(--wash);
  overflow: hidden;
}
.ops-cap-bar {
  display: block;
  height: 100%;
  background: var(--lkk);
  border-radius: 2px;
}
.ops-cap-cell.is-full .ops-cap-bar { background: var(--lkk-deep); }
.ops-cap-cue {
  font-size: 12px;
  color: var(--muted);
}
.ops-cap-cue.is-full {
  display: inline-block;
  width: fit-content;
  font-weight: 600;
  color: var(--lkk-deep);
  background: var(--lkk-soft);
  padding: 2px 6px;
  border-radius: var(--r);
}
.ops-cap-rule {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.ops-queue {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 0 0 var(--space-4);
}
.ops-queue-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 12px 14px;
  min-width: 0;
}
.ops-queue-action {
  border-left: 3px solid var(--lkk);
}
.ops-queue-wait {
  background: var(--wash);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ops-queue-wait-block { min-width: 0; }
.ops-queue-title {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
}
.ops-queue-wait .ops-queue-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.ops-queue-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.4rem;
  height: 1.4rem;
  padding: 0 6px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  background: var(--wash);
  color: var(--muted);
}
.ops-queue-action .ops-queue-count {
  background: var(--lkk);
  color: #fff;
}
.ops-queue-count.is-zero {
  background: var(--wash);
  color: var(--muted);
}
.ops-queue-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.ops-q-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 6px;
  border-radius: var(--r);
  cursor: pointer;
  border: 0;
  background: transparent;
  width: 100%;
  text-align: left;
}
.ops-q-row:hover { background: var(--surface); }
.ops-queue-action .ops-q-row:hover { background: var(--wash); }
.ops-q-row:focus-visible { outline: none; box-shadow: var(--focus); }
.ops-q-line {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 72ch;
}
.ops-q-line {
  /* Team · type muted feel via lighter weight on prefix is hard in one span;
     whole line 13px; Do:/Waiting: weight comes from bold mid-em dash clause via font-weight 600 */
  font-weight: 600;
}
.ops-queue-empty {
  margin: 0;
  padding: 6px 4px;
  font-size: 13px;
  color: var(--muted);
  list-style: none;
}
.ops-q-more { list-style: none; padding: 4px 0 0; }
.ops-q-more .ghost { font-size: 12px; }

/* P35-B: bare .ops-filters shell neutralized — SoT is details.ops-filters */
.ops-filters {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 0;
  margin: 0 0 var(--space-4);
  display: block;
  gap: 0;
}
.ops-filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.ops-filter-label {
  flex: 0 0 52px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}
.ops-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex: 1;
  min-width: 0;
}
.ops-chip {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--wash);
  color: var(--ink);
  border-radius: var(--r); /* 8px — not SaaS pills */
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  line-height: 1.3;
}
.ops-chip:hover { border-color: var(--line-strong); }
.ops-chip.is-active {
  background: var(--lkk-soft);
  border-color: var(--lkk);
  box-shadow: inset 0 -2px 0 var(--lkk);
  color: var(--ink);
}
.ops-chip:focus-visible { outline: none; box-shadow: var(--focus); }
.ops-chip-n {
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}
.ops-chip.is-active .ops-chip-n { color: var(--lkk-deep); }
.ops-filter-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 2px;
}
.ops-count {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}
.ops-clear { font-size: 12px; }

.ops-board-wrap { margin: 0 0 var(--space-5); }
.ops-board-title { margin-bottom: 8px; }
.ops-board {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.ops-board-head {
  display: grid;
  grid-template-columns: minmax(88px, 0.9fr) minmax(140px, 1.6fr) minmax(64px, 0.7fr) minmax(64px, 0.6fr) minmax(48px, 0.45fr) minmax(160px, 1.8fr) minmax(72px, 0.55fr) minmax(72px, 0.7fr);
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--wash);
}
.ops-h {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  text-transform: none;
}
.ops-rows {
  list-style: none;
  margin: 0;
  padding: 0;
}
.ops-row {
  display: grid;
  grid-template-columns: minmax(88px, 0.9fr) minmax(140px, 1.6fr) minmax(64px, 0.7fr) minmax(64px, 0.6fr) minmax(48px, 0.45fr) minmax(160px, 1.8fr) minmax(72px, 0.55fr) minmax(72px, 0.7fr);
  gap: 8px;
  align-items: center;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  border-left: 3px solid var(--line-strong);
  cursor: pointer;
}
.ops-row:last-child { border-bottom: 0; }
.ops-row:hover { background: var(--wash); }
.ops-row:focus-visible { outline: none; box-shadow: var(--focus); }
.ops-row.is-open {
  border-left-width: 4px;
  border-left-color: var(--lkk);
}
.ops-row.fam-wait,
.ops-row.fam-qc { border-left-color: var(--gold); }
.ops-row.fam-rework { border-left-color: var(--lkk); }
.ops-row.fam-go { border-left-color: var(--ok); }
.ops-row.fam-idle { border-left-color: var(--line-strong); }
.ops-row.is-needs-you .ops-next { color: var(--ink); }
.ops-st {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-soft);
  border-radius: var(--r);
  padding: 2px 0;
}
.ops-mission {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.ops-mark {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 700;
  background: var(--wash);
  color: var(--muted);
}
.ops-mark[data-type="soft_blast"] { background: var(--lkk-soft); color: var(--lkk-deep); }
.ops-mark[data-type="survey"] { background: var(--gold-soft); color: var(--await); }
.ops-mark[data-type="cocreate"] { background: var(--ok-soft); color: var(--ok); }
.ops-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ops-team { font-size: 12px; color: var(--muted); }
.ops-launch {
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.ops-cap {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}
.ops-cap.is-full { color: var(--lkk-deep); font-weight: 600; }
.ops-next {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ops-assets { font-size: 12px; color: var(--muted); }
.ops-assets.is-ready { color: var(--ok); font-weight: 500; }
.ops-assets.is-gap { color: var(--await); font-weight: 500; }
.ops-assets.is-not-ready { color: var(--muted); }
.ops-notify { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ops-empty {
  padding: 20px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
.ops-empty .ops-clear { margin-top: 8px; }

.saved-fold {
  margin: var(--space-5) 0 var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  padding: 0 14px 14px;
}
.saved-fold > summary {
  cursor: pointer;
  list-style: none;
  padding: 12px 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}
.saved-fold > summary::-webkit-details-marker { display: none; }
.saved-fold[open] > summary { color: var(--ink); border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.saved-fold-sub { font-size: 14px; margin-top: var(--space-4); }

/* Month-bar cap is echo only — ops-cap-strip is primary */
.month-cap-wrap { opacity: 0.85; }

@media (max-width: 900px) {
  .ops-queue { grid-template-columns: 1fr; }
  .ops-board-head { display: none; }
  .ops-row {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "st mission"
      "team launch"
      "cap next"
      "assets notify";
    gap: 6px 10px;
  }
  .ops-st { grid-area: st; }
  .ops-mission { grid-area: mission; }
  .ops-team { grid-area: team; }
  .ops-launch { grid-area: launch; }
  .ops-cap { grid-area: cap; }
  .ops-next { grid-area: next; font-size: 14px; }
  .ops-assets { grid-area: assets; }
  .ops-notify { grid-area: notify; }
  .ops-filters { position: static; }
}

@media (prefers-reduced-motion: reduce) {
  .ops-q-row, .ops-row, .ops-chip { transition: none; }
}


/* ===== Polish pack P33 — Load UAT seed (A) + Ops filters disclosure (B) · 2026-10-15 ===== */
.load-uat-seed-btn,
button.ghost.load-uat-seed-btn {
  margin-top: 4px;
  color: var(--ink);
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 600;
  opacity: 0.9;
  align-self: flex-start;
}
.load-uat-seed-btn:hover,
button.ghost.load-uat-seed-btn:hover {
  opacity: 1;
  background: var(--wash);
  border-color: var(--line-strong);
}
.load-uat-seed-btn:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}
.load-uat-seed-btn[hidden] { display: none !important; }

/* B — disclosure shell */
details.ops-filters {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 0;
  margin: 0 0 var(--space-4);
  display: block;
  gap: 0;
}
.ops-filters-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  list-style: none;
  cursor: pointer;
  padding: 6px 10px;
  min-height: 36px;
  max-height: 40px;
  box-sizing: border-box;
  font-size: 12px;
  color: var(--ink);
}
.ops-filters-summary::-webkit-details-marker { display: none; }
.ops-filters-summary::marker { content: ""; }
.ops-filters-sum-label {
  font-weight: 600;
  flex: 0 0 auto;
}
.ops-filters-sum-label::after {
  content: " ▸";
  font-weight: 500;
  color: var(--muted);
}
details.ops-filters[open] .ops-filters-sum-label::after { content: " ▾"; }
.ops-filters-sum-text {
  flex: 1 1 160px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ops-filters-summary .ops-clear {
  flex: 0 0 auto;
  margin-left: auto;
  font-size: 12px;
}
.ops-filters-summary .ops-count {
  flex: 0 0 auto;
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}
.ops-filters-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 6px 10px 8px;
  border-top: 1px solid var(--line);
}
details.ops-filters .ops-filter-row {
  gap: 6px;
  align-items: center;
}
details.ops-filters .ops-filter-label {
  flex: 0 0 44px;
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
}
details.ops-filters .ops-filter-chips {
  gap: 4px;
}
details.ops-filters .ops-chip {
  padding: 2px 8px;
  gap: 4px;
  font-size: 11px;
  border-radius: var(--r); /* not pills */
  line-height: 1.25;
}
details.ops-filters .ops-chip-n { font-size: 10px; }

/* Kill Team empty band — row layout + denser chips (not 999px pills) */
details.ops-filters .team-filter-block {
  flex-direction: row;
  align-items: center;
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  gap: 6px;
}
details.ops-filters .team-filter-label {
  flex: 0 0 44px;
  font-size: 11px;
}
details.ops-filters .team-filter-chips {
  gap: 4px;
  flex: 1;
  min-width: 0;
}
details.ops-filters .team-filter-chip {
  min-height: 0;
  padding: 2px 8px;
  border-radius: var(--r);
  font-size: 11px;
  gap: 4px;
}


/* ===== Polish pack P35 — A cache-bust · B ops-filters shell · C cal-devtools · D meter · E empty seed · 2026-10-15 ===== */

/* P35-C: Browser tools disclosure (craft direction 2) */
details.cal-devtools {
  background: var(--wash);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 0;
  margin: 0 0 6px;
  display: block;
}
.cal-devtools-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  list-style: none;
  cursor: pointer;
  padding: 6px 10px;
  min-height: 36px;
  max-height: 40px;
  box-sizing: border-box;
  font-size: 12px;
  color: var(--ink);
}
.cal-devtools-summary::-webkit-details-marker { display: none; }
.cal-devtools-summary::marker { content: ""; }
.cal-devtools-sum-label {
  font-weight: 600;
  flex: 0 0 auto;
}
.cal-devtools-sum-label::after {
  content: " ▸";
  font-weight: 500;
  color: var(--muted);
}
details.cal-devtools[open] .cal-devtools-sum-label::after { content: " ▾"; }
.cal-devtools-sum-meta {
  flex: 1 1 160px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cal-devtools-body {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  padding: 6px 10px 8px;
  border-top: 1px solid var(--line);
  min-width: 0;
}
.cal-devtools-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
}
details.cal-devtools #download-all,
details.cal-devtools .import-json-label,
details.cal-devtools .clear-local-btn,
details.cal-devtools .load-uat-seed-btn {
  min-height: 32px;
  padding: 4px 10px;
  font-size: 12px;
  max-width: none;
  white-space: nowrap;
  text-align: center;
  line-height: 1.3;
  border-radius: var(--r);
}
details.cal-devtools .export-json-help {
  margin: 0;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.3;
}
details.cal-devtools #import-status,
details.cal-devtools .import-status {
  margin: 0;
  max-width: none;
}
@media (max-width: 640px) {
  details.cal-devtools #download-all,
  details.cal-devtools .import-json-label,
  details.cal-devtools .clear-local-btn,
  details.cal-devtools .load-uat-seed-btn {
    min-height: 44px;
  }
}

/* P35-E empty Ops seed hint */
.ops-empty-seed-hint {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}
.ops-empty-seed-link {
  display: inline;
  padding: 0;
  min-height: 0;
  font-size: 12px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}


/* ===== Polish pack P38 — programme incentive split densify · 2026-10-16 ===== */
.programme-incentive-fields {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 0 4px;
}
.programme-incentive-fields .field {
  margin: 0;
}
.programme-incentive-fields .field[hidden],
.programme-incentive-fields .error:empty {
  display: none;
}
/* P38 UAT re-run: Ops row incentive line (both programmes) under mission title */
.ops-mission-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.ops-incentive {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
