:root {
  --bg: #f7f6f2;
  --ink: #1f2a28;
  --muted: #5b6b66;
  --accent: #0f766e;
  --accent-soft: rgba(15, 118, 110, 0.12);
  --card: #ffffff;
  --border: #e5e2d9;
  --error: #b42318;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Space Grotesk", "IBM Plex Sans", "Segoe UI", sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at top right, #eef7f3 0%, var(--bg) 55%, #f2eee6 100%);
  min-height: 100vh;
  line-height: 1.55;
}

a {
  color: var(--accent);
}

/* Header */

.site-header {
  padding: 24px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1200px;
  margin: 0 auto;
}

.logo-img {
  width: 250px;
  aspect-ratio: 5 / 2;
  height: auto;
  display: block;
  object-fit: contain;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-link {
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 999px;
}

.header-link:hover {
  text-decoration: underline;
}

.btn {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 999px;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
}

.btn-primary:hover {
  background: #0c5f59;
}

.btn-outline {
  border-color: rgba(31, 42, 40, 0.2);
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Layout */

.content {
  padding: 0 40px 64px;
  max-width: 1200px;
  margin: 0 auto;
}

.section {
  padding: 56px 0 0;
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

h1,
h2,
h3 {
  line-height: 1.2;
}

.section h2 {
  margin: 0 0 8px;
  font-size: 1.7rem;
}

.section-lead {
  margin: 0 0 28px;
  color: var(--muted);
  max-width: 680px;
}

/* Hero */

.hero {
  padding: 48px 0 16px;
  max-width: 820px;
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(2rem, 4.5vw, 3rem);
  letter-spacing: -0.01em;
}

.hero p {
  margin: 0 0 28px;
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 680px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-facts {
  list-style: none;
  padding: 0;
  margin: 36px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  color: var(--muted);
  font-size: 0.95rem;
}

.hero-facts li::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--accent);
  vertical-align: middle;
}

/* Cards */

.grid {
  display: grid;
  gap: 18px;
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 24px;
  box-shadow: var(--shadow);
}

.card h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.card-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  margin-bottom: 16px;
}

.card-icon svg {
  width: 22px;
  height: 22px;
}

/* Steps */

.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: step;
}

.steps li {
  counter-increment: step;
}

.steps .card::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  margin-bottom: 12px;
  font-weight: 700;
  color: var(--accent);
}

.note {
  margin: 20px 0 0;
  padding: 14px 18px;
  border-left: 3px solid var(--accent);
  background: rgba(255, 255, 255, 0.6);
  border-radius: 0 12px 12px 0;
  color: var(--ink);
  font-size: 0.95rem;
}

/* Audience */

.audience {
  list-style: none;
  padding: 0;
  margin: 0;
}

.audience li {
  padding: 18px 0;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 16px;
}

.audience li:last-child {
  border-bottom: 1px solid var(--border);
}

.audience strong {
  font-weight: 600;
}

.audience span {
  color: var(--muted);
}

/* Contact */

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
  gap: 32px;
  align-items: start;
}

.contact-aside p {
  margin: 0 0 16px;
  color: var(--muted);
}

.contact-aside ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.contact-aside li {
  margin-bottom: 6px;
}

.contact-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 600;
}

.field-full {
  grid-column: 1 / -1;
}

.field .hint {
  font-weight: 400;
  color: var(--muted);
  font-size: 0.8rem;
}

.field input,
.field select,
.field textarea {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(31, 42, 40, 0.2);
  background: #ffffff;
  font: inherit;
  font-weight: 400;
  font-size: 1rem;
  color: var(--ink);
  width: 100%;
}

.field textarea {
  min-height: 140px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid var(--accent-soft);
  border-color: var(--accent);
}

.field.has-error input,
.field.has-error select,
.field.has-error textarea {
  border-color: var(--error);
}

.field-error {
  color: var(--error);
  font-weight: 400;
  font-size: 0.8rem;
}

