/* ==========================================================
   ENVOR PORTAL — Custom Theme
   Off-black + Emerald · Clean · Modern · Techy · Accessible
   Mobile-first: base values target mobile, min-width queries
   progressively enhance for larger viewports.
   ========================================================== */

/* ── DESIGN TOKENS ───────────────────────────────────────── */
:root {
  /* Backgrounds */
  --bg: #0e1117;
  --surface: #161b22;
  --surface-2: #1c2129;
  --surface-3: #21262d;

  /* Borders */
  --border: #2a313a;
  --border-subtle: #21262d;
  --border-focus: #059669;

  /* Emerald palette */
  --purple: #059669;
  --purple-hover: #047857;
  --purple-light: #34d399;
  --purple-dim: rgba(5, 150, 105, 0.1);
  --purple-glow: rgba(5, 150, 105, 0.22);

  /* Text */
  --text: #e6edf3;
  --text-muted: #7d8590;
  --text-secondary: #8b949e;
  --text-dim: #484f58;
  --text-accent: #34d399;

  /* Feedback */
  --error: #f87171;
  --error-bg: rgba(248, 113, 113, 0.08);
  --success: #6ee7b7;
  --success-bg: rgba(110, 231, 183, 0.06);
  --warn: #d97706;
  --warn-bg: rgba(217, 119, 6, 0.06);

  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui,
    "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "Cascadia Code", "SF Mono", "Fira Mono", "Consolas",
    monospace;

  /* Type scale */
  --text-2xs: 0.7rem; /* 11px — badges, decorative labels */
  --text-xs: 0.75rem; /* 12px — form labels, card headers */
  --text-sm: 0.875rem; /* 14px — descriptions, secondary UI */
  --text-base: 1rem; /* 16px — body (matches html font-size) */
  --text-lg: 1.125rem; /* 18px — lead / slightly elevated */

  /* Spacing scale */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.25rem;
  --sp-6: 1.5rem;
  --sp-8: 2rem;
  --sp-12: 3rem;
  --sp-16: 4rem;
  --sp-20: 5rem;
  --sp-24: 6rem;

  /* Radii (all sharp) */
  --r-sm: 0;
  --r: 0;
  --r-lg: 0;

  /* Transition */
  --t: 150ms ease;
}

/* ── BASE ────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}
img,
svg {
  display: block;
  max-width: 100%;
}
input,
button,
select,
textarea {
  font: inherit;
}
ul,
ol {
  list-style: none;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1,
h2,
h3,
h4,
h5 {
  font-family: var(--font-mono);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.2;
  color: var(--text);
}
h1 {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  margin-bottom: var(--sp-4);
}
h2 {
  font-size: 1.5rem;
  margin-bottom: var(--sp-3);
}
h3 {
  font-size: var(--text-lg);
  margin-bottom: var(--sp-2);
}
h4 {
  font-size: var(--text-sm);
  font-weight: 500;
}

p {
  color: var(--text-secondary);
  margin-bottom: var(--sp-4);
}
p:last-child {
  margin-bottom: 0;
}

small {
  font-size: 0.8em;
  color: var(--text-muted);
}
strong {
  color: var(--text);
  font-weight: 600;
}

a {
  color: var(--text-accent);
  text-decoration: none;
  transition: color var(--t);
}
a:hover {
  color: var(--purple-light);
}
a:focus-visible {
  outline: 2px solid var(--purple);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

pre,
code {
  font-family: var(--font-mono);
  font-size: 0.82em;
}
pre {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: var(--sp-4);
  overflow-x: auto;
  color: var(--text-muted);
  margin-block: var(--sp-4);
}

/* ── UTILITIES ───────────────────────────────────────────── */

.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;
}

/* ── LAYOUT ──────────────────────────────────────────────── */

.l-container {
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: var(--sp-4); /* mobile */
}
@media (min-width: 641px) {
  .l-container {
    padding-inline: var(--sp-8);
  }
}
@media (min-width: 1280px) {
  .l-container {
    padding-inline: var(--sp-12);
  }
}

main {
  flex: 1;
  padding-block: var(--sp-8); /* mobile */
}
@media (min-width: 641px) {
  main {
    padding-block: var(--sp-12);
  }
}
@media (min-width: 1024px) {
  main {
    padding-block: var(--sp-16);
  }
}

