/* ---- Chapter 1 · Ask ("Don't search. Ask.") ----
   A black room and one clean black ask bar; its magnifier becomes the AI sphere for a moment while it thinks.
   The clips around it are made-up, real-looking things you'd copy. Colours only from tokens.css. */
.ask { position: relative; block-size: 240svh; background: black; color: var(--white); }
.ask-stick { position: sticky; inset-block-start: 0; block-size: 100svh; overflow: clip; display: grid; place-items: center; }
.ask-title { position: absolute; z-index: 3; inset-block-start: clamp(64px, 11vh, 120px); inset-inline: 0; margin: 0; text-align: center; pointer-events: none;
  font: 500 clamp(38px, 4.6vw, 68px)/1.04 var(--font-serif); letter-spacing: -.03em; }
.ask-title em { font-style: normal; color: var(--coral); }
.ask-title span, .ask-said { display: inline-block; opacity: calc(var(--w, 0) * var(--fade, 1)); filter: blur(calc((1 - var(--w, 0)) * 12px)); transform: translateY(calc((1 - var(--w, 0)) * 16px)); }

/* the bar: the clean black field from before (a hairline that brightens while the sphere thinks) */
.ask-field { position: relative; z-index: 3; display: flex; align-items: center; gap: 12px; translate: 0 -10svh;
  inline-size: min(680px, calc(100vw - 32px)); block-size: 64px; padding-inline: 22px 24px; border-radius: 22px; background: black;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--white) calc(16% + var(--think, 0) * 24%), transparent);
  transform: translateY(calc(var(--fy, 0) * 1px)) scale(calc(.9 + var(--fin, 0) * .1)); opacity: var(--fin, 0); }
.ask-field:focus-within { box-shadow: 0 0 0 1px color-mix(in srgb, var(--white) 32%, transparent); }
.ask-lead { position: relative; flex: none; display: grid; place-items: center; inline-size: 22px; block-size: 22px; }
.ask-mag { inline-size: 20px; block-size: 20px; fill: none; stroke: color-mix(in srgb, var(--white) 55%, transparent); stroke-width: 1.6; stroke-linecap: round; opacity: calc(1 - var(--think, 0)); }
.ask-orb { position: absolute; inset: -9px; inline-size: 40px; block-size: 40px; opacity: var(--think, 0); }
.ask-in { position: relative; flex: 1; min-inline-size: 0; display: flex; align-items: center; }
.ask-q { inline-size: 100%; min-inline-size: 0; padding: 0; border: 0; outline: 0; background: transparent; color: var(--white); caret-color: var(--sky);
  font: 400 clamp(18px, 1.8vw, 24px)/1.2 var(--font-text); letter-spacing: -.01em; text-overflow: ellipsis; }
.ask-q::placeholder { color: color-mix(in srgb, var(--white) 40%, transparent); }
.ask-q:focus-visible { outline: 0; }
.ask-caret { position: absolute; inset-inline-start: 0; inset-block: 50% auto; inline-size: 2px; block-size: 26px; margin-block-start: -13px;
  background: var(--sky); pointer-events: none; animation: ask-blink 1s steps(1) infinite; }
@keyframes ask-blink { 50% { visibility: hidden; } }

/* the clips: each one its own crafted thing. Paper things (pass, chip, receipt, card, print) stay paper-white in both
   themes, like real paper; screen things (editor, memo) are dark; app things (map, message, link) follow the theme. */
