:root{
  --bg:#f5f5f7;--card:#fff;--ink:#1d1d1f;--ink2:#636366;--ink3:#6e6e73;
  --chip:#f0f0f2;--line:rgba(0,0,0,.07);--accent:#6d4ee6;
  --shadow:0 1px 1px rgba(0,0,0,.03),0 4px 14px rgba(0,0,0,.04);
  --shadow-hover:0 2px 4px rgba(0,0,0,.04),0 14px 34px rgba(0,0,0,.08);
  --glass:rgba(245,245,247,.72);--scrim:rgba(0,0,0,.28);
  --r:28px;
}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]){
  --bg:#000;--card:#161617;--ink:#f5f5f7;--ink2:#a1a1a6;--ink3:#8e8e93;
  --chip:#262628;--line:rgba(255,255,255,.08);--accent:#a58bff;
  --shadow:0 0 0 1px rgba(255,255,255,.04);--shadow-hover:0 0 0 1px rgba(255,255,255,.1);
  --glass:rgba(22,22,23,.72);--scrim:rgba(0,0,0,.55);
}}
:root[data-theme="dark"]{
  --bg:#000;--card:#161617;--ink:#f5f5f7;--ink2:#a1a1a6;--ink3:#8e8e93;
  --chip:#262628;--line:rgba(255,255,255,.08);--accent:#a58bff;
  --shadow:0 0 0 1px rgba(255,255,255,.04);--shadow-hover:0 0 0 1px rgba(255,255,255,.1);
  --glass:rgba(22,22,23,.72);--scrim:rgba(0,0,0,.55);
}
*{box-sizing:border-box;margin:0;padding:0}
html{-webkit-text-size-adjust:100%;scrollbar-gutter:stable}
body{background:var(--bg);color:var(--ink);font:17px/1.47 -apple-system,BlinkMacSystemFont,"SF Pro Text","Inter",system-ui,sans-serif;-webkit-font-smoothing:antialiased;transition:background .4s ease,color .4s ease}
a{color:inherit;text-decoration:none}
button{font:inherit;color:inherit;background:none;border:0;cursor:pointer}
:focus-visible{outline:2px solid var(--accent);outline-offset:3px;border-radius:10px}
.display{font-family:-apple-system,BlinkMacSystemFont,"SF Pro Display","Inter",system-ui,sans-serif}

/* ---------- glass header (6) ---------- */
.hdr{position:fixed;inset:0 0 auto;z-index:20;height:52px;display:flex;align-items:center;justify-content:space-between;padding:0 max(20px,calc((100vw - 1120px)/2));
  background:var(--glass);backdrop-filter:saturate(180%) blur(20px);-webkit-backdrop-filter:saturate(180%) blur(20px);
  border-bottom:1px solid var(--line);transform:translateY(-100%);opacity:0;transition:transform .5s var(--spring,ease),opacity .3s ease}
.hdr.show{transform:none;opacity:1}
.hdr .who{display:flex;gap:10px;align-items:center;font-weight:600;font-size:15px;letter-spacing:-.01em}
.hdr .who img{width:28px;height:28px;border-radius:50%}
.hdr .cta{background:var(--ink);color:var(--bg);font-size:13px;font-weight:600;padding:7px 14px;border-radius:99px}

/* ---------- layout ---------- */
.page{max-width:1120px;margin:0 auto;padding:40px 20px 80px}
.bento{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));grid-auto-rows:minmax(168px,auto);gap:14px;grid-auto-flow:dense}
.w2{grid-column:span 2}.h2{grid-row:span 2}
@media (max-width:900px){.bento{grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:minmax(168px,auto);gap:12px}.card.path{order:-1}}  /* two columns: the tall path pairs with award + GitHub */
@media (max-width:520px){.card{padding:18px}.bento{grid-auto-rows:minmax(142px,auto)}.m-w2{grid-column:span 2}.m-h1{grid-row:span 1}}