/* Auth page: vertical + horizontal centring of content */
.l-auth-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--sp-8) var(--sp-4);
  overflow-x: hidden;
}

/* Support routes: two panels with vertical OR divider */
.support-routes {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 220px;
  margin-top: var(--sp-8);
}

/* ── MODULE ──────────────────────────────────────────────── */

/* ── Module: site-header ──────────────────────────────────── */
.site-header {
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
  background: rgba(14, 17, 23, 0.88);
}

.site-header .l-container {
  display: flex;
  flex-direction: column; /* mobile: logo above nav */
  align-items: flex-start;
  gap: var(--sp-3);
  padding-block: var(--sp-4);
}
@media (min-width: 641px) {
  .site-header .l-container {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-8);
  }
}
@media (min-width: 1024px) {
  .site-header .l-container {
    padding-block: var(--sp-6);
  }
}

.site-logo {
  font-family: var(--font-mono);
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.04em;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  flex-shrink: 0;
}
.site-logo::before {
  content: "▸";
  color: var(--purple);
}
.site-logo:hover {
  color: var(--text);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--sp-4); /* mobile */
  flex-wrap: wrap;
}
@media (min-width: 641px) {
  .site-nav {
    gap: var(--sp-6);
  }
}
.site-nav a {
  font-size: var(--text-base);
  color: var(--text-muted);
  font-weight: 500;
  transition: color var(--t);
}
.site-nav a:hover {
  color: #ffffff;
}

/* ── Module: site-footer ──────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding-block: var(--sp-8);
  margin-top: auto;
}
.site-footer .l-container {
  display: flex;
  flex-direction: column; /* mobile */
  align-items: flex-start;
  gap: var(--sp-3);
}
@media (min-width: 641px) {
  .site-footer .l-container {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-4);
    flex-wrap: wrap;
  }
}
.site-footer p {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin: 0;
}
.footer-nav {
  display: flex;
  align-items: center;
  gap: var(--sp-6);
}
.footer-nav a {
  font-size: var(--text-base);
  color: var(--text-muted);
}
.footer-nav a:hover {
  color: #ffffff;
}

/* ── Module: buttons ──────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: 0.55rem 1.2rem;
  border-radius: var(--r);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background var(--t), border-color var(--t), box-shadow var(--t),
    color var(--t);
  text-decoration: none;
  line-height: 1.4;
  white-space: nowrap;
  font-family: var(--font-sans);
}
.btn:focus-visible {
  outline: 2px solid var(--purple);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--purple);
  color: #fff;
  border-color: var(--purple);
}
.btn-primary:hover {
  background: var(--purple-hover);
  border-color: var(--purple-hover);
  box-shadow: 0 0 0 3px var(--purple-glow);
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: var(--purple-light);
  border-color: var(--border);
}
.btn-outline:hover {
  background: var(--purple-dim);
  border-color: var(--purple);
  color: var(--purple-light);
  box-shadow: 0 0 0 3px var(--purple-glow);
}

.btn-lg {
  padding: 0.7rem 1.5rem;
  font-size: var(--text-base);
}
.btn-block {
  width: 100%;
}

.btn:disabled,
.btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

/* ── Module: forms ────────────────────────────────────────── */
.form-group {
  margin-bottom: var(--sp-4);
}

.form-label {
  display: block;
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: var(--sp-2);
}

/* Inline annotation on a label: "(optional)", "(required)" etc. */
.label-hint {
  color: var(--text-muted);
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.85em;
}

.form-control {
  display: block;
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  color: var(--text);
  padding: 0.6rem 0.85rem;
  font-size: var(--text-base);
  transition: border-color var(--t), box-shadow var(--t);
}
.form-control::placeholder {
  color: var(--text-muted);
}
.form-control:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--purple-glow);
}

textarea.form-control {
  resize: vertical;
  min-height: 7rem;
}

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238b949e' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  padding-right: 2.25rem;
}

.form-check-group {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  margin-bottom: var(--sp-4);
}
.form-check {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  cursor: pointer;
}