.ask-cloud { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.ask-cloud.gone .acard { pointer-events: none; }
.acard { position: absolute; inset: 0 auto auto 0; display: block; padding: 0; margin: 0; border: 0; border-radius: 16px; background: none; color: var(--ink);
  text-align: start; font: 400 13px/1.3 var(--font-text); cursor: pointer; pointer-events: auto; will-change: transform, filter, opacity; transform-origin: 50% 50%; }
.acard > .o { opacity: var(--kids, 1); }
.acard:focus-visible { outline: 2px solid var(--sky); outline-offset: 6px; }
.o { position: relative; display: flex; box-sizing: border-box; inline-size: 100%; block-size: 100%; overflow: hidden;
  box-shadow: 0 1px 0 rgb(var(--shade-rgb) / .1), 0 26px 50px -26px black; transition: box-shadow .3s var(--soft); }
.acard.hit > .o { box-shadow: 0 0 0 2px var(--sky), 0 40px 90px -30px black; }
.acard small { display: block; font: 400 10px/1.25 var(--font-text); }
.cap { text-transform: uppercase; letter-spacing: .08em; font-size: 8.5px !important; font-weight: 600 !important; }

/* boarding pass: main part + torn-off stub, perforation, barcode */
.bp { border-radius: 10px; background: var(--white); color: var(--graphite-bottom); }
.bp small { color: var(--graphite-top); opacity: .7; }
.bp-main { flex: 1; display: grid; align-content: space-between; padding: 14px 12px 10px 14px; }
.bp-route { display: flex; align-items: center; gap: 8px; font: 700 26px/1 var(--font-text); letter-spacing: -.02em; }
.bp-route i { flex: 1; block-size: 1px; background: repeating-linear-gradient(90deg, var(--graphite-top) 0 3px, transparent 3px 6px); opacity: .45; position: relative; }
.bp-route i::after { content: "✈"; position: absolute; inset: -8px auto auto 50%; translate: -50% 0; font-size: 12px; color: var(--graphite-top); }
.bp-info { display: flex; gap: 12px; font: 600 11.5px/1.15 var(--font-text); }
.bp-info small { font-size: 8.5px; font-weight: 500; }
.bp-stub { position: relative; flex: none; inline-size: 62px; display: grid; align-content: space-between; justify-items: start; padding: 14px 10px 10px;
  border-inline-start: 1.5px dashed color-mix(in srgb, var(--graphite-top) 35%, transparent); }
.bp-stub::before, .bp-stub::after { content: ""; position: absolute; inset-inline-start: -8px; inline-size: 14px; block-size: 14px; border-radius: 50%; background: black; }
.bp-stub::before { inset-block-start: -7px; } .bp-stub::after { inset-block-end: -7px; }
.bp-stub b { font: 700 20px/1 var(--font-text); }
.bp-code { inline-size: 100%; block-size: 22px; background: repeating-linear-gradient(90deg, var(--graphite-bottom) 0 1px, transparent 1px 3px, var(--graphite-bottom) 3px 5px, transparent 5px 6px, var(--graphite-bottom) 6px 7px, transparent 7px 10px); }

/* paint chip */
.chip { flex-direction: column; padding: 8px; border-radius: 4px; background: var(--white); color: var(--graphite-bottom); }
.chip-c { flex: 1; border-radius: 2px; background: var(--chip, var(--sky)); box-shadow: inset 0 0 0 1px rgb(var(--shade-rgb) / .06); }
.chip-l { padding: 9px 2px 1px; }
.chip-l b { display: block; font: 500 15px/1.1 var(--font-serif); letter-spacing: -.01em; }
.chip-l small { margin-block-start: 3px; font-family: var(--font-mono); font-size: 8.5px; color: var(--graphite-top); }

/* editor window */
.ed { flex-direction: column; border-radius: 10px; background: var(--graphite-bottom); color: color-mix(in srgb, var(--white) 86%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--white) 10%, transparent), 0 26px 50px -26px black; }
.ed-bar { flex: none; display: flex; align-items: center; gap: 6px; block-size: 26px; padding-inline: 10px; background: var(--graphite-top);
  font: 500 10.5px/1 var(--font-text); color: color-mix(in srgb, var(--white) 60%, transparent); }
.ed-bar i { inline-size: 9px; block-size: 9px; border-radius: 50%; }
.ed-bar .r { background: var(--mac-red); } .ed-bar .y { background: var(--mac-yellow); } .ed-bar .g { background: var(--mac-green); }
.ed-bar span { margin-inline: auto; padding-inline-end: 30px; }
.ed-body { flex: 1; display: flex; gap: 10px; padding: 10px 12px 0 8px; font: 400 10.5px/1.6 var(--font-mono); }
.ed-n { text-align: end; color: color-mix(in srgb, var(--white) 26%, transparent); }
.ed code { font: inherit; white-space: pre; }
.ed code b { font-weight: 500; color: var(--sky); } .ed code u { text-decoration: none; color: var(--mac-green); } .ed code em { font-style: normal; color: color-mix(in srgb, var(--white) 38%, transparent); }

