/* Laidback Machine · LBM Ads — app styles */
:root {
  --ink: #14161f;
  --ink-2: #2a2e3b;
  --paper: #f7f5f0;
  --card: #ffffff;
  --line: #e7e2d8;
  --line-2: #d8d2c4;
  --muted: #676b78;
  --sun: #ff6a2b;
  --sun-2: #ffe4d6;
  --sea: #0f9d8a;
  --sea-2: #d7f3ee;
  --sky: #3559e0;
  --sky-2: #e2e8ff;
  --ok: #157a3c;
  --warn: #b45309;
  --err: #c0262d;
  --r: 12px;
  --shadow: 0 1px 2px rgba(20,22,31,.05), 0 6px 24px rgba(20,22,31,.06);
  --head: 'Bricolage Grotesque', ui-sans-serif, system-ui, sans-serif;
  --body: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 15px/1.55 var(--body); }
a { color: var(--sky); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--head); letter-spacing: -.01em; line-height: 1.15; margin: 0 0 .5em; }
h2 { font-size: 1.35rem; } h3 { font-size: 1.08rem; }
p { margin: 0 0 1em; }
small, .muted { color: var(--muted); }
code, pre { font-family: var(--mono); font-size: .86em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }
.ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.mark { width: 28px; height: 28px; flex: none; vertical-align: middle; }

