:root {
  color-scheme: dark;
  font-family: "Segoe UI", Arial, sans-serif;
  color: #edf3f6;
  background: #0e1418;
  --surface: #151d22;
  --surface-raised: #1b252c;
  --input: #0b1115;
  --line: #3c4a54;
  --muted: #a9bbc6;
  --accent: #37b8d4;
  --accent-deep: #117d98;
  --green: #6bd39b;
  --red: #ff8991;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-height: 100%; }
body { min-height: 100vh; margin: 0; background: #0e1418; }
button, input, select, textarea { font: inherit; letter-spacing: 0; }
a { color: #7cd7e9; }
h1, h2, p { margin-top: 0; }
h1 { font-size: 36px; margin-bottom: 12px; }
h2 { font-size: 20px; }
.eyebrow { margin-bottom: 6px; color: var(--accent); font-size: 12px; font-weight: 700; text-transform: uppercase; }
.lede { max-width: 760px; color: #c4d2d9; font-size: 17px; line-height: 1.55; }
.hint { color: var(--muted); font-size: 13px; line-height: 1.45; }
.error { min-height: 20px; margin: 8px 0 0; color: var(--red); }

.site-header {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 34px;
  background: #172027;
  border-bottom: 1px solid #33414a;
}
.brand { color: #f2f7f9; font-size: 19px; font-weight: 700; text-decoration: none; }
nav { display: flex; gap: 4px; }
nav a { padding: 10px 13px; color: #b9c8d0; text-decoration: none; border-bottom: 2px solid transparent; }
nav a:hover, nav a.active { color: #fff; border-bottom-color: var(--accent); }

.purchase-band { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(420px, .85fr); min-height: calc(100vh - 64px); }
.purchase-intro { padding: 60px clamp(34px, 6vw, 100px) 50px; overflow: hidden; }
.purchase-intro h1 { font-size: 48px; }
.included-list { display: grid; gap: 9px; padding-left: 22px; color: #dce6ea; line-height: 1.4; }
.included-list li::marker { color: var(--green); }
.product-preview { width: min(980px, 115%); margin-top: 34px; border: 1px solid #43515a; box-shadow: 0 20px 50px rgba(0,0,0,.32); }

.purchase-form { padding: 46px clamp(28px, 4vw, 64px); background: var(--surface); border-left: 1px solid var(--line); }
label { display: grid; gap: 6px; color: #c7d5dc; font-size: 13px; }
input, select, textarea {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  color: #f4f8fa;
  background: var(--input);
  border: 1px solid #52616b;
  border-radius: 3px;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid #31a9c4; outline-offset: 1px; }
.form-grid, .capacity-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.span-two { grid-column: span 2; }
fieldset { display: grid; gap: 12px; margin: 24px 0 0; padding: 17px; border: 1px solid #3b4952; }
legend { padding: 0 8px; color: #e8f0f3; font-weight: 650; }
button, .button-link {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 15px;
  color: #eef4f6;
  background: #27323a;
  border: 1px solid #566772;
  border-radius: 4px;
  text-decoration: none;
  cursor: pointer;
}
button:hover, .button-link:hover { background: #33414a; }
button:disabled { opacity: .45; cursor: not-allowed; }
.primary { background: var(--accent-deep); border-color: #41bcd6; }
.primary:hover { background: #1890aa; }
.command { width: 100%; margin-top: 14px; font-weight: 650; }
.terms-line { display: flex; align-items: flex-start; gap: 9px; margin-top: 18px; }
.terms-line input { width: 17px; min-height: 17px; margin-top: 1px; }
.price-summary { display: grid; gap: 8px; margin-top: 24px; padding: 17px; background: #10171b; border: 1px solid #46545d; }
.price-summary div { display: flex; justify-content: space-between; gap: 14px; }
.price-summary .total { margin-top: 4px; padding-top: 12px; border-top: 1px solid #44525b; font-size: 18px; }
.price-summary .total strong { color: #95e7f6; }
.price-summary.compact { margin-top: 18px; }
footer { display: flex; justify-content: space-between; padding: 22px 34px; color: var(--muted); border-top: 1px solid #34414a; }

.portal-main { max-width: 1300px; margin: 0 auto; padding: 52px 34px 70px; }
.portal-login { width: min(510px, 100%); margin: 7vh auto 0; padding-top: 24px; border-top: 3px solid var(--accent); }
.portal-login form { display: grid; gap: 13px; margin-top: 28px; }
.recovery-step { display: grid; gap: 12px; padding: 14px; color: #dce7eb; background: #141d22; border-left: 3px solid #536773; }
.recovery-step[hidden] { display: none; }
.recovery-step p { margin: 0; color: var(--muted); line-height: 1.45; }
.portal-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.status-band { display: grid; grid-template-columns: repeat(4, 1fr); margin: 24px 0; border: 1px solid var(--line); background: var(--surface); }
.status-band div { padding: 17px; border-right: 1px solid #33414a; }
.status-band div:last-child { border-right: 0; }
.status-band span { display: block; color: var(--muted); font-size: 12px; }
.status-band strong { display: block; margin-top: 4px; font-size: 18px; }
.portal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.portal-section { padding: 21px; background: var(--surface); border: 1px solid #40505a; border-radius: 5px; }
.portal-section.span-two { grid-column: span 2; }
.portal-section output { display: block; min-height: 48px; padding: 13px; color: #9ae5b9; background: #0d1511; border: 1px solid #3d7450; font: 700 15px Consolas, monospace; overflow-wrap: anywhere; }
.button-row { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 14px; }
.device-list { display: grid; gap: 8px; }
.device-row { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; padding: 11px; background: #10181d; border: 1px solid #35434c; }
.device-row span { display: block; color: var(--muted); font-size: 12px; }
.device-row button { color: #ffb2b7; border-color: #8c424a; }
.addon-grid { display: grid; grid-template-columns: 1fr 1fr 1.5fr; gap: 14px; align-items: end; }
.support-grid { display: grid; grid-template-columns: 220px 1fr; gap: 14px; align-items: end; }
.support-grid .span-two { grid-column: span 2; }
.support-result { min-height: 20px; margin: 0; color: var(--green); align-self: center; }

.result-main { min-height: calc(100vh - 64px); display: grid; place-items: center; padding: 40px; }
.result-panel { width: min(680px, 100%); padding-top: 26px; border-top: 3px solid var(--accent); }
.order-summary { margin: 24px 0; border-top: 1px solid var(--line); }
.order-summary div { display: flex; justify-content: space-between; gap: 20px; padding: 10px 0; border-bottom: 1px solid #303d45; }
.order-summary dt { color: var(--muted); }
.order-summary dd { margin: 0; }
.legal-main { max-width: 900px; margin: 0 auto; padding: 55px 34px 80px; }
.legal-main article { line-height: 1.65; }
.legal-main h2 { margin-top: 32px; }

@media (max-width: 900px) {
  .site-header { align-items: flex-start; padding: 16px 20px; }
  nav { flex-wrap: wrap; justify-content: flex-end; }
  .purchase-band { grid-template-columns: 1fr; }
  .purchase-intro { padding: 42px 24px; }
  .purchase-intro h1 { font-size: 38px; }
  .product-preview { width: 100%; }
  .purchase-form { padding: 34px 24px; border-left: 0; border-top: 1px solid var(--line); }
  .status-band { grid-template-columns: 1fr 1fr; }
  .status-band div:nth-child(2) { border-right: 0; }
  .status-band div:nth-child(-n+2) { border-bottom: 1px solid #33414a; }
  .portal-grid { grid-template-columns: 1fr; }
  .portal-section.span-two { grid-column: auto; }
  .addon-grid { grid-template-columns: 1fr 1fr; }
  .addon-grid .terms-line { grid-column: span 2; }
}

@media (max-width: 560px) {
  .site-header { display: block; }
  nav { justify-content: flex-start; margin-top: 10px; }
  .form-grid, .capacity-grid, .addon-grid, .support-grid { grid-template-columns: 1fr; }
  .span-two, .addon-grid .terms-line, .support-grid .span-two { grid-column: auto; }
  .portal-main { padding: 34px 18px 60px; }
  .portal-heading { display: block; }
  .status-band { grid-template-columns: 1fr; }
  .status-band div { border-right: 0; border-bottom: 1px solid #33414a; }
  .status-band div:last-child { border-bottom: 0; }
  .device-row { grid-template-columns: 1fr; }
}
