:root {
  color-scheme: dark;
  --bg: #05090c;
  --bg-2: #081117;
  --surface: rgba(9, 21, 29, 0.82);
  --surface-strong: rgba(13, 29, 38, 0.94);
  --line: rgba(108, 214, 236, 0.22);
  --line-strong: rgba(108, 214, 236, 0.44);
  --text: #eef8fb;
  --muted: #8aa4ae;
  --cyan: #20d8ff;
  --cyan-soft: #5be7ff;
  --lime: #9be33e;
  --amber: #ffb33f;
  --red: #ff4b3e;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
  --radius: 8px;
  --max: 1440px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(90deg, rgba(32, 216, 255, 0.05) 1px, transparent 1px) 0 0 / 96px 96px,
    linear-gradient(0deg, rgba(32, 216, 255, 0.035) 1px, transparent 1px) 0 0 / 96px 96px,
    linear-gradient(180deg, var(--bg) 0%, #071016 44%, #04080b 100%);
  color: var(--text);
  overflow-x: hidden;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  content: "";
  background:
    linear-gradient(130deg, transparent 0 22%, rgba(32, 216, 255, 0.14) 22.1%, transparent 22.7% 100%),
    linear-gradient(35deg, transparent 0 61%, rgba(155, 227, 62, 0.09) 61.1%, transparent 61.6% 100%),
    linear-gradient(180deg, rgba(32, 216, 255, 0.08), transparent 36%);
  opacity: 0.62;
  pointer-events: none;
}

body::after {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  background-image:
    linear-gradient(90deg, transparent 0 8%, rgba(32, 216, 255, 0.12) 8% 8.25%, transparent 8.25% 100%),
    linear-gradient(90deg, transparent 0 72%, rgba(255, 179, 63, 0.08) 72% 72.2%, transparent 72.2% 100%);
  opacity: 0.45;
  pointer-events: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

.site-shell {
  position: relative;
  width: min(100%, var(--max));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(190px, 1fr) auto auto;
  align-items: center;
  gap: 24px;
  min-height: 72px;
  padding: 0 32px;
  background: rgba(5, 9, 12, 0.86);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  width: 30px;
  height: 30px;
  background: url("./assets/espressif-logo.png") center / contain no-repeat;
}

.brand strong,
.brand small {
  display: block;
  letter-spacing: 0;
}

.brand strong {
  font-size: 15px;
  line-height: 1.1;
}

.brand small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.nav-links a {
  position: relative;
  padding: 24px 14px 22px;
  color: #bdd0d6;
  font-size: 14px;
  transition: color 180ms var(--ease);
}

.nav-links a::after {
  position: absolute;
  right: 12px;
  bottom: -1px;
  left: 12px;
  height: 2px;
  content: "";
  background: var(--cyan);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 180ms var(--ease);
}

.nav-links a:hover,
.nav-links a.is-active {
  color: var(--cyan-soft);
}

.nav-links a.is-active::after {
  transform: scaleX(1);
}

.topbar-actions {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.lang-toggle {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  background: rgba(12, 28, 36, 0.9);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.lang-option {
  min-width: 44px;
  padding: 8px 12px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  transition:
    color 180ms var(--ease),
    background 180ms var(--ease);
}

.lang-option:hover,
.lang-option.is-active {
  color: var(--text);
  background: rgba(32, 216, 255, 0.13);
}

.icon-button,
.to-top {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  color: var(--text);
  background: rgba(16, 34, 43, 0.92);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  transition:
    transform 180ms var(--ease),
    border-color 180ms var(--ease),
    background 180ms var(--ease);
}

.icon-button:hover,
.to-top:hover {
  transform: translateY(-1px);
  background: rgba(20, 48, 60, 0.98);
  border-color: var(--cyan);
}

.icon-button svg,
.to-top svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.section {
  scroll-margin-top: 82px;
  padding: 88px 32px;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(390px, 0.98fr);
  gap: 32px;
  align-items: center;
  min-height: min(640px, calc(100vh - 132px));
  padding-top: 42px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--line);
}

.hero::before {
  position: absolute;
  inset: 72px 0 0;
  z-index: -1;
  content: "";
  background:
    linear-gradient(120deg, rgba(32, 216, 255, 0.08), transparent 38%),
    linear-gradient(180deg, transparent 76%, rgba(8, 17, 23, 0.95) 100%);
  pointer-events: none;
}

.hero-copy {
  max-width: 720px;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  max-width: 660px;
  font-size: clamp(52px, 5.9vw, 86px);
  line-height: 0.96;
  font-weight: 860;
  letter-spacing: 0;
}

h1 span {
  display: block;
  white-space: nowrap;
  font-size: 40px;
}

.hero-subtitle {
  max-width: 650px;
  margin-top: 20px;
  color: #a9c1c9;
  font-size: 18px;
  line-height: 1.75;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(92px, 1fr));
  gap: 12px;
  margin-top: 34px;
}

.metric-card {
  position: relative;
  min-height: 118px;
  padding: 18px 16px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(12, 31, 41, 0.86), rgba(6, 14, 19, 0.78)),
    linear-gradient(90deg, rgba(32, 216, 255, 0.22), transparent);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.metric-card::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 34%;
  height: 2px;
  content: "";
  background: var(--cyan);
}

.metric-card.success::before {
  background: var(--lime);
}

.metric-icon {
  display: block;
  width: 28px;
  height: 28px;
  margin-bottom: 14px;
  color: var(--cyan);
}

svg.metric-icon {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.metric-card.success .metric-icon {
  color: var(--lime);
}

.cube {
  border: 2px solid currentColor;
  clip-path: polygon(50% 0, 100% 28%, 100% 72%, 50% 100%, 0 72%, 0 28%);
}

.chip {
  position: relative;
  border: 2px solid currentColor;
}

.chip::before,
.chip::after {
  position: absolute;
  content: "";
  inset: 7px;
  border: 2px solid currentColor;
}

.chip::after {
  inset: -7px;
  border-right-color: transparent;
  border-left-color: transparent;
}

.display {
  border: 2px solid currentColor;
  border-radius: 4px;
}

.display::after {
  display: block;
  width: 18px;
  height: 2px;
  margin: 36px auto 0;
  content: "";
  background: currentColor;
}

.touch {
  position: relative;
  border: 2px solid currentColor;
  border-radius: 50% 50% 46% 46%;
}

.touch::after {
  position: absolute;
  right: -8px;
  bottom: -4px;
  width: 14px;
  height: 22px;
  content: "";
  border: 2px solid currentColor;
  border-top: 0;
  border-radius: 0 0 8px 8px;
}

.metric-value {
  display: block;
  min-height: 32px;
  color: var(--cyan-soft);
  font-size: 30px;
  font-weight: 820;
  line-height: 1;
}

.success .metric-value {
  color: var(--lime);
}

.metric-value.value-sm {
  font-size: 21px;
}

.metric-card.link-card {
  display: block;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.metric-card.link-card .metric-value {
  color: var(--cyan-soft);
}

.metric-card.link-card .metric-value > span {
  background-image: linear-gradient(currentColor, currentColor);
  background-position: 0 100%;
  background-repeat: no-repeat;
  background-size: 0% 1.5px;
  transition: background-size 0.25s ease;
}

.metric-card.link-card:hover,
.metric-card.link-card:focus-visible {
  transform: translateY(-2px);
  border-color: var(--cyan);
  box-shadow: var(--shadow);
  outline: none;
}

.metric-card.link-card:hover .metric-value > span,
.metric-card.link-card:focus-visible .metric-value > span {
  background-size: 100% 1.5px;
}

.link-arrow {
  width: 19px;
  height: 19px;
  margin-left: 4px;
  vertical-align: -3px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.18s ease;
}

.metric-card.link-card:hover .link-arrow,
.metric-card.link-card:focus-visible .link-arrow {
  transform: translate(2px, -2px);
}

.metric-unit {
  margin-left: 6px;
  font-size: 18px;
  font-weight: 700;
}

.metric-label {
  display: block;
  margin-top: 8px;
  color: #d9e8ec;
  font-size: 13px;
  line-height: 1.35;
}

.hero-demos {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 22px;
}

.hero-demo {
  position: relative;
  display: block;
  padding: 0;
  overflow: hidden;
  background: rgba(6, 14, 19, 0.6);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.hero-demo:hover,
.hero-demo:focus-visible {
  transform: translateY(-2px);
  border-color: var(--cyan);
  box-shadow: var(--shadow);
  outline: none;
}

.hero-demo img {
  display: block;
  width: 100%;
  height: 84px;
  object-fit: cover;
}

.hero-demo-label {
  display: block;
  padding: 7px 8px;
  color: #d9e8ec;
  font-size: 12px;
  line-height: 1.2;
  text-align: left;
}

.hero-visual {
  position: relative;
  min-height: 430px;
  align-self: stretch;
  overflow: hidden;
  border-radius: var(--radius);
  isolation: isolate;
}

.hero-visual::before {
  position: absolute;
  inset: 0;
  z-index: 1;
  content: "";
  background:
    linear-gradient(90deg, rgba(5, 9, 12, 0.96) 0%, transparent 26%),
    linear-gradient(180deg, transparent 64%, rgba(5, 9, 12, 0.82));
  pointer-events: none;
}

.hero-visual img {
  width: 100%;
  height: 100%;
  min-height: 430px;
  object-fit: cover;
  object-position: 50% 50%;
  filter: contrast(1.04) saturate(1.03);
  transform: scale(1.01);
}

.visual-readout {
  position: absolute;
  z-index: 2;
  width: 190px;
  padding: 14px 16px;
  background: rgba(4, 12, 17, 0.78);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.visual-readout strong,
.visual-readout span {
  display: block;
}

.visual-readout strong {
  color: var(--cyan-soft);
  font-size: 20px;
}

.visual-readout span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.readout-a {
  right: 7%;
  bottom: 18%;
}

.readout-b {
  left: 8%;
  bottom: 8%;
}

.next-cue {
  position: absolute;
  bottom: -22px;
  left: 50%;
  display: grid;
  place-items: center;
  width: 64px;
  height: 44px;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: 0 0 var(--radius) var(--radius);
  transform: translateX(-50%);
}

.next-cue span {
  width: 14px;
  height: 14px;
  border-right: 2px solid var(--cyan);
  border-bottom: 2px solid var(--cyan);
  transform: rotate(45deg) translate(-2px, -2px);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.section-heading h2 {
  position: relative;
  padding-left: 18px;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.12;
  letter-spacing: 0;
}

.section-heading h2::before {
  position: absolute;
  top: 6px;
  bottom: 5px;
  left: 0;
  width: 4px;
  content: "";
  background: var(--cyan);
}

.section-heading p {
  max-width: 760px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.75;
}

.segmented {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 2px;
  padding: 3px;
  background: rgba(12, 28, 36, 0.9);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.segment {
  min-width: 72px;
  padding: 9px 13px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
}

.segment:hover,
.segment.is-active {
  color: var(--text);
  background: rgba(32, 216, 255, 0.13);
}

.progress-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.progress-section {
  padding-top: 42px;
}

.progress-row {
  display: grid;
  gap: 18px;
  min-height: 248px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition:
    opacity 180ms var(--ease),
    transform 180ms var(--ease),
    border-color 180ms var(--ease);
}

.progress-row:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
}

.progress-row.is-hidden {
  display: none;
}

.row-title {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 3px 10px;
  align-items: center;
}

.row-title strong {
  font-size: 17px;
}

.row-link {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  width: fit-content;
  color: inherit;
  text-decoration: none;
}

.row-link strong {
  background-image: linear-gradient(currentColor, currentColor);
  background-position: 0 100%;
  background-repeat: no-repeat;
  background-size: 0% 1.5px;
  transition: background-size 0.25s ease;
}

.row-link:hover strong,
.row-link:focus-visible strong {
  background-size: 100% 1.5px;
}

.row-link .link-arrow {
  width: 15px;
  height: 15px;
  margin-left: 2px;
  vertical-align: 0;
}

.row-link:hover .link-arrow,
.row-link:focus-visible .link-arrow {
  transform: translate(2px, -2px);
}

.row-title small {
  grid-column: 2;
  color: var(--muted);
  font-size: 12px;
}

.state-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.state-dot.done {
  background: var(--lime);
  box-shadow: 0 0 16px rgba(155, 227, 62, 0.65);
}

.state-dot.active {
  background: var(--cyan);
  box-shadow: 0 0 16px rgba(32, 216, 255, 0.65);
}

.state-dot.watch {
  background: var(--amber);
  box-shadow: 0 0 16px rgba(255, 179, 63, 0.58);
}

.progress-row p,
.solution-panel p,
.plan-step p,
.timeline-item p,
.risk-detail p {
  color: #a9c1c9;
  font-size: 14px;
  line-height: 1.72;
}

.progress-meta {
  align-self: end;
  display: grid;
  grid-template-columns: 44px 1fr;
  align-items: center;
  gap: 12px;
  color: var(--cyan-soft);
  font-size: 13px;
  font-weight: 700;
}

.bar {
  height: 7px;
  overflow: hidden;
  background: rgba(130, 164, 174, 0.17);
  border-radius: 99px;
}

.bar span {
  display: block;
  width: var(--value);
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--cyan-soft));
  border-radius: inherit;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 900ms var(--ease);
}

.bar.warn span {
  background: linear-gradient(90deg, var(--amber), #ffd05f);
}

.progress-row[data-state="done"] .bar span {
  background: linear-gradient(90deg, var(--lime), #c8f06f);
}

.progress-row[data-state="done"] .progress-meta > span {
  color: var(--lime);
}

.is-visible .bar span,
.progress-board.has-animated .bar span {
  transform: scaleX(1);
}

.solution-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.solution-panel {
  position: relative;
  min-height: 270px;
  padding: 24px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(13, 29, 38, 0.92), rgba(7, 15, 20, 0.86)),
    linear-gradient(135deg, rgba(32, 216, 255, 0.1), transparent 55%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.solution-panel.wide {
  grid-column: span 2;
}

.solution-panel.amber {
  background:
    linear-gradient(180deg, rgba(28, 24, 13, 0.78), rgba(7, 15, 20, 0.88)),
    linear-gradient(135deg, rgba(255, 179, 63, 0.18), transparent 58%);
  border-color: rgba(255, 179, 63, 0.28);
}

.panel-index {
  color: var(--cyan);
  font-size: 14px;
  font-weight: 800;
}

.amber .panel-index {
  color: var(--amber);
}

.solution-panel h3 {
  margin-top: 28px;
  max-width: 540px;
  font-size: 24px;
  line-height: 1.22;
}

.solution-panel p {
  margin-top: 16px;
  max-width: 600px;
}

.mini-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 26px 0 0;
}

.mini-metrics div {
  padding: 14px;
  background: rgba(4, 12, 17, 0.55);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.mini-metrics dt {
  color: var(--muted);
  font-size: 12px;
}

.mini-metrics dd {
  margin: 7px 0 0;
  color: var(--cyan-soft);
  font-size: 23px;
  font-weight: 800;
}

.trace-line {
  position: absolute;
  right: 22px;
  bottom: 28px;
  left: 24px;
  height: 1px;
  background:
    linear-gradient(90deg, var(--amber), transparent 26%),
    linear-gradient(90deg, transparent 54%, rgba(255, 179, 63, 0.48), transparent 82%);
}

.trace-line::before,
.trace-line::after {
  position: absolute;
  top: -4px;
  width: 9px;
  height: 9px;
  content: "";
  background: var(--amber);
  border-radius: 50%;
}

.trace-line::before {
  left: 24%;
}

.trace-line::after {
  right: 19%;
}

.attachment-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.attachment-card {
  position: relative;
  display: grid;
  grid-template-rows: 190px auto auto auto;
  gap: 10px;
  min-height: 360px;
  padding: 12px 12px 18px;
  overflow: hidden;
  color: var(--text);
  text-align: left;
  background:
    linear-gradient(180deg, rgba(13, 29, 38, 0.9), rgba(6, 14, 19, 0.86)),
    linear-gradient(135deg, rgba(32, 216, 255, 0.1), transparent 58%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: zoom-in;
  transition:
    transform 180ms var(--ease),
    border-color 180ms var(--ease),
    background 180ms var(--ease);
}

.attachment-card:hover {
  transform: translateY(-2px);
  background:
    linear-gradient(180deg, rgba(15, 36, 48, 0.95), rgba(7, 17, 23, 0.9)),
    linear-gradient(135deg, rgba(32, 216, 255, 0.14), transparent 58%);
  border-color: var(--line-strong);
}

.attachment-card.featured {
  grid-column: span 2;
  grid-template-rows: 340px auto auto auto;
  min-height: 508px;
}

.attachment-card img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  object-position: center;
  background: rgba(4, 12, 17, 0.65);
  border: 1px solid rgba(108, 214, 236, 0.16);
  border-radius: 6px;
}

.attachment-card[data-full$="pcba-concept.png"] img,
.attachment-card[data-full$="demo-kit.jpg"] img,
.attachment-card[data-full$="touch-sub-board.jpg"] img {
  object-fit: contain;
  padding: 10px;
}

.attachment-meta {
  display: block;
  color: var(--cyan-soft);
  font-size: 12px;
  font-weight: 800;
}

.attachment-card strong {
  display: block;
  font-size: 20px;
  line-height: 1.2;
}

.attachment-card small {
  display: block;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.image-dialog {
  width: min(1120px, calc(100vw - 40px));
  max-height: calc(100vh - 40px);
  padding: 0;
  overflow: hidden;
  color: var(--text);
  background: rgba(5, 9, 12, 0.98);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.72);
}

.image-dialog::backdrop {
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
}

.image-dialog figure {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  max-height: calc(100vh - 40px);
  margin: 0;
}

.image-dialog img {
  display: block;
  width: 100%;
  max-height: calc(100vh - 158px);
  object-fit: contain;
  background: #030609;
}

.image-dialog figcaption {
  padding: 18px 22px 20px;
  background: rgba(8, 20, 27, 0.96);
  border-top: 1px solid var(--line);
}

.image-dialog figcaption strong,
.image-dialog figcaption span {
  display: block;
}

.image-dialog figcaption strong {
  font-size: 20px;
}

.image-dialog figcaption span {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.dialog-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  color: var(--text);
  background: rgba(5, 9, 12, 0.82);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  cursor: pointer;
}

.dialog-close svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.risk-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(300px, 0.75fr) minmax(360px, 1fr);
  gap: 12px;
  align-items: stretch;
}

.risk-visual,
.risk-list,
.risk-detail {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.risk-visual {
  display: grid;
  place-items: center;
  min-height: 380px;
  padding: 22px;
}

#riskRadar {
  width: 100%;
  max-width: 420px;
  height: auto;
}

.risk-legend {
  display: flex;
  gap: 14px;
  color: var(--muted);
  font-size: 12px;
}

.risk-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.risk-legend b {
  font-weight: 500;
}

.risk-legend i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.legend-high {
  background: var(--red);
}

.legend-mid {
  background: var(--amber);
}

.legend-low {
  background: var(--cyan);
}

.risk-list {
  display: grid;
  align-content: stretch;
  padding: 10px;
}

.risk-item {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  min-height: 62px;
  padding: 0 12px;
  color: var(--text);
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
}

.risk-item span {
  color: var(--cyan);
  font-weight: 820;
}

.risk-item strong {
  overflow-wrap: anywhere;
  font-size: 14px;
}

.risk-item em {
  color: var(--amber);
  font-size: 12px;
  font-style: normal;
}

.risk-item:hover,
.risk-item.is-active {
  background: rgba(32, 216, 255, 0.11);
}

.risk-item:nth-child(1) em,
.risk-item:nth-child(2) em {
  color: var(--red);
}

.risk-item:nth-child(4) em {
  color: var(--cyan);
}

.risk-detail {
  padding: 28px;
}

.detail-tag {
  display: inline-block;
  color: var(--cyan-soft);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.risk-detail h3 {
  margin-top: 20px;
  font-size: 34px;
  line-height: 1.12;
}

.risk-detail p {
  margin-top: 18px;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 28px;
}

.detail-grid div {
  padding: 15px;
  background: rgba(4, 12, 17, 0.55);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.detail-grid span,
.detail-grid strong {
  display: block;
}

.detail-grid span {
  color: var(--muted);
  font-size: 12px;
}

.detail-grid strong {
  margin-top: 6px;
  font-size: 15px;
}

.plan-track {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.plan-track::before {
  position: absolute;
  top: 44px;
  right: 6%;
  left: 6%;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, var(--line-strong), transparent);
}

.plan-step {
  position: relative;
  min-height: 260px;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.step-number {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: var(--bg);
  background: var(--cyan);
  border-radius: 50%;
  font-weight: 860;
}

.plan-step h3 {
  margin-top: 28px;
  font-size: 21px;
}

.plan-step p {
  margin-top: 14px;
}

.plan-step strong {
  display: block;
  margin-top: 20px;
  color: var(--lime);
  font-size: 13px;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  counter-reset: timeline;
}

.timeline-item {
  position: relative;
  counter-increment: timeline;
  min-height: 360px;
  padding: 24px 24px 26px;
  background: rgba(8, 20, 27, 0.78);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.timeline-item::before {
  position: absolute;
  top: 24px;
  right: 24px;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  content: "0" counter(timeline);
  color: var(--cyan-soft);
  font-size: 14px;
  font-weight: 860;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  box-shadow: inset 0 0 0 8px rgba(32, 216, 255, 0.07);
}

.timeline-item::after {
  position: absolute;
  top: 46px;
  right: 70px;
  left: 24px;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, var(--line-strong), transparent);
}

.timeline-item.latest {
  border-color: rgba(155, 227, 62, 0.38);
}

.timeline-item.latest::before {
  border-color: rgba(155, 227, 62, 0.62);
  box-shadow: inset 0 0 0 8px rgba(155, 227, 62, 0.09);
}

.timeline-item time {
  color: var(--cyan-soft);
  font-size: 13px;
  font-weight: 800;
}

.timeline-item h3 {
  max-width: 520px;
  margin-top: 34px;
  font-size: 24px;
  line-height: 1.2;
}

.timeline-item p {
  margin-top: 16px;
}

.timeline-points {
  display: grid;
  gap: 9px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.timeline-points li {
  position: relative;
  padding-left: 18px;
  color: #b7cbd2;
  font-size: 13px;
  line-height: 1.65;
}

.timeline-points li::before {
  position: absolute;
  top: 0.7em;
  left: 0;
  width: 6px;
  height: 6px;
  content: "";
  background: var(--cyan);
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(32, 216, 255, 0.5);
}

.latest .timeline-points li::before {
  background: var(--lime);
  box-shadow: 0 0 12px rgba(155, 227, 62, 0.42);
}

.roadmap {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.roadmap-item {
  min-height: 150px;
  padding: 18px;
  background: rgba(4, 12, 17, 0.55);
  border: 1px solid rgba(108, 214, 236, 0.18);
  border-radius: var(--radius);
}

.roadmap-item span,
.roadmap-item strong {
  display: block;
}

.roadmap-item span {
  color: var(--cyan-soft);
  font-size: 12px;
  font-weight: 800;
}

.roadmap-item strong {
  margin-top: 8px;
  font-size: 17px;
}

.roadmap-item p {
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 32px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 30;
  opacity: 0;
  pointer-events: none;
}

.to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
}

@media (max-width: 1180px) {
  .topbar {
    grid-template-columns: 1fr auto;
  }

  .nav-links {
    order: 3;
    grid-column: 1 / -1;
    justify-content: flex-start;
    overflow-x: auto;
    border-top: 1px solid rgba(108, 214, 236, 0.14);
  }

  .nav-links a {
    flex: 0 0 auto;
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .metric-grid,
  .progress-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .risk-layout {
    grid-template-columns: 1fr 1fr;
  }

  .risk-detail {
    grid-column: 1 / -1;
  }

  .attachment-grid,
  .solution-grid,
  .plan-track,
  .roadmap {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .attachment-card.featured {
    grid-column: span 2;
  }

  .timeline {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .topbar {
    min-height: 64px;
    padding: 0 16px;
  }

  .brand small {
    display: none;
  }

  .section {
    padding: 64px 16px;
  }

  .hero {
    padding-top: 40px;
    padding-bottom: 58px;
  }

  h1 {
    max-width: 9ch;
    font-size: clamp(42px, 16vw, 60px);
  }

  .hero-subtitle {
    font-size: 18px;
  }

  .metric-grid,
  .attachment-grid,
  .progress-board,
  .solution-grid,
  .plan-track,
  .roadmap,
  .risk-layout,
  .timeline {
    grid-template-columns: 1fr;
  }

  .attachment-card,
  .attachment-card.featured {
    grid-column: auto;
    grid-template-rows: 230px auto auto auto;
    min-height: 390px;
  }

  .image-dialog {
    width: calc(100vw - 24px);
  }

  .metric-card {
    min-height: 116px;
  }

  .metric-grid,
  .hero-demos {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-visual {
    min-height: 360px;
  }

  .hero-visual img {
    min-height: 360px;
  }

  .visual-readout {
    width: min(180px, 46vw);
    padding: 12px;
  }

  .readout-a {
    right: 4%;
    bottom: 18%;
  }

  .readout-b {
    left: 4%;
    bottom: 5%;
  }

  .section-heading {
    display: block;
  }

  .segmented {
    width: 100%;
    margin-top: 20px;
    overflow-x: auto;
  }

  .segment {
    flex: 1 0 76px;
  }

  .solution-panel.wide {
    grid-column: auto;
  }

  .mini-metrics {
    grid-template-columns: 1fr;
  }

  .risk-list {
    min-height: auto;
  }

  .site-footer {
    display: grid;
    padding: 24px 16px 84px;
  }
}

@media print {
  body {
    background: #061016;
  }

  .topbar,
  .to-top,
  .next-cue {
    display: none;
  }

  .section {
    break-inside: avoid;
    padding: 30px 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
