:root {
  --ink: #0a2028;
  --muted: #52666d;
  --line: #dce5e7;
  --surface: #ffffff;
  --wash: #f3f7f7;
  --navy: #061b24;
  --teal: #0c8792;
  --bright: #25d7c4;
  --compatible: #087a5b;
  --incompatible: #b35b00;
  --unsafe: #bd2f35;
  --unknown: #5c6570;
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--wash);
  line-height: 1.55;
}

a { color: inherit; }

.site-header {
  min-height: 78px;
  padding: 0 5vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #fff;
  background: var(--navy);
  border-bottom: 1px solid rgba(255, 255, 255, .12);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  letter-spacing: .08em;
  line-height: 1;
}

.brand strong, .brand small { display: block; }
.brand strong { font-size: 1.1rem; }
.brand small { margin-top: 4px; font-size: .58rem; letter-spacing: .3em; color: #a9c5c8; }

.brand-mark {
  width: 34px;
  height: 31px;
  display: flex;
  align-items: flex-end;
  gap: 4px;
  transform: skew(-12deg);
}

.brand-mark i { width: 7px; display: block; background: var(--bright); border-radius: 2px 2px 0 0; }
.brand-mark i:nth-child(1) { height: 10px; }
.brand-mark i:nth-child(2) { height: 20px; }
.brand-mark i:nth-child(3) { height: 30px; }

nav { display: flex; align-items: center; gap: 24px; font-size: .9rem; }
nav a { text-decoration: none; color: #c5d5d7; }
.nav-cta { padding: 10px 16px; color: #fff; border: 1px solid rgba(255, 255, 255, .28); border-radius: 7px; }

.hero {
  padding: 78px max(5vw, calc((100vw - 1160px) / 2));
  color: white;
  background:
    radial-gradient(circle at 82% 10%, rgba(37, 215, 196, .19), transparent 31%),
    linear-gradient(135deg, #061b24 0%, #0a2c35 65%, #083f46 100%);
  overflow: hidden;
}

.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .74rem; font-weight: 800; color: var(--teal); }
.hero .eyebrow { color: #9eece4; }
.hero .eyebrow span { margin-right: 10px; padding: 5px 8px; color: var(--navy); background: var(--bright); border-radius: 4px; }
.hero h1 { max-width: 820px; margin: 25px 0 20px; font-size: clamp(3.1rem, 8vw, 6.4rem); line-height: .94; letter-spacing: -.06em; }
.hero > p { max-width: 690px; margin: 0; color: #bed2d5; font-size: clamp(1rem, 2vw, 1.2rem); }

.trust-row { display: flex; flex-wrap: wrap; gap: 10px 25px; margin-top: 34px; color: #d9e6e8; font-size: .86rem; }
.trust-row span::before { content: "✓"; margin-right: 8px; color: var(--bright); font-weight: 900; }

main { min-width: 0; }

.checker-shell {
  width: min(1120px, 90vw);
  margin: -34px auto 74px;
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(320px, .82fr);
  background: var(--surface);
  border-radius: 14px;
  box-shadow: 0 22px 65px rgba(6, 27, 36, .13);
  overflow: hidden;
}

.checker-shell:not(:has(.result-panel:not([hidden]))) {
  grid-template-columns: 1fr;
}

.checker-form, .result-panel { padding: clamp(26px, 5vw, 52px); }
.result-panel { border-left: 1px solid var(--line); background: #f7fbfa; }

.step-heading { display: flex; gap: 15px; align-items: flex-start; margin-bottom: 22px; }
.step-heading h2 { margin: 0 0 3px; font-size: 1.25rem; letter-spacing: -.02em; }
.step-heading p { margin: 0; color: var(--muted); font-size: .9rem; }
.step-number { flex: 0 0 auto; width: 32px; height: 32px; display: grid; place-items: center; color: white; background: var(--teal); border-radius: 50%; font-weight: 800; }

.mode-picker { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mode-card { position: relative; min-height: 75px; padding: 15px; display: flex; gap: 11px; align-items: center; border: 1px solid var(--line); border-radius: 9px; cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s; }
.mode-card:hover { transform: translateY(-1px); }
.mode-card:has(input:checked) { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(12, 135, 146, .1); }
.mode-card input { position: absolute; opacity: 0; pointer-events: none; }
.mode-card strong, .mode-card small { display: block; }
.mode-card small { margin-top: 2px; color: var(--muted); }
.radio-dot { width: 18px; height: 18px; border: 2px solid #9aabad; border-radius: 50%; }
.mode-card:has(input:checked) .radio-dot { border: 5px solid var(--teal); }
.warning-mode:has(input:checked) { border-color: var(--unsafe); box-shadow: 0 0 0 3px rgba(189, 47, 53, .08); }
.warning-mode:has(input:checked) .radio-dot { border-color: var(--unsafe); }

.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-top: 18px; }
label > span, .device-select-label > span { display: block; margin-bottom: 7px; font-size: .76rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: #475c62; }
select, input { width: 100%; min-height: 48px; padding: 0 13px; color: var(--ink); background: #fff; border: 1px solid #becbce; border-radius: 7px; font: inherit; }
select:focus, input:focus, button:focus-visible, a:focus-visible { outline: 3px solid rgba(37, 215, 196, .36); outline-offset: 2px; }
.wide-field { grid-column: 1 / -1; }
.number-field { position: relative; }
.number-field input { padding-right: 45px; }
.number-field b { position: absolute; right: 14px; top: 12px; color: var(--muted); }

.inline-alert { margin-top: 16px; padding: 13px 15px; color: #6f2c30; background: #fff2f2; border-left: 4px solid var(--unsafe); font-size: .86rem; }
.inline-alert strong { display: block; }
.section-rule { height: 1px; margin: 34px 0; background: var(--line); }
.device-select-label { display: block; }

.device-card { margin-top: 13px; padding: 15px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; background: var(--wash); border-radius: 8px; }
.device-card small, .device-card strong { display: block; }
.device-card small { color: var(--muted); font-size: .75rem; }
.device-card strong { margin-top: 3px; }
.device-card a { grid-column: 1 / -1; color: var(--teal); font-size: .82rem; font-weight: 700; }

.check-button { width: 100%; margin-top: 24px; padding: 15px 20px; display: flex; justify-content: space-between; color: #fff; background: var(--navy); border: 0; border-radius: 8px; font: inherit; font-weight: 800; cursor: pointer; }
.check-button:hover:not(:disabled) { background: #0b3540; }
.check-button:disabled { opacity: .5; cursor: wait; }
.check-button b { font-size: 1.2rem; }
.form-error { margin: 13px 0 0; color: var(--unsafe); font-size: .88rem; }

.result-panel { align-self: stretch; }
.result-panel[data-status="compatible"] { background: #edf9f5; }
.result-panel[data-status="incompatible"] { background: #fff8ed; }
.result-panel[data-status="unsafe"] { background: #fff1f1; }
.result-panel[data-status="unknown"] { background: #f3f5f6; }
.result-topline { display: flex; align-items: center; gap: 11px; margin-bottom: 25px; }
.result-icon { width: 42px; height: 42px; display: grid; place-items: center; color: #fff; background: var(--compatible); border-radius: 50%; font-size: 1.25rem; font-weight: 900; }
.result-status { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 900; }
[data-status="incompatible"] .result-icon { background: var(--incompatible); }
[data-status="unsafe"] .result-icon { background: var(--unsafe); }
[data-status="unknown"] .result-icon { background: var(--unknown); }
.result-panel h2 { margin: 0 0 25px; font-size: clamp(1.5rem, 3vw, 2.1rem); line-height: 1.18; letter-spacing: -.035em; }
.result-panel h3 { margin: 24px 0 8px; text-transform: uppercase; letter-spacing: .1em; font-size: .73rem; }
.result-panel ul { margin: 0; padding-left: 19px; }
.result-panel li { margin: 7px 0; }
.power-margin { display: inline-block; padding: 7px 10px; color: #075a45; background: #d8f2e8; border-radius: 6px; font-weight: 800; font-size: .86rem; }
.result-warnings { margin-top: 22px; padding: 1px 16px 14px; background: rgba(255, 255, 255, .66); border-left: 3px solid var(--unsafe); }
.text-button { margin-top: 28px; padding: 0 0 3px; color: var(--ink); background: none; border: 0; border-bottom: 1px solid currentColor; font: inherit; font-weight: 700; cursor: pointer; }

.explanation { width: min(1120px, 90vw); margin: 0 auto 70px; }
.explanation > div:first-child { display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.explanation h2 { margin: 8px 0 25px; font-size: clamp(1.8rem, 4vw, 3rem); letter-spacing: -.045em; }
.outcome-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--line); }
.outcome-grid article { padding: 22px; background: #fff; }
.outcome-grid h3 { margin: 13px 0 5px; font-size: 1rem; }
.outcome-grid p { margin: 0; color: var(--muted); font-size: .86rem; }
.outcome-dot { width: 10px; height: 10px; display: block; border-radius: 50%; background: var(--compatible); }
.outcome-dot.incompatible { background: var(--incompatible); }
.outcome-dot.unsafe { background: var(--unsafe); }
.outcome-dot.unknown { background: var(--unknown); }

.local-help { width: min(1120px, 90vw); margin: 0 auto 28px; padding: clamp(28px, 5vw, 52px); display: grid; grid-template-columns: 1.4fr .6fr; gap: 50px; align-items: center; color: #fff; background: var(--navy); border-radius: 12px; }
.local-help h2 { margin: 8px 0 12px; font-size: clamp(1.65rem, 4vw, 2.6rem); line-height: 1.05; letter-spacing: -.04em; }
.local-help p { margin: 0; color: #bcd0d3; }
.local-help .eyebrow { color: var(--bright); }
.help-actions { display: flex; flex-direction: column; align-items: stretch; gap: 13px; text-align: center; }
.help-actions a { color: #d8e5e6; font-size: .88rem; font-weight: 700; }
.help-actions .primary-link { padding: 14px 18px; color: var(--navy); background: var(--bright); border-radius: 7px; text-decoration: none; }

.disclaimer { width: min(1120px, 90vw); margin: 0 auto 70px; padding: 20px 22px; display: grid; grid-template-columns: 180px 1fr; gap: 20px; color: var(--muted); background: #e8eeee; border-radius: 8px; font-size: .8rem; }
.disclaimer strong { color: var(--ink); text-transform: uppercase; letter-spacing: .08em; }
.disclaimer p { margin: 0; }

footer { min-height: 90px; padding: 0 5vw; display: flex; justify-content: space-between; align-items: center; gap: 20px; color: #9eb3b6; background: var(--navy); font-size: .78rem; }

[hidden] { display: none !important; }

@media (max-width: 850px) {
  .checker-shell { grid-template-columns: 1fr; }
  .result-panel { border-left: 0; border-top: 1px solid var(--line); }
  .outcome-grid { grid-template-columns: 1fr 1fr; }
  .local-help { grid-template-columns: 1fr; gap: 25px; }
}

@media (max-width: 580px) {
  .site-header { min-height: 68px; }
  nav > a:first-child { display: none; }
  .nav-cta { padding: 8px 10px; }
  .hero { padding-top: 55px; padding-bottom: 64px; }
  .hero h1 { font-size: 3.25rem; }
  .checker-shell { width: 94vw; margin-top: -22px; }
  .checker-form, .result-panel { padding: 26px 20px; }
  .mode-picker, .field-grid { grid-template-columns: 1fr; }
  .wide-field { grid-column: auto; }
  .outcome-grid { grid-template-columns: 1fr; }
  .disclaimer { grid-template-columns: 1fr; gap: 6px; }
  footer { padding: 25px 5vw; flex-direction: column; align-items: flex-start; }
}

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