/* AdLens Pro — public pricing & checkout page (same palette as the admin portal) */
:root {
  --bg-main: #050505;
  --bg-card: #111113;
  --bg-card-hover: #1A1A1D;
  --bg-input: #0B0B0C;
  --border-color: #1A1A1D;
  --border-highlight: #2E2E33;
  --text-primary: #FAFAFA;
  --text-secondary: #A1A1AA;
  --text-muted: #71717A;
  --emerald: #F4F4F5;
  --emerald-dark: #C8CBD1;
  --emerald-glow: rgba(255,255,255,0.18);
  --amber: #F59E0B;
  --rose: #F43F5E;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg-main);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

[hidden] { display: none !important; }

.test-banner {
  background: var(--amber);
  color: #1F1300;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
}

.top {
  max-width: 1080px;
  margin: 0 auto;
  padding: 20px 16px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  display: inline-grid; place-items: center;
  width: 32px; height: 32px; border-radius: 9px;
  background: linear-gradient(135deg, #52525B, #A1A1AA);
  color: #fff;
}
.brand-name { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
.brand-name b { color: #E4E4E7; font-weight: 700; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 8px 16px 64px; }

.hero { text-align: center; margin: 24px auto 28px; max-width: 620px; }
.hero h1 { font-size: clamp(28px, 5vw, 40px); font-weight: 800; letter-spacing: -0.02em; }
.hero p { color: var(--text-secondary); margin-top: 10px; font-size: 16px; }

.controls {
  display: flex; flex-wrap: wrap; gap: 12px;
  align-items: center; justify-content: center;
  margin-bottom: 28px;
}

.seg {
  display: inline-flex; padding: 4px; gap: 4px;
  background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 12px;
}
.seg-btn {
  border: 0; background: transparent; color: var(--text-secondary);
  font: 600 14px var(--font-sans); padding: 8px 16px; border-radius: 9px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
}
.seg-btn.active { background: var(--bg-card-hover); color: var(--text-primary); }
.seg-btn:focus-visible, select:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--emerald); outline-offset: 2px;
}
.save-tag:empty { display: none; }
.save-tag {
  font-size: 11px; font-weight: 700; color: var(--emerald);
  background: var(--emerald-glow); padding: 2px 6px; border-radius: 6px;
}

.currency-pick { display: inline-flex; align-items: center; gap: 8px; color: var(--text-secondary); font-size: 14px; }
.currency-pick select {
  background: var(--bg-card); color: var(--text-primary);
  border: 1px solid var(--border-highlight); border-radius: 10px;
  font: 500 14px var(--font-sans); padding: 8px 10px; cursor: pointer;
}

.plans-grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  align-items: stretch;
}
.loading, .grid-msg { grid-column: 1 / -1; text-align: center; color: var(--text-secondary); padding: 40px 0; }

.plan {
  position: relative;
  background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 16px;
  padding: 24px; display: flex; flex-direction: column;
}
.plan.popular { border-color: var(--emerald); box-shadow: 0 0 0 4px var(--emerald-glow); }
.plan.highlight { border-color: #E4E4E7; }
.plan-ribbon {
  position: absolute; top: -11px; left: 24px;
  background: var(--emerald); color: #0A0A0A;
  font-size: 11px; font-weight: 800; letter-spacing: 0.04em;
  padding: 3px 10px; border-radius: 999px;
}
.plan-name { font-size: 18px; font-weight: 700; }
.plan-desc { color: var(--text-secondary); font-size: 14px; margin-top: 6px; min-height: 42px; }
.plan-price { margin: 18px 0 4px; display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.plan-price .amount { font-size: 36px; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.plan-price .per { color: var(--text-secondary); font-size: 14px; }
.plan-sub { color: var(--text-muted); font-size: 13px; min-height: 20px; }
.plan-features { list-style: none; margin: 18px 0 22px; display: grid; gap: 8px; flex: 1; }
.plan-features li { font-size: 14px; color: #D4D4D8; padding-left: 24px; position: relative; }
.plan-features li::before {
  content: ''; position: absolute; left: 2px; top: 6px;
  width: 12px; height: 7px;
  border-left: 2px solid var(--emerald); border-bottom: 2px solid var(--emerald);
  transform: rotate(-45deg);
}

.btn-primary {
  width: 100%; border: 0; cursor: pointer;
  background: var(--emerald); color: #0A0A0A;
  font: 700 15px var(--font-sans); padding: 12px 16px; border-radius: 10px;
  transition: background 0.15s;
}
.btn-primary:hover { background: #FFFFFF; }
.btn-primary:disabled { background: var(--border-highlight); color: var(--text-muted); cursor: not-allowed; }
.btn-outline {
  width: 100%; cursor: pointer;
  background: transparent; color: var(--text-primary);
  border: 1px solid var(--border-highlight);
  font: 600 15px var(--font-sans); padding: 12px 16px; border-radius: 10px;
}
.btn-outline:hover { background: var(--bg-card-hover); }
.btn-outline:disabled { color: var(--text-muted); cursor: not-allowed; }
.btn-ghost {
  background: var(--bg-card-hover); color: var(--text-primary);
  border: 1px solid var(--border-highlight); border-radius: 8px;
  font: 600 13px var(--font-sans); padding: 8px 14px; cursor: pointer; flex-shrink: 0;
}

.fine { color: var(--text-muted); font-size: 13px; text-align: center; margin-top: 24px; }

/* Modal */
.modal {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(0,0,0,0.72);
  display: grid; place-items: center; padding: 16px;
}
.modal-card {
  position: relative; width: 100%; max-width: 420px;
  background: var(--bg-card); border: 1px solid var(--border-highlight);
  border-radius: 16px; padding: 24px;
}
.modal-card h2 { font-size: 20px; font-weight: 700; }
.modal-sub { color: var(--text-secondary); font-size: 14px; margin: 6px 0 18px; }
.modal-close {
  position: absolute; top: 12px; right: 12px;
  width: 32px; height: 32px; border-radius: 8px; border: 0;
  background: transparent; color: var(--text-secondary); font-size: 22px; cursor: pointer;
}
.modal-close:hover { background: var(--bg-card-hover); color: var(--text-primary); }
.field { display: grid; gap: 6px; margin-bottom: 14px; font-size: 13px; font-weight: 600; color: var(--text-secondary); }
.field em { font-style: normal; font-weight: 400; color: var(--text-muted); }
.field input {
  background: var(--bg-input); color: var(--text-primary);
  border: 1px solid var(--border-highlight); border-radius: 10px;
  font: 400 15px var(--font-sans); padding: 11px 12px;
}
.form-msg { min-height: 20px; color: var(--rose); font-size: 13px; margin-bottom: 10px; }
.secure { text-align: center; color: var(--text-muted); font-size: 12px; margin-top: 10px; }

/* Success */
.success { max-width: 560px; margin: 32px auto 0; text-align: center; }
.success-icon {
  width: 56px; height: 56px; margin: 0 auto 16px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--emerald-glow); color: var(--emerald); font-size: 28px; font-weight: 800;
}
.success h1 { font-size: 32px; font-weight: 800; }
.success-sub { color: var(--text-secondary); margin-top: 8px; }
.key-box {
  margin: 24px 0; text-align: left;
  background: var(--bg-card); border: 1px solid var(--emerald); border-radius: 14px; padding: 18px;
}
.key-label { font-size: 12px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.key-row { display: flex; align-items: center; gap: 12px; margin-top: 8px; flex-wrap: wrap; }
.key-row code {
  flex: 1; min-width: 0; overflow-wrap: anywhere;
  font: 700 20px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: 0.04em;
}
.steps { text-align: left; color: #D4D4D8; display: grid; gap: 8px; padding-left: 20px; font-size: 15px; }

@media (max-width: 480px) {
  .plan { padding: 20px; }
  .plan-price .amount { font-size: 32px; }
}

/* ==========================================================================
   Site navigation (landing, pricing, account)
   ========================================================================== */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { text-decoration: none; color: inherit; }
.nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.nav a {
  color: var(--text-secondary); text-decoration: none; font-size: 14px; font-weight: 600;
  padding: 8px 12px; border-radius: 8px;
}
.nav a:hover { color: var(--text-primary); background: var(--bg-card); }
.nav a.nav-cta { background: var(--emerald); color: #0A0A0A; }
.nav a.nav-cta:hover { background: #FFFFFF; }
@media (max-width: 560px) { .nav a:not(.nav-cta):not(.nav-keep) { display: none; } }

/* ==========================================================================
   Landing page
   ========================================================================== */
.land-hero { text-align: center; max-width: 760px; margin: 40px auto 56px; }
.land-eyebrow {
  display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--emerald); background: var(--emerald-glow); padding: 5px 10px; border-radius: 999px; margin-bottom: 18px;
}
.land-hero h1 { font-size: clamp(32px, 6vw, 54px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.08; }
.land-hero h1 em { font-style: normal; color: #E4E4E7; }
.land-hero p { color: var(--text-secondary); font-size: 18px; margin: 18px auto 0; max-width: 620px; }
.land-ctas { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 28px; }
.land-ctas a { width: auto; text-decoration: none; display: inline-block; padding: 13px 22px; }
.land-note { color: var(--text-muted); font-size: 13px; margin-top: 14px; }

.section { margin: 72px 0; }
.section-head { text-align: center; max-width: 620px; margin: 0 auto 28px; }
.section-head h2 { font-size: clamp(24px, 4vw, 32px); font-weight: 800; letter-spacing: -0.02em; }
.section-head p { color: var(--text-secondary); margin-top: 8px; }

.feature-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.feature {
  background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 14px; padding: 20px;
}
.feature-icon {
  width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
  background: var(--emerald-glow); color: var(--emerald); font-size: 18px; margin-bottom: 12px;
}
.feature h3 { font-size: 16px; font-weight: 700; }
.feature p { color: var(--text-secondary); font-size: 14px; margin-top: 6px; }

.steps-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); counter-reset: step; }
.step-card {
  background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 14px; padding: 20px;
  counter-increment: step;
}
.step-card::before {
  content: counter(step); display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  background: var(--bg-card-hover); color: var(--text-primary); font-weight: 800; font-size: 14px; margin-bottom: 10px;
}
.step-card h3 { font-size: 16px; font-weight: 700; }
.step-card p { color: var(--text-secondary); font-size: 14px; margin-top: 6px; }

.cta-band {
  text-align: center; background: linear-gradient(135deg, rgba(255,255,255,0.18), rgba(255,255,255,0.14));
  border: 1px solid var(--border-highlight); border-radius: 18px; padding: 36px 20px;
}
.cta-band h2 { font-size: clamp(22px, 4vw, 30px); font-weight: 800; }
.cta-band p { color: var(--text-secondary); margin: 8px 0 20px; }
.cta-band a { display: inline-block; width: auto; text-decoration: none; padding: 13px 24px; }

.faq { max-width: 760px; margin: 0 auto; display: grid; gap: 10px; }
.faq details {
  background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 12px; padding: 14px 18px;
}
.faq summary { cursor: pointer; font-weight: 700; font-size: 15px; }
.faq details p { color: var(--text-secondary); font-size: 14px; margin-top: 8px; }

.site-footer {
  border-top: 1px solid var(--border-color); margin-top: 64px; padding: 24px 16px 40px;
  max-width: 1080px; margin-left: auto; margin-right: auto;
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; color: var(--text-muted); font-size: 13px;
}
.site-footer a { color: var(--text-secondary); text-decoration: none; margin-left: 14px; }
.site-footer a:hover { color: var(--text-primary); }

/* ==========================================================================
   Account page
   ========================================================================== */
.auth-wrap { max-width: 420px; margin: 32px auto 0; }
.auth-card {
  background: var(--bg-card); border: 1px solid var(--border-highlight); border-radius: 16px; padding: 24px;
}
.auth-card h1 { font-size: 24px; font-weight: 800; }
.auth-card .modal-sub { margin-bottom: 18px; }
.tabs { display: flex; gap: 4px; padding: 4px; background: var(--bg-input); border-radius: 10px; margin-bottom: 18px; }
.tab-btn {
  flex: 1; border: 0; background: transparent; color: var(--text-secondary);
  font: 600 14px var(--font-sans); padding: 8px; border-radius: 8px; cursor: pointer;
}
.tab-btn.active { background: var(--bg-card-hover); color: var(--text-primary); }
.link-btn {
  background: none; border: 0; color: #E4E4E7; font: 600 13px var(--font-sans); cursor: pointer; padding: 4px 0;
}
.link-btn:hover { text-decoration: underline; }
.form-ok { min-height: 20px; color: var(--emerald); font-size: 13px; margin-bottom: 10px; }

.acct-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin: 16px 0 24px; }
.acct-head h1 { font-size: clamp(24px, 4vw, 32px); font-weight: 800; letter-spacing: -0.02em; }
.acct-head p { color: var(--text-secondary); margin-top: 4px; }
.acct-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); align-items: start; }
.card {
  background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 16px; padding: 22px;
}
.card h2 { font-size: 16px; font-weight: 700; margin-bottom: 14px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 10px 18px; font-size: 14px; }
.kv dt { color: var(--text-muted); }
.kv dd { color: var(--text-primary); font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.pill {
  display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 999px; background: var(--bg-card-hover); color: var(--text-secondary);
}
.pill.ok { background: var(--emerald-glow); color: var(--emerald); }
.pill.warn { background: rgba(245, 158, 11, 0.16); color: var(--amber); }
.pill.bad { background: rgba(244, 63, 94, 0.14); color: var(--rose); }
.notice {
  font-size: 13px; color: var(--text-secondary); background: var(--bg-input);
  border: 1px solid var(--border-color); border-radius: 10px; padding: 10px 12px; margin-top: 14px;
}
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.btn-row > * { flex: 1 1 160px; }
.btn-danger {
  cursor: pointer; background: transparent; color: var(--rose);
  border: 1px solid rgba(244, 63, 94, 0.45); border-radius: 10px;
  font: 600 14px var(--font-sans); padding: 11px 14px;
}
.btn-danger:hover { background: rgba(244, 63, 94, 0.1); }
.plan-options { display: grid; gap: 8px; margin-top: 4px; }
.plan-option {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--bg-input); border: 1px solid var(--border-highlight); border-radius: 10px; padding: 12px 14px; cursor: pointer;
}
.plan-option input { accent-color: var(--emerald); }
.plan-option .po-left { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 14px; }
.plan-option .po-price { color: var(--text-secondary); font-size: 13px; }
.plan-option.current { border-color: var(--emerald); }
.empty-state { text-align: center; padding: 10px 0 4px; color: var(--text-secondary); font-size: 14px; }
.empty-state .btn-primary { display: inline-block; width: auto; text-decoration: none; margin-top: 14px; padding: 11px 20px; }
.signed-in-as { font-size: 14px; color: var(--text-secondary); background: var(--bg-input); border-radius: 10px; padding: 12px; margin-bottom: 14px; }
.signed-in-as b { color: var(--text-primary); }

/* ===== FD theme: monochrome, silver bevel, diagonal cuts (from the FD logo) ===== */
.brand-mark { width: 34px; height: auto; background: none; border-radius: 0; filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.18)); }
.brand-name b { color: #A1A1AA; }
.btn-primary,
.nav a.nav-cta {
  background: linear-gradient(180deg, #FFFFFF 0%, #E4E5E8 55%, #C9CCD2 100%);
  color: #0A0A0A;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}
.nav a.nav-cta { clip-path: polygon(7px 0, 100% 0, 100% calc(100% - 7px), calc(100% - 7px) 100%, 0 100%, 0 7px); border-radius: 0; }
.btn-primary:hover,
.nav a.nav-cta:hover { background: linear-gradient(180deg, #FFFFFF 0%, #E4E5E8 55%, #C9CCD2 100%); filter: brightness(1.07); }
.land-hero h1 em {
  background: linear-gradient(180deg, #FFFFFF 0%, #E4E5E8 55%, #C9CCD2 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.land-eyebrow { color: #E4E4E7; background: rgba(255, 255, 255, 0.06); border: 1px solid #2E2E33; }
.plan.popular { border-color: #E4E4E7; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25), 0 20px 60px -30px rgba(255, 255, 255, 0.35); }
.plan-ribbon { background: linear-gradient(180deg, #FFFFFF 0%, #E4E5E8 55%, #C9CCD2 100%); color: #0A0A0A; }
.success-icon { background: rgba(255, 255, 255, 0.08); color: #FFFFFF; }
.key-box { border-color: #3F3F46; }
.feature-icon { background: rgba(255, 255, 255, 0.06); }
.cta-band { background: linear-gradient(135deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02)); }
