/* ─── Design tokens ───────────────────────────────────────────────── */
:root {
  color-scheme: dark;

  /* Canvas */
  --bg:           #060914;
  --surface:      #0d1220;
  --surface-2:    #131d2e;
  --surface-3:    #1a2540;
  --line:         #1e2d47;
  --line-soft:    #0f1a2e;

  /* Ink */
  --ink:          #f0f4ff;
  --ink-2:        #8ca0c0;
  --ink-3:        #4e6080;

  /* Brand violet */
  --violet:       #7c3aed;
  --violet-2:     #a78bfa;
  --violet-glow:  rgba(124, 58, 237, 0.28);
  --violet-soft:  rgba(124, 58, 237, 0.12);
  --violet-mid:   rgba(124, 58, 237, 0.22);

  /* Gold — urgency, premium, warmth */
  --gold:         #f59e0b;
  --gold-soft:    rgba(245, 158, 11, 0.14);
  --gold-text:    #fbbf24;

  /* Status */
  --green:        #10b981;
  --green-soft:   rgba(16, 185, 129, 0.12);
  --red:          #ef4444;
  --red-soft:     rgba(239, 68, 68, 0.12);
  --blue:         #3b82f6;

  /* Shape */
  --r-sm:   8px;
  --r-md:   14px;
  --r-lg:   20px;
  --r-xl:   28px;

  /* Shadow */
  --shadow-sm:  0 2px 8px rgba(0,0,0,.45);
  --shadow-md:  0 8px 32px rgba(0,0,0,.55);
  --shadow-lg:  0 24px 72px rgba(0,0,0,.72);
  --glow-v:     0 0 40px var(--violet-glow);

  /* Type */
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
}

/* Light override */
[data-theme="light"] {
  color-scheme: light;
  --bg:          #f5f3ff;
  --surface:     #ffffff;
  --surface-2:   #f0eaff;
  --surface-3:   #e8dfff;
  --line:        #d8cdf5;
  --line-soft:   #ede8ff;
  --ink:         #160d24;
  --ink-2:       #5a4875;
  --ink-3:       #9585b0;
  --violet-soft: rgba(124, 58, 237, 0.08);
  --violet-mid:  rgba(124, 58, 237, 0.16);
  --shadow-sm:   0 2px 8px rgba(22,13,36,.10);
  --shadow-md:   0 8px 32px rgba(22,13,36,.14);
  --shadow-lg:   0 24px 72px rgba(22,13,36,.18);
  --glow-v:      0 0 40px rgba(124,58,237,.10);
  --gold-soft:   rgba(245, 158, 11, 0.10);
  --green-soft:  rgba(16,185,129,.09);
  --red-soft:    rgba(239,68,68,.09);
}

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

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Ambient background glow */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 20% -10%, rgba(124,58,237,.18) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 90% 100%, rgba(124,58,237,.10) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

#app { position: relative; z-index: 1; }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: 0.45; }
button[data-busy="true"] {
  pointer-events: none;
  position: relative;
}
h1, h2, h3, p { margin-top: 0; overflow-wrap: anywhere; }

/* ─── Typography ─────────────────────────────────────────────────── */
h1 {
  font-size: clamp(40px, 5.5vw, 72px);
  font-weight: 900;
  line-height: 0.96;
  letter-spacing: -0.02em;
  margin-bottom: 18px;
}
h2 {
  font-size: clamp(24px, 3vw, 38px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
}
h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 6px;
}
p { color: var(--ink-2); line-height: 1.6; margin-bottom: 0; }

/* ─── Brand ──────────────────────────────────────────────────────── */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-mark {
  display: block;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}

.brand.compact .brand-mark {
  width: 40px;
  height: 40px;
}

/* "Noreto" wordmark text — violet gradient, sharp on both light and dark */
.brand-name {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1;
  background: linear-gradient(135deg, var(--violet-2), var(--violet));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  white-space: nowrap;
  user-select: none;
}

.mobile-top .brand-mark { width: 34px; height: 34px; }

