/* The tour: a fake Stellar window over the site. Everything is scoped to #tour.
   html.tour-on shows it; #tour.started keeps it laid out (but invisible) once the visitor leaves for the site,
   so the scripted cursor can keep measuring things in the background. */

@property --cx { syntax: '<number>'; inherits: true; initial-value: 0; }
@property --cy { syntax: '<number>'; inherits: true; initial-value: 0; }
@property --z  { syntax: '<number>'; inherits: true; initial-value: 1; }

#tour { --canvas: #E3DFD6; --shadow: 0 30px 60px -30px rgba(20,18,21,.35); display: none; position: fixed; inset: 0; z-index: 100; background: var(--canvas); color: var(--fg); font-size: 16px; line-height: normal; user-select: none; -webkit-user-select: none; }
#tour.started { display: block; visibility: hidden; opacity: 0; pointer-events: none; transition: opacity .5s, visibility 0s .5s; }
html.tour-on #tour { display: block; visibility: visible; opacity: 1; pointer-events: auto; transition: opacity .5s; }
html.tour-on, html.tour-on body { overflow: hidden; }
#tour :where(button) { padding: 0; border: 0; background: none; }

/* camera */
#tour #view { position: fixed; inset: 0; overflow: hidden; touch-action: none; transition: opacity .3s, translate .3s; }
#tour #view.swap { opacity: 0; translate: 0 10px; }
/* Down to the bottom of the screen on iOS too: inset: 0 stops above Safari's floating toolbar, 100lvh
   reaches under it. The chat and other fixed panels still sit above the toolbar. */
