/* ============================================================
   TEAM COUNSEL OS — SHARED STYLES
   Reset + base + every reusable component. Built entirely on
   tokens.css. No raw values here — only var(--token).
   Pages import this and write markup; they do not restyle it.

   USAGE (top of every page <head>):
     <link href="https://fonts.googleapis.com/css2?family=Sora:wght@400;500;600;700;800&family=Figtree:wght@400;500;600;700&display=swap" rel="stylesheet">
     <link rel="stylesheet" href="tokens.css">
     <link rel="stylesheet" href="styles.css">
   ============================================================ */

@import url('tokens.css');

/* ===== RESET ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--color-heading);
  letter-spacing: var(--ls-tight);
  line-height: var(--lh-snug);
}
h1 { font-size: var(--fs-h1); font-weight: var(--fw-bold); }
h2 { font-size: var(--fs-h2); font-weight: var(--fw-bold); }
h3 { font-size: var(--fs-h3); font-weight: var(--fw-semibold); }
h4 { font-size: var(--fs-h4); font-weight: var(--fw-semibold); }
a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; }
svg { display: block; }
:focus-visible { outline: 2px solid var(--tc-blue); outline-offset: 2px; border-radius: var(--r-xs); }

/* ===== LAYOUT ===== */
.shell {
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: var(--shell-pad-y) var(--shell-pad-x) var(--sp-20);
}
.grid { display: grid; gap: var(--sp-6); }
.grid--7-3 { grid-template-columns: 7fr 3fr; }
.grid--2 { grid-template-columns: 1fr 1fr; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

/* ===== TOPBAR / HEADER ===== */
.tc-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--sp-4) var(--sp-6);
  background: var(--color-surface);
  border: var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-xs);
}
.tc-topbar {
  position: sticky; top: 0; z-index: var(--z-sticky);
  height: var(--topbar-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 max(var(--shell-pad-x), calc((100% - var(--shell-max)) / 2));
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: var(--border);
}
.logo {
  display: flex; align-items: center; gap: var(--sp-3);
  font-family: var(--font-heading); font-weight: var(--fw-bold);
  font-size: var(--fs-h3); color: var(--tc-navy);
}
.logo b { color: var(--tc-blue); }
.header-meta { display: flex; align-items: center; gap: var(--sp-4); }

.status-chip {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  padding: var(--sp-1) var(--sp-3);
  background: var(--color-bg); border: var(--border);
  border-radius: var(--r-pill);
  font-size: var(--fs-xs); font-weight: var(--fw-medium); color: var(--color-muted);
}
.status-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--tc-lime); box-shadow: 0 0 0 3px var(--tc-lime-glow);
}
.avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--tc-navy); color: #fff;
  display: grid; place-items: center;
  font-family: var(--font-heading); font-weight: var(--fw-semibold); font-size: 13px;
  border: 2px solid #fff; box-shadow: 0 0 0 1px var(--color-border);
}

/* ===== HERO ===== */
.hero { margin: var(--sp-8) 0 var(--sp-10); }
.hero .greeting {
  color: var(--tc-blue); font-weight: var(--fw-semibold);
  font-size: var(--fs-sm); margin-bottom: var(--sp-2);
}
.hero h1 {
  font-size: var(--fs-display); font-weight: var(--fw-bold);
  line-height: var(--lh-tight); margin-bottom: var(--sp-3);
}
.hero .subtitle { color: var(--color-muted); font-size: var(--fs-lead); max-width: 620px; }

/* hero — premium dark variant (gradient banner) */
.hero--banner {
  position: relative; overflow: hidden; color: #fff;
  border-radius: var(--r-lg); padding: var(--sp-12) var(--sp-10) var(--sp-10);
  background:
    radial-gradient(130% 160% at 88% 8%, rgba(57,129,202,.55) 0%, rgba(30,53,87,0) 55%),
    linear-gradient(115deg, var(--tc-navy) 0%, #274875 48%, var(--tc-blue) 100%);
}
.hero--banner::after {
  content: ''; position: absolute; left: var(--sp-10); bottom: 0;
  height: 5px; width: 120px; background: var(--tc-lime);
}
.hero--banner h1 { color: #fff; }
.hero--banner .subtitle { color: rgba(255, 255, 255, 0.82); }
.hero--banner .greeting { color: var(--tc-lime); }

/* ===== HELPER STRIP ===== */
.helper {
  margin-top: var(--sp-5); font-size: var(--fs-sm); color: var(--tc-navy);
  font-weight: var(--fw-semibold);
  display: inline-flex; align-items: center; gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-4);
  background: var(--color-surface); border: var(--border); border-radius: var(--r-sm);
  cursor: pointer; transition: border-color var(--t-base), box-shadow var(--t-base), gap var(--t-base);
}
.helper:hover { border-color: var(--tc-lime); box-shadow: var(--shadow-sm); gap: 11px; }
.helper-label { color: var(--tc-blue); font-weight: var(--fw-bold); margin-right: 2px; }
.helper-arrow { color: var(--tc-blue); font-weight: var(--fw-bold); transition: transform var(--t-base); }
.helper:hover .helper-arrow { transform: translateX(2px); }

/* ===== SECTION HEADERS ===== */
.col-header { margin-bottom: var(--sp-4); padding-left: var(--sp-1); }
.col-title {
  font-family: var(--font-heading); font-size: var(--fs-xs); font-weight: var(--fw-semibold);
  color: var(--color-muted); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: var(--sp-1);
}
.col-sub { font-size: var(--fs-sm); color: var(--color-soft); }
.eyebrow {
  font-family: var(--font-heading); font-size: var(--fs-eyebrow); font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-eyebrow); text-transform: uppercase; color: var(--color-muted);
}

/* ===== CARDS (systems / modules) ===== */
.card {
  background: var(--color-surface); border: var(--border); border-radius: var(--r-md);
  padding: var(--sp-6); cursor: pointer; position: relative; overflow: hidden;
  display: flex; flex-direction: column; min-height: 200px;
  transition: transform var(--t-base), box-shadow var(--t-base), border-color var(--t-base);
}
.card::after {
  content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 3px;
  background: var(--tc-lime); transform: scaleX(0); transform-origin: left;
  transition: transform var(--t-slow);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--color-border-strong); }
.card:hover::after { transform: scaleX(1); }
.card:active { transform: translateY(-2px); transition: transform 0.1s ease; }
.card h3 { font-size: var(--fs-card-title); font-weight: var(--fw-semibold); margin-bottom: var(--sp-2); }
.card p { color: var(--color-muted); font-size: var(--fs-body); line-height: var(--lh-normal); flex-grow: 1; margin-bottom: var(--sp-4); }

.card-icon {
  width: 44px; height: 44px; border-radius: var(--r-md);
  background: var(--tc-blue-050); color: var(--tc-blue);
  display: grid; place-items: center; margin-bottom: var(--sp-4);
  transition: background var(--t-base), color var(--t-base);
}
.card:hover .card-icon { background: var(--tc-navy); color: var(--tc-lime); }
.card-icon svg { width: 22px; height: 22px; stroke-width: 2; }

