:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --ink: #18212b;
  --ink-2: #4a5561;
  --ink-3: #6b7682;
  --line: #e2e6eb;
  --line-2: #cfd6de;
  --brand: #1f4e79;
  --brand-2: #2a78d6;
  --brand-soft: #eaf2fc;
  --good: #1a7f4b;
  --good-soft: #e7f5ec;
  --warn: #9a5b00;
  --warn-soft: #fff3df;
  --bad: #b42318;
  --bad-soft: #fdecea;
  --s1: #2a78d6;
  --s2: #eb6834;
  --s3: #1baf7a;
  --s4: #eda100;
  --tier-need: #cde2fb;
  --tier-shoulder: #86b6ef;
  --tier-high: #3987e5;
  --tier-compression: #184f95;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 1px 3px rgba(16, 24, 40, 0.04);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-feature-settings: "tnum" 1, "cv11" 1;
}
a { color: var(--brand-2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 8px; letter-spacing: -0.01em; }
h1 { font-size: 30px; }
h2 { font-size: 22px; }
h3 { font-size: 17px; }
p { margin: 0 0 12px; }
small, .muted { color: var(--ink-3); }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.site-header .wrap { display: flex; align-items: center; gap: 24px; height: 60px; }
.brand { font-weight: 700; color: var(--ink); white-space: nowrap; }
.brand span { color: var(--brand-2); }
.nav { display: flex; gap: 4px; overflow-x: auto; min-width: 0; }
.nav a { color: var(--ink-2); padding: 8px 12px; border-radius: 8px; white-space: nowrap; font-size: 15px; }
.nav a:hover { background: var(--bg); text-decoration: none; }
.nav a.active { color: var(--brand); background: var(--brand-soft); font-weight: 600; }

/* Page intro */
.intro { background: var(--surface); border-bottom: 1px solid var(--line); padding: 32px 0 28px; }
.intro p.lead { font-size: 18px; color: var(--ink-2); max-width: 820px; }
.badge-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.badge { display: inline-block; font-size: 13px; padding: 4px 10px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); color: var(--ink-2); }
.badge.info { background: var(--brand-soft); border-color: #cfe0f6; color: var(--brand); }

main { padding: 28px 0 56px; }
section.block { margin-bottom: 28px; }
.block-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.block-head p { color: var(--ink-2); margin: 0; max-width: 760px; }
.step { display: inline-block; font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--brand-2); margin-bottom: 4px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.card + .card { margin-top: 16px; }
.grid { display: grid; gap: 16px; }
.grid > * { min-width: 0; }
.grid > .card + .card { margin-top: 0; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 960px) { .g4, .g5 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .g2, .g4, .g5 { grid-template-columns: 1fr; } h1 { font-size: 25px; } .intro p.lead { font-size: 16px; } }

/* KPI tiles */
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.kpi .label { font-size: 14px; color: var(--ink-2); }
.kpi .value { font-size: 30px; font-weight: 700; margin: 4px 0 2px; letter-spacing: -0.02em; }
.kpi .sub { font-size: 13px; color: var(--ink-3); }
.delta { font-weight: 600; }
.delta.up { color: var(--good); }
.delta.down { color: var(--bad); }

.takeaway { border-left: 4px solid var(--brand-2); background: var(--brand-soft); padding: 12px 16px; border-radius: 0 8px 8px 0; color: var(--ink); margin-top: 14px; }
.takeaway strong { color: var(--brand); }

/* Tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 13px; color: var(--ink-2); font-weight: 600; background: #fafbfc; white-space: nowrap; }
td.num, th.num { text-align: right; white-space: nowrap; }
tbody tr:hover { background: #fafcff; }

.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.pill.Need { background: var(--tier-need); color: #0d366b; }
.pill.Shoulder { background: var(--tier-shoulder); color: #0d366b; }
.pill.High { background: var(--tier-high); color: #fff; }
.pill.Compression { background: var(--tier-compression); color: #fff; }
.pill.pass { background: var(--good-soft); color: var(--good); }
.pill.fail { background: var(--bad-soft); color: var(--bad); }

/* Calendar heatmap */
.cal-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 14px; color: var(--ink-2); margin: 4px 0 14px; }
.cal-legend i { display: inline-block; width: 14px; height: 14px; border-radius: 3px; margin-right: 6px; vertical-align: -2px; }
.cal-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 960px) { .cal-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .cal-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.month h4 { margin: 0 0 6px; font-size: 14px; }
.month .days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.month .dow { font-size: 10px; color: var(--ink-3); text-align: center; }
.day { aspect-ratio: 1 / 1; border-radius: 4px; font-size: 10.5px; display: flex; align-items: center; justify-content: center; cursor: default; border: 1px solid transparent; }
.day.blank { background: transparent; }
.day.Need { background: var(--tier-need); color: #0d366b; }
.day.Shoulder { background: var(--tier-shoulder); color: #0d366b; }
.day.High { background: var(--tier-high); color: #fff; }
.day.Compression { background: var(--tier-compression); color: #fff; }
.day.flag { border-color: #18212b; }
.day:hover { outline: 2px solid var(--ink); outline-offset: 1px; }

.tooltip { position: fixed; pointer-events: none; z-index: 50; background: var(--surface); border: 1px solid var(--line-2); box-shadow: 0 6px 20px rgba(16,24,40,.12); border-radius: 8px; padding: 10px 12px; font-size: 13px; min-width: 200px; display: none; }
.tooltip b { display: block; margin-bottom: 4px; }

.chart-box { position: relative; height: 300px; }
.chart-box.tall { height: 360px; }

/* Tabs and buttons */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.tab, .btn { border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); padding: 9px 14px; border-radius: 8px; font: inherit; font-size: 15px; cursor: pointer; }
.tab:hover, .btn:hover { border-color: var(--brand-2); }
.tab.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary { background: var(--brand-2); border-color: var(--brand-2); color: #fff; }
.btn.primary:hover { background: #2268bd; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 8px; overflow: hidden; }
.seg button { border: 0; background: var(--surface); padding: 8px 14px; font: inherit; font-size: 14px; cursor: pointer; color: var(--ink-2); }
.seg button.active { background: var(--brand-soft); color: var(--brand); font-weight: 600; }

/* Schedule grid */
.sched { font-size: 13.5px; }
.sched th, .sched td { padding: 6px 8px; text-align: center; vertical-align: middle; }
.sched td.name, .sched th.name { text-align: left; white-space: nowrap; }
.code { display: block; border-radius: 4px; padding: 3px 0; font-weight: 600; }
.code.AM { background: #dcebfb; color: #12406f; }
.code.MID { background: #dff3e4; color: #145c33; }
.code.SH { background: #fff4cc; color: #6b4e00; }
.code.INS { background: #e9e2f8; color: #3f2a85; }
.code.PM { background: #fde3cf; color: #7a3410; }
.code.OFF { background: #f2f2f2; color: #6b7682; font-weight: 500; }
.code.NA { background: #d9d9d9; color: #4a5561; font-weight: 500; }
.code.req { box-shadow: inset 0 0 0 2px #b42318; }
.tag { font-size: 11px; color: var(--ink-3); border: 1px solid var(--line-2); border-radius: 4px; padding: 0 4px; margin-left: 6px; }
.legend-row { display: flex; flex-wrap: wrap; gap: 10px; font-size: 13px; color: var(--ink-2); margin: 10px 0; }
.legend-row .code { display: inline-block; padding: 2px 8px; margin-right: 4px; }

/* Proposal cards */
.prop { display: block; color: inherit; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); height: 100%; }
.prop:hover { border-color: var(--brand-2); text-decoration: none; }
.prop h3 { font-size: 15.5px; margin-bottom: 6px; color: var(--ink); }
.prop p { font-size: 14px; color: var(--ink-2); margin: 0; }

.demo-card { display: flex; flex-direction: column; gap: 10px; }
.demo-card .stats { display: flex; gap: 22px; flex-wrap: wrap; margin: 6px 0; }
.demo-card .stats div b { display: block; font-size: 22px; }
.demo-card .stats div span { font-size: 13px; color: var(--ink-3); }

.pipeline { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; counter-reset: s; }
@media (max-width: 960px) { .pipeline { grid-template-columns: 1fr; } }
.pipeline div { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 12px; font-size: 14px; position: relative; }
.pipeline div b { display: block; margin-bottom: 4px; }
.pipeline div::before { counter-increment: s; content: counter(s); position: absolute; top: 10px; right: 12px; font-size: 12px; color: var(--ink-3); }

details.tech { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; }
details.tech summary { cursor: pointer; font-weight: 600; }
details.tech[open] summary { margin-bottom: 10px; }
code, pre { font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }
pre { background: #f3f5f8; border: 1px solid var(--line); border-radius: 8px; padding: 12px; overflow-x: auto; }

.site-footer { border-top: 1px solid var(--line); background: var(--surface); padding: 22px 0; font-size: 14px; color: var(--ink-3); }

@media print {
  .site-header, .intro, .no-print, .site-footer, details.tech { display: none !important; }
  body { background: #fff; }
  main { padding: 0; }
  .print-only { display: block !important; }
  .card { box-shadow: none; border: 0; padding: 0; }
  .sched { font-size: 10.5px; }
  .code { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
.print-only { display: none; }

/* ---- 2026-10 refresh: navy header bar and gradient page intros ---- */
.site-header { background: #1f4e79; border-bottom: 0; box-shadow: 0 2px 10px rgba(16, 24, 40, .12); }
.site-header .brand { color: #fff; }
.site-header .brand span { color: #9cc9ff; }
.site-header .nav a { color: rgba(255, 255, 255, .86); }
.site-header .nav a:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.site-header .nav a.active { background: rgba(255, 255, 255, .18); color: #fff; }
.intro { background: linear-gradient(135deg, #1f4e79 0%, #2a78d6 100%); border-bottom: 0; color: #fff; padding: 38px 0 34px; }
.intro h1 { color: #fff; font-size: 32px; }
.intro p.lead { color: #e6f0fb; }
.intro .badge, .intro .badge.info { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .28); color: #fff; }
.intro a { color: #fff; text-decoration: underline; }
.card, .kpi, .prop { transition: box-shadow .15s, border-color .15s; }
a.prop:hover, .card:hover { box-shadow: 0 6px 18px rgba(16, 24, 40, .07); }
.kpi .value { color: #1f4e79; }
.tool-card { display: flex; flex-direction: column; gap: 6px; color: inherit; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); height: 100%; }
.tool-card:hover { border-color: var(--brand-2); text-decoration: none; box-shadow: 0 6px 18px rgba(16, 24, 40, .08); }
.tool-card .ico { width: 38px; height: 38px; border-radius: 10px; background: var(--brand-soft); display: grid; place-items: center; font-size: 20px; }
.tool-card h3 { margin: 4px 0 0; font-size: 16.5px; color: var(--ink); }
.tool-card p { margin: 0; font-size: 14px; color: var(--ink-2); }
.tool-card .go { margin-top: auto; padding-top: 8px; font-size: 14px; font-weight: 600; color: var(--brand-2); }
.site-footer a { color: var(--brand-2); }

/* =====================================================================
   Shared look with nihalunfc.github.io (2026-10-21). Light by default;
   <html data-theme="dark"> switches palettes. Header and footer come from
   assets/header.js (the same file as the portfolio's /assets/header.js).
   ===================================================================== */
:root {
  --bg: #f6f7f9; --panel: #ffffff; --surface: #ffffff; --surface-2: #f3f4f6;
  --ink: #111827; --ink-2: #4b5563; --ink-3: #6b7280; --line: #e5e7eb; --line-2: #d1d5db;
  --brand: #1d4ed8; --brand-2: #2563eb; --link: #1d4ed8; --brand-soft: #eef3fe; --on-brand: #ffffff;
  --hotel: #0f766e; --hotel-soft: #e6f4f1;
  --good: #15803d; --good-soft: #e8f5ec; --warn: #a15c00; --warn-soft: #fff4e0; --bad: #b42318; --bad-soft: #fdecea;
  --grid: #eef0f3; --axis: #c3c9d1; --hi-row: #f3f7fe; --tip-bg: #ffffff;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(17, 24, 39, .05);
  --shadow-lg: 0 8px 24px rgba(17, 24, 39, .08);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0f1318; --panel: #161b22; --surface: #161b22; --surface-2: #1d232c;
  --ink: #e6e9ee; --ink-2: #b4bdc9; --ink-3: #8b95a3; --line: #2a313c; --line-2: #3a4350;
  --brand: #7aa7ff; --brand-2: #7aa7ff; --link: #8db4ff; --brand-soft: rgba(122, 167, 255, .14); --on-brand: #0b1220;
  --hotel: #3cc9b5; --hotel-soft: rgba(60, 201, 181, .14);
  --good: #4cc38a; --good-soft: rgba(76, 195, 138, .14); --warn: #e3a94f; --warn-soft: rgba(227, 169, 79, .14); --bad: #f07167; --bad-soft: rgba(240, 113, 103, .14);
  --grid: #242b35; --axis: #4a5361; --hi-row: rgba(122, 167, 255, .08); --tip-bg: #1d232c;
  --shadow: none; --shadow-lg: 0 8px 24px rgba(0, 0, 0, .35);
  color-scheme: dark;
}
body { overflow-x: clip; }
.intro, .hero-tool { background: var(--surface); color: var(--ink); border-bottom: 1px solid var(--line); padding: 36px 0 32px; }
.intro h1, .hero-tool h1 { color: var(--ink); font-size: clamp(28px, 3.6vw, 36px); letter-spacing: -.02em; }
.intro p.lead, .hero-tool .lead { color: var(--ink-2); }
.intro a { color: var(--link); text-decoration: none; }
.intro .badge, .intro .badge.info, .badge { background: var(--surface-2); border-color: var(--line); color: var(--ink-2); }
.hero-tool .chips span { background: var(--surface-2); border-color: var(--line); color: var(--ink-2); }
.kpi .value { color: var(--ink); }
.btn.primary:hover { background: var(--brand-2); filter: brightness(1.08); }
.tab.active { color: var(--on-brand); }
th { background: var(--surface-2); }
tbody tr:hover { background: var(--hi-row); }
pre { background: var(--surface-2); }
.day.flag { border-color: var(--ink); }
.site-footer a { color: var(--link); }
.step { color: var(--brand); }
.takeaway { background: var(--brand-soft); }
a.prop:hover, .card:hover, .tool-card:hover { box-shadow: var(--shadow-lg); }
.tool-card .ico { background: var(--hotel-soft); }
.tool-card .go { color: var(--hotel); }
:root[data-theme="dark"] .code { filter: saturate(.9) brightness(.92); }
:root[data-theme="dark"] .pill.Need, :root[data-theme="dark"] .pill.Shoulder, :root[data-theme="dark"] .day.Need, :root[data-theme="dark"] .day.Shoulder { color: #0d366b; }
:root .hero-tool { background: var(--surface); color: var(--ink); border-bottom: 1px solid var(--line); padding: 36px 0 32px; }
:root .hero-tool h1 { color: var(--ink); font-size: clamp(28px, 3.6vw, 36px); letter-spacing: -.02em; }
:root .hero-tool .lead { color: var(--ink-2); }
:root .hero-tool .chips span { background: var(--surface-2); border-color: var(--line); color: var(--ink-2); }
:root .howto { margin-top: 22px; }
:root .num-badge { color: var(--on-brand); }
:root input[type=text], :root input[type=number], :root input[type=date], :root input[type=time], :root input[type=email], :root textarea, :root select { background: var(--surface); color: var(--ink); }
:root .chip { background: var(--surface); }
:root .sched tfoot td { background: var(--surface-2); }
:root[data-theme="dark"] .chip.on { border-color: var(--brand); }
:root[data-theme="dark"] .chip.off { background: var(--warn-soft); border-color: var(--warn); color: var(--warn); }
:root[data-theme="dark"] .chip.na { background: var(--surface-2); border-color: var(--line-2); color: var(--ink-3); }
:root[data-theme="dark"] .warnbox { border-color: var(--warn); color: var(--warn); }
:root[data-theme="dark"] .btn.reset { border-color: rgba(240, 113, 103, .45); }
.tool-card .ico { display: none; }
:root .btn.primary { color: var(--on-brand); }