/* ─── Page containers ────────────────────────────────────────────── */
.page {
  min-height: 100vh;
  padding: 24px;
}

.auth-page,
.intro-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 500px);
  gap: 28px;
  align-items: stretch;
  max-width: 1100px;
  margin: 0 auto;
}

/* ─── Hero panel ─────────────────────────────────────────────────── */
.hero-panel {
  min-height: calc(100vh - 48px);
  border-radius: var(--r-xl);
  overflow: hidden;
  position: relative;
  background: #04070f;
  color: white;
  box-shadow: var(--shadow-lg);
}

.hero-panel img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.45;
}

.hero-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    170deg,
    rgba(124,58,237,.28) 0%,
    transparent 40%,
    rgba(4,7,15,.72) 100%
  );
}

.hero-copy {
  position: absolute;
  inset: auto 0 0 0;
  padding: 40px;
  background: linear-gradient(transparent, rgba(4, 7, 15, 0.98));
  z-index: 1;
}

.eyebrow {
  color: var(--gold-text);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.eyebrow::before {
  content: "";
  display: inline-block;
  width: 24px;
  height: 2px;
  background: var(--gold-text);
  border-radius: 2px;
}

.hero-copy p {
  color: rgba(255,255,255,.72);
  font-size: 17px;
  max-width: 580px;
  line-height: 1.55;
}

/* Tagline callout */
.tagline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--gold-text);
  margin-top: 18px;
  padding: 8px 14px;
  background: rgba(245,158,11,.12);
  border: 1px solid rgba(245,158,11,.28);
  border-radius: 999px;
  letter-spacing: 0.01em;
}

/* ─── Auth card ──────────────────────────────────────────────────── */
.auth-card {
  align-self: center;
  display: grid;
  gap: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 32px;
  box-shadow: var(--shadow-md);
}

.auth-card h2 { color: var(--ink); }

/* ─── Panel ───────────────────────────────────────────────────────── */
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 22px;
  min-width: 0;
}

/* ─── Layout utilities ───────────────────────────────────────────── */
.brand-row,
.top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.stack  { display: grid; gap: 18px; }
.stack-sm { display: grid; gap: 10px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }

.section-intro { max-width: 720px; }
.section-intro .btn { margin-top: 6px; }

/* ─── App layout ─────────────────────────────────────────────────── */
.app-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 20px;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%);
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow: auto;
}

.main {
  padding: 28px;
  max-width: 1020px;
  width: 100%;
}

.mobile-top { display: none; }

/* ─── Navigation ─────────────────────────────────────────────────── */
.nav { display: grid; gap: 4px; }

.nav button {
  border: 0;
  border-radius: var(--r-md);
  background: transparent;
  color: var(--ink-2);
  min-height: 44px;
  padding: 0 14px;
  text-align: left;
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background 0.15s, color 0.15s;
}

.nav button:hover:not(.active) {
  background: var(--surface-2);
  color: var(--ink);
}

.nav button.active {
  background: var(--violet-soft);
  color: var(--violet-2);
  box-shadow: inset 0 0 0 1px var(--violet-mid);
}

/* ─── Buttons ────────────────────────────────────────────────────── */
.btn {
  border: 0;
  border-radius: var(--r-md);
  min-height: 46px;
  padding: 0 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 800;
  font-size: 14px;
  color: var(--ink);
  background: var(--surface-2);
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.14s, box-shadow 0.14s, transform 0.10s;
  letter-spacing: 0.005em;
}

.btn:active:not(:disabled) { transform: scale(0.98); }

.btn.primary {
  background: var(--violet);
  color: #fff;
  box-shadow: 0 4px 18px var(--violet-glow);
}
.btn.primary:hover:not(:disabled) {
  background: #6d28d9;
  box-shadow: 0 6px 24px var(--violet-glow);
}

.btn.outline {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
}
.btn.outline:hover:not(:disabled) {
  border-color: var(--violet-2);
  color: var(--violet-2);
}

.btn.ghost {
  background: transparent;
  color: var(--violet-2);
}
.btn.ghost:hover:not(:disabled) { background: var(--violet-soft); }