/* primary / featured card (full-width, horizontal) */
.card--primary {
  grid-column: 1 / -1; flex-direction: row; align-items: center; gap: var(--sp-8);
  min-height: 0; padding: var(--sp-8); border: var(--border-strong);
  box-shadow: var(--shadow-sm);
}
.card--primary::after { transform: scaleX(1); height: 4px; }
.card--primary .card-icon { width: 60px; height: 60px; border-radius: 14px; margin-bottom: 0; flex-shrink: 0; background: var(--tc-navy); color: var(--tc-lime); }
.card--primary .card-icon svg { width: 28px; height: 28px; }
.card--primary h3 { font-size: var(--fs-card-title-lg); font-weight: var(--fw-bold); margin-bottom: var(--sp-1); }
.card--primary p { font-size: var(--fs-body); margin-bottom: 0; }
.card-body { flex-grow: 1; min-width: 0; }

/* coming-soon / disabled module card */
.card--soon { cursor: default; opacity: 0.72; }
.card--soon:hover { transform: none; box-shadow: none; border-color: var(--color-border); }
.card--soon:hover::after { transform: scaleX(0); }
.card--soon:hover .card-icon { background: var(--tc-blue-050); color: var(--tc-blue); }
.badge-soon {
  position: absolute; top: var(--sp-4); right: var(--sp-4);
  font-family: var(--font-heading); font-size: 10px; font-weight: var(--fw-semibold);
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 3px 9px; border-radius: var(--r-pill);
  background: var(--color-neutral-bg); color: var(--color-neutral);
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  padding: 9px 14px; border: none; border-radius: var(--r-sm);
  font-family: var(--font-body); font-weight: var(--fw-semibold); font-size: var(--fs-sm);
  cursor: pointer; transition: gap var(--t-base), color var(--t-base), background var(--t-base);
  background: transparent; color: var(--tc-navy); align-self: flex-start; margin-left: -4px;
}
.btn svg { width: 13px; height: 13px; color: var(--tc-blue); transition: transform var(--t-base); }
.card:hover .btn { color: var(--tc-blue); gap: 11px; }
.card:hover .btn svg { transform: translateX(2px); }

.btn-primary {
  padding: 13px 22px; background: var(--tc-lime); color: var(--tc-navy);
  border-radius: var(--r-sm); font-size: 14px; font-weight: var(--fw-bold);
  margin-left: 0; box-shadow: var(--shadow-xs);
}
.btn-primary svg { color: var(--tc-navy); width: 14px; height: 14px; }
.card--primary:hover .btn-primary { background: var(--tc-lime-700); gap: 11px; }
.card--primary:hover .btn-primary svg { transform: translateX(3px); }
.btn-primary:active { transform: translateY(1px); }

.btn-blue { background: var(--tc-blue); color: #fff; padding: 10px 16px; border-radius: var(--r-sm); margin-left: 0; }
.btn-blue svg { color: #fff; }
.btn-blue:hover { background: var(--tc-blue-700); }

/* ===== TOOL CARDS (external launchers) ===== */
.tools { display: flex; flex-direction: column; gap: var(--sp-3); }
.tool-card {
  background: transparent; border: var(--border); border-radius: var(--r-md);
  padding: 14px 16px; cursor: pointer; display: flex; align-items: center; gap: var(--sp-3);
  transition: transform var(--t-base), box-shadow var(--t-base), border-color var(--t-base), background var(--t-base);
}
.tool-card:hover { transform: translateY(-2px); background: var(--color-surface); box-shadow: var(--shadow-sm); border-color: var(--color-border-strong); }
.tool-icon {
  width: 34px; height: 34px; border-radius: var(--r-sm);
  background: var(--tc-blue-050); display: grid; place-items: center; flex-shrink: 0; color: var(--tc-blue);
}
.tool-icon svg { width: 17px; height: 17px; }
.tool-info { flex-grow: 1; min-width: 0; }
.tool-info h4 { font-size: var(--fs-body); font-weight: var(--fw-semibold); margin-bottom: 1px; color: var(--tc-navy); }
.tool-info span { font-size: var(--fs-xs); color: var(--color-soft); }
.tool-arrow {
  width: 24px; height: 24px; border-radius: var(--r-xs); display: grid; place-items: center;
  color: var(--color-soft); flex-shrink: 0;
  transition: background var(--t-base), color var(--t-base), transform var(--t-base);
}
.tool-card:hover .tool-arrow { background: var(--tc-lime); color: var(--tc-navy); transform: translateX(2px); }
.tool-arrow svg { width: 14px; height: 14px; }

/* ===== PANELS (announcements / recent / generic) ===== */
.panel {
  background: var(--color-surface); border: var(--border); border-radius: var(--r-md);
  padding: var(--sp-5) var(--sp-6);
}
.panel-head { display: flex; align-items: center; gap: var(--sp-3); margin-bottom: var(--sp-4); }
.panel-head .ph-ic { width: 30px; height: 30px; border-radius: var(--r-sm); display: grid; place-items: center; }
.panel-head .ph-ic svg { width: 16px; height: 16px; }
.panel-head h3 { font-size: var(--fs-h4); font-weight: var(--fw-bold); }

/* row list (recent / activity) */
.row-list .row {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-3) 0; border-top: 1px solid var(--color-divider);
}
.row-list .row:first-child { border-top: none; }
.row-list .row:hover .row-name { color: var(--tc-blue); }
.row-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--tc-lime); flex-shrink: 0; }
.row-name { flex: 1; font-size: var(--fs-sm); font-weight: var(--fw-medium); transition: color var(--t-fast); }
.row-time { font-size: 11.5px; color: var(--color-soft); width: 72px; text-align: right; flex-shrink: 0; font-variant-numeric: tabular-nums; }

/* ===== QUICK LINKS ===== */
.quick-links { display: flex; flex-direction: column; gap: var(--sp-2); }
.quick-links a {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-3); border: var(--border); border-radius: var(--r-sm);
  font-size: var(--fs-sm); font-weight: var(--fw-medium); color: var(--color-text);
  transition: border-color var(--t-fast), background var(--t-fast);
}
.quick-links a:hover { border-color: var(--tc-blue-border); background: var(--color-surface-alt); }
.quick-links a svg { width: 16px; height: 16px; color: var(--tc-blue); flex-shrink: 0; }
.quick-links a .ext { margin-left: auto; color: var(--color-soft); }

/* ===== TAGS / PILLS ===== */
.tag {
  font-family: var(--font-heading); font-size: 10px; font-weight: var(--fw-semibold);
  letter-spacing: 0.04em; text-transform: uppercase;
  padding: 3px 9px; border-radius: var(--r-pill);
}
.tag--action  { background: var(--color-danger-bg);  color: var(--color-danger); }
.tag--update  { background: var(--color-info-bg);    color: var(--color-info); }
.tag--win     { background: var(--color-success-bg); color: var(--color-success); }
.tag--fyi     { background: var(--color-neutral-bg); color: var(--color-neutral); }
.tag--cat     { background: #eef0f4; color: var(--color-muted); }

/* ===== FOOTER ===== */
.footer {
  margin-top: var(--sp-16); padding-top: var(--sp-6); border-top: var(--border);
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12.5px; color: var(--color-muted); flex-wrap: wrap; gap: var(--sp-3);
}
.footer-left { display: flex; align-items: center; gap: var(--sp-4); }
.footer-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--color-border-strong); }
.footer a { color: var(--tc-navy); font-weight: var(--fw-medium); transition: color var(--t-fast); }
.footer a:hover { color: var(--tc-blue); }

