/* MANDA Agency: the CEO / Reports gold on ink, like Black Spider. Phone first (one calm column), then tablet and computer. */
:root {
  --ink: #14110A; --ink2: #1D180E; --ink3: #2A2110; --line: #3A2F18;
  --gold: #CFA53C; --gold-lt: #EBD597; --gold-dk: #9A7A22;
  --ivory: #F6F2EA; --mute: #B7AB90; --dim: #8F836A;
  --alert: #E8806F; --silent: #E3A94F; --calm: #7FBF9E; --unk: #9A8F76;
  --r: 14px;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { min-height: 100%; background: var(--ink); color: var(--ivory); font-family: 'DM Sans', system-ui, sans-serif; font-size: 15px; line-height: 1.45; -webkit-text-size-adjust: 100%; }
body { overflow-x: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 6px; }
.ti { line-height: 1; }

/* ── gate ── */
.gate { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 24px; background: radial-gradient(120% 90% at 50% 0%, #2A2110 0%, #14110A 60%); }
.gate-card { width: 100%; max-width: 340px; text-align: center; padding: 34px 26px 22px; border: 1px solid var(--line); border-radius: 22px; background: rgba(29, 24, 14, .86); }
.gate-mark { border-radius: 16px; margin-bottom: 14px; }
.gate-name { font-family: 'Playfair Display', serif; font-size: 28px; color: var(--gold-lt); }
.gate-sub { font-size: 12.5px; color: var(--mute); margin: 2px 0 24px; letter-spacing: .04em; }
#pin-input { width: 100%; height: 54px; text-align: center; font-size: 26px; letter-spacing: .5em; text-indent: .5em; background: var(--ink); border: 1px solid var(--line); border-radius: 12px; }
#pin-input::placeholder { font-size: 14px; letter-spacing: .1em; text-indent: 0; color: var(--dim); }
#pin-input:focus { border-color: var(--gold); outline: none; }
.gate-btn { display: block; width: 100%; min-height: 48px; margin-top: 12px; border-radius: 12px; background: var(--gold); color: #1A1408; font-weight: 700; font-size: 15px; }
.gate-btn:active { background: var(--gold-lt); }
.gate-err { min-height: 20px; margin-top: 10px; font-size: 13px; color: var(--alert); }
.gate-device { display: none; }
.gate-device.show { display: block; }
.gate-device > .ti { font-size: 38px; color: var(--gold); }
.gate-h { font-family: 'Playfair Display', serif; font-size: 21px; margin: 8px 0 6px; }
.gate-device p { font-size: 13.5px; color: var(--mute); }
.gate-ver { margin-top: 22px; font-size: 11px; color: var(--dim); letter-spacing: .08em; }

/* ── bar and navigation ── */
.bar { position: sticky; top: 0; z-index: 20; background: rgba(20, 17, 10, .96); border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top); backdrop-filter: blur(8px); }
.bar-in { display: flex; align-items: center; gap: 12px; max-width: 1040px; margin: 0 auto; padding: 10px 16px; }
.bar-mark { border-radius: 9px; flex: none; }
.bar-title { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.bar-title span { font-family: 'Playfair Display', serif; font-size: 19px; color: var(--gold-lt); line-height: 1.1; }
.bar-title small { font-size: 11.5px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-btn { flex: none; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); display: grid; place-items: center; font-size: 19px; color: var(--gold); }
.bar-btn.spin .ti { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.side, .bar-page { display: none; }
.tabs { display: none; gap: 4px; }
.tab { display: flex; align-items: center; gap: 7px; min-height: 44px; padding: 0 16px; border-radius: 12px; color: var(--mute); font-weight: 500; }
.tab.on { background: var(--gold); color: #1A1408; font-weight: 700; }
.tab .n { min-width: 20px; padding: 1px 6px; border-radius: 10px; background: var(--alert); color: #1A0A07; font-size: 11.5px; font-weight: 700; text-align: center; }
.bottom { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; background: rgba(20, 17, 10, .97); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); backdrop-filter: blur(8px); }
.bt { flex: 1; min-height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11.5px; font-weight: 500; color: var(--dim); position: relative; }
.bt .ti { font-size: 21px; }
.bt.on { color: var(--gold); }
.bt .n { position: absolute; top: 5px; left: calc(50% + 6px); min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--alert); color: #1A0A07; font-size: 11px; font-weight: 700; text-align: center; }

.banner { max-width: 1040px; margin: 12px auto 0; padding: 12px 16px; border-radius: var(--r); background: var(--ink3); border: 1px solid var(--gold-dk); color: var(--gold-lt); font-size: 13.5px; display: flex; gap: 10px; align-items: center; }
.banner a, .banner button { margin-left: auto; flex: none; min-height: 40px; display: inline-flex; align-items: center; padding: 0 14px; border-radius: 10px; background: var(--gold); color: #1A1408; font-weight: 700; font-size: 13px; }

.main { max-width: 1040px; margin: 0 auto; padding: 16px 16px calc(96px + env(safe-area-inset-bottom)); }
h2.sec { font-family: 'Playfair Display', serif; font-weight: 500; font-size: 20px; color: var(--gold-lt); margin: 22px 0 4px; }
h2.sec:first-child { margin-top: 4px; }
.sec-sub { font-size: 12.5px; color: var(--mute); margin-bottom: 12px; }
.empty { padding: 22px 16px; text-align: center; color: var(--mute); border: 1px dashed var(--line); border-radius: var(--r); font-size: 14px; }
.err { padding: 14px 16px; border-radius: var(--r); background: #3A1A14; border: 1px solid #7A3A2C; color: #F2B6A8; font-size: 13.5px; }
.note { padding: 12px 14px; border-radius: var(--r); background: var(--ink2); border: 1px solid var(--line); color: var(--mute); font-size: 13px; }

/* ── surfaces ── */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 14px; }
.tile { padding: 11px 8px; text-align: center; border-radius: var(--r); background: var(--ink2); border: 1px solid var(--line); min-width: 0; }
.tile b { display: block; font-family: 'Playfair Display', serif; font-size: 26px; line-height: 1.1; }
.tile span { font-size: 11px; color: var(--mute); }
.tile.alert b { color: var(--alert); } .tile.silent b { color: var(--silent); } .tile.calm b { color: var(--calm); } .tile.unknown b { color: var(--unk); }
.grid { display: grid; gap: 10px; grid-template-columns: 1fr; }
.card { min-width: 0; padding: 13px 14px; border-radius: var(--r); background: var(--ink2); border: 1px solid var(--line); text-align: left; width: 100%; display: block; }
button.card:active { background: var(--ink3); }
.card.alert { border-color: #8A4A3C; } .card.silent { border-color: #8A6A2C; }
.card-h { display: flex; align-items: flex-start; gap: 10px; }
.card-n { flex: 1; min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.card-m { font-size: 12.5px; color: var(--mute); margin-top: 3px; overflow-wrap: anywhere; }
.chip { flex: none; display: inline-block; padding: 2px 9px; border-radius: 10px; font-size: 11.5px; font-weight: 700; border: 1px solid currentColor; white-space: nowrap; }
.chip.alert, .chip.critical, .chip.high { color: var(--alert); } .chip.silent, .chip.medium { color: var(--silent); } .chip.calm { color: var(--calm); }
.chip.unknown, .chip.info, .chip.low { color: var(--unk); }
.chip.kind { color: var(--mute); font-weight: 500; }

/* ── ledger ── */
.filters { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.filters .wide { grid-column: 1 / -1; }
.filters select, .filters input { width: 100%; min-height: 46px; padding: 0 12px; border-radius: 12px; background: var(--ink2); border: 1px solid var(--line); min-width: 0; }
.filters select:focus, .filters input:focus { border-color: var(--gold); outline: none; }
.ev { border-top: 1px solid var(--line); }
.ev:first-child { border-top: 0; }
.ev-row { display: flex; gap: 10px; align-items: flex-start; width: 100%; min-height: 56px; padding: 11px 2px; text-align: left; }
.dot { flex: none; width: 10px; height: 10px; border-radius: 50%; margin-top: 6px; background: var(--unk); }
.dot.critical, .dot.high { background: var(--alert); } .dot.medium { background: var(--silent); } .dot.low { background: #6E8E7E; }
.ev-b { flex: 1; min-width: 0; }
.ev-s { overflow-wrap: anywhere; }
.ev-m { font-size: 12px; color: var(--mute); margin-top: 2px; overflow-wrap: anywhere; }
.ev-d { padding: 0 2px 14px 20px; font-size: 12.5px; color: var(--mute); }
.ev-d dl { display: grid; grid-template-columns: 110px 1fr; gap: 4px 10px; margin-bottom: 8px; }
.ev-d dt { color: var(--dim); } .ev-d dd { overflow-wrap: anywhere; color: var(--ivory); }
pre { max-width: 100%; overflow: auto; padding: 10px 12px; border-radius: 10px; background: var(--ink); border: 1px solid var(--line); font: 12px/1.5 ui-monospace, Menlo, Consolas, monospace; color: var(--gold-lt); white-space: pre-wrap; overflow-wrap: anywhere; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.btn { min-height: 44px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--ink2); font-weight: 600; font-size: 13.5px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.btn.gold { background: var(--gold); color: #1A1408; border-color: var(--gold); }
.btn.on { border-color: var(--gold); color: var(--gold); }
.btn:disabled { opacity: .5; }
.more-row { text-align: center; margin-top: 14px; }

/* ── alerts ── */
.seg { display: inline-flex; padding: 3px; border-radius: 12px; background: var(--ink2); border: 1px solid var(--line); margin-bottom: 12px; }
.seg button { min-height: 40px; padding: 0 18px; border-radius: 9px; color: var(--mute); font-weight: 600; }
.seg button.on { background: var(--gold); color: #1A1408; }
.al { margin-bottom: 10px; }
.al textarea { width: 100%; min-height: 70px; margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: var(--ink); border: 1px solid var(--line); resize: vertical; }
.al textarea:focus { border-color: var(--gold); outline: none; }

/* ── more ── */
.list { padding-left: 18px; color: var(--mute); font-size: 13.5px; }
.list li { margin: 5px 0; }
.kv { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; font-size: 13.5px; }
.kv span:nth-child(odd) { color: var(--mute); }

.toast { position: fixed; left: 50%; bottom: calc(80px + env(safe-area-inset-bottom)); transform: translateX(-50%); max-width: calc(100vw - 32px); padding: 11px 16px; border-radius: 12px; background: var(--gold); color: #1A1408; font-weight: 600; font-size: 13.5px; z-index: 60; display: none; }
.toast.show { display: block; }

/* ── tablet and computer ── */
@media (min-width: 821px) {
  .bottom { display: none; }
  .main { padding-bottom: 40px; }
  .grid { grid-template-columns: 1fr 1fr; }
  .tiles { gap: 12px; } .tile b { font-size: 30px; }
  .toast { bottom: 28px; }
  .filters { grid-template-columns: 180px 220px 1fr; }
  .filters .wide { grid-column: auto; }
}
@media (min-width: 1100px) { .grid { grid-template-columns: 1fr 1fr 1fr; } }
@media (max-width: 420px) { .ev-d dl { grid-template-columns: 90px 1fr; } .tile b { font-size: 22px; } }
@media (prefers-reduced-motion: reduce) { .bar-btn.spin .ti { animation: none; } }

/* ═══ MANDA Agency ═══ */
.tile.plain b { color: var(--gold-lt); }
.tile.good b { color: var(--calm); }
.tile.warn b { color: var(--silent); }
.tiles.two { grid-template-columns: 1fr 1fr; }
.tiles.four { grid-template-columns: 1fr 1fr; }
.tile small { display: block; margin-top: 2px; font-size: 11px; color: var(--dim); }

/* places meter and money strip */
.places { padding: 14px 16px; border-radius: var(--r); background: var(--ink2); border: 1px solid var(--line); margin-bottom: 12px; }
.places-top { display: flex; align-items: baseline; gap: 10px; }
.places-top b { font-family: 'Playfair Display', serif; font-size: 28px; color: var(--gold-lt); line-height: 1; }
.places-top span { color: var(--mute); font-size: 13.5px; }
.meter { margin-top: 10px; height: 10px; border-radius: 6px; background: var(--ink); border: 1px solid var(--line); overflow: hidden; }
.meter i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold-dk), var(--gold)); }
.meter.full i { background: linear-gradient(90deg, #B8742E, var(--silent)); }
.money { margin-top: 10px; font-size: 13px; color: var(--mute); }
.money b { color: var(--ivory); font-weight: 600; }

.stack { display: grid; gap: 10px; }
.chip.prospect { color: var(--unk); } .chip.onboarding { color: var(--silent); } .chip.active { color: var(--calm); }
.chip.paused { color: var(--mute); } .chip.ended { color: var(--dim); }
.chip.google { color: #8AB4F8; } .chip.meta { color: #B79CFF; } .chip.other { color: var(--mute); }
.chip.new { color: #8AB4F8; } .chip.contacted { color: var(--silent); } .chip.won { color: var(--calm); } .chip.lost { color: var(--alert); }
.chip.partner { color: var(--gold-lt); font-weight: 500; }
.card .row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.card .stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 10px; }
.card .stats div { padding: 7px 8px; border-radius: 10px; background: var(--ink); border: 1px solid var(--line); text-align: center; min-width: 0; }
.card .stats b { display: block; font-size: 15px; color: var(--ivory); overflow-wrap: anywhere; }
.card .stats span { font-size: 10.5px; color: var(--dim); }
.btn.small { min-height: 40px; padding: 0 12px; font-size: 13px; }
.btn.block { width: 100%; }
.btn.danger { border-color: #7A3A2C; color: #F2B6A8; }
.head-row { display: flex; align-items: center; gap: 10px; margin: 18px 0 8px; }
.head-row h2.sec { margin: 0; flex: 1; }
.fold { margin-top: 18px; }
.fold > summary { list-style: none; cursor: pointer; min-height: 44px; display: flex; align-items: center; gap: 8px; color: var(--mute); font-weight: 600; }
.fold > summary::-webkit-details-marker { display: none; }

/* filters row */
.pick { display: grid; grid-template-columns: 1fr; gap: 8px; margin-bottom: 12px; }
.pick select { width: 100%; min-height: 48px; padding: 0 12px; border-radius: 12px; background: var(--ink2); border: 1px solid var(--line); min-width: 0; }
.pick select:focus { border-color: var(--gold); outline: none; }

/* by channel and by week */
.bars { display: grid; gap: 9px; }
.bar-row { display: grid; grid-template-columns: 96px 1fr auto; gap: 8px; align-items: center; font-size: 13px; }
.bar-row .lbl { color: var(--mute); overflow-wrap: anywhere; }
.bar-row .trk { height: 12px; border-radius: 7px; background: var(--ink); border: 1px solid var(--line); overflow: hidden; }
.bar-row .trk i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold-dk), var(--gold)); }
.bar-row .val { color: var(--ivory); font-weight: 600; text-align: right; white-space: nowrap; }
.bar-row .val small { color: var(--dim); font-weight: 400; }
.weeks { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; align-items: end; height: 92px; margin-top: 8px; }
.weeks div { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; min-width: 0; }
.weeks i { display: block; width: 100%; min-height: 2px; border-radius: 4px 4px 0 0; background: linear-gradient(180deg, var(--gold), var(--gold-dk)); }
.weeks span { margin-top: 5px; font-size: 10px; color: var(--dim); }
.weeks b { margin-bottom: 3px; font-size: 11px; color: var(--ivory); font-weight: 600; }

/* leads */
.lead { padding: 13px 14px; border-radius: var(--r); background: var(--ink2); border: 1px solid var(--line); }
.lead-top { display: flex; gap: 10px; align-items: flex-start; }
.lead-n { flex: 1; min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.lead-m { font-size: 12.5px; color: var(--mute); margin-top: 3px; overflow-wrap: anywhere; }
.lead-m a { color: var(--gold-lt); }
.lead-msg { margin-top: 8px; font-size: 13px; color: var(--mute); white-space: pre-wrap; overflow-wrap: anywhere; }
.seg4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 10px; }
.seg4 button { min-height: 44px; border-radius: 10px; border: 1px solid var(--line); background: var(--ink); color: var(--mute); font-size: 12.5px; font-weight: 600; }
.seg4 button.on { background: var(--gold); border-color: var(--gold); color: #1A1408; }

/* forms (in the sheet and in Settings) */
.f { margin-bottom: 12px; }
.f label { display: block; margin-bottom: 5px; font-size: 12.5px; color: var(--mute); }
.f input, .f select, .f textarea { width: 100%; min-height: 48px; padding: 0 12px; border-radius: 12px; background: var(--ink); border: 1px solid var(--line); min-width: 0; }
.f textarea { padding: 10px 12px; min-height: 84px; resize: vertical; }
.f input:focus, .f select:focus, .f textarea:focus { border-color: var(--gold); outline: none; }
.f small { display: block; margin-top: 4px; font-size: 11.5px; color: var(--dim); }
.f2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.f2 > .f { min-width: 0; }
.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.check { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: 12px; background: var(--ink); border: 1px solid var(--line); color: var(--ivory); }
.check input { width: 20px; height: 20px; min-height: 0; accent-color: var(--gold); }
.f label.check { display: inline-flex; margin-bottom: 0; font-size: 14px; color: var(--ivory); }
.f label.check input { width: 20px; padding: 0; flex: none; }
.ferr { min-height: 18px; margin: 4px 0 10px; font-size: 13px; color: var(--alert); }
.sheet-t { font-family: 'Playfair Display', serif; font-size: 22px; color: var(--gold-lt); margin-bottom: 2px; }
.sheet-s { font-size: 12.5px; color: var(--mute); margin-bottom: 14px; }
.sheet-btns { display: grid; gap: 10px; margin-top: 8px; }

/* the sheet */
.sheet-bg { position: fixed; inset: 0; z-index: 40; background: rgba(0, 0, 0, .62); display: flex; align-items: flex-end; justify-content: center; }
.sheet { width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto; overscroll-behavior: contain; background: var(--ink2); border: 1px solid var(--line); border-bottom: 0; border-radius: 22px 22px 0 0; padding: 8px 16px calc(24px + env(safe-area-inset-bottom)); }
.sheet-grip { width: 44px; height: 5px; border-radius: 3px; background: var(--line); margin: 6px auto 12px; }
@media (min-width: 821px) { .sheet-bg { align-items: center; } .sheet { border-radius: 22px; border-bottom: 1px solid var(--line); max-height: 88vh; } }
body.sheet-open { overflow: hidden; }

.copybox { position: relative; }
.copybox pre { padding-right: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }

@media (min-width: 821px) {
  .tiles.four { grid-template-columns: repeat(4, 1fr); }
  .pick { grid-template-columns: 1fr 1fr; }
  .stack.cols { grid-template-columns: 1fr 1fr; }
}


/* ═══ Ad forecast: a sidebar on a computer, a full-screen panel on a phone ═══ */
.fc-btn span { display: none; }
.fc { position: fixed; inset: 0; z-index: 30; overflow-y: auto; overscroll-behavior: contain; background: var(--ink); padding-top: env(safe-area-inset-top); padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
.fc-in { max-width: 560px; margin: 0 auto; padding: 14px 16px 8px; }
.fc-head { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px; }
.fc-head > div { flex: 1; min-width: 0; }
.fc-head h2 { font-family: 'Playfair Display', serif; font-weight: 500; font-size: 22px; color: var(--gold-lt); line-height: 1.15; }
.fc-head p { font-size: 12.5px; color: var(--mute); margin-top: 3px; }
.fc-x { flex: none; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); display: grid; place-items: center; font-size: 19px; color: var(--gold); }
.fc-acts { display: flex; flex-wrap: wrap; gap: 8px; margin: 2px 0 14px; }
.fc-acts .btn { min-height: 44px; }
.fc-note { font-size: 12px; color: var(--dim); margin: -6px 0 12px; }
.fc-warn { padding: 12px 14px; border-radius: var(--r); background: #2B2110; border: 1px solid #6E5420; color: var(--gold-lt); font-size: 13.5px; }
.fc-sticky { position: sticky; top: 0; z-index: 2; margin: 0 -16px 12px; padding: 8px 16px; background: var(--ink); border-bottom: 1px solid var(--line); }
.fc-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.fc-tiles .tile { padding: 8px 6px; }
.fc-tiles .tile b { font-size: 20px; color: var(--gold-lt); overflow-wrap: anywhere; }
.fc-tiles .tile.good b { color: var(--calm); }
.fc-h { font-family: 'Playfair Display', serif; font-weight: 500; font-size: 17px; color: var(--gold-lt); margin: 16px 0 6px; }
.fc-rows { border: 1px solid var(--line); border-radius: var(--r); background: var(--ink2); overflow: hidden; }
.fc-row { display: grid; grid-template-columns: minmax(0, 1fr) 76px 92px; gap: 8px; align-items: baseline; padding: 9px 12px; border-bottom: 1px solid var(--line); }
.fc-row:last-child { border-bottom: 0; }
.fc-row.hd { font-size: 11px; color: var(--dim); text-transform: uppercase; letter-spacing: .05em; padding-top: 7px; padding-bottom: 7px; background: var(--ink); }
.fc-row .l b { font-weight: 600; }
.fc-row .l small { display: block; font-size: 11.5px; color: var(--mute); }
.fc-row .v { text-align: right; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.fc-row.key { background: var(--ink3); }
.fc-ladder .fc-row { grid-template-columns: 52px repeat(4, minmax(0, 1fr)); }
.fc-ladder .fc-row .v, .fc-ladder .fc-row .l { font-size: 13px; }
.fc-ladder .fc-row.me { background: var(--ink3); }
.fc-foot { font-size: 11.5px; color: var(--dim); margin-top: 10px; }
body.fc-lock { overflow: hidden; }
@media (min-width: 821px) {
  .fc-btn { width: auto; padding: 0 14px; gap: 8px; }
  .fc-btn span { display: inline; font-size: 13.5px; font-weight: 600; }
  .fc-btn[aria-expanded="true"] { border-color: var(--gold); background: var(--ink3); }
  .fc { inset: auto; top: 65px; right: 0; bottom: 0; width: 380px; z-index: 15; border-left: 1px solid var(--line); background: var(--ink2); padding-bottom: 24px; }
  .fc-in { padding: 18px 18px 8px; }
  .fc-sticky { margin: 0 -18px 12px; padding: 8px 18px; background: var(--ink2); }
  .app.fc-open .main { margin: 0 380px 0 0; max-width: none; padding-left: 24px; padding-right: 24px; }
  body.fc-lock { overflow: auto; }
}

/* ── the ad setup wizard: one calm column, full screen on a phone ── */
.wiz { position: fixed; inset: 0; z-index: 45; background: var(--ink); display: flex; justify-content: center; }
.wiz[hidden] { display: none !important; }
body.wiz-open { overflow: hidden; }
.wiz-in { width: 100%; max-width: 640px; height: 100%; display: flex; flex-direction: column; }
.wiz-top { display: flex; align-items: center; gap: 12px; padding: calc(8px + env(safe-area-inset-top)) 16px 8px; }
.wiz-who { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.wiz-who b { font-family: 'Playfair Display', serif; font-weight: 500; font-size: 18px; color: var(--gold-lt); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wiz-who small { font-size: 12px; color: var(--dim); }
.wiz-prog { height: 4px; margin: 0 16px; border-radius: 3px; background: var(--line); overflow: hidden; }
.wiz-prog i { display: block; height: 100%; width: 0; background: var(--gold); transition: width .25s; }
.wiz-head { padding: 14px 16px 4px; }
.wiz-head h2 { font-family: 'Playfair Display', serif; font-weight: 500; font-size: 24px; color: var(--ivory); line-height: 1.15; outline: none; }
.wiz-head p { font-size: 13px; color: var(--mute); margin-top: 4px; }
.wiz-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 12px 16px 20px; }
.wz-note-l { margin: 0 16px 6px; padding: 8px 12px; border-radius: 10px; border: 1px solid #8A6A2C; color: var(--silent); font-size: 12.5px; }
.wiz-foot { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; padding: 10px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: rgba(20, 17, 10, .97); }
.wiz-foot .btn { min-height: 52px; font-size: 16px; }
.wiz-foot .btn[hidden] { display: none; }
.wz-say { display: flex; gap: 9px; align-items: flex-start; margin-bottom: 14px; padding: 10px 12px; border-radius: 12px; background: var(--ink3); border: 1px solid var(--line); color: var(--gold-lt); font-size: 13.5px; }
.wz-say .ti { font-size: 18px; flex: none; margin-top: 1px; }
.wz-note { font-size: 12.5px; color: var(--mute); margin: 8px 0 12px; }
.wz-n { margin-left: 6px; font-size: 11.5px; color: var(--dim); }
.wz-n.over { color: var(--alert); font-weight: 700; }
.wz-seg { display: grid; gap: 6px; }
.wz-seg.c2 { grid-template-columns: repeat(2, 1fr); } .wz-seg.c3 { grid-template-columns: repeat(3, 1fr); }
.wz-seg button { min-height: 46px; padding: 6px 8px; border-radius: 10px; border: 1px solid var(--line); background: var(--ink); color: var(--mute); font-size: 13px; font-weight: 600; line-height: 1.2; }
.wz-seg button.on { background: var(--gold); border-color: var(--gold); color: #1A1408; }
.wz-cards { display: grid; gap: 10px; margin-bottom: 8px; }
.wz-card { display: flex; flex-direction: column; gap: 2px; align-items: flex-start; text-align: left; min-height: 64px; padding: 12px 14px; border-radius: var(--r); border: 1px solid var(--line); background: var(--ink2); }
.wz-card b { font-size: 16px; color: var(--ivory); } .wz-card span { font-size: 12.5px; color: var(--mute); }
.wz-card.on { border-color: var(--gold); background: var(--ink3); } .wz-card.on b { color: var(--gold-lt); }
.wz-item { margin: 0 0 14px; padding: 12px 12px 6px; border-radius: var(--r); border: 1px solid var(--line); background: var(--ink2); }
.wz-item > .btn { margin: 0 0 8px; }
.wz-item-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; color: var(--gold-lt); }
.wz-x { width: 44px; height: 44px; margin: -8px -6px -8px 0; display: grid; place-items: center; color: var(--mute); font-size: 18px; }
.wz-row { margin-bottom: 12px; } .wz-row-t { font-size: 14px; margin-bottom: 6px; }
.wz-how { margin: 0 0 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--ink2); }
.wz-how summary { min-height: 44px; display: flex; align-items: center; gap: 8px; padding: 0 12px; cursor: pointer; color: var(--gold-lt); font-size: 13.5px; font-weight: 600; }
.wz-how .list { padding: 0 14px 10px 32px; }
.wz-ideas { margin-bottom: 14px; padding: 10px 12px; border-radius: 12px; background: var(--ink3); border: 1px solid var(--line); font-size: 13px; color: var(--mute); }
.wz-ideas b { display: block; color: var(--gold-lt); margin-bottom: 3px; }
.wz-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 0 12px 6px; }
.wz-fc { margin: 4px 0 14px; padding: 12px; border-radius: var(--r); border: 1px solid var(--line); background: var(--ink2); }
.wz-fc > b { display: block; margin-bottom: 8px; color: var(--gold-lt); font-size: 14px; }
.wz-fc small { display: block; margin-top: 8px; font-size: 11.5px; color: var(--dim); }
.wz-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.wz-tiles div { padding: 8px 6px; border-radius: 10px; background: var(--ink); border: 1px solid var(--line); text-align: center; min-width: 0; }
.wz-tiles b { display: block; font-size: 16px; color: var(--ivory); overflow-wrap: anywhere; } .wz-tiles span { font-size: 10.5px; color: var(--dim); }
.wz-big { text-align: center; padding: 14px 0 6px; } .wz-big b { display: block; font-family: 'Playfair Display', serif; font-size: 34px; color: var(--gold-lt); } .wz-big span { font-size: 13px; color: var(--mute); }
.wz-miss { margin-bottom: 10px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--ink2); }
.wz-miss-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; } .wz-miss .list { margin: 4px 0 0; }
.wz-launch { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 14px; }
.wz-launch small { font-weight: 400; color: var(--mute); }
@media (min-width: 821px) { .wiz { padding: 24px 0; background: rgba(0, 0, 0, .66); } .wiz-in { height: 100%; max-height: 900px; border: 1px solid var(--line); border-radius: 22px; background: var(--ink); overflow: hidden; } .wz-cards { grid-template-columns: repeat(3, 1fr); } }

.wiz .btn.small { min-height: 44px; }
.auto-fig{min-height:44px;display:flex;flex-direction:column;justify-content:center;padding:6px 2px}
.auto-fig b{font-size:1.15rem}
.auto-fig small{color:var(--mute)}

/* ── the sidebar: the MANDA OS layout ("option A", as in the CEO and Growth apps) in the Agency's ink and gold ──
   Computers and tablets only (the phone keeps its bottom bar). A brand block over a thin gold rule, small capitalised group headings, and
   under each an icon beside a sentence-case name; the page you are on sits in a gold frame. Counts are gold pills with dark figures. */
@media (min-width: 821px) {
  .app { display: grid; grid-template-columns: 232px minmax(0, 1fr); align-items: start; min-height: 100vh; }
  .app-main { min-width: 0; }
  .side { display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; z-index: 25;
    background: linear-gradient(180deg, #1E180C, #14110A 40%); border-right: 1px solid rgba(207, 165, 60, .22); }
  .side-brand { position: relative; display: flex; align-items: center; gap: 11px; padding: 18px 18px 15px; flex: none; }
  .side-brand::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold) 30%, var(--gold-lt) 50%, var(--gold) 70%, transparent); }
  .side-mark { width: 38px; height: 38px; display: block; flex: none; }
  .side-n { font-family: 'Playfair Display', serif; font-size: 19px; font-weight: 600; color: #F6EEDB; letter-spacing: 2.5px; line-height: 1; white-space: nowrap; }
  .side-os { font-family: 'DM Sans', sans-serif; font-size: 9.5px; font-weight: 500; letter-spacing: 1px; vertical-align: top; position: relative; top: -1px; margin-left: 3px; color: var(--gold); }
  .side-s { font-size: 8px; font-weight: 600; letter-spacing: 2.2px; text-transform: uppercase; color: var(--gold); margin-top: 5px; white-space: nowrap; }
  .tabs { display: flex; flex-direction: column; gap: 1px; flex: 1; min-height: 0; overflow-y: auto; padding: 6px 10px 10px; margin: 0; }
  .side-grp { font-size: 9px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; color: rgba(207, 165, 60, .62); padding: 14px 10px 6px; }
  .tabs .tab { min-height: 0; padding: 7px 10px; gap: 10px; border: 1px solid transparent; border-radius: 9px; font-size: 13.5px; font-weight: 500; color: #E9DFC8; text-align: left;
    transition: background .15s, border-color .15s, color .15s; }
  .tabs .tab i { font-size: 18px; width: 19px; text-align: center; line-height: 1; flex: none; color: var(--gold); }
  .tabs .tab .lbl { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .tabs .tab.on { background: rgba(207, 165, 60, .15); border-color: rgba(207, 165, 60, .42); color: #fff; font-weight: 500; }
  .tabs .tab:not(.on):hover { background: rgba(207, 165, 60, .07); }
  .tabs .tab:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
  .tabs .tab .n { margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--gold); color: var(--ink); font-size: 10px; font-weight: 700; line-height: 18px; }
  .side-foot { display: flex; align-items: center; gap: 8px; padding: 10px 14px; flex: none; background: rgba(0, 0, 0, .18); border-top: 1px solid rgba(207, 165, 60, .14); }
  .side-lock { display: flex; align-items: center; gap: 7px; min-height: 36px; padding: 0 10px; border-radius: 9px; border: 1px solid transparent; color: rgba(233, 223, 200, .7); font-size: 13px; font-weight: 500; }
  .side-lock i { font-size: 16px; color: rgba(207, 165, 60, .75); }
  .side-lock:hover { background: rgba(207, 165, 60, .1); border-color: rgba(207, 165, 60, .24); color: #fff; }
  .side-lock:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
  .side-ver { margin-left: auto; font-size: 10.5px; color: var(--dim); letter-spacing: .06em; }
  /* the top bar becomes the page's title bar */
  .bar-mark, .bar-title { display: none; }
  .bar-page { display: block; margin-right: auto; font-family: 'Playfair Display', serif; font-size: 24px; font-weight: 600; color: var(--gold-lt); }
  .bar-in { padding: 10px 24px; }
  .fc-btn { display: flex; align-items: center; justify-content: center; }
}
.pack-sum { font-size: 13px; color: var(--mute); margin: 8px 0 0; }
.pack-sum b { color: var(--gold-lt); font-size: 15px; }