.consent {
  grid-column: 1 / -1;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.9rem;
  color: var(--muted);
}

.consent input {
  margin-top: 4px;
}

.form-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.form-actions small {
  color: var(--muted);
}

.hp-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.alert {
  grid-column: 1 / -1;
  margin: 0;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 0.95rem;
}

.alert-success {
  background: var(--accent-soft);
  color: var(--accent);
}

.alert-error {
  background: rgba(180, 35, 24, 0.08);
  color: var(--error);
}

/* Legal pages */

.legal {
  max-width: 820px;
  padding-top: 24px;
}

.legal h1 {
  margin: 0 0 6px;
  font-size: 2rem;
}

.legal .updated {
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 0.9rem;
}

.legal h2 {
  margin: 32px 0 8px;
  font-size: 1.2rem;
}

.legal p,
.legal li {
  color: #34433f;
}

.legal ul {
  padding-left: 20px;
}

.legal table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  margin: 8px 0 0;
}

.legal th,
.legal td {
  text-align: left;
  vertical-align: top;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}

.legal th {
  font-weight: 600;
}

.table-wrap {
  overflow-x: auto;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 64px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 40px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.9rem;
}

.footer-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* Responsive */

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

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

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

@media (max-width: 640px) {
  .site-header {
    padding: 20px 16px 8px;
  }

  .logo-img {
    width: 160px;
  }

  .header-nav {
    display: none;
  }

  .content {
    padding: 0 16px 40px;
  }

  .hero {
    padding-top: 28px;
  }

  .section {
    padding-top: 44px;
  }

  .grid-4,
  .contact-form {
    grid-template-columns: 1fr;
  }

  .audience li {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .card {
    padding: 20px;
  }

  .footer-inner {
    padding: 20px 16px 28px;
  }
}

/* Robot check */

.robot-check {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  max-width: 380px;
  padding: 14px 16px;
  border: 1px solid rgba(31, 42, 40, 0.2);
  border-radius: 12px;
  background: #fafaf8;
}

.robot-check.has-error {
  border-color: var(--error);
}

.robot-box {
  position: relative;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 2px solid rgba(31, 42, 40, 0.4);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  color: #fff;
}

.robot-box:hover:not(:disabled) {
  border-color: var(--accent);
}

.robot-box:focus-visible {
  outline: 3px solid var(--accent-soft);
  outline-offset: 2px;
}

.robot-box:disabled {
  cursor: default;
}

.robot-box-tick,
.robot-box-spinner {
  display: none;
}

.robot-box-tick {
  width: 18px;
  height: 18px;
}

.robot-check[data-state="working"] .robot-box {
  border-color: transparent;
}

.robot-check[data-state="working"] .robot-box-spinner {
  display: block;
  width: 24px;
  height: 24px;
  border: 3px solid var(--accent-soft);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: robot-spin 0.8s linear infinite;
}

.robot-check[data-state="done"] .robot-box {
  background: var(--accent);
  border-color: var(--accent);
}

.robot-check[data-state="done"] .robot-box-tick {
  display: block;
}

.robot-text {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  font-weight: 600;
  font-size: 0.95rem;
}

.robot-status {
  font-weight: 400;
  font-size: 0.8rem;
  color: var(--muted);
}

.robot-check.has-error .robot-status {
  color: var(--error);
}

.robot-check[data-state="done"] .robot-status {
  color: var(--accent);
}

.robot-brand {
  font-size: 0.7rem;
  line-height: 1.3;
  color: var(--muted);
  text-align: right;
}

@keyframes robot-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .robot-check[data-state="working"] .robot-box-spinner {
    animation-duration: 2.4s;
  }
}

.robot-check .robot-text {
  flex: 1 1 0;
  min-width: 0;
}

.robot-check noscript {
  flex: 1 0 100%;
}

/* Live validation */

