/* FL Equity Research — design system v2 (2026)
   Modern, theme-aware (light/dark), Inter typography, micro-interactions.
   Brand anchor: FL burgundy #6b013c + gold family. */

@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url('assets/inter-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url('assets/inter-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap; src: url('assets/inter-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 800; font-display: swap; src: url('assets/inter-latin-800-normal.woff2') format('woff2'); }

:root {
  --fl: #6b013c;
  --fl-dark: #5b013a;
  --fl-soft: #f6eef3;
  --ink: #221a20;
  --muted: #6f6470;
  --rule: #e9e2e7;
  --bg: #faf7f9;
  --bg-grad: radial-gradient(1200px 600px at 80% -10%, #f3e4ec 0%, transparent 60%),
             radial-gradient(900px 500px at -10% 0%, #f7efe2 0%, transparent 55%);
  --card: #ffffff;
  --card-2: #fdfbfc;
  --green: #1B7A2B;
  --red: #CC0000;
  --gold: #F2E4B7;
  --shadow-1: 0 1px 2px rgba(34, 16, 28, 0.05), 0 4px 14px rgba(34, 16, 28, 0.06);
  --shadow-2: 0 4px 10px rgba(34, 16, 28, 0.09), 0 16px 38px rgba(34, 16, 28, 0.12);
  --glass: rgba(255, 255, 255, 0.78);
  --hero-grad: linear-gradient(135deg, #6b013c 0%, #8a1450 55%, #5b013a 100%);
  --hero-ink: #ffffff;
  --hero-muted: #e7c9d8;
  --radius: 14px;
}
[data-theme="dark"] {
  --fl: #d4729e;
  --fl-dark: #e08cb0;
  --fl-soft: #2a1622;
  --ink: #ece4e9;
  --muted: #a4929d;
  --rule: #382b33;
  --bg: #161013;
  --bg-grad: radial-gradient(1200px 600px at 80% -10%, #2a1420 0%, transparent 60%),
             radial-gradient(900px 500px at -10% 0%, #251c10 0%, transparent 55%);
  --card: #201820;
  --card-2: #251c24;
  --green: #5fd072;
  --red: #ff7373;
  --gold: #c9b478;
  --shadow-1: 0 1px 2px rgba(0,0,0,0.4), 0 4px 14px rgba(0,0,0,0.35);
  --shadow-2: 0 4px 10px rgba(0,0,0,0.5), 0 18px 44px rgba(0,0,0,0.55);
  --glass: rgba(22, 16, 19, 0.75);
  --hero-grad: linear-gradient(135deg, #3d0a26 0%, #58113a 55%, #320a22 100%);
  --hero-ink: #fff;
  --hero-muted: #cf9fb6;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  background-image: var(--bg-grad);
  background-attachment: fixed;
  line-height: 1.6;
  font-size: 15px;
  transition: background-color 0.25s ease, color 0.25s ease;
}

/* ---------- landing page ---------- */
.landing-body { display: flex; min-height: 100vh; align-items: center; justify-content: center; }
.landing { text-align: center; padding: 2rem; }
.landing-logo {
  width: min(64vw, 440px);
  height: auto;
  display: block;
  margin: 0 auto;
  animation: landing-in 1s cubic-bezier(0.2, 0.7, 0.3, 1) both;
}
[data-theme="dark"] .landing-logo { filter: brightness(0) invert(0.92) sepia(0.2) saturate(3) hue-rotate(280deg); }
.landing-nav {
  margin-top: 2.6rem;
  display: flex;
  gap: 1.1rem;
  justify-content: center;
  align-items: center;
  color: var(--muted);
  animation: landing-in 1s 0.35s cubic-bezier(0.2, 0.7, 0.3, 1) both;
}
.landing-nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  padding: 0.45rem 0.2rem;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.landing-nav a:hover { color: var(--fl); border-bottom-color: var(--fl); }
@keyframes landing-in {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}
@media (max-width: 540px) {
  .landing-nav { flex-direction: column; gap: 1.1rem; margin-top: 2.2rem; }
  .landing-nav span { display: none; }
  .landing-nav a { font-size: 0.88rem; }
  .landing-logo { width: min(78vw, 340px); }
}
@media (prefers-reduced-motion: reduce) {
  .landing-logo, .landing-nav { animation: none; }
}

/* ---------- reveal animations ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.55s ease, transform 0.55s ease; }
.reveal.in-view { opacity: 1; transform: none; }

/* ---------- progress bar ---------- */
#read-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0;
  background: linear-gradient(90deg, var(--fl), var(--gold));
  z-index: 200;
}

/* ---------- topbar ---------- */
.topbar {
  background: var(--glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--rule);
  padding: 0.65rem 1.4rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 50;
}
.brand img { height: 32px; display: block; }
[data-theme="dark"] .brand img { filter: brightness(0) invert(0.92) sepia(0.2) saturate(3) hue-rotate(280deg); }
.topbar-sub {
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.32em;
  padding-left: 1rem;
  border-left: 1px solid var(--rule);
}
.topnav { margin-left: auto; display: flex; gap: 0.4rem; align-items: center; }
.topnav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 600;
  padding: 0.38rem 0.8rem;
  border-radius: 9px;
  transition: background 0.15s ease, color 0.15s ease;
}
.topnav a:hover { background: var(--fl-soft); color: var(--fl); }
.icon-btn {
  border: 1px solid var(--rule);
  background: var(--card);
  color: var(--ink);
  border-radius: 9px;
  font: inherit;
  font-size: 0.82rem;
  padding: 0.34rem 0.7rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.icon-btn:hover { border-color: var(--fl); box-shadow: var(--shadow-1); }
.kbd {
  font-size: 0.66rem;
  border: 1px solid var(--rule);
  border-radius: 5px;
  padding: 0 0.32rem;
  color: var(--muted);
  background: var(--card-2);
}

/* ---------- layout shells ---------- */
.page, .home { max-width: 1100px; margin: 0 auto; padding: 2.2rem 1.5rem 4.5rem; }
.crumbs { font-size: 0.82rem; color: var(--muted); margin-bottom: 1.4rem; }
.crumbs a { color: var(--fl); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }

/* ---------- hero header ---------- */
.kicker { letter-spacing: 0.3em; font-size: 0.7rem; font-weight: 600; opacity: 0.85; }
.report-head {
  background: var(--hero-grad);
  color: var(--hero-ink);
  border-radius: var(--radius);
  padding: 1.6rem 1.9rem 1.5rem;
  margin-bottom: 1.6rem;
  box-shadow: var(--shadow-2);
  position: relative;
  overflow: hidden;
}
.report-head::after {
  content: "";
  position: absolute;
  right: -60px; top: -80px;
  width: 280px; height: 280px;
  background: radial-gradient(closest-side, rgba(242, 228, 183, 0.25), transparent);
  border-radius: 50%;
}
.report-head .kicker { color: var(--hero-muted); }
.company-name { font-size: clamp(1.6rem, 3.4vw, 2.3rem); margin: 0.2rem 0 0.25rem; font-weight: 800; letter-spacing: -0.02em; color: var(--hero-ink); }
.company-meta { font-size: 0.86rem; color: var(--hero-muted); letter-spacing: 0.04em; }
.company-meta b { color: #ffd9ea; }

/* ---------- dashboard ---------- */
.home-h2 {
  color: var(--fl);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 2.4rem 0 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}
.home-h2::after { content: ""; flex: 1; height: 1px; background: var(--rule); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.2rem; }
.card {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1.3rem 1.4rem 1.1rem;
  text-decoration: none;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-1);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  position: relative;
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--fl), var(--gold));
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); border-color: var(--fl); }
.card-ticker { font-weight: 800; font-size: 0.78rem; letter-spacing: 0.12em; color: var(--fl); }
.card-name { font-size: 1.22rem; font-weight: 700; margin: 0.1rem 0; letter-spacing: -0.01em; }
.card-meta { font-size: 0.76rem; color: var(--muted); margin-bottom: 0.55rem; }
.card-blurb { font-size: 0.9rem; color: var(--muted); flex: 1; margin: 0 0 0.9rem; }
.card-cta { font-size: 0.82rem; font-weight: 700; color: var(--fl); }

.badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.16rem 0.6rem;
  border-radius: 99px;
  white-space: nowrap;
}
.badge-done { background: rgba(27, 122, 43, 0.12); color: var(--green); }
.badge-update { background: rgba(204, 0, 0, 0.1); color: var(--red); }
.badge-none { background: var(--fl-soft); color: var(--muted); }

/* ---------- tables ---------- */
table { border-collapse: separate; border-spacing: 0; width: 100%; margin: 1rem 0; font-size: 0.86rem; background: var(--card); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow-1); }
th { background: var(--fl); color: #fff; text-align: left; padding: 0.55rem 0.75rem; font-weight: 700; font-size: 0.78rem; letter-spacing: 0.03em; }
[data-theme="dark"] th { background: #4a1131; color: #f0dce6; }
td { padding: 0.5rem 0.75rem; border-bottom: 1px solid var(--rule); }
tbody tr:last-child td { border-bottom: none; }
tbody tr { transition: background 0.12s ease; }
tbody tr:hover { background: var(--fl-soft); }
td.num { text-align: right; font-variant-numeric: tabular-nums; }
td.tl { text-align: left; }   /* wins over auto-detected .num (declared later) */
.tracker td a, .docs td a { color: var(--fl); font-weight: 600; }
.count { color: var(--muted); font-weight: 500; font-size: 0.85em; }
.dl { font-weight: 700; color: var(--fl); text-decoration: none; }
.dl:hover { text-decoration: underline; }
.note { font-size: 0.8rem; color: var(--muted); font-style: italic; }

/* ---------- report layout ---------- */
.layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); max-width: 1260px; margin: 0 auto; gap: 2rem; padding: 2rem 1.5rem 4rem; }
.toc {
  position: sticky;
  top: 4.4rem;
  align-self: start;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  font-size: 0.87rem;
  max-height: calc(100vh - 6rem);
  overflow-y: auto;
  box-shadow: var(--shadow-1);
}
.toc-title { font-size: 0.68rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.6rem; font-weight: 700; }
.toc ul { list-style: none; margin: 0; padding: 0; }
.toc li { margin: 0.18rem 0; }
.toc a { color: var(--ink); text-decoration: none; display: flex; gap: 0.5rem; padding: 0.22rem 0.5rem; border-radius: 8px; transition: background 0.12s ease, color 0.12s ease; }
.toc a:hover { background: var(--fl-soft); color: var(--fl); }
.toc a.active { background: var(--fl); color: #fff; }
.toc a.active .toc-num { color: var(--gold); }
.toc-num { color: var(--fl); font-weight: 800; min-width: 1rem; }
.toc-downloads { margin-top: 1.1rem; padding-top: 1rem; border-top: 1px solid var(--rule); display: grid; gap: 0.5rem; }
.btn {
  display: block;
  text-align: center;
  background: var(--fl);
  color: #fff;
  text-decoration: none;
  padding: 0.55rem 0.7rem;
  border-radius: 9px;
  font-size: 0.8rem;
  font-weight: 700;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}
.btn:hover { background: var(--fl-dark); transform: translateY(-1px); box-shadow: var(--shadow-1); }
[data-theme="dark"] .btn { color: #1d1016; }
.btn-outline { background: transparent; color: var(--fl); border: 1.5px solid var(--fl); }
.btn-outline:hover { background: var(--fl-soft); }
[data-theme="dark"] .btn-outline { background: transparent; color: var(--fl); }
[data-theme="dark"] .btn-outline:hover { background: var(--fl-soft); color: var(--fl); }
.docs-table { table-layout: fixed; }
.docs-table td { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.report { min-width: 0; }
.report-section {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1.8rem 2.2rem;
  margin-bottom: 1.5rem;
  overflow-x: auto;
  box-shadow: var(--shadow-1);
}
.report-section p { text-align: justify; }
.report-section h1 { font-size: 1.4rem; color: var(--fl); border-bottom: 2px solid var(--fl); padding-bottom: 0.45rem; margin-top: 0; letter-spacing: -0.01em; }
.report-section h2 { font-size: 1.14rem; color: var(--fl); margin-top: 1.8rem; }
.report-section h3 { font-size: 1rem; color: var(--fl-dark); margin-top: 1.4rem; }
.report-section hr { border: none; border-top: 1px solid var(--rule); margin: 1.6rem 0; }
.report-section em { color: var(--muted); }
.report-section table { box-shadow: none; border: 1px solid var(--rule); }
.figures { display: grid; gap: 1.2rem; margin-top: 1.5rem; }
.figures figure { margin: 0; text-align: center; }
.figures img { max-width: 100%; height: auto; border: 1px solid var(--rule); border-radius: 10px; background: #fff; }
.report-foot { font-size: 0.78rem; color: var(--muted); border-top: 1px solid var(--rule); padding-top: 1rem; font-style: italic; }

/* ---------- click-to-source ---------- */
#prov-overlay[hidden], #prov-canvas[hidden], #prov-status[hidden],
#prov-chips[hidden] { display: none !important; }
a.prov, .prov-sample { color: inherit; text-decoration: none; border-bottom: 2px dotted var(--fl); cursor: pointer; transition: background 0.12s ease; }
a.prov:hover { background: rgba(242, 228, 183, 0.5); }
a.prov-xl, .prov-xl-sample { border-bottom: 2px dashed var(--green); }
a.prov-xl:hover { background: rgba(27, 122, 43, 0.1); }
a.prov-para {
  display: inline-block;
  color: var(--fl);
  background: var(--fl-soft);
  border: 1px solid var(--rule);
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.1;
  padding: 0.05rem 0.35rem;
  margin-left: 0.25rem;
  text-decoration: none;
  vertical-align: super;
  transition: all 0.12s ease;
}
a.prov-para:hover { background: var(--fl); color: #fff; }
a.prov-head {
  display: inline-block;
  color: var(--muted);
  background: var(--card-2);
  border: 1px solid var(--rule);
  border-radius: 99px;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1.1;
  padding: 0.16rem 0.6rem;
  margin-left: 0.55rem;
  text-decoration: none;
  vertical-align: middle;
  transition: all 0.12s ease;
}
a.prov-head:hover { background: var(--fl); border-color: var(--fl); color: #fff; }

#prov-overlay { position: fixed; inset: 0; background: rgba(20, 8, 15, 0.62); backdrop-filter: blur(3px); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 2vh 2vw; }
#prov-modal { background: var(--card); border-radius: var(--radius); border-top: 4px solid var(--fl); width: min(860px, 96vw); max-height: 94vh; display: flex; flex-direction: column; box-shadow: var(--shadow-2); animation: modal-in 0.22s ease; }
@keyframes modal-in { from { opacity: 0; transform: translateY(14px) scale(0.985); } to { opacity: 1; transform: none; } }
.prov-head { display: flex; justify-content: space-between; align-items: flex-start; padding: 0.9rem 1.2rem 0.6rem; }
.prov-kicker { color: var(--muted); letter-spacing: 0.25em; font-size: 0.62rem; font-weight: 700; }
.prov-title { color: var(--fl); font-weight: 800; font-size: 1.1rem; margin-top: 0.15rem; }
#prov-close { background: none; border: none; font-size: 1.7rem; line-height: 1; color: var(--muted); cursor: pointer; padding: 0 0.2rem; }
#prov-close:hover { color: var(--fl); }
.prov-chips { padding: 0 1.2rem 0.4rem; display: flex; gap: 0.4rem; flex-wrap: wrap; }
.prov-chip { border: 1px solid var(--fl); background: transparent; color: var(--fl); border-radius: 99px; font-size: 0.75rem; font-weight: 700; padding: 0.18rem 0.75rem; cursor: pointer; transition: all 0.12s ease; }
.prov-chip.active, .prov-chip:hover { background: var(--fl); color: #fff; }
.prov-meta { display: flex; flex-wrap: wrap; gap: 0.3rem 1.4rem; padding: 0.3rem 1.2rem 0.7rem; font-size: 0.8rem; border-bottom: 1px solid var(--rule); }
.prov-meta b { color: var(--muted); font-weight: 600; margin-right: 0.3rem; }
.prov-viewer { overflow: auto; flex: 1; background: var(--bg); min-height: 240px; }
#prov-status { padding: 2.5rem; text-align: center; color: var(--muted); }
#prov-canvas-wrap { position: relative; margin: 0 auto; width: fit-content; }
#prov-canvas { display: block; }
.prov-hl { position: absolute; background: rgba(255, 224, 92, 0.45); border: 3px solid #6b013c; border-radius: 3px; box-shadow: 0 0 0 4px rgba(255, 224, 92, 0.35), 0 2px 10px rgba(107,1,60,0.35); pointer-events: none; animation: prov-pulse 1.1s ease-in-out 2; }
@keyframes prov-pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(255, 224, 92, 0.35), 0 2px 10px rgba(107,1,60,0.35); }
  50% { box-shadow: 0 0 0 12px rgba(255, 224, 92, 0.65), 0 2px 18px rgba(107,1,60,0.5); }
}
.prov-foot { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 0.6rem 1.2rem; border-top: 1px solid var(--rule); font-size: 0.78rem; color: var(--muted); }
.prov-foot a { color: var(--fl); font-weight: 700; text-decoration: none; }
.prov-foot a:hover { text-decoration: underline; }
.prov-xl-meta { white-space: pre-wrap; }
#prov-xlbox { display: none; padding: 2.2rem 1.5rem; text-align: center; }
#prov-xlbox .xl-formula { display: inline-block; font-family: ui-monospace, Menlo, monospace; font-size: 0.85rem; background: var(--card-2); border: 1px solid var(--rule); border-radius: 8px; padding: 0.5rem 0.9rem; margin: 0 0 1.1rem; max-width: 100%; overflow-x: auto; }
#prov-xlbox .btn { display: inline-block; padding: 0.65rem 1.3rem; }

/* ---------- excel viewer ---------- */
.xl-page { max-width: none; }
.xl-tabs { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-bottom: 0.8rem; }
.xl-tab { border: 1px solid var(--rule); background: var(--card); color: var(--fl); font-weight: 700; font-size: 0.85rem; border-radius: 9px; padding: 0.42rem 1rem; cursor: pointer; transition: all 0.12s ease; }
.xl-tab.active { background: var(--fl); color: #fff; border-color: var(--fl); }
/* The workbook is rendered as "paper": always light, in both themes, because
   its cell colours (FL blue/green data-source code, dark text) are designed
   for a white sheet — exactly like PDF filing pages stay white. */
.xl-pane { display: none; overflow: auto; max-height: 78vh; border: 1px solid var(--rule); border-radius: 12px; background: #ffffff; box-shadow: var(--shadow-1); }
.xl-pane.active { display: block; }
.xl-table { border-collapse: collapse; margin: 0; font-size: 0.78rem; table-layout: fixed; width: max-content; border-radius: 0; box-shadow: none; background: #ffffff; }
.xl-table td, .xl-table th { border: 1px solid #e8e8e8; padding: 0.15rem 0.4rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #333333; }
.xl-table th { background: #f3f0f0; color: #666666; font-weight: 600; text-align: center; position: sticky; top: 0; z-index: 2; padding: 0.15rem 0.3rem; }
.xl-table .xl-rh { position: sticky; left: 0; background: #f3f0f0; color: #666666; text-align: center; z-index: 1; width: 44px; }
.xl-table tbody tr:hover { background: #faf6f9; }
.xl-rh-col { width: 44px; }
td.xl-target { outline: 3px solid #6b013c; outline-offset: -1px; box-shadow: 0 0 0 5px rgba(255, 224, 92, 0.55); animation: prov-pulse 1.1s ease-in-out 2; scroll-margin: 120px; }

/* ---------- documents ---------- */
.docs h2 { color: var(--fl); font-size: 1.05rem; font-weight: 800; letter-spacing: 0.04em; border-bottom: 2px solid var(--fl); padding-bottom: 0.3rem; margin-top: 2rem; }

/* ---------- portfolio ---------- */
.pf-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.1rem; margin: 1.4rem 0; }
.pf-card { background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); padding: 1.05rem 1.25rem; box-shadow: var(--shadow-1); position: relative; overflow: hidden; }
.pf-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, var(--fl), var(--gold)); }
.pf-card-label { color: var(--muted); font-size: 0.68rem; letter-spacing: 0.2em; text-transform: uppercase; font-weight: 700; }
.pf-card-val { font-size: 1.75rem; font-weight: 800; color: var(--fl); margin-top: 0.15rem; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.pf-card-sub { color: var(--muted); font-size: 0.9rem; font-variant-numeric: tabular-nums; }
.pf-charts { display: grid; grid-template-columns: 1fr 1.3fr; gap: 1.2rem; align-items: stretch; margin: 1.2rem 0 0.6rem; }
.pf-chart-card { background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: var(--shadow-1); padding: 1rem 1.1rem; display: flex; flex-direction: column; }
.pf-chart-head { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 0.4rem; }
.pf-chart-title { font-weight: 800; color: var(--fl); font-size: 0.95rem; flex: 1; }
.pf-chart-back { color: var(--fl); font-weight: 700; font-size: 0.8rem; text-decoration: none; }
.pf-chart-back[hidden] { display: none !important; }
.pf-chart-body { position: relative; height: 330px; flex: 1; }
td .pos, .pos { color: var(--green); font-weight: 700; }
td .neg, .neg { color: var(--red); font-weight: 700; }
.pf-flag { display: inline-block; font-size: 0.62rem; font-weight: 700; color: var(--muted); background: var(--card-2); border: 1px solid var(--rule); border-radius: 5px; padding: 0 0.3rem; vertical-align: middle; }
.pf-stale { color: var(--red); }
.pf-warn { background: rgba(204, 0, 0, 0.08); border: 1px solid var(--red); border-radius: 10px; color: var(--red); font-size: 0.85rem; padding: 0.7rem 1rem; margin: 1rem 0; }

/* ---------- workspace ---------- */
.ws-status { font-weight: 600; }
.ws-status.ok { color: #b8f0c0; }
.ws-status.warn { color: #ffd9a0; }
.ws-capture { display: flex; gap: 0.7rem; margin: 1.3rem 0 0.4rem; }
.ws-capture input {
  flex: 1; font: inherit; color: var(--ink);
  background: var(--card); border: 1px solid var(--rule); border-radius: 11px;
  padding: 0.75rem 1rem; outline: none; box-shadow: var(--shadow-1);
  transition: border-color 0.15s ease;
}
.ws-capture input:focus { border-color: var(--fl); }
.ws-capture .btn-outline { padding: 0.7rem 1.1rem; }
.ws-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 0 2.2rem; align-items: start; }
.ws-empty { color: var(--muted); font-size: 0.88rem; padding: 0.6rem 0.2rem; font-style: italic; }

.ws-task {
  display: flex; align-items: center; gap: 0.7rem;
  background: var(--card); border: 1px solid var(--rule); border-radius: 11px;
  padding: 0.55rem 0.8rem; margin-bottom: 0.45rem; box-shadow: var(--shadow-1);
}
.ws-task.done .ws-task-text { text-decoration: line-through; color: var(--muted); }
.ws-task-text { flex: 1; }
.ws-task-state { font-size: 0.66rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.ws-task.doing .ws-task-state { color: var(--fl); }
.ws-check {
  width: 21px; height: 21px; border-radius: 50%; cursor: pointer;
  border: 2px solid var(--rule); background: transparent; flex: none;
  transition: all 0.12s ease;
}
.ws-check.doing { border-color: var(--fl); background: var(--fl-soft); }
.ws-check.done { border-color: var(--green); background: var(--green); }
.ws-del {
  background: none; border: none; color: var(--muted); font-size: 1.15rem;
  line-height: 1; cursor: pointer; padding: 0 0.2rem; border-radius: 6px; flex: none;
}
.ws-del:hover { color: var(--red); }

.ws-notes { display: grid; gap: 0.8rem; }
.ws-note {
  background: var(--card); border: 1px solid var(--rule); border-radius: 12px;
  padding: 0.7rem 0.9rem; box-shadow: var(--shadow-1);
}
.ws-note.pinned { border-color: var(--fl); }
.ws-note-bar { display: flex; align-items: center; gap: 0.4rem; }
.ws-note-title {
  flex: 1; font: inherit; font-weight: 700; color: var(--fl);
  background: transparent; border: none; outline: none; padding: 0.1rem 0;
}
.ws-pin { background: none; border: none; color: var(--fl); cursor: pointer; font-size: 1rem; }
.ws-note-text {
  width: 100%; font: inherit; font-size: 0.9rem; color: var(--ink);
  background: transparent; border: none; outline: none; resize: none;
  margin-top: 0.3rem; min-height: 44px; line-height: 1.55;
}

.ws-links { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.ws-link {
  display: inline-flex; align-items: center; gap: 0.55rem;
  background: var(--card); border: 1px solid var(--rule); border-radius: 99px;
  padding: 0.4rem 0.85rem 0.4rem 0.45rem; text-decoration: none; color: var(--ink);
  font-size: 0.86rem; font-weight: 600; box-shadow: var(--shadow-1);
  transition: border-color 0.12s ease, transform 0.12s ease;
}
.ws-link:hover { border-color: var(--fl); transform: translateY(-1px); }
.ws-link-mono {
  width: 26px; height: 26px; border-radius: 50%; background: var(--fl);
  color: #fff; display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 0.8rem;
}
.ws-link-add { border-style: dashed; color: var(--muted); cursor: pointer; padding: 0.4rem 0.9rem; font: inherit; font-size: 0.86rem; font-weight: 600; background: transparent; }
.ws-link-add:hover { color: var(--fl); }

.ws-cal-card {
  background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius);
  box-shadow: var(--shadow-1); padding: 0.9rem 1rem;
}
.ws-cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.6rem; }
.ws-cal-head span { font-weight: 800; color: var(--fl); }
.ws-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.ws-cal-dow { text-align: center; font-size: 0.62rem; font-weight: 800; letter-spacing: 0.06em; color: var(--muted); padding: 0.2rem 0; text-transform: uppercase; }
.ws-cal-day {
  position: relative; aspect-ratio: 1; border: none; border-radius: 9px;
  background: transparent; color: var(--ink); font: inherit; font-size: 0.82rem;
  cursor: pointer; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 1px; transition: background 0.1s ease;
}
.ws-cal-day:hover { background: var(--fl-soft); }
.ws-cal-day.today { outline: 2px solid var(--fl); outline-offset: -2px; font-weight: 800; }
.ws-cal-day.selected { background: var(--fl); color: #fff; }
.ws-cal-dots { font-size: 0.45rem; color: var(--gold); letter-spacing: 1px; line-height: 1; }
.ws-earn-dot { color: var(--fl); }
.ws-cal-day.selected .ws-earn-dot { color: var(--gold); }
.ws-event.ws-earnings { background: color-mix(in srgb, var(--gold) 30%, transparent); }
.ws-earnings-up { border-left: 3px solid var(--gold); }
.ws-cal-day.selected .ws-cal-dots { color: #fff; }
#ws-day { border-top: 1px solid var(--rule); margin-top: 0.8rem; padding-top: 0.7rem; }
#ws-day h3 { margin: 0 0 0.5rem; font-size: 0.92rem; color: var(--fl); }
.ws-event { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; padding: 0.35rem 0.5rem; border-radius: 8px; background: var(--fl-soft); margin-bottom: 0.35rem; font-size: 0.88rem; }
#ws-event-form input {
  width: 100%; font: inherit; font-size: 0.88rem; color: var(--ink);
  background: transparent; border: 1px dashed var(--rule); border-radius: 9px;
  padding: 0.45rem 0.7rem; outline: none; margin-top: 0.3rem;
}
#ws-event-form input:focus { border-color: var(--fl); border-style: solid; }
.ws-up { display: flex; gap: 0.8rem; align-items: baseline; background: var(--card); border: 1px solid var(--rule); border-radius: 10px; padding: 0.45rem 0.8rem; margin-bottom: 0.4rem; font-size: 0.9rem; box-shadow: var(--shadow-1); cursor: pointer; transition: border-color 0.12s ease; }
.ws-up:hover { border-color: var(--fl); }
.ws-up-date { font-weight: 800; color: var(--fl); font-size: 0.78rem; min-width: 52px; }
.ws-event { cursor: pointer; }
.ws-ev-time { color: var(--fl); font-weight: 800; }
.ws-ev-bell { font-size: 0.75rem; }
.ws-ev-note { color: var(--muted); }

#ws-ev-modal {
  position: fixed; inset: 0; background: rgba(20, 8, 15, 0.55);
  backdrop-filter: blur(3px); z-index: 250;
  display: flex; align-items: center; justify-content: center; padding: 4vh 4vw;
}
.ws-ev-box {
  background: var(--card); border-radius: var(--radius); border-top: 4px solid var(--fl);
  width: min(440px, 94vw); box-shadow: var(--shadow-2); padding: 1.2rem 1.4rem;
  animation: modal-in 0.18s ease;
}
.ws-ev-box h3 { margin: 0 0 0.8rem; color: var(--fl); }
.ws-ev-box label { display: block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.7rem; }
.ws-ev-box input, .ws-ev-box select, .ws-ev-box textarea {
  display: block; width: 100%; margin-top: 0.25rem; font: inherit; font-size: 0.95rem;
  color: var(--ink); background: var(--card-2); border: 1px solid var(--rule);
  border-radius: 9px; padding: 0.5rem 0.7rem; outline: none; box-sizing: border-box;
}
.ws-ev-box input:focus, .ws-ev-box select:focus, .ws-ev-box textarea:focus { border-color: var(--fl); }
.ws-ev-row { display: grid; grid-template-columns: 1.4fr 1fr; gap: 0.8rem; }
.ws-ev-actions { display: flex; gap: 0.6rem; align-items: center; margin-top: 0.4rem; }
.ws-ev-actions .btn { padding: 0.5rem 1.2rem; }
.ws-ev-delete { background: none; border: none; color: var(--red); font: inherit; font-size: 0.85rem; font-weight: 700; cursor: pointer; }

.ws-subscribe { margin-top: 0.9rem; border-top: 1px solid var(--rule); padding-top: 0.7rem; font-size: 0.84rem; }
.ws-subscribe summary { cursor: pointer; font-weight: 700; color: var(--fl); }
.ws-subscribe p { color: var(--muted); margin: 0.6rem 0; }
.ws-feed-row { display: flex; gap: 0.5rem; }
.ws-feed-row input { flex: 1; font: inherit; font-size: 0.74rem; color: var(--ink); background: var(--card-2); border: 1px solid var(--rule); border-radius: 8px; padding: 0.45rem 0.6rem; }
.ws-feed-row .btn { padding: 0.45rem 0.9rem; }
@media (max-width: 900px) { .ws-grid { grid-template-columns: 1fr; } }

/* ---------- projects: entry, mural, whiteboard ---------- */
body.ws-locked { overflow: hidden; }
.ws-mural-entry {
  display: flex; align-items: center; gap: 0.9rem; width: 100%;
  margin: 1rem 0 0.2rem; padding: 1.05rem 1.4rem;
  background: var(--card); color: var(--ink);
  border: 1px solid var(--rule); border-radius: var(--radius);
  box-shadow: var(--shadow-1); cursor: pointer; font: inherit;
  position: relative; overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.ws-mural-entry::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: linear-gradient(90deg, var(--fl), var(--gold));
}
.ws-mural-entry:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); border-color: var(--fl); }
.ws-mural-entry-label { font-size: 1.05rem; font-weight: 800; color: var(--fl); }
.ws-mural-entry-dots { display: inline-flex; gap: 0.25rem; }
.ws-project-dot { width: 12px; height: 12px; border-radius: 50%; }
.ws-mural-entry-count { color: var(--muted); font-size: 0.84rem; flex: 1; text-align: left; }
.ws-mural-entry-arrow { color: var(--fl); font-weight: 800; font-size: 1.15rem; }

.ws-overlay {
  position: fixed; inset: 0; z-index: 90;
  background: var(--bg); background-image: var(--bg-grad);
  display: flex; flex-direction: column;
  padding: 0.9rem 1.4rem 1.2rem;
  animation: modal-in 0.2s ease;
}
.ws-overlay[hidden] { display: none !important; }
.ws-mural-title { font-size: 1.3rem; font-weight: 800; color: var(--fl); letter-spacing: -0.01em; }

#ws-arrows {
  position: absolute; inset: 0; width: 100%; height: 100%;
  overflow: visible;
  pointer-events: none;   /* empty areas must pass clicks to the canvas */
}
#ws-arrows .ws-arrow { stroke-width: 2.5; pointer-events: none; }
#ws-arrows .ws-arrow-hit {
  stroke: transparent; stroke-width: 16; cursor: pointer;
  pointer-events: stroke;
}
#ws-arrows .ws-arrow-hit:hover + * { opacity: 0.6; }
.ws-card.connecting { outline: 3px dashed var(--pc); outline-offset: 3px; }
.ws-card.selected { outline: 3px solid var(--pc); outline-offset: 2px; box-shadow: var(--shadow-2); }
#ws-snap.active { border-color: var(--fl); color: var(--fl); font-weight: 700; }
#ws-board-addframe { padding: 0.4rem 0.9rem; }

.ws-frame {
  position: absolute;
  background: color-mix(in srgb, var(--pc) 6%, transparent);
  border: 2px dashed color-mix(in srgb, var(--pc) 45%, transparent);
  border-radius: 14px;
  z-index: 0;
}
.ws-frame-bar {
  display: flex; align-items: center; gap: 0.4rem; justify-content: space-between;
  padding: 0.3rem 0.6rem; cursor: grab; touch-action: none;
}
.ws-frame-bar:active { cursor: grabbing; }
.ws-frame-title {
  flex: 0 1 230px; font: inherit; font-size: 0.82rem; font-weight: 800;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--pc); background: transparent; border: none; outline: none;
}
.ws-frame-resize {
  position: absolute; right: 2px; bottom: 2px; width: 18px; height: 18px;
  cursor: nwse-resize; border-right: 3px solid color-mix(in srgb, var(--pc) 55%, transparent);
  border-bottom: 3px solid color-mix(in srgb, var(--pc) 55%, transparent);
  border-radius: 0 0 10px 0;
}
.ws-card-color {
  width: 17px; height: 17px; border-radius: 50%; border: 2px solid #fff;
  background: var(--pc); box-shadow: 0 0 0 1px var(--pc); cursor: pointer; padding: 0;
}
.ws-card-link {
  background: none; border: none; color: var(--pc); font-size: 0.95rem;
  line-height: 1; cursor: pointer; padding: 0 0.15rem; font-weight: 700;
}
.ws-swatches {
  position: absolute; top: 26px; left: 8px; z-index: 5;
  display: grid; grid-template-columns: repeat(4, 22px); gap: 6px;
  background: var(--card); border: 1px solid var(--rule); border-radius: 10px;
  padding: 8px; box-shadow: var(--shadow-2);
}
.ws-swatches button {
  width: 22px; height: 22px; border-radius: 50%; border: 2px solid transparent;
  cursor: pointer; padding: 0;
}
.ws-swatches button:hover { border-color: var(--ink); }

#ws-board[hidden] { display: none !important; }
.ws-board-bar {
  display: flex; align-items: center; gap: 0.8rem; flex-wrap: wrap;
  margin: 0.2rem 0 0.8rem; flex: none;
}
#ws-board-dot { width: 14px; height: 14px; border-radius: 50%; flex: none; }
#ws-board-title {
  font: inherit; font-size: 1.3rem; font-weight: 800; letter-spacing: -0.01em;
  background: transparent; border: none; outline: none; min-width: 120px; flex: 0 1 auto;
}
.ws-board-colors { display: inline-flex; gap: 0.3rem; }
.ws-color {
  width: 17px; height: 17px; border-radius: 50%; border: 2px solid transparent;
  cursor: pointer; padding: 0;
}
.ws-color.active { border-color: var(--ink); }
.ws-board-hint { color: var(--muted); font-size: 0.78rem; flex: 1; text-align: right; }
#ws-board-addcard { padding: 0.4rem 0.9rem; }
@media (max-width: 760px) {
  .ws-board-hint { display: none; }
  .ws-board-bar { gap: 0.5rem 0.7rem; }
  #ws-board-title { font-size: 1.1rem; flex: 1 1 100%; order: 5; }
  .ws-overlay { padding: 0.7rem 0.8rem 0.9rem; }
  .ws-mural-tiles { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.8rem; }
  .ws-tile-name { font-size: 1.05rem; }
}
#ws-board-wrap {
  overflow: auto; border: 1px solid var(--rule); border-radius: var(--radius);
  background: var(--card); box-shadow: var(--shadow-1); flex: 1; min-height: 0;
}
#ws-board-canvas {
  position: relative; width: 2400px; height: 1600px;
  background-image: radial-gradient(color-mix(in srgb, var(--muted) 32%, transparent) 1px, transparent 1px);
  background-size: 26px 26px;
}
#ws-board-scale { position: relative; }
#ws-board-canvas { transform-origin: 0 0; }
#ws-board-canvas.panning { cursor: grabbing; }
.ws-viewtoggle {
  display: inline-flex; border: 1px solid var(--rule); border-radius: 9px; overflow: hidden;
}
.ws-vbtn {
  background: var(--card); color: var(--muted); border: none; font: inherit;
  font-size: 0.8rem; font-weight: 700; padding: 0.35rem 0.85rem; cursor: pointer;
}
.ws-vbtn.active { background: var(--fl); color: #fff; }
#ws-board-search {
  font: inherit; font-size: 0.84rem; color: var(--ink);
  background: var(--card); border: 1px solid var(--rule); border-radius: 9px;
  padding: 0.36rem 0.7rem; outline: none; width: 150px;
}
#ws-board-search:focus { border-color: var(--fl); }
.ws-zoom { display: inline-flex; align-items: center; gap: 0.25rem; }
.ws-zoom .icon-btn { padding: 0.22rem 0.55rem; }
#ws-zoom-pct { font-size: 0.74rem; color: var(--muted); min-width: 38px; text-align: center; }

.ws-card {
  position: absolute; width: 240px;
  background: color-mix(in srgb, var(--pc, var(--fl)) 7%, var(--card));
  border: 1px solid color-mix(in srgb, var(--pc, var(--fl)) 38%, transparent);
  border-top: 4px solid var(--pc, var(--fl));
  border-radius: 10px; box-shadow: var(--shadow-1);
  transition: opacity 0.15s ease;
}
.ws-card.done { opacity: 0.55; }
.ws-card.done .ws-card-title { text-decoration: line-through; }
.ws-card.dimmed { opacity: 0.12; pointer-events: none; }
.ws-card-grip {
  display: flex; align-items: center; gap: 0.3rem;
  padding: 0.2rem 0.35rem; cursor: grab; touch-action: none;
}
.ws-card-grip:active { cursor: grabbing; }
.ws-card-handle { flex: 1; height: 4px; border-radius: 2px;
  background: color-mix(in srgb, var(--pc, var(--fl)) 25%, transparent); margin: 0 0.3rem; }
.ws-card-body { padding: 0.15rem 0.75rem 0.6rem; cursor: pointer; }
.ws-card-title { font-weight: 700; font-size: 0.92rem; line-height: 1.35; overflow-wrap: anywhere; }
.ws-card-title i { color: var(--muted); font-weight: 500; }
.ws-card-preview {
  font-size: 0.78rem; color: var(--muted); margin-top: 0.15rem;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ws-card-chips { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.4rem; }
.ws-card-chips:empty { display: none; }
.ws-chip {
  font-size: 0.68rem; font-weight: 700; color: var(--muted);
  background: color-mix(in srgb, var(--pc, var(--fl)) 10%, transparent);
  border-radius: 6px; padding: 0.08rem 0.42rem;
}
.ws-chip-due.today { color: var(--fl); }
.ws-chip-due.overdue { color: #fff; background: var(--red); }
.ws-pill {
  font-size: 0.62rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase;
  border: none; border-radius: 6px; padding: 0.16rem 0.5rem; cursor: pointer; font-family: inherit;
}
.ws-pill.todo { background: color-mix(in srgb, var(--muted) 18%, transparent); color: var(--muted); }
.ws-pill.doing { background: rgba(31, 95, 168, 0.16); color: #1f5fa8; }
.ws-pill.done { background: rgba(27, 122, 43, 0.16); color: var(--green); }
.ws-pill.sel { outline: 2px solid currentColor; }
[data-theme="dark"] .ws-pill.doing { color: #7db4ee; }

/* card detail editor */
#ws-card-modal {
  position: fixed; inset: 0; background: rgba(20, 8, 15, 0.55);
  backdrop-filter: blur(3px); z-index: 260;
  display: flex; align-items: center; justify-content: center; padding: 3vh 4vw;
}
.ws-cardm {
  background: var(--card); border-radius: var(--radius);
  border-top: 5px solid var(--pc, var(--fl));
  width: min(520px, 94vw); max-height: 92vh; overflow-y: auto;
  box-shadow: var(--shadow-2); padding: 1.1rem 1.3rem 1.2rem;
  animation: modal-in 0.18s ease;
}
.ws-cardm-top { display: flex; gap: 0.6rem; align-items: center; }
#cm-title {
  flex: 1; font: inherit; font-size: 1.15rem; font-weight: 800; color: var(--ink);
  background: transparent; border: none; outline: none; padding: 0.1rem 0;
}
#cm-close {
  background: none; border: none; font-size: 1.7rem; line-height: 1;
  color: var(--muted); cursor: pointer;
}
#cm-close:hover { color: var(--fl); }
.ws-cardm-row { display: flex; gap: 0.45rem; align-items: center; flex-wrap: wrap; margin: 0.55rem 0; }
.ws-cardm-due label {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.74rem; font-weight: 700; color: var(--muted); text-transform: uppercase;
}
.ws-cardm-due input {
  font: inherit; font-size: 0.88rem; color: var(--ink); background: var(--card-2);
  border: 1px solid var(--rule); border-radius: 8px; padding: 0.3rem 0.5rem; outline: none;
}
.ws-cardm-duenote { font-size: 0.7rem; color: var(--muted); flex-basis: 100%; }
.ws-cardm-check { margin-top: 0.4rem; }
.ws-citem { display: flex; align-items: center; gap: 0.5rem; padding: 0.18rem 0; }
.ws-citem input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--pc, var(--fl)); }
.ws-citem-text {
  flex: 1; font: inherit; font-size: 0.9rem; color: var(--ink);
  background: transparent; border: none; outline: none;
}
.ws-citem.done .ws-citem-text { text-decoration: line-through; color: var(--muted); }
#cm-additem input {
  width: 100%; font: inherit; font-size: 0.86rem; color: var(--ink);
  background: transparent; border: 1px dashed var(--rule); border-radius: 8px;
  padding: 0.4rem 0.6rem; outline: none; margin: 0.3rem 0 0.5rem; box-sizing: border-box;
}
#cm-additem input:focus { border-color: var(--pc, var(--fl)); border-style: solid; }
#cm-notes {
  width: 100%; box-sizing: border-box; font: inherit; font-size: 0.9rem;
  color: var(--ink); background: var(--card-2); border: 1px solid var(--rule);
  border-radius: 9px; padding: 0.55rem 0.7rem; outline: none; resize: vertical;
  min-height: 70px; line-height: 1.5;
}
#cm-notes:focus { border-color: var(--pc, var(--fl)); }
.ws-cardm-foot { display: flex; justify-content: flex-end; margin-top: 0.6rem; }

/* kanban */
#ws-kanban {
  flex: 1; min-height: 0; display: grid;
  grid-template-columns: repeat(3, 1fr); gap: 1rem; overflow: auto;
}
#ws-kanban[hidden] { display: none !important; }
.ws-kcol {
  background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius);
  box-shadow: var(--shadow-1); display: flex; flex-direction: column;
  min-height: 0; transition: border-color 0.12s ease;
}
.ws-kcol.dropping { border-color: var(--fl); box-shadow: var(--shadow-2); }
.ws-kcol-head {
  font-size: 0.74rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 0.7rem 0.9rem 0.5rem; border-bottom: 1px solid var(--rule);
}
.ws-kcol-head.todo { color: var(--muted); }
.ws-kcol-head.doing { color: #1f5fa8; }
[data-theme="dark"] .ws-kcol-head.doing { color: #7db4ee; }
.ws-kcol-head.done { color: var(--green); }
.ws-kcol-list { flex: 1; overflow-y: auto; padding: 0.7rem; }
.ws-kcard {
  background: color-mix(in srgb, var(--pc, var(--fl)) 7%, var(--card));
  border: 1px solid color-mix(in srgb, var(--pc, var(--fl)) 35%, transparent);
  border-left: 4px solid var(--pc, var(--fl));
  border-radius: 9px; padding: 0.55rem 0.7rem; margin-bottom: 0.55rem;
  cursor: pointer; box-shadow: var(--shadow-1); touch-action: none;
  transition: transform 0.12s ease;
}
.ws-kcard:hover { transform: translateY(-1px); }
.ws-kcard.done .ws-kcard-title { text-decoration: line-through; color: var(--muted); }
.ws-kcard-title { font-weight: 700; font-size: 0.88rem; }
.ws-kcard-title i { color: var(--muted); font-weight: 500; }
.ws-kghost {
  position: fixed; z-index: 300; width: 220px; pointer-events: none; opacity: 0.9;
  transform: rotate(2deg);
}
@media (max-width: 760px) {
  #ws-kanban { grid-template-columns: repeat(3, minmax(240px, 1fr)); }
  #ws-board-search { width: 110px; }
}

/* ---------- command palette ---------- */
#cmdk { position: fixed; inset: 0; background: rgba(20, 8, 15, 0.55); backdrop-filter: blur(4px); z-index: 300; display: flex; align-items: flex-start; justify-content: center; padding: 12vh 4vw 4vh; }
#cmdk[hidden] { display: none !important; }
.cmdk-box { background: var(--card); border: 1px solid var(--rule); border-radius: 16px; width: min(620px, 94vw); box-shadow: var(--shadow-2); overflow: hidden; animation: modal-in 0.18s ease; }
.cmdk-box input { width: 100%; border: none; outline: none; background: transparent; color: var(--ink); font: inherit; font-size: 1.05rem; padding: 1rem 1.2rem; border-bottom: 1px solid var(--rule); }
.cmdk-list { max-height: 50vh; overflow-y: auto; padding: 0.4rem; }
.cmdk-item { display: flex; align-items: center; gap: 0.7rem; padding: 0.55rem 0.8rem; border-radius: 10px; text-decoration: none; color: var(--ink); font-size: 0.92rem; }
.cmdk-item em { color: var(--muted); font-style: normal; font-size: 0.8rem; }
.cmdk-item.sel, .cmdk-item:hover { background: var(--fl-soft); }
.cmdk-kind { font-size: 0.62rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fl); background: var(--fl-soft); border-radius: 5px; padding: 0.12rem 0.4rem; min-width: 64px; text-align: center; }
.cmdk-empty { padding: 1.4rem; text-align: center; color: var(--muted); font-size: 0.9rem; }

@media (max-width: 980px) {
  .pf-charts { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }
  .toc { position: static; max-height: none; }
  .report-section { padding: 1.2rem 1.1rem; }
  table { display: block; overflow-x: auto; }
  .topbar-sub { display: none; }
}
@media (max-width: 700px) {
  .topbar { flex-wrap: wrap; row-gap: 0.4rem; padding: 0.55rem 0.9rem; }
  .topnav { gap: 0.2rem; }
  .topnav a { padding: 0.3rem 0.55rem; font-size: 0.8rem; }
  .kbd { display: none; }
  .page, .home { padding: 1.4rem 0.9rem 3rem; }
  .report-head { padding: 1.2rem 1.2rem 1.1rem; }
  .pf-card-val { font-size: 1.4rem; }
}
