:root {
  color-scheme: light;
  --bg: #f1ece4;
  --paper: #fffaf2;
  --ink: #14151a;
  --soft: #716a62;
  --line: rgba(17, 19, 24, 0.12);
  --line-strong: rgba(17, 19, 24, 0.24);
  --accent: #315fcb;
  --copper: #b96f42;
  --teal: #4db7a7;
  --plum: #7863a5;
  --sand: #d9c3a7;
  --shadow: 0 26px 90px rgba(17, 19, 24, 0.12);
  --font: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: var(--font);
  background:
    linear-gradient(90deg, rgba(17,19,24,0.04) 1px, transparent 1px) 0 0 / 52px 52px,
    linear-gradient(rgba(17,19,24,0.04) 1px, transparent 1px) 0 0 / 52px 52px,
    radial-gradient(circle at 75% 5%, rgba(185,111,66,0.22), transparent 28%),
    radial-gradient(circle at 10% 35%, rgba(49,95,203,0.14), transparent 26%),
    var(--bg);
  overflow-x: hidden;
  max-width: 100vw;
}

main {
  overflow-x: clip;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 30;
  opacity: 0.055;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 220 220' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.72' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

body.modal-open {
  overflow: hidden;
}

#field {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.hp-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.shell {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
}

.header {
  position: sticky;
  top: 14px;
  z-index: 20;
  width: min(1180px, calc(100% - 28px));
  min-height: 66px;
  margin: 14px auto 0;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(17,19,24,0.1);
  border-radius: 10px;
  background: rgba(255,253,248,0.86);
  box-shadow: 0 18px 70px rgba(17,19,24,0.08);
  backdrop-filter: blur(22px);
}

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

.lang-switch {
  height: 46px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255,255,255,0.54);
}

.lang-btn {
  width: 38px;
  height: 36px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--soft);
  font: 900 11px/1 var(--mono);
}

.lang-btn.active {
  background: var(--ink);
  color: #fff;
}

.brand {
  min-width: 220px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand-glyph {
  width: 44px;
  height: 44px;
  min-width: 44px;
  flex: 0 0 44px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--ink);
  color: var(--sand);
  font: 900 22px/1 var(--font);
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 18px;
  line-height: 1;
  letter-spacing: 0;
}

.brand small {
  margin-top: 5px;
  color: var(--soft);
  font: 800 10px/1 var(--mono);
  text-transform: uppercase;
}

.nav {
  justify-self: center;
  display: flex;
  gap: 4px;
}

.nav a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 8px;
  color: #38404b;
  text-decoration: none;
  font-size: 14px;
  font-weight: 800;
}

.nav a:hover {
  background: rgba(17,19,24,0.06);
}

.nav-cta,
.btn {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 9px;
  padding: 0 18px;
  border: 0;
  text-decoration: none;
  white-space: nowrap;
  font-weight: 900;
  letter-spacing: 0;
}

.nav-cta,
.btn.primary {
  background: var(--ink);
  color: #fff;
  box-shadow: 0 18px 38px rgba(17,19,24,0.18);
}

.nav-cta {
  background: var(--copper);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px rgba(17,19,24,0.1);
}

.btn.secondary {
  background: rgba(255,253,248,0.74);
  color: var(--ink);
  border: 1px solid var(--line);
}

.btn:hover,
.nav-cta:hover {
  transform: translateY(-1px);
}

.section {
  padding: 94px 0;
}