.field.is-valid input,
.field.is-valid select,
.field.is-valid textarea {
  border-color: rgba(15, 118, 110, 0.55);
}

.field.has-error input:focus,
.field.has-error select:focus,
.field.has-error textarea:focus {
  outline-color: rgba(180, 35, 24, 0.15);
}

.field-counter.is-ok {
  color: var(--accent);
}

.consent.has-error {
  color: var(--error);
}

/* Language menu */

.lang-menu {
  position: relative;
}

.lang-menu summary {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 38px;
  padding: 0 8px 0 12px;
  border: 1px solid rgba(31, 42, 40, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.lang-menu summary::-webkit-details-marker {
  display: none;
}

.lang-menu summary:hover,
.lang-menu[open] summary {
  border-color: var(--accent);
  color: var(--accent);
}

.lang-menu summary:focus-visible {
  outline: 3px solid var(--accent-soft);
  outline-offset: 2px;
}

.lang-caret {
  width: 16px;
  height: 16px;
  transition: transform 0.15s ease;
}

.lang-menu[open] .lang-caret {
  transform: rotate(180deg);
}

.lang-menu-list {
  position: absolute;
  z-index: 50;
  top: calc(100% + 6px);
  right: 0;
  min-width: 170px;
  margin: 0;
  padding: 6px;
  list-style: none;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.92rem;
}

.lang-option:hover,
.lang-option:focus-visible {
  background: var(--accent-soft);
  color: var(--accent);
  outline: none;
}

.lang-option .lang-code {
  width: 22px;
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--muted);
}

.lang-option .lang-name {
  flex: 1 1 auto;
}

.lang-check {
  width: 16px;
  height: 16px;
  color: var(--accent);
  visibility: hidden;
}

.lang-option.is-active {
  font-weight: 600;
}

.lang-option.is-active .lang-check {
  visibility: visible;
}

@media (prefers-reduced-motion: reduce) {
  .lang-caret {
    transition: none;
  }
}

@media (max-width: 640px) {
  .site-header {
    gap: 10px;
  }

  .site-header .logo-img {
    width: 140px;
  }

  .header-actions {
    gap: 6px;
  }

  .header-actions .btn {
    padding: 8px 14px;
    font-size: 0.9rem;
  }
}

@media (max-width: 380px) {
  .site-header .logo-img {
    width: 118px;
  }

  .lang-menu summary {
    padding: 0 6px 0 10px;
  }
}

/* ===== Scientific look (fonts, grid, hero panel, instruments, motion) ===== */

@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/space-grotesk-latin-400-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/space-grotesk-latin-500-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/space-grotesk-latin-600-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/space-grotesk-latin-700-normal.woff2") format("woff2");
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2");
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2");
}

