:root {
  --bg-light: #f5f5f7;
  --bg-dark: #000000;
  --surface-light: #ffffff;
  --surface-dark: #1d1d1f;
  --surface-dark-soft: #272729;
  --surface-dark-elevated: #2a2a2d;
  --text-light: #f5f5f7;
  --text-dark: #1d1d1f;
  --text-muted: rgba(0, 0, 0, 0.8);
  --text-muted-dark: rgba(255, 255, 255, 0.72);
  --text-tertiary: rgba(0, 0, 0, 0.48);
  --blue: #0071e3;
  --blue-link: #0066cc;
  --blue-dark: #2997ff;
  --border-soft: rgba(29, 29, 31, 0.08);
  --border-dark: rgba(255, 255, 255, 0.12);
  --shadow-soft: rgba(0, 0, 0, 0.22) 3px 5px 30px 0px;
  --radius-card: 8px;
  --radius-field: 11px;
  --radius-pill: 980px;
  --nav-height: 48px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg-light);
  color: var(--text-dark);
  font-family: "SF Pro Text", "SF Pro Icons", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.47;
  letter-spacing: -0.374px;
}

img {
  display: block;
  max-width: 100%;
}

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

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

button,
select,
summary {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--nav-height);
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: saturate(180%) blur(20px);
}

.nav-shell,
.section-shell,
.footer-shell {
  width: min(980px, calc(100% - 40px));
  margin: 0 auto;
}

.nav-shell {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links a {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  color: rgba(255, 255, 255, 0.92);
  font-size: 12px;
  line-height: 1.33;
  letter-spacing: -0.12px;
}

.nav-links a:hover {
  text-decoration: underline;
}

.nav-tools {
  display: flex;
  align-items: center;
}

.lang-select {
  min-height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-pill);
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  appearance: none;
}

.lang-select option {
  color: var(--text-dark);
}

.theme-dark {
  background: var(--bg-dark);
  color: var(--text-light);
}

.theme-light {
  background: var(--bg-light);
  color: var(--text-dark);
}

.hero-section,
.planner-section,
.results-section {
  padding: 72px 0;
}

.hero-layout {
  min-height: calc(100vh - var(--nav-height) - 24px);
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  align-items: center;
  gap: 48px;
}

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

.eyebrow {
  margin: 0 0 14px;
  color: var(--blue-dark);
  font-size: 14px;
  line-height: 1.29;
  letter-spacing: -0.224px;
}

.eyebrow-light {
  color: var(--blue-link);
}

.hero-title,
.section-title,
.panel-title,
.visual-title,
.metric-value {
  font-family: "SF Pro Display", "SF Pro Icons", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.hero-title {
  margin: 0;
  font-size: clamp(2.5rem, 6vw, 3.5rem);
  font-weight: 600;
  line-height: 1.07;
  letter-spacing: -0.28px;
}

.hero-subtitle {
  max-width: 560px;
  margin: 18px 0 0;
  color: var(--text-muted-dark);
  font-size: 21px;
  line-height: 1.19;
  letter-spacing: 0.231px;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

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

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

.btn-primary:hover {
  background: #0077ed;
}

.btn-secondary {
  background: transparent;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.42);
}

.btn-secondary:hover {
  border-color: #ffffff;
}

.btn-compact {
  min-height: 40px;
  padding-inline: 16px;
}

.btn-block,
.field-action {
  width: 100%;
}

.hero-panel {
  padding: 28px;
  border-radius: var(--radius-card);
  background: var(--surface-dark-soft);
  box-shadow: var(--shadow-soft);
}

.hero-panel-copy h2 {
  margin: 6px 0 10px;
  font-family: "SF Pro Display", "SF Pro Icons", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 40px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: normal;
}

.hero-panel-copy p {
  margin: 0;
  color: var(--text-muted-dark);
}

.mini-label,
.panel-kicker,
.metric-label,
.field-label,
.message-error,
.stat-label {
  font-size: 12px;
  line-height: 1.33;
  letter-spacing: -0.12px;
}

.mini-label,
.panel-kicker {
  color: var(--blue-dark);
}

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

.metric-card,
.stat-card {
  padding: 18px;
  border-radius: var(--radius-card);
}

.metric-card {
  background: rgba(255, 255, 255, 0.04);
}

.metric-value {
  display: block;
  font-size: 34px;
  font-weight: 600;
  line-height: 1.07;
  color: #ffffff;
}

.metric-label {
  display: block;
  margin-top: 6px;
  color: var(--text-muted-dark);
}

.section-intro {
  max-width: 680px;
  margin-bottom: 40px;
}

.section-title {
  margin: 0;
  font-size: clamp(2rem, 4.5vw, 2.5rem);
  font-weight: 600;
  line-height: 1.1;
}

.section-title-dark {
  color: #ffffff;
}

.section-copy {
  margin: 14px 0 0;
  color: var(--text-muted);
}

.section-copy-dark {
  color: var(--text-muted-dark);
}

.planner-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(300px, 0.7fr);
  gap: 24px;
}