.btn.gold-btn {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  box-shadow: 0 4px 18px rgba(245,158,11,.32);
}

.btn.danger-btn {
  background: var(--red);
  color: #fff;
  box-shadow: 0 4px 14px rgba(239,68,68,.32);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 4px;
}

.icon-btn {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--ink-3);
  font-size: 18px;
  display: grid;
  place-items: center;
  transition: background 0.14s, color 0.14s;
}
.icon-btn:hover:not(:disabled) { background: var(--surface-2); color: var(--ink); }
.icon-btn.danger { color: var(--red); }
.icon-btn.danger:hover:not(:disabled) { background: var(--red-soft); }

/* ─── Form fields ────────────────────────────────────────────────── */
.field { display: grid; gap: 7px; }

.field label {
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface-2);
  color: var(--ink);
  min-height: 50px;
  padding: 12px 15px;
  outline: none;
  transition: border-color 0.14s, box-shadow 0.14s;
}

.field textarea {
  resize: vertical;
  min-height: 90px;
  line-height: 1.55;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--violet-2);
  box-shadow: 0 0 0 3px var(--violet-soft);
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--ink-3);
}

/* ─── Check row ──────────────────────────────────────────────────── */
.check-row {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 14px 16px;
  background: var(--surface-2);
  cursor: pointer;
}
.check-row:hover { border-color: var(--violet-2); }
.check-row input { margin-top: 3px; accent-color: var(--violet); }

/* ─── Segmented control ──────────────────────────────────────────── */
.segmented {
  display: flex;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--surface-2);
}
.segmented button {
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--ink-2);
  min-height: 44px;
  font-weight: 700;
  font-size: 14px;
  transition: background 0.14s, color 0.14s;
}
.segmented button.active {
  background: var(--violet-soft);
  color: var(--violet-2);
}

/* ─── Pills / chips ──────────────────────────────────────────────── */
.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--violet-soft);
  color: var(--violet-2);
  border: 1px solid var(--violet-mid);
  white-space: nowrap;
}

.pill-gold {
  background: var(--gold-soft);
  color: var(--gold-text);
  border: 1px solid rgba(245,158,11,.28);
}

.pill-green {
  background: var(--green-soft);
  color: var(--green);
  border: 1px solid rgba(16,185,129,.22);
}

.pill-red {
  background: var(--red-soft);
  color: var(--red);
  border: 1px solid rgba(239,68,68,.22);
}

/* ─── Dashboard hero ─────────────────────────────────────────────── */
.dashboard-hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-xl);
  padding: 40px;
  min-height: 280px;
  display: grid;
  align-content: end;
  background: linear-gradient(145deg, #1a0a3e 0%, #0d1535 50%, #060914 100%);
  border: 1px solid var(--line);
  box-shadow: var(--glow-v);
}

.dashboard-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 85% 20%, rgba(124,58,237,.45) 0%, transparent 60%),
    radial-gradient(ellipse 40% 60% at 10% 80%, rgba(245,158,11,.08) 0%, transparent 60%);
  pointer-events: none;
}

.dashboard-hero .eyebrow { margin-bottom: 14px; }

.dashboard-hero h1 {
  color: #fff;
  font-size: clamp(28px, 3.5vw, 44px);
  line-height: 1.02;
  margin-bottom: 10px;
  position: relative;
}

.dashboard-hero p {
  color: rgba(255,255,255,.72);
  font-size: 16px;
  max-width: 560px;
  position: relative;
}

/* ─── Stat grid ──────────────────────────────────────────────────── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 20px;
  display: grid;
  gap: 4px;
  transition: border-color 0.14s;
}
.stat:hover { border-color: var(--violet-mid); }

.stat strong {
  display: block;
  font-size: 36px;
  font-weight: 900;
  color: var(--ink);
  line-height: 1;
  margin-bottom: 4px;
}

.stat span {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ─── List cards ─────────────────────────────────────────────────── */
.list-grid { display: grid; gap: 10px; }