/* ===== TOAST ===== */
.toast {
  position: fixed; bottom: var(--sp-6); left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--tc-navy); color: #fff; padding: var(--sp-3) var(--sp-5);
  border-radius: var(--r-sm); font-size: var(--fs-sm); font-weight: var(--fw-medium);
  box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none; z-index: var(--z-toast);
  transition: opacity var(--t-base), transform var(--t-base);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast b { color: var(--tc-lime); }

/* ===== UTILITIES ===== */
.u-mt-0 { margin-top: 0; } .u-mt-4 { margin-top: var(--sp-4); } .u-mt-8 { margin-top: var(--sp-8); } .u-mt-10 { margin-top: var(--sp-10); }
.u-muted { color: var(--color-muted); } .u-soft { color: var(--color-soft); }

/* ===== RESPONSIVE ===== */
@media (max-width: 960px) {
  .grid--7-3, .grid--4 { grid-template-columns: 1fr; }
  .grid--3 { grid-template-columns: 1fr 1fr; }
  .card--primary { flex-direction: column; align-items: flex-start; gap: var(--sp-5); }
}
@media (max-width: 640px) {
  :root { --shell-pad-x: 18px; }
  .shell { padding: var(--sp-5) var(--shell-pad-x) var(--sp-16); }
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .hero h1 { font-size: var(--fs-h1); }
  .hero--banner { padding: var(--sp-8) var(--sp-6); }
  .hero--banner::after { left: var(--sp-6); }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto; }
}


/* ============================================================
   ============   APP / MODULE COMPONENTS   ===================
   Promoted from the page builds into the shared system so one
   styles.css drives the entire Team Counsel OS webapp.
   Class names are unchanged, so every page links this as-is.
   ============================================================ */

/* ------------------------------------------------------------
   DRIVE OS — section cards + folder rows
   ------------------------------------------------------------ */
