:root {
  --navy: #0d1b3d;
  --navy-2: #17315f;
  --blue: #2f74d0;
  --soft-blue: #dce9f9;
  --sky: #eef6ff;
  --cream: #f8f5ef;
  --sage: #a6c49a;
  --mint: #e9f4e4;
  --ink: #172033;
  --text: #28364d;
  --muted: #65748a;
  --line: #d7e1ee;
  --white: #ffffff;
  --shadow: 0 24px 70px rgba(13, 27, 61, 0.13);
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--white);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    linear-gradient(180deg, #ffffff 0%, #f7fbff 32%, #ffffff 70%),
    var(--white);
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

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

img {
  max-width: 100%;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  min-height: 70px;
  padding: 10px clamp(18px, 5vw, 52px);
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(215, 225, 238, 0.72);
  backdrop-filter: blur(18px);
}

.brand,
.site-footer div {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--navy);
  font-weight: 900;
  letter-spacing: 0;
}

.brand img,
.site-footer img {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(13, 27, 61, 0.18);
}

.site-nav {
  display: flex;
  justify-content: center;
  gap: 6px;
}

.site-nav a,
.ghost-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 750;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav a.is-active,
.ghost-link:hover,
.ghost-link:focus-visible {
  color: var(--navy);
  background: var(--sky);
  outline: none;
}

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

.button,
.plain-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  border: 0;
  border-radius: var(--radius);
  padding: 0 22px;
  color: var(--white);
  background: var(--blue);
  box-shadow: 0 14px 28px rgba(47, 116, 208, 0.24);
  font-weight: 900;
  letter-spacing: 0;
  text-align: center;
}

.button:hover,
.button:focus-visible,
.plain-button:hover,
.plain-button:focus-visible {
  outline: 3px solid rgba(47, 116, 208, 0.18);
  outline-offset: 2px;
}

.button.secondary {
  color: var(--navy);
  background: var(--soft-blue);
  box-shadow: none;
}

.button.small {
  min-height: 42px;
  padding-inline: 16px;
}

.button.full {
  width: 100%;
}

.plain-button {
  color: var(--navy);
  background: transparent;
  box-shadow: none;
  border: 1px solid var(--line);
}

main {
  overflow: hidden;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(480px, 1.08fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
  max-width: 1240px;
  min-height: calc(100vh - 70px);
  margin: 0 auto;
  padding: clamp(32px, 5vw, 58px) clamp(18px, 5vw, 32px) 30px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1,
h2,
h3 {
  color: var(--ink);
  letter-spacing: 0;
}

h1 {
  max-width: 670px;
  margin-bottom: 14px;
  font-size: clamp(42px, 6.3vw, 70px);
  line-height: 0.97;
}

.lead {
  max-width: 620px;
  margin-bottom: 22px;
  color: var(--text);
  font-size: clamp(17px, 1.8vw, 20px);
  line-height: 1.52;
}

.hero-actions,
.dashboard-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.availability {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.availability span {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--navy);
  background: var(--white);
  font-weight: 800;
  font-size: 13px;
}

.hero-art {
  position: relative;
  min-height: 470px;
}

.hero-device,
.visual-shot {
  overflow: hidden;
  border: 1px solid #cbd8e8;
  border-radius: 18px;
  background: #f5f9ff;
  box-shadow: var(--shadow);
}

.hero-device {
  position: relative;
  padding: 10px;
  transform: rotate(-1.4deg);
}

.hero-device img,
.visual-shot img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
}

.secondary-shot {
  position: absolute;
  right: -12px;
  bottom: -20px;
  width: 52%;
  transform: rotate(3deg);
  box-shadow: 0 18px 46px rgba(13, 27, 61, 0.2);
}

.notice {
  display: flex;
  gap: 12px;
  max-width: 960px;
  margin: 0 auto;
  padding: 14px 18px;
  border: 1px solid #d7dbe1;
  border-radius: var(--radius);
  color: #4e5969;
  background: #f8f9fb;
  line-height: 1.55;
}

.notice strong {
  color: var(--ink);
}

.section {
  max-width: 1240px;
  margin: 0 auto;
  padding: clamp(46px, 7vw, 78px) clamp(18px, 5vw, 32px);
}

.section-heading {
  max-width: 720px;
  margin-bottom: 22px;
}

.section-heading.centered {
  margin-inline: auto;
  text-align: center;
}

.section-heading h2,
.support-copy h2 {
  margin-bottom: 10px;
  font-size: clamp(32px, 4.4vw, 50px);
  line-height: 1.02;
}

.section-heading p:not(.eyebrow),
.support-copy p {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.54;
}

.feature-grid,
.pricing-grid,
.account-auth,
.portal-grid {
  display: grid;
  gap: 14px;
}

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

.feature-grid article,
.price-card,
.form-card,
.dashboard-card,
.portal-shell,
.portal-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 14px 38px rgba(13, 27, 61, 0.08);
}