.list-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  transition: border-color 0.14s, box-shadow 0.14s;
}
.list-card:hover { border-color: var(--violet-mid); box-shadow: var(--shadow-sm); }

.list-card h3 { margin-bottom: 3px; font-size: 15px; }
.list-card p  { margin-bottom: 2px; font-size: 13px; }
.list-card strong { color: var(--violet-2); font-size: 13px; }

/* Avatar */
.avatar {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--violet), #4f46e5);
  color: #fff;
  font-weight: 900;
  font-size: 15px;
  letter-spacing: -0.01em;
  flex-shrink: 0;
  box-shadow: 0 4px 12px var(--violet-glow);
}

.list-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: var(--r-md);
  background: var(--violet-soft);
  color: var(--violet-2);
  font-size: 20px;
  flex-shrink: 0;
}

/* ─── Risk / Promise cards ───────────────────────────────────────── */
.risk-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 20px;
  display: grid;
  gap: 14px;
  transition: border-color 0.14s;
}
.risk-card:hover { border-color: var(--violet-mid); }

.risk-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}
.risk-head h3 { font-size: 16px; margin-bottom: 4px; }
.risk-head p  { font-size: 13px; color: var(--ink-2); }

/* ─── Pillar grid ────────────────────────────────────────────────── */
.pillar-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.pillar-link {
  min-height: 90px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  color: var(--ink);
  display: grid;
  gap: 5px;
  align-content: center;
  text-align: left;
  transition: background 0.14s, border-color 0.14s;
}
.pillar-link:hover, .pillar-link:focus-visible {
  border-color: var(--violet);
  background: var(--violet-soft);
  outline: none;
}
.pillar-link strong { font-size: 14px; font-weight: 800; }
.pillar-link span   { color: var(--ink-3); font-size: 12px; }

/* ─── Protection editor (modal) ──────────────────────────────────── */
.protection-editor { display: grid; gap: 22px; }

