/* Reusable components. */

/* ---------- Status bar ---------- */

.status-bar {
  min-height: var(--bar-h);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px var(--gutter);
  background: var(--band);
  border-bottom: 1px solid var(--border);
  color: var(--accent-soft);
  font: 700 10.5px/1.3 var(--font-sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: center;
}

.status-bar p {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 4px 10px;
}

.status-bar .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--glow);
}

.status-bar .sep {
  color: var(--dim);
}

@media (max-width: 720px) {
  .status-bar .hide-sm {
    display: none;
  }
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgb(7 6 11 / 0.88);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.site-header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand-icon {
  width: 30px;
  height: 30px;
}

.brand-wordmark {
  width: 80px;
  height: 19px;
}

.brand-divider {
  width: 1px;
  height: 18px;
  background: var(--border-2);
  margin-inline: 4px;
}

.brand-product {
  font: 700 11px/1 var(--font-sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-soft);
  white-space: nowrap;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 26px);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
}

.site-nav a:not(.btn) {
  padding: 8px 0;
  transition: color 0.15s ease;
}

.site-nav a:not(.btn):hover {
  color: var(--fg);
}

.site-nav .external {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border-2);
  border-radius: var(--radius-btn);
  color: var(--fg);
}

.nav-label {
  display: none;
}

@media (max-width: 1080px) {
  .nav-toggle {
    display: inline-flex;
  }


  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 45;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto;
    padding: 12px var(--gutter) 24px;
    background: var(--bg-2);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 24px 40px rgb(0 0 0 / 0.45);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a:not(.btn) {
    padding: 14px 2px;
    font-size: 16px;
    color: var(--fg);
    border-bottom: 1px solid var(--border);
  }

  .site-nav .btn {
    margin-top: 18px;
    justify-content: center;
  }

  .nav-label {
    display: block;
    padding-top: 12px;
    font: 700 10px var(--font-sans);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
  }
}

@media (min-width: 1081px) {
  .site-nav .nav-cta-mobile {
    display: none;
  }
}

@media (max-width: 560px) {
  .site-header .header-cta-desktop {
    display: none;
  }
}

@media (min-width: 561px) and (max-width: 1080px) {
  .site-nav .nav-cta-mobile {
    display: none;
  }
}

@media (max-width: 420px) {
  .brand-wordmark {
    display: none;
  }
}

/* ---------- Overline and status tags ---------- */

.overline {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font: 700 11px/1.2 var(--font-sans);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration-line: overline;
  text-decoration-color: rgb(205 180 255 / 0.55);
  color: var(--accent-soft);
}

.overline::before {
  content: "";
  width: 6px;
  height: 6px;
  flex-shrink: 0;
  border-radius: 1px;
  background: var(--primary);
}

.status-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: 700 10.5px/1.2 var(--font-sans);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-soft);
  white-space: nowrap;
}

.status-tag i {
  width: 6px;
  height: 6px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--glow);
}

.status-tag.is-boxed {
  padding: 5px 9px;
  border: 1px solid var(--border-2);
  border-radius: 5px;
  background: var(--card-2);
}

.status-tag.is-quiet {
  color: var(--muted);
}

.status-tag.is-quiet i {
  background: var(--muted);
  box-shadow: none;
}

.status-tag .lock {
  width: 12px;
  height: 12px;
}

.code-label {
  font: 700 11px/1.3 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.foot-tag {
  display: block;
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font: 700 10.5px/1.3 var(--font-sans);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-2);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 14px 22px;
  border: 1px solid transparent;
  border-radius: var(--radius-btn);
  font: 700 15px/1.1 var(--font-sans);
  white-space: nowrap;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease, color 0.18s ease;
}

.btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

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

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  border-color: var(--border-2);
  color: var(--fg);
}

.btn-ghost:hover {
  background: var(--card-2);
  border-color: var(--primary);
}

.btn-sm {
  min-height: 40px;
  padding: 10px 16px;
  font-size: 13.5px;
}

.btn-lg {
  min-height: 54px;
  padding: 16px 26px;
}

.btn[aria-busy="true"] {
  cursor: progress;
  opacity: 0.85;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 700;
  font-size: 14px;
  color: var(--fg);
  transition: color 0.15s ease;
}

.text-link:hover {
  color: var(--accent-soft);
}

.text-link svg {
  width: 15px;
  height: 15px;
}

/* ---------- Sections ---------- */

.section {
  padding-block: var(--section-y);
  border-top: 1px solid var(--border);
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(20px, 5vw, 64px);
  align-items: end;
}

.section-head h2 {
  margin-top: 18px;
  font-size: clamp(34px, 5vw, 60px);
}

.section-head > p,
.section-head .section-intro {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
  max-width: 52ch;
}

.section-head .section-intro p + p {
  margin-top: 10px;
}

@media (max-width: 860px) {
  .section-head {
    grid-template-columns: 1fr;
    align-items: start;
  }
}

/* ---------- Cards ---------- */

.card {
  padding: 24px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.card h3 {
  font-size: 20px;
  line-height: 1.05;
}

.card p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

/* ---------- Formula ---------- */

.formula {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1.15fr);
  align-items: stretch;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-2);
  overflow: hidden;
}

.formula-term {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  column-gap: 9px;
  row-gap: 5px;
  padding: 14px 16px;
}

.formula-term svg {
  width: 19px;
  height: 19px;
  color: var(--accent);
}

.formula-term span {
  grid-column: 1 / -1;
}

.formula-term strong {
  font: 700 11.5px/1.2 var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg);
}

.formula-term span {
  font-size: 13.5px;
  line-height: 1.35;
  color: var(--muted);
}