#tour, #tour #view { bottom: auto; height: 100lvh; }
html.tour-on { background: #E3DFD6; }
#tour.drawmode #view { cursor: crosshair; }
#tour #world { position: absolute; left: 0; top: 0; transform-origin: 0 0; transform: translate(calc(var(--cx) * 1px), calc(var(--cy) * 1px)) scale(var(--z)); }
#tour .dots { position: absolute; left: -8000px; top: -8000px; width: 16000px; height: 16000px; background: radial-gradient(#C3BDB1 1.2px, transparent 1.4px) 0 0 / 24px 24px; }

#tour .frame { position: absolute; opacity: 0; transition: opacity .45s; }
#tour .frame.in { opacity: 1; }
/* Frame names stay the same size on screen at any zoom, so when zoomed out they'd run into the next frame.
   Like Figma, a name never gets wider than its frame on screen (100% of the frame × zoom) and ends in … instead. */
#tour .frame > .flabel { position: absolute; left: 0; bottom: 100%; margin-bottom: 10px; transform-origin: 0 100%; scale: calc(1 / var(--z)); max-width: calc(100% * var(--z)); overflow: hidden; text-overflow: ellipsis; font: 400 12px var(--mono); letter-spacing: .02em; color: var(--fg-2); white-space: nowrap; }
#tour .rv { opacity: 0; translate: 0 6px; transition: opacity .35s, translate .35s, box-shadow .2s, background .3s, color .3s; }
#tour .rv.in { opacity: 1; translate: 0 0; }

/* boards: the part of the workflow other tools don't have */
#tour .board { width: 640px; height: 760px; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-ui); box-shadow: var(--shadow); padding: 28px 32px 32px; display: flex; flex-direction: column; }
#tour .bh { font-family: var(--headline); font-weight: 700; font-size: 44px; letter-spacing: -.02em; line-height: .96; color: var(--night); margin-top: 40px; }
#tour .bb { font-size: 15px; line-height: 1.45; color: var(--fg-2); margin-top: 10px; }

/* 01 board */
#tour .tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px 20px; margin-top: 28px; }
#tour .tile { position: relative; display: flex; flex-direction: column; gap: 4px; border-radius: 2px; }
#tour .tile .th { aspect-ratio: 1; position: relative; overflow: hidden; margin-bottom: 8px; transition: box-shadow .2s; }
#tour .tile q { font-size: 14px; line-height: 1.3; color: var(--fg); }
#tour .tile .ck { position: absolute; right: 8px; top: 8px; width: 24px; height: 24px; border-radius: 50%; background: var(--night); display: none; place-items: center; }
#tour .tile .ck::after { content: ''; width: 9px; height: 5px; border-left: 2px solid var(--secondary); border-bottom: 2px solid var(--secondary); rotate: -45deg; translate: 0 -1px; }
#tour .tile.kept .th { box-shadow: 0 0 0 2px var(--night); }
#tour .tile.kept .ck { display: grid; }
#tour .tile.out { opacity: .3; }
#tour .tile.arriving.rv { translate: 160px -40px; rotate: 4deg; transition: opacity .35s, translate .7s cubic-bezier(.2,.8,.2,1), rotate .7s cubic-bezier(.2,.8,.2,1), box-shadow .2s; }
#tour .tile.arriving.rv.in { translate: 0 0; rotate: 0deg; }
#tour .tile .saved { position: absolute; left: 8px; bottom: 8px; display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px 4px 5px; border-radius: 99px; background: var(--surface); color: var(--fg); font: 500 11px var(--sans); white-space: nowrap; box-shadow: 0 6px 16px -8px rgba(20,18,21,.5); transition: opacity .4s; }
#tour .tile .saved i { width: 14px; height: 14px; border-radius: 50%; background: var(--night); display: grid; place-items: center; }
#tour .tile .saved i::after { content: ''; width: 6px; height: 6px; border-radius: 0 100% 0 100%; background: var(--secondary); }
#tour .tile .saved.gone { opacity: 0; }
#tour .picking .tile:not(.kept):hover .th { box-shadow: 0 0 0 1px var(--fg-2); }
#tour .t-blur { background: var(--paper); border: 1px solid var(--rule); }
#tour .t-blur::before, #tour .t-blur::after { content: ''; position: absolute; left: 10%; width: 90%; height: 34%; border-radius: 0 100% 0 100%; filter: blur(14px); }
#tour .t-blur::before { top: 16%; background: var(--primary); }
#tour .t-blur::after { top: 52%; left: 0; background: var(--secondary); }
#tour .t-half { background: var(--paper); border: 1px solid var(--rule); }
#tour .t-half::after { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at center, var(--night) 0 36%, transparent 40%) 0 0 / 9px 9px; -webkit-mask: radial-gradient(ellipse 62% 52% at 42% 58%, #000 25%, transparent 70%); mask: radial-gradient(ellipse 62% 52% at 42% 58%, #000 25%, transparent 70%); }
#tour .t-type { background: var(--paper); border: 1px solid var(--rule); display: grid; place-items: center; font-family: var(--display); font-weight: 500; letter-spacing: -.05em; font-size: 84px; color: var(--night); line-height: 1; }
#tour .t-check { background: conic-gradient(#0C7F63 25%, #000 0 50%, #0C7F63 0 75%, #000 0) 0 0 / 36px 36px; }
#tour .t-scan { background: var(--night); }
#tour .t-scan::after { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(180deg, var(--primary) 0 4px, transparent 4px 7px); -webkit-mask: linear-gradient(170deg, #000 40%, transparent 41%, transparent 58%, #000 59%); mask: linear-gradient(170deg, #000 40%, transparent 41%, transparent 58%, #000 59%); }
#tour .t-dither { background: var(--paper); border: 1px solid var(--rule); }
#tour .t-dither::before, #tour .t-dither::after { content: ''; position: absolute; width: 86%; height: 30%; border-radius: 0 100% 0 100%; }
#tour .t-dither::before { left: 10%; top: 20%; background: repeating-linear-gradient(180deg, var(--primary) 0 3px, transparent 3px 6px); }
#tour .t-dither::after { left: 2%; top: 50%; background: repeating-linear-gradient(180deg, #C7EE5E 0 3px, transparent 3px 6px); }

/* 02 brand book */
#tour .book { display: grid; grid-template-columns: 1fr 1fr; height: 280px; margin-top: 28px; box-shadow: 0 30px 50px -30px rgba(20,18,21,.4); }
#tour .pg { padding: 20px; display: flex; flex-direction: column; justify-content: space-between; }
#tour .p1 { background: var(--night); color: var(--fg-night); }
#tour .p1 .label, #tour .p1 .mono { color: var(--fg-night-2); }
/* The cover shows the real logo; the typed name stays for screen readers */
#tour .leafmark { width: 200px; max-width: 100%; aspect-ratio: 799.79 / 165.99; background: url('/assets/logo-paper.svg') no-repeat left center / contain; }
#tour .leafmark i { display: none; }
#tour .bwm { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
#tour .p2 { background: var(--paper); gap: 10px; }
#tour .stripes { display: grid; grid-template-rows: repeat(4, 1fr); gap: 4px; flex: 1; }
#tour .stripes div { display: flex; justify-content: space-between; align-items: flex-end; padding: 6px 8px; font: 500 11px var(--mono); color: var(--night); }
#tour .spec { font-family: var(--headline); font-weight: 700; font-size: 24px; letter-spacing: -.01em; line-height: 1; color: var(--night); }
#tour .rules { margin-top: 22px; border-top: 1px solid var(--rule); }
#tour .rules > div { display: grid; grid-template-columns: 96px 1fr; align-items: baseline; padding: 11px 0; border-bottom: 1px solid var(--rule); font-size: 15px; line-height: 1.35; transition: background .3s, color .3s, padding .3s; }
#tour .rules > div.flash { background: var(--night); color: var(--fg-night); padding-left: 12px; padding-right: 12px; }
#tour .rules > div.flash .label { color: var(--fg-night-2); }
#tour .lockbar { margin-top: auto; display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--night); background: transparent; text-align: left; font-size: 15px; font-weight: 500; }
#tour .lockbar svg { width: 18px; height: 18px; flex: none; }
#tour .lockbar .sw { margin-left: auto; width: 36px; height: 20px; border-radius: 99px; background: var(--rule); position: relative; transition: background .25s; flex: none; }
#tour .lockbar .sw::after { content: ''; position: absolute; left: 2px; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: translate .25s; }
#tour .lockbar.on { background: var(--night); color: var(--fg-night); }
#tour .lockbar.on .sw { background: var(--secondary); }
#tour .lockbar.on .sw::after { translate: 16px 0; background: var(--night); }
#tour .lockbar.pulse { animation: lockpulse 1.4s ease-in-out infinite; }
@keyframes lockpulse { 50% { box-shadow: 0 0 0 6px rgba(11,10,12,.08); } }

/* 03 plan */
#tour .prompt { margin-top: 26px; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
#tour .ubub { max-width: 84%; background: var(--night); color: var(--fg-night); padding: 12px 16px; border-radius: 14px 14px 4px 14px; font-size: 15px; line-height: 1.45; min-height: 46px; }
#tour .att { display: flex; gap: 8px; }
#tour .chipx { display: inline-flex; align-items: center; gap: 6px; font: 500 12px var(--mono); padding: 6px 10px; border-radius: 99px; border: 1px solid var(--rule); background: var(--paper); color: var(--fg); }
#tour .chipx svg { width: 12px; height: 12px; }
#tour .chipx.lock { background: var(--night); color: var(--fg-night); border-color: var(--night); }
#tour .ai { margin-top: 18px; font-size: 15px; color: var(--fg-2); }
#tour .sheet { margin-top: 14px; border-top: 1px solid var(--rule); }
#tour .srow { display: grid; grid-template-columns: 96px 1fr; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--rule); align-items: start; font-size: 15px; line-height: 1.4; }
#tour .srow .chips { display: flex; flex-wrap: wrap; gap: 6px; }
#tour .srow .chip { font-size: 13px; font-weight: 500; border: 1px dashed #A9A398; padding: 4px 9px; border-radius: 6px; }
#tour .srow .sws { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
#tour .srow .sws i { width: 18px; height: 18px; border-radius: 50%; border: 1px solid rgba(0,0,0,.1); }
#tour .srow .sws span { margin-left: 6px; font-weight: 500; }
#tour .foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; }
#tour .foot .btn { padding: 11px 18px; font-size: 14px; border: 1px solid var(--fg); }
#tour .foot .btn.go { background: var(--night); color: var(--fg-night); border-color: var(--night); }
#tour .arrow { position: absolute; font: 300 40px var(--display); color: #A8A39A; opacity: 0; transition: opacity .5s; }
#tour .arrow.in { opacity: 1; }

/* the visitor's frame: their own screen, holding a copy of the site's nav and hero */
#tour #home { background: rgba(255,255,255,.35); }
#tour #home.in { background: var(--paper); box-shadow: 0 1px 2px rgba(0,0,0,.05), 0 30px 70px -30px rgba(20,18,21,.35); }
#tour #home.drawing { opacity: 1; background: rgba(255,255,255,.35); outline: 1.5px solid var(--night); box-shadow: none; }
#tour #home.snap { transition: left .6s cubic-bezier(.45,0,.2,1), top .6s cubic-bezier(.45,0,.2,1), width .6s cubic-bezier(.45,0,.2,1), height .6s cubic-bezier(.45,0,.2,1), opacity .45s; }
#tour #home .content { position: absolute; left: 0; top: 0; overflow: hidden; opacity: 0; transition: opacity .6s; font-size: 17px; line-height: 1.55; }
#tour #home.started .content { opacity: 1; }
#tour #drawDim { position: absolute; left: 50%; top: 100%; translate: -50% 10px; scale: calc(1 / var(--z)); transform-origin: 50% 0; background: var(--night); color: var(--fg-night); font: 400 12px var(--mono); padding: 4px 8px; border-radius: 4px; white-space: nowrap; display: none; }
#tour #home.drawing #drawDim { display: block; }
#tour #ghost { position: absolute; left: 0; top: 0; width: 1280px; height: 960px; border: 3px dashed #BDB7AC; animation: breathe 2.4s ease-in-out infinite; transition: opacity .3s; }
@keyframes breathe { 50% { border-color: #D6D1C7; } }

#tour #home .tl span { opacity: .25; transition: opacity .3s; }
#tour #home .tl span.on { opacity: 1; }
#tour #home .art use { transition: opacity .35s; }
#tour .wire { background: #DAD5CB !important; border-color: transparent !important; border-radius: 6px; }
#tour .wire * { visibility: hidden; }
#tour .src { position: absolute; z-index: 6; display: inline-flex; align-items: center; gap: 8px; font: 400 13px var(--mono); background: var(--night); color: var(--fg-night); padding: 7px 12px; border-radius: 99px; white-space: nowrap; box-shadow: 0 10px 24px -10px rgba(0,0,0,.4); opacity: 0; translate: 0 6px; transition: opacity .35s, translate .35s; }
#tour .src::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--secondary); }
#tour .src.in { opacity: 1; translate: 0 0; }

/* cursors */
#tour #sc { position: absolute; left: 0; top: 0; z-index: 50; pointer-events: none; opacity: 0; transition: opacity .3s; }
#tour #sc.on { opacity: 1; }
#tour #sc .inner { scale: calc(1 / var(--z)); transform-origin: 0 0; position: relative; }
/* max-width: none, or site.css's svg { max-width: 100% } squeezes the arrow to 0 inside the zero-width world */
#tour #sc svg { display: block; max-width: none; margin: -3px 0 0 -4px; filter: drop-shadow(0 2px 3px rgba(0,0,0,.2)); }
#tour .ctag { position: absolute; left: 14px; top: 18px; font: 500 12px var(--sans); padding: 3px 9px; border-radius: 99px; white-space: nowrap; color: var(--night); }
#tour #sc .ctag { background: var(--primary); }
/* The visitor's own cursor is Stellar's arrow in lime, with no name tag (only the agents get one). Crosshair while drawing the frame. */
#tour { --you: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Cdefs%3E%3Cfilter id='s' x='-50%25' y='-50%25' width='200%25' height='200%25'%3E%3CfeDropShadow dx='0' dy='2' stdDeviation='1.5' flood-opacity='.2'/%3E%3C/filter%3E%3C/defs%3E%3Cpath d='M4 2l16 9-7 2-3 7z' fill='%23D1F96C' stroke='%23fff' stroke-width='1.5' stroke-linejoin='round' filter='url(%23s)'/%3E%3C/svg%3E") 4 2, default; cursor: var(--you); }
#tour :is(a, button, .btn, [role="button"]) { cursor: var(--you); }

/* app chrome */
#tour .panel { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-ui); box-shadow: 0 20px 40px -24px rgba(20,18,21,.3); }
#tour #top { position: fixed; left: 0; right: 0; top: 0; height: 56px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 12px 0 20px; z-index: 30; background: rgba(236,233,225,.92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--rule); transition: opacity .4s, translate .4s; }
#tour #top .wm { display: block; line-height: 0; }
#tour #top .wm img { height: 22px; width: auto; }
#tour .tools { display: flex; gap: 2px; margin-left: 22px; }
#tour .tools button { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; color: var(--night); }
#tour .tools button.on { background: var(--night); color: var(--fg-night); }
#tour .tools button:not(.on):hover { background: rgba(0,0,0,.06); }
#tour .tools svg { width: 17px; height: 17px; }
#tour #file { font: 400 11px var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--fg-2); }
#tour #top .right { display: flex; gap: 6px; align-items: center; justify-content: flex-end; }
#tour .avs { display: flex; margin-right: 8px; }
#tour .avs span { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--paper); display: grid; place-items: center; font: 600 11px var(--sans); color: var(--night); }
#tour .avs span + span { margin-left: -8px; }
#tour #avS { display: none; }
#tour #avS.on { display: grid; animation: pop .4s cubic-bezier(.3,1.6,.5,1); }
@keyframes pop { from { scale: 0; } }
#tour .ghost { font: 500 14px var(--sans); color: var(--fg-2); padding: 8px 10px; }
#tour .ghost:hover { color: var(--night); }
#tour #top .btn { padding: 10px 16px; font-size: 14px; }
#tour #tip { position: fixed; top: 62px; z-index: 31; background: var(--night); color: var(--fg-night); font-size: 12px; padding: 6px 10px; border-radius: 6px; opacity: 0; transition: opacity .2s; pointer-events: none; }
#tour #hint { position: fixed; left: 50%; top: 50%; translate: -50% -50%; z-index: 25; text-align: center; pointer-events: none; transition: opacity .3s; display: flex; flex-direction: column; gap: 10px; }
#tour #hint b { font-family: var(--headline); font-weight: 700; font-size: 34px; letter-spacing: -.02em; color: var(--night); }
#tour .gone { opacity: 0 !important; pointer-events: none !important; }

#tour #layers { position: fixed; left: 16px; top: 72px; width: 224px; max-height: calc(100vh - 300px); padding: 12px; z-index: 30; font-size: 13px; display: flex; flex-direction: column; transition: opacity .4s; }
#tour #layers .t { display: flex; justify-content: space-between; margin-bottom: 8px; }
#tour #lrs { overflow: auto; display: flex; flex-direction: column; gap: 1px; }
#tour #lrs:empty::after { content: "No layers yet"; color: #A8A39A; font-size: 13px; padding: 4px 6px; }
#tour .lr { display: flex; align-items: center; gap: 8px; padding: 5px 6px; border-radius: 6px; animation: slide .3s; }
#tour .lr.sub { padding-left: 24px; }
#tour .lr span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
#tour .lr b { font: 400 11px var(--mono); color: var(--fg-2); width: 14px; text-align: center; }
#tour .lr i { margin-left: auto; width: 7px; height: 7px; border-radius: 50%; background: var(--primary); flex: none; }
#tour .lr.you { background: rgba(209,249,108,.35); }
#tour .lr.you i { background: var(--night); }
@keyframes slide { from { opacity: 0; translate: 0 -4px; } }

#tour #chat { position: fixed; left: 50%; bottom: 20px; translate: -50% 0; width: min(600px, calc(100vw - 32px)); padding: 14px 16px 12px; z-index: 30; display: flex; flex-direction: column; gap: 12px; transition: translate .5s cubic-bezier(.3,1.2,.5,1), opacity .3s; }
#tour #chat.hidden { translate: -50% 140%; opacity: 0; }
#tour #msgs { display: flex; flex-direction: column; gap: 10px; }
/* Before Stellar's first line there's nothing above the status row: no empty gap, no divider */
#tour #msgs:empty { display: none; }
#tour .msg { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; line-height: 1.45; white-space: pre-line; transition: opacity .3s; }
#tour .msg .av { flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--primary); display: grid; place-items: center; font: 600 11px var(--sans); }
#tour .msg.you { justify-content: flex-end; }
#tour .msg.you span { background: var(--night); color: var(--fg-night); padding: 7px 12px; border-radius: 14px 14px 4px 14px; }
#tour .msg.old { opacity: .4; }
#tour .msg .dots { display: inline-flex; gap: 4px; align-items: center; height: 24px; }
#tour .msg .dots b { width: 6px; height: 6px; border-radius: 50%; background: var(--fg-2); animation: typing 1.2s ease-in-out infinite; }
#tour .msg .dots b:nth-child(2) { animation-delay: .15s; } #tour .msg .dots b:nth-child(3) { animation-delay: .3s; }
@keyframes typing { 0%, 60%, 100% { opacity: .3; translate: 0 0; } 30% { opacity: 1; translate: 0 -2px; } }
#tour #chips { display: flex; gap: 8px; flex-wrap: wrap; padding-left: 34px; }
#tour #chips:empty { display: none; }
#tour #chips button { font: 500 14px var(--sans); padding: 9px 16px; border-radius: 99px; border: 1px solid var(--night); }
#tour #chips button:first-child { background: var(--night); color: var(--fg-night); }
#tour #status { display: flex; align-items: center; gap: 8px; }
#tour #status::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--primary); animation: blink 1.2s steps(1) infinite; }
#tour #status.yours::before { background: var(--night); }
@keyframes blink { 50% { opacity: 0; } }
#tour .steps { display: flex; gap: 4px; }
#tour .steps span { padding: 3px 8px; border-radius: 99px; border: 1px solid var(--rule); }
#tour .steps span.on { background: var(--night); color: var(--fg-night); border-color: var(--night); }
#tour .steps span.done { background: var(--secondary); border-color: var(--secondary); color: var(--night); }
#tour #zoomBox { position: fixed; right: 16px; bottom: 20px; z-index: 30; padding: 8px 12px; transition: opacity .4s; }
#tour.site #top, #tour.site #layers, #tour.site #chat, #tour.site #zoomBox, #tour.site #sc { opacity: 0 !important; pointer-events: none; }
#tour.site #top { translate: 0 -100%; }

/* back to the canvas, once the visitor has left the tour for the site */
#back { position: fixed; right: 22px; bottom: 22px; z-index: 90; display: flex; gap: 6px; padding: 6px; border-radius: 99px; background: rgba(11,10,12,.92); box-shadow: 0 20px 40px -16px rgba(0,0,0,.5); opacity: 0; visibility: hidden; transition: opacity .4s .3s, visibility 0s .7s; }
html.tour-back:not(.back-aside) #back { opacity: 1; visibility: visible; transition: opacity .4s .3s; }
#back button, #back a { border: 0; border-radius: 99px; padding: 10px 16px; font: 500 14px var(--sans); line-height: 1; cursor: pointer; background: none; color: var(--fg-night); white-space: nowrap; }
#back .dl { background: var(--secondary); color: var(--night); }

@media (max-width: 1100px) { #tour #layers, #tour #zoomBox { display: none; } }
@media (max-width: 760px) {
  #tour .tools, #tour #file, #tour .avs, #tour #top .btn { display: none; }
  #tour #top { grid-template-columns: auto 1fr; padding-left: 16px; }
  #tour #hint b { font-size: 26px; }
  #tour .steps span { padding: 3px 6px; }
}
/* No floating "Back to the canvas" on phones and touch screens: there, the site is the destination */
@media (max-width: 760px), (pointer: coarse) { #back { display: none; } }

/* The brief: board, brand and plan on a screen of their own, off the canvas, the way the app does it.
   The visitor's frame waits on the canvas (hidden, still laid out so the cursor can measure it). */
#tour.brief { background: var(--paper); }
#tour.brief .dots, #tour.brief #ghost, #tour.brief .arrow, #tour.brief .frame > .flabel { opacity: 0; }
#tour.brief #home { visibility: hidden; }
#tour.brief .board { box-shadow: none; }
#tour.brief .tools, #tour.brief #layers, #tour.brief #zoomBox { opacity: 0; pointer-events: none; }

/* "Attach this brand to the prompt": flex centers the label's line box, and Geist's tall ascender leaves the
   letters a pixel or two below the + icon and the switch. Trim the box to cap height and baseline so the
   letters themselves are what's centered. Browsers without text-box get a 1px nudge instead. */
#tour .lockbar #lockText { text-box: trim-both cap alphabetic; }
@supports not (text-box: trim-both cap alphabetic) { #tour .lockbar #lockText { translate: 0 -1px; } }

/* Avatar initials (S, Y): same line-box offset as the lockbar label, so the letters sat low in the circle.
   Trim each to cap height and baseline and pad it to the middle of the 24px inside the border.
   Browsers without text-box keep the grid centering. */
@supports (text-box: trim-both cap alphabetic) {
  #tour .avs span { display: block; text-align: center; padding-block: calc((24px - 1cap) / 2); text-box: trim-both cap alphabetic; }
  #tour #avS.on { display: block; }
}

/* Once the visitor is on the site, the tour stays laid out (for the cursor) but invisible and fixed over the
   whole screen. Give it no background then, so Safari can't pick up its pale canvas color for the toolbar strip. */
html:not(.tour-on) #tour { background: transparent; }
/* ...but only after the half-second fade to the site, so the canvas doesn't vanish mid-fade */
html:not(.tour-on) #tour.started { transition: opacity .5s, visibility 0s .5s, background 0s .5s; }
/* iOS Safari takes the toolbar strip from body's background when it has one (it showed paper while body was
   paper) and otherwise fell back to night during the tour. Give body the canvas color while the tour is up. */
html.tour-on body { background: #E3DFD6; }
/* Tested in the iOS 26 Simulator: above the page (status bar) Safari shows html's background; under the
   floating toolbar it shows whatever page content sits there, and fixed layers like the tour stop short of it.
   So during the tour: html is paper to match the tour's top bar, the site underneath is hidden, and body's
   canvas color is what shows under the toolbar. */
html.tour-on { background: #ECE9E1; }
html.tour-on #site { visibility: hidden; }
/* The status bar takes body's background-color when body has one, so that's paper; the canvas color is
   painted as an image, which is what shows through under the toolbar. */
html.tour-on body { background: #ECE9E1 linear-gradient(#E3DFD6, #E3DFD6); }
/* The brief (board, brand, plan) is a paper screen, but the strip under the toolbar still showed body's
   canvas image, so a darker band sat along the bottom. While the brief is up, body is plain paper.
   Checked in the iOS 26 Simulator (iPhone 17 Pro). */
html.tour-on:has(#tour.brief) body { background: #ECE9E1; }
