/* ============================================================================
   ComplyGrid design system
   Two surfaces from one token set:
     .site  -- public marketing, dark, dense, technical
     .work  -- authenticated workspace, light, high information density
   ========================================================================== */

:root {
  /* ink / neutrals */
  --ink-900: #070c14;
  --ink-850: #0b1220;
  --ink-800: #101a2c;
  --ink-700: #17253c;
  --ink-600: #21344f;
  --ink-500: #35496a;
  --ink-400: #5b7089;
  --slate-600: #47566b;
  --slate-500: #64748b;
  --slate-400: #94a3b8;
  --slate-300: #cbd5e1;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50:  #f8fafc;
  --white: #ffffff;

  /* brand */
  --brand-600: #0d7a6f;
  --brand-500: #12a594;
  --brand-400: #1fc2ae;
  --brand-300: #5fdccb;
  --brand-100: #d5f5ef;

  --accent-600: #b45309;
  --accent-500: #d97706;
  --accent-400: #f59e0b;
  --accent-100: #fef3c7;

  /* signal */
  --ok-600: #15803d;   --ok-500: #16a34a;  --ok-100: #dcfce7;
  --warn-600: #b45309; --warn-500: #f59e0b; --warn-100: #fef3c7;
  --bad-600: #b91c1c;  --bad-500: #dc2626;  --bad-100: #fee2e2;
  --info-600: #1d4ed8; --info-500: #3b82f6; --info-100: #dbeafe;

  --radius: 10px;
  --radius-lg: 16px;
  --radius-sm: 6px;

  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "Roboto Mono", Menlo, Consolas, monospace;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;

  --shadow-sm: 0 1px 2px rgba(9, 17, 30, .06), 0 1px 3px rgba(9, 17, 30, .08);
  --shadow: 0 4px 12px rgba(9, 17, 30, .08), 0 1px 3px rgba(9, 17, 30, .06);
  --shadow-lg: 0 18px 40px rgba(9, 17, 30, .14), 0 4px 12px rgba(9, 17, 30, .08);

  --maxw: 1240px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4, h5 { margin: 0 0 .5em; line-height: 1.2; font-weight: 650; letter-spacing: -.015em; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.15em; }
code, pre, .mono { font-family: var(--mono); }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: 860px; margin: 0 auto; padding: 0 24px; }

/* ==========================================================================
   PUBLIC SITE
   ========================================================================== */
.site {
  background: var(--ink-900);
  color: #cfd9e6;
}
.site::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(900px 520px at 12% -8%, rgba(18,165,148,.16), transparent 62%),
    radial-gradient(760px 460px at 92% 4%, rgba(59,130,246,.10), transparent 60%),
    radial-gradient(700px 700px at 50% 108%, rgba(245,158,11,.07), transparent 62%);
}
.site > * { position: relative; z-index: 1; }
.site h1, .site h2, .site h3, .site h4 { color: #f2f6fb; }
.site a { text-decoration: none; }

/* ---- top nav */
.nav {
  position: sticky; top: 0; z-index: 60;
  background: rgba(7, 12, 20, .82);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.nav-in { display: flex; align-items: center; gap: 8px; height: 66px; }
.logo { display: flex; align-items: center; gap: 11px; font-weight: 700; color: #fff;
        letter-spacing: -.02em; font-size: 17px; margin-right: 18px; }
.logo-mark {
  width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand-400), var(--brand-600));
  color: #04211d; font-weight: 800; font-size: 13px; letter-spacing: -.03em;
  box-shadow: 0 0 0 1px rgba(255,255,255,.10) inset, 0 6px 18px rgba(18,165,148,.35);
}
.nav-links { display: flex; gap: 2px; align-items: center; flex: 1; }
.nav-links a, .nav-drop > button {
  padding: 8px 12px; border-radius: 8px; font-size: 14px; font-weight: 500;
  color: #b6c4d6; background: none; border: 0; cursor: pointer; font-family: inherit;
  display: inline-flex; align-items: center; gap: 6px; transition: .15s;
}
.nav-links a:hover, .nav-drop > button:hover { color: #fff; background: rgba(255,255,255,.07); }
.nav-drop { position: relative; }
.nav-drop-menu {
  position: absolute; top: calc(100% + 8px); left: 0; min-width: 330px;
  background: #0e1726; border: 1px solid rgba(255,255,255,.10);
  border-radius: 14px; padding: 8px; box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transform: translateY(-6px); transition: .16s;
}
.nav-drop:hover .nav-drop-menu, .nav-drop:focus-within .nav-drop-menu {
  opacity: 1; visibility: visible; transform: none;
}
.nav-drop-menu a { display: block; padding: 10px 12px; border-radius: 9px; }
.nav-drop-menu strong { display: block; color: #eef3f9; font-size: 13.5px; font-weight: 600; }
.nav-drop-menu span { display: block; color: #7f93ab; font-size: 12.5px; line-height: 1.45; }
.nav-cta { display: flex; gap: 8px; align-items: center; }
.nav-toggle { display: none; }

@media (max-width: 1080px) {
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; }
}

/* ---- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 17px; border-radius: 9px; font-size: 14px; font-weight: 600;
  border: 1px solid transparent; cursor: pointer; font-family: inherit;
  text-decoration: none; transition: .15s; white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--brand-400), var(--brand-600));
  color: #032823; box-shadow: 0 6px 20px rgba(18,165,148,.30);
}
.btn-primary:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn-ghost { border-color: rgba(255,255,255,.16); color: #dbe5f0; background: rgba(255,255,255,.03); }
.btn-ghost:hover { background: rgba(255,255,255,.09); border-color: rgba(255,255,255,.28); }
.btn-sm { padding: 7px 13px; font-size: 13px; }
.btn-lg { padding: 13px 24px; font-size: 15px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---- eyebrow / pills */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; font-size: 11.5px;
  font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--brand-300); padding: 6px 13px; border-radius: 100px;
  background: rgba(18,165,148,.10); border: 1px solid rgba(18,165,148,.24);
}
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--brand-400);
       box-shadow: 0 0 0 3px rgba(31,194,174,.20); }