.formula-op {
  display: grid;
  place-items: center;
  width: 30px;
  font: 700 17px/1 var(--font-mono);
  color: var(--dim);
  border-inline: 1px solid var(--border);
  background: var(--well);
}

.formula-result {
  background: linear-gradient(180deg, rgb(138 80 232 / 0.12), rgb(138 80 232 / 0.04));
  box-shadow: inset 0 0 0 1px rgb(163 118 242 / 0.35);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.formula-result svg {
  color: var(--accent-soft);
}

@media (max-width: 640px) {
  .formula {
    grid-template-columns: 1fr;
  }

  .formula-op {
    width: auto;
    height: 20px;
    font-size: 13px;
    border-inline: 0;
    border-block: 1px solid var(--border);
  }

  .formula-term {
    grid-template-columns: auto auto 1fr;
    padding: 11px 14px;
  }

  .formula-term span {
    grid-column: auto;
    text-align: right;
    font-size: 13px;
  }

  .formula-result {
    border-radius: 0 0 var(--radius) var(--radius);
  }
}

/* ---------- Fact strip ---------- */

.fact-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.fact-strip > div {
  background: var(--bg-2);
  padding: 18px 20px;
}

.fact-strip strong {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--fg);
}

.fact-strip span {
  display: block;
  margin-top: 4px;
  font-size: 13.5px;
  color: var(--muted);
}

@media (max-width: 900px) {
  .fact-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .fact-strip {
    grid-template-columns: 1fr;
  }
}

/* ---------- Spec list (label / value rows) ---------- */

.spec-list {
  border-top: 1px solid var(--border);
}

.spec-list > div {
  display: grid;
  grid-template-columns: minmax(130px, 0.8fr) minmax(0, 1.4fr);
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.spec-list dt {
  font: 700 11px/1.5 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.spec-list dd {
  font-size: 15px;
  line-height: 1.5;
  color: var(--fg);
}

.spec-list dd small {
  display: block;
  margin-top: 2px;
  font-size: 13.5px;
  color: var(--muted);
}

@media (max-width: 520px) {
  .spec-list > div {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

/* ---------- Step cards ---------- */

.step-card {
  padding: 24px 22px 24px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
}

.step-card h3 {
  margin-top: 16px;
  font-size: 20px;
  line-height: 1.05;
}

.step-card p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
  flex: 1;
}

/* ---------- Note / callout ---------- */

.note {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-2);
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.note svg {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  flex-shrink: 0;
  color: var(--accent);
}

.note strong {
  color: var(--fg);
}

/* ---------- Redacted value ---------- */

.redacted {
  display: inline-block;
  width: 64px;
  height: 10px;
  border-radius: 2px;
  background: repeating-linear-gradient(
    -45deg,
    var(--border-2) 0 3px,
    transparent 3px 6px
  );
  vertical-align: middle;
}

/* ---------- Dialog ---------- */

.dialog {
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--fg);
  box-shadow: 0 40px 80px rgb(0 0 0 / 0.55);
}

.dialog::backdrop {
  background: rgb(4 3 8 / 0.72);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.dialog[open] {
  animation: dialog-in 0.22s var(--ease);
}

@keyframes dialog-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

.dialog-inner {
  padding: 26px clamp(20px, 4vw, 30px) 26px;
}

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

.dialog h2 {
  margin-top: 14px;
  font-size: clamp(26px, 4vw, 34px);
}

.dialog p {
  margin-top: 14px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.dialog .spec-list {
  margin-top: 18px;
}

.dialog-close {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  border: 1px solid var(--border-2);
  border-radius: var(--radius-btn);
  background: transparent;
  color: var(--muted);
}

.dialog-close:hover {
  color: var(--fg);
  border-color: var(--primary);
}

.dialog-close svg {
  width: 16px;
  height: 16px;
}

.dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.dialog-fineprint {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 13px !important;
}

/* ---------- FAQ ---------- */

.faq-list {
  margin-top: clamp(28px, 4vw, 44px);
  border-top: 1px solid var(--border);
}

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-item summary {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 4px;
  cursor: pointer;
  list-style: none;
  color: var(--fg);
  font-size: clamp(16px, 2vw, 19px);
  font-weight: 700;
  line-height: 1.35;
}

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

.faq-item summary:hover {
  color: var(--accent-soft);
}

.faq-item summary h3 {
  flex: 1;
  font: inherit;
  text-transform: none;
  letter-spacing: 0;
  color: inherit;
  line-height: inherit;
}

.faq-num {
  min-width: 22px;
  font: 700 11px var(--font-mono);
  color: var(--muted);
}

.faq-item summary svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--muted);
  transition: transform 0.2s ease;
}

.faq-item[open] summary svg {
  transform: rotate(180deg);
}

.faq-answer {
  padding: 0 44px 24px 42px;
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.68;
  max-width: 80ch;
}

.faq-answer p + p {
  margin-top: 10px;
}

.faq-answer a {
  color: var(--accent-soft);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.faq-answer code {
  font-size: 13px;
  color: var(--fg);
  overflow-wrap: anywhere;
}

@media (max-width: 640px) {
  .faq-answer {
    padding: 0 4px 22px 42px;
  }
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 44px 0 56px;
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 22px;
}

.footer-tagline {
  font: 700 10.5px var(--font-sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.footer-links {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 0;
}

.footer-links a:hover {
  color: var(--fg);
}

.footer-links svg {
  width: 12px;
  height: 12px;
}

.footer-legal {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  display: grid;
  gap: 10px;
  max-width: 92ch;
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
}

/* ---------- Live region toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 60;
  transform: translate(-50%, 20px);
  padding: 10px 16px;
  border: 1px solid var(--border-2);
  border-radius: var(--radius-btn);
  background: var(--card-2);
  color: var(--fg);
  font-size: 14px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
