/* ════════════════════════════════════════════════════════════════════
   v2 — hero, product tour, bento, card fan, timeline, feature pages.
   Loaded after style.css and site.css; overrides only what it names.
   ════════════════════════════════════════════════════════════════════ */

/* ── Hero ─────────────────────────────────────────────────────────── */
.hero-v2 { min-height: auto; padding: 150px 0 80px; }
.hero-v2 .hero-inner { grid-template-columns: minmax(0, 1.15fr) minmax(340px, 0.85fr); gap: 64px; }
.hero-v2 .hero-title {
    font-size: clamp(38px, 4.4vw, 60px);
    line-height: 1.05;
    letter-spacing: -0.035em;
    margin-bottom: 22px;
}
.hero-v2 .hero-text-col, .hero-v2 .hero-auth-col { min-width: 0; }
.hero-v2 .hero-desc { font-size: 17px; max-width: 560px; }
.hero-v2 .hero-cta-group { margin-bottom: 38px; }

.hero-facts {
    display: grid;
    grid-template-columns: repeat(4, auto);
    justify-content: start;
    margin: 0;
    padding-top: 22px;
    border-top: 1px solid var(--border);
    max-width: 640px;
}
.hero-facts > div { padding: 0 22px; border-left: 1px solid var(--border); }
.hero-facts > div:first-child { padding-left: 0; border-left: 0; }
.hero-facts dt { font-family: var(--font-tech); font-size: 14.5px; font-weight: 700; color: var(--primary); white-space: nowrap; }
.hero-facts dd { margin: 4px 0 0; font-size: 12px; color: var(--text-muted); white-space: nowrap; }

/* ── Product tour ─────────────────────────────────────────────────── */
.tour-section { padding: 0 0 100px; position: relative; z-index: 2; }
.tour-tabs { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 18px; }
.tour-tab {
    font-family: var(--font-tech); font-size: 12.5px; letter-spacing: .3px;
    padding: 9px 16px; border-radius: 999px; cursor: pointer;
    border: 1px solid var(--border); background: var(--surface); color: var(--text-muted);
    transition: color .2s, border-color .2s, background .2s;
}
.tour-tab:hover { color: var(--text); border-color: var(--border-light); }
.tour-tab.active { color: var(--primary); border-color: color-mix(in srgb, var(--primary) 60%, transparent); background: var(--primary-subtle); }
.tour-soon { margin-left: 7px; font-size: 9.5px; text-transform: uppercase; letter-spacing: 1px; color: var(--warning); }
.tour-stage { box-shadow: 0 40px 120px -50px color-mix(in srgb, var(--primary) 45%, transparent); }
.tour-slides { display: grid; }
.tour-slide {
    grid-area: 1 / 1; margin: 0; opacity: 0; transform: scale(1.012);
    transition: opacity .6s ease, transform .9s cubic-bezier(.2, .8, .2, 1);
    pointer-events: none;
}
.tour-slide.active { opacity: 1; transform: none; pointer-events: auto; }
.tour-slide img, .tour-slide video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: contain; background: #0d0f12; }
.film-stage { border-radius: 16px; overflow: hidden; border: 1px solid var(--border-light); background: #090b0f; }
.films .tour-tab { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; padding: 11px 20px; }
.films .tour-tab svg { opacity: .8; }
.tour-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: transparent; }
.tour-progress i { display: block; height: 100%; width: 0; background: var(--primary); }
.tour-progress.run i { animation: tour-fill var(--tour-ms, 6500ms) linear forwards; }
@keyframes tour-fill { to { width: 100%; } }
.tour-caption { display: none; text-align: center; color: var(--text-muted); font-size: 14px; line-height: 1.6; max-width: 820px; margin: 18px auto 0; }
.tour-caption.active { display: block; }
.tour-caption a { color: var(--primary); white-space: nowrap; }

