:root {
  --bg: #eef2f7;
  --surface: rgba(255,255,255,.86);
  --surface-solid: #ffffff;
  --surface-soft: #f8fafc;
  --sidebar: #0f172a;
  --sidebar-2: #111c33;
  --text: #0f172a;
  --muted: #64748b;
  --muted-2: #94a3b8;
  --border: rgba(148, 163, 184, .26);
  --border-strong: rgba(30, 41, 59, .10);
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-soft: #dbeafe;
  --accent: #7c3aed;
  --success: #10b981;
  --warning: #f59e0b;
  --shadow-sm: 0 8px 24px rgba(15, 23, 42, .06);
  --shadow: 0 22px 60px rgba(15, 23, 42, .10);
  --shadow-lg: 0 36px 90px rgba(15, 23, 42, .18);
  --radius: 24px;
  --radius-sm: 16px;
  --radius-xs: 12px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% -10%, rgba(37, 99, 235, .18), transparent 34%),
    radial-gradient(circle at 92% 5%, rgba(124, 58, 237, .12), transparent 30%),
    linear-gradient(135deg, #f8fafc 0%, var(--bg) 100%);
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font: inherit; }
button { border: 0; cursor: pointer; }
button:disabled { opacity: .7; cursor: not-allowed; }
a { color: inherit; text-decoration: none; }
::selection { background: rgba(37, 99, 235, .20); }

.app-shell {
  display: grid;
  grid-template-columns: 292px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px;
  color: #e5e7eb;
  background:
    radial-gradient(circle at 20% 0%, rgba(59, 130, 246, .18), transparent 32%),
    linear-gradient(180deg, var(--sidebar), var(--sidebar-2));
  border-right: 1px solid rgba(255,255,255,.08);
  display: flex;
  flex-direction: column;
  gap: 22px;
  box-shadow: 18px 0 50px rgba(15, 23, 42, .12);
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255,255,255,.10);
}

.brand-logo {
  width: 48px;
  height: 48px;
  border-radius: 15px;
  box-shadow: 0 16px 38px rgba(37, 99, 235, .36);
}

.brand h1 {
  font-size: 18px;
  line-height: 1.05;
  margin: 0;
  letter-spacing: -0.045em;
  color: #fff;
}

.brand span {
  display: block;
  font-size: 12px;
  color: #9ca3af;
  margin-top: 5px;
  letter-spacing: 0;
  font-weight: 600;
}

.nav { display: grid; gap: 8px; }
.nav button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 13px;
  border-radius: 15px;
  color: #cbd5e1;
  background: transparent;
  text-align: left;
  transition: .18s ease;
  font-weight: 750;
}
.nav button:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav button.active {
  background: rgba(37, 99, 235, .22);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(96, 165, 250, .22);
}
.nav span {
  width: 30px;
  height: 30px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: #dbeafe;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.10);
  font-size: 14px;
}
.nav button.active span {
  background: rgba(255,255,255,.16);
  border-color: rgba(255,255,255,.18);
}

.usage-box {
  margin-top: auto;
  padding: 18px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 22px;
  box-shadow: 0 18px 48px rgba(0,0,0,.16);
}
.usage-box strong { color: #fff; font-size: 14px; }
.usage-box p {
  color: #cbd5e1;
  margin: 7px 0 14px;
  font-size: 13px;
  line-height: 1.45;
}
.usage-bar {
  height: 9px;
  background: rgba(255,255,255,.12);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 14px;
}
.usage-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #38bdf8, #818cf8, #c084fc);
  border-radius: inherit;
  transition: width .25s ease;
}

.main {
  width: 100%;
  min-width: 0;
  padding: 28px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 14px;
  margin: -10px -8px 24px;
  padding: 10px 8px 12px;
  backdrop-filter: blur(14px);
}
.mobile-menu { display: none; }
.search-wrap { flex: 1; max-width: 620px; position: relative; }
.search-wrap input {
  width: 100%;
  padding: 14px 16px 14px 43px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.82);
  outline: none;
  color: var(--text);
  box-shadow: var(--shadow-sm);
}
.search-wrap::before {
  content: "⌕";
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-52%);
  color: var(--muted);
  font-size: 20px;
}
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 13px;
  border-radius: 999px;
  background: rgba(255,255,255,.82);
  border: 1px solid var(--border);
  color: #334155;
  box-shadow: var(--shadow-sm);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}
