:root {
  --navy: #13294b;
  --navy-2: #0b1d37;
  --navy-3: #071527;
  --brand-blue: #1d57a5;
  --blue: #3f6de4;
  --lime: #93da49;
  --green: #247a3d;
  --ink: #1f2d3d;
  --muted: #5f6b7a;
  --line: #d7dbe7;
  --surface: #f8fafd;
  --surface-2: #f0f3f7;
  --white: #fff;
  --focus: #3f6de4;
  --shadow-sm: 0 12px 28px rgba(19, 41, 75, .08);
  --shadow-lg: 0 32px 80px rgba(5, 22, 47, .2);
  --shell: min(1220px, calc(100% - 48px));
  --radius: 18px;
  --transition: 240ms cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--navy-3); }
body { margin: 0; color: var(--ink); background: var(--white); font-family: Montserrat, Arial, sans-serif; font-size: 16px; line-height: 1.6; overflow-wrap: anywhere; }
body.dialog-open { overflow: hidden; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
p, h1, h2, h3, h4, ul, ol { margin-top: 0; }
h1, h2, h3, h4 { color: var(--navy); line-height: 1.08; letter-spacing: -.035em; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 3000; top: 8px; left: 8px; padding: 10px 14px; color: var(--navy); background: var(--white); border: 2px solid var(--lime); transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }
.site-shell, .section-shell { width: var(--shell); margin-inline: auto; }

.prototype-banner { position: relative; z-index: 1500; padding: 7px 16px; color: #eef6ff; background: #091e33; border-bottom: 1px solid rgba(255,255,255,.18); text-align: center; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.prototype-banner strong { color: var(--lime); }
.site-header { position: sticky; z-index: 1200; top: 0; min-height: 76px; background: rgba(255,255,255,.97); border-bottom: 1px solid rgba(19,41,75,.1); backdrop-filter: blur(16px); }
.site-header .site-shell { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 26px; }
.brand { display: inline-flex; align-items: center; flex: 0 0 auto; text-decoration: none; }
.brand img { width: 180px; height: auto; }
.site-nav { display: flex; align-items: center; justify-content: flex-end; gap: 9px; }
.site-nav a { min-height: 44px; display: inline-flex; align-items: center; padding: 0 14px; color: #344054; border-radius: 7px; text-decoration: none; font-size: 14px; font-weight: 700; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--brand-blue); background: var(--surface); }
.nav-toggle { display: none; width: 44px; height: 44px; padding: 9px; color: var(--navy); background: var(--white); border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.nav-toggle span:not(.sr-only) { display: block; height: 2px; margin: 5px 0; background: currentColor; }

.button { min-height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 0 20px; color: var(--white); background: var(--navy); border: 1px solid var(--navy); border-radius: 8px; text-decoration: none; font-weight: 750; cursor: pointer; transition: color var(--transition), background var(--transition), transform var(--transition); }
.button:hover { color: var(--navy); background: var(--lime); border-color: var(--lime); transform: translateY(-1px); }
.button-secondary { color: var(--brand-blue); background: var(--white); border-color: #7a8796; }
.button-secondary:hover { color: var(--brand-blue); background: var(--surface); border-color: var(--brand-blue); }
.button[disabled], .button[aria-disabled="true"] { color: #7e8995; background: #e8edf2; border-color: #cbd4dd; cursor: not-allowed; transform: none; }
.text-link { color: var(--brand-blue); text-underline-offset: 4px; font-weight: 700; }
.kicker { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 18px; color: var(--green); font-size: 12px; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.kicker::before { content: ""; width: 42px; height: 3px; background: var(--lime); }

.page-hero { position: relative; padding: clamp(72px, 9vw, 128px) 0; overflow: hidden; color: var(--white); background: radial-gradient(circle at 80% 20%, rgba(29,87,165,.32), transparent 34%), linear-gradient(135deg, var(--navy) 0%, var(--navy-3) 78%); }
.page-hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .16; background-image: linear-gradient(rgba(147,218,73,.18) 1px, transparent 1px), linear-gradient(90deg, rgba(147,218,73,.18) 1px, transparent 1px); background-size: 48px 48px; mask-image: linear-gradient(100deg, transparent 10%, #000 100%); }
.page-hero .site-shell { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, .9fr) minmax(360px, 1.1fr); align-items: center; gap: clamp(44px, 7vw, 100px); }
.page-hero h1 { max-width: 760px; margin-bottom: 25px; color: var(--white); font-size: clamp(42px, 5.6vw, 76px); }
.page-hero p { max-width: 690px; color: #d7e1ec; font-size: clamp(17px, 1.6vw, 21px); }
.page-hero .kicker { color: var(--lime); }
.hero-visual { padding: clamp(20px, 3vw, 38px); background: rgba(255,255,255,.055); border: 1px solid rgba(255,255,255,.18); border-radius: 24px; box-shadow: var(--shadow-lg); }

.section { padding: clamp(72px, 8vw, 120px) 0; }
.section-alt { background: var(--surface); }
.section-dark { color: #d7e1ec; background: var(--navy-2); }
.section-dark h2, .section-dark h3 { color: var(--white); }
.section-heading { max-width: 820px; margin-bottom: 44px; }
.section-heading h2 { margin-bottom: 18px; font-size: clamp(34px, 4vw, 58px); }
.section-heading p { color: var(--muted); font-size: 18px; }
.section-dark .section-heading p { color: #bac8d8; }

.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.card { min-width: 0; display: flex; flex-direction: column; padding: 28px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card h3 { margin-bottom: 12px; font-size: 24px; }
.card p { color: var(--muted); }
.card .card-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; padding-top: 22px; }
.status-chip { width: fit-content; display: inline-flex; align-items: center; gap: 7px; margin-bottom: 15px; padding: 5px 9px; color: #35516c; background: #eef4fa; border: 1px solid #c9d9e8; border-radius: 999px; font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.status-chip::before { content: ""; width: 7px; height: 7px; background: var(--lime); border-radius: 50%; }
.status-chip.review::before { background: #e7a438; }
.status-chip.blocked::before { background: #a8b1bb; }

.prototype-notice { padding: 18px 20px; color: #294866; background: #eef5fb; border: 1px solid #bdd1e4; border-left: 5px solid var(--brand-blue); border-radius: 10px; }
.prototype-notice strong { color: var(--navy); }
.prototype-notice.warning { color: #684b18; background: #fff8e8; border-color: #e2c989; border-left-color: #d59121; }
.prototype-notice.danger { color: #722c2c; background: #fff1f1; border-color: #e3b3b3; border-left-color: #b74444; }

.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin-bottom: 32px; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.field { display: grid; gap: 7px; min-width: min(220px, 100%); flex: 1 1 210px; }
.field label { color: var(--navy); font-size: 13px; font-weight: 800; }
.field input, .field select, .field textarea { width: 100%; min-height: 46px; padding: 10px 12px; color: var(--ink); background: var(--white); border: 1px solid #7a8796; border-radius: 7px; }
.field textarea { min-height: 120px; resize: vertical; }
.filter-chip { min-height: 42px; padding: 0 14px; color: #38526b; background: var(--white); border: 1px solid #aebccc; border-radius: 999px; cursor: pointer; }
.filter-chip[aria-pressed="true"] { color: var(--white); background: var(--navy); border-color: var(--navy); }
.result-count { color: var(--muted); font-size: 14px; }

.citation-list { display: grid; gap: 16px; }
.citation-card { padding: 24px; background: var(--white); border: 1px solid var(--line); border-left: 4px solid var(--lime); border-radius: 10px; }
.citation-card h3 { margin-bottom: 8px; font-size: 22px; }
.citation-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-bottom: 12px; color: #55677a; font-size: 13px; }
.citation-card[hidden] { display: none; }
.limitation { margin-top: 14px; padding-top: 13px; color: #6b5962; border-top: 1px solid var(--line); font-size: 14px; }

.site-footer { padding: 36px 0; color: #c5d1df; background: var(--navy); }
.site-footer .site-shell { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 24px; }
.site-footer a { color: var(--white); text-underline-offset: 4px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 12px 20px; }

.review-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.review-card { position: relative; min-height: 265px; }
.review-card .meta { display: grid; gap: 6px; margin: 14px 0; color: #50657a; font-size: 13px; }
.preview-workbench { display: grid; grid-template-columns: 270px minmax(0, 1fr); min-height: 720px; background: #e7edf3; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.preview-controls { padding: 24px; background: var(--white); border-right: 1px solid var(--line); }
.preview-controls button { width: 100%; margin-bottom: 9px; }
.preview-stage { display: grid; place-items: start center; padding: 24px; overflow: auto; }
.preview-frame { width: 100%; height: 660px; background: var(--white); border: 0; border-radius: 10px; box-shadow: var(--shadow-lg); transition: width var(--transition); }
.preview-stage[data-size="mobile"] .preview-frame { width: min(390px, 100%); }
.preview-stage[data-size="tablet"] .preview-frame { width: min(768px, 100%); }

.two-column { display: grid; grid-template-columns: minmax(0, .75fr) minmax(0, 1.25fr); gap: clamp(34px, 6vw, 86px); align-items: start; }
.feature-list { display: grid; gap: 14px; padding: 0; list-style: none; }
.feature-list li { position: relative; padding-left: 28px; }
.feature-list li::before { content: ""; position: absolute; top: .62em; left: 0; width: 10px; height: 10px; background: var(--lime); border: 2px solid var(--green); border-radius: 50%; }
.visually-separated { margin-top: 28px; padding-top: 28px; border-top: 1px solid var(--line); }

@media (max-width: 980px) {
  .page-hero .site-shell, .two-column { grid-template-columns: 1fr; }
  .page-hero { padding: 70px 0; }
  .hero-visual { max-width: 720px; }
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .preview-workbench { grid-template-columns: 1fr; }
  .preview-controls { border-right: 0; border-bottom: 1px solid var(--line); }
}

@media (max-width: 760px) {
  :root { --shell: min(calc(100% - 32px), 1220px); }
  .nav-toggle { display: block; }
  .site-nav { position: absolute; top: 100%; right: 16px; left: 16px; display: none; align-items: stretch; padding: 12px; background: var(--white); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-lg); }
  .site-nav.is-open { display: grid; }
  .site-nav a { justify-content: flex-start; }
  .page-hero { overflow: hidden; }
  .page-hero .site-shell { min-width: 0; }
  .page-hero .site-shell > * { min-width: 0; }
  .page-hero h1 { max-width: 100%; font-size: clamp(34px, 10.5vw, 54px); overflow-wrap: break-word; word-break: normal; }
  .page-hero p { max-width: 100%; }
  .card-grid, .review-grid { grid-template-columns: 1fr; }
  .section { padding: 66px 0; }
  .site-footer .site-shell { grid-template-columns: 1fr; }
  .preview-stage { padding: 12px; }
  .preview-frame { height: 700px; }
}

@media (max-width: 420px) {
  :root { --shell: calc(100% - 28px); }
  .prototype-banner { padding-inline: 10px; font-size: 10px; letter-spacing: .045em; }
  .site-header .site-shell { min-height: 70px; }
  .brand img { width: min(170px, 58vw); }
  .page-hero { padding: 58px 0; }
  .page-hero h1 { font-size: clamp(32px, 10vw, 43px); line-height: 1.02; letter-spacing: -.045em; }
  .page-hero p { font-size: 16px; }
  .hero-visual { padding: 18px; }
}

@media print {
  .prototype-banner, .site-header, .site-footer, .no-print, .button { display: none !important; }
  body { color: #000; background: #fff; font-size: 11pt; }
  a { color: #000; text-decoration: none; }
  .section { padding: 20px 0; }
  .card, .citation-card { box-shadow: none; break-inside: avoid; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