.planner-side {
  display: grid;
  gap: 24px;
}

.panel,
.details-card,
.visual-card {
  border-radius: var(--radius-card);
}

.panel {
  padding: 28px;
  background: var(--surface-light);
}

.panel-large {
  min-width: 0;
}

.panel-cta {
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.compact-head {
  margin-bottom: 0;
}

.panel-title {
  margin: 6px 0 0;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.19;
  letter-spacing: 0.231px;
  color: var(--text-dark);
}

.panel-copy {
  margin: 12px 0 0;
  color: var(--text-muted);
}

.orders-list {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.order-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 108px 44px;
  gap: 10px;
  padding: 12px;
  border-radius: var(--radius-card);
  background: #fbfbfd;
}

.order-remove {
  min-height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(29, 29, 31, 0.06);
  color: var(--text-tertiary);
}

.order-remove:hover {
  background: rgba(29, 29, 31, 0.12);
  color: var(--text-dark);
}

.field-label {
  display: inline-block;
  margin: 18px 0 10px;
  color: var(--text-tertiary);
}

.field-label-dark {
  margin: 0;
  color: rgba(255, 255, 255, 0.58);
}

.field-input {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-field);
  background: #fafafc;
  color: var(--text-dark);
  appearance: none;
}

.field-input-dark {
  min-width: min(100%, 430px);
  background: var(--surface-dark-elevated);
  color: #ffffff;
  border-color: var(--border-dark);
}

.field-input-center {
  text-align: center;
}

.field-input-wide {
  width: 100%;
}

.triple-grid,
.double-grid {
  display: grid;
  gap: 10px;
}

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

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

.expander {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(29, 29, 31, 0.08);
}

.expander summary {
  color: var(--blue-link);
  font-size: 14px;
  line-height: 1.43;
  letter-spacing: -0.224px;
  list-style: none;
}

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

.expander-body {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.message-error {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: var(--radius-card);
  background: rgba(255, 59, 48, 0.08);
  color: #b42318;
}

.results-topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--surface-dark-soft);
}

.stat-value {
  display: block;
  font-family: "SF Pro Display", "SF Pro Icons", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 40px;
  font-weight: 600;
  line-height: 1.07;
  color: #ffffff;
}

.stat-label {
  display: block;
  margin-top: 8px;
  color: var(--text-muted-dark);
}

.visual-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-bottom: 24px;
}

.visual-card,
.details-card {
  padding: 28px;
  background: var(--surface-dark-soft);
}

.panel-kicker-dark {
  color: var(--blue-dark);
}

.visual-head {
  margin-bottom: 18px;
}

.visual-title {
  margin: 6px 0 0;
  font-size: 28px;
  font-weight: 400;
  line-height: 1.14;
  letter-spacing: 0.196px;
  color: #ffffff;
}

.visual-canvas {
  width: 100%;
  display: block;
  border-radius: var(--radius-card);
  background: #101012;
}

.solution-details {
  display: grid;
  gap: 14px;
}

.solution-summary,
.solution-item {
  padding: 18px 20px;
  border-radius: var(--radius-card);
  background: rgba(255, 255, 255, 0.04);
}

.solution-summary {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
}

.solution-summary strong,
.solution-item strong,
.solution-layer strong {
  color: #ffffff;
}

.solution-summary span,
.solution-item p,
.solution-layer {
  color: var(--text-muted-dark);
}

.solution-item-header {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: baseline;
  justify-content: space-between;
}

.solution-item-title {
  margin: 0;
  font-family: "SF Pro Display", "SF Pro Icons", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.19;
  letter-spacing: 0.231px;
  color: #ffffff;
}

.solution-item-meta {
  margin: 8px 0 0;
}

