/* Social › Campaigns (public/campaigns.js). Mocks: design/campaigns/mocks.html D1 to D8,
   P1 to P3. Tokens follow desk2.css where it's on, with the same values as fallbacks for
   the old desktop and the iPhone app. One yellow per screen: New campaign / the primary. */
.tpc {
  --c-y: var(--d2-y, #F5C500); --c-ink: var(--d2-ink, #111); --c-bg: var(--d2-bg, #F4F4EF); --c-card: var(--d2-card, #fff);
  --c-line: var(--d2-line, #E3E3DC); --c-line2: var(--d2-line2, #EFEFE9); --c-mute: var(--d2-mute, #73736D); --c-soft: var(--d2-soft, #ECECE5);
  --c-red: var(--d2-red, #D6362B); --c-green: var(--d2-green, #1E9A4B); --c-amber: var(--d2-amber, #E0A100); --c-pill: var(--d2-pill, #FFF4B9);
  --c-blue: #2F6BDE; --c-edge: var(--d2-edge, 0 0 0 .5px rgba(0,0,0,.16), 0 1px 1.5px rgba(0,0,0,.07)); --c-r: 12px; --c-btn: var(--d2-btn-h, 30px);
  font-family: var(--d2-font, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif);
  color: var(--c-ink); font-size: 13px; line-height: 1.4; min-width: 0; display: block;
}
.tpc *, .tpc-sheet-wrap * { box-sizing: border-box; }
.tpc button, .tpc input, .tpc select, .tpc textarea { font: inherit; color: inherit; }
.tpc h1, .tpc h2, .tpc h3 { margin: 0; letter-spacing: -.01em; }
.tpc-p-desk, .tpc-p-ipad, .tpc-p-web { padding: 4px 0 32px; }
.tpc-mute { color: var(--c-mute); }
.tpc-ink { color: var(--c-ink) !important; }
.tpc-red { color: var(--c-red) !important; }
.tpc-sub { display: block; color: var(--c-mute); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tpc-grow { flex: 1 1 auto; }
.tpc-ell { overflow: hidden; min-width: 0; }
.tpc-ell > b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.tpc-pad { padding: 14px 16px; }
.tpc-card { background: var(--c-card); border-radius: var(--c-r); box-shadow: var(--c-edge); }
.tpc-loading { padding: 40px; text-align: center; color: var(--c-mute); }
.tpc-empty { text-align: center; padding: 36px 20px; color: var(--c-mute); }
.tpc-empty h3 { color: var(--c-ink); margin: 10px 0 4px; font-size: 16px; }
.tpc-empty p { margin: 0 0 14px; }
.tpc-empty-ic { display: inline-flex; width: 40px; height: 40px; border-radius: 12px; background: var(--c-y); align-items: center; justify-content: center; color: var(--c-ink); }
.tpc-foot { color: var(--c-mute); font-size: 12px; margin: 6px 2px 0; }
.tpc-err { display: block; color: var(--c-red); font-size: 12px; margin: 4px 0 0; }

/* buttons */
.tpc-btn { display: inline-flex; align-items: center; gap: 6px; height: var(--c-btn); padding: 0 12px; border-radius: 8px; border: 0; background: var(--c-card); box-shadow: var(--c-edge); cursor: pointer; white-space: nowrap; font-weight: 500; }
.tpc-btn:hover:not(:disabled) { background: #FAFAF7; }
.tpc-btn:disabled { opacity: .45; cursor: default; }
.tpc-btn svg { flex: none; }
.tpc-btn-y { background: var(--c-y); box-shadow: 0 0 0 .5px rgba(0,0,0,.14), 0 1px 1.5px rgba(0,0,0,.1); font-weight: 600; }
.tpc-btn-y:hover:not(:disabled) { background: #EDBD00; }
.tpc-btn-red { background: var(--c-red); color: #fff !important; font-weight: 600; }
.tpc-btn-red:hover:not(:disabled) { background: #BF2C22; }
.tpc-btn-dark { background: var(--c-ink); color: #fff !important; font-weight: 600; }
.tpc-btn-dark:hover:not(:disabled) { background: #333; }
.tpc-btn-ghost { box-shadow: none; background: transparent; color: var(--c-mute); }
.tpc-btn-sm { height: 26px; padding: 0 10px; font-size: 12px; }
.tpc-btn-block { width: 100%; justify-content: center; height: 46px; border-radius: 12px; margin: 14px 0 0; font-size: 15px; }
.tpc-icon { width: var(--c-btn); padding: 0; justify-content: center; }
.tpc-link { background: none; border: 0; padding: 0; color: #8A6A00; font-weight: 600; cursor: pointer; display: inline-flex; gap: 3px; align-items: center; font-size: 12px; text-decoration: none; }
.tpc-ib { background: none; border: 0; padding: 2px; color: var(--c-mute); cursor: pointer; display: inline-flex; align-items: center; border-radius: 6px; }
.tpc-ib:hover { background: var(--c-soft); color: var(--c-ink); }
.tpc-seg { display: inline-flex; background: var(--d2-seg-track, #EBEBE4); border-radius: 9px; padding: 2px; gap: 2px; }
.tpc-seg button { border: 0; background: transparent; border-radius: 7px; padding: 4px 12px; cursor: pointer; font-weight: 500; white-space: nowrap; }
.tpc-seg button b { font-weight: 500; color: var(--c-mute); margin-left: 3px; }
.tpc-seg button.is-on { background: var(--c-card); box-shadow: var(--c-edge); }
.tpc-seg-full { display: flex; width: 100%; margin: 4px 0 14px; }
.tpc-seg-full button { flex: 1; padding: 6px 4px; }
.tpc-chip { display: inline-flex; align-items: center; gap: 4px; border: 0; background: var(--c-card); box-shadow: var(--c-edge); border-radius: 999px; height: 28px; padding: 0 11px; cursor: pointer; white-space: nowrap; }
.tpc-chip.is-on { background: var(--c-ink); color: #fff; box-shadow: none; }
.tpc-chip.is-y { background: var(--c-pill); box-shadow: 0 0 0 1px #E8CF4B inset; }
.tpc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tpc-pop { height: 28px; border: 0; border-radius: 8px; background: var(--c-card); box-shadow: var(--c-edge); padding: 0 8px; cursor: pointer; }

/* switches and pills */
.tpc-switch { position: relative; flex: none; width: 38px; height: 23px; border-radius: 999px; border: 0; padding: 0; background: #E2E2DA; cursor: pointer; transition: background .15s; vertical-align: middle; }
.tpc-switch i { position: absolute; top: 2px; left: 2px; width: 19px; height: 19px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s; }
.tpc-switch.is-on { background: #34C759; }
.tpc-switch.is-on i { transform: translateX(15px); }
.tpc-switch:disabled { opacity: .45; cursor: default; }
.tpc-switch:focus-visible, .tpc-btn:focus-visible, .tpc-row:focus-visible { outline: 2px solid var(--c-y); outline-offset: 2px; }
.tpc-pill { display: inline-flex; align-items: center; gap: 5px; height: 21px; padding: 0 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; background: var(--c-soft); color: #4A4A45; vertical-align: middle; }
.tpc-pill i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tpc-pill.is-live { background: #E3F5E8; color: #187A3C; }
.tpc-pill.is-paused { background: #FFF1CC; color: #8F6200; }
.tpc-pill.is-draft { background: var(--c-soft); color: #5A5A55; }
.tpc-pill.is-archived { background: transparent; box-shadow: inset 0 0 0 1px var(--c-line); color: var(--c-mute); }
.tpc-state { display: inline-flex; align-items: center; gap: 5px; height: 21px; padding: 0 8px; border-radius: 6px; font-size: 12px; font-weight: 500; background: var(--c-soft); color: #4A4A45; white-space: nowrap; }
.tpc-state i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tpc-state.is-on { background: #E3F5E8; color: #187A3C; }
.tpc-state.is-sched { background: #E7EEFC; color: var(--c-blue); }
.tpc-state.is-none { background: transparent; color: var(--c-mute); }
.tpc-stage { flex: none; font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 6px; background: var(--c-soft); color: #4A4A45; }
.tpc-stage.is-won, .tpc-stage.is-green { background: #E3F5E8; color: #187A3C; }
.tpc-stage.is-qualified, .tpc-stage.is-proposal, .tpc-stage.is-amber { background: #FFF1CC; color: #8F6200; }
.tpc-stage.is-new, .tpc-stage.is-blue { background: #E7EEFC; color: var(--c-blue); }
.tpc-kw { display: inline-block; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 11.5px; font-weight: 700; letter-spacing: .02em; padding: 2px 6px; border-radius: 5px; background: var(--c-soft); }
.tpc-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #B8B8B0; margin-right: 6px; vertical-align: 1px; }
.tpc-dot.is-green { background: #34C759; } .tpc-dot.is-amber { background: var(--c-amber); }
.tpc-tile { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 9px; background: var(--c-pill); color: #6F5500; }
.tpc-tile.is-promo { background: #E7EEFC; color: var(--c-blue); }
.tpc-tile.is-single { background: #E3F5E8; color: #187A3C; }
.tpc-tile.is-lg { width: 56px; height: 56px; border-radius: 14px; }
.tpc-tile.is-lg svg { width: 24px; height: 24px; }
.tpc-thumb { flex: none; position: relative; display: inline-flex; flex-direction: column; justify-content: flex-end; width: 30px; height: 37px; border-radius: 4px; overflow: hidden; background: var(--c-y); color: #111; font-size: 6px; font-weight: 800; line-height: 1.05; padding: 2px; }
.tpc-thumb.is-dark { background: #141414; color: var(--c-y); }
.tpc-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tpc-thumb.is-big { width: 64px; height: 80px; border-radius: 6px; font-size: 13px; padding: 4px; }
.tpc-av { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: var(--c-soft); font-size: 11px; font-weight: 600; color: #4A4A45; }

/* D1 list */
.tpc-head { display: flex; align-items: flex-end; gap: 24px; margin: 0 0 18px; flex-wrap: wrap; }
.tpc-head-main { flex: 1 1 380px; min-width: 0; }
.tpc-eyebrow { display: block; font-size: 12px; color: var(--c-mute); margin-bottom: 4px; }
.tpc-head h1 { font-size: 26px; font-weight: 700; }
.tpc-head p { margin: 6px 0 0; }
.tpc-stats { display: flex; gap: 30px; }
.tpc-stat { display: flex; flex-direction: column; align-items: center; }
.tpc-stat b { font-size: 22px; font-weight: 700; }
.tpc-stat span { font-size: 12px; color: var(--c-mute); white-space: nowrap; }
.tpc-bar { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; flex-wrap: wrap; }
.tpc-table-wrap { overflow-x: auto; }
.tpc-table { width: 100%; border-collapse: collapse; }
.tpc-table th { text-align: left; font-weight: 500; font-size: 12px; color: var(--c-mute); padding: 11px 12px; border-bottom: 1px solid var(--c-line); white-space: nowrap; }
.tpc-table td { padding: 11px 12px; border-bottom: 1px solid var(--c-line2); vertical-align: middle; }
.tpc-table tr:last-child td { border-bottom: 0; }
.tpc-table .r { text-align: right; }
.tpc-row { cursor: pointer; }
.tpc-row:hover td { background: #FAFAF6; }
.tpc-row.is-hl td { background: #FFFBEA; }
.tpc-row.is-sel td { background: #FFF6CF; }
.tpc-row.is-sel td:first-child { box-shadow: inset 3px 0 0 var(--c-y); }
.tpc-list td:first-child { min-width: 260px; }
.tpc-rowmain { display: flex; align-items: center; gap: 12px; min-width: 0; }
.tpc-note { display: flex; gap: 10px; align-items: center; margin: 14px 0 0; padding: 12px 16px; border-radius: var(--c-r); background: #FFFDF2; box-shadow: inset 0 0 0 1px #F1E3A6; color: #4A4A45; }
.tpc-note svg { color: #A87F00; flex: none; }

/* D2 campaign */
.tpc-crumbs { display: flex; gap: 8px; align-items: center; color: var(--c-mute); margin: 0 0 12px; font-size: 13px; }
.tpc-crumbs .tpc-link { font-size: 13px; color: var(--c-mute); font-weight: 500; }
.tpc-crumbs b { color: var(--c-ink); font-weight: 600; }
.tpc-dhead { display: flex; gap: 16px; align-items: flex-start; margin: 0 0 16px; }
.tpc-dtitle { flex: 1 1 auto; min-width: 0; }
.tpc-dtitle h1 { font-size: 26px; font-weight: 700; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tpc-dtitle p { margin: 6px 0 0; }
.tpc-acts { display: flex; gap: 8px; flex: none; align-items: center; }
.tpc-menu-wrap { position: relative; display: inline-flex; }
.tpc-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; width: 280px; background: var(--c-card); border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.16), 0 0 0 .5px rgba(0,0,0,.14); padding: 5px; }
.tpc-menu hr { border: 0; border-top: 1px solid var(--c-line2); margin: 5px 4px; }
.tpc-mi { display: flex; gap: 9px; align-items: flex-start; width: 100%; border: 0; background: none; padding: 7px 9px; border-radius: 7px; cursor: pointer; text-align: left; }
.tpc-mi:hover:not(:disabled) { background: var(--c-pill); }
.tpc-mi:disabled { color: var(--c-mute); cursor: default; }
.tpc-mi small { display: block; color: var(--c-mute); font-size: 11.5px; margin-top: 3px; white-space: normal; }
.tpc-mi.is-red { color: var(--c-red); }
.tpc-band { display: flex; gap: 9px; align-items: flex-start; padding: 10px 14px; border-radius: 10px; background: var(--c-soft); margin: 0 0 14px; color: #3A3A36; }
.tpc-band svg { flex: none; margin-top: 1px; }
.tpc-band.is-amber { background: #FFF6DA; color: #6B4C00; }
.tpc-band.is-blue { background: #EDF3FE; color: #234C9E; }
.tpc-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; align-items: start; }
.tpc-split { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 18px; align-items: start; }
.tpc-main { min-width: 0; }
.tpc-aside { min-width: 0; }
.tpc-h3row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 18px 2px 8px; }
.tpc .tpc-h3row .tpc-h3 { margin: 0; }
.tpc .tpc-h3 { font-size: 14px; font-weight: 700; margin: 18px 2px 8px; }
.tpc .tpc-main > .tpc-h3row:first-child, .tpc .tpc-aside > :first-child { margin-top: 0; }
.tpc-posts td:first-child { max-width: 0; width: 42%; }
.tpc-posts td:last-child, .tpc-posts th:last-child { width: 60px; }
.tpc-funnel { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); background: var(--c-card); border-radius: var(--c-r); box-shadow: var(--c-edge); overflow: hidden; }
.tpc-fstep { padding: 14px 12px; border-right: 1px solid var(--c-line2); min-width: 0; }
.tpc-fstep.is-last { border-right: 0; background: #FFFBEA; }
.tpc-flabel { display: flex; align-items: center; gap: 5px; font-size: 12px; color: #4A4A45; white-space: nowrap; overflow: hidden; }
.tpc-flabel i { width: 6px; height: 6px; border-radius: 50%; background: #34C759; flex: none; }
.tpc-flabel i.is-part { background: var(--c-amber); }
.tpc-fstep > b { display: block; font-size: 24px; font-weight: 700; margin: 4px 0 6px; letter-spacing: -.02em; }
.tpc-fbar { display: block; height: 4px; border-radius: 4px; background: var(--c-soft); overflow: hidden; margin-bottom: 6px; }
.tpc-fbar i { display: block; height: 100%; background: var(--c-y); border-radius: 4px; }
.tpc-fstep .tpc-sub { white-space: normal; }
.tpc-goal { display: flex; align-items: center; gap: 16px; padding: 16px; margin-bottom: 4px; }
.tpc-goal b { font-size: 18px; }
.tpc-ring-bg { fill: none; stroke: var(--c-soft); stroke-width: 8; }
.tpc-ring { fill: none; stroke: var(--c-y); stroke-width: 8; stroke-linecap: round; }
.tpc-auto-head { display: flex; align-items: center; gap: 8px; padding: 13px 14px; border-bottom: 1px solid var(--c-line2); }
.tpc-auto-head b { flex: 1; }
.tpc-kv { display: flex; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--c-line2); align-items: center; }
.tpc-kv:last-child { border-bottom: 0; }
.tpc-kv > span:first-child { flex: 0 0 100px; color: var(--c-mute); }
.tpc-kv > span:last-child { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: flex-end; gap: 6px; text-align: right; }
.tpc-auto .tpc-kv > span:last-child { justify-content: flex-start; text-align: left; }
.tpc-auto-foot { display: flex; align-items: center; gap: 7px; padding: 11px 14px; border-top: 1px solid var(--c-line2); color: #8A6A00; font-weight: 600; }
.tpc-auto-foot.is-amber { color: #8F6200; font-weight: 500; }
.tpc-mini { overflow: hidden; }
.tpc-mrow { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--c-line2); }
.tpc-mrow:last-child { border-bottom: 0; }
.tpc-mrow .tpc-ell { flex: 1; }
.tpc-tl { padding: 6px 0; }
.tpc-tlrow { display: flex; gap: 10px; padding: 9px 14px; }
.tpc-tlrow b { font-weight: 500; display: block; }
.tpc-tlic { flex: none; display: inline-flex; width: 26px; height: 26px; border-radius: 50%; background: var(--c-soft); align-items: center; justify-content: center; color: #5A5A55; }
.tpc-tlic svg { width: 14px; height: 14px; }

/* D3 inspector */
.tpc-insp { padding: 14px 16px 18px; position: sticky; top: 8px; max-height: calc(100vh - 120px); overflow: auto; }
.tpc-insp-top { display: flex; align-items: center; margin: -4px 0 8px; }
.tpc-insp-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 14px; }
.tpc-insp-head h2 { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.tpc-insp-head .tpc-sub { white-space: normal; }
.tpc-big { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 12px; background: var(--c-soft); margin-bottom: 12px; }
.tpc-big > div { flex: 1; }
.tpc-big b { display: block; font-size: 15px; }
.tpc-big span { color: var(--c-mute); font-size: 12.5px; }
.tpc-big.is-on { background: #E6F6EA; }
.tpc-big.is-on span { color: #2E6B43; }
.tpc-big .tpc-switch { width: 50px; height: 30px; }
.tpc-big .tpc-switch i { width: 26px; height: 26px; }
.tpc-big .tpc-switch.is-on i { transform: translateX(20px); }
.tpc-kvs { margin-bottom: 4px; }
.tpc-bubble { background: var(--c-soft); border-radius: 14px; padding: 11px 13px; white-space: normal; overflow-wrap: anywhere; font-size: 13px; }
.tpc-nums { display: grid; grid-template-columns: repeat(4, 1fr); padding: 12px 6px; margin-top: 14px; }
.tpc-nums div { padding: 0 8px; }
.tpc-nums b { display: block; font-size: 20px; font-weight: 700; }
.tpc-nums span { color: var(--c-mute); font-size: 12px; }

/* sheets */
.tpc-sheet-wrap { position: fixed; inset: 0; z-index: 9000; display: flex; align-items: center; justify-content: center; padding: 20px; }
.tpc-sheet-wrap[hidden] { display: none; }
.tpc-scrim { position: absolute; inset: 0; background: rgba(20,20,18,.32); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); }
.tpc-sheet { position: relative; width: min(460px, 100%); max-height: calc(100vh - 40px); overflow: auto; background: var(--c-card); border-radius: 16px; box-shadow: 0 24px 60px rgba(0,0,0,.25), 0 0 0 .5px rgba(0,0,0,.14); animation: tpc-in .18s ease-out; }
.tpc-sheet-wrap.is-wide .tpc-sheet { width: min(1000px, 100%); height: min(720px, calc(100vh - 40px)); overflow: hidden; }
@keyframes tpc-in { from { transform: translateY(8px) scale(.985); opacity: 0; } to { transform: none; opacity: 1; } }
.tpc-confirm { padding: 22px 22px 18px; }
.tpc-cic { display: inline-flex; width: 44px; height: 44px; border-radius: 12px; background: var(--c-soft); align-items: center; justify-content: center; margin-bottom: 14px; }
.tpc-cic.is-red { background: #FDE8E6; color: var(--c-red); }
.tpc-confirm h2 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.tpc-confirm p { margin: 0 0 12px; color: #3A3A36; }
.tpc-bul { list-style: none; margin: 4px 0 10px; padding: 0; }
.tpc-bul li { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--c-line2); color: #3A3A36; }
.tpc-bul li svg { flex: none; color: var(--c-mute); margin-top: 1px; }
.tpc-check { display: flex; gap: 8px; align-items: center; margin: 4px 0 12px; }
.tpc-sheet-btns { display: flex; gap: 8px; align-items: center; margin-top: 16px; }
.tpc-field { display: block; margin: 0 0 12px; }
.tpc-field > span { display: block; font-size: 12px; font-weight: 600; margin: 0 0 5px; color: #3A3A36; }
.tpc-field input, .tpc-field select, .tpc-field textarea, .tpc-prefix { width: 100%; border: 0; border-radius: 9px; background: var(--c-card); box-shadow: inset 0 0 0 1px var(--c-line); padding: 9px 11px; outline: none; }
.tpc-field textarea { resize: vertical; line-height: 1.45; }
.tpc-field input:focus, .tpc-field textarea:focus, .tpc-field select:focus, .tpc-prefix:focus-within { box-shadow: inset 0 0 0 1.5px var(--c-y), 0 0 0 3px rgba(245,197,0,.18); }
.tpc-prefix { display: flex; align-items: center; padding: 0 0 0 11px; }
.tpc-prefix span { color: var(--c-mute); white-space: nowrap; }
.tpc-prefix input { box-shadow: none !important; padding-left: 0; border-radius: 0 9px 9px 0; }
.tpc .is-bad, .tpc-sheet-wrap .is-bad { box-shadow: inset 0 0 0 1.5px var(--c-red) !important; }
.tpc-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tpc-trow { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-bottom: 1px solid var(--c-line2); }
.tpc-trow:last-child { border-bottom: 0; }
.tpc-trow > span:first-child { flex: 1; }
.tpc-num { width: 70px; border: 0; border-radius: 7px; box-shadow: inset 0 0 0 1px var(--c-line); padding: 4px 8px; }

/* wizard */
.tpc-wizard { display: flex; height: 100%; }
.tpc-wrail { flex: 0 0 230px; background: #F7F7F3; border-right: 1px solid var(--c-line2); padding: 22px 14px; display: flex; flex-direction: column; gap: 4px; }
.tpc-wrail h2 { font-size: 16px; font-weight: 700; margin: 0 8px 12px; }
.tpc-wstep { display: flex; align-items: center; gap: 10px; border: 0; background: none; padding: 9px 10px; border-radius: 9px; cursor: pointer; text-align: left; }
.tpc-wstep i { display: inline-flex; width: 22px; height: 22px; border-radius: 50%; align-items: center; justify-content: center; font-style: normal; font-size: 11px; font-weight: 700; box-shadow: inset 0 0 0 1px var(--c-line); flex: none; }
.tpc-wstep i svg { width: 12px; height: 12px; }
.tpc-wstep.is-on { background: var(--c-pill); font-weight: 600; }
.tpc-wstep.is-on i { background: var(--c-ink); color: #fff; box-shadow: none; }
.tpc-wstep.is-done i { background: #34C759; color: #fff; box-shadow: none; }
.tpc-wfill { margin-top: auto; display: flex; gap: 8px; padding: 12px; background: var(--c-card); border-radius: 12px; box-shadow: var(--c-edge); font-size: 12px; }
.tpc-wfill svg { flex: none; color: #C49A00; }
.tpc-wfill b { display: block; margin-bottom: 6px; }
.tpc-wfill textarea { width: 100%; border: 0; border-radius: 8px; box-shadow: inset 0 0 0 1px var(--c-line); padding: 6px 8px; font-size: 12px; resize: none; margin-bottom: 6px; }
.tpc-wbody { flex: 1; min-width: 0; display: flex; flex-direction: column; padding: 24px 28px 0; overflow: auto; }
.tpc-wbody > .tpc-wfoot { margin-top: auto; }
.tpc-wtitle { font-size: 22px; font-weight: 700; margin-bottom: 4px !important; }
.tpc-wbody > .tpc-mute { margin: 0 0 16px; }
.tpc-wfoot { position: sticky; bottom: 0; background: var(--c-card); display: flex; align-items: center; gap: 8px; padding: 14px 0 18px; border-top: 1px solid var(--c-line2); margin-top: 20px; }
.tpc-kcards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 0 0 18px; }
.tpc-kcard { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; text-align: left; border: 0; background: var(--c-card); border-radius: 12px; box-shadow: inset 0 0 0 1px var(--c-line); padding: 14px; cursor: pointer; }
.tpc-kcard span:last-child { color: var(--c-mute); font-size: 12px; }
.tpc-kcard.is-on { background: #FFFCEB; box-shadow: inset 0 0 0 2px var(--c-y); }
.tpc-kcard:disabled { opacity: .45; cursor: default; }
.tpc-wbar { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 12px; }
.tpc-witem { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--c-line2); }
.tpc-witem:last-child { border-bottom: 0; }
.tpc-wnum { flex: none; width: 16px; color: var(--c-mute); padding-top: 9px; font-size: 12px; }
.tpc-wmid { flex: 1 1 200px; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.tpc-wmid input, .tpc-wkw, .tpc-wslug, .tpc-wcta { border: 0; border-radius: 7px; box-shadow: inset 0 0 0 1px var(--c-line); padding: 6px 8px; background: var(--c-card); min-width: 0; outline: none; }
.tpc-wmid input:focus, .tpc-wkw:focus, .tpc-wslug:focus, .tpc-wcta:focus { box-shadow: inset 0 0 0 1.5px var(--c-y); }
.tpc-wtitle-in { font-weight: 600; }
.tpc-wblurb { font-size: 12px; }
.tpc-sheet-wrap .tpc-wkw { flex: 0 0 110px; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-weight: 700; text-transform: uppercase; height: 34px; }
.tpc-wlink { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.tpc-wslug { font-weight: 600; font-size: 12.5px; }
.tpc-upl { cursor: pointer; font-size: 12px; }
.tpc-picker { padding: 10px; margin: 0 0 12px; max-height: 300px; overflow: auto; }
.tpc-picker > input { width: 100%; border: 0; border-radius: 8px; box-shadow: inset 0 0 0 1px var(--c-line); padding: 7px 10px; margin-bottom: 6px; }
.tpc-picker .tpc-prow { width: 100%; }
.tpc-dmgrid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 300px); gap: 20px; align-items: start; }
.tpc-dmgrid .tpc-card { margin-top: 12px; }
.tpc-flabel2 { display: block; font-size: 12px; font-weight: 600; margin: 0 0 5px; color: #3A3A36; }
.tpc-chat { background: #F2F2EE; border-radius: 16px; padding: 12px; display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.tpc-chat-who { display: flex; align-items: center; gap: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--c-line); }
.tpc-chat-who .tpc-av { width: 22px; height: 22px; font-size: 9px; }
.tpc-chat-me { align-self: flex-end; background: #3478F6; color: #fff; padding: 8px 12px; border-radius: 16px; font-size: 13px; }
.tpc-chat .tpc-bubble { background: #fff; align-self: flex-start; max-width: 92%; }
.tpc-wphead { display: none; }

/* iPhone (P1 to P3) */
.tpc-p-phone { padding: 0 16px 40px; font-size: 15px; }
.tpc-p-phone .tpc-sub { font-size: 13px; }
.tpc-pnav { padding: 8px 0 2px; }
.tpc-pback { display: inline-flex; align-items: center; gap: 2px; border: 0; background: none; color: #8A6A00; font-size: 17px; padding: 4px 0; cursor: pointer; margin-left: -6px; }
.tpc-pback svg { width: 22px; height: 22px; }
.tpc-ptitle { font-size: 32px !important; font-weight: 800 !important; margin: 2px 0 12px !important; letter-spacing: -.02em; }
.tpc-plist { overflow: hidden; }
.tpc-prow { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border: 0; background: none; text-align: left; border-bottom: 1px solid var(--c-line2); cursor: pointer; min-height: 56px; }
.tpc-prow:last-child { border-bottom: 0; }
.tpc-prow > .tpc-ell { flex: 1; }
.tpc-plink { display: block; width: 100%; border: 0; background: none; color: var(--c-mute); padding: 14px; font-size: 14px; cursor: pointer; }
.tpc-psum { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; }
.tpc-psum b { display: block; margin-bottom: 3px; }
.tpc-pacts { display: flex; gap: 8px; margin: 0 0 6px; }
.tpc-pacts .tpc-btn { flex: 1; justify-content: center; height: 44px; border-radius: 12px; font-size: 15px; }
.tpc-pacts .tpc-menu-wrap { flex: 0 0 auto; }
.tpc-pacts .tpc-menu-wrap .tpc-btn { width: 52px; }
.tpc-ptiles { display: grid; grid-template-columns: repeat(4, 1fr); overflow: hidden; }
.tpc-ptiles div { padding: 12px; border-right: 1px solid var(--c-line2); border-bottom: 1px solid var(--c-line2); }
.tpc-ptiles div:nth-child(4n) { border-right: 0; }
.tpc-ptiles div.is-hl { background: #FFFBEA; }
.tpc-ptiles b { display: block; font-size: 19px; font-weight: 700; }
.tpc-ptiles span { color: var(--c-mute); font-size: 12px; }
.tpc-pwait { display: flex; align-items: center; gap: 10px; width: 100%; margin: 12px 0 0; padding: 14px; border: 0; border-radius: 12px; background: #FFF6D6; color: #4A3A00; font-size: 15px; cursor: pointer; text-align: left; }
.tpc-pwait span { flex: 1; }
.tpc-pwait b { color: #8A6A00; }
.tpc-p-phone .tpc-insp-head h2 { font-size: 22px; }
.tpc-p-phone .tpc-kv > span:first-child { flex-basis: 90px; }
.tpc-p-phone .tpc-auto .tpc-kv { flex-direction: column; align-items: flex-start; gap: 2px; }
.tpc-p-phone .tpc-auto .tpc-kv > span:first-child { flex: none; }
.tpc-p-phone .tpc-switch { width: 51px; height: 31px; }
.tpc-p-phone .tpc-switch i { width: 27px; height: 27px; }
.tpc-p-phone .tpc-switch.is-on i { transform: translateX(20px); }
.tpc-p-phone .tpc-menu { width: 260px; }

/* phone sheets: bottom sheets; the wizard goes full height with its steps on top */
.tpc-sheet-wrap.is-phone { align-items: flex-end; padding: 0; }
.tpc-sheet-wrap.is-phone .tpc-sheet { width: 100%; max-height: 92vh; border-radius: 16px 16px 0 0; padding-bottom: env(safe-area-inset-bottom); animation: tpc-up .22s ease-out; }
.tpc-sheet-wrap.is-phone.is-wide .tpc-sheet { height: 94vh; }
@keyframes tpc-up { from { transform: translateY(30px); opacity: .6; } to { transform: none; opacity: 1; } }
.tpc-sheet-wrap.is-phone .tpc-wizard { flex-direction: column; }
.tpc-sheet-wrap.is-phone .tpc-wphead { display: flex; justify-content: space-between; align-items: baseline; padding: 16px 18px 6px; }
.tpc-sheet-wrap.is-phone .tpc-wbody { padding: 6px 18px 0; }
.tpc-sheet-wrap.is-phone .tpc-kcards, .tpc-sheet-wrap.is-phone .tpc-dmgrid, .tpc-sheet-wrap.is-phone .tpc-2col { grid-template-columns: 1fr; }
.tpc-sheet-wrap.is-phone .tpc-witem { flex-wrap: wrap; }
.tpc-sheet-wrap.is-phone .tpc-wkw { flex: 1 1 100%; }
.tpc-sheet-wrap.is-phone .tpc-wfoot { flex-wrap: wrap; }
.tpc-sheet-wrap.is-phone .tpc-wfoot > .tpc-sub { flex: 1 1 100%; }
.tpc-sheet-wrap.is-phone .tpc-sheet-btns { flex-wrap: wrap; }
.tpc-sheet-wrap.is-phone .tpc-sheet-btns .tpc-btn { flex: 1 1 auto; justify-content: center; height: 44px; }

/* narrower desktops and iPad */
@media (max-width: 1280px) { .tpc-grid { grid-template-columns: minmax(0, 1fr) 300px; } .tpc-split { grid-template-columns: minmax(0, 1fr) 360px; } }
@media (max-width: 1100px) {
  .tpc-grid { grid-template-columns: 1fr; }
  .tpc-funnel { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .tpc-fstep:nth-child(4) { border-right: 0; }
  .tpc-fstep:nth-child(-n+4) { border-bottom: 1px solid var(--c-line2); }
  .tpc-split { grid-template-columns: 1fr; }
  .tpc-insp { position: static; max-height: none; }
  .tpc-dhead { flex-wrap: wrap; }
}
.tpc-p-ipad .tpc-btn { height: 36px; }
.tpc-p-ipad .tpc-head h1, .tpc-p-ipad .tpc-dtitle h1 { font-size: 28px; }
@media (max-width: 760px) {
  .tpc-stats { gap: 18px; }
  .tpc-wrail { display: none; }
  .tpc-kcards, .tpc-dmgrid { grid-template-columns: 1fr; }
}

/* fixes after the render check */
.tpc-sheet-wrap .tpc-prefix input { flex: 1 1 auto; min-width: 0; width: auto; }
.tpc-split .tpc-funnel { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tpc-split .tpc-fstep:nth-child(4) { border-right: 0; }
.tpc-split .tpc-fstep:nth-child(-n+4) { border-bottom: 1px solid var(--c-line2); }
@media (max-width: 1300px) { .tpc-split .tpc-posts .c-state { display: none; } }
