:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-alt: #f1f5f9;
  --text: #0f172a;
  --muted: #475569;
  --border: #cbd5e1;
  --primary: #145da0;
  --primary-hover: #0e467a;
  --primary-soft: #e6f0fa;
  --danger: #dc2626;
  --danger-bg: #fef2f2;
  --danger-border: #fca5a5;
  --suspect: #b45309;
  --suspect-bg: #fffbeb;
  --suspect-border: #fcd34d;
  --safe: #047857;
  --safe-bg: #ecfdf5;
  --safe-border: #6ee7b7;
  --shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.08), 0 4px 10px -4px rgba(15, 23, 42, 0.04);
  --radius: 16px;
}

[data-theme="dark"] {
  --bg: #0b1220;
  --surface: #131c2e;
  --surface-alt: #1b263b;
  --text: #f1f5f9;
  --muted: #cbd5e1;
  --border: #334155;
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --primary-soft: rgba(59, 130, 246, 0.16);
  --danger: #f87171;
  --danger-bg: rgba(220, 38, 38, 0.14);
  --danger-border: #991b1b;
  --suspect: #fbbf24;
  --suspect-bg: rgba(217, 119, 6, 0.16);
  --suspect-border: #92400e;
  --safe: #34d399;
  --safe-bg: rgba(5, 150, 105, 0.16);
  --safe-border: #065f46;
  --shadow: 0 12px 30px -8px rgba(0, 0, 0, 0.5);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 17px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--primary);
  color: #ffffff;
  padding: 10px 16px;
  z-index: 1000;
  font-weight: 700;
}

.skip-link:focus {
  left: 12px;
  top: 12px;
  border-radius: 8px;
}

.container {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
}

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
}

.brand-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--primary);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.brand-text strong {
  display: block;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.brand-text small {
  display: block;
  font-size: 0.82rem;
  color: var(--muted);
}

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

.trust-pill {
  background: var(--primary-soft);
  color: var(--primary);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
}

.theme-toggle {
  background: var(--surface-alt);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  border-color: var(--primary);
  outline: 2px solid transparent;
}

.hero {
  padding: 36px 0 22px;
  text-align: center;
}

.hero h1 {
  margin: 0 0 10px;
  font-size: clamp(1.65rem, 3.6vw, 2.35rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.hero-sub {
  margin: 0 auto;
  max-width: 700px;
  color: var(--muted);
  font-size: 1.05rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px;
  margin-bottom: 28px;
}

.form-label {
  display: block;
  font-weight: 700;
  margin-bottom: 8px;
  font-size: 0.95rem;
}

.channel-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.channel-btn {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--surface-alt);
  color: var(--text);
  padding: 9px 15px;
  border-radius: 10px;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.channel-btn[aria-pressed="true"] {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

.input-text,
.input-textarea {
  width: 100%;
  background: var(--bg);
  color: var(--text);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 13px 15px;
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.5;
  transition: border-color 0.15s ease;
}

.input-text:focus,
.input-textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.input-textarea {
  min-height: 140px;
  resize: vertical;
}

.field-block {
  margin-bottom: 18px;
}

.textarea-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.toolbar-btns {
  display: flex;
  gap: 8px;
}

.btn-secondary {
  background: var(--surface-alt);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 7px 12px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-secondary:hover {
  border-color: var(--primary);
}

.btn-primary {
  width: 100%;
  background: var(--primary);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  padding: 16px 22px;
  font-size: 1.08rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background-color 0.15s ease, transform 0.1s ease;
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-primary:active {
  transform: translateY(1px);
}

.btn-primary:disabled {
  opacity: 0.7;
  cursor: wait;
}

.error-banner {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  color: var(--danger);
  font-weight: 600;
}

.examples-wrap {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.examples-title {
  margin: 0 0 10px;
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 600;
}

.examples-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}

.example-btn {
  background: var(--surface-alt);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  text-align: left;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.example-btn:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.result-card {
  border-width: 2px;
  scroll-margin-top: 90px;
}

.result-card.verdict-DANGER {
  border-color: var(--danger-border);
  background: linear-gradient(180deg, var(--danger-bg) 0%, var(--surface) 140px);
}

.result-card.verdict-SUSPECT {
  border-color: var(--suspect-border);
  background: linear-gradient(180deg, var(--suspect-bg) 0%, var(--surface) 140px);
}

.result-card.verdict-PROBABLEMENT_SUR {
  border-color: var(--safe-border);
  background: linear-gradient(180deg, var(--safe-bg) 0%, var(--surface) 140px);
}

.result-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.verdict-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.92rem;
}

.verdict-DANGER .verdict-badge {
  background: var(--danger);
  color: #ffffff;
}

.verdict-SUSPECT .verdict-badge {
  background: #d97706;
  color: #ffffff;
}

.verdict-PROBABLEMENT_SUR .verdict-badge {
  background: var(--safe);
  color: #ffffff;
}

.score-pill {
  font-weight: 800;
  font-size: 1.05rem;
  padding: 6px 14px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.gauge-track {
  width: 100%;
  height: 12px;
  background: var(--surface-alt);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--border);
  margin-bottom: 16px;
}

.gauge-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.35s ease;
}

.verdict-DANGER .gauge-fill {
  background: var(--danger);
}

.verdict-SUSPECT .gauge-fill {
  background: #d97706;
}

.verdict-PROBABLEMENT_SUR .gauge-fill {
  background: var(--safe);
}

.result-type {
  margin: 0 0 8px;
  font-size: 1.35rem;
}

.result-summary {
  margin: 0 0 18px;
  font-size: 1.04rem;
}

.findings-box {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 18px;
}

.findings-box h3 {
  margin: 0 0 10px;
  font-size: 1rem;
}

.findings-list {
  margin: 0;
  padding-left: 20px;
}

.findings-list li {
  margin-bottom: 6px;
}

.official-box {
  background: var(--primary-soft);
  border: 1px solid var(--primary);
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 18px;
  font-size: 0.94rem;
}

.official-domain-chip {
  display: inline-block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 700;
  margin: 2px 4px 2px 0;
}

.action-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.action-tab {
  flex: 1 1 220px;
  border: 2px solid var(--border);
  background: var(--surface-alt);
  color: var(--text);
  border-radius: 10px;
  padding: 11px 14px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
}

.action-tab[aria-selected="true"] {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary);
}

.action-tab.urgent[aria-selected="true"] {
  border-color: var(--danger);
  background: var(--danger-bg);
  color: var(--danger);
}

.action-panel {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
}

.action-panel ol {
  margin: 0;
  padding-left: 22px;
}

.action-panel li {
  margin-bottom: 8px;
}

.engine-meta {
  margin-top: 14px;
  font-size: 0.82rem;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.section-block {
  margin-bottom: 34px;
}

.section-title {
  margin: 0 0 8px;
  font-size: 1.55rem;
  letter-spacing: -0.01em;
}

.section-lead {
  margin: 0 0 20px;
  color: var(--muted);
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
}

.step-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 800;
  margin-bottom: 10px;
}

.step-card h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
}

.step-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.offers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.offer-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

.offer-card.featured {
  border: 2px solid var(--primary);
}

.offer-tag {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 6px;
}

.offer-card h3 {
  margin: 0 0 8px;
  font-size: 1.25rem;
}

.offer-price {
  font-size: 2rem;
  font-weight: 800;
  margin: 8px 0 12px;
  color: var(--text);
}

.offer-price small {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--muted);
}

.offer-list {
  margin: 0 0 20px;
  padding-left: 20px;
  flex: 1;
}

.offer-list li {
  margin-bottom: 8px;
  font-size: 0.95rem;
}

.offer-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-link-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  background: var(--primary);
  color: #ffffff;
  padding: 13px 16px;
  border-radius: 10px;
  font-weight: 700;
  text-align: center;
}

.btn-link-primary:hover {
  background: var(--primary-hover);
}

.btn-link-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  background: var(--surface-alt);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 11px 16px;
  border-radius: 10px;
  font-weight: 600;
  text-align: center;
  font-size: 0.94rem;
}