.hero {
  min-height: calc(100vh - 80px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(430px, 0.92fr);
  gap: clamp(40px, 6vw, 88px);
  align-items: center;
  padding-top: 54px;
}

.eyebrow {
  margin: 0 0 16px;
  color: #315025;
  font: 900 12px/1.25 var(--mono);
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
  letter-spacing: 0;
}

h1,
h2,
h3 {
  min-width: 0;
  overflow-wrap: normal;
  hyphens: manual;
  word-break: normal;
  text-wrap: balance;
}

h1 {
  max-width: 800px;
  margin-bottom: 24px;
  font-size: clamp(44px, 4.7vw, 68px);
  line-height: 1;
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(34px, 4vw, 58px);
  line-height: 1;
}

h3 {
  font-size: 28px;
  line-height: 1.15;
}

.lead {
  max-width: 680px;
  margin-bottom: 30px;
  color: #4f5966;
  font-size: clamp(18px, 1.45vw, 22px);
  line-height: 1.58;
  font-weight: 560;
}

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

.signal-row {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.signal-row span,
.detail-meta span,
.service-row small {
  font: 850 12px/1 var(--mono);
  color: var(--soft);
}

.signal-row span {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255,253,248,0.62);
}

.command-visual {
  position: relative;
  min-height: 630px;
  overflow: clip;
}

.reactor {
  position: absolute;
  top: 34px;
  right: 36px;
  z-index: 5;
  width: 154px;
  height: 154px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  filter: drop-shadow(0 24px 54px rgba(17,19,24,0.16));
  overflow: visible;
}

.reactor-track,
.reactor-grid,
.reactor-core,
.reactor-dot {
  position: absolute;
  border-radius: 50%;
}

.reactor-track {
  inset: 0;
  background:
    conic-gradient(from 150deg, var(--teal), var(--accent), var(--plum), var(--copper), var(--teal));
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.5),
    0 0 0 7px rgba(255,253,248,0.55);
}

.reactor-grid {
  inset: 15px;
  background:
    linear-gradient(90deg, rgba(17,19,24,0.05) 1px, transparent 1px) 0 0 / 18px 18px,
    linear-gradient(rgba(17,19,24,0.05) 1px, transparent 1px) 0 0 / 18px 18px,
    radial-gradient(circle at 32% 25%, rgba(77,183,167,0.28), transparent 36%),
    radial-gradient(circle at 70% 72%, rgba(185,111,66,0.18), transparent 36%),
    rgba(255,253,248,0.92);
  box-shadow: inset 0 0 0 1px rgba(17,19,24,0.08);
}

.reactor-core {
  inset: 43px;
  display: grid;
  place-items: center;
  border-radius: 21px;
  background:
    linear-gradient(145deg, rgba(255,255,255,0.08), transparent 36%),
    #111318;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.08),
    0 12px 28px rgba(17,19,24,0.18);
}

.core-window {
  position: relative;
  width: 44px;
  height: 34px;
  display: block;
  overflow: hidden;
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255,253,248,0.98), rgba(238,239,232,0.92));
  box-shadow:
    inset 0 0 0 1px rgba(17,19,24,0.12),
    0 10px 22px rgba(0,0,0,0.22);
}

.core-window::before {
  content: "";
  position: absolute;
  top: 7px;
  left: 8px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--copper);
  box-shadow:
    8px 0 0 var(--teal),
    16px 0 0 var(--plum);
}

.core-window i {
  position: absolute;
  left: 8px;
  height: 3px;
  border-radius: 999px;
  background: var(--accent);
}

.core-window i:nth-child(1) {
  top: 17px;
  width: 26px;
}

.core-window i:nth-child(2) {
  top: 23px;
  width: 18px;
  background: var(--teal);
}

.core-window i:nth-child(3) {
  top: 29px;
  width: 29px;
  background: var(--copper);
}

.reactor-dot {
  width: 13px;
  height: 13px;
  background: var(--paper);
  box-shadow: 0 0 0 5px rgba(255,253,248,0.58);
}

.reactor-dot.one {
  top: 25px;
  left: 20px;
  background: var(--teal);
}

.reactor-dot.two {
  right: 18px;
  top: 72px;
  background: var(--plum);
}

.reactor-dot.three {
  left: 72px;
  bottom: 14px;
  background: var(--copper);
}

.reactor.is-spinning .reactor-track {
  animation: dialSpin 1s cubic-bezier(.2,.8,.2,1);
}

.reactor.is-spinning .reactor-core {
  animation: dialPulse 1s cubic-bezier(.2,.8,.2,1);
}