/* ---------- icons: SVG masks in the text colour (glyphs like ★ ◐ ↗ differ per font) ---------- */
:root{--i-star:url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22%3E%3Cpath d=%22M12 2.8l2.75 5.75 6.3.8-4.62 4.37 1.17 6.25L12 16.9l-5.6 3.07 1.17-6.25L2.95 9.35l6.3-.8z%22 stroke=%22%23000%22 stroke-width=%221.2%22 stroke-linejoin=%22round%22/%3E%3C/svg%3E");--i-theme:url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22%3E%3Ccircle cx=%2212%22 cy=%2212%22 r=%228.2%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222.2%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22/%3E%3Cpath d=%22M12 3.8a8.2 8.2 0 0 1 0 16.4z%22/%3E%3C/svg%3E");--i-ext:url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22%3E%3Cpath d=%22M7.5 16.5l9-9M9.5 7.5h7v7%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222.2%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22/%3E%3C/svg%3E");--i-go:url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22%3E%3Cpath d=%22M5 12h13M13 6.5l5.5 5.5-5.5 5.5%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222.2%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22/%3E%3C/svg%3E");--i-check:url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22%3E%3Cpath d=%22M5 12.5l4.5 4.5L19 7.5%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222.2%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22/%3E%3C/svg%3E");--i-close:url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22%3E%3Cpath d=%22M6.5 6.5l11 11M17.5 6.5l-11 11%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222.2%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22/%3E%3C/svg%3E")}
.ic{display:inline-block;width:1em;height:1em;flex:none;vertical-align:-.13em;background-color:currentColor;-webkit-mask:var(--i) center/contain no-repeat;mask:var(--i) center/contain no-repeat}
.ic-star{--i:var(--i-star)}
.ic-theme{--i:var(--i-theme)}
.ic-ext{--i:var(--i-ext)}
.ic-go{--i:var(--i-go)}
.ic-check{--i:var(--i-check)}
.ic-close{--i:var(--i-close)}
.big .ic-star{width:.78em;height:.78em;vertical-align:.02em;margin-left:.04em}
.btn .ic-ext{width:1.05em;height:1.05em;margin-left:-1px}
.btn .ic-go{width:1em;height:1em;margin-left:6px}
.repo span{white-space:nowrap}
.repo span .ic{margin-left:2px}
.theme .ic{width:16px;height:16px}
.sheet .x .ic{width:15px;height:15px}
.copy .ok{grid-auto-flow:column;justify-content:center;gap:5px}

/* ---------- groups ---------- */
.grp+.grp{margin-top:44px}
@media (max-width:520px){.grp+.grp{margin-top:32px}}

/* ---------- card ---------- */
.card{position:relative;background:var(--card);border-radius:var(--r);padding:24px;gap:12px;box-shadow:var(--shadow);overflow:hidden;display:flex;flex-direction:column;justify-content:space-between;text-align:left;
  transition:transform .5s var(--spring-b,ease),box-shadow .3s ease;will-change:transform}