.page-head { max-width: var(--shell-max); margin: 0 auto; padding: var(--sp-12) var(--shell-pad-x) var(--sp-6); }
  .page-head h2 { font-size: var(--fs-page-title); font-weight: var(--fw-bold); letter-spacing: -0.025em; line-height: 1.15; }
  .page-head p { margin-top: var(--sp-3); color: var(--color-muted); font-size: var(--fs-body); max-width: 560px; }

  .drive-main { max-width: var(--shell-max); margin: 0 auto; padding: var(--sp-4) var(--shell-pad-x) var(--sp-20); }
  .drive-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-5); align-items: start; }

  /* section card */
  .fcard {
    background: var(--color-surface); border: var(--border); border-radius: var(--r-md);
    box-shadow: var(--shadow-xs); overflow: hidden;
    transition: box-shadow var(--t-slow), transform var(--t-slow);
  }
  .fcard:hover { box-shadow: var(--shadow-sm); }
  .fcard-head { padding: var(--sp-5) var(--sp-6) var(--sp-3); display: flex; align-items: center; gap: var(--sp-3); border-bottom: var(--border); }
  .fcard-icon { width: 34px; height: 34px; border-radius: var(--r-sm); display: grid; place-items: center; flex-shrink: 0; }
  .fcard-icon svg { width: 18px; height: 18px; }
  .fcard-title { font-family: var(--font-heading); font-size: var(--fs-h4); font-weight: var(--fw-semibold); color: var(--tc-navy); }
  .fcard-count {
    margin-left: auto; font-family: var(--font-heading); font-size: var(--fs-xs); font-weight: var(--fw-medium);
    color: var(--color-soft); background: var(--color-bg); padding: 4px 9px; border-radius: var(--r-pill); border: var(--border);
  }

  /* section accent tones (drive tokens only) */
  .fcard[data-tone="blue"] .fcard-icon { background: var(--tc-blue-100); color: var(--tc-blue); }
  .fcard[data-tone="lime"] .fcard-icon { background: var(--tc-lime-100); color: #6b7a1f; }
  .fcard[data-tone="navy"] .fcard-icon { background: #f1f4f8; color: var(--tc-navy); }
  .fcard[data-tone="grey"] .fcard-icon { background: #f1f4f8; color: var(--color-muted); }

  /* rows */
  .frows { list-style: none; padding: var(--sp-1) 0; }
  .frow { display: flex; align-items: center; justify-content: space-between; padding: var(--sp-3) 24px; gap: var(--sp-4); cursor: pointer; transition: background var(--t-fast); }
  .frow + .frow { border-top: var(--border); }
  .frow:hover { background: var(--color-bg); }
  .frow-name { display: flex; align-items: center; gap: var(--sp-3); min-width: 0; flex: 1; font-family: var(--font-body); font-size: 14px; font-weight: var(--fw-medium); color: var(--tc-navy); }
  .frow-text { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .folder-ic { width: 18px; height: 18px; color: var(--color-soft); flex-shrink: 0; transition: color var(--t-fast); }
  .frow:hover .folder-ic { color: var(--tc-blue); }

  /* open-folder pill */
  .open-btn {
    display: inline-flex; align-items: center; gap: var(--sp-2); padding: 7px 14px;
    border: 1px solid var(--tc-blue-border); background: transparent; color: var(--tc-blue);
    font-family: var(--font-body); font-size: 12.5px; font-weight: var(--fw-medium);
    border-radius: var(--r-pill); cursor: pointer; white-space: nowrap; flex-shrink: 0;
    transition: background var(--t-base), color var(--t-base), border-color var(--t-base);
  }
  .open-btn .arrow { display: inline-block; transition: transform var(--t-base); }
  .open-btn:hover { background: var(--tc-blue); color: #fff; border-color: var(--tc-blue); }
  .open-btn:hover .arrow { transform: translateX(3px); }

  /* drive footer (full-width, matches original) */
  .drive-footer {
    max-width: var(--shell-max); margin: 0 auto; padding: 0 var(--shell-pad-x) var(--sp-10);
    display: flex; justify-content: space-between; align-items: center; color: var(--color-soft); font-size: 12.5px;
  }
  .drive-footer .dot { display: inline-block; width: 3px; height: 3px; background: var(--color-soft); border-radius: 50%; margin: 0 var(--sp-2); vertical-align: middle; }

  /* back-to-home link in topbar */
  .home-link { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--color-muted); transition: color var(--t-fast); }
  .home-link:hover { color: var(--tc-blue); }
  .home-link svg { width: 15px; height: 15px; }
  .brand-text h1 { font-family: var(--font-heading); font-size: var(--fs-h3); font-weight: var(--fw-semibold); color: var(--tc-navy); line-height: 1.2; }
  .brand-text p { font-size: 12.5px; color: var(--color-muted); margin-top: 1px; }

  @media (max-width: 880px) {
    .drive-grid { grid-template-columns: 1fr; gap: var(--sp-4); }
    .page-head { padding: var(--sp-8) var(--shell-pad-x) var(--sp-4); }
    .page-head h2 { font-size: var(--fs-card-title-lg); }
  }
  @media (max-width: 480px) {
    .frow { padding: var(--sp-3) 18px; gap: var(--sp-3); }
    .open-btn { padding: 6px 11px; font-size: var(--fs-xs); }
  }

/* ------------------------------------------------------------
   APP SHELL + SIDEBAR + SLIDE-OVER + STATUS + ROADMAP
   (sidebar, slide-over and status pills are shared by Roadmap
   and Knowledge Base; defined once here)
   ------------------------------------------------------------ */
body { overflow-x: hidden; }

  /* layout shell */
  .rm-shell { display: flex; align-items: stretch; min-height: calc(100vh - var(--topbar-h)); }

  /* sidebar */
  .rm-sidebar {
    width: 240px; flex-shrink: 0; background: var(--color-surface);
    border-right: var(--border); padding: var(--sp-5) var(--sp-3);
    position: sticky; top: var(--topbar-h); height: calc(100vh - var(--topbar-h));
    overflow-y: auto;
  }
  .rm-sidebar .side-label {
    font-family: var(--font-heading); font-size: var(--fs-eyebrow); font-weight: var(--fw-semibold);
    letter-spacing: var(--ls-eyebrow); text-transform: uppercase; color: var(--color-soft);
    padding: 0 var(--sp-3) var(--sp-2);
  }
  .rm-nav-item {
    display: flex; align-items: center; gap: var(--sp-3); width: 100%;
    padding: 10px var(--sp-3); border-radius: var(--r-sm); border: none; background: transparent;
    font-family: var(--font-body); font-size: var(--fs-sm); font-weight: var(--fw-medium);
    color: var(--color-muted); cursor: pointer; text-align: left;
    transition: background var(--t-fast), color var(--t-fast);
  }
  .rm-nav-item:hover { background: var(--color-bg); color: var(--tc-navy); }
  .rm-nav-item .ni-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--color-border-strong); flex-shrink: 0; transition: background var(--t-fast); }
  .rm-nav-item.active { background: var(--tc-blue-100); color: var(--tc-navy); font-weight: var(--fw-semibold); }
  .rm-nav-item.active .ni-dot { background: var(--tc-blue); box-shadow: 0 0 0 3px var(--tc-blue-050); }
  .rm-add {
    margin-top: var(--sp-3); display: flex; align-items: center; gap: var(--sp-2); width: 100%;
    padding: 10px var(--sp-3); border: 1px dashed var(--color-border-strong); border-radius: var(--r-sm);
    background: transparent; color: var(--color-soft); font-family: var(--font-body);
    font-size: var(--fs-sm); font-weight: var(--fw-medium); cursor: pointer; transition: all var(--t-fast);
  }
  .rm-add:hover { border-color: var(--tc-blue); color: var(--tc-blue); }
  .side-divider { height: 1px; background: var(--color-divider); margin: var(--sp-4) var(--sp-3); }

  /* workspace */
  .rm-workspace { flex: 1; min-width: 0; padding: var(--sp-8) var(--sp-10) var(--sp-16); max-width: 1040px; }
  .ws-head { margin-bottom: var(--sp-8); }
  .ws-eyebrow { font-family: var(--font-heading); font-size: var(--fs-eyebrow); font-weight: var(--fw-semibold); letter-spacing: var(--ls-eyebrow); text-transform: uppercase; color: var(--tc-blue); margin-bottom: var(--sp-2); }
  .ws-head h1 { font-size: var(--fs-page-title); font-weight: var(--fw-bold); margin-bottom: var(--sp-2); }
  .ws-head p { color: var(--color-muted); font-size: var(--fs-lead); max-width: 640px; }

  .ws-legend { display: flex; gap: var(--sp-4); flex-wrap: wrap; margin-top: var(--sp-5); }
  .leg { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-xs); color: var(--color-muted); font-weight: var(--fw-medium); }
  .leg .sw { width: 8px; height: 8px; border-radius: 50%; }

  /* section heads */
  .rm-section { margin-top: var(--sp-12); }
  .rm-section:first-of-type { margin-top: 0; }
  .rm-sec-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: var(--sp-5); }
  .rm-sec-title { font-family: var(--font-heading); font-size: 13px; font-weight: var(--fw-bold); letter-spacing: 0.14em; text-transform: uppercase; color: var(--color-muted); }
  .rm-sec-note { font-size: var(--fs-xs); color: var(--color-soft); }

  /* focus cards (premium, strategic) */
  .focus-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-4); }
  .focus-card {
    position: relative; background: var(--color-surface); border: var(--border); border-radius: var(--r-md);
    padding: var(--sp-5); cursor: pointer; overflow: hidden;
    transition: transform var(--t-base), box-shadow var(--t-base), border-color var(--t-base);
  }
  .focus-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--tc-lime); transform: scaleY(0); transform-origin: top; transition: transform var(--t-base); }
  .focus-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--color-border-strong); }
  .focus-card:hover::before { transform: scaleY(1); }
  .focus-card .fc-stage { font-family: var(--font-heading); font-size: 11px; font-weight: var(--fw-semibold); letter-spacing: 0.08em; text-transform: uppercase; color: var(--tc-blue); margin-bottom: var(--sp-3); }
  .focus-card h3 { font-size: var(--fs-h3); font-weight: var(--fw-semibold); margin-bottom: var(--sp-2); line-height: 1.25; }
  .focus-card p { font-size: var(--fs-sm); color: var(--color-muted); margin-bottom: var(--sp-4); min-height: 38px; }
  .fc-foot { display: flex; align-items: center; justify-content: space-between; }
  .fc-time { font-size: var(--fs-xs); color: var(--color-soft); font-variant-numeric: tabular-nums; }
  .focus-grid--soft .focus-card { background: var(--color-surface-alt); }

  /* strategic flow (vertical journey spine) */
  .flow { position: relative; padding-left: var(--sp-8); }
  .flow::before { content: ''; position: absolute; left: 19px; top: 12px; bottom: 12px; width: 2px; background: linear-gradient(to bottom, var(--tc-blue), var(--tc-blue-border)); }
  .flow-node { position: relative; display: flex; gap: var(--sp-5); align-items: stretch; margin-bottom: var(--sp-4); cursor: pointer; }
  .flow-node:last-child { margin-bottom: 0; }
  .flow-num {
    position: absolute; left: calc(-1 * var(--sp-8)); top: 50%; transform: translateY(-50%);
    width: 40px; height: 40px; border-radius: 50%; background: var(--color-surface); border: 2px solid var(--tc-blue);
    display: grid; place-items: center; font-family: var(--font-heading); font-weight: var(--fw-bold);
    font-size: var(--fs-sm); color: var(--tc-navy); z-index: 1; transition: all var(--t-base);
  }
  .flow-node:hover .flow-num { background: var(--tc-navy); color: var(--tc-lime); border-color: var(--tc-navy); }
  .flow-body {
    flex: 1; background: var(--color-surface); border: var(--border); border-radius: var(--r-md);
    padding: var(--sp-4) var(--sp-5); display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4);
    transition: transform var(--t-base), box-shadow var(--t-base), border-color var(--t-base);
  }
  .flow-node:hover .flow-body { transform: translateX(3px); box-shadow: var(--shadow-sm); border-color: var(--tc-blue-border); }
  .flow-body h4 { font-size: var(--fs-body); font-weight: var(--fw-semibold); margin-bottom: 2px; }
  .flow-body .fb-sum { font-size: var(--fs-xs); color: var(--color-soft); }

  /* milestones (compact, not a calendar) */
  .milestones { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-4); }
  .ms-col { background: var(--color-surface); border: var(--border); border-radius: var(--r-md); padding: var(--sp-5); }
  .ms-month { font-family: var(--font-heading); font-size: var(--fs-h4); font-weight: var(--fw-bold); color: var(--tc-navy); margin-bottom: var(--sp-3); display: flex; align-items: center; gap: var(--sp-2); }
  .ms-month .ms-bar { width: 22px; height: 3px; border-radius: 3px; background: var(--tc-lime); }
  .ms-item { display: flex; align-items: flex-start; gap: var(--sp-2); padding: 7px 0; font-size: var(--fs-sm); color: var(--color-text); border-top: 1px solid var(--color-divider); }
  .ms-item:first-of-type { border-top: none; }
  .ms-item .ms-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--tc-blue); margin-top: 6px; flex-shrink: 0; }

  /* initiative library */
  .lib-toolbar { display: flex; gap: var(--sp-3); flex-wrap: wrap; margin-bottom: var(--sp-4); }
  .lib-search { flex: 1; min-width: 200px; position: relative; }
  .lib-search input {
    width: 100%; padding: 10px 14px 10px 38px; border: var(--border); border-radius: var(--r-sm);
    font-family: var(--font-body); font-size: var(--fs-sm); color: var(--color-text); background: var(--color-surface);
    transition: border-color var(--t-fast), box-shadow var(--t-fast);
  }
  .lib-search input:focus { outline: none; border-color: var(--tc-blue); box-shadow: var(--focus-ring); }
  .lib-search svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--color-soft); }
  .lib-select {
    padding: 10px 14px; border: var(--border); border-radius: var(--r-sm); background: var(--color-surface);
    font-family: var(--font-body); font-size: var(--fs-sm); color: var(--color-text); cursor: pointer;
  }
  .lib-select:focus { outline: none; border-color: var(--tc-blue); box-shadow: var(--focus-ring); }
  .lib-list { border: var(--border); border-radius: var(--r-md); overflow: hidden; background: var(--color-surface); }
  .lib-row { display: flex; align-items: center; gap: var(--sp-4); padding: 14px var(--sp-5); border-top: var(--border); cursor: pointer; transition: background var(--t-fast); }
  .lib-row:first-child { border-top: none; }
  .lib-row:hover { background: var(--color-bg); }
  .lib-row .lr-main { flex: 1; min-width: 0; }
  .lib-row .lr-title { font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--tc-navy); margin-bottom: 1px; }
  .lib-row .lr-sum { font-size: var(--fs-xs); color: var(--color-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .lib-row .lr-time { font-size: var(--fs-xs); color: var(--color-soft); width: 90px; text-align: right; flex-shrink: 0; }
  .lib-empty { padding: var(--sp-8); text-align: center; color: var(--color-soft); font-size: var(--fs-sm); }

  /* status pills (visibility only) */
  .st { font-family: var(--font-heading); font-size: 10px; font-weight: var(--fw-semibold); letter-spacing: 0.04em; text-transform: uppercase; padding: 3px 9px; border-radius: var(--r-pill); white-space: nowrap; flex-shrink: 0; }
  .st-planned   { background: var(--color-neutral-bg); color: var(--color-neutral); }
  .st-progress  { background: var(--tc-blue-100);      color: var(--tc-blue); }
  .st-blocked   { background: var(--color-danger-bg);  color: var(--color-danger); }
  .st-completed { background: var(--color-success-bg); color: var(--color-success); }

  /* slide-over panel */
  .so-overlay { position: fixed; inset: 0; background: var(--scrim); opacity: 0; pointer-events: none; transition: opacity var(--t-base); z-index: var(--z-modal); }
  .so-overlay.open { opacity: 1; pointer-events: auto; }
  .slideover {
    position: fixed; top: 0; right: 0; height: 100vh; width: 460px; max-width: 92vw;
    background: var(--color-surface); border-left: var(--border); box-shadow: var(--shadow-lg);
    transform: translateX(100%); transition: transform var(--t-slow); z-index: var(--z-modal);
    display: flex; flex-direction: column;
  }
  .slideover.open { transform: translateX(0); }
  .so-head { padding: var(--sp-6); border-bottom: var(--border); }
  .so-head .so-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--sp-3); }
  .so-stage { font-family: var(--font-heading); font-size: 11px; font-weight: var(--fw-semibold); letter-spacing: 0.08em; text-transform: uppercase; color: var(--tc-blue); }
  .so-close { width: 32px; height: 32px; border-radius: var(--r-sm); border: var(--border); background: var(--color-surface); color: var(--color-muted); display: grid; place-items: center; cursor: pointer; transition: all var(--t-fast); }
  .so-close:hover { background: var(--color-bg); color: var(--tc-navy); }
  .so-head h2 { font-size: var(--fs-section-title); font-weight: var(--fw-bold); line-height: 1.2; margin-bottom: var(--sp-3); }
  .so-meta { display: flex; align-items: center; gap: var(--sp-3); }
  .so-time { font-size: var(--fs-xs); color: var(--color-muted); }
  .so-body { padding: var(--sp-6); overflow-y: auto; flex: 1; }
  .so-block { margin-bottom: var(--sp-6); }
  .so-block:last-child { margin-bottom: 0; }
  .so-block .so-label { font-family: var(--font-heading); font-size: 11px; font-weight: var(--fw-semibold); letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-soft); margin-bottom: var(--sp-2); }
  .so-block p { font-size: var(--fs-sm); color: var(--color-text); line-height: 1.6; }
  .so-list { list-style: none; }
  .so-list li { font-size: var(--fs-sm); color: var(--color-text); padding: 6px 0 6px var(--sp-5); position: relative; line-height: 1.5; }
  .so-list li::before { content: ''; position: absolute; left: 4px; top: 13px; width: 6px; height: 6px; border-radius: 50%; background: var(--tc-lime); }
  .so-list.dep li::before { background: var(--tc-blue); border-radius: 2px; }
  .so-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; background: var(--color-bg); border: var(--border); border-radius: var(--r-pill); font-size: var(--fs-xs); color: var(--color-muted); margin: 0 6px 6px 0; }

  /* responsive */
  @media (max-width: 900px) {
    .focus-grid, .focus-grid--soft, .milestones { grid-template-columns: 1fr; }
    .rm-workspace { padding: var(--sp-6) var(--sp-5) var(--sp-12); }
  }
  /* tablet (768–1023): slim two-pane rail, keeps content beside nav */
  @media (min-width: 768px) and (max-width: 1023px) {
    .rm-sidebar { width: 200px; padding: var(--sp-4) var(--sp-2); }
    .rm-workspace { padding: var(--sp-6) var(--sp-6) var(--sp-12); }
  }
  /* phone (≤767): rail becomes a wrapping chip cloud — every vertical visible, no hidden scroll */
  @media (max-width: 767px) {
    .rm-shell { flex-direction: column; }
    .rm-sidebar {
      width: 100%; height: auto; position: static; overflow: visible;
      border-right: none; border-bottom: var(--border);
      display: flex; flex-wrap: wrap; gap: var(--sp-2);
      padding: var(--sp-4) var(--sp-4) var(--sp-3);
    }
    .rm-sidebar .side-label { width: 100%; display: block; padding: 0 0 var(--sp-1); }
    .side-divider { display: none; }
    .rm-nav-item { width: auto; white-space: nowrap; border: var(--border); border-radius: var(--r-pill); padding: 8px 14px; }
    .rm-nav-item.active { border-color: var(--tc-blue-border); }
    .rm-add { margin-top: 0; white-space: nowrap; border-radius: var(--r-pill); }
    .slideover { width: 100%; }
  }