@keyframes dialSpin {
  to { transform: rotate(360deg); }
}

@keyframes dialPulse {
  50% { transform: scale(1.08); }
}

.glass-panel {
  position: absolute;
  border: 1px solid rgba(17,19,24,0.12);
  border-radius: 12px;
  background: rgba(255,253,248,0.76);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.main-panel {
  inset: 124px 0 auto 36px;
  min-height: 320px;
  overflow: hidden;
  transform: rotate(-2deg);
}

.panel-head {
  height: 46px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  border-bottom: 1px solid rgba(17,19,24,0.08);
  background: rgba(255,253,248,0.68);
}

.panel-head span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(17,19,24,0.24);
}

.panel-head b {
  margin-left: 8px;
  color: #596271;
  font: 850 12px/1 var(--mono);
}

.terminal-lines {
  position: relative;
  z-index: 1;
  padding: 36px 34px 24px;
  display: grid;
  gap: 16px;
}

.terminal-lines p {
  margin: 0;
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 18px;
  align-items: baseline;
  font: 800 clamp(18px, 2vw, 25px)/1.3 var(--mono);
}

.terminal-lines em {
  color: var(--accent);
  font-style: normal;
  font-size: 13px;
}

.progress-track {
  margin: 8px 34px 34px;
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(17,19,24,0.08);
}

.progress-track i {
  display: block;
  width: 72%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--copper), var(--accent), var(--teal));
}

.spec-card {
  left: 0;
  bottom: 72px;
  width: min(300px, 52%);
  padding: 22px;
  transform: rotate(3deg);
}

.metric-card {
  right: 8px;
  bottom: 10px;
  width: min(360px, 58%);
  padding: 22px;
  transform: rotate(-3deg);
}

.glass-panel small {
  display: block;
  margin-bottom: 30px;
  color: var(--soft);
  font: 900 11px/1 var(--mono);
}

.spec-card strong,
.spec-card span {
  display: block;
}

.spec-card strong {
  font-size: 28px;
  line-height: 1.1;
}

.spec-card span {
  margin-top: 12px;
  color: var(--accent);
  font: 900 18px/1 var(--mono);
}

.rings {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.rings span {
  position: relative;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, rgba(255,253,248,0.98) 0 62%, transparent 63%),
    conic-gradient(var(--ring) var(--v), rgba(17,19,24,0.1) 0);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.7),
    0 14px 32px var(--glow);
  color: var(--ink);
  padding-top: 17px;
  font: 900 12px/1 var(--mono);
}

.rings span::before {
  content: attr(data-score) "%";
  position: absolute;
  top: 30%;
  left: 50%;
  transform: translateX(-50%);
  color: var(--ring);
  font: 900 10px/1 var(--mono);
}

.rings span::after {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: inherit;
  border: 1px solid rgba(255,255,255,0.78);
  pointer-events: none;
}

.section-head {
  max-width: 780px;
  margin-bottom: 38px;
}

.section-head.compact {
  max-width: 900px;
}

.section-head p:not(.eyebrow),
.contact-card p {
  color: var(--soft);
  font-size: 18px;
  line-height: 1.58;
}

.service-layout {
  display: grid;
  grid-template-columns: 0.88fr 1.12fr;
  gap: 18px;
}

.service-list,
.service-detail,
.system-card,
.decision-shell,
.contact-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,253,248,0.76);
  box-shadow: 0 18px 70px rgba(17,19,24,0.08);
  backdrop-filter: blur(18px);
}

.service-list {
  padding: 8px;
  display: grid;
  gap: 8px;
}

.service-row {
  width: 100%;
  min-height: 88px;
  display: grid;
  grid-template-columns: 44px 1fr;
  grid-template-rows: auto auto;
  column-gap: 14px;
  align-items: center;
  padding: 16px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  text-align: left;
}

.service-row > span {
  grid-row: 1 / 3;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: rgba(17,19,24,0.06);
  font: 900 12px/1 var(--mono);
}

.service-row strong {
  font-size: 18px;
  line-height: 1.2;
}

