/* ============================================================
   FONTS — Geist (self-hosted, SIL OFL, see /fonts/LICENSE.txt).
   The variable font covers the whole weight range in one file.
   "…Fallback" is a plain system-stack alias, not a metrics-matched
   substitute — Vercel's own Next.js sites generate one of those at
   build time from font-metric data we don't have access to here.
   ============================================================ */
@font-face {
  font-family: "GeistSans";
  src: url("/fonts/Geist-Variable.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "GeistSans Fallback";
  src: local("Helvetica Neue"), local("Arial");
}
@font-face {
  font-family: "GeistMono";
  src: url("/fonts/GeistMono-Variable.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "GeistMono Fallback";
  src: local("SFMono-Regular"), local("Menlo"), local("Consolas");
}

/* ============================================================
   TOKENS — light is the base; dark redefines tokens only.
   Neutrals are true gray (no hue bias); --accent is the brand
   color (#29AAE2) with matching tint/hover/border shades.
   ============================================================ */
:root {
  --bg:              #FAFAFA;
  --surface:         #FFFFFF;
  --surface-2:       #F5F5F5;
  --surface-sunk:    #EDEDED;
  --line:            #E3E3E3;
  --line-soft:       #ECECEC;
  --ink:             #0A0A0A;
  --ink-2:           #404040;
  --ink-3:           #666666;
  --ink-4:           #8F8F8F;

  --accent:          #29AAE2;
  --accent-ink:      #157FAC;
  --accent-soft:     #E9F6FB;
  --accent-line:     #B9DEEF;
  --on-accent:       #FFFFFF;

  --crit:            #B8342A;
  --crit-soft:       #FBE6E3;
  --crit-line:       #F0BDB6;
  --high:            #A85708;
  --high-soft:       #FCEEDC;
  --high-line:       #EFCE9E;
  --med:             #4C4FD6;
  --med-soft:        #E9E9FA;
  --med-line:        #C4C4F0;
  --low:             #6B7280;
  --low-soft:        #EEEFF1;
  --low-line:        #D6D9DE;

  --ok:              #16794A;
  --ok-soft:         #DFF2E8;
  --ok-line:         #A9DCC3;
  --warn:            #A85708;
  --warn-soft:       #FCEEDC;
  --block:           #6E42A8;
  --block-soft:      #EFE7FA;
  --block-line:      #D3BFEE;

  --shadow-sm: 0 1px 2px rgba(0,0,0,.05), 0 1px 1px rgba(0,0,0,.03);
  --shadow-md: 0 4px 14px rgba(0,0,0,.08), 0 1px 3px rgba(0,0,0,.05);
  --shadow-lg: 0 18px 48px rgba(0,0,0,.18), 0 4px 12px rgba(0,0,0,.08);

  --r-sm: 6px; --r-md: 8px; --r-lg: 12px;
  --rail: 214px;

  --f-display: "GeistSans", "GeistSans Fallback", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --f-body: "GeistSans", "GeistSans Fallback", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --f-mono: "GeistMono", "GeistMono Fallback", ui-monospace, SFMono-Regular, Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;   /* native controls (date picker icon, scrollbars) render light-on-dark */
    --bg:            #0A0A0A;
    --surface:       #111111;
    --surface-2:     #1A1A1A;
    --surface-sunk:  #0D0D0D;
    --line:          #2E2E2E;
    --line-soft:     #232323;
    --ink:           #EDEDED;
    --ink-2:         #B4B4B4;
    --ink-3:         #8A8A8A;
    --ink-4:         #666666;

    --accent:        #4FBDEE;
    --accent-ink:    #89D5F5;
    --accent-soft:   #12323F;
    --accent-line:   #275468;
    --on-accent:     #05191C;

    --crit:          #F0776A;
    --crit-soft:     #351714;
    --crit-line:     #5C2721;
    --high:          #E2A24A;
    --high-soft:     #31220E;
    --high-line:     #533A18;
    --med:           #9496EA;
    --med-soft:      #201F3B;
    --med-line:      #38376A;
    --low:           #9AA1AC;
    --low-soft:      #1D2024;
    --low-line:      #2E3339;

    --ok:            #4FC98A;
    --ok-soft:       #0F2A1E;
    --ok-line:       #1D4733;
    --warn:          #E2A24A;
    --warn-soft:     #31220E;
    --block:         #B292E4;
    --block-soft:    #221A33;
    --block-line:    #3B2C55;

    --shadow-sm: 0 1px 2px rgba(0,0,0,.5);
    --shadow-md: 0 4px 16px rgba(0,0,0,.55);
    --shadow-lg: 0 20px 54px rgba(0,0,0,.7);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg:            #0A0A0A;
  --surface:       #111111;
  --surface-2:     #1A1A1A;
  --surface-sunk:  #0D0D0D;
  --line:          #2E2E2E;
  --line-soft:     #232323;
  --ink:           #EDEDED;
  --ink-2:         #B4B4B4;
  --ink-3:         #8A8A8A;
  --ink-4:         #666666;
  --accent:        #4FBDEE;
  --accent-ink:    #89D5F5;
  --accent-soft:   #12323F;
  --accent-line:   #275468;
  --on-accent:     #05191C;
  --crit:          #F0776A;
  --crit-soft:     #351714;
  --crit-line:     #5C2721;
  --high:          #E2A24A;
  --high-soft:     #31220E;
  --high-line:     #533A18;
  --med:           #9496EA;
  --med-soft:      #201F3B;
  --med-line:      #38376A;
  --low:           #9AA1AC;
  --low-soft:      #1D2024;
  --low-line:      #2E3339;
  --ok:            #4FC98A;
  --ok-soft:       #0F2A1E;
  --ok-line:       #1D4733;
  --warn:          #E2A24A;
  --warn-soft:     #31220E;
  --block:         #B292E4;
  --block-soft:    #221A33;
  --block-line:    #3B2C55;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.5);
  --shadow-md: 0 4px 16px rgba(0,0,0,.55);
  --shadow-lg: 0 20px 54px rgba(0,0,0,.7);
}

/* ============================================================
   BASE
   ============================================================ */
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 13.5px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
h1,h2,h3,h4 { font-family: var(--f-display); margin: 0; text-wrap: balance; letter-spacing: -0.011em; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
::selection { background: var(--accent-soft); color: var(--ink); }
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.sr { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0; }
@media (prefers-reduced-motion: reduce) { * { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* ============================================================
   APP FRAME
   ============================================================ */
#app { display: grid; grid-template-columns: var(--rail) 1fr; min-height: 100vh; }

.rail {
  background: var(--surface);
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.rail-brand { padding: 16px 16px 12px; display: flex; gap: 10px; align-items: center; }
.brand-logo {
  border-radius: var(--r-md); padding: 6px 10px;
  display: flex; align-items: center; width: 100%;
}
.brand-logo img { display: block; width: 100%; height: auto; }
/* Two logos: the white-text one for dark mode, the dark-text one on light backgrounds.
   Dark applies under the same two conditions as the dark colour tokens above. */
.brand-logo .logo-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .brand-logo .logo-dark { display: block; }
  :root:not([data-theme="light"]) .brand-logo .logo-light { display: none; }
}
:root[data-theme="dark"] .brand-logo .logo-dark { display: block; }
:root[data-theme="dark"] .brand-logo .logo-light { display: none; }

.nav { padding: 4px 8px; display: flex; flex-direction: column; gap: 1px; }
.nav-h {
  font-size: 10px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-4); padding: 14px 8px 5px; font-weight: 600;
}
.nav-i {
  display: flex; align-items: center; gap: 9px; width: 100%;
  padding: 7px 9px; border: 0; background: none; border-radius: var(--r-md);
  color: var(--ink-2); font-size: 13px; text-align: left; font-weight: 500;
}
.nav-i:hover { background: var(--surface-2); color: var(--ink); }
.nav-i[aria-current="page"] { background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
.nav-i svg { width: 15px; height: 15px; flex: none; opacity: .85; }
.nav-i .cnt {
  margin-left: auto; font-family: var(--f-mono); font-size: 10.5px; font-weight: 600;
  background: var(--surface-sunk); color: var(--ink-3); padding: 1px 5px; border-radius: 20px;
}
.nav-i .cnt.hot { background: var(--crit-soft); color: var(--crit); }
.rail-foot { margin-top: auto; padding: 10px; border-top: 1px solid var(--line-soft); }

.who {
  width: 100%; display: flex; align-items: center; gap: 9px; padding: 7px;
  border: 1px solid var(--line); background: var(--surface-2); border-radius: var(--r-md); text-align: left;
}
.who:hover { border-color: var(--accent-line); }
.who .nm { font-size: 12.5px; font-weight: 600; line-height: 1.2; }
.who .rl { font-size: 10.5px; color: var(--ink-4); text-transform: uppercase; letter-spacing: .06em; }

.av {
  width: 26px; height: 26px; border-radius: 50%; flex: none; display: grid; place-items: center;
  font-family: var(--f-display); font-weight: 600; font-size: 10.5px; color: #fff; letter-spacing: .01em;
}
.av.lg { width: 34px; height: 34px; font-size: 12.5px; }
.av.sm { width: 20px; height: 20px; font-size: 8.5px; }

/* ---------- top bar ---------- */
.main { min-width: 0; max-width: 100%; display: flex; flex-direction: column; overflow-x: clip; }
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  padding: 10px 20px; display: flex; align-items: center; gap: 12px;
}
.searchwrap { position: relative; flex: 1; max-width: 460px; }
.searchwrap svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 14px; height: 14px; color: var(--ink-4); }
#globalSearch {
  width: 100%; padding: 7px 10px 7px 31px; border-radius: var(--r-md);
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 13px;
}
#globalSearch::placeholder { color: var(--ink-4); }
#globalSearch:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.searchpop {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 60;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg); max-height: 62vh; overflow-y: auto; padding: 6px;
}
.sr-group { font-size: 10px; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-4); padding: 8px 8px 4px; font-weight: 600; }
.sr-item { display: flex; gap: 9px; align-items: center; padding: 7px 8px; border-radius: var(--r-md); cursor: pointer; }
.sr-item:hover, .sr-item.sel { background: var(--accent-soft); }
.sr-item.notif { background: var(--accent-soft); border-left: 3px solid var(--accent); border-radius: 0 var(--r-md) var(--r-md) 0; }
.sr-item.notif:hover { background: var(--accent-line); }
.sr-item .t { font-size: 12.5px; font-weight: 500; }
.sr-item .m { font-size: 11px; color: var(--ink-4); }
.sr-item:disabled { opacity: .45; cursor: not-allowed; }
.sr-item:disabled:hover { background: none; }