/* ---- hero */
.hero { padding: 86px 0 60px; }
.hero h1 {
  font-size: clamp(34px, 5.4vw, 61px); line-height: 1.04; letter-spacing: -.035em;
  margin: 22px 0 20px; max-width: 15ch;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(105deg, var(--brand-300), var(--brand-500) 45%, #7dd3fc);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-lede { font-size: 17.5px; line-height: 1.62; color: #9fb0c5; max-width: 60ch; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 30px 0 0; }

.stat-strip {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px; margin-top: 56px; background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.08); border-radius: 14px; overflow: hidden;
}
.stat-strip > div { background: #0a1220; padding: 20px 22px; }
.stat-strip b { display: block; font-size: 27px; color: #fff; letter-spacing: -.03em;
                font-weight: 700; line-height: 1.1; }
.stat-strip span { font-size: 12.5px; color: #7d90a8; }

/* ---- sections */
.sec { padding: 76px 0; }
.sec-head { max-width: 68ch; margin-bottom: 44px; }
.sec-head h2 { font-size: clamp(25px, 3.2vw, 37px); letter-spacing: -.028em; margin: 16px 0 12px; }
.sec-head p { color: #93a5bb; font-size: 16px; }
.sec-alt { background: rgba(255,255,255,.022); border-block: 1px solid rgba(255,255,255,.06); }

/* ---- cards */
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(285px, 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }

.card {
  background: linear-gradient(170deg, rgba(255,255,255,.055), rgba(255,255,255,.018));
  border: 1px solid rgba(255,255,255,.09); border-radius: var(--radius-lg);
  padding: 26px; transition: .2s;
}
.card:hover { border-color: rgba(31,194,174,.34); transform: translateY(-3px);
              box-shadow: 0 20px 44px rgba(0,0,0,.34); }
.card h3 { font-size: 17.5px; margin-bottom: 9px; letter-spacing: -.018em; }
.card p { color: #93a5bb; font-size: 14.2px; margin-bottom: 14px; }
.card-tag {
  font-size: 10.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
  color: var(--brand-300); background: rgba(18,165,148,.13); padding: 4px 9px;
  border-radius: 5px; border: 1px solid rgba(18,165,148,.22);
}
.card-num {
  font-family: var(--mono); font-size: 11.5px; color: var(--brand-300);
  letter-spacing: .1em; font-weight: 600;
}

.ticks { list-style: none; padding: 0; margin: 0; }
.ticks li {
  position: relative; padding-left: 24px; font-size: 13.6px; color: #a6b6c9;
  margin-bottom: 8px; line-height: 1.5;
}
.ticks li::before {
  content: ""; position: absolute; left: 4px; top: 8px; width: 6px; height: 10px;
  border: solid var(--brand-400); border-width: 0 2px 2px 0; transform: rotate(42deg);
}
.crosses li::before {
  content: "\00d7"; border: 0; transform: none; left: 2px; top: 0;
  color: #f87171; font-size: 16px; font-weight: 700;
}

/* ---- comparison table */
.cmp { width: 100%; border-collapse: collapse; font-size: 14px; }
.cmp th, .cmp td { padding: 15px 18px; text-align: left; vertical-align: top;
                   border-bottom: 1px solid rgba(255,255,255,.07); }
.cmp th { font-size: 11.5px; letter-spacing: .09em; text-transform: uppercase;
          color: #7d90a8; font-weight: 700; }
.cmp td:first-child { color: #e5edf6; font-weight: 600; width: 20%; }
.cmp td:nth-child(2) { color: #7f8fa3; }
.cmp td:last-child { color: #cfe9e4; }
.cmp tbody tr:hover { background: rgba(255,255,255,.028); }
.cmp .col-us { background: rgba(18,165,148,.055); }

/* ---- lifecycle rail */
.rail { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }
.rail-step {
  background: rgba(255,255,255,.032); border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px; padding: 22px; position: relative; overflow: hidden;
}
.rail-step::after {
  content: ""; position: absolute; top: 0; left: 0; width: 3px; height: 100%;
  background: linear-gradient(180deg, var(--brand-400), transparent);
}
.rail-step h4 { font-size: 15.5px; margin: 10px 0 8px; }
.rail-step p { font-size: 13.4px; color: #90a2b8; margin-bottom: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  font-size: 11.5px; padding: 4px 9px; border-radius: 6px; color: #9fb3c8;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08);
}

/* ---- filter tabs */
.tabs { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 26px; }
.tab {
  padding: 8px 15px; border-radius: 100px; font-size: 13.4px; font-weight: 600;
  border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.035);
  color: #a8b8cb; cursor: pointer; font-family: inherit; transition: .15s;
}
.tab:hover { color: #fff; border-color: rgba(255,255,255,.26); }
.tab.on { background: var(--brand-500); border-color: var(--brand-500); color: #04231f; }

/* ---- FAQ */
.faq details {
  border: 1px solid rgba(255,255,255,.09); border-radius: 12px; margin-bottom: 10px;
  background: rgba(255,255,255,.028); overflow: hidden;
}
.faq summary {
  padding: 17px 22px; cursor: pointer; font-weight: 600; color: #e8eff7; font-size: 15px;
  list-style: none; display: flex; justify-content: space-between; gap: 16px; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 20px; color: var(--brand-400); font-weight: 400; }
.faq details[open] summary::after { content: "\2013"; }
.faq details > div { padding: 0 22px 19px; color: #93a5bb; font-size: 14.3px; }

/* ---- CTA band */
.cta-band {
  background: linear-gradient(135deg, rgba(18,165,148,.14), rgba(59,130,246,.09));
  border: 1px solid rgba(31,194,174,.24); border-radius: 22px; padding: 50px;
  text-align: center; margin: 60px 0;
}
.cta-band h2 { font-size: clamp(23px, 3vw, 33px); margin-bottom: 12px; }
.cta-band p { color: #a4b6ca; max-width: 60ch; margin: 0 auto 26px; }

/* ---- footer */
.foot { border-top: 1px solid rgba(255,255,255,.08); padding: 52px 0 30px; margin-top: 40px;
        background: rgba(0,0,0,.24); }
.foot-grid { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 34px; }
.foot h5 { font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase;
           color: #6f829a; margin-bottom: 14px; font-weight: 700; }
.foot a { display: block; color: #8ea0b6; font-size: 13.4px; padding: 4px 0; }
.foot a:hover { color: var(--brand-300); }
.foot-bottom {
  display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  border-top: 1px solid rgba(255,255,255,.07); margin-top: 36px; padding-top: 22px;
  font-size: 12.6px; color: #66798f;
}
@media (max-width: 900px) { .foot-grid { grid-template-columns: 1fr 1fr; } }

/* ---- forms on dark */
.site .field { margin-bottom: 16px; }
.site label, .work label {
  display: block; font-size: 12.6px; font-weight: 600; margin-bottom: 6px;
  letter-spacing: .01em;
}
.site label { color: #a8b8cb; }
.site input, .site select, .site textarea {
  width: 100%; padding: 11px 13px; border-radius: 9px; font-size: 14px;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.13);
  color: #eaf1f8; font-family: inherit;
}
.site input:focus, .site select:focus, .site textarea:focus {
  outline: none; border-color: var(--brand-400); background: rgba(255,255,255,.08);
  box-shadow: 0 0 0 3px rgba(18,165,148,.16);
}
.site option { background: #0e1726; color: #eaf1f8; }
.site input::placeholder, .site textarea::placeholder { color: #62748b; }
.row { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; }
.row-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 700px) { .row, .row-3 { grid-template-columns: 1fr; } }
.check { display: flex; gap: 9px; align-items: flex-start; font-size: 13.6px; }
.check input { width: auto; margin-top: 3px; flex: 0 0 auto; }

.panel {
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.10);
  border-radius: var(--radius-lg); padding: 28px;
}

/* code blocks on dark */
.code {
  background: #060b13; border: 1px solid rgba(255,255,255,.10); border-radius: 11px;
  padding: 16px 18px; font-family: var(--mono); font-size: 12.6px; color: #a5d6cd;
  overflow-x: auto; line-height: 1.65; white-space: pre;
}
.code .k { color: #7dd3fc; } .code .s { color: #fbbf24; } .code .n { color: #f472b6; }

/* method badges */
.meth { font-family: var(--mono); font-size: 11px; font-weight: 700; padding: 3px 8px;
        border-radius: 5px; letter-spacing: .05em; }
.meth-get { background: rgba(59,130,246,.16); color: #93c5fd; border: 1px solid rgba(59,130,246,.32); }
.meth-post { background: rgba(22,163,74,.16); color: #86efac; border: 1px solid rgba(22,163,74,.32); }

/* ==========================================================================
   WORKSPACE
   ========================================================================== */
.work { background: var(--slate-100); color: #1c2836; display: flex; min-height: 100vh; }

.side {
  width: 254px; flex: 0 0 254px; background: var(--ink-850); color: #b9c7d8;
  padding: 0 0 24px; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.side::-webkit-scrollbar { width: 6px; }
.side::-webkit-scrollbar-thumb { background: rgba(255,255,255,.14); border-radius: 3px; }
.side-logo {
  display: flex; align-items: center; gap: 11px; padding: 18px 20px;
  border-bottom: 1px solid rgba(255,255,255,.08); color: #fff; font-weight: 700;
  text-decoration: none; font-size: 15.5px; letter-spacing: -.02em;
  position: sticky; top: 0; background: var(--ink-850); z-index: 2;
}
.side-org {
  padding: 13px 20px; border-bottom: 1px solid rgba(255,255,255,.07);
  font-size: 12.4px; color: #7e91a8;
}
.side-org b { display: block; color: #dce6f1; font-size: 13.6px; font-weight: 600;
              letter-spacing: -.01em; }
.side-sec { padding: 18px 20px 6px; font-size: 10.5px; letter-spacing: .12em;
            text-transform: uppercase; color: #5d7089; font-weight: 700; }
.side a.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 8.5px 20px; font-size: 13.6px;
  color: #a3b4c8; text-decoration: none; border-left: 3px solid transparent; transition: .13s;
}
.side a.nav-item:hover { background: rgba(255,255,255,.055); color: #fff; }
.side a.nav-item.on {
  background: rgba(18,165,148,.14); color: #fff; border-left-color: var(--brand-400);
  font-weight: 600;
}
.nav-ico { width: 17px; text-align: center; opacity: .85; flex: 0 0 17px; font-size: 13px; }
.nav-count {
  margin-left: auto; font-size: 11px; background: rgba(255,255,255,.11);
  padding: 1px 7px; border-radius: 20px; font-weight: 600;
}
.nav-count.hot { background: var(--bad-500); color: #fff; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  background: #fff; border-bottom: 1px solid var(--slate-200); padding: 0 26px;
  height: 60px; display: flex; align-items: center; gap: 14px;
  position: sticky; top: 0; z-index: 40;
}
.topbar h1 { font-size: 17.5px; margin: 0; letter-spacing: -.02em; color: #0f1c2e; }
.topbar .sub { font-size: 12.6px; color: var(--slate-500); }
.spacer { flex: 1; }
.content { padding: 24px 26px 60px; }

.avatar {
  width: 33px; height: 33px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand-400), var(--brand-600));
  color: #04231f; font-weight: 700; font-size: 12.5px;
}
.user-menu { position: relative; }
.user-menu-panel {
  position: absolute; right: 0; top: calc(100% + 10px); background: #fff;
  border: 1px solid var(--slate-200); border-radius: 12px; box-shadow: var(--shadow-lg);
  min-width: 236px; padding: 7px; opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: .15s; z-index: 50;
}
.user-menu:hover .user-menu-panel, .user-menu:focus-within .user-menu-panel {
  opacity: 1; visibility: visible; transform: none;
}
.user-menu-panel a { display: block; padding: 8px 11px; border-radius: 8px; font-size: 13.4px;
                     color: #33465e; text-decoration: none; }
.user-menu-panel a:hover { background: var(--slate-100); }
.user-menu-head { padding: 10px 11px; border-bottom: 1px solid var(--slate-200);
                  margin-bottom: 5px; }
.user-menu-head b { display: block; font-size: 13.6px; color: #0f1c2e; }
.user-menu-head span { font-size: 12px; color: var(--slate-500); }

/* ---- workspace cards & tables */
.wcard {
  background: #fff; border: 1px solid var(--slate-200); border-radius: 12px;
  box-shadow: var(--shadow-sm); margin-bottom: 18px; overflow: hidden;
}
.wcard-head {
  padding: 15px 19px; border-bottom: 1px solid var(--slate-200);
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.wcard-head h3 { margin: 0; font-size: 14.6px; letter-spacing: -.012em; color: #14212f; }
.wcard-head .hint { font-size: 12.2px; color: var(--slate-500); font-weight: 400; }
.wcard-body { padding: 19px; }
.wcard-body.flush { padding: 0; }

.kpis { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
        margin-bottom: 18px; }
.kpi {
  background: #fff; border: 1px solid var(--slate-200); border-radius: 12px; padding: 17px 19px;
  box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
}
.kpi::after { content: ""; position: absolute; left: 0; top: 0; width: 100%; height: 3px;
              background: var(--brand-500); }
.kpi.ok::after { background: var(--ok-500); }
.kpi.warn::after { background: var(--warn-500); }
.kpi.bad::after { background: var(--bad-500); }
.kpi-label { font-size: 11.4px; text-transform: uppercase; letter-spacing: .085em;
             color: var(--slate-500); font-weight: 700; margin-bottom: 7px; }
.kpi-value { font-size: 29px; font-weight: 700; letter-spacing: -.035em; color: #0f1c2e;
             line-height: 1.05; }
.kpi-value small { font-size: 15px; font-weight: 600; color: var(--slate-500); }
.kpi-note { font-size: 12.2px; color: var(--slate-500); margin-top: 6px; line-height: 1.45; }

table.data { width: 100%; border-collapse: collapse; font-size: 13.2px; }
table.data th {
  text-align: left; padding: 10px 14px; font-size: 10.8px; letter-spacing: .085em;
  text-transform: uppercase; color: var(--slate-500); font-weight: 700;
  background: var(--slate-50); border-bottom: 1px solid var(--slate-200);
  position: sticky; top: 0; z-index: 1; white-space: nowrap;
}
table.data td { padding: 10px 14px; border-bottom: 1px solid var(--slate-100);
                vertical-align: middle; }
table.data tbody tr:hover { background: #fafcfe; }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data a { color: var(--info-600); text-decoration: none; font-weight: 500; }
table.data a:hover { text-decoration: underline; }
.num { text-align: right; font-variant-numeric: tabular-nums; font-family: var(--mono);
       font-size: 12.4px; }
.tbl-scroll { overflow-x: auto; }
.tbl-scroll table.data { min-width: 640px; }

/* ---- badges */
.badge {
  display: inline-flex; align-items: center; gap: 5px; font-size: 11.2px; font-weight: 650;
  padding: 3px 9px; border-radius: 100px; letter-spacing: .01em; white-space: nowrap;
  border: 1px solid transparent;
}
.b-ok { background: var(--ok-100); color: var(--ok-600); border-color: #bbf7d0; }
.b-warn { background: var(--warn-100); color: var(--warn-600); border-color: #fde68a; }
.b-bad { background: var(--bad-100); color: var(--bad-600); border-color: #fecaca; }
.b-info { background: var(--info-100); color: var(--info-600); border-color: #bfdbfe; }
.b-mute { background: var(--slate-100); color: var(--slate-600); border-color: var(--slate-200); }
.b-brand { background: var(--brand-100); color: var(--brand-600); border-color: #a7ede2; }

/* ---- meters */
.meter { height: 7px; background: var(--slate-200); border-radius: 20px; overflow: hidden; }
.meter > i { display: block; height: 100%; border-radius: 20px; background: var(--brand-500); }
.meter.ok > i { background: var(--ok-500); }
.meter.warn > i { background: var(--warn-500); }
.meter.bad > i { background: var(--bad-500); }
.meter-lg { height: 10px; }

/* ---- workspace forms */
.work input, .work select, .work textarea {
  width: 100%; padding: 8.5px 11px; border: 1px solid var(--slate-300); border-radius: 8px;
  font-size: 13.4px; font-family: inherit; color: #1c2836; background: #fff;
}
.work input:focus, .work select:focus, .work textarea:focus {
  outline: none; border-color: var(--brand-500); box-shadow: 0 0 0 3px rgba(18,165,148,.14);
}
.work label { color: #46586f; }
.work textarea { min-height: 92px; resize: vertical; line-height: 1.55; }
.work .field { margin-bottom: 13px; }
.wbtn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 8.5px 15px; border-radius: 8px; font-size: 13.2px; font-weight: 600;
  border: 1px solid var(--slate-300); background: #fff; color: #33465e; cursor: pointer;
  font-family: inherit; text-decoration: none; transition: .14s; white-space: nowrap;
}
.wbtn:hover { border-color: var(--slate-400); background: var(--slate-50); }
.wbtn-primary { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }
.wbtn-primary:hover { background: var(--brand-500); border-color: var(--brand-500); }
.wbtn-ok { background: var(--ok-600); border-color: var(--ok-600); color: #fff; }
.wbtn-ok:hover { filter: brightness(1.1); }
.wbtn-bad { background: #fff; border-color: #fca5a5; color: var(--bad-600); }
.wbtn-bad:hover { background: var(--bad-100); }
.wbtn-sm { padding: 5.5px 11px; font-size: 12.2px; }
.wbtn:disabled { opacity: .45; cursor: not-allowed; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---- filter bar */
.filters {
  display: flex; gap: 9px; flex-wrap: wrap; align-items: flex-end; padding: 13px 19px;
  background: var(--slate-50); border-bottom: 1px solid var(--slate-200);
}
.filters .field { margin: 0; min-width: 138px; }
.filters label { font-size: 10.8px; text-transform: uppercase; letter-spacing: .07em;
                 color: var(--slate-500); }

/* ---- flash */
.flashes { padding: 12px 26px 0; }
.flash {
  padding: 11px 15px; border-radius: 9px; font-size: 13.4px; margin-bottom: 9px;
  border: 1px solid; display: flex; gap: 10px; align-items: flex-start;
}
.flash-success { background: var(--ok-100); border-color: #bbf7d0; color: #14532d; }
.flash-error { background: var(--bad-100); border-color: #fecaca; color: #7f1d1d; }
.flash-warning { background: var(--warn-100); border-color: #fde68a; color: #78350f; }
.site .flash { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.16);
               color: #e6eef7; }

/* ---- misc */
.muted { color: var(--slate-500); }
.small { font-size: 12.4px; }
.tiny { font-size: 11.4px; }
.strong { font-weight: 650; }
.right { text-align: right; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.mt0 { margin-top: 0; } .mb0 { margin-bottom: 0; }
.mt16 { margin-top: 16px; } .mt24 { margin-top: 24px; } .mb16 { margin-bottom: 16px; }
.flex { display: flex; gap: 12px; align-items: center; }
.flex-wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.stack { display: grid; gap: 16px; }
.cols-2 { display: grid; grid-template-columns: 1.6fr 1fr; gap: 18px; align-items: start; }
.cols-2-even { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
@media (max-width: 1080px) { .cols-2, .cols-2-even { grid-template-columns: 1fr; } }

.empty { padding: 44px 24px; text-align: center; color: var(--slate-500); }
.empty h4 { color: #33465e; font-size: 15px; margin-bottom: 7px; }

.note {
  padding: 12px 15px; border-radius: 9px; font-size: 12.8px; line-height: 1.55;
  border-left: 3px solid; background: var(--slate-50); color: #44566d;
}
.note-warn { background: #fffbeb; border-color: var(--warn-500); color: #78350f; }
.note-info { background: #eff6ff; border-color: var(--info-500); color: #1e3a8a; }
.note-bad { background: #fef2f2; border-color: var(--bad-500); color: #7f1d1d; }

.verify {
  font-size: 11px; color: var(--warn-600); background: var(--warn-100);
  border: 1px solid #fde68a; padding: 2px 7px; border-radius: 5px; font-weight: 600;
  display: inline-block;
}

.kv { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; font-size: 13.2px; }
.kv dt { color: var(--slate-500); font-weight: 600; font-size: 12.2px; }
.kv dd { margin: 0; color: #1c2836; }

.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li {
  position: relative; padding: 0 0 15px 22px; border-left: 2px solid var(--slate-200);
  margin-left: 5px;
}
.timeline li::before {
  content: ""; position: absolute; left: -6px; top: 4px; width: 10px; height: 10px;
  border-radius: 50%; background: #fff; border: 2px solid var(--brand-500);
}
.timeline li:last-child { border-left-color: transparent; }
.timeline b { font-size: 13.2px; }
.timeline span { display: block; font-size: 12.2px; color: var(--slate-500); }

/* heatmap */
.heat { display: grid; gap: 7px; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); }
.heat-cell { padding: 12px 13px; border-radius: 9px; border: 1px solid; }
.heat-good { background: var(--ok-100); border-color: #bbf7d0; }
.heat-watch { background: var(--warn-100); border-color: #fde68a; }
.heat-bad { background: var(--bad-100); border-color: #fecaca; }
.heat-cell b { display: block; font-size: 20px; letter-spacing: -.03em; }
.heat-cell span { font-size: 11.8px; color: var(--slate-600); }

/* mini bar chart */
.bars { display: flex; align-items: flex-end; gap: 8px; height: 128px; padding-top: 10px; }
.bars > div { flex: 1; display: flex; flex-direction: column; justify-content: flex-end;
              align-items: center; gap: 6px; height: 100%; }
.bars i { display: block; width: 100%; background: var(--brand-500); border-radius: 5px 5px 0 0;
          min-height: 3px; transition: .3s; }
.bars .lbl { font-size: 10.6px; color: var(--slate-500); white-space: nowrap; }
.bars .val { font-size: 11px; font-weight: 700; color: #33465e; }

/* calendar */
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.cal-h { font-size: 10.6px; text-transform: uppercase; letter-spacing: .08em;
         color: var(--slate-500); font-weight: 700; text-align: center; padding: 5px 0; }
.cal-d { min-height: 84px; border: 1px solid var(--slate-200); border-radius: 8px;
         padding: 5px 6px; background: #fff; }
.cal-d.pad { background: var(--slate-50); border-style: dashed; }
.cal-d.today { border-color: var(--brand-500); box-shadow: 0 0 0 2px rgba(18,165,148,.16); }
.cal-n { font-size: 11px; font-weight: 700; color: var(--slate-500); }
.cal-item { font-size: 10.4px; padding: 2px 5px; border-radius: 4px; margin-top: 3px;
            display: block; text-decoration: none; overflow: hidden;
            text-overflow: ellipsis; white-space: nowrap; }
.cal-pending { background: var(--warn-100); color: #78350f; }
.cal-approved { background: var(--ok-100); color: #14532d; }
.cal-submitted { background: var(--info-100); color: #1e3a8a; }
.cal-rejected { background: var(--bad-100); color: #7f1d1d; }

/* demo banner */
.demo-bar {
  background: linear-gradient(90deg, var(--accent-500), var(--accent-600));
  color: #fff; padding: 7px 26px; font-size: 12.6px; display: flex; gap: 14px;
  align-items: center; flex-wrap: wrap;
}
.demo-bar a { color: #fff; text-decoration: underline; font-weight: 600; }
.demo-bar .pill {
  background: rgba(255,255,255,.22); padding: 2px 9px; border-radius: 20px;
  font-weight: 700; font-size: 11.4px;
}

/* auth pages */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
@media (max-width: 940px) { .auth-wrap { grid-template-columns: 1fr; }
                            .auth-aside { display: none; } }
.auth-aside { padding: 56px 52px; display: flex; flex-direction: column;
              justify-content: center; border-right: 1px solid rgba(255,255,255,.08); }
.auth-main { padding: 48px 40px; display: flex; flex-direction: column;
             justify-content: center; max-width: 520px; width: 100%; margin: 0 auto; }

.print-only { display: none; }
@media print {
  .side, .topbar, .demo-bar, .nav, .foot, .no-print { display: none !important; }
  .work { display: block; background: #fff; }
  .content { padding: 0; }
  .print-only { display: block; }
  .wcard { break-inside: avoid; box-shadow: none; }
}

/* ==========================================================================
   DARK MODE
   The public site is dark by design. This inverts the *workspace* surfaces
   (.work, .ess, .tools) when the user asks for it. Tokens first, so anything
   built later inherits the theme without new rules.
   ========================================================================== */
:root[data-theme="dark"] {
  --slate-600: #93a3b8;
  --slate-500: #8496ab;
  --slate-400: #6b7c92;
  --slate-300: #33445c;
  --slate-200: #24354b;
  --slate-100: #16243a;
  --slate-50:  #101c2e;
  --white: #0d1826;

  --brand-100: #10312d;
  --ok-100: #0f2a1b;
  --warn-100: #33230a;
  --bad-100: #331416;
  --info-100: #0f2340;

  --ok-600: #4ade80;
  --warn-600: #fbbf24;
  --bad-600: #f87171;
  --info-600: #7dd3fc;
  --brand-600: #2dd4bf;

  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow: 0 4px 14px rgba(0,0,0,.45);
  --shadow-lg: 0 18px 44px rgba(0,0,0,.6);
}

:root[data-theme="dark"] .work,
:root[data-theme="dark"] .ess,
:root[data-theme="dark"] .tools { background: #0a1422; color: #d6e0ec; }

:root[data-theme="dark"] .topbar,
:root[data-theme="dark"] .wcard,
:root[data-theme="dark"] .kpi,
:root[data-theme="dark"] .cal-d,
:root[data-theme="dark"] .user-menu-panel,
:root[data-theme="dark"] .ess-nav,
:root[data-theme="dark"] dialog {
  background: #101d2f; border-color: #24354b; color: #d6e0ec;
}

:root[data-theme="dark"] .topbar h1,
:root[data-theme="dark"] .wcard-head h3,
:root[data-theme="dark"] .kpi-value,
:root[data-theme="dark"] .empty h4,
:root[data-theme="dark"] .kv dd,
:root[data-theme="dark"] .work h1, :root[data-theme="dark"] .work h2,
:root[data-theme="dark"] .work h3, :root[data-theme="dark"] .work h4,
:root[data-theme="dark"] .tools h1, :root[data-theme="dark"] .tools h2,
:root[data-theme="dark"] .tools h3, :root[data-theme="dark"] .tools h4,
:root[data-theme="dark"] .ess h3 { color: #eef4fb; }

:root[data-theme="dark"] .wcard-head,
:root[data-theme="dark"] .filters,
:root[data-theme="dark"] table.data th { background: #16243a; border-color: #24354b; }
:root[data-theme="dark"] table.data td { border-color: #1d2d44; }
:root[data-theme="dark"] table.data tbody tr:hover { background: #16243a; }
:root[data-theme="dark"] table.data a { color: #7dd3fc; }

:root[data-theme="dark"] .work input, :root[data-theme="dark"] .work select,
:root[data-theme="dark"] .work textarea,
:root[data-theme="dark"] .tools input, :root[data-theme="dark"] .tools select,
:root[data-theme="dark"] .tools textarea,
:root[data-theme="dark"] .ess input, :root[data-theme="dark"] .ess select,
:root[data-theme="dark"] .ess textarea {
  background: #0c1728; border-color: #2c3f59; color: #e6eef7;
}
:root[data-theme="dark"] option { background: #101d2f; color: #e6eef7; }

:root[data-theme="dark"] .wbtn { background: #16243a; border-color: #2c3f59; color: #cfdcea; }
:root[data-theme="dark"] .wbtn:hover { background: #1d2d44; border-color: #3a5273; }
:root[data-theme="dark"] .wbtn-primary { background: var(--brand-600); border-color: var(--brand-600); color: #04231f; }
:root[data-theme="dark"] .wbtn-ok { background: #16a34a; border-color: #16a34a; color: #fff; }
:root[data-theme="dark"] .wbtn-bad { background: #16243a; border-color: #7f1d1d; color: #fca5a5; }

:root[data-theme="dark"] .note { background: #16243a; color: #b6c6d8; }
:root[data-theme="dark"] .note-warn { background: #2a1f0c; color: #fcd9a0; }
:root[data-theme="dark"] .note-info { background: #0f2340; color: #bcd8f5; }
:root[data-theme="dark"] .note-bad { background: #2b1315; color: #fca5a5; }
:root[data-theme="dark"] .meter { background: #24354b; }
:root[data-theme="dark"] .muted, :root[data-theme="dark"] .kv dt { color: #8496ab; }
:root[data-theme="dark"] .timeline li { border-left-color: #24354b; }
:root[data-theme="dark"] .timeline li::before { background: #101d2f; }
:root[data-theme="dark"] .cal-d.pad { background: #0c1728; }
:root[data-theme="dark"] .tab { background: #16243a; border-color: #2c3f59; color: #a9bacd; }
:root[data-theme="dark"] .tab.on { background: var(--brand-600); border-color: var(--brand-600); color: #04231f; }
:root[data-theme="dark"] .heat-good { background: #0f2a1b; border-color: #1c4530; }
:root[data-theme="dark"] .heat-watch { background: #33230a; border-color: #5b4212; }
:root[data-theme="dark"] .heat-bad { background: #331416; border-color: #5f1f22; }
:root[data-theme="dark"] .heat-cell span { color: #a9bacd; }
:root[data-theme="dark"] .bars .val { color: #cfdcea; }
:root[data-theme="dark"] .flash-success { background: #0f2a1b; border-color: #1c4530; color: #86efac; }
:root[data-theme="dark"] .flash-error { background: #2b1315; border-color: #5f1f22; color: #fca5a5; }
:root[data-theme="dark"] .flash-warning { background: #2a1f0c; border-color: #5b4212; color: #fcd9a0; }

.theme-toggle {
  background: none; border: 1px solid var(--slate-300); color: inherit;
  width: 33px; height: 33px; border-radius: 8px; cursor: pointer;
  font-size: 14px; display: grid; place-items: center; font-family: inherit;
  transition: .15s; flex: 0 0 auto; padding: 0;
}
.theme-toggle:hover { background: var(--slate-100); }
.site .theme-toggle { border-color: rgba(255,255,255,.18); color: #dbe5f0; }
.site .theme-toggle:hover { background: rgba(255,255,255,.08); }
.ess-top .theme-toggle { border-color: rgba(255,255,255,.2); color: #dbe5f0; }

/* ==========================================================================
   CHARTS — inline SVG, no library
   ========================================================================== */
.chart-wrap { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.donut { flex: 0 0 auto; }
.legend { list-style: none; padding: 0; margin: 0; flex: 1; min-width: 190px; }
.legend li { display: flex; align-items: center; gap: 9px; padding: 5px 0;
             font-size: 12.8px; border-bottom: 1px solid var(--slate-100); }
.legend li:last-child { border-bottom: 0; }
.legend .sw { width: 11px; height: 11px; border-radius: 3px; flex: 0 0 auto; }
.legend .lv { margin-left: auto; font-weight: 700; font-variant-numeric: tabular-nums; }
.legend .lp { color: var(--slate-500); font-size: 11.6px; width: 48px; text-align: right; }
.donut-centre { font-weight: 700; letter-spacing: -.04em; }

.map-wrap { position: relative; }
.map-wrap svg { width: 100%; height: auto; display: block; }
.map-outline { fill: var(--slate-100); stroke: var(--slate-300); stroke-width: .9; }
:root[data-theme="dark"] .map-outline { fill: #16243a; stroke: #2c3f59; }
.map-pin { cursor: pointer; transition: .15s; }
.map-pin:hover { filter: brightness(1.2); }
.map-pin circle.pin { stroke: #fff; stroke-width: 1.4; }
:root[data-theme="dark"] .map-pin circle.pin { stroke: #101d2f; }
.map-tip {
  position: absolute; pointer-events: none; background: var(--ink-850); color: #fff;
  padding: 9px 12px; border-radius: 9px; font-size: 11.8px; line-height: 1.55;
  box-shadow: var(--shadow-lg); opacity: 0; transition: opacity .12s; max-width: 240px;
  z-index: 20;
}
.map-tip.on { opacity: 1; }
.map-tip b { display: block; font-size: 12.8px; margin-bottom: 3px; }

/* ==========================================================================
   FREE TOOLS
   ========================================================================== */
.tools { background: var(--slate-100); min-height: 100vh; color: #1c2836; }
.tools-top {
  background: var(--ink-850); color: #fff; padding: 0 24px; height: 60px;
  display: flex; align-items: center; gap: 14px; position: sticky; top: 0; z-index: 40;
}
.tools-top a { color: #b6c4d6; text-decoration: none; font-size: 13.6px; }
.tools-top a:hover { color: #fff; }
.tools-top .logo { margin-right: 8px; font-size: 15.5px; }
.tools-wrap { max-width: 1120px; margin: 0 auto; padding: 26px 20px 70px; }
.tool-grid { display: grid; gap: 13px; grid-template-columns: repeat(auto-fill, minmax(258px, 1fr)); }
.tool-card {
  background: #fff; border: 1px solid var(--slate-200); border-radius: 12px;
  padding: 18px; text-decoration: none; color: inherit; display: block;
  box-shadow: var(--shadow-sm); transition: .15s;
}
.tool-card:hover { border-color: var(--brand-500); transform: translateY(-2px);
                   box-shadow: var(--shadow); }
:root[data-theme="dark"] .tool-card { background: #101d2f; border-color: #24354b; }
.tool-ico {
  width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center;
  background: var(--brand-100); color: var(--brand-600); font-size: 16px;
  font-weight: 700; margin-bottom: 11px;
}
.tool-card h3 { font-size: 14.8px; margin: 0 0 6px; }
.tool-card p { font-size: 12.8px; color: var(--slate-500); margin: 0; line-height: 1.55; }

.calc-grid { display: grid; grid-template-columns: 375px 1fr; gap: 18px; align-items: start; }
@media (max-width: 940px) { .calc-grid { grid-template-columns: 1fr; } }
.bignum { font-size: 34px; font-weight: 700; letter-spacing: -.035em; line-height: 1.05; }
.workings { width: 100%; border-collapse: collapse; font-size: 12.8px; }
.workings td { padding: 6px 10px; border-bottom: 1px solid var(--slate-100); }
.workings tr:last-child td { border-bottom: 0; }
.workings .tot td { font-weight: 700; border-top: 2px solid var(--slate-300);
                    border-bottom: 0; }
.workings .num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---- map refinements: graticule, land fill, pin styling ---- */
.map-grat line { stroke: var(--slate-200); stroke-width: .6; stroke-dasharray: 3 4; }
.map-grat text { font-size: 7px; fill: var(--slate-400); font-family: var(--mono); }
:root[data-theme="dark"] .map-grat line { stroke: #1d2d44; }
:root[data-theme="dark"] .map-grat text { fill: #4c5f78; }

.map-outline {
  fill: var(--slate-200);
  stroke: var(--slate-400);
  stroke-width: 1;
  stroke-linejoin: round;
}
:root[data-theme="dark"] .map-outline { fill: #1a2a40; stroke: #3a5273; }

.map-pin circle.halo { transition: r .15s; }
.map-pin:hover circle.halo { r: 22; }

/* ==========================================================================
   FREE TOOLS — premium surface
   A distinct visual identity from the workspace: warmer, more spacious, with a
   per-tool accent colour that carries from the card into the calculator page.
   ========================================================================== */

:root {
  --t-violet-1:#8b5cf6; --t-violet-2:#6d28d9;
  --t-indigo-1:#6366f1; --t-indigo-2:#4338ca;
  --t-cyan-1:#06b6d4;   --t-cyan-2:#0e7490;
  --t-teal-1:#14b8a6;   --t-teal-2:#0f766e;
  --t-emerald-1:#10b981;--t-emerald-2:#047857;
  --t-lime-1:#84cc16;   --t-lime-2:#4d7c0f;
  --t-amber-1:#f59e0b;  --t-amber-2:#b45309;
  --t-orange-1:#f97316; --t-orange-2:#c2410c;
  --t-rose-1:#f43f5e;   --t-rose-2:#be123c;
  --t-pink-1:#ec4899;   --t-pink-2:#be185d;
  --t-fuchsia-1:#d946ef;--t-fuchsia-2:#a21caf;
  --t-blue-1:#3b82f6;   --t-blue-2:#1d4ed8;
  --t-sky-1:#0ea5e9;    --t-sky-2:#0369a1;
}

.tools {
  background:
    radial-gradient(1100px 600px at 8% -10%, rgba(139,92,246,.07), transparent 60%),
    radial-gradient(900px 520px at 100% 0%, rgba(20,184,166,.07), transparent 58%),
    var(--slate-50);
  min-height: 100vh;
}
:root[data-theme="dark"] .tools {
  background:
    radial-gradient(1100px 600px at 8% -10%, rgba(139,92,246,.13), transparent 60%),
    radial-gradient(900px 520px at 100% 0%, rgba(20,184,166,.11), transparent 58%),
    #0a1422;
}

.tools-top {
  background: rgba(11,18,32,.92);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid rgba(255,255,255,.07);
}

/* ---------------------------------------------------------------- hero */
.t-hero { padding: 34px 0 30px; }
.t-hero .eyebrow {
  display: inline-flex; align-items: center; gap: 8px; font-size: 11px;
  font-weight: 700; letter-spacing: .11em; text-transform: uppercase;
  color: var(--t-teal-2); background: rgba(20,184,166,.11);
  border: 1px solid rgba(20,184,166,.26); padding: 6px 13px; border-radius: 100px;
}
:root[data-theme="dark"] .t-hero .eyebrow { color: #5eead4; }
.t-hero h1 {
  font-size: clamp(28px, 4.4vw, 44px); letter-spacing: -.038em; line-height: 1.08;
  margin: 16px 0 12px; max-width: 20ch;
}
.t-hero h1 em {
  font-style: normal;
  background: linear-gradient(100deg, var(--t-violet-1), var(--t-teal-1) 60%, var(--t-cyan-1));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.t-hero p { font-size: 16px; line-height: 1.68; color: var(--slate-500); max-width: 64ch; }

/* ---------------------------------------------------------------- cards */
.t-cat { margin: 34px 0 14px; }
.t-cat h2 { font-size: 15px; letter-spacing: -.01em; margin: 0 0 3px;
            display: flex; align-items: center; gap: 10px; }
.t-cat h2::after {
  content: ""; flex: 1; height: 1px;
  background: linear-gradient(90deg, var(--slate-200), transparent);
}
.t-cat p { font-size: 12.8px; color: var(--slate-500); margin: 0; }

.tool-grid { display: grid; gap: 14px;
             grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); }

.tool-card {
  position: relative; display: block; text-decoration: none; color: inherit;
  background: #fff; border: 1px solid var(--slate-200); border-radius: 15px;
  padding: 20px 20px 18px; overflow: hidden;
  box-shadow: 0 1px 2px rgba(15,28,46,.05);
  transition: transform .18s cubic-bezier(.2,.7,.3,1), box-shadow .18s, border-color .18s;
}
:root[data-theme="dark"] .tool-card { background: #101d2f; border-color: #24354b; }
.tool-card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: linear-gradient(90deg, var(--c1), var(--c2));
  opacity: 0; transition: opacity .18s;
}
.tool-card:hover { transform: translateY(-3px); border-color: transparent;
                   box-shadow: 0 14px 34px rgba(15,28,46,.13); }
.tool-card:hover::before { opacity: 1; }
:root[data-theme="dark"] .tool-card:hover { box-shadow: 0 14px 34px rgba(0,0,0,.5); }

.tool-ico {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  font-size: 18px; font-weight: 700; color: #fff; margin-bottom: 13px;
  background: linear-gradient(135deg, var(--c1), var(--c2));
  box-shadow: 0 5px 14px -4px var(--c1);
}
.tool-card h3 { font-size: 15.2px; margin: 0 0 7px; letter-spacing: -.012em; }
.tool-card p { font-size: 12.9px; color: var(--slate-500); margin: 0; line-height: 1.58; }
.tool-card .go {
  margin-top: 13px; font-size: 12.2px; font-weight: 650; color: var(--c2);
  display: inline-flex; align-items: center; gap: 5px;
  opacity: 0; transform: translateX(-4px); transition: .18s;
}
:root[data-theme="dark"] .tool-card .go { color: var(--c1); }
.tool-card:hover .go { opacity: 1; transform: none; }
.tool-badge {
  position: absolute; top: 16px; right: 16px; font-size: 10px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; color: var(--slate-400);
  border: 1px solid var(--slate-200); border-radius: 5px; padding: 2px 6px;
}

/* -------------------------------------------------------- calculator page */
.calc-hero { padding: 8px 0 22px; }
.calc-hero .back { font-size: 12.8px; font-weight: 600; text-decoration: none;
                   color: var(--slate-500); }
.calc-hero .back:hover { color: var(--c2); }
.calc-hero-row { display: flex; gap: 16px; align-items: flex-start; margin-top: 14px; }
.calc-hero h1 { font-size: clamp(24px, 3.4vw, 33px); letter-spacing: -.032em;
                margin: 0 0 9px; line-height: 1.12; }
.calc-hero p { font-size: 14.6px; line-height: 1.68; color: var(--slate-500);
               max-width: 72ch; margin: 0; }

.calc-card {
  background: #fff; border: 1px solid var(--slate-200); border-radius: 15px;
  box-shadow: 0 1px 2px rgba(15,28,46,.05); margin-bottom: 16px; overflow: hidden;
}
:root[data-theme="dark"] .calc-card { background: #101d2f; border-color: #24354b; }
.calc-card > header {
  padding: 15px 20px; border-bottom: 1px solid var(--slate-200);
  display: flex; align-items: center; gap: 11px; flex-wrap: wrap;
}
:root[data-theme="dark"] .calc-card > header { border-color: #24354b; }
.calc-card > header h3 { margin: 0; font-size: 14.4px; letter-spacing: -.012em; }
.calc-card > header .hint { font-size: 12.2px; color: var(--slate-500); }
.calc-body { padding: 20px; }
.calc-body.flush { padding: 0; }

/* the headline answer */
.answer {
  background: linear-gradient(135deg, var(--c1), var(--c2));
  color: #fff; padding: 26px 24px; border-radius: 15px; margin-bottom: 16px;
  box-shadow: 0 12px 30px -12px var(--c1);
  position: relative; overflow: hidden;
}
.answer::after {
  content: ""; position: absolute; right: -50px; top: -60px;
  width: 210px; height: 210px; border-radius: 50%;
  background: rgba(255,255,255,.10);
}
.answer .lbl { font-size: 11.4px; text-transform: uppercase; letter-spacing: .1em;
               opacity: .85; font-weight: 700; }
.answer .big { font-size: clamp(34px, 5vw, 46px); font-weight: 800;
               letter-spacing: -.045em; line-height: 1.04; margin: 6px 0 0;
               font-variant-numeric: tabular-nums; }
.answer .sub { font-size: 13.2px; opacity: .9; margin-top: 8px; }
.answer .split { display: flex; gap: 26px; flex-wrap: wrap; align-items: flex-end;
                 position: relative; z-index: 1; }
.answer .split > div { min-width: 120px; }
.answer .mid { font-size: 22px; font-weight: 700; letter-spacing: -.03em;
               font-variant-numeric: tabular-nums; }
.answer a { color: #fff; }

/* working tables */
.workings { width: 100%; border-collapse: collapse; font-size: 13px; }
.workings td { padding: 9px 20px; border-bottom: 1px solid var(--slate-100); }
:root[data-theme="dark"] .workings td { border-color: #1d2d44; }
.workings tr:last-child td { border-bottom: 0; }
.workings .num { text-align: right; font-variant-numeric: tabular-nums;
                 font-family: var(--mono); font-size: 12.4px; }
.workings .tot td { font-weight: 700; background: var(--slate-50);
                    border-top: 1.5px solid var(--slate-300); border-bottom: 0; }
:root[data-theme="dark"] .workings .tot td { background: #16243a; border-top-color: #33445c; }
.workings tr:hover td { background: color-mix(in srgb, var(--c1) 5%, transparent); }

/* form fields on the tools surface */
.tools .field label { font-size: 12.2px; font-weight: 650; color: var(--slate-600);
                      margin-bottom: 6px; display: block; }
.tools input, .tools select, .tools textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--slate-300);
  border-radius: 10px; font-size: 14px; font-family: inherit; background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
:root[data-theme="dark"] .tools input, :root[data-theme="dark"] .tools select,
:root[data-theme="dark"] .tools textarea { background: #0c1728; border-color: #2c3f59; color: #e6eef7; }
.tools input:focus, .tools select:focus, .tools textarea:focus {
  outline: none; border-color: var(--c1);
  box-shadow: 0 0 0 3.5px color-mix(in srgb, var(--c1) 18%, transparent);
}
.tools input[type=number] { font-variant-numeric: tabular-nums; }

.btn-calc {
  width: 100%; padding: 13px 18px; border: 0; border-radius: 11px; cursor: pointer;
  font-family: inherit; font-size: 14.4px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, var(--c1), var(--c2));
  box-shadow: 0 8px 20px -8px var(--c1); transition: .16s;
}
.btn-calc:hover { filter: brightness(1.07); transform: translateY(-1px);
                  box-shadow: 0 12px 26px -8px var(--c1); }
.btn-calc:active { transform: none; }

.calc-empty { padding: 56px 24px; text-align: center; color: var(--slate-500); }
.calc-empty .ring {
  width: 62px; height: 62px; border-radius: 50%; margin: 0 auto 16px;
  display: grid; place-items: center; font-size: 24px; color: #fff;
  background: linear-gradient(135deg, var(--c1), var(--c2)); opacity: .9;
}
.calc-empty h4 { font-size: 16px; margin: 0 0 8px; }
.calc-empty p { font-size: 13.4px; max-width: 44ch; margin: 0 auto; line-height: 1.6; }

.chips-row { display: flex; flex-wrap: wrap; gap: 7px; }
.chip-tool {
  font-size: 12.4px; padding: 7px 12px; border-radius: 9px; text-decoration: none;
  border: 1px solid var(--slate-200); background: #fff; color: var(--slate-600);
  transition: .15s; display: inline-flex; align-items: center; gap: 6px;
}
:root[data-theme="dark"] .chip-tool { background: #101d2f; border-color: #24354b; color: #a9bacd; }
.chip-tool:hover { border-color: var(--c1); color: var(--c2); transform: translateY(-1px); }
:root[data-theme="dark"] .chip-tool:hover { color: var(--c1); }

.disclaim {
  font-size: 12.2px; line-height: 1.62; color: var(--warn-600);
  background: color-mix(in srgb, var(--warn-500) 9%, transparent);
  border: 1px solid color-mix(in srgb, var(--warn-500) 26%, transparent);
  border-radius: 11px; padding: 13px 15px; margin-top: 16px;
}

/* Clickable card headings — subtle until hovered, so the dashboard does not
   look like a wall of links. */
.h-link { color: inherit; text-decoration: none; display: inline-flex;
          align-items: center; gap: 5px; transition: color .14s; }
.h-link:hover { color: var(--brand-600); }
.h-arrow { opacity: 0; transform: translateX(-4px); transition: .16s;
           font-size: .85em; }
.h-link:hover .h-arrow { opacity: 1; transform: none; }

/* KPI tiles are links now: keep them looking like tiles, not text links. */
a.kpi { text-decoration: none; color: inherit; display: block;
        transition: transform .16s, box-shadow .16s, border-color .16s; }
a.kpi:hover { transform: translateY(-2px); border-color: var(--brand-500);
              box-shadow: 0 10px 24px rgba(15,28,46,.10); }
:root[data-theme="dark"] a.kpi:hover { box-shadow: 0 10px 24px rgba(0,0,0,.45); }
a.kpi::after { content: "→"; position: absolute; top: 14px; right: 15px;
               font-size: 13px; color: var(--slate-400); opacity: 0; transition: .16s; }
a.kpi:hover::after { opacity: 1; }
a.kpi .kpi-note a { color: inherit; text-decoration: underline; }

/* --------------------------------------- personnel-file completeness tiles
   Every check is clickable, satisfied ones included: "UAN on record" with a
   tick is still the fastest route to the UAN box when someone wants to read
   or correct it. */
.fixcheck {
  display: flex; gap: 9px; align-items: flex-start; width: 100%;
  padding: 9px 11px; border-radius: 9px; text-align: left; cursor: pointer;
  font: inherit; transition: transform .12s ease, box-shadow .12s ease,
                             border-color .12s ease;
}
.fixcheck.is-ok  { background: #f0fdf4; border: 1px solid #bbf7d0; }
.fixcheck.is-bad { background: #fef2f2; border: 1px solid #fecaca; }
.fixcheck:hover  { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(15,28,46,.10); }
.fixcheck.is-ok:hover  { border-color: #4ade80; }
.fixcheck.is-bad:hover { border-color: #f87171; }
.fixcheck:focus-visible { outline: 2px solid var(--brand-500); outline-offset: 2px; }
.fixcheck .badge { flex: 0 0 auto; }
.fixcheck-body { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.fixcheck-body b { font-size: 12.6px; }
.fixcheck-act {
  font-size: 11.4px; font-weight: 600; color: var(--brand-600, #1d4ed8);
  opacity: 0; transform: translateX(-3px);
  transition: opacity .12s ease, transform .12s ease;
}
.fixcheck:hover .fixcheck-act,
.fixcheck:focus-visible .fixcheck-act { opacity: 1; transform: translateX(0); }
.fixcheck.is-ok .fixcheck-act { color: #15803d; }

/* The field a jump landed on, held long enough to be seen and no longer. */
.field-lit {
  outline: 2px solid var(--brand-500) !important;
  outline-offset: 1px;
  background: #eff6ff !important;
  transition: outline-color .3s ease, background .3s ease;
}

:root[data-theme="dark"] .fixcheck.is-ok  { background: #052e1a; border-color: #14532d; }
:root[data-theme="dark"] .fixcheck.is-bad { background: #2c0b0e; border-color: #7f1d1d; }
:root[data-theme="dark"] .fixcheck.is-ok .fixcheck-act { color: #4ade80; }
:root[data-theme="dark"] .field-lit { background: #10243f !important; }

/* The unit currently selected on the dashboard, so the table row and the
   headline figures visibly belong to each other. */
.data tr.row-on > td { background: #eff6ff; box-shadow: inset 3px 0 0 var(--brand-500); }
:root[data-theme="dark"] .data tr.row-on > td { background: #10243f; }

/* ==========================================================================
   Employee self-service.

   The workspace is a desk tool; this is a phone in someone's hand between
   shifts. So it is bigger, calmer, and built around a few large touch targets
   rather than dense tables. Everything here is scoped under .ess so it cannot
   leak into the workspace.
   ========================================================================== */
.ess { background: var(--slate-100); min-height: 100vh; padding-bottom: 86px; }

/* --- the header, as a card rather than a bar */
.ess-hero {
  background: linear-gradient(135deg, #0f3b45 0%, #12a594 130%);
  color: #fff; padding: 18px 18px 62px;
  position: relative;
}
.ess-hero-row { display: flex; align-items: center; gap: 13px;
                max-width: 780px; margin: 0 auto; }
.ess-avatar {
  width: 48px; height: 48px; border-radius: 15px; flex: 0 0 auto;
  background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.24);
  display: grid; place-items: center; font-weight: 700; font-size: 19px;
  letter-spacing: -.02em;
}
.ess-hero b { font-size: 17px; letter-spacing: -.025em; display: block; }
.ess-hero .sub { font-size: 12.2px; color: rgba(255,255,255,.72); margin-top: 2px; }
.ess-hero .wbtn {
  background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.22);
  color: #fff;
}
.ess-hero .wbtn:hover { background: rgba(255,255,255,.2); }

/* The content sits over the hero, so the first card overlaps the gradient. */
.ess-wrap { max-width: 780px; margin: -46px auto 0; padding: 0 14px; position: relative; }

.ess-card {
  background: var(--surface, #fff); border: 1px solid var(--slate-200);
  border-radius: 16px; box-shadow: 0 8px 26px rgba(15,28,46,.07);
  margin-bottom: 14px; overflow: hidden;
}
.ess-card-head {
  padding: 15px 17px 0; display: flex; align-items: baseline; gap: 9px;
}
.ess-card-head h3 { font-size: 14.6px; letter-spacing: -.02em; margin: 0; }
.ess-card-head .hint { font-size: 11.6px; color: var(--slate-500); }
.ess-card-body { padding: 15px 17px; }

/* --- the numbers strip */
.ess-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.ess-stat {
  background: var(--surface, #fff); border: 1px solid var(--slate-200);
  border-radius: 14px; padding: 13px 12px; text-align: center;
  box-shadow: 0 6px 18px rgba(15,28,46,.06);
}
.ess-stat .v { font-size: 22px; font-weight: 700; letter-spacing: -.035em;
               color: var(--ink-900, #0f1c2e); line-height: 1.1; }
.ess-stat .k { font-size: 10.8px; text-transform: uppercase; letter-spacing: .07em;
               color: var(--slate-500); font-weight: 600; margin-top: 4px; }
.ess-stat.ok .v { color: var(--ok-600, #15803d); }
.ess-stat.warn .v { color: var(--warn-600, #b45309); }
.ess-stat.bad .v { color: var(--bad-600, #b91c1c); }

/* --- the big action grid */
.ess-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(104px, 1fr));
               gap: 10px; }
.ess-action {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 7px; padding: 16px 10px; border-radius: 15px; text-decoration: none;
  background: var(--surface, #fff); border: 1px solid var(--slate-200);
  color: var(--ink-900, #0f1c2e); font-weight: 600; font-size: 12.4px;
  text-align: center; transition: transform .12s ease, box-shadow .12s ease,
                                  border-color .12s ease;
}
.ess-action i { font-style: normal; font-size: 21px; line-height: 1; }
.ess-action:hover { transform: translateY(-2px); border-color: var(--brand-400, #34d3bd);
                    box-shadow: 0 10px 24px rgba(15,28,46,.10); }
.ess-action .tag {
  font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 999px;
  background: var(--bad-500, #dc2626); color: #fff;
}

/* --- a row in a list, tappable */
.ess-row {
  display: flex; gap: 12px; align-items: center; padding: 13px 17px;
  border-top: 1px solid var(--slate-100); text-decoration: none;
  color: inherit;
}
.ess-row:first-child { border-top: 0; }
.ess-row:hover { background: var(--slate-50, #f8fafc); }
.ess-row .grow { flex: 1; min-width: 0; }
.ess-row .t { font-weight: 600; font-size: 13.4px; }
.ess-row .s { font-size: 11.8px; color: var(--slate-500); margin-top: 2px; }

.ess-empty { padding: 34px 18px; text-align: center; color: var(--slate-500); }
.ess-empty .big { font-size: 30px; opacity: .35; display: block; margin-bottom: 8px; }

/* --- the bottom bar */
.ess-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 40;
  background: rgba(255,255,255,.94); backdrop-filter: blur(10px);
  border-top: 1px solid var(--slate-200); display: flex;
  padding-bottom: env(safe-area-inset-bottom);
}
.ess-nav a {
  flex: 1; text-align: center; padding: 9px 3px 10px; font-size: 10.2px;
  color: var(--slate-500); text-decoration: none; font-weight: 600;
  position: relative;
}
.ess-nav i { display: block; font-size: 18px; font-style: normal; margin-bottom: 3px; }
.ess-nav a.on { color: var(--brand-600, #0d8a7c); }
.ess-nav a.on::before {
  content: ""; position: absolute; top: 0; left: 22%; right: 22%; height: 2.5px;
  border-radius: 0 0 3px 3px; background: var(--brand-500, #12a594);
}
.ess-nav a .dot {
  position: absolute; top: 6px; right: 26%; width: 7px; height: 7px;
  border-radius: 50%; background: var(--bad-500, #dc2626);
}

@media (max-width: 420px) {
  .ess-stats { grid-template-columns: repeat(2, 1fr); }
  .ess-nav a { font-size: 9.4px; }
}

:root[data-theme="dark"] .ess { background: #0b1220; }
:root[data-theme="dark"] .ess-card,
:root[data-theme="dark"] .ess-stat,
:root[data-theme="dark"] .ess-action { background: #111c2e; border-color: #1e2d45; }
:root[data-theme="dark"] .ess-action { color: #e2e8f0; }
:root[data-theme="dark"] .ess-nav { background: rgba(17,28,46,.95); border-color: #1e2d45; }
:root[data-theme="dark"] .ess-row:hover { background: #16233a; }
:root[data-theme="dark"] .ess-stat .v { color: #e2e8f0; }

/* --------------------------------------------- checkboxes and radios, fixed
   `.work input`, `.tools input` and `.ess input` each set width:100% so that
   text fields fill their column. A checkbox is an input too, so it was being
   stretched across the whole row -- which draws the box floating in the middle
   of the line with its label pushed underneath.

   Attribute selectors outrank the plain element selectors above, so this holds
   wherever it lands in the file rather than depending on source order. */
input[type="checkbox"], input[type="radio"],
.work input[type="checkbox"], .work input[type="radio"],
.tools input[type="checkbox"], .tools input[type="radio"],
.ess input[type="checkbox"], .ess input[type="radio"],
.site input[type="checkbox"], .site input[type="radio"] {
  width: auto !important;
  min-width: 0;
  padding: 0;
  margin: 3px 0 0;
  flex: 0 0 auto;
  accent-color: var(--brand-500, #12a594);
  cursor: pointer;
}

/* A label wrapping a checkbox lays out on one line, whatever surface it is on. */
label.check {
  display: flex; gap: 9px; align-items: flex-start;
  font-size: 13.6px; cursor: pointer; width: auto;
}
label.check > input { margin-top: 3px; }

/* ------------------------------------------------------------ the nudge
   One bar, one action, and the reason it matters. Sits above the page rather
   than inside it, so it survives whichever screen the user wandered onto. */
.nudge {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin: 0 0 16px; padding: 13px 17px;
  background: linear-gradient(100deg, #ecfdf8 0%, #f4f8fd 70%);
  border: 1px solid #a7e8d8; border-left: 4px solid var(--brand-500, #12a594);
  border-radius: 12px;
}
.nudge-step {
  flex: 0 0 auto; font-size: 12.4px; font-weight: 700; letter-spacing: .02em;
  color: #0d7a6d; background: #d3f5eb; border-radius: 999px; padding: 4px 11px;
}
.nudge-body { flex: 1 1 320px; min-width: 0; }
.nudge-body b { font-size: 14px; letter-spacing: -.01em; }
.nudge-why { font-size: 12.2px; color: var(--slate-600, #475569); margin-top: 3px;
             line-height: 1.5; }
.nudge-state { font-size: 11.6px; color: var(--slate-500); margin-top: 3px; }
.nudge-meter { flex: 0 0 130px; }
.nudge-meter .meter { margin-bottom: 4px; }

@media (max-width: 760px) {
  .nudge-meter { display: none; }
}

:root[data-theme="dark"] .nudge {
  background: linear-gradient(100deg, #06251f 0%, #0e1b2c 70%);
  border-color: #14584c;
}
:root[data-theme="dark"] .nudge-step { background: #0c3b33; color: #6ee7cf; }

/* A notification row is a thing you act on, so the whole row responds. */
.notif-row { border-radius: 8px; transition: background .12s ease; }
.notif-row:hover { background: var(--slate-50, #f8fafc); }
:root[data-theme="dark"] .notif-row:hover { background: #16233a; }


/* ---- per-screen nudge: quieter than the onboarding one ---- */
.nudge.nudge-page { padding: 9px 14px; margin-bottom: 12px; }
.nudge.nudge-page .nudge-step { font-size: 15px; min-width: 28px; }
.nudge.nudge-page form { display: inline; margin-left: 4px; }