/* ------------------------------------------------------------
   KNOWLEDGE BASE — hero search, featured, recent, resource cards
   (reuses the app shell, sidebar and slide-over defined above)
   ------------------------------------------------------------ */
body { overflow-x: hidden; }
  .kb-shell { display: flex; align-items: stretch; min-height: calc(100vh - var(--topbar-h)); }

  /* sidebar (shared OS pattern) */
  .kb-sidebar {
    width: 240px; flex-shrink: 0; background: var(--color-surface); border-right: var(--border);
    padding: var(--sp-5) var(--sp-3); position: sticky; top: var(--topbar-h);
    height: calc(100vh - var(--topbar-h)); overflow-y: auto;
  }
  .side-label { font-family: var(--font-heading); font-size: var(--fs-eyebrow); font-weight: var(--fw-semibold); letter-spacing: var(--ls-eyebrow); text-transform: uppercase; color: var(--color-soft); padding: 0 var(--sp-3) var(--sp-2); }
  .kb-nav-item {
    display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); width: 100%;
    padding: 10px var(--sp-3); border-radius: var(--r-sm); border: none; background: transparent;
    font-family: var(--font-body); font-size: var(--fs-sm); font-weight: var(--fw-medium);
    color: var(--color-muted); cursor: pointer; text-align: left; transition: background var(--t-fast), color var(--t-fast);
  }
  .kb-nav-item:hover { background: var(--color-bg); color: var(--tc-navy); }
  .kb-nav-item.active { background: var(--tc-blue-100); color: var(--tc-navy); font-weight: var(--fw-semibold); }
  .kb-nav-item .ni-count { font-family: var(--font-heading); font-size: 11px; font-weight: var(--fw-medium); color: var(--color-soft); background: var(--color-bg); border: var(--border); border-radius: var(--r-pill); padding: 1px 8px; }
  .kb-nav-item.active .ni-count { background: #fff; color: var(--tc-blue); border-color: var(--tc-blue-border); }

  /* main */
  .kb-main { flex: 1; min-width: 0; padding: var(--sp-8) var(--sp-10) var(--sp-16); max-width: 1040px; }

  /* hero — search-first */
  .kb-hero { margin-bottom: var(--sp-10); }
  .kb-hero .eyebrow { color: var(--tc-blue); margin-bottom: var(--sp-2); }
  .kb-hero h1 { font-size: var(--fs-page-title); font-weight: var(--fw-bold); margin-bottom: var(--sp-2); }
  .kb-hero p { color: var(--color-muted); font-size: var(--fs-lead); max-width: 620px; margin-bottom: var(--sp-6); }
  .kb-search { position: relative; max-width: 680px; }
  .kb-search input {
    width: 100%; padding: 16px 18px 16px 52px; border: var(--border); border-radius: var(--r-md);
    font-family: var(--font-body); font-size: 16px; color: var(--color-text); background: var(--color-surface);
    box-shadow: var(--shadow-sm); transition: border-color var(--t-fast), box-shadow var(--t-fast);
  }
  .kb-search input::placeholder { color: var(--color-soft); }
  .kb-search input:focus { outline: none; border-color: var(--tc-blue); box-shadow: var(--focus-ring); }
  .kb-search svg { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--tc-blue); }
  .kb-search .clear { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); width: 26px; height: 26px; border-radius: var(--r-sm); border: none; background: var(--color-bg); color: var(--color-muted); display: none; place-items: center; cursor: pointer; }
  .kb-search .clear.show { display: grid; }
  .kb-search .clear svg { position: static; transform: none; width: 14px; height: 14px; color: inherit; }

  /* section heads */
  .kb-section { margin-top: var(--sp-12); }
  .kb-sec-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: var(--sp-5); }
  .kb-sec-title { font-family: var(--font-heading); font-size: 13px; font-weight: var(--fw-bold); letter-spacing: 0.14em; text-transform: uppercase; color: var(--color-muted); }
  .kb-sec-note { font-size: var(--fs-xs); color: var(--color-soft); }

  /* featured cards */
  .feat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-4); }
  .feat-card {
    position: relative; background: var(--color-surface); border: var(--border); border-radius: var(--r-md);
    padding: var(--sp-5); cursor: pointer; overflow: hidden; display: flex; gap: var(--sp-4); align-items: flex-start;
    transition: transform var(--t-base), box-shadow var(--t-base), border-color var(--t-base);
  }
  .feat-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--tc-lime); transform: scaleY(0); transform-origin: top; transition: transform var(--t-base); }
  .feat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--color-border-strong); }
  .feat-card:hover::before { transform: scaleY(1); }
  .feat-ic { width: 42px; height: 42px; border-radius: var(--r-sm); background: var(--tc-blue-100); color: var(--tc-blue); display: grid; place-items: center; flex-shrink: 0; }
  .feat-ic svg { width: 20px; height: 20px; }
  .feat-body { min-width: 0; }
  .feat-flag { font-family: var(--font-heading); font-size: 10px; font-weight: var(--fw-semibold); letter-spacing: 0.06em; text-transform: uppercase; color: var(--tc-blue); margin-bottom: 4px; }
  .feat-card h3 { font-size: var(--fs-lead); font-weight: var(--fw-semibold); margin-bottom: 3px; line-height: 1.25; }
  .feat-card p { font-size: var(--fs-xs); color: var(--color-muted); }

  /* recently updated */
  .recent-list { border: var(--border); border-radius: var(--r-md); overflow: hidden; background: var(--color-surface); }
  .recent-row { display: flex; align-items: center; gap: var(--sp-4); padding: 13px var(--sp-5); border-top: var(--border); cursor: pointer; transition: background var(--t-fast); }
  .recent-row:first-child { border-top: none; }
  .recent-row:hover { background: var(--color-bg); }
  .recent-row:hover .rr-title { color: var(--tc-blue); }
  .rr-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--tc-lime); flex-shrink: 0; }
  .rr-main { flex: 1; min-width: 0; }
  .rr-title { font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--tc-navy); transition: color var(--t-fast); }
  .rr-cat { font-size: var(--fs-xs); color: var(--color-soft); }
  .rr-date { font-size: var(--fs-xs); color: var(--color-soft); flex-shrink: 0; font-variant-numeric: tabular-nums; }

  /* resource library cards */
  .res-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-4); }
  .res-card {
    background: var(--color-surface); border: var(--border); border-radius: var(--r-md); padding: var(--sp-5);
    display: flex; flex-direction: column; cursor: pointer;
    transition: transform var(--t-base), box-shadow var(--t-base), border-color var(--t-base);
  }
  .res-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--color-border-strong); }
  .res-top { display: flex; align-items: center; gap: var(--sp-3); margin-bottom: var(--sp-3); }
  .res-ic { width: 38px; height: 38px; border-radius: var(--r-sm); display: grid; place-items: center; flex-shrink: 0; background: var(--tc-blue-100); color: var(--tc-blue); }
  .res-ic svg { width: 18px; height: 18px; }
  .res-card h3 { font-size: var(--fs-body); font-weight: var(--fw-semibold); line-height: 1.25; }
  .cat-chip { font-family: var(--font-heading); font-size: 10px; font-weight: var(--fw-semibold); letter-spacing: 0.04em; text-transform: uppercase; padding: 3px 9px; border-radius: var(--r-pill); background: var(--color-neutral-bg); color: var(--color-neutral); display: inline-block; }
  .res-card p { font-size: var(--fs-sm); color: var(--color-muted); flex: 1; margin: 2px 0 var(--sp-4); }
  .res-foot { display: flex; align-items: center; justify-content: space-between; }
  .res-updated { font-size: var(--fs-xs); color: var(--color-soft); }
  .res-open { font-family: var(--font-heading); font-size: 12.5px; font-weight: var(--fw-semibold); color: var(--tc-blue); display: inline-flex; align-items: center; gap: 5px; }
  .res-open svg { width: 13px; height: 13px; transition: transform var(--t-base); }
  .res-card:hover .res-open svg { transform: translateX(2px); }

  .kb-empty { padding: var(--sp-12); text-align: center; color: var(--color-soft); font-size: var(--fs-sm); border: 1px dashed var(--color-border-strong); border-radius: var(--r-md); }
  .kb-empty b { color: var(--color-muted); }

  @media (max-width: 900px) {
    .feat-grid, .res-grid { grid-template-columns: 1fr; }
    .kb-main { padding: var(--sp-6) var(--sp-5) var(--sp-12); }
    .kb-hero h1 { font-size: var(--fs-card-title-lg); }
  }
  /* tablet (768–1023): slim two-pane rail */
  @media (min-width: 768px) and (max-width: 1023px) {
    .kb-sidebar { width: 200px; padding: var(--sp-4) var(--sp-2); }
    .kb-main { padding: var(--sp-6) var(--sp-6) var(--sp-12); }
  }
  /* phone (≤767): rail becomes a wrapping chip cloud — every category + count stays visible */
  @media (max-width: 767px) {
    .kb-shell { flex-direction: column; }
    .kb-sidebar {
      width: 100%; height: auto; position: static; overflow: visible;
      border-right: none; border-bottom: var(--border);
      display: flex; flex-wrap: wrap; gap: var(--sp-2);
      padding: var(--sp-4) var(--sp-4) var(--sp-3);
    }
    .kb-sidebar .side-label { width: 100%; display: block; padding: 0 0 var(--sp-1); }
    .kb-nav-item { width: auto; white-space: nowrap; border: var(--border); border-radius: var(--r-pill); padding: 8px 12px; gap: var(--sp-2); }
    .kb-nav-item.active { border-color: var(--tc-blue-border); }
    .slideover { width: 100%; }
  }

  /* profile menu — fully tokenized (Phase 3C) */
  .profile-menu{ position:relative; }

