/* PROTOTYPE — base styles of the "Sân khấu" stage (landing A), shared by the Pie Agent landing and the
   pieofmind.work home prototype. Class names are all a-* so they are safe as a global sheet. */

  /* ── Pie Agent UI v2 tokens (sketches/012-chat-redesign-full, @pa-tokens) ──
     Shape = Pie constants. Colour = the values 012 resolves from the Obsidian theme it ships with
     (Border, dark, accent hsl(187 61% 40%)) — a landing page has no theme to read, so they are pinned here. */
  .a-root {
    --pa-r-xs: 6px; --pa-r-s: 8px; --pa-r-m: 12px; --pa-r-l: 16px; --pa-r-pill: 999px;
    --pa-s-1: 4px; --pa-s-2: 8px; --pa-s-3: 12px; --pa-s-4: 16px; --pa-s-5: 24px; --pa-bw: 1px;
    --pa-fs-xs: 11.5px; --pa-fs-sm: 12.5px; --pa-fs: 13.5px; --pa-fs-md: 14.5px; --pa-fs-lg: 19px;
    --pa-ease: cubic-bezier(.2,.8,.2,1); --pa-dur-1: 140ms; --pa-dur-2: 220ms; --pa-dur-3: 320ms;
    --pa-font-ui: -apple-system, BlinkMacSystemFont, "Inter", system-ui, "Segoe UI", sans-serif;
    --pa-font-mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, monospace;
    --pa-ink: #d3ddde; --pa-ink-2: #b8c5c7; --pa-ink-3: #74888b;
    --pa-link: #2cb5be; --pa-accent: #2896a4; --pa-on-accent: #ffffff;
    --pa-canvas: #191f20; --pa-surface: #262e2f;
    --pa-st-running: var(--pa-accent); --pa-st-done: #7cd37c; --pa-st-attention: #fbbb83; --pa-st-error: #ff7881; --pa-st-queue: #59e7e3; /* 012 queue is purple — landing stays in the teal family */
    --pa-tint-1: color-mix(in oklch, var(--pa-ink) 4%, transparent);
    --pa-tint-2: color-mix(in oklch, var(--pa-ink) 8%, transparent);
    --pa-tint-3: color-mix(in oklch, var(--pa-ink) 13%, transparent);
    --pa-line: color-mix(in oklch, var(--pa-ink) 12%, transparent);
    --pa-line-strong: color-mix(in oklch, var(--pa-ink) 22%, transparent);
    --pa-accent-tint: color-mix(in oklch, var(--pa-accent) 16%, transparent);
    --pa-accent-hover: color-mix(in oklch, var(--pa-accent) 88%, var(--pa-ink));
    --pa-run-glow: color-mix(in oklch, var(--pa-st-running) 60%, transparent);
    --pa-ring-mask: radial-gradient(closest-side, transparent calc(100% - 1.7px), #000 calc(100% - 1.5px));
    --pa-float-bg: linear-gradient(var(--pa-tint-1), var(--pa-tint-1)), linear-gradient(var(--pa-canvas), var(--pa-canvas));
    --pa-shadow-c: color-mix(in srgb, black 55%, transparent);
    --pa-shadow-float: 0 12px 32px -10px var(--pa-shadow-c), 0 2px 6px -2px var(--pa-shadow-c);
    --pa-focus: 0 0 0 2px color-mix(in oklch, var(--pa-accent) 45%, transparent);
    color-scheme: dark;
  }
  @media (prefers-reduced-motion: reduce) { .a-root { --pa-dur-1: 0ms; --pa-dur-2: 0ms; --pa-dur-3: 0ms; } }
  body[data-variant="A"] { background: #191f20; color: #d3ddde; font-family: -apple-system, BlinkMacSystemFont, "Inter", system-ui, sans-serif; -webkit-font-smoothing: antialiased; }

  /* ── stage ── */
  .a-canvas { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 0; display: block;
    background: radial-gradient(70% 60% at 50% 42%, color-mix(in oklch, var(--pa-accent) 16%, var(--pa-surface)) 0%, var(--pa-surface) 40%, var(--pa-canvas) 100%); }
  .a-vignette { position: fixed; inset: 0; z-index: 1; pointer-events: none; background: radial-gradient(120% 80% at 50% 40%, transparent 45%, color-mix(in srgb, var(--pa-canvas) 85%, black) 100%); }
  .a-loader { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: var(--pa-canvas); transition: opacity .8s ease, visibility .8s; }
  .a-loader span { width: 120px; height: 3px; border-radius: var(--pa-r-pill); background: var(--pa-tint-3); overflow: hidden; position: relative; }
  .a-loader span::after { content: ""; position: absolute; inset: 0; width: 40%; border-radius: inherit; background: var(--pa-st-running); animation: a-load 1.1s var(--pa-ease) infinite; }
  @keyframes a-load { from { transform: translateX(-100%); } to { transform: translateX(260%); } }
  .a-ready .a-loader { opacity: 0; visibility: hidden; }
  .a-track { position: relative; z-index: 2; pointer-events: none; }
  .a-spacer { height: 170vh; }
  .a-spacer[data-ch="hero"] { height: 130vh; }
  .a-spacer[data-ch="demo"] { height: 960vh; }
  .a-spacer[data-ch="video"] { height: 160vh; }
  .a-spacer[data-ch="dash"] { height: 600vh; }   /* 8 scenes, picked by scroll like the demo */
  .a-spacer[data-ch="usecases"] { height: 260vh; } /* 6 personas */

  .a-nav { position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 20; display: flex; align-items: center; gap: 22px;
    height: 48px; padding: 0 8px 0 10px; width: min(720px, calc(100vw - 32px)); justify-content: space-between; }
  .a-brand { color: var(--pa-ink); text-decoration: none; font-weight: 600; font-size: var(--pa-fs-md); display: flex; align-items: center; gap: 8px; }
  .a-links { display: flex; gap: 2px; }
  .a-links a { color: var(--pa-ink-2); text-decoration: none; font-size: var(--pa-fs); padding: 6px 10px; border-radius: var(--pa-r-s); transition: background var(--pa-dur-1) var(--pa-ease), color var(--pa-dur-1); }
  .a-links a:hover { background: var(--pa-tint-2); color: var(--pa-ink); }
  .a-links a.on { color: var(--pa-ink); background: var(--pa-tint-2); }
  .a-site-logo { width: 24px; height: 24px; }
  .a-site-wm { display: block; height: 14px; width: auto; } /* Codex 06-v2 wordmark, traced (public/prototype/brand) */
  .a-brand:has(.a-site-wm) { gap: 10px; }
  .a-nav--site { width: min(960px, calc(100vw - 32px)); } /* 7 menu items + 2 buttons on the pieofmind.work pages */
  .a-nav-ctas { display: flex; gap: 6px; flex: none; }
  @media (max-width: 860px) { .a-nav-ctas .pa-btn:not(.pri) { display: none; } }
  .a-brand { flex: none; }
  /* phone menu (mnav.js): a toggle next to the buttons, a sheet under the bar with every link and both buttons */
  .a-burger { display: none; flex: none; width: 36px; height: 36px; border: 0; border-radius: var(--pa-r-s); background: var(--pa-tint-2); cursor: pointer;
    flex-direction: column; align-items: center; justify-content: center; gap: 5px; padding: 0; }
  .a-burger span { display: block; width: 16px; height: 1.6px; border-radius: 2px; background: var(--pa-ink); transition: transform var(--pa-dur-2) var(--pa-ease); }
  .menu-open .a-burger span:first-child { transform: translateY(3.3px) rotate(45deg); }
  .menu-open .a-burger span:last-child { transform: translateY(-3.3px) rotate(-45deg); }
  .a-msheet { position: absolute; top: calc(100% + 8px); left: 0; right: 0; padding: 10px; border-radius: var(--pa-r-l);
    max-height: calc(100svh - 90px); overflow-y: auto; overscroll-behavior: contain; }
  .a-msheet[hidden] { display: none; }
  .a-msheet-links { display: grid; }
  .a-msheet-links a { display: block; padding: 13px 12px; border-radius: var(--pa-r-s); color: var(--pa-ink-2); text-decoration: none; font-size: 16px; }
  .a-msheet-links a.on { color: var(--pa-ink); background: var(--pa-tint-2); }
  .a-msheet-links a:active { background: var(--pa-tint-2); }
  .a-msheet-ctas { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; padding: 10px 2px 2px; margin-top: 6px; border-top: var(--pa-bw) solid var(--pa-line); }
  .a-msheet-ctas .pa-btn { justify-content: center; text-align: center; height: 44px; font-size: 15px; }
  @media (max-width: 860px) { .a-burger { display: flex; } .a-nav .a-links.a-links--pa { display: none; } .a-nav-ctas, .a-nav > .pa-btn { margin-left: auto; } }
  /* landing nav: Pie Of Mind / Pie Agent breadcrumb (home link), chapter links, then Docs + Release note */
  .a-nav:has(.a-crumb) { width: min(1040px, calc(100vw - 32px)); }
  .a-crumb { display: flex; align-items: center; gap: 6px; min-width: 0; }
  .a-home { display: flex; align-items: center; gap: 7px; height: 32px; padding: 0 8px 0 4px; margin-left: -4px; border-radius: var(--pa-r-s); color: var(--pa-ink-3); text-decoration: none; font-size: var(--pa-fs); white-space: nowrap; transition: background var(--pa-dur-1) var(--pa-ease), color var(--pa-dur-1); }
  .a-home:hover { background: var(--pa-tint-2); color: var(--pa-ink); }
  .a-home img { width: 22px; height: 22px; }
  /* crumb wordmark: muted at rest, the two-tone wordmark fades in on hover */
  .a-home .a-home-wm { position: relative; display: block; }
  .a-home .a-home-wm img { display: block; width: auto; height: 12px; transition: opacity var(--pa-dur-2) var(--pa-ease); }
  .a-home .a-home-wm img + img { position: absolute; inset: 0; opacity: 0; }
  .a-home:hover .a-home-wm img + img, .a-home:focus-visible .a-home-wm img + img { opacity: 1; }
  .a-home:hover .a-home-wm img:first-child { opacity: 0; }
  .a-crumb-sep { color: var(--pa-line-strong); font-size: 18px; font-weight: 300; }
  /* Pie Agent brand: the 3D Piebot snapshot inside the 012 status ring (.pa-av, 22px, ring spins via ::before) */
  .a-brand-av > img { position: absolute; inset: 2px; width: calc(100% - 4px); height: calc(100% - 4px); border-radius: 50%; object-fit: cover;
    background: radial-gradient(circle at 50% 32%, #ffffff 0%, #f4f6f9 60%, #e3e8ef 100%); } /* orb preset Trắng (main.js ORB_3D_BGS) */
  /* product name in the brand face: Inter Tight 800 is the closest font to the Codex wordmark (87% pixel overlap) */
  .a-brand-t { font-family: "Inter Tight", var(--pa-font-ui); font-weight: 800; font-size: 16.5px; letter-spacing: -.01em; color: #e6eeef; }
  .a-brand-t i { font-style: normal; color: #7c8b8e; } /* same grey as "Of" in the wordmark */
  .a-links--pa { align-items: center; }
  .a-links-ch { display: flex; gap: 2px; padding-right: 8px; margin-right: 6px; border-right: var(--pa-bw) solid var(--pa-line); }
  .a-links a { white-space: nowrap; }
  @media (max-width: 1180px) { .a-links-ch { display: none; } }

  /* chapter rail, 012 style: trace-rail dots, the current chapter runs (sonar). Each row is anchored right so the dots
     stay in one column whatever the (hidden) label width. */
  .a-rail { position: fixed; right: 22px; top: 50%; transform: translateY(-50%); z-index: 15; list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; justify-items: end; }
  .a-rail a { display: flex; align-items: center; gap: 10px; flex-direction: row-reverse; text-decoration: none; color: var(--pa-ink-3); font-size: var(--pa-fs-xs); }
  .a-rail-dot { width: 7px; height: 7px; flex: none; border-radius: 50%; background: var(--pa-ink-3); box-shadow: 0 0 0 3px var(--pa-canvas); transition: background var(--pa-dur-2) var(--pa-ease); }
  .a-rail-label { opacity: 0; transform: translateX(4px); transition: opacity var(--pa-dur-2) var(--pa-ease), transform var(--pa-dur-2) var(--pa-ease); }
  .a-rail a:hover .a-rail-label, .a-rail a.is-on .a-rail-label { opacity: 1; transform: none; }
  .a-rail a.is-on { color: var(--pa-ink); }
  .a-rail a.is-on .a-rail-dot { background: var(--pa-st-running); animation: pa-sonar 1.2s var(--pa-ease) infinite; }

  /* ── copy overlays ── */
  .a-copy { position: fixed; z-index: 10; opacity: 0; visibility: hidden; will-change: opacity, transform; }
  .a-copy h2 { font-size: clamp(34px, 4.2vw, 60px); line-height: 1.04; letter-spacing: -.03em; font-weight: 700; margin: 10px 0 18px; text-wrap: balance; color: var(--pa-ink); }
  .a-copy h2 em { font-style: normal; color: var(--pa-ink-3); }
  .a-copy p { font-size: 17px; line-height: 1.55; color: var(--pa-ink-2); max-width: 46ch; margin: 0; }
  .a-copy-text, .a-copy--left, .a-copy--right { text-shadow: 0 2px 22px color-mix(in srgb, var(--pa-canvas) 90%, transparent); }
  .a-copy-text::before, .a-copy--left::before, .a-copy--right::before { content: ""; position: absolute; inset: -12% -18%; z-index: -1; pointer-events: none;
    background: radial-gradient(closest-side, color-mix(in srgb, var(--pa-canvas) 78%, transparent), transparent); }
  .a-copy-text { position: relative; }
  .a-kicker, .a-eyebrow { font-family: var(--pa-font-mono); font-size: var(--pa-fs-xs) !important; letter-spacing: .06em; text-transform: uppercase; color: var(--pa-link) !important; }
  .a-copy--hero { inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; text-align: center; padding: 0 24px 9vh; pointer-events: none; }
  .a-copy--hero .a-ctas { pointer-events: auto; }
  .a-eyebrow { margin-bottom: 10px !important; max-width: none !important; white-space: nowrap; }
  .a-hero-title { font-size: clamp(72px, 14vw, 220px); line-height: .84; letter-spacing: -.055em; font-weight: 800; margin: 0; color: var(--pa-ink); }
  .a-hero-sub { font-size: clamp(15px, 1.3vw, 18px) !important; max-width: 74ch !important; margin: 18px auto 24px !important; } /* 3 lines on desktop: more and the eyebrow climbs onto the bot */
  .a-ctas { display: flex; gap: var(--pa-s-2); justify-content: center; flex-wrap: wrap; }
  .a-scrollcue { margin-top: 32px; display: flex; flex-direction: column; align-items: center; gap: 8px; font: var(--pa-fs-xs) var(--pa-font-mono); color: var(--pa-ink-3); }
  .a-scrollcue span { width: 1px; height: 32px; background: linear-gradient(transparent, var(--pa-st-running), transparent); background-size: 100% 200%; animation: pa-flow 1s linear infinite; }

  .a-copy--left { left: max(48px, 6vw); top: 50%; translate: 0 -50%; max-width: 560px; }
  .a-copy--right { right: max(80px, 8vw); top: 50%; translate: 0 -50%; max-width: 520px; }
  .a-copy--split { inset: 0; display: grid; grid-template-columns: 1fr 1fr; align-items: center; padding: 0 max(80px, 7vw) 0 max(48px, 6vw); gap: 4vw; pointer-events: none; }
  .a-split--right .a-copy-text { order: 2; justify-self: end; }
  .a-copy--split .a-copy-text { align-self: start; padding-top: 16vh; max-width: 520px; }
  .a-copy--split .a-hud { align-self: end; margin-bottom: 12vh; }

  /* HUD = a slice of the real chat panel: user bubble · trace rail · unframed answer */
  .a-hud { width: 100%; max-width: 540px; justify-self: end; padding: var(--pa-s-3) var(--pa-s-4) var(--pa-s-4); font-size: var(--pa-fs-md); }
  .a-split--right .a-hud { justify-self: start; }
  .a-hud-head { display: flex; align-items: center; gap: var(--pa-s-2); padding-bottom: var(--pa-s-3); margin: 0 calc(-1 * var(--pa-s-4)) var(--pa-s-3); padding-left: var(--pa-s-4); border-bottom: var(--pa-bw) solid var(--pa-line); font-size: var(--pa-fs); }
  .a-hud-head b { font-weight: 600; color: var(--pa-ink); }
  .a-model { color: var(--pa-ink-3); font-size: var(--pa-fs-sm); }
  .a-ub { margin: 0 0 var(--pa-s-4) auto; width: fit-content; max-width: 86%; padding: 8px 12px; background: var(--pa-accent-tint); border-radius: var(--pa-r-m); color: var(--pa-ink); }
  .a-think { font-size: var(--pa-fs-sm); height: 0; overflow: hidden; transition: height var(--pa-dur-2) var(--pa-ease); }
  .a-think.on { height: 22px; }
  .a-ans { font-size: var(--pa-fs-md) !important; line-height: 1.6 !important; color: var(--pa-ink) !important; max-width: none !important; margin: var(--pa-s-3) 0 0 !important;
    opacity: 0; transform: translateY(6px); transition: opacity var(--pa-dur-3) var(--pa-ease), transform var(--pa-dur-3) var(--pa-ease); }
  .a-ans.on { opacity: 1; transform: none; }

  .a-list { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 10px; }
  .a-list li { position: relative; padding-left: 26px; color: var(--pa-ink-2); font-size: 16px; line-height: 1.45; }
  .a-list li::before { content: ""; position: absolute; left: 1px; top: 7px; width: 11px; height: 6px; border-left: 2px solid var(--pa-st-done); border-bottom: 2px solid var(--pa-st-done); transform: rotate(-45deg); }
  .a-list--tight li { font-size: 15px; }
  .a-memory { margin-top: 20px; padding: var(--pa-s-1); display: grid; gap: 2px; }
  .a-memory div { padding: 10px 12px; border-radius: var(--pa-r-s); font-size: var(--pa-fs-md); display: flex; gap: 14px; align-items: baseline; color: var(--pa-ink); transition: background var(--pa-dur-1) var(--pa-ease); }
  .a-memory div:hover { background: var(--pa-tint-2); }
  .a-mem-k { font: var(--pa-fs-xs) var(--pa-font-mono); color: var(--pa-ink-3); text-transform: uppercase; letter-spacing: .06em; min-width: 64px; }
  .a-memory code { font-family: var(--pa-font-mono); color: var(--pa-link); }

  .a-copy--price { right: max(80px, 9vw); top: 50%; translate: 0 -50%; width: min(420px, calc(100vw - 32px)); }
  .a-price { border-radius: var(--pa-r-l); padding: 26px; }
  .a-price-row { display: flex; align-items: baseline; gap: 10px; margin: 10px 0 6px; }
  .a-price-num { font-size: 48px; font-weight: 700; letter-spacing: -.04em; color: var(--pa-ink); }
  .a-price-per { color: var(--pa-ink-3); font-size: var(--pa-fs); }
  .a-fine { font-size: var(--pa-fs-xs) !important; color: var(--pa-ink-3) !important; text-align: center; margin-top: 12px !important; max-width: none !important; }

  @media (max-width: 860px) {
    .a-links, .a-rail { display: none; }
    .a-links.a-links--pa { display: flex; margin-left: auto; }
    .a-links-rn, .a-home .a-home-wm { display: none; }
    .a-home { padding: 0 4px; }
    .a-nav { gap: 10px; }
    .a-copy--left, .a-copy--right, .a-copy--price { left: 16px; right: 16px; top: auto; bottom: 16px; translate: none; max-width: none; width: auto; }
    .a-copy--left, .a-copy--right { padding: 20px; border-radius: var(--pa-r-l); background: var(--pa-float-bg); border: var(--pa-bw) solid var(--pa-line); box-shadow: var(--pa-shadow-float); text-shadow: none; }
    .a-copy--left::before, .a-copy--right::before { display: none; }
    .a-copy--left, .a-copy--right, .a-copy--price { max-height: calc(100svh - 96px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; }
    .a-price-row { flex-wrap: wrap; row-gap: 2px; }
    .a-brand { padding: 8px 4px; margin: -8px 0; }
    .a-eyebrow { white-space: normal; text-wrap: balance; }
    .a-scrollcue { display: none; }
    .a-copy.has-more { -webkit-mask-image: linear-gradient(#000 calc(100% - 36px), transparent); mask-image: linear-gradient(#000 calc(100% - 36px), transparent); }
    .a-copy h2 { font-size: 28px; }
    .a-copy p { font-size: 15px; }
    .a-copy--split { grid-template-columns: minmax(0, 1fr); padding: 80px 16px 16px; align-content: space-between; }
    .a-copy--split > * { min-width: 0; }
    .a-copy--split .a-copy-text { padding-top: 0; order: 0 !important; }
    .a-copy--split .a-hud { justify-self: stretch; margin-bottom: 0; max-width: none; font-size: var(--pa-fs); }
    .pa-row2 .r { display: none; }
    .a-list li { font-size: 14px; }
  }
  /* small phones (≤380px wide): the 6-line hero intro would reach the bot's feet */
  @media (max-width: 380px) {
    .a-hero-title { font-size: 60px; }
    .a-hero-sub { font-size: 15px !important; margin: 14px auto 18px !important; }
  }
  /* phone held sideways: ~390px of height, so the hero type steps down to leave the bot some room */
  @media (max-width: 860px) and (max-height: 500px) {
    .a-hero-title { font-size: 56px; }
    .a-hero-sub { font-size: 14px !important; margin: 8px auto 12px !important; }
    .a-copy--hero { padding-bottom: 14px; }
  }
  /* ── new chapters (moat order) ── */
  .a-hero-sub span { color: var(--pa-ink); }
  .a-fx-line { display: flex; align-items: center; gap: 6px; margin-top: 10px; padding: 7px 10px; border-radius: var(--pa-r-s); background: var(--pa-tint-1); font-size: var(--pa-fs-sm); color: var(--pa-ink-2); cursor: pointer; }
  .a-fx-line b { font-weight: 500; color: var(--pa-ink); }
  .a-fx-line i { margin-left: auto; font-style: normal; color: var(--pa-ink-3); }
  .add { font-style: normal; color: var(--pa-st-done); font-family: var(--pa-font-mono); font-size: var(--pa-fs-xs); }
  .del { font-style: normal; color: var(--pa-st-error); font-family: var(--pa-font-mono); font-size: var(--pa-fs-xs); }
  .a-fx { margin-top: 10px; border: var(--pa-bw) solid var(--pa-line); border-radius: var(--pa-r-m); background: var(--pa-float-bg); box-shadow: var(--pa-shadow-float); overflow: hidden;
    opacity: 0; transform: translateY(8px) scale(.985); max-height: 0; transition: opacity var(--pa-dur-2) var(--pa-ease), transform var(--pa-dur-2) var(--pa-ease), max-height var(--pa-dur-3) var(--pa-ease); }
  .a-fx.on { opacity: 1; transform: none; max-height: 320px; }
  .a-fx-h { display: flex; align-items: baseline; gap: 8px; padding: 10px 12px 6px; font-size: var(--pa-fs); }
  .a-fx-h b { font-weight: 600; } .a-fx-h span { color: var(--pa-ink-3); font-size: var(--pa-fs-xs); }
  .a-fx-r { display: flex; align-items: center; gap: 8px; padding: 7px 12px; border-top: var(--pa-bw) solid var(--pa-line); font-size: var(--pa-fs-sm); transition: opacity var(--pa-dur-3); }
  .a-fx-r .ic { width: 16px; color: var(--pa-ink-3); text-align: center; }
  .a-fx-r .p { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--pa-ink); }
  .a-fx-r small { display: block; font: var(--pa-fs-xs) var(--pa-font-mono); color: var(--pa-ink-3); }
  .a-fx-r .u { font-size: var(--pa-fs-xs); color: var(--pa-ink-2); padding: 3px 8px; border-radius: var(--pa-r-xs); background: var(--pa-tint-2); }
  .a-fx-f { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-top: var(--pa-bw) solid var(--pa-line); font-size: var(--pa-fs-xs); color: var(--pa-ink-3); }
  .a-fx-f b { margin-left: auto; font-weight: 500; }
  .a-fx-done { display: none; padding: 14px 12px; font-size: var(--pa-fs); color: var(--pa-st-done); border-top: var(--pa-bw) solid var(--pa-line); }
  .a-fx.undone .a-fx-r { opacity: .35; text-decoration: line-through; }
  .a-fx.undone .a-fx-f b { background: var(--pa-accent); color: var(--pa-on-accent); }
  .a-fx.undone .a-fx-done { display: block; }

  .a-phone { justify-self: start; width: 330px; height: min(640px, 78vh); border-radius: 44px; padding: 12px; background: #0b0e0f; border: 1px solid var(--pa-line-strong);
    box-shadow: 0 40px 80px -30px rgba(0,0,0,.75); display: flex; flex-direction: column; overflow: hidden; align-self: center; }
  .a-split--right .a-phone { justify-self: start; }
  .a-phone-bar { display: flex; justify-content: space-between; padding: 6px 18px 8px; font-size: 12px; color: var(--pa-ink); }
  .a-phone-bar span { letter-spacing: 1px; font-size: 10px; color: var(--pa-ink-2); }
  .a-phone-note { padding: 6px 14px 10px; border-bottom: var(--pa-bw) solid var(--pa-line); }
  .a-phone-note small { display: block; font-size: var(--pa-fs-xs); color: var(--pa-ink-3); } .a-phone-note b { font-size: var(--pa-fs-md); }
  .a-hud--phone { flex: 1; display: flex; flex-direction: column; max-width: none; border-radius: 0 0 32px 32px; background: var(--pa-canvas); padding: 10px 12px 12px; justify-self: stretch; margin: 0 !important; }
  .a-hud--phone .a-hud-head { margin-left: -12px; margin-right: -12px; padding-left: 12px; }
  .a-hud--phone .pa-row2 .r { display: none; }
  .a-phone-comp { margin-top: auto; display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border-radius: var(--pa-r-m); border: var(--pa-bw) solid var(--pa-line); background: var(--pa-tint-1); color: var(--pa-ink-3); font-size: var(--pa-fs); }
  .a-phone-comp b { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: var(--pa-accent); color: #fff; font-size: 14px; }
  .a-phone-comp b svg { width: 16px; height: 16px; }

  .a-modes { display: inline-flex; gap: 2px; padding: 3px; border-radius: var(--pa-r-s); background: var(--pa-tint-2); margin: 4px 0 6px; }
  .a-modes span { padding: 6px 12px; border-radius: var(--pa-r-xs); font-size: var(--pa-fs); color: var(--pa-ink-2); }
  .a-modes span.on { background: var(--pa-canvas); color: var(--pa-ink); box-shadow: 0 1px 2px rgba(0,0,0,.5); }

  .a-copy--skills .a-copy-text { padding-top: 12vh; max-width: 600px; }
  .a-copy--skills h2 { font-size: clamp(28px, 2.9vw, 42px); max-width: 17ch; }
  .a-core { display: flex; gap: 6px; margin: 2px 0 12px; }
  .a-core span { font: 600 var(--pa-fs) var(--pa-font-mono); padding: 5px 10px; border-radius: var(--pa-r-s); background: var(--pa-accent-tint); color: var(--pa-link); }
  .a-feat { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .a-feat div { padding: 12px 14px; border-radius: var(--pa-r-m); border: var(--pa-bw) solid var(--pa-line); background: color-mix(in srgb, var(--pa-canvas) 85%, transparent); }
  .a-feat b { display: block; font-size: var(--pa-fs-md); font-weight: 600; color: var(--pa-ink); margin-bottom: 3px; }
  .a-feat span { display: block; font-size: var(--pa-fs-sm); color: var(--pa-ink-2); line-height: 1.45; }
  .a-feat code { display: block; margin-top: 6px; font: var(--pa-fs-xs) var(--pa-font-mono); color: var(--pa-link); }
  .a-always { font-size: var(--pa-fs) !important; margin-top: 14px !important; } .a-always b { color: var(--pa-ink); font-weight: 600; }
  .a-pal { align-self: end; justify-self: end; width: min(440px, 100%); margin-bottom: 12vh; padding: var(--pa-s-1); }
  .a-pal-in { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: var(--pa-bw) solid var(--pa-line); font-size: var(--pa-fs-md); color: var(--pa-ink-3); }
  .a-pal-in b { font-family: var(--pa-font-mono); color: var(--pa-link); } .a-pal-in em { margin-left: auto; font-style: normal; font-size: var(--pa-fs-xs); color: var(--pa-ink-3); }
  .a-pal-list { height: 300px; overflow: hidden; -webkit-mask: linear-gradient(transparent, #000 12%, #000 88%, transparent); mask: linear-gradient(transparent, #000 12%, #000 88%, transparent); }
  .a-pal-roll { animation: a-roll 46s linear infinite; }
  @keyframes a-roll { to { transform: translateY(-50%); } }
  .a-pal-row { display: flex; align-items: baseline; gap: 10px; padding: 7px 10px; border-radius: var(--pa-r-s); font-size: var(--pa-fs-sm); }
  .a-pal-row code { font: var(--pa-fs-sm) var(--pa-font-mono); color: var(--pa-link); white-space: nowrap; }
  .a-pal-row span { color: var(--pa-ink-3); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .a-pal-row em { margin-left: auto; font-style: normal; font-size: 10px; padding: 1px 6px; border-radius: var(--pa-r-xs); background: color-mix(in oklch, var(--pa-st-attention) 16%, transparent); color: var(--pa-st-attention); }
  .a-pal-ft { padding: 9px 12px; border-top: var(--pa-bw) solid var(--pa-line); font-size: var(--pa-fs-xs); color: var(--pa-ink-3); }
  .a-ask { margin-top: 18px; padding: var(--pa-s-1); display: grid; gap: 2px; max-width: 480px; }
  .a-ask div { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--pa-r-s); }
  .a-ask div + div { border-top: var(--pa-bw) solid var(--pa-line); }
  .a-ask .q { flex: 1; font-size: var(--pa-fs-md); color: var(--pa-ink); }
  .a-ask em { font: var(--pa-fs-xs) var(--pa-font-mono); font-style: normal; color: var(--pa-link); white-space: nowrap; }
  @media (max-width: 860px) {
    .a-phone { width: auto; height: auto; border-radius: var(--pa-r-l); padding: 0; justify-self: stretch !important; }
    .a-phone-bar, .a-phone-note { display: none; }
    .a-hud--phone { border-radius: var(--pa-r-l); }
    .a-copy--skills .a-copy-text { padding-top: 0; } .a-feat { grid-template-columns: 1fr 1fr; gap: 4px; } .a-feat span, .a-feat code, .a-always { display: none; } .a-feat div { padding: 8px 10px; }
    .a-pal { margin-bottom: 0; justify-self: stretch; width: auto; } .a-pal-list { height: 150px; } .a-pal-ft { display: none; }
    .a-ask { display: none; }
    .a-modes span { padding: 5px 8px; font-size: var(--pa-fs-xs); }
    /* phone: keep the undo story to bubble → answer → sheet, and give split headlines a solid plate */
    .a-hud[data-hud="undo"] .pa-rail, .a-hud[data-hud="undo"] .a-fx-r small, .a-fx-f span { display: none; }
    .a-copy--split .a-copy-text { padding: 16px; border-radius: var(--pa-r-l); background: var(--pa-float-bg); border: var(--pa-bw) solid var(--pa-line); text-shadow: none; }
    .a-copy--split .a-copy-text::before { display: none; }
    .a-copy--split .a-copy-text p:not(.a-kicker) { display: none; }
  }