.form-check-input {
  appearance: none;
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  border: 1px solid var(--border);
  background: var(--surface-2);
  border-radius: var(--r);
  cursor: pointer;
  transition: background var(--t), border-color var(--t);
}
.form-check-input:checked {
  background: var(--purple);
  border-color: var(--purple);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 8'%3E%3Cpath stroke='%23fff' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' fill='none' d='M1 4l3 3 5-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 0.65rem;
}
.form-check-input:focus-visible {
  outline: 2px solid var(--purple);
  outline-offset: 2px;
}
.form-check-label {
  font-size: var(--text-base);
  color: var(--text-secondary);
  cursor: pointer;
}

/* ── Module: alerts ───────────────────────────────────────── */
.alert {
  padding: 0.6rem var(--sp-4);
  border-radius: var(--r);
  font-size: var(--text-sm);
  margin-top: var(--sp-3);
  border: 1px solid transparent;
}
.alert-danger {
  background: var(--error-bg);
  border-color: rgba(248, 113, 113, 0.2);
  color: var(--error);
}
.alert-success {
  background: var(--success-bg);
  border-color: rgba(110, 231, 183, 0.2);
  color: var(--success);
}

/* ── Module: panel (shared surface chrome) ────────────────── */
/* Provides background + border + radius. Components add their own padding. */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
}

/* ── Module: card ─────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color var(--t), box-shadow var(--t);
}
.card:hover {
  border-color: var(--purple);
  box-shadow: 0 0 0 1px var(--purple), 0 4px 32px var(--purple-glow);
}

.card-header {
  padding: var(--sp-4) var(--sp-6); /* mobile */
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
@media (min-width: 641px) {
  .card-header {
    padding: var(--sp-4) var(--sp-8);
  }
}
@media (min-width: 1024px) {
  .card-header {
    padding: var(--sp-6) var(--sp-12);
  }
}
.card-header h4 {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin: 0;
}

.card-body {
  padding: var(--sp-6); /* mobile */
  display: flex;
  flex-direction: column;
  gap: var(--sp-6);
  flex: 1;
}
@media (min-width: 1024px) {
  .card-body {
    padding: var(--sp-8);
  }
}

/* ── Module: pricing ──────────────────────────────────────── */
.pricing-intro {
  color: var(--text-secondary);
  margin-bottom: var(--sp-8);
  max-width: 72ch;
}

.pricing-controls {
  display: flex;
  justify-content: center;
  margin-bottom: var(--sp-6);
}
@media (min-width: 640px) {
  .pricing-controls {
    justify-content: flex-end;
  }
}

.pricing-frequency {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-3);
  margin-top: var(--sp-8);
  text-align: center;
}

.pricing-frequency-hint {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  max-width: 48ch;
}

.pricing-toggle {
  display: inline-flex;
  border: 1px solid var(--border);
  overflow: hidden;
}
.pricing-toggle-opt {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 0.55rem 1.25rem;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-secondary);
  border-right: 1px solid var(--border);
  transition: background var(--t), color var(--t);
  white-space: nowrap;
}
.pricing-toggle-opt:last-child {
  border-right: none;
}
.pricing-toggle-opt:hover {
  background: var(--surface);
  color: var(--text);
}

.pricing-badge {
  font-size: var(--text-2xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 1px 5px;
  background: rgba(255, 255, 255, 0.2);
  color: inherit;
}
.pricing-toggle-opt:not(.is-active) .pricing-badge {
  background: var(--purple-dim);
  color: var(--purple-light);
}

.currency-list {
  display: flex;
  gap: var(--sp-2);
}
.currency-list a {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-muted);
  padding: 2px 10px;
  border: 1px solid var(--border);
  transition: all var(--t);
  letter-spacing: 0.04em;
}
.currency-list a:hover {
  border-color: var(--purple);
  color: var(--purple-light);
  background: var(--purple-dim);
}

.pricing-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-6);
  margin-bottom: var(--sp-12);
}
@media (min-width: 640px) {
  .pricing-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 880px) {
  .pricing-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (min-width: 1024px) {
  .pricing-grid {
    gap: var(--sp-8);
  }
}

.pricing-price {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}
.pricing-price small {
  font-size: var(--text-sm);
  font-weight: 400;
  color: var(--text-muted);
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  flex: 1;
}
.feature-list li {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  padding-left: var(--sp-6);
  position: relative;
}
.feature-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--purple-light);
  font-size: 0.75em;
  top: 0.2em;
}

