:root {
  --esic-blue: #0047e9;
  --esic-blue-dark: #0036b3;
  --navy: #153a5b;
  --navy-deep: #0d293f;
  --blue: #0047e9;
  --paper: #f5f1eb;
  --paper-deep: #e9e2d9;
  --white: #ffffff;
  --ink: #1d252c;
  --muted: #66727d;
  --line: #d7d2ca;
  --focus: #ffbf47;
  --max: 1240px;
  --shadow: 0 22px 55px rgb(13 41 63 / 12%);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
img { max-width: 100%; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 200;
  padding: 10px 14px;
  background: var(--white);
  color: var(--navy);
  transform: translateY(-150%);
}
.skip-link:focus { transform: none; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: 78px;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto;
  align-items: center;
  gap: 28px;
  padding: 10px max(24px, calc((100vw - var(--max)) / 2));
  background: rgb(255 255 255 / 94%);
  border-bottom: 1px solid rgb(21 58 91 / 13%);
  backdrop-filter: blur(12px);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  color: var(--navy);
}
.brand img { width: 72px; height: 42px; object-fit: contain; }
.brand span { display: grid; line-height: 1.15; }
.brand strong { font-size: .95rem; }
.brand small { margin-top: 4px; color: var(--muted); font-size: .72rem; }
nav { display: flex; align-items: center; gap: 22px; }
nav a {
  color: var(--navy);
  font-size: .86rem;
  font-weight: 700;
  text-decoration: none;
}
nav a:hover { color: var(--esic-blue); }
.selection-link {
  border: 0;
  background: var(--navy);
  color: var(--white);
  padding: 10px 13px;
  cursor: pointer;
  font-size: .82rem;
  font-weight: 700;
}
.selection-link span {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  margin-left: 6px;
  background: var(--esic-blue);
  border-radius: 50%;
}
.menu-button { display: none; }

.hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.16fr) minmax(360px, .84fr);
  gap: clamp(50px, 8vw, 112px);
  align-items: center;
  min-height: 680px;
  padding: 92px max(24px, calc((100vw - var(--max)) / 2));
  background:
    linear-gradient(90deg, transparent 0 69%, rgb(21 58 91 / 4%) 69% 69.1%, transparent 69.1%),
    var(--white);
}
.hero::after {
  content: "";
  position: absolute;
  width: 430px;
  height: 430px;
  right: -280px;
  top: 90px;
  border: 82px solid var(--esic-blue);
  border-radius: 50%;
  opacity: .92;
}
.status-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 26px;
  color: var(--navy);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .045em;
  text-transform: uppercase;
}
.status-line span { width: 34px; height: 4px; background: var(--esic-blue); }
h1, h2, h3, p { margin-top: 0; }
h1 {
  max-width: 760px;
  margin-bottom: 28px;
  color: var(--esic-blue);
  font-size: clamp(3.4rem, 6.6vw, 6.6rem);
  line-height: .91;
  letter-spacing: -.065em;
}
.hero-lead {
  max-width: 700px;
  margin-bottom: 34px;
  color: var(--navy);
  font-size: clamp(1.18rem, 1.8vw, 1.48rem);
  line-height: 1.45;
}
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 18px;
  border: 1px solid transparent;
  border-radius: 2px;
  text-decoration: none;
  font-weight: 700;
  cursor: pointer;
}
.button-primary { background: var(--esic-blue); color: var(--white); }
.button-primary:hover { background: var(--esic-blue-dark); }
.button-secondary { border-color: var(--navy); color: var(--navy); background: transparent; }
.button-light { background: var(--white); color: var(--navy); }
.text-link {
  border: 0;
  border-bottom: 2px solid currentColor;
  padding: 4px 0;
  background: transparent;
  color: var(--navy);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.hero-facts { display: flex; gap: 34px; margin: 55px 0 0; }
.hero-facts div { display: grid; padding-left: 14px; border-left: 1px solid var(--line); }
.hero-facts dt { color: var(--esic-blue); font-size: 1.55rem; font-weight: 800; line-height: 1; }
.hero-facts dd { margin: 7px 0 0; color: var(--muted); font-size: .78rem; }

.hero-model {
  position: relative;
  z-index: 1;
  padding: 28px;
  background: var(--navy-deep);
  color: var(--white);
  box-shadow: var(--shadow);
}
.model-label { color: #b9d3e8; font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.model-row {
  display: grid;
  grid-template-columns: 42px 1fr;
  column-gap: 12px;
  padding: 16px 8px;
  border-top: 1px solid rgb(255 255 255 / 18%);
}
.model-row span { grid-row: 1 / 3; color: #91a9bc; font-variant-numeric: tabular-nums; }
.model-row strong { font-size: 1.08rem; }
.model-row small { color: #b9c9d5; }
.model-row-active { margin: 0 -12px; padding-inline: 20px; background: var(--esic-blue); border-color: transparent; }
.model-row-active span, .model-row-active small { color: var(--white); }
.model-note { margin: 20px 8px 0; color: #c9d6df; font-size: .84rem; }

.principle-strip {
  padding: 18px max(24px, calc((100vw - var(--max)) / 2));
  background: var(--esic-blue);
  color: var(--white);
}
.principle-strip p { margin: 0; font-size: 1rem; }

.section { padding: 100px max(24px, calc((100vw - var(--max)) / 2)); scroll-margin-top: 78px; }
.section-heading { display: grid; grid-template-columns: minmax(240px, .8fr) 1.25fr; column-gap: 70px; margin-bottom: 48px; }
.section-heading > p { grid-column: 1; margin: 6px 0 0; color: var(--esic-blue); font-size: .78rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.section-heading h2 { grid-column: 2; margin: 0 0 14px; color: var(--esic-blue); font-size: clamp(2.25rem, 4vw, 4rem); line-height: 1; letter-spacing: -.045em; }
.section-heading > span { grid-column: 2; max-width: 720px; color: var(--muted); font-size: 1.02rem; }

.context-section { background: var(--paper); }
.context-list { border-top: 1px solid var(--navy); }
.context-option {
  width: 100%;
  display: grid;
  grid-template-columns: 130px 1.1fr .9fr;
  gap: 24px;
  align-items: center;
  padding: 24px 8px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: background .2s, padding .2s;
}
.context-option:hover { padding-inline: 18px; background: var(--white); }
.context-time { color: var(--esic-blue); font-size: .78rem; font-weight: 800; text-transform: uppercase; }
.context-copy { display: grid; }
.context-copy strong { color: var(--navy); font-size: 1.35rem; }
.context-copy small { margin-top: 4px; color: var(--muted); font-size: .92rem; }
.context-example { color: var(--navy); font-size: .9rem; }

.redesign-section { background: var(--navy); color: var(--white); }
.section-heading-light > p { color: #9fb9ff; }
.section-heading-light h2 { color: var(--white); }
.section-heading-light > span { color: #cfdae3; }
.decision-path { max-width: 940px; margin: 0 0 42px auto; padding: 0; list-style: none; counter-reset: step; border-top: 1px solid rgb(255 255 255 / 24%); }
.decision-path li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 48px 1fr 1.25fr;
  gap: 20px;
  align-items: baseline;
  padding: 19px 0;
  border-bottom: 1px solid rgb(255 255 255 / 18%);
}
.decision-path li::before { content: "0" counter(step); color: #7fa5bf; font-size: .8rem; }
.decision-path strong { font-size: 1.02rem; }
.decision-path span { color: #c9d8e2; font-size: .92rem; }
.redesign-section > .button { margin-left: calc(100% - 940px); }

.catalog-section { background: var(--white); }
.catalog-heading { align-items: end; }
.catalog-heading > div { grid-column: 1 / 3; display: grid; grid-template-columns: minmax(240px, .8fr) 1.25fr; column-gap: 70px; }
.catalog-heading > div p { margin: 6px 0 0; color: var(--esic-blue); font-size: .78rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.catalog-heading > div h2 { margin: 0; color: var(--esic-blue); font-size: clamp(2.25rem, 4vw, 4rem); line-height: 1; letter-spacing: -.045em; }
.results-summary { grid-column: 2; margin-top: 18px; color: var(--muted); }
.results-summary strong { color: var(--navy); }
.catalog-layout { display: grid; grid-template-columns: 285px 1fr; gap: 42px; align-items: start; }
.filters {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 18px;
  padding: 22px;
  background: var(--paper);
  border-top: 5px solid var(--navy);
}
.filter-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.filter-heading h3 { margin: 0; color: var(--navy); font-size: 1.1rem; }
.reset-button { border: 0; padding: 0; background: transparent; color: var(--esic-blue); font-size: .78rem; font-weight: 700; cursor: pointer; }
.filters label { display: grid; gap: 6px; color: var(--navy); font-size: .82rem; font-weight: 700; }
.filters input[type="search"], .filters select {
  width: 100%;
  min-height: 44px;
  padding: 9px 10px;
  border: 1px solid #aeb6bd;
  border-radius: 0;
  background: var(--white);
  color: var(--ink);
}
.filters fieldset { display: grid; gap: 7px; margin: 0; padding: 0; border: 0; }
.filters legend { margin-bottom: 8px; color: var(--navy); font-size: .82rem; font-weight: 700; }
.filters fieldset label { display: flex; align-items: center; gap: 7px; color: var(--ink); font-weight: 400; }
.filter-note { margin: 0; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: .72rem; line-height: 1.45; }
.active-filters { min-height: 34px; display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.filter-pill { padding: 6px 9px; background: #e9eff4; color: var(--navy); font-size: .74rem; }
.technique-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--navy); }
.technique-card {
  position: relative;
  min-height: 330px;
  display: flex;
  flex-direction: column;
  padding: 26px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--white);
}
.technique-card:nth-child(2n) { border-right: 0; }
.technique-card:hover { background: #fbfaf8; }
.technique-card .card-top { display: flex; justify-content: space-between; gap: 14px; }
.technique-card .card-type { color: var(--esic-blue); font-size: .72rem; font-weight: 800; text-transform: uppercase; }
.technique-card h3 { margin: 17px 0 10px; color: var(--navy); font-size: 1.42rem; line-height: 1.12; }
.technique-card > p { color: var(--muted); font-size: .9rem; }
.card-meta { display: flex; flex-wrap: wrap; gap: 7px 14px; margin-top: auto; padding-top: 20px; color: var(--ink); font-size: .76rem; }
.card-meta span::before { content: ""; display: inline-block; width: 5px; height: 5px; margin: 0 7px 1px 0; background: var(--esic-blue); border-radius: 50%; }
.card-actions { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 18px; }
.card-actions button { cursor: pointer; }
.detail-button { border: 0; border-bottom: 1px solid var(--navy); padding: 3px 0; background: transparent; color: var(--navy); font-weight: 700; }
.add-button { border: 1px solid var(--navy); padding: 8px 10px; background: transparent; color: var(--navy); font-size: .78rem; font-weight: 700; }
.add-button[aria-pressed="true"] { background: var(--navy); color: var(--white); }
.add-button:disabled { opacity: .45; cursor: not-allowed; }
.load-more { display: flex; margin: 30px auto 0; }
.empty-state { padding: 50px; background: var(--paper); text-align: center; }
.empty-state h3 { color: var(--navy); }

.levels-section { background: var(--paper); }
.levels-table { border-top: 2px solid var(--navy); }
.level-row {
  display: grid;
  grid-template-columns: 76px 190px 1fr minmax(180px, .65fr);
  gap: 20px;
  align-items: center;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.level-number { color: var(--esic-blue); font-size: 2rem; font-weight: 800; }
.level-row strong { color: var(--navy); }
.level-row p { margin: 0; }
.level-row small { color: var(--muted); }

.foundation-section { background: var(--navy-deep); color: var(--white); }
.windows-list { border-top: 1px solid rgb(255 255 255 / 25%); }
.windows-list article { display: grid; grid-template-columns: 150px 1fr 1.2fr; gap: 28px; padding: 24px 0; border-bottom: 1px solid rgb(255 255 255 / 17%); }
.windows-list span { color: #82a8c2; font-size: .74rem; font-weight: 800; text-transform: uppercase; }
.windows-list h3 { margin: 0; font-size: 1.2rem; }
.windows-list p { margin: 0; color: #c9d6df; }
.windows-list .window-extension { margin-top: 14px; padding-inline: 18px; background: rgb(0 71 233 / 16%); border-left: 4px solid var(--esic-blue); }
.source-note { max-width: 940px; margin: 42px 0 0 auto; padding-top: 24px; border-top: 1px solid rgb(255 255 255 / 25%); }
.source-note p { color: #c9d6df; }
.source-note a { display: inline-block; margin: 8px 18px 0 0; color: var(--white); font-size: .84rem; }

.site-footer {
  display: grid;
  grid-template-columns: 1.2fr .9fr .8fr;
  gap: 50px;
  padding: 52px max(24px, calc((100vw - var(--max)) / 2));
  background: #071b2b;
  color: #cbd6dd;
  font-size: .8rem;
}
.site-footer > div { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.site-footer a { color: var(--white); }
.footer-esic { width: 72px; height: 42px; object-fit: contain; padding: 4px; background: var(--white); }
.attribution { border-left: 1px solid rgb(255 255 255 / 18%); padding-left: 28px; }
.attribution strong { color: var(--white); font-size: .98rem; }
.attribution img { width: 118px; height: 36px; object-fit: contain; object-position: left center; margin-top: 6px; }

.selection-tray {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 16px;
  background: var(--esic-blue);
  color: var(--white);
  box-shadow: var(--shadow);
}
.selection-tray > div { display: grid; }
.selection-tray span { font-size: .75rem; }
dialog {
  width: min(760px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  border: 0;
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 28px 100px rgb(7 27 43 / 35%);
}
dialog::backdrop { background: rgb(7 27 43 / 76%); backdrop-filter: blur(3px); }
.dialog-close { position: sticky; top: 0; float: right; z-index: 2; border: 0; padding: 12px 16px; background: var(--navy); color: var(--white); cursor: pointer; }
.detail-body { padding: 48px; }
.detail-body .detail-kicker { color: var(--esic-blue); font-size: .76rem; font-weight: 800; text-transform: uppercase; }
.detail-body h2 { color: var(--esic-blue); font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1; letter-spacing: -.04em; }
.detail-lead { color: var(--navy); font-size: 1.05rem; }
.detail-facts { display: flex; flex-wrap: wrap; gap: 10px; margin: 24px 0; }
.detail-facts span { padding: 7px 9px; background: var(--paper); color: var(--navy); font-size: .76rem; }
.detail-section { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.detail-section h3 { color: var(--navy); }
.detail-section li { margin-bottom: 7px; }
.detail-callout { padding: 18px; background: #eef3f7; border-left: 4px solid var(--navy); }
.detail-risk { background: #eef3ff; border-left-color: var(--esic-blue); }
.detail-source { font-size: .78rem; color: var(--muted); }
.plan-header { padding: 52px 48px 24px; background: var(--paper); }
.plan-header > p:first-child { color: var(--esic-blue); font-size: .75rem; font-weight: 800; text-transform: uppercase; }
.plan-header h2 { color: var(--esic-blue); font-size: 2.3rem; line-height: 1.05; }
.plan-list { padding: 20px 48px; }
.plan-item { display: grid; grid-template-columns: 38px 1fr auto; gap: 14px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.plan-item > span { color: var(--esic-blue); font-weight: 800; }
.plan-item h3 { margin-bottom: 5px; color: var(--navy); }
.plan-item p { margin-bottom: 0; color: var(--muted); font-size: .86rem; }
.remove-plan { align-self: start; border: 0; background: transparent; color: var(--esic-blue); cursor: pointer; }
.plan-empty { padding: 34px 48px; color: var(--muted); }
.plan-actions { display: flex; align-items: center; gap: 24px; padding: 24px 48px 42px; }

@media (max-width: 1020px) {
  .site-header { grid-template-columns: 1fr auto auto; }
  nav { display: none; position: absolute; top: 78px; left: 0; right: 0; padding: 20px 24px; background: var(--white); border-bottom: 1px solid var(--line); }
  nav.is-open { display: grid; }
  .menu-button { display: inline-flex; border: 1px solid var(--navy); padding: 8px 10px; background: transparent; color: var(--navy); }
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .hero-copy { max-width: 820px; }
  .hero-model { max-width: 680px; }
  .catalog-layout { grid-template-columns: 1fr; }
  .filters { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filter-heading, .filter-note, .filters fieldset { grid-column: 1 / -1; }
  .redesign-section > .button { margin-left: 0; }
}

@media (max-width: 720px) {
  .site-header { min-height: 68px; gap: 10px; padding: 8px 16px; }
  .brand img { width: 54px; height: 32px; }
  .brand small { display: none; }
  .selection-link { padding: 8px; font-size: 0; }
  .selection-link span { margin: 0; font-size: .78rem; }
  nav { top: 68px; }
  .hero { padding: 68px 20px; gap: 50px; }
  .hero::after { display: none; }
  h1 { font-size: clamp(3.2rem, 16vw, 5rem); }
  .hero-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .hero-facts div { padding-left: 9px; }
  .section { padding: 72px 20px; scroll-margin-top: 68px; }
  .section-heading, .catalog-heading > div { grid-template-columns: 1fr; gap: 12px; }
  .section-heading > p, .section-heading h2, .section-heading > span, .catalog-heading > div p, .catalog-heading > div h2, .results-summary { grid-column: 1; }
  .context-option { grid-template-columns: 1fr; gap: 8px; padding: 20px 0; }
  .context-example { font-size: .82rem; }
  .decision-path li { grid-template-columns: 36px 1fr; }
  .decision-path span { grid-column: 2; }
  .filters { grid-template-columns: 1fr; }
  .filter-heading, .filter-note, .filters fieldset { grid-column: 1; }
  .technique-grid { grid-template-columns: 1fr; }
  .technique-card { min-height: 300px; border-right: 0; }
  .level-row { grid-template-columns: 52px 1fr; gap: 8px 14px; }
  .level-row p, .level-row small { grid-column: 2; }
  .windows-list article { grid-template-columns: 1fr; gap: 7px; }
  .site-footer { grid-template-columns: 1fr; }
  .attribution { border-left: 0; border-top: 1px solid rgb(255 255 255 / 18%); padding: 24px 0 0; }
  .selection-tray { left: 12px; right: 12px; bottom: 12px; justify-content: space-between; }
  .detail-body, .plan-header, .plan-list, .plan-actions { padding-left: 24px; padding-right: 24px; }
  .plan-item { grid-template-columns: 28px 1fr; }
  .remove-plan { grid-column: 2; justify-self: start; padding: 0; }
}

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

@media print {
  body * { visibility: hidden; }
  .plan-dialog[open], .plan-dialog[open] * { visibility: visible; }
  .plan-dialog[open] { position: absolute; inset: 0; width: 100%; max-height: none; box-shadow: none; }
  .dialog-close, .plan-actions { display: none !important; }
}