.break-opt {
  display: flex; gap: 11px; align-items: center; width: 100%; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); cursor: pointer;
  transition: background .12s ease, border-color .12s ease;
}
.break-opt:hover { background: var(--accent-soft); border-color: var(--accent-line); }
.break-opt .t { font-size: 13px; font-weight: 600; color: var(--ink); }
.break-opt .m { font-size: 11.5px; color: var(--ink-4); }
.break-opt-ic {
  width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent-ink);
}
.break-opt-ic svg { width: 15px; height: 15px; }
.break-opt:disabled { cursor: not-allowed; background: var(--surface-sunk); border-color: var(--line-soft); }
.break-opt:disabled:hover { background: var(--surface-sunk); border-color: var(--line-soft); }
.break-opt:disabled .t { color: var(--ink-4); }
.break-opt:disabled .break-opt-ic { background: var(--surface); color: var(--ink-4); }

.notif-peek { display: flex; align-items: center; gap: 7px; max-width: 340px; min-width: 0; height: 30px; padding: 0 10px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font-size: 12px; cursor: pointer; }
.notif-peek.unread { border-color: #A52019; background: #C62828; color: #fff; font-weight: 600; }
.notif-peek[hidden] { display: none; }
.notif-peek:hover { border-color: var(--accent-line); }
.notif-peek.unread:hover { border-color: #A52019; filter: brightness(1.1); }
.notif-peek .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-4); flex: none; }
.notif-peek.unread .dot { background: #fff; }
.notif-peek .tx { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.notif-peek .ago { color: var(--ink-4); flex: none; font-size: 11px; font-weight: 400; }
.notif-peek.unread .ago { color: rgba(255,255,255,.8); }
.tb-date { font-size: 12px; color: var(--ink-3); margin-left: auto; white-space: nowrap; }
.iconbtn {
  width: 30px; height: 30px; display: grid; place-items: center; border-radius: var(--r-md);
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); position: relative; flex: none;
}
.iconbtn:hover { border-color: var(--accent-line); color: var(--accent-ink); }
.iconbtn svg { width: 15px; height: 15px; }
.badge {
  position: absolute; top: -3px; right: -3px; min-width: 15px; height: 15px; padding: 0 3px;
  border-radius: 999px; background: var(--crit); border: 1.5px solid var(--surface); color: #fff;
  font-size: 10px; font-weight: 700; line-height: 12px; text-align: center;
}
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.content { padding: 18px 20px 56px; flex: 1; min-width: 0; }

/* ---------- page heading ---------- */
.ph { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; min-width: 0; }
.ph h1 { font-size: 21px; font-weight: 700; }
.ph .sub { font-size: 12.5px; color: var(--ink-3); }
.ph .sp { margin-left: auto; display: flex; gap: 7px; flex-wrap: wrap; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: var(--r-md);
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2);
  font-size: 12.5px; font-weight: 500; white-space: nowrap;
}
.btn:hover { border-color: var(--accent-line); color: var(--accent-ink); background: var(--surface-2); }
.btn svg { width: 14px; height: 14px; }
.btn.pri { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
.btn.pri:hover { background: var(--accent-ink); border-color: var(--accent-ink); color: var(--on-accent); }
.btn.dgr { color: var(--crit); border-color: var(--crit-line); }
.btn.dgr:hover { background: var(--crit-soft); color: var(--crit); border-color: var(--crit); }
.btn.on { background: var(--warn-soft); color: var(--warn); border-color: var(--warn); font-weight: 600; }
.btn.on:hover { background: var(--warn-soft); color: var(--warn); border-color: var(--warn); }
#breakBtn:not(.on) { background: var(--ok-soft); color: var(--ok); border-color: var(--ok-line); font-weight: 600; }
#breakBtn:not(.on):hover { background: var(--ok-soft); color: var(--ok); border-color: var(--ok); }
#breakBtn.over { background: var(--crit-soft); color: var(--crit); border-color: var(--crit); }
#breakBtn.over:hover { background: var(--crit-soft); color: var(--crit); border-color: var(--crit); }
.btn.sm { padding: 3px 8px; font-size: 11.5px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* ---------- cards / panels ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); min-width: 0; }
.panel-h {
  display: flex; align-items: center; gap: 6px 10px; padding: 11px 14px; border-bottom: 1px solid var(--line-soft);
  flex-wrap: wrap; min-width: 0;
}
.panel-h h2 { font-size: 13px; font-weight: 600; letter-spacing: -.005em; min-width: 0; }
.panel-h .hint { font-size: 11.5px; color: var(--ink-4); min-width: 0; overflow-wrap: anywhere; }
.panel-h .sp { margin-left: auto; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.panel-b { padding: 12px 14px; }
.panel-b.flush { padding: 0; }

/* ---------- KPI strip ---------- */
.kpis { display: grid; grid-template-columns: repeat(8, minmax(0,1fr)); gap: 9px; margin-bottom: 16px; }
@media (max-width: 1280px) { .kpis { grid-template-columns: repeat(4, minmax(0,1fr)); } }
@media (max-width: 620px)  { .kpis { grid-template-columns: repeat(2, minmax(0,1fr)); } }
.kpi {
  position: relative; text-align: left; padding: 10px 11px 11px 13px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  overflow: hidden; transition: transform .12s ease, border-color .12s ease;
}
.kpi:hover { border-color: var(--accent-line); transform: translateY(-1px); }
.kpi .k-l { font-size: 10px; text-transform: uppercase; letter-spacing: .085em; color: var(--ink-4); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi .k-v { font-family: var(--f-display); font-weight: 700; font-size: 25px; line-height: 1.05; margin-top: 3px; font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
.kpi .k-d { font-size: 10.5px; color: var(--ink-4); margin-top: 1px; }
.kpi.t-crit .k-v { color: var(--crit); }
.kpi.t-warn .k-v { color: var(--warn); }
.kpi.t-block .k-v { color: var(--block); }
.kpi.t-ok .k-v { color: var(--ok); }
.kpi.t-acc .k-v { color: var(--accent-ink); }
.kpi.t-med .k-v { color: var(--med); }

/* ---------- grid layouts ---------- */
.cc-grid { display: grid; grid-template-columns: minmax(0,1.55fr) minmax(0,1fr); gap: 14px; align-items: start; min-width: 0; }
@media (max-width: 1140px) { .cc-grid { grid-template-columns: 1fr; } }
.stack { display: grid; gap: 14px; min-width: 0; }
.cols-2 { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.cols-3 { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
@media (max-width: 900px) { .cols-2, .cols-3 { grid-template-columns: 1fr; } }

/* ---------- tables ---------- */
.tw { overflow-x: auto; min-width: 0; max-width: 100%; }
table.t { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.t th {
  text-align: left; font-size: 10px; text-transform: uppercase; letter-spacing: .085em;
  color: var(--ink-4); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line);
  white-space: nowrap; background: var(--surface-2); position: sticky; top: 0; z-index: 2;
}
table.t th.sortable { cursor: pointer; user-select: none; }
table.t th.sortable:hover { color: var(--accent-ink); }
table.t th .caret { opacity: .5; font-size: 9px; }
table.t td { padding: 8px 9px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
table.t tbody tr:hover { background: var(--surface-2); }
table.t tbody tr.sel { background: var(--accent-soft); }
table.t tbody tr:last-child td { border-bottom: 0; }
table.t td.r, table.t th.r { text-align: right; }
table.t td.c, table.t th.c { text-align: center; }
table.t tr.grp-row td {
  background: var(--surface-2); color: var(--ink-3); font-size: 10.5px; font-weight: 600;
  letter-spacing: .04em; text-transform: uppercase; padding: 6px 10px;
}
table.t tr.grp-row:hover td { background: var(--surface-2); }
.tw.scrolly { max-height: 560px; overflow-y: auto; }

.cellname { display: flex; align-items: center; gap: 7px; min-width: 0; }
.cellname .tx { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.linkish { color: var(--ink); font-weight: 500; cursor: pointer; border: 0; background: none; padding: 0; text-align: left; }
.linkish:hover { color: var(--accent-ink); text-decoration: underline; }

/* ---------- pills & badges ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 4px; padding: 1px 7px; border-radius: 20px;
  font-size: 10.5px; font-weight: 600; letter-spacing: .025em; white-space: nowrap;
  border: 1px solid transparent; text-transform: uppercase;
}
.p-CRITICAL { background: var(--crit-soft); color: var(--crit); border-color: var(--crit-line); }
.p-HIGH     { background: var(--high-soft); color: var(--high); border-color: var(--high-line); }
.p-MEDIUM   { background: var(--med-soft); color: var(--med); border-color: var(--med-line); }
.p-LOW      { background: var(--low-soft); color: var(--low); border-color: var(--line); }
.p-CRITICAL::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--crit); box-shadow: 0 0 0 2px color-mix(in srgb, var(--crit) 25%, transparent); }

/* Team Lead role pill — the app's own accent/brand color, so it reads as a
   highlighted "in-between" role rather than reusing Manager's or Employee's. */
.p-TEAMLEAD { background: var(--accent-soft); color: var(--accent-ink); border-color: var(--accent-line); font-weight: 700; }

/* Good Vibes Wall categories — reuse the same tokens as the priority pills
   above, picked for their hue association rather than their usual severity
   meaning (e.g. APPRECIATION borrows the "critical" red purely as a warm
   "heart" color here). */
.p-THOUGHT      { background: var(--med-soft); color: var(--med); border-color: var(--med-line); }
.p-MOTIVATION   { background: var(--high-soft); color: var(--high); border-color: var(--high-line); }
.p-FUNNY        { background: var(--accent-soft); color: var(--accent-ink); border-color: var(--accent-line); }
.p-APPRECIATION { background: var(--crit-soft); color: var(--crit); border-color: var(--crit-line); }
.p-WIN          { background: var(--ok-soft); color: var(--ok); border-color: var(--ok-line); }
.p-RANDOM       { background: var(--low-soft); color: var(--low); border-color: var(--line); }

.st { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 500; white-space: nowrap; }
.st::before { content: ""; width: 7px; height: 7px; border-radius: 2px; flex: none; }
.st-NOT_STARTED::before  { background: var(--ink-4); }
.st-IN_PROGRESS::before  { background: var(--accent); }
.st-WAITING::before      { background: var(--high); }
.st-BLOCKED::before      { background: var(--block); }
.st-UNDER_REVIEW::before { background: var(--med); }
.st-COMPLETED::before    { background: var(--ok); }
.st-CANCELLED::before    { background: var(--ink-4); opacity: .5; }
.st-CANCELLED { color: var(--ink-4); text-decoration: line-through; }

.tag {
  display: inline-flex; align-items: center; gap: 4px; padding: 1px 6px; border-radius: var(--r-sm);
  font-size: 10.5px; background: var(--surface-sunk); color: var(--ink-3); border: 1px solid var(--line-soft);
  white-space: nowrap;
}
.flag { display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; font-weight: 600; white-space: nowrap; }
.flag.od { color: var(--crit); }
.flag.st { color: var(--warn); }
.flag.bl { color: var(--block); }
.flag svg { width: 11px; height: 11px; }

.wl { display: inline-flex; align-items: center; gap: 6px; }
.wl-b { display: flex; gap: 2px; }
.wl-b i { width: 4px; height: 13px; border-radius: 1px; background: var(--surface-sunk); display: block; }
.wl-t { font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.wl.w-LOW        .wl-b i:nth-child(-n+1) { background: var(--med); }        .wl.w-LOW .wl-t { color: var(--med); }
.wl.w-NORMAL     .wl-b i:nth-child(-n+2) { background: var(--ok); }         .wl.w-NORMAL .wl-t { color: var(--ok); }
.wl.w-HIGH       .wl-b i:nth-child(-n+3) { background: var(--high); }       .wl.w-HIGH .wl-t { color: var(--high); }
.wl.w-OVERLOADED .wl-b i { background: var(--crit); }                       .wl.w-OVERLOADED .wl-t { color: var(--crit); }

/* ---------- progress ---------- */
.pb { display: flex; align-items: center; gap: 7px; min-width: 92px; }
.pb-t { display: block; flex: 1; height: 5px; border-radius: 3px; background: var(--surface-sunk); overflow: hidden; min-width: 44px; }
.pb-f { display: block; height: 100%; border-radius: 3px; background: var(--accent); transition: width .3s ease; }
.pb-f.done { background: var(--ok); }
.pb-f.risk { background: var(--warn); }
.pb-f.late { background: var(--crit); }
.pb-n { font-family: var(--f-mono); font-size: 10.5px; color: var(--ink-3); width: 30px; text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- "currently working on" cards ---------- */
.cwo { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 10px; }
.wcard { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); overflow: hidden; }
.wcard .wc-h { display: flex; gap: 8px; align-items: center; padding: 9px 11px; background: var(--surface-2); border-bottom: 1px solid var(--line-soft); }
.wcard .wc-h .nm { font-size: 12.5px; font-weight: 600; line-height: 1.15; }
.wcard .wc-h .ro { font-size: 10.5px; color: var(--ink-4); }
.wcard .wc-b { padding: 10px 11px; display: grid; gap: 7px; }
.wcard .tt { font-size: 12.5px; font-weight: 600; line-height: 1.3; }
.wcard .kv { display: grid; grid-template-columns: 74px 1fr; gap: 3px 8px; font-size: 11.5px; align-items: center; }
.wcard .kv dt { color: var(--ink-4); font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; }
.wcard .kv dd { margin: 0; }
.wcard.idle { border-style: dashed; }
.wcard .more { font-size: 10.5px; color: var(--ink-4); border-top: 1px dashed var(--line); padding-top: 6px; }

/* ---------- attention feed ---------- */
.att { display: grid; }
.att-i {
  display: grid; grid-template-columns: 3px 1fr; gap: 0;
  border-bottom: 1px solid var(--line-soft);
}
.att-i:last-child { border-bottom: 0; }
.att-i .bar { background: var(--warn); }
.att-i.sev-3 .bar { background: var(--crit); }
.att-i.sev-2 .bar { background: var(--warn); }
.att-i.sev-1 .bar { background: var(--med); }
.att-b { padding: 9px 12px; display: grid; gap: 5px; }
.att-b .top { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; }
.att-b .ttl { font-size: 12.5px; font-weight: 600; }
.att-b .meta { font-size: 11px; color: var(--ink-3); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.reasons { display: grid; gap: 2px; }
.reason { font-size: 11.5px; display: flex; gap: 6px; align-items: flex-start; color: var(--ink-2); }
.reason .ic { flex: none; width: 12px; text-align: center; }
.reason.r3 { color: var(--crit); } .reason.r2 { color: var(--warn); } .reason.r1 { color: var(--ink-2); }

/* ---------- kanban ---------- */
.kb { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(252px, 1fr); gap: 10px; overflow-x: auto; padding-bottom: 8px; align-items: start; }
.kcol, .tbcol { background: var(--surface-sunk); border: 1px solid var(--line-soft); border-radius: var(--r-lg); display: flex; flex-direction: column; max-height: 74vh; }
.kcol-h { padding: 9px 11px; display: flex; align-items: center; gap: 7px; border-bottom: 1px solid var(--line-soft); position: sticky; top: 0; background: var(--surface-sunk); border-radius: var(--r-lg) var(--r-lg) 0 0; z-index: 2; }
.kcol-h .nm { font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.kcol-h select { margin-left: auto; font-size: 11px; padding: 2px 6px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-transform: none; letter-spacing: 0; }
.kcol-h .n { margin-left: auto; font-family: var(--f-mono); font-size: 11px; color: var(--ink-4); }
.kcol-b { padding: 8px; display: grid; gap: 7px; overflow-y: auto; min-height: 70px; }
.kcol.over, .tbcol.over { outline: 2px dashed var(--accent); outline-offset: -3px; }
.kcard, .tbcard {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 9px 10px; display: grid; gap: 6px; cursor: grab; box-shadow: var(--shadow-sm);
}
.kcard:hover, .tbcard:hover { border-color: var(--accent-line); }
.kcard.dragging, .tbcard.dragging { opacity: .4; }

/* Draggable Settings list rows (e.g. "All tasks — optional columns") — its
   own data-colitem drag zone, distinct from .kcard/.tbcard's, so the two
   never cross-trigger each other (see events.js). */
.colitem {
  display: flex; gap: 8px; align-items: center; font-size: 12.5px; cursor: grab;
  padding: 5px 8px; border: 1px solid var(--line-soft); border-radius: var(--r-sm); background: var(--surface);
}
.colitem:hover { border-color: var(--accent-line); }
.colitem.dragging { opacity: .4; }
.colitem.over { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.colitem-grip { color: var(--ink-4); letter-spacing: -2px; font-size: 11px; cursor: grab; }
.kcard .kt, .tbcard .kt { font-size: 12.2px; font-weight: 600; line-height: 1.32; }
.kcard .krow, .tbcard .krow { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 10.5px; color: var(--ink-3); }
.kcard .kstripe, .tbcard .kstripe { height: 2px; border-radius: 2px; margin: -9px -10px 2px; }
.tbtimer {
  margin-left: auto; display: inline-flex; align-items: center; padding: 1px 7px; border-radius: var(--r-sm);
  font-size: 10.5px; font-weight: 600; white-space: nowrap;
  background: var(--crit-soft); color: var(--crit); border: 1px solid var(--crit-line);
}
.tbtimer.od { background: #8B0000; color: #fff; border-color: #6B0000; font-weight: 700; }
.tbtimer.muted { background: var(--surface-sunk); color: var(--ink-4); border-color: var(--line-soft); font-weight: 500; }
.tbtimer.ok { background: var(--ok-soft); color: var(--ok); border-color: var(--ok-line); font-weight: 600; }
.tbcard select {
  padding: 3px 8px; font-size: 10.5px; border-radius: var(--r-sm);
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2);
}
.tbcard select:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 2px var(--accent-soft); }

/* ---------- forms ---------- */
.field { display: grid; gap: 4px; align-content: start; }
.field > label, .lbl { font-size: 10.5px; text-transform: uppercase; letter-spacing: .075em; color: var(--ink-4); font-weight: 600; }
.inp, select.inp, textarea.inp {
  width: 100%; padding: 6px 9px; border-radius: var(--r-md); border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font-size: 13px;
}
select.inp { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink-4) 50%), linear-gradient(135deg, var(--ink-4) 50%, transparent 50%); background-position: calc(100% - 14px) 52%, calc(100% - 9px) 52%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 26px; }
textarea.inp { resize: vertical; min-height: 62px; line-height: 1.5; }
.inp:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.inp.err { border-color: var(--crit); }
.hlp { font-size: 11px; color: var(--ink-4); }
.hlp.err { color: var(--crit); }
.frow { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.frow.f3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.frow.f3 > .col3 { grid-column: 3; }
.frow.f3 > .span2 { grid-column: 2 / -1; }
@media (max-width: 620px) { .frow, .frow.f3 { grid-template-columns: 1fr; } .frow.f3 > .col3, .frow.f3 > .span2 { grid-column: auto; } }
.chips { display: flex; gap: 5px; flex-wrap: wrap; }
.chip {
  padding: 3px 9px; border-radius: 20px; border: 1px solid var(--line); background: var(--surface);
  font-size: 11.5px; font-weight: 500; color: var(--ink-3);
}
.chip[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-ink); font-weight: 600; }

/* ---------- filter bar ---------- */
.fbar { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--line-soft); background: var(--surface-2); border-radius: var(--r-lg) var(--r-lg) 0 0; }
.fbar select, .fbar input { padding: 4px 8px; font-size: 12px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.fbar select { appearance: auto; }
.dfilter { display: flex; gap: 4px; align-items: center; font-size: 12px; color: var(--ink-3); }
.dfilter select, .dfilter input { height: 30px; padding: 4px 8px; font-size: 12px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.dfilter select { appearance: auto; }
.dfilter select:focus, .dfilter input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.dfilter.on select, .dfilter.on input[value]:not([value=""]) { border-color: var(--accent-line); background: var(--accent-soft); color: var(--accent-ink); }
.fcount { font-size: 11.5px; color: var(--ink-4); margin-left: auto; white-space: nowrap; }

/* ---------- drawer / modal ---------- */
.scrim { position: fixed; inset: 0; background: rgba(8,16,18,.5); z-index: 90; backdrop-filter: blur(2px); }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(660px, 100%); z-index: 100;
  background: var(--bg); border-left: 1px solid var(--line); box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; animation: slidein .18s ease;
}
@keyframes slidein { from { transform: translateX(24px); opacity: .4; } to { transform: none; opacity: 1; } }
.modal {
  position: fixed; z-index: 100; top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: min(620px, calc(100% - 24px)); max-height: 88vh; background: var(--bg);
  border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; animation: pop .16s ease;
}
.modal.wide { width: min(900px, calc(100% - 24px)); }
@keyframes pop { from { transform: translate(-50%,-48%) scale(.985); opacity: 0; } to { transform: translate(-50%,-50%) scale(1); opacity: 1; } }
.dh { padding: 13px 16px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; background: var(--surface); border-radius: var(--r-lg) var(--r-lg) 0 0; }
.drawer .dh { border-radius: 0; }
.dh h2 { font-size: 15px; font-weight: 700; }
.dh .sp { margin-left: auto; display: flex; gap: 7px; align-items: center; }
.db { padding: 16px; overflow-y: auto; flex: 1; display: grid; gap: 14px; align-content: start; }
.df { padding: 11px 16px; border-top: 1px solid var(--line); display: flex; gap: 8px; align-items: center; background: var(--surface); border-radius: 0 0 var(--r-lg) var(--r-lg); }
.df .sp { margin-left: auto; display: flex; gap: 8px; }

/* ---------- tabs ---------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tab { padding: 7px 12px; border: 0; background: none; font-size: 12.5px; font-weight: 500; color: var(--ink-3); border-bottom: 2px solid transparent; white-space: nowrap; }
.tab[aria-selected="true"] { color: var(--accent-ink); border-bottom-color: var(--accent); font-weight: 600; }
.tab:hover { color: var(--ink); }

/* ---------- segmented pill tabs (day board team filter) ---------- */
.seg-tabs { display: flex; gap: 3px; flex-wrap: wrap; padding: 4px; background: var(--surface-2); border: 1px solid var(--line-soft); border-radius: var(--r-lg); margin-bottom: 12px; }
.seg-tab {
  display: flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: var(--r-md);
  border: 1px solid transparent; background: none; font-size: 12.5px; font-weight: 500;
  color: var(--ink-3); white-space: nowrap; transition: background .12s ease, color .12s ease;
}
.seg-tab:hover { color: var(--ink); background: var(--surface); }
.seg-tab .n { font-size: 10px; font-weight: 700; color: var(--ink-4); background: var(--surface-sunk); border-radius: 20px; padding: 1px 6px; line-height: 1.4; }
.seg-tab[aria-selected="true"] { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-ink); font-weight: 600; box-shadow: var(--shadow-sm); }
.seg-tab[aria-selected="true"] .n { background: var(--accent); color: var(--on-accent); }

/* ---------- timeline ---------- */
.tl { display: grid; gap: 0; }
.tl-i { display: grid; grid-template-columns: 15px 1fr; gap: 9px; padding-bottom: 12px; position: relative; }
.tl-i::before { content:""; position: absolute; left: 7px; top: 14px; bottom: 0; width: 1px; background: var(--line); }
.tl-i:last-child::before { display: none; }
.tl-d { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-4); margin: 5px 0 0 4px; z-index: 1; box-shadow: 0 0 0 3px var(--bg); }
.tl-i.k-create .tl-d { background: var(--accent); }
.tl-i.k-complete .tl-d { background: var(--ok); }
.tl-i.k-block .tl-d { background: var(--block); }
.tl-i.k-priority .tl-d { background: var(--high); }
.tl-i.k-comment .tl-d { background: var(--med); }
.tl-c .ln { font-size: 12.2px; }
.tl-c .ts { font-size: 10.5px; color: var(--ink-4); font-family: var(--f-mono); }
.tl-c .chg { font-family: var(--f-mono); font-size: 11.5px; }
.tl-c .from { color: var(--ink-4); text-decoration: line-through; }
.tl-c .to { color: var(--ink); font-weight: 600; }

/* ---------- comments ---------- */
.cmt { display: grid; grid-template-columns: 26px 1fr; gap: 9px; padding: 9px 0; border-bottom: 1px solid var(--line-soft); }
.cmt:last-child { border-bottom: 0; }
.cmt .ch { display: flex; gap: 7px; align-items: baseline; }
.cmt .cn { font-size: 12px; font-weight: 600; }
.cmt .ct { font-size: 10.5px; color: var(--ink-4); }
.cmt .cb { font-size: 12.5px; color: var(--ink-2); white-space: pre-wrap; margin-top: 2px; }
.cmt .cb .mention { color: var(--accent-ink); background: var(--accent-soft); border-radius: 3px; padding: 0 3px; font-weight: 600; }
.cmt.mgr .cb { border-left: 2px solid var(--high); padding-left: 8px; }

/* ---------- misc ---------- */
.empty { padding: 30px 16px; text-align: center; color: var(--ink-4); font-size: 12.5px; }
.empty strong { display: block; color: var(--ink-2); font-size: 13.5px; font-weight: 600; margin-bottom: 3px; font-family: var(--f-display); }
.banner {
  display: flex; gap: 9px; align-items: center; padding: 8px 13px; border-radius: var(--r-md);
  font-size: 12.5px; margin-bottom: 14px; border: 1px solid var(--high-line); background: var(--high-soft); color: var(--high);
}
.banner svg { width: 15px; height: 15px; flex: none; }
.banner.info { border-color: var(--accent-line); background: var(--accent-soft); color: var(--accent-ink); }
.metric-row { display: flex; align-items: baseline; gap: 7px; }
.metric-v { font-family: var(--f-display); font-weight: 700; font-size: 19px; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.trend { font-size: 11px; font-weight: 600; font-family: var(--f-mono); }
.trend.up { color: var(--ok); } .trend.down { color: var(--crit); } .trend.flat { color: var(--ink-4); }
.dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 12.5px; }
.dl dt { color: var(--ink-4); font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; padding-top: 2px; }
.dl dd { margin: 0; }
.bars { display: grid; gap: 6px; }
.bar-row { display: grid; grid-template-columns: 92px 1fr 44px; gap: 9px; align-items: center; font-size: 11.5px; }
.bar-t { height: 9px; border-radius: 2px; background: var(--surface-sunk); overflow: hidden; }
.bar-f { height: 100%; border-radius: 2px; }
.spark { display: block; }
.toast {
  position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 200;
  background: var(--ink); color: var(--bg); padding: 8px 15px; border-radius: 20px;
  font-size: 12.5px; font-weight: 500; box-shadow: var(--shadow-lg); animation: pop .16s ease;
}
.toast.err { background: var(--crit); color: #fff; }
.note-box { background: var(--surface-2); border: 1px solid var(--line-soft); border-radius: var(--r-md); padding: 10px 12px; font-size: 12px; color: var(--ink-2); }
.note-box h4 { font-size: 11.5px; margin-bottom: 5px; color: var(--ink); }
.note-box ul { margin: 4px 0 0; padding-left: 16px; display: grid; gap: 2px; }
details.calc > summary { cursor: pointer; font-size: 11.5px; color: var(--accent-ink); font-weight: 500; list-style: none; }
details.calc > summary::-webkit-details-marker { display: none; }
details.calc > summary::before { content: "ⓘ "; }
details.calc[open] > summary { margin-bottom: 7px; }

/* ---------- responsive rail ---------- */
@media (max-width: 860px) {
  #app { grid-template-columns: 1fr; }
  .rail { position: static; height: auto; flex-direction: row; align-items: center; gap: 8px; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 7px 10px; }
  .rail-brand { padding: 0 6px 0 0; }
  .brand-logo { width: auto; padding: 4px 8px; }
  .brand-logo img { width: 110px; }
  .nav { flex-direction: row; padding: 0; gap: 3px; }
  .nav-h { display: none; }
  .nav-i { padding: 6px 9px; white-space: nowrap; }
  .rail-foot { margin: 0 0 0 auto; padding: 0; border: 0; }
  .who .tx { display: none; }
  .content { padding: 14px 14px 48px; }
  .topbar { padding: 9px 14px; }
  .tb-date { display: none; }
  .notif-peek { max-width: 160px; }
  .notif-peek .ago { display: none; }
}

/* ============================================================
   SIGN IN — the only screen shown before a session exists.
   ============================================================ */
body.signed-out .rail,
body.signed-out .topbar { display: none; }
body.signed-out #app { grid-template-columns: 1fr; }

.login {
  max-width: 380px;
  margin: 9vh auto;
  display: grid;
  gap: 13px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 26px 24px 24px;
  box-shadow: var(--shadow-md);
}
.login-mark {
  width: 38px; height: 38px; border-radius: 9px;
  background: linear-gradient(145deg, var(--accent), var(--accent-ink));
  display: grid; place-items: center; color: var(--on-accent);
}
.login-mark svg { width: 19px; height: 19px; }
.login h1 { font-size: 20px; font-weight: 700; }
.login-sub { margin: -6px 0 4px; font-size: 12.5px; color: var(--ink-3); line-height: 1.5; }
.login .btn.pri { margin-top: 2px; }

/* day-plan rich editor */
.rte { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.rte:focus-within { border-color: var(--accent-line); }
.rte-bar { display: flex; gap: 4px; padding: 6px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.rte-body { min-height: 72px; max-height: 240px; overflow: auto; padding: 8px 10px; font-size: 13px; line-height: 1.5; outline: none; overflow-wrap: anywhere; }
.rte-body:empty::before { content: attr(data-ph); color: var(--ink-4); pointer-events: none; }
.rich h3, .rte-body h3 { font-size: 14px; margin: 4px 0; }
.rich ul, .rich ol, .rte-body ul, .rte-body ol { margin: 4px 0; padding-left: 20px; }
.rich a, .rte-body a { color: var(--accent-ink); text-decoration: underline; }

/* ---------- blog content pipeline (views-blogs.js) ---------- */
/* Summary tiles: 6 across when there's room, else 3 x 2, else 2 x 3. They size to the space they actually get (a
   container query on the wrapper), not the window, so the side menu and page padding can't throw it off, and 6
   divides by 2, 3 and 6, so no row is ever left with one orphan tile. */
.blog-kpis-wrap { container-type: inline-size; margin-bottom: 14px; }
.blog-kpis { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 9px; }
@container (min-width: 520px) { .blog-kpis { grid-template-columns: repeat(3, minmax(0,1fr)); } }
@container (min-width: 960px) { .blog-kpis { grid-template-columns: repeat(6, minmax(0,1fr)); } }
.blog-kpis .kpi { margin: 0; min-width: 0; display: flex; flex-direction: column; }
.blog-kpis .kpi:hover { transform: none; border-color: var(--line); }   /* not clickable, so no hover lift */
.blog-kpis .kpi dd { margin: 0; }
.blog-kpis .k-d { overflow-wrap: anywhere; }
.blog-kpis .k-x { font-size: 10.5px; margin-top: 2px; color: var(--accent-ink); overflow-wrap: anywhere; }
.blog-kpis .k-bar { height: 3px; margin-top: auto; border-radius: 2px; background: var(--line-soft); overflow: hidden; }
.blog-kpis .k-bar i { display: block; height: 100%; background: var(--accent); }
.blog-kpis .k-d + .k-bar { margin-top: 9px; }
.blog-layout { display: grid; grid-template-columns: minmax(0,1fr) 290px; gap: 12px; align-items: start; }
@media (max-width: 1100px) { .blog-layout { grid-template-columns: minmax(0,1fr); } }
.blog-side { display: grid; gap: 12px; }
.blog-t .blog-topic { min-width: 260px; }
.blog-t .blog-url { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 10.5px; font-weight: 400; color: var(--ink-4); margin-top: 3px; overflow-wrap: anywhere; }
.btype { display: inline-block; padding: 2px 7px; border-radius: 4px; font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.btype.new { color: #1f9e83; background: rgba(47,191,155,.14); }
.btype.revised { color: #b87d17; background: rgba(224,164,58,.16); }
.bsrc { display: inline-block; padding: 2px 7px; border-radius: 4px; font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.bsrc.live { color: #1f9e83; background: rgba(47,191,155,.14); }
.bsrc.sheet { color: var(--ink-4); background: var(--surface-sunk); }
.btype.none { color: var(--ink-4); background: var(--surface-sunk); }
.blog-t .blog-live { font-size: 11px; font-weight: 400; color: var(--ink-3); margin-top: 3px; }
.bst { --c: #7b8190; }
.bst-in_progress { --c: #e8833a; }
.bst-pending_ca_review { --c: #d9a521; }
.bst-published { --c: #2fb598; }
.bst .dot, .bchk .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--c, currentColor); flex: none; }
.blog-side .bst .bst-row { display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.blog-side .bst .n { margin-left: auto; font-variant-numeric: tabular-nums; }
.blog-side .bst .bar { height: 3px; background: var(--line-soft); border-radius: 2px; margin: 5px 0 11px; overflow: hidden; }
.blog-side .bst .bar i { display: block; height: 100%; background: var(--c); }
.bchk { display: flex; align-items: baseline; gap: 8px; padding: 5px 0; font-size: 12.5px; }
.bchk .nm { flex: 1; min-width: 0; }
.bchk .n { font-variant-numeric: tabular-nums; }
.bchk.good .dot { background: var(--ok); }
.bchk.bad .dot { background: var(--warn); }
.bchk.bad .n { font-weight: 700; }