.btn-link-outline:hover {
  border-color: var(--primary);
}

.mediator-note {
  margin-top: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 18px;
  font-size: 0.92rem;
  color: var(--muted);
}

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 24px 0;
  margin-top: 40px;
  font-size: 0.88rem;
  color: var(--muted);
}

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

.footer-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.footer-links a:hover {
  text-decoration: underline;
}

.hidden {
  display: none !important;
}

.access-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 18px;
  margin-bottom: 18px;
}

.access-bar.is-subscriber {
  border-color: var(--safe-border);
  background: var(--safe-bg);
}

.access-status-text {
  font-size: 0.94rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.access-actions-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.access-drawer {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 20px;
}

.access-drawer-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.access-code-input {
  flex: 1 1 220px;
  text-transform: uppercase;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.btn-activate-code {
  background: var(--primary);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  padding: 12px 18px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
}

.btn-activate-code:hover {
  background: var(--primary-hover);
}

.access-feedback {
  margin-top: 10px;
  font-size: 0.9rem;
  font-weight: 600;
}

.access-feedback.is-error {
  color: var(--danger);
}

.access-feedback.is-ok {
  color: var(--safe);
}

.quota-wall {
  margin-top: 16px;
  padding: 18px;
  border-radius: 12px;
  background: var(--suspect-bg);
  border: 2px solid var(--suspect-border);
}

.quota-wall h3 {
  margin: 0 0 6px;
  font-size: 1.08rem;
}

.quota-wall p {
  margin: 0 0 12px;
  font-size: 0.95rem;
}

.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
  gap: 18px;
}

.plan-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

.plan-card.plan-featured {
  border: 2px solid var(--primary);
}

.plan-badge {
  display: inline-block;
  align-self: flex-start;
  background: var(--primary-soft);
  color: var(--primary);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.plan-duration {
  font-size: 1.55rem;
  font-weight: 800;
  margin: 6px 0 10px;
}

.code-display-box {
  background: var(--surface-alt);
  border: 2px dashed var(--primary);
  border-radius: 14px;
  padding: 20px;
  text-align: center;
  margin: 18px 0;
}

.code-display-value {
  display: block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--primary);
  margin: 6px 0 12px;
  user-select: all;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 200;
}

.modal-card {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-width: 520px;
  width: 100%;
  padding: 26px;
  box-shadow: var(--shadow);
}

@media (max-width: 640px) {
  .card {
    padding: 18px;
  }
  .trust-pill {
    display: none;
  }
}