.feature-grid article {
  padding: 18px;
}

.feature-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 12px;
  border-radius: 8px;
  color: var(--navy);
  background: var(--soft-blue);
  font-weight: 950;
}

.feature-grid h3 {
  margin-bottom: 8px;
  font-size: 21px;
}

.feature-grid p,
.price-card li,
.form-card p {
  color: var(--muted);
  line-height: 1.55;
}

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

.visual-shot {
  margin: 0;
  padding: 8px;
}

.visual-wide {
  grid-column: 1 / -1;
}

.account-list {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
}

.account-list div {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.7);
}

dt {
  color: var(--muted);
  font-size: 13px;
}

dd {
  margin: 0;
  color: var(--navy);
  font-weight: 850;
  overflow-wrap: anywhere;
}

.pricing-section {
  max-width: none;
  background: linear-gradient(180deg, #f8fbff, #ffffff);
}

.pricing-section > * {
  max-width: 1240px;
  margin-left: auto;
  margin-right: auto;
}

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

.pricing-grid.single {
  grid-template-columns: minmax(0, 1fr);
  max-width: 880px;
}

.price-card {
  position: relative;
  padding: 22px;
}

.quantity-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.74fr);
  gap: 26px;
  align-items: center;
}

.price-card.featured {
  border-color: rgba(47, 116, 208, 0.32);
  transform: translateY(-8px);
}

.plan-label,
.annual {
  color: var(--blue);
  font-size: 13px;
  font-weight: 900;
}

.badge {
  position: absolute;
  top: 18px;
  right: 18px;
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--navy);
  background: var(--mint);
  font-size: 12px;
  font-weight: 950;
}

.price-card h3 {
  margin: 6px 0 0;
  font-size: 24px;
}

.price {
  margin: 14px 0 2px;
  color: var(--navy);
  font-size: 42px;
  font-weight: 950;
}

.price small {
  color: var(--muted);
  font-size: 15px;
}

.price-card ul {
  display: grid;
  gap: 8px;
  margin: 16px 0 20px;
  padding-left: 18px;
}

.quantity-panel {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px;
  background: #f8fbff;
}

.quantity-panel label {
  margin-top: 0;
}

.quantity-control {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  gap: 8px;
  margin-top: 8px;
}

.quantity-control button,
.quick-quantities button {
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--navy);
  background: var(--white);
  font-weight: 950;
  cursor: pointer;
}

.quantity-control button {
  min-height: 48px;
  font-size: 22px;
}

.quantity-control input {
  min-height: 48px;
  text-align: center;
  font-size: 20px;
  font-weight: 950;
}

.quick-quantities {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 10px;
}

.quick-quantities button {
  min-height: 38px;
}

.quick-quantities button.is-active,
.quantity-control button:hover,
.quick-quantities button:hover {
  border-color: var(--blue);
  background: var(--soft-blue);
}

.quantity-total {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 10px 0 16px;
  color: var(--muted);
  font-weight: 850;
}

.quantity-total strong {
  color: var(--navy);
}

