/* ==========================================================================
   Pulsera — Social Media Performance Dashboard
   Design tokens + components, built from visual-style-guide.md
   ========================================================================== */

/* ---- Tokens ------------------------------------------------------------ */
:root{
  --paper:#FDFCF8;
  --surface:#FFFFFF;
  --line:#EFE7D8;
  --ink:#2A2018;
  --ink-soft:#7C6F5D;
  --orange:#EC802B;
  --orange-ink:#C4681E;
  --gold:#EDC55B;
  --gold-ink:#A9860F;
  --teal:#66BCB4;
  --teal-ink:#2E8E85;
  --tan:#E8CCAD;
  --tan-ink:#8C6F45;
  --critical:#CF4A3A;

  --radius-card:14px;
  --radius-card-sm:12px;
  --radius-btn:12px;
  --radius-pill:999px;

  --shadow-card:0 1px 2px rgba(42,32,24,.06), 0 10px 26px -12px rgba(42,32,24,.16);
  --shadow-pop:0 18px 44px -14px rgba(42,32,24,.30), 0 4px 14px rgba(42,32,24,.10);

  --font-head:'Manrope', 'Segoe UI', sans-serif;
  --font-body:'IBM Plex Sans', 'Segoe UI', sans-serif;
  --font-mono:'IBM Plex Mono', 'Consolas', monospace;

  --sidebar-w:264px;
  --topbar-h:96px;

  --ease-out: cubic-bezier(.16,.84,.44,1);
}

*,*::before,*::after{ box-sizing:border-box; }
html{ -webkit-text-size-adjust:100%; }
html{ overflow-x:hidden; }
body{
  margin:0;
  background:var(--paper);
  color:var(--ink);
  font-family:var(--font-body);
  font-size:15px;
  line-height:1.55;
  -webkit-font-smoothing:antialiased;
  overflow-x:hidden;
  max-width:100%;
}
h1,h2,h3,h4{ font-family:var(--font-head); margin:0; color:var(--ink); letter-spacing:-0.01em; }
p{ margin:0; }
a{ color:inherit; text-decoration:none; }
button{ font-family:inherit; cursor:pointer; }
ul{ list-style:none; margin:0; padding:0; }
input,select,textarea{ font-family:inherit; font-size:inherit; color:inherit; }
img{ max-width:100%; display:block; }

.mono{ font-family:var(--font-mono); font-variant-numeric:tabular-nums; font-feature-settings:'tnum' 1; }

/* Visible focus ring everywhere — never remove */
:focus-visible{
  outline:2px solid var(--orange);
  outline-offset:2px;
  border-radius:6px;
}

.skip-link{
  position:absolute; left:12px; top:-60px;
  background:var(--ink); color:#fff; padding:10px 16px;
  border-radius:var(--radius-btn); z-index:999; transition:top .2s var(--ease-out);
  font-weight:600; font-size:13px;
}
.skip-link:focus{ top:12px; }

@media (prefers-reduced-motion: reduce){
  *{ animation-duration:.001ms !important; animation-iteration-count:1 !important; transition-duration:.001ms !important; scroll-behavior:auto !important; }
}

/* ---- Layout scaffolding -------------------------------------------------- */
.app-shell{ display:flex; min-height:100vh; }