/* till receipt: thermal paper with a torn edge */
.rcpt { flex-direction: column; gap: 4px; padding: 14px 13px 20px; background: var(--white); color: var(--graphite-bottom); font: 400 10px/1.3 var(--font-mono);
  border-radius: 2px; box-shadow: none; filter: drop-shadow(0 18px 20px rgb(var(--shade-rgb) / .5));
  mask: linear-gradient(black, black) top / 100% calc(100% - 7px) no-repeat, conic-gradient(from 135deg at 50% 0, black 90deg, transparent 0) bottom / 12px 7px repeat-x; }
.rcpt small { font: inherit; color: var(--graphite-top); text-align: center; }
.r-h { align-self: center; font: 700 13px/1 var(--font-mono); letter-spacing: .14em; }
.r-rule { block-size: 1px; margin-block: 3px; background: repeating-linear-gradient(90deg, var(--graphite-top) 0 2px, transparent 2px 4px); opacity: .5; }
.r-l { display: flex; justify-content: space-between; }
.r-t { font-weight: 700; font-size: 11.5px; }

/* index card: ruled lines, a margin rule, a serif hand */
.idx { flex-direction: column; padding: 8px 14px 0 26px; border-radius: 3px; color: var(--graphite-bottom); font: italic 400 12px/18px var(--font-serif);
  background: linear-gradient(90deg, transparent 18px, color-mix(in srgb, var(--coral) 70%, transparent) 18px 19px, transparent 19px),
    linear-gradient(transparent 17px, color-mix(in srgb, var(--sky) 45%, transparent) 17px) 0 14px / 100% 18px,
    var(--white); }
.idx b { font: 600 14px/22px var(--font-serif); font-style: normal; margin-block-end: 2px; }

/* photo print */
.pol { flex-direction: column; padding: 8px 8px 0; border-radius: 3px; background: var(--white); rotate: -3deg; }
.pol-img { flex: 1; background: url("img/walls/hills-sky.webp") 40% 60% / cover; box-shadow: inset 0 0 0 1px rgb(var(--shade-rgb) / .08); }
.pol-c { display: block; padding: 7px 2px 9px; font: italic 400 13px/1 var(--font-serif); color: var(--graphite-top); }

/* voice memo */
.vm { align-items: center; gap: 10px; padding: 0 14px; border-radius: 20px; background: var(--graphite-bottom); color: var(--white);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--white) 10%, transparent), 0 26px 50px -26px black; }
.vm-play { flex: none; inline-size: 30px; block-size: 30px; border-radius: 50%; background: var(--white); position: relative; }
.vm-play::after { content: ""; position: absolute; inset: 9px 8px 9px 12px; background: var(--graphite-bottom); clip-path: polygon(0 0, 100% 50%, 0 100%); }
.vm-mid { flex: 1; min-inline-size: 0; display: grid; gap: 6px; }
.vm-mid b { font: 600 12.5px/1 var(--font-text); }
.vm-wave { display: flex; align-items: center; gap: 1.5px; block-size: 20px; }
.vm-wave i { flex: 1; block-size: calc(var(--h) * 100%); border-radius: 1px; background: color-mix(in srgb, var(--white) 35%, transparent); }
.vm-wave i:nth-child(-n+12) { background: var(--white); }
.vm-t { align-self: stretch; display: flex; flex-direction: column; justify-content: space-between; align-items: end; padding-block: 18px; font: 500 10.5px/1 var(--font-mono); color: color-mix(in srgb, var(--white) 60%, transparent); }
.vm-t i { inline-size: 7px; block-size: 7px; border-radius: 50%; background: var(--mac-red); }

/* map */
.map { --road: var(--surface); flex-direction: column; justify-content: flex-end; border-radius: 18px; background: var(--well); }
:root[data-theme="dark"] .map { --road: var(--line); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .map { --road: var(--line); } }
.map-s { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; }
.map-s .park { fill: color-mix(in srgb, var(--success) 22%, var(--well)); } .map-s .water { fill: var(--sky-fill); }
.map-s .rd { fill: none; stroke: var(--road); stroke-width: 7; } .map-s .rd2 { fill: none; stroke: var(--road); stroke-width: 3.5; }
.map-pin { position: absolute; inset: 38px auto auto 50%; translate: -50% 0; }
.map-pin svg { display: block; inline-size: 30px; block-size: 30px; fill: var(--coral-deep); filter: drop-shadow(0 3px 3px rgb(var(--shade-rgb) / .3)); }
.map-l { position: relative; margin: 0 8px 8px; padding: 7px 10px; border-radius: 11px; background: color-mix(in srgb, var(--surface) 90%, transparent);
  box-shadow: 0 1px 3px rgb(var(--shade-rgb) / .12); }