.service-row.active {
  border-color: rgba(17,19,24,0.16);
  background: var(--ink);
  color: #fff;
}

.service-row.active small {
  color: rgba(255,255,255,0.64);
}

.service-row.active > span {
  background: var(--sand);
  color: var(--ink);
}

.service-mobile-detail {
  display: none;
}

.service-detail {
  min-height: 100%;
  padding: clamp(28px, 4vw, 46px);
}

.service-detail h3 {
  max-width: 620px;
  margin-bottom: 16px;
  font-size: clamp(34px, 4vw, 54px);
  line-height: 1;
}

.service-detail p:not(.eyebrow) {
  max-width: 650px;
  color: var(--soft);
  font-size: 18px;
  line-height: 1.58;
}

.detail-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 30px 0;
}

.detail-meta div {
  min-width: 0;
  min-height: 104px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255,255,255,0.52);
}

.detail-meta strong {
  display: block;
  margin-top: 22px;
  min-width: 0;
  font-size: clamp(22px, 2vw, 28px);
  line-height: 1.08;
  overflow-wrap: break-word;
}

#detail-focus {
  font-size: clamp(20px, 1.7vw, 25px);
}

.service-detail ul {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
  list-style: none;
}

.service-detail li {
  position: relative;
  padding: 14px 16px 14px 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255,255,255,0.48);
  color: #4f5966;
  line-height: 1.45;
}

.service-detail li::before {
  content: "";
  position: absolute;
  top: 18px;
  left: 16px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--copper);
  box-shadow: 0 0 0 5px rgba(185,111,66,0.18);
}

.service-detail-cta {
  width: fit-content;
  margin-top: 26px;
}

.system-card {
  padding: clamp(28px, 4vw, 48px);
}

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

.accordion-card {
  min-height: 240px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255,255,255,0.5);
}

.system-grid span,
.timeline span {
  color: var(--accent);
  font: 900 12px/1 var(--mono);
  text-transform: uppercase;
}

.accordion-card summary {
  display: block;
  list-style: none;
  cursor: default;
}

.accordion-card summary::-webkit-details-marker {
  display: none;
}

.system-grid h3,
.timeline h3 {
  margin: 58px 0 12px;
}

.system-grid h3 {
  font-size: 22px;
  line-height: 1.16;
}

.timeline h3 {
  font-size: 24px;
  line-height: 1.16;
}

.system-grid p,
.timeline p,
.route-card p {
  color: var(--soft);
  line-height: 1.58;
}

.decision-shell {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 18px;
  padding: 18px;
}

.goal-grid {
  display: grid;
  gap: 10px;
}

.goal-card {
  width: 100%;
  min-height: 96px;
  display: grid;
  grid-template-columns: 44px 1fr;
  grid-template-rows: auto auto;
  column-gap: 14px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255,255,255,0.48);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.goal-card > span {
  grid-row: 1 / 3;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: rgba(17,19,24,0.06);
  font: 900 12px/1 var(--mono);
}

.goal-card strong,
.goal-card small {
  display: block;
}

.goal-card strong {
  font-size: 18px;
  line-height: 1.2;
}

.goal-card small {
  color: var(--soft);
  font: 800 12px/1.35 var(--mono);
}

.goal-card.active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.goal-card.active > span {
  background: var(--sand);
  color: var(--ink);
}

.goal-card.active small {
  color: rgba(255,255,255,0.62);
}

.goal-mobile-detail {
  display: none;
}

.route-card {
  padding: clamp(28px, 4vw, 46px);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(49,95,203,0.09), rgba(185,111,66,0.08)),
    rgba(255,255,255,0.52);
  border: 1px solid var(--line);
}

.route-card h3 {
  max-width: 650px;
  margin-bottom: 16px;
  font-size: clamp(34px, 4vw, 54px);
  line-height: 1;
}

.route-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 30px 0;
}

.route-meta div {
  min-width: 0;
  min-height: 104px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255,255,255,0.56);
}