.avatar-btn{
  width:40px; height:40px;
  border:none; border-radius:var(--r-pill);
  cursor:pointer;
  background:var(--tc-navy); color:#fff;
  font-family:var(--font-heading); font-weight:var(--fw-bold); font-size:var(--fs-sm);
}

.profile-dropdown{
  position:absolute; top:calc(100% + var(--sp-2)); right:0;
  width:260px;
  background:var(--color-surface);
  border:var(--border);
  border-radius:var(--r-md);
  padding:var(--sp-3);
  display:none;
  box-shadow:var(--shadow-md);
  z-index:var(--z-dropdown);
}

.profile-dropdown.show{ display:block; }

.profile-user{
  gap:var(--sp-1);
  padding-bottom:var(--sp-3);
  margin-bottom:var(--sp-3);
  border-bottom:1px solid var(--color-divider);
}

.profile-user span{
  font-size:var(--fs-xs);
  color:var(--color-muted);
}

.dropdown-item{
  width:100%; border:none; background:none;
  text-align:left; cursor:pointer;
  padding:var(--sp-2) 0;
  font-family:var(--font-body); font-size:var(--fs-sm); color:var(--color-text);
}
.dropdown-item:hover{ color:var(--tc-blue); }

/* ============================================================
   GLOBAL LOADING + ENTRANCE SYSTEM (Phase 2A)
   Reusable across all pages. UX only.
   ============================================================ */