.map-l b { display: block; font: 600 12px/1.2 var(--font-text); } .map-l small { color: var(--ink-2); }

/* a message, just the bubble */
.msg { align-items: flex-end; gap: 8px; overflow: visible; background: none; box-shadow: none; }
.msg-av { flex: none; display: grid; place-items: center; inline-size: 26px; block-size: 26px; border-radius: 50%; background: var(--graphite-top); color: var(--white); font: 600 12px/1 var(--font-text); }
.msg-b { display: grid; gap: 3px; }
.msg-b small { padding-inline-start: 12px; color: color-mix(in srgb, var(--white) 55%, transparent); }
.msg-b span { position: relative; padding: 8px 12px; border-radius: 17px; background: var(--selected); color: var(--ink); font-size: 13px; line-height: 1.3;
  box-shadow: 0 20px 40px -24px black; }
.msg-b span::before { content: ""; position: absolute; inset: auto auto 0 -4px; inline-size: 14px; block-size: 14px; background: var(--selected); clip-path: path("M14 14 C 6 14 2 12 0 14 C 4 10 4 4 4 0 L 14 0 Z"); }
.acard.hit > .msg { box-shadow: none; } .acard.hit .msg-b span { box-shadow: 0 0 0 2px var(--sky); }

/* a link preview, the way a chat app shows one */
.og { flex-direction: column; border-radius: 18px; background: var(--selected); }
.og-art { position: relative; flex: 1; background: var(--butter-fill); }
.og-art i { position: absolute; border-radius: 5px; background: var(--white); box-shadow: 0 1px 2px rgb(var(--shade-rgb) / .12); }
.og-art i:nth-child(1) { inset: 16% 54% 16% 8%; background: var(--sky); } .og-art i:nth-child(2) { inset: 16% 8% 56% 50%; }
.og-art i:nth-child(3) { inset: 50% 26% 16% 50%; background: var(--coral); } .og-art i:nth-child(4) { inset: 50% 8% 16% 78%; background: var(--graphite-top); }
.og-f { flex: none; padding: 9px 12px 10px; }
.og-f b { display: block; font: 600 13px/1.2 var(--font-text); } .og-f small { margin-block-start: 2px; color: var(--ink-2); font-size: 11px; }

.ask-said { position: absolute; z-index: 3; inset-block-end: clamp(28px, 6vh, 64px); inset-inline: 16px; margin: 0; text-align: center; pointer-events: none;
  font: 400 clamp(16px, 1.5vw, 20px)/1.4 var(--font-text); color: color-mix(in srgb, var(--white) 78%, transparent); }
.ask-said kbd { color: var(--ink); }

@media (max-width: 640px) { .ask-field { translate: 0 -14svh; block-size: 56px; padding-inline: 18px; border-radius: 18px; } }
@media (prefers-reduced-motion: reduce) { .ask-caret { animation: none; } }