/* ── App shell ─────────────────────────────────────────── */
.shell { display: grid; grid-template-columns: 252px 1fr; min-height: 100vh; }
.side { background: var(--ink); color: #c9ccd6; padding: 18px 12px; display: flex; flex-direction: column; gap: 6px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.side .brand { color: #fff; display: flex; align-items: center; gap: 10px; font: 700 1.08rem var(--head); padding: 4px 8px 14px; text-decoration: none; }
.side .brand .mark rect { fill: #262a38; }
.side-group { margin-top: 8px; }
.side-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; color: #7e8394; padding: 8px 10px 4px; }
.side-link { display: flex; align-items: center; gap: 10px; color: #c9ccd6; padding: 8px 10px; border-radius: 9px; font-size: .92rem; }
.side-link:hover { background: #20232f; color: #fff; text-decoration: none; }
.side-link.on { background: #262a38; color: #fff; box-shadow: inset 3px 0 0 var(--sun); }
.side-link .badge { background: var(--sun); color: #fff; border-radius: 99px; padding: 0 7px; font-size: .72rem; margin-left: 4px; }
.side-foot { margin-top: auto; border-top: 1px solid #262a38; padding: 14px 10px 4px; font-size: .85rem; display: flex; justify-content: space-between; align-items: end; gap: 8px; }
.side-foot .who { display: flex; flex-direction: column; } .side-foot .who b { color: #fff; } .side-foot .who span { color: #7e8394; font-size: .78rem; }
.side-foot a { color: #c9ccd6; }
.main { min-width: 0; }
.appbar { display: flex; align-items: center; gap: 14px; padding: 16px 28px; border-bottom: 1px solid var(--line); background: rgba(247,245,240,.92); backdrop-filter: blur(6px); position: sticky; top: 0; z-index: 5; }
.appbar h1 { font-size: 1.35rem; margin: 0; }
.appbar-right { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.menu-btn { display: none; border: 1px solid var(--line-2); background: var(--card); border-radius: 8px; padding: 4px 10px; font-size: 1.1rem; cursor: pointer; }
.chip { display: inline-flex; gap: 6px; align-items: baseline; padding: 6px 12px; border-radius: 99px; background: var(--card); border: 1px solid var(--line); color: var(--muted); font-size: .85rem; }
.chip b { color: var(--ink); }
.content { padding: 24px 28px 60px; max-width: 1240px; }

/* ── Building blocks ───────────────────────────────────── */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 20px 22px; box-shadow: var(--shadow); margin-bottom: 18px; }
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.card-head h2, .card-head h3 { margin: 0; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 18px; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.tile span { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; }
.tile b { font: 700 1.55rem var(--head); }
.tile small { font-size: .8rem; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spread { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.right { margin-left: auto; }
.mt { margin-top: 14px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: var(--ink); color: #fff; border: 1px solid var(--ink); border-radius: 10px; padding: 10px 16px; font: 600 .92rem var(--body); cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--ink-2); text-decoration: none; }
.btn.sun { background: var(--sun); border-color: var(--sun); }
.btn.sun:hover { background: #f05a1b; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn.ghost:hover { background: #efece5; }
.btn.danger { background: #fff; color: var(--err); border-color: #f1c4c6; }
.btn.sm { padding: 6px 11px; font-size: .84rem; border-radius: 8px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.linkish { background: none; border: 0; color: var(--sky); cursor: pointer; padding: 0; font: inherit; }

label { display: flex; flex-direction: column; gap: 5px; font-weight: 600; font-size: .86rem; color: var(--ink-2); }
label small { font-weight: 400; }
input, select, textarea { font: 400 .95rem var(--body); color: var(--ink); background: #fff; border: 1px solid var(--line-2); border-radius: 9px; padding: 9px 11px; width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--sky-2); border-color: var(--sky); }
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--sun); }
textarea { min-height: 84px; resize: vertical; }
.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 500; }
.checks { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px 16px; }
.form-grid .full { grid-column: 1 / -1; }
.inline-form { display: inline; }
.input-prefix { display: flex; align-items: center; border: 1px solid var(--line-2); border-radius: 9px; background: #fff; }
.input-prefix span { padding: 0 4px 0 11px; color: var(--muted); }
.input-prefix input { border: 0; padding-left: 4px; }

table.t { width: 100%; border-collapse: collapse; font-size: .9rem; }
.t th { text-align: left; font-weight: 600; color: var(--muted); font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.t td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.t tr:last-child td { border-bottom: 0; }
.t .num { text-align: right; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; }

.pill { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: .75rem; font-weight: 600; text-transform: capitalize; background: #eee; color: #444; white-space: nowrap; }
.s-active, .s-approved, .s-paid, .s-won, .s-reserved { background: #dcf3e4; color: var(--ok); }
.s-pending, .s-requested, .s-new { background: #fff1d6; color: var(--warn); }
.s-paused, .s-contacted { background: var(--sky-2); color: var(--sky); }
.s-rejected, .s-failed, .s-lost, .s-suspended, .s-cancelled, .s-refunded { background: #fde2e2; color: var(--err); }
.s-completed { background: #ececec; color: #555; }
.tag { display: inline-block; padding: 1px 8px; border-radius: 6px; background: #f0ede6; color: var(--ink-2); font-size: .78rem; margin: 2px 3px 2px 0; }
.tag.sun { background: var(--sun-2); color: #a63d0b; } .tag.sea { background: var(--sea-2); color: #0b6e61; } .tag.sky { background: var(--sky-2); color: var(--sky); }

.flash { padding: 11px 14px; border-radius: 10px; margin-bottom: 14px; border: 1px solid; font-size: .92rem; }
.flash.ok { background: #e7f6ec; border-color: #bfe3cb; color: #11532a; }
.flash.err { background: #fdecec; border-color: #f4c2c4; color: #8a1c21; }
.flash.warn { background: #fff4de; border-color: #f4d9a6; color: #7a4205; }
.flash.info { background: var(--sky-2); border-color: #c4d0ff; color: #23389a; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs a, .tabs button { padding: 10px 14px; border: 0; background: none; font: 600 .92rem var(--body); color: var(--muted); border-bottom: 2px solid transparent; cursor: pointer; white-space: nowrap; }
.tabs a.on, .tabs button.on { color: var(--ink); border-bottom-color: var(--sun); text-decoration: none; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; margin-bottom: 14px; }
.filters label { min-width: 140px; flex: 1; max-width: 220px; }

pre.code { background: var(--ink); color: #e8e9ee; padding: 14px 16px; border-radius: 10px; overflow-x: auto; white-space: pre; margin: 8px 0; font-size: .82rem; }
.copy-wrap { position: relative; }
.copy-wrap .btn { position: absolute; top: 8px; right: 8px; }

/* charts */
.chart { width: 100%; height: auto; display: block; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .ax { fill: var(--muted); font: 10px var(--body); }
.chart .ax-l { fill: var(--sea); }
.chart .bar { fill: var(--ink); opacity: .85; }
.chart .bar:hover { fill: var(--sun); opacity: 1; }
.chart .line { fill: none; stroke: var(--sea); stroke-width: 2.2; }
.chart .dot { fill: var(--sea); }
.legend { display: flex; gap: 16px; font-size: .8rem; color: var(--muted); margin-bottom: 6px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.lg-bar { background: var(--ink); } .lg-line { background: var(--sea); border-radius: 99px !important; }
.meter { height: 8px; background: #efece5; border-radius: 99px; overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--sun); }

/* ── LBM Ads wizard ────────────────────────────────────── */
.wizard { display: grid; grid-template-columns: 220px 1fr; gap: 22px; align-items: start; }
.steps { list-style: none; margin: 0; padding: 0; position: sticky; top: 84px; counter-reset: s; }
.steps li { counter-increment: s; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; color: var(--muted); font-weight: 600; font-size: .9rem; cursor: pointer; }
.steps li::before { content: counter(s); width: 24px; height: 24px; border-radius: 99px; display: grid; place-items: center; background: #ebe7de; color: var(--muted); font-size: .76rem; flex: none; }
.steps li.done::before { content: '✓'; background: var(--sea); color: #fff; }
.steps li.on { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.steps li.on::before { background: var(--sun); color: #fff; }
.steps li.locked { cursor: default; opacity: .6; }
.step { display: none; } .step.on { display: block; }
.step-nav { display: flex; gap: 10px; justify-content: space-between; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.choice-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.choice { position: relative; border: 1.5px solid var(--line-2); border-radius: 12px; padding: 14px 14px 12px; cursor: pointer; background: #fff; font-weight: 500; display: block; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice b { display: block; font: 700 1rem var(--head); margin-bottom: 3px; color: var(--ink); }
.choice small { display: block; line-height: 1.4; }
.choice:has(input:checked) { border-color: var(--sun); background: #fff8f4; box-shadow: 0 0 0 3px var(--sun-2); }
.size-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.size-grid .choice { padding: 10px 12px; }
.size-grid .choice b { font-size: .92rem; }
.reach-panel { background: var(--ink); color: #e9eaf0; border-radius: var(--r); padding: 16px 18px; }
.reach-panel h3 { color: #fff; }
.reach-panel .big { font: 800 1.8rem var(--head); color: #fff; }
.reach-panel .kv { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; font-size: .88rem; }
.reach-panel .kv span { color: #a9adbb; }
.reach-panel .warn { color: #ffc49f; font-size: .84rem; margin-top: 8px; }
.pub-list { max-height: 300px; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; }
.pub-list label { padding: 6px 0; border-bottom: 1px dashed var(--line); }
.pub-list label:last-child { border-bottom: 0; }
.hours { display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; }
.hours label, .days label { flex-direction: row; justify-content: center; align-items: center; gap: 0; border: 1px solid var(--line-2); border-radius: 7px; padding: 6px 0; font-size: .76rem; font-weight: 600; cursor: pointer; background: #fff; }
.hours input, .days input { position: absolute; opacity: 0; width: 0; }
.hours label:has(input:checked), .days label:has(input:checked) { background: var(--ink); color: #fff; border-color: var(--ink); }
.days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.previews { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-start; }
.preview-box { display: flex; flex-direction: column; gap: 6px; }
.preview-box > small { font-weight: 600; }
.preview-frame { background: #fff; border: 1px dashed var(--line-2); border-radius: 6px; overflow: hidden; position: relative; }
.io { background: #fcfbf8; border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; font-size: .9rem; }
.io dl { display: grid; grid-template-columns: 180px 1fr; gap: 6px 14px; margin: 0; }
.io dt { color: var(--muted); } .io dd { margin: 0; font-weight: 500; }

/* ad renders reused in previews (mirrors embed/lbm.js) */
.lbm-ad { position: relative; width: 100%; height: 100%; font-family: var(--body); color: #14161f; background: #fff; overflow: hidden; display: flex; text-decoration: none !important; }
.lbm-ad img.cover { width: 100%; height: 100%; object-fit: cover; display: block; }
.lbm-ad .lbm-badge { position: absolute; top: 4px; right: 4px; background: rgba(255,255,255,.9); color: #555; font: 600 10px/1 var(--body); padding: 3px 5px; border-radius: 4px; }
.lbm-native { flex-direction: column; } .lbm-native.wide { flex-direction: row; }
.lbm-native .ph { flex: 1 1 55%; min-height: 0; background: #eee center/cover no-repeat; }
.lbm-native.wide .ph { flex: 0 0 38%; }
.lbm-native .tx, .lbm-text .tx { padding: 10px 12px; display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; justify-content: center; }
.lbm-ad .hl { font: 700 15px/1.2 var(--head); }
.lbm-ad .bd { font-size: 12.5px; color: #4b4f5b; line-height: 1.35; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.lbm-ad .du { font-size: 11px; color: var(--sea); }
.lbm-ad .cta { align-self: flex-start; margin-top: 4px; background: var(--sun); color: #fff; border-radius: 6px; padding: 5px 10px; font: 600 12px var(--body); }
.lbm-text { border: 1px solid var(--line); }

/* ── Public / marketing ────────────────────────────────── */
.topbar { display: flex; align-items: center; gap: 18px; padding: 16px 32px; max-width: 1200px; margin: 0 auto; }
.topbar .brand { display: flex; gap: 10px; align-items: center; color: var(--ink); font: 800 1.15rem var(--head); text-decoration: none; }
.topnav { margin-left: auto; display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.topnav a:not(.btn) { color: var(--ink-2); font-weight: 500; }
.public-main { max-width: 1200px; margin: 0 auto; padding: 0 32px 40px; }
.hero { display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; padding: 48px 0 56px; }
.hero h1 { font-size: clamp(2.3rem, 5vw, 4rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.02; }
.hero h1 em { font-style: normal; color: var(--sun); }
.hero p.lead { font-size: 1.15rem; color: var(--ink-2); max-width: 560px; }
.hero-art { background: var(--ink); border-radius: 22px; padding: 22px; color: #fff; box-shadow: 0 30px 60px -30px rgba(20,22,31,.6); }
.hero-art .mock { background: #fff; border-radius: 12px; padding: 14px; color: var(--ink); display: grid; gap: 10px; }
.mock .bar { height: 10px; background: #ece8df; border-radius: 99px; }
.mock .slot { border: 1.5px dashed var(--sun); border-radius: 8px; padding: 10px; display: flex; gap: 10px; align-items: center; background: #fff8f4; font-size: .82rem; }
.mock .slot i { width: 54px; height: 40px; border-radius: 6px; background: linear-gradient(135deg, var(--sun), #ffb547); flex: none; }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.kpis div { background: #20232f; border-radius: 10px; padding: 10px; } .kpis b { display: block; font: 800 1.3rem var(--head); } .kpis span { color: #a9adbb; font-size: .75rem; }
.section { padding: 40px 0; }
.section > h2 { font-size: 2rem; font-weight: 800; }
.section > p.sub { color: var(--muted); max-width: 680px; font-size: 1.05rem; }
.modules { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; margin-top: 20px; }
.module { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 20px; }
.module .k { font: 700 .74rem var(--body); text-transform: uppercase; letter-spacing: .12em; color: var(--sun); }
.module h3 { font-size: 1.25rem; margin: 6px 0 6px; }
.module p { color: var(--muted); margin: 0; font-size: .93rem; }
.formats { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; margin-top: 20px; }
.fmt { border-radius: 14px; padding: 18px; background: var(--card); border: 1px solid var(--line); }
.fmt .shape { height: 70px; border-radius: 8px; background: repeating-linear-gradient(135deg, #f1ede4 0 8px, #f7f4ee 8px 16px); margin-bottom: 12px; border: 1px solid var(--line); }
.band { background: var(--ink); color: #e9eaf0; border-radius: 22px; padding: 34px; display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.band h2 { color: #fff; font-size: 1.9rem; } .band p { color: #b7bbc8; }
.band ul { margin: 0; padding-left: 18px; color: #d4d6de; } .band li { margin-bottom: 6px; }
.network-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.network-list span { background: #fff; border: 1px solid var(--line); border-radius: 99px; padding: 5px 12px; font-size: .84rem; }
.foot { max-width: 1200px; margin: 0 auto; padding: 26px 32px 40px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: .88rem; }
.foot-links { display: flex; gap: 16px; flex-wrap: wrap; }
.auth-wrap { min-height: 80vh; display: grid; place-items: center; padding: 30px 16px; }
.auth { width: 100%; max-width: 440px; }
.role-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.role-pick .choice { padding: 10px; text-align: center; }
.legal { max-width: 820px; } .legal h2 { margin-top: 1.6em; font-size: 1.15rem; } .legal li { margin-bottom: .4em; }

@media (max-width: 1000px) {
  .wizard { grid-template-columns: 1fr; }
  .steps { position: static; display: flex; overflow-x: auto; gap: 4px; }
  .steps li { white-space: nowrap; }
  .g4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .modules, .formats { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .hero, .band { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; z-index: 20; inset: 0 auto 0 0; width: 260px; transform: translateX(-100%); transition: transform .2s; }
  .side.open { transform: none; box-shadow: 0 0 0 100vmax rgba(0,0,0,.35); }
  .menu-btn { display: block; }
  .appbar, .content { padding-left: 16px; padding-right: 16px; }
  .g2, .g3, .g4, .form-grid, .modules, .formats { grid-template-columns: 1fr; }
  .io dl { grid-template-columns: 1fr; }
  .topbar, .public-main, .foot { padding-left: 16px; padding-right: 16px; }
  .topnav { gap: 12px; }
  .role-pick { grid-template-columns: 1fr; }
  .hours { grid-template-columns: repeat(6, 1fr); }
}