.route-meta span {
  color: var(--soft);
  font: 850 12px/1 var(--mono);
}

.route-meta strong {
  display: block;
  margin-top: 22px;
  min-width: 0;
  font-size: clamp(21px, 1.8vw, 26px);
  line-height: 1.08;
  overflow-wrap: break-word;
}

.route-card ul {
  margin: 0 0 24px;
  padding: 0;
  display: grid;
  gap: 10px;
  list-style: none;
}

.route-card li {
  position: relative;
  padding: 14px 16px 14px 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255,255,255,0.5);
  color: #4f5966;
  line-height: 1.45;
}

.route-card li::before {
  content: "";
  position: absolute;
  top: 18px;
  left: 16px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px rgba(49,95,203,0.13);
}

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

.contact-card {
  min-height: 320px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 28px;
  align-items: end;
  padding: clamp(30px, 5vw, 58px);
  background:
    linear-gradient(135deg, rgba(185,111,66,0.18), rgba(49,95,203,0.10) 42%, rgba(255,253,248,0.78)),
    rgba(255,253,248,0.82);
}

.contact-card h2 {
  max-width: 760px;
}

.contact-card p {
  max-width: 720px;
  margin-bottom: 0;
}

.footer {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid var(--line);
  color: var(--soft);
  font: 850 12px/1 var(--mono);
}

.modal {
  width: min(470px, calc(100vw - 32px));
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
}

.modal::backdrop {
  background: rgba(238,239,232,0.78);
  backdrop-filter: blur(18px);
}

.modal form {
  position: relative;
  overflow: hidden;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  box-shadow: 0 34px 110px rgba(17,19,24,0.18);
}

.modal h3 {
  margin-bottom: 12px;
  font-size: 34px;
}

.modal p:not(.eyebrow) {
  color: var(--soft);
  line-height: 1.58;
}

.form-grid {
  display: grid;
  gap: 10px;
  margin: 22px 0 0;
}

.form-grid input,
.form-grid select,
.form-grid textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255,255,255,0.64);
  color: var(--ink);
  padding: 14px 15px;
  outline: none;
}

.form-grid textarea {
  min-height: 104px;
  resize: vertical;
}

.form-grid input:focus,
.form-grid select:focus,
.form-grid textarea:focus {
  border-color: rgba(49,95,203,0.48);
}

.form-status {
  min-height: 20px;
  margin: 12px 0 0;
  color: var(--soft);
  font: 800 12px/1.45 var(--mono);
}

.form-status.ok {
  color: #315f36;
}

.form-status.error {
  color: #b04f3a;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
}

.chat-toggle {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 28;
  width: 64px;
  height: 64px;
  padding: 0;
  display: grid;
  place-items: center;
  overflow: visible;
  isolation: isolate;
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  border-radius: 20px;
  background: var(--ink);
  box-shadow: 0 24px 70px rgba(17,19,24,0.2);
}

.chat-toggle::before {
  content: "";
  position: absolute;
  inset: -2px;
  z-index: -1;
  border-radius: 22px;
  background: conic-gradient(from 210deg, var(--accent), var(--teal), var(--copper), var(--plum), var(--accent));
}

.chat-toggle span {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: transparent;
}

.chat-toggle span::before,
.chat-toggle span::after {
  content: "";
  position: absolute;
}

.chat-toggle span::before {
  width: 23px;
  height: 17px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  border: 3px solid #fff;
  border-radius: 6px;
  background: transparent;
}

.chat-toggle span::after {
  display: none;
}

.chat-toggle i {
  position: absolute;
  right: -4px;
  top: -5px;
  min-width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--copper);
  color: #fff;
  font: 900 11px/1 var(--mono);
}

.chat-window {
  position: fixed;
  right: 24px;
  bottom: 100px;
  z-index: 29;
  width: min(390px, calc(100vw - 32px));
  height: min(620px, calc(100vh - 130px));
  display: none;
  grid-template-rows: auto auto auto 1fr auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,253,248,0.96);
  box-shadow: 0 34px 110px rgba(17,19,24,0.22);
  backdrop-filter: blur(18px);
}