/* ---- 25 Nov: round 5 objects. The picture is the thing, our text is printed in its text area ---- */
.ask-bg img { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; object-fit: cover; opacity: .8; mask: linear-gradient(transparent, black 22%, black 78%, transparent); -webkit-mask: linear-gradient(transparent, black 22%, black 78%, transparent); pointer-events: none; }
.o.art { overflow: visible; box-shadow: none; border-radius: 0; background: none center / 100% 100% no-repeat; color: var(--graphite-bottom); }
.acard.hit > .o.art { box-shadow: none; filter: drop-shadow(0 0 1.5px var(--sky)) drop-shadow(0 0 1px var(--sky)); }
.art > .t1, .art > .t2 { position: absolute; display: flex; flex-direction: column; justify-content: center; min-inline-size: 0; } .art small { color: inherit; opacity: .68; }
.near .C11 { background-image: url(img/r5/C11.avif); } .C11 > .t1 { inset: 20.8% 28.1% 23.6% 10.0%; justify-content: space-between; } .C11 > .t2 { inset: 20.8% 10.1% 23.6% 78.1%; justify-content: space-between; } .C11 .t2 b { font: 700 17px/1 var(--font-text); } .C11 .cap { font-size: 7.5px !important; } .C11 .bp-route { font-size: 23px; } .C11 .bp-info { font-size: 11px; gap: 12px; } .C11 .bp-code { block-size: 15px; }
.near .C12 { background: url(img/r5/C12.avif) center / 100% 100%, var(--chip, var(--sky)); background-blend-mode: multiply; mask: url(img/r5/C12.avif) center / 100% 100%; -webkit-mask: url(img/r5/C12.avif) center / 100% 100%; } .C12 > .t1 { inset: 16.4% 16.1% 17.1% 16.1%; justify-content: flex-end; } .C12 b { font: 500 17px/1.1 var(--font-serif); letter-spacing: -.01em; } .C12 small { margin-block-start: 3px; font: 500 8.5px/1.2 var(--font-mono); opacity: .8; } .C12.dkc { color: var(--white); }
.near .C13 { background-image: url(img/r5/C13.avif); } .C13 { color: color-mix(in srgb, var(--white) 88%, transparent); } .C13 > .t1 { inset: 18.3% 17.9% 19.0% 16.6%; justify-content: center; gap: 9px; } .C13 small { font: 500 10.5px/1 var(--font-text); } .C13 code { font: 400 8.8px/1.7 var(--font-mono); white-space: pre; } .C13 code b { font-weight: 500; color: var(--sky); } .C13 code u { text-decoration: none; color: var(--butter); } .C13 code em { font-style: normal; opacity: .5; }
.near .C15 { background-image: url(img/r5/C15.avif); } .C15 > .t1 { inset: 17.8% 11.5% 19.2% 11.8%; font: 400 12px/1.45 var(--font-serif); } .C15 b { font: 600 14.5px/1.35 var(--font-serif); }
.C16 .ph { position: absolute; inset: 14.8% 17.8% 26.2% 17.9%; background: none center / cover; } .near .C16 .p21 { background-image: url(img/r5/C21.avif); } .near .C16 .p22 { background-image: url(img/r5/C22.avif); } .near .C16 .p23 { background-image: url(img/r5/C23.avif); } .near .C16 .p24 { background-image: url(img/r5/C24.avif); } .C16 .fr { position: absolute; inset: 0; background: none center / 100% 100%; } .near .C16 .fr { background-image: url(img/r5/C16.avif); } .C16 { rotate: -3deg; } .C16 > .t1 { inset: 76.6% 17.8% 9.0% 17.9%; font: italic 400 13px/1 var(--font-serif); }
.near .C17 { background-image: url(img/r5/C17.avif); } .C17 { color: var(--white); } .C17 > .t1 { inset: 27.1% 13.7% 27.1% 49.0%; gap: 7px; } .C17 b { font: 600 12.5px/1 var(--font-text); } .C17 .vm-wave { block-size: 17px; gap: 1px; } .C17 small { font: 500 10px/1 var(--font-mono); }
.near .C18 { background-image: url(img/r5/C18.avif); } .C18 > .t1 { inset: 21.6% 44.4% 23.2% 14.4%; gap: 3px; align-items: flex-start; } .C18 svg { inline-size: 22px; block-size: 22px; fill: var(--coral-deep); } .C18 b { font: 600 13px/1.2 var(--font-text); } .C18 small { font-size: 11px; }
.near .C19 { background-image: url(img/r5/C19.avif); } .C19 > .t1 { inset: 26.5% 14.2% 25.9% 14.2%; gap: 2px; font: 400 13px/1.28 var(--font-text); } .C19 small { font-size: 10.5px; }
.near .C20 { background-image: url(img/r5/C20.avif); } .C20 > .t1 { inset: 37% 60% 22% 17%; rotate: -10deg; justify-content: flex-start; gap: 3px; } .C20 b { font: 600 14px/1.18 var(--font-text); } .C20 small { font-size: 10.5px; }
.ask-bg { position: absolute; inset: 0; }
.o.art.C13, .o.art.C17 { color: color-mix(in srgb, var(--white) 92%, transparent); } .o.art.C12.dkc { color: var(--white); } .C13 code { font-size: 9.4px; } .C13 > .t1 { inset-inline: 15% 14%; }
/* Round 20 launch pass: keyboard focus shows on the search pill (ask.css loads late, so this lives here) */
.ask-field:has(.ask-q:focus-visible) { outline: 2px solid var(--focus); outline-offset: 3px; }
