/* hello: the few rules intel's stylesheet doesn't already carry. Tokens only. */

.hello-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 24px 0 0; animation: hero-rise .9s cubic-bezier(.16, 1, .3, 1) .32s both; }
.hello-actions .btn { display: inline-flex; align-items: center; gap: 8px; }
.hello-cta { position: relative; overflow: hidden; }
:root[data-theme="ip-light"] .hello-cta, :root[data-theme="ip-dark"] .hello-cta { background: #d12c1e; border-color: #d12c1e; color: #fff; }
.hello-cta svg { transition: transform var(--ease-out); }
.hello-cta:hover svg { transform: translateY(2px); }
/* A sheen crosses the primary button now and then. */
.hello-cta::after {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .28) 50%, transparent 65%);
    transform: translateX(-120%);
}

/* --- hero ------------------------------------------------------------------ */

.hello-hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); padding-bottom: 0; isolation: isolate; }
.hello-hero::before {
    /* A low fog behind the scene in the ground's own steel; ember stays out of atmosphere (innerpulse-brand,
       atmosphere.md: no glow anywhere). */
    content: ""; position: absolute; z-index: -1; pointer-events: none;
    inset: -12% -18% -10% 30%;
    background:
        radial-gradient(42% 46% at 62% 48%, color-mix(in srgb, var(--ink) 6%, transparent), transparent 70%),
        radial-gradient(30% 34% at 86% 22%, color-mix(in srgb, var(--ink) 4%, transparent), transparent 70%);
    filter: blur(8px);
}
.hello-title { max-width: none; animation: none; font-size: clamp(2.6rem, 5.2vw, 4.5rem); line-height: 1; letter-spacing: -.035em; }
.hello-title em { font-style: italic; font-weight: 400; color: var(--ip-mark); letter-spacing: -.02em; }
.hero-eyebrow { letter-spacing: .22em; }
.hero-eyebrow-sep { color: var(--rule-2); margin: 0 .3em; }
.ht-line { display: block; }
.hello-title .ht-alt { color: var(--text-mute); font-weight: 400; font-style: italic; }
.hello-title .ht-word { display: inline-block; color: inherit; font-style: inherit; font-weight: inherit; }
.hello-title .ht-line { display: block; }
.hello-title .ht-line { color: var(--ink); font-style: normal; font-weight: 700; }
.hello-title em.ht-word { font-style: italic; font-weight: 400; color: var(--ip-mark); }
.hello-stats { grid-template-columns: repeat(3, auto); justify-content: start; gap: 0; max-width: none; margin-top: 30px; animation: hero-rise .9s cubic-bezier(.16, 1, .3, 1) .4s both; }
.hello-stats div { flex-direction: column-reverse; justify-content: flex-end; gap: 8px; padding: 0 28px; }
.hello-stats div:first-child { padding-left: 0; }
.hello-stats dd { margin: 0; font-size: clamp(2rem, 3.2vw, 2.75rem); font-weight: 600; letter-spacing: -.05em; }
.hello-stats dt { letter-spacing: .2em; font-size: var(--fs-micro); }
.hello-stats dd.is-date { font-size: clamp(2rem, 3.2vw, 2.75rem); }

/* Section heads, after hunt: a tracked label over a large serif line with one italic ember word. */
.section-head { margin: 0 0 22px; }
.section-k { margin: 0 0 10px; font-family: var(--meta); font-size: var(--fs-micro); font-weight: var(--fw-semibold); letter-spacing: .26em; text-transform: uppercase; color: var(--ip-mark); }
.section-head h2 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(2rem, 3.6vw, 3rem); line-height: 1.04; letter-spacing: -.025em; color: var(--ink); }
.section-head h2 em { font-style: italic; color: var(--ip-mark); }

.hello-scene { margin: 0 -2vw 0 0; min-width: 0; }
.hero-scene { display: block; width: 100%; height: auto; overflow: visible; --mx: 0; --my: 0; }