.chat-window.open {
  display: grid;
}

.chat-window header {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  background: var(--ink);
  color: #fff;
}

.chat-window header strong {
  display: block;
  font-size: 16px;
}

.chat-window header small {
  color: var(--teal);
  font: 800 12px/1.2 var(--mono);
}

.chat-window header button {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 9px;
  background: rgba(255,255,255,0.08);
  color: #fff;
  font-size: 24px;
}

.chat-intro {
  padding: 18px;
  display: grid;
  gap: 10px;
}

.chat-intro p {
  margin: 0;
  color: var(--soft);
  font-weight: 700;
}

.chat-intro input,
.chat-input-area input {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255,255,255,0.7);
  color: var(--ink);
  padding: 12px 13px;
  outline: none;
}

.chat-quick-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.chat-quick-links a {
  min-height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255,255,255,0.62);
  color: var(--ink);
  text-decoration: none;
  font: 900 12px/1 var(--mono);
}

#chat-intro-error {
  min-height: 16px;
  color: #b04f3a;
  font: 800 12px/1.3 var(--mono);
}

.chat-client-num {
  padding: 8px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--soft);
  font: 800 12px/1 var(--mono);
  text-align: center;
}

.chat-messages {
  min-height: 0;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-msg {
  display: flex;
}

.chat-msg.client {
  justify-content: flex-end;
}

.chat-bubble {
  max-width: 82%;
  padding: 10px 12px;
  border-radius: 13px;
  background: rgba(17,19,24,0.08);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.38;
  overflow-wrap: anywhere;
}

.chat-msg.client .chat-bubble {
  background: var(--ink);
  color: #fff;
}

.chat-time {
  display: block;
  margin-top: 6px;
  opacity: 0.55;
  font: 800 10px/1 var(--mono);
}

.chat-input-area {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--line);
}

.chat-input-area button {
  border: 0;
  border-radius: 10px;
  background: var(--ink);
  color: #fff;
  padding: 0 14px;
  font: 900 12px/1 var(--mono);
}

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

  .header-actions {
    grid-column: 2;
  }

  .nav {
    grid-column: 1 / -1;
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
  }

  .hero,
  .service-layout,
  .decision-shell {
    grid-template-columns: 1fr;
  }

  .command-visual {
    min-height: 560px;
  }

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

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