:root {
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --panel: #0d1d1b;
  --panel-line: rgba(148, 210, 200, 0.14);
  --panel-ink: #e6f4f1;
  --panel-muted: #8fb3ac;
  --signal: #2dd4bf;
  --warn: #f5b84b;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

body {
  background:
    linear-gradient(rgba(15, 118, 110, 0.045) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(90deg, rgba(15, 118, 110, 0.045) 1px, transparent 1px) 0 0 / 32px 32px,
    radial-gradient(circle at top right, #eaf6f2 0%, var(--bg) 55%, #f2eee6 100%);
}

.eyebrow {
  font-family: var(--mono);
  font-weight: 500;
  letter-spacing: 0.06em;
}

.eyebrow::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 2px;
  margin-right: 10px;
  background: var(--accent);
  vertical-align: middle;
}

/* Sticky header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  max-width: none;
  padding-left: max(40px, calc((100vw - 1120px) / 2));
  padding-right: max(40px, calc((100vw - 1120px) / 2));
  transition: background 0.2s ease, box-shadow 0.2s ease, padding 0.2s ease;
}

.site-header.is-scrolled {
  padding-top: 12px;
  padding-bottom: 12px;
  background: rgba(247, 246, 242, 0.86);
  box-shadow: 0 1px 0 var(--border);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
}

/* Hero with instrument panel */

.hero {
  max-width: none;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 48px;
  align-items: center;
  padding: 56px 0 40px;
}

.hero h1 {
  font-size: clamp(2.1rem, 4.2vw, 3.3rem);
  letter-spacing: -0.02em;
}

.hero .hero-lead {
  max-width: 560px;
}

.hero-panel {
  margin: 0;
  padding: 20px;
  border-radius: 20px;
  color: var(--panel-ink);
  background:
    linear-gradient(var(--panel-line) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(90deg, var(--panel-line) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(160deg, #11302c 0%, var(--panel) 60%);
  box-shadow: 0 30px 60px -28px rgba(13, 29, 27, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  font-family: var(--mono);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  font-size: 0.8rem;
  color: var(--panel-muted);
}

.panel-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(45, 212, 191, 0.12);
  color: var(--signal);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.7rem;
}

.live-dot {
  position: relative;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--signal);
}

.live-dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid var(--signal);
  animation: live-pulse 2s var(--ease) infinite;
}

.panel-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.metric {
  padding: 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  min-width: 0;
}

.metric-label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.68rem;
  color: var(--panel-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.metric-reading {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.metric-value {
  font-size: 1.35rem;
  font-weight: 500;
  color: #fff;
  font-variant-numeric: tabular-nums;
  transition: color 0.4s ease;
}

.metric-value.is-updated {
  color: var(--signal);
}

.metric-unit {
  font-size: 0.7rem;
  color: var(--panel-muted);
}

.panel-chart {
  padding: 12px 12px 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.chart-head,
.chart-foot {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.68rem;
  color: var(--panel-muted);
}

.chart {
  display: block;
  width: 100%;
  height: 130px;
  margin: 8px 0 6px;
  overflow: visible;
}

.chart-grid line {
  stroke: rgba(255, 255, 255, 0.07);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.chart-threshold {
  stroke: var(--warn);
  stroke-width: 1;
  stroke-dasharray: 4 4;
  vector-effect: non-scaling-stroke;
}

.chart-threshold-label {
  color: var(--warn);
}

.chart-area {
  fill: url(#chart-fill);
}

.chart-line {
  fill: none;
  stroke: var(--signal);
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.chart-dot {
  fill: var(--signal);
  stroke: var(--panel);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.hero-panel figcaption {
  margin-top: 12px;
  font-size: 0.66rem;
  color: var(--panel-muted);
  text-align: right;
  opacity: 0.75;
}

/* Animations (only when JavaScript is available; content is visible otherwise) */

.js .chart-line {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: chart-draw 2.2s var(--ease) 0.3s forwards;
}

.js .chart-area {
  opacity: 0;
  animation: fade-in 1.2s ease 1.6s forwards;
}

.js .chart-dot {
  opacity: 0;
  animation: fade-in 0.4s ease 2.4s forwards, dot-pulse 2.4s ease-in-out 2.8s infinite;
}

@keyframes chart-draw {
  to { stroke-dashoffset: 0; }
}

@keyframes fade-in {
  to { opacity: 1; }
}

@keyframes dot-pulse {
  0%, 100% { r: 3.5; }
  50% { r: 5; }
}

@keyframes live-pulse {
  0% { transform: scale(0.6); opacity: 0.9; }
  100% { transform: scale(1.8); opacity: 0; }
}

/* Parameter band */

.param-band {
  position: relative;
  margin: 8px 0 0;
  padding: 14px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.param-track {
  display: flex;
  width: max-content;
  animation: param-scroll 60s linear infinite;
}

.param-band:hover .param-track {
  animation-play-state: paused;
}

.param-list {
  display: flex;
  margin: 0;
  padding: 0;
  list-style: none;
}

.param-list li {
  padding: 0 22px;
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--muted);
  white-space: nowrap;
}

.param-list li::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 10px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.55;
  vertical-align: middle;
}

@keyframes param-scroll {
  to { transform: translateX(-50%); }
}

/* Cards */

.card {
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s ease;
}

.grid .card:hover {
  transform: translateY(-3px);
  border-color: rgba(15, 118, 110, 0.35);
  box-shadow: 0 18px 36px -18px rgba(15, 118, 110, 0.35);
}

/* Instruments */

.instruments {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.6fr);
  gap: 32px;
  align-items: center;
}

.instrument-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.instrument {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 12px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--card);
  text-align: center;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.instrument:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 36px -20px rgba(15, 118, 110, 0.4);
}

.instrument-media {
  display: grid;
  place-items: center;
  height: 130px;
  border-radius: 10px;
  background: radial-gradient(circle at 50% 60%, #f3f7f6 0%, #fff 70%);
}

.instrument-media img {
  max-width: 100%;
  max-height: 120px;
  width: auto;
  height: auto;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.instrument-name {
  font-family: var(--mono);
  font-size: 0.74rem;
  line-height: 1.35;
  color: var(--ink);
}

/* Method steps joined by a line */

.steps {
  position: relative;
  padding-top: 46px;
}

.steps::before {
  content: "";
  position: absolute;
  top: 17px;
  left: 18px;
  right: calc((100% - 3 * 18px) / 4 - 18px);
  height: 2px;
  background: linear-gradient(90deg, var(--accent), rgba(15, 118, 110, 0.15));
  transform-origin: left center;
}

.steps .card {
  position: relative;
}

.steps .card::before {
  position: absolute;
  top: -46px;
  left: 0;
  width: 36px;
  height: 36px;
  margin: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--card);
  border: 2px solid var(--accent);
  font-family: var(--mono);
  font-size: 0.8rem;
}

/* Reveal on scroll */

.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

.js .reveal .grid > *,
.js .reveal .instrument-list > * {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.js .reveal.is-visible .grid > *,
.js .reveal.is-visible .instrument-list > * {
  opacity: 1;
  transform: none;
}

.js .reveal.is-visible .grid > :nth-child(2),
.js .reveal.is-visible .instrument-list > :nth-child(2) { transition-delay: 0.08s; }
.js .reveal.is-visible .grid > :nth-child(3),
.js .reveal.is-visible .instrument-list > :nth-child(3) { transition-delay: 0.16s; }
.js .reveal.is-visible .grid > :nth-child(4),
.js .reveal.is-visible .instrument-list > :nth-child(4) { transition-delay: 0.24s; }
.js .reveal.is-visible .grid > :nth-child(5),
.js .reveal.is-visible .instrument-list > :nth-child(5) { transition-delay: 0.32s; }
.js .reveal.is-visible .grid > :nth-child(6) { transition-delay: 0.4s; }

.js .reveal .steps::before {
  transform: scaleX(0);
  transition: transform 1.2s var(--ease) 0.2s;
}

.js .reveal.is-visible .steps::before {
  transform: scaleX(1);
}

/* Hover on grid cards must not fight the reveal transition */
.js .reveal.is-visible .grid > .card:hover {
  transform: translateY(-3px);
  transition-delay: 0s;
}

/* Responsive */

@media (max-width: 1100px) {
  .instruments {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 960px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .instrument-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .steps::before {
    display: none;
  }

  .steps {
    padding-top: 0;
  }

  .steps .card::before {
    position: static;
    margin-bottom: 12px;
  }
}

@media (max-width: 640px) {
  .site-header {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero {
    padding-top: 24px;
  }

  .hero-panel {
    padding: 14px;
  }

  .panel-metrics {
    gap: 6px;
  }

  .metric {
    padding: 10px 8px;
  }

  .metric-value {
    font-size: 1.1rem;
  }

  .instrument-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .instrument-media {
    height: 110px;
  }
}

/* Respect reduced-motion preferences */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .js .reveal,
  .js .reveal .grid > *,
  .js .reveal .instrument-list > *,
  .js .chart-line,
  .js .chart-area,
  .js .chart-dot {
    opacity: 1;
    transform: none;
    transition: none;
    animation: none;
    stroke-dashoffset: 0;
  }

  .js .reveal .steps::before {
    transform: none;
    transition: none;
  }

  .live-dot::after,
  .param-track {
    animation: none;
  }

  .param-track {
    width: auto;
  }

  .param-list {
    flex-wrap: wrap;
    row-gap: 8px;
  }

  .param-list[aria-hidden="true"] {
    display: none;
  }

  .card,
  .instrument {
    transition: none;
  }
}

@media (max-width: 640px) {
  .metric-label {
    white-space: normal;
    min-height: 2.6em;
    line-height: 1.3;
  }
}

/* ===== Hero panel: measure → analyse → decide ===== */

.hero-panel {
  padding: 18px;
}

.flow-step {
  position: relative;
}

.flow-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--panel-ink);
}

.flow-index {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid rgba(45, 212, 191, 0.5);
  color: var(--signal);
  font-size: 0.66rem;
  letter-spacing: 0;
}

.flow-arrow {
  position: relative;
  height: 22px;
  margin: 4px 0;
}

.flow-arrow::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 0;
  bottom: 6px;
  width: 2px;
  background: repeating-linear-gradient(to bottom, var(--signal) 0 4px, transparent 4px 8px);
  opacity: 0.7;
}

.flow-arrow::after {
  content: "";
  position: absolute;
  left: 6px;
  bottom: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 7px solid var(--signal);
  opacity: 0.85;
}

.panel-metrics {
  margin-bottom: 0;
}

.spark {
  display: block;
  width: 100%;
  height: 24px;
  margin-top: 8px;
  overflow: visible;
}

.spark path {
  fill: none;
  stroke: var(--signal);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.spark-bars rect {
  fill: rgba(45, 212, 191, 0.55);
}

.panel-chart {
  position: relative;
}

.chart {
  height: 112px;
}

.chart-risk {
  fill: rgba(245, 184, 75, 0.08);
}

.chart-now {
  stroke: rgba(230, 244, 241, 0.25);
  stroke-width: 1;
  stroke-dasharray: 2 3;
  vector-effect: non-scaling-stroke;
}

.chart-forecast {
  fill: none;
  stroke: var(--signal);
  stroke-width: 2;
  stroke-dasharray: 5 5;
  stroke-linecap: round;
  opacity: 0.8;
  vector-effect: non-scaling-stroke;
}

.chart-cross {
  fill: var(--warn);
  stroke: var(--panel);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

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

.chart-legend i {
  display: inline-block;
  width: 14px;
  height: 0;
  border-top: 2px solid var(--signal);
}

.chart-legend .lg-forecast {
  margin-left: 6px;
  border-top-style: dashed;
}

.chart-callout {
  position: absolute;
  top: 34px;
  right: 14px;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(245, 184, 75, 0.14);
  border: 1px solid rgba(245, 184, 75, 0.45);
  color: var(--warn);
  font-size: 0.66rem;
}

.decision-card {
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(45, 212, 191, 0.08);
  border: 1px solid rgba(45, 212, 191, 0.35);
}

.decision-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  font-size: 1.02rem;
  font-weight: 600;
  color: #fff;
}

.decision-title::before {
  content: "";
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  background: var(--signal);
}

.decision-reasons {
  margin: 0 0 10px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 3px;
  font-size: 0.72rem;
  color: var(--panel-muted);
}

.decision-reasons li::before {
  content: "✓";
  margin-right: 8px;
  color: var(--signal);
}

.decision-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.fake-btn {
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(230, 244, 241, 0.3);
  color: var(--panel-ink);
  font-size: 0.7rem;
}

.fake-btn-primary {
  border-color: var(--signal);
  background: var(--signal);
  color: var(--panel);
  font-weight: 500;
}

.decision-note {
  margin-left: auto;
  font-size: 0.64rem;
  color: var(--panel-muted);
}

/* Sequence: steps appear one after the other, then the chart and decision details */

.js .flow-step,
.js .flow-arrow {
  opacity: 0;
  animation: flow-in 0.7s var(--ease) forwards;
  animation-delay: var(--delay, 0s);
}


.js .spark path {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: chart-draw 1.2s var(--ease) 0.5s forwards;
}

.js .chart-line {
  animation-delay: 1.2s;
}

.js .chart-area {
  animation-delay: 2s;
}

.js .chart-forecast,
.js .chart-callout {
  opacity: 0;
  animation: fade-in 0.6s ease 2.1s forwards;
}

.js .chart-cross {
  opacity: 0;
  animation: fade-in 0.4s ease 2.3s forwards, cross-pulse 2.4s ease-in-out 3s infinite;
}

.js .decision-reasons li {
  opacity: 0;
  animation: flow-in 0.5s var(--ease) forwards;
  animation-delay: calc(3s + var(--i) * 0.15s);
}

.js .flow-arrow::before {
  animation: flow-dash 1s linear infinite;
}

@keyframes flow-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

@keyframes flow-dash {
  to { background-position: 0 8px; }
}

@keyframes cross-pulse {
  0%, 100% { r: 4; }
  50% { r: 6; }
}

.instrument-list {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 960px) {
  .instrument-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .instrument-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .chart-callout {
    position: static;
    display: inline-block;
    margin-top: 6px;
  }

  .decision-note {
    margin-left: 0;
    flex-basis: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .js .flow-step,
  .js .flow-arrow,
  .js .spark path,
  .js .chart-forecast,
  .js .chart-callout,
  .js .chart-cross,
  .js .decision-reasons li {
    opacity: 1;
    transform: none;
    animation: none;
    stroke-dashoffset: 0;
  }

  .js .flow-arrow::before {
    animation: none;
  }
}

/* Draw-in effect as a left-to-right wipe: dash-based drawing is distorted by
   non-scaling strokes in stretched SVGs, so the full path is revealed instead. */
.js .chart-line,
.js .spark path {
  stroke-dasharray: none;
  stroke-dashoffset: 0;
  clip-path: inset(0 100% 0 0);
  animation: wipe-in 1.6s var(--ease) forwards;
}

.js .spark path {
  animation-delay: 0.5s;
}

.js .chart-line {
  animation-delay: 1.2s;
}

@keyframes wipe-in {
  to { clip-path: inset(0 0 0 0); }
}

@media (prefers-reduced-motion: reduce) {
  .js .chart-line,
  .js .spark path {
    clip-path: none;
    animation: none;
  }
}

.panel-live {
  white-space: nowrap;
  flex: 0 0 auto;
}

@media (max-width: 640px) {
  .metric-label {
    overflow: visible;
    text-overflow: clip;
    hyphens: auto;
    -webkit-hyphens: auto;
    overflow-wrap: anywhere;
  }
}

/* ===== Hero panel v3: light card, same height as the hero text ===== */

.hero-panel {
  --panel: #ffffff;
  --panel-ink: var(--ink);
  --panel-muted: var(--muted);
  --panel-line: rgba(15, 118, 110, 0.06);
  --signal: var(--accent);
  --warn: #b45309;
  display: flex;
  flex-direction: column;
  padding: 16px;
  border: 1px solid rgba(31, 42, 40, 0.2);
  background:
    linear-gradient(var(--panel-line) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(90deg, var(--panel-line) 1px, transparent 1px) 0 0 / 24px 24px,
    rgba(255, 255, 255, 0.78);
  box-shadow: 0 24px 48px -32px rgba(15, 118, 110, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

@media (max-width: 1099px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .hero-panel {
    width: 100%;
    max-width: 640px;
  }
}

@media (min-width: 1100px) {
  .hero {
    align-items: stretch;
  }

  .hero-copy {
    align-self: center;
  }

  .hero-panel {
    align-self: stretch;
  }
}

.panel-head {
  margin-bottom: 10px;
}

.panel-live {
  background: var(--accent-soft);
}

.flow-label {
  margin-bottom: 6px;
  font-size: 0.68rem;
}

.flow-index {
  width: 20px;
  height: 20px;
  border-color: rgba(15, 118, 110, 0.45);
  background: #fff;
}

.flow-arrow {
  height: 12px;
  margin: 2px 0 4px;
}

.flow-arrow::before {
  bottom: 4px;
}

.flow-arrow::after {
  border-top-width: 5px;
  border-left-width: 4px;
  border-right-width: 4px;
  left: 7px;
}

.metric,
.panel-chart {
  background: #fff;
  border: 1px solid var(--border);
}

.metric {
  padding: 8px 10px;
}

.metric-label {
  margin-bottom: 2px;
}

.metric-value {
  font-size: 1.15rem;
  color: var(--ink);
}

.metric-value.is-updated {
  color: var(--accent);
}

.spark {
  height: 16px;
  margin-top: 4px;
}

.spark-bars rect {
  fill: rgba(15, 118, 110, 0.5);
}

/* The analysis step absorbs the spare height so both columns end level. */
.flow-step-grow {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

.panel-chart {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  padding: 10px 12px 8px;
}

.chart {
  flex: 1 1 auto;
  height: 90px;
  min-height: 90px;
  margin: 6px 0 4px;
}

.chart stop {
  stop-color: var(--accent);
}

.chart-grid line {
  stroke: rgba(31, 42, 40, 0.08);
}

.chart-risk {
  fill: rgba(180, 83, 9, 0.07);
}

.chart-now {
  stroke: rgba(31, 42, 40, 0.3);
}

.chart-cross {
  stroke: #fff;
}

.chart-callout {
  top: 32px;
  background: #fff7ed;
  border-color: rgba(180, 83, 9, 0.35);
}

.decision-card {
  padding: 10px 12px;
  background: var(--accent-soft);
  border-color: rgba(15, 118, 110, 0.3);
}

.decision-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.decision-title {
  margin: 0;
  font-size: 0.98rem;
  color: var(--ink);
}

.decision-reasons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
}

.decision-reasons li {
  padding: 2px 8px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--border);
  font-size: 0.66rem;
  color: var(--ink);
}

.decision-reasons li::before {
  margin-right: 5px;
}

.fake-btn {
  padding: 4px 11px;
  border-color: rgba(31, 42, 40, 0.25);
  background: #fff;
  color: var(--ink);
  font-size: 0.68rem;
}

.fake-btn-primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.hero-panel figcaption {
  margin-top: 8px;
}

@media (max-width: 1099px) {
  .chart {
    height: 110px;
    min-height: 110px;
  }
}

/* Stronger step labels (Measure / Analyse / Decide) */

.flow-label {
  gap: 9px;
  margin-bottom: 7px;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--ink);
}

.flow-index {
  width: 22px;
  height: 22px;
  border: none;
  background: var(--accent);
  color: #fff;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 500;
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.flow-label::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  margin-left: 4px;
  background: linear-gradient(90deg, rgba(15, 118, 110, 0.35), transparent);
}

.flow-arrow::before {
  left: 10px;
  background: var(--accent);
  opacity: 0.8;
}

.flow-arrow::after {
  left: 6.5px;
  opacity: 1;
}

.js .flow-arrow::before {
  animation: none;
}

@media (min-width: 1100px) and (max-width: 1199px) {
  .chart {
    height: 80px;
    min-height: 80px;
  }
}