/* ── Pipeline: pads instead of emoji, real screenshots ────────────── */
.panel-bullet-icon {
    width: 14px; height: 14px; margin-top: 3px; border-radius: 3px; font-size: 0;
    background: transparent; border: 2px solid var(--primary); position: relative; flex-shrink: 0;
}
.panel-bullet-icon::after {
    content: ""; position: absolute; inset: 0; margin: auto; width: 4px; height: 4px;
    border-radius: 50%; background: var(--primary);
}
.panel-visual-col { display: flex; flex-direction: column; justify-content: center; }
.panel-shot { display: block; text-decoration: none; transition: transform .35s ease, border-color .35s ease; }
.panel-shot:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--primary) 50%, var(--border-light)); }
.panel-shot img, .panel-shot video { display: block; width: 100%; height: auto; max-height: 560px; object-fit: contain; background: #0d0f12; }
.panel-shot.tall { max-width: 440px; margin: 0 auto; }
.panel-cta { margin-top: auto; padding-top: 6px; }
.chat-note { margin: 4px 0 0; font-family: var(--font-tech); font-size: 10.5px; color: var(--text-dim); text-align: right; }
.pipeline-tab-badge { font-size: 10px; }

/* ── Bento (features) and linked cards ────────────────────────────── */
.bento { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-flow: dense; gap: 16px; }
.bento-card {
    position: relative; display: flex; flex-direction: column; overflow: hidden;
    border: 1px solid var(--border); border-radius: var(--radius-xl); background: var(--surface);
    color: inherit; text-decoration: none; min-height: 230px;
    transition: border-color .3s ease, transform .3s ease, box-shadow .3s ease;
}
.bento-card::before {
    content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s ease;
    background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 0%),
                color-mix(in srgb, var(--primary) 10%, transparent), transparent 60%);
}
.bento-card:hover, .bento-card:focus-visible {
    border-color: color-mix(in srgb, var(--primary) 45%, var(--border));
    transform: translateY(-3px);
    box-shadow: 0 24px 60px -34px color-mix(in srgb, var(--primary) 60%, transparent);
}
.bento-card:hover::before, .bento-card:focus-visible::before { opacity: 1; }
.bento-card.wide { grid-column: span 2; }
.bento-card.has-img { flex-direction: column; }
.bento-card.wide.has-img { flex-direction: row; }
.bento-card.has-img:not(.wide) .bento-img { flex: 0 0 auto; aspect-ratio: 16 / 9; border-right: 0; border-bottom: 1px solid var(--border); }
.bento-img { flex: 0 0 50%; overflow: hidden; border-right: 1px solid var(--border); background: #0d0f12; }
.bento-img img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; transition: transform .7s cubic-bezier(.2, .8, .2, 1); }
.bento-card:hover .bento-img img { transform: scale(1.06); }
.bento-body { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 8px; padding: 24px; flex: 1; }
.bento-body .badge { align-self: flex-start; }
.bento-num { font-family: var(--font-tech); font-size: 11px; letter-spacing: 1.5px; color: var(--text-dim); }
.bento-num code { font-size: 11px; color: var(--primary); }
.bento-card h3 { font-size: 18px; margin: 2px 0 0; color: var(--text); }
.bento-card p { color: var(--text-muted); font-size: 14px; line-height: 1.6; margin: 0; }
.bento-more { margin-top: auto; padding-top: 10px; font-family: var(--font-tech); font-size: 12px; letter-spacing: .5px; color: var(--primary); }
.bento-more span { display: inline-block; transition: transform .25s ease; }
.bento-card:hover .bento-more span, .fan-card:hover .bento-more span { transform: translateX(4px); }

.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.card-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.feature-link-card { min-height: 0; }
.features-group-title { font-size: 22px; margin: 44px 0 18px; }
.features-group-title:first-child { margin-top: 10px; }

/* ── AI card fan ──────────────────────────────────────────────────── */
/* Six cards, each with its picture. Hovering lifts THAT card only: the others
   stay where they are, so the card under the pointer never slides away. */
