/* The pick-your-design page frame (version 2). Deliberately neutral (greys + ink) so the AltLeads screens are the only colour.
   Layout: options on the left, a live AltLeads screen on the right that follows what you point at and pick. */
@font-face { font-family: 'AL Inter UI'; src: url('../design-systems/airtable/fonts/inter-var-latin.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
:root { --bg: #f7f8fa; --panel: #ffffff; --ink: #111111; --mut: #6b7280; --faint: #6b7280; --line: #d9dee7; --line2: #d9dee7; --hover: #f7f8fa; --sel: #111111; --on-sel: #ffffff;
  --well: #f7f8fa; --warn: #9a6200; color-scheme: light; }
:root[data-theme="dark"] { --bg: #121212; --panel: #1a1a1a; --ink: #ececea; --mut: #a3a29e; --faint: #85847f; --line: #2a2a29; --line2: #3a3a38; --hover: #232322; --sel: #ececea; --on-sel: #121212;
  --well: #0d0d0d; --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 UI', system-ui, -apple-system, 'Segoe UI', sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button, select { 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: 14px; padding: 0 20px; height: 60px; background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.tb-brand { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.tb-brand b { font-size: 15px; font-weight: 650; letter-spacing: -.01em; white-space: nowrap; }
.tb-brand span { font-size: 12px; color: var(--mut); white-space: nowrap; }
.views { display: flex; gap: 2px; padding: 3px; border-radius: 9px; background: var(--well); box-shadow: inset 0 0 0 1px var(--line); margin-left: 8px; }
.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; }
#jump { height: 32px; border-radius: 8px; border: 1px solid var(--line2); background: var(--panel); padding: 0 8px; max-width: 210px; }
.prog { display: grid; gap: 4px; min-width: 120px; }
.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; }
.modeseg { display: flex; border-radius: 8px; box-shadow: inset 0 0 0 1px var(--line2); overflow: hidden; flex: none; }
.modeseg button { border: 0; background: transparent; height: 32px; padding: 0 11px; cursor: pointer; color: var(--mut); display: inline-flex; align-items: center; gap: 6px; }
.modeseg button + button { box-shadow: -1px 0 0 var(--line2); }
.modeseg button:hover { color: var(--ink); }
.modeseg button[aria-pressed="true"] { background: var(--sel); color: var(--on-sel); }
.modeseg 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; flex: none; }
.cta:hover { background: color-mix(in srgb, var(--sel) 82%, var(--bg)); }
.cta svg { width: 15px; height: 15px; }
.ghostbtn { height: 32px; padding: 0 11px; border-radius: 8px; border: 1px solid var(--line2); background: var(--panel); cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }
.ghostbtn:hover { background: var(--hover); }
.ghostbtn svg { width: 15px; height: 15px; }

/* ---------- two panes ---------- */
.layout { display: grid; grid-template-columns: minmax(440px, 540px) minmax(0, 1fr); gap: 24px; padding: 0 24px 80px; align-items: start; }
.picker { min-width: 0; }
.live { position: sticky; top: 72px; height: calc(100vh - 84px); display: flex; flex-direction: column; margin-top: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); overflow: hidden; }
.live-h { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); min-height: 52px; }
.live-h .lt { min-width: 0; flex: 1; }
.live-h .lt b { display: block; font-size: 13.5px; font-weight: 650; }
.live-h .lt span { display: block; font-size: 12px; color: var(--mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live-h .lt span em { font-style: normal; color: var(--ink); font-weight: 600; }
.live-h .lt span.trying em { background: var(--ink); color: var(--panel); padding: 0 5px; border-radius: 4px; }
.scr { display: flex; gap: 2px; padding: 8px 12px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.scr button { border: 0; background: transparent; height: 28px; padding: 0 10px; border-radius: 7px; color: var(--mut); cursor: pointer; white-space: nowrap; font-size: 12.5px; font-weight: 500; }
.scr button:hover { color: var(--ink); background: var(--hover); }
.scr button[aria-pressed="true"] { background: var(--sel); color: var(--on-sel); }
.live-stage { flex: 1; min-height: 0; display: grid; place-items: start center; background: var(--well); padding: 14px; overflow: hidden; }
.live-stage .frame { box-shadow: 0 0 0 1px var(--line2), 0 8px 30px rgba(0, 0, 0, .12); border-radius: 6px; overflow: hidden; }
.live-f { padding: 8px 14px; border-top: 1px solid var(--line); font-size: 12px; color: var(--mut); }
.livebtn { display: none; }

/* ---------- intro ---------- */
.intro { padding: 30px 0 4px; }
.intro h1 { font-size: 26px; line-height: 1.15; letter-spacing: -.02em; font-weight: 650; margin: 0 0 10px; }
.intro p { margin: 0 0 10px; color: var(--mut); font-size: 14px; }
.intro p b { color: var(--ink); font-weight: 600; }
.fine { font-size: 12px; color: var(--faint); margin: 6px 0 0; }
.toggle { display: flex; align-items: flex-start; gap: 8px; cursor: pointer; font-size: 13px; margin-top: 12px; }
.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; font-size: 12px; }
.linkbtn:hover { color: var(--ink); }

/* ---------- chapters and parts ---------- */
.chap { padding: 32px 0 4px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.chap h2 { margin: 0; font-size: 20px; font-weight: 650; letter-spacing: -.015em; }
.chap p { margin: 2px 0 6px; color: var(--mut); font-size: 13px; }
.part { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px 16px 14px; margin: 0 0 14px; transition: box-shadow .2s ease; }
.part.is-live { box-shadow: 0 0 0 2px color-mix(in srgb, var(--ink) 35%, transparent); }
.part.is-no .opts { opacity: .45; filter: grayscale(.6); }
.phd { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px; }
.pn { font-size: 12px; font-weight: 600; color: var(--faint); font-variant-numeric: tabular-nums; padding-top: 3px; width: 18px; flex: none; }
.pt { flex: 1; min-width: 0; }
.pt h3 { margin: 0 0 2px; font-size: 16.5px; font-weight: 650; letter-spacing: -.01em; }
.pt p { margin: 0; color: var(--mut); font-size: 13px; }
.pstat { flex: none; font-size: 11.5px; font-weight: 500; padding: 3px 9px; 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(2, minmax(0, 1fr)); gap: 10px; }

/* ---------- one option ---------- */
.opt { display: flex; flex-direction: column; border-radius: 11px; box-shadow: 0 0 0 1px var(--line); background: var(--panel); overflow: hidden; transition: box-shadow .15s ease; }
.opt:hover, .opt:focus-within { box-shadow: 0 0 0 1px var(--line2), 0 3px 12px rgba(0, 0, 0, .07); }
.opt.is-trying { box-shadow: 0 0 0 1.5px var(--ink); }
.opt.is-picked { box-shadow: 0 0 0 2px var(--sel); }
.thumb { position: relative; background: var(--well); border-bottom: 1px solid var(--line); overflow: hidden; cursor: zoom-in; }
.thumb > .rl { transform-origin: top left; pointer-events: none; }
.thumb .tday { position: absolute; left: 6px; top: 6px; font-size: 10.5px; font-weight: 600; padding: 1px 6px; border-radius: 5px; background: var(--sel); color: var(--on-sel); }
.om { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.ot { display: flex; align-items: flex-start; gap: 6px; }
.ot h4 { margin: 0; font-size: 13.5px; font-weight: 600; flex: 1; line-height: 1.3; }
.src { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; 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: 11.5px; color: var(--mut); line-height: 1.4; }
.om dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 3px 8px; font-size: 12.5px; line-height: 1.4; }
.om dt { font-weight: 600; color: var(--ink); font-size: 11.5px; padding-top: 1px; white-space: nowrap; }
.om dd { margin: 0; color: var(--ink); }
.laws { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.law { font-size: 10.5px; padding: 0 6px; border-radius: 9px; box-shadow: inset 0 0 0 1px var(--line2); color: var(--mut); cursor: help; }
.oa { display: flex; align-items: center; gap: 10px; margin-top: auto; padding-top: 4px; flex-wrap: wrap; }
.pick { height: 30px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line2); background: var(--panel); cursor: pointer; font-weight: 600; font-size: 13px; 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: 14px; height: 14px; }
.see { font-size: 11.5px; color: var(--mut); text-decoration: underline; text-underline-offset: 2px; }
.see:hover { color: var(--ink); }

/* ---------- part footer ---------- */
.pf { display: grid; gap: 10px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.inc { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.inc span { font-size: 12.5px; font-weight: 600; margin-right: 6px; }
.inc button { height: 28px; padding: 0 10px; border-radius: 7px; border: 1px solid var(--line2); background: var(--panel); cursor: pointer; color: var(--mut); white-space: nowrap; font-size: 12.5px; }
.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: 36px; padding: 7px 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); }

/* ---------- full-size view ---------- */
.full { position: fixed; inset: 0; z-index: 80; background: color-mix(in srgb, var(--bg) 92%, #000); display: none; flex-direction: column; }
.full.open { display: flex; }
.full-stage { flex: 1; min-height: 0; display: grid; place-items: center; padding: 16px; overflow: hidden; }
.full-stage .frame { box-shadow: 0 0 0 1px var(--line2), 0 12px 40px rgba(0, 0, 0, .18); border-radius: 6px; overflow: hidden; }
.dock { flex: none; display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: var(--panel); border-top: 1px solid var(--line); flex-wrap: wrap; }
.dock .dn { min-width: 150px; }
.dock .dn b { display: block; font-size: 13.5px; }
.dock .dn small { display: block; font-size: 11.5px; color: var(--mut); }
.dock .dopts { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; }
.dock .dopts button { height: 32px; padding: 0 11px; border-radius: 8px; border: 1px solid var(--line2); background: var(--panel); cursor: pointer; white-space: nowrap; font-size: 12.5px; font-weight: 500; display: inline-flex; align-items: center; gap: 5px; }
.dock .dopts button:hover { background: var(--hover); }
.dock .dopts button[aria-checked="true"] { background: var(--sel); color: var(--on-sel); border-color: var(--sel); }
.dock .dopts button svg { width: 13px; height: 13px; }
.dock select { height: 32px; border-radius: 8px; border: 1px solid var(--line2); background: var(--panel); padding: 0 8px; }
.iconbtn { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line2); background: var(--panel); display: grid; place-items: center; cursor: pointer; flex: none; }
.iconbtn:hover { background: var(--hover); }
.iconbtn svg { width: 16px; height: 16px; }

/* ---------- your AltLeads so far ---------- */
.yours { padding: 0 24px 80px; }
.yhead { padding: 28px 0 14px; }
.yhead h1 { font-size: 26px; margin: 0 0 6px; letter-spacing: -.02em; font-weight: 650; }
.yhead p { margin: 0; color: var(--mut); max-width: 760px; }
.ywrap { display: grid; grid-template-columns: minmax(0, 1fr) 270px; 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); display: flex; align-items: center; gap: 10px; }
.yfig figcaption span { color: var(--mut); font-weight: 400; font-size: 12px; }
.yfig .ystage { background: var(--well); padding: 12px; overflow: hidden; }
.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 .drow { 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); }

/* ---------- smaller screens ---------- */
/* Narrower windows (like the Open Design preview pane): keep the live screen visible, pinned on top of the options,
   so pointing at an option still changes it. Never hide it. */
@media (max-width: 1180px) {
  .layout { grid-template-columns: minmax(0, 1fr); display: flex; flex-direction: column-reverse; }
  .live { display: flex; position: sticky; top: 60px; z-index: 20; height: 46vh; min-height: 280px; margin-top: 8px; box-shadow: 0 8px 20px -10px rgba(0, 0, 0, .25); }
  .live-f { display: none; }
  .livebtn { display: none; }
  .ywrap { grid-template-columns: 1fr; }
  .ylist { position: static; max-height: none; }
}
@media (max-width: 760px) {
  .top { height: auto; flex-wrap: wrap; padding: 8px 12px; gap: 8px 10px; }
  html { scroll-padding-top: 130px; }
  .views { margin-left: 0; order: 3; }
  .prog { order: 4; min-width: 0; flex: 1; }
  .spacer { display: none; }
  .tb-brand { flex: 1; }
  .modeseg button span, .cta .lbl { display: none; }
  #jump { order: 5; max-width: none; flex: 1 1 100%; }
  .layout, .yours { padding: 0 12px 72px; }
  .layout { grid-template-columns: minmax(0, 1fr); }
  .opts { grid-template-columns: 1fr; }
  .part { padding: 12px 10px 10px; }
  .pstat { max-width: 100%; }
  .phd { flex-wrap: wrap; }
  .dock .dn { min-width: 0; flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) { * { transition-duration: 1ms !important; } }