.editor-heading {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.editor-heading h2 { font-size: 26px; margin-bottom: 6px; }
.editor-heading p  { font-size: 14px; }

.editor-mark {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: var(--r-md);
  background: linear-gradient(135deg, var(--violet), #4f46e5);
  color: #fff;
  font-size: 24px;
  box-shadow: var(--glow-v);
  flex-shrink: 0;
}
.danger-mark {
  background: linear-gradient(135deg, var(--red), #b91c1c);
  box-shadow: 0 4px 18px rgba(239,68,68,.28);
}

.editor-section {
  display: grid;
  gap: 12px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.editor-section p { margin: 4px 0 0; font-size: 13px; }
.editor-grid { grid-template-columns: 1.35fr 1fr; }

/* Category picker */
.area-picker {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.area-option { position: relative; }
.area-option input { position: absolute; opacity: 0; }

.area-option span {
  min-height: 72px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s;
  background: var(--surface-2);
}
.area-option span:hover { border-color: var(--violet-2); }
.area-option input:checked + span {
  border-color: var(--violet);
  background: var(--violet-soft);
  box-shadow: inset 0 0 0 1px var(--violet-mid);
}
.area-option small { color: var(--ink-3); font-size: 12px; line-height: 1.4; }
.area-option strong { font-size: 14px; }

/* Rhythm presets */
.rhythm-presets { display: flex; flex-wrap: wrap; gap: 8px; }

.rhythm-choice {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 700;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.rhythm-choice:hover { border-color: var(--violet-2); color: var(--violet-2); }
.rhythm-choice.active {
  background: var(--violet-soft);
  border-color: var(--violet);
  color: var(--violet-2);
}

/* Editor summary bar */
.editor-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--violet-mid);
  border-radius: var(--r-md);
  background: var(--violet-soft);
}
.editor-summary strong { color: var(--violet-2); font-size: 14px; }
.editor-summary span  { color: var(--ink-2); font-size: 13px; }

.editor-actions { justify-content: flex-end; }
.rhythm-editor  { gap: 14px; }

/* ─── Modal ──────────────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(6, 9, 20, 0.80);
  backdrop-filter: blur(4px);
  display: grid;
  place-items: center;
  padding: 20px;
  z-index: 20;
}

.modal {
  width: min(580px, 100%);
  max-height: min(88vh, 800px);
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  padding: 28px;
}

/* ─── Toast ──────────────────────────────────────────────────────── */
.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 30;
  max-width: 400px;
  background: var(--surface-3);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 14px 18px;
  box-shadow: var(--shadow-md);
  font-size: 14px;
  font-weight: 600;
  animation: toast-in 0.22s ease;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── Empty / help states ────────────────────────────────────────── */
.empty {
  border: 1px dashed var(--line);
  border-radius: var(--r-lg);
  padding: 28px 24px;
  background: var(--surface);
  text-align: center;
}
.empty h3 { color: var(--ink); font-size: 16px; margin-bottom: 6px; }
.empty p  { font-size: 14px; max-width: 380px; margin: 0 auto; }

.help {
  color: var(--ink-3);
  font-size: 13px;
  line-height: 1.5;
}

/* ─── Status / feedback ──────────────────────────────────────────── */
.error   { color: var(--red);   font-size: 13px; font-weight: 700; }
.success { color: var(--green); font-size: 13px; font-weight: 700; }
.muted   { color: var(--ink-3); }

/* ─── Intro dots ─────────────────────────────────────────────────── */
.intro-dots { display: flex; gap: 8px; align-items: center; }
.intro-dots span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--line);
  transition: width 0.2s, background 0.2s;
}
.intro-dots span.active {
  width: 26px;
  background: var(--violet-2);
}

/* ─── Upgrade callout ────────────────────────────────────────────── */
.upgrade-strip {
  background: linear-gradient(135deg, rgba(245,158,11,.10) 0%, rgba(124,58,237,.10) 100%);
  border: 1px solid rgba(245,158,11,.28);
  border-radius: var(--r-lg);
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.upgrade-strip h3 { margin-bottom: 4px; font-size: 16px; color: var(--gold-text); }
.upgrade-strip p  { font-size: 13px; margin: 0; }

/* ─── Person urgency indicator ───────────────────────────────────── */
.contact-gap-urgent { color: var(--red); font-weight: 700; }
.contact-gap-soon   { color: var(--gold-text); font-weight: 700; }
.contact-gap-good   { color: var(--green); }

/* ─── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .page { padding: 16px; }

  .auth-page,
  .intro-page {
    grid-template-columns: 1fr;
    min-width: 0;
  }

  .hero-panel { min-height: 380px; }
  .hero-copy  { padding: 24px; }
  .hero-copy h1 { font-size: 34px; line-height: 1.05; }

  .auth-card { padding: 24px; }
  .auth-card h2 { font-size: 26px; }

  .brand-row { flex-wrap: wrap; }
  .brand-row select { max-width: 130px; }

  .app-layout {
    grid-template-columns: 1fr;
    padding-bottom: 78px;
  }

  .sidebar {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    height: 72px;
    z-index: 10;
    border-right: 0;
    border-top: 1px solid var(--line);
    padding: 8px 10px;
    flex-direction: row;
    gap: 0;
    background: var(--surface);
    backdrop-filter: blur(12px);
  }

  .sidebar .brand,
  .sidebar .muted,
  .sidebar .button-row {
    display: none;
  }

  .nav {
    grid-template-columns: repeat(6, 1fr);
    gap: 2px;
    width: 100%;
  }

  .nav button {
    text-align: center;
    padding: 6px 4px;
    font-size: 11px;
    font-weight: 800;
    flex-direction: column;
    gap: 3px;
    min-height: 56px;
    justify-content: center;
    border-radius: var(--r-sm);
  }

  .main { padding: 16px; }

  .mobile-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
  }

  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .pillar-grid { grid-template-columns: repeat(2, 1fr); }
  .editor-grid,
  .area-picker,
  .grid-2 { grid-template-columns: 1fr; }

  .dashboard-hero { padding: 28px; min-height: 220px; }
  .dashboard-hero h1 { font-size: 26px; }
}

@media (max-width: 480px) {
  .brand-row { flex-direction: column; align-items: flex-start; }
  .brand-row select { width: 100%; max-width: none; }
  .hero-copy h1 { font-size: 28px; }
  .auth-card h2 { font-size: 22px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .modal { padding: 20px; }
}

/* ─── Nudge cards ────────────────────────────────────────────────── */
.nudge-card {
  display: grid;
  grid-template-columns: 36px minmax(0,1fr);
  gap: 12px;
  align-items: start;
  padding: 14px 16px;
  border: 1px solid;
  border-radius: var(--r-lg);
  background: var(--surface);
}

.nudge-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: var(--r-md);
  background: currentColor;
  font-size: 17px;
  flex-shrink: 0;
  opacity: 0.92;
}

.nudge-section { display: grid; gap: 8px; }

/* ─── Upgrade modal ──────────────────────────────────────────────── */
.upgrade-modal { gap: 20px; }

.upgrade-header {
  display: grid;
  grid-template-columns: auto minmax(0,1fr);
  gap: 14px;
  align-items: start;
}

.billing-toggle { margin: 0; }
.billing-toggle .pill-green {
  font-size: 11px;
  padding: 3px 7px;
  background: var(--green-soft);
  color: var(--green);
  border-radius: 999px;
  margin-left: 4px;
}

.upgrade-plan-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 14px;
}

.upgrade-plan {
  border: 1px solid;
  border-radius: var(--r-lg);
  padding: 18px;
  display: grid;
  gap: 8px;
}

.upgrade-plan.violet {
  border-color: var(--violet-mid);
  background: var(--violet-soft);
}
.upgrade-plan.gold {
  border-color: rgba(245,158,11,.28);
  background: var(--gold-soft);
}

.plan-name {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-2);
}

.plan-price {
  font-size: 26px;
  font-weight: 900;
  color: var(--ink);
  line-height: 1;
}

.plan-price span {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
}

.plan-per {
  font-size: 12px;
  font-weight: 700;
  color: var(--green);
  margin-top: -4px;
}

.plan-features {
  list-style: none;
  padding: 0;
  margin: 6px 0;
  display: grid;
  gap: 5px;
}

.plan-features li {
  font-size: 13px;
  color: var(--ink-2);
}

.btn.gold-btn {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  box-shadow: 0 4px 18px rgba(245,158,11,.32);
}

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

/* ─── R²P² framework display ─────────────────────────────────────── */
.r2p2-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 4px;
}

.r2p2-col {
  border-radius: var(--r-md);
  padding: 12px 14px;
  display: grid;
  gap: 8px;
}

.r2-col {
  background: var(--violet-soft);
  border: 1px solid var(--violet-mid);
}

.p2-col {
  background: var(--gold-soft);
  border: 1px solid rgba(245,158,11,.22);
}

.r2p2-label {
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.02em;
}

.r2-col .r2p2-label { color: var(--violet-2); }
.p2-col .r2p2-label { color: var(--gold-text); }

.r2p2-items {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.r2p2-items span {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

/* R²P² in section headers */
.r2p2-badge {
  display: inline-flex;
  align-items: baseline;
  gap: 1px;
  font-weight: 900;
  font-size: inherit;
  color: var(--violet-2);
}

.r2p2-badge sup {
  font-size: 0.6em;
  font-weight: 900;
  color: var(--violet-2);
}

/* ─── The Noreto Method — profile only ─────────────────────────── */
.noreto-method {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  overflow: hidden;
}

.noreto-method summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 18px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.noreto-method summary::-webkit-details-marker { display: none; }
.noreto-method summary:hover { background: var(--surface-2); }

.method-label {
  font-weight: 700;
  font-size: 14px;
  color: var(--ink);
}

.method-sub {
  font-size: 12px;
  color: var(--ink-3);
  flex: 1;
}

/* The maker's mark — R²P² — appears only here */
.method-mark {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 13px;
  font-weight: 900;
  color: var(--violet-2);
  padding: 3px 8px;
  border: 1px solid var(--violet-mid);
  border-radius: var(--r-sm);
  letter-spacing: 0.01em;
  opacity: 0.80;
}
.method-mark sup { font-size: 8px; }

.method-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border-top: 1px solid var(--line);
}

.method-pillar {
  padding: 16px;
  background: var(--surface);
}

.method-pillar-name {
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 6px;
}

.violet-pillar .method-pillar-name { color: var(--violet-2); }
.gold-pillar   .method-pillar-name { color: var(--gold-text); }

.method-pillar p {
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.5;
  margin: 0;
}

.method-closing {
  padding: 14px 18px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink-3);
  font-style: italic;
  line-height: 1.6;
  margin: 0;
}

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

/* ─── Auth footer ─────────────────────────────────────────── */
.auth-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 16px 0 4px;
  flex-wrap: wrap;
}
.auth-footer-sep { color: var(--ink-3); font-size: 12px; }
.btn-link {
  background: none;
  border: none;
  color: var(--ink-2);
  font-size: 12px;
  cursor: pointer;
  padding: 2px 4px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.btn-link:hover { color: var(--violet); }

/* ─── Profile links ───────────────────────────────────────── */
.profile-links {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 8px 0;
}

/* ─── Contact form ────────────────────────────────────────── */
.field-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  color: var(--ink-2);
  font-weight: 500;
}
.field-label select,
.field-label input[type="text"],
.field-label input[type="email"],
.field-label input[type="file"],
.field-label textarea {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink-1);
  font-size: 14px;
  padding: 10px 12px;
  width: 100%;
  box-sizing: border-box;
}
.field-label textarea { resize: vertical; min-height: 120px; }
.field-label input[type="file"] { padding: 8px; }
.required { color: var(--red); }
.optional { color: var(--ink-3); font-weight: 400; font-size: 12px; }

/* ─── Legal pages ─────────────────────────────────────────── */
.legal-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.legal-tab {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 20px;
  color: var(--ink-2);
  cursor: pointer;
  font-size: 13px;
  padding: 6px 14px;
  transition: background 0.15s;
}
.legal-tab.active, .legal-tab:hover {
  background: var(--violet);
  border-color: var(--violet);
  color: #fff;
}
.legal-content { line-height: 1.65; }
.legal-content h3 { font-size: 20px; margin: 0 0 4px; }
.legal-content h4 { font-size: 15px; color: var(--ink-1); margin: 18px 0 4px; }
.legal-content p, .legal-content li { font-size: 14px; color: var(--ink-2); margin: 0 0 8px; }
.legal-content ul { padding-left: 20px; margin: 0 0 12px; }

/* ─── FAQ ─────────────────────────────────────────────────── */
.faq-heading { font-size: 16px; color: var(--violet); margin: 0 0 10px; }
.faq-list { display: flex; flex-direction: column; gap: 6px; }
.faq-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.faq-question {
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-1);
  padding: 12px 14px;
  list-style: none;
  user-select: none;
}
.faq-question::-webkit-details-marker { display: none; }
.faq-question::before { content: "＋ "; color: var(--violet); }
details[open] .faq-question::before { content: "－ "; }
.faq-answer {
  padding: 0 14px 12px;
  border-top: 1px solid var(--line);
}
.faq-answer p { font-size: 13px; color: var(--ink-2); margin: 10px 0 0; line-height: 1.65; }