.solution-layers {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.solution-layer {
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 14px;
  line-height: 1.43;
  letter-spacing: -0.224px;
}

.site-footer {
  background: var(--bg-light);
  border-top: 1px solid rgba(29, 29, 31, 0.08);
}

.footer-shell {
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer-shell p {
  margin: 0;
  color: var(--text-tertiary);
  font-size: 12px;
  line-height: 1.33;
  letter-spacing: -0.12px;
}

.footer-shell span {
  color: var(--blue-link);
}

@media (max-width: 1024px) {
  .hero-layout,
  .planner-grid,
  .visual-grid,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .hero-layout {
    min-height: auto;
  }
}

@media (max-width: 834px) {
  .nav-shell,
  .section-shell,
  .footer-shell {
    width: min(980px, calc(100% - 32px));
  }

  .nav-links {
    display: none;
  }

  .hero-section,
  .planner-section,
  .results-section {
    padding: 56px 0;
  }

  .hero-panel-copy h2 {
    font-size: 32px;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 14px;
  }

  .nav-shell,
  .section-shell,
  .footer-shell {
    width: min(980px, calc(100% - 20px));
  }

  .site-nav {
    height: 42px;
  }

  .brand-mark,
  .lang-select {
    min-height: 30px;
  }

  .lang-select {
    padding: 0 10px;
    font-size: 12px;
  }

  .hero-section,
  .planner-section,
  .results-section {
    padding: 24px 0;
  }

  .hero-layout {
    gap: 14px;
  }

  .hero-title {
    font-size: 1.95rem;
  }

  .hero-subtitle,
  .section-copy,
  .panel-copy {
    font-size: 14px;
    line-height: 1.34;
  }

  .eyebrow,
  .panel-kicker {
    margin-bottom: 6px;
    font-size: 11px;
  }

  .cta-row {
    gap: 8px;
    margin-top: 16px;
  }

  .btn {
    min-height: 36px;
    padding: 6px 14px;
    font-size: 14px;
  }

  .btn-compact {
    min-height: 34px;
    padding-inline: 12px;
    font-size: 13px;
  }

  .section-intro {
    margin-bottom: 16px;
  }

  .panel,
  .visual-card,
  .details-card,
  .hero-panel {
    padding: 12px 10px;
  }

  .hero-panel-copy h2,
  .section-title {
    font-size: 1.45rem;
  }

  .panel-title,
  .solution-item-title {
    font-size: 16px;
  }

  .visual-title {
    font-size: 18px;
  }

  .panel-head {
    gap: 8px;
  }

  .order-row,
  .results-topbar,
  .solution-summary,
  .solution-item-header,
  .footer-shell {
    flex-direction: column;
    align-items: stretch;
  }

  .order-row {
    grid-template-columns: minmax(0, 1fr) 64px 32px;
    gap: 6px;
    padding: 6px;
  }

  .order-remove {
    border-radius: var(--radius-field);
    min-height: 32px;
  }

  .field-input {
    min-height: 36px;
    padding: 0 10px;
    font-size: 13px;
  }

  .field-label {
    margin: 10px 0 6px;
  }

  .orders-list,
  .planner-side,
  .visual-grid,
  .solution-details {
    gap: 8px;
  }

  .expander {
    margin-top: 12px;
    padding-top: 10px;
  }

  .expander-body,
  .triple-grid,
  .double-grid {
    gap: 6px;
  }

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

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

  .hero-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    margin-top: 12px;
  }

  .metric-card,
  .stat-card,
  .solution-summary,
  .solution-item {
    padding: 10px;
  }

  .metric-value,
  .stat-value {
    font-size: 24px;
  }

  .metric-label,
  .stat-label {
    margin-top: 3px;
    font-size: 11px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 10px;
  }

  .results-topbar,
  .visual-head {
    gap: 6px;
    margin-bottom: 10px;
  }

  .visual-canvas {
    min-height: 150px;
  }

  .results-topbar {
    align-items: stretch;
    margin-bottom: 10px;
  }

  .field-input-dark {
    min-width: 0;
  }

  .solution-item-meta {
    margin-top: 4px;
    font-size: 12px;
  }

  .solution-layers {
    gap: 4px;
    margin-top: 8px;
  }

  .solution-layer {
    padding-top: 4px;
    font-size: 12px;
    line-height: 1.3;
  }

  .footer-shell {
    min-height: 56px;
    gap: 8px;
  }
}

@media (max-width: 420px) {
  .hero-title {
    font-size: 1.72rem;
  }

  .hero-panel-copy h2,
  .section-title {
    font-size: 1.3rem;
  }

  .btn {
    min-height: 34px;
    padding: 6px 12px;
  }

  .order-row {
    grid-template-columns: minmax(0, 1fr) 58px 30px;
  }

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

  .metric-label,
  .stat-label,
  .solution-item-meta,
  .solution-layer {
    font-size: 11px;
  }

  .visual-canvas {
    min-height: 132px;
  }
}