/* Paint, per theme. The mark is the flat ember (one solid, no gradient); the bloom behind it stays. */
.hero-scene .hs-grid-dot { fill: var(--text-mute); opacity: .32; }
.hero-scene .hs-shadow { flood-color: #000; flood-opacity: .16; }
:root[data-theme="ip-dark"] .hero-scene .hs-shadow, :root[data-theme="ember"] .hero-scene .hs-shadow { flood-opacity: .5; }
.hs-orbit { fill: none; stroke: var(--rule-2); stroke-width: 1; stroke-dasharray: .004 .012; }
.hs-orbit-2 { stroke-dasharray: .002 .02; opacity: .8; }
.hs-conduit { fill: none; stroke: var(--rule-2); stroke-width: 1.2; stroke-dasharray: .012 .02; }
.hs-spark { fill: none; stroke: var(--ip-mark); stroke-width: 2.4; stroke-linecap: round; stroke-dasharray: .1 .9; stroke-dashoffset: 1; opacity: 0; }
.hs-mark { fill: var(--ip-mark); }
.hs-lamps rect { fill: var(--innerpulse-hot, #ffd9c2); opacity: 0; }
.hs-card { fill: var(--surface); stroke: var(--rule-2); stroke-width: 1; }
.hs-ln { fill: none; stroke: var(--text-mute); stroke-width: 3; stroke-linecap: round; opacity: .75; }
.hs-strong { stroke: var(--text-dim); stroke-width: 4; opacity: 1; }
.hs-ember { stroke: var(--ip-mark); opacity: 1; }
.hs-edge { stroke-width: 1.6; }
.hs-dot { fill: var(--rule-2); }
.hs-fill { stroke: none; }
.hs-ember-fill { fill: color-mix(in srgb, var(--ip-mark) 14%, var(--surface)); }
.hs-ember-solid { fill: var(--ip-mark); }
.hs-node { fill: var(--surface-2); stroke: var(--rule-2); stroke-width: 1.2; }
.hs-node-ember { fill: color-mix(in srgb, var(--ip-mark) 16%, var(--surface)); stroke: var(--ip-mark); }
.hs-caret { fill: var(--ip-mark); }
.hs-label { font-family: var(--meta); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; fill: var(--text-mute); }

/* Parallax: each layer drifts with the pointer by its depth. */
.hs-layer { transition: transform .2s linear; }
.hs-far { transform: translate(calc(var(--mx) * -6px), calc(var(--my) * -5px)); }
.hs-mid { transform: translate(calc(var(--mx) * 4px), calc(var(--my) * 3px)); }
.hs-near { transform: translate(calc(var(--mx) * 12px), calc(var(--my) * 9px)); }
.hs-core { transform: translate(calc(var(--mx) * 7px), calc(var(--my) * 6px)); }

@media (prefers-reduced-motion: no-preference) {
    .ht-word { animation: word-in .9s cubic-bezier(.16, 1, .3, 1) both; }
    .ht-line:first-child .ht-word:nth-child(1) { animation-delay: .05s; }
    .ht-line:first-child .ht-word:nth-child(2) { animation-delay: .1s; }
    .ht-line:first-child .ht-word:nth-child(3) { animation-delay: .15s; }
    .ht-alt .ht-word:nth-child(1) { animation-delay: .26s; }
    .ht-alt .ht-word:nth-child(2) { animation-delay: .31s; }
    .ht-alt .ht-word:nth-child(3) { animation-delay: .36s; }
    @keyframes word-in { from { opacity: 0; transform: translateY(.35em); filter: blur(6px); } }

    .hello-cta::after { animation: cta-sheen 6s ease-in-out 2.2s infinite; }
    @keyframes cta-sheen { 0% { transform: translateX(-120%); } 18%, 100% { transform: translateX(120%); } }

    .hero-scene .hs-orbit { animation: orbit-drift 60s linear infinite; }
    .hero-scene .hs-orbit-2 { animation-duration: 40s; animation-direction: reverse; }
    @keyframes orbit-drift { to { stroke-dashoffset: -1; } }
    .hs-conduit { animation: conduit-in 1s ease-out both, conduit-flow 2.6s linear infinite; }
    @keyframes conduit-in { from { opacity: 0; } }
    @keyframes conduit-flow { to { stroke-dashoffset: -.064; } }
    .hs-spark { animation: spark 3.5s cubic-bezier(.45, 0, .25, 1) infinite; }
    @keyframes spark { 0% { stroke-dashoffset: 1.1; opacity: 0; } 8% { opacity: 1; } 55% { stroke-dashoffset: 0; opacity: 1; } 62%, 100% { stroke-dashoffset: -.1; opacity: 0; } }
    .hs-plate { animation: plate-in 1s cubic-bezier(.16, 1, .3, 1) both; transform-box: fill-box; transform-origin: center; }
    @keyframes plate-in { from { opacity: 0; transform: translateY(14px) scale(.94); } }
    .hs-bob { animation: bob 7s ease-in-out infinite; }
    @keyframes bob { 50% { transform: translateY(-7px); } }
    .hs-body .hs-ln { stroke-dasharray: 1; animation: draw 1.1s cubic-bezier(.6, 0, .2, 1) var(--d, 1s) both; }
    .hs-body .hs-fill, .hs-body .hs-node, .hs-body .hs-dot { animation: fade-in .6s ease var(--d, 1s) both; }
    @keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
    @keyframes fade-in { from { opacity: 0; } }
    .hs-caret { animation: caret 1.1s steps(1) infinite; }
    @keyframes caret { 50% { opacity: 0; } }
    .hs-core { animation: core-in 1.1s cubic-bezier(.16, 1, .3, 1) .15s both; }
    @keyframes core-in { from { opacity: 0; } }
}

/* --- how it's made ------------------------------------------------------- */

.hello-steps { margin: clamp(48px, 7vw, 96px) 0 0; }
.hello-steps-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--rule); border-radius: var(--radius); background: color-mix(in srgb, var(--surface) 55%, transparent); overflow: hidden; }
.hello-step { padding: 24px 26px 26px; }
.hello-step + .hello-step { border-left: 1px solid var(--rule); }
.step-art { display: block; width: 120px; height: 72px; margin: 0 0 14px -4px; overflow: visible; }
.sa-card { fill: var(--surface); stroke: var(--rule-2); stroke-width: 1.2; }
.sa-card-ember { fill: color-mix(in srgb, var(--ip-mark) 14%, var(--surface)); stroke: var(--ip-mark); }
.sa-slot { fill: none; stroke: var(--rule-2); stroke-width: 1.2; stroke-dasharray: 3 3; }
.sa-line { fill: none; stroke: var(--rule-2); stroke-width: 1.2; }
.sa-typing { fill: var(--text-mute); }
.sa-draw { fill: none; stroke: var(--text-dim); stroke-width: 3; stroke-linecap: round; }
.sa-ember { stroke: var(--ip-mark); }
.sa-caret { fill: var(--ip-mark); }
.sa-check { fill: none; stroke: var(--ip-mark); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.hello-surface-k {
    margin: 0 0 8px; font-family: var(--meta); font-size: var(--fs-label); letter-spacing: var(--track-micro);
    text-transform: uppercase; color: var(--text-mute);
}
.hello-surface-k span { color: var(--ip-mark); font-variant-numeric: tabular-nums; margin-right: 6px; }
.hello-step h3 { margin: 0 0 6px; font-family: var(--serif); font-size: var(--fs-3xl); font-weight: 700; letter-spacing: var(--track-tight); color: var(--ink); }
.hello-step p:last-child { margin: 0; color: var(--text-dim); line-height: var(--leading-ui); max-width: 42ch; }

@media (prefers-reduced-motion: no-preference) {
    .sa-typing { animation: typing 1.4s ease-in-out infinite; }
    @keyframes typing { 0%, 60%, 100% { transform: translateY(0); opacity: .45; } 30% { transform: translateY(-3px); opacity: 1; } }
    .sa-draw { stroke-dasharray: 1; animation: sa-draw 4s cubic-bezier(.6, 0, .2, 1) infinite; }
    @keyframes sa-draw { 0% { stroke-dashoffset: 1; } 35%, 85% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 0; opacity: 0; } }
    .sa-caret { animation: caret 1.1s steps(1) infinite; }
    .sa-lift { animation: lift 4.4s cubic-bezier(.6, 0, .2, 1) infinite; }
    @keyframes lift { 0%, 12% { transform: translateY(0); } 45%, 80% { transform: translateY(34px); } 100% { transform: translateY(0); opacity: 0; } }
    .sa-check { stroke-dasharray: 20; animation: check 4.4s ease infinite; }
    @keyframes check { 0%, 45% { stroke-dashoffset: 20; } 60%, 100% { stroke-dashoffset: 0; } }
}

/* --- gallery ----------------------------------------------------------- */

.gallery { margin: clamp(56px, 8vw, 104px) 0 96px; }
.gallery-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.gallery-head .section-head { margin: 0; }
.gallery-filter { display: flex; flex-wrap: wrap; gap: 6px; }
.gallery-filter a {
    display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border: 1px solid var(--rule); border-radius: 999px;
    font-family: var(--meta); font-size: var(--fs-sm); color: var(--text-dim); text-decoration: none;
}
.gallery-filter a:hover { color: var(--ink); border-color: var(--rule-2); }
.gallery-filter a[aria-current="page"] { color: var(--ink); border-color: var(--ink); }
.gallery-filter span { color: var(--text-mute); font-variant-numeric: tabular-nums; }
.gallery-empty { margin: 0; color: var(--text-mute); }
.gallery-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px; }