.tc-loader{
  position:fixed; inset:0; z-index:var(--z-toast);
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap:var(--sp-5); background:var(--color-bg);
  opacity:1; visibility:visible;
  transition:opacity var(--t-slow) ease, visibility var(--t-slow) ease;
}
body.tc-loaded .tc-loader{ opacity:0; visibility:hidden; pointer-events:none; }
.tc-loader__spinner{
  width:24px; height:24px; border-radius:50%;
  border:2.5px solid var(--tc-blue-100);
  border-top-color:var(--tc-blue);
  animation:tc-spin .7s linear infinite;
}
.tc-loader__label{
  font-family:var(--font-heading); font-size:var(--fs-xs);
  letter-spacing:var(--ls-eyebrow); text-transform:uppercase; color:var(--color-soft);
}
@keyframes tc-spin{ to{ transform:rotate(360deg); } }
@keyframes tc-pulse{ 0%,100%{ transform:scale(1); opacity:1; } 50%{ transform:scale(.94); opacity:.82; } }

/* subtle content entrance once the loader clears */
body.tc-loaded .shell,
body.tc-loaded .kb-shell,
body.tc-loaded .admin-shell,
body.tc-loaded .drive-main,
body.tc-loaded .page-head{
  animation:tc-fade-in var(--t-slow) ease both;
}
@keyframes tc-fade-in{ from{ opacity:0; transform:translateY(6px); } to{ opacity:1; transform:none; } }

@media (prefers-reduced-motion: reduce){
  .tc-loader, .tc-loader__spinner,
  body.tc-loaded .shell, body.tc-loaded .kb-shell, body.tc-loaded .admin-shell,
  body.tc-loaded .drive-main, body.tc-loaded .page-head{ animation:none !important; transition:none !important; }
}

