/* Topic explorer theme: navy ink, one bright accent, generous white space. */

:root {
  --navy: #0B1F3A;
  --ink: #1F2A37;
  --muted: #6B7280;
  --line: #D9DEE7;
  --canvas: #F5F7FA;
  --panel: #FFFFFF;
  --accent: #1F5EFF;
  --accent-soft: #DCE6FF;
  --teal: #0E9F8A;
  --coral: #E4572E;
  --amber: #C98A1B;
  --radius: 12px;
  --radius-input: 10px;
  --radius-pill: 999px;
  --radius-lg: 16px;
  --shadow: 0 1px 2px rgba(11, 31, 58, 0.06), 0 4px 16px rgba(11, 31, 58, 0.05);
  --font: Inter, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); color: var(--ink); font-family: var(--font); font-size: 14px; }
h1, h2, h3, h4 { color: var(--navy); margin: 0; }
button { font-family: var(--font); }

/* Site shell */
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
a { color: var(--accent); }
.skip-link { position: absolute; left: -9999px; top: 8px; background: var(--panel); padding: 8px 12px; border-radius: var(--radius-input); z-index: 2000; }
.skip-link:focus { left: 12px; }
.shell { min-height: 100vh; display: flex; flex-direction: column; }
.shell-header { position: sticky; top: 0; z-index: 900; background: rgba(11, 31, 58, 0.97); backdrop-filter: blur(8px); color: #FFFFFF; box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06); }
.shell-header-inner { max-width: 1200px; margin: 0 auto; padding: 12px 28px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { color: #FFFFFF; text-decoration: none; display: flex; align-items: center; gap: 12px; }
.brand-mark { width: 38px; height: 38px; border-radius: var(--radius-input); background: linear-gradient(135deg, var(--accent), var(--teal)); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; letter-spacing: 0.5px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name { font-weight: 700; font-size: 16px; letter-spacing: 0.2px; }
.brand-role { color: #AFC3E8; font-size: 12px; font-weight: 500; }
.shell-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.shell-link { color: #D6E0F5; text-decoration: none; padding: 7px 14px; border-radius: var(--radius-pill); font-weight: 500; font-size: 14px; }
.shell-link:hover { background: rgba(255, 255, 255, 0.08); color: #FFFFFF; }
.shell-link.is-active { background: rgba(255, 255, 255, 0.16); color: #FFFFFF; }
.shell-main { flex: 1; width: 100%; }
.shell-footer { background: var(--navy); color: #C9D5EC; margin-top: 48px; }
.shell-footer-inner { max-width: 1200px; margin: 0 auto; padding: 40px 28px 28px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.footer-name { color: #FFFFFF; font-weight: 700; font-size: 16px; margin-bottom: 8px; }
.footer-text { margin: 0; line-height: 1.6; max-width: 420px; }
.footer-title { color: #FFFFFF; font-size: 12px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; margin-bottom: 10px; }
.footer-column ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.footer-column a { color: #C9D5EC; text-decoration: none; }
.footer-column a:hover { color: #FFFFFF; text-decoration: underline; }
.footer-legal { border-top: 1px solid rgba(255, 255, 255, 0.12); margin-top: 28px; padding-top: 16px; font-size: 12px; color: #8EA2C6; }

/* Site pages */
.site-page { font-size: 16px; line-height: 1.6; }
.section { padding: 64px 0; }
.section.tinted { background: #EEF2F8; }
.section-inner { max-width: 1200px; margin: 0 auto; padding: 0 28px; }
.section-title { font-size: 30px; font-weight: 800; letter-spacing: -0.4px; margin-bottom: 18px; }
.section-title.small { font-size: 20px; margin-bottom: 10px; }
.section-lead { color: var(--muted); max-width: 720px; margin: 0 0 28px; }
.eyebrow.light { color: #8FB0FF; }
.button { display: inline-flex; align-items: center; gap: 6px; padding: 10px 18px; border-radius: var(--radius-pill); border: 1px solid var(--navy); color: var(--navy); background: var(--panel); font-weight: 600; font-size: 14px; text-decoration: none; transition: background 0.12s ease, color 0.12s ease, transform 0.12s ease; }
.button:hover { transform: translateY(-1px); background: var(--navy); color: #FFFFFF; }
.button.primary { background: var(--accent); border-color: var(--accent); color: #FFFFFF; }
.button.primary:hover { background: #1749CC; border-color: #1749CC; }
.button.ghost { background: transparent; border-color: rgba(255, 255, 255, 0.5); color: #FFFFFF; }
.button.ghost:hover { background: rgba(255, 255, 255, 0.12); }
.button.large { padding: 13px 24px; font-size: 15px; }
.hero { background: radial-gradient(circle at 85% 15%, rgba(31, 94, 255, 0.35), transparent 45%), radial-gradient(circle at 10% 90%, rgba(14, 159, 138, 0.25), transparent 40%), var(--navy); color: #FFFFFF; }
.hero-inner { max-width: 1200px; margin: 0 auto; padding: 96px 28px 104px; }
.hero-title { color: #FFFFFF; font-size: 52px; line-height: 1.08; font-weight: 800; letter-spacing: -1.2px; max-width: 860px; margin: 6px 0 20px; }
.hero-lead { color: #D6E0F5; font-size: 19px; line-height: 1.6; max-width: 720px; margin: 0 0 32px; }
.hero-actions, .project-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.center-actions { display: flex; justify-content: center; margin-top: 36px; }
.credential-grid, .way-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.credential, .way-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); overflow: hidden; }
.credential { border-top: 4px solid var(--accent); }
.credential:nth-child(2) { border-top-color: var(--teal); }
.credential:nth-child(3) { border-top-color: var(--amber); }
.credential-label { font-size: 11px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); }
.credential h3, .way-card h3 { font-size: 19px; margin: 6px 0 8px; }
.credential p, .way-card p { margin: 0; color: var(--ink); }
.step-number { font-size: 13px; font-weight: 800; color: var(--accent); letter-spacing: 1px; }
.project-grid { display: grid; grid-template-columns: 1fr; gap: 24px; margin-bottom: 24px; }
.project-card { display: grid; grid-template-columns: 1fr; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; box-shadow: 0 4px 24px rgba(11, 31, 58, 0.08); }
.project-card.featured, .project-grid .project-card { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
.project-image { display: flex; align-items: center; justify-content: center; background: #FFFFFF; padding: 12px; border-right: 1px solid var(--line); }
.project-image img { display: block; width: 100%; height: 100%; max-height: 420px; object-fit: contain; transition: transform 0.3s ease; }
.project-card:hover .project-image img { transform: scale(1.02); }
.project-body { padding: 28px; display: flex; flex-direction: column; gap: 14px; }
.project-title { font-size: 26px; }
.project-title a { color: var(--navy); text-decoration: none; }
.project-title a:hover { color: var(--accent); }
.project-summary { margin: 0; color: var(--ink); }
.project-stats, .case-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.project-stats .stat-value { font-size: 22px; }
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-pill { background: var(--accent-soft); color: #1749CC; border-radius: var(--radius-pill); padding: 3px 11px; font-size: 12px; font-weight: 600; }
.about-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; }
.about-block p { margin: 0 0 14px; max-width: 640px; }
.page-heading { margin-bottom: 8px; }
.page-heading .page-title { font-size: 40px; margin-bottom: 10px; }

/* Resume */
.text-link { color: var(--accent); font-weight: 600; text-decoration: none; }
.text-link:hover { text-decoration: underline; }
.below-link { margin-top: 20px; }
.muted { color: var(--muted); margin: 0; font-size: 14px; }
.resume-page { max-width: 960px; margin: 0 auto; padding: 40px 28px 8px; }
.resume-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 20px; }
.resume-doc { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: 0 4px 24px rgba(11, 31, 58, 0.08); padding: 48px 56px; font-size: 15px; line-height: 1.65; color: var(--ink); }
.resume-header { text-align: center; padding-bottom: 22px; border-bottom: 3px solid var(--navy); }
.resume-name { font-size: 32px; font-weight: 800; letter-spacing: 1.5px; color: var(--navy); }
.resume-headline { font-size: 17px; font-weight: 700; color: var(--accent); margin-top: 4px; }
.resume-location { color: var(--muted); font-size: 14px; margin-top: 6px; }
.resume-links { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 10px; margin-top: 4px; font-size: 14px; }
.resume-links a { color: var(--accent); text-decoration: none; font-weight: 500; }
.resume-links a:hover { text-decoration: underline; }
.resume-dot { color: var(--line); }
.resume-block { margin-top: 30px; }
.resume-section-title { font-size: 13px; font-weight: 800; letter-spacing: 1.6px; text-transform: uppercase; color: var(--navy); padding-bottom: 8px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.resume-summary { margin: 0; }
.resume-skills { display: grid; grid-template-columns: 170px 1fr; gap: 8px 20px; margin: 0; }
.resume-skills dt { font-weight: 700; color: var(--navy); }
.resume-skills dd { margin: 0; }
.resume-employer { padding: 4px 0 8px; }
.resume-employer + .resume-employer { border-top: 1px dashed var(--line); margin-top: 14px; padding-top: 18px; }
.resume-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: baseline; }
.resume-row-dates { color: var(--muted); font-size: 14px; white-space: nowrap; text-align: right; font-variant-numeric: tabular-nums; }
.resume-row.employer { font-size: 17px; }
.resume-row.employer .resume-row-dates { font-weight: 600; color: var(--navy); font-size: 14px; }
.resume-employer-name { font-weight: 800; color: var(--navy); }
.resume-place { color: var(--muted); font-weight: 500; }
.resume-separator { color: var(--line); margin: 0 8px; font-weight: 400; }
.resume-role-block { margin-top: 12px; }
.resume-row.role .resume-row-left { font-weight: 700; color: var(--ink); }
.resume-note { margin: 2px 0 0; font-style: italic; color: var(--muted); }
.resume-bullets { margin: 6px 0 0; padding-left: 20px; }
.resume-bullets li { margin-bottom: 6px; }
.resume-bullets li::marker { color: var(--accent); }
.resume-item { margin-bottom: 10px; }
.resume-item-title { font-weight: 700; color: var(--navy); }
.resume-doc-footer { display: flex; justify-content: center; margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--line); }

@media print {
  .shell-header, .shell-footer, .resume-toolbar, .resume-doc-footer, .skip-link { display: none !important; }
  body, .shell, .site-page { background: #FFFFFF !important; }
  .resume-page { max-width: none; padding: 0; }
  .resume-doc { border: none; box-shadow: none; border-radius: 0; padding: 0; font-size: 10.5pt; line-height: 1.45; }
  .resume-links a { color: var(--ink); }
  .resume-employer, .resume-role-block, .resume-item { break-inside: avoid; }
  @page { margin: 0.5in; }
}

/* Project pages */
.project-page { max-width: 1440px; margin: 0 auto; padding: 28px 28px 8px; }
.case-study { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 32px; margin-bottom: 36px; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 28px 40px; font-size: 15px; line-height: 1.6; }
.case-intro { display: flex; flex-direction: column; gap: 12px; }
.case-intro .page-title { font-size: 38px; }
.case-crumbs { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); }
.case-crumbs a { color: var(--accent); text-decoration: none; font-weight: 600; }
.case-lead { font-size: 20px; color: var(--ink); margin: 0; line-height: 1.45; }
.case-stats { align-content: start; }
.case-stats .stat { background: #EEF2F8; padding: 14px 16px; border-radius: var(--radius-input); }
.case-stats .stat-value { font-size: 26px; }
.case-stats .stat-label { font-size: 13px; }
.case-blocks { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 24px; }
.case-block h3 { font-size: 13px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.case-block p { margin: 0; }
.case-findings { grid-column: 1 / -1; background: #F7F9FC; border-left: 4px solid var(--teal); border-radius: var(--radius-input); padding: 18px 22px; }
.case-findings ol { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
.page-header .section-title { margin-bottom: 6px; line-height: 1.2; }

/* Page header */
.page-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; margin-bottom: 18px; }
.eyebrow { font-size: 11px; letter-spacing: 1.6px; color: var(--accent); font-weight: 700; margin-bottom: 6px; }
.page-title { font-size: 30px; font-weight: 800; letter-spacing: -0.4px; }
.page-subtitle { color: var(--muted); margin: 6px 0 12px; }
.insight { display: flex; flex-wrap: wrap; gap: 8px; }
.insight-item { background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: var(--radius-input); padding: 7px 12px; font-weight: 600; color: var(--navy); }
.insight-item:nth-child(2) { border-left-color: var(--teal); }
.insight-item:nth-child(3) { border-left-color: var(--muted); }
.notes-button { background: var(--panel); color: var(--navy); border: 1px solid var(--navy); border-radius: var(--radius-pill); padding: 9px 18px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.notes-button:hover { background: var(--navy); color: #FFFFFF; }

/* Filters */
.filter-bar { display: grid; grid-template-columns: 300px auto 1fr 150px; gap: 16px; align-items: end; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.field-label { display: block; font-size: 11px; font-weight: 700; letter-spacing: 0.8px; color: var(--muted); text-transform: uppercase; margin-bottom: 6px; }
.feed-checklist label { margin-right: 14px; font-weight: 500; }
.filter-note { grid-column: 1 / -1; color: var(--accent); font-weight: 600; font-size: 12px; }
.filter-note:empty { display: none; }

/* Summary cards */
.summary-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 16px 0; }
.summary-card { text-align: left; background: var(--panel); border: 1px solid var(--line); border-top: 4px solid var(--accent); border-radius: var(--radius); padding: 14px 16px; cursor: pointer; box-shadow: var(--shadow); overflow: hidden; transition: transform 0.12s ease, box-shadow 0.12s ease; }
.summary-card:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(11, 31, 58, 0.1); }
.summary-card.tone-teal { border-top-color: var(--teal); }
.summary-card.tone-muted { border-top-color: var(--muted); }
.summary-card.tone-coral { border-top-color: var(--coral); }
.summary-card.is-active { outline: 2px solid var(--accent); outline-offset: -1px; }
.summary-card-title { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.8px; }
.summary-card-value { font-size: 28px; font-weight: 800; color: var(--navy); margin: 4px 0; letter-spacing: -0.4px; }
.summary-card-detail { font-size: 12px; color: var(--ink); }

/* Panels */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.panel h3 { font-size: 16px; }
.panel-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 8px; }
.panel-subtitle { color: var(--muted); font-size: 12px; margin-top: 2px; }
.panel-note { color: var(--muted); font-size: 12px; margin-top: 6px; }
.main-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; }
.lower-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 16px; margin-top: 16px; }
.rising-panel { margin-top: 16px; }
.graph-panel { padding: 12px 16px; }
.graph-hint { color: var(--muted); font-size: 12px; text-align: center; }

/* Navigation */
.navigation-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.nav-left, .nav-right { display: flex; align-items: center; gap: 8px; }
.nav-left { min-width: 0; flex: 1; }
.nav-button { white-space: nowrap; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-input); padding: 6px 12px; color: var(--navy); font-weight: 600; cursor: pointer; }
.nav-button:hover:not(:disabled) { border-color: var(--navy); }
.nav-button:disabled { opacity: 0.4; cursor: default; }
.nav-button.primary { background: var(--navy); color: #FFFFFF; border-color: var(--navy); }
.icon-button { width: 32px; height: 32px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-input); font-weight: 700; color: var(--navy); cursor: pointer; }
.icon-button.wide { width: auto; padding: 0 10px; }
.breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-left: 8px; min-width: 0; }
.crumb { background: none; border: none; color: var(--accent); cursor: pointer; padding: 2px 4px; font-weight: 600; font-size: 13px; }
.crumb.current { color: var(--navy); cursor: default; }
.crumb-separator { color: var(--muted); }
.search { width: 100%; font-size: 13px; }
.search-wrap { display: flex; align-items: center; gap: 8px; width: 320px; min-width: 220px; padding: 3px 8px 3px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-pill); box-shadow: 0 1px 2px rgba(11, 31, 58, 0.04); }
.search-wrap:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.search-icon { position: relative; flex: none; width: 16px; height: 16px; color: var(--muted); }
.search-icon::before { content: ""; position: absolute; top: 1px; left: 1px; width: 9px; height: 9px; border: 2px solid currentColor; border-radius: var(--radius-pill); }
.search-icon::after { content: ""; position: absolute; right: 0; bottom: 1px; width: 6px; height: 2px; background: currentColor; border-radius: 1px; transform: rotate(45deg); transform-origin: left center; }
.search-wrap .dash-dropdown { border: none; background: transparent; border-radius: var(--radius-pill); box-shadow: none; }
.search-wrap .dash-dropdown:focus { border: none; outline: none; }
.search-wrap .dash-dropdown-content { border-radius: var(--radius); }
.search-wrap .search-input,
.search-wrap input[type="search"] { flex: 1; width: 100%; min-width: 0; height: 32px; border: none; outline: none; background: transparent; padding: 0; font-family: var(--font); font-size: 13px; color: var(--ink); }
.search-wrap input[type="search"]::-webkit-search-decoration { display: none; }
.article-search-section .search-wrap { width: 100%; min-width: 0; margin: 8px 0 6px; }
.article-search-note { margin-bottom: 6px; }
.article-search-note:empty { display: none; }


/* Side panel */
.side-panel { display: flex; flex-direction: column; gap: 6px; max-height: 760px; overflow-y: auto; }
.kind-badge { display: inline-block; align-self: flex-start; font-size: 10px; font-weight: 700; letter-spacing: 1.2px; padding: 4px 8px; border-radius: var(--radius-pill); background: var(--accent-soft); color: var(--accent); }
.kind-individual { background: #D7F2EC; color: var(--teal); }
.kind-unassigned { background: #ECEEF2; color: var(--muted); }
.kind-missing { background: #FBE1D9; color: var(--coral); }
.side-title { font-size: 20px; margin: 8px 0 2px; line-height: 1.25; }
.side-subtle { color: var(--muted); font-size: 12px; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0; }
.stat { background: var(--canvas); border-radius: var(--radius-input); padding: 8px 10px; }
.stat-value { font-size: 18px; font-weight: 800; color: var(--navy); }
.stat-label { font-size: 11px; color: var(--muted); line-height: 1.3; }
.side-section { margin-top: 10px; }
.side-section-title { font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { background: var(--canvas); border: 1px solid var(--line); border-radius: var(--radius-pill); padding: 3px 10px; font-size: 12px; }
.topic-list, .example-list { display: flex; flex-direction: column; gap: 4px; }
.topic-link { display: grid; grid-template-columns: 70px 1fr auto; gap: 8px; align-items: center; text-align: left; background: none; border: none; border-radius: var(--radius-input); padding: 6px; cursor: pointer; font-size: 13px; }
.topic-link:hover, .example:hover { background: var(--canvas); }
.topic-link-kicker { font-size: 11px; color: var(--muted); }
.topic-link-name { color: var(--navy); font-weight: 600; }
.topic-link-count { color: var(--ink); font-variant-numeric: tabular-nums; }
.example { display: flex; flex-direction: column; gap: 2px; text-align: left; background: none; border: none; border-radius: var(--radius-input); padding: 8px 6px; cursor: pointer; }
.example-title { color: var(--navy); font-weight: 600; font-size: 13px; line-height: 1.35; }
.example-meta { color: var(--muted); font-size: 11px; }
.tag { align-self: flex-start; font-size: 10px; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase; }
.tag-representative { color: var(--accent); }
.tag-sampled { color: var(--amber); }
.article-detail { background: var(--canvas); border-left: 4px solid var(--accent); border-radius: var(--radius-input); padding: 12px; margin-bottom: 10px; }
.article-title { font-size: 15px; line-height: 1.35; margin-bottom: 6px; }
.article-summary { margin: 0 0 8px; line-height: 1.45; }
.article-meta { color: var(--muted); font-size: 12px; }
.article-flag { color: var(--coral); font-size: 12px; margin-top: 4px; }
.article-link { display: inline-block; margin-top: 8px; color: var(--accent); font-weight: 600; text-decoration: none; }
.rename-block { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 12px; }
.rename-row, .export-row { display: flex; gap: 6px; align-items: center; margin-top: 6px; }
.export-row span { flex: 1; }
.rename-input { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: var(--radius-input); padding: 6px 10px; font-family: var(--font); }

/* Segmented controls */
.segmented { display: flex; gap: 0; border: 1px solid var(--line); border-radius: var(--radius-input); overflow: hidden; }
.segmented label { padding: 4px 10px; font-size: 12px; cursor: pointer; border-right: 1px solid var(--line); }
.segmented label:last-child { border-right: none; }
.segmented input { display: none; }
.segmented label:has(input:checked) { background: var(--navy); color: #FFFFFF; }

/* Modal */
.modal-backdrop { position: fixed; inset: 0; background: rgba(11, 31, 58, 0.45); align-items: center; justify-content: center; z-index: 1000; }
.modal-card { background: var(--panel); border-radius: var(--radius); width: min(860px, 92vw); max-height: 86vh; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 20px 60px rgba(11, 31, 58, 0.3); }
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.modal-body { padding: 8px 22px 22px; overflow-y: auto; }
.notes-section h4 { margin: 14px 0 6px; font-size: 14px; }
.notes-section ul { margin: 0; padding-left: 18px; }
.notes-section li { margin-bottom: 6px; line-height: 1.5; }

@media (max-width: 1100px) {
  .main-grid, .lower-grid { grid-template-columns: minmax(0, 1fr); }
  .summary-cards { grid-template-columns: repeat(2, 1fr); }
  .filter-bar { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .shell-header-inner { flex-direction: column; align-items: flex-start; gap: 10px; padding: 10px 18px; }
  .shell-link { padding: 6px 10px; }
  .hero-inner { padding: 64px 20px 72px; }
  .hero-title { font-size: 36px; }
  .hero-lead { font-size: 17px; }
  .section { padding: 44px 0; }
  .section-inner, .project-page { padding-left: 18px; padding-right: 18px; }
  .credential-grid, .way-grid, .about-grid, .footer-grid, .case-study, .case-blocks { grid-template-columns: 1fr; }
  .project-card.featured, .project-grid .project-card { grid-template-columns: 1fr; }
  .project-image { border-right: none; border-bottom: 1px solid var(--line); }
  .case-study { padding: 22px; }
  .summary-cards, .filter-bar { grid-template-columns: 1fr; }
  .page-header { flex-direction: column; }
  .search-wrap { width: 100%; }
  .resume-page { padding: 24px 12px 8px; }
  .resume-toolbar { flex-direction: column; align-items: stretch; }
  .resume-doc { padding: 24px 18px; font-size: 14.5px; }
  .resume-name { font-size: 24px; }
  .resume-row { grid-template-columns: 1fr; gap: 0; }
  .resume-row-dates { text-align: left; }
  .resume-skills { grid-template-columns: 1fr; gap: 2px; }
  .resume-skills dd { margin-bottom: 8px; }
  .navigation-bar, .panel-header, .segmented { flex-wrap: wrap; }
  .nav-left, .nav-right { flex-wrap: wrap; }
}


/* Dash dropdowns, date pickers, inputs and tables */
.dash-dropdown,
.dash-dropdown-content,
.dash-datepicker,
.dash-datepicker-input-wrapper,
.dash-datepicker-input,
.dash-spreadsheet,
.dash-spreadsheet-container,
.dash-table-container,
.dash-spreadsheet-inner,
.Select-control,
.Select__control {
  border-radius: var(--radius-input);
}
.dash-dropdown-search-container,
.dash-dropdown-search {
  border-radius: var(--radius-input);
}
.dash-dropdown-content,
.dash-dropdown-options,
.dash-datepicker-calendar,
.dash-datepicker-calendar-wrapper,
.dash-datepicker-calendar-container,
.Select-menu-outer,
.Select__menu {
  border-radius: var(--radius);
  overflow: hidden;
}
.dash-dropdown:focus,
.dash-datepicker-input-wrapper:focus-within,
.dash-dropdown-search-container:focus-within {
  border-color: var(--accent);
  outline: 1px solid var(--accent);
}
.rename-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* Ask */
.ask-page { max-width: 1200px; margin: 0 auto; padding: 48px 28px 8px; }
.ask-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.ask-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: 0 4px 24px rgba(11, 31, 58, 0.08); padding: 24px; display: flex; flex-direction: column; gap: 18px; }
.ask-loading { position: relative; }
.ask-messages { height: 520px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; padding: 4px 6px 4px 0; scroll-behavior: smooth; }
.ask-bubble { max-width: 86%; display: flex; flex-direction: column; gap: 4px; }
.ask-bubble.is-user { align-self: flex-end; align-items: flex-end; }
.ask-bubble.is-assistant { align-self: flex-start; }
.ask-author { font-size: 11px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); }
.ask-bubble-body { border-radius: var(--radius); padding: 12px 16px; font-size: 15px; line-height: 1.6; }
.is-user .ask-bubble-body { background: var(--navy); color: #FFFFFF; border-bottom-right-radius: 4px; }
.is-assistant .ask-bubble-body { background: #F1F4F9; color: var(--ink); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.status-declined .ask-bubble-body, .status-not_covered .ask-bubble-body, .status-blocked .ask-bubble-body, .status-budget .ask-bubble-body { background: #FFFFFF; border-style: dashed; }
.status-outage .ask-bubble-body, .status-error .ask-bubble-body { background: #FFF6F3; border-color: #F3C5B8; }
.ask-text { margin: 0; }
.ask-text p { margin: 0 0 8px; }
.ask-text p:last-child { margin-bottom: 0; }
.ask-label { font-size: 11px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.ask-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ask-chip { background: var(--accent-soft); color: #1749CC; border: 1px solid transparent; border-radius: var(--radius-pill); padding: 7px 14px; font-size: 13px; font-weight: 600; cursor: pointer; transition: border-color 0.12s ease, background 0.12s ease; }
.ask-chip:hover { border-color: var(--accent); background: #FFFFFF; }
.ask-input-row { display: flex; gap: 10px; }
.ask-input { flex: 1; display: flex; align-items: center; height: 46px; padding: 0 18px; border: 1px solid var(--line); border-radius: var(--radius-pill); background: var(--panel); outline: none; }
.ask-input:focus-within { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.ask-input .dash-input-element, .ask-input input { flex: 1; width: 100%; height: 100%; border: none; outline: none; background: transparent; padding: 0; font-family: var(--font); font-size: 15px; color: var(--ink); }
.ask-input-row .button { cursor: pointer; }
.ask-side { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 22px; font-size: 14px; line-height: 1.55; }
.ask-steps { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 8px; }
.ask-gap { margin-top: 22px; }
.ask-status { display: inline-flex; align-items: center; gap: 8px; border-radius: var(--radius-pill); padding: 4px 12px; font-size: 13px; font-weight: 600; background: var(--canvas); border: 1px solid var(--line); color: var(--navy); }
.ask-status-dot { width: 8px; height: 8px; border-radius: var(--radius-pill); background: var(--muted); }
.ask-status.is-online .ask-status-dot { background: var(--teal); }
.ask-status.is-retrieval .ask-status-dot { background: var(--amber); }
.ask-status.is-offline .ask-status-dot { background: var(--coral); }
.ask-status-line { margin: 8px 0 0; color: var(--ink); }
.ask-code-note { margin-top: 12px; font-size: 13px; }

@media (max-width: 960px) {
  .ask-grid { grid-template-columns: 1fr; }
  .ask-bubble { max-width: 100%; }
}

/* Natural gas forecast page: numbered sections that read like a short deck */
.forecast .case-study { margin-bottom: 8px; }
.deck-section { margin-top: 40px; }
.deck-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 16px; }
.forecast .kpi-cards { margin-top: 16px; }
.deck-gap { margin-top: 16px; }
.table-wrap.flush { margin-top: 0; }

.run-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 12px 0 0; }
.run-fact { background: var(--canvas); border-radius: var(--radius-input); padding: 10px 12px; }
.run-fact dt { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.8px; }
.run-fact dd { margin: 4px 0 0; font-weight: 700; color: var(--navy); font-size: 14px; }
.deck-title { font-size: 24px; font-weight: 800; letter-spacing: -0.3px; line-height: 1.25; }
.deck-lead { color: var(--muted); margin: 4px 0 0; max-width: 780px; font-size: 15px; line-height: 1.55; }
.deck-panel { padding: 20px 22px; border-radius: var(--radius-lg); }
.deck-panel h3 { font-size: 16px; }
.deck-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 16px; }
.deck-grid.wide-left { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
.panel-header.align-center { align-items: center; flex-wrap: wrap; margin-bottom: 12px; }

.kpi-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.kpi-card { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px 18px 16px 24px; box-shadow: var(--shadow); overflow: hidden; }
.kpi-card::before { content: ""; position: absolute; left: 10px; top: 16px; bottom: 16px; width: 4px; border-radius: var(--radius-pill); background: var(--accent); }
.kpi-card.tone-teal::before { background: var(--teal); }
.kpi-card.tone-amber::before { background: var(--amber); }
.kpi-card.tone-muted::before { background: var(--muted); }
.kpi-card.tone-navy::before { background: var(--navy); }
.kpi-title { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }
.kpi-value { font-size: 28px; font-weight: 800; color: var(--navy); letter-spacing: -0.5px; margin: 6px 0 4px; white-space: nowrap; }
.kpi-detail { font-size: 12px; color: var(--ink); line-height: 1.45; }

.deck-controls { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: end; padding-bottom: 14px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.control-block { display: flex; flex-direction: column; gap: 8px; }
.control-label { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }
.control-label-row { display: flex; align-items: baseline; gap: 12px; }
.as-of-value { font-weight: 800; color: var(--navy); font-size: 16px; }
.slider-block .as-of-slider { padding: 0 4px; }
.segmented.pill { border-radius: var(--radius-pill); background: var(--panel); width: max-content; }
.segmented.pill label { padding: 6px 14px; font-size: 13px; font-weight: 600; color: var(--navy); }
.segmented.pill label:has(input:checked) { background: var(--navy); color: #FFFFFF; }

.fan-stats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.fan-chip { display: inline-flex; align-items: center; gap: 8px; background: var(--canvas); border: 1px solid var(--line); border-radius: var(--radius-pill); padding: 5px 14px; font-size: 13px; color: var(--ink); }
.chip-label { font-weight: 700; color: var(--navy); }
.model-dot { display: inline-block; flex: none; width: 10px; height: 10px; border-radius: var(--radius-pill); margin-right: 8px; vertical-align: middle; }
.fan-chip .model-dot { margin-right: 0; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); margin-top: 12px; }
.deck-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.deck-table th { text-align: left; font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.8px; padding: 10px 12px; background: #F7F9FC; border-bottom: 1px solid var(--line); white-space: nowrap; }
.deck-table td { padding: 11px 12px; border-bottom: 1px solid var(--gray-soft, #E9ECF1); vertical-align: middle; }
.deck-table tbody tr:last-child td { border-bottom: none; }
.deck-table .number { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.deck-table .model-cell { font-weight: 700; color: var(--navy); white-space: nowrap; }
.deck-table .role-cell { color: var(--muted); font-size: 12px; }
.deck-table td.is-best { font-weight: 800; color: var(--navy); }
.deck-table td.is-best::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 6px; border-radius: var(--radius-pill); background: var(--teal); vertical-align: middle; }
.deck-table tr.is-champion td { background: #F5F8FF; }
.deck-table.compact td { padding: 9px 12px; }
.cell-note { font-size: 11px; color: var(--muted); }




@media (max-width: 1100px) {
  .kpi-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    }

@media (max-width: 960px) {
  .deck-grid, .deck-grid.wide-left,   .deck-heading { flex-direction: column; align-items: stretch; }
  .kpi-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.as-of-slider .dash-slider-track { background: var(--gray-soft, #E9ECF1); border-radius: var(--radius-pill); }
.as-of-slider { --Dash-Fill-Interactive-Strong: var(--accent); }
.as-of-slider .dash-slider-thumb { background: #FFFFFF; border: 3px solid var(--accent); box-shadow: 0 1px 4px rgba(11, 31, 58, 0.2); }
.as-of-slider .dash-slider-mark { color: var(--muted); font-size: 12px; }
.deck-stack { display: flex; flex-direction: column; gap: 16px; }
.cell-note.indent { padding-left: 18px; font-weight: 500; }
.section-inner > .project-card + .project-card { margin-top: 24px; }

/* Tournament */
.event-winners { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.event-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 14px 18px; box-shadow: var(--shadow); }
.event-days { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }
.event-model { display: flex; align-items: center; font-size: 17px; font-weight: 800; color: var(--navy); margin: 6px 0 2px; }
.event-detail { font-size: 12px; color: var(--ink); }
.event-measures { font-size: 12px; color: var(--muted); margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--gray-soft, #E9ECF1); }
.badge { display: inline-block; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: var(--radius-pill); white-space: nowrap; background: #EEF1F5; color: var(--muted); }
.badge.is-winner { background: var(--navy); color: #FFFFFF; }
.badge.is-qualified { background: #D7F2EC; color: var(--teal); }
.badge.is-champion { background: var(--accent-soft); color: #1749CC; }
.badge.is-trial { background: #FBF0DC; color: #9A6812; }
.badge.is-below { background: #F3F4F6; color: var(--muted); }
.deck-table .rank-cell { width: 44px; text-align: center; color: var(--muted); font-weight: 700; }
.deck-table td.strong { font-weight: 800; color: var(--navy); }
.deck-table tr.is-top td { background: #F5F8FF; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.compare-row { display: flex; align-items: center; gap: 10px; }
.compare-row .control-label { margin: 0; white-space: nowrap; }
.compare-checklist { display: flex; flex-wrap: wrap; gap: 6px; }
.compare-checklist label { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); border: 1px solid var(--line); border-radius: var(--radius-pill); padding: 3px 10px; cursor: pointer; }
.compare-checklist label:has(input:checked) { color: var(--navy); border-color: var(--navy); background: #F7F9FC; }
.compare-checklist input { margin: 0; accent-color: var(--navy); }
@media (max-width: 860px) {
  .event-winners { grid-template-columns: 1fr; }
}

/* Collapsible scoreboard */
.scoreboard-details { padding: 0; overflow: hidden; }
.scoreboard-summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 22px; cursor: pointer; list-style: none; transition: background 0.12s ease; }
.scoreboard-summary::-webkit-details-marker { display: none; }
.scoreboard-summary::marker { content: ""; }
.scoreboard-summary:hover { background: #F7F9FC; }
.scoreboard-summary h3 { margin: 0; }
.scoreboard-hint { display: inline-flex; align-items: center; gap: 10px; flex: none; font-size: 12px; font-weight: 600; color: var(--muted); background: var(--canvas); border: 1px solid var(--line); border-radius: var(--radius-pill); padding: 5px 12px; }
.scoreboard-chevron { width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-2px) rotate(45deg); transition: transform 0.2s ease; }
.scoreboard-details[open] .scoreboard-chevron { transform: translateY(2px) rotate(-135deg); }
.scoreboard-details[open] .scoreboard-summary { border-bottom: 1px solid var(--line); }
.scoreboard-body { padding: 16px 22px 20px; }
.scoreboard-controls { display: flex; justify-content: flex-end; margin-bottom: 12px; }
.event-winners { margin-top: 4px; }

/* Scoring run selector */
.run-selector-block { display: flex; flex-direction: column; gap: 6px; min-width: 340px; }
.run-selector-block .control-label { margin: 0; }
.run-selector .Select-control, .run-selector .dash-dropdown { border-radius: var(--radius-input); }

/* Forecast model card */
.model-events { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.model-event { border-left: 4px solid var(--model-color); background: color-mix(in srgb, var(--model-color) 8%, #FFFFFF); border-radius: var(--radius-input); padding: 9px 14px; }
.model-event-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.model-event-name { display: flex; align-items: center; font-size: 15px; font-weight: 800; color: var(--navy); white-space: nowrap; }
.model-event-days { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.6px; white-space: nowrap; }
.model-event-detail { font-size: 12px; color: var(--muted); margin-top: 4px; }
.model-measures { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 6px 0 0; }
.model-measure dt { font-size: 10px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.6px; }
.model-measure dd { margin: 1px 0 0; font-size: 13px; font-weight: 700; color: var(--navy); font-variant-numeric: tabular-nums; }
.deck-stack > .panel:last-child { flex: 1; }
