/* OmniPad landing — a tablet floating on a dot-grid canvas.
   Tokens follow the app's own (OmniPad/DesignSystem/OmniTheme.swift). */

:root {
  --canvas: #F3EFE7;
  --dot: rgba(70, 60, 48, 0.2);
  --ink: #2C2B31;
  --ink-2: #514C46;
  --muted: #736D66;
  --line: rgba(44, 43, 49, 0.12);
  --indigo: #3F4C9A;
  --indigo-deep: #35408A;
  --indigo-soft: #E6E8F4;
  --terra: #B4553A;
  --sage: #4A6B52;
  --violet: #8A5CAB;
  --peri: #6B74B8;
  --paper: #FAF6EE;
  --shell: #E9E5DD;
  --serif: "Instrument Serif", ui-serif, Georgia, serif;
  --sans: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --hand: "Caveat", "Bradley Hand", "Segoe Print", cursive;
  --app-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Hanken Grotesk", system-ui, sans-serif;
  --app-serif: ui-serif, "New York", "Instrument Serif", Georgia, serif;
  --gutter: clamp(16px, 4vw, 40px);
  /* Width of the tablet: as wide as the screen allows, short enough that the
     tour controls stay above the fold on a laptop. */
  --dw: min(1020px, calc(100vw - 2 * var(--gutter)), max(640px, calc((100svh - 338px) * 1.38)));
  color-scheme: light;
}
@media (max-width: 699px) {
  :root { --dw: min(calc(100vw - 20px), 470px); }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font: 400 16px/1.5 var(--sans);
  color: var(--ink);
  background-color: var(--canvas);
  background-image: radial-gradient(circle at center, var(--dot) 1.05px, transparent 1.45px);
  background-size: 22px 22px;
  background-position: calc(50% + 11px) 0;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
svg { display: block; }
.sr-only, .hp { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2.5px solid var(--indigo); outline-offset: 3px; border-radius: 8px; }

/* ------------------------------------------------------------------ Nav */
.nav {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px var(--gutter);
  padding-top: max(12px, env(safe-area-inset-top));
  background: linear-gradient(var(--canvas) 30%, rgba(243, 239, 231, 0));
  transition: background .25s ease, box-shadow .25s ease;
}
.nav.is-scrolled { background: rgba(243, 239, 231, .82); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); box-shadow: 0 1px 0 rgba(44,43,49,.07); }
.wordmark { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 400 26px/1 var(--serif); letter-spacing: -0.01em; }
.wordmark.sm { font-size: 21px; gap: 8px; }
.logo { width: 32px; height: 32px; border-radius: 9px; background: var(--indigo); color: #F7F3E9; display: grid; place-items: center; box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 4px 10px -4px rgba(63,76,154,.6); }
.wordmark.sm .logo { width: 26px; height: 26px; border-radius: 8px; }
.logo svg { width: 58%; height: 58%; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 20px; border-radius: 999px; font: 600 15.5px/1 var(--sans); text-decoration: none; white-space: nowrap; transition: transform .15s ease, box-shadow .15s ease, background .15s ease; }
.btn-sm { height: 38px; padding: 0 16px; font-size: 14px; }
.btn-ink { background: var(--indigo); color: #fff; box-shadow: 0 1px 0 rgba(255,255,255,.22) inset, 0 8px 18px -8px rgba(63,76,154,.7); }
.btn-ink:hover { background: var(--indigo-deep); transform: translateY(-1px); }
.btn-ink:active { transform: translateY(0); }

/* ------------------------------------------------------------------ Hero */
.hero { position: relative; padding: 4px var(--gutter) 0; }
.hero-copy { text-align: center; max-width: 900px; margin: 0 auto; position: relative; z-index: 3; }
.kicker { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 12px; padding: 6px 13px 6px 11px; border-radius: 999px; background: rgba(255,255,255,.6); box-shadow: 0 0 0 1px var(--line); font-size: 13px; font-weight: 600; color: var(--ink-2); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: #3F9A62; box-shadow: 0 0 0 0 rgba(63,154,98,.5); animation: pulse 2.2s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(63,154,98,.45); } 80%, 100% { box-shadow: 0 0 0 9px rgba(63,154,98,0); } }
h1 { margin: 0; font: 700 clamp(40px, 4.6vw, 68px)/1.02 var(--hand); letter-spacing: -0.005em; color: #2F3040; text-wrap: balance; }
.h1-a, .h1-b { display: inline-block; }
.hl { background: linear-gradient(176deg, transparent 0 52%, rgba(255,226,0,.7) 52% 90%, transparent 90%); padding: 0 .08em; margin: 0 -.04em; }
.get { position: relative; display: inline-block; color: var(--indigo); padding: 0 .08em; }
.get-loop { position: absolute; left: -7%; top: -20%; width: 116%; height: 146%; overflow: visible; pointer-events: none; }
.get-loop path { fill: none; stroke: var(--indigo); stroke-width: 3; stroke-linecap: round; vector-effect: non-scaling-stroke; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.1s .5s cubic-bezier(.6,.1,.3,1) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.sub { max-width: 900px; margin: 12px auto 0; font-size: 18px; line-height: 1.45; color: var(--ink-2); text-wrap: balance; }

/* ------------------------------------------------------------------ Desk + device */
.desk { position: relative; display: flex; justify-content: center; margin-top: clamp(18px, 3vh, 30px); z-index: 2; }
.desk::before { /* warm light pooled under the tablet */
  content: ""; position: absolute; left: 50%; top: 45%; width: calc(var(--dw) * 1.25); height: calc(var(--dw) * .8); transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(255,251,240,.95), rgba(255,251,240,0)); pointer-events: none;
}
.device-float { position: relative; width: var(--dw); z-index: 2; animation: bob 7s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
.device-shadow { position: absolute; left: 6%; right: 6%; bottom: -26px; height: 40px; border-radius: 50%; background: radial-gradient(closest-side, rgba(58,46,32,.32), rgba(58,46,32,0)); filter: blur(6px); z-index: -1; animation: shadowBob 7s ease-in-out infinite; }
@keyframes shadowBob { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(.95); opacity: .78; } }

.device {
  --bz: calc(var(--dw) * 0.0145);
  position: relative; padding: var(--bz); border-radius: calc(var(--dw) * 0.043);
  background: linear-gradient(150deg, #3A3A3F 0%, #1B1B1E 22%, #141416 70%, #2A2A2E 100%);
  box-shadow:
    0 0 0 1px rgba(0,0,0,.55),
    inset 0 0 0 1.5px rgba(255,255,255,.14),
    inset 0 1px 0 rgba(255,255,255,.28),
    0 2px 4px rgba(40,30,20,.12),
    0 30px 60px -18px rgba(40,30,20,.38),
    0 60px 110px -40px rgba(40,30,20,.35);
}
.cam { position: absolute; top: calc(var(--bz) / 2); left: 50%; width: 5px; height: 5px; margin: -2.5px 0 0 -2.5px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #4A5A7A, #0B0B0D 70%); }
.glass-screen { position: relative; aspect-ratio: 1180 / 820; overflow: hidden; border-radius: calc(var(--dw) * 0.029); background: var(--shell); isolation: isolate; }
.glass-screen::after { /* faint reflection on the glass */
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 30;
  background: linear-gradient(115deg, rgba(255,255,255,.10) 0%, rgba(255,255,255,0) 32%, rgba(255,255,255,0) 100%);
}
@media (max-width: 699px) {
  .device { --bz: calc(var(--dw) * 0.024); border-radius: calc(var(--dw) * 0.075); }
  .cam { top: 50%; left: calc(var(--bz) / 2); margin: -2.5px 0 0 -2.5px; }
  .glass-screen { aspect-ratio: 3 / 4; border-radius: calc(var(--dw) * 0.052); }
}

/* Things on the desk */
.sticky, .stylus, .annot { display: none; }
@media (min-width: 1180px) {
  .sticky { display: block; position: absolute; z-index: 3; top: -18px; right: calc(50% + var(--dw) / 2 - 4px); width: 142px; height: 128px; padding: 18px 14px; transform: rotate(-7deg); background: linear-gradient(170deg, #FFEE95, #FBE27A); box-shadow: 0 1px 1px rgba(0,0,0,.06), 0 14px 22px -12px rgba(90,70,20,.45); border-radius: 2px 2px 14px 2px; font: 600 25px/1.05 var(--hand); color: #5A4A1E; }
  .stylus { display: block; position: absolute; z-index: 3; width: 330px; bottom: -4px; left: calc(50% + var(--dw) / 2 - 150px); transform: rotate(-21deg); filter: drop-shadow(0 12px 10px rgba(50,38,24,.28)) drop-shadow(0 2px 2px rgba(50,38,24,.18)); }
}
@media (min-width: 1300px) {
  .annot { display: flex; position: absolute; z-index: 4; align-items: flex-start; gap: 4px; width: min(230px, calc((100vw - var(--dw)) / 2 - 30px)); pointer-events: none; }
  .annot-l { right: calc(50% + var(--dw) / 2 + 14px); top: 22%; flex-direction: column; align-items: flex-end; text-align: right; }
  .annot-r { left: calc(50% + var(--dw) / 2 + 14px); top: 50%; flex-direction: column; }
  .annot-text { margin: 0; font: 600 25px/1.05 var(--hand); color: var(--indigo); transition: opacity .35s ease, transform .35s ease; }
  .annot-r .annot-text { color: var(--terra); }
  .annot-arrow { width: 96px; height: 56px; overflow: visible; }
  .annot-arrow path { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 0; transition: stroke-dashoffset .6s ease .15s; }
  .annot-l .annot-arrow { color: var(--indigo); }
  .annot-r .annot-arrow { color: var(--terra); }
  .annot.is-swapping .annot-text { opacity: 0; transform: translateY(4px); }
  .annot.is-swapping .annot-arrow path { stroke-dashoffset: 1; transition: none; }
}

/* ------------------------------------------------------------------ Tour controls */
.tour { position: relative; z-index: 3; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 30px 0 0; }
.chapters { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.chap { position: relative; display: inline-flex; align-items: center; gap: 9px; height: 46px; padding: 0 18px 0 12px; border-radius: 999px; font-size: 15px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; background: rgba(255,255,255,.66); box-shadow: inset 0 0 0 1px rgba(44,43,49,.09); transition: background .25s, color .25s, box-shadow .25s; }
.chap:hover { background: #fff; }
.chap.is-on { background: #2F3040; color: #FAF6EE; box-shadow: 0 8px 22px rgba(30,28,40,.22); }
.chap-n { width: 24px; height: 24px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: rgba(44,43,49,.07); color: var(--ink-2); }
.chap:nth-child(-n+2) .chap-n { background: var(--indigo-soft); color: var(--indigo); }
.chap.is-on .chap-n { background: #FFE24D; color: #2F3040; }
.chap-bar { position: absolute; left: 18px; right: 18px; bottom: 6px; height: 2.5px; border-radius: 2px; background: rgba(250,246,238,.18); opacity: 0; transition: opacity .2s; }
.chap-bar > i { display: block; height: 100%; width: calc(var(--p, 0) * 100%); border-radius: inherit; background: rgba(250,246,238,.85); }
.chap.is-on .chap-bar { opacity: 1; }
.caption { margin: 0; max-width: 620px; min-height: 2.9em; text-align: center; font-size: 17px; line-height: 1.45; color: var(--ink-2); text-wrap: balance; transition: opacity .25s ease; }
.caption b { color: var(--ink); font-weight: 700; }
.caption.is-swapping { opacity: 0; }
.tour-ctl { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 10px; min-height: 0; }
.try, .resume { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; height: 40px; padding: 0 16px; border-radius: 999px; font-size: 14.5px; font-weight: 600; background: #fff; color: var(--indigo); box-shadow: 0 0 0 1.5px rgba(63,76,154,.35); transition: background .15s, box-shadow .15s; }
.try:hover, .resume:hover { box-shadow: 0 0 0 1.5px var(--indigo); }
.try.is-on { background: var(--indigo); color: #fff; }
.try svg, .resume svg { width: 18px; height: 18px; }
.resume { color: var(--ink-2); box-shadow: 0 0 0 1px var(--line); }

@media (max-width: 699px) {
  .hero { padding-top: 0; }
  .kicker { font-size: 12px; margin-bottom: 10px; }
  h1 { font-size: clamp(34px, 10.4vw, 46px); }
  .sub { display: none; }
  .desk { margin-top: 18px; }
  .tour { padding-top: 26px; gap: 10px; }
  .chapters { display: grid; grid-template-columns: 1fr 1fr; width: 100%; max-width: 420px; gap: 7px; }
  .chap { height: 44px; padding: 0 10px 0 8px; font-size: 14px; gap: 7px; }
  .chap-n { width: 22px; height: 22px; font-size: 11px; }
  .caption { font-size: 15px; padding: 0 6px; }
}
@media (max-width: 400px) {
  .chap { font-size: 13px; }
  .chap { padding: 0 11px; }
  .chapters { gap: 2px; padding: 4px; }
}

/* ------------------------------------------------------------------ Waitlist */
.join { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 44px var(--gutter) 40px; position: relative; z-index: 3; }
.join-card { width: min(900px, 100%); display: flex; flex-wrap: wrap; align-items: center; gap: 18px 36px; padding: clamp(22px, 4vw, 36px); border-radius: 24px; background: #2F3040; color: #FAF6EE; box-shadow: 0 30px 70px -20px rgba(30,28,40,.4); scroll-margin-top: 90px; }
.join-copy { flex: 1 1 180px; }
.join-copy h2 { margin: 0; font: 700 clamp(40px, 4vw, 52px)/1 var(--hand); }
.join-copy p { margin: 6px 0 0; font-size: 15.5px; color: rgba(250,246,238,.72); }
.waitlist { flex: 1 1 330px; min-width: 0; position: relative; }
.wl-row { display: flex; gap: 6px; padding: 5px; border-radius: 999px; background: #fff; box-shadow: 0 0 0 1px rgba(44,43,49,.16); transition: box-shadow .15s; }
.wl-row:focus-within { box-shadow: 0 0 0 3px #FFE24D; }
.join-card .btn-ink { background: #FFE24D; color: #2F3040; }
.wl-row input { flex: 1; min-width: 0; width: 100%; border: 0; background: transparent; padding: 0 12px; font: 500 16px var(--sans); color: var(--ink); outline: none; }
.wl-row input::placeholder { color: #A29C94; }
.wl-row .btn { height: 42px; padding: 0 18px; font-size: 15px; }
.waitlist.is-invalid .wl-row { box-shadow: 0 0 0 2px #C2412F; }
.wl-msg { margin: 8px 6px 0; min-height: 0; font-size: 13.5px; color: #FFB59E; }
.wl-msg:empty { display: none; }
.waitlist.is-submitting .btn { opacity: .75; pointer-events: none; }
.wl-done { display: none; align-items: flex-start; gap: 12px; }
.waitlist.is-success .wl-row, .waitlist.is-success .wl-msg { display: none; }
.waitlist.is-success .wl-done { display: flex; animation: rise .35s ease; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.tick { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: #A6DDA0; color: #2C4A33; }
.tick svg { width: 18px; height: 18px; }
.wl-done strong { display: block; font-size: 16px; }
.wl-done p { margin: 2px 0 4px; font-size: 14px; color: rgba(250,246,238,.72); }
.wl-done button { font-size: 13.5px; font-weight: 600; color: #C9CFF5; text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 520px) {
  .join { padding-top: 34px; }
  .join-card { padding: 18px 16px; border-radius: 22px; }
  .join-copy h2 { font-size: 40px; }
  .wl-row .btn { padding: 0 14px; font-size: 14.5px; }
  .wl-row input { padding: 0 8px; font-size: 16px; }
}

/* ------------------------------------------------------------------ Footer */
.footer { width: min(900px, calc(100% - 2 * var(--gutter))); margin: 0 auto; padding: 22px 0 max(30px, env(safe-area-inset-bottom)); border-top: 1px dashed rgba(44,43,49,.18); font-size: 13.5px; color: var(--muted); }
.footer-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; }
.footer-row p { margin: 0; }
.footer a { text-underline-offset: 3px; }
.footer .fine { margin: 10px 0 0; font-size: 12.5px; }
.footer .wordmark { color: var(--ink); }

/* ================================================================== The screen
   Everything inside is laid out at the tablet's own size (1180 × 820 on its
   side, 480 × 640 upright on a phone) and scaled to fit by site.js. */
.screen {
  --sb: 24px; --top: 46px;
  position: absolute; left: 0; top: 0; width: 1180px; height: 820px;
  transform-origin: 0 0; transform: scale(var(--s, .8));
  font: 400 14px/1.35 var(--app-sans); color: var(--ink); letter-spacing: -0.005em;
  background: var(--shell);
  user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent;
}
.screen.is-portrait { --sb: 20px; --top: 40px; width: 480px; height: 640px; font-size: 13px; }
.screen svg { width: 100%; height: 100%; }
.screen button { cursor: pointer; }

/* status bar */
.sb { position: absolute; left: 0; right: 0; top: 0; height: var(--sb); display: flex; align-items: center; gap: 8px; padding: 0 22px; font-size: 12.5px; font-weight: 600; color: #1d1c20; z-index: 25; }
.sb-date { font-weight: 500; }
.sb-r { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; }
.sb-r svg { width: 15px; height: 15px; }
.batt { display: inline-block; width: 24px; height: 11.5px; border-radius: 3.5px; border: 1.2px solid rgba(29,28,32,.45); padding: 1.2px; position: relative; }
.batt::after { content: ""; position: absolute; right: -3.5px; top: 3px; width: 1.8px; height: 4px; border-radius: 0 1px 1px 0; background: rgba(29,28,32,.45); }
.batt i { display: block; height: 100%; border-radius: 1.8px; background: #1d1c20; }
.is-portrait .sb { padding: 0 16px; font-size: 10.5px; }
.is-portrait .sb-r svg { width: 12px; height: 12px; }
.is-portrait .batt { width: 20px; height: 9.5px; }

/* scenes */
.scene { position: absolute; left: 0; right: 0; top: var(--sb); bottom: 0; opacity: 0; visibility: hidden; transform: scale(1.03); transition: opacity .45s ease, transform .55s cubic-bezier(.2,.8,.2,1), visibility 0s .55s; }
.scene:not(.is-on), .scene:not(.is-on) * { pointer-events: none !important; }
.scene.is-on { opacity: 1; visibility: visible; transform: none; transition: opacity .45s ease, transform .55s cubic-bezier(.2,.8,.2,1), visibility 0s; }
.scene.work:not(.is-on) { transform: scale(.94); }

/* icon button */
.ib { width: 32px; height: 32px; display: inline-grid; place-items: center; color: #3A3940; flex: none; }
.ib svg { width: 21px; height: 21px; }
.ib.dim { color: rgba(44,43,49,.5); }
.is-portrait .ib { width: 26px; height: 26px; }
.is-portrait .ib svg { width: 17px; height: 17px; }

/* ---------------------------------------------- workspace */
.w-top { position: absolute; left: 0; right: 0; top: 0; height: var(--top); display: flex; align-items: center; justify-content: space-between; padding: 0 14px 0 12px; }
.w-top-l, .w-top-r { display: flex; align-items: center; gap: 4px; min-width: 0; }
.w-title { font-weight: 600; font-size: 14.5px; margin-left: 2px; white-space: nowrap; }
.w-edited { color: rgba(44,43,49,.45); font-size: 13px; margin-left: 12px; white-space: nowrap; }
.ask-screen { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 13px 0 11px; margin-right: 8px; border-radius: 10px; background: var(--indigo-soft); color: var(--indigo); font-weight: 600; font-size: 13.5px; transition: background .15s; }
.ask-screen:hover { background: #DADDF0; }
.ask-screen svg { width: 15px; height: 15px; }
.is-portrait .w-top { padding: 0 8px 0 6px; }
.is-portrait .w-title { font-size: 12.5px; }
.is-portrait .w-edited, .is-portrait .hide-p { display: none !important; }
.is-portrait .ask-screen { height: 26px; padding: 0 9px 0 8px; font-size: 11.5px; gap: 5px; margin-right: 2px; border-radius: 8px; }
.is-portrait .ask-screen svg { width: 12px; height: 12px; }
.is-portrait .ask-screen span::before { content: "Ask"; }
.is-portrait .ask-screen span { font-size: 0; }
.is-portrait .ask-screen span::before { font-size: 11.5px; }

.stage { position: absolute; left: 0; right: 0; top: var(--top); bottom: 0; overflow: hidden; }
.page {
  --px: 150px; --py: 14px; --ps: .705;
  position: absolute; left: var(--px); top: var(--py); width: calc(768px * var(--ps)); height: calc(1024px * var(--ps));
  background: var(--paper); border-radius: 4px;
  box-shadow: 0 0 0 .5px rgba(60,50,40,.10), 0 2px 4px rgba(60,50,40,.06), 0 14px 30px -10px rgba(60,50,40,.22);
  touch-action: pan-y;
}
.is-portrait .page { --px: 30px; --py: 10px; --ps: .547; }
.page.is-drawable { touch-action: none; cursor: crosshair; }
.page-svg { position: absolute; inset: 0; overflow: visible; }
#paperRules line { stroke-width: 1; }
.rule { stroke: rgba(63,76,154,.13); }
.margin { stroke: rgba(180,85,58,.28); }
.ink-pen path, .user-ink path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.ink-marker path { fill: none; stroke-linecap: butt; stroke-linejoin: round; mix-blend-mode: multiply; }
.ink-marker { opacity: .5; }
.loop-free { fill: none; stroke: #2F3040; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; opacity: 0; }
.loop-free.is-on { opacity: .8; }
.loop-snap { fill: rgba(63,76,154,.07); stroke: rgba(63,76,154,.72); stroke-width: 2.4; stroke-dasharray: 8 7; opacity: 0; transform-box: fill-box; transform-origin: center; transform: scale(1.06); transition: opacity .25s ease, transform .35s cubic-bezier(.2,.9,.3,1.2); }
.loop-snap.is-on { opacity: 1; transform: none; animation: march 1.2s linear infinite; }
@keyframes march { to { stroke-dashoffset: -30; } }

/* floating windows */
.win {
  --x: 572px; --y: 14px; --w: 520px; --h: 340px;
  position: absolute; left: var(--x); top: var(--y); width: var(--w); height: var(--h);
  display: flex; flex-direction: column; border-radius: 18px;
  background: rgba(250,248,244,.9);
  backdrop-filter: blur(16px) saturate(1.3); -webkit-backdrop-filter: blur(16px) saturate(1.3);
  box-shadow: 0 0 0 1px rgba(44,43,49,.08), inset 0 1px 0 rgba(255,255,255,.85), 0 22px 44px -16px rgba(40,32,24,.34), 0 4px 12px rgba(40,32,24,.08);
  opacity: 0; visibility: hidden; transform: scale(.94) translateY(10px); transform-origin: 50% 20%;
  transition: opacity .3s ease, transform .42s cubic-bezier(.2,.9,.25,1.15), visibility 0s .42s;
  z-index: 5;
}
.win.is-open { opacity: 1; visibility: visible; transform: none; transition: opacity .3s ease, transform .42s cubic-bezier(.2,.9,.25,1.15), visibility 0s; }
.win.is-min { transform-origin: 100% 0; transform: translate(40px, -20px) scale(.25); opacity: 0; }
.win.is-dragging { transition: none; box-shadow: 0 0 0 1px rgba(44,43,49,.1), 0 30px 60px -18px rgba(40,32,24,.42); }
/* On its side the windows float over the right half of the page, clear of the lines the tour writes and circles. */
.win-slides { --x: 450px; --y: 20px; --w: 530px; --h: 336px; }
.win-video { --x: 520px; --y: 380px; --w: 410px; --h: 272px; }
.win-tutor { --x: 520px; --y: 14px; --w: 440px; --h: 656px; }
.is-portrait .win { border-radius: 14px; }
.is-portrait .win-slides { --x: 254px; --y: 118px; --w: 214px; --h: 164px; }
.is-portrait .win-video { --x: 250px; --y: 372px; --w: 218px; --h: 148px; }
.is-portrait .win-tutor { --x: 10px; --y: 8px; --w: 352px; --h: 316px; }

.win-bar { flex: none; height: 38px; display: flex; align-items: center; gap: 2px; padding: 0 6px 0 12px; cursor: grab; touch-action: none; border-radius: 18px 18px 0 0; }
.win.is-dragging .win-bar { cursor: grabbing; }
.win-i { width: 17px; height: 17px; margin-right: 7px; flex: none; }
.win-t { flex: 1; min-width: 0; font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.win-b { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; color: rgba(44,43,49,.55); flex: none; }
.win-b:hover { background: rgba(44,43,49,.07); color: var(--ink); }
.win-b svg { width: 15px; height: 15px; }
.win-body { flex: 1; min-height: 0; position: relative; overflow: hidden; border-radius: 0 0 17px 17px; }
.is-portrait .win-bar { height: 28px; padding: 0 3px 0 9px; border-radius: 14px 14px 0 0; }
.is-portrait .win-i { width: 13px; height: 13px; margin-right: 5px; }
.is-portrait .win-t { font-size: 10.5px; }
.is-portrait .win-b { width: 22px; height: 22px; }
.is-portrait .win-b svg { width: 12px; height: 12px; }
.is-portrait .win-body { border-radius: 0 0 13px 13px; }
.c-terra { color: var(--terra); } .c-red { color: #D0452F; } .c-indigo { color: var(--indigo); }

/* corner grips, like the app's */
.grip { position: absolute; width: 20px; height: 20px; border: 3.5px solid rgba(44,43,49,.62); opacity: 0; transition: opacity .2s; pointer-events: none; }
.win.is-front .grip { opacity: 1; }
.g-tl { left: -4px; top: -4px; border-right: 0; border-bottom: 0; border-top-left-radius: 21px; }
.g-tr { right: -4px; top: -4px; border-left: 0; border-bottom: 0; border-top-right-radius: 21px; }
.g-bl { left: -4px; bottom: -4px; border-right: 0; border-top: 0; border-bottom-left-radius: 21px; }
.g-br { right: -4px; bottom: -4px; border-left: 0; border-top: 0; border-bottom-right-radius: 21px; pointer-events: auto; cursor: nwse-resize; touch-action: none; }
.is-portrait .grip { width: 14px; height: 14px; border-width: 2.5px; }
.is-portrait .g-tl { border-top-left-radius: 16px; } .is-portrait .g-tr { border-top-right-radius: 16px; }
.is-portrait .g-bl { border-bottom-left-radius: 16px; } .is-portrait .g-br { border-bottom-right-radius: 16px; }

/* slides (PDF) */
.pdf { display: flex; flex-direction: column; background: #DAD6CF; padding: 10px 12px 0; }
.slide { flex: 1; min-height: 0; background: #fff; border-radius: 3px; box-shadow: 0 1px 3px rgba(0,0,0,.12); padding: 16px 20px; display: flex; flex-direction: column; overflow: hidden; }
.slide-top { display: flex; justify-content: space-between; font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #8A857D; }
.slide-no { color: var(--terra); }
.slide h4 { margin: 8px 0 10px; font: 400 30px/1 var(--app-serif); color: #1F2A5C; padding-bottom: 8px; border-bottom: 2px solid #1F2A5C; }
.slide-cols { display: grid; grid-template-columns: 1fr 150px; gap: 14px; align-items: center; flex: 1; }
.slide-f { margin: 0 0 10px; padding: 8px 10px; border-radius: 6px; background: #FFF8D6; font: 500 16px/1.3 var(--app-serif); color: #1d1c20; }
.slide-f i { font-style: italic; }
.slide ul { margin: 0; padding-left: 17px; font-size: 12.5px; line-height: 1.45; color: #3a3940; }
.slide-fig { height: auto !important; }
.slide-fig path, .slide-fig rect { fill: none; stroke: #1F2A5C; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.slide-fig .o { stroke: var(--terra); fill: none; }
.slide-fig text { font: 500 13px var(--app-serif); fill: #1F2A5C; stroke: none; }
.slide-fig text.b { font-size: 17px; font-style: italic; }
.slide-fig text.o { fill: var(--terra); }
.slide-fig text.s { font: 600 10px var(--app-sans); }
.pdf-nav { flex: none; height: 38px; display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 12px; color: #55514B; }
.pdf-nav b { color: var(--ink); }
.pdf-nav button { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: rgba(255,255,255,.7); color: var(--ink); }
.pdf-nav button svg { width: 14px; height: 14px; }
.is-portrait .pdf { padding: 6px 7px 0; }
.is-portrait .slide { padding: 8px 10px; }
.is-portrait .slide-top { font-size: 6.5px; }
.is-portrait .slide h4 { font-size: 16px; margin: 4px 0 5px; padding-bottom: 4px; border-bottom-width: 1.5px; }
.is-portrait .slide-cols { grid-template-columns: 1fr; }
.is-portrait .slide-fig { display: none; }
.is-portrait .slide-f { font-size: 10.5px; padding: 5px 6px; margin-bottom: 5px; }
.is-portrait .slide ul { font-size: 8.5px; padding-left: 11px; }
.is-portrait .pdf-nav { height: 26px; font-size: 9px; gap: 6px; }
.is-portrait .pdf-nav button { width: 18px; height: 18px; border-radius: 6px; }
.is-portrait .pdf-nav button svg { width: 10px; height: 10px; }

/* video */
.video { background: #0E1411; }
.chalk { position: absolute; inset: 0 0 24px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; background: radial-gradient(120% 90% at 50% 40%, #2C4638 0%, #1B2B22 60%, #121C16 100%); color: #EDEFE6; }
.chalk-t { font: 600 15px var(--app-sans); letter-spacing: .01em; opacity: .85; }
.chalk-f { font: 400 44px/1 var(--app-serif); font-style: italic; }
.chalk-f u { text-decoration: none; color: #F4D76A; }
.chalk-a { display: flex; gap: 34px; font: 600 24px/1 var(--hand); }
.chalk-a em { font-style: normal; color: #F29B80; }
.chalk-a em + em { color: #F4D76A; }
.vid-play { position: absolute; left: 12px; bottom: 30px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.16); color: #fff; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.vid-play svg { width: 15px; height: 15px; }
.video .pa { display: none; } .video.is-playing .pa { display: block; } .video.is-playing .pl { display: none; }
.vid-bar { position: absolute; left: 12px; right: 12px; bottom: 16px; height: 3px; border-radius: 3px; background: rgba(255,255,255,.22); }
.vid-bar i { display: block; height: 100%; width: 42%; border-radius: inherit; background: #E0402C; position: relative; }
.vid-bar i::after { content: ""; position: absolute; right: -5px; top: -3.5px; width: 10px; height: 10px; border-radius: 50%; background: #E0402C; }
.vid-meta { position: absolute; right: 12px; bottom: 26px; font-size: 11px; font-weight: 600; color: rgba(255,255,255,.8); font-variant-numeric: tabular-nums; }
.is-portrait .chalk { inset: 0 0 14px; gap: 3px; }
.is-portrait .chalk-t { font-size: 9px; }
.is-portrait .chalk-f { font-size: 26px; }
.is-portrait .chalk-a { font-size: 15px; gap: 20px; }
.is-portrait .vid-play { width: 22px; height: 22px; left: 7px; bottom: 16px; }
.is-portrait .vid-play svg { width: 10px; height: 10px; }
.is-portrait .vid-bar { left: 7px; right: 7px; bottom: 8px; height: 2px; }
.is-portrait .vid-bar i::after { width: 7px; height: 7px; top: -2.5px; right: -3.5px; }
.is-portrait .vid-meta { font-size: 7.5px; bottom: 14px; right: 7px; }

/* tutor */
.tutor { display: flex; flex-direction: column; background: rgba(247,245,240,.6); }
.tutor-scroll { flex: 1; min-height: 0; overflow: hidden; position: relative; }
.tutor-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; padding: 0 44px; color: rgba(44,43,49,.55); transition: opacity .25s; }
.tutor-empty svg { width: 30px; height: 30px; color: var(--indigo); }
.tutor-empty b { font: 400 27px/1 var(--app-serif); color: var(--ink); }
.tutor-empty span { font-size: 13px; }
.tutor.has-log .tutor-empty { opacity: 0; }
.tutor-log { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 14px 10px; display: flex; flex-direction: column; gap: 10px; }
.msg-user { align-self: flex-end; display: flex; align-items: center; gap: 8px; max-width: 88%; padding: 6px 12px 6px 6px; border-radius: 14px 14px 4px 14px; background: var(--indigo-soft); color: var(--indigo-deep); font-weight: 600; font-size: 13.5px; }
.msg-user .crop { width: 118px; height: 30px; border-radius: 8px; background: var(--paper); box-shadow: 0 0 0 1px rgba(63,76,154,.18); overflow: hidden; flex: none; }
.msg-user .crop svg { width: 100%; height: 100%; }
.msg-user .crop.screen-crop { display: grid; place-items: center; color: var(--indigo); font-size: 11px; width: auto; padding: 0 8px; }
.msg-ai { align-self: stretch; padding: 12px 14px 10px; border-radius: 14px; background: #fff; box-shadow: 0 0 0 1px rgba(44,43,49,.07), 0 2px 8px -4px rgba(40,32,24,.15); font-size: 13.5px; line-height: 1.5; color: #2B2A30; }
.msg-ai p { margin: 0 0 7px; }
.msg-ai ul { margin: 0 0 7px; padding-left: 16px; }
.msg-ai li { margin: 1px 0; }
.msg-ai b { font-weight: 700; }
.msg-ai .w { display: none; }
.msg-ai .w.on { display: inline; animation: wIn .3s ease; }
@keyframes wIn { from { opacity: 0; } }
.msg-ai.is-streaming p:not(:has(.w.on)), .msg-ai.is-streaming li:not(:has(.w.on)), .msg-ai.is-streaming ul:not(:has(.w.on)) { display: none; }
.msg-ai:not(.is-done) .helpful { display: none; }
.msg-ai .helpful { display: inline-flex; align-items: center; gap: 8px; margin-top: 2px; font-size: 12px; font-weight: 600; color: rgba(44,43,49,.5); opacity: 0; transition: opacity .3s; }
.msg-ai .helpful svg { width: 13px; height: 13px; }
.msg-ai.is-done .helpful { opacity: 1; }
.typing { display: inline-flex; gap: 4px; padding: 4px 0; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: rgba(63,76,154,.5); animation: blink 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-2px); } }
.tutor-foot { flex: none; padding: 8px 12px 10px; border-top: 1px solid rgba(44,43,49,.06); background: rgba(250,248,244,.9); }
.composer-row { display: flex; align-items: center; gap: 8px; }
.attach { display: inline-grid; place-items: center; flex: none; width: 30px; height: 30px; color: var(--indigo); }
.attach svg { width: 20px; height: 20px; }
.composer-row .composer { flex: 1; min-width: 0; }
.composer-row .composer span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: rgba(44,43,49,.4); }
.think { display: inline-grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 10px; color: var(--indigo); box-shadow: 0 0 0 1px rgba(44,43,49,.12); background: #fff; }
.think svg { width: 19px; height: 19px; }
.composer-row .send { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: #B9BEDD; color: #fff; }
.composer-row .send svg { width: 17px; height: 17px; }
.top-pill { cursor: default; }
.top-pill.rec { background: #FBE3E1; color: #D2392F; }
.composer { display: flex; align-items: center; justify-content: space-between; height: 36px; padding: 0 4px 0 12px; border-radius: 10px; background: #fff; box-shadow: 0 0 0 1px rgba(44,43,49,.12); color: rgba(44,43,49,.4); font-size: 13px; }
.composer .send { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: #B9BEDD; color: #fff; }
.composer .send svg { width: 15px; height: 15px; }
.tutor-foot .fine { margin: 6px 0 0 2px; font-size: 10.5px; color: rgba(44,43,49,.45); }
.is-portrait .tutor-empty { gap: 5px; padding: 0 26px; }
.is-portrait .tutor-empty svg { width: 20px; height: 20px; }
.is-portrait .tutor-empty b { font-size: 19px; }
.is-portrait .tutor-empty span { font-size: 10px; }
.is-portrait .tutor-log { padding: 8px 8px 6px; gap: 6px; }
.is-portrait .msg-user { font-size: 10.5px; padding: 4px 9px 4px 4px; gap: 6px; }
.is-portrait .msg-user .crop { width: 84px; height: 21px; border-radius: 6px; }
.is-portrait .msg-ai { font-size: 10.6px; line-height: 1.42; padding: 8px 10px 7px; border-radius: 11px; }
.is-portrait .msg-ai p { margin-bottom: 4px; }
.is-portrait .msg-ai ul { margin-bottom: 4px; padding-left: 13px; }
.is-portrait .msg-ai .helpful { font-size: 9.5px; }
.is-portrait .tutor-foot { padding: 5px 8px 6px; }
.is-portrait .attach, .is-portrait .think { display: none; }
.is-portrait .composer-row .send { width: 20px; height: 20px; border-radius: 6px; }
.is-portrait .composer-row .send svg { width: 11px; height: 11px; }
.is-portrait .composer { height: 26px; font-size: 10px; border-radius: 8px; padding-left: 9px; }
.is-portrait .composer .send { width: 20px; height: 20px; border-radius: 6px; }
.is-portrait .composer .send svg { width: 11px; height: 11px; }
.is-portrait .tutor-foot .fine { font-size: 7.5px; margin-top: 3px; }

/* dock */
.dock { position: absolute; top: 14px; right: 16px; display: flex; flex-direction: column; align-items: flex-end; gap: 7px; z-index: 12; }
.pill { display: none; align-items: center; gap: 7px; height: 34px; padding: 0 12px 0 9px; border-radius: 17px; font-size: 11.5px; font-weight: 600; background: rgba(250,248,244,.92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 0 0 1px rgba(44,43,49,.08), 0 8px 18px -8px rgba(40,32,24,.35); animation: pillIn .35s cubic-bezier(.2,.9,.3,1.2); }
.pill svg { width: 16px; height: 16px; }
.pill.is-on { display: inline-flex; }
@keyframes pillIn { from { opacity: 0; transform: translateX(14px) scale(.9); } }
.is-portrait .dock { top: 8px; right: 8px; gap: 5px; }
.is-portrait .pill { height: 26px; padding: 0 9px 0 7px; font-size: 9.5px; gap: 5px; }
.is-portrait .pill svg { width: 12px; height: 12px; }

/* circle-to-ask action bar */
.actionbar { position: absolute; left: var(--ax, 330px); top: var(--ay, 380px); z-index: 14; display: flex; align-items: center; gap: 2px; padding: 5px; border-radius: 14px; background: rgba(36,35,42,.95); box-shadow: 0 14px 30px -10px rgba(20,16,12,.5); opacity: 0; visibility: hidden; transform: translate(-50%, calc(-100% + 8px)) scale(.96); transition: opacity .22s ease, transform .3s cubic-bezier(.2,.9,.3,1.2), visibility 0s .3s; white-space: nowrap; }
.actionbar.is-on { opacity: 1; visibility: visible; transform: translate(-50%, -100%); transition: opacity .22s ease, transform .3s cubic-bezier(.2,.9,.3,1.2), visibility 0s; }
.actionbar button { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 11px; border-radius: 10px; color: #F6F4F0; font-size: 13.5px; font-weight: 500; transition: background .12s; }
.actionbar button:hover, .actionbar button.is-pressed { background: rgba(255,255,255,.14); }
.actionbar button svg { width: 16px; height: 16px; }
.actionbar .ab-x { padding: 0 8px; color: rgba(246,244,240,.7); }
.is-portrait .actionbar { padding: 3px; border-radius: 11px; }
.is-portrait .actionbar button { height: 26px; padding: 0 7px; font-size: 10.5px; gap: 4px; border-radius: 8px; }
.is-portrait .actionbar button svg { width: 12px; height: 12px; }

/* tool bar */
.toolbar { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 11; display: flex; align-items: center; gap: 2px; height: 54px; padding: 0 9px; border-radius: 22px; background: rgba(250,248,244,.9); backdrop-filter: blur(16px) saturate(1.3); -webkit-backdrop-filter: blur(16px) saturate(1.3); box-shadow: 0 0 0 1px rgba(44,43,49,.08), inset 0 1px 0 rgba(255,255,255,.8), 0 14px 30px -14px rgba(40,32,24,.35); }
.tb { position: relative; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: #3A3940; flex: none; transition: background .15s, color .15s; }
button.tb:hover { background: rgba(44,43,49,.06); }
.tb svg { width: 22px; height: 22px; }
.tb .nib { position: absolute; left: 12px; right: 12px; bottom: 5px; height: 2.5px; border-radius: 2px; background: var(--c); }
.tb[data-tool="pen"][aria-pressed="true"] { background: rgba(44,43,49,.07); }
.tb-aa { font-size: 15px; font-weight: 600; }
.tb-fx { display: flex; align-items: center; justify-content: center; font: 500 14px var(--app-serif); white-space: nowrap; }
.tb-fx i { font-style: italic; }
.tb-sep { width: 1px; height: 24px; margin: 0 5px; background: rgba(44,43,49,.12); flex: none; }
.tb-ask[aria-pressed="true"] { background: var(--indigo); color: #fff; border-radius: 50%; }
.tb-video.is-open { background: #C8472F; color: #fff; }
.tb-ai.is-open { background: var(--indigo); color: #fff; border-radius: 50%; }
button.tb-ask[aria-pressed="true"]:hover, .tb-ai.is-open:hover { background: var(--indigo-deep); }
.tb-video.is-open:hover { background: #B23C26; }
.is-portrait .toolbar { bottom: 10px; height: 42px; padding: 0 6px; border-radius: 17px; gap: 1px; }
.is-portrait .tb { width: 32px; height: 32px; border-radius: 9px; }
.is-portrait .tb svg { width: 18px; height: 18px; }
.is-portrait .tb .nib { left: 9px; right: 9px; bottom: 3px; height: 2px; }
.is-portrait .tb-fx { font-size: 11.5px; }
.is-portrait .tb-sep { height: 18px; margin: 0 3px; }

.stage-hint { position: absolute; left: 50%; top: 14px; z-index: 13; margin: 0; padding: 8px 14px; border-radius: 12px; background: rgba(36,35,42,.94); color: #F6F4F0; font-size: 13px; font-weight: 500; white-space: nowrap; opacity: 0; transform: translate(-50%, -6px); transition: opacity .25s, transform .25s; pointer-events: none; }
.stage-hint.is-on { opacity: 1; transform: translate(-50%, 0); }
.is-portrait .stage-hint { font-size: 10.5px; padding: 6px 10px; top: 10px; border-radius: 9px; }

/* the tour's pencil + finger */
.pencil { position: absolute; left: 0; top: 0; z-index: 28; width: 24px; height: 180px; pointer-events: none; transform-origin: 12px 0; transform: translate3d(calc(var(--x, 600) * 1px - 12px), calc(var(--y, 900) * 1px), 0) rotate(-26deg); opacity: 0; transition: opacity .3s ease; filter: drop-shadow(8px 14px 6px rgba(30,24,16,.22)); }
.pencil.is-on { opacity: 1; }
.pencil.glide { transition: opacity .3s ease, transform .5s cubic-bezier(.4,0,.2,1); }
.is-portrait .pencil { width: 14px; height: 104px; transform-origin: 7px 0; transform: translate3d(calc(var(--x, 300) * 1px - 7px), calc(var(--y, 700) * 1px), 0) rotate(-26deg); }
.tap { position: absolute; left: 0; top: 0; z-index: 29; width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%; pointer-events: none; background: rgba(44,43,49,.22); box-shadow: 0 0 0 2px rgba(255,255,255,.9), 0 4px 14px rgba(0,0,0,.2); transform: translate(calc(var(--x, 0) * 1px), calc(var(--y, 0) * 1px)) scale(.5); opacity: 0; }
.tap.go { animation: tap .6s ease-out; }
@keyframes tap { 0% { opacity: 0; transform: translate(calc(var(--x) * 1px), calc(var(--y) * 1px)) scale(1.3); } 25% { opacity: 1; transform: translate(calc(var(--x) * 1px), calc(var(--y) * 1px)) scale(.8); } 100% { opacity: 0; transform: translate(calc(var(--x) * 1px), calc(var(--y) * 1px)) scale(1.5); } }
.is-portrait .tap { width: 26px; height: 26px; margin: -13px 0 0 -13px; }

/* ---------------------------------------------- library + community (shell) */
.side { position: absolute; left: 10px; top: 4px; bottom: 10px; width: 264px; padding: 14px 12px; border-radius: 22px; background: #F1EEE8; box-shadow: 0 0 0 1px rgba(44,43,49,.05), 0 10px 30px -18px rgba(40,32,24,.35); display: flex; flex-direction: column; gap: 6px; }
.side-top { display: flex; align-items: center; gap: 2px; margin-bottom: 8px; }
.app-logo { display: inline-flex; align-items: center; gap: 8px; font: 400 22px/1 var(--app-serif); margin-right: auto; white-space: nowrap; }
.app-mark { width: 26px; height: 26px; border-radius: 7px; background: var(--indigo); display: grid; place-items: center; }
.app-mark svg { width: 15px !important; height: 15px !important; fill: none; stroke: #F7F3E9; stroke-width: 5; stroke-linecap: round; }
.streak-pill { display: inline-flex; align-items: center; gap: 3px; height: 28px; padding: 0 3px 0 7px; border-radius: 14px; background: #fff; font-size: 12.5px; font-weight: 700; box-shadow: 0 0 0 1px rgba(44,43,49,.06); margin: 0 2px; }
.streak-pill svg { width: 14px; height: 14px; color: var(--terra); }
.av { width: 22px; height: 22px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--c, var(--indigo)); color: #fff; font: 400 12px/1 var(--app-serif); flex: none; }
.streak-pill .av { margin-left: 3px; }
.av-lg { width: 36px; height: 36px; font-size: 18px; }
.new-nb { display: flex; align-items: center; justify-content: center; gap: 7px; height: 40px; border-radius: 11px; background: var(--indigo); color: #fff; font-weight: 600; font-size: 14px; margin-bottom: 8px; box-shadow: inset 0 1px 0 rgba(255,255,255,.2); }
.new-nb svg { width: 15px; height: 15px; }
.shelf { display: flex; align-items: center; gap: 11px; padding: 8px; border-radius: 13px; text-align: left; width: 100%; }
.shelf.is-sel { background: #fff; box-shadow: 0 1px 2px rgba(40,32,24,.08), 0 6px 16px -10px rgba(40,32,24,.3); }
.shelf b { display: block; font-size: 14px; font-weight: 600; }
.shelf small { display: block; font-size: 11.5px; color: rgba(44,43,49,.5); }
.shelf-i { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.shelf-i svg { width: 19px; height: 19px; }
.s-indigo { background: var(--indigo); color: #fff; }
.s-indigo-t { background: rgba(63,76,154,.12); color: var(--indigo); }
.s-terra-t { background: rgba(180,85,58,.13); color: var(--terra); }
.s-sage-t { background: rgba(74,107,82,.14); color: var(--sage); }
.s-grey-t { background: rgba(44,43,49,.08); color: rgba(44,43,49,.6); }
.fx { font: italic 600 13px var(--app-serif); }
.side-label { display: flex; align-items: center; justify-content: space-between; margin: 12px 8px 2px; font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: rgba(44,43,49,.42); }
.side-label svg { width: 14px; height: 14px; }
.side hr { border: 0; height: 1px; background: rgba(44,43,49,.08); margin: 6px 8px; }

.main { position: absolute; left: 290px; right: 0; top: 0; bottom: 0; padding: 22px 28px 0 20px; overflow: hidden; opacity: 0; visibility: hidden; transform: translateY(10px); transition: opacity .4s ease, transform .5s cubic-bezier(.2,.8,.2,1), visibility 0s .5s; }
.shell[data-pane="home"] .main-home, .shell[data-pane="prep"] .main-home { opacity: 1; visibility: visible; transform: none; transition: opacity .4s ease, transform .5s cubic-bezier(.2,.8,.2,1), visibility 0s; }
.eyebrow { margin: 0; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: rgba(44,43,49,.45); }
.greet { margin: 4px 0 10px; font: 400 40px/1.05 var(--app-serif); letter-spacing: -0.01em; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px 0 9px; border-radius: 9px; background: #fff; box-shadow: 0 0 0 1px rgba(44,43,49,.07); font-size: 12.5px; font-weight: 600; color: var(--indigo); }
.chip svg { width: 15px; height: 15px; }
.chip-exam { color: var(--ink-2); }
.chip-exam svg { color: var(--terra); }
.chip-exam b { color: var(--terra); margin-right: 3px; }
.searchrow { display: flex; gap: 8px; margin-top: 12px; }
.search { flex: 1; max-width: 340px; display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border-radius: 10px; background: #fff; box-shadow: 0 0 0 1px rgba(44,43,49,.08); color: rgba(44,43,49,.42); font-size: 13px; }
.search svg { width: 16px; height: 16px; }
.btn-s { display: inline-flex; align-items: center; gap: 5px; height: 36px; padding: 0 12px; border-radius: 10px; background: #fff; box-shadow: 0 0 0 1px rgba(44,43,49,.08); font-size: 13px; font-weight: 600; }
.btn-s svg { width: 13px; height: 13px; }

.dash { display: grid; grid-template-columns: auto auto 1fr; align-items: center; gap: 24px; margin-top: 16px; padding: 14px 18px; border-radius: 16px; background: #F7F5F0; box-shadow: 0 0 0 1px rgba(44,43,49,.06), 0 8px 20px -16px rgba(40,32,24,.35); }
.dash-streak { display: flex; align-items: center; gap: 12px; }
.flame-t { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: rgba(180,85,58,.12); color: var(--terra); }
.flame-t svg { width: 22px; height: 22px; }
.big { margin: 0; font: 400 34px/1 var(--app-serif); }
.big small { font: 500 13px var(--app-sans); margin-left: 6px; color: var(--ink-2); }
.mut { margin: 3px 0 0; font-size: 12px; color: var(--sage); font-weight: 600; }
.dash-chain { display: grid; grid-template-columns: repeat(7, 15px); gap: 4px; padding-left: 22px; border-left: 1px solid rgba(44,43,49,.08); }
.dh { font-size: 8.5px; font-weight: 600; text-align: center; color: rgba(44,43,49,.4); }
.c { width: 15px; height: 12px; border-radius: 3.5px; background: #E5E1DA; }
.c.p { background: #E9A791; } .c.r { background: #C9CCEA; } .c.s { background: #C9CCEA; }
.c.k { background: var(--terra); }
.c.today { background: transparent; box-shadow: inset 0 0 0 1.5px var(--indigo); border-radius: 3.5px; }
.c.f { background: transparent; box-shadow: inset 0 0 0 1px rgba(44,43,49,.1); }
.dash-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat { padding: 8px 10px; border-radius: 11px; background: #EFEBE4; }
.stat small { display: block; font-size: 9.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: rgba(44,43,49,.5); }
.stat b { font: 400 24px/1.1 var(--app-serif); }
.stat em { font: 500 12px var(--app-sans); font-style: normal; margin-left: 2px; }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 16px; margin-top: 2px; }
.bars i { flex: 1; height: calc(var(--h) * 100%); border-radius: 2px; }
.b-indigo i { background: var(--indigo); opacity: .85; }
.b-terra i { background: var(--terra); opacity: .85; }

.grid-label { margin: 16px 0 10px; font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: rgba(44,43,49,.45); }
.nb-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px 22px; }
.nb { display: flex; flex-direction: column; text-align: left; min-width: 0; }
.nb > b { margin-top: 8px; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nb > small { display: flex; align-items: center; gap: 6px; font-size: 11px; color: rgba(44,43,49,.5); white-space: nowrap; overflow: hidden; margin-top: 1px; }
.tag { font-style: normal; flex: none; padding: 1.5px 6px; border-radius: 5px; background: var(--indigo-soft); color: var(--indigo); font-size: 10px; font-weight: 700; }
.cover { position: relative; display: block; aspect-ratio: 3 / 4; border-radius: 8px; overflow: hidden; background: var(--paper); box-shadow: 0 0 0 1px rgba(44,43,49,.07), 0 2px 4px rgba(40,32,24,.06), 0 12px 24px -14px rgba(40,32,24,.4); transition: transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .25s; }
.nb:hover .cover { transform: translateY(-3px); box-shadow: 0 0 0 1px rgba(44,43,49,.08), 0 18px 30px -14px rgba(40,32,24,.45); }
.cover > svg { position: absolute; inset: 0; }
.spine { position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--c, var(--indigo)); }
.grid-paper { background-color: var(--paper); background-image: linear-gradient(rgba(63,76,154,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(63,76,154,.07) 1px, transparent 1px); background-size: 12px 12px; }
.hand text { font: 600 28px var(--hand); fill: #2F3040; }
.hand text.hi { fill: var(--indigo); font-size: 36px; font-weight: 700; }
.hand text.sm { font-size: 22px; fill: var(--terra); }
.hand path { fill: none; stroke: #2F3040; stroke-width: 2.4; stroke-linecap: round; }
.hand .u { stroke: var(--indigo); }
.hand .curve { stroke: var(--terra); }
.hand .dash-l { stroke-dasharray: 6 6; stroke-width: 1.6; opacity: .6; }
.hand .bilayer circle { fill: rgba(74,107,82,.16); stroke: var(--sage); stroke-width: 2.2; }
.slides-cover { background: #E4E0D8; }
.sl { position: absolute; left: 10%; right: 10%; aspect-ratio: 16 / 10; border-radius: 4px; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.14); }
.sl-back { top: 12%; transform: rotate(-4deg); opacity: .8; }
.sl-front { top: 20%; padding: 9% 8%; display: flex; flex-direction: column; gap: 3px; }
.sl-k { font-size: 6.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #8A857D; font-style: normal; }
.sl-front b { font: 400 15px/1 var(--app-serif); color: #1F2A5C; border-bottom: 1.5px solid #1F2A5C; padding-bottom: 3px; }
.sl-f { font: italic 9px var(--app-serif); background: #FFF3C4; padding: 2px 3px; border-radius: 2px; align-self: flex-start; color: #1d1c20; }
.sl-lines { display: flex; flex-direction: column; gap: 3px; margin-top: 2px; }
.sl-lines i { height: 2.5px; border-radius: 2px; background: #D6D3CD; width: 90%; }
.sl-lines i:nth-child(2) { width: 70%; } .sl-lines i:nth-child(3) { width: 80%; }
.pdf-badge { position: absolute; left: 8px; bottom: 8px; padding: 2px 6px; border-radius: 5px; background: var(--terra); color: #fff; font-size: 9.5px; font-weight: 800; letter-spacing: .04em; }
.book-cover { background: linear-gradient(160deg, #2F3B82 0%, #243066 55%, #1A2350 100%); color: #F4F1EA; }
.book-cover::before { content: ""; position: absolute; left: 7px; top: 0; bottom: 0; width: 2px; background: rgba(255,255,255,.14); }
.bk-curve { fill: none; stroke: #E9A791; stroke-width: 2.4; }
.bk-tan { fill: none; stroke: rgba(244,241,234,.55); stroke-width: 1.3; stroke-dasharray: 4 4; }
.bk-pt { fill: #F4D76A; }
.bk-t { position: absolute; left: 14%; right: 10%; top: 12%; }
.bk-t i { display: block; font: italic 400 27px/1 var(--app-serif); }
.bk-t small { display: block; margin-top: 5px; font-size: 8.5px; line-height: 1.3; letter-spacing: .04em; opacity: .75; text-transform: uppercase; font-weight: 600; }
.bk-ed { position: absolute; left: 14%; bottom: 9%; font-size: 8.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .65; }
.import-cover { background: rgba(255,255,255,.45); box-shadow: none; border: 1.6px dashed rgba(63,76,154,.35); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 12px; text-align: center; }
.nb-import:hover .cover { transform: none; box-shadow: none; border-color: var(--indigo); }
.imp-i { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--indigo-soft); color: var(--indigo); }
.imp-i svg { width: 21px; height: 21px; }
.import-cover > b { font-size: 12.5px; line-height: 1.25; font-weight: 700; color: var(--ink); }
.imp-go { display: inline-flex; height: 26px; align-items: center; padding: 0 10px; border-radius: 8px; background: var(--indigo); color: #fff; font-size: 11px; font-weight: 700; }
.imp-prog { display: none; width: 76%; height: 5px; border-radius: 5px; background: rgba(63,76,154,.15); overflow: hidden; }
.imp-prog i { display: block; height: 100%; width: calc(var(--p, 0) * 100%); background: var(--indigo); border-radius: inherit; }
.nb-import.is-busy .imp-go { display: none; }
.nb-import.is-busy .imp-prog { display: block; }
.imp-title { color: var(--indigo); }
.nb-import { grid-column: 1 / -1; order: -1; }
.nb-import > b, .nb-import > small { display: none; }
.import-cover { aspect-ratio: auto; height: 58px; flex-direction: row; justify-content: flex-start; gap: 12px; padding: 0 12px; border-radius: 12px; text-align: left; }
.import-cover > b { flex: 1; font-size: 13.5px; }
.import-cover > b small { display: block; font-size: 11.5px; font-weight: 500; color: rgba(44,43,49,.55); margin-top: 1px; }
.imp-prog { width: 140px; flex: none; }
.is-portrait .import-cover { height: 44px; gap: 9px; padding: 0 8px; border-radius: 10px; }
.is-portrait .import-cover > b { font-size: 10.5px; }
.is-portrait .import-cover > b small { font-size: 8.5px; }
.is-portrait .imp-i { width: 28px; height: 28px; border-radius: 8px; }
.is-portrait .imp-prog { width: 80px; }
.nb-new { animation: nbIn .6s cubic-bezier(.2,.9,.3,1.15) backwards; }
@keyframes nbIn { from { opacity: 0; transform: translateY(-26px) scale(.8) rotate(-4deg); } }
.from { position: absolute; left: 8px; top: 8px; padding: 2px 6px; border-radius: 5px; background: rgba(255,255,255,.9); box-shadow: 0 0 0 1px rgba(44,43,49,.08); font-size: 9px; font-weight: 700; color: var(--ink-2); }
.ink-badge { display: inline-flex; align-items: center; gap: 3px; color: var(--sage); font-weight: 700; }
.ink-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--sage); }

.toast { position: absolute; left: 50%; bottom: 22px; z-index: 20; display: flex; align-items: center; gap: 9px; max-width: 86%; padding: 11px 16px 11px 12px; border-radius: 14px; background: rgba(36,35,42,.95); color: #F6F4F0; font-size: 13.5px; font-weight: 500; box-shadow: 0 16px 34px -12px rgba(20,16,12,.5); opacity: 0; visibility: hidden; transform: translate(-50%, 12px); transition: opacity .3s, transform .35s cubic-bezier(.2,.9,.3,1.2), visibility 0s .35s; }
.toast.is-on { opacity: 1; visibility: visible; transform: translate(-50%, 0); transition: opacity .3s, transform .35s cubic-bezier(.2,.9,.3,1.2), visibility 0s; }
.toast .t-i { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--sage); flex: none; }
.toast .t-i svg { width: 13px; height: 13px; }
.toast small { display: block; color: rgba(246,244,240,.65); font-size: 12px; }

/* shell, upright */
.is-portrait .side { left: 0; right: 0; top: 0; bottom: auto; width: auto; height: 42px; padding: 0 10px 0 14px; border-radius: 0; background: transparent; box-shadow: none; flex-direction: row; }
.is-portrait .side > :not(.side-top) { display: none; }
.is-portrait .side-top { flex: 1; margin: 0; gap: 4px; }
.is-portrait .app-logo { font-size: 17px; gap: 6px; }
.is-portrait .app-mark { width: 20px; height: 20px; border-radius: 6px; }
.is-portrait .app-mark svg { width: 12px !important; height: 12px !important; }
.is-portrait .streak-pill { height: 22px; font-size: 10.5px; padding: 0 2px 0 5px; }
.is-portrait .streak-pill svg { width: 11px; height: 11px; }
.is-portrait .av { width: 18px; height: 18px; font-size: 10px; }
.is-portrait .main { left: 0; top: 42px; padding: 4px 14px 0; }
.is-portrait .eyebrow { font-size: 8.5px; }
.is-portrait .greet { font-size: 27px; margin: 2px 0 7px; }
.is-portrait .chip { height: 22px; font-size: 10px; padding: 0 8px 0 7px; border-radius: 7px; gap: 4px; }
.is-portrait .chip svg { width: 12px; height: 12px; }
.is-portrait .searchrow { margin-top: 8px; gap: 6px; }
.is-portrait .search, .is-portrait .btn-s { height: 28px; font-size: 10.5px; border-radius: 8px; }
.is-portrait .search svg { width: 12px; height: 12px; }
.is-portrait .dash { grid-template-columns: auto 1fr; gap: 14px; margin-top: 10px; padding: 9px 12px; border-radius: 12px; }
.is-portrait .flame-t { width: 32px; height: 32px; border-radius: 9px; }
.is-portrait .flame-t svg { width: 17px; height: 17px; }
.is-portrait .big { font-size: 25px; }
.is-portrait .big small { font-size: 10px; }
.is-portrait .mut { font-size: 9.5px; }
.is-portrait .dash-chain { grid-template-columns: repeat(7, 11px); gap: 3px; padding-left: 14px; justify-content: end; }
.is-portrait .dh { font-size: 6.5px; }
.is-portrait .c { width: 11px; height: 8px; border-radius: 2.5px; }
.is-portrait .grid-label { margin: 12px 0 7px; font-size: 8.5px; }
.is-portrait .nb-grid { grid-template-columns: repeat(3, 1fr); gap: 10px 11px; }
.is-portrait .nb > b { font-size: 10.5px; margin-top: 5px; }
.is-portrait .nb > small { font-size: 8.5px; gap: 4px; }
.is-portrait .tag { font-size: 8px; padding: 1px 4px; }
.is-portrait .cover { border-radius: 6px; }
.is-portrait .import-cover { gap: 5px; padding: 8px; }
.is-portrait .imp-i { width: 30px; height: 30px; border-radius: 9px; }
.is-portrait .imp-i svg { width: 16px; height: 16px; }
.is-portrait .import-cover > b { font-size: 10px; }
.is-portrait .imp-go { height: 20px; font-size: 9px; padding: 0 7px; border-radius: 6px; }
.is-portrait .sl-front b { font-size: 11px; }
.is-portrait .sl-k { font-size: 5px; }
.is-portrait .sl-f { font-size: 7px; }
.is-portrait .bk-t i { font-size: 21px; }
.is-portrait .bk-t small, .is-portrait .bk-ed { font-size: 6.5px; }
.is-portrait .pdf-badge { font-size: 7.5px; left: 6px; bottom: 6px; padding: 1px 4px; }
.is-portrait .from { font-size: 7px; left: 5px; top: 5px; padding: 1px 4px; }
.is-portrait .toast { font-size: 11px; bottom: 14px; padding: 8px 12px 8px 9px; gap: 7px; border-radius: 11px; max-width: 92%; }
.is-portrait .toast small { font-size: 9.5px; }
.is-portrait .toast .t-i { width: 20px; height: 20px; }

/* ---------------------------------------------- exam prep (sheet over Home) */
.prep { position: absolute; inset: 0; z-index: 15; background: rgba(28,27,34,.32); opacity: 0; visibility: hidden; transition: opacity .4s ease, visibility 0s .4s; }
.shell[data-pane="prep"] .prep { opacity: 1; visibility: visible; transition: opacity .4s ease, visibility 0s; }
.prep-sheet { position: absolute; left: 50%; top: 70px; width: 470px; display: flex; flex-direction: column; gap: 14px; padding: 22px; border-radius: 20px; background: var(--paper); box-shadow: 0 2px 6px rgba(20,20,40,.14), 0 40px 90px rgba(20,20,40,.35); transform: translate(-50%, 46px); transform-origin: 50% 0; transition: transform .55s cubic-bezier(.2,.8,.2,1); }
.shell[data-pane="prep"] .prep-sheet { transform: translate(-50%, 0); }
.ps-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.ps-head h3 { margin: 0; font: 400 26px/1.1 var(--app-serif); }
.ps-head p { margin: 4px 0 0; font-size: 13px; color: rgba(44,43,49,.6); }
.ps-x { width: 30px; height: 30px; flex: none; border-radius: 50%; display: grid; place-items: center; background: rgba(44,43,49,.07); color: var(--ink-2); }
.ps-x svg { width: 13px; height: 13px; }
.ps-seg { display: flex; padding: 2px; border-radius: 9px; background: rgba(118,118,128,.12); }
.ps-seg span { flex: 1; height: 30px; display: grid; place-items: center; border-radius: 7px; font-size: 13px; font-weight: 500; }
.ps-seg .is-on { background: #fff; font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.ps-label { margin: 0 0 -8px; font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: rgba(44,43,49,.45); }
.ps-rows { display: flex; flex-direction: column; }
.ps-row { display: flex; align-items: center; gap: 13px; height: 60px; padding: 0 4px; text-align: left; border-bottom: 1px solid rgba(44,43,49,.07); }
.ps-cov { width: 34px; height: 45px; flex: none; border-radius: 5px; }
.ps-cov .sl { left: 8%; right: 8%; top: 14%; padding: 10% 8%; }
.ps-cov .pdf-badge { left: 3px; bottom: 3px; font-size: 6px; padding: 1px 3px; border-radius: 3px; }
.ps-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ps-t b { font-size: 14px; font-weight: 600; }
.ps-t small { font-size: 11.5px; color: rgba(44,43,49,.55); }
.ps-ck { width: 24px; height: 24px; flex: none; border-radius: 50%; display: grid; place-items: center; box-shadow: inset 0 0 0 1.5px rgba(44,43,49,.25); color: #fff; transition: background .25s, box-shadow .25s; }
.ps-ck svg { width: 13px; height: 13px; opacity: 0; transition: opacity .2s; }
.ps-row.is-on .ps-ck { background: var(--indigo); box-shadow: none; }
.ps-row.is-on .ps-ck svg { opacity: 1; }
.ps-go { position: relative; overflow: hidden; height: 50px; margin-top: 4px; border-radius: 14px; display: flex; align-items: center; justify-content: center; gap: 8px; background: var(--indigo); color: #fff; font-size: 15px; font-weight: 600; }
.ps-go svg, .ps-go span { position: relative; }
.ps-go svg { width: 16px; height: 16px; }
.ps-prog { position: absolute; left: 0; top: 0; bottom: 0; width: calc(var(--p, 0) * 100%); background: rgba(255,255,255,.2); }
.is-portrait .prep-sheet { top: 52px; width: 440px; padding: 18px; gap: 11px; transform: translate(-50%, 40px) scale(.98); }
.is-portrait .shell[data-pane="prep"] .prep-sheet, .shell[data-pane="prep"] .is-portrait .prep-sheet { transform: translate(-50%, 0) scale(.98); }
.is-portrait .ps-head h3 { font-size: 22px; }
.is-portrait .ps-row { height: 54px; }

/* ---------------------------------------------- practice test + study guide */
.scene.doc { background: var(--shell); }
.d-seg { display: flex; padding: 2px; border-radius: 9px; background: rgba(118,118,128,.12); }
.d-seg button { height: 28px; padding: 0 12px; border-radius: 7px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.doc[data-front="test"] [data-show="test"], .doc[data-front="guide"] [data-show="guide"] { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.d-stage { position: absolute; left: 0; right: 0; top: var(--top); bottom: 0; overflow: hidden; }
.tpage, .gpage { position: absolute; box-sizing: border-box; aspect-ratio: 3 / 4; overflow: hidden; background: #fff; color: #1E1F29; font-family: "STIX Two Text", "Cambria Math", Georgia, serif; border-radius: 5px; box-shadow: 0 1px 1px rgba(44,43,49,.1), 0 14px 40px rgba(44,43,49,.22); transition: transform .8s cubic-bezier(.2,.8,.2,1), opacity .5s ease; }
.tpage { left: 70px; top: 18px; width: 510px; padding: 42px 46px; font-size: 13.5px; z-index: 1; }
.gpage { left: 548px; top: 60px; width: 470px; padding: 38px 42px; font-size: 12.5px; z-index: 2; opacity: 0; transform: translateX(120px) rotate(5deg); box-shadow: 0 4px 10px rgba(10,10,30,.16), 0 50px 100px rgba(10,10,30,.3); }
.doc.is-guide .gpage { opacity: 1; transform: rotate(2.2deg); }
.doc.is-guide[data-front="test"] .tpage { z-index: 3; }
.tp-h { display: flex; justify-content: space-between; padding-bottom: 7px; border-bottom: 1.5px solid var(--indigo); font: 700 .72em/1 var(--app-sans); letter-spacing: .1em; text-transform: uppercase; color: var(--indigo); }
.tp-h span + span { color: rgba(30,31,41,.45); }
.tpage h4, .gpage h4 { margin: 1.1em 0 .2em; font-size: 2.2em; font-weight: 600; letter-spacing: -.01em; line-height: 1.1; }
.tp-sub { margin: 0 0 1.4em; font-style: italic; color: #5B5E6E; }
.tp-q { margin: 0; padding: 0; list-style: none; counter-reset: q; display: flex; flex-direction: column; gap: 1.3em; }
.tp-q li { counter-increment: q; }
.tp-q p { position: relative; margin: 0; padding-left: 2.4em; padding-right: 3.6em; line-height: 1.45; }
.tp-q p::before { content: counter(q); position: absolute; left: 0; top: -.05em; width: 1.6em; height: 1.6em; border-radius: 50%; display: grid; place-items: center; background: var(--indigo); color: #fff; font: 700 .78em/1 var(--app-sans); }
.tp-q em { position: absolute; right: 0; top: .2em; font: 500 .75em var(--app-sans); color: #9A9DAA; font-style: normal; }
.mat { display: inline-grid; grid-template-columns: auto auto; column-gap: .8em; padding: 0 .4em; border-left: 1.5px solid #1E1F29; border-right: 1.5px solid #1E1F29; border-radius: 3px; line-height: 1.25; vertical-align: middle; text-align: center; }
.lines { position: relative; height: 6.2em; margin: .5em 0 0 2.4em; background: repeating-linear-gradient(180deg, transparent 0 calc(2.05em - 1px), #D9DCE6 calc(2.05em - 1px) 2.05em); }
.lines.short { height: 4.1em; }
.hw { position: absolute; left: .2em; top: .1em; font: 600 1.45em/1.42 var(--hand); color: var(--indigo); }
.gp-k { margin: 1.4em 0 .6em; font: 700 .72em/1 var(--app-sans); letter-spacing: .1em; text-transform: uppercase; color: var(--terra); }
.gp-map { display: flex; flex-wrap: wrap; align-items: center; gap: .5em; }
.gp-map span { padding: .35em .7em; border-radius: .5em; background: var(--indigo-soft); color: #23367A; white-space: nowrap; }
.gp-map b { color: #9A9DAA; font-weight: 400; }
.gp-box { display: grid; grid-template-columns: 1fr 1fr; gap: .7em 1em; padding: 1em 1.2em; border-radius: .7em; background: #FFF8D6; box-shadow: inset 0 0 0 1px rgba(180,140,0,.25); font-size: 1.1em; }
.gp-l { margin: 0; padding-left: 1.2em; display: flex; flex-direction: column; gap: .45em; line-height: 1.4; }
.d-note { position: absolute; left: 820px; top: 680px; z-index: 4; margin: 0; transform: rotate(-2deg); font: 700 32px/1 var(--hand); color: #2F3040; opacity: 0; transition: opacity .5s ease .3s; }
.d-note span { background: linear-gradient(176deg, transparent 0 40%, #FFE000 40% 92%, transparent 92%); padding: 0 .12em; }
.doc.is-guide .d-note { opacity: 1; }
.is-portrait .tpage { left: 16px; top: 10px; width: 420px; padding: 30px 32px; font-size: 11px; }
.is-portrait .gpage { left: 196px; top: 240px; width: 270px; padding: 20px 22px; font-size: 7.2px; }
.is-portrait .d-seg button { height: 22px; padding: 0 8px; font-size: 10px; }
.is-portrait .d-note { left: 214px; top: 528px; font-size: 24px; }

/* ------------------------------------------------------------------ The rest of the kit */
.kit { position: relative; z-index: 3; width: min(1120px, calc(100% - 2 * var(--gutter))); margin: clamp(56px, 8vh, 88px) auto 0; display: flex; flex-direction: column; gap: 24px; }
.kit h2 { margin: 0; text-align: center; font: 700 clamp(34px, 3.4vw, 46px)/1 var(--hand); color: #2F3040; }
.kit-grid { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.kit-grid li { display: flex; flex-direction: column; gap: 8px; padding: 18px; border-radius: 16px; background: rgba(255,255,255,.62); box-shadow: inset 0 0 0 1px rgba(44,43,49,.07); }
.kit-grid b { font-size: 15.5px; color: #2F3040; }
.kit-grid li > span:last-child { font-size: 14px; line-height: 1.45; color: var(--ink-2); text-wrap: pretty; }
.kit-i { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; }
.kit-i svg { width: 19px; height: 19px; }
.k-indigo { background: var(--indigo-soft); color: var(--indigo); }
.k-terra { background: #F6E4DD; color: #C2542F; }
.k-yellow { background: #FBF1B8; color: #7A6200; }
.k-sage { background: #E1EBE2; color: var(--sage); }
@media (max-width: 560px) {
  .kit { gap: 18px; }
  .kit-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kit-grid li { padding: 14px; gap: 6px; }
  .kit-grid li:last-child { grid-column: 1 / -1; }
  .kit-grid b { font-size: 14.5px; }
  .kit-grid li > span:last-child { font-size: 13px; }
  .kit-i { width: 32px; height: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .device-float, .device-shadow { animation: none; }
  .get-loop path { stroke-dashoffset: 0; }
}

/* ================================================================== Embedded
   The app's paywall plays this demo in a web view (tools/build-embed.js marks
   <html data-embed>): the tablet on its side, the notes and props around it,
   and the chapter pills as the tour's progress. No copy, no form and nothing to
   press — by then the student has tried all four for real. The page is
   transparent; the app draws the dot grid behind it. site.js sizes the tablet
   to the web view (--dw), measures the room beside it (--side) and turns the
   props on (.props-on) only when they fit. */
html[data-embed], html[data-embed] body { height: 100%; overflow: hidden; background: transparent; }
html[data-embed] body { background-image: none; }
html[data-embed] .nav, html[data-embed] .hero-copy, html[data-embed] .caption, html[data-embed] .tour-ctl,
html[data-embed] .join, html[data-embed] .kit, html[data-embed] .footer { display: none !important; }
html[data-embed] .hero { height: 100%; padding: 30px 0 8px; display: flex; flex-direction: column; justify-content: center; }
html[data-embed] .desk { margin-top: 0; }
html[data-embed] .tour { padding-top: 30px; }
html[data-embed] .chap { pointer-events: none; }
/* Always on its side, however narrow the web view: the paywall is on a tablet. */
html[data-embed] .device { --bz: calc(var(--dw) * 0.0145); border-radius: calc(var(--dw) * 0.043); }
html[data-embed] .cam { top: calc(var(--bz) / 2); left: 50%; }
html[data-embed] .glass-screen { aspect-ratio: 1180 / 820; border-radius: calc(var(--dw) * 0.029); }

html[data-embed]:not(.props-on) .sticky, html[data-embed]:not(.props-on) .stylus, html[data-embed]:not(.props-on) .annot { display: none; }
html[data-embed].props-on .sticky { display: block; position: absolute; z-index: 3; top: -20px; right: calc(50% + var(--dw) / 2 + max(-4px, var(--side) * .25 - 40px)); width: 142px; height: 128px; padding: 18px 14px; transform: rotate(-7deg); background: linear-gradient(170deg, #FFEE95, #FBE27A); box-shadow: 0 1px 1px rgba(0,0,0,.06), 0 14px 22px -12px rgba(90,70,20,.45); border-radius: 2px 2px 14px 2px; font: 600 25px/1.05 var(--hand); color: #5A4A1E; }
html[data-embed].props-on .stylus { display: block; position: absolute; z-index: 3; width: min(330px, calc(var(--dw) * .52), calc(var(--side) * 1.05)); bottom: -4px; left: calc(50% + var(--dw) * .42); transform: rotate(-21deg); filter: drop-shadow(0 12px 10px rgba(50,38,24,.28)) drop-shadow(0 2px 2px rgba(50,38,24,.18)); }
html[data-embed].props-on .annot { display: flex; position: absolute; z-index: 4; align-items: flex-start; gap: 4px; width: min(260px, calc(var(--side) - 18px)); pointer-events: none; }
html[data-embed].props-on .annot-l { right: calc(50% + var(--dw) / 2 + 14px); top: 44%; flex-direction: column; align-items: flex-end; text-align: right; }
html[data-embed].props-on .annot-r { left: calc(50% + var(--dw) / 2 + 14px); top: 16%; flex-direction: column; }
html[data-embed].props-on .annot-text { margin: 0; font: 600 calc(25px * var(--ns, 1))/1.05 var(--hand); color: var(--indigo); text-wrap: balance; transition: opacity .35s ease, transform .35s ease; }
html[data-embed].props-on .annot-r .annot-text { color: var(--terra); }
html[data-embed].props-on .annot-arrow { width: 96px; height: 56px; overflow: visible; }
html[data-embed].props-on .annot-arrow path { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 0; transition: stroke-dashoffset .6s ease .15s; }
html[data-embed].props-on .annot-l .annot-arrow { color: var(--indigo); }
html[data-embed].props-on .annot-r .annot-arrow { color: var(--terra); }
html[data-embed].props-on .annot.is-swapping .annot-text { opacity: 0; transform: translateY(4px); }
html[data-embed].props-on .annot.is-swapping .annot-arrow path { stroke-dashoffset: 1; transition: none; }

/* The app's UI tests load it still (data-still): the Ask chapter, answered, and nothing moving. */
html[data-still] *, html[data-still] *::before, html[data-still] *::after { animation: none !important; transition: none !important; }