.discount-note {
  min-height: 22px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.discount-note.is-active {
  color: #136c50;
}

.account-purchase {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fbff;
}

.account-purchase label {
  margin-top: 0;
}

.quantity-control.compact {
  grid-template-columns: 42px minmax(0, 1fr) 42px;
}

.quantity-control.compact button,
.quantity-control.compact input {
  min-height: 42px;
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  position: relative;
  padding: 56px 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 14px 38px rgba(13, 27, 61, 0.07);
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  top: 18px;
  left: 18px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  color: var(--white);
  background: var(--blue);
  font-weight: 950;
}

.steps strong,
.steps span {
  display: block;
}

.steps strong {
  margin-bottom: 6px;
  color: var(--ink);
}

.steps span {
  color: var(--muted);
  line-height: 1.5;
}

.account-section {
  max-width: none;
  background: var(--cream);
}

.account-section > * {
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
}

.account-auth {
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  max-width: 860px;
}

.form-card,
.dashboard-card,
.portal-shell,
.portal-panel {
  padding: 20px;
}

.form-card h3,
.dashboard-card h3,
.portal-panel h3 {
  margin-bottom: 16px;
  font-size: 24px;
}

.portal-shell {
  display: grid;
  gap: 16px;
}

.portal-shell[hidden],
.account-auth[hidden] {
  display: none;
}

.portal-header,
.panel-top,
.code-row,
.device-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.portal-header {
  align-items: center;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.portal-header h3,
.portal-header p {
  margin-bottom: 0;
}

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

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

.portal-stats div {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
}

.portal-stats span,
.code-row span,
.device-row span,
.empty-state {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.portal-stats strong,
.code-row strong,
.device-row strong {
  color: var(--navy);
  font-weight: 950;
  overflow-wrap: anywhere;
}

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

.portal-panel {
  min-width: 0;
  box-shadow: none;
}

.portal-panel.wide {
  grid-column: 1 / -1;
}

.provider-panel {
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.code-list,
.device-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.code-row,
.device-row {
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

.code-row > div,
.device-row > div:first-child {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.status-pill,
#account-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--navy);
  background: var(--mint);
  font-size: 13px;
  font-weight: 950;
  white-space: nowrap;
}

.plain-button.compact {
  min-height: 38px;
  padding-inline: 12px;
}

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

.setup-profile-form label:has(textarea),
.setup-profile-form button,
.setup-result {
  grid-column: 1 / -1;
}

.setup-result {
  display: none;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid rgba(47, 116, 208, 0.28);
  border-radius: 8px;
  color: var(--navy);
  background: var(--soft-blue);
  font-weight: 900;
  overflow-wrap: anywhere;
}

.setup-result.is-visible {
  display: block;
}

label {
  display: grid;
  gap: 7px;
  margin-top: 14px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 13px 12px;
  color: var(--ink);
  background: #fbfdff;
  outline: none;
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(47, 116, 208, 0.14);
}

.form-card button {
  margin-top: 18px;
}

.dashboard-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.dashboard-top h3 {
  margin-bottom: 0;
}

#account-state {
  padding: 8px 10px;
  border-radius: 999px;
  color: var(--navy);
  background: var(--mint);
  font-size: 13px;
  font-weight: 950;
}

.dashboard-actions {
  margin-top: 18px;
}

.support-section {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 0.7fr);
  gap: clamp(26px, 5vw, 58px);
  align-items: start;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 28px clamp(18px, 5vw, 56px);
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.site-footer img {
  width: 34px;
  height: 34px;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 30;
  max-width: min(420px, calc(100vw - 44px));
  padding: 14px 16px;
  border: 1px solid rgba(13, 27, 61, 0.12);
  border-radius: var(--radius);
  color: var(--navy);
  background: var(--white);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 160ms ease, transform 160ms ease;
  font-weight: 850;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

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

  .site-nav {
    grid-column: 1 / -1;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .hero,
  .support-section {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

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

  .account-auth,
  .portal-grid,
  .portal-stats {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .site-header {
    display: flex;
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
    min-height: 0;
    padding: 12px 16px;
  }

  .brand {
    justify-content: center;
  }

  .site-nav {
    justify-content: flex-start;
  }

  .site-nav a {
    flex: 0 0 auto;
    min-height: 38px;
    padding-inline: 12px;
    background: var(--sky);
  }

  .header-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .ghost-link,
  .button.small {
    justify-content: center;
    width: 100%;
  }

  .hero {
    padding-top: 34px;
  }

  h1 {
    font-size: clamp(40px, 12vw, 54px);
  }

  .hero-actions,
  .dashboard-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-actions .button,
  .dashboard-actions .button,
  .dashboard-actions .plain-button {
    width: 100%;
  }

  .availability span {
    flex: 1 1 auto;
    justify-content: center;
  }

  .hero-art {
    min-height: 0;
  }

  .hero-device {
    padding: 7px;
    transform: none;
  }

  .secondary-shot {
    position: static;
    width: 100%;
    margin-top: 12px;
    transform: none;
  }

  .notice {
    display: block;
    margin-inline: 16px;
  }

  .section {
    padding-block: 58px;
  }

  .feature-grid,
  .visual-gallery,
  .pricing-grid,
  .steps,
  .account-auth,
  .portal-grid,
  .portal-stats,
  .setup-profile-form {
    grid-template-columns: 1fr;
  }

  .portal-header,
  .panel-top,
  .code-row,
  .device-row,
  .portal-header-actions,
  .panel-actions,
  .row-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .panel-actions .button,
  .row-actions .plain-button,
  .portal-header-actions .plain-button {
    width: 100%;
  }

  .visual-wide {
    grid-column: auto;
  }

  .price-card.featured {
    transform: none;
  }

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

  .account-list div {
    grid-template-columns: 1fr;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}