.card {
    display: flex; flex-direction: column; height: 100%; overflow: hidden; text-decoration: none; color: inherit;
    border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm);
    transition: border-color var(--ease), box-shadow var(--ease-out), transform var(--ease-out);
}
.card:hover { text-decoration: none; border-color: var(--rule-2); box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.card:focus-visible { outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--ip-mark) 35%, transparent); }
.card-thumb { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface-2); border-bottom: 1px solid var(--rule); }
.card-thumb-img { position: absolute; inset: 10%; width: 80%; height: 80%; object-fit: contain; }
/* A live, scaled-down render: a 1280×800 page shown at a quarter size. No pointer events reach it. */
.card-thumb-frame { position: absolute; inset: 0; pointer-events: none; }
.card-thumb-frame iframe { width: 400%; height: 400%; border: 0; transform: scale(.25); transform-origin: 0 0; background: #fff; }
.card-thumb-text {
    margin: 0; position: absolute; inset: 0; padding: 16px 18px; overflow: hidden; white-space: pre-wrap;
    font-family: var(--serif); font-size: var(--fs-sm); line-height: 1.55; color: var(--text-dim);
    -webkit-mask-image: linear-gradient(#000 60%, transparent); mask-image: linear-gradient(#000 60%, transparent);
}
.card-thumb-text.is-code { font-family: var(--mono); font-size: var(--fs-label); line-height: 1.6; }
.card-body { padding: 14px 16px 16px; display: grid; gap: 6px; }
.card-meta { margin: 0; display: flex; justify-content: space-between; gap: 10px; font-family: var(--meta); font-size: var(--fs-label); color: var(--text-mute); }
.card-kind { letter-spacing: var(--track-micro); text-transform: uppercase; color: var(--ip-mark); }
.card h3 { margin: 0; font-family: var(--serif); font-size: var(--fs-2xl); line-height: var(--leading-heading); color: var(--ink); }
.card-made { margin: 0; font-family: var(--meta); font-size: var(--fs-label); color: var(--text-mute); }
.card-dek { margin: 0; font-size: var(--fs-sm); color: var(--text-dim); line-height: 1.5; }

/* Cards catch the light (components/gallery-spotlight.tsx) and arrive in a quick stagger. */
.gallery-grid { perspective: 1400px; }
.card { position: relative; transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transform-style: preserve-3d; }
.card:hover { transform: translateY(-3px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); }
.card::after {
    content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; border-radius: inherit; opacity: 0;
    background: radial-gradient(420px circle at var(--sx, 50%) var(--sy, 0%), color-mix(in srgb, var(--ink) 7%, transparent), transparent 55%);
    transition: opacity .3s ease;
}
.card.is-lit::after { opacity: 1; }
.card.is-lit { border-color: color-mix(in srgb, var(--ip-mark) 40%, var(--rule-2)); }
.card-thumb::after {
    content: "Open"; position: absolute; right: 10px; bottom: 10px; z-index: 1;
    padding: 4px 10px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 82%, transparent); color: var(--paper);
    font-family: var(--meta); font-size: var(--fs-label); font-weight: var(--fw-medium);
    opacity: 0; transform: translateY(4px); transition: opacity var(--ease-out), transform var(--ease-out);
}
.card:hover .card-thumb::after, .card:focus-visible .card-thumb::after { opacity: 1; transform: none; }
.card-thumb-img, .card-thumb-frame { transition: transform .6s cubic-bezier(.16, 1, .3, 1); }
.card:hover .card-thumb-img { transform: scale(1.04); }
.card:hover .card-thumb-frame { transform: scale(1.03); }
@media (prefers-reduced-motion: no-preference) {
    .gallery-grid > li { animation: card-in .7s cubic-bezier(.16, 1, .3, 1) calc(var(--i, 0) * 60ms + .1s) both; }
    @keyframes card-in { from { opacity: 0; transform: translateY(16px); } }
}
@media (prefers-reduced-motion: reduce) {
    .card, .card:hover { transform: none; }
}

/* --- a published artifact ---------------------------------------------- */

.pub { padding: clamp(24px, 4vw, 44px) 0 80px; }
.pub-head { max-width: var(--column); margin-bottom: 26px; }
.pub-head .eyebrow a { color: inherit; text-decoration: none; }
.pub-head h1 { margin: 0 0 10px; font-family: var(--serif); font-size: clamp(2rem, 3.6vw, 3rem); line-height: var(--leading-title); letter-spacing: var(--track-tighter); color: var(--ink); text-wrap: balance; }
.pub-dek { margin: 0 0 14px; font-family: var(--serif); font-size: var(--fs-2xl); line-height: 1.5; color: var(--text-dim); }
.pub-head .article-meta a { color: var(--text-dim); }
.pub-stage { border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; background: var(--surface-2); box-shadow: var(--shadow); }
.pub-frame { display: block; width: 100%; height: min(78vh, 860px); border: 0; background: #fff; }
.pub-svg .pub-frame { background: transparent; }
.pub-doc, .pub-code { max-width: var(--column); }
.pub-source { margin-top: 22px; }
.pub-source summary { cursor: pointer; font-family: var(--meta); font-size: var(--fs-sm); color: var(--text-dim); }
.pub-source .article-body { margin-top: 12px; }
.pub-transcript { max-width: 760px; margin-top: 56px; padding-top: 18px; border-top: 1px solid var(--rule); display: flex; flex-direction: column; gap: 18px; }
.pub-transcript h2 { margin: 0; font-family: var(--serif); font-size: var(--fs-3xl); color: var(--ink); }
.pub-foot { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 48px; padding-top: 16px; border-top: 1px solid var(--rule); font-family: var(--meta); font-size: var(--fs-sm); color: var(--text-mute); }
.pub-foot a { color: var(--text-dim); }

.hello-signin, .page-head form { margin-bottom: 96px; }
.page-head form { margin-top: 22px; }
.hello-error { margin-top: 14px !important; color: var(--danger) !important; }
.hello-note { margin-top: 14px !important; color: var(--text-mute) !important; }

@media (max-width: 900px) {
    .hello-hero { grid-template-columns: minmax(0, 1fr); }
    .hello-hero::before { inset: 30% -20% 0 -20%; }
    .hello-scene { margin: 0 auto; width: min(100%, 520px); order: -1; }
    .hello-steps-grid { grid-template-columns: minmax(0, 1fr); }
    .hello-step + .hello-step { border-left: 0; border-top: 1px solid var(--rule); }
}
@media (max-width: 640px) {
    .wrap { padding: 0 16px; }
}
@media (prefers-reduced-motion: reduce) {
    .hello-actions, .hello-stats { animation: none !important; }
}

/* The live mark and working line take the theme's mark color: the deep ember on the light grounds, the bright
   one on ink (brand rule). A lit bar is the lamp color (--innerpulse-hot, #ffd9c2) on ink; on paper, where the lamp
   would vanish into the ground, a bare bar lights to the bright ember instead (the kit's working-hot). The plate's
   lamps sit inside the ember tile, so they keep #ffd9c2 on both. */
:root { --innerpulse-mark: var(--ip-mark); --innerpulse-hot: #ffd9c2; --ip-hot: #ffd9c2; --innerpulse-working-hot: #ffd9c2; }
:root[data-theme="ip-light"], :root[data-theme="paper"] {
    --ip-hot: #f43a2a; --innerpulse-working-hot: #f43a2a;
    --innerpulse-working-fg: #b8241a; --innerpulse-working-shine: #f08a6a;
    --innerpulse-working-ok: var(--ok); --innerpulse-working-err: var(--danger); --innerpulse-working-warn: var(--amber);
}

/* --- public navigation --------------------------------------------------- */

.nav-links .nav-out { display: inline-flex; align-items: center; gap: 4px; }
.nav-links .nav-out svg { opacity: .6; transition: transform var(--ease-out), opacity var(--ease); }
.nav-links .nav-out:hover svg { opacity: 1; transform: translate(1px, -1px); }
.nav-studio {
    display: inline-flex; align-items: center; gap: 8px; padding: 6px 13px; border-radius: 999px;
    border: 1px solid var(--rule); color: var(--text-dim); font-size: var(--fs-sm); font-weight: var(--fw-medium); white-space: nowrap;
}
.nav-studio:hover { color: var(--ink); background: var(--surface-2); text-decoration: none; }
.nav-studio-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ip-mark); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ip-mark) 18%, transparent); }
.footer-studio { color: var(--text-mute) !important; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
#gallery, #how { scroll-margin-top: 80px; }
/* The film grain and the hero's fog reach past the page edge; neither may make a phone scroll sideways. */
html { overflow-x: hidden; }

/* ==========================================================================
   Landing, gallery first (Pat's mockup, 2026-10-08): a big headline with the
   dek beside it, the filter, then a featured plate with two stacked beside it
   and the rest in a grid. Plates are live renders.
   ========================================================================== */

.masthead .nav-links { margin-left: auto; flex: 0 1 auto; }
.masthead .nav-tools { margin-left: 4px; }
.masthead .nav-links a { position: relative; }
.masthead .nav-links a::after {
    content: ""; position: absolute; left: 12px; right: 12px; bottom: 1px; height: 2px; border-radius: 2px;
    background: var(--ip-mark); transform: scaleX(0); transform-origin: left; transition: transform var(--ease-out);
}
.masthead .nav-links a:hover::after, .masthead .nav-links a:focus-visible::after { transform: scaleX(1); }
.masthead .nav-links a:hover { background: transparent; }

.lp-head { padding: clamp(28px, 4.5vw, 56px) 0 0; position: relative; isolation: isolate; }
.lp-head::before {
    content: ""; position: absolute; z-index: -1; pointer-events: none; inset: -40% -20% -10% 40%;
    background: radial-gradient(40% 50% at 70% 40%, color-mix(in srgb, var(--ink) 5%, transparent), transparent 70%);
}
.lp-eyebrow {
    display: flex; align-items: center; gap: 10px; margin: 0 0 16px;
    font-family: var(--meta); font-size: var(--fs-label); font-weight: var(--fw-semibold); letter-spacing: .2em; text-transform: uppercase; color: var(--text-dim);
}
.lp-head-row { display: grid; grid-template-columns: auto minmax(220px, 1fr); align-items: end; gap: 18px clamp(24px, 4vw, 56px); }
.lp-title {
    margin: 0; font-family: var(--sans); font-weight: 700; color: var(--ink);
    font-size: clamp(2.4rem, 5.2vw, 4.3rem); line-height: 1; letter-spacing: -.048em;
}
.lp-title .ht-line { display: block; }
.lp-title em { font-style: normal; color: var(--ip-mark); }
.lp-dek { margin: 0 0 .45em; max-width: 34ch; font-size: var(--fs-lg); line-height: 1.5; color: var(--text-dim); }

.lp-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: clamp(22px, 3vw, 32px) 0 0; }
.lp-filter a, .lp-filter-k {
    display: inline-flex; align-items: center; gap: 7px; padding: 6px 14px; border: 1px solid var(--rule); border-radius: 999px;
    font-size: var(--fs-sm); color: var(--text-dim); text-decoration: none; transition: color var(--ease), border-color var(--ease), background var(--ease);
}
.lp-filter-k { border-color: var(--rule-2); color: var(--ink); font-weight: var(--fw-medium); }
.lp-filter-sep { width: 1px; height: 20px; background: var(--rule-2); margin: 0 6px; }
.lp-filter a { border-color: transparent; }
.lp-filter a:hover { color: var(--ink); background: var(--surface-2); text-decoration: none; }
.lp-filter a span { color: var(--text-mute); font-variant-numeric: tabular-nums; }
.lp-filter a[aria-current="page"] { color: var(--ink); border-color: var(--ip-mark); background: color-mix(in srgb, var(--ip-mark) 8%, transparent); }
.lp-filter a[aria-current="page"] span { color: var(--ip-mark); }