/* ── Module: dyk-banner ───────────────────────────────────── */
.dyk-banner {
  margin-top: var(--sp-12);
  padding: var(--sp-6);
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--purple);
  display: grid;
  grid-template-columns: 1fr; /* mobile: single col */
  gap: var(--sp-3) var(--sp-6);
  align-items: start;
}
@media (min-width: 641px) {
  .dyk-banner {
    grid-template-columns: auto 1fr;
    padding: var(--sp-6) var(--sp-8);
  }
  .dyk-label {
    grid-column: 1;
    grid-row: 1;
  }
  .dyk-body {
    grid-column: 2;
    grid-row: 1 / 3;
  }
}

.dyk-label {
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--purple);
  padding-top: 0.2em;
  white-space: nowrap;
}
.dyk-body p {
  color: var(--text-secondary);
  font-size: var(--text-base);
  margin-bottom: var(--sp-4);
}
.dyk-body a.btn {
  align-self: start;
}

/* ── Module: status-box ───────────────────────────────────── */
/* Shared surface chrome comes from .panel */
.status-box {
  padding: var(--sp-6) var(--sp-4); /* mobile */
  max-width: 500px;
}
@media (min-width: 641px) {
  .status-box {
    padding: var(--sp-8) var(--sp-6);
  }
}
@media (min-width: 1024px) {
  .status-box {
    padding: var(--sp-12) var(--sp-16);
  }
}
.status-box h2 {
  margin-bottom: var(--sp-3);
}
.status-box p {
  margin-bottom: 0;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.45;
  }
}

.status-box--waiting {
  animation: pulse 2.2s ease-in-out infinite;
}
.status-box--waiting h2 {
  color: var(--text-muted);
}

.status-box--ready {
  border-color: rgba(110, 231, 183, 0.35);
  background: var(--success-bg);
}
.status-box--ready h2 {
  color: var(--success);
}

.status-box--error {
  border-color: rgba(248, 113, 113, 0.3);
  background: var(--error-bg);
}
.status-box--error h2 {
  color: var(--error);
}

/* ── Module: auth ─────────────────────────────────────────── */
.auth-wrap {
  width: min(460px, 100%);
}

/* Shared surface chrome comes from .panel */
.auth-card {
  padding: var(--sp-6); /* mobile */
  margin-bottom: var(--sp-4);
}
@media (min-width: 1024px) {
  .auth-card {
    padding: var(--sp-8);
  }
}
.auth-wrap h1 {
  text-align: center;
  margin-bottom: var(--sp-4);
}
.auth-switch {
  font-size: var(--text-sm);
  color: var(--text-muted);
  text-align: center;
}

/* ── Module: account ──────────────────────────────────────── */
.account-meta {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: var(--sp-4) var(--sp-6);
  margin-bottom: var(--sp-6);
  font-size: var(--text-sm);
}
@media (min-width: 1024px) {
  .account-meta {
    padding: var(--sp-6) var(--sp-8);
  }
}
.account-meta p {
  margin: 0;
  color: var(--text-secondary);
}

.subscription-list {
  list-style: none;
  padding: 0;
  margin: var(--sp-6) 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
.subscription-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-4) var(--sp-6);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  font-size: var(--text-base);
  transition: border-color var(--t);
}
@media (min-width: 1024px) {
  .subscription-list li {
    padding: var(--sp-6) var(--sp-12);
  }
}
.subscription-list li:hover {
  border-color: var(--purple);
}

/* ── Module: hero ─────────────────────────────────────────── */
.hero {
  padding-block: var(--sp-8) var(--sp-6);
} /* mobile */
@media (min-width: 641px) {
  .hero {
    padding-block: var(--sp-12) var(--sp-8);
  }
}
@media (min-width: 1024px) {
  .hero {
    padding-block: var(--sp-16) var(--sp-12);
  }
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  color: var(--purple-light);
  background: var(--purple-dim);
  border: 1px solid rgba(5, 150, 105, 0.2);
  border-radius: 0;
  padding: 0.2rem 0.75rem;
  margin-bottom: var(--sp-6);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.75rem);
  margin-bottom: var(--sp-6);
  background: linear-gradient(
    135deg,
    var(--text) 20%,
    var(--purple-light) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
}
.hero .subtitle {
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  max-width: 58ch;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: var(--sp-12);
}