/* ============================================================
   ERROR + EMPTY STATES (Phase 2B) — UX only
   ============================================================ */
.tc-error{ display:flex; flex-direction:column; align-items:flex-start; gap:var(--sp-2);
  margin:var(--sp-6) auto; max-width:640px;
  background:var(--color-danger-bg); color:var(--color-danger);
  border:1px solid #f3c7c0; border-radius:var(--r-md); padding:var(--sp-5) var(--sp-6);
  font-size:var(--fs-sm); }
.tc-error strong{ font-family:var(--font-heading); font-size:var(--fs-h4); }
.tc-error button{ margin-top:var(--sp-2); border:none; cursor:pointer;
  background:var(--tc-blue); color:#fff; border-radius:var(--r-sm);
  padding:8px 16px; font-family:var(--font-heading); font-size:var(--fs-sm);
  transition:background var(--t-fast); }
.tc-error button:hover{ background:var(--tc-blue-700); }
.tc-empty{ text-align:center; color:var(--color-muted); font-size:var(--fs-sm);
  padding:var(--sp-8) var(--sp-5); border:1px dashed var(--color-border-strong);
  border-radius:var(--r-md); background:var(--color-surface-alt); }
.admin-empty{ text-align:center; color:var(--color-muted); padding:var(--sp-6) !important; font-size:var(--fs-sm); }
.frow-empty{ color:var(--color-muted); font-size:var(--fs-sm); justify-content:flex-start; cursor:default; }
/* ============================================================
   ICON SYSTEM (Phase 3B) — solid-fill monoline glyph set
   24x24 source, fill:currentColor. Standalone sizing helpers.
   Existing per-context `... svg` rules are more specific and
   continue to win; this only sets defaults + opt-in sizes.
   ============================================================ */
.icon{ fill:currentColor; flex-shrink:0; vertical-align:middle; }
.icon path[fill="none"]{ fill:none; }
.icon-sm{ width:16px; height:16px; }   /* dense rows / table actions */
.icon-md{ width:18px; height:18px; }   /* nav, buttons, inputs */
.icon-lg{ width:20px; height:20px; }   /* section headers */
.icon-xl{ width:24px; height:24px; }   /* empty states / feature */

/* ---- brand wordmark (tc.svg) — full-colour, sized by height, never recoloured ---- */
.tc-wordmark{ display:block; height:var(--logo-sm); width:auto; }
.tc-wordmark--sm{ height:22px; }
.tc-wordmark--brand{ height:var(--logo-lg); margin:0 auto; }
.tc-wordmark--card{ height:30px; margin:0 auto; }
.tc-loader__logo{ height:var(--logo-lg); width:auto; animation:tc-pulse 1.6s ease-in-out infinite; }
.auth-card-logo{ margin:0 auto var(--sp-5); }
@media (prefers-reduced-motion: reduce){ .tc-loader__logo{ animation:none !important; } }

/* ---- brand/app icons rendered as <img> keep their own colours ---- */
.tool-icon img{ width:20px; height:20px; object-fit:contain; display:block; }
.card-icon img{ object-fit:contain; }

/* ---- dropdown + helper + profile glyphs (Phase 3B) ---- */
/* icon is inline-block + vertical-align so it stays beside the label even when
   JS forces the Admin CMS button to display:block (auth.js reveal). */
.dropdown-item{ align-items:center; }
.dropdown-item .icon{ display:inline-block; vertical-align:middle; width:16px; height:16px; margin-right:8px; color:var(--color-muted); flex-shrink:0; }
.helper .helper-ic{ width:16px; height:16px; color:var(--tc-blue); flex-shrink:0; }

/* profile header: user glyph sits to the LEFT of the stacked name/email/role */
.profile-user{ display:grid; grid-template-columns:auto 1fr; column-gap:10px; row-gap:2px; align-items:center; }
.profile-user .profile-user-ic{ grid-column:1; grid-row:1 / span 3; align-self:center; width:30px; height:30px; color:var(--color-muted); margin:0; }
.profile-user > strong, .profile-user > span{ grid-column:2; min-width:0; }

/* ============================================================
   RESPONSIVE HARDENING (Phase 4A)
   ============================================================ */

/* H6 — center the module shells on ultrawide so content doesn't strand left */
/* App-shell pages (Roadmap, Knowledge Base): sidebar docked to the LEFT EDGE at any
   width — even on a 100-inch monitor — with the workspace centered in the space left over.
   This replaces the old centered-column shell that floated the sidebar mid-screen. */
.rm-shell, .kb-shell{ max-width: none; margin-inline: 0; }
.rm-workspace, .kb-main{ margin-inline: auto; }
body:has(.rm-shell) .tc-topbar,
body:has(.kb-shell) .tc-topbar{ padding: 0 var(--shell-pad-x); }

/* H5 — roadmap page title scales down at the same point as Drive / KB */
@media (max-width: 900px){
  .ws-head h1{ font-size: var(--fs-card-title-lg); }
}

/* Critical 1 + High 4 — phone topbar + 44px touch targets */
@media (max-width: 640px){
  .header-meta{ gap: var(--sp-2); }
  .status-chip{ display: none; }              /* hide verbose "View only" chip on phones */
  .home-link{ font-size: 0; gap: 0; }         /* collapse to icon-only */
  .home-link svg{ width: 20px; height: 20px; }
}

/* ============================================================
   RESPONSIVE POLISH + TABLET (Phase 4B / 4C)
   ============================================================ */

/* 4C — real tablet tier: keep two-column card grids across 768–1023 */
@media (min-width: 768px) and (max-width: 1023px){
  .drive-grid{ grid-template-columns: 1fr 1fr; }
  .feat-grid, .res-grid{ grid-template-columns: 1fr 1fr; }
  .focus-grid, .focus-grid--soft{ grid-template-columns: 1fr 1fr; }
  .milestones{ grid-template-columns: 1fr 1fr; }
}

/* 4C / 4B — touch targets on every coarse-pointer device (phones + tablets) */
@media (pointer: coarse){
  .dropdown-item{ padding: var(--sp-3) 0; }
  .rm-nav-item, .kb-nav-item, .admin-nav-item{ padding-top: 12px; padding-bottom: 12px; }
  .open-btn{ min-height: 40px; }
  .avatar-btn{ width: 44px; height: 44px; }
  .so-close{ width: 40px; height: 40px; }
  .kb-search .clear{ width: 32px; height: 32px; }
  .tool-arrow{ width: 30px; height: 30px; }
}

/* 4B — large-desktop balance: wider content cap + wider workspaces */
@media (min-width: 1600px){
  :root{ --shell-max: 1440px; }
  .rm-workspace, .kb-main{ max-width: 1180px; }
}

/* 4B — polish guards: dropdown never exceeds viewport; tighter tablet workspace padding */
.profile-dropdown{ max-width: calc(100vw - 2 * var(--shell-pad-x)); }
@media (min-width: 901px) and (max-width: 1023px){
  .rm-workspace, .kb-main{ padding-left: var(--sp-6); padding-right: var(--sp-6); }
}