/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ══ DESIGN SYSTEM TOKENS — Signal v2 (June 2026 handoff) ══
   Pure black / charcoal / white palette. No orange.
   Primary action color is black (#000). --mn-* names preserved for
   backward compat; values updated to the new system. */
:root {
  /* Core palette */
  --color-black: #000000;
  --color-charcoal: #1F2524;
  --color-charcoal-mid: #323837;
  --color-white: #FFFFFF;
  --color-off-white: #FAFAFA;
  --color-surface: #F7F7F5;

  /* Text */
  --text-primary: #000000;
  --text-secondary: #555550;
  --text-muted: #888880;
  --text-faint: #AAAAAA;

  /* Score band colors (only for score-related UI) */
  --score-critical: #DC2626;
  --score-weak:     #C77A1A;
  --score-mid:      #CA8A04;
  --score-strong:   #1F8A5B;
  --score-excellent:#16A34A;

  /* --mn-* tokens: values updated — no more orange */
  --mn-orange:        #000000;    /* was #FF6B35 — primary action is now black */
  --mn-orange-hover:  #1F2524;    /* was #E65A2B */
  --mn-orange-soft:   #F7F7F5;    /* was #FFF1EA — light surface for active states */
  --mn-orange-tint:   #FAFAFA;    /* was #FFF8F2 */
  --mn-charcoal:      #1F2524;
  --mn-charcoal-2:    #323837;
  --mn-ink:           #000000;    /* was #2B2F2E */
  --mn-text-mute:     #555550;    /* was #6C6F6C */
  --mn-text-faint:    #888880;    /* was #9A9A93 */
  --mn-bg:            #FAFAFA;    /* was #F4F6F8 */
  --mn-bg-card:       #FFFFFF;
  --mn-bg-soft:       #F7F7F5;    /* was #F8FAFB */
  --mn-border:        #E5E5E5;    /* was #E5E7EB */
  --mn-border-strong: rgba(0,0,0,.16); /* was #D1D5DB */
  --mn-track:         #EBEBEB;
  --mn-track-fill:    #D0D0CE;
  --mn-surface-warm:  #F7F7F5;    /* was #FFF8F2 */
  --mn-surface-green: rgba(31,138,91,.06);
  --mn-border-green:  rgba(31,138,91,.22);
  --mn-border-orange: rgba(0,0,0,.10);

  /* Status */
  --mn-green:  #1F8A5B;  --mn-green-soft:  rgba(31,138,91,.10);
  --mn-amber:  #C77A1A;  --mn-amber-soft:  rgba(199,122,26,.12);
  --mn-blue:   #2A6FDB;  --mn-blue-soft:   rgba(42,111,219,.10);
  --mn-danger: #C45656;  --mn-danger-soft: rgba(196,86,86,.10); --mn-danger-border: rgba(196,86,86,.22);

  --mn-sans: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --mn-mono: 'DM Sans', ui-monospace, SFMono-Regular, monospace;
  --mn-logo: 'Syne', sans-serif;

  /* Legacy aliases */
  --brand:       var(--mn-orange);       /* → #000 */
  --brand-dark:  var(--mn-orange-hover);
  --brand-light: var(--mn-orange-soft);
  --green: #1F8A5B;
  --red:   #DC2626;
  --yellow:#C77A1A;
  --gray-50:  #F7F7F5;
  --gray-100: #F0F0EE;
  --gray-200: #E5E5E5;
  --gray-300: #D0D0CE;
  --gray-400: #AAAAAA;
  --gray-500: #888880;
  --gray-600: #555550;
  --gray-700: #333330;
  --gray-800: #1F2524;
  --gray-900: #000000;
  --radius:   3px;
  --shadow:   none;
  --sidebar-w: 128px;
}

body {
  font-family: var(--mn-sans);
  background: var(--mn-bg);
  color: var(--mn-charcoal);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ── AUTH ── */
/* ══ AUTH / SIGN IN (design_handoff_app_signin) — calm split layout ══ */
#authScreen { min-height: 100vh; background: var(--mn-bg); }
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
/* Onboarding screen reuses these card atoms (kept after the auth redesign). */
.auth-box { background: var(--mn-bg-card); border: 1px solid var(--mn-border); border-radius: 16px; padding: 32px 30px; width: 100%; }
.auth-logo { margin-bottom: 4px; }

/* LEFT — charcoal brand + proof */
.auth-left { background: var(--mn-charcoal); color: #F1F1EE; padding: 36px 48px; display: flex; flex-direction: column; position: relative; overflow: hidden; }
.auth-left::after { content: ""; position: absolute; width: 540px; height: 540px; border-radius: 999px; background: radial-gradient(circle, rgba(255,255,255,.05) 0%, rgba(255,255,255,0) 60%); bottom: -180px; left: -180px; pointer-events: none; }
.auth-left-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; position: relative; z-index: 1; }
.auth-brand { display: flex; align-items: center; gap: 10px; }
.auth-brand-logo { height: 30px; width: auto; display: block; }
.auth-brand-mark { width: 32px; height: 32px; border-radius: 4px; background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.18); display: grid; place-items: center; }
.auth-brand-word { font-weight: 800; font-size: 18px; letter-spacing: -.02em; color: #F1F1EE; }
.auth-left-meta { font-family: var(--mn-mono); font-size: 11px; font-weight: 600; letter-spacing: .1em; color: #9A9A93; text-transform: uppercase; }
.auth-left-meta a { color: var(--mn-orange); }
.auth-left-meta a:hover { text-decoration: underline; text-underline-offset: 3px; }
.auth-left-body { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 36px; max-width: 480px; position: relative; z-index: 1; padding: 64px 0; }
.auth-eyebrow { font-family: var(--mn-mono); font-size: 11px; font-weight: 700; letter-spacing: .14em; color: var(--mn-orange); text-transform: uppercase; display: inline-flex; align-items: center; gap: 8px; }
.auth-eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 999px; background: var(--mn-orange); }
.auth-h1 { font-size: clamp(28px, 3.4vw, 40px); font-weight: 800; line-height: 1.1; letter-spacing: -.025em; color: #F1F1EE; margin-top: 14px; }
.auth-h1 .accent { color: var(--mn-orange); }
.auth-lede { font-size: 15px; line-height: 1.6; color: #C9CDCB; max-width: 420px; margin-top: 16px; }
.auth-proof { background: var(--mn-charcoal-2, #2A302F); border: 1px solid #2E3433; border-radius: 14px; padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.auth-proof-row { display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 14px; align-items: center; }
.auth-ring-wrap { position: relative; width: 60px; height: 60px; flex-shrink: 0; }
.auth-ring-num { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.auth-ring-num .v { font-size: 19px; font-weight: 800; color: #F1F1EE; letter-spacing: -.02em; }
.auth-ring-num .u { font-size: 8px; color: #9A9A93; margin-top: 2px; }
.auth-proof-label { font-size: 10px; font-weight: 700; letter-spacing: .08em; color: #9A9A93; text-transform: uppercase; margin-bottom: 3px; }
.auth-proof-title { font-size: 14.5px; font-weight: 700; color: #F1F1EE; letter-spacing: -.01em; line-height: 1.3; }
.auth-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 600; background: rgba(31,138,91,.15); color: #6FE3A8; }
.auth-pill .dot { width: 5px; height: 5px; border-radius: 999px; background: #6FE3A8; }
.auth-proof-divider { height: 1px; background: #2E3433; border: none; }
.auth-next { display: flex; flex-direction: column; gap: 8px; }
.auth-next-row { display: grid; grid-template-columns: 72px 1fr auto; align-items: center; gap: 10px; font-size: 12.5px; }
.auth-next-row .tag { font-size: 9.5px; font-weight: 700; letter-spacing: .1em; color: var(--mn-orange); }
.auth-next-row .text { color: #F1F1EE; line-height: 1.35; }
.auth-next-row .time { font-size: 10.5px; color: #9A9A93; font-variant-numeric: tabular-nums; text-align: right; }
.auth-left-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 12px; color: #9A9A93; position: relative; z-index: 1; }
.auth-left-foot a { color: #9A9A93; transition: color 120ms ease; }
.auth-left-foot a:hover { color: #F1F1EE; }
.auth-left-foot .legal { display: flex; gap: 16px; }

/* RIGHT — auth card */
.auth-right { background: var(--mn-bg); display: grid; place-items: center; padding: 40px 28px; }
.auth-card { width: 100%; max-width: 420px; background: var(--mn-bg-card); border: 1px solid var(--mn-border); border-radius: 16px; padding: 32px 30px; display: flex; flex-direction: column; gap: 22px; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--mn-border); margin: -4px 0 0; }
.auth-tab { background: transparent; border: none; padding: 9px 4px; border-bottom: 2px solid transparent; color: var(--mn-text-mute); font-weight: 600; font-size: 13.5px; cursor: pointer; transition: all 120ms ease; }
.auth-tab.active { color: var(--mn-charcoal); border-bottom-color: var(--mn-orange); }
.auth-head2 { display: flex; flex-direction: column; gap: 6px; }
.auth-head2 h2 { font-size: 24px; font-weight: 800; letter-spacing: -.02em; color: var(--mn-charcoal); line-height: 1.2; }
.auth-head2 p { font-size: 13.5px; color: var(--mn-text-mute); }
.auth-switch { color: var(--mn-orange); font-weight: 600; cursor: pointer; border-bottom: 1px solid transparent; transition: border-color 120ms ease; }
.auth-switch:hover { border-color: var(--mn-orange); }
.auth-sso { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.auth-sso-btn { background: var(--mn-bg-card); border: 1px solid var(--mn-border-strong); border-radius: 9px; padding: 10px 14px; font-size: 13.5px; font-weight: 600; color: var(--mn-charcoal); display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; transition: all 120ms ease; }
.auth-sso-btn:hover { background: var(--mn-bg-soft); border-color: var(--mn-charcoal); }
.auth-sso-btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.auth-divider { display: flex; align-items: center; gap: 12px; font-family: var(--mn-mono); font-size: 10.5px; font-weight: 600; letter-spacing: .12em; color: var(--mn-text-faint); text-transform: uppercase; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--mn-border); }
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-form-note { font-size: 13px; color: var(--mn-text-mute); line-height: 1.5; }
.auth-field { display: flex; flex-direction: column; gap: 6px; }
.auth-field > label { font-size: 11px; font-weight: 700; letter-spacing: .08em; color: var(--mn-text-mute); text-transform: uppercase; display: flex; align-items: center; justify-content: space-between; }
.auth-field > label .opt { text-transform: none; letter-spacing: normal; font-weight: 400; color: var(--mn-text-faint); }
.auth-field > label a { text-transform: none; letter-spacing: normal; color: var(--mn-orange); font-weight: 600; font-size: 12px; cursor: pointer; }
.auth-field > label a:hover { text-decoration: underline; text-underline-offset: 2px; }
.auth-input-wrap { position: relative; }
.auth-field input { width: 100%; background: var(--mn-bg-card); border: 1px solid var(--mn-border); border-radius: 10px; padding: 11px 14px; font-size: 14.5px; color: var(--mn-charcoal); outline: none; transition: border-color 120ms ease, box-shadow 120ms ease; }
.auth-field input::placeholder { color: var(--mn-text-faint); }
.auth-field input:focus { border-color: var(--mn-charcoal); box-shadow: 0 0 0 3px rgba(0,0,0,.08); }
.auth-input-wrap.password input { padding-right: 42px; }
.auth-reveal { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: transparent; border: none; padding: 6px; color: var(--mn-text-faint); border-radius: 6px; cursor: pointer; transition: color 120ms ease, background 120ms ease; }
.auth-reveal:hover { color: var(--mn-charcoal); background: var(--mn-bg-soft); }
.auth-reveal i { font-size: 16px; display: block; }
.auth-check-row { display: flex; align-items: flex-start; gap: 8px; font-size: 12.5px; color: var(--mn-text-mute); line-height: 1.4; }
.auth-check-row input { width: 14px; height: 14px; margin-top: 2px; flex-shrink: 0; accent-color: var(--mn-orange); }
.auth-check-row label { cursor: pointer; }
.auth-check-row a { color: var(--mn-orange); font-weight: 600; }
.auth-primary { background: var(--mn-charcoal); color: #fff; border: none; border-radius: 10px; padding: 13px 18px; font-size: 14.5px; font-weight: 600; letter-spacing: -.005em; display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; transition: background 120ms ease, transform 80ms ease; margin-top: 2px; }
.auth-primary:hover { background: #0F1413; }
.auth-primary:active { transform: translateY(1px); }
.auth-primary:disabled { opacity: .6; cursor: default; }
.auth-primary i { font-size: 16px; }
.auth-fine { text-align: center; font-size: 12px; color: var(--mn-text-faint); line-height: 1.55; }
.auth-fine a { color: var(--mn-text-mute); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.auth-fine a:hover { color: var(--mn-charcoal); }

/* ── APP SHELL ── */
#appScreen {
  display: none;
  height: 100vh;
  overflow: hidden;
  flex-direction: column;
}
#appScreen.visible { display: flex; }

/* ── LAYOUT ── */
.app-body {
  display: flex;
  flex: 1;
  overflow: hidden;
  min-height: 0;
}

/* ── SIDEBAR ── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--color-black);
  border-right: 1px solid rgba(255,255,255,.07);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 0;
}
.sidebar-logo {
  padding: 14px 12px 12px;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.sidebar-logo-word {
  font-family: var(--mn-logo);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: -0.4px;
  color: #fff;
  line-height: 1;
}
.sidebar-logo-sub {
  font-size: 8px;
  font-weight: 500;
  color: rgba(255,255,255,.22);
  line-height: 1;
}
.logo-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  border-radius: 4px;
  transition: opacity .15s;
}
.logo-btn:hover { opacity: .75; }
.sidebar-nav {
  flex: 1;
  padding: 8px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
}
.nav-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  width: calc(100% - 16px);
  font-family: inherit;
  background: none;
  border: none;
  color: rgba(255,255,255,.35);
  transition: background 120ms ease, color 120ms ease;
}
.nav-item:hover { background: rgba(255,255,255,.08); color: rgba(255,255,255,.75); }
.nav-item.active {
  background: rgba(255,255,255,.13);
  color: #fff;
}
.nav-item i { font-size: 16px; line-height: 1; flex-shrink: 0; }
.nav-label { font-size: 12px; font-weight: 500; line-height: 1; }
/* Sidebar live AI-score chip — hidden in icon-only sidebar */
.nav-score-chip { display: none; }
.nav-score-chip.warn { display: none; }
.nav-divider { height: 1px; background: rgba(255,255,255,.07); margin: 4px 10px; width: calc(100% - 20px); }

.sidebar-footer {
  padding: 10px 0 12px;
  border-top: 1px solid rgba(255,255,255,.07);
  display: flex;
  justify-content: center;
}
.sidebar-user-btn {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  width: calc(100% - 16px);
  margin: 0 8px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 8px;
  cursor: pointer;
  padding: 8px 10px;
  font: inherit;
  text-align: left;
  transition: background 120ms ease;
}
.sidebar-user-btn:hover { background: rgba(255,255,255,.10); }
.sidebar-user-btn .avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255,255,255,.18);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.sidebar-user-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.sidebar-user-name {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,.85);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-user-credits {
  font-size: 11px;
  font-weight: 500;
  color: rgba(255,255,255,.4);
  font-variant-numeric: tabular-nums;
}
.signout-btn {
  display: none; /* moved to account page */
}

/* ── MAIN ── */
.main-content {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* ── VIEWS ── */
.view {
  display: none;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 28px 32px;
}
.view.active { display: flex; flex-direction: column; }

/* ── VIEW HEADER ── */
.view-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 24px; }
.view-title { font-size: 22px; font-weight: 700; color: var(--gray-800); }
.view-sub { font-size: 13px; color: var(--gray-400); margin-top: 3px; }

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border: none;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
  font-family: inherit;
  text-decoration: none;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary   { background: var(--mn-orange); color: white; }
.btn-primary:hover:not(:disabled) { background: var(--mn-orange-hover); }
.btn-secondary { background: #fff; color: var(--mn-charcoal); border: 1px solid var(--mn-border-strong); }
.btn-secondary:hover:not(:disabled) { background: var(--mn-bg-soft); }
/* Charcoal CTA — "Do this in Claude" style secondary-primary */
.btn-charcoal { background: var(--mn-charcoal); color: #fff; }
.btn-charcoal:hover:not(:disabled) { background: var(--mn-charcoal-2); }
.btn-danger    { background: #fee2e2; color: var(--red); }
.btn-danger:hover:not(:disabled) { background: var(--red); color: white; }
.btn-ghost     { background: none; color: var(--brand); padding: 6px 10px; }
.btn-ghost:hover { background: var(--brand-light); }
.btn-sm  { padding: 6px 12px; font-size: 12px; }
.btn-xs  { padding: 3px 8px; font-size: 11px; border-radius: 4px; }
.btn-icon { padding: 6px; border-radius: 4px; background: none; border: none; cursor: pointer; color: var(--gray-400); font-size: 16px; transition: all .15s; }
.btn-icon:hover { background: var(--gray-100); color: var(--gray-800); }

/* ── FORMS ── */
.form-group { margin-bottom: 14px; }

/* ── PASSWORD TOGGLE ── */
.pw-wrap { position: relative; display: flex; }
.pw-wrap input { flex: 1; padding-right: 38px !important; }
.pw-toggle { position: absolute; right: 0; top: 0; height: 100%; width: 36px; background: none; border: none; cursor: pointer; color: var(--gray-400); display: flex; align-items: center; justify-content: center; font-size: 16px; }
.pw-toggle:hover { color: var(--gray-800); }

/* ── LINK BUTTON ── */
.link-btn { background:none;border:none;color:var(--brand);cursor:pointer;font-size:0.85rem;padding:0;text-decoration:underline; }
.link-btn:hover { color:var(--brand-dark); }

/* ── ONBOARDING ── */
.onboarding-options { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.onboarding-option {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: var(--radius);
  border: 1px solid var(--gray-200); cursor: pointer;
  font-size: 0.9rem; transition: border-color 0.15s, background 0.15s;
}
.onboarding-option:hover { border-color: var(--brand); background: var(--brand-light); }
.onboarding-option input[type="radio"] { accent-color: var(--brand); flex-shrink: 0; width: auto !important; }

/* Grouped form sections with visual headings */
.form-section {
  padding: 14px 0 4px;
  border-top: 1px solid var(--gray-100);
  margin-top: 4px;
}
.form-section:first-of-type {
  border-top: none;
  padding-top: 4px;
}
.form-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gray-500);
  margin-bottom: 12px;
}
label { display: block; font-size: 12px; font-weight: 600; color: #000; margin-bottom: 5px; text-transform: uppercase; letter-spacing: .4px; }
input:not([type="checkbox"]):not([type="radio"]), select, textarea { width: 100%; padding: 9px 12px; border: 1.5px solid var(--mn-border); border-radius: 9px; font-size: 14px; font-family: inherit; transition: border-color 120ms ease; background: white; color: var(--mn-charcoal); }
input:not([type="checkbox"]):not([type="radio"]):focus, select:focus, textarea:focus { outline: none; border-color: var(--mn-charcoal); box-shadow: 0 0 0 3px rgba(0,0,0,.08); }
textarea { resize: vertical; min-height: 90px; }
small { color: var(--gray-400); font-size: 12px; margin-top: 3px; display: block; }

/* ── CARDS ── */
.card { background: white; border-radius: 14px; border: 1px solid var(--mn-border); margin-bottom: 16px; overflow: hidden; }
.card-header { padding: 14px 18px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--gray-100); }
.card-header h2 { font-size: 14px; font-weight: 700; }
.card-body { padding: 18px; }

/* ── ALERTS ── */
.alert { padding: 11px 14px; border-radius: 10px; font-size: 13px; margin-bottom: 14px; font-weight: 500; }
.alert-success { background: var(--mn-green-soft); color: var(--mn-green); border: 1px solid var(--mn-border-green); }
.alert-error   { background: var(--mn-danger-soft); color: var(--mn-danger); border: 1px solid var(--mn-danger-border); }
.alert-info    { background: var(--mn-blue-soft); color: var(--mn-blue); border: 1px solid #C5D8F6; }
.alert-warn    { background: var(--mn-amber-soft); color: var(--mn-amber); border: 1px solid #E6C98A; }

/* ── BADGES ── */
/* ── MODEL SELECTOR CHIPS ── */
.model-chip-row { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.model-chip {
  padding: 2px 10px; border-radius: 999px; font-size: 11px; font-weight: 600; cursor: pointer;
  border: 1px solid var(--gray-300); background: var(--gray-100); color: var(--gray-500);
  transition: background .15s, border-color .15s, color .15s;
}
.model-chip--on { background: var(--brand-light); border-color: var(--brand); color: var(--brand-dark); }
.model-chip--disabled { opacity: 0.4; cursor: not-allowed; }
.model-chip:hover:not(:disabled):not(.model-chip--disabled) { border-color: var(--brand); }
.model-chip-limit { font-size: 11px; color: var(--gray-400); margin-left: 6px; }

/* GEO model focus chips (design ModelChipsRow) — tap a pill to drill into one chatbot */
.mn-modelfocus-row { display: flex; gap: 6px; padding: 10px 14px; background: var(--mn-bg-card, #fff); border: 1px solid var(--mn-border, #E5E7EB); border-radius: 11px; align-items: center; flex-wrap: wrap; }
.mn-modelfocus-row .mfr-label { font-size: 12px; color: var(--mn-text-mute, #6C6F6C); font-weight: 600; margin-right: 6px; }
.mn-focuschip { font-size: 12px; padding: 5px 10px; border-radius: 999px; border: none; background: var(--mn-orange-soft); color: var(--mn-charcoal); font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; transition: all .12s ease; }
.mn-focuschip:hover:not(.mn-focuschip--on) { filter: brightness(.97); }
.mn-focuschip--on { background: var(--mn-charcoal, #1F2524); color: #fff; }
.mn-focuschip--dim { background: #E5E7EB; color: var(--mn-text-faint, #9A9A93); opacity: .5; }
.mn-modelfocus-meta { margin-left: auto; font-size: 12px; color: var(--mn-text-faint, #9A9A93); display: flex; align-items: center; gap: 8px; }
.mn-modelfocus-meta .mfr-link { color: var(--mn-charcoal, #1F2524); font-weight: 600; cursor: pointer; }
.mn-modelfocus-meta .mfr-link:hover { color: var(--mn-charcoal); }
.mn-modelfocus-meta .mfr-showall { color: var(--mn-charcoal); font-weight: 600; cursor: pointer; }
/* Run-set picker revealed by "Change set" — choose which chatbots to query */
.mn-modelset-picker { margin-top: 8px; padding: 11px 14px; background: var(--mn-bg-soft, #F8FAFB); border: 1px solid var(--mn-border, #E5E7EB); border-radius: 11px; }
.mn-modelset-picker .msp-head { font-size: 11.5px; color: var(--mn-text-mute, #6C6F6C); margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }

.badge { display: inline-block; padding: 2px 9px; border-radius: 6px; font-size: 11px; font-weight: 600; }
.badge-linkedin  { background: #0077b5; color: white; }
.badge-facebook  { background: #1877f2; color: white; }
.badge-instagram    { background: #e4405f; color: white; }
.badge-github_pages { background: #24292e; color: white; }
.badge-reddit       { background: #ff4500; color: white; }
.badge-x            { background: #000;    color: white; }
.badge-bluesky      { background: #0085ff; color: white; }
.badge-pending   { background: #fef3c7; color: #92400e; }
.badge-published { background: #d1fae5; color: #065f46; }
.badge-failed    { background: #fee2e2; color: #991b1b; }
.badge-cancelled { background: var(--gray-100); color: var(--gray-400); }
.badge-connected { background: #d1fae5; color: #065f46; }
.badge-missing   { background: #fee2e2; color: #991b1b; }

/* ── PROJECT CARD GRID ── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 10px;
}

.project-card {
  background: #FFFFFF;
  border: 1px solid var(--mn-border);
  border-radius: 14px;
  padding: 14px 16px;
  padding-right: 44px; /* room for 3-dot menu */
  transition: border-color 120ms ease;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
}
.project-card:hover {
  border-color: var(--mn-orange);
}
.project-card--locked {
  opacity: 0.6;
  cursor: pointer;
}
.project-card--locked:hover {
  border-color: var(--gray-300);
  box-shadow: none;
}
.project-card-lock-overlay {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-500);
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  border-radius: 6px;
  padding: 2px 7px;
}
.project-card:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

/* 3-dot menu button in top-right */
.project-card-menu-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 6px;
  background: none;
  color: var(--gray-400);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: all .15s ease;
}
.project-card-menu-btn:hover {
  background: var(--gray-100);
  border-color: var(--gray-200);
  color: var(--brand);
}

/* Dropdown menu */
.project-card-menu {
  display: none;
  position: absolute;
  top: 44px;
  right: 10px;
  z-index: 10;
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  padding: 4px;
  min-width: 160px;
}
.project-card-menu.open { display: block; }
.project-card-menu button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 12px;
  background: none;
  border: none;
  font-size: 13px;
  text-align: left;
  color: var(--gray-700);
  cursor: pointer;
  border-radius: 6px;
  font-family: inherit;
}
.project-card-menu button:hover { background: var(--gray-100); color: var(--gray-900); }
.project-card-menu button.danger { color: #dc2626; }
.project-card-menu button.danger:hover { background: #fef2f2; color: #b91c1c; }
.project-card-menu button i { font-size: 14px; }

/* Brands landing — card / row hover (design_handoff_brands_listing) */
.brand-card { transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease; }
.brand-card:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06); border-color: var(--mn-border-strong); }
.brand-card:focus-visible { outline: 2px solid var(--mn-orange); outline-offset: 2px; }
.brand-row { transition: background 120ms ease; }
.brand-row:hover { background: var(--mn-bg-soft) !important; }
.brand-row:focus-visible { outline: 2px solid var(--mn-orange); outline-offset: 2px; }

/* Project card thumbnail (small square, left side) */
.project-card-thumb {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  background: var(--gray-100);
  flex-shrink: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.project-card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.project-card-thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-light);
}

/* Card info section */
.project-card-info {
  flex: 1;
  min-width: 0;
}
.project-card-title { font-size: 15px; font-weight: 700; color: var(--gray-800); margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.project-card-meta  { font-size: 12px; color: var(--gray-400); margin-bottom: 7px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.platform-badges    { display: flex; gap: 4px; flex-wrap: wrap; }

/* Pill-style platform badges on cards */
.badge-pill-linkedin  { background: #E6F1FB; color: #185FA5; padding: 3px 10px; border-radius: 4px; font-size: 11px; font-weight: 600; }
.badge-pill-facebook  { background: #EBF1FB; color: #1877f2; padding: 3px 10px; border-radius: 4px; font-size: 11px; font-weight: 600; }
.badge-pill-instagram { background: #FBE8F0; color: #e4405f; padding: 3px 10px; border-radius: 4px; font-size: 11px; font-weight: 600; }


/* ── PROJECT DETAIL VIEW ── */
/* Transparent shell — content sits directly on the page background (matches the
   design's TabPage; no white card wrapper, no extra padding around the view). */
.project-detail{    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;}
.detail-back { display: inline-flex; align-items: center; gap: 6px; color: var(--mn-charcoal); background: none; border: none; cursor: pointer; font-size: 13.5px; font-weight: 600; padding: 0; margin-bottom: 20px; font-family: inherit; }
.detail-back:hover { opacity: .8; }
.detail-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 4px; }
.detail-title  { font-size: 22px; font-weight: 700; color: var(--gray-800); }
.detail-meta   { font-size: 13px; color: var(--gray-400); margin-top: 3px; margin-bottom: 0; }
.detail-actions { display: flex; gap: 8px; }

/* ── PROJECT TABS ── */
/* Primary project tabs — segmented pill group (matches design ProjectTabs). */
.project-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: #fff;
  border: 1px solid var(--mn-border, #E5E7EB);
  border-radius: 12px;
  margin: 20px 0 0 0;
  width: fit-content;
  max-width: 100%;
}
.project-tab {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--mn-charcoal, #1F2524);
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background .12s ease, color .12s ease;
  font-family: inherit;
  white-space: nowrap;
}
.project-tab i { font-size: 15px; color: var(--mn-text-mute, #6C6F6C); }
.project-tab:hover:not(.active) { background: #F4F6F8; }
.project-tab.active { background: var(--mn-orange-soft); color: var(--mn-charcoal); font-weight: 700; }
.project-tab.active i { color: var(--mn-charcoal); }

.project-tab-content { display: none; padding-top: 1.5rem; }
.project-tab-content.active { display: block; animation: fadeIn .2s ease-in; }

/* Secondary subtabs (GEO / Channels) — underline tabs (matches design SubTabs). */
.channels-subtabs {
  display: flex;
  gap: 24px;
  background: none;
  border: none;
  border-bottom: 1px solid var(--mn-border, #E5E7EB);
  border-radius: 0;
  padding: 0;
  margin-bottom: 18px;
  width: auto;
}
.channels-subtab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 0 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--mn-text-mute, #6C6F6C);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  margin-bottom: -1px;
  cursor: pointer;
  transition: color .12s ease;
  font-family: inherit;
}
.channels-subtab:hover:not(.disabled):not(.active) { color: var(--mn-charcoal, #1F2524); background: transparent; }
.channels-subtab.active { color: var(--mn-charcoal); font-weight: 700; background: transparent; box-shadow: none; border-bottom-color: var(--mn-charcoal); }
.channels-subtab.disabled { opacity: 0.55; cursor: not-allowed; }
.channels-subtab i { font-size: 14px; }
.badge-soon {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.3px;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--gray-100);
  color: var(--gray-500);
  margin-left: 4px;
}
.channels-subcontent { display: none; }
.channels-subcontent.active { display: block; animation: fadeIn .2s ease-in; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

/* ── CONNECTIONS ── */
.connections-row { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.connection-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: white;
  border: 1.5px solid var(--gray-200);
  border-radius: 6px;
  font-size: 13px;
}
.connection-chip.connected { border-color: var(--green); background: #f0fdf4; }
.connection-chip i { font-size: 25px; }
.connection-chip-label  { font-weight: 600; font-size: 13px; }
.connection-chip-status { font-size: 11px; color: var(--gray-400); }
.connection-chip.connected .connection-chip-status { color: var(--green); }

/* ── POST ITEMS ── */
.plan-section { margin-bottom: 24px; }
.plan-platform-header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: var(--gray-600); }
.plan-platform-line { flex: 1; height: 1px; background: var(--gray-200); }

.post-item { background: white; border: 1.5px solid var(--gray-200); border-radius: 4px; margin-bottom: 7px; overflow: hidden; transition: border-color .15s; }
.post-item:hover { border-color: var(--gray-400); }
.post-item.editing { border-color: var(--brand); }
.post-preview { display: flex; align-items: center; gap: 10px; padding: 10px 14px; cursor: pointer; }
.post-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.post-dot.pending   { background: var(--yellow); }
.post-dot.published { background: var(--green); }
.post-dot.failed    { background: var(--red); }
.post-dot.cancelled { background: var(--gray-400); }
.post-thumb { width: 36px; height: 36px; border-radius: 5px; object-fit: cover; flex-shrink: 0; }
.post-preview-text { flex: 1; font-size: 13px; color: var(--gray-800); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.post-preview-time { font-size: 11px; color: var(--gray-400); white-space: nowrap; flex-shrink: 0; }
.post-cancel-btn { background: none; border: none; cursor: pointer; color: var(--gray-400); padding: 3px; flex-shrink: 0; display: flex; align-items: center; }
.post-cancel-btn:hover { color: var(--red); }
.post-error-msg { padding: 10px 14px; background: #fee; border-top: 1px solid var(--gray-100); font-size: 12px; color: var(--red); font-family: monospace; white-space: pre-wrap; word-break: break-word; }

.post-editor { display: none; padding: 14px; border-top: 1px solid var(--gray-100); background: var(--gray-50); }
.post-item.editing .post-editor { display: block; }
.editor-row { display: flex; gap: 8px; margin-top: 10px; align-items: center; flex-wrap: wrap; }
.editor-row input[type="datetime-local"] { flex: 1; min-width: 180px; }

.add-post-btn { display: flex; align-items: center; gap: 6px; width: 100%; padding: 10px 14px; background: none; border: 1.5px dashed var(--gray-200); border-radius: 4px; color: var(--gray-400); font-size: 13px; cursor: pointer; transition: all .15s; font-family: inherit; }
.add-post-btn:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-light); }
.add-post-form { background: white; border: 1.5px solid var(--brand); border-radius: 4px; padding: 14px; margin-bottom: 8px; }
.add-form-row { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; align-items: center; }
.add-form-row input[type="datetime-local"] { flex: 1; min-width: 160px; }

.past-toggle { display: flex; align-items: center; gap: 6px; cursor: pointer; color: var(--gray-400); font-size: 13px; padding: 8px 0; border: none; background: none; font-family: inherit; }
.past-toggle:hover { color: var(--gray-600); }
.past-list { display: none; margin-top: 6px; }
.past-list.open { display: block; }

/* ── IMAGE PICKER ── */
.img-picker { margin-top: 10px; }
.img-picker-toggle { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: var(--brand); background: none; border: none; cursor: pointer; font-family: inherit; padding: 3px 0; }
.img-picker-toggle:hover { opacity: .8; }
.img-picker-body { margin-top: 8px; background: white; border: 1px solid var(--gray-200); border-radius: 4px; padding: 12px; }
.pexels-search { display: flex; gap: 6px; margin-bottom: 10px; }
.pexels-search input { flex: 1; }
.pexels-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 5px; margin-bottom: 8px; }
.pexels-photo { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 5px; cursor: pointer; border: 2px solid transparent; transition: border-color .15s; }
.pexels-photo:hover { opacity: .85; }
.pexels-photo.selected { border-color: var(--brand); }
.pexels-credit { font-size: 10px; color: var(--gray-400); text-align: right; margin-bottom: 8px; }
.img-divider { display: flex; align-items: center; gap: 8px; margin: 8px 0; font-size: 11px; color: var(--gray-400); }
.img-divider::before, .img-divider::after { content: ''; flex: 1; height: 1px; background: var(--gray-200); }
.img-preview-wrap { position: relative; margin-top: 8px; border-radius: 4px; overflow: hidden; }
.img-preview-wrap img { width: 100%; max-height: 140px; object-fit: cover; display: block; }
.img-remove-btn { position: absolute; top: 5px; right: 5px; background: rgba(0,0,0,.55); color: white; border: none; border-radius: 50%; width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 13px; }
.img-crop-btn { position: absolute; top: 5px; right: 32px; background: rgba(0,0,0,.55); color: white; border: none; border-radius: 10px; padding: 2px 7px; font-size: 11px; font-weight: 600; display: flex; align-items: center; gap: 3px; cursor: pointer; font-family: inherit; }
.img-crop-btn:hover { background: rgba(0,0,0,.75); }

/* ── OVERVIEW STAT CARDS ── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px,1fr)); gap: 12px; margin-bottom: 24px; }
.stat-card { background: var(--gray-50); border: 1px solid var(--gray-200); border-radius: 6px; padding: 16px; }
.stat-label { font-size: 12px; color: var(--gray-400); margin-bottom: 6px; }
.stat-value { font-size: 26px; font-weight: 700; color: var(--gray-800); }

/* ── SECTION HEADING ── */
.section-heading { font-size: 14px; font-weight: 600; color: var(--gray-800); margin: 0 0 12px; }

/* ── SCHEDULED VIEW ── */
.sched-project-group { margin-bottom: 24px; }
.sched-project-name { font-size: 14px; font-weight: 700; color: var(--gray-600); margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }

/* ── INTEGRATIONS ── */
.integration-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(220px,1fr)); gap: 12px; }
.integration-card { border: 1.5px solid var(--gray-200); border-radius: var(--radius); padding: 18px; background: white; transition: border-color .2s; }
.integration-card:hover { border-color: var(--gray-400); }
.integration-icon { font-size: 24px; margin-bottom: 8px; }
.integration-name { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.integration-desc { font-size: 12px; color: var(--gray-400); margin-bottom: 14px; line-height: 1.5; }
.integration-form { display: none; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--gray-100); }
.integration-form.open { display: block; }

/* ── TABLE ── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; padding: 9px 14px; font-size: 11px; font-weight: 600; color: var(--gray-400); text-transform: uppercase; letter-spacing: .5px; border-bottom: 1px solid var(--gray-200); }
td { padding: 11px 14px; border-bottom: 1px solid var(--gray-100); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
.content-preview { max-width: 220px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── EMPTY STATE ── */
.empty { text-align: center; padding: 48px; color: var(--gray-400); }
.empty i { font-size: 44px; margin-bottom: 12px; display: block; }
.empty h3 { font-size: 15px; color: var(--gray-600); margin-bottom: 4px; }
.empty p { font-size: 13px; margin-bottom: 16px; }

/* ── MODAL ── */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.4); display: none; align-items: center; justify-content: center; z-index: 1000; padding: 20px; }
.modal-overlay.open { display: flex; }
.modal { background: white; border-radius: 16px; border: 1px solid var(--mn-border); width: 100%; max-width: 500px; box-shadow: 0 8px 24px rgba(31,37,36,.08); max-height: 90vh; overflow-y: auto; }
.modal.modal-wide { max-width: 780px; }
.modal-header { padding: 18px 22px; border-bottom: 1px solid var(--gray-200); display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; background: white; z-index: 1; }
.modal-header h3 { font-size: 15px; font-weight: 700; }
.modal-body { padding: 22px; }
.modal-footer { padding: 14px 22px; border-top: 1px solid var(--gray-200); display: flex; justify-content: flex-end; gap: 8px; }
.close-btn { background: none; border: none; cursor: pointer; color: var(--gray-400); line-height: 1; display: flex; align-items: center; justify-content: center; font-size: 20px; }

/* ── AI SEO PANEL ── */
.aico-block { background: var(--gray-50); border: 1px solid var(--gray-200); border-radius: 6px; padding: 16px; margin-bottom: 14px; }
.aico-block-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.aico-block-title { font-size: 14px; font-weight: 600; color: var(--gray-800); }
.aico-block-desc { font-size: 12px; color: var(--gray-600); line-height: 1.55; }

/* Visibility score pills */
.visibility-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin-top: 12px; }
.visibility-pill { background: white; border: 1px solid var(--mn-border); border-radius: 14px; padding: 14px 12px; text-align: center; }
.visibility-pill-label { font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--mn-text-mute); margin-bottom: 6px; }
.visibility-pill-score { font-size: 22px; font-weight: 800; color: var(--mn-charcoal); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }

/* ── SCHEDULE FILTER BAR ── */
.filter-bar { display: flex; gap: 6px; flex-wrap: wrap; }
.filter-btn { padding: 5px 14px; border-radius: 20px; border: 1.5px solid var(--gray-200); background: white; color: var(--gray-600); font-size: 12px; font-weight: 600; cursor: pointer; font-family: inherit; transition: all .15s; }
.filter-btn:hover { border-color: var(--brand); color: var(--brand); }
.filter-btn.active { background: var(--brand); border-color: var(--brand); color: white; }

/* ── SCHEDULE CARDS (date-grouped view) ── */
.schedule-controls { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.schedule-controls-right { display: flex; align-items: center; gap: 8px; }
.sched-sort-select { padding: 5px 10px; border: 1.5px solid var(--gray-200); border-radius: 4px; font-size: 12px; font-weight: 600; color: var(--gray-600); font-family: inherit; background: white; cursor: pointer; }
.sched-sort-select:focus { outline: none; border-color: var(--brand); }

.schedule-period { margin-bottom: 24px; }
.schedule-period-header { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.schedule-period-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--gray-600); }
.sched-count { background: var(--gray-100); color: var(--gray-600); font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 6px; }
.schedule-period-line { flex: 1; height: 1px; background: var(--gray-200); }

.sched-card { background: white; border: 1px solid var(--gray-200); border-left: 4px solid var(--gray-300); border-radius: 4px; margin-bottom: 6px; overflow: visible; transition: box-shadow .15s; }
.sched-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,.07); }
.sched-card-main { display: flex; align-items: center; gap: 12px; padding: 10px 12px; cursor: pointer; }
.sched-left { flex-shrink: 0; width: 84px; }
.sched-date { font-size: 11px; font-weight: 700; color: var(--gray-800); background: var(--gray-100); padding: 2px 7px; border-radius: 4px; display: inline-block; margin-bottom: 3px; white-space: nowrap; }
.sched-time { font-size: 11px; color: var(--gray-400); padding-left: 2px; }
.sched-thumb { width: 44px; height: 44px; border-radius: 5px; object-fit: cover; flex-shrink: 0; }
.sched-body { flex: 1; min-width: 0; }
.sched-badges { display: flex; gap: 5px; margin-bottom: 4px; flex-wrap: nowrap; align-items: center; overflow: hidden; }
.sched-content { font-size: 13px; color: var(--gray-700); line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sched-relative { font-size: 10px; color: var(--gray-400); white-space: nowrap; margin-left: auto; flex-shrink: 0; }
.sched-tag-topic  { flex-shrink: 1; min-width: 0; font-size: 10px; color: var(--gray-600); background: var(--gray-100); padding: 2px 7px; border-radius: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 140px; }
.sched-tag-pillar { flex-shrink: 0; font-size: 10px; color: var(--brand); background: var(--brand-light,#eef2ff); padding: 2px 7px; border-radius: 6px; white-space: nowrap; }
/* 3-dot menu */
.sched-menu-wrap { position: relative; flex-shrink: 0; }
.sched-menu-btn { background: none; border: none; cursor: pointer; color: var(--gray-400); font-size: 16px; padding: 4px 6px; border-radius: 5px; display: flex; align-items: center; transition: background .12s; }
.sched-menu-btn:hover { background: var(--gray-100); color: var(--gray-700); }
.sched-menu { display: none; position: absolute; right: 0; top: calc(100% + 4px); background: white; border: 1px solid var(--gray-200); border-radius: 8px; box-shadow: 0 4px 16px rgba(0,0,0,.12); z-index: 200; min-width: 150px; padding: 4px; }
.sched-menu.open { display: block; }
.sched-menu button { display: flex; align-items: center; gap: 8px; width: 100%; background: none; border: none; font-family: inherit; font-size: 13px; color: var(--gray-700); padding: 7px 10px; border-radius: 5px; cursor: pointer; text-align: left; }
.sched-menu button:hover { background: var(--gray-100); }
.sched-menu button.danger { color: var(--red,#ef4444); }
.sched-menu button.danger:hover { background: #fee2e2; }
/* collapsible groups */
.sched-group-body.collapsed { display: none; }
.sched-editor { display: none; padding: 14px 16px; border-top: 1px solid var(--gray-100); background: var(--gray-50); }
.sched-card.editing .sched-editor { display: block; }
.sched-card.editing .sched-card-main { border-bottom: none; }

/* ── POST EDIT DRAWER ── */
.post-drawer-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.3); display: none; z-index: 999; }
.post-drawer-overlay.open { display: block; }
.post-drawer { position: fixed; right: 0; top: 0; height: 100vh; width: 420px; background: white; box-shadow: -2px 0 12px rgba(0,0,0,.15); display: none; flex-direction: column; z-index: 1000; transform: translateX(100%); transition: transform .25s ease-out; }
.post-drawer.open { display: flex; transform: translateX(0); }
@media (max-width: 900px) { .post-drawer { width: 92vw; max-width: 420px; } }

.drawer-header { padding: 18px 20px; border-bottom: 1px solid var(--gray-200); display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; }
.drawer-title { font-size: 16px; font-weight: 700; color: var(--gray-800); }
.drawer-close { background: none; border: none; cursor: pointer; color: var(--gray-400); font-size: 20px; display: flex; align-items: center; justify-content: center; }
.drawer-close:hover { color: var(--gray-800); }

.drawer-body { flex: 1; overflow-y: auto; padding: 20px; }
.drawer-footer { padding: 16px 20px; border-top: 1px solid var(--gray-200); display: flex; gap: 8px; flex-shrink: 0; }
.drawer-footer-btn { flex: 1; }
.drawer-footer-delete { padding: 16px 20px; border-top: 1px solid var(--gray-200); display: flex; gap: 8px; }

.drawer-section { margin-bottom: 18px; }
.drawer-section-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--gray-600); margin-bottom: 8px; }

.add-post-panel { display: none; }
.add-post-panel.open { display: block; }

/* ── AI SEO SECTIONS ── */
/* Flat section structure (design SectionHead): a numbered title + subtitle over
   a thin divider — NOT a bordered card. The inner content supplies its own
   cards, so sections no longer double-box. Sections are separated by whitespace. */
.aico-section { display: flex; flex-direction: column; background: none; border: none; border-radius: 0; padding: 0; margin: 0 0 28px; }
.aico-section:last-child { margin-bottom: 0; }
.aico-section.tinted { background: none; border: none; }
.aico-section-header { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; margin-bottom: 4px; }
.aico-section > .aico-section-title { margin-bottom: 4px; }
.aico-section-title { font-size: 17px; font-weight: 700; letter-spacing: -.015em; color: var(--mn-charcoal, var(--gray-800)); display: flex; align-items: baseline; gap: 12px; }
.aico-section-title i { display: none; } /* design heads carry no leading icon */
.aico-section-desc { font-size: 13px; color: var(--mn-text-mute, var(--gray-500)); line-height: 1.55; max-width: 760px; margin: 0 0 16px; padding-bottom: 12px; border-bottom: 1px solid var(--mn-border, var(--gray-200)); }

/* Auto-number the "What AI says" sections (design: 01 / 02 / 03 mono eyebrow).
   Skip the tinted intro card so numbering starts at the first real section. */
#geo-sub-insights-content { counter-reset: aico; }
#geo-sub-insights-content .aico-section:not(.tinted):not(.nonum) .aico-section-title::before {
  counter-increment: aico;
  content: counter(aico, decimal-leading-zero);
  font-family: var(--mn-mono, ui-monospace, monospace);
  font-size: 11px; font-weight: 700; letter-spacing: .12em;
  color: var(--mn-orange); align-self: baseline;
}

/* Score legend in the section-01 header (design: inline dots, right-aligned). */
.geo-score-legend { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: flex-end; }

/* Self-contained card for Section 05 (Citation gap / Where to pitch). */
.geo-card { background: #fff; border: 1px solid var(--mn-border, var(--gray-200)); border-radius: 14px; padding: 18px; }

/* 30-day trend + Why-not-appearing 2-up (design: 1.15fr / 1fr, after hero). */
.geo-trend-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 14px; margin: 0 0 28px; align-items: stretch; }
@media (max-width: 900px) { .geo-trend-grid { grid-template-columns: 1fr; } }

/* Side-by-side pair (design: Competitor citation gap + Where AI gets its info). */
.geo-pair-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 0 0 28px; }
.geo-pair-grid .aico-section { margin-bottom: 0; }
@media (max-width: 880px) { .geo-pair-grid { grid-template-columns: 1fr; } }

/* Model score cards */
.model-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px,1fr)); gap: 10px; margin-top: 4px; }
.model-score-card { background: white; border: 1px solid var(--mn-border); border-radius: 14px; padding: 16px 14px; text-align: center; }
.model-score-name { font-size: 11px; font-weight: 700; color: var(--mn-text-mute); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 8px; }
.model-score-value { font-size: 28px; font-weight: 800; margin-bottom: 6px; font-variant-numeric: tabular-nums; letter-spacing: -.02em; color: var(--mn-charcoal); }
.score-bar-wrap { background: var(--mn-track); border-radius: 999px; height: 6px; overflow: hidden; }
.score-bar { height: 6px; border-radius: 999px; transition: width 400ms ease; }
.score-bar.high   { background: var(--mn-green); }
.score-bar.medium { background: var(--mn-amber); }
.score-bar.low    { background: var(--mn-danger); }
.model-score-meta { font-size: 10px; color: var(--mn-text-faint); margin-top: 5px; font-variant-numeric: tabular-nums; }

/* Toggle switch */
.toggle-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 4px 0; }
.toggle-text { flex: 1; }
.toggle-label { font-size: 13px; font-weight: 600; color: var(--gray-800); }
.toggle-desc { font-size: 12px; color: var(--gray-400); margin-top: 2px; line-height: 1.4; }
.toggle-switch { position: relative; display: inline-block; width: 42px; height: 24px; flex-shrink: 0; margin-top: 1px; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider { position: absolute; cursor: pointer; inset: 0; background: var(--gray-200); border-radius: 24px; transition: .2s; }
.toggle-slider:before { content: ''; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; background: white; border-radius: 50%; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
input:checked + .toggle-slider { background: var(--brand); }
input:checked + .toggle-slider:before { transform: translateX(18px); }

/* ── MISC ── */
.monospace { font-family: 'SF Mono','Fira Code',monospace; font-size: 12px; background: var(--gray-100); padding: 2px 6px; border-radius: 4px; word-break: break-all; }
.divider { height: 1px; background: var(--gray-200); margin: 18px 0; }
.row { display: flex; gap: 14px; }
.row .form-group { flex: 1; min-width: 0; }
@media (max-width: 640px) {
  .row { flex-direction: column; gap: 0; }
}
.flash { position: fixed; bottom: 24px; right: 24px; z-index: 9999; padding: 10px 18px; border-radius: 10px; font-size: 13px; font-weight: 600; box-shadow: 0 8px 24px rgba(31,37,36,.12); display: flex; align-items: center; gap: 7px; }

/* ── GEO opportunity badge tooltip + inline panel ── */
.opp-badge { cursor: pointer; display: inline-block; }
.opp-tip { display: none; }
.opp-panel-row td { background: #fffbf0; }
.opp-inline-panel { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 14px 16px; border-top: 2px solid #fbbf24; font-size: 12px; }
.opp-panel-tips { color: var(--gray-700); line-height: 1.6; }
.opp-panel-form { display: flex; flex-direction: column; gap: 0; }
@media (max-width: 700px) { .opp-inline-panel { grid-template-columns: 1fr; } }
#opp-tip-floating { display: none; position: fixed; z-index: 9000; width: 280px; background: #1f2937; color: #f9fafb; font-size: 11px; font-weight: 400; text-transform: none; letter-spacing: normal; line-height: 1.5; padding: 10px 12px; border-radius: 6px; box-shadow: 0 4px 12px rgba(0,0,0,.25); text-align: left; white-space: normal; pointer-events: none; }
.opp-tip-why { margin-bottom: 6px; }
.opp-tip-label { font-weight: 700; color: #fbbf24; margin-bottom: 4px; }
.opp-tip-list { margin: 0; padding-left: 16px; }
.opp-tip-list li { margin-bottom: 3px; }

/* ── ADMIN PLAN SETTINGS ── */
.plan-toggle-row {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--gray-700); cursor: pointer;
  padding: 6px 8px; border-radius: 4px; border: 1px solid var(--gray-200);
}
.plan-toggle-row:hover { background: var(--gray-50); }
.plan-toggle-row input[type="checkbox"] { accent-color: var(--brand); cursor: pointer; width: 16px; height: 16px; min-width: 16px; flex-shrink: 0; }

.admin-limit-row {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; padding: 4px 0;
}
.admin-limit-label { flex: 1; color: var(--gray-600); }
.admin-limit-value { font-weight: 600; color: var(--gray-800); min-width: 32px; text-align: right; }

.admin-feat-row {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--gray-700); cursor: pointer; padding: 3px 0;
}
.admin-feat-row input[type="checkbox"] { accent-color: var(--brand); cursor: pointer; }

.btn-ghost {
  background: transparent; border: none; color: var(--gray-400);
  padding: 2px 4px; border-radius: 4px; cursor: pointer; font-size: 13px;
  display: inline-flex; align-items: center;
}
.btn-ghost:hover { color: var(--gray-700); background: var(--gray-100); }
.admin-matrix-row:hover td { background: var(--gray-50); }

/* ── PWA INSTALL BANNER ── */
.pwa-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--brand-light);
  border-bottom: 1px solid rgba(0,0,0,.10);
  flex-shrink: 0;
  animation: slideDown .3s ease;
}
@keyframes slideDown { from { transform: translateY(-100%); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.pwa-banner-text { flex: 1; font-size: 13px; font-weight: 500; color: var(--brand-dark); }
.pwa-install-btn {
  flex-shrink: 0;
  background: var(--brand);
  color: white;
  border: none;
  border-radius: 6px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.pwa-install-btn:hover { background: var(--brand-dark); }
.pwa-dismiss-btn {
  flex-shrink: 0;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--brand-dark);
  font-size: 16px;
  display: flex;
  align-items: center;
  padding: 4px;
  border-radius: 4px;
  opacity: .7;
}
.pwa-dismiss-btn:hover { opacity: 1; }

/* ── MOBILE TOP BAR ── */
.mobile-topbar {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: #000;
  border-bottom: 1px solid rgba(255,255,255,.08);
  flex-shrink: 0;
  z-index: 50;
}

/* ── SIDEBAR OVERLAY ── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 199;
}
.sidebar-overlay.open { display: block; }

/* ── MOBILE BOTTOM TAB BAR ── */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 62px;
  background: #fff;
  border-top: 1px solid var(--mn-border, #e5e7eb);
  z-index: 100;
  grid-template-columns: repeat(5, 1fr);
  align-items: stretch;
  padding-bottom: env(safe-area-inset-bottom);
}
.mobile-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 6px 4px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--gray-400);
  font-family: inherit;
  font-size: 10px;
  font-weight: 600;
  transition: color .15s;
  -webkit-tap-highlight-color: transparent;
}
.mobile-tab i { font-size: 22px; line-height: 1; }
.mobile-tab.active { color: #000; }
.mobile-tab.more-active { color: #000; }
.mobile-tab:active { opacity: .6; }

/* ── RESPONSIVE: TABLET + PHONE ── */
@media (max-width: 768px) {
  .mobile-topbar { display: flex; }
  .mobile-bottom-nav { display: grid; }

  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    z-index: 200;
    transform: translateX(-100%);
    transition: transform .25s ease;
    width: var(--sidebar-w);
  }
  .sidebar.mobile-open {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(0,0,0,.18);
  }

  .view {
    padding: 16px;
    padding-bottom: calc(62px + 16px);
  }
  .view-header { flex-direction: column; gap: 10px; align-items: flex-start; }

  .project-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .project-tabs::-webkit-scrollbar { display: none; }
  .project-tab { flex-shrink: 0; padding: 10px 14px; font-size: 13px; }

  .projects-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .integration-grid { grid-template-columns: 1fr; }

  .post-drawer { width: 100vw; max-width: none; }

  .modal-overlay { padding: 12px; align-items: flex-end; }
  .modal { border-radius: 14px 14px 10px 10px; }

  .flash { left: 12px; right: 12px; bottom: 74px; }

  .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
  }
  .table-wrap table { min-width: 540px; }
  td, th { padding: 8px 10px; white-space: nowrap; }
  .content-preview { max-width: 160px; }
}

/* ── AUTH responsive (design split → stack) ── */
@media (max-width: 920px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-left { padding: 28px 28px 32px; }
  .auth-left-body { padding: 28px 0 4px; gap: 28px; max-width: none; }
  .auth-h1 { font-size: clamp(24px, 6vw, 32px); }
  .auth-lede { font-size: 14.5px; }
  .auth-right { padding: 28px 20px 48px; }
  .auth-card { padding: 26px 22px; max-width: 480px; }
}
@media (max-width: 520px) {
  .auth-sso { grid-template-columns: 1fr; }
  .auth-left-foot { font-size: 11.5px; }
  .auth-left-foot .legal { gap: 12px; }
}

/* ── RESPONSIVE: PHONE ── */
@media (max-width: 480px) {

  .view { padding: 12px; padding-bottom: calc(62px + 12px); }
  .view-title { font-size: 18px; }

  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .stat-card { padding: 12px; }
  .stat-value { font-size: 22px; }

  .visibility-grid { grid-template-columns: repeat(2, 1fr); }

  .btn { padding: 8px 14px; }
  .btn-sm { padding: 6px 10px; }

  .modal-body { padding: 16px; }
  .modal-header { padding: 14px 16px; }
  .modal-footer { padding: 12px 16px; }

  .sched-left { width: 70px; }
  .sched-date { font-size: 10px; }

  .card-body { padding: 14px; }
  .card-header { padding: 12px 14px; }

  .projects-grid { grid-template-columns: 1fr; gap: 10px; }
}

/* ── PLAN BANNER ── */
#planBanner {
  background: #fef3c7; color: #92400e;
  padding: 9px 20px; font-size: 13px; font-weight: 500;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  border-bottom: 1px solid #fde68a; flex-shrink: 0;
}
#planBanner.expired { background: #fee2e2; color: #991b1b; border-color: #fca5a5; }
#planBanner.expired i { color: #ef4444; }

/* ── PLAN USAGE BAR ── */
.plan-usage-bar-track {
  height: 6px; border-radius: 3px; background: var(--gray-100);
  overflow: hidden; flex: 1;
}
.plan-usage-bar-fill {
  height: 100%; border-radius: 3px;
  background: var(--brand); transition: width .3s ease;
}
.plan-usage-bar-fill.at-limit { background: #ef4444; }

/* ── FEATURE LOCKED OVERLAY ── */
.feature-locked-wrap { position: relative; }
.feature-locked-overlay {
  position: absolute; inset: 0; background: rgba(255,255,255,.85);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; border-radius: 8px; z-index: 2;
  font-size: 13px; color: var(--gray-500);
}

/* ── NAV GROUPS (collapsible) ── */
#plansNavBtn { margin-top: auto; }
.nav-group-toggle { justify-content: flex-start; }
.nav-caret { margin-left: auto; font-size: 12px; transition: transform .2s; }
.nav-sub { padding-left: 32px !important; font-size: 12.5px; color: var(--gray-500); }
.nav-sub:hover { color: var(--gray-800); }

/* ── PLANS VIEW ── */
.plans-billing-toggle {
  display: flex; gap: 4px; margin-bottom: 24px;
  background: var(--gray-100); border-radius: 8px; padding: 3px; width: fit-content;
}
.plans-billing-toggle button {
  padding: 6px 18px; border-radius: 6px; border: none; background: transparent;
  cursor: pointer; font-size: 13px; font-weight: 500; color: var(--gray-600);
}
.plans-billing-toggle button.active { background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.1); color: var(--gray-900); }
.plans-save-badge {
  background: #dcfce7; color: #166534; font-size: 10px;
  padding: 1px 5px; border-radius: 9px; margin-left: 4px;
}
.plans-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 16px; margin-bottom: 32px;
}
@media (max-width: 700px) { .plans-grid { grid-template-columns: 1fr; } }
.plan-card {
  border: 1.5px solid var(--gray-200); border-radius: 12px;
  padding: 22px; position: relative;
}
.plan-card.current { border-color: var(--brand); background: #fff7ed; }
.plan-card.highlighted { border-color: var(--brand); box-shadow: 0 4px 20px rgba(249,115,22,.12); }
.plan-current-badge, .plan-popular-badge {
  position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
  font-size: 10px; font-weight: 700; padding: 2px 10px; border-radius: 99px;
  white-space: nowrap;
}
.plan-current-badge { background: var(--brand); color: #fff; }
.plan-popular-badge { background: var(--gray-800); color: #fff; }
.plan-card.current .plan-popular-badge, .plan-card.current .plan-current-badge { top: -10px; }
.plan-name { font-size: 16px; font-weight: 700; margin-bottom: 4px; color: var(--gray-900); }
.plan-tagline { font-size: 12px; color: var(--gray-500); margin-bottom: 14px; line-height: 1.4; }
.plan-price { font-size: 30px; font-weight: 700; color: var(--gray-900); line-height: 1; }
.plan-price span { font-size: 13px; font-weight: 400; color: var(--gray-500); }
.plan-price-free { font-size: 24px; color: var(--gray-600); }
.plan-yearly-note { font-size: 11px; color: var(--gray-400); margin-top: 4px; }
.plan-highlights { list-style: none; font-size: 12.5px; color: var(--gray-600); display: flex; flex-direction: column; gap: 5px; }
.plan-highlights li::before { content: '✓ '; color: #16a34a; font-weight: 700; }

.plans-compare-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 4px; }
.plans-compare-table th { padding: 10px 14px; font-weight: 600; text-align: center; background: var(--gray-50); border-bottom: 2px solid var(--gray-200); }
.plans-compare-table th:first-child { text-align: left; }
.plans-compare-table td { padding: 9px 14px; border-top: 1px solid var(--gray-100); }
.plans-compare-table td:first-child { color: var(--gray-700); }
.plans-compare-table td:not(:first-child) { text-align: center; }
.plans-col-current { background: #fff7ed; }
.plans-col-header-current { color: var(--brand); }
.plans-check { color: #16a34a; font-size: 15px; }
.plans-dash { color: var(--gray-300); }

/* ── Checkout return: highlight the plan card while we poll for activation ── */
#accountPlanCard.confirming { box-shadow: 0 0 0 3px #fef3c7, 0 1px 3px rgba(0,0,0,0.06); border-color: #f59e0b; }
#accountPlanCard.checkout-failed { box-shadow: 0 0 0 3px #fee2e2, 0 1px 3px rgba(0,0,0,0.06); border-color: #ef4444; }
.checkout-spin { animation: checkout-spin 1s linear infinite; display: inline-block; }
@keyframes checkout-spin { to { transform: rotate(360deg); } }

/* ═══════════════════════════════════════════════════════════════
   MINNAL REDESIGN — NEW COMPONENT LIBRARY
   Ported from the design handoff prototype. Shared across Home,
   Project Overview, AI-search and Posts screens.
   ═══════════════════════════════════════════════════════════════ */

/* ── Layout primitives ── */
.mn-stack { display: flex; flex-direction: column; gap: 26px; max-width: 1180px; }
.mn-card {
  background: var(--mn-bg-card); border: 1px solid var(--mn-border);
  border-radius: 14px; padding: 22px 24px;
}
.mn-eyebrow {
  font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--mn-text-mute);
}

/* Numbered band header (01 / 02 …) */
.mn-band { display: flex; flex-direction: column; gap: 12px; }
.mn-band-head {
  display: flex; align-items: baseline; gap: 14px;
  padding-bottom: 6px; border-bottom: 1px solid var(--mn-border);
}
.mn-band-num { font-family: var(--mn-mono); font-size: 11px; font-weight: 700; letter-spacing: .12em; color: var(--mn-orange); }
.mn-band-title { font-size: 18px; font-weight: 700; letter-spacing: -.015em; color: var(--mn-charcoal); margin: 0; }
.mn-band-sub { font-size: 13px; color: var(--mn-text-mute); flex: 1; }
@media (max-width: 920px) { .mn-publishing-row { grid-template-columns: 1fr !important; } }
@media (max-width: 920px) { .mn-overview-grid { grid-template-columns: 1fr !important; } }
.mn-geo-intro {
  background: linear-gradient(135deg, #FFFFFF 0%, #F4F0E5 100%);
  border: 1px solid var(--mn-border); border-radius: 16px; padding: 20px 24px;
  display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center;
}
@media (max-width: 760px) { .mn-geo-intro { grid-template-columns: 1fr; } }

/* ── Next-move / Today card (orange left border) ── */
.mn-next-move {
  background: var(--mn-bg-card); border: 1px solid var(--mn-border);
  border-left: 4px solid var(--mn-orange); border-radius: 14px;
  padding: 20px 24px;
  display: grid; grid-template-columns: auto 1fr auto; gap: 22px; align-items: center;
}
.mn-next-move-icon {
  width: 56px; height: 56px; border-radius: 13px; background: var(--mn-orange-soft);
  display: grid; place-items: center; flex-shrink: 0;
}
.mn-next-move-eyebrow {
  font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--mn-orange);
}
.mn-next-move h3 { font-size: 20px; font-weight: 700; letter-spacing: -.015em; line-height: 1.25; margin: 0; color: var(--mn-charcoal); }
.mn-next-move p { font-size: 14px; color: var(--mn-text-mute); margin: 0; line-height: 1.5; max-width: 620px; }
.mn-next-move-actions { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
@media (max-width: 760px) { .mn-next-move { grid-template-columns: 1fr; } .mn-next-move-icon { display:none; } }

/* ── Score ring (radial SVG) ── */
.mn-ring { position: relative; display: inline-grid; place-items: center; flex-shrink: 0; }
.mn-ring svg { transform: rotate(-90deg); }
.mn-ring-track { fill: none; stroke: var(--mn-track); }
.mn-ring-fill  { fill: none; stroke: var(--mn-orange); stroke-linecap: round; transition: stroke-dasharray .5s ease; }
.mn-ring-label { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.mn-ring-value { font-weight: 800; letter-spacing: -.02em; color: var(--mn-charcoal); }
.mn-ring-max { font-size: .68em; color: var(--mn-text-mute); margin-top: 4px; }

/* ── Pills ── */
.mn-pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 600; padding: 4px 10px; border-radius: 999px;
  background: var(--mn-border); color: var(--mn-charcoal);
}
.mn-pill.orange { background: var(--mn-orange-soft); color: var(--mn-orange); }
.mn-pill.green  { background: var(--mn-green-soft);  color: var(--mn-green); }
.mn-pill.amber  { background: var(--mn-amber-soft);  color: var(--mn-amber); }
.mn-pill.blue   { background: var(--mn-blue-soft);   color: var(--mn-blue); }
.mn-pill.dark   { background: var(--mn-charcoal);    color: #fff; }
.mn-pill .dot { width: 6px; height: 6px; border-radius: 999px; background: currentColor; }

/* ── Per-model horizontal bars ── */
.mn-modelbar { display: grid; grid-template-columns: 84px 1fr 38px; gap: 12px; align-items: center; }
.mn-modelbar .name { font-size: 13px; color: var(--mn-text-mute); font-weight: 500; }
.mn-modelbar.cited .name { color: var(--mn-charcoal); font-weight: 600; }
.mn-modelbar .track { height: 8px; background: var(--mn-track); border-radius: 999px; overflow: hidden; }
.mn-modelbar .fill { height: 100%; background: var(--mn-track-fill); border-radius: 999px; transition: width .3s ease; }
.mn-modelbar.cited .fill { background: var(--mn-orange); }
.mn-modelbar .pct { font-size: 12.5px; color: var(--mn-text-mute); text-align: right; font-variant-numeric: tabular-nums; }

/* ── Model chips (interactive focus) ── */
.mn-chip {
  font-size: 12px; padding: 5px 10px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--mn-border); background: #fff; color: var(--mn-text-mute);
  font-weight: 500; display: inline-flex; align-items: center; gap: 5px;
  transition: all .12s ease;
}
.mn-chip .dot { width: 5px; height: 5px; border-radius: 999px; background: var(--mn-text-faint); }
.mn-chip.on { border-color: var(--mn-orange); background: var(--mn-orange-soft); color: var(--mn-orange); font-weight: 600; }
.mn-chip.on .dot { background: var(--mn-orange); }
.mn-chip.focused { background: var(--mn-charcoal); color: #fff; border-color: var(--mn-charcoal); }
.mn-chip.dim { opacity: .5; background: var(--mn-border); border-color: transparent; }

/* ── Matrix tables (model × keyword / prompt research) ── */
.mn-matrix { background: #fff; border: 1px solid var(--mn-border); border-radius: 12px; overflow: hidden; }
.mn-matrix-row { display: grid; align-items: stretch; }
.mn-matrix-head { background: var(--mn-bg-soft); border-bottom: 1px solid var(--mn-border); }
.mn-matrix-head .h {
  padding: 10px 4px; font-size: 10.5px; font-weight: 700; color: var(--mn-text-mute);
  letter-spacing: .04em; text-transform: uppercase; text-align: center; border: none; background: transparent; cursor: pointer;
}
.mn-matrix-head .h.left { padding: 10px 14px; text-align: left; letter-spacing: .06em; }
.mn-matrix-head .h.focused { background: var(--mn-charcoal); color: #fff; }
.mn-matrix-body .mn-matrix-row { border-bottom: 1px solid var(--mn-border); }
.mn-matrix-body .mn-matrix-row:last-child { border-bottom: none; }
.mn-matrix .kw { padding: 12px 14px; font-size: 13px; color: var(--mn-charcoal); font-weight: 500; line-height: 1.4; }
.mn-matrix .cell { padding: 12px 4px; text-align: center; font-size: 13px; }
.mn-matrix .cell.yes { color: var(--mn-green); font-weight: 700; }
.mn-matrix .cell.no  { color: var(--mn-danger); font-weight: 600; }
.mn-matrix .cell.na  { color: var(--mn-text-faint); }
.mn-matrix .hits { padding: 12px 8px; text-align: right; font-size: 13px; font-weight: 700; color: var(--mn-charcoal); font-variant-numeric: tabular-nums; }
.mn-matrix-foot {
  padding: 10px 14px; background: var(--mn-bg-soft);
  display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--mn-text-mute);
}
.mn-link { color: var(--mn-charcoal); font-weight: 600; cursor: pointer; }
.mn-link-orange { color: var(--mn-orange); font-weight: 600; cursor: pointer; }

/* ── ScoreBar (audit checks) ── */
.mn-scorebar {
  display: grid; grid-template-columns: auto 1fr auto auto; gap: 14px; align-items: center;
  padding: 12px 14px; border: 1px solid var(--mn-border); border-radius: 11px; background: #fff;
}
.mn-scorebar .ico { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; flex-shrink: 0; }
.mn-scorebar .label { font-size: 13.5px; font-weight: 600; color: var(--mn-charcoal); line-height: 1.3; }
.mn-scorebar .hint { font-size: 12px; color: var(--mn-text-faint); line-height: 1.4; }
.mn-scorebar .track { height: 6px; background: var(--mn-track); border-radius: 999px; margin-top: 4px; overflow: hidden; }
.mn-scorebar .fill { height: 100%; border-radius: 999px; }
.mn-scorebar .val { font-size: 18px; font-weight: 800; color: var(--mn-charcoal); letter-spacing: -.01em; line-height: 1; font-variant-numeric: tabular-nums; text-align: right; }
.mn-scorebar .val span { font-size: 12px; color: var(--mn-text-faint); font-weight: 500; }

/* ── Mini-track stat box ── */
.mn-minitrack { border: 1px solid var(--mn-border); border-radius: 10px; padding: 10px 12px; background: var(--mn-bg-soft); display: flex; flex-direction: column; gap: 4px; }
.mn-minitrack .label { font-size: 11px; color: var(--mn-text-mute); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.mn-minitrack .v { font-size: 22px; font-weight: 800; letter-spacing: -.02em; line-height: 1; }
.mn-minitrack .hint { font-size: 11px; color: var(--mn-text-faint); }

/* ── Fix / gap ranked rows ── */
.mn-fixrow {
  display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center;
  padding: 14px 16px; border: 1px solid var(--mn-border); border-radius: 12px; background: #fff;
}
.mn-fixrow.top { background: var(--mn-bg-soft); }
.mn-fixrow .rank { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; font-weight: 800; font-size: 14px; background: var(--mn-border); color: var(--mn-text-mute); }
.mn-fixrow.top .rank { background: var(--mn-orange-soft); color: var(--mn-orange); }
.mn-fixrow .title { font-size: 14.5px; font-weight: 600; color: var(--mn-charcoal); line-height: 1.35; }
.mn-fixrow .why { font-size: 12.5px; color: var(--mn-text-mute); line-height: 1.5; }
.mn-fixrow .lift { font-size: 22px; font-weight: 800; color: var(--mn-green); letter-spacing: -.01em; line-height: 1; }

/* ── Setup cards (A/B/C) ── */
.mn-setup {
  background: #fff; border: 1px solid var(--mn-border); border-radius: 12px; padding: 16px 18px;
  display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: flex-start;
}
.mn-setup .step { width: 32px; height: 32px; border-radius: 8px; background: var(--mn-border); color: var(--mn-charcoal); display: grid; place-items: center; font-weight: 800; font-size: 13px; flex-shrink: 0; }
.mn-setup .title { font-size: 14px; font-weight: 700; color: var(--mn-charcoal); }
.mn-setup .body { font-size: 12.5px; color: var(--mn-text-mute); line-height: 1.5; }
.mn-code {
  background: var(--mn-charcoal); color: #fff; border-radius: 9px; padding: 10px 14px;
  font-family: var(--mn-mono); font-size: 12.5px;
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
}
.mn-code .src { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mn-code button { background: rgba(255,255,255,.1); color: #fff; border: 1px solid rgba(255,255,255,.18); padding: 5px 12px; border-radius: 6px; font-size: 12px; font-weight: 500; cursor: pointer; flex-shrink: 0; }

/* ── Change cards (failing / fixed) ── */
.mn-changecard { background: #fff; border: 1px solid var(--mn-border); border-radius: 14px; padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.mn-changecard .head { display: flex; align-items: center; gap: 10px; }
.mn-changecard .head .ico { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; }
.mn-changecard .head .t { font-size: 14px; font-weight: 700; color: var(--mn-charcoal); flex: 1; }
.mn-changecard .item { display: flex; justify-content: space-between; padding: 8px 10px; background: var(--mn-bg-soft); border-radius: 8px; font-size: 13px; }
.mn-changecard .empty { font-size: 12.5px; color: var(--mn-text-faint); margin: 0; line-height: 1.5; }

/* ── Claude band card (charcoal) ── */
.mn-claude-card {
  background: var(--mn-charcoal); color: #fff; border-radius: 14px; padding: 24px 26px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: center; position: relative; overflow: hidden;
}
.mn-claude-card .glow { position: absolute; right: -30px; bottom: -30px; opacity: .06; pointer-events: none; }
.mn-claude-card h3 { font-size: 24px; font-weight: 700; letter-spacing: -.02em; line-height: 1.25; margin: 0; }
.mn-claude-card p { font-size: 14px; color: rgba(255,255,255,.68); margin: 0; line-height: 1.55; max-width: 460px; }
.mn-claude-card .term {
  display: flex; align-items: center; gap: 10px; background: rgba(0,0,0,.35);
  padding: 10px 14px; border-radius: 10px; border: 1px solid rgba(255,255,255,.08); max-width: 460px;
  font-family: var(--mn-mono); font-size: 13px;
}
.mn-claude-card .term .prompt { color: rgba(255,255,255,.45); }
.mn-claude-card .term button { margin-left: auto; background: rgba(255,255,255,.1); color: #fff; border: 1px solid rgba(255,255,255,.18); padding: 5px 12px; border-radius: 6px; font-size: 12px; cursor: pointer; }
.mn-chat { background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 12px; position: relative; z-index: 1; }
.mn-chat-head { display: flex; align-items: center; gap: 8px; font-size: 12px; color: rgba(255,255,255,.5); }
.mn-bubble { max-width: 92%; border-radius: 10px; padding: 8px 12px; font-size: 13px; line-height: 1.55; }
.mn-bubble.you { align-self: flex-end; background: rgba(0,0,0,.12); border: 1px solid rgba(0,0,0,.18); }
.mn-bubble.claude { align-self: flex-start; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1); }
@media (max-width: 860px) { .mn-claude-card { grid-template-columns: 1fr; } }

/* ── Failed-posts alert card ── */
.mn-sched-intro { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; margin-bottom: 16px; }
@media (max-width: 760px) { .mn-sched-intro { grid-template-columns: 1fr; } }
.mn-failed-card { background: var(--mn-orange-soft); border: 1px solid var(--mn-danger-border); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.mn-failed-head { display: flex; align-items: center; gap: 10px; }
.mn-failed-row { display: grid; grid-template-columns: auto 1fr auto auto; gap: 12px; align-items: center; padding: 10px 12px; background: #fff; border-radius: 9px; border: 1px solid var(--mn-border); }

/* ── Week-ahead calendar / list toggle ── */
.mn-viewtoggle { display: inline-flex; gap: 2px; padding: 3px; background: #fff; border: 1px solid var(--mn-border); border-radius: 8px; }
.mn-viewtoggle button { background: transparent; color: var(--mn-text-mute); border: none; padding: 5px 11px; border-radius: 6px; font-size: 12.5px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; }
.mn-viewtoggle button.active { background: var(--mn-orange-soft); color: var(--mn-orange); }
.mn-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.mn-day { background: #fff; border: 1px solid var(--mn-border); border-radius: 12px; padding: 14px; min-height: 200px; display: flex; flex-direction: column; gap: 10px; }
.mn-day-head { display: flex; align-items: baseline; justify-content: space-between; }
.mn-day-name { font-size: 11px; font-weight: 700; color: var(--mn-text-mute); letter-spacing: .08em; }
.mn-day-date { font-size: 12px; color: var(--mn-text-faint); }
.mn-slot-suggested { background: var(--mn-orange-tint); border: 1px dashed var(--mn-orange); border-radius: 9px; padding: 10px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.mn-slot-empty { border: 1px dashed var(--mn-border); border-radius: 9px; padding: 10px; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--mn-text-faint); cursor: pointer; font-size: 11.5px; }
@media (max-width: 980px) { .mn-week { grid-template-columns: 1fr; } .mn-day { min-height: 0; } }

/* ── Generic data rows (platforms, activity, sources, posts) ── */
.mn-row { display: grid; gap: 12px; align-items: center; padding: 10px 14px; border: 1px solid var(--mn-border); border-radius: 10px; background: #fff; }
.mn-row.soft { background: var(--mn-bg-soft); }
.mn-avatar-sq { border-radius: 8px; display: grid; place-items: center; color: #fff; font-weight: 700; flex-shrink: 0; }

/* Section head (mirrors band head, lighter) */
.mn-sec { display: flex; align-items: baseline; gap: 14px; padding-bottom: 6px; border-bottom: 1px solid var(--mn-border); }
.mn-sec-num { font-family: var(--mn-mono); font-size: 11px; font-weight: 700; letter-spacing: .12em; color: var(--mn-orange); }
.mn-sec-title { font-size: 17px; font-weight: 700; letter-spacing: -.015em; color: var(--mn-charcoal); margin: 0; }
.mn-sec-sub { font-size: 13px; color: var(--mn-text-mute); flex: 1; }

/* Tab-page brand header + subtabs */
.mn-brandhead { display: flex; align-items: center; justify-content: space-between; }
.mn-brandhead .id { display: flex; align-items: center; gap: 16px; }
.mn-brandlogo { width: 56px; height: 56px; border-radius: 14px; background: var(--mn-charcoal); display: grid; place-items: center; }
.mn-subtabs { display: flex; gap: 24px; border-bottom: 1px solid var(--mn-border); }
.mn-subtab { position: relative; padding: 6px 0 14px; font-size: 14px; font-weight: 500; color: var(--mn-text-mute); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; background: none; border: none; font-family: inherit; }
.mn-subtab.active { font-weight: 700; color: var(--mn-charcoal); }
.mn-subtab.active::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--mn-orange); border-radius: 2px; }
.mn-subtab.disabled { color: var(--mn-text-faint); cursor: not-allowed; }

/* Indeterminate progress bar for audit loading states (no server-side progress to poll). */
@keyframes auditIndet { 0% { margin-left: -40%; } 100% { margin-left: 100%; } }