.sidebar{
  width:var(--sidebar-w); flex-shrink:0;
  background:
    radial-gradient(circle at 10% 90%, #EDC55B, transparent 65%),
    radial-gradient(circle at 90% 90%, #2E8E85, transparent 60%),
    radial-gradient(circle at 80% 10%, #C4681E, transparent 65%),
    radial-gradient(circle at 15% 10%, rgba(237,197,91,.65), transparent 60%),
    #ec802b;
  color:#fff;
  display:flex; flex-direction:column;
  position:fixed; inset:0 auto 0 0; height:100vh; z-index:40;
  transition:transform .28s var(--ease-out);
}
.main{
  flex:1; margin-left:var(--sidebar-w); min-width:0;
  display:flex; flex-direction:column;
}

.brand{
  display:flex; align-items:center; gap:10px;
  padding:22px 22px 18px;
  border-bottom:1px solid rgba(255,255,255,.25);
}
.brand-mark{
  width:38px; height:38px; border-radius:11px;
  background:rgba(255,255,255,.22);
  display:flex; align-items:center; justify-content:center; flex-shrink:0;
}
.brand-mark svg{ width:20px; height:20px; stroke:#fff; }
.brand-text{ line-height:1.2; }
.brand-text strong{ font-family:var(--font-head); font-weight:800; font-size:16px; display:block; color:#fff; }
.brand-text span{ font-size:11.5px; color:rgba(255,255,255,.85); letter-spacing:.04em; text-transform:uppercase; }

.nav{ padding:16px 12px; display:flex; flex-direction:column; gap:2px; flex:1; overflow-y:auto; }
.nav-label{ font-size:11px; text-transform:uppercase; letter-spacing:.08em; color:rgba(255,255,255,.85); padding:14px 12px 6px; font-weight:600; }
.nav-item{
  display:flex; align-items:center; gap:12px;
  padding:10px 12px; border-radius:10px;
  color:rgba(255,255,255,.9); font-weight:600; font-size:14px;
  border:1px solid transparent; position:relative;
  transition:background .16s var(--ease-out), color .16s var(--ease-out);
}
.nav-item svg{ width:18px; height:18px; stroke:currentColor; flex-shrink:0; }
.nav-item:hover{ background:rgba(255,255,255,.15); color:#fff; }
.nav-item.active{ background:rgba(255,255,255,.25); color:#fff; }
.nav-item.active::before{
  content:''; position:absolute; left:-12px; top:8px; bottom:8px; width:3px;
  border-radius:0 4px 4px 0; background:#fff;
}
.nav-item .badge-count{
  margin-left:auto; background:var(--critical); color:#fff; font-size:10.5px;
  font-weight:700; padding:1px 6px; border-radius:var(--radius-pill);
}

.sidebar-foot{ padding:14px; border-top:1px solid rgba(255,255,255,.25); }
.user-card{
  display:flex; align-items:center; gap:10px; padding:8px;
  border-radius:12px; transition:background .16s var(--ease-out);
}
.user-card:hover{ background:rgba(255,255,255,.15); }
.avatar{
  width:36px; height:36px; border-radius:50%; background:var(--tan); color:var(--tan-ink);
  display:flex; align-items:center; justify-content:center; font-weight:700; font-size:13px;
  flex-shrink:0; font-family:var(--font-head);
}
.user-meta{ min-width:0; flex:1; }
.user-meta strong{ display:block; font-size:13.5px; font-weight:700; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.role-pill{ display:inline-flex; margin-top:2px; }
.icon-btn{
  width:34px; height:34px; border-radius:9px; border:1px solid var(--line); background:var(--surface);
  display:flex; align-items:center; justify-content:center; color:var(--ink-soft); flex-shrink:0;
  transition:all .16s var(--ease-out);
}
.icon-btn svg{ width:16px; height:16px; stroke:currentColor; }
.icon-btn:hover{ color:var(--critical); border-color:rgba(207,74,58,.3); background:rgba(207,74,58,.06); }

/* Sidebar specific overrides */
.sidebar .icon-btn { background:rgba(255,255,255,.15); border-color:rgba(255,255,255,.3); color:#fff; }
.sidebar .icon-btn:hover { background:rgba(255,255,255,.25); border-color:rgba(255,255,255,.5); color:#fff; }
.sidebar .pick-row { background:rgba(255,255,255,.15); border-color:rgba(255,255,255,.3); color:#fff; }
.sidebar .pick-row:hover { background:rgba(255,255,255,.25); border-color:rgba(255,255,255,.5); color:#fff; }
.sidebar .pick-row .pick-sub { color:rgba(255,255,255,.85); }
.sidebar .pick-row .chev { stroke:rgba(255,255,255,.85); }
.sidebar .pick-row .pick-icon:not([class*="plat-"]) { background:rgba(255,255,255,.22); }
.sidebar .chip-orange, .sidebar .chip-neutral,
.sidebar .chip-teal, .sidebar .chip-tan { background:rgba(255,255,255,.2); color:#fff; border-color:transparent; }

/* The account switcher's floating panel is a WHITE surface sitting inside the
   coloured sidebar. Everything above dresses the sidebar's own chrome in white
   for the gradient — left alone, that cascades into this panel and renders its
   contents white-on-white (the account names and the "Switch account" heading
   disappeared entirely; the log-out buttons went invisible too). Reset the
   panel back to the normal light-surface palette so anything placed inside it
   is readable by default. */
.sidebar .dropdown-panel{ color:var(--ink); }
.sidebar .dropdown-panel .icon-btn{
  background:var(--surface); border-color:var(--line); color:var(--ink-soft);
}
.sidebar .dropdown-panel .icon-btn:hover{
  color:var(--critical); border-color:rgba(207,74,58,.3); background:rgba(207,74,58,.06);
}
.sidebar .dropdown-panel .chip-orange{ background:rgba(236,128,43,.12); color:var(--orange-ink); }
.sidebar .dropdown-panel .chip-neutral{ background:var(--paper); color:var(--ink-soft); border-color:var(--line); }
.sidebar .dropdown-panel .chip-teal{ background:rgba(102,188,180,.16); color:var(--teal-ink); }
.sidebar .dropdown-panel .chip-tan{ background:rgba(232,204,173,.3); color:var(--tan-ink); }

/* Topbar */
.topbar{
  height:var(--topbar-h); flex-shrink:0; position:sticky; top:0; z-index:30;
  background:rgba(253,252,248,.86); backdrop-filter:blur(14px) saturate(160%);
  border-bottom:1px solid var(--line);
  display:flex; align-items:center; justify-content:space-between;
  padding:0 28px; gap:16px; min-width:0;
}
.topbar > .flex{ min-width:0; }
.topbar-title{ min-width:0; overflow:hidden; }
.topbar-title h1{ font-size:21px; font-weight:800; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.topbar-title p{ font-size:13px; color:var(--ink-soft); margin-top:2px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
/* Controls row can contain its own horizontal scroll on narrow screens
   instead of forcing the whole page to scroll sideways. */
.topbar-actions{
  display:flex; align-items:center; gap:10px; flex-shrink:1; min-width:0;
  overflow-x:auto; overflow-y:hidden; scrollbar-width:none; -ms-overflow-style:none;
  padding:2px; margin:-2px;
}
.topbar-actions::-webkit-scrollbar{ display:none; }
.topbar-actions > *{ flex-shrink:0; }
.hamburger{ display:none; }

.view{ display:none; padding:26px 28px 60px; flex:1; }
.view.active{ display:block; }

/* ---- Buttons ------------------------------------------------------------ */
.btn{
  display:inline-flex; align-items:center; gap:8px; justify-content:center;
  padding:10px 18px; border-radius:var(--radius-btn); font-weight:700; font-size:13.5px;
  border:1px solid transparent; white-space:nowrap; transition:transform .14s var(--ease-out), box-shadow .14s var(--ease-out), background .14s var(--ease-out);
  min-height:44px;
}
.btn svg{ width:16px; height:16px; stroke:currentColor; flex-shrink:0; }
.btn:active{ transform:translateY(1px) scale(.99); }

/* glass on white card (default, common case) */
.btn-glass{
  background:rgba(255,255,255,.6); backdrop-filter:blur(18px) saturate(160%);
  border:1px solid rgba(42,32,24,.08); color:var(--ink);
  box-shadow:0 6px 18px rgba(42,32,24,.08), inset 0 1px 0 rgba(255,255,255,.6);
}
.btn-glass:hover{ box-shadow:0 8px 22px rgba(42,32,24,.12), inset 0 1px 0 rgba(255,255,255,.7); }

/* glass primary on white card = solid orange */
.btn-primary{
  background:rgba(236,128,43,.94); color:#fff; border:1px solid rgba(236,128,43,.5);
  box-shadow:0 6px 18px rgba(236,128,43,.32), inset 0 1px 0 rgba(255,255,255,.25);
}
.btn-primary:hover{ background:var(--orange); box-shadow:0 8px 22px rgba(236,128,43,.4); }

/* glass on colorful ground (hero) */
.btn-glass-hero{
  background:rgba(255,255,255,.18); backdrop-filter:blur(18px) saturate(160%);
  border:1px solid rgba(255,255,255,.4); color:#fff;
  box-shadow:0 6px 20px rgba(0,0,0,.12), inset 0 1px 0 rgba(255,255,255,.3);
}
.btn-hero-primary{
  background:rgba(255,255,255,.95); color:var(--orange-ink);
  box-shadow:0 6px 20px rgba(0,0,0,.16), inset 0 1px 0 rgba(255,255,255,.5);
}

.btn-ghost{ background:transparent; border:1px solid var(--line); color:var(--ink); }
.btn-ghost:hover{ background:var(--paper); border-color:var(--ink-soft); }
.btn-sm{ padding:7px 13px; font-size:12.5px; min-height:34px; border-radius:10px; }
.btn-danger-ghost{ background:transparent; border:1px solid rgba(207,74,58,.3); color:var(--critical); }
.btn-danger-ghost:hover{ background:rgba(207,74,58,.08); }
.btn:disabled{ opacity:.5; cursor:not-allowed; }
.btn-icon-only{ padding:9px; min-width:44px; }

/* ---- Segmented control / pill tabs --------------------------------------- */
.segmented{
  display:inline-flex; background:var(--paper); border:1px solid var(--line);
  border-radius:var(--radius-pill); padding:3px; gap:2px;
}
.segmented button{
  border:none; background:transparent; color:var(--ink-soft); font-weight:700; font-size:12.8px;
  padding:8px 15px; border-radius:var(--radius-pill); transition:all .18s var(--ease-out);
  min-height:38px; display:flex; align-items:center; gap:6px;
}
.segmented button.active{ background:var(--ink); color:#fff; }
.segmented button[data-accent="orange"].active{ background:var(--orange); }
.segmented button[data-accent="teal"].active{ background:var(--teal); }
.segmented button:not(.active):hover{ color:var(--ink); }

/* ---- Performance Matrix layout bars ------------------------------------- */
.pm-generate-bar{
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding:14px 18px; background:var(--surface); border:1px solid var(--line);
  border-radius:var(--radius-card); margin-bottom:12px; flex-wrap:wrap;
}
.pm-generate-bar .pm-gen-left{ display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.pm-generate-bar .pm-gen-right{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.pm-generate-bar .pm-gen-status{
  font-size:12px; color:var(--ink-soft); font-family:var(--font-mono);
  display:flex; align-items:center; gap:6px;
}
.pm-generate-bar .pm-gen-status .dot-live{
  width:7px; height:7px; border-radius:50%; background:var(--teal); flex-shrink:0;
  animation: dot-pulse 2s ease-in-out infinite;
}
@keyframes dot-pulse{ 0%,100%{ opacity:.6; } 50%{ opacity:1; } }

/* On-demand pull quota, shown beside Generate so the cost of the click is
   visible before it is made. Gold while there is room, critical when spent. */
.token-badge{
  display:inline-flex; align-items:center; gap:7px; padding:7px 12px;
  border-radius:var(--radius-pill); border:1px solid rgba(237,197,91,.5);
  background:rgba(237,197,91,.14); color:var(--gold-ink);
  font-size:12.5px; font-weight:700; white-space:nowrap; cursor:help;
}
.token-badge svg{ width:14px; height:14px; stroke:currentColor; flex-shrink:0; }
.token-badge .token-count{ font-family:var(--font-mono); font-weight:600; }
.token-badge .token-count .token-max{ color:var(--ink-soft); font-weight:500; }
.token-badge.is-empty{
  border-color:rgba(207,74,58,.4); background:rgba(207,74,58,.09); color:var(--critical);
}
.token-badge.is-empty .token-count .token-max{ color:rgba(207,74,58,.65); }

/* Granularity bar sits BELOW the tab strip, so collapsing it on the
   manual-calculator tabs never shifts the tabs themselves. */
.pm-granularity-bar{
  display:flex; align-items:center; gap:10px; flex-wrap:wrap;
  margin-bottom:18px; min-height:0;
}
.pm-granularity-bar:empty{ display:none; margin:0; }

.pm-tabstrip-bar{
  display:flex; gap:6px; flex-wrap:wrap; margin-bottom:12px;
}
.pm-tabstrip-bar .pm-tab{
  border:none; background:transparent; color:var(--ink-soft); font-weight:700;
  font-size:13px; padding:9px 16px; border-radius:var(--radius-pill);
  transition:all .18s var(--ease-out); cursor:pointer; display:flex;
  align-items:center; gap:6px; border:1px solid var(--line);
}
.pm-tabstrip-bar .pm-tab:hover{ color:var(--ink); background:var(--paper); }
.pm-tabstrip-bar .pm-tab.active{
  background:var(--orange); color:#fff; border-color:var(--orange);
  box-shadow:0 2px 8px rgba(236,128,43,.25);
}
.pm-tabstrip-bar .pm-tab .tab-badge{
  font-size:9.5px; font-weight:800; text-transform:uppercase; letter-spacing:.04em;
  padding:2px 6px; border-radius:var(--radius-pill); background:rgba(237,197,91,.2);
  color:var(--gold-ink); line-height:1;
}
.pm-tabstrip-bar .pm-tab.active .tab-badge{
  background:rgba(255,255,255,.25); color:#fff;
}

.pm-summary-strip{
  display:grid; grid-template-columns:repeat(auto-fit, minmax(130px, 1fr));
  gap:10px; margin-bottom:16px;
}
.pm-summary-strip .pm-stat-card{
  background:var(--surface); border:1px solid var(--line); border-radius:var(--radius-card);
  padding:14px 16px; border-top:3px solid var(--orange); position:relative;
}
.pm-summary-strip .pm-stat-card .stat-label{ margin-bottom:4px; }
.pm-summary-strip .pm-stat-card .stat-val{
  font-family:var(--font-mono); font-size:20px; font-weight:700; color:var(--ink);
}

/* Empty state for unified PM generate */
.pm-empty-hero{
  text-align:center; padding:56px 24px; background:var(--surface);
  border:2px dashed var(--line); border-radius:var(--radius-card);
  margin-bottom:18px;
}
.pm-empty-hero .pm-empty-icon{
  width:56px; height:56px; border-radius:50%; background:rgba(236,128,43,.1);
  color:var(--orange); display:flex; align-items:center; justify-content:center;
  margin:0 auto 18px;
}
.pm-empty-hero .pm-empty-icon svg{ width:26px; height:26px; stroke:currentColor; }
.pm-empty-hero p{ max-width:380px; margin:0 auto; font-size:13.5px; color:var(--ink-soft); line-height:1.6; }

/* ---- Tag / status chips --------------------------------------------------- */
.chip{
  display:inline-flex; align-items:center; gap:5px; padding:3px 10px 3px 8px;
  border-radius:var(--radius-pill); font-size:11.5px; font-weight:700; letter-spacing:.01em;
  white-space:nowrap;
}
.chip .dot{ width:6px; height:6px; border-radius:50%; background:currentColor; flex-shrink:0; }
.chip-orange{ background:rgba(236,128,43,.12); color:var(--orange-ink); }
.chip-teal{ background:rgba(102,188,180,.16); color:var(--teal-ink); }
.chip-gold{ background:rgba(237,197,91,.22); color:var(--gold-ink); }
.chip-tan{ background:rgba(232,204,173,.35); color:var(--tan-ink); }
.chip-critical{ background:rgba(207,74,58,.12); color:var(--critical); }
.chip-neutral{ background:var(--paper); color:var(--ink-soft); border:1px solid var(--line); }

.badge-up{ color:var(--teal-ink); background:rgba(102,188,180,.16); }
.badge-down{ color:var(--critical); background:rgba(207,74,58,.12); }
.delta{ display:inline-flex; align-items:center; gap:3px; font-size:12px; font-weight:700; padding:3px 8px; border-radius:var(--radius-pill); }
.delta svg{ width:12px; height:12px; stroke:currentColor; }

/* ---- Cards ---------------------------------------------------------------- */
.card{
  background:var(--surface); border:1px solid var(--line); border-radius:var(--radius-card);
  box-shadow:var(--shadow-card); position:relative;
}
.card-pad{ padding:20px 22px; }

.stat-card{
  background:var(--surface); border:1px solid var(--line); border-radius:var(--radius-card);
  box-shadow:var(--shadow-card); padding:18px 20px 16px; overflow:hidden; position:relative;
}
.stat-card::before{
  content:''; position:absolute; top:0; left:0; right:0; height:3px; background:var(--stripe, var(--orange));
}
.stat-top{ display:flex; align-items:flex-start; justify-content:space-between; gap:10px; }
.stat-label{ font-size:12px; color:var(--ink-soft); font-weight:600; text-transform:uppercase; letter-spacing:.04em; }
.stat-value{ font-family:var(--font-mono); font-size:30px; font-weight:600; margin-top:8px; letter-spacing:-.01em; }
.stat-foot{ display:flex; align-items:center; gap:8px; margin-top:10px; }
.stat-sub{ font-size:11.5px; color:var(--ink-soft); }
.stat-spark{ width:76px; height:30px; flex-shrink:0; }

.section-head{ display:flex; align-items:flex-end; justify-content:space-between; gap:16px; margin:34px 0 16px; flex-wrap:wrap; }
.section-head:first-child{ margin-top:0; }
.section-head h2{ font-size:17px; font-weight:800; }
.section-head p{ font-size:12.5px; color:var(--ink-soft); margin-top:3px; }

.grid{ display:grid; gap:16px; }
.grid-4{ grid-template-columns:repeat(4,1fr); }
.grid-3{ grid-template-columns:repeat(3,1fr); }
.grid-2{ grid-template-columns:repeat(2,1fr); }
.grid-12{ grid-template-columns:repeat(12,1fr); }
@media (max-width:1180px){ .grid-4{ grid-template-columns:repeat(2,1fr); } .grid-3{ grid-template-columns:repeat(2,1fr);} }
@media (max-width:720px){ .grid-4,.grid-3,.grid-2{ grid-template-columns:1fr; } }

/* Content cards (top/under performing) */
.content-card{ display:flex; gap:14px; padding:14px; align-items:flex-start; }
.thumb{
  width:64px; height:64px; border-radius:11px; flex-shrink:0; display:flex; align-items:center; justify-content:center;
  color:#fff; position:relative; overflow:hidden;
}
.thumb svg{ width:22px; height:22px; stroke:#fff; opacity:.9; }
.content-meta{ min-width:0; flex:1; }
.content-title{ font-weight:700; font-size:13.6px; line-height:1.35; margin-bottom:6px; }
.content-tags{ display:flex; gap:6px; flex-wrap:wrap; margin-bottom:8px; }
.content-metric{ display:flex; align-items:baseline; gap:6px; }
.content-metric .mono{ font-size:16px; font-weight:600; }
.content-metric .label{ font-size:11px; color:var(--ink-soft); }
.insight-note{ font-size:11.5px; color:var(--critical); margin-top:6px; display:flex; align-items:center; gap:4px; }
.insight-note svg{ width:12px; height:12px; stroke:currentColor; flex-shrink:0; }

hr.hair{ border:none; border-top:1px solid var(--line); margin:14px 0; }

/* ---- Tables --------------------------------------------------------------- */
.table-wrap{ overflow-x:auto; border-radius:var(--radius-card); border:1px solid var(--line); background:var(--surface); box-shadow:var(--shadow-card); }
table{ width:100%; border-collapse:collapse; min-width:640px; }
thead th{
  text-align:left; font-size:11px; text-transform:uppercase; letter-spacing:.05em; color:var(--ink-soft);
  font-weight:700; padding:13px 16px; border-bottom:1px solid var(--line); background:var(--paper);
  white-space:nowrap;
}
thead th.sortable{ cursor:pointer; user-select:none; }
thead th.sortable svg{ width:11px; height:11px; margin-left:3px; vertical-align:middle; }
tbody td{ padding:13px 16px; border-bottom:1px solid var(--line); font-size:13.5px; vertical-align:middle; }
tbody tr:last-child td{ border-bottom:none; }
tbody tr:hover{ background:rgba(236,128,43,.035); }

/* ---- Pillars -------------------------------------------------------------- */
.pillar-card{ padding:18px 18px 16px; overflow:hidden; }
.pillar-head{ display:flex; align-items:flex-start; justify-content:space-between; gap:10px; }
.pillar-name{ font-size:15px; font-weight:800; margin-bottom:3px; }
.pillar-desc{ font-size:12.5px; color:var(--ink-soft); line-height:1.5; margin:8px 0 14px; }
.pillar-metrics{ display:flex; gap:16px; padding-top:12px; border-top:1px solid var(--line); }
.pillar-metrics div{ flex:1; }
.pillar-metrics .mono{ font-size:15px; font-weight:600; display:block; }
.pillar-metrics .label{ font-size:10.5px; color:var(--ink-soft); text-transform:uppercase; letter-spacing:.04em; }
.pillar-actions{ display:flex; gap:6px; margin-top:14px; }

.swatch{ width:12px; height:12px; border-radius:4px; flex-shrink:0; }

/* toggle switch */
.switch{ position:relative; width:38px; height:22px; flex-shrink:0; }
.switch input{ position:absolute; opacity:0; width:100%; height:100%; margin:0; cursor:pointer; }
.switch .track{ position:absolute; inset:0; background:var(--line); border-radius:var(--radius-pill); transition:background .18s var(--ease-out); }
.switch .thumb{ position:absolute; top:2px; left:2px; width:18px; height:18px; background:#fff; border-radius:50%; box-shadow:0 1px 3px rgba(0,0,0,.25); transition:transform .18s var(--ease-out); }
.switch input:checked + .track{ background:var(--teal); }
.switch input:checked + .track + .thumb{ transform:translateX(16px); }
.switch input:focus-visible + .track{ outline:2px solid var(--orange); outline-offset:2px; }

/* ---- Bar rows (pillar performance) ---------------------------------------- */
.barlist{ display:flex; flex-direction:column; gap:14px; }
.barrow{ display:grid; grid-template-columns:160px 1fr 70px; align-items:center; gap:12px; }
.barrow .name{ font-size:12.8px; font-weight:600; display:flex; align-items:center; gap:8px; min-width:0; }
.barrow .name .barname-text{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; min-width:0; }
.bartrack{ height:10px; background:var(--paper); border:1px solid var(--line); border-radius:var(--radius-pill); overflow:hidden; }
.barfill{ height:100%; border-radius:var(--radius-pill); width:0; }
.barrow .val{ font-size:12.5px; text-align:right; }

/* ---- Formula cards ---------------------------------------------------------*/
.formula-card{ padding:20px; min-width:0; }
.formula-eq{ font-family:var(--font-mono); font-size:11.5px; color:var(--ink-soft); background:var(--paper); border:1px solid var(--line); padding:8px 10px; border-radius:9px; margin:10px 0 14px; line-height:1.5; overflow-x:auto; white-space:nowrap; }
.formula-value{ font-family:var(--font-mono); font-size:26px; font-weight:600; }
.manual-badge{ margin-left:8px; }
.mini-form{ display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-top:14px; }
.field{ display:flex; flex-direction:column; gap:4px; }
.field label{ font-size:11px; color:var(--ink-soft); font-weight:600; }
.field input, .field select, .field textarea{
  border:1px solid var(--line); border-radius:9px; padding:10px; background:var(--paper); font-size:13px; min-height:44px;
}
.field textarea{ min-height:76px; }
.field input:focus, .field select:focus, .field textarea:focus{ outline:none; border-color:var(--orange); background:#fff; box-shadow:0 0 0 3px rgba(236,128,43,.14); }
.field select:disabled{ opacity:.8; cursor:not-allowed; color:var(--ink-soft); }
.field.error input{ border-color:var(--critical); background:rgba(207,74,58,.05); }
.field-error-msg{ font-size:11px; color:var(--critical); display:none; }
.field.error .field-error-msg{ display:block; }
.field-hint{ font-size:11px; color:var(--ink-soft); }

/* ---- Insight / flag rows --------------------------------------------------- */
.insight-row{ display:grid; grid-template-columns:auto 1fr auto; gap:14px; padding:16px; align-items:flex-start; }
.insight-row + .insight-row{ border-top:1px solid var(--line); }
.insight-icon{ width:38px; height:38px; border-radius:10px; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.insight-icon svg{ width:18px; height:18px; stroke:currentColor; }
.insight-title{ font-weight:700; font-size:13.5px; display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.insight-diag{
  font-size:12.8px; color:var(--ink); margin-top:6px; border:1px dashed var(--line); border-radius:9px; padding:8px 10px; background:var(--paper);
  line-height:1.5;
}
.insight-diag:focus{ outline:none; border-color:var(--orange); border-style:solid; background:#fff; }
.insight-bench{ font-size:11.5px; color:var(--ink-soft); margin-top:8px; }
.insight-actions{ display:flex; flex-direction:column; gap:6px; align-items:flex-end; }

/* The recommendation must read at least as strongly as the diagnosis box
   above it — it used to be bare grey text, so the problem looked more
   important than the fix. Teal is this system's existing "positive action"
   accent, which also keeps it distinct from the critical-red framing. */
.insight-action{
  margin-top:10px; border:1px solid rgba(102,188,180,.42); border-radius:10px;
  background:rgba(102,188,180,.09); padding:10px 12px; overflow:hidden;
}
.insight-action .action-label{
  display:flex; align-items:center; gap:6px; margin-bottom:5px;
  font-size:10.5px; font-weight:800; letter-spacing:.05em; text-transform:uppercase;
  color:var(--teal-ink);
}
.insight-action .action-label svg{ width:13px; height:13px; stroke:currentColor; flex-shrink:0; }
.insight-action .action-text{ font-size:12.8px; line-height:1.5; color:var(--ink); }

/* ---- Kanban ---------------------------------------------------------------- */
/* auto-flow so 3, 4 or 5 workflow-stage columns all scroll horizontally
   instead of wrapping to a second row (stage count varies per account's
   Approval Flow setting and per page — Content Plan vs Content Tracker). */
/* Four fixed stages: size the columns so all four fit the content area at
   normal desktop widths (they used to be sized for the old 5-stage board and
   pushed the last column off-screen), and keep the horizontal scroll only as
   a narrow-viewport fallback. */
.board{ display:grid; grid-auto-flow:column; grid-auto-columns:minmax(0,1fr); gap:14px; overflow-x:auto; padding-bottom:6px; }
/* The 100vh cap collapsed to 0 whenever the viewport was shorter than 300px —
   which happens while this pane/tab is being resized or restored, and left the
   whole board invisible. max() keeps a usable floor no matter how short it gets. */
.board-col{ background:rgba(239,231,216,.28); border:1px solid var(--line); border-radius:var(--radius-card); min-width:0; display:flex; flex-direction:column; max-height:max(260px, calc(100vh - 300px)); }
.board-col-head{ padding:13px 14px; display:flex; align-items:center; justify-content:space-between; border-bottom:1px solid var(--line); flex-shrink:0; }
.board-col-head span{ font-weight:800; font-size:12.5px; }
.board-col-head .count{ font-family:var(--font-mono); font-size:11px; color:var(--ink-soft); background:var(--surface); border:1px solid var(--line); padding:1px 7px; border-radius:var(--radius-pill); }
.board-col-body{ padding:10px; display:flex; flex-direction:column; gap:10px; overflow-y:auto; flex:1; min-height:80px; }

.kcard{
  background:var(--surface); border:1px solid var(--line); border-radius:var(--radius-card-sm); padding:12px 13px;
  box-shadow:var(--shadow-card); cursor:pointer; transition:box-shadow .16s var(--ease-out), transform .16s var(--ease-out);
}
.kcard:hover{ box-shadow:var(--shadow-pop); transform:translateY(-2px); }
.kcard-title{ font-size:12.8px; font-weight:700; margin-bottom:8px; line-height:1.35; }
.kcard-tags{ display:flex; gap:5px; flex-wrap:wrap; margin-bottom:9px; }
.kcard-foot{ display:flex; align-items:center; justify-content:space-between; }
.kcard-due{ font-size:11px; color:var(--ink-soft); display:flex; align-items:center; gap:4px; }
.kcard-due svg{ width:12px; height:12px; }
.kcard-due.overdue{ color:var(--critical); font-weight:700; }

/* Published post thumbnail — same gradient-cover treatment as Overview's
   content cards (.thumb / .plat-ig / .plat-tt), stretched full-bleed across
   the top of the card so a published item reads as an actual post, not just
   a text row. Negative margin cancels .kcard's own padding for the banner. */
.kcard-thumb{
  height:92px; margin:-12px -13px 10px; border-radius:var(--radius-card-sm) var(--radius-card-sm) 0 0;
  display:flex; align-items:center; justify-content:center; color:#fff; position:relative; overflow:hidden;
}
.kcard-thumb svg{ width:26px; height:26px; stroke:#fff; opacity:.9; }
.kcard-thumb-views{
  position:absolute; right:8px; bottom:8px; background:rgba(0,0,0,.35); color:#fff; font-size:10.5px; font-weight:700;
  padding:2px 7px; border-radius:var(--radius-pill); backdrop-filter:blur(2px);
}
.kcard-thumb-sm{
  width:28px; height:28px; border-radius:7px; flex-shrink:0; display:flex; align-items:center; justify-content:center; color:#fff;
}
.kcard-thumb-sm svg{ width:14px; height:14px; stroke:#fff; }

/* ---- Calendar --------------------------------------------------------------- */
/* Grid on the left, agenda rail on the right. The rail is its own scroll
   container so a month full of notes never grows the page — nothing about
   reading or editing a date requires the page itself to move. */
.cal-layout{ display:grid; grid-template-columns:minmax(0,1fr) 336px; gap:16px; align-items:stretch; }
/* The rail is absolutely positioned inside a stretched wrapper so it matches
   the calendar card's height EXACTLY: the wrapper contributes no content
   height of its own, so the row is sized purely by the calendar, and the rail
   then fills it. (A plain max-height capped the rail short of the calendar.) */
.cal-agenda-wrap{ position:relative; min-height:min(420px, 60vh); }
.cal-agenda{ position:absolute; inset:0; display:flex; flex-direction:column; overflow:hidden; }
.cal-agenda-head{
  padding:14px 16px; border-bottom:1px solid var(--line); flex-shrink:0;
  display:flex; align-items:center; justify-content:space-between; gap:10px;
}
.cal-agenda-head strong{ font-size:13.5px; }
.cal-agenda-list{ flex:1; overflow-y:auto; padding:12px; display:flex; flex-direction:column; gap:10px; }

.agenda-card{
  border:1px solid var(--line); border-left:3px solid var(--accent, var(--line));
  border-radius:var(--radius-card-sm); background:var(--surface); padding:11px 12px;
  transition:border-color .16s var(--ease-out), box-shadow .16s var(--ease-out);
}
.agenda-card.is-selected{ border-color:var(--ink); border-left-color:var(--accent, var(--ink)); box-shadow:0 0 0 2px rgba(42,32,24,.10); }
.agenda-card.is-past{ opacity:.62; }
.agenda-head{ display:flex; align-items:center; gap:10px; cursor:pointer; }
.agenda-date{ width:36px; flex-shrink:0; text-align:center; }
.agenda-day{ display:block; font-family:var(--font-head); font-size:19px; font-weight:800; line-height:1; }
.agenda-dow{ display:block; font-size:9.5px; text-transform:uppercase; letter-spacing:.06em; color:var(--ink-soft); margin-top:3px; }
.agenda-when{ flex:1; min-width:0; }
.agenda-rel{ font-size:12.5px; font-weight:700; display:block; }
.agenda-sum{ font-size:11.5px; color:var(--ink-soft); display:block; margin-top:1px; }
.agenda-item{
  display:flex; align-items:center; gap:8px; padding:8px 0 7px;
  border-top:1px solid var(--line); cursor:pointer;
}
.agenda-item:hover .agenda-item-title{ color:var(--orange-ink); }
.agenda-item-title{ font-size:12.4px; font-weight:600; flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.agenda-item .icon-btn{ flex-shrink:0; }
.agenda-note{
  display:flex; align-items:flex-start; gap:7px; padding:8px 0 7px;
  border-top:1px solid var(--line); font-size:12px; line-height:1.45; color:var(--ink-soft);
}
.agenda-note > svg{ width:12px; height:12px; flex-shrink:0; margin-top:2px; stroke:var(--gold-ink); }
.agenda-note-text{ flex:1; min-width:0; }
.agenda-note-meta{ font-size:10.5px; color:var(--ink-soft); opacity:.85; margin-top:2px; }
.agenda-foot{ margin-top:10px; display:flex; gap:6px; align-items:center; flex-wrap:wrap; }
.agenda-foot .agenda-clear{ margin-left:auto; }
.agenda-note-form{ display:flex; gap:6px; align-items:flex-end; margin-top:10px; }
.agenda-note-actions{ display:flex; gap:2px; flex-shrink:0; }
.agenda-note.is-editing{ align-items:flex-end; gap:6px; }
.agenda-empty{ font-size:12px; color:var(--ink-soft); padding:8px 0 2px; }
/* Activity card: tinted with the colour the user picked, two controls only. */
.agenda-act-title{ font-size:13px; font-weight:700; margin-top:9px; line-height:1.35; }
.agenda-act-desc{ font-size:12px; color:var(--ink-soft); line-height:1.5; margin:5px 0 0; }
.agenda-card .agenda-note-actions{ margin-left:auto; }
/* Hover bar rows */
.cal-pop-act{ border-left:3px solid var(--accent, var(--line)); padding:6px 0 7px 9px; margin-bottom:7px; }
.cal-pop-act-title{ font-size:12.5px; font-weight:700; line-height:1.35; }
.cal-pop-act-desc{ font-size:11.5px; color:var(--ink-soft); line-height:1.45; margin-top:3px; }
/* Per-item actions: reschedule + delete, opened from the row's "..." button. */
.agenda-actions{
  border-top:1px solid var(--line); margin-top:2px; padding:9px 0 2px;
  display:flex; flex-direction:column; gap:8px;
}
.agenda-move{ display:flex; gap:6px; align-items:flex-end; }
.agenda-move .field{ min-width:0; }
.agenda-actions-row{ display:flex; gap:6px; align-items:center; flex-wrap:wrap; }
.agenda-locked{ font-size:11px; color:var(--ink-soft); line-height:1.4; }
.icon-btn.is-on{ background:var(--tan); color:var(--tan-ink); }

@media (max-width:1100px){
  .cal-layout{ grid-template-columns:minmax(0,1fr); }
  /* Stacked under the calendar there is no height to match, so the rail goes
     back to normal flow with its own cap. */
  .cal-agenda-wrap{ position:static; min-height:0; }
  .cal-agenda{ position:static; max-height:480px; }
}
.cal-grid{ display:grid; grid-template-columns:repeat(7,1fr); gap:8px; }
.cal-dow{ font-size:11px; font-weight:700; color:var(--ink-soft); text-transform:uppercase; text-align:center; padding-bottom:4px; }
.cal-cell{
  background:var(--surface); border:1px solid var(--line); border-radius:11px; min-height:92px; padding:8px;
  display:flex; flex-direction:column; gap:5px; cursor:pointer; transition:border-color .16s var(--ease-out), box-shadow .16s var(--ease-out), background .16s var(--ease-out);
  position:relative; /* anchors the note marker + item-count badge */
}
.cal-cell.selected{ border-color:var(--ink); box-shadow:0 0 0 2px rgba(42,32,24,.12); }
.cal-cell:hover{ border-color:var(--orange); box-shadow:var(--shadow-card); }
.cal-cell.muted{ opacity:.4; }
/* Days with content get a warm tint so a glance at the month tells you which
   days have something on them — the old bare 6px dot was easy to miss entirely. */
.cal-cell.has-items{ background:rgba(236,128,43,.06); }
.cal-cell .num{ font-family:var(--font-mono); font-size:12px; color:var(--ink-soft); }
/* Today is a solid fill, not a ring — declared after .has-items so its tint
   cannot override the fill on a day that also carries activities. */
.cal-cell.today{ background:var(--orange); border-color:var(--orange); box-shadow:none; }
.cal-cell.today .num{ color:#fff; font-weight:600; }
.cal-cell.today .cal-dot-more{ color:rgba(255,255,255,.9); }
/* Give the markers a light rim so they stay legible on the solid ground.
   The badge's own colour is written inline per activity, so overriding it
   here needs !important. */
.cal-cell.today .cal-dot{ box-shadow:0 0 0 1.5px rgba(255,255,255,.9); }
.cal-cell.today .cal-count-badge{ background:#fff !important; color:var(--orange-ink); }
/* .today wins over .selected on order, so restate the selection ring here —
   otherwise selecting today shows no selection at all. */
.cal-cell.today.selected{ border-color:var(--ink); box-shadow:0 0 0 2px rgba(42,32,24,.22); }
.cal-dot-row{ display:flex; align-items:center; gap:4px; flex-wrap:wrap; margin-top:auto; padding-right:14px; }
.cal-dot{ width:9px; height:9px; border-radius:50%; box-shadow:0 0 0 1px rgba(255,255,255,.6) inset; }
.cal-dot-more{ font-size:10px; font-weight:700; color:var(--ink-soft); }
/* Item count — a solid badge in the corner reads at a glance, unlike a dot. */
.cal-count-badge{
  position:absolute; top:6px; right:6px; min-width:17px; height:17px; padding:0 4px; border-radius:var(--radius-pill);
  background:var(--orange); color:#fff; font-family:var(--font-mono); font-size:10px; font-weight:800;
  display:flex; align-items:center; justify-content:center; line-height:1;
}
.cal-count-badge.is-overdue{ background:var(--critical); }

/* Hover preview popover — shows what's on a date right where the cursor is,
   so reading the calendar never requires clicking a day then scrolling down
   to the detail panel below the grid. */
.cal-popover{
  position:fixed; z-index:60; background:var(--surface); border:1px solid var(--line);
  border-radius:var(--radius-card); box-shadow:var(--shadow-pop); padding:14px;
  opacity:0; visibility:hidden; transform:translateY(-4px);
  transition:opacity .14s var(--ease-out), transform .14s var(--ease-out), visibility 0s .14s;
  max-height:min(70vh, 420px); overflow-y:auto;
}
.cal-popover.open{ opacity:1; visibility:visible; transform:translateY(0); transition:opacity .14s var(--ease-out), transform .14s var(--ease-out); }
.cal-pop-head{ font-size:13px; margin-bottom:10px; padding-bottom:8px; border-bottom:1px solid var(--line); }
.cal-pop-row{
  display:flex; align-items:center; justify-content:space-between; gap:8px;
  padding:7px 0; border-bottom:1px solid var(--line); cursor:pointer;
}
.cal-pop-row:last-of-type{ border-bottom:none; }
.cal-pop-row-main{ display:flex; align-items:center; gap:7px; min-width:0; }
.cal-pop-title{ font-size:12.5px; font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.cal-pop-notes{ margin-top:4px; padding-top:8px; border-top:1px solid var(--line); }
.cal-pop-note{
  font-size:12px; color:var(--ink-soft); display:flex; align-items:flex-start; gap:6px; padding:4px 0; line-height:1.4;
}
.cal-pop-note svg{ width:12px; height:12px; stroke:currentColor; flex-shrink:0; margin-top:2px; }
.cal-pop-manage{ width:100%; justify-content:center; margin-top:12px; }

/* ---- Insight/notification dropdown ------------------------------------------ */
.dropdown{ position:relative; }
.dropdown-panel{
  position:absolute; top:calc(100% + 10px); right:0; width:340px; background:var(--surface); border:1px solid var(--line);
  border-radius:var(--radius-card); box-shadow:var(--shadow-pop); z-index:50; overflow:hidden;
  opacity:0; visibility:hidden; transform:translateY(-6px); transition:opacity .16s var(--ease-out), transform .16s var(--ease-out), visibility 0s .16s;
}
.dropdown-panel.open{ opacity:1; visibility:visible; transform:translateY(0); transition:opacity .16s var(--ease-out), transform .16s var(--ease-out); }
.dropdown-head{ padding:14px 16px; border-bottom:1px solid var(--line); display:flex; align-items:center; justify-content:space-between; }
.dropdown-head strong{ font-size:13.5px; }
.dropdown-list{ max-height:340px; overflow-y:auto; }
.notif-item{ display:flex; gap:10px; padding:12px 16px; border-bottom:1px solid var(--line); }
.notif-item:last-child{ border-bottom:none; }
.notif-icon{ width:30px; height:30px; border-radius:9px; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.notif-icon svg{ width:14px; height:14px; stroke:currentColor; }
.notif-text{ font-size:12.5px; line-height:1.45; }
.notif-time{ font-size:10.5px; color:var(--ink-soft); margin-top:2px; }
.bell-dot{ position:absolute; top:6px; right:6px; width:8px; height:8px; border-radius:50%; background:var(--critical); border:2px solid var(--surface); }

/* Account switcher list reuses .notif-item for its rows (name + platform,
   icon, remove button) — scoped here (not globally on .notif-text, which
   also backs multi-line notification/list messages elsewhere that should
   keep wrapping) so a long account name truncates instead of overlapping
   the remove/logout icon button next to it. The markup no longer puts a
   <br> between the two (that plus these being display:block doubled up the
   line break into a large gap) — this margin is the only spacing now. */
#account-switcher-list .notif-text{ min-width:0; }
#account-switcher-list .notif-text strong,
#account-switcher-list .notif-text span{ display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
#account-switcher-list .notif-text span{ margin-top:2px; }

/* ---- Modal ------------------------------------------------------------------ */
.modal-overlay{
  position:fixed; inset:0; background:rgba(42,32,24,.42); backdrop-filter:blur(2px); z-index:100;
  display:flex; align-items:center; justify-content:center; padding:20px;
  opacity:0; visibility:hidden; transition:opacity .2s var(--ease-out), visibility 0s .2s;
}
.modal-overlay.open{ opacity:1; visibility:visible; transition:opacity .2s var(--ease-out); }
.modal{
  background:var(--surface); border-radius:18px; width:100%; max-width:460px; box-shadow:var(--shadow-pop);
  max-height:88vh; overflow-y:auto; transform:translateY(16px) scale(.98); transition:transform .22s var(--ease-out);
}
/* Script authoring needs room — at 460px a long script wrapped into a very
   tall, scroll-heavy column. Wide enough to write in, still short of a
   full-screen sheet. */
.modal-wide{ max-width:760px; }
.modal-overlay.open .modal{ transform:translateY(0) scale(1); }
.modal-head{ padding:20px 22px 0; display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
.modal-head h3{ font-size:17px; font-weight:800; }
.modal-head p{ font-size:12.5px; color:var(--ink-soft); margin-top:4px; }
.modal-body{ padding:18px 22px; display:flex; flex-direction:column; gap:12px; }
.modal-foot{ padding:16px 22px 22px; display:flex; justify-content:flex-end; gap:10px; }
.color-picker{ display:flex; gap:8px; }
.color-opt{ width:30px; height:30px; border-radius:9px; border:2px solid transparent; cursor:pointer; position:relative; }
.color-opt.selected{ border-color:var(--ink); }
.color-opt.selected::after{ content:'✓'; position:absolute; inset:0; display:flex; align-items:center; justify-content:center; color:#fff; font-size:13px; font-weight:800; }

/* Hashtag picker — toggleable chips, pre-populated per selected pillar */
.tagpicker{ display:flex; flex-wrap:wrap; gap:7px; }
.tagpicker button{
  border:1px solid var(--line); background:var(--paper); color:var(--ink-soft);
  font-family:var(--font-mono); font-size:11.5px; font-weight:500; padding:6px 12px;
  border-radius:var(--radius-pill); transition:all .14s var(--ease-out); min-height:32px;
}
.tagpicker button.selected{ background:rgba(236,128,43,.12); border-color:rgba(236,128,43,.4); color:var(--orange-ink); font-weight:600; }
.tagpicker button:disabled{ opacity:.5; cursor:not-allowed; }
.tagpicker.empty-hint{ font-size:12px; color:var(--ink-soft); font-family:var(--font-body); }

/* ---- Content Setting: zero-typing input components -----------------------
   Every setting that has a knowable answer is ticked, stepped or derived —
   only genuinely descriptive fields stay free text. */

/* Read-only value the system derived (pillar hashtag, locked pillar, …) */
.auto-value{
  border:1px dashed var(--line); border-radius:9px; padding:10px 12px;
  background:var(--paper); font-size:13px; color:var(--ink-soft); min-height:44px;
  display:flex; align-items:center; gap:8px;
}

/* Multi-select preset picklist (Format Content) — same look as .tagpicker
   but with a tick affordance, since these are choices not tags. */
.tickpicker{ display:flex; flex-wrap:wrap; gap:8px; }
.tickpicker button{
  display:inline-flex; align-items:center; gap:7px;
  border:1px solid var(--line); background:var(--paper); color:var(--ink-soft);
  font-size:12.5px; font-weight:600; padding:8px 14px; min-height:38px;
  border-radius:var(--radius-pill); transition:all .14s var(--ease-out);
}
.tickpicker button .tick{
  width:15px; height:15px; border-radius:50%; border:1.5px solid var(--line);
  display:flex; align-items:center; justify-content:center; flex-shrink:0;
}
.tickpicker button .tick svg{ width:9px; height:9px; stroke:transparent; stroke-width:3.4; }
.tickpicker button.selected{ background:rgba(236,128,43,.1); border-color:rgba(236,128,43,.42); color:var(--orange-ink); }
.tickpicker button.selected .tick{ background:var(--orange); border-color:var(--orange); }
.tickpicker button.selected .tick svg{ stroke:#fff; }
.tickpicker button:disabled{ opacity:.5; cursor:not-allowed; }

/* Numeric stepper — click to adjust, typing optional */
.stepper{ display:inline-flex; align-items:center; gap:0; }
.stepper button{
  width:38px; height:42px; border:1px solid var(--line); background:var(--surface);
  color:var(--ink); display:flex; align-items:center; justify-content:center;
  font-size:17px; font-weight:700; line-height:1; transition:all .14s var(--ease-out);
}
.stepper button:first-child{ border-radius:10px 0 0 10px; }
.stepper button:last-child{ border-radius:0 10px 10px 0; }
.stepper button:hover:not(:disabled){ background:var(--paper); border-color:var(--orange); color:var(--orange-ink); }
.stepper button:disabled{ opacity:.4; cursor:not-allowed; }
.stepper input{
  width:96px; height:42px; text-align:center; border:1px solid var(--line);
  border-left:none; border-right:none; background:var(--paper);
  font-family:var(--font-mono); font-size:14px; font-weight:600; color:var(--ink);
  min-height:42px; padding:0 4px;
}
.stepper input:focus{ outline:none; background:#fff; }
.stepper input:disabled{ opacity:.7; }
.stepper .unit{ font-size:12px; color:var(--ink-soft); margin-left:10px; white-space:nowrap; }

/* One settings row: pillar identity on the left, its control on the right */
.set-row{
  display:flex; align-items:center; justify-content:space-between; gap:16px;
  padding:14px 0; border-bottom:1px solid var(--line); flex-wrap:wrap; row-gap:12px;
}
.set-row:last-child{ border-bottom:none; }
.set-row .set-meta{ min-width:0; flex:1; }
.set-row .set-name{ font-weight:700; font-size:13.5px; display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.set-row .set-sub{ font-size:12px; color:var(--ink-soft); margin-top:3px; }
.set-row .set-control{ display:flex; align-items:center; gap:10px; flex-shrink:0; flex-wrap:wrap; }

/* Setup-readiness checklist */
.setup-card{
  background:var(--surface); border:1px solid var(--line); border-radius:var(--radius-card);
  box-shadow:var(--shadow-card); padding:16px 18px; margin-bottom:18px;
}
.setup-head{ display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; margin-bottom:12px; }
.setup-title{ font-family:var(--font-head); font-weight:800; font-size:14px; }
.setup-list{ display:grid; grid-template-columns:repeat(auto-fit, minmax(210px,1fr)); gap:8px; }
.setup-item{
  display:flex; align-items:flex-start; gap:9px; padding:9px 11px; border-radius:10px;
  border:1px solid var(--line); background:var(--paper); text-align:left; width:100%;
  transition:all .14s var(--ease-out);
}
.setup-item:hover{ border-color:var(--orange); background:#fff; }
.setup-item .setup-mark{
  width:17px; height:17px; border-radius:50%; flex-shrink:0; margin-top:1px;
  display:flex; align-items:center; justify-content:center; border:1.5px solid var(--line);
}
.setup-item .setup-mark svg{ width:10px; height:10px; stroke-width:3.4; }
.setup-item.done .setup-mark{ background:var(--teal); border-color:var(--teal); }
.setup-item.done .setup-mark svg{ stroke:#fff; }
.setup-item.todo .setup-mark{ border-color:var(--critical); background:rgba(207,74,58,.1); }
.setup-item .setup-text{ min-width:0; }
.setup-item .setup-label{ font-size:12.5px; font-weight:700; }
.setup-item .setup-note{ font-size:11px; color:var(--ink-soft); margin-top:2px; line-height:1.4; }

/* ---- Content Plan: script list ------------------------------------------ */
/* Pillar picker (Content Plan step 1) — a responsive grid rather than one
   narrow stacked column, which left most of the page empty on desktop. */
.pillar-pick-grid{
  display:grid; grid-template-columns:repeat(auto-fit, minmax(290px, 1fr));
  gap:12px; align-items:stretch;
}
.pillar-pick-grid .pick-row{ height:100%; }

/* Script list — capped to a comfortable reading measure. Full-bleed rows made
   the excerpt run the entire page width, which is tiring to read. */
/* Script slots: four across, full width — the old single-column list was
   capped at 1080px, which left a dead gutter on the right while the toolbar
   above it ran to the edge. */
.script-grid{ display:grid; grid-template-columns:repeat(4, minmax(0,1fr)); gap:12px; align-items:stretch; }
.script-caption{ margin:0 0 12px; }
.script-card{
  display:flex; flex-direction:column; gap:8px; text-align:left;
  border:1px solid var(--line); border-radius:var(--radius-card); padding:13px 14px;
  background:var(--surface); min-height:172px;
  transition:box-shadow .16s var(--ease-out), transform .16s var(--ease-out), border-color .16s var(--ease-out);
}
/* Written: carries the pillar colour, so "done" reads at a glance. */
.script-card.is-filled{ border-left:3px solid var(--accent, var(--line)); }
.script-card.is-filled:hover{ box-shadow:var(--shadow-pop); transform:translateY(-1px); }
.script-card-head{ display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
.script-slot{ font-size:11px; font-weight:700; color:var(--ink-soft); }
.script-card .script-title{ font-weight:700; font-size:13.4px; line-height:1.35; }
.script-card .script-tags{ display:flex; gap:6px; flex-wrap:wrap; align-items:center; }
.script-card .script-excerpt{
  font-size:12px; color:var(--ink-soft); line-height:1.5; margin:0;
  display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden;
}
.script-card .script-actions{ display:flex; gap:8px; margin-top:auto; }
/* Still to do: plain, dashed, and the whole card is the create action. */
.script-card.is-empty{
  align-items:center; justify-content:center; text-align:center; gap:5px;
  border:1.5px dashed var(--line); background:transparent; cursor:pointer;
  font-family:inherit; color:var(--ink-soft);
}
.script-card.is-empty:hover{ border-color:var(--orange); color:var(--orange-ink); background:rgba(236,128,43,.04); }
.script-card.is-empty.is-readonly{ cursor:default; }
.script-card.is-empty.is-readonly:hover{ border-color:var(--line); color:var(--ink-soft); background:transparent; }
.script-empty-mark{ display:flex; align-items:center; justify-content:center; width:28px; height:28px; border-radius:50%; background:var(--paper); }
.script-empty-mark svg{ width:15px; height:15px; stroke:currentColor; }
.script-empty-title{ font-size:12.8px; font-weight:700; }
.script-empty-hint{ font-size:11.5px; }
@media (max-width:1400px){ .script-grid{ grid-template-columns:repeat(3, minmax(0,1fr)); } }
@media (max-width:1080px){ .script-grid{ grid-template-columns:repeat(2, minmax(0,1fr)); } }
@media (max-width:720px){ .script-grid{ grid-template-columns:minmax(0,1fr); } }

/* Pillar progress bar (Content Tracker frequency) */
.freq-strip{ display:grid; grid-template-columns:repeat(auto-fit, minmax(190px,1fr)); gap:10px; margin-bottom:18px; }
.freq-card{
  background:var(--surface); border:1px solid var(--line); border-radius:var(--radius-card);
  padding:12px 14px;
}
.freq-card .freq-top{ display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:8px; }
.freq-card .freq-name{ font-size:12.3px; font-weight:700; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; min-width:0; }
.freq-card .freq-count{ font-family:var(--font-mono); font-size:12px; color:var(--ink-soft); flex-shrink:0; }
.freq-card .freq-track{ height:6px; border-radius:var(--radius-pill); background:var(--line); overflow:hidden; }
.freq-card .freq-fill{ height:100%; border-radius:var(--radius-pill); transition:width .5s var(--ease-out); }

/* Calendar note markers + list — bottom-right corner (top-left is the date
   number, top-right is the item-count badge). A filled dot-in-a-ring reads as
   "there's a note" at a glance, clearer than the old bare 6px square. */
.cal-cell .cal-note-mark{
  position:absolute; bottom:6px; right:6px; width:11px; height:11px; border-radius:50%;
  background:var(--gold); border:2px solid var(--gold-ink); box-shadow:0 0 0 2px var(--surface);
}
.note-item{
  display:flex; align-items:flex-start; gap:10px; padding:11px 0;
  border-bottom:1px solid var(--line);
}
.note-item:last-of-type{ border-bottom:none; }
.note-item .note-body{ min-width:0; flex:1; }
.note-item .note-text{ font-size:12.8px; line-height:1.5; }
.note-item .note-meta{ font-size:10.5px; color:var(--ink-soft); margin-top:3px; font-family:var(--font-mono); }

/* Inline action row on a kanban card */
.kcard-actions{ display:flex; gap:6px; margin-top:10px; }
.kcard-actions .btn{ flex:1; padding:6px 8px; min-height:32px; font-size:11.5px; border-radius:9px; }
.kcard-note{
  font-size:11px; color:var(--critical); background:rgba(207,74,58,.07);
  border:1px solid rgba(207,74,58,.2); border-radius:8px; padding:6px 8px;
  margin-bottom:9px; line-height:1.4;
}

/* Drawer action row (Approve / Reject / Publish) */
.drawer-actions-row{ display:flex; gap:8px; margin:16px 0 4px; }
.drawer-actions-row .btn{ flex:1; }
.reject-banner{
  display:flex; gap:8px; align-items:flex-start; background:rgba(207,74,58,.08); border:1px solid rgba(207,74,58,.2);
  border-radius:10px; padding:10px 12px; font-size:12.5px; color:var(--ink); margin:14px 0; line-height:1.5;
}
.reject-banner svg{ width:16px; height:16px; stroke:var(--critical); flex-shrink:0; margin-top:1px; }

/* ---- Toast ------------------------------------------------------------------ */
.toast-wrap{ position:fixed; bottom:24px; right:24px; z-index:200; display:flex; flex-direction:column; gap:10px; }
.toast{
  display:flex; align-items:center; gap:10px; background:var(--ink); color:#fff; padding:12px 16px; border-radius:12px;
  box-shadow:var(--shadow-pop); font-size:13px; font-weight:600; min-width:220px;
}
.toast svg{ width:16px; height:16px; stroke:var(--teal); flex-shrink:0; }
/* Undo affordance — a destructive action the user can take back for a few
   seconds, instead of a confirm dialog on every small delete. */
.toast-action{
  margin-left:auto; flex-shrink:0; background:rgba(255,255,255,.14); color:#fff; border:none;
  font-family:inherit; font-size:12px; font-weight:700; padding:5px 11px; border-radius:var(--radius-pill);
  cursor:pointer; transition:background .16s var(--ease-out);
}
.toast-action:hover{ background:rgba(255,255,255,.26); }

/* ---- Drawer (activity log / detail) ------------------------------------------ */
.drawer-overlay{
  position:fixed; inset:0; background:rgba(42,32,24,.35); backdrop-filter:blur(2px); z-index:90;
  display:flex; align-items:center; justify-content:center; padding:20px;
  opacity:0; visibility:hidden; transition:opacity .2s var(--ease-out), visibility 0s .2s;
}
.drawer-overlay.open{ opacity:1; visibility:visible; transition:opacity .2s var(--ease-out); }
.drawer{
  background:var(--surface); border-radius:18px; width:100%; max-width:480px; box-shadow:var(--shadow-pop);
  max-height:88vh; overflow-y:auto; border:1px solid var(--line);
  transform:translateY(16px) scale(.98); transition:transform .22s var(--ease-out);
}
.drawer-overlay.open .drawer{ transform:translateY(0) scale(1); }
.drawer-head{ padding:22px; border-bottom:1px solid var(--line); display:flex; justify-content:space-between; align-items:flex-start; gap:12px; }
.drawer-body{ padding:22px; }
.timeline{ display:flex; flex-direction:column; }
.tl-item{ display:flex; gap:12px; padding-bottom:18px; position:relative; }
.tl-item::before{ content:''; position:absolute; left:5px; top:16px; bottom:0; width:1px; background:var(--line); }
.tl-item:last-child::before{ display:none; }
.tl-dot{ width:11px; height:11px; border-radius:50%; background:var(--orange); margin-top:4px; flex-shrink:0; box-shadow:0 0 0 3px rgba(236,128,43,.15); }
.tl-text{ font-size:12.8px; line-height:1.5; }
.tl-time{ font-size:11px; color:var(--ink-soft); margin-top:2px; }

/* ---- View toggle (Board / Calendar / Table) transitions ---------------------- */
.subview{ display:none; }
.subview.active{ display:block; }

/* ---- Content Plan drill-down: account → pillar → list ------------------------ */
.cp-breadcrumb{ display:flex; align-items:center; gap:6px; margin-bottom:20px; font-size:13px; flex-wrap:wrap; }
.cp-crumb{
  background:none; border:none; padding:4px 2px; font-family:var(--font-body); font-weight:600; font-size:13px;
  color:var(--ink-soft); cursor:pointer; border-radius:6px;
}
.cp-crumb:hover:not(.current){ color:var(--orange-ink); text-decoration:underline; }
.cp-crumb.current{ color:var(--ink); cursor:default; font-weight:700; }
.cp-crumb-sep{ color:var(--line); }

.pick-row{
  display:flex; align-items:center; gap:14px; width:100%; text-align:left;
  background:var(--surface); border:1px solid var(--line); border-radius:var(--radius-card);
  box-shadow:var(--shadow-card); padding:16px 18px; transition:transform .16s var(--ease-out), box-shadow .16s var(--ease-out);
  font-family:inherit; color:inherit;
}
.pick-row:hover{ transform:translateY(-2px); box-shadow:var(--shadow-pop); border-color:rgba(236,128,43,.3); }
.pick-row .pick-icon{ width:44px; height:44px; border-radius:12px; display:flex; align-items:center; justify-content:center; flex-shrink:0; color:#fff; }
.pick-row .pick-icon svg{ width:20px; height:20px; stroke:#fff; }
.pick-row .pick-meta{ flex:1; min-width:0; }
.pick-row .pick-title{ font-family:var(--font-head); font-weight:800; font-size:14.5px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.pick-row .pick-sub{ font-size:12px; color:var(--ink-soft); margin-top:2px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.pick-row .pick-count{ font-family:var(--font-mono); font-size:12.5px; color:var(--ink-soft); flex-shrink:0; white-space:nowrap; }
.pick-row .chev{ width:16px; height:16px; stroke:var(--ink-soft); flex-shrink:0; }

/* ---- Empty / placeholder platform icon colors -------------------------------- */
.plat-ig{ background:linear-gradient(135deg,var(--orange),var(--gold)); }
.plat-tt{ background:linear-gradient(135deg,var(--teal),#3f9e95); }

/* ---- Utility ------------------------------------------------------------------ */
.flex{ display:flex; }
.items-center{ align-items:center; }
.gap-8{ gap:8px; }
.gap-10{ gap:10px; }
.gap-12{ gap:12px; }
.muted{ color:var(--ink-soft); }
.text-sm{ font-size:12.5px; }
.mt-4{ margin-top:4px; }
.w-full{ width:100%; }
.center-col{ display:flex; flex-direction:column; align-items:center; text-align:center; }

/* =========================================================================
   LOGIN SCREEN
   ========================================================================= */
.login-shell{ min-height:100vh; display:flex; background:var(--paper); }
.login-hero{
  flex:1 1 44%; position:relative; overflow:hidden; display:flex; flex-direction:column; justify-content:space-between;
  padding:44px; color:#fff;
  background:
    radial-gradient(circle at 10% 90%, #EDC55B, transparent 65%),
    radial-gradient(circle at 90% 90%, #2E8E85, transparent 60%),
    radial-gradient(circle at 80% 10%, #C4681E, transparent 65%),
    radial-gradient(circle at 15% 10%, rgba(237,197,91,.65), transparent 60%),
    #ec802b;
}
.login-hero .deco-shape{ position:absolute; opacity:.16; }
.login-hero-top{ display:flex; align-items:center; gap:12px; position:relative; z-index:2; }
.login-hero-top .brand-mark{ background:rgba(255,255,255,.22); box-shadow:none; }
.login-hero-top strong{ font-family:var(--font-head); font-weight:800; font-size:18px; }
.login-hero-mid{ position:relative; z-index:2; max-width:380px; }
.login-hero-mid h1{ font-size:34px; font-weight:800; line-height:1.15; margin-bottom:14px; color:#fff; }
.login-hero-mid p{ font-size:14.5px; opacity:.92; line-height:1.6; }
.hero-stat-card{
  margin-top:26px; padding:16px 18px; border-radius:16px; display:flex; gap:20px;
  background:rgba(255,255,255,.18); backdrop-filter:blur(18px) saturate(160%);
  border:1px solid rgba(255,255,255,.4); box-shadow:0 6px 20px rgba(0,0,0,.12), inset 0 1px 0 rgba(255,255,255,.3);
}
.hero-stat-card div strong{ display:block; font-family:var(--font-mono); font-size:19px; }
.hero-stat-card div span{ font-size:10.5px; opacity:.85; text-transform:uppercase; letter-spacing:.04em; }
.login-hero-foot{ position:relative; z-index:2; font-size:12px; opacity:.85; }

.login-panel{ flex:1 1 56%; display:flex; align-items:center; justify-content:center; padding:40px; }
.login-form-card{ width:100%; max-width:380px; }
.login-form-card h2{ font-size:24px; font-weight:800; margin-bottom:6px; }
.login-form-card > p{ font-size:13.5px; color:var(--ink-soft); margin-bottom:28px; }
.field-pw-wrap{ position:relative; }
.field-pw-wrap button{ position:absolute; right:8px; top:6px; bottom:6px; background:none; border:none; color:var(--ink-soft); padding:0 8px; display:flex; align-items:center; }
.field-pw-wrap button svg{ width:17px; height:17px; stroke:currentColor; }
.row-between{ display:flex; align-items:center; justify-content:space-between; margin:2px 0 4px; font-size:12.5px; }
.checkbox-row{ display:flex; align-items:center; gap:7px; color:var(--ink-soft); }
.checkbox-row input{ width:16px; height:16px; accent-color:var(--orange); }
.divider-text{ display:flex; align-items:center; gap:10px; color:var(--ink-soft); font-size:11.5px; margin:22px 0 16px; text-transform:uppercase; letter-spacing:.05em; }
.divider-text::before, .divider-text::after{ content:''; flex:1; height:1px; background:var(--line); }
.role-demo{ display:grid; grid-template-columns:repeat(3,1fr); gap:8px; }
.role-demo button{
  display:flex; flex-direction:column; align-items:center; gap:6px; padding:12px 6px; border-radius:12px;
  border:1px solid var(--line); background:var(--surface); font-size:11px; font-weight:700; color:var(--ink-soft);
  transition:all .16s var(--ease-out); min-height:44px;
}
.role-demo button svg{ width:17px; height:17px; stroke:currentColor; }
.role-demo button:hover{ border-color:var(--orange); color:var(--orange-ink); background:rgba(236,128,43,.06); }
.login-footnote{ margin-top:24px; font-size:11.5px; color:var(--ink-soft); text-align:center; line-height:1.6; }

@media (max-width:920px){
  .login-shell{ flex-direction:column; }
  .login-hero{ padding:30px; }
  .login-hero-mid h1{ font-size:26px; }
  .hero-stat-card{ display:none; }
}

/* =========================================================================
   RESPONSIVE — app shell
   ========================================================================= */
@media (max-width:1000px){
  .sidebar{ transform:translateX(-100%); box-shadow:var(--shadow-pop); }
  .sidebar.open{ transform:translateX(0); }
  .main{ margin-left:0; }
  .hamburger{ display:flex; }
  /* Below the sidebar breakpoint there isn't room for four columns — fall
     back to fixed-width columns that scroll horizontally. */
  .board{ grid-auto-columns:220px; }
  .board-col{ min-width:220px; }
}
@media (max-width:640px){
  .topbar{ padding:0 16px; }
  .view{ padding:18px 16px 50px; }
  .topbar-title h1{ font-size:18px; }
  .cal-cell{ min-height:60px; }
}
.scrim{
  position:fixed; inset:0; background:rgba(42,32,24,.35); z-index:35; opacity:0; visibility:hidden; transition:opacity .2s, visibility 0s .2s;
}
.scrim.open{ opacity:1; visibility:visible; transition:opacity .2s; }

/* ==========================================================================
   AURA SKIN — 2026 visual refresh
   Frosted glass, amber gradient blooms, deep-ink sidebar, section banners.

   This is a PRESENTATION LAYER ONLY. It redefines tokens and restyles existing
   components; it adds no markup hooks that carry behaviour and changes no
   feature. Everything below overrides the base sheet above by cascade order,
   so the original rules stay readable as the structural reference.
   ========================================================================== */

:root{
  /* Ground + ink — cooler, deeper, closer to a modern product surface */
  --paper:#F4F2EF;
  --surface:#FFFFFF;
  --line:rgba(18,14,10,.08);
  --ink:#12100E;
  --ink-soft:#6E6760;

  /* Amber ramp — the accent the whole skin is built around */
  --amber-1:#F8BE5C;
  --amber-2:#EC802B;
  --amber-3:#C2510E;
  --ink-deep:#0C0B0A;

  /* Softer, wider corners and lighter shadows */
  --radius-card:20px;
  --radius-card-sm:15px;
  --radius-btn:13px;
  --shadow-card:0 1px 2px rgba(18,14,10,.04), 0 12px 32px -14px rgba(18,14,10,.16);
  --shadow-pop:0 28px 64px -22px rgba(18,14,10,.38), 0 6px 18px rgba(18,14,10,.10);

  /* One glass recipe, reused everywhere something floats */
  --glass:saturate(180%) blur(18px);

  --font-body:'Manrope', 'Segoe UI', sans-serif;
}

/* Amber bloom behind everything — fixed, so it reads as light in the room
   rather than a texture that scrolls with the content. */
body{
  background:
    radial-gradient(1100px 620px at 68% 8%, rgba(248,190,92,.55), transparent 58%),
    radial-gradient(760px 520px at 96% 40%, rgba(236,128,43,.26), transparent 60%),
    radial-gradient(680px 460px at 6% 0%, rgba(248,190,92,.20), transparent 62%),
    var(--paper);
  background-attachment:fixed;
  letter-spacing:-.005em;
}

/* ---- Sidebar: deep ink with an amber glow at its foot -------------------- */
.sidebar{
  background:
    radial-gradient(520px 340px at 18% 104%, rgba(236,128,43,.40), transparent 64%),
    radial-gradient(420px 300px at 96% -6%, rgba(248,190,92,.18), transparent 60%),
    linear-gradient(180deg, #1A1611 0%, #100E0C 52%, #0B0A09 100%);
  border-right:1px solid rgba(255,255,255,.07);
}
.brand{ border-bottom-color:rgba(255,255,255,.08); }
.sidebar .brand-mark{
  background:linear-gradient(140deg, var(--amber-1), var(--amber-3));
  box-shadow:0 10px 24px -8px rgba(236,128,43,.65);
  border-radius:13px;
}
.sidebar-foot{ border-top-color:rgba(255,255,255,.08); }
.nav-item{ border-radius:12px; }
.nav-item:hover{ background:rgba(255,255,255,.07); }
.nav-item.active{
  background:linear-gradient(135deg, rgba(248,190,92,.20), rgba(236,128,43,.10));
  border-color:rgba(248,190,92,.24);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.12);
}
.nav-item.active::before{
  background:linear-gradient(180deg, var(--amber-1), var(--amber-3));
  border-radius:0 4px 4px 0;
}
.sidebar .icon-btn{ background:rgba(255,255,255,.08); border-color:rgba(255,255,255,.14); }
.sidebar .icon-btn:hover{ background:rgba(255,255,255,.16); border-color:rgba(255,255,255,.28); }
.sidebar .pick-row{
  background:rgba(255,255,255,.07); border-color:rgba(255,255,255,.14);
  border-radius:14px;
}
.sidebar .pick-row:hover{ background:rgba(255,255,255,.13); border-color:rgba(255,255,255,.26); }
.user-card:hover{ background:rgba(255,255,255,.07); }

/* ---- Topbar: sticky glass, title steps back for the banner --------------- */
.topbar{
  background:rgba(244,242,239,.62);
  backdrop-filter:var(--glass);
  border-bottom:1px solid rgba(18,14,10,.06);
}
.topbar-title h1{ font-size:26px; font-weight:800; letter-spacing:-.015em; }
.topbar-title p{ font-size:14px; margin-top:4px; }



/* ---- Surfaces: frosted, wider corners ------------------------------------ */
.card{
  background:rgba(255,255,255,.74);
  backdrop-filter:var(--glass);
  border:1px solid rgba(255,255,255,.62);
  box-shadow:var(--shadow-card);
}
.stat-card{
  background:rgba(255,255,255,.74);
  backdrop-filter:var(--glass);
  border:1px solid rgba(255,255,255,.62);
  border-radius:var(--radius-card);
  padding:20px 22px 18px;
}
.stat-card::before{
  height:100%; width:3px; right:auto; bottom:0;
  background:linear-gradient(180deg, var(--stripe, var(--orange)), transparent 85%);
}
.stat-value{ font-size:32px; letter-spacing:-.02em; }

/* The first Overview tile becomes the dark hero card, the way the reference
   anchors its grid with one high-contrast panel. */
#overview-stats .stat-card:first-child{
  background:
    radial-gradient(360px 220px at 92% -25%, rgba(248,190,92,.80), transparent 62%),
    linear-gradient(140deg, #17130E 0%, #2B2015 52%, #120F0C 100%);
  border-color:rgba(255,255,255,.10);
  color:#fff;
}
#overview-stats .stat-card:first-child .stat-label,
#overview-stats .stat-card:first-child .stat-sub{ color:rgba(255,255,255,.66); }
#overview-stats .stat-card:first-child .stat-value{ color:#fff; }
#overview-stats .stat-card:first-child::before{ opacity:.85; }

/* ---- Buttons ------------------------------------------------------------- */
.btn-primary{
  background:linear-gradient(135deg, var(--amber-1) 0%, var(--amber-2) 55%, var(--amber-3) 100%);
  border-color:rgba(194,81,14,.30);
  box-shadow:0 10px 24px -10px rgba(236,128,43,.75), inset 0 1px 0 rgba(255,255,255,.34);
}
.btn-primary:hover{
  background:linear-gradient(135deg, var(--amber-1) 0%, var(--amber-2) 40%, var(--amber-3) 100%);
  box-shadow:0 14px 30px -10px rgba(236,128,43,.85), inset 0 1px 0 rgba(255,255,255,.4);
}
.btn-glass{
  background:rgba(255,255,255,.55); backdrop-filter:var(--glass);
  border-color:rgba(18,14,10,.07);
  box-shadow:0 8px 20px -10px rgba(18,14,10,.22), inset 0 1px 0 rgba(255,255,255,.7);
}
.btn-ghost{ border-color:rgba(18,14,10,.10); background:rgba(255,255,255,.4); }
.btn-ghost:hover{ background:rgba(255,255,255,.8); border-color:rgba(18,14,10,.2); }
.icon-btn{ border-radius:11px; background:rgba(255,255,255,.6); border-color:rgba(18,14,10,.08); }

/* ---- Pills, tabs, chips -------------------------------------------------- */
.segmented{ background:rgba(255,255,255,.55); backdrop-filter:var(--glass); border-color:rgba(18,14,10,.07); }
.segmented button.active{
  background:var(--ink-deep); color:#fff;
  box-shadow:0 8px 18px -10px rgba(18,14,10,.7);
}
.pm-tabstrip-bar .pm-tab.active{
  background:linear-gradient(135deg, var(--amber-1), var(--amber-3));
  box-shadow:0 10px 22px -12px rgba(236,128,43,.85);
}
.chip{ border-radius:var(--radius-pill); }

/* ---- Floating layers: all glass ----------------------------------------- */
.dropdown-panel,
.cal-popover{
  background:rgba(255,255,255,.82);
  backdrop-filter:var(--glass);
  border-color:rgba(255,255,255,.6);
}
.modal{
  background:rgba(255,255,255,.88);
  backdrop-filter:var(--glass);
  border:1px solid rgba(255,255,255,.6);
  border-radius:24px;
}
.modal-overlay{ background:rgba(12,11,10,.46); backdrop-filter:blur(4px); }
.drawer{ background:rgba(255,255,255,.9); backdrop-filter:var(--glass); border-radius:24px; border:1px solid rgba(255,255,255,.6); }
.toast{ background:rgba(12,11,10,.92); backdrop-filter:var(--glass); border-radius:14px; }

/* ---- Inputs -------------------------------------------------------------- */
.field input, .field select, .field textarea{
  border-radius:12px; background:rgba(255,255,255,.7); border-color:rgba(18,14,10,.10);
}
.field input:focus, .field select:focus, .field textarea:focus{
  box-shadow:0 0 0 3px rgba(236,128,43,.16);
}

/* ---- Board / tracker surfaces ------------------------------------------- */
.board-col{
  background:rgba(255,255,255,.45);
  backdrop-filter:var(--glass);
  border-color:rgba(255,255,255,.55);
}
.kcard{
  background:rgba(255,255,255,.86); backdrop-filter:var(--glass);
  border-color:rgba(255,255,255,.6); border-radius:var(--radius-card-sm);
}
.cal-cell{
  background:rgba(255,255,255,.62); backdrop-filter:var(--glass);
  border-color:rgba(255,255,255,.55); border-radius:14px;
}
.cal-cell.today{
  background:linear-gradient(140deg, var(--amber-1), var(--amber-2) 60%, var(--amber-3));
  border-color:transparent;
  box-shadow:0 12px 26px -14px rgba(236,128,43,.9);
}
.cal-agenda{ background:rgba(255,255,255,.74); backdrop-filter:var(--glass); }
.agenda-card{ backdrop-filter:none; }

/* ---- Tables -------------------------------------------------------------- */
.table-wrap{ border-radius:var(--radius-card); overflow:hidden; }
thead th{ background:rgba(255,255,255,.5); }

/* ---- Sign-in: same deep-ink + amber language as the dashboard ------------ */
.login-hero{
  background:
    radial-gradient(760px 520px at 78% -12%, rgba(248,190,92,.85), transparent 62%),
    radial-gradient(560px 420px at 6% 108%, rgba(236,128,43,.55), transparent 62%),
    linear-gradient(150deg, #17130E 0%, #2B2015 48%, #0E0C0A 100%);
}
.login-hero-top .brand-mark{
  background:linear-gradient(140deg, var(--amber-1), var(--amber-3));
  box-shadow:0 10px 24px -8px rgba(236,128,43,.65);
}
.login-shell{ background:var(--paper); }
.login-panel{
  background:
    radial-gradient(700px 460px at 80% 0%, rgba(248,190,92,.30), transparent 60%),
    var(--paper);
}
.role-demo button{
  background:rgba(255,255,255,.6); backdrop-filter:var(--glass);
  border-color:rgba(18,14,10,.08); border-radius:14px;
}
.role-demo button:hover{ background:rgba(255,255,255,.9); border-color:rgba(236,128,43,.4); color:var(--ink); }
.hero-stat-card{ background:rgba(255,255,255,.10); backdrop-filter:var(--glass); border-color:rgba(255,255,255,.18); }

/* ==========================================================================
   AURA SKIN — surface pass
   The first pass kept every card outlined in a hairline and stamped with a
   coloured stripe. That combination is what made the boxes read as generic:
   a grid of identical outlined rectangles with a template accent on each one.
   The reference does the opposite — no outline at all, deeper corners, real
   whitespace, elevation carrying the separation, and colour arriving as a
   faint wash rather than a bar. This pass rebuilds the surfaces on that model.
   ========================================================================== */

:root{
  --radius-card:26px;
  --radius-card-sm:18px;
  --radius-btn:14px;
  /* Elevation instead of outlines: a tight contact shadow, a wide soft one,
     and a hairline of light along the top edge for the glass lip. */
  --shadow-card:
    0 1px 2px rgba(18,14,10,.04),
    0 10px 28px -14px rgba(18,14,10,.18),
    inset 0 1px 0 rgba(255,255,255,.85);
  --shadow-lift:
    0 2px 4px rgba(18,14,10,.05),
    0 22px 48px -20px rgba(18,14,10,.28),
    inset 0 1px 0 rgba(255,255,255,.9);
}

/* ---- Cards: borderless, deeper, roomier --------------------------------- */
.card{
  border:none;
  border-radius:var(--radius-card);
  background:rgba(255,255,255,.80);
  box-shadow:var(--shadow-card);
}
.card-pad{ padding:24px 26px; }
/* A card sitting inside another card should read as a panel, not a second
   floating object — otherwise the stack turns into shadow soup. */
.card .card{
  box-shadow:none;
  background:rgba(255,255,255,.55);
  border:1px solid rgba(18,14,10,.05);
}

/* ---- Stat tiles: the number is the object ------------------------------- */
.stat-card{
  border:none;
  border-radius:var(--radius-card);
  background:rgba(255,255,255,.80);
  box-shadow:var(--shadow-card);
  padding:24px 26px 22px;
  transition:transform .18s var(--ease-out), box-shadow .18s var(--ease-out);
}
.stat-card:hover{ transform:translateY(-2px); box-shadow:var(--shadow-lift); }
/* Colour arrives as a wash in the corner, not a bar down the side. The tile
   keeps its per-metric identity without every card wearing the same stripe. */
.stat-card::before{
  content:''; position:absolute; inset:0; width:auto; height:auto;
  border-radius:inherit; pointer-events:none; opacity:.13;
  background:radial-gradient(300px 170px at 106% -30%, var(--stripe, var(--orange)), transparent 62%);
}
.stat-card > *{ position:relative; z-index:1; }
.stat-label{
  font-size:11px; font-weight:700; letter-spacing:.10em; text-transform:uppercase;
  color:var(--ink-soft);
}
/* Big, tight, tabular — the reference leads with the figure and lets
   everything else sit quietly underneath it. */
.stat-card .stat-value{
  font-family:var(--font-head);
  font-size:42px; font-weight:800; letter-spacing:-.035em; line-height:1.04;
  margin-top:14px; font-variant-numeric:tabular-nums;
}
.stat-foot{ margin-top:14px; }
.stat-sub{ font-size:11.5px; }
.stat-spark{ opacity:.9; }

#overview-stats .stat-card:first-child{ box-shadow:0 18px 44px -22px rgba(18,14,10,.6); }
#overview-stats .stat-card:first-child:hover{ box-shadow:0 26px 60px -24px rgba(18,14,10,.7); }
#overview-stats .stat-card:first-child::before{ opacity:0; }

/* ---- Chips: fills only, no outlines ------------------------------------- */
.chip{ padding:4px 11px 4px 9px; font-size:11px; letter-spacing:.005em; }
.chip-neutral{ background:rgba(18,14,10,.05); color:var(--ink-soft); border:none; }
.delta{ padding:4px 9px; font-size:11.5px; }

/* ---- Round controls, the way the reference draws them ------------------- */
.icon-btn{
  width:36px; height:36px; border-radius:50%;
  background:rgba(255,255,255,.7); border:1px solid rgba(18,14,10,.06);
  box-shadow:0 2px 6px -3px rgba(18,14,10,.2);
}
.icon-btn:hover{ background:#fff; }
.sidebar .icon-btn{ border-radius:50%; box-shadow:none; }

/* ---- Section heads: quieter label, more air ----------------------------- */
.section-head{ margin:38px 0 18px; }
.section-head h2{ font-size:18px; letter-spacing:-.02em; }
.section-head p{ font-size:12.5px; margin-top:4px; }

/* ---- Tables: one surface, no inner grid --------------------------------- */
.table-wrap{
  border:none; border-radius:var(--radius-card);
  background:rgba(255,255,255,.80); box-shadow:var(--shadow-card);
}
thead th{
  background:transparent; border-bottom:1px solid rgba(18,14,10,.07);
  padding:16px 20px; letter-spacing:.10em;
}
tbody td{ padding:15px 20px; border-bottom:1px solid rgba(18,14,10,.045); }
tbody tr:hover{ background:rgba(236,128,43,.045); }

/* ---- Tracker + plan surfaces -------------------------------------------- */
.board-col{
  border:none; border-radius:var(--radius-card);
  background:rgba(255,255,255,.42);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.7);
}
.board-col-head{ border-bottom:1px solid rgba(18,14,10,.06); padding:15px 16px; }
.kcard{
  border:none; border-radius:var(--radius-card-sm);
  background:rgba(255,255,255,.92);
  box-shadow:0 1px 2px rgba(18,14,10,.05), 0 8px 20px -14px rgba(18,14,10,.3);
}
.kcard:hover{ box-shadow:var(--shadow-lift); }
.script-card{ border:none; border-radius:var(--radius-card-sm); box-shadow:var(--shadow-card); }
.script-card.is-filled{ border-left:none; }
/* The written card is identified by its colour wash, matching the stat tiles. */
.script-card.is-filled::after{
  content:''; position:absolute; inset:0; border-radius:inherit; pointer-events:none;
  box-shadow:inset 3px 0 0 var(--accent, transparent);
}
.script-card{ position:relative; }
.script-card.is-empty{
  box-shadow:none; background:rgba(255,255,255,.28);
  border:1.5px dashed rgba(18,14,10,.14);
}
.script-card.is-empty:hover{ background:rgba(255,255,255,.55); border-color:rgba(236,128,43,.5); }

.cal-cell{ border:none; border-radius:16px; box-shadow:inset 0 0 0 1px rgba(18,14,10,.05); }
.cal-cell:hover{ box-shadow:inset 0 0 0 1px rgba(236,128,43,.45), 0 8px 20px -14px rgba(18,14,10,.35); }
.cal-cell.selected{ box-shadow:inset 0 0 0 2px var(--ink); }
.cal-cell.today{ box-shadow:0 14px 30px -16px rgba(236,128,43,.95); }
.cal-cell.today.selected{ box-shadow:inset 0 0 0 2px rgba(255,255,255,.9), 0 14px 30px -16px rgba(236,128,43,.95); }
.cal-agenda{ border:none; border-radius:var(--radius-card); box-shadow:var(--shadow-card); }
.agenda-card{ border:none; border-radius:var(--radius-card-sm); box-shadow:inset 3px 0 0 var(--accent, var(--line)); }
.agenda-card.is-selected{ box-shadow:inset 3px 0 0 var(--accent, var(--ink)), 0 0 0 2px rgba(18,14,10,.14); }

/* ---- Panels that were bordered boxes ------------------------------------ */
.pm-generate-bar{
  border:none; border-radius:var(--radius-card);
  background:rgba(255,255,255,.80); box-shadow:var(--shadow-card); padding:16px 20px;
}
.setup-card, .freq-card, .note-item, .set-row{ border-color:rgba(18,14,10,.06); }
.pm-tabstrip-bar .pm-tab{ padding:10px 18px; }

/* ---- Inputs: softer, no hard outline ------------------------------------ */
.field input, .field select, .field textarea{
  border:1px solid rgba(18,14,10,.08); border-radius:13px; padding:11px 13px;
  background:rgba(255,255,255,.75);
}
.field label{ font-size:11px; letter-spacing:.03em; }

/* ---- Modal / drawer: match the card language ---------------------------- */
.modal{ border:none; border-radius:28px; box-shadow:var(--shadow-pop); }
.modal-head{ padding:24px 26px 16px; }
.modal-body{ padding:0 26px; }
.modal-foot{ padding:18px 26px 24px; }

/* ==========================================================================
   AURA SKIN — edge pass

   Five things were making surfaces look bolted together rather than designed,
   and all five repeat across the app, so they are killed by rule here rather
   than one component at a time:

     1. a white glass lip drawn on DARK surfaces (it reads as a stray highlight)
     2. a coloured line across the top of a box
     3. a coloured line down the side of a box
     4. a black/ink outline used to mark selection
     5. an icon sitting in a gradient tile

   The replacement everywhere: colour arrives as a soft corner wash, selection
   is an amber ring, and nothing draws a hard edge in an accent colour.
   ========================================================================== */

:root{
  /* Selection + focus now read amber instead of ink. */
  --ring-accent:0 0 0 2px rgba(236,128,43,.55);
  --ring-accent-soft:0 0 0 3px rgba(236,128,43,.20);
  /* Elevation without the glass lip — used on anything sitting on dark ground. */
  --shadow-flat:0 1px 2px rgba(18,14,10,.05), 0 10px 26px -14px rgba(18,14,10,.22);
}

/* ---- 1. No white lip on dark surfaces ----------------------------------- */
.sidebar .pick-row,
.sidebar .card,
.sidebar .icon-btn,
#overview-stats .stat-card:first-child,
.kcard-thumb,
.login-hero .hero-stat-card{
  box-shadow:none;
}
.sidebar .pick-row{
  background:rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.10);
}
.sidebar .pick-row:hover{
  background:rgba(255,255,255,.12);
  border-color:rgba(255,255,255,.20);
}
#overview-stats .stat-card:first-child{ box-shadow:0 18px 44px -22px rgba(18,14,10,.55); }
#overview-stats .stat-card:first-child:hover{ box-shadow:0 26px 60px -24px rgba(18,14,10,.65); }

/* ---- 2 + 3. No coloured line on any box edge ---------------------------- */
.stat-card::before{
  top:auto; left:auto; right:auto; bottom:auto;
  inset:0; width:auto; height:auto; border-radius:inherit;
  background:radial-gradient(300px 170px at 106% -30%, var(--stripe, var(--orange)), transparent 62%);
  opacity:.13;
}
.pillar-card,
.agenda-card,
.script-card,
.script-card.is-filled,
.cal-pop-act{
  border-left:none;
}
.agenda-card,
.script-card.is-filled{ box-shadow:var(--shadow-card); }
.script-card.is-filled::after{ content:none; }

/* The same corner wash the stat tiles use, so a card's colour still means
   something without a bar drawn on it. */
.pillar-card{ position:relative; overflow:hidden; }
.pillar-card::after,
.agenda-card::after,
.script-card.is-filled::before{
  content:''; position:absolute; inset:0; border-radius:inherit;
  pointer-events:none; opacity:.16;
  background:radial-gradient(260px 150px at 106% -30%, var(--stripe, var(--accent, var(--orange))), transparent 62%);
}
.agenda-card, .script-card{ position:relative; overflow:hidden; }
.agenda-card > *, .script-card > *{ position:relative; z-index:1; }
/* The agenda card already paints its own tint inline; keep one wash, not two. */
.agenda-card::after{ opacity:.10; }

/* The hover-bar rows lose their rule too — the title carries the colour. */
.cal-pop-act{ padding-left:0; border-left:none; }
.cal-pop-act .cal-pop-act-title{ color:var(--ink); }

/* ---- 4. Selection is an amber ring, never a black outline --------------- */
.cal-cell.selected{ box-shadow:var(--ring-accent); }
.cal-cell.today.selected{ box-shadow:0 0 0 2px rgba(255,255,255,.92), 0 14px 30px -16px rgba(236,128,43,.95); }
.agenda-card.is-selected{
  border-color:transparent;
  box-shadow:var(--shadow-card), var(--ring-accent);
}
.field input:focus, .field select:focus, .field textarea:focus{
  border-color:rgba(236,128,43,.55); box-shadow:var(--ring-accent-soft);
}
.segmented button.active{ background:var(--ink-deep); }

/* ---- 5. The logo is the logo, not a tile -------------------------------- */
.sidebar .brand-mark,
.login-hero-top .brand-mark{
  background:none; box-shadow:none; border:none;
  width:34px; height:34px; border-radius:0;
}
.sidebar .brand-mark svg,
.login-hero-top .brand-mark svg{
  width:26px; height:26px;
  fill:var(--amber-1); stroke:none;
}

/* ---- Knock-on tidy: matching treatments elsewhere ----------------------- */
/* Published thumbnails keep their gradient (they stand in for an image), but
   lose the inner highlight so they match the flatter language. */
.kcard-thumb{ box-shadow:inset 0 -30px 40px -30px rgba(0,0,0,.35); }
.kcard-thumb-views{ background:rgba(0,0,0,.42); }
/* Pillar metric divider was the last hairline inside a card. */
.pillar-metrics{ border-top-color:rgba(18,14,10,.06); }
.set-row{ border-bottom-color:rgba(18,14,10,.06); }

/* ==========================================================================
   AURA SKIN — palette pass  ("Ember")

   The chrome had already moved to ink + amber, but the DATA colours were still
   the old set (mint teal, milky tan, lemon gold) and they kept surfacing in
   chips, dots, pillar swatches, charts and the colour pickers — which is what
   made the scheme look half-converted.

   The reference is essentially monochrome ink with an amber ramp, plus a cool
   slate and an olive/clay as its only other hues, and a true green reserved for
   a gain. This pass rebuilds every data colour on that model.

   The four slot NAMES (orange / gold / teal / tan) are kept because they are
   stored values — a pillar saved as "teal" must keep resolving. Read them as
   slot 1-4: Ember, Honey, Steel, Clay.
   ========================================================================== */

:root{
  /* Neutrals — near-black ink on a warm off-white, as in the reference */
  --paper:#F4F2EF;
  --surface:#FFFFFF;
  --ink:#0F0E0C;
  --ink-soft:#6B655E;
  --ink-deep:#0A0908;
  --line:rgba(15,14,12,.08);

  /* Amber ramp — the hero, taken off the reference's bloom */
  --amber-1:#FDBF4D;
  --amber-2:#F0872A;
  --amber-3:#B8430A;

  /* Slot 1 — Ember (the amber itself) */
  --orange:#F0872A;
  --orange-ink:#A64F0C;
  /* Slot 2 — Honey */
  --gold:#F2C230;
  --gold-ink:#8A6206;
  /* Slot 3 — Steel (the cool counterpoint, from the reference's card) */
  --teal:#4E6E80;
  --teal-ink:#33505F;
  /* Slot 4 — Clay */
  --tan:#A96A4B;
  --tan-ink:#7C452A;

  /* Semantics */
  --critical:#D2402F;
  --positive:#3F8F5F;   /* a gain is green, the way the reference marks one */

  --ring-accent:0 0 0 2px rgba(240,135,42,.55);
  --ring-accent-soft:0 0 0 3px rgba(240,135,42,.20);
}

/* ---- Chips and badges rebuilt on the new hues ---------------------------- */
.chip-orange,
.sidebar .dropdown-panel .chip-orange{ background:rgba(240,135,42,.13); color:var(--orange-ink); }
.chip-gold,
.sidebar .dropdown-panel .chip-gold{ background:rgba(242,194,48,.20); color:var(--gold-ink); }
.chip-teal,
.sidebar .dropdown-panel .chip-teal{ background:rgba(78,110,128,.15); color:var(--teal-ink); }
.chip-tan,
.sidebar .dropdown-panel .chip-tan{ background:rgba(169,106,75,.15); color:var(--tan-ink); }
.chip-critical{ background:rgba(210,64,47,.12); color:var(--critical); }

/* A rise is green, a fall is red — the old scheme coloured rises with the same
   hue as a pillar, which said nothing. */
.badge-up{ color:var(--positive); background:rgba(63,143,95,.13); }
.badge-down{ color:var(--critical); background:rgba(210,64,47,.12); }
.dot-live{ background:var(--positive) !important; }

/* ---- Everything else that hard-coded a legacy hue ------------------------ */
.token-badge{ border-color:rgba(242,194,48,.45); background:rgba(242,194,48,.13); color:var(--gold-ink); }
.pm-tabstrip-bar .pm-tab .tab-badge{ background:rgba(242,194,48,.20); color:var(--gold-ink); }
.retention-out, .ctr-out,
.calc-out{
  border-color:rgba(78,110,128,.35) !important;
  background:rgba(78,110,128,.08) !important;
}
.plat-ig{ background:linear-gradient(135deg, var(--amber-2), var(--amber-1)); }
.plat-tt{ background:linear-gradient(135deg, var(--teal), #35505F); }
tbody tr:hover{ background:rgba(240,135,42,.05); }

/* ---- Blooms re-tuned to the new ramp ------------------------------------ */
body{
  background:
    radial-gradient(1100px 620px at 68% 8%, rgba(253,191,77,.50), transparent 58%),
    radial-gradient(760px 520px at 96% 40%, rgba(240,135,42,.22), transparent 60%),
    radial-gradient(680px 460px at 6% 0%, rgba(253,191,77,.18), transparent 62%),
    var(--paper);
  background-attachment:fixed;
}
.sidebar{
  background:
    radial-gradient(520px 340px at 18% 104%, rgba(240,135,42,.34), transparent 64%),
    radial-gradient(420px 300px at 96% -6%, rgba(253,191,77,.14), transparent 60%),
    linear-gradient(180deg, #17140F 0%, #100E0C 52%, #0A0908 100%);
}

#overview-stats .stat-card:first-child{
  background:
    radial-gradient(360px 220px at 92% -25%, rgba(253,191,77,.78), transparent 62%),
    linear-gradient(140deg, #16120D 0%, #2A1E13 52%, #110E0B 100%);
}
.login-hero{
  background:
    radial-gradient(760px 520px at 78% -12%, rgba(253,191,77,.82), transparent 62%),
    radial-gradient(560px 420px at 6% 108%, rgba(240,135,42,.48), transparent 62%),
    linear-gradient(150deg, #16120D 0%, #2A1E13 48%, #0C0A08 100%);
}
.login-panel{
  background:
    radial-gradient(700px 460px at 80% 0%, rgba(253,191,77,.26), transparent 60%),
    var(--paper);
}
.btn-primary{
  background:linear-gradient(135deg, var(--amber-1) 0%, var(--amber-2) 55%, var(--amber-3) 100%);
  border-color:rgba(184,67,10,.28);
  box-shadow:0 10px 24px -10px rgba(240,135,42,.7), inset 0 1px 0 rgba(255,255,255,.32);
}
.btn-primary:hover{ box-shadow:0 14px 30px -10px rgba(240,135,42,.82), inset 0 1px 0 rgba(255,255,255,.38); }
.pm-tabstrip-bar .pm-tab.active{
  background:linear-gradient(135deg, var(--amber-1), var(--amber-3));
  box-shadow:0 10px 22px -12px rgba(240,135,42,.8);
}
.cal-cell.today{
  background:linear-gradient(140deg, var(--amber-1), var(--amber-2) 58%, var(--amber-3));
  box-shadow:0 14px 30px -16px rgba(240,135,42,.9);
}
.cal-cell:hover{ box-shadow:inset 0 0 0 1px rgba(240,135,42,.42), 0 8px 20px -14px rgba(15,14,12,.35); }
.script-card.is-empty:hover{ border-color:rgba(240,135,42,.5); }
.nav-item.active{
  background:linear-gradient(135deg, rgba(253,191,77,.18), rgba(240,135,42,.09));
  border-color:rgba(253,191,77,.22);
}
.sidebar .brand-mark svg,
.login-hero-top .brand-mark svg{ fill:var(--amber-1); }

/* ---- Performance Matrix summary tiles ------------------------------------
   These were the last surfaces still wearing a coloured line across the top
   (a `border-top` in CSS plus a per-metric `border-top-color` inline). They
   now follow the same rule as every other tile: borderless, elevated, with
   the metric's colour arriving as a corner wash driven by --stripe. */
.pm-summary-strip .pm-stat-card{
  border:none; border-top:none;
  border-radius:var(--radius-card);
  background:rgba(255,255,255,.80);
  box-shadow:var(--shadow-card);
  padding:20px 22px;
  overflow:hidden;
}
.pm-summary-strip .pm-stat-card::before{
  content:''; position:absolute; inset:0; border-radius:inherit;
  pointer-events:none; opacity:.13;
  background:radial-gradient(240px 140px at 106% -30%, var(--stripe, var(--orange)), transparent 62%);
}
.pm-summary-strip .pm-stat-card > *{ position:relative; z-index:1; }
.pm-summary-strip .pm-stat-card .stat-val{
  font-family:var(--font-head); font-size:28px; font-weight:800;
  letter-spacing:-.03em; font-variant-numeric:tabular-nums; margin-top:6px;
}

/* ==========================================================================
   CONTRAST PASS + FLAGGED CONTENT
   Appended after the palette pass, so it wins by cascade.

   Two rules drive everything below:

   1. NEVER SIT TWO NEAR-NEIGHBOUR COLOURS ON TOP OF EACH OTHER. A Clay avatar
      with Clay-ink initials reads as an empty brown disc (~1.9:1). Wherever a
      surface is a SOLID data colour, the thing on top of it is white or near
      -black, never the same hue one step darker.
   2. Attention is earned by SIZE, WEIGHT and DEPTH, not by an outline or a
      coloured edge - the banned edge treatments still apply here.
   ========================================================================== */

/* ---- Avatars -------------------------------------------------------------
   Was Clay-on-Clay. Now a near-black disc with white initials, which reads at
   any size (the board cards render these at 22px) and on any surface. */
.avatar{
  background:var(--ink-deep);
  color:#fff;
  letter-spacing:.01em;
  box-shadow:0 1px 3px rgba(15,14,12,.18);
}
/* An uploaded photo is itself an <img class="avatar">, so the ink fill just
   sits behind it while it decodes. */
img.avatar{ object-fit:cover; padding:0; }

/* Same fault, same fix: the "on" state used Clay ink on a Clay fill. */
.icon-btn.is-on{
  background:var(--ink-deep);
  border-color:var(--ink-deep);
  color:#fff;
}
.icon-btn.is-on:hover{ background:var(--ink); border-color:var(--ink); color:#fff; }

/* Segmented pills: white on raw Ember/Steel was ~2.4:1. Deepen the fill
   instead of lightening the label, so the pill still reads as its colour. */
.segmented button[data-accent="orange"].active{ background:var(--amber-3); color:#fff; }
.segmented button[data-accent="teal"].active{ background:var(--teal-ink); color:#fff; }

/* The calendar note marker was a Honey dot ringed in Honey-ink - two shades of
   the same yellow. Deep amber core, white ring, faint ink halo: three clearly
   separated values, legible on the white cell and on the amber today cell. */
.cal-cell .cal-note-mark{
  background:var(--amber-3);
  border:2px solid var(--surface);
  box-shadow:0 0 0 1.5px rgba(15,14,12,.16);
}
.cal-cell.today .cal-note-mark{ box-shadow:0 0 0 1.5px rgba(255,255,255,.9); }

/* ---- Back one stage ------------------------------------------------------
   Deliberately quiet next to the forward action: it is an escape hatch, not a
   competing choice. Icon only on the board, labelled in the drawer. */
.kcard-back{
  flex:0 0 auto;
  width:30px; padding:0;
  display:inline-flex; align-items:center; justify-content:center;
  color:var(--ink-soft);
}
.kcard-back svg{ width:14px; height:14px; }
.kcard-back:hover{ color:var(--ink); background:rgba(15,14,12,.06); }
.drawer-revert{
  display:flex; align-items:center; gap:10px; flex-wrap:wrap;
  margin-top:14px; padding-top:14px;
  border-top:1px solid var(--line);
}
.drawer-revert .btn svg{ width:14px; height:14px; }
.drawer-revert .text-sm{ flex:1; min-width:160px; }

/* ==========================================================================
   INSIGHT ENGINE - FLAGGED CONTENT
   Flagged posts used to be quiet rows with the advice hidden behind a
   "Suggested action" toggle, so the whole section read as optional. They are
   now standalone cards: a rank, the size of the miss, the metrics that caused
   it, and - always visible, never behind a click - the note saying what to fix.
   ========================================================================== */
.flag-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(420px, 1fr));
  gap:14px;
}
.flag-card{
  position:relative; overflow:hidden;
  border-radius:var(--radius-card);
  background:rgba(255,255,255,.84);
  backdrop-filter:var(--glass);
  box-shadow:var(--shadow-card);
  padding:18px 20px 16px;
  transition:box-shadow .22s var(--ease-out), transform .22s var(--ease-out);
}
/* The critical hue arrives as a corner wash, the same way every other card in
   the dashboard carries its colour - no top line, no side line, no outline. */
.flag-card::before{
  content:''; position:absolute; inset:0; border-radius:inherit;
  pointer-events:none; opacity:.22;
  background:radial-gradient(340px 200px at 104% -34%, var(--critical), transparent 64%);
}
.flag-card > *{ position:relative; z-index:1; }
.flag-card:hover{ transform:translateY(-2px); box-shadow:var(--shadow-card-hover, var(--shadow-card)); }

.flag-card-top{ display:flex; align-items:flex-start; gap:14px; }
.flag-rank{
  font-family:var(--font-head); font-size:26px; font-weight:800;
  letter-spacing:-.05em; line-height:1; margin-top:2px;
  color:var(--critical); opacity:.42; flex-shrink:0;
}
.flag-headline{ min-width:0; flex:1; }
.flag-title{
  font-family:var(--font-head); font-size:15.5px; font-weight:700;
  letter-spacing:-.015em; line-height:1.3; margin:0;
}
.flag-tags{ display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin-top:7px; }
.flag-format{
  font-size:11px; color:var(--ink-soft);
  text-transform:uppercase; letter-spacing:.06em; font-weight:600;
}
.flag-gap{ text-align:right; flex-shrink:0; }
.flag-gap-num{
  display:block; font-family:var(--font-head); font-size:26px; font-weight:800;
  letter-spacing:-.04em; line-height:1; color:var(--critical);
  font-variant-numeric:tabular-nums;
}
.flag-gap-cap{
  display:block; margin-top:4px; max-width:96px;
  font-size:9.5px; font-weight:700; text-transform:uppercase;
  letter-spacing:.07em; color:var(--ink-soft); line-height:1.3;
}

.flag-metrics{ display:flex; flex-wrap:wrap; gap:7px; margin-top:14px; }
.flag-metric{
  display:inline-flex; align-items:center; gap:6px;
  padding:5px 11px; border-radius:var(--radius-pill);
  background:rgba(210,64,47,.10); color:var(--critical);
  font-size:11.5px; font-weight:700; line-height:1;
}
.flag-metric svg{ width:13px; height:13px; stroke:currentColor; flex-shrink:0; }
.flag-metric strong{ font-weight:800; }
/* The benchmark is context, not the alarm - drop it back to plain ink. */
.flag-metric .flag-metric-vs{ color:var(--ink-soft); font-weight:600; }

/* The note is the point of the card, so it gets the loudest surface on the
   page: near-black, amber label, always open. */
.flag-note{
  display:flex; align-items:flex-start; gap:12px;
  margin-top:14px; padding:13px 15px;
  border-radius:14px;
  background:var(--ink-deep);
}
.flag-note-label{
  display:inline-flex; align-items:center; gap:6px; flex-shrink:0;
  padding-top:2px;
  font-size:9.5px; font-weight:800; text-transform:uppercase; letter-spacing:.11em;
  color:var(--amber-1);
}
.flag-note-label svg{ width:13px; height:13px; stroke:currentColor; }
.flag-note-text{
  min-width:0; flex:1;
  font-size:13px; line-height:1.5; font-weight:600; color:#fff;
  border-radius:7px; padding:1px 5px; margin:-1px -5px;
  transition:background .16s var(--ease-out), box-shadow .16s var(--ease-out);
}
/* Editable, but it has to look editable before you click it. */
.flag-note-text[contenteditable="true"]{ cursor:text; }
.flag-note-text[contenteditable="true"]:hover{ background:rgba(255,255,255,.09); }
.flag-note-text[contenteditable="true"]:focus{
  outline:none;
  background:rgba(255,255,255,.13);
  box-shadow:0 0 0 2px rgba(253,191,77,.55);
}

@media (max-width: 720px){
  .flag-grid{ grid-template-columns:1fr; }
  .flag-card-top{ flex-wrap:wrap; }
  .flag-gap{ text-align:left; width:100%; padding-left:40px; }
  .flag-gap-cap{ max-width:none; }
}

/* ---- White numerals on the amber today cell ------------------------------
   Found by measuring every text node against its own background: white on raw
   Ember is 2.56:1, fine for a 26px heading and not fine for a date numeral.
   Today's cell keeps exactly the same three amber stops - the gradient is just
   flipped, so the dark end now sits under the top-left numeral instead of the
   light end. Same cell, same colour, legible number. (The activity count badge
   is coloured inline per activity, so it is handled by readableInk in app.js
   rather than here.) */
.cal-cell.today{
  background:linear-gradient(320deg, var(--amber-1), var(--amber-2) 58%, var(--amber-3));
}
.cal-cell.today .cal-count-badge{ background:#fff !important; color:var(--amber-3); }

/* An icon tile painted with a user-chosen colour has to let readableInk()
   decide the glyph colour, so these two can no longer hardcode white. */
.pick-row .pick-icon{ color:#fff; }
.pick-row .pick-icon svg{ stroke:currentColor; }

/* ---- Audit fixes (Okt 2026) ---------------------------------------------- */
/* "Segera" marker on controls that exist in the design but are not built yet
   (Sync ke Sheets, Export laporan) - shown honestly as coming, never as a
   fake success. */
.soon-tag{
  font-size:10px; font-weight:700; letter-spacing:.04em; text-transform:uppercase;
  padding:2px 7px; border-radius:999px; margin-left:4px;
  background:rgba(18,16,14,.07); color:var(--ink-soft);
}
.set-control{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; justify-content:flex-end; }

/* Phones: the topbar controls (This week / This month, Board / Calendar /
   Table) used to sit in a hidden-scrollbar strip beside the title, so half of
   them were cut off with no hint they could be scrolled. They now drop to
   their own full-width row under the title. */
@media (max-width:640px){
  .topbar{ height:auto; flex-wrap:wrap; padding-top:10px; padding-bottom:10px; row-gap:10px; }
  .topbar > .flex{ flex:1 1 100%; }
  .topbar-actions{ flex:1 1 100%; justify-content:space-between; overflow-x:visible; flex-wrap:wrap; row-gap:8px; }
  .topbar-actions > #view-controls-slot{ display:flex; flex-wrap:wrap; gap:8px; min-width:0; flex:1 1 0; flex-shrink:1; }
  #view-controls-slot .segmented{ max-width:100%; }
  .toast-wrap{ left:16px; right:16px; bottom:16px; }
  .toast{ max-width:none; }
  .table-wrap{ overflow-x:auto; -webkit-overflow-scrolling:touch; }
  .table-wrap table{ min-width:640px; }
}
/* Login: the password input filled only part of its row, leaving the eye
   toggle floating in empty space. */
.field-pw-wrap input{ width:100%; padding-right:44px; }

/* PLAN-01: eight production stages, using the existing Aura surfaces and tokens. */
#board-grid { grid-auto-columns:260px; scroll-snap-type:x mandatory; overscroll-behavior-x:contain; }
.board-stage { min-width:0; scroll-snap-align:start; scroll-snap-stop:always; }
.board-phase { margin:0 0 10px; min-height:20px; }
.board-stage .board-col { width:260px; max-width:100%; }
#board-filter { width:max-content; max-width:100%; }
#view-tracker #tbl-status { flex-wrap:wrap; max-width:100%; }
#view-tracker .table-wrap { overflow-x:auto; }
#view-tracker .table-wrap table { min-width:900px; }
#drawer-overlay .drawer { max-width:760px; }
.workflow-section { margin-bottom:14px; }
.workflow-section > h4 { margin-bottom:12px; }
.workflow-section .field { margin-bottom:12px; min-width:0; }
.workflow-section textarea, .workflow-section input, .workflow-section select { width:100%; min-width:0; }
.workflow-section input[type=checkbox] { width:auto; flex-shrink:0; accent-color:var(--amber-3); }
.workflow-section > label { margin-bottom:10px; }
.workflow-section p { overflow-wrap:anywhere; }
#workflow-form [disabled] { opacity:1; color:var(--ink-soft); }
#workflow-missing { margin-top:12px; }
#drawer-actions .drawer-actions-row, .kcard-actions { flex-wrap:wrap; }
.kcard-actions .btn { flex:1 1 auto; }
@media (max-width:600px) {
  #board-grid { grid-auto-columns:100%; }
  .board-stage .board-col { margin-inline:auto; }
  .board-phase { width:260px; max-width:100%; margin-inline:auto; }
  #drawer-overlay { padding:10px; }
  #drawer-overlay .drawer { max-height:94vh; }
  .workflow-section { padding:14px; }
}
/* PLAN-03: ruang kerja tahap, hierarchy and responsive board. */
* { scrollbar-width:thin; scrollbar-color:rgba(18,16,14,.18) transparent; }
::-webkit-scrollbar { width:8px; height:8px; }
::-webkit-scrollbar-track { background:transparent; }
::-webkit-scrollbar-thumb { background:rgba(18,16,14,.18); border-radius:999px; }
::-webkit-scrollbar-thumb:hover { background:rgba(18,16,14,.32); }
html.drawer-is-open, body.drawer-is-open { overflow:hidden; }
#drawer-overlay .drawer { max-width:1120px; max-height:min(88vh,920px); display:flex; flex-direction:column; overflow:hidden; }
.drawer-head { flex-shrink:0; display:grid; grid-template-columns:minmax(0,1fr) auto; gap:14px; border:0; padding:22px 26px 16px; }
.drawer-heading { min-width:0; }
#drawer-title { font-size:20px; font-weight:800; overflow-wrap:anywhere; }
.drawer-info { display:flex; align-items:center; flex-wrap:wrap; gap:8px; margin-top:8px; }
#drawer-stepper { grid-column:1/-1; }
#drawer-stepper ol { list-style:none; padding:0; margin:0; display:grid; grid-template-columns:repeat(8,minmax(0,1fr)); gap:8px; }
#drawer-stepper li, #drawer-stepper li button { display:flex; flex-direction:column; align-items:center; gap:8px; font-size:11px; text-align:center; line-height:1.35; }
#drawer-stepper li button { width:100%; border:0; background:none; padding:0; cursor:pointer; font:inherit; color:inherit; }
#drawer-stepper .is-complete { color:var(--ink-soft); }
#drawer-stepper .is-current { color:var(--ink); font-weight:800; }
#drawer-stepper .is-future { color:var(--ink-soft); opacity:.55; }
.step-dot { display:flex; width:26px; height:26px; align-items:center; justify-content:center; border-radius:50%; background:rgba(18,16,14,.04); flex-shrink:0; }
.is-current .step-dot { box-shadow:var(--ring-accent); }
.workflow-mobile-stage { display:none; }
.drawer-body { flex:1 1 auto; min-height:0; overflow-y:auto; overflow-x:hidden; scrollbar-gutter:stable; padding:8px 26px 24px; overscroll-behavior:contain; }
.workflow-workspace { display:grid; grid-template-columns:minmax(0,3fr) minmax(0,2fr); gap:20px; align-items:start; }
.workflow-main { min-width:0; }
#drawer-overlay .workflow-active { background:var(--surface); backdrop-filter:none; -webkit-backdrop-filter:none; box-shadow:var(--shadow-card); border:0; padding:24px; }
#workflow-stage-title { font-size:18px; font-weight:800; margin:4px 0 20px; }
.workflow-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; align-items:start; }
.workflow-fields .field { margin:0; min-width:0; }
.workflow-fields input, .workflow-fields select, .workflow-fields textarea { width:100%; min-width:0; }
.workflow-fields textarea { resize:vertical; }
.workflow-wide, .workflow-fields > .workflow-value { grid-column:1/-1; }
.workflow-fields h4 { font-size:13px; margin:4px 0 0; }
.workflow-comparison { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.workflow-value { margin:0 0 12px; white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.65; }
.workflow-value strong { font-weight:700; }
.workflow-value .btn { margin-left:6px; }
.workflow-reference { background:rgba(18,16,14,.04); border-radius:var(--radius-card-sm); padding:18px; font-size:13px; min-width:0; }
#drawer-overlay .workflow-reference, #drawer-overlay .workflow-history { backdrop-filter:none; -webkit-backdrop-filter:none; box-shadow:none; border:0; }
.workflow-toggle { background:none; box-shadow:none; border:0; justify-content:space-between; width:100%; text-align:left; padding:10px 0; color:inherit; white-space:normal; }
.workflow-toggle[aria-expanded=true] > span { transform:rotate(180deg); }
.workflow-reference > .workflow-toggle { font-size:14px; font-weight:800; padding-top:0; }
.workflow-history { background:none; font-size:12.5px; color:var(--ink-soft); margin-top:18px; }
.workflow-history .workflow-value, .workflow-history .tl-text { font-size:12.5px; }
.workflow-history .workflow-past { margin:0 0 24px; scroll-margin-top:12px; }
.workflow-past h4 { color:var(--ink); font-size:13px; margin:16px 0 12px; }
.workflow-history .tl-dot, .workflow-history .tl-item::before { display:none; }
#drawer-performance:empty { display:none; }
#drawer-performance .card { box-shadow:none; background:none; border:0; backdrop-filter:none; -webkit-backdrop-filter:none; padding:8px 0; }
.workflow-progress { display:flex; justify-content:space-between; font-size:12.5px; margin-bottom:8px; }
.workflow-checklist progress { appearance:none; width:100%; height:5px; display:block; border:0; border-radius:99px; background:rgba(18,16,14,.04); accent-color:var(--amber-3); margin-bottom:12px; overflow:hidden; }
.workflow-checklist progress::-webkit-progress-bar { background:rgba(18,16,14,.04); }
.workflow-checklist progress::-webkit-progress-value { background:var(--amber-3); border-radius:99px; }
.workflow-checklist progress::-moz-progress-bar { background:var(--amber-3); border-radius:99px; }
.workflow-check { display:flex; align-items:center; gap:10px; min-height:36px; font-size:13px; cursor:pointer; padding:5px 0; }
.workflow-check input { width:18px; height:18px; flex-shrink:0; accent-color:var(--amber-3); }
.workflow-check.is-checked { color:var(--ink-soft); }
.drawer-footer { flex-shrink:0; display:flex; justify-content:space-between; align-items:center; gap:16px; padding:16px 26px 22px; }
#workflow-missing { margin:0; font-size:12.5px; flex:1; overflow-wrap:anywhere; }
#workflow-missing.is-ready { color:var(--positive); }
.drawer-actions-row { display:flex; align-items:center; gap:8px; justify-content:flex-end; }
#drawer-overlay :is(button,a,input,select,textarea,[tabindex]):focus-visible,
#board-phase-nav button:focus-visible, #board-grid:focus-visible, #board-grid .kcard:focus-visible { outline:2px solid var(--amber-3); outline-offset:3px; }
#board-phase-nav { display:flex; align-items:center; gap:4px; margin:0 0 14px; }
#board-phase-nav button + button::before { content:'·'; margin-right:10px; color:var(--ink-soft); }
.board-shell { position:relative; min-width:0; }
.board-shell::before, .board-shell::after { content:''; position:absolute; top:0; bottom:0; width:22px; pointer-events:none; z-index:2; opacity:0; }
.board-shell::before { left:0; background:linear-gradient(to right,var(--paper),transparent); }
.board-shell::after { right:0; background:linear-gradient(to left,var(--paper),transparent); }
.board-shell.has-before::before, .board-shell.has-after::after { opacity:1; }
#board-grid { display:flex; gap:16px; scrollbar-width:none; scroll-snap-type:x mandatory; padding-bottom:12px; }
#board-grid::-webkit-scrollbar { display:none; }
.board-phase-group { flex:0 0 544px; display:grid; grid-template-columns:264px 264px; gap:10px 16px; align-items:start; }
.board-phase-group .board-phase { grid-column:1/-1; margin:0; width:auto; }
.board-stage .board-col { width:264px; max-width:none; }
.board-col-body { min-height:0; }
#board-grid .kcard-actions { display:flex; flex-direction:column; gap:4px; margin-top:12px; }
#board-grid .kcard-actions .btn { width:100%; }
#board-grid .kcard-actions .btn-danger-ghost { background:none; box-shadow:none; }
#board-grid .avatar { width:24px; height:24px; font-size:10px; }
#board-grid .kcard > p { margin:0 0 10px; }
@media (min-width:1100px) {
  #workflow-reference[hidden] { display:block; }
  .workflow-reference > .workflow-toggle { display:none; }
  .workflow-reference > .workflow-toggle > span { display:none; }
}
@media (max-width:1099px) {
  .workflow-workspace { grid-template-columns:1fr; }
  .workflow-reference { padding:12px 18px; }
  .workflow-reference > .workflow-toggle { padding:8px 0; }
}
@media (max-width:600px) {
  #drawer-overlay { padding:0; }
  #drawer-overlay .drawer { width:100%; height:100dvh; max-height:100dvh; border-radius:0; }
  .drawer-head { padding:16px 16px 12px; gap:10px; }
  #drawer-title { font-size:18px; }
  .drawer-info { gap:5px; }
  #drawer-meta { font-size:11px; }
  #drawer-stepper ol { gap:0; }
  #drawer-stepper li { min-height:44px; justify-content:center; }
  #drawer-stepper li button { height:44px; min-width:44px; justify-content:center; }
  #drawer-stepper .step-label { display:none; }
  #drawer-stepper .step-dot { width:7px; height:7px; font-size:0; }
  #drawer-stepper .is-complete .step-dot { background:var(--ink-soft); }
  #drawer-stepper .is-current .step-dot { background:var(--amber-2); }
  .workflow-mobile-stage { display:block; font-size:12px; margin:2px 0 0; }
  .drawer-body { padding:4px 12px 16px; }
  #drawer-overlay .workflow-active { padding:18px; }
  .workflow-fields { gap:12px; }
  .workflow-fields .field input, .workflow-fields .field select { min-height:44px; }
  .workflow-comparison { grid-template-columns:1fr; }
  .workflow-check { min-height:44px; }
  .drawer-footer { display:block; padding:10px 12px max(12px,env(safe-area-inset-bottom)); }
  #workflow-missing { margin-bottom:8px; font-size:11.5px; }
  .drawer-actions-row { gap:6px; flex-wrap:wrap; }
  .drawer-actions-row .btn-primary { flex:1 1 auto; }
  #drawer-overlay button, #board-phase-nav button, #board-grid button, #board-filter button { min-height:44px; min-width:44px; }
  #drawer-overlay .btn-sm { padding-inline:10px; }
  #board-phase-nav { gap:0; justify-content:space-between; }
  #board-phase-nav .btn { padding:8px; font-size:12px; }
  #board-phase-nav button + button::before { margin-right:4px; }
  .board-phase-group { flex-basis:calc(170vw + 16px); grid-template-columns:85vw 85vw; }
  .board-stage .board-col { width:85vw; margin:0; }
}

.workflow-reference-heading { font-size:14px; font-weight:800; margin:0 0 16px; }
@media (max-width:1099px) { .workflow-reference-heading { display:none; } }

#board-grid .board-stage { scroll-snap-stop:normal; }
.board-phase-group { grid-template-rows:20px auto; align-content:start; }
#board-phase-nav .btn, #board-grid .kcard-actions .btn-danger-ghost { background:none; border:0; box-shadow:none; }
#drawer-overlay { pointer-events:none; }
#drawer-overlay.open { pointer-events:auto; }
#drawer-overlay .drawer { border:0; }
/* Content Tracker: category cards and notched project gallery. */
#board-phase-nav { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:10px; margin:18px 0 24px; }
#board-phase-nav .tracker-category { display:flex; flex-direction:column; gap:10px; min-width:0; min-height:108px; text-align:left; padding:16px; border:0; border-radius:var(--radius-card-sm); background:rgba(255,255,255,.65); color:var(--ink-soft); box-shadow:var(--shadow-card); cursor:pointer; }
#board-phase-nav .tracker-category[aria-pressed=true] { color:var(--ink); background:var(--surface); box-shadow:var(--shadow-card),var(--ring-accent); }
.tracker-category-top { display:flex; align-items:center; justify-content:space-between; gap:8px; width:100%; font-size:13px; }
.tracker-category-top .mono { font-size:11px; }
.tracker-category-stages { font-size:10.5px; line-height:1.65; overflow-wrap:anywhere; }
#board-phase-nav button + button::before { content:none; }
#board-grid.tracker-gallery { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:22px; overflow:visible; padding:0 0 12px; scroll-snap-type:none; align-items:stretch; }
#board-grid .tracker-project { padding:10px; min-width:0; display:flex; flex-direction:column; background:rgba(255,255,255,.82); border:0; border-radius:var(--radius-card); }
.tracker-cover-wrap { position:relative; }
.tracker-cover { position:relative; height:210px; background:radial-gradient(ellipse at 20% 100%,rgba(240,135,42,.22),transparent 75%),var(--paper); color:var(--ink-soft); border-radius:var(--radius-card-sm); overflow:hidden; mask-image:radial-gradient(circle at calc(100% - 22px) 22px,transparent 29px,black 30px); }
.tracker-cover svg { width:72%; height:148px; position:absolute; left:14%; top:38px; color:var(--amber-3); opacity:.65; }
.tracker-cover-label { display:block; padding:14px 62px 0 14px; font-size:11px; font-weight:700; color:var(--ink); }
.tracker-cover-caption { position:absolute; left:14px; bottom:12px; font-family:var(--font-mono); font-size:10px; }
#board-grid .tracker-open { position:absolute; top:0; right:0; width:44px; height:44px; background:var(--ink-deep); color:var(--surface); box-shadow:none; }
.tracker-open svg { width:18px; height:18px; }
.tracker-card-copy { padding:18px 10px 10px; display:flex; flex-direction:column; flex:1; min-width:0; }
#board-grid .kcard-title { font-size:17px; line-height:1.45; font-weight:800; overflow-wrap:anywhere; margin-bottom:10px; }
.tracker-excerpt { font-size:12px; color:var(--ink-soft); line-height:1.8; margin-bottom:16px; overflow-wrap:anywhere; }
.tracker-card-copy > .text-sm { margin-top:auto; margin-bottom:14px; font-size:11px; }
.tracker-card-copy .kcard-foot { margin-bottom:6px; }
#tracker-pager { display:flex; align-items:center; justify-content:space-between; gap:14px; margin-top:16px; font-size:12px; color:var(--ink-soft); }
#tracker-pager > div { display:flex; gap:8px; }
#tracker-pager button { min-height:44px; }
.tracker-empty { grid-column:1/-1; padding:48px 20px; text-align:center; }
#drawer-overlay .drawer { max-width:1320px; }
.workflow-workspace { grid-template-columns:minmax(0,7fr) minmax(0,3fr); }
#drawer-stepper ol { grid-template-columns:repeat(9,minmax(0,1fr)); }
.workflow-script-reading { margin-bottom:24px; }
.workflow-script-reading h4 { font-size:12px; color:var(--ink-soft); margin-bottom:12px; }
.workflow-script-reading p { white-space:pre-wrap; overflow-wrap:anywhere; font-size:15px; line-height:1.95; }
#workflow-form textarea[name=script], #workflow-form textarea[name="adjust.scriptFinal"] { min-height:300px; font-size:15px; line-height:1.95; }
.workflow-reference .workflow-value { font-size:12.5px; line-height:1.85; }
@media (max-width:1099px) {
  #board-phase-nav { grid-template-columns:repeat(3,minmax(0,1fr)); }
  #board-grid.tracker-gallery { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .workflow-workspace { grid-template-columns:1fr; }
}
@media (max-width:600px) {
  #board-phase-nav { gap:8px; margin-bottom:18px; }
  #board-phase-nav .tracker-category { padding:12px 10px; min-height:104px; }
  .tracker-category-top { font-size:11px; }
  .tracker-category-stages { font-size:9.5px; }
  #board-grid.tracker-gallery { grid-template-columns:minmax(0,1fr); gap:18px; }
  .tracker-cover { height:200px; }
  #tracker-pager { flex-direction:column; align-items:stretch; }
  #tracker-pager > div { justify-content:space-between; }
  #tracker-pager button { flex:1; }
  #drawer-stepper li button { min-width:0; width:100%; }
  #drawer-stepper ol { grid-template-columns:repeat(9,minmax(0,1fr)); }
  #drawer-stepper li button::before { content:''; position:absolute; width:44px; height:44px; }
  .workflow-fields { grid-template-columns:minmax(0,1fr); }
  .workflow-script-reading p { font-size:14px; }
  .drawer-actions-row { gap:5px; }
  .drawer-actions-row .btn { font-size:11px; }
}
.workflow-mobile-dots { display:none; }
@media (max-width:600px) {
  #drawer-stepper ol { display:none; }
  .workflow-mobile-dots { display:flex; justify-content:space-between; padding:16px 14px 6px; }
  .workflow-mobile-dots span { width:7px; height:7px; border-radius:50%; background:rgba(18,16,14,.12); }
  .workflow-mobile-dots .is-complete { background:var(--ink-soft); }
  .workflow-mobile-dots .is-current { background:var(--amber-2); box-shadow:var(--ring-accent); }
}
#board-grid.tracker-gallery { grid-auto-flow:row; grid-auto-columns:auto; }
/* Pulsi progress explorer: compact selector, mascot carousel, content rail. */
#board-phase-nav { grid-template-columns:repeat(6,minmax(0,1fr)); gap:10px; margin:18px 0 20px; }
#board-phase-nav .tracker-category { position:relative; min-height:54px; padding:12px 14px; display:flex; flex-direction:row; align-items:center; justify-content:space-between; gap:8px; background:rgba(255,255,255,.72); border:0; border-radius:var(--radius-btn); color:var(--ink-soft); box-shadow:var(--shadow-card); text-align:left; }
#board-phase-nav .tracker-category[aria-pressed=true] { color:var(--ink); background:var(--surface); box-shadow:var(--shadow-card),var(--ring-accent); }
#board-phase-nav .tracker-category strong { font-size:12px; font-weight:700; }
.tracker-count { flex-shrink:0; display:inline-flex; align-items:center; justify-content:center; min-width:23px; height:23px; padding:0 6px; border-radius:999px; color:var(--surface); background:var(--critical); font-size:10px; font-weight:800; line-height:1; }
#tracker-progress-workspace { min-width:0; margin:0 0 26px; }
.tracker-progress-heading, .tracker-content-heading { margin:0 0 10px; }
.tracker-progress-heading h3, .tracker-content-heading h3 { font-size:17px; font-weight:800; margin:0 0 4px; }
.tracker-progress-heading p, .tracker-content-heading p { color:var(--ink-soft); font-size:12px; margin:0; line-height:1.6; }
#progress-carousel { --progress-width:360px; position:relative; display:flex; gap:20px; overflow-x:auto; overflow-y:hidden; padding:14px max(12px,calc((100% - var(--progress-width))/2)) 24px; scroll-snap-type:x mandatory; scrollbar-width:none; overscroll-behavior-x:contain; perspective:1200px; cursor:grab; }
#progress-carousel::-webkit-scrollbar, #board-grid.tracker-content-rail::-webkit-scrollbar { display:none; }
.progress-slide { flex:0 0 var(--progress-width); min-width:0; scroll-snap-align:center; transform:scale(.93) rotateY(-8deg); transform-origin:center; transition:transform .35s var(--ease-out),opacity .35s; opacity:.78; }
.progress-slide.is-before { transform:scale(.93) rotateY(8deg); }
.progress-slide.is-centered { transform:scale(1) rotateY(0); opacity:1; }
.progress-card { display:block; width:100%; height:100%; padding:10px; border:0; border-radius:var(--radius-card); color:var(--ink); background:var(--surface); box-shadow:var(--shadow-card); text-align:left; cursor:pointer; overflow:hidden; }
.progress-card[aria-pressed=true] { box-shadow:var(--shadow-card),var(--ring-accent-soft); }
.progress-card-banner { position:relative; display:block; aspect-ratio:16/9; border-radius:var(--radius-card-sm); overflow:hidden; background:var(--paper); }
.progress-card-banner img { display:block; width:100%; height:100%; object-fit:cover; object-position:65% center; user-select:none; }
.progress-card-arrow { position:absolute; top:8px; right:8px; width:36px; height:36px; display:flex; align-items:center; justify-content:center; border-radius:50%; background:var(--ink-deep); color:var(--surface); }
.progress-card-arrow svg { width:18px; height:18px; }
.progress-card-body { display:flex; flex-direction:column; gap:12px; padding:16px 10px 12px; min-height:168px; }
.progress-card-title { display:flex; align-items:center; justify-content:space-between; gap:12px; font-size:18px; font-weight:800; }
.progress-card-count { color:var(--ink-soft); font-size:11px; font-weight:500; white-space:nowrap; }
.progress-description { color:var(--ink-soft); font-size:12px; line-height:1.75; min-height:42px; }
.progress-stage-tags { display:flex; flex-wrap:wrap; gap:6px; }
.progress-stage-tags .chip { white-space:normal; font-size:10px; text-align:left; }
#board-grid.tracker-content-rail { display:flex; gap:20px; align-items:stretch; overflow-x:auto; overflow-y:hidden; padding:4px 3px 18px; scrollbar-width:none; scroll-snap-type:x mandatory; overscroll-behavior-x:contain; cursor:grab; }
#board-grid.tracker-content-rail .tracker-project { flex:0 0 calc((100% - 40px)/3); scroll-snap-align:start; min-width:0; min-height:340px; padding:16px; display:flex; flex-direction:column; }
.tracker-content-top { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:14px; }
.tracker-content-top > .chip { max-width:calc(100% - 54px); white-space:normal; }
.tracker-content-open { width:44px; height:44px; flex-shrink:0; }
.tracker-content-open svg { width:18px; height:18px; }
.tracker-content-rail .tracker-card-copy { padding:0; flex:1; }
#board-grid.tracker-content-rail .tracker-project:hover { transform:none; }
#board-grid .tracker-excerpt { font-size:12px; line-height:1.8; margin-bottom:18px; }
#progress-carousel.is-dragging, #board-grid.tracker-content-rail.is-dragging { cursor:grabbing; scroll-snap-type:none; user-select:none; }
.is-dragging .progress-card { cursor:grabbing; }
#board-grid.tracker-content-rail .tracker-empty { flex:1; padding:32px 14px; }
#progress-carousel:focus-visible, .progress-card:focus-visible, .tracker-content-open:focus-visible { outline:2px solid var(--amber-3); outline-offset:3px; }
@media (max-width:1099px) {
  #board-grid.tracker-content-rail .tracker-project { flex-basis:calc((100% - 20px)/2); }
}
@media (max-width:600px) {
  #board-phase-nav { grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; margin:14px 0 22px; }
  #board-phase-nav .tracker-category { min-height:52px; padding:10px; gap:5px; }
  #board-phase-nav .tracker-category strong { font-size:10.5px; }
  .tracker-count { min-width:20px; height:20px; padding:0 5px; font-size:9px; }
  #progress-carousel { --progress-width:86%; gap:14px; padding-top:10px; padding-bottom:20px; }
  .progress-card-body { min-height:174px; gap:10px; padding:14px 8px 10px; }
  .progress-card-title { font-size:16px; }
  .progress-description { font-size:11.5px; }
  #board-grid.tracker-content-rail { gap:14px; }
  #board-grid.tracker-content-rail .tracker-project { flex-basis:91%; min-height:350px; padding:16px; }
  .tracker-content-top .chip { font-size:10px; }
  .tracker-progress-heading h3, .tracker-content-heading h3 { font-size:16px; }
}
@media (prefers-reduced-motion:reduce) {
  .progress-slide { transition:none; transform:none !important; opacity:1; }
}
#progress-carousel { --progress-width:360px; }
@media (max-width:600px) { #progress-carousel { --progress-width:min(320px,calc(100vw - 64px)); } }
.progress-slide { opacity:1; }
.tracker-content-heading:focus-visible { outline:2px solid var(--amber-3); outline-offset:3px; }
/* Center-synchronized looping progress carousel. */
#board-phase-nav .tracker-category[aria-pressed=true] { background:linear-gradient(125deg,var(--amber-2),var(--amber-3)); color:var(--surface); box-shadow:var(--shadow-card); }
.progress-slide { opacity:.52; }
.progress-slide .progress-card-banner img { filter:grayscale(1); transition:filter .35s var(--ease-out); }
.progress-slide.is-centered { opacity:1; }
.progress-slide.is-centered .progress-card-banner img { filter:grayscale(0); }
.progress-card[aria-pressed=true] { box-shadow:var(--shadow-card),var(--ring-accent-soft); }
#progress-carousel.is-rebasing { scroll-snap-type:none; scroll-behavior:auto !important; }
#board-grid[hidden], #tracker-content-heading[hidden] { display:none !important; }
@media (prefers-reduced-motion:reduce) {
  .progress-slide .progress-card-banner img { transition:none; }
}
#progress-carousel.is-rebasing .progress-slide,
#progress-carousel.is-rebasing .progress-card-banner img { transition:none !important; }
#progress-carousel.is-navigating .progress-slide { will-change:transform,opacity; }
/* Progress and content share one workspace; the top category selector stays available. */
#board-phase-nav .tracker-category[aria-pressed=true] .tracker-count { background:var(--surface); color:var(--critical); }
#tracker-progress-workspace[hidden] { display:none !important; }
.tracker-content-heading { display:flex; align-items:center; flex-wrap:wrap; gap:12px 20px; margin-bottom:18px; }
.tracker-progress-back { min-height:44px; flex-shrink:0; }
.tracker-progress-back:focus-visible { outline:2px solid var(--amber-3); outline-offset:3px; }
.progress-slide[data-slide="all"] { --progress-tone:var(--orange); }
.progress-slide[data-slide="script"] { --progress-tone:var(--gold); }
.progress-slide[data-slide="production"] { --progress-tone:var(--tan); }
.progress-slide[data-slide="editing"] { --progress-tone:var(--teal); }
.progress-slide[data-slide="approval"] { --progress-tone:var(--amber-1); }
.progress-slide[data-slide="output"] { --progress-tone:var(--amber-3); }
.progress-card {
  background:radial-gradient(ellipse at 100% 0%,color-mix(in srgb,var(--progress-tone) 30%,transparent),transparent 65%),
    linear-gradient(125deg,color-mix(in srgb,var(--progress-tone) 14%,var(--surface)),color-mix(in srgb,var(--surface) 82%,transparent));
  backdrop-filter:var(--glass);
  -webkit-backdrop-filter:var(--glass);
}
@media (max-width:600px) {
  .tracker-content-heading { align-items:flex-start; flex-direction:column; gap:12px; }
}
/* Tracker frequency, responsibility filter and stronger palette washes. */
#tracker-frequency { margin:24px 0; }
#tracker-frequency:empty { display:none; }
.tracker-frequency-heading { display:flex; align-items:baseline; justify-content:space-between; flex-wrap:wrap; gap:6px 16px; margin-bottom:14px; }
.tracker-frequency-heading h3 { margin:0; }
#tracker-frequency .freq-strip { gap:12px; margin-bottom:0; }
#tracker-frequency .freq-card { border-radius:var(--radius-card-sm); padding:16px; }
#tracker-frequency .freq-top { margin-bottom:12px; align-items:flex-start; }
#tracker-frequency .freq-name { white-space:normal; line-height:1.5; }
#tracker-frequency .freq-card p { margin:0 0 10px; }
#board-filter { display:flex; width:100%; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px; padding:0; background:none; border:0; box-shadow:none; backdrop-filter:none; }
.tracker-filter-label { font-size:12px; font-weight:700; color:var(--ink-soft); }
.tracker-filter-controls { display:flex; align-items:center; gap:8px; }
#board-filter .tracker-filter-all { min-width:64px; min-height:44px; border:0; }
#board-filter .tracker-filter-all.active { background:var(--ink-deep); color:var(--surface); box-shadow:var(--shadow-flat); }
.tracker-role-select { position:relative; }
.tracker-role-select select { width:200px; min-height:44px; padding:10px 38px 10px 14px; appearance:none; border:0; border-radius:var(--radius-btn); background:color-mix(in srgb,var(--surface) 80%,transparent); color:var(--ink); font:600 12px var(--font-body); box-shadow:var(--shadow-card); cursor:pointer; }
.tracker-role-select > span { position:absolute; right:14px; top:50%; transform:translateY(-50%); display:flex; pointer-events:none; }
.tracker-role-select svg { width:15px; height:15px; }
#board-filter button:focus-visible, .tracker-role-select select:focus-visible { outline:2px solid var(--amber-3); outline-offset:3px; }
#board-phase-nav.is-filtered { display:flex; }
#board-phase-nav.is-filtered .tracker-category { flex:0 1 220px; }
.progress-card {
  background:radial-gradient(ellipse at 100% 0%,color-mix(in srgb,var(--progress-tone) var(--progress-wash,48%),transparent),transparent 72%),
    linear-gradient(125deg,color-mix(in srgb,var(--progress-tone) var(--progress-mix,30%),var(--surface)),color-mix(in srgb,var(--surface) 82%,transparent));
}
.progress-card[aria-pressed=true] { box-shadow:var(--shadow-card); }
@media (max-width:600px) {
  #tracker-frequency { margin:20px 0 24px; }
  #tracker-frequency .freq-strip { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
  #tracker-frequency .freq-card { padding:14px; }
  #tracker-frequency .freq-name { font-size:11px; }
  #tracker-frequency .freq-count { font-size:11px; }
  #board-filter { align-items:flex-start; flex-direction:column; gap:10px; }
  .tracker-filter-controls { width:100%; }
  .tracker-role-select { flex:1; min-width:0; }
  .tracker-role-select select { width:100%; }
}
/* One progress palette drives the board bloom, content surfaces and indicators. */
body[data-tracker-progress="all"], .progress-slide[data-slide="all"], #board-phase-nav [data-category="all"] { --progress-tone:var(--amber-1); --progress-ink:var(--amber-3); }
body[data-tracker-progress="script"], .progress-slide[data-slide="script"], #board-phase-nav [data-category="script"] { --progress-tone:var(--amber-3); --progress-ink:var(--amber-3); }
body[data-tracker-progress="production"], .progress-slide[data-slide="production"], #board-phase-nav [data-category="production"] { --progress-tone:var(--tan); --progress-ink:var(--tan-ink); }
body[data-tracker-progress="editing"], .progress-slide[data-slide="editing"], #board-phase-nav [data-category="editing"] { --progress-tone:var(--teal); --progress-ink:var(--teal-ink); }
body[data-tracker-progress="approval"], .progress-slide[data-slide="approval"], #board-phase-nav [data-category="approval"] { --progress-tone:var(--positive); --progress-ink:color-mix(in srgb,var(--positive) 72%,var(--ink-deep)); }
body[data-tracker-progress="output"], .progress-slide[data-slide="output"], #board-phase-nav [data-category="output"] { --progress-tone:var(--gold); --progress-ink:var(--gold-ink); }
body[data-tracker-progress]:has(#view-tracker.active) {
  background:radial-gradient(1100px 620px at 68% 8%,color-mix(in srgb,var(--progress-tone) 62%,transparent),transparent 58%),
    radial-gradient(760px 520px at 96% 40%,color-mix(in srgb,var(--progress-tone) 40%,transparent),transparent 60%),
    radial-gradient(680px 460px at 6% 0%,color-mix(in srgb,var(--progress-tone) 30%,transparent),transparent 62%),var(--paper);
  background-attachment:fixed;
}
#board-grid.tracker-content-rail .tracker-project, #board-phase-nav .tracker-category {
  background:radial-gradient(ellipse at 100% 0%,color-mix(in srgb,var(--progress-tone) var(--progress-wash,48%),transparent),transparent 72%),
    linear-gradient(125deg,color-mix(in srgb,var(--progress-tone) var(--progress-mix,30%),var(--surface)),color-mix(in srgb,var(--surface) 82%,transparent));
  backdrop-filter:var(--glass);
  -webkit-backdrop-filter:var(--glass);
}
#board-phase-nav .tracker-category[aria-pressed=true] {
  background:var(--progress-ink);
  color:var(--surface);
}
#board-phase-nav .tracker-category .tracker-count,
#board-phase-nav .tracker-category[aria-pressed=true] .tracker-count { background:var(--surface); color:var(--progress-ink); }
/* Tracker-wide palette, with category and sub-stage colour on each content card. */
body[data-tracker-progress="all"]:has(#view-tracker.active) {
  background:radial-gradient(1100px 620px at 68% 8%,rgba(253,191,77,.64),transparent 58%),
    radial-gradient(760px 520px at 96% 40%,rgba(240,135,42,.38),transparent 60%),
    radial-gradient(680px 460px at 6% 0%,rgba(253,191,77,.26),transparent 62%),var(--paper);
  background-attachment:fixed;
}
body[data-tracker-progress]:has(#view-tracker.active) #tracker-frequency .freq-card {
  background:radial-gradient(ellipse at 100% 0%,color-mix(in srgb,var(--progress-tone) 32%,transparent),transparent 72%),
    linear-gradient(125deg,color-mix(in srgb,var(--progress-tone) 18%,var(--surface)),color-mix(in srgb,var(--surface) 82%,transparent));
  backdrop-filter:var(--glass);
  -webkit-backdrop-filter:var(--glass);
}
body[data-tracker-progress]:has(#view-tracker.active) .sidebar {
  background:radial-gradient(520px 340px at 18% 104%,color-mix(in srgb,var(--progress-tone) 62%,transparent),transparent 64%),
    radial-gradient(420px 300px at 96% -6%,color-mix(in srgb,var(--progress-tone) 30%,transparent),transparent 60%),
    linear-gradient(180deg,#17140F 0%,#100E0C 52%,#0A0908 100%);
}
body[data-tracker-progress]:has(#view-tracker.active) .sidebar .nav-item.active {
  background:linear-gradient(135deg,color-mix(in srgb,var(--progress-tone) 28%,transparent),color-mix(in srgb,var(--progress-tone) 16%,transparent));
  border-color:color-mix(in srgb,var(--progress-tone) 32%,transparent);
  box-shadow:var(--shadow-flat);
}
body[data-tracker-progress]:has(#view-tracker.active) .sidebar .nav-item.active::before { background:linear-gradient(180deg,var(--progress-tone),var(--progress-ink)); }
body[data-tracker-progress]:has(#view-tracker.active) .sidebar .brand-mark svg { fill:var(--progress-tone); }
#board-grid [data-content-category="script"] { --progress-tone:var(--amber-3); --progress-ink:var(--amber-3); }
#board-grid [data-content-category="production"] { --progress-tone:var(--tan); --progress-ink:var(--tan-ink); }
#board-grid [data-content-category="editing"] { --progress-tone:var(--teal); --progress-ink:var(--teal-ink); }
#board-grid [data-content-category="approval"] { --progress-tone:var(--positive); --progress-ink:color-mix(in srgb,var(--positive) 72%,var(--ink-deep)); }
#board-grid [data-content-category="output"] { --progress-tone:var(--gold); --progress-ink:var(--gold-ink); }
#board-grid.tracker-content-rail .tracker-project {
  background:radial-gradient(ellipse at 100% 0%,color-mix(in srgb,var(--progress-tone) calc(var(--progress-wash,48%) + var(--content-depth,0%)),transparent),transparent 72%),
    linear-gradient(125deg,color-mix(in srgb,var(--progress-tone) calc(var(--progress-mix,30%) + var(--content-depth,0%)),var(--surface)),color-mix(in srgb,var(--surface) 82%,transparent));
}
#board-grid .tracker-project[data-tone-depth="1"] { --content-depth:14%; }
.tracker-category-divider { flex:0 0 72px; display:flex; flex-direction:column; align-items:center; align-self:stretch; gap:16px; padding:12px 6px; color:var(--ink-soft); }
.tracker-category-divider span { font-size:11px; font-weight:700; line-height:1.5; text-align:center; overflow-wrap:anywhere; }
.tracker-category-divider::after { content:''; width:1px; flex:1; min-height:100px; background:color-mix(in srgb,var(--ink) 14%,transparent); }
@media (max-width:600px) {
  .tracker-category-divider { flex-basis:60px; padding-inline:4px; }
}
/* Distinct tracker surfaces: light amber All, burnt orange Script, green Approval, Honey Final Output. */
.progress-slide, #board-phase-nav .tracker-category, #board-grid .tracker-project { --progress-wash:48%; --progress-mix:30%; }
.progress-slide[data-slide="all"], #board-phase-nav [data-category="all"] { --progress-wash:22%; --progress-mix:10%; }
.progress-slide[data-slide="output"], #board-phase-nav [data-category="output"], #board-grid [data-content-category="output"] { --progress-wash:64%; --progress-mix:40%; }

/* A completed publishing target links to the existing Final Output view. */
.freq-result { display:flex; align-items:center; gap:8px; flex-shrink:0; }
#tracker-frequency .freq-complete { width:44px; height:44px; flex-shrink:0; color:var(--positive); background:color-mix(in srgb,var(--positive) 14%,var(--surface)); }
.freq-complete svg { width:20px; height:20px; }
.freq-complete:focus-visible { outline:2px solid var(--progress-ink); outline-offset:3px; }
/* Dashboard alignment: the same Aura glass, bloom and depth as Content Tracker. */
body { --workspace-tone:var(--amber-1); --workspace-ink:var(--amber-3);
  background:radial-gradient(1100px 620px at 68% 8%,color-mix(in srgb,var(--workspace-tone) 56%,transparent),transparent 58%),
    radial-gradient(760px 520px at 96% 40%,color-mix(in srgb,var(--amber-2) 30%,transparent),transparent 60%),
    radial-gradient(680px 460px at 6% 0%,color-mix(in srgb,var(--teal) 12%,transparent),transparent 62%),var(--paper);
  background-attachment:fixed;
}
body:has(#view-content-plan.active) { --workspace-tone:var(--teal); --workspace-ink:var(--teal-ink); }
.sidebar {
  background:radial-gradient(520px 340px at 18% 104%,color-mix(in srgb,var(--workspace-tone) 54%,transparent),transparent 64%),
    radial-gradient(420px 300px at 96% -6%,color-mix(in srgb,var(--workspace-tone) 24%,transparent),transparent 60%),
    linear-gradient(180deg,#17140F 0%,#100E0C 52%,#0A0908 100%);
}
.sidebar .nav-item.active { background:linear-gradient(135deg,color-mix(in srgb,var(--workspace-tone) 24%,transparent),color-mix(in srgb,var(--workspace-tone) 12%,transparent)); border-color:color-mix(in srgb,var(--workspace-tone) 28%,transparent); box-shadow:var(--shadow-flat); }
.sidebar .nav-item.active::before { background:linear-gradient(180deg,var(--workspace-tone),var(--workspace-ink)); }
.sidebar .brand-mark svg { fill:var(--workspace-tone); }
:is(#view-overview,#view-performance,#view-pillars,#view-content-plan,#view-users) .card,
:is(#view-overview,#view-performance) .stat-card:not(:first-child),
#view-performance .pm-stat-card, #view-performance .flag-card,
#view-content-plan .script-card.is-filled {
  background:radial-gradient(ellipse at 100% 0%,color-mix(in srgb,var(--workspace-tone) 22%,transparent),transparent 72%),
    linear-gradient(125deg,color-mix(in srgb,var(--workspace-tone) 10%,var(--surface)),color-mix(in srgb,var(--surface) 84%,transparent));
  border:0; border-radius:var(--radius-card-sm); box-shadow:var(--shadow-card); backdrop-filter:var(--glass); -webkit-backdrop-filter:var(--glass);
}
:is(#view-overview,#view-performance,#view-pillars,#view-users) .card .card { box-shadow:none; backdrop-filter:none; -webkit-backdrop-filter:none; background:color-mix(in srgb,var(--surface) 50%,transparent); }
:is(#view-overview,#view-performance,#view-pillars,#view-users) > .section-head:first-child { margin-top:12px; }
:is(#view-pillars,#view-users) .card-pad { padding:22px; }
:is(#view-pillars,#view-users) .setup-item { border:0; border-radius:var(--radius-btn); background:color-mix(in srgb,var(--surface) 58%,transparent); }
.view .btn-glass { background:linear-gradient(125deg,color-mix(in srgb,var(--workspace-tone) 12%,var(--surface)),color-mix(in srgb,var(--surface) 80%,transparent)); border-color:transparent; }
.view .btn-glass:hover { background:color-mix(in srgb,var(--workspace-tone) 18%,var(--surface)); }
:is(#view-performance,#view-users) .table-wrap { border:0; border-radius:var(--radius-card-sm); box-shadow:var(--shadow-card); }
:is(#view-performance,#view-users) thead { background:color-mix(in srgb,var(--teal) 9%,var(--surface)); }
/* Content Plan: persistent pillar navigation and immediately visible scripts. */
#view-content-plan { padding-top:18px; }
.cp-workspace { display:grid; grid-template-columns:236px minmax(0,1fr); align-items:start; gap:20px; width:100%; }
.cp-workspace[hidden] { display:none !important; }
.cp-workspace.is-empty { grid-template-columns:minmax(0,1fr); }
#cp-step-pillar { min-width:0; position:sticky; top:110px; }
#cp-step-pillar > .section-head { margin:0 0 14px; }
#cp-step-pillar h2 { font-size:17px; }
#cp-step-pillar .section-head p { font-size:12px; line-height:1.6; }
#cp-pillar-grid { display:flex; flex-direction:column; gap:10px; }
#cp-pillar-grid .pick-row { min-width:0; min-height:82px; gap:10px; padding:14px; border:0; border-radius:var(--radius-card-sm); background:linear-gradient(125deg,color-mix(in srgb,var(--teal) 12%,var(--surface)),color-mix(in srgb,var(--surface) 80%,transparent)); color:var(--ink); box-shadow:var(--shadow-card); backdrop-filter:var(--glass); }
#cp-pillar-grid .pick-row[aria-pressed=true] { background:var(--teal-ink); color:var(--surface); box-shadow:var(--shadow-card); }
#cp-pillar-grid .pick-icon { width:34px; height:34px; flex-shrink:0; border-radius:var(--radius-btn); background:color-mix(in srgb,var(--teal) 14%,var(--surface)); color:var(--teal-ink); }
#cp-pillar-grid [aria-pressed=true] .pick-icon { background:color-mix(in srgb,var(--surface) 16%,transparent); color:var(--surface); }
#cp-pillar-grid .pick-meta { min-width:0; }
#cp-pillar-grid .pick-title { font-size:12px; white-space:normal; overflow-wrap:anywhere; line-height:1.5; }
#cp-pillar-grid .pick-sub { font-size:10.5px; line-height:1.6; }
#cp-pillar-grid [aria-pressed=true] .pick-sub { color:var(--surface); opacity:.84; }
#cp-pillar-grid .pick-row > svg { width:15px; height:15px; flex-shrink:0; }
#cp-pillar-grid .pick-row[aria-pressed=true] > svg { color:var(--surface); stroke:var(--surface); }
#cp-step-scripts { min-width:0; }
#cp-pillar-summary > .card { padding:18px 20px; margin-bottom:18px !important; }
#cp-pillar-summary .set-row { align-items:flex-start; gap:14px; flex-wrap:wrap; }
#cp-pillar-summary .set-name { flex-wrap:wrap; }
#cp-pillar-summary .set-sub { line-height:1.8; }
#cp-step-scripts > .section-head { margin:0 0 14px; align-items:center; }
#cp-scripts-title { font-size:19px; }
#cp-step-scripts > .section-head p { font-size:12px; }
#cp-script-list .script-grid { grid-template-columns:repeat(auto-fill,minmax(min(100%,220px),1fr)); gap:14px; }
#cp-script-list .script-card { min-width:0; min-height:218px; padding:18px; gap:12px; border-radius:var(--radius-card-sm); }
#cp-script-list .script-card.is-filled { background:radial-gradient(ellipse at 100% 0%,color-mix(in srgb,var(--teal) 30%,transparent),transparent 72%),linear-gradient(125deg,color-mix(in srgb,var(--teal) 14%,var(--surface)),color-mix(in srgb,var(--surface) 86%,transparent)) !important; border:0; }
#cp-script-list .script-card.is-empty { min-height:132px; background:color-mix(in srgb,var(--surface) 36%,transparent); box-shadow:none; border:1px dashed color-mix(in srgb,var(--teal) 30%,transparent); }
#cp-script-list .script-card.is-empty:hover { background:color-mix(in srgb,var(--teal) 10%,var(--surface)); color:var(--teal-ink); }
#cp-script-list .script-title { font-size:14px; line-height:1.55; }
#cp-script-list .script-excerpt { line-height:1.8; }
#cp-script-list .script-caption { font-size:11px; line-height:1.8; margin-bottom:14px; }
#cp-script-list .script-actions { gap:8px; }
#view-content-plan :is(.pick-row,.script-card,.btn,.icon-btn):focus-visible { outline:2px solid var(--teal-ink); outline-offset:3px; }
@media (max-width:1099px) {
  .cp-workspace { grid-template-columns:210px minmax(0,1fr); gap:16px; }
  #cp-pillar-grid .pick-row { padding:12px; }
}
@media (max-width:800px) {
  .cp-workspace { grid-template-columns:minmax(0,1fr); gap:18px; }
  #cp-step-pillar { position:static; }
  #cp-step-pillar > .section-head { margin-bottom:10px; }
  #cp-pillar-grid { flex-direction:row; overflow-x:auto; scroll-snap-type:x mandatory; scrollbar-width:thin; padding:3px 2px 12px; }
  #cp-pillar-grid .pick-row { flex:0 0 220px; scroll-snap-align:start; min-height:78px; }
}
@media (max-width:600px) {
  #view-content-plan { padding-top:14px; }
  #cp-pillar-summary > .card { padding:16px; }
  #cp-pillar-summary .set-control { width:100%; }
  #cp-pillar-summary .set-control .btn { width:100%; min-height:44px; }
  #cp-step-scripts > .section-head { gap:12px; }
  #cp-script-list .script-grid { grid-template-columns:minmax(0,1fr); }
  #cp-script-list .script-actions .btn, #cp-script-list .script-actions .icon-btn, #cp-scripts-action .btn { min-height:44px; min-width:44px; }
  #cp-script-list .script-card.is-empty { min-height:116px; }
}
/* One active palette for the entire progress indicator strip. */
#board-phase-nav { --progress-wash:48%; --progress-mix:30%; }
body[data-tracker-progress="all"] #board-phase-nav { --progress-wash:22%; --progress-mix:10%; }
body[data-tracker-progress="output"] #board-phase-nav { --progress-wash:64%; --progress-mix:40%; }
#board-phase-nav .tracker-category { --progress-tone:inherit; --progress-ink:inherit; --progress-wash:inherit; --progress-mix:inherit; }
/* Compact completion mark; the mobile hit area remains 44px. */
#tracker-frequency .freq-result { gap:4px; }
#tracker-frequency .freq-complete { position:relative; width:28px; height:28px; min-width:28px; min-height:28px; padding:0; border:0; background:transparent; color:var(--surface); box-shadow:none; }
#tracker-frequency .freq-complete::before { content:''; position:absolute; width:22px; height:22px; border-radius:50%; background:var(--positive); pointer-events:none; }
#tracker-frequency .freq-complete svg { position:relative; width:13px; height:13px; color:var(--surface); stroke:var(--surface); pointer-events:none; }
@media (max-width:600px) {
  #tracker-frequency .freq-complete { width:44px; height:44px; min-width:44px; min-height:44px; }
}

/* Shared pillar palette, using the same Aura wash and dark chrome as Tracker. */
body[data-pillar-color="orange"] { --pillar-tone:var(--orange); --pillar-ink:var(--orange-ink); }
body[data-pillar-color="gold"] { --pillar-tone:var(--gold); --pillar-ink:var(--gold-ink); }
body[data-pillar-color="teal"] { --pillar-tone:var(--teal); --pillar-ink:var(--teal-ink); }
body[data-pillar-color="tan"] { --pillar-tone:var(--tan); --pillar-ink:var(--tan-ink); }
body[data-pillar-color="amber"] { --pillar-tone:var(--amber-1); --pillar-ink:var(--amber-3); }
body[data-pillar-color="rust"] { --pillar-tone:var(--amber-3); --pillar-ink:var(--amber-3); }
body[data-pillar-color="green"] { --pillar-tone:var(--positive); --pillar-ink:color-mix(in srgb,var(--positive) 72%,var(--ink-deep)); }
body[data-pillar-color]:has(#view-content-plan.active) {
  --workspace-tone:var(--pillar-tone); --workspace-ink:var(--pillar-ink);
  background:radial-gradient(1100px 620px at 68% 8%,color-mix(in srgb,var(--workspace-tone) 62%,transparent),transparent 58%),radial-gradient(760px 520px at 96% 40%,color-mix(in srgb,var(--workspace-tone) 40%,transparent),transparent 60%),radial-gradient(680px 460px at 6% 0%,color-mix(in srgb,var(--workspace-tone) 30%,transparent),transparent 62%),var(--paper);
  background-attachment:fixed;
}
#pillars-grid .pillar-card {
  background:radial-gradient(ellipse at 100% 0%,color-mix(in srgb,var(--pillar-tone) 48%,transparent),transparent 72%),linear-gradient(125deg,color-mix(in srgb,var(--pillar-tone) 30%,var(--surface)),color-mix(in srgb,var(--surface) 82%,transparent));
}
#cp-pillar-grid .pick-row {
  background:radial-gradient(ellipse at 100% 0%,color-mix(in srgb,var(--workspace-tone) 48%,transparent),transparent 72%),linear-gradient(125deg,color-mix(in srgb,var(--workspace-tone) 30%,var(--surface)),color-mix(in srgb,var(--surface) 82%,transparent));
}
#cp-pillar-grid .pick-row[aria-pressed=true] { background:var(--workspace-ink); color:var(--surface); }
#cp-pillar-grid .pick-icon { background:color-mix(in srgb,var(--workspace-tone) 14%,var(--surface)); color:var(--workspace-ink); }
#cp-pillar-grid [aria-pressed=true] .pick-icon { background:color-mix(in srgb,var(--surface) 16%,transparent); color:var(--surface); }
#cp-pillar-summary > .card, #cp-script-list .script-card.is-filled {
  background:radial-gradient(ellipse at 100% 0%,color-mix(in srgb,var(--workspace-tone) 48%,transparent),transparent 72%),linear-gradient(125deg,color-mix(in srgb,var(--workspace-tone) 30%,var(--surface)),color-mix(in srgb,var(--surface) 82%,transparent)) !important;
}
#view-content-plan :is(.pick-row,.btn,.icon-btn,.script-empty-write,input,summary):focus-visible { outline:2px solid var(--workspace-ink); outline-offset:3px; }
.chip-amber { background:color-mix(in srgb,var(--amber-1) 16%,transparent); color:var(--amber-3); }
.chip-rust { background:color-mix(in srgb,var(--amber-3) 14%,transparent); color:var(--amber-3); }
.chip-green { background:color-mix(in srgb,var(--positive) 14%,transparent); color:color-mix(in srgb,var(--positive) 72%,var(--ink-deep)); }
#np-colors { flex-wrap:wrap; gap:10px; }
#np-colors .color-opt { width:44px; height:44px; min-width:44px; min-height:44px; }
.content-month-control { display:flex; align-items:center; gap:10px; font-size:12px; color:var(--ink-soft); flex-wrap:wrap; }
.content-month-control input { min-height:44px; width:170px; max-width:100%; padding:8px 12px; border-radius:var(--radius-btn); border:0; color:var(--ink); background:color-mix(in srgb,var(--surface) 82%,transparent); font:inherit; }
#cp-pillar-summary .set-control { flex-wrap:wrap; justify-content:flex-end; }
.freq-slot-summary { font-size:10px; color:var(--ink-soft); margin:0 0 10px; line-height:1.6; }
#tracker-frequency .freq-card p:first-of-type { margin-bottom:4px; }
/* Fixed card geometry also applies when a pillar has only one script. */
#cp-script-list .script-grid { grid-template-columns:repeat(auto-fill,minmax(min(100%,220px),1fr)); align-items:start; }
#cp-script-list .script-card { height:340px; min-height:340px; max-height:340px; padding:18px; }
#cp-script-list .script-title { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; min-height:44px; flex-shrink:0; }
#cp-script-list .script-excerpt { -webkit-line-clamp:3; min-height:66px; flex-shrink:0; }
#cp-script-list .script-tags { min-height:30px; }
#cp-script-list .script-actions { min-height:44px; flex-shrink:0; }
#cp-script-list .script-card.is-empty, #board-grid .tracker-empty-slot {
  background:radial-gradient(ellipse at 100% 0%,color-mix(in srgb,var(--critical) 28%,transparent),transparent 72%),linear-gradient(125deg,color-mix(in srgb,var(--critical) 12%,var(--surface)),color-mix(in srgb,var(--surface) 82%,transparent));
  color:var(--ink); border:0; box-shadow:var(--shadow-card); cursor:default;
}
#cp-script-list .script-card.is-empty:hover { border:0; color:var(--ink); background:radial-gradient(ellipse at 100% 0%,color-mix(in srgb,var(--critical) 32%,transparent),transparent 72%),linear-gradient(125deg,color-mix(in srgb,var(--critical) 14%,var(--surface)),color-mix(in srgb,var(--surface) 82%,transparent)); }
#cp-script-list .script-empty-write { flex:1; width:100%; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:12px; padding:8px; background:transparent; border:0; border-radius:var(--radius-btn); color:var(--ink); font:inherit; cursor:pointer; }
#cp-script-list .script-empty-mark { width:40px; height:40px; color:var(--critical); background:color-mix(in srgb,var(--surface) 80%,transparent); }
#cp-script-list .script-empty-hint { font-size:12px; line-height:1.7; color:var(--ink-soft); }
#cp-script-list .script-card.is-empty > .btn { width:100%; min-height:44px; }
.script-archive { margin-top:24px; }
.script-archive summary { cursor:pointer; padding:12px 0; min-height:44px; font-size:13px; font-weight:700; }
.script-archive-list { display:grid; gap:8px; margin-top:8px; }
.script-archive-list .btn { justify-content:space-between; gap:16px; text-align:left; white-space:normal; min-height:44px; }
.script-archive-list .btn span:first-child { min-width:0; overflow-wrap:anywhere; }
.script-archive-list .mono { flex-shrink:0; }
#modal-slot-change { z-index:220; }
#modal-slot-change .modal { max-width:520px; }
#slot-change-copy { font-size:14px; line-height:1.8; overflow-wrap:anywhere; }
.slot-change-preview { display:flex; align-items:center; justify-content:center; gap:32px; padding:24px 16px; margin-top:18px; border-radius:var(--radius-card-sm); background:color-mix(in srgb,var(--workspace-tone) 12%,var(--surface)); }
.slot-change-preview span { display:flex; flex-direction:column; align-items:center; gap:8px; }
.slot-change-preview small { font-size:12px; color:var(--ink-soft); }
.slot-change-preview strong { font:700 32px var(--font-mono); }
#modal-slot-change button { min-height:44px; min-width:44px; }
@media (max-width:600px) {
  #cp-script-list .script-grid { grid-template-columns:minmax(0,1fr); }
  #cp-pillar-summary .set-control { justify-content:flex-start; }
  #cp-pillar-summary .content-month-control { width:100%; }
  #cp-pillar-summary .content-month-control input { flex:1; }
  .tracker-frequency-heading { align-items:flex-start; }
  #modal-slot-change .modal-foot { flex-wrap:wrap; }
  #modal-slot-change .modal-foot .btn { flex:1; }
}


/* November polish: local brand assets, compact panels, functional calculators. */
.sidebar .brand { min-height:76px; padding:18px 24px; }
.pulsera-wordmark { display:block; width:172px; height:auto; max-width:100%; object-fit:contain; }
.login-hero-top .pulsera-wordmark { width:190px; }
.client-logo { display:block; width:100%; height:100%; object-fit:cover; }
.has-client-logo { background:transparent !important; padding:0 !important; overflow:hidden; border-radius:var(--radius-btn); }
.sidebar #asw-icon.has-client-logo { width:46px; height:46px; min-width:46px; }
#account-switcher-list .has-client-logo { width:40px; height:40px; flex-shrink:0; }
#cs-checklist .setup-card { padding:16px; border:0; border-radius:var(--radius-card-sm); background:radial-gradient(ellipse at 100% 0%,color-mix(in srgb,var(--amber-1) 22%,transparent),transparent 72%),linear-gradient(125deg,color-mix(in srgb,var(--amber-1) 10%,var(--surface)),color-mix(in srgb,var(--surface) 84%,transparent)); box-shadow:var(--shadow-card); backdrop-filter:var(--glass); }
#cs-checklist .setup-head { margin-bottom:10px; }
#cs-checklist .setup-list { grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
#cs-checklist .setup-item { padding:10px 12px; min-height:64px; align-items:flex-start; gap:9px; }
#cs-checklist .setup-mark { flex-shrink:0; margin-top:2px; }
#cs-checklist .setup-label, #cs-checklist .setup-note { display:block; }
#cs-checklist .setup-label { font-size:12px; line-height:1.5; }
#cs-checklist .setup-note { font-size:11px; line-height:1.5; margin-top:3px; }
#view-tracker #table-filters { display:flex; flex-wrap:wrap; align-items:flex-start; gap:12px; }
#view-tracker #tbl-status { display:flex; flex:1; min-width:0; max-width:100%; flex-wrap:nowrap; overflow-x:auto; gap:4px; padding:4px; border-radius:var(--radius-card-sm); scrollbar-width:thin; }
#tbl-status button { flex:0 0 auto; white-space:nowrap; font-size:12px; padding:8px 12px; min-height:44px; border-radius:var(--radius-btn); }
#table-filters > .field { flex:0 0 180px; min-width:0 !important; }
#tbl-pillar { min-height:44px; }
#drawer-overlay .workflow-active { border-radius:var(--radius-card-sm); padding:20px; background:radial-gradient(ellipse at 100% 0%,color-mix(in srgb,var(--progress-tone,var(--workspace-tone)) 28%,transparent),transparent 72%),linear-gradient(125deg,color-mix(in srgb,var(--progress-tone,var(--workspace-tone)) 14%,var(--surface)),color-mix(in srgb,var(--surface) 90%,transparent)); backdrop-filter:none; -webkit-backdrop-filter:none; }
#view-performance .flag-card { border-radius:var(--radius-card-sm); background:radial-gradient(ellipse at 100% 0%,color-mix(in srgb,var(--critical) 48%,transparent),transparent 72%),linear-gradient(125deg,color-mix(in srgb,var(--critical) 22%,var(--surface)),color-mix(in srgb,var(--surface) 84%,transparent)); }
#view-performance .flag-card::before { content:none; }
.ratio-calculator { max-width:900px; margin-bottom:24px; min-width:0; padding:22px; }
.calculator-header { display:flex; align-items:center; flex-wrap:wrap; gap:12px; margin-bottom:18px; }
.calculator-header h3 { font-size:16px; margin:0; }
.calculator-layout { display:grid; grid-template-columns:minmax(0,1.35fr) minmax(0,1fr); gap:24px; align-items:stretch; }
.calculator-inputs { min-width:0; }
.ratio-calculator .formula-eq { margin:0 0 18px; padding:10px 12px; line-height:1.7; font-size:12px; overflow-wrap:anywhere; }
.ratio-calculator .mini-form { grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; margin:0; align-items:start; }
.ratio-calculator .field { min-width:0; }
.ratio-calculator .field label { min-height:40px; line-height:1.5; display:flex; align-items:flex-end; font-size:12px; }
.ratio-calculator .field input { width:100%; min-width:0; max-width:100%; box-sizing:border-box; min-height:48px; }
.ratio-calculator .field-error-msg { line-height:1.6; margin-top:4px; }
.calculator-actions { display:flex; flex-wrap:wrap; gap:10px; margin-top:18px; }
.calculator-actions .btn { min-height:44px; }
.calculator-result { display:flex; flex-direction:column; justify-content:center; min-width:0; border-radius:var(--radius-card-sm); padding:22px; background:radial-gradient(ellipse at 100% 0%,color-mix(in srgb,var(--teal) 25%,transparent),transparent 72%),linear-gradient(125deg,color-mix(in srgb,var(--teal) 12%,var(--surface)),color-mix(in srgb,var(--surface) 70%,transparent)); }
.ratio-calculator .formula-value { display:block; font-size:42px; line-height:1.25; margin:12px 0; color:var(--teal-ink); overflow-wrap:anywhere; }
.calculator-feedback { font-size:13px; line-height:1.7; margin:0; color:var(--ink-soft); }
.calculator-source { font-size:11px; line-height:1.7; margin:14px 0 0; color:var(--ink-soft); }
.ratio-calculator :is(input,.btn):focus-visible { outline:2px solid var(--teal-ink); outline-offset:3px; }
@media (max-width:900px) {
  #cs-checklist .setup-list { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:600px) {
  .sidebar .brand { min-height:70px; }
  #cs-checklist .setup-card { padding:14px; }
  #cs-checklist .setup-list { grid-template-columns:minmax(0,1fr); }
  #cs-checklist .setup-item { min-height:56px; }
  #view-tracker #tbl-status { flex:0 0 100%; }
  #table-filters > .field { flex:1 0 100%; }
  .ratio-calculator { padding:18px; }
  .calculator-layout { grid-template-columns:minmax(0,1fr); gap:18px; }
  .ratio-calculator .mini-form { grid-template-columns:minmax(0,1fr); gap:12px; }
  .ratio-calculator .field label { min-height:0; }
  .calculator-actions .btn { flex:1; }
  .calculator-result { padding:18px; }
  #drawer-overlay .workflow-active { padding:18px; }
}