button.card{width:100%;height:100%}
.card.tap{cursor:pointer}
.card.tap:hover{box-shadow:var(--shadow-hover)}
.card.tap:active,.card.tap.pressed{transform:scale(.97);transition:transform .12s ease-out}  /* (2) press feedback */
.hd{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.hd>.lab{line-height:28px}
.hd:has(.more),.hd:has(.ico){min-height:44px;align-items:center}
.hd .id{display:flex;align-items:center;gap:12px;min-width:0}
@media (max-width:520px){.card:not(.m-w2):not(.mini) .hd{align-items:flex-start}.card:not(.m-w2):not(.mini) .hd .id{flex-direction:column;align-items:flex-start;gap:8px}}   /* half-width tile: icon above the name, clear of the + */
.card .more{flex:none;position:relative;width:30px;height:30px;border-radius:50%;background:var(--chip);color:var(--ink2);font-size:0;transition:transform .35s var(--spring-b,ease),background .2s ease}
.card .more:before{content:"";position:absolute;inset:0;margin:auto;width:14px;height:14px;background-color:currentColor;-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22%3E%3Cpath d=%22M14 4.5h5.5V10M19.5 4.5L13.5 10.5M10 19.5H4.5V14M4.5 19.5l6-6%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222.2%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22%3E%3Cpath d=%22M14 4.5h5.5V10M19.5 4.5L13.5 10.5M10 19.5H4.5V14M4.5 19.5l6-6%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222.2%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22/%3E%3C/svg%3E") center/contain no-repeat}   /* expand, not "add": the card opens into a sheet */
.card .more:after{content:none}
.card.tap:hover .more{transform:scale(1.12);background:color-mix(in srgb,var(--chip) 70%,var(--ink) 12%)}
.card.tap:active .more{transform:scale(.94)}
.lab{font-size:12px;font-weight:600;color:var(--ink3);letter-spacing:.01em}
.t{font-weight:600;font-size:19px;letter-spacing:-.02em;line-height:1.2}
.s{font-size:14px;color:var(--ink2);line-height:1.42}
.ico{width:44px;height:44px;border-radius:11px;display:block;flex:none}
.big{font-size:44px;font-weight:700;letter-spacing:-.05em;line-height:1}
/* stack: a chaos of tools that tidies itself on hover */
.card.stack{flex-direction:row;align-items:stretch}
.stack .txt{flex:0 0 44%;display:flex;flex-direction:column;justify-content:space-between;gap:10px;min-width:0}
.stack .chaos{flex:1;position:relative;container-type:size;margin:-8px -8px -8px 0}
.stack .chaos i{position:absolute;left:0;top:0;width:24px;height:24px;margin:-12px 0 0 -12px;background-color:currentColor;color:var(--ink);
  -webkit-mask:var(--m) center/contain no-repeat;mask:var(--m) center/contain no-repeat;opacity:var(--o);
  transform:translate(calc(var(--x) * 1cqw),calc(var(--y) * 1cqh)) rotate(var(--r)) scale(var(--s));
  transition:none}
.settled .stack .chaos i{transition:transform .8s var(--spring,ease) var(--d),opacity .4s ease}  /* only once layout is final, or icons fly in from the corner on load */
.stack:hover .chaos i{transform:translate(calc(var(--gx) * 1cqw),calc(var(--gy) * 1cqh));opacity:.8}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
@media (max-width:520px){.card.stack{flex-direction:column}.stack .txt{flex:none}.stack .chaos{flex:none;height:112px;margin:0 -6px -6px}}
@media (prefers-reduced-motion:reduce){.settled .stack .chaos i{transition:none}}
.chips{display:flex;flex-wrap:wrap;gap:6px}
.chip{background:var(--chip);border-radius:99px;padding:5px 11px;font-size:12.5px;font-weight:500;color:var(--ink)}
.btns{display:flex;flex-wrap:wrap;gap:6px}
.btn{background:var(--chip);border-radius:99px;padding:8px 14px;font-size:14px;font-weight:500;display:inline-flex;align-items:center;gap:6px;transition:background .2s ease,transform .12s ease-out;white-space:nowrap}
.btn:hover{background:color-mix(in srgb,var(--chip) 80%,var(--ink) 8%)}
.btn:active{transform:scale(.96)}

/* initial load stagger (7) */
@keyframes appear{from{opacity:0;filter:blur(10px);transform:translateY(14px) scale(.975)}to{opacity:1;filter:blur(0);transform:none}}
.intro .card{animation:appear .7s var(--spring,ease) both;animation-delay:var(--d,0ms)}

/* me */

.me .av{width:56px;height:56px;border-radius:50%}
.me h1{margin-top:auto;font-size:clamp(34px,4.4vw,52px);font-weight:700;letter-spacing:-.045em;line-height:1}
.me .role{font-size:clamp(17px,1.7vw,21px);color:var(--ink2);line-height:1.35;letter-spacing:-.015em;margin-top:12px;max-width:30ch}
.me .role b{color:var(--ink);font-weight:600}
.me .role{max-width:34ch}
.me .btn.primary{background:var(--ink);color:var(--bg)}
.me .btn.primary:hover{background:color-mix(in srgb,var(--ink) 85%,var(--bg))}
.seg{display:flex;background:var(--chip);border-radius:99px;padding:3px;gap:2px}
.seg button{font-size:12px;font-weight:600;padding:5px 10px;border-radius:99px;color:var(--ink2);transition:background .25s ease,color .25s ease}
.seg button[aria-pressed="true"]{background:var(--card);color:var(--ink);box-shadow:0 1px 3px rgba(0,0,0,.12)}
.tools{display:flex;gap:8px;align-items:center}
.theme{width:30px;height:30px;border-radius:50%;background:var(--chip);display:grid;place-items:center;font-size:14px}

/* fstik: a normal card; the stickers and one violet number carry it */
.fs .n{font-size:clamp(38px,3.9vw,44px);font-weight:700;letter-spacing:-.05em;line-height:.95}
.fs .fx{display:flex;align-items:flex-end;gap:24px;flex-wrap:wrap}
.fs .main .s,.fs .stats .s{display:block;margin-top:3px}
.fs .sub{margin-top:8px;color:var(--ink2)}
.fs .stats{display:flex;gap:20px;flex:none}
.fs .stats b{display:block;font-size:20px;font-weight:600;letter-spacing:-.03em;line-height:1.1}
.fs .surf{display:flex;gap:6px;flex-wrap:wrap}
.fs .surf b{font-weight:600}
.fs .surf span{background:var(--chip);border-radius:99px;padding:5px 11px;font-size:12.5px;font-weight:500;color:var(--ink2)}
.fs .surf span b{color:var(--ink)}
.fs .stk{position:absolute;right:62px;top:16px;width:140px;height:60px;pointer-events:none}
.fs .stk img{position:absolute;width:48px;height:48px;object-fit:contain;filter:drop-shadow(0 6px 10px rgba(0,0,0,.16));transition:transform .6s var(--spring-b,ease)}
.fs .stk img:nth-child(1){right:0;top:2px;transform:rotate(10deg)}
.fs .stk img:nth-child(2){right:44px;top:10px;transform:rotate(-7deg)}
.fs .stk img:nth-child(3){right:88px;top:0;transform:rotate(4deg)}
.fs:hover .stk img:nth-child(1){transform:rotate(15deg) translateY(-3px)}
.fs:hover .stk img:nth-child(2){transform:rotate(-12deg) translateY(-3px)}
.fs:hover .stk img:nth-child(3){transform:rotate(-1deg) translateY(-3px)}
@media (max-width:520px){.fs .stk{transform:scale(.7);transform-origin:top right;right:58px}}
.sheet .stickers{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin:4px 0 18px}
.sheet .stickers img{width:100%;aspect-ratio:1;object-fit:contain;background:var(--chip);border-radius:16px;padding:10px}

/* live news */
.news .stats{display:flex;gap:26px}
.news .stats b{display:block;font-size:clamp(34px,3.6vw,40px);font-weight:700;letter-spacing:-.045em;line-height:1}
.news .stats .s{display:block;margin-top:4px}
.news .sub{margin-top:10px;color:var(--ink2)}
.news .surf{display:flex;gap:6px;flex-wrap:wrap}
.news .surf span{background:var(--chip);border-radius:99px;padding:5px 11px;font-size:12.5px;font-weight:500;color:var(--ink2)}
.news .surf span b{color:var(--ink);font-weight:600}

/* quotly */
.q .fx{display:flex;align-items:flex-end;justify-content:space-between;gap:20px}
.q .qs{flex:0 1 280px;min-width:0;display:flex;flex-direction:column;gap:8px;align-items:flex-start}
.q .qs img{display:block;width:100%;height:auto;filter:drop-shadow(0 6px 12px rgba(0,0,0,.14))}
.q .qs img:nth-child(1){width:96%;transform:rotate(-2deg)}
.q .qs img:nth-child(2){width:88%;transform:rotate(1.5deg);margin-left:8%}
.q .stats{display:flex;flex-wrap:wrap;gap:8px 18px;flex:0 1 auto}
.q .stats .s{display:block;line-height:1.25}
.q .stats b{display:block;font-size:26px;font-weight:700;letter-spacing:-.04em;line-height:1.05}

/* capka: the real app in a window that bleeds off the right edge */
.capka .win{position:absolute;left:52%;top:84px;width:520px;aspect-ratio:16/9;border-radius:12px;overflow:hidden;background:#000;
  border:1px solid var(--line);box-shadow:0 16px 40px rgba(0,0,0,.18);transition:transform .6s var(--spring-b,ease)}
.capka .win video{display:block;width:100%;height:100%;object-fit:cover}
.capka .tag{max-width:46%;margin-top:auto;font-size:19px;font-weight:600;letter-spacing:-.02em;line-height:1.25}
.capka .chips{max-width:46%}
.capka.tap:hover .win{transform:translate(-6px,-4px)}
@media (max-width:640px){.capka .win{position:relative;left:0;top:0;width:100%;margin-top:4px}.capka .tag,.capka .chips{max-width:none}.capka .tag{margin-top:4px}.capka .chips{order:2}.capka .win{order:3;margin-bottom:-44px}}
.sheet video{width:100%;border-radius:16px;display:block;margin:4px 0 18px;background:#000}

/* violet stays on graphics (dots, focus); the award keeps its gold numeral */
.award .big{background:linear-gradient(135deg,#e2a90f,#b7791f);-webkit-background-clip:text;background-clip:text;color:transparent}
.award .lab{color:#9a6a00}
:root[data-theme="dark"] .award .lab{color:#e8b64a}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) .award .lab{color:#e8b64a}}

/* path — dots and line share one axis at x=6px */
.path ol{list-style:none;display:flex;flex-direction:column;gap:9px;flex:1}
.path li{flex:1 0 auto}.path li:last-child{flex:none}   /* spread the steps down the tall card; each connector grows with its step */
.path li{position:relative;padding-left:22px;font-size:14px;line-height:1.3}
.path li span{display:block;font-size:11.5px;line-height:15px;color:var(--ink3);font-weight:500}
.path li:before{content:"";position:absolute;left:2px;top:3.5px;width:8px;height:8px;border-radius:50%;box-sizing:border-box;background:var(--card);border:2px solid var(--ink3);z-index:1}
.path li:not(:last-child):after{content:"";position:absolute;left:5px;top:13px;bottom:-11px;width:2px;background:var(--line)}
.path li.now{font-weight:600}
.role-card .prev{display:flex;align-items:center;gap:8px;font-size:13px;color:var(--ink2);border-top:1px solid var(--line);padding-top:10px}
.role-card .prev img{width:20px;height:20px;border-radius:6px}
.path li.now:before{left:1px;top:2.5px;width:10px;height:10px;background:var(--accent);border-color:var(--accent);box-shadow:0 0 0 3px color-mix(in srgb,var(--accent) 22%,transparent)}

/* github */


/* work: neutral tile, text carries it */
/* how I work: me at the hub, agents around; tasks go out, results come back */
.work{flex-direction:row;align-items:stretch}
.work .txt{flex:0 0 44%;display:flex;flex-direction:column;justify-content:space-between;gap:10px;min-width:0}
.work .hub{flex:1;position:relative;container-type:size}
.work .hub svg{position:absolute;inset:0;width:100%;height:100%;overflow:visible}
.work .hub line{stroke:var(--line);stroke-width:1.5;vector-effect:non-scaling-stroke}
.work .node,.work .dot{position:absolute;left:0;top:0;transform:translate(calc(var(--x) * 1cqw - 50%),calc(var(--y) * 1cqh - 50%))}
.work .node{width:38px;height:38px;border-radius:12px;background:var(--chip);display:grid;place-items:center;overflow:hidden;box-shadow:0 0 0 4px var(--card)}
.work .node i{width:19px;height:19px;background-color:var(--ink);-webkit-mask:var(--m) center/contain no-repeat;mask:var(--m) center/contain no-repeat}
.work .node img{width:100%;height:100%;object-fit:cover}
.work .node.agent img{width:24px;height:24px}
.work .node.me{width:48px;height:48px;border-radius:50%}
.work .dot{width:8px;height:8px;border-radius:50%;background:var(--accent);opacity:0}
.work.run .dot{animation:trip .75s cubic-bezier(.45,0,.25,1) var(--d) 2 alternate both}
.work.run .agent{animation:ping .5s var(--spring-b,ease) calc(var(--d) + .7s) both}
.work.run .node.me{animation:ping .5s var(--spring-b,ease) 1.9s both}
@keyframes trip{0%{opacity:0;transform:translate(calc(50cqw - 50%),calc(50cqh - 50%))}20%{opacity:1}100%{opacity:1;transform:translate(calc(var(--x) * 1cqw - 50%),calc(var(--y) * 1cqh - 50%))}}
@keyframes ping{50%{box-shadow:0 0 0 4px var(--card),0 0 0 7px color-mix(in srgb,var(--ink) 18%,transparent)}}
@media (max-width:520px){.work{flex-direction:column}.work .txt{flex:none}.work .hub{flex:none;height:128px}}
@media (prefers-reduced-motion:reduce){.work .dot,.work .node{animation:none!important}}

/* bots */
.card.mini{justify-content:center}
.bento:has(>.mini){grid-auto-rows:auto}.bento:has(>.mini)>.card:not(.mini){min-height:168px}   /* the minor products get a short row of their own */
@media (max-width:520px){.bento:has(>.mini)>.card:not(.mini){min-height:142px}}
.mini .hd .id{flex:1}
.bots.mini .hd .id{justify-content:space-between;gap:16px}
.bots .row{display:flex;justify-content:flex-start;gap:8px}
.bots.mini .row span{flex:none;width:36px;max-width:none;border-radius:10px}
.bots.mini .t{white-space:nowrap}
@media (max-width:520px){.bots.mini .row{gap:6px}.bots.mini .row span{width:30px;border-radius:8px}}
.bots .row span{flex:1 1 0;max-width:48px;aspect-ratio:1;border-radius:12px;background:var(--chip);overflow:hidden;display:block}
.bots .row span img{display:block;width:100%;height:100%;object-fit:cover}

/* open for: a live status dot instead of a green tile */
.open .lab{display:inline-flex;align-items:center;gap:7px;color:#1f7a45}
.open .lab:before{content:"";width:8px;height:8px;border-radius:50%;background:#30d158;box-shadow:0 0 0 3px rgba(48,209,88,.2)}
:root[data-theme="dark"] .open .lab{color:#5fe08a}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) .open .lab{color:#5fe08a}}

/* ask ai: neutral tile, dark buttons carry the action */
.ai .prompt .url{white-space:nowrap}
.ai .btn{background:var(--ink);color:var(--bg)}
.ai .btn:hover{background:color-mix(in srgb,var(--ink) 85%,var(--bg))}
.ai .pcopy{display:block;text-align:left;border-left:2px solid var(--line);padding:2px 0 2px 10px;cursor:copy;transition:border-color .2s ease}
.ai .prompt{display:block;font-size:13px;color:var(--ink2);line-height:1.4;max-width:52ch;transition:color .2s ease}
.ai .pcopy .hint{display:block;margin-top:6px;font-size:12px;font-weight:600;color:var(--ink3);transition:color .2s ease}
.ai .pcopy:hover{border-color:var(--ink3)}.ai .pcopy:hover .prompt{color:var(--ink)}.ai .pcopy:hover .hint{color:var(--ink2)}
.ai .pcopy:active .prompt{opacity:.7}
.ai .pcopy.done{border-color:var(--accent)}.ai .pcopy.done .hint{color:var(--ink)}

/* copy (3) */
.copy{position:relative;overflow:hidden}
.copy .ok{position:absolute;inset:0;display:grid;place-items:center;background:var(--ink);color:var(--bg);border-radius:inherit;transform:translateY(100%);visibility:hidden;transition:transform .35s var(--spring,ease),visibility 0s .35s}  /* hidden, or its antialiased edge shows under the pill */
.copy.done .ok{transform:none;visibility:visible;transition:transform .35s var(--spring,ease),visibility 0s}

/* ---------- lang crossfade (5) ---------- */
[data-i]{transition:opacity .16s ease}
body.swapping [data-i]{opacity:0}

/* ---------- sheet (1) ---------- */
.scrim{position:fixed;inset:0;background:var(--scrim);-webkit-backdrop-filter:blur(14px) saturate(140%);backdrop-filter:blur(14px) saturate(140%);opacity:0;pointer-events:none;transition:opacity .45s ease;z-index:40}
.scrim.on{opacity:1;pointer-events:auto}
.sheet{position:fixed;z-index:50;left:50%;top:50%;width:min(680px,calc(100vw - 32px));max-height:min(760px,calc(100vh - 64px));translate:-50% -50%;
  background:var(--card);border-radius:32px;box-shadow:0 30px 80px rgba(0,0,0,.25);display:none;will-change:transform,clip-path;flex-direction:column;overflow:hidden;transform-origin:0 0;touch-action:none}
.sheet.open{display:flex}
.sheet .grab{height:22px;display:grid;place-items:center;cursor:grab;flex:none}
.sheet .grab i{width:38px;height:5px;border-radius:9px;background:var(--line);background:color-mix(in srgb,var(--ink) 18%,transparent)}
.sheet .x{position:absolute;top:16px;right:16px;width:32px;height:32px;border-radius:50%;background:var(--chip);display:grid;place-items:center;font-size:16px;color:var(--ink2);z-index:2}
.sheet .body{overflow:auto;padding:8px 32px 32px;opacity:0;filter:blur(10px);transform:scale(.97);transform-origin:50% 0;transition:opacity .18s ease,filter .18s ease,transform .18s ease;touch-action:pan-y}
.sheet.content-on .body{opacity:1;filter:blur(0);transform:none;transition:opacity .4s ease,filter .45s ease,transform .6s var(--spring,ease)}
.sheet h2{font-size:34px;font-weight:700;letter-spacing:-.04em;line-height:1.05;margin:10px 0 6px}
.sheet .sub{font-size:19px;color:var(--ink2);letter-spacing:-.015em;line-height:1.35;margin-bottom:22px}
.sheet p{font-size:16px;line-height:1.55;color:var(--ink2);margin-bottom:14px}
.sheet p b{color:var(--ink);font-weight:600}
.sheet .kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:10px;margin:18px 0 22px}
.sheet .kpi{background:var(--chip);border-radius:18px;padding:14px 16px}
.sheet .kpi b{display:block;font-size:26px;font-weight:700;letter-spacing:-.04em}
.sheet .kpi span{font-size:13px;color:var(--ink2)}
.sheet h3{font-size:13px;font-weight:600;color:var(--ink3);margin:22px 0 10px}
.sheet .list{display:flex;flex-direction:column;border-top:1px solid var(--line)}
.sheet .list a,.sheet .list div{display:flex;justify-content:space-between;gap:16px;padding:13px 0;border-bottom:1px solid var(--line);font-size:15px}
.sheet .list span{color:var(--ink2)}
.sheet .btns{margin-top:22px}
.sheet .btn.primary{background:var(--accent);color:#fff}
.sheet .hero-ico{width:64px;height:64px;border-radius:16px}
@media (max-width:640px){
  .sheet{left:0;top:auto;bottom:0;translate:none;width:100%;max-height:92vh;max-height:calc(100svh - 12px - env(safe-area-inset-top));border-radius:30px 30px 0 0}
  .sheet .body{padding:4px 22px calc(28px + env(safe-area-inset-bottom))}
  .sheet h2{font-size:28px}
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion:reduce){
  *,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important}
  .card,.hdr,.copy .ok{transition:opacity .2s ease!important}
  .card.tap:active{transform:none}
}
@media (prefers-reduced-transparency:reduce){.hdr{background:var(--bg);backdrop-filter:none}}

.foot a{text-decoration:underline;text-underline-offset:3px;text-decoration-color:var(--line)}
.foot a:hover{color:var(--ink)}
.foot{max-width:1120px;margin:0 auto;padding:0 20px 60px;font-size:12px;color:var(--ink3);display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap}

/* ---------- additions over the prototype ---------- */
#sheet-src{display:none}
.me .av{background:var(--chip)}
.skip{position:absolute;left:-9999px}
.skip:focus{left:16px;top:12px;z-index:60;background:var(--ink);color:var(--bg);padding:8px 12px;border-radius:10px}
@media (prefers-contrast:more){.card{box-shadow:0 0 0 1px var(--ink3)}.chip,.btn{outline:1px solid var(--ink3)}}

/* ---------- sheets v2: product hero, visual first, sticky actions ---------- */
.sheet .body{padding:0 0 0}
.sheet .body>*:not(.sh-hero):not(.sh-actions){margin-left:32px;margin-right:32px}
.sh-hero{display:flex;gap:16px;align-items:center;padding:34px 32px 26px;margin-bottom:20px;background:var(--chip)}
.sh-hero .hero-ico{width:64px;height:64px;border-radius:16px;flex:none;box-shadow:0 6px 18px rgba(0,0,0,.14)}
.sh-hero h2{margin:0 0 4px}
.sh-hero .sub{margin:0;font-size:17px}
.sheet[data-kind="fstik"] .sh-hero{background:linear-gradient(160deg,#3b8cf2,#2457c5);color:#fff}
.sheet[data-kind="capka"] .sh-hero{background:radial-gradient(90% 120% at 100% 100%,rgba(255,122,61,.35),transparent 60%),#0e0e10;color:#f5f5f7}
.sheet[data-kind="quotly"] .sh-hero{background:linear-gradient(160deg,#8f7bff,#6d5dfc);color:#fff}
.sheet[data-kind="hortay"] .sh-hero{background:linear-gradient(160deg,#7c6cf0,#5b4fd6);color:#fff}
.sheet[data-kind="github"] .sh-hero{background:#0b0b0c;color:#f5f5f7}
.sheet[data-kind="fstik"] .sh-hero .sub,.sheet[data-kind="capka"] .sh-hero .sub,.sheet[data-kind="quotly"] .sh-hero .sub,
.sheet[data-kind="hortay"] .sh-hero .sub,.sheet[data-kind="github"] .sh-hero .sub{color:inherit;opacity:.85}
.sheet[data-kind="fstik"] .x,.sheet[data-kind="capka"] .x,.sheet[data-kind="quotly"] .x,.sheet[data-kind="hortay"] .x,.sheet[data-kind="github"] .x{background:rgba(255,255,255,.18);color:#fff}
.sheet .grab{position:absolute;top:0;left:0;right:0;z-index:2}
.sh-media{margin-bottom:20px}
.sh-media .stickers{margin:0}
.sh-media video{margin:0}
.sh-media.quotes{display:flex;flex-direction:column;gap:10px;align-items:flex-start;background:var(--chip);border-radius:20px;padding:18px}
.sh-media.quotes img{max-width:100%;height:auto;filter:drop-shadow(0 6px 12px rgba(0,0,0,.12))}
.sh-media.quotes img:nth-child(2){margin-left:10%}
.sh-media.path ol{list-style:none;display:flex;flex-direction:column;gap:14px;background:var(--chip);border-radius:20px;padding:20px 20px 20px 18px}
.sh-media.path li{position:relative;padding-left:26px;font-size:16px;line-height:1.3}
.sh-media.path li span{display:block;font-size:12px;color:var(--ink3);font-weight:600}
.sh-media.path li:before{content:"";position:absolute;left:2px;top:4px;width:10px;height:10px;border-radius:50%;border:2px solid var(--ink3);background:var(--chip);box-sizing:border-box;z-index:1}
.sh-media.path li:not(:last-child):after{content:"";position:absolute;left:6px;top:15px;bottom:-17px;width:2px;background:var(--line)}
.sh-media.path li.now{font-weight:600}
.sh-media.path li.now:before{background:var(--accent);border-color:var(--accent);box-shadow:0 0 0 4px color-mix(in srgb,var(--accent) 22%,transparent)}
.sh-media.stack{display:flex;flex-wrap:wrap;gap:8px}
.sh-media.stack span{background:var(--chip);border-radius:12px;padding:10px 14px;font-size:14px;font-weight:600}
.sh-media.repos,.sh-media.bots{display:flex;flex-direction:column;border-top:1px solid var(--line)}
.repo{display:grid;grid-template-columns:140px 1fr 64px;align-items:center;gap:14px;padding:12px 0;border-bottom:1px solid var(--line);font-size:15px}
.repo>i{display:block;height:8px;width:var(--w);min-width:6px;border-radius:9px;background:linear-gradient(90deg,var(--accent),color-mix(in srgb,var(--accent) 60%,#8f7bff))}
.repo span{text-align:right;color:var(--ink2);font-variant-numeric:tabular-nums}
.bot{display:flex;align-items:center;gap:14px;padding:12px 0;border-bottom:1px solid var(--line)}
.bot img{width:44px;height:44px;border-radius:11px}
.bot b{display:block;font-size:16px}
.bot span{font-size:14px;color:var(--ink2)}
.bot em{margin-left:auto;font-style:normal;color:var(--ink3)}
.sh-actions{position:sticky;bottom:0;display:flex;gap:8px;flex-wrap:wrap;padding:16px 32px calc(18px + env(safe-area-inset-bottom));margin-top:22px;
  background:color-mix(in srgb,var(--card) 78%,transparent);-webkit-backdrop-filter:saturate(180%) blur(16px);backdrop-filter:saturate(180%) blur(16px);border-top:1px solid var(--line)}
.sh-actions .btn{padding:11px 18px;font-size:15px}
.sh-actions{border-radius:0 0 32px 32px}   /* backdrop-filter ignores the sheet's overflow radius */
@media (max-width:640px){.sh-actions{border-radius:0}}
.sheet .body>*:last-child:not(.sh-actions){margin-bottom:32px}
@media (max-width:640px){
  .sheet .body>*:not(.sh-hero):not(.sh-actions){margin-left:22px;margin-right:22px}
  .sh-hero{padding:30px 22px 22px}.sh-actions{padding-left:22px;padding-right:22px}
  .repo{grid-template-columns:110px 1fr 58px}
}

/* ---------- calm scrolling ---------- */
html.sheet-open{overflow:hidden}
.sheet .body{overscroll-behavior-x:contain}
.scrim{overscroll-behavior:contain}

/* ---------- sheet scrolling: no native gutter, iOS-style overlay indicator, no rubber band + compact title ---------- */
.sheet .body{scrollbar-width:none;overscroll-behavior-y:none}
.sheet .body::-webkit-scrollbar{display:none}
.sh-thumb{position:absolute;right:4px;top:0;width:5px;border-radius:5px;z-index:4;pointer-events:none;opacity:0;transition:opacity .5s ease;
  background:color-mix(in srgb,var(--ink) 40%,transparent);box-shadow:0 0 0 1px color-mix(in srgb,var(--card) 50%,transparent)}
.sh-thumb.on{opacity:1;transition:opacity .12s ease}
.sh-bar{position:absolute;top:0;left:0;right:0;z-index:2;height:56px;display:flex;align-items:center;justify-content:center;padding:0 64px;
  font-weight:600;font-size:16px;letter-spacing:-.01em;color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
  background:color-mix(in srgb,var(--card) 80%,transparent);-webkit-backdrop-filter:saturate(180%) blur(18px);backdrop-filter:saturate(180%) blur(18px);
  border-bottom:1px solid var(--line);opacity:0;transform:translateY(-6px);pointer-events:none;transition:opacity .25s ease,transform .35s var(--spring,ease)}
.sheet.scrolled .sh-bar{opacity:1;transform:none}
.sheet .x{z-index:3}
.sheet[data-input="pointer"] .x:focus{outline:none}   /* Safari rings a scripted focus even after a tap */
.sheet.scrolled .x{background:var(--chip);color:var(--ink2)}
@media (prefers-reduced-transparency:reduce){.sh-bar,.sh-actions{background:var(--card);backdrop-filter:none}}

/* phone: product cards stack their two halves */
@media (max-width:640px){
  .q .fx{flex-direction:column;align-items:flex-start;gap:12px}
  .q .qs{flex:none;width:100%;max-width:320px}
}

/* phone sheet lists: detail under the name, so long values never wrap against the right edge */
@media (max-width:640px){.sheet .list>div{flex-direction:column;gap:2px}.sheet .list>div span{text-align:left;font-size:14px}}