@media (max-width: 660px) {
  .shell {
    width: min(100% - 24px, 1180px);
  }

  .header {
    width: calc(100% - 20px);
    top: 8px;
  }

  .brand {
    min-width: 0;
  }

  .brand-glyph {
    width: 40px;
    height: 40px;
    min-width: 40px;
    flex-basis: 40px;
    border-radius: 10px;
    font-size: 20px;
  }

  .brand small {
    display: none;
  }

  .nav-cta {
    padding: 0 12px;
  }

  .header-actions {
    gap: 6px;
  }

  .lang-switch {
    height: 42px;
  }

  .lang-btn {
    width: 31px;
    height: 32px;
    font-size: 10px;
  }

  .nav {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 2px;
    overflow: visible;
  }

  .nav a {
    justify-content: center;
    padding: 0 4px;
    font-size: 13px;
  }

  .section {
    padding: 68px 0;
  }

  .hero {
    min-height: auto;
    padding-top: 58px;
  }

  h1 {
    font-size: clamp(34px, 9.1vw, 44px);
    line-height: 1.04;
    overflow-wrap: normal;
    word-break: normal;
  }

  h2 {
    font-size: clamp(32px, 9vw, 44px);
    line-height: 1.04;
  }

  .service-detail h3,
  .route-card h3,
  .modal h3 {
    font-size: clamp(28px, 7.5vw, 36px);
    line-height: 1.05;
  }

  .command-visual {
    min-height: 470px;
  }

  .main-panel {
    inset: 92px 0 auto 0;
  }

  .terminal-lines {
    padding: 28px 22px 18px;
  }

  .terminal-lines p {
    grid-template-columns: 1fr;
    gap: 4px;
    font-size: 17px;
  }

  .reactor {
    width: 116px;
    height: 116px;
    min-height: 0;
    right: 12px;
    top: 18px;
  }

  .reactor-grid {
    inset: 12px;
  }

  .reactor-core {
    inset: 34px;
    border-radius: 16px;
  }

  .core-window {
    width: 34px;
    height: 27px;
    border-radius: 8px;
  }

  .core-window::before {
    top: 6px;
    left: 7px;
    width: 3px;
    height: 3px;
    box-shadow:
      7px 0 0 var(--teal),
      14px 0 0 var(--plum);
  }

  .core-window i {
    left: 7px;
    height: 2px;
  }

  .core-window i:nth-child(1) {
    top: 15px;
    width: 20px;
  }

  .core-window i:nth-child(2) {
    top: 20px;
    width: 14px;
  }

  .core-window i:nth-child(3) {
    top: 24px;
    width: 22px;
  }

  .reactor-dot {
    width: 10px;
    height: 10px;
    box-shadow: 0 0 0 4px rgba(255,253,248,0.58);
  }

  .reactor-dot.one {
    top: 19px;
    left: 15px;
  }

  .reactor-dot.two {
    right: 14px;
    top: 54px;
  }

  .reactor-dot.three {
    left: 54px;
    bottom: 11px;
  }

  .spec-card {
    width: 58%;
    bottom: 52px;
  }

  .metric-card {
    width: 68%;
  }

  .detail-meta,
  .route-meta,
  .system-grid,
  .timeline {
    grid-template-columns: 1fr;
  }

  .accordion-card {
    min-height: 0;
    padding: 0;
    overflow: hidden;
  }

  .accordion-card summary {
    position: relative;
    min-height: 76px;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) 26px;
    gap: 10px;
    align-items: center;
    padding: 14px;
    cursor: pointer;
  }

  .accordion-card summary::after {
    content: "+";
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: rgba(17,19,24,0.07);
    color: var(--ink);
    font: 900 18px/1 var(--mono);
  }

  .accordion-card[open] summary::after {
    content: "-";
  }

  .accordion-card summary span {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: rgba(17,19,24,0.06);
  }

  .accordion-card summary h3 {
    margin: 0;
    min-width: 0;
    font-size: 18px;
    line-height: 1.15;
  }

  .accordion-card p {
    margin: 0;
    padding: 0 14px 18px 58px;
  }

  .service-row {
    grid-template-columns: 36px minmax(0, 1fr) 26px;
    grid-template-rows: auto auto auto;
    padding: 13px;
    align-items: start;
  }

  .service-row > span {
    grid-row: 1 / 3;
    width: 32px;
    height: 32px;
  }

  .service-row::after {
    content: "+";
    width: 26px;
    height: 26px;
    grid-column: 3;
    grid-row: 1 / 3;
    align-self: center;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: rgba(17,19,24,0.07);
    color: var(--ink);
    font: 900 18px/1 var(--mono);
  }

  .service-row.active::after {
    content: "-";
    background: rgba(255,255,255,0.12);
    color: #fff;
  }

  .service-row strong,
  .service-row small {
    min-width: 0;
    padding-right: 4px;
  }

  .service-row strong {
    font-size: 18px;
    line-height: 1.16;
  }

  .service-mobile-detail {
    grid-column: 1 / -1;
    display: none;
    margin-top: 16px;
    padding: 16px 0 2px;
    border-top: 1px solid rgba(255,255,255,0.14);
  }

  .service-row.active .service-mobile-detail {
    display: block;
  }

  .service-mobile-detail h3 {
    margin: 0 0 10px;
    font-size: 25px;
    line-height: 1.05;
    color: #fff;
  }

  .service-mobile-detail p {
    margin: 0 0 14px;
    color: rgba(255,255,255,0.7);
    font-size: 15px;
    line-height: 1.45;
  }

  .service-mobile-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 14px;
  }

  .service-mobile-meta div {
    min-width: 0;
    padding: 10px;
    border-radius: 9px;
    background: rgba(255,255,255,0.09);
  }

  .service-mobile-meta b {
    display: block;
    margin-bottom: 5px;
    color: rgba(255,255,255,0.5);
    font: 900 10px/1 var(--mono);
  }

  .service-mobile-meta em {
    display: block;
    color: #fff;
    font-style: normal;
    font-weight: 900;
    line-height: 1.15;
    overflow-wrap: anywhere;
  }

  .service-mobile-detail ul {
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
    list-style: none;
  }

  .service-mobile-detail li {
    padding: 11px 12px;
    border-radius: 9px;
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.74);
    font-size: 14px;
    line-height: 1.35;
  }

  .service-mobile-detail .mobile-detail-cta,
  .goal-mobile-detail .mobile-detail-cta {
    min-height: 48px;
    margin-top: 12px;
    padding: 0 16px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    color: var(--ink);
    background: #fffaf2;
    font: 900 15px/1.1 var(--font);
    text-align: center;
    cursor: pointer;
  }

  .goal-card {
    grid-template-columns: 36px minmax(0, 1fr) 26px;
    grid-template-rows: auto auto auto;
    align-items: start;
    min-height: 0;
    padding: 13px;
  }

  .goal-card > span {
    grid-row: 1 / 3;
    width: 32px;
    height: 32px;
  }

  .goal-card::after {
    content: "+";
    width: 26px;
    height: 26px;
    grid-column: 3;
    grid-row: 1 / 3;
    align-self: center;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: rgba(17,19,24,0.07);
    color: var(--ink);
    font: 900 18px/1 var(--mono);
  }

  .goal-card.active::after {
    content: "-";
    background: rgba(255,255,255,0.12);
    color: #fff;
  }

  .goal-card strong,
  .goal-card small {
    min-width: 0;
    padding-right: 4px;
  }

  .goal-card strong {
    font-size: 18px;
    line-height: 1.16;
  }

  .goal-mobile-detail {
    grid-column: 1 / -1;
    display: none;
    margin-top: 16px;
    padding: 16px 0 2px;
    border-top: 1px solid rgba(255,255,255,0.14);
  }

  .goal-card.active .goal-mobile-detail {
    display: block;
  }

  .goal-mobile-detail h3 {
    margin: 0 0 10px;
    font-size: 25px;
    line-height: 1.05;
    color: #fff;
  }

  .goal-mobile-detail p {
    margin: 0 0 14px;
    color: rgba(255,255,255,0.7);
    font-size: 15px;
    line-height: 1.45;
  }

  .goal-mobile-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 14px;
  }

  .goal-mobile-meta div {
    min-width: 0;
    padding: 10px;
    border-radius: 9px;
    background: rgba(255,255,255,0.09);
  }

  .goal-mobile-meta b {
    display: block;
    margin-bottom: 5px;
    color: rgba(255,255,255,0.5);
    font: 900 10px/1 var(--mono);
  }

  .goal-mobile-meta em {
    display: block;
    color: #fff;
    font-style: normal;
    font-weight: 900;
    line-height: 1.15;
    overflow-wrap: anywhere;
  }

  .goal-mobile-detail ul {
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
    list-style: none;
  }

  .goal-mobile-detail li {
    padding: 11px 12px;
    border-radius: 9px;
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.74);
    font-size: 14px;
    line-height: 1.35;
  }

  .service-detail,
  .route-card,
  .system-card,
  .contact-card {
    padding: 24px;
  }

  .service-detail {
    display: none;
  }

  .route-card {
    display: none;
  }

  .chat-toggle {
    right: 14px;
    bottom: calc(78px + env(safe-area-inset-bottom));
    width: 58px;
    height: 58px;
  }

  .chat-window {
    right: 10px;
    bottom: calc(146px + env(safe-area-inset-bottom));
    width: calc(100vw - 20px);
    height: min(560px, calc(100vh - 180px));
  }

  .footer {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
  }
}
