/* The pick-your-design page frame. Deliberately neutral (greys + ink) so the AltLeads options are the only colour on screen. */
:root { --bg: #f6f6f4; --panel: #ffffff; --ink: #1b1b1a; --mut: #6b6a67; --faint: #9a9995; --line: #e6e5e2; --line2: #d6d5d1; --hover: #efeeeb; --sel: #1b1b1a; --on-sel: #ffffff;
  --well: #f1f0ed; --ok: #2e7d4f; --warn: #a86b00; color-scheme: light; }
:root[data-theme="dark"] { --bg: #121212; --panel: #1a1a1a; --ink: #ececea; --mut: #a3a29e; --faint: #74736f; --line: #2a2a29; --line2: #3a3a38; --hover: #232322; --sel: #ececea; --on-sel: #121212;
  --well: #161616; --ok: #6cc391; --warn: #e0b04f; color-scheme: dark; }
* { box-sizing: border-box; }
html { scroll-padding-top: 76px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.5 'AL Inter', system-ui, -apple-system, 'Segoe UI', sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* ---------- top bar ---------- */
.top { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 16px; padding: 0 20px; height: 60px; background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.brand { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.brand b { font-size: 15px; font-weight: 650; letter-spacing: -.01em; }
.brand span { font-size: 12px; color: var(--mut); }
.views { display: flex; gap: 2px; padding: 3px; border-radius: 9px; background: var(--well); box-shadow: inset 0 0 0 1px var(--line); margin-left: 12px; }
.views button { border: 0; background: transparent; height: 30px; padding: 0 12px; border-radius: 7px; color: var(--mut); cursor: pointer; font-weight: 500; white-space: nowrap; }
.views button:hover { color: var(--ink); }
.views button[aria-selected="true"] { background: var(--panel); color: var(--ink); box-shadow: 0 0 0 1px var(--line2), 0 1px 2px rgba(0, 0, 0, .06); }
.spacer { flex: 1; }
.prog { display: grid; gap: 4px; min-width: 132px; }
.prog-t { font-size: 12px; color: var(--mut); white-space: nowrap; }
.prog-t b { color: var(--ink); font-weight: 600; }
.prog-track { height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; }
.prog-track i { display: block; height: 100%; width: 100%; background: var(--ink); border-radius: 2px; transform-origin: left center; transform: scaleX(0); transition: transform .3s ease; }
.seg { display: flex; border-radius: 8px; box-shadow: inset 0 0 0 1px var(--line2); overflow: hidden; }
.seg button { border: 0; background: transparent; height: 32px; padding: 0 12px; cursor: pointer; color: var(--mut); display: inline-flex; align-items: center; gap: 6px; }
.seg button + button { box-shadow: -1px 0 0 var(--line2); }
.seg button[aria-pressed="true"] { background: var(--sel); color: var(--on-sel); }
.seg svg { width: 15px; height: 15px; }
.cta { height: 34px; padding: 0 14px; border-radius: 8px; border: 0; background: var(--sel); color: var(--on-sel); font-weight: 600; cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.cta:hover { opacity: .88; }
.cta svg { width: 15px; height: 15px; }
#jump { display: none; height: 32px; border-radius: 8px; border: 1px solid var(--line2); background: var(--panel); padding: 0 8px; max-width: 160px; }

/* ---------- layout ---------- */
.layout { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 28px; max-width: 1480px; margin: 0 auto; padding: 0 24px 80px; }
.toc { position: sticky; top: 60px; align-self: start; max-height: calc(100vh - 60px); overflow: auto; padding: 24px 4px 24px 0; }
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc .tc + .tc { margin-top: 14px; }
.toc .tc > a { display: block; font-size: 12px; font-weight: 600; color: var(--mut); text-decoration: none; padding: 4px 8px; }
.toc li li a { display: flex; align-items: center; gap: 8px; padding: 4px 8px; border-radius: 6px; text-decoration: none; font-size: 13px; color: var(--ink); }
.toc li li a:hover { background: var(--hover); }
.toc .dot { width: 9px; height: 9px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--line2); flex: none; }
.toc a[data-s="picked"] .dot { background: var(--ink); box-shadow: none; }
.toc a[data-s="no"] .dot { background: transparent; box-shadow: inset 0 0 0 1.5px var(--faint); position: relative; }
.toc a[data-s="no"] .dot::after { content: ''; position: absolute; left: 1px; right: 1px; top: 4px; height: 1.5px; background: var(--faint); transform: rotate(-45deg); }
.toc a[data-s="no"] span { color: var(--faint); text-decoration: line-through; }
.toc a[data-s="later"] .dot { background: linear-gradient(90deg, var(--ink) 50%, transparent 50%); box-shadow: inset 0 0 0 1.5px var(--ink); }
.toc-foot { margin-top: 20px; padding: 12px 8px 0; border-top: 1px solid var(--line); display: grid; gap: 10px; font-size: 13px; }
.toggle { display: flex; align-items: flex-start; gap: 8px; cursor: pointer; }
.toggle input { margin: 2px 0 0; accent-color: var(--ink); width: 15px; height: 15px; }
.toggle small { display: block; color: var(--mut); font-size: 12px; }
.linkbtn { border: 0; background: none; padding: 0; color: var(--mut); text-decoration: underline; cursor: pointer; text-align: left; font-size: 12px; }
.linkbtn:hover { color: var(--ink); }

/* ---------- intro ---------- */
.intro { padding: 40px 0 8px; max-width: 780px; }
.intro h1 { font-size: 30px; line-height: 1.15; letter-spacing: -.02em; font-weight: 650; margin: 0 0 12px; }
.intro p { margin: 0 0 10px; color: var(--mut); font-size: 15px; }
.intro p b { color: var(--ink); font-weight: 600; }
.how { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 22px 0 6px; max-width: 980px; }
.how div { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; font-size: 13px; color: var(--mut); }
.how b { display: block; color: var(--ink); font-weight: 600; margin-bottom: 2px; font-size: 13.5px; }
.fine { font-size: 12px; color: var(--faint); margin-top: 12px; max-width: 980px; }

/* ---------- chapters and parts ---------- */
.chap { padding: 48px 0 6px; border-bottom: 1px solid var(--line); margin-bottom: 18px; display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.chap h2 { margin: 0; font-size: 22px; font-weight: 650; letter-spacing: -.015em; }
.chap p { margin: 0; color: var(--mut); }
.part { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 20px 20px 16px; margin: 0 0 18px; }
.part.is-no .opts { opacity: .45; filter: grayscale(.6); }
.ph { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 16px; }
.pn { font-size: 12px; font-weight: 600; color: var(--faint); font-variant-numeric: tabular-nums; padding-top: 4px; width: 20px; flex: none; }
.pt { flex: 1; min-width: 0; }
.pt h3 { margin: 0 0 2px; font-size: 18px; font-weight: 650; letter-spacing: -.01em; }
.pt p { margin: 0; color: var(--mut); max-width: 760px; }
.pstat { flex: none; font-size: 12px; font-weight: 500; padding: 4px 10px; border-radius: 20px; background: var(--well); box-shadow: inset 0 0 0 1px var(--line); color: var(--mut); white-space: nowrap; max-width: 46%; overflow: hidden; text-overflow: ellipsis; }
.pstat[data-s="picked"] { background: var(--sel); color: var(--on-sel); box-shadow: none; }
.pstat[data-s="later"] { color: var(--ink); box-shadow: inset 0 0 0 1px var(--line2); }
.opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.opts.wide { grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); }

/* ---------- one option ---------- */
.opt { display: flex; flex-direction: column; border-radius: 12px; box-shadow: 0 0 0 1px var(--line); background: var(--panel); overflow: hidden; transition: box-shadow .15s ease; }
.opt:hover { box-shadow: 0 0 0 1px var(--line2), 0 2px 10px rgba(0, 0, 0, .05); }
.opt.is-picked { box-shadow: 0 0 0 2px var(--sel); }
.stage { background: var(--well); border-bottom: 1px solid var(--line); overflow: hidden; }
.stage > .alp { transform-origin: top left; }
.om { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.ot { display: flex; align-items: flex-start; gap: 8px; }
.ot h4 { margin: 0; font-size: 14.5px; font-weight: 600; flex: 1; line-height: 1.3; }
.src { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--mut); white-space: nowrap; padding-top: 2px; }
.src i { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.src[data-from="notion"] i { background: var(--ink); }
.src[data-from="hubspot"] i { background: #ff7a59; }
.src[data-from="airtable"] i { background: #166ee1; }
.src[data-from="slack"] i { background: #611f69; }
.src[data-from="today"] i { background: #2e7fbf; }
:root[data-theme="dark"] .src[data-from="slack"] i { background: #c681d0; }
.facts { font-size: 12px; color: var(--mut); line-height: 1.4; }
.om dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; font-size: 13px; }
.om dt { font-weight: 600; color: var(--ink); font-size: 12px; padding-top: 1px; white-space: nowrap; }
.om dd { margin: 0; color: var(--ink); opacity: .86; }
.laws { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.lawk { font-size: 11px; color: var(--faint); margin-right: 2px; }
.law { font-size: 11px; padding: 1px 7px; border-radius: 10px; box-shadow: inset 0 0 0 1px var(--line2); color: var(--mut); cursor: help; }
.oa { display: flex; align-items: center; gap: 12px; margin-top: auto; padding-top: 4px; flex-wrap: wrap; }
.pick { height: 32px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--line2); background: var(--panel); cursor: pointer; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.pick:hover { background: var(--hover); }
.pick[aria-checked="true"] { background: var(--sel); color: var(--on-sel); border-color: var(--sel); }
.pick svg { width: 15px; height: 15px; }
.see { font-size: 12px; color: var(--mut); text-decoration: underline; text-underline-offset: 2px; }
.see:hover { color: var(--ink); }

/* ---------- part footer ---------- */
.pf { display: grid; grid-template-columns: auto 1fr; gap: 14px 24px; align-items: start; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.inc { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.inc span { font-size: 13px; font-weight: 600; margin-right: 6px; }
.inc button { height: 30px; padding: 0 11px; border-radius: 7px; border: 1px solid var(--line2); background: var(--panel); cursor: pointer; color: var(--mut); white-space: nowrap; }
.inc button:hover { color: var(--ink); background: var(--hover); }
.inc button[aria-pressed="true"] { background: var(--sel); color: var(--on-sel); border-color: var(--sel); }
.note { display: grid; gap: 4px; }
.note span { font-size: 12px; color: var(--mut); }
.note textarea { width: 100%; resize: vertical; min-height: 38px; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line2); background: var(--panel); color: var(--ink); font: inherit; font-size: 13px; }
.note textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ink) 12%, transparent); }

/* ---------- your AltLeads so far ---------- */
.yhead { padding: 36px 0 14px; display: flex; gap: 24px; align-items: flex-end; flex-wrap: wrap; }
.yhead h1 { font-size: 28px; margin: 0 0 6px; letter-spacing: -.02em; font-weight: 650; }
.yhead p { margin: 0; color: var(--mut); max-width: 720px; }
.ywrap { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 24px; align-items: start; }
.yfig { margin: 0 0 18px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.yfig figcaption { padding: 10px 14px; font-size: 13px; font-weight: 600; border-bottom: 1px solid var(--line); }
.ygrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 18px; }
.ygrid .yfig { margin: 0; }
.ynone { padding: 40px 16px; text-align: center; color: var(--mut); font-size: 13px; }
.ylist { position: sticky; top: 76px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 6px 14px 14px; max-height: calc(100vh - 96px); overflow: auto; }
.ylist h3 { font-size: 12px; color: var(--mut); font-weight: 600; margin: 12px 0 4px; }
.ylist ul { list-style: none; margin: 0; padding: 0; }
.ylist li { display: grid; grid-template-columns: 1fr auto; gap: 0 8px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.ylist .yn { font-weight: 500; }
.ylist .yv { grid-column: 1; color: var(--mut); font-size: 12px; }
.ylist li[data-s="open"] .yv { color: var(--warn); }
.ylist a { grid-row: 1 / 3; grid-column: 2; align-self: center; font-size: 12px; color: var(--mut); }

/* ---------- copy dialog and flash ---------- */
dialog { border: 1px solid var(--line2); border-radius: 12px; background: var(--panel); color: var(--ink); padding: 18px; width: min(620px, calc(100vw - 32px)); }
dialog::backdrop { background: rgba(0, 0, 0, .35); }
dialog h2 { margin: 0 0 6px; font-size: 17px; }
dialog p { margin: 0 0 10px; color: var(--mut); font-size: 13px; }
dialog textarea { width: 100%; height: 320px; font: 12.5px/1.5 ui-monospace, Consolas, monospace; padding: 10px; border-radius: 8px; border: 1px solid var(--line2); background: var(--well); color: var(--ink); }
dialog .row { display: flex; justify-content: flex-end; margin-top: 10px; }
#flash { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 16px); opacity: 0; pointer-events: none; z-index: 90; background: var(--sel); color: var(--on-sel); padding: 9px 14px; border-radius: 9px; font-size: 13px; font-weight: 500;
  transition: opacity .18s ease, transform .18s ease; box-shadow: 0 6px 20px rgba(0, 0, 0, .2); }
#flash.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- small screens ---------- */
@media (max-width: 1100px) { .ywrap { grid-template-columns: 1fr; } .ylist { position: static; max-height: none; } }
@media (max-width: 960px) {
  .layout { grid-template-columns: 1fr; padding: 0 16px 64px; }
  .toc { display: none; }
  #jump { display: block; }
  .how { grid-template-columns: 1fr; }
  .opts.wide { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .top { height: auto; flex-wrap: wrap; padding: 8px 12px; gap: 8px 10px; }
  html { scroll-padding-top: 120px; }
  .views { margin-left: 0; order: 3; }
  .prog { order: 4; min-width: 0; flex: 1; }
  .spacer { display: none; }
  .brand { flex: 1; }
  .seg button span { display: none; }
  #jump { order: 5; max-width: none; flex: 1 1 100%; }
  .intro h1 { font-size: 24px; }
  .part { padding: 14px 12px 12px; border-radius: 12px; }
  .ph { flex-wrap: wrap; }
  .pstat { max-width: 100%; }
  .pf { grid-template-columns: 1fr; }
  .opts { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { transition-duration: 1ms !important; } }
