/* OfferLab console — loaded after style.css.
   Re-tokenises the existing components and adds the app shell, the contacts
   console, the stage board, the template studio and the usage meters. */

:root {
  --ink: #0f172a;
  --muted: #64748b;
  --paper: #f6f7fb;
  --paper-2: #eef0f6;
  --card: #ffffff;
  --line: #e4e7ef;
  --navy: #0b1020;
  --navy-2: #070b16;
  --gold: #6d5efc;          /* primary accent (was brand gold) */
  --gold-deep: #4f46e5;
  --terra: #e11d48;
  --ok: #059669;
  --on-navy: #e7e9f5;
  --accent-2: #0ea5e9;
  --accent-soft: #eeecff;
  --rail: #0b1020;
  --rail-2: #121833;
  --rail-ink: #aab1cf;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px rgba(15, 23, 42, .06);
  --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
}

body.console { background: var(--paper); font: 15px/1.55 var(--font-body); color: var(--ink); }
body.console a { color: var(--gold-deep); }
body.console h1, body.console h2, body.console h3 { font-family: var(--font-display); letter-spacing: -.02em; }
body.console h1 { font-size: 28px; font-weight: 700; }
body.console .kicker { color: var(--gold); letter-spacing: .14em; font-size: 11px; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.rail {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column; gap: 14px;
  background: radial-gradient(120% 60% at 0% 0%, #1b2150 0%, var(--rail) 55%);
  color: var(--rail-ink); padding: 18px 14px;
}
.rail a, body.console .rail a { color: var(--rail-ink); text-decoration: none; }
.rail-brand { display: flex; gap: 10px; align-items: center; padding: 2px 6px 10px; }
.rail-brand strong { display: block; color: #fff; font-family: var(--font-display); font-size: 17px; }
.rail-brand small { display: block; font-size: 11px; color: #8e96ba; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail-email { display: flex !important; align-items: center; gap: 5px; margin-top: 2px; font-size: 10px !important; color: #6b7399 !important; }
.rail-email .dot { width: 6px; height: 6px; border-radius: 50%; border: 1px solid #3a4270; background: transparent; flex-shrink: 0; }
.rail-email .dot.on { background: #0f9f74; border-color: #0f9f74; }
.rail .mark, body.console .mark {
  background: linear-gradient(135deg, var(--gold), var(--accent-2)); color: #fff; border-radius: 10px;
  box-shadow: 0 6px 18px rgba(109, 94, 252, .45);
}
.rail-nav { display: flex; flex-direction: column; align-items: stretch; flex-wrap: nowrap; gap: 2px; }
.rail-group { margin: 12px 8px 4px; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: #6b7399; font-weight: 600; }
.rail-nav a {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px;
  font-size: 14px; font-weight: 500; transition: background .15s, color .15s;
}
.rail-nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
body.console .rail-nav a:hover { color: #fff; }
body.console .rail-nav a.on { color: #fff; }
.rail-nav a.on { background: rgba(109, 94, 252, .22); color: #fff; box-shadow: inset 2px 0 0 var(--gold); }
.rail-nav .ico { width: 18px; text-align: center; opacity: .85; }
.badge-count { display: inline-flex; align-items: center; justify-content: center; min-width: 16px; height: 16px; padding: 0 4px; background: #ef4444; color: #fff; border-radius: 999px; font-size: 10px; font-weight: 800; line-height: 1; margin-left: 4px; vertical-align: middle; }
.rail-plan {
  display: flex; flex-direction: column; gap: 10px; margin-top: auto;
  background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 12px; padding: 12px;
}
.rail-plan:hover { border-color: rgba(109, 94, 252, .6); }
.rail-upgrade { font-size: 12px; color: #c4bfff; font-weight: 600; }
.rail-foot { display: none; }

/* ---------- collapsible nav sections ---------- */
.rail-section { border: none; background: transparent; padding: 0; }
.rail-section > summary {
  list-style: none; display: flex; align-items: center; gap: 4px;
  margin: 8px 6px 3px; padding: 4px 8px; border-radius: 7px;
  font-size: 10.5px; letter-spacing: .13em; text-transform: uppercase;
  color: #6b7399; font-weight: 600; cursor: pointer;
  transition: color .12s, background .12s; user-select: none;
}
.rail-section > summary::-webkit-details-marker { display: none; }
.rail-section > summary::marker { content: ''; }
.rail-section > summary > span { flex: 1; }
.rail-section > summary::after {
  content: '›'; font-size: 14px; line-height: 1; opacity: .5; font-style: normal;
  display: inline-block; transition: transform .18s; transform: rotate(90deg);
}
.rail-section[open] > summary::after { transform: rotate(-90deg); }
.rail-section > summary:hover { color: #a8b0d4; background: rgba(255,255,255,.04); }
.rail-section:first-child > summary { margin-top: 2px; }

/* ---------- mode switcher ---------- */
.mode-switch {
  display: flex; flex-direction: column; gap: 5px;
  padding: 0 4px 12px; border-bottom: 1px solid rgba(255,255,255,.07);
}
.mode-tabs {
  display: flex; gap: 3px;
  background: rgba(0,0,0,.2); border-radius: 10px; padding: 3px;
}
.mode-tab {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 5px;
  padding: 6px 8px; border-radius: 7px; border: none; background: transparent;
  font-size: 12px; font-weight: 600; color: #6b7399; cursor: pointer;
  transition: background .15s, color .15s; white-space: nowrap; font-family: var(--font-body);
}
.mode-tab.is-active { background: rgba(109, 94, 252, .22); color: #fff; }
.mode-tab:hover:not(.is-active) { color: #a8b0d4; background: rgba(255,255,255,.04); }
.brand-mini {
  display: flex; flex-wrap: wrap; gap: 3px; padding: 2px 0;
}
.brand-mini a {
  font-size: 11.5px; padding: 3px 8px; border-radius: 6px;
  color: #8e96ba !important; background: transparent;
  border: 1px solid rgba(255,255,255,.1); transition: all .15s;
  text-decoration: none; white-space: nowrap;
}
body.console .brand-mini a { color: #8e96ba !important; }
.brand-mini a:hover, .brand-mini a.on { color: #fff !important; background: rgba(255,255,255,.08); border-color: rgba(109,94,252,.5); }
.brand-mini .brand-new { color: #8b80f0 !important; border-style: dashed; }
.brand-mini .brand-new:hover { color: #c4bfff !important; }

/* ---------- user profile card ---------- */
.rail-user {
  display: flex; align-items: center; gap: 9px; margin-top: auto;
  padding: 11px 8px 6px; border-top: 1px solid rgba(255,255,255,.07);
}
.rail-avatar {
  flex-shrink: 0; width: 32px; height: 32px; border-radius: 9px;
  background: linear-gradient(135deg, var(--gold), var(--accent-2));
  color: #fff; font: 700 13px/32px var(--font-display);
  text-align: center; text-transform: uppercase;
}
.rail-user-info { flex: 1; min-width: 0; }
.rail-user-info strong {
  display: block; font-size: 12.5px; color: #d0d5f0; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rail-user-info small { font-size: 10.5px; color: #5e6890; }
.rail-user-acts { display: flex; gap: 2px; }
.rail-user-btn {
  display: flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 7px;
  color: #5e6890 !important; font-size: 14px; text-decoration: none;
  transition: background .12s, color .12s;
}
body.console .rail-user-btn { color: #5e6890 !important; }
.rail-user-btn:hover, body.console .rail-user-btn:hover { background: rgba(255,255,255,.08); color: #a8b0d4 !important; }

.plan-badge {
  align-self: flex-start; font: 600 11px/1 var(--font-body); letter-spacing: .08em; text-transform: uppercase;
  padding: 5px 9px; border-radius: 99px; background: rgba(255, 255, 255, .1); color: #fff;
}
.plan-badge.plan-free { background: rgba(255, 255, 255, .12); }
.plan-badge.plan-trial { background: linear-gradient(90deg, #0ea5e9, #6d5efc); }
.plan-badge.plan-starter, .plan-badge.plan-pro, .plan-badge.plan-agency, .plan-badge.plan-enterprise { background: linear-gradient(90deg, #6d5efc, #ec4899); }
.plan-badge.plan-staff { background: linear-gradient(90deg, #059669, #0ea5e9); }

.meter { display: flex; flex-direction: column; gap: 5px; font-size: 12px; }
.meter-top { display: flex; justify-content: space-between; gap: 8px; }
.meter-top b { font-family: var(--font-mono); font-weight: 500; color: #fff; }
.meter-track { height: 5px; border-radius: 99px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.meter-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--gold), var(--accent-2)); }
.meter-warn .meter-track i { background: linear-gradient(90deg, #f59e0b, #f97316); }
.meter-full .meter-track i { background: #e11d48; }

.stage { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px;
  padding: 12px 28px; background: rgba(246, 247, 251, .82); backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.topsearch { flex: 1; max-width: 560px; }
.topsearch input {
  width: 100%; border-radius: 10px; border: 1px solid var(--line); background: #fff;
  padding: 9px 14px 9px 36px; font-size: 14px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Cpath d='m11 11 3 3'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 12px center;
}
.topbar-actions { display: flex; gap: 8px; margin-left: auto; }
body.console main { max-width: 1320px; width: 100%; margin: 0 auto; padding: 26px 28px 96px; }
body.console main:has(.contacts-page) { max-width: 1320px; }
.nav-burger { display: none; }
.rail-scrim { display: none; }

/* ---------- components, re-skinned ---------- */
body.console .more-actions summary {
  border: 1px solid var(--line); border-radius: 10px; min-height: 40px; padding: 8px 14px; font-weight: 600; font-size: 14px;
}
body.console .more-actions summary.btn { border: 0; color: #fff; }
body.console .more-panel { border-radius: 12px; box-shadow: 0 18px 40px -16px rgba(15, 23, 42, .35); }
body.console .more-panel a, body.console .more-panel button { border-radius: 8px; font-weight: 500; }
body.console .agent-dock { position: sticky; bottom: 0; z-index: 15; margin-top: auto; background: rgba(11, 16, 32, .94); backdrop-filter: blur(10px); border: 0; border-top: 1px solid #1f2747; }
body.console .agent-dock .agent-copy small, body.console .agent-meters { color: #9aa3c7; }
body.console .agent-dock .agent-toggle { border-radius: 8px; color: #c4bfff; border-color: #313a66; }
body.console .btn {
  background: linear-gradient(135deg, var(--gold), #8b5cf6); border: 0; color: #fff !important;
  border-radius: 10px; padding: 10px 16px; min-height: 40px; font-weight: 600; font-size: 14px;
  box-shadow: 0 6px 16px rgba(109, 94, 252, .28); transition: transform .12s, box-shadow .12s;
}
body.console .btn:hover { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(109, 94, 252, .34); background: linear-gradient(135deg, #5b4cf5, #7c4ff0); }
body.console .btn.ghost { background: #fff; color: var(--ink) !important; border: 1px solid var(--line); box-shadow: none; }
body.console .btn.ghost:hover { background: var(--paper-2); color: var(--ink) !important; }
body.console .btn.danger { background: #fff; color: var(--terra) !important; border: 1px solid #fecdd3; box-shadow: none; }
body.console .btn.tiny { min-height: 32px; padding: 6px 11px; font-size: 12.5px; border-radius: 8px; }
body.console .btn:disabled { opacity: .45; transform: none; }
body.console input, body.console select, body.console textarea {
  border-radius: 10px; border: 1px solid var(--line); background: #fff; font-size: 14px;
}
body.console input:focus, body.console select:focus, body.console textarea:focus {
  outline: 3px solid rgba(109, 94, 252, .18); border-color: var(--gold);
}
body.console .pill { border-radius: 99px; padding: 2px 9px; font-size: 11.5px; background: #fff; text-transform: none; }
body.console .pill.maps { color: #2563eb; border-color: #bfdbfe; background: #eff6ff; }
body.console .pill.osm { color: #047857; border-color: #a7f3d0; background: #ecfdf5; }
body.console .ok, body.console .alert, body.console .notice { border-radius: 12px; }
body.console .grid-wrap { border-radius: var(--radius); box-shadow: var(--shadow); border-color: var(--line); }
body.console .grid thead th { background: #f8fafc; }
body.console code { border-radius: 6px; }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px 20px;
}
.card h2 { margin-top: 0; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head h1 { margin: 2px 0 4px; }
.page-head .lede { margin: 0; max-width: 720px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.split { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 20px; align-items: start; }
.sticky { position: sticky; top: 76px; }
.mono { font-family: var(--font-mono); font-size: 12.5px; }
.muted-sm { color: var(--muted); font-size: 12.5px; }
.chipset { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 99px;
  border: 1px solid var(--line); background: #fff; color: var(--ink) !important; text-decoration: none;
  font-size: 12.5px; cursor: pointer;
}
.chip-btn:hover, .chip-btn.on { border-color: var(--gold); background: var(--accent-soft); color: var(--gold-deep) !important; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin: 0 0 18px; }
.stat {
  display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--line); text-decoration: none; color: var(--ink) !important;
  box-shadow: var(--shadow); transition: border-color .15s, transform .15s;
}
.stat:hover { border-color: var(--gold); transform: translateY(-1px); }
.stat.on { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(109, 94, 252, .15); }
.stat b { font: 700 24px/1.1 var(--font-display); }
.stat span { font-size: 12.5px; color: var(--muted); }
.stat.accent { background: linear-gradient(135deg, var(--gold), var(--accent-2)); color: #fff !important; border: 0; }
.stat.accent span { color: rgba(255, 255, 255, .85); }

/* ---------- contacts console ---------- */
.console-grid { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 20px; align-items: start; }
.facet-rail { position: sticky; top: 76px; display: flex; flex-direction: column; gap: 14px; }
.facet { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); }
.facet h3 { margin: 0 0 10px; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-family: var(--font-body); font-weight: 600; }
.facet ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.facet a {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 8px; align-items: center;
  padding: 6px 8px; border-radius: 8px; color: var(--ink) !important; text-decoration: none; font-size: 13px;
}
.facet a:hover { background: var(--paper-2); }
.facet a.on { background: var(--accent-soft); color: var(--gold-deep) !important; font-weight: 600; }
.facet a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.facet a b { font: 500 11.5px var(--font-mono); color: var(--muted); }
.facet a i { grid-column: 1 / -1; height: 3px; border-radius: 99px; background: var(--paper-2); overflow: hidden; }
.facet a i::before { content: ""; display: block; height: 100%; width: var(--w, 0%); background: linear-gradient(90deg, var(--gold), var(--accent-2)); border-radius: inherit; }

.stage-strip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; margin: 0 0 18px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--card); box-shadow: var(--shadow); }
.stage-strip a { position: relative; padding: 12px 16px; text-decoration: none; color: var(--ink) !important; border-right: 1px solid var(--line); }
.stage-strip a:last-child { border-right: 0; }
.stage-strip a:hover { background: var(--paper); }
.stage-strip a.on { background: var(--accent-soft); }
.stage-strip b { display: block; font: 700 22px/1.1 var(--font-display); }
.stage-strip span { font-size: 12px; color: var(--muted); }
.stage-strip a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--stage, var(--gold)); opacity: .9; }

.view-switch { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--paper-2); border: 1px solid var(--line); }
.view-switch a { padding: 6px 12px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--muted) !important; text-decoration: none; }
.view-switch a.on { background: #fff; color: var(--ink) !important; box-shadow: 0 1px 3px rgba(15, 23, 42, .1); }

body.console .contact-list { display: flex; flex-direction: column; gap: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--card); box-shadow: var(--shadow); }
body.console .contact-row { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; margin: 0; background: transparent; padding: 12px 16px; transition: background .12s; }
body.console .contact-row:last-child { border-bottom: 0; }
body.console .contact-row:hover { background: #fafaff; }
body.console .contact-row .avatar { background: linear-gradient(135deg, var(--accent-soft), #e0f2fe); color: var(--gold-deep); border-radius: 10px; font-family: var(--font-display); }
body.console .contact-row .name { color: var(--ink); font-weight: 600; }
body.console .contact-row.is-agent { box-shadow: inset 3px 0 0 var(--accent-2); }

.board { display: grid; grid-template-columns: repeat(5, minmax(200px, 1fr)); gap: 14px; overflow-x: auto; padding-bottom: 8px; }
.board-col { background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; min-height: 240px; display: flex; flex-direction: column; gap: 8px; }
.board-col header { display: flex; justify-content: space-between; align-items: center; padding: 2px 4px 6px; }
.board-col header strong { font: 600 13px var(--font-display); }
.board-col header b { font: 500 11.5px var(--font-mono); background: #fff; border: 1px solid var(--line); padding: 1px 8px; border-radius: 99px; }
.board-col header i { width: 8px; height: 8px; border-radius: 99px; background: var(--stage, var(--gold)); display: inline-block; margin-right: 6px; }
.board-card { display: block; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; text-decoration: none; color: var(--ink) !important; transition: border-color .12s, transform .12s; }
.board-card:hover { border-color: var(--gold); transform: translateY(-1px); }
.board-card strong { display: block; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-card small { display: block; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-card .tags { margin-top: 6px; display: flex; gap: 4px; flex-wrap: wrap; }
.board-more { font-size: 12.5px; text-align: center; padding: 6px; }
.stage-collect { --stage: #0ea5e9; }
.stage-ready { --stage: #6d5efc; }
.stage-contacted { --stage: #f59e0b; }
.stage-replied { --stage: #ec4899; }
.stage-won { --stage: #059669; }

/* ---------- discovery / jobs results ---------- */
.search-hero {
  border-radius: 18px; padding: 22px; margin-bottom: 18px; color: #fff;
  background: radial-gradient(120% 140% at 0% 0%, #3b2fd9 0%, #0b1020 60%), #0b1020;
  box-shadow: 0 18px 40px rgba(15, 23, 42, .25);
}
.search-hero h1 { color: #fff; margin: 4px 0 6px; }
.search-hero .lede { color: #c7cbe6; margin: 0 0 16px; }
.search-hero .kicker { color: #a5b4fc; }
.search-form { display: grid; grid-template-columns: 1.3fr 1fr auto auto; gap: 10px; align-items: end; }
.search-form label { color: #c7cbe6; font-size: 12px; gap: 5px; }
.search-form input, .search-form select { background: rgba(255, 255, 255, .96); }
.search-hero .chip-btn { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .18); color: #e0e7ff !important; }
.search-hero .chip-btn:hover, .search-hero .chip-btn.on { background: rgba(255, 255, 255, .2); color: #fff !important; }
.search-hero .sources { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.search-hero .sources label { flex-direction: row; align-items: center; gap: 6px; color: #e0e7ff; font-size: 13px; padding: 6px 10px; border-radius: 99px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); cursor: pointer; }
.search-hero .sources label.off { opacity: .45; cursor: not-allowed; }
.search-hero .sources input { accent-color: #a5b4fc; }

.result-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }
.result {
  position: relative; display: flex; flex-direction: column; gap: 6px; padding: 14px 14px 12px 44px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  transition: border-color .12s, box-shadow .12s;
}
.result:hover { border-color: #c7c2ff; }
.result:has(input:checked) { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(109, 94, 252, .14); }
.result > input[type=checkbox] { position: absolute; left: 14px; top: 16px; width: 18px; height: 18px; accent-color: var(--gold); }
.result h3 { margin: 0; font-size: 15px; font-family: var(--font-body); font-weight: 600; letter-spacing: 0; }
.result p { margin: 0; font-size: 13px; color: var(--muted); }
.result .facts { display: flex; flex-wrap: wrap; gap: 4px; }
.result .facts .pill { font-size: 11px; }
.result.is-known { opacity: .6; }
.result-bar {
  position: sticky; bottom: 16px; z-index: 5; display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
  margin-top: 16px; padding: 10px 12px; border-radius: 14px; background: #0b1020; color: #e0e7ff;
  box-shadow: 0 16px 36px rgba(15, 23, 42, .3);
}
.result-bar .btn.ghost { background: transparent; color: #e0e7ff !important; border-color: #313a66; }
.attrib { font-size: 12px; color: var(--muted); margin-top: 10px; }

.job-card { padding-left: 16px; }
.job-card .job-meta { display: flex; flex-wrap: wrap; gap: 6px; font-size: 12.5px; color: var(--muted); }
.job-card .job-actions { display: flex; gap: 8px; margin-top: auto; padding-top: 8px; }
.job-card .excerpt { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- applications pipeline ---------- */
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 99px; margin-right: 6px; background: #94a3b8; vertical-align: middle; }
.st-saved { background: #94a3b8; } .st-ready { background: #6d5efc; } .st-applied { background: #0ea5e9; }
.st-interview { background: #f59e0b; } .st-offer { background: #059669; } .st-rejected { background: #e11d48; }
.apps-table td { vertical-align: middle; }
.apps-table .title { font-weight: 600; color: var(--ink); text-decoration: none; }
.letter-box { width: 100%; min-height: 360px; font: 14px/1.6 var(--font-body); }
.preview-frame { width: 100%; height: 720px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }

/* ---------- template studio ---------- */
.purpose-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; margin: 0 0 22px; }
.purpose-card {
  display: flex; flex-direction: column; gap: 6px; padding: 16px; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--line); text-decoration: none; color: var(--ink) !important;
  box-shadow: var(--shadow); transition: transform .15s, border-color .15s;
}
.purpose-card:hover { transform: translateY(-2px); border-color: var(--gold); }
.purpose-card .pc-ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; font-size: 18px; color: #fff; background: linear-gradient(135deg, var(--gold), var(--accent-2)); }
.purpose-card strong { font-family: var(--font-display); font-size: 16px; }
.purpose-card small { color: var(--muted); font-size: 13px; }
.theme-pick { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.theme-pick label { flex-direction: column; gap: 6px; align-items: stretch; cursor: pointer; font-size: 12.5px; text-align: center; }
.theme-pick input { position: absolute; opacity: 0; pointer-events: none; }
.theme-pick .sw { height: 54px; border-radius: 10px; border: 2px solid var(--line); background: #fff; position: relative; overflow: hidden; }
.theme-pick input:checked + .sw { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(109, 94, 252, .18); }
.sw-aurora { background: linear-gradient(135deg, var(--acc, #6d5efc), #0ea5e9) !important; }
.sw-minimal { background: #fff linear-gradient(90deg, var(--acc, #6d5efc) 0 5px, transparent 5px) !important; }
.sw-noir { background: #0b0d12 !important; }
.sw-noir::after { content: ""; position: absolute; left: 10px; top: 12px; width: 26px; height: 3px; background: var(--acc, #6d5efc); }
.sw-editorial { background: #fffdf9 !important; }
.sw-editorial::after { content: "Aa"; position: absolute; inset: 0; display: grid; place-items: center; font: italic 18px Georgia, serif; color: var(--acc, #6d5efc); }
.sw-bento { background: #eef0f6 !important; }
.sw-bento::after { content: ""; position: absolute; inset: 8px; border-radius: 8px; background: var(--acc, #6d5efc); }
.accent-pick { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.accent-pick label { flex-direction: row; cursor: pointer; }
.accent-pick input[type=radio] { position: absolute; opacity: 0; pointer-events: none; }
.accent-pick .dotc { width: 26px; height: 26px; border-radius: 99px; border: 3px solid #fff; box-shadow: 0 0 0 1px var(--line); }
.accent-pick input:checked + .dotc { box-shadow: 0 0 0 2px var(--ink); }
.accent-pick input[type=color] { width: 36px; height: 30px; padding: 2px; border-radius: 8px; }
.token-bar { display: flex; flex-wrap: wrap; gap: 5px; }
.token-bar button { font: 500 11.5px var(--font-mono); padding: 3px 8px; border-radius: 6px; border: 1px dashed #c7c2ff; background: var(--accent-soft); color: var(--gold-deep); cursor: pointer; }
.ai-box { display: flex; gap: 8px; align-items: stretch; padding: 10px; border-radius: 12px; background: linear-gradient(135deg, #f5f3ff, #ecfeff); border: 1px solid #ddd6fe; }
.ai-box input { flex: 1; }
.tpl-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.tpl-cards .tpl-card { border-radius: var(--radius); overflow: hidden; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); text-decoration: none; color: var(--ink) !important; display: flex; flex-direction: column; }
.tpl-cards .tpl-card:hover { border-color: var(--gold); }
.tpl-cards iframe { width: 200%; height: 440px; transform: scale(.5); transform-origin: 0 0; border: 0; pointer-events: none; margin-bottom: -220px; background: #fff; }
.tpl-cards .tpl-meta { padding: 12px 14px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; background: #fff; position: relative; }

/* ---------- usage page ---------- */
.usage-meters { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.usage-meter { padding: 16px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
.usage-meter b { font: 700 26px/1.1 var(--font-display); }
.usage-meter .track { height: 8px; border-radius: 99px; background: var(--paper-2); margin-top: 10px; overflow: hidden; }
.usage-meter .track i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--accent-2)); border-radius: inherit; }
.usage-meter.meter-warn .track i { background: linear-gradient(90deg, #f59e0b, #f97316); }
.usage-meter.meter-full .track i { background: #e11d48; }
.plan-table td, .plan-table th { text-align: center; }
.plan-table td:first-child, .plan-table th:first-child { text-align: left; }
.plan-table tr.current { background: var(--accent-soft); }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .console-grid { grid-template-columns: 1fr; }
  .facet-rail { position: static; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
  .split { grid-template-columns: 1fr; }
  .sticky { position: static; }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .rail { position: fixed; z-index: 60; left: 0; top: 0; width: 272px; transform: translateX(-102%); transition: transform .2s; }
  .nav-toggle:checked ~ .shell .rail { transform: none; }
  .nav-toggle:checked ~ .shell .rail-scrim { display: block; position: fixed; inset: 0; z-index: 55; background: rgba(2, 6, 23, .45); }
  .nav-burger { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; min-height: 40px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); cursor: pointer; font-size: 18px; }
  .topbar { padding: 10px 16px; }
  .topbar-actions { display: none; }
  body.console main { padding: 18px 16px 110px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .search-form { grid-template-columns: 1fr; }
  .console-grid { display: flex; flex-direction: column; }
  .console-grid .facet-rail { order: 2; }
  /* stage-strip: horizontal scroll so all 5 tiles are reachable without wrapping */
  .stage-strip { display: flex; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .stage-strip a { flex: 0 0 auto; min-width: 110px; border-right: 1px solid var(--line); }
  /* page-head: hide the description paragraph to save vertical space */
  .page-head .lede { display: none; }
  /* head actions: let the view-switch + buttons wrap to a second row */
  body.console .contacts-head-actions { flex-wrap: wrap; justify-content: flex-start; }
  .theme-pick { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .preview-frame { height: 560px; }
}
@media (max-width: 480px) {
  body.console main { padding: 14px 12px 100px; }
  body.console h1 { font-size: 22px; }
  .stage-strip a { min-width: 88px; padding: 10px 12px; }
  .stage-strip b { font-size: 18px; }
  .page-head { margin-bottom: 14px; }
  /* hide the secondary Découvrir ghost button — it's in the slide-out rail nav */
  body.console .contacts-head-actions .btn.ghost { display: none; }
  body.console .contacts-head-actions { gap: 6px; }
  /* touch-friendly action buttons in contact rows */
  body.console .btn.tiny { min-height: 38px; padding: 8px 10px; }
  /* agent meters are noise on a narrow screen */
  .agent-meters { display: none; }
}

[hidden] { display: none !important; }

/* Configuration: « Moi » tab + tab groups */
#tab-s-moi:checked ~ .tab-bar label[for="tab-s-moi"] { color: var(--ink); border-color: var(--gold-deep); }
#tab-s-moi:checked ~ #panel-s-moi { display: block; }
.tab-bar.grouped { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 2px 6px; }
.tab-bar.grouped .tab-group { font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 700; padding: 0 4px 10px 14px; border-left: 1px solid var(--line); margin-left: 6px; }
.tab-bar.grouped .tab-group:first-child { border-left: 0; margin-left: 0; padding-left: 0; }
.tab-bar.grouped .tab-group:empty { padding-left: 6px; }

.tab-bar.grouped label { display: inline-flex; align-items: center; gap: 6px; }
.tab-bar.grouped label .tab-flag { position: static; margin: 0; }

/* template studio: content checkboxes */
.content-pick { border: 1px solid var(--line); border-radius: 14px; padding: 16px; background: #fbfbff; display: grid; gap: 12px; }
.pick-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 14px; }
.pick-head span { font-size: 12.5px; }
.pick-grid + .pick-head, .pick-grid + p + .pick-head { margin-top: 8px; }
.pick-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.pick-item { flex-direction: row !important; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; }
.pick-item:has(input:checked) { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(109, 94, 252, .12); }
.pick-item input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--gold); flex: none; }
.pick-item span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pick-item b { font-size: 13.5px; }
.pick-item small { color: var(--muted); font-size: 12px; line-height: 1.35; }
.pick-item em { font-style: normal; font-size: 11px; color: #b45309; }
@media (max-width: 860px) { .pick-grid { grid-template-columns: 1fr; } }

/* template studio: AI subject lines */
.subject-row { display: flex; gap: 8px; align-items: flex-end; }
.subject-row label { flex: 1; }
.subject-row .btn { white-space: nowrap; margin-bottom: 2px; }
.subj-picks { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); margin-top: -4px; }
.subj-picks button { text-align: left; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; font: inherit; color: var(--ink, #0f172a); }
.subj-picks button:hover { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(109, 94, 252, .12); }

/* configuration: optional English copy */
.en-copy { border: 1px dashed var(--line); border-radius: 10px; padding: 8px 12px; background: #fbfbff; }
.en-copy summary { cursor: pointer; font-size: 13px; color: var(--muted); }
.en-copy[data-filled] summary { color: var(--ink, #0f172a); }
.prod .en-copy { margin: 8px 0; }
.prod .en-copy .stack { margin-top: 8px; gap: 6px; }