/* ── Commitments / Me tab bar ────────────────────────────────────────────── */
.tab-bar {
  display: flex;
  gap: 4px;
  background: var(--surface-2, #f5f3ff);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 20px;
}
.tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2, #8ca0c0);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.tab-btn.active {
  background: #fff;
  color: var(--violet, #7c3aed);
  box-shadow: 0 1px 4px rgba(0,0,0,0.10);
}

/* ── Today's win overlay ─────────────────────────────────────────────────── */
.win-overlay {
  position: fixed;
  inset: 0;
  background: rgba(6,9,20,0.92);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 40px;
  text-align: center;
  transition: opacity 0.4s ease;
}
.win-icon {
  width: 64px; height: 64px;
  background: rgba(245,158,11,0.16);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; color: #f59e0b;
  margin-bottom: 28px;
}
.win-title {
  color: #fff;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 10px;
}
.win-sub {
  color: rgba(255,255,255,0.62);
  font-size: 17px;
  margin: 0 0 8px;
}
.win-tag {
  color: rgba(245,158,11,0.82);
  font-size: 15px;
  font-style: italic;
  margin: 0;
}


/* Coming soon holding page */
.coming-soon-body {
  min-height: 100vh;
  background: #070a12;
  color: #f6f8ff;
}

.coming-soon-page {
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(7, 10, 18, 0.96) 0%, rgba(7, 10, 18, 0.78) 42%, rgba(7, 10, 18, 0.44) 100%),
    #070a12;
}

.coming-soon-page::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 15% 12%, rgba(245, 158, 11, 0.2), transparent 26%),
    radial-gradient(circle at 88% 18%, rgba(20, 184, 166, 0.2), transparent 24%),
    linear-gradient(180deg, rgba(255,255,255,0.03), transparent 36%);
  pointer-events: none;
}

.coming-hero {
  width: min(1180px, calc(100vw - 32px));
  min-height: calc(100vh - 96px);
  margin: 0 auto;
  padding: 34px 0 52px;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(340px, 1.08fr);
  align-items: center;
  gap: clamp(28px, 6vw, 78px);
  position: relative;
  z-index: 1;
}

.coming-copy {
  max-width: 640px;
}

.coming-brand {
  margin-bottom: clamp(42px, 8vh, 84px);
}

.coming-kicker {
  color: #facc15;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.coming-copy h1 {
  font-size: clamp(54px, 8vw, 112px);
  line-height: 0.9;
  max-width: 760px;
  margin-bottom: 24px;
  letter-spacing: 0;
}

.coming-lede {
  max-width: 560px;
  color: rgba(246, 248, 255, 0.78);
  font-size: clamp(18px, 2.1vw, 24px);
  line-height: 1.45;
}

.coming-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 34px;
}

.coming-actions span {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.07);
  border-radius: 999px;
  color: rgba(246, 248, 255, 0.88);
  font-weight: 800;
}

.coming-media {
  min-height: min(680px, 74vh);
  position: relative;
}

.coming-photo {
  position: absolute;
  object-fit: cover;
  border-radius: 24px;
  box-shadow: 0 28px 90px rgba(0,0,0,0.48);
  border: 1px solid rgba(255,255,255,0.12);
}

.coming-photo.primary {
  inset: 4% 7% auto auto;
  width: min(440px, 76%);
  aspect-ratio: 4 / 5;
}

.coming-photo.secondary {
  left: 0;
  bottom: 8%;
  width: min(310px, 52%);
  aspect-ratio: 1 / 1.18;
}

.coming-photo.tertiary {
  right: 0;
  bottom: 0;
  width: min(250px, 42%);
  aspect-ratio: 1 / 1;
}

.coming-note {
  width: min(1180px, calc(100vw - 32px));
  margin: -28px auto 0;
  padding: 24px 0 38px;
  border-top: 1px solid rgba(255,255,255,0.12);
  position: relative;
  z-index: 1;
}

.coming-note p {
  max-width: 820px;
  color: rgba(246, 248, 255, 0.7);
  font-size: 16px;
}

@media (max-width: 860px) {
  .coming-soon-page {
    background:
      linear-gradient(180deg, rgba(7, 10, 18, 0.74) 0%, rgba(7, 10, 18, 0.96) 62%),
      #070a12;
  }

  .coming-hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 22px 0 32px;
  }

  .coming-media {
    order: -1;
    min-height: 330px;
  }

  .coming-copy h1 {
    font-size: clamp(48px, 18vw, 74px);
  }

  .coming-brand {
    margin-bottom: 34px;
  }

  .coming-photo.primary {
    width: 64%;
    right: 4%;
  }

  .coming-photo.secondary {
    width: 45%;
    bottom: 12%;
  }

  .coming-photo.tertiary {
    width: 34%;
  }
}