/* ── Module: faqs ─────────────────────────────────────────── */
.faq-intro {
  max-width: 60ch;
  margin-bottom: var(--sp-8);
}
.faq-group {
  margin-bottom: var(--sp-12);
}
.subheading {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: var(--sp-6);
  padding-left: var(--sp-4);
  border-left: 3px solid var(--purple-light);
}

.faq-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-6);
}
@media (min-width: 768px) {
  .faq-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1024px) {
  .faq-grid {
    gap: var(--sp-8);
  }
}

/* Scroll-in: initial invisible state — only applied when JS runs */
.faq-item {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.faq-item .card-header {
  padding: var(--sp-3) var(--sp-4);
}
@media (min-width: 641px) {
  .faq-item .card-header {
    padding: var(--sp-3) var(--sp-5);
  }
}

.faq-trigger {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  user-select: none;
}
.faq-trigger::after {
  content: "+";
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: color var(--t);
}
/* Override card-header uppercase for question text */
.faq-trigger h4 {
  font-family: var(--font-mono);
  font-size: var(--text-base);
  font-weight: 600;
  text-transform: none;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 0;
}

.faq-answer {
  display: grid;
  grid-template-rows: 0fr;
  overflow: hidden;
  transition: grid-template-rows 1s cubic-bezier(0.4, 0, 0.2, 1);
}
.faq-answer-inner {
  overflow: hidden;
  min-height: 0;
}

/* ── Module: support sections ─────────────────────────────── */
.support-section {
  margin-bottom: var(--sp-12);
}

/* ── Module: problems-pane ────────────────────────────────── */
/* --ok = green/operational, default = yellow/degraded, --error = red/outage */
.problems-pane {
  margin-bottom: var(--sp-8);
  background: var(--surface);
  border: 1px solid rgba(234, 179, 8, 0.2);
}
.problems-pane--ok {
  border-color: rgba(5, 150, 105, 0.2);
}
.problems-pane--error {
  border-color: rgba(248, 113, 113, 0.2);
}

.problems-list {
  padding: var(--sp-4) var(--sp-6);
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}
.problems-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0 var(--sp-3);
}
.problems-item-dot {
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: #eab308;
  margin-top: 0.55em;
  flex-shrink: 0;
}
.problems-pane--ok .problems-item-dot {
  background: var(--purple);
}
.problems-item--error .problems-item-dot {
  background: #f87171;
}
.problems-item-title {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text);
  margin-bottom: var(--sp-1);
}
.problems-item-desc {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

/* ── Module: support page ─────────────────────────────────── */
.support-route {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--sp-4);
  padding: var(--sp-8);
}

.support-route-desc {
  color: var(--text-secondary);
  line-height: 1.6;
}

.support-or {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  width: 3rem;
}

.support-or::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  transform: translateX(-50%);
  background: linear-gradient(
    to bottom,
    transparent,
    rgba(42, 49, 58, 0.6) 25%,
    rgba(42, 49, 58, 0.6) 75%,
    transparent
  );
}

.support-or span {
  position: relative;
  z-index: 1;
  background: var(--bg);
  padding: var(--sp-3) var(--sp-4);
  color: var(--text-dim);
  font-size: var(--text-2xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid rgba(42, 49, 58, 0.5);
}

@media (max-width: 640px) {
  .support-routes {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .support-or {
    width: auto;
    height: 3rem;
    align-self: auto;
  }
  .support-or::before {
    top: 50%;
    bottom: auto;
    left: 0;
    right: 0;
    width: auto;
    height: 1px;
    transform: translateY(-50%);
    background: linear-gradient(
      to right,
      transparent,
      rgba(42, 49, 58, 0.6) 25%,
      rgba(42, 49, 58, 0.6) 75%,
      transparent
    );
  }
  .support-route {
    padding: var(--sp-4) 0;
  }
}

/* ── Module: support guide page ──────────────────────────── */
.support-guide-intro {
  color: var(--text-secondary);
  margin-bottom: var(--sp-8);
  max-width: 72ch;
}

.help-checklist {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 640px;
}

.help-check-item {
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: var(--sp-3);
  align-items: start;
  padding: var(--sp-6) 0;
  border-bottom: 1px solid var(--border);
}
.help-check-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.help-check-item:first-child {
  padding-top: 0;
}

.help-check-icon {
  width: 1.6rem;
  height: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 700;
  border: 2px solid;
  flex-shrink: 0;
  margin-top: 0.1em;
}
.help-check-icon--unknown {
  color: var(--text-muted);
  border-color: var(--border);
}
.help-check-icon--warn {
  color: var(--warn);
  border-color: var(--warn);
}
.help-check-icon--ok {
  color: var(--purple);
  border-color: var(--purple);
}

.help-check-title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text);
  margin-bottom: var(--sp-1);
}
.help-check-desc {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-bottom: var(--sp-2);
}
.help-check-desc:last-child {
  margin-bottom: 0;
}
.help-check-action {
  font-size: var(--text-sm);
  color: var(--purple);
  font-family: var(--font-mono);
}
.help-check-action:hover {
  color: var(--text);
}