.status-pill span {
  width: 8px;
  height: 8px;
  border-radius: 99px;
  background: var(--success);
  box-shadow: 0 0 0 5px rgba(16,185,129,.14);
}
.top-actions { display: flex; align-items: center; gap: 10px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 17px;
  border-radius: 999px;
  font-weight: 850;
  transition: .18s ease;
  white-space: nowrap;
}
.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), #4f46e5);
  box-shadow: 0 14px 28px rgba(37, 99, 235, .26);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 18px 36px rgba(37, 99, 235, .30); }
.btn-soft {
  color: #334155;
  background: rgba(255,255,255,.88);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.btn-soft:hover { background: #fff; transform: translateY(-1px); }
.btn-dark { background: #0f172a; color: #fff; }
.btn-small { padding: 9px 12px; font-size: 13px; }
.full { width: 100%; }
.mt { margin-top: 20px; }
.mt0 { margin-top: 0 !important; }
.center { text-align: center; }
.muted { color: var(--muted); line-height: 1.6; margin-top: 0; }

.page { display: none; animation: fadeIn .22s ease; }
.page.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px);} to {opacity:1; transform: translateY(0);} }

.hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, .92fr);
  gap: 28px;
  padding: clamp(30px, 5vw, 56px);
  border-radius: 34px;
  color: white;
  background:
    radial-gradient(circle at 80% 10%, rgba(129, 140, 248, .32), transparent 28%),
    radial-gradient(circle at 15% 25%, rgba(14, 165, 233, .18), transparent 25%),
    linear-gradient(135deg, #0f172a 0%, #172554 48%, #312e81 100%);
  box-shadow: var(--shadow-lg);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 33px;
  border: 1px solid rgba(255,255,255,.12);
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  width: 520px;
  height: 520px;
  border-radius: 999px;
  right: -210px;
  top: -210px;
  background: rgba(255,255,255,.08);
  filter: blur(.2px);
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  color: #bfdbfe;
  background: rgba(255,255,255,.09);
  border: 1px solid rgba(255,255,255,.16);
  font-size: 13px;
  font-weight: 850;
}
.hero h1,
.hero h2 {
  margin: 20px 0 16px;
  max-width: 820px;
  font-size: clamp(38px, 5vw, 72px);
  line-height: .94;
  letter-spacing: -.075em;
}
.hero p {
  margin: 0;
  max-width: 690px;
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.65;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-secondary { background: rgba(255,255,255,.10); color: #fff; border-color: rgba(255,255,255,.18); box-shadow: none; }
.hero-secondary:hover { background: rgba(255,255,255,.16); }
.hero-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}
.hero-metrics div {
  min-width: 112px;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255,255,255,.09);
  border: 1px solid rgba(255,255,255,.14);
}
.hero-metrics strong { display: block; font-size: 20px; letter-spacing: -.04em; }
.hero-metrics span { display: block; margin-top: 2px; color: #cbd5e1; font-size: 12px; font-weight: 700; }
.hero-card { position: relative; z-index: 1; align-self: center; }
.mini-window {
  overflow: hidden;
  border-radius: 26px;
  background: rgba(255,255,255,.94);
  border: 1px solid rgba(255,255,255,.35);
  box-shadow: 0 28px 80px rgba(0,0,0,.28);
}
.window-top {
  display: flex;
  gap: 7px;
  align-items: center;
  padding: 14px 16px;
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
}
.window-top span { width: 10px; height: 10px; border-radius: 50%; background: #cbd5e1; }
.window-top span:nth-child(1) { background: #fb7185; }
.window-top span:nth-child(2) { background: #fbbf24; }
.window-top span:nth-child(3) { background: #34d399; }
.mini-content { padding: 22px; color: var(--text); }
.mini-content p { margin: 0; color: #334155; font-size: 15px; line-height: 1.62; }
.mini-tag, .badge {
  display: inline-flex;
  align-items: center;
  padding: 7px 11px;
  border-radius: 999px;
  color: var(--primary-dark);
  background: var(--primary-soft);
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 13px;
}

.grid { display: grid; gap: 18px; }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.section-head {
  margin: 34px 0 16px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}
.section-head h3 { margin: 0; font-size: 29px; letter-spacing: -.05em; }
.section-head p { margin: 7px 0 0; color: var(--muted); line-height: 1.55; }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(12px);
}
.card:hover { border-color: rgba(37,99,235,.18); }
.stat-card { position: relative; overflow: hidden; }
.stat-card::after {
  content: "";
  position: absolute;
  right: -28px;
  top: -28px;
  width: 86px;
  height: 86px;
  border-radius: 999px;
  background: rgba(37,99,235,.08);
}
.stat-card small { display:block; color: var(--muted); font-weight: 850; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 10px; }
.stat-card strong { display: block; font-size: 31px; letter-spacing: -.06em; margin-bottom: 5px; }
.stat-card span { color: var(--muted); font-size: 14px; }
.tool-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 236px;
  transition: .18s ease;
}
.tool-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.tool-icon {
  width: 50px;
  height: 50px;
  border-radius: 17px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #eef2ff, #dbeafe);
  color: var(--primary-dark);
  font-size: 22px;
  box-shadow: inset 0 0 0 1px rgba(37,99,235,.08);
}
.tool-card h4, .example-card h4, .price-card h4, .card h4 { margin: 0 0 10px; font-size: 20px; letter-spacing: -.04em; }
.tool-card p, .example-card p, .price-card p { margin: 0 0 14px; color: var(--muted); line-height: 1.58; font-size: 14px; flex: 1; }
.tag-row { display: flex; flex-wrap: wrap; gap: 7px; }
.pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: #f1f5f9;
  border: 1px solid var(--border);
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.pro-alert {
  margin: -4px 0 18px;
  padding: 15px 17px;
  border-radius: 18px;
  background: linear-gradient(135deg, #eff6ff, #f5f3ff);
  border: 1px solid rgba(37,99,235,.16);
  color: #334155;
  line-height: 1.55;
  box-shadow: var(--shadow-sm);
}
.pro-alert strong { color: #1e3a8a; }
.generator-layout {
  display: grid;
  grid-template-columns: minmax(340px, 430px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.form-card, .output-card { position: sticky; top: 84px; }
.form-card { background: rgba(255,255,255,.92); }
.form-group { margin-bottom: 15px; }
label {
  display: block;
  margin-bottom: 7px;
  color: #334155;
  font-size: 13px;
  font-weight: 900;
}
input, select, textarea {
  width: 100%;
  padding: 13px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #fff;
  outline: none;
  color: var(--text);
  transition: .16s ease;
  box-shadow: inset 0 1px 0 rgba(15,23,42,.02);
}
textarea { min-height: 122px; resize: vertical; }
input:focus, select:focus, textarea:focus {
  border-color: rgba(37,99,235,.50);
  box-shadow: 0 0 0 4px rgba(37,99,235,.12);
}
.form-hint { margin: 7px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.output-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.output-header h3 { margin: 0; font-size: 24px; letter-spacing: -.045em; }
.button-row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: end; }
.output-box {
  min-height: 462px;
  padding: 20px;
  white-space: pre-wrap;
  line-height: 1.68;
  color: #1e293b;
  background:
    linear-gradient(180deg, rgba(248,250,252,.95), rgba(255,255,255,.96));
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7);
}
.empty-state {
  min-height: 360px;
  display: grid;
  place-items: center;
  color: var(--muted);
  text-align: center;
}
.empty-state div { max-width: 360px; }
.empty-state strong { display:block; color: var(--text); margin-bottom: 5px; }


.generation-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  margin: -2px 0 12px;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(248, 250, 252, .88);
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 850;
}
.generation-status::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--muted-2);
}
.generation-status[data-state="loading"] {
  color: #1d4ed8;
  background: #eff6ff;
  border-color: rgba(37, 99, 235, .20);
}
.generation-status[data-state="loading"]::before {
  background: var(--primary);
  box-shadow: 0 0 0 5px rgba(37, 99, 235, .12);
}
.generation-status[data-state="success"] {
  color: #047857;
  background: #ecfdf5;
  border-color: rgba(16, 185, 129, .24);
}
.generation-status[data-state="success"]::before { background: var(--success); }
.generation-status[data-state="error"] {
  color: #b91c1c;
  background: #fef2f2;
  border-color: rgba(239, 68, 68, .20);
}
.generation-status[data-state="error"]::before { background: #ef4444; }
.output-box.loading {
  display: grid;
  place-items: center;
  white-space: normal;
}
.loading-card {
  width: min(430px, 100%);
  padding: 26px;
  text-align: center;
  border-radius: 22px;
  background: rgba(255,255,255,.86);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.spinner {
  width: 38px;
  height: 38px;
  margin: 0 auto 16px;
  border-radius: 999px;
  border: 4px solid #dbeafe;
  border-top-color: var(--primary);
  animation: spin .85s linear infinite;
}
.loading-card strong {
  display: block;
  margin-bottom: 7px;
  font-size: 18px;
  letter-spacing: -.025em;
}
.loading-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}
.error-card {
  padding: 18px;
  border-radius: 18px;
  background: #fef2f2;
  border: 1px solid rgba(239, 68, 68, .20);
  color: #7f1d1d;
  white-space: pre-wrap;
}
@keyframes spin { to { transform: rotate(360deg); } }

.example-card, .price-card { transition: .18s ease; }
.example-card:hover, .price-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.price-card { position: relative; overflow: hidden; }
.price-card.featured {
  border-color: rgba(37,99,235,.36);
  box-shadow: 0 24px 70px rgba(37, 99, 235, .16);
}
.price-card.featured::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 5px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}
.price { display: flex; align-items: baseline; gap: 6px; margin: 14px 0; }
.price strong { font-size: 40px; letter-spacing: -.07em; }
.price span { color: var(--muted); }
.features { list-style: none; padding: 0; margin: 17px 0 22px; display: grid; gap: 11px; color: #334155; font-size: 14px; }
.features li::before { content: "✓"; color: var(--success); font-weight: 950; margin-right: 8px; }
.notice {
  margin-top: 18px;
  padding: 15px 17px;
  border-radius: 18px;
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
  line-height: 1.55;
  font-size: 14px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  place-items: center;
  padding: 20px;
  background: rgba(15,23,42,.56);
  backdrop-filter: blur(10px);
}
.modal-backdrop.open { display: grid; }
.modal {
  width: min(540px, 100%);
  padding: 26px;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 36px 110px rgba(0,0,0,.28);
}
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 18px; }
.modal-head h3 { margin: 0; font-size: 27px; letter-spacing: -.05em; }
.close-btn { width: 40px; height: 40px; border-radius: 999px; background: #f1f5f9; color: #475569; font-size: 22px; }
.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 80;
  padding: 13px 17px;
  border-radius: 999px;
  color: #fff;
  background: #0f172a;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(18px);
  pointer-events: none;
  transition: .2s ease;
  font-weight: 850;
  font-size: 14px;
}
.toast.show { opacity: 1; transform: translateY(0); }

@media (max-width: 1180px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    z-index: 50;
    left: 18px;
    top: 18px;
    bottom: 18px;
    height: auto;
    width: 304px;
    border-radius: 26px;
    transform: translateX(-350px);
    transition: transform .22s ease;
    box-shadow: var(--shadow-lg);
  }
  .sidebar.open { transform: translateX(0); }
  .mobile-menu { display: inline-flex; }
  .main { padding: 20px; }
  .hero, .generator-layout { grid-template-columns: 1fr; }
  .form-card, .output-card { position: static; }
  .grid-4, .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .topbar { position: static; flex-direction: column; align-items: stretch; margin: 0 0 22px; padding: 0; }
  .top-actions { justify-content: space-between; }
  .status-pill { justify-content: center; }
  .hero { padding: 26px; border-radius: 26px; }
  .hero h1,
.hero h2 { font-size: clamp(34px, 11vw, 48px); }
  .hero p { font-size: 16px; }
  .hero-actions .btn { flex: 1; }
  .hero-metrics { display: grid; grid-template-columns: 1fr; }
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .section-head { align-items: start; flex-direction: column; }
  .btn { width: 100%; }
  .button-row .btn { width: auto; }
  .modal { padding: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* Supabase auth additions */
.status-pill .status-dot {
  width: 8px;
  height: 8px;
  border-radius: 99px;
  background: var(--primary);
  box-shadow: 0 0 0 5px rgba(37,99,235,.13);
  flex: 0 0 auto;
}
.status-pill .status-dot.ok {
  background: var(--success);
  box-shadow: 0 0 0 5px rgba(16,185,129,.14);
}
.status-pill .status-dot.warn {
  background: var(--warning);
  box-shadow: 0 0 0 5px rgba(245,158,11,.16);
}
.status-pill strong {
  max-width: 210px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.auth-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 4px 0 10px;
}
.signed-in-box {
  padding: 13px 14px;
  border-radius: 16px;
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid rgba(16,185,129,.25);
  margin-bottom: 14px;
}
.signed-in-box strong,
.signed-in-box span {
  display: block;
}
.signed-in-box span {
  margin-top: 3px;
  font-size: 14px;
  overflow-wrap: anywhere;
}
.auth-message {
  margin: 12px 0 0;
  padding: 12px 13px;
  border-radius: 14px;
  background: #eff6ff;
  color: #1e3a8a;
  border: 1px solid rgba(37,99,235,.18);
  font-size: 13px;
  line-height: 1.45;
}
.auth-message[data-type="success"] {
  background: #ecfdf5;
  color: #065f46;
  border-color: rgba(16,185,129,.25);
}
.auth-message[data-type="warning"] {
  background: #fffbeb;
  color: #92400e;
  border-color: #fde68a;
}
.auth-message[data-type="error"] {
  background: #fef2f2;
  color: #991b1b;
  border-color: #fecaca;
}
@media (max-width: 760px) {
  .auth-actions { grid-template-columns: 1fr; }
  .status-pill strong { max-width: none; }
}


.usage-helper {
  margin-top: -6px !important;
  font-size: 12px !important;
  color: rgba(255, 255, 255, 0.68) !important;
  line-height: 1.35 !important;
}

.price-card.current-plan {
  outline: 3px solid rgba(37, 99, 235, 0.32);
  box-shadow: 0 22px 60px rgba(37, 99, 235, 0.16);
}

.price-card.current-plan::after {
  content: "Din plan";
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 900;
}

.plan-admin-card {
  grid-column: 1 / -1;
}

.plan-test-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

code {
  padding: 2px 6px;
  border-radius: 8px;
  background: #f1f5f9;
  color: #0f172a;
}


/* Account page */
.account-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background:
    radial-gradient(circle at 0% 0%, rgba(37, 99, 235, .12), transparent 34%),
    linear-gradient(135deg, rgba(255,255,255,.94), rgba(248,250,252,.88));
}
.account-hero h3 {
  margin: 10px 0 8px;
  font-size: 30px;
  letter-spacing: -.05em;
}
.account-hero p { margin: 0; color: var(--muted); line-height: 1.6; max-width: 780px; }
.account-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.account-card h4 { margin: 0 0 10px; font-size: 22px; letter-spacing: -.035em; }
.account-progress {
  height: 13px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
  margin: 18px 0 10px;
}
.account-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #2563eb, #7c3aed);
  border-radius: inherit;
  transition: width .25s ease;
}
.account-progress-labels {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}
.account-notice { margin-top: 18px; }
.account-plan-buttons { margin-top: 16px; }
.price-card.current-plan {
  outline: 3px solid rgba(16, 185, 129, .22);
  border-color: rgba(16, 185, 129, .45);
}
.price-card.current-plan::after {
  content: "Aktiv plan";
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 7px 10px;
  border-radius: 999px;
  background: #d1fae5;
  color: #047857;
  font-size: 12px;
  font-weight: 950;
}
@media (max-width: 760px) {
  .account-hero { flex-direction: column; align-items: flex-start; }
  .account-actions { width: 100%; justify-content: flex-start; }
}

/* Pricing v10 */
.pricing-hero {
  margin-bottom: 20px;
  background:
    radial-gradient(circle at 12% 0%, rgba(37, 99, 235, .16), transparent 32%),
    radial-gradient(circle at 92% 8%, rgba(124, 58, 237, .12), transparent 28%),
    rgba(255,255,255,.88);
}
.pricing-hero h3 {
  margin: 10px 0 8px;
  font-size: clamp(30px, 4vw, 46px);
  letter-spacing: -.065em;
  line-height: 1;
}
.pricing-hero p {
  max-width: 760px;
  color: var(--muted);
  line-height: 1.65;
  margin: 0;
}
.pricing-grid .price-card {
  min-height: 420px;
  display: flex;
  flex-direction: column;
}
.price-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  text-align: center;
}
.payment-flow {
  margin-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.payment-flow strong {
  display: block;
  font-size: 18px;
  letter-spacing: -.03em;
  margin-bottom: 4px;
}
.payment-flow p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}
.flow-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}
.flow-steps span {
  display: inline-flex;
  align-items: center;
  padding: 9px 11px;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 13px;
  font-weight: 850;
  white-space: nowrap;
}
.checkout-summary {
  margin-bottom: 14px;
  padding: 18px;
  border-radius: 20px;
  background: linear-gradient(135deg, #f8fafc, #eef2ff);
  border: 1px solid var(--border);
}
.checkout-summary h4 {
  margin: 10px 0 0;
  font-size: 24px;
  letter-spacing: -.045em;
}
.checkout-summary p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}
.dev-plan-tools {
  margin-top: 18px;
  padding: 14px;
  border-radius: 18px;
  background: #f8fafc;
  border: 1px dashed rgba(100, 116, 139, .34);
}
.dev-plan-tools.compact {
  margin-top: 16px;
}
.dev-plan-tools strong {
  display: block;
  font-size: 13px;
  margin-bottom: 5px;
  color: #334155;
}
.dev-plan-tools p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
@media (max-width: 860px) {
  .payment-flow { align-items: stretch; flex-direction: column; }
  .flow-steps { justify-content: flex-start; }
}

/* Legal/info pages */
.legal-page .section-head p {
  max-width: 720px;
}
.legal-card {
  line-height: 1.72;
}
.legal-card h4 {
  margin: 24px 0 8px;
  font-size: 18px;
  letter-spacing: -.025em;
  color: #0f172a;
}
.legal-card h4:first-child {
  margin-top: 0;
}
.legal-card p {
  margin: 0 0 12px;
  color: #475569;
}
.legal-card ul {
  margin: 8px 0 16px;
  padding-left: 22px;
  color: #475569;
}
.legal-card li {
  margin: 7px 0;
}
.legal-card a {
  color: #2563eb;
  font-weight: 800;
  text-decoration: none;
}
.legal-card a:hover {
  text-decoration: underline;
}
.legal-updated {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3 !important;
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 10px !important;
}


/* v14 Landing page sections */
.landing-section {
  margin-top: 34px;
}
.section-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 7px 11px;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .03em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.section-head h2 {
  margin: 0;
  font-size: clamp(28px, 3.4vw, 44px);
  line-height: 1.03;
  letter-spacing: -.065em;
  color: #0f172a;
}
.grid-5 {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.feature-card,
.audience-card,
.trust-card {
  min-height: 170px;
  transition: transform .18s ease, box-shadow .18s ease;
}
.feature-card:hover,
.audience-card:hover,
.trust-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.feature-card span,
.trust-card span {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 16px;
  background: linear-gradient(135deg, #eef2ff, #f5f3ff);
  font-size: 22px;
  margin-bottom: 14px;
}
.feature-card h4,
.audience-card strong,
.trust-card h4 {
  display: block;
  margin: 0 0 8px;
  font-size: 17px;
  letter-spacing: -.025em;
  color: #0f172a;
}
.feature-card p,
.audience-card p,
.trust-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: 14px;
}
.process-section {
  display: grid;
  grid-template-columns: minmax(260px, .82fr) minmax(0, 1.18fr);
  gap: 22px;
  align-items: center;
  background: linear-gradient(135deg, rgba(15, 23, 42, .98), rgba(30, 58, 138, .94));
  color: #fff;
  overflow: hidden;
  position: relative;
}
.process-section::after {
  content: "";
  position: absolute;
  right: -130px;
  top: -130px;
  width: 310px;
  height: 310px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
}
.process-copy,
.process-steps {
  position: relative;
  z-index: 1;
}
.process-copy .section-kicker {
  background: rgba(255, 255, 255, .12);
  color: #dbeafe;
  border: 1px solid rgba(255, 255, 255, .14);
}
.process-copy h2 {
  margin: 0 0 12px;
  font-size: clamp(28px, 3.2vw, 42px);
  line-height: 1.03;
  letter-spacing: -.065em;
}
.process-copy p {
  margin: 0;
  color: #dbeafe;
  line-height: 1.7;
}
.process-steps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.process-steps div {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .09);
  border: 1px solid rgba(255, 255, 255, .13);
  backdrop-filter: blur(8px);
}
.process-steps span {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: #fff;
  color: #1d4ed8;
  font-weight: 950;
  margin-bottom: 10px;
}
.process-steps strong {
  display: block;
  margin-bottom: 5px;
  letter-spacing: -.02em;
}
.process-steps p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.5;
  font-size: 13px;
}
.generator-chip-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.generator-chip-cloud span {
  display: inline-flex;
  align-items: center;
  padding: 11px 13px;
  border-radius: 999px;
  background: #fff;
  color: #334155;
  border: 1px solid var(--border);
  box-shadow: 0 8px 20px rgba(15, 23, 42, .04);
  font-size: 13px;
  font-weight: 850;
}
.faq-list {
  display: grid;
  gap: 12px;
}
.faq-list details {
  padding: 0;
  overflow: hidden;
}
.faq-list summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 20px;
  font-weight: 900;
  color: #0f172a;
  letter-spacing: -.02em;
}
.faq-list summary::-webkit-details-marker {
  display: none;
}
.faq-list summary::after {
  content: "+";
  float: right;
  color: #2563eb;
  font-weight: 950;
}
.faq-list details[open] summary::after {
  content: "–";
}
.faq-list p {
  margin: 0;
  padding: 0 20px 20px;
  color: var(--muted);
  line-height: 1.65;
}
@media (max-width: 1180px) {
  .grid-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 920px) {
  .grid-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .process-section { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .grid-5 { grid-template-columns: 1fr; }
  .process-steps { grid-template-columns: 1fr; }
  .generator-chip-cloud span { width: 100%; justify-content: center; }
}

.strong-note { font-weight: 800; color: var(--text); margin-top: 10px; }

/* Skjul interne utviklerknapper i live-versjonen */
.dev-plan-tools {
  display: none !important;
}

/* Skjul interne test-/utviklerknapper for planbytte */
.dev-plan-tools,
.dev-plan-tools.compact {
  display: none !important;
}

/* Company footer note */
.company-footer-note {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(15, 23, 42, 0.12);
  font-size: 0.9rem;
  line-height: 1.5;
  color: rgba(15, 23, 42, 0.72);
}

.company-footer-note p {
  margin: 4px 0;
}