.lp-gallery { margin: 22px 0 0; scroll-margin-top: 80px; }
.lp-lead, .lp-grid { list-style: none; margin: 0; padding: 0; perspective: 1600px; }
.lp-lead { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); }
.lp-lead.n2 { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
.lp-lead.n3 { grid-template-columns: minmax(0, 1.72fr) minmax(0, 1fr); grid-template-rows: auto auto; }
.lp-lead.n3 .is-feature { grid-row: span 2; }
.lp-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); margin-top: 18px; }

.plate .card { border-radius: var(--radius); }
.plate .card-thumb { aspect-ratio: 16 / 10; flex: 1 1 auto; }
.plate .card-thumb::after { display: none; }
.lp-lead .is-feature .card-thumb { aspect-ratio: 16 / 9.4; }
.lp-lead.n3 .plate:not(.is-feature) .card-thumb { aspect-ratio: auto; min-height: 170px; }
.lp-lead.n1 .is-feature .card-thumb { aspect-ratio: 16 / 7.5; }
.plate .card-thumb-img { inset: 12%; width: 76%; height: 76%; }

.plate-meta { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px 20px; padding: 14px 18px 16px; flex-wrap: wrap; }
.plate-text { min-width: 0; flex: 1 1 150px; display: grid; gap: 4px; }
.plate-date { font-family: var(--meta); font-size: var(--fs-micro); font-weight: var(--fw-semibold); letter-spacing: .14em; text-transform: uppercase; color: var(--text-mute); }
.plate h3 { margin: 2px 0 0; font-family: var(--sans); font-size: var(--fs-xl); font-weight: 650; letter-spacing: -.02em; line-height: 1.2; color: var(--ink); }
.plate-dek { margin: 0; font-size: var(--fs-sm); color: var(--text-dim); line-height: 1.45; }
.plate-side { display: grid; justify-items: end; gap: 10px; flex: 0 0 auto; margin-left: auto; }
.plate-made { margin: 0; display: flex; align-items: center; font-family: var(--meta); font-size: var(--fs-label); color: var(--text-mute); white-space: nowrap; }
.plate-made span + span { margin-left: 10px; padding-left: 10px; border-left: 1px solid var(--rule-2); }
.plate-open { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--ip-mark); }
.plate-open svg { transition: transform var(--ease-out); }
.card:hover .plate-open svg { transform: translate(2px, -2px); }