.help-guide-footer {
  margin-top: var(--sp-8);
  color: var(--text-secondary);
  font-size: var(--text-sm);
}

/* ── Module: support message page ────────────────────────── */
.support-message-intro {
  color: var(--text-secondary);
  margin-bottom: var(--sp-8);
  max-width: 72ch;
}

.l-support-message {
  max-width: 640px;
}

/* ── Module: mailbox ──────────────────────────────────────── */
/* Shared surface chrome comes from .panel */
.mailbox-card {
  max-width: 460px;
  padding: var(--sp-8);
}
.mailbox-card p {
  margin-bottom: var(--sp-3);
}

/* ── Module: banners ──────────────────────────────────────── */
.banner {
  padding: 0.55rem var(--sp-4);
  font-size: var(--text-sm);
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.banner-info {
  background: var(--purple-dim);
  color: var(--purple-light);
  border-bottom-color: rgba(5, 150, 105, 0.2);
}

/* ── Module: skip-link (a11y) ─────────────────────────────── */
.skip-link {
  position: absolute;
  top: -48px;
  left: var(--sp-4);
  background: var(--purple);
  color: #fff;
  padding: var(--sp-2) var(--sp-4);
  border-radius: 0;
  font-size: var(--text-sm);
  font-weight: 500;
  z-index: 9999;
  transition: top var(--t);
}
.skip-link:focus {
  top: 0;
  color: #fff;
}

/* -- HTTP error ----------------------------------------------------------- */

.http-error {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 1.5rem;
}

.http-error-code {
  font-size: clamp(4rem, 12vw, 8rem);
  font-weight: 700;
  color: var(--border);
  line-height: 1;
  letter-spacing: -0.04em;
}

.http-error-heading {
  font-size: clamp(1.4rem, 3vw, 1.8rem);
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.02em;
  margin-top: 0.75rem;
}

.http-error-body {
  font-size: 1rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}

.http-error-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 2rem;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--purple);
}
.http-error-link:hover {
  text-decoration: none;
  color: var(--purple-hover);
}
.http-error-link svg {
  width: 16px;
  height: 16px;
}

/* ── STATE ───────────────────────────────────────────────── */

/* Pricing: active frequency tab */
.pricing-toggle-opt.is-active {
  background: var(--purple);
  color: #fff;
  pointer-events: none;
}

/* Pricing: selected currency */
.currency-list a.is-active {
  border-color: var(--purple);
  color: var(--purple-light);
  background: var(--purple-dim);
  pointer-events: none;
}

/* FAQ: card visible (JS scroll-in) */
.faq-item.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* FAQ: accordion open */
.faq-item.is-open .faq-trigger::after {
  content: "−";
  color: var(--purple-light);
}
.faq-item.is-open .faq-answer {
  grid-template-rows: 1fr;
}

/* ── ACCESSIBILITY ───────────────────────────────────────── */

:focus-visible {
  outline: 2px solid var(--purple);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── PRINT ───────────────────────────────────────────────── */

@media print {
  .site-header,
  .site-footer,
  .skip-link,
  .btn {
    display: none !important;
  }
  body {
    background: #fff;
    color: #000;
  }
  a {
    color: #000;
    text-decoration: underline;
  }
}