.fan { --w: 186px; --spread: 194px; position: relative; height: 520px; margin: 10px auto 0; max-width: 1180px; }
@media (max-width: 1220px) { .fan { --w: 166px; --spread: 172px; } }
.fan-card {
    --mid: calc((var(--n) - 1) / 2);
    --off: calc(var(--i) - var(--mid));
    position: absolute; left: 50%; top: 40px; width: var(--w); height: 430px; margin-left: calc(var(--w) / -2);
    display: flex; flex-direction: column; overflow: hidden;
    border-radius: 18px; border: 1px solid var(--border-light); color: inherit; text-decoration: none;
    background: linear-gradient(165deg, var(--surface-3), var(--surface) 70%);
    box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .8);
    transform-origin: 50% 140%;
    transform: translateY(40px) rotate(0deg);
    transition: transform .55s cubic-bezier(.2, .8, .2, 1), border-color .25s ease, box-shadow .25s ease;
    transition-delay: calc(var(--i) * 40ms);
    z-index: calc(10 + var(--i));
}
.fan.is-dealt .fan-card {
    transform: translateX(calc(var(--off) * var(--spread))) translateY(calc(var(--off) * var(--off) * 5px)) rotate(calc(var(--off) * 3deg));
}
.fan.is-dealt .fan-card:hover, .fan.is-dealt .fan-card:focus-visible {
    transform: translateX(calc(var(--off) * var(--spread))) translateY(-28px) rotate(0deg);
    z-index: 60; border-color: color-mix(in srgb, var(--primary) 60%, var(--border-light));
    box-shadow: 0 40px 80px -30px color-mix(in srgb, var(--primary) 55%, transparent);
    transition-delay: 0s;
}
.fan-img { display: block; height: 132px; flex: 0 0 132px; overflow: hidden; background: #0d0f12; border-bottom: 1px solid var(--border); }
.fan-img img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; transition: transform .7s cubic-bezier(.2, .8, .2, 1); }
.fan-card:hover .fan-img img { transform: scale(1.06); }
.fan-cmd { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
    background: radial-gradient(120% 90% at 50% 0%, color-mix(in srgb, var(--primary) 18%, #0d0f12), #0d0f12 70%); }
.fan-cmd code { font-family: var(--font-tech); font-size: 26px; font-weight: 700; color: var(--primary); }
.fan-cmd small { font-family: var(--font-tech); font-size: 10.5px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--warning); }
.fan-body { display: flex; flex-direction: column; gap: 7px; padding: 16px 16px 18px; flex: 1; min-height: 0; }
.fan-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.fan-num { font-family: var(--font-tech); font-size: 22px; font-weight: 700; color: var(--primary); line-height: 1; }
.fan-card .badge { align-self: flex-start; font-size: 10px; }
.fan-card h3 { font-size: 16.5px; line-height: 1.3; margin: 2px 0 0; color: var(--text); }
.fan-card p { font-size: 13px; line-height: 1.5; color: var(--text-muted); margin: 0; }
.fan-card .bento-more { margin-top: auto; }

/* ── Roadmap timeline ─────────────────────────────────────────────── */
.timeline { list-style: none; padding: 0; margin: 0 auto; position: relative; max-width: 760px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 1px; background: var(--border-light); }
.timeline-item { position: relative; padding: 0 0 28px 40px; }
.timeline-dot { position: absolute; left: 0; top: 3px; width: 15px; height: 15px; border-radius: 50%; border: 2px solid var(--warning); background: var(--background); }
.timeline-item.is-ok .timeline-dot { border-color: var(--success); }
.timeline-item.is-later .timeline-dot { border-color: var(--text-dim); }
.timeline-item h3 { font-size: 17px; margin: 9px 0 6px; }
.timeline-item h3 a { color: inherit; text-decoration: none; }
.timeline-item h3 a:hover { color: var(--primary); }
.timeline-item p { color: var(--text-muted); font-size: 14.5px; line-height: 1.65; margin: 0; }

/* ── Plans ────────────────────────────────────────────────────────── */
.plan-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 1100px; margin: 0 auto; }
.plans-note { max-width: 760px; margin: 22px auto 0; text-align: center; }

/* ── Feature pages ────────────────────────────────────────────────── */
.crumbs { font-size: 13px; color: var(--text-dim); margin-bottom: 18px; }
.crumbs a { color: var(--text-muted); text-decoration: none; }
.crumbs a:hover { color: var(--primary); }
.crumbs span { margin: 0 6px; }
.feature-command { margin-top: 20px; }
.feature-command code {
    display: inline-block; font-family: var(--font-tech); font-size: 14px; color: var(--primary);
    background: var(--surface-2); border: 1px solid var(--border-light); border-radius: 8px; padding: 9px 16px;
}
.feature-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 44px; align-items: start; }
.feature-shot img { width: 100%; height: auto; max-height: 640px; object-fit: contain; background: #0d0f12; }
.feature-summary { font-size: 17px; line-height: 1.75; margin: 26px 0 0; }
.feature-note {
    margin: 18px 0 0; padding: 12px 16px; font-size: 14px; color: var(--text-muted);
    border-left: 3px solid var(--warning); background: var(--surface); border-radius: 0 8px 8px 0;
}
.feature-main h2 { font-size: 24px; margin: 40px 0 16px; }
.feature-points { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.feature-point { display: flex; gap: 12px; padding: 18px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.feature-point h3 { font-size: 15.5px; margin: 0 0 5px; }
.feature-point p { font-size: 14px; line-height: 1.6; color: var(--text-muted); margin: 0; }
.feature-steps { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.feature-steps li {
    counter-increment: s; position: relative; padding: 14px 16px 14px 54px; line-height: 1.55;
    border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text-muted);
}
.feature-steps li::before { content: counter(s, decimal-leading-zero); position: absolute; left: 18px; top: 14px; font-family: var(--font-tech); font-weight: 700; color: var(--primary); }
.feature-side { position: sticky; top: 100px; display: grid; gap: 10px; }
.side-title { font-family: var(--font-tech); font-size: 12px; letter-spacing: 2px; text-transform: uppercase; color: var(--text-dim); margin: 6px 0 2px; }
.side-card {
    display: grid; gap: 4px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 12px;
    background: var(--surface); color: inherit; text-decoration: none; transition: border-color .25s ease, transform .25s ease;
}
.side-card:hover { border-color: color-mix(in srgb, var(--primary) 50%, var(--border)); transform: translateX(3px); }
.side-card strong { font-size: 15px; }
.side-card span { font-size: 13px; color: var(--text-muted); line-height: 1.5; }
.side-card .side-kind { font-family: var(--font-tech); font-size: 10.5px; letter-spacing: 1px; text-transform: uppercase; color: var(--primary); }
.side-all { font-size: 13px; color: var(--text-muted); text-decoration: none; margin-top: 8px; }
.side-all:hover { color: var(--primary); }

/* ── Responsive ───────────────────────────────────────────────────── */
@media (max-width: 1080px) {
    .bento, .card-grid, .card-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .plan-grid-3 { grid-template-columns: 1fr; max-width: 520px; }
}
@media (max-width: 968px) {
    .hero-v2 { padding: 120px 0 60px; }
    .hero-v2 .hero-inner { grid-template-columns: minmax(0, 1fr) !important; }
    .hero-facts { justify-content: center; margin: 0 auto; }
    .feature-layout { grid-template-columns: 1fr; }
    .feature-side { position: static; }
}
@media (max-width: 1040px) {
    .fan { height: auto; display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 6px 2px 14px; }
    .fan-card, .fan.is-dealt .fan-card, .fan.is-dealt .fan-card:hover {
        position: relative; left: auto; top: auto; margin: 0; flex: 0 0 78%; height: auto; min-height: 380px;
        transform: none; scroll-snap-align: center;
    }
}
@media (max-width: 640px) {
    .hero-facts { grid-template-columns: repeat(2, auto); row-gap: 16px; }
    .hero-facts > div:nth-child(3) { padding-left: 0; border-left: 0; }
    .hero-facts dt, .hero-facts dd { white-space: normal; }
    .version-pill { max-width: 100%; }
    .bento, .card-grid, .card-grid-4 { grid-template-columns: 1fr; }
    .bento-card.wide { grid-column: span 1; }
    .bento-card.has-img { flex-direction: column; }
    .bento-img { flex: 0 0 180px; border-right: 0; border-bottom: 1px solid var(--border); }
    .feature-points { grid-template-columns: 1fr; }
    .tour-tab { padding: 8px 12px; font-size: 11.5px; }
}
@media (prefers-reduced-motion: reduce) {
    .tour-slide, .fan-card, .bento-card, .bento-img img { transition: none !important; }
    .tour-progress.run i { animation: none; }
}

/* ── Sign-in card ──────────────────────────────────────────────────────
   One card for the landing hero, /app/authorize and the blog's reading
   gate. The site's own type and colours, not the old terminal look. */
.auth-card {
    position: relative;
    background: linear-gradient(180deg, var(--surface-2), var(--surface));
    border: 1px solid var(--border-light);
    border-radius: 18px;
    padding: 34px 34px 30px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
    font-family: var(--font-main);
    text-align: left;
}
[data-theme="light"] .auth-card { background: #fff; box-shadow: 0 24px 60px rgba(15, 23, 42, 0.10); }
.auth-card form { margin: 0; }
.auth-head { margin-bottom: 22px; }
.auth-title { font-size: 24px; line-height: 1.2; font-weight: 700; letter-spacing: -0.02em; color: var(--text); margin: 0 0 6px; }
.auth-sub { font-size: 14.5px; line-height: 1.5; color: var(--text-muted); margin: 0; }
.auth-sub strong { color: var(--text); font-weight: 600; word-break: break-all; }
.auth-handoff {
    display: flex; align-items: center; gap: 10px; margin: 0 0 20px; padding: 10px 14px;
    border: 1px solid var(--primary-glow); background: var(--primary-subtle); border-radius: 10px;
    color: var(--primary); font-size: 13.5px; font-weight: 500;
}

/* Sign in | Create account */
.auth-switch {
    display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin: 0 0 22px;
    background: var(--surface-3); border: 1px solid var(--border); border-radius: 12px;
}
.auth-switch .tab {
    appearance: none; border: 0; background: transparent; color: var(--text-muted);
    font: 600 14px/1 var(--font-main); padding: 11px 10px; border-radius: 9px; cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}
.auth-switch .tab:hover { color: var(--text); }
.auth-switch .tab.active { background: #2a2d33; color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35); }
[data-theme="light"] .auth-switch .tab.active { background: #fff; box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12); }

.auth-social { display: grid; gap: 10px; }
.auth-social-btn {
    display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%;
    padding: 12px 16px; border-radius: 10px; cursor: pointer;
    font: 600 14.5px/1 var(--font-main); transition: transform 0.15s ease, border-color 0.2s ease, background-color 0.2s ease;
}
.auth-social-btn:hover { transform: translateY(-1px); }
.auth-google { background: #fff; color: #1f2328; border: 1px solid #fff; }
.auth-github { background: #24292f; color: #fff; border: 1px solid #3a4048; }
[data-theme="light"] .auth-google { border-color: var(--border-light); }

.auth-divider { display: flex; align-items: center; gap: 12px; margin: 22px 0 18px; color: var(--text-dim); font-size: 12.5px; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--border-light); }

.auth-card .input-group { margin-bottom: 16px; }
.auth-card .input-group label, .auth-label-row label {
    display: block; margin: 0 0 7px; font: 600 13.5px/1.2 var(--font-main); color: var(--text); letter-spacing: 0;
}
.auth-label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.auth-card .input-group input {
    width: 100%; box-sizing: border-box; padding: 13px 14px; border-radius: 10px;
    background: var(--background); border: 1px solid var(--border-light); color: var(--text);
    font: 400 15px/1.3 var(--font-main);
}
.auth-card .input-group input::placeholder { color: var(--text-dim); }
.auth-card .input-group input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-glow); }
[data-theme="light"] .auth-card .input-group input { background: #fff; }
.auth-pass { position: relative; }
.auth-pass input { padding-right: 46px !important; }
.auth-eye {
    position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
    display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 8px;
    background: transparent; color: var(--text-dim); cursor: pointer;
}
.auth-eye:hover, .auth-eye.on { color: var(--primary); background: var(--primary-subtle); }
.auth-card .auth-otp { text-align: center; letter-spacing: 0.6em; font: 600 24px/1 var(--font-tech) !important; padding: 14px !important; }

.auth-link { color: var(--primary); font-size: 13.5px; font-weight: 500; text-decoration: none; }
.auth-link:hover { text-decoration: underline; }
.auth-remember { display: flex; align-items: center; gap: 9px; margin: 4px 0 18px; font-size: 13.5px; color: var(--text-muted); cursor: pointer; }
.auth-remember input { width: 16px; height: 16px; margin: 0; accent-color: var(--primary); }
.auth-card .cf-turnstile { margin-bottom: 16px; }

.auth-submit {
    width: 100%; padding: 14px 18px; border: 0; border-radius: 10px; cursor: pointer;
    background: var(--primary); color: #001018; font: 700 15px/1 var(--font-main); letter-spacing: 0.01em;
    transition: background-color 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}
[data-theme="light"] .auth-submit { color: #fff; }
.auth-submit:hover { background: var(--primary-dark); box-shadow: 0 0 24px var(--primary-glow); }
.auth-submit.busy, .auth-submit:disabled { opacity: 0.7; cursor: progress; }
.auth-back { text-align: center; margin: 16px 0 0; }
.auth-success { text-align: center; color: var(--primary); padding: 8px 0; }
.auth-success svg { margin-bottom: 14px; }
.auth-success .auth-sub { margin-bottom: 22px; }
.auth-error {
    margin-top: 16px; padding: 11px 14px; border-radius: 10px; font-size: 13.5px; line-height: 1.45;
    color: var(--error); background: rgba(255, 61, 0, 0.08); border: 1px solid rgba(255, 61, 0, 0.35);
}
.auth-returning {
    min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
    background: var(--background); color: var(--text); font-family: var(--font-main);
}
.auth-returning h1 { font-size: 28px; color: var(--primary); }
.auth-returning p { color: var(--text-muted); }

/* the hero's card: room to breathe beside the headline */
.hero-v2 .hero-inner { grid-template-columns: minmax(0, 1.1fr) minmax(380px, 0.9fr); }
.hero-v2 .hero-auth-col { max-width: 480px; justify-self: end; width: 100%; }
@media (max-width: 968px) {
    .hero-v2 .hero-auth-col { justify-self: center; }
}
@media (max-width: 480px) {
    .auth-card { padding: 26px 20px 22px; border-radius: 16px; }
    .auth-title { font-size: 21px; }
}

/* ── Blog: sign-in wall ────────────────────────────────────────────────
   The rest of the post is in the page (search engines read it, the JSON-LD
   marks it not free); a signed-out reader sees its first lines fade out. */
.post-gate { position: relative; margin-top: 4px; }
.post-gated {
    max-height: 220px; overflow: hidden; pointer-events: none; user-select: none;
    -webkit-mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, 0.35) 45%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, 0.35) 45%, transparent 100%);
    filter: blur(1.5px);
}
.post-gate-card {
    position: relative; margin: -40px 0 40px; padding: 30px;
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 420px); gap: 30px; align-items: start;
    border: 1px solid var(--border-light); border-radius: 20px;
    background: radial-gradient(120% 140% at 0% 0%, var(--primary-subtle), transparent 55%), var(--surface);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}
[data-theme="light"] .post-gate-card { box-shadow: 0 24px 60px rgba(15, 23, 42, 0.10); }
.post-gate-eyebrow {
    display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border-radius: 999px;
    border: 1px solid var(--primary-glow); background: var(--primary-subtle); color: var(--primary);
    font: 600 12px/1 var(--font-main); letter-spacing: 0.02em;
}
.post-gate-pitch h2 { font-size: 26px; line-height: 1.2; letter-spacing: -0.02em; margin: 16px 0 10px; color: var(--text); }
.post-gate-pitch p { color: var(--text-muted); font-size: 15.5px; line-height: 1.6; margin: 0 0 16px; }
.post-gate-pitch ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.post-gate-pitch li { position: relative; padding-left: 26px; color: var(--text); font-size: 14.5px; line-height: 1.45; }
.post-gate-pitch li::before {
    content: ""; position: absolute; left: 0; top: 2px; width: 16px; height: 16px; border-radius: 50%;
    background: var(--primary-subtle) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300E5FF' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 10px no-repeat;
    border: 1px solid var(--primary-glow);
}
.post-gate-card .auth-card { box-shadow: none; padding: 26px 24px 22px; }
.post-gate-card .auth-title { font-size: 20px; }
@media (max-width: 860px) {
    .post-gate-card { grid-template-columns: 1fr; padding: 22px; }
}

/* a post card that needs a sign-in to read in full */
.post-lock {
    display: inline-flex; align-items: center; gap: 5px; color: var(--text-muted);
    font: 600 11.5px/1 var(--font-main); letter-spacing: 0.02em;
}

/* ── Header: the signed-in user ────────────────────────────────────────
   A name, not a plan. Gold for a running paid plan, silver for someone who
   donated or sponsored -- small, with a slow shine. */
nav .logo { flex-shrink: 0; margin-right: 28px; }
.nav-links { gap: clamp(14px, 1.9vw, 32px); }
.user-profile { display: flex; align-items: center; gap: 10px; margin-left: 4px; }
.nav-links a.user-chip {
    display: inline-flex; align-items: center; gap: 8px; max-width: 190px;
    padding: 3px 13px 3px 3px; border-radius: 999px;
    border: 1px solid var(--border-light); background: var(--surface-2);
    color: var(--text); font: 600 13.5px/1 var(--font-main); text-decoration: none;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}
.nav-links a.user-chip:hover { border-color: var(--primary); color: var(--text); }
.user-avatar {
    flex: 0 0 28px; width: 28px; height: 28px; border-radius: 50%; overflow: hidden; display: block;
    box-shadow: 0 0 0 1.5px var(--primary-glow);
}
.user-avatar img { width: 100%; height: 100%; border-radius: 50%; display: block; }
.user-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-tier { flex: 0 0 auto; }

.user-chip.tier-gold { --tier-a: #a86b00; --tier-b: #f5c542; --tier-c: #fff3c4; border-color: rgba(245, 197, 66, 0.45); }
.user-chip.tier-silver { --tier-a: #7d8894; --tier-b: #d5dbe2; --tier-c: #ffffff; border-color: rgba(213, 219, 226, 0.45); }
[data-theme="light"] .user-chip.tier-gold { --tier-a: #8a5a00; --tier-b: #c99400; --tier-c: #f0c040; }
[data-theme="light"] .user-chip.tier-silver { --tier-a: #4b5563; --tier-b: #8a96a3; --tier-c: #c9d1da; }
.user-chip.tier-gold .user-name, .user-chip.tier-silver .user-name {
    background: linear-gradient(110deg, var(--tier-a) 0%, var(--tier-b) 30%, var(--tier-c) 46%, var(--tier-b) 60%, var(--tier-a) 100%);
    background-size: 250% 100%;
    -webkit-background-clip: text; background-clip: text; color: transparent;
    animation: tier-shine 4.5s linear infinite;
}
.user-chip.tier-gold .user-tier, .user-chip.tier-silver .user-tier { color: var(--tier-b); filter: drop-shadow(0 0 4px var(--tier-b)); }
.user-chip.tier-gold .user-avatar, .user-chip.tier-silver .user-avatar {
    box-shadow: 0 0 0 2px var(--surface-2), 0 0 0 3.5px var(--tier-b);
}
@keyframes tier-shine { from { background-position: 125% 0; } to { background-position: -125% 0; } }
@media (prefers-reduced-motion: reduce) {
    .user-chip.tier-gold .user-name, .user-chip.tier-silver .user-name { animation: none; background-position: 50% 0; }
}

.nav-links a.user-logout {
    display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px;
    border: 1px solid var(--border-light); color: var(--text-muted); padding: 0;
}
.nav-links a.user-logout:hover { color: var(--primary); border-color: var(--primary); }
.nav-links a.nav-btn-quiet {
    background: transparent !important; color: var(--text-muted) !important; box-shadow: none !important;
    border: 1px solid var(--border-light); padding: 7px 14px !important; font-size: 12.5px;
}
@media (max-width: 968px) {
    nav .logo { margin-right: 0; }
    .nav-links a.user-chip { max-width: none; flex: 1; padding: 6px 14px 6px 6px; }
    .nav-links a.user-logout { width: 44px; height: 44px; }
}

/* ── Blog: "On this page" ──────────────────────────────────────────────
   A <nav> took the header's flex row (title left, list right, both centred)
   and markdown's own div.toc added a second rule. One column now: a quiet
   title, the list on a thin rail, the section being read lit on it. */
nav.post-toc {
    display: block; position: sticky; top: 96px; padding: 0;
    max-height: calc(100vh - 120px); overflow-y: auto; scrollbar-width: thin;
    font-family: var(--font-main);
}
.post-toc-title {
    margin: 0 0 12px; font: 600 11.5px/1 var(--font-main); letter-spacing: 0.08em;
    text-transform: uppercase; color: var(--text-dim);
}
.post-toc .toc { position: static; border: 0; padding: 0; font-size: 13.5px; }
.post-toc ul { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--border-light); }
.post-toc ul ul { border-left: 0; padding-left: 12px; }
.post-toc li { margin: 0; }
.post-toc a {
    display: block; margin-left: -1px; padding: 6px 0 6px 14px; border-left: 2px solid transparent;
    color: var(--text-muted); line-height: 1.4; text-decoration: none;
    transition: color 0.15s ease, border-color 0.15s ease;
}
.post-toc a:hover { color: var(--text); }
.post-toc a.active { color: var(--primary); border-left-color: var(--primary); }
.post-toc a.locked { color: var(--text-dim); }
.post-toc a.locked::after {
    content: ""; display: inline-block; width: 10px; height: 10px; margin-left: 6px; vertical-align: -1px; opacity: 0.7;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='11' width='16' height='10' rx='2'/%3E%3Cpath d='M8 11V7a4 4 0 0 1 8 0v4'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='11' width='16' height='10' rx='2'/%3E%3Cpath d='M8 11V7a4 4 0 0 1 8 0v4'/%3E%3C/svg%3E") center / contain no-repeat;
}
@media (max-width: 960px) { nav.post-toc { display: none; } }

/* blog cards: a lazy <img> (a background picture always loads) */
.post-card .cover { overflow: hidden; }
.post-card .cover img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ── Motion that costs nothing off screen ──────────────────────────────
   The hero's glow, particles and pulse stop once it is scrolled away; the
   gradient headings no longer animate background-position (a repaint of
   every heading on every frame, the page's main lag). */
.hero-section-new.is-still .hero-particle,
.hero-section-new.is-still .hero-glow,
.hero-section-new.is-still .pulse-dot { animation-play-state: paused; }
.hero-glow { will-change: transform, opacity; }
.gradient-text { animation: none; background-size: 100% 100%; }

/* ── Hero, signed in: no sign-in card, so one column, centred ───────── */
.hero-v2 .hero-inner:not(:has(.hero-auth-col)) { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; }
.hero-v2 .hero-inner:not(:has(.hero-auth-col)) .hero-text-col { max-width: 900px; margin: 0 auto; }
.hero-v2 .hero-inner:not(:has(.hero-auth-col)) .hero-desc { margin-left: auto; margin-right: auto; }
.hero-v2 .hero-inner:not(:has(.hero-auth-col)) .hero-cta-group { justify-content: center; }
.hero-v2 .hero-inner:not(:has(.hero-auth-col)) .hero-facts { justify-content: center; margin-left: auto; margin-right: auto; }

/* ── Films: no browser control bar over the narration ──────────────── */
.tour-slide { position: relative; }
.tour-slide video { cursor: pointer; }
.film-play {
    position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
    width: 78px; height: 78px; border-radius: 50%; display: grid; place-items: center; padding-left: 4px;
    border: 1px solid rgba(255, 255, 255, 0.28); background: rgba(5, 8, 12, 0.55); color: #fff; cursor: pointer;
    box-shadow: 0 0 0 8px rgba(0, 229, 255, 0.08), 0 20px 50px rgba(0, 0, 0, 0.5);
    opacity: 0; pointer-events: none; transition: opacity 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}
.tour-slide.active.is-paused .film-play { opacity: 1; pointer-events: auto; }
.film-play:hover { transform: translate(-50%, -50%) scale(1.06); border-color: var(--primary); color: var(--primary); }
.film-full {
    position: absolute; top: 12px; right: 12px; width: 38px; height: 38px; border-radius: 10px;
    display: grid; place-items: center; cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.2); background: rgba(5, 8, 12, 0.55); color: #fff;
    opacity: 0; transition: opacity 0.2s ease, border-color 0.2s ease;
}
.tour-slide:hover .film-full, .film-full:focus-visible { opacity: 1; }
.film-full:hover { border-color: var(--primary); color: var(--primary); }
@media (hover: none) { .film-full { opacity: 0.85; } }