.is-feature .plate-meta { padding: 18px 24px 20px; }
.is-feature h3 { font-size: clamp(1.35rem, 2vw, 1.75rem); letter-spacing: -.03em; }
.is-feature .plate-dek { font-size: var(--fs-md); }
.is-feature .plate-open { padding: 9px 18px; border-radius: 999px; background: var(--ip-mark); color: #fff; box-shadow: 0 10px 24px -14px var(--ip-mark); }
.is-feature .card:hover .plate-open { background: color-mix(in srgb, var(--ip-mark) 88%, #000); }

.lp-empty { display: grid; justify-items: center; gap: 8px; padding: 12px 0 24px; color: var(--text-mute); text-align: center; }
.lp-empty .hello-scene { width: min(100%, 560px); margin: 0; }

.lp-gallery + .hello-steps { margin-top: clamp(64px, 9vw, 120px); }

@media (prefers-reduced-motion: no-preference) {
    .lp-title .ht-line, .lp-dek, .lp-filter { animation: hero-rise .9s cubic-bezier(.16, 1, .3, 1) both; }
    .lp-title .ht-line + .ht-line { animation-delay: .07s; }
    .lp-dek { animation-delay: .14s; }
    .lp-filter { animation-delay: .2s; }
    .lp-lead > li, .lp-grid > li { animation: card-in .8s cubic-bezier(.16, 1, .3, 1) calc(var(--i, 0) * 70ms + .22s) both; }
}

@media (max-width: 900px) {
    .lp-lead.n2, .lp-lead.n3 { grid-template-columns: minmax(0, 1fr); }
    .lp-lead.n3 .is-feature { grid-row: auto; }
    .lp-lead.n3 .plate:not(.is-feature) .card-thumb { aspect-ratio: 16 / 10; }
    .lp-lead .is-feature .card-thumb { aspect-ratio: 4 / 3.2; }
    .masthead .nav-links { margin-left: 0; }
    .lp-head-row { grid-template-columns: minmax(0, 1fr); }
}

/* Smaller plates keep the picture: a two-line footer (title; kind, model and the way in), no description. */
.plate:not(.is-feature) .plate-meta { display: grid; justify-content: stretch; gap: 8px; padding: 12px 16px 13px; }
.plate:not(.is-feature) .plate-text { gap: 3px; }
.plate:not(.is-feature) .plate-dek { display: none; }
.plate:not(.is-feature) h3 { font-size: var(--fs-lg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plate:not(.is-feature) .plate-side { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0; width: 100%; }
.plate:not(.is-feature) .plate-made { min-width: 0; overflow: hidden; }
/* Tokens take their own line under kind and model, so the narrow footer never clips them. */
.plate:not(.is-feature) .plate-made { flex-wrap: wrap; row-gap: 3px; }
.plate:not(.is-feature) .plate-made .plate-tokens { flex-basis: 100%; margin-left: 0; padding-left: 0; border-left: 0; }
.plate:not(.is-feature) .plate-open { flex: none; font-size: var(--fs-xs); }
.lp-lead.n3 .plate:not(.is-feature) .card-thumb { min-height: 220px; }
.card-thumb-frame iframe { overflow: hidden; }

/* ==========================================================================
   Chrome masthead (Pat's brushed-chrome board, 2026-10-08; innerpulse-brand
   references/chrome.md): a docked bar with a hairline rule, the flat 6-bar mark
   beside the wordmark in brushed steel. Kept subtle: the steel sits close to the
   ink color and only a passing sheen on hover gives the metal away. The mark's
   gloss was retired on 2026-10-25: it reads as the flat ember everywhere else.
   The steel paints live in ChromeDefs.
   ========================================================================== */

/* Fixed, not floating (Pat, 2026-10-08): a floating card sat over the gallery as it scrolled
   under it. The bar is solid paper, full width, pinned to the top with a hairline below. */
.masthead {
    position: sticky; top: 0; z-index: 40;
    background: var(--paper); backdrop-filter: none; -webkit-backdrop-filter: none;
    border-bottom: 1px solid var(--rule);
    box-shadow: 0 1px 0 color-mix(in srgb, #fff 4%, transparent) inset;
}
.masthead .wrap { min-height: 62px; }

.brand-chrome { display: inline-flex; align-items: center; gap: 10px; }
/* The chrome mark: the flat ember of every other mark, the deep #cf2a1c on the light themes and the bright
   #f43a2a on the dark ones (--ip-mark). */
.brand-chrome .ip-glyph rect, .chat-brand .ip-glyph rect { fill: var(--ip-mark); }
.brand-chrome-word { position: relative; display: block; line-height: 0; }
.brand-chrome .brand-wordmark-svg { height: 22px; overflow: visible; }
.brand-chrome .brand-wordmark-svg path, .chat-brand .brand-wordmark-svg path { fill: url(#hello-steel-ink) var(--ink); }
:root[data-theme="ip-dark"] .brand-chrome .brand-wordmark-svg path,
:root[data-theme="ember"] .brand-chrome .brand-wordmark-svg path,
:root[data-theme="ip-dark"] .chat-brand .brand-wordmark-svg path,
:root[data-theme="ember"] .chat-brand .brand-wordmark-svg path {
    fill: url(#hello-steel) var(--ink); stroke: rgba(255,255,255,.22); stroke-width: .8; paint-order: stroke;
}
:root[data-theme="ip-dark"] .brand-chrome .brand-wordmark-svg,
:root[data-theme="ember"] .brand-chrome .brand-wordmark-svg { filter: drop-shadow(0 1px 0 rgba(0,0,0,.6)); }
/* The sheen: a soft band of light masked to the letters, crossing once per hover. */
.brand-chrome-word::after {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    -webkit-mask: url(/assets/hello-wordmark-mask.svg) center / 100% 100% no-repeat;
    mask: url(/assets/hello-wordmark-mask.svg) center / 100% 100% no-repeat;
    background: linear-gradient(105deg, transparent 38%, rgba(255,255,255,.85) 50%, transparent 62%) no-repeat;
    background-size: 260% 100%; background-position: 130% 0; opacity: 0;
}
:root[data-theme="ip-light"] .brand-chrome-word::after, :root[data-theme="paper"] .brand-chrome-word::after { mix-blend-mode: overlay; }
.brand:hover .brand-chrome-word::after, .brand:focus-visible .brand-chrome-word::after { animation: chrome-sheen 1100ms cubic-bezier(.4,0,.2,1) 1; }
.brand:hover .brand-chrome .brand-wordmark-svg { color: var(--ink); }
@keyframes chrome-sheen { 0% { background-position: 130% 0; opacity: 1; } 100% { background-position: -30% 0; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .brand:hover .brand-chrome-word::after { animation: none; } }
@media (max-width: 720px) {
    .brand-chrome .brand-wordmark-svg { height: 19px; }
    .masthead .wrap { gap: 2px 12px; padding-top: 6px; padding-bottom: 4px; }
    .masthead .nav { flex-wrap: nowrap; margin-left: -10px; }
    .masthead .nav-links { order: 0; flex: 1 1 auto; }
    .masthead .nav-tools { order: 0; flex: none; }
}

/* ==========================================================================
   Design review fixes (2026-10-08 critique)
   ========================================================================== */

/* One accent per theme. The light grounds take ember for UI accents too (Paper used to switch to
   bronze for buttons and labels while selections stayed red), one step deeper than the brand's
   coral so 12px links on surfaces clear AA. --ip-mark-text is the mark color where it sets text:
   the dark grounds lift it, since the mark itself (#f43a2a) is under 4.5:1 on their cards. */
:root[data-theme="ip-light"], :root[data-theme="paper"] {
    --accent: #b5301c; --accent-2: #962a14; --accent-bg: #f2dccd;
    --ip-mark-text: #b8291b; --ip-mark-fill: #cc2a1c;
}
:root[data-theme="ip-dark"], :root[data-theme="ember"] { --ip-mark-text: #ff6a4d; --ip-mark-fill: #d92c1a; }
.card-kind, .section-k, .plate-open, .hello-surface-k span, .lp-filter a[aria-current="page"] span { color: var(--ip-mark-text, var(--ip-mark)); }
.is-feature .plate-open { background: var(--ip-mark-fill, var(--ip-mark)); color: #fff; box-shadow: 0 10px 24px -14px var(--ip-mark); }
.is-feature .card:hover .plate-open { background: color-mix(in srgb, var(--ip-mark-fill, var(--ip-mark)) 88%, #000); color: #fff; }
.lp-filter a span { color: var(--text-dim); }

/* The filter's lead-in is a label, not a button. */
.lp-filter-k {
    padding: 0 6px 0 0; border: 0; font-family: var(--meta); font-size: var(--fs-label); font-weight: var(--fw-semibold);
    letter-spacing: .2em; text-transform: uppercase; color: var(--text-mute);
}

/* Smaller plates share the row: two of them split it rather than leaving a third column empty. */
.lp-grid { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

/* Live thumbnails: sized by components/gallery-spotlight.tsx. Frames whose page is transparent
   (diagrams) keep the plate's ground; matching the frame's color scheme to the page inside keeps
   the browser from painting it opaque white on a dark theme. */
.card-thumb-frame iframe { position: relative; z-index: 1; color-scheme: normal; transition: opacity .35s ease; }
.card-thumb-frame[data-kind="mermaid"] iframe, .card-thumb-frame[data-kind="svg"] iframe { background: transparent; }
.card-thumb-frame.is-waiting iframe { opacity: 0; }
.card-thumb-frame.is-failed iframe { visibility: hidden; }
.card-thumb-ph {
    position: absolute; inset: 0; display: grid; align-content: end; gap: 6px; padding: 18px 20px; opacity: 0; transition: opacity .35s ease;
    background: radial-gradient(120% 90% at 90% 0%, color-mix(in srgb, var(--ink) 6%, transparent), transparent 60%), var(--surface-2);
}
.card-thumb-frame.is-waiting .card-thumb-ph, .card-thumb-frame.is-failed .card-thumb-ph { opacity: 1; }
.card-thumb-ph-kind { font-family: var(--meta); font-size: var(--fs-micro); font-weight: var(--fw-semibold); letter-spacing: .16em; text-transform: uppercase; color: var(--ip-mark-text, var(--ip-mark)); }
.card-thumb-ph-title { font-family: var(--serif); font-size: var(--fs-2xl); line-height: 1.2; color: var(--ink); max-width: 22ch; }

/* Documents: the page's own reading style at 60%, fading out at the foot. */
.card-thumb-doc {
    position: absolute; inset: 0; overflow: hidden; padding: 18px 22px 0; background: var(--surface);
    -webkit-mask-image: linear-gradient(#000 58%, transparent 96%); mask-image: linear-gradient(#000 58%, transparent 96%);
}
.card-thumb-doc > .article-body { width: 166.667%; max-width: none; transform: scale(.6); transform-origin: 0 0; pointer-events: none; }
.card-thumb-doc .article-body > :first-child { margin-top: 0; }
.card-thumb-doc .code-block-head button { visibility: hidden; }

/* Artifact pages. The title takes the landing's Inter display face; the reading stays serif. */
.pub-head h1 { font-family: var(--sans); font-weight: 700; font-size: clamp(2.1rem, 4.2vw, 3.3rem); line-height: 1.05; letter-spacing: -.04em; }
.pub-meta { gap: 6px 0; }
.pub-meta > * { display: inline-flex; align-items: center; }
.pub-meta > * + *::before { content: ""; width: 3px; height: 3px; margin: 0 12px; border-radius: 50%; background: var(--rule-2); }
.pub-frame:fullscreen { height: 100% !important; background: #000; }
.pub-frame { color-scheme: normal; transition: height .25s ease; }
.pub-mermaid .pub-frame { background: transparent; }
.pub-more { margin: 48px 0 0; padding-top: 18px; border-top: 1px solid var(--rule); }
.pub-more a { display: inline-flex; align-items: center; gap: 8px; font-weight: var(--fw-semibold); color: var(--accent); }
.pub-more a svg { transition: transform var(--ease-out); }
.pub-more a:hover svg { transform: translateX(3px); }
@media (max-width: 640px) {
    /* Wrapped meta lines start flush rather than with a stray dot. */
    .pub-meta { gap: 4px 14px; }
    .pub-meta > * + *::before { display: none; }
    .pub-frame { height: min(70vh, 640px); }
}

/* The masthead keeps all three links on a phone: "How it's made" shortens to "How". */
.nav-short { display: none; }
@media (max-width: 460px) { .nav-long { display: none; } .nav-short { display: inline; } }
@media (pointer: coarse) {
    .masthead .nav-links a { min-height: 40px; display: inline-flex; align-items: center; }
    .footer-links a { display: inline-block; padding: 8px 0; }
}

/* Short pages (sign-in, not found) keep the footer at the foot of the window. */
.hello-signin, .lost { min-height: calc(100dvh - 300px); }

/* Not found and error pages, in the landing's voice. */
.lost { display: grid; align-content: center; justify-items: start; gap: 0; padding: clamp(40px, 8vw, 96px) 0; }
.lost-k {
    margin: 0 0 14px; font-family: var(--meta); font-size: var(--fs-label); font-weight: var(--fw-semibold);
    letter-spacing: .2em; text-transform: uppercase; color: var(--ip-mark-text, var(--ip-mark));
}
.lost h1 { margin: 0; font-family: var(--sans); font-weight: 700; font-size: clamp(2.4rem, 6vw, 4.3rem); line-height: 1; letter-spacing: -.048em; color: var(--ink); }
.lost h1 em { font-style: normal; color: var(--ip-mark); }
.lost-dek { margin: 18px 0 0; max-width: 46ch; font-size: var(--fs-lg); line-height: 1.5; color: var(--text-dim); }
.lost-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; margin: 28px 0 0; }
.lost-actions a:not(.lost-cta) { color: var(--text-dim); font-weight: var(--fw-medium); }
.lost-cta {
    display: inline-flex; align-items: center; padding: 10px 20px; border: 0; border-radius: 999px; cursor: pointer;
    background: var(--ip-mark-fill, var(--ip-mark)); color: #fff !important; font: inherit; font-weight: var(--fw-semibold); text-decoration: none !important;
}
.lost-cta:hover { background: color-mix(in srgb, var(--ip-mark-fill, var(--ip-mark)) 88%, #000); }

/* Code in light themes: the categorical colors one step darker, so syntax clears 4.5:1 on code panels. */
:root[data-theme="ip-light"] .code-block, :root[data-theme="ip-light"] .card-thumb-text {
    --c1: #a3341a; --c2: #08667c; --c3: #5a35b3; --c4: #7f4a08; --c5: #0b6a3a; --c6: #862a5c;
}
:root[data-theme="paper"] .code-block, :root[data-theme="paper"] .card-thumb-text {
    --c1: #7a4219; --c2: #1a5e52; --c3: #4f4180; --c4: #6e5310; --c5: #7a3350; --c6: #355c37;
}

/* The masthead mark moves with the grammar of every live mark (innerpulse-brand chrome.md, 2026-11-11: motion is
   light, the bars never beat in size). On load the reading is taken once: each bar grows from its stub to its rest,
   bar by bar from the left, in about a second (0.55s per bar, 0.09s apart; well under WCAG 2.2.2's five seconds).
   Then it rests, and lights up only while the studio is working (html.ip-busy, set by the chat while a turn
   streams): one pulse of light passes through the bars left to right every 2.4s, each bar brightening to the lamp
   color and back. The draw-in's start scales come from the six resting heights (12 · 82.22 · 51.83 · 33.34 · 56.13
   · 12). html.ip-paused (layout.tsx, while the tab is hidden) holds it. Off under reduced motion. */
.brand-chrome .ip-glyph rect, .chat-brand .ip-glyph rect {
    transform-box: fill-box; transform-origin: center;
    animation: ip-draw-in .55s cubic-bezier(.22, 1, .36, 1) 1 both; animation-delay: calc(var(--i, 0) * 0.09s);
}
.ip-busy .brand-chrome .ip-glyph rect, .ip-busy .chat-brand .ip-glyph rect {
    animation: ip-beat 2.4s cubic-bezier(.45, 0, .55, 1) infinite; animation-delay: calc(var(--i, 0) * 0.06s);
}
/* bars 1 and 6 are the rests (h 12); the others 82.22, 51.83, 33.34, 56.13: start scale = 12 / h */
.ip-glyph rect:nth-child(1), .ip-glyph rect:nth-child(6) { --ip-from: 1; }
.ip-glyph rect:nth-child(2) { --ip-from: .146; }
.ip-glyph rect:nth-child(3) { --ip-from: .232; }
.ip-glyph rect:nth-child(4) { --ip-from: .360; }
.ip-glyph rect:nth-child(5) { --ip-from: .214; }
@keyframes ip-draw-in { from { transform: scaleY(var(--ip-from, 1)); } to { transform: scaleY(1); } }
/* the pulse is in a bar for 19% of the period (0.46s of 2.4): the bar brightens and settles; the rest of the period it rests */
@keyframes ip-beat { 0%, 19%, 100% { fill: var(--ip-mark); } 9.5% { fill: var(--ip-hot); } }
.ip-paused .brand-chrome .ip-glyph rect, .ip-paused .chat-brand .ip-glyph rect { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) { .brand-chrome .ip-glyph rect, .chat-brand .ip-glyph rect { animation: none; } }

/* UX sweep, 2026-10-09. */
/* Phones: the gallery filter is one row that scrolls sideways, not three ragged rows. */
@media (max-width: 600px) {
    .lp-filter { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -16px; padding: 2px 16px; mask-image: linear-gradient(to right, #000 calc(100% - 24px), transparent); }
    .lp-filter::-webkit-scrollbar { display: none; }
    .lp-filter a, .lp-filter-k { flex: none; white-space: nowrap; }
}
/* Phones: a reading table fits the column when its content can; wide ones still scroll in their card. */
@media (max-width: 560px) {
    .article-body table { min-width: 0; font-size: var(--fs-sm); }
    .article-body thead th, .article-body tbody td { padding: 10px 12px; }
}

/* UX sweep 3, 2026-10-09. */
/* The smaller plates: three to a row on wide screens, and a short last row splits it evenly (two
   halves, or two pairs) instead of leaving one plate beside empty columns. */
@media (min-width: 1000px) {
    .lp-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
    .lp-grid > li { grid-column: span 2; }
    .lp-grid > li:nth-child(3n+1):nth-last-child(2), .lp-grid > li:nth-child(3n+2):nth-last-child(1),
    .lp-grid > li:nth-child(3n+1):nth-last-child(4), .lp-grid > li:nth-child(3n+2):nth-last-child(3),
    .lp-grid > li:nth-child(3n+3):nth-last-child(2), .lp-grid > li:nth-child(3n+1):nth-last-child(1) { grid-column: span 3; }
}

/* Under a live render: the source. */
.pub-under { margin-top: 14px; }
.pub-under .pub-source { margin-top: 0; }
.pub-under .pub-source summary { display: inline-block; padding: 8px 0; }

/* The artifact page's actions sit under its header: fullscreen, its own window, share. */
.pub-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.pub-act { display: inline-flex; align-items: center; gap: 7px; font-family: var(--meta); font-weight: var(--fw-medium); white-space: nowrap; }
.pub-act.btn-ghost { color: var(--ink); }
.pub-act-short { display: none; }
@media (max-width: 460px) { .pub-act-long { display: none; } .pub-act-short { display: inline; } }

/* Code pages and sources: a boxed listing as wide as the page, scrolling sideways rather than
   wrapping lines mid-expression. */
.pub-code, .pub-source .article-body { max-width: none; }
.article-body.pub-code.code-only .code-block, .pub-source .article-body.code-only .code-block { border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface-2); }
.article-body.pub-code.code-only .code-block-head, .pub-source .article-body.code-only .code-block-head { position: static; }
.article-body.pub-code.code-only pre, .pub-source .article-body.code-only pre { white-space: pre; overflow-wrap: normal; overflow-x: auto; }
.pub-source .article-body.code-only .code-block { max-height: 70vh; overflow: auto; }

/* The end of an artifact page: the gallery link, then the pieces either side of this one. */
.pub-next { margin-top: 56px; padding-top: 18px; border-top: 1px solid var(--rule); }
.pub-next .pub-more { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0; padding: 0; border: 0; }
.pub-more-n { font-family: var(--meta); font-size: var(--fs-sm); color: var(--text-mute); }
.pub-next-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }
.pub-next-item {
    display: grid; gap: 6px; align-content: start; padding: 16px 18px; border: 1px solid var(--rule); border-radius: var(--radius);
    background: var(--surface); color: inherit; text-decoration: none; transition: border-color var(--ease-out), background var(--ease-out);
}
.pub-next-item:hover { border-color: var(--rule-2); background: color-mix(in srgb, var(--surface) 70%, var(--surface-2)); }
.pub-next-item.is-next { grid-column: 2; text-align: right; }
.pub-next-k {
    display: inline-flex; align-items: center; gap: 6px; font-family: var(--meta); font-size: var(--fs-label); font-weight: var(--fw-semibold);
    letter-spacing: .14em; text-transform: uppercase; color: var(--text-mute);
}
.pub-next-item.is-next .pub-next-k { justify-content: flex-end; }
.pub-next-item svg { transition: transform var(--ease-out); }
.pub-next-item.is-prev:hover svg { transform: translateX(-3px); }
.pub-next-item.is-next:hover svg { transform: translateX(3px); }
.pub-next-t { font-family: var(--sans); font-size: var(--fs-xl); font-weight: var(--fw-semibold); line-height: 1.25; letter-spacing: -.01em; color: var(--ink); }
@media (max-width: 640px) {
    .pub-next-pair { grid-template-columns: minmax(0, 1fr); gap: 10px; }
    .pub-next-item.is-next { grid-column: auto; }
}

/* Sign-in, in the not-found page's voice. */
.hello-signin { margin-bottom: 0; }
.hello-signin form { margin: 28px 0 0; }
.hello-signin .hello-error { margin-top: 18px !important; }
