/* garrickbuilds v2 — viashaan viewfinder + film grain, opusjake coding vibe, light handwriting (Cindy Zhu),
   loganlens dot-matrix footer. One accent: brand yellow #FFD400 (one primary button per page). */


:root {
  --bg: #EFEBE4;
  --surface: #F7F4EE;
  --surface-2: #E6E1D8;
  --ink: #1B1916;
  --muted: #6B655C;
  --line: rgba(27, 25, 22, .14);
  --line-strong: rgba(27, 25, 22, .32);
  --accent: #FFD400;
  --accent-ink: #1B1916;
  --accent-text: #8A6A00;           /* yellow is unreadable as text on cream; use this */
  --ok: #0E9E78;
  --bad: #C2452D;
  --glow: rgba(255, 186, 80, .22);
  --grain-opacity: .07;
  --shadow: 0 1px 2px rgba(27,25,22,.06), 0 8px 24px rgba(27,25,22,.06);

  /* Latin first so English inside Chinese uses it; then the Chinese face */
  --font-body: "Newsreader", "Chiron Sung HK", "Noto Serif HK", "Songti TC", serif;
  --font-ui: "Inter", "Chiron Hei HK", system-ui, -apple-system, "PingFang HK", sans-serif;
  --font-display: "Archivo", "Chiron Hei HK", system-ui, sans-serif;   /* zh headings: 昭源黑體香港 Heavy (Garrick picked 2026-11-13) */
  --font-heading-sm: "Archivo", "Chiron Hei HK", system-ui, sans-serif;   
  --font-serif: "Instrument Serif", "Chiron Sung HK", Georgia, serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --font-hand: "Caveat", "Iansui", cursive;
  --font-dot: "Doto", "JetBrains Mono", monospace;

  --wrap: 1120px;
  --gutter: 16px;
  --radius: 16px;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #16120E; --surface: #1F1A15; --surface-2: #2A231C; --ink: #F1ECE3; --muted: #A69D90;
  --line: rgba(241, 236, 227, .12); --line-strong: rgba(241, 236, 227, .3);
  --accent-text: #FFD400; --ok: #28E0B0; --bad: #FF7A5C; --glow: rgba(255, 160, 60, .2); --grain-opacity: .11;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 12px 32px rgba(0,0,0,.35);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #16120E; --surface: #1F1A15; --surface-2: #2A231C; --ink: #F1ECE3; --muted: #A69D90;
    --line: rgba(241, 236, 227, .12); --line-strong: rgba(241, 236, 227, .3);
    --accent-text: #FFD400; --ok: #28E0B0; --bad: #FF7A5C; --glow: rgba(255, 160, 60, .2); --grain-opacity: .11;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 12px 32px rgba(0,0,0,.35);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.7 var(--font-body); overflow-x: hidden; }
img, video { max-width: 100%; display: block; }
a { color: inherit; }
::selection { background: var(--accent); color: var(--accent-ink); }

/* film grain over everything (viashaan texture) */
.grain {
  position: fixed; inset: -50%; z-index: 60; pointer-events: none; opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1.4 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain 1.2s steps(6) infinite;
}
@keyframes grain { 0%{transform:translate(0,0)} 20%{transform:translate(-3%,2%)} 40%{transform:translate(2%,-3%)} 60%{transform:translate(-2%,-1%)} 80%{transform:translate(3%,3%)} 100%{transform:translate(0,0)} }
@media (prefers-reduced-motion: reduce) { .grain { animation: none; } }

.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }
.mono { font-family: var(--font-mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.muted { color: var(--muted); }
.hand { font-family: var(--font-hand); font-size: 26px; line-height: 1.2; color: var(--accent-text); margin: 0 0 6px; transform: rotate(-2deg); transform-origin: left; display: inline-block; }
.hand.small { font-size: 21px; transform: rotate(-1.5deg); }
:lang(zh-HK) .hand { font-size: 22px; }
:lang(zh-HK) .hand.small { font-size: 18px; }
.accent-word { font-family: var(--font-serif); font-style: italic; color: var(--accent-text); }
:lang(zh-HK) .accent-word { font-family: inherit; font-style: normal; background: linear-gradient(transparent 62%, var(--accent) 62%); color: inherit; padding: 0 .05em; }

/* ---------- floating nav (no hamburger) ---------- */
.topbar { position: fixed; top: 14px; left: 0; right: 0; z-index: 50; display: flex; justify-content: flex-end; pointer-events: none; padding-inline: max(var(--gutter), calc((100vw - var(--wrap)) / 2)); }
.site-logo { position: absolute; top: 26px; left: max(var(--gutter), calc((100vw - var(--wrap)) / 2)); z-index: 49; text-decoration: none; }
.site-logo .logo-text { font-size: 17px; }
.pill {
  pointer-events: auto; display: flex; align-items: center; gap: 2px; padding: 5px; max-width: 100%;
  background: color-mix(in srgb, var(--surface) 80%, transparent); border: 1px solid var(--line); border-radius: 0;
  backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); box-shadow: var(--shadow);
  font-family: var(--font-ui);
}
.pill a, .pill button { font: 500 14px/1 var(--font-ui); color: var(--ink); text-decoration: none; padding: 10px 14px; border-radius: 0; border: 0; background: none; cursor: pointer; white-space: nowrap; }
.pill a:hover, .pill button:hover { background: var(--surface-2); }
.pill a[aria-current="page"] { background: var(--ink); color: var(--bg); }
.pill .logo-link { padding: 8px 12px; }
.pill .sep { width: 1px; height: 20px; background: var(--line); margin: 0 4px; }
.pill .icon-btn { padding: 9px 10px; display: grid; place-items: center; }
.pill .icon-btn svg { width: 17px; height: 17px; }
.pill .lang { font-family: var(--font-mono); font-size: 12px; letter-spacing: .06em; }
.theme-icon-moon { display: none; }
:root[data-theme="dark"] .theme-icon-sun { display: none; }
:root[data-theme="dark"] .theme-icon-moon { display: block; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .theme-icon-sun { display: none; } :root:not([data-theme="light"]) .theme-icon-moon { display: block; } }

/* text logo (opusjake) */
.logo-text { font: 800 15px/1 var(--font-mono); letter-spacing: .04em; color: var(--ink); }
.logo-text span { color: var(--muted); }
@media (max-width: 560px) {
  .topbar { top: 8px; }
  .pill a, .pill button { padding: 9px 8px; font-size: 13px; }
  .pill .logo-link { padding: 8px 8px; }
  .logo-text { font-size: 12px; letter-spacing: 0; }
  .pill .sep { margin: 0 1px; }
}
@media (max-width: 400px) { .pill .logo-text span { display: none; } }

/* ---------- viewfinder primitives ---------- */
.vf {
  --vf-c: var(--accent); --vf-l: 22px; --vf-t: 2px; position: relative;
  background:
    linear-gradient(var(--vf-c), var(--vf-c)) top left / var(--vf-l) var(--vf-t) no-repeat,
    linear-gradient(var(--vf-c), var(--vf-c)) top left / var(--vf-t) var(--vf-l) no-repeat,
    linear-gradient(var(--vf-c), var(--vf-c)) top right / var(--vf-l) var(--vf-t) no-repeat,
    linear-gradient(var(--vf-c), var(--vf-c)) top right / var(--vf-t) var(--vf-l) no-repeat,
    linear-gradient(var(--vf-c), var(--vf-c)) bottom left / var(--vf-l) var(--vf-t) no-repeat,
    linear-gradient(var(--vf-c), var(--vf-c)) bottom left / var(--vf-t) var(--vf-l) no-repeat,
    linear-gradient(var(--vf-c), var(--vf-c)) bottom right / var(--vf-l) var(--vf-t) no-repeat,
    linear-gradient(var(--vf-c), var(--vf-c)) bottom right / var(--vf-t) var(--vf-l) no-repeat;
}
.vf.ink { --vf-c: var(--ink); }
.hairlines { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.hairlines::before, .hairlines::after { content: ""; position: absolute; background: var(--line); }
.hairlines::before { left: 0; right: 0; top: var(--hy, 50%); height: 1px; }
.hairlines::after { top: 0; bottom: 0; left: var(--hx, 50%); width: 1px; }
.focus-ring { position: absolute; width: 24px; height: 24px; border: 2px solid var(--accent); border-radius: 50%; transform: translate(-50%, -50%); left: var(--fx, 46%); top: var(--fy, 34%); transition: left .9s cubic-bezier(.2,.8,.2,1), top .9s cubic-bezier(.2,.8,.2,1); animation: focus 2.4s ease-in-out infinite; }
@keyframes focus { 0%,100% { box-shadow: 0 0 0 0 rgba(255,212,0,.5); } 50% { box-shadow: 0 0 0 10px rgba(255,212,0,0); } }
.tick { display: inline-flex; align-items: center; gap: 10px; }
.tick::before { content: ""; width: 1px; height: 26px; background: var(--line-strong); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px;
  font: 600 15px/1 var(--font-ui); text-decoration: none; border: 1px solid var(--line-strong); border-radius: 999px;
  color: var(--ink); background: transparent; cursor: pointer; transition: transform .15s ease, background .15s ease;
}
.btn:hover { background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn.small { min-height: 38px; padding: 0 16px; font-size: 13px; }
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; box-shadow: 0 6px 22px rgba(255, 212, 0, .28); }
.btn-primary:hover { background: #FFDD33; }
.btn-outline { border-radius: 4px; font: 500 12px/1 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; }   /* viashaan */
.btn[aria-disabled="true"] { opacity: .55; pointer-events: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.arrow { font-family: var(--font-mono); }

/* ---------- layout ---------- */
main { padding-top: 96px; position: relative; }
section { padding-block: 72px; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.08; margin: 0; letter-spacing: -.01em; }
:lang(zh-HK) h1, :lang(zh-HK) h2, :lang(zh-HK) h3 { letter-spacing: 0; }
h1 { font-size: clamp(40px, 7vw, 84px); font-weight: 900; }
h2 { font-size: clamp(28px, 4vw, 44px); font-weight: 800; }
h3 { font-size: 20px; font-weight: 800; line-height: 1.3; font-family: var(--font-heading-sm); }
@media (max-width: 899px) { h2 { font-family: var(--font-heading-sm); } }
p { margin: 0 0 1em; }
.lead { font-size: clamp(17px, 2vw, 20px); color: var(--muted); max-width: 34em; }

/* ---------- hero (viashaan) ---------- */
.hero { position: relative; padding-top: 24px; padding-bottom: 40px; }
.hero::before { content: ""; position: absolute; inset: -120px 0 0 0; background: radial-gradient(ellipse 50% 45% at 28% 38%, var(--glow), transparent 70%); pointer-events: none; }
.hero-grid { position: relative; display: grid; grid-template-columns: 1fr 1.05fr; gap: 48px; align-items: center; }
.hero-grid > * { min-width: 0; }
.hero-photo { position: relative; aspect-ratio: 4 / 5; max-width: 440px; width: 100%; justify-self: center; }
.hero-photo .frame { position: absolute; inset: 0; --hx: 46%; --hy: 34%; }
.hero-photo img { position: absolute; inset: 14px; width: calc(100% - 28px); height: calc(100% - 28px); object-fit: cover; object-position: 50% 30%; border-radius: 4px; }
.hero-photo .frame { z-index: 2; }
.hero-photo .hairlines::before, .hero-photo .hairlines::after { background: rgba(255,255,255,.18); }
.contact-photo { padding: 14px; }
.contact-photo img { border-radius: 4px; width: 100%; max-height: 620px; object-fit: cover; object-position: 60% 30%; }
.hero-photo .measure { position: absolute; right: -6px; bottom: 18%; transform: translateX(100%); }
.giant { font-family: "Archivo", var(--font-display); font-weight: 900; font-size: clamp(56px, 7.2vw, 112px); line-height: .9; letter-spacing: -.035em; margin: 4px 0 18px; }
@media (max-width: 820px) { .giant { font-size: clamp(52px, 15.5vw, 120px); } }
.giant .dot { color: var(--accent); }
.hero .hello { font-size: 30px; }
.hero .lead { margin: 14px 0 28px; }
@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; gap: 20px; }
  .hero-photo { max-width: 300px; }
  .hero-photo .measure { display: none; }
}

/* ---------- stats (count up) ---------- */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stats.four { grid-template-columns: repeat(4, 1fr); }
.stats.four .stat b { font-size: clamp(28px, 3.4vw, 46px); white-space: nowrap; }
.stat { padding: 28px 24px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat b { display: block; font: 900 clamp(34px, 5.4vw, 64px)/1 "Archivo", var(--font-display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-family: var(--font-ui); font-size: 14px; }
@media (max-width: 760px) {
  .stats, .stats.four { grid-template-columns: 1fr 1fr; }
  .stats .stat { border-bottom: 1px solid var(--line); }
  .stats .stat:nth-child(2n) { border-right: 0; }
}

/* ---------- opusjake coding bits ---------- */
.divider { display: flex; align-items: center; gap: 14px; margin: 56px 0 20px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.toollog { font-family: var(--font-mono); font-size: 13px; max-width: 760px; margin: 0 auto; }
.toollog-head { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; }
.toollog-head svg { width: 14px; height: 14px; }
.toollog-head .caret { margin-left: 4px; }
.toollog ul { list-style: none; padding: 0; margin: 0; }
.toollog li { display: grid; grid-template-columns: 20px 74px 1fr auto; gap: 8px; align-items: baseline; padding: 6px 0; border-bottom: 1px dashed var(--line); opacity: 0; transform: translateY(6px); transition: opacity .4s ease, transform .4s ease; }
.toollog.in li { opacity: 1; transform: none; }
.toollog.in li:nth-child(2) { transition-delay: .15s; } .toollog.in li:nth-child(3) { transition-delay: .3s; }
.toollog.in li:nth-child(4) { transition-delay: .45s; } .toollog.in li:nth-child(5) { transition-delay: .6s; }
.toollog .ok { color: var(--ok); }
.toollog b { font-weight: 800; }
.toollog .arg { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toollog .res { color: var(--ok); }
.typing { display: flex; gap: 8px; align-items: center; margin: 14px 0 0; text-transform: none; letter-spacing: .02em; }
.typing .spark { color: var(--accent-text); }
.typing .dots i { font-style: normal; animation: blink 1.4s infinite; }
.typing .dots i:nth-child(2) { animation-delay: .2s; } .typing .dots i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 100% { opacity: .2 } 50% { opacity: 1 } }

/* gradient cards with dithered art (opusjake "Build it yourself") */
.gcards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 900px) { .gcards { grid-template-columns: 1fr; } }
.gcard { border-radius: 22px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); display: flex; flex-direction: column; }
.gcard-art { position: relative; min-height: 330px; padding: 22px; overflow: hidden;
  background: radial-gradient(120% 80% at 100% 0%, rgba(255,212,0,.55), transparent 55%), radial-gradient(90% 70% at 0% 100%, rgba(242,166,90,.45), transparent 60%), var(--surface-2); }
.gcard-art img { position: absolute; right: -4%; bottom: -10%; width: 58%; image-rendering: pixelated; opacity: .55; mix-blend-mode: multiply; }
:root[data-theme="dark"] .gcard-art img { filter: invert(1); mix-blend-mode: screen; opacity: .42; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .gcard-art img { filter: invert(1); mix-blend-mode: screen; opacity: .42; } }
.gcard-kicker { position: relative; z-index: 1; }
.gcard-head { position: relative; z-index: 1; font-size: clamp(24px, 2.2vw, 30px); margin-top: 10px; font-family: var(--font-heading-sm); max-width: 11em; }
.pix { position: absolute; top: 16px; right: 16px; width: 34px; height: 10px; background:
  linear-gradient(var(--ink),var(--ink)) 0 0/10px 10px no-repeat, linear-gradient(var(--line-strong),var(--line-strong)) 12px 0/10px 10px no-repeat, linear-gradient(var(--line-strong),var(--line-strong)) 24px 0/10px 10px no-repeat; }
.gcard-panel { margin: -54px 14px 14px; position: relative; z-index: 2; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(6px); border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.gcard-panel p { font-size: 15px; color: var(--muted); margin: 0 0 12px; }
.gcard-row { display: flex; justify-content: space-between; align-items: end; gap: 10px; }
.gcard-num { text-align: right; font-family: var(--font-ui); line-height: 1.1; }
.gcard-num b { display: block; font: 800 16px "Archivo", sans-serif; }
.gcard-num small { color: var(--muted); font-size: 11px; }

/* ---------- marquee ---------- */
.marquee { overflow: hidden; border-block: 1px solid var(--line); padding-block: 14px; margin-top: 56px; }
.marquee-track { display: flex; gap: 40px; width: max-content; animation: marquee 38s linear infinite; }
.marquee-track span { font: 500 14px/1 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; }
.marquee-track span::before { content: "+"; color: var(--accent-text); margin-right: 40px; }
@keyframes marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee-track, .dotline-track { animation: none; } }

/* ---------- resources: search-result rows + Charlie cards ---------- */
.res-item { display: block; text-decoration: none; color: inherit; }
.res-thumb { display: none; }
.res-body { display: flex; flex-direction: column; gap: 6px; }
.res-crumb { display: flex; align-items: center; gap: 8px; font: 12px var(--font-ui); color: var(--muted); }
.fav { width: 18px; height: 18px; border-radius: 50%; background: var(--ink); box-shadow: inset 0 0 0 5px var(--ink), inset 0 0 0 9px var(--accent); flex: none; }
.res-meta { display: none; }
.res-title { font: 600 20px/1.3 var(--font-heading-sm); color: var(--ink); text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 4px; text-decoration-thickness: 2px; transition: text-decoration-color .15s; }
.res-item:hover .res-title { text-decoration-color: var(--accent); }
.res-snippet { color: var(--muted); font-size: 15px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.res-pills { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.res-date { margin-left: 4px; font-size: 11px; }
.res-read { display: none; }
.pill-tag { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; font: 500 12px/1 var(--font-ui); border: 1px solid var(--line-strong); color: var(--ink); background: var(--surface); }
.pill-tag.type { border-color: transparent; background: color-mix(in srgb, var(--tint) 45%, var(--surface)); font-family: var(--font-mono); letter-spacing: .04em; }
.pill-tag.tool { background: var(--ink); color: var(--bg); border-color: var(--ink); }

.results.list { display: grid; max-width: 780px; }
.results.list .res-item { padding: 22px 0; border-bottom: 1px solid var(--line); }
.results.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 900px) { .results.grid { grid-template-columns: 1fr; } }
.results.grid .res-item { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 10px; box-shadow: var(--shadow); transition: transform .15s ease; }
.results.grid .res-item:hover { transform: translateY(-3px); }
.results.grid .res-thumb { display: flex; flex-direction: column; justify-content: flex-end; position: relative; aspect-ratio: 16 / 10; border-radius: 14px; padding: 18px; overflow: hidden;
  background: linear-gradient(var(--line) 1px, transparent 1px) 0 0/22px 22px, linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0/22px 22px,
              linear-gradient(160deg, color-mix(in srgb, var(--tint) 30%, var(--surface)), var(--surface)); }
.res-icon { position: absolute; top: 16px; left: 16px; width: 46px; height: 46px; border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); display: grid; place-items: center; color: var(--ink); }
.res-icon svg { width: 22px; height: 22px; }
.res-badge { position: absolute; top: 18px; right: 16px; font: 600 11px/1 var(--font-mono); letter-spacing: .1em; background: var(--surface); padding: 7px 10px; border-radius: 999px; }
.res-thumb-title { font: 800 21px/1.2 var(--font-heading-sm); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.results.grid .res-body { padding: 14px 8px 8px; }
.results.grid .res-crumb, .results.grid .res-date { display: none; }
.results.grid .res-meta { display: block; font-size: 11px; }
.results.grid .res-title { font-size: 17px; }
.results.grid .res-read { display: inline; font: 600 14px var(--font-ui); color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; margin-top: 4px; }
.results.grid .res-pills .pill-tag:nth-child(n+4) { display: none; }

.lib-head { text-align: center; padding-top: 32px; }
.lib-head .hand { display: block; width: max-content; margin: 0 auto -4px; }
.lib-logo { font: 900 clamp(40px, 8vw, 76px)/1 "Archivo", var(--font-display); letter-spacing: -.02em; display: inline-block; padding: 18px 28px; }
.lib-logo em { font-family: var(--font-serif); font-style: italic; font-weight: 400; }
.search { position: relative; display: block; max-width: 640px; margin: 22px auto 10px; }
.search input { width: 100%; height: 56px; padding: 0 20px 0 52px; font: 400 16px var(--font-ui); color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 999px; outline: none; box-shadow: var(--shadow); }
.search input:focus { border-color: var(--ink); box-shadow: 0 0 0 4px rgba(255,212,0,.28); }
.search svg { position: absolute; left: 19px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); }
.filters { max-width: 780px; margin: 30px 0 0; }
.filters .hand { margin-top: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 10px; }
.chip { font: 500 13px/1 var(--font-ui); padding: 9px 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); cursor: pointer; text-decoration: none; }
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip small { font-family: var(--font-mono); opacity: .55; margin-left: 5px; }
.lib-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; border-block: 1px solid var(--line); padding: 10px 0; margin-top: 18px; font: 14px var(--font-ui); }
.view-toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.view-toggle button { border: 0; background: none; color: var(--muted); padding: 6px 12px; border-radius: 999px; cursor: pointer; font: 500 13px var(--font-ui); }
.view-toggle button[aria-pressed="true"] { background: var(--surface-2); color: var(--ink); }
.empty { padding: 40px 0; color: var(--muted); }

/* ---------- article (resource detail, legal) — Cindy Zhu ---------- */
.article { max-width: 760px; }
.article h1 { font-size: clamp(30px, 5vw, 46px); margin: 6px 0 16px; font-family: var(--font-heading-sm); font-weight: 900; }
.back { text-decoration: none; }
.intro-box { border-left: 4px solid var(--accent); background: var(--surface); border-radius: 0 12px 12px 0; padding: 16px 20px; margin: 18px 0 28px; color: var(--ink); }
.hr, hr.dash { border: 0; border-top: 2px dashed var(--line); margin: 40px 0 26px; }
.bar-h, .prose h2 { position: relative; padding-left: 14px; font-family: var(--font-heading-sm); font-size: 24px; margin: 6px 0 14px; }
.bar-h::before, .prose h2::before { content: ""; position: absolute; left: 0; top: .15em; bottom: .15em; width: 4px; border-radius: 2px; background: var(--accent); }
.src-list { padding-left: 1.2em; }
.src-list li { margin: 6px 0; }
.src-list a, .prose a { text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.prose h3 { margin: 1.6em 0 .5em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: .3em 0; }
.prose code { font: 14px var(--font-mono); background: var(--surface-2); padding: 2px 6px; border-radius: 5px; }
.code-card { margin: 1.2em 0; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: #12100D; }
.code-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 12px 9px 16px; background: #221D17; color: #EDE7DC; font: 600 13px var(--font-hand); }
:lang(zh-HK) .code-head { font-size: 15px; }
.prose pre { position: relative; background: #12100D; color: #EDE7DC; margin: 0; padding: 18px; overflow-x: auto; font: 13.5px/1.6 var(--font-mono); max-height: 520px; }
.prose > pre { border-radius: 14px; border: 1px solid var(--line); margin: 1.2em 0; }
.prose pre code { background: none; padding: 0; color: inherit; white-space: pre-wrap; word-break: break-word; }
.copy-btn { font: 600 13px/1 var(--font-ui); padding: 8px 14px; border-radius: 999px; border: 1px solid rgba(255,255,255,.25); background: transparent; color: #EDE7DC; cursor: pointer; }
.copy-btn.done { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.prose details { border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px; margin: 1.4em 0; background: var(--surface); }
.prose details summary { cursor: pointer; font: 600 15px var(--font-ui); }
.prose table { border-collapse: collapse; width: 100%; font-size: 14px; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.prose blockquote { margin: 1.2em 0; padding: 4px 18px; border-left: 3px solid var(--accent); color: var(--muted); }
.notice { padding: 14px 18px; border: 1px dashed var(--line-strong); border-radius: 12px; font-size: 14px; color: var(--muted); margin-bottom: 24px; font-family: var(--font-ui); }
.fine { font: 13px/1.5 var(--font-ui); color: var(--muted); }

/* ---------- shop (loganlens) ---------- */
.shop-h1 { font-family: "Archivo", var(--font-display); font-size: clamp(44px, 7vw, 88px); font-stretch: 112%; letter-spacing: -.03em; margin-bottom: 14px; }
.shop-tabs { margin: 20px 0 28px; }
.feat-strip { display: flex; align-items: center; gap: 20px; padding: 14px 22px 14px 14px; border-radius: 6px; background: var(--accent); color: var(--accent-ink); text-decoration: none; }
.feat-strip .box { width: 64px; flex: none; }
.feat-strip .box-name, .feat-strip .box-sub, .feat-strip .box-tag { display: none; }
.feat-text { display: flex; flex-direction: column; gap: 2px; font-family: var(--font-ui); }
.feat-text b { font: 800 20px "Archivo", sans-serif; }
.feat-go { margin-left: auto; color: var(--accent-ink); }
.dot-h { font: 900 clamp(30px, 5vw, 54px)/1 var(--font-dot); letter-spacing: .06em; margin: 64px 0 24px; padding-bottom: 14px; border-bottom: 1px solid var(--line); color: var(--muted); }
.prod-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; }
@media (max-width: 900px) { .prod-grid { grid-template-columns: repeat(2, 1fr); } }
.prod { text-decoration: none; display: flex; flex-direction: column; gap: 12px; }
.prod-row { display: flex; justify-content: space-between; gap: 10px; font: 600 14px var(--font-ui); }
.prod-price s { color: var(--muted); font-weight: 400; margin-right: 4px; }
.prod-price b { color: var(--accent-text); }
/* 3D product box */
.box { position: relative; display: block; aspect-ratio: 3 / 4; perspective: 900px; }
.box-front { position: absolute; inset: 0 8% 0 0; border-radius: 6px; overflow: hidden; transform: rotateY(-14deg); transform-origin: left center;
  background: radial-gradient(90% 60% at 100% 0%, rgba(255,212,0,.6), transparent 60%), linear-gradient(170deg, #2A231C, #120F0B); color: #F1ECE3;
  box-shadow: 18px 22px 40px rgba(0,0,0,.35), inset 0 0 0 1px rgba(255,255,255,.08); display: flex; flex-direction: column; justify-content: flex-end; padding: 14px; transition: transform .3s ease; }
.prod:hover .box-front { transform: rotateY(-6deg) translateY(-4px); }
.box-front img { position: absolute; right: -10%; bottom: 18%; width: 90%; filter: invert(1); opacity: .5; image-rendering: pixelated; }
.box-tag { position: absolute; top: 12px; left: 14px; color: #FFD400 !important; }
.box-name { position: relative; font: 900 22px/1 "Archivo", sans-serif; letter-spacing: -.01em; }
.box-sub { position: relative; color: rgba(241,236,227,.6) !important; font-size: 10px !important; margin-top: 6px; }
.box-side { position: absolute; top: 3%; bottom: 3%; right: 2%; width: 7%; background: linear-gradient(90deg, #3A3026, #1A1510); transform: skewY(-12deg); transform-origin: left; border-radius: 0 4px 4px 0; }
.box.soon .box-front { background: radial-gradient(90% 60% at 100% 0%, rgba(242,166,90,.42), transparent 60%), linear-gradient(170deg, #2A231C, #120F0B); }

/* ---------- product page (motionskill) ---------- */
.p-hero { padding-top: 24px; position: relative; overflow: hidden; }
.p-hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse 45% 40% at 50% 70%, var(--glow), transparent 70%); pointer-events: none; }
.status-pill { display: inline-flex; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); }
.status { display: inline-flex; align-items: center; gap: 8px; font: 500 12px/1 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(255,212,0,.22); }
.p-h1 { font-size: clamp(40px, 6.4vw, 76px); margin-top: 22px; }
@media (max-width: 560px) { .p-h1 { font-size: 34px; } }
.p-h1 .line2 { display: block; color: var(--muted); font-family: var(--font-heading-sm); font-size: .62em; margin-top: 10px; }
.p-hero .lead { margin-inline: auto; }
.phones { position: relative; display: flex; justify-content: center; align-items: flex-end; gap: 0; margin: 48px auto 0; height: 470px; }
.phone { position: relative; width: 210px; aspect-ratio: 9 / 19.5; border-radius: 30px; padding: 7px; background: #0E0C0A; box-shadow: 0 30px 60px rgba(0,0,0,.35), inset 0 0 0 1px rgba(255,255,255,.08); flex: none; margin: 0 -26px; }
.phone img, .phone video { width: 100%; height: 100%; object-fit: cover; border-radius: 24px; }
.phone.p1 { transform: rotate(-14deg) translateY(60px); z-index: 1; }
.phone.p2 { transform: rotate(-7deg) translateY(22px); z-index: 2; }
.phone.center { width: 236px; z-index: 3; }
.phone.p4 { transform: rotate(7deg) translateY(22px); z-index: 2; }
.phone.p5 { transform: rotate(14deg) translateY(60px); z-index: 1; }
@media (max-width: 760px) {
  .phones { height: 380px; }
  .phone { width: 150px; margin: 0 -40px; }
  .phone.center { width: 180px; }
  .phone.p1, .phone.p5 { display: none; }
}
.p-buy { display: grid; grid-template-columns: 1.2fr .8fr; gap: 40px; align-items: start; }
.price-card { position: sticky; top: 96px; background: var(--surface); border-radius: 6px; padding: 30px; display: flex; flex-direction: column; gap: 12px; }
.price { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.price b { font: 900 56px/1 "Archivo", sans-serif; letter-spacing: -.02em; }
.price s { color: var(--muted); font: 18px var(--font-ui); }
.checks { list-style: none; padding: 0; margin: 4px 0; display: grid; gap: 10px; font-family: var(--font-ui); font-size: 16px; }
.checks li { display: flex; gap: 10px; align-items: baseline; }
.checks li::before { content: "✓"; color: var(--ok); font-weight: 700; }
.trust { display: flex; flex-wrap: wrap; gap: 14px; font: 13px var(--font-ui); color: var(--muted); }
@media (max-width: 860px) { .p-buy { grid-template-columns: 1fr; } .price-card { position: static; } }

/* steps + FAQ */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.step { padding: 24px; border-right: 1px solid var(--line); }
.step:last-child { border-right: 0; }
.step .mono { display: block; margin-bottom: 10px; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } .step { border-right: 0; border-bottom: 1px solid var(--line); } .step:last-child { border-bottom: 0; } }
.faq details { border-top: 1px solid var(--line); padding: 18px 0; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font: 600 16px var(--font-ui); list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::after { content: "+"; font-family: var(--font-mono); color: var(--muted); }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 12px 0 0; color: var(--muted); }
.two-col { display: grid; grid-template-columns: 1fr 1.4fr; gap: 40px; }
.contact-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 40px; align-items: center; }
@media (max-width: 860px) { .two-col, .contact-grid { grid-template-columns: 1fr; } .contact-grid .vf { max-width: 280px; } }

/* contact */
.contact-list { display: grid; max-width: 640px; margin-top: 28px; }
.contact-list a { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 22px 0; border-top: 1px solid var(--line); text-decoration: none; font: 600 20px var(--font-ui); }
.contact-list a:last-child { border-bottom: 1px solid var(--line); }
.contact-list a span.mono { font-size: 11px; }

/* ---------- footer (loganlens dot-matrix) ---------- */
footer { margin-top: 60px; padding: 0 0 110px; font-family: var(--font-ui); font-size: 14px; color: var(--muted); }
.dotline { overflow: hidden; border-block: 1px solid var(--line); padding: 26px 0; }
.dotline-track { display: flex; width: max-content; animation: marquee 40s linear infinite; }
.dotline-track span { font: 900 clamp(64px, 11vw, 150px)/1 var(--font-dot); letter-spacing: .02em; white-space: nowrap; color: transparent;
  background: linear-gradient(100deg, var(--line-strong) 0%, var(--line-strong) 40%, var(--ink) 50%, var(--line-strong) 60%, var(--line-strong) 100%) 0 0 / 200% 100%;
  -webkit-background-clip: text; background-clip: text; animation: shimmer 5s linear infinite; }
@keyframes shimmer { from { background-position: 150% 0; } to { background-position: -50% 0; } }
.foot { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding-top: 34px; }
.foot .logo-text { font-size: 22px; }
.foot-city { margin: 8px 0 14px; }
.foot-links { display: flex; gap: 18px; flex-wrap: wrap; }
.foot-links a { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.foot-meta { text-align: right; }
.foot-meta p { margin: 0 0 6px; }
.back-top { text-decoration: none; }
@media (max-width: 640px) { .foot-meta { text-align: left; } }

/* reveal */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } .toollog li { opacity: 1; transform: none; } }


/* ---------- v3 (Garrick feedback round 2) ---------- */
h1, h2 { font-weight: 900; }
@media (max-width: 560px) {
  .topbar { top: 10px; }
  .site-logo { top: 21px; }
  .site-logo .logo-text { font-size: 13px; }
}
@media (max-width: 400px) { .site-logo .logo-text span { display: inline; } }
main { padding-top: 104px; }

/* viashaan feature sections */
.feature { padding-block: 88px; border-top: 1px solid var(--line); }
.feature-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.feature-grid.flip .feature-media { order: -1; }
.feature-grid > * { min-width: 0; }
.feature-h { font-size: clamp(40px, 5.6vw, 76px); line-height: 1.02; letter-spacing: -.02em; margin: 14px 0 22px; text-transform: uppercase; }
:lang(zh-HK) .feature-h { text-transform: none; letter-spacing: 0; line-height: 1.12; }
.feature-h em, .contact-h1 em { font-family: var(--font-serif); font-style: italic; font-weight: 400; color: var(--accent-text); text-transform: none; }
:lang(zh-HK) .feature-h em, :lang(zh-HK) .contact-h1 em { font-family: inherit; font-style: normal; font-weight: 900; }
.feature-text .lead { margin-bottom: 26px; }
.feature-text .toollog { margin: 0 0 26px; }
.feature-media { position: relative; margin: 0; aspect-ratio: 4 / 5; }
.feature-media img { position: absolute; inset: 14px; width: calc(100% - 28px); height: calc(100% - 28px); object-fit: cover; border-radius: 3px; }
.feature-media .vf { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.timecode { position: absolute; right: 26px; bottom: 26px; z-index: 3; background: rgba(0,0,0,.62); color: #F1ECE3 !important; padding: 5px 8px; border-radius: 3px; }
.feature-media figcaption { position: absolute; left: 0; bottom: -28px; }
@media (max-width: 860px) {
  .feature { padding-block: 64px; }
  .feature-grid, .feature-grid.flip { grid-template-columns: 1fr; gap: 40px; }
  .feature-grid.flip .feature-media { order: 0; }
  .feature-media { max-width: 520px; }
}
/* episode-style list (viashaan) */
.eps { border-top: 1px solid var(--line); margin: 0 0 26px; }
.ep { display: grid; grid-template-columns: 34px 1fr auto; gap: 4px 12px; align-items: baseline; padding: 14px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.ep-n { grid-row: span 2; }
.ep-t { font: 700 17px/1.35 var(--font-heading-sm); }
.ep-m { grid-column: 2; font-size: 11px; }
.ep-go { grid-column: 3; grid-row: 1; font-family: var(--font-mono); color: var(--muted); transition: transform .15s; }
.ep:hover .ep-go { transform: translate(2px, -2px); color: var(--accent-text); }
.ep:hover .ep-t { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 4px; }

/* contact (business) */
.contact-hero { padding-top: 32px; }
.contact-top { display: grid; grid-template-columns: 1.15fr .85fr; gap: 64px; align-items: end; }
.contact-h1 { font-size: clamp(44px, 5.6vw, 84px); line-height: 1; letter-spacing: -.02em; margin: 12px 0 20px; }
.channels { display: grid; grid-template-columns: 1fr; gap: 12px; margin-top: 30px; max-width: 560px; }
.channel { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 22px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--surface); text-decoration: none; transition: border-color .15s, transform .15s; }
.channel:hover { border-color: var(--ink); transform: translateY(-2px); }
.channel b { font: 700 clamp(18px, 1.8vw, 24px)/1.25 var(--font-ui); overflow-wrap: anywhere; }
.channel .muted { font: 14px var(--font-ui); }
.ch-go { position: absolute; top: 18px; right: 18px; font-family: var(--font-mono); color: var(--muted); }
.contact-portrait { position: relative; margin: 0; aspect-ratio: 4 / 5; max-width: 440px; justify-self: end; width: 100%; }
.contact-portrait img { position: absolute; inset: 14px; width: calc(100% - 28px); height: calc(100% - 28px); object-fit: cover; border-radius: 3px; }
.contact-portrait .vf { position: absolute; inset: 0; z-index: 2; }
.contact-portrait figcaption { position: absolute; left: 0; bottom: -26px; }
.ctypes { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; margin-top: 24px; }
.ctype { display: flex; flex-direction: column; gap: 8px; padding: 22px; border-right: 1px solid var(--line); font-family: var(--font-ui); }
.ctype:last-child { border-right: 0; }
.ctype .mono { color: var(--accent-text); }
.ctype b { font-size: 17px; }
.ctype .muted { font-size: 14px; }
.contact-bottom { display: grid; grid-template-columns: 1.3fr .7fr; gap: 40px; align-items: start; }
.cform { display: grid; gap: 14px; padding: 30px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.cform h2 { font-size: clamp(24px, 3vw, 32px); margin-bottom: 4px; }
.cform label { display: grid; gap: 6px; font: 600 13px var(--font-ui); }
.cform input, .cform select, .cform textarea { font: 400 16px var(--font-ui); color: var(--ink); background: var(--bg); border: 1px solid var(--line-strong); border-radius: 6px; padding: 12px 14px; outline: none; }
.cform input:focus, .cform select:focus, .cform textarea:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(255,212,0,.28); }
.cform .btn { justify-self: start; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.biz-card { padding: 28px; background: var(--surface); border-radius: 6px; }
.biz-card dl { margin: 12px 0 0; display: grid; gap: 14px; }
.biz-card dt { margin-bottom: 2px; }
.biz-card dd { margin: 0; font: 600 16px var(--font-ui); }
@media (max-width: 900px) {
  .contact-top, .contact-bottom { grid-template-columns: 1fr; gap: 40px; }
  .contact-portrait { justify-self: start; max-width: 360px; }
  .ctypes { grid-template-columns: 1fr 1fr; }
  .ctype:nth-child(2) { border-right: 0; }
  .ctype:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}
@media (max-width: 560px) { .channels, .ctypes { grid-template-columns: 1fr; } .ctype { border-right: 0; border-bottom: 1px solid var(--line); } }


/* ---------- v4 (Garrick feedback round 4) ---------- */
:root { --link: #2B3FC9; --hero-bg: #F5F3EF; --hero-ink: #111; --hero-mute: #9A9A9A; --hero-sub: #7B7B7B; --dot: #0D0D0D; }
:root[data-theme="dark"] { --link: #9DB5FF; --hero-bg: #0E0D0C; --hero-ink: #F1ECE3; --hero-mute: #77716A; --hero-sub: #A69D90; --dot: #EDE6DA; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --link: #9DB5FF; --hero-bg: #0E0D0C; --hero-ink: #F1ECE3; --hero-mute: #77716A; --hero-sub: #A69D90; --dot: #EDE6DA; } }

/* pixel wordmark (opusjake) */
.site-logo { top: 22px; line-height: 0; }
.px-logo { display: block; height: 21px; width: auto; overflow: visible; }
.px-logo .w0 { fill: var(--ink); }
.px-logo .w1 { fill: var(--accent-text); }
.px-logo .cur { fill: var(--accent); animation: px-cur 1.1s steps(1) infinite; }
@keyframes px-cur { 50% { opacity: 0; } }
.px-logo.boot path { animation: px-boot .5s steps(1) both; animation-delay: calc(var(--i) * 8ms); }
@keyframes px-boot { 0% { opacity: 0; } 35% { opacity: 1; fill: var(--accent); } 100% { opacity: 1; } }
.site-logo:hover .px-logo path:nth-child(4n+1) { animation: px-glitch .28s steps(2) 2; }
.site-logo:hover .px-logo path:nth-child(5n+3) { animation: px-glitch2 .28s steps(2) 2; }
@keyframes px-glitch { 50% { transform: translateY(-1px); fill: var(--accent); } }
@keyframes px-glitch2 { 50% { transform: translateY(1px); } }
.foot .px-logo { height: 26px; }
@media (prefers-reduced-motion: reduce) { .px-logo.boot path, .px-logo .cur { animation: none; } }

/* centered rectangular navigation; rides up to the top as you scroll */
.topbar { top: calc(12px + var(--pill-y, 1) * 46px); justify-content: center; }
main { padding-top: 128px; }
@media (max-width: 560px) {
  .site-logo { top: 18px; }
  .px-logo { height: 17px; }
  .topbar { top: calc(10px + var(--pill-y, 1) * 38px); }
  main { padding-top: 112px; }
}

/* focus lock + scroll rail (viashaan) */
.lock { position: fixed; left: 0; top: 0; width: 0; height: 0; z-index: 40; pointer-events: none; opacity: 0;
  transition: transform .3s cubic-bezier(.2,.8,.2,1), width .3s cubic-bezier(.2,.8,.2,1), height .3s cubic-bezier(.2,.8,.2,1), opacity .25s ease; }
.lock.on { opacity: 1; }
.lock i { position: absolute; width: 16px; height: 16px; border: 0 solid var(--accent); }
.lock i:nth-child(1) { top: 0; left: 0; border-top-width: 2px; border-left-width: 2px; }
.lock i:nth-child(2) { top: 0; right: 0; border-top-width: 2px; border-right-width: 2px; }
.lock i:nth-child(3) { bottom: 0; left: 0; border-bottom-width: 2px; border-left-width: 2px; }
.lock i:nth-child(4) { bottom: 0; right: 0; border-bottom-width: 2px; border-right-width: 2px; }
.rail { position: fixed; right: 12px; top: 50%; height: 120px; width: 1px; transform: translateY(-50%); background: rgba(128,128,128,.4); z-index: 40; pointer-events: none; }
.rail i { position: absolute; left: -4px; width: 9px; height: 2px; background: var(--accent); top: calc(var(--p, 0) * 100%); }
@media (prefers-reduced-motion: reduce) { .lock { transition: opacity .2s; } }

/* live dot-matrix photos */
.dots-fallback { filter: grayscale(1) contrast(1.1); }
.dots-on > .dots-fallback { display: none; }
canvas[data-dots] { display: block; }

/* hero: off-white LED wall (Kindred) */
.hero { position: relative; height: 100svh; min-height: 680px; margin-top: -128px; padding: 0; overflow: hidden; background: var(--hero-bg); }
.hero::before { content: none; }
.hero-dots { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-fallback { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); height: 62%; width: auto; max-width: none; mix-blend-mode: multiply; opacity: .9; }
.hero-copy { position: absolute; left: 50%; top: max(14%, 132px); transform: translateX(-50%); width: min(92vw, 760px); text-align: center; z-index: 3; }
.hero .hello { font-size: 26px; transform: rotate(-2deg); margin-bottom: 10px; }
.hero-h { font: 700 clamp(36px, 4.4vw, 70px)/1.08 var(--font-display); letter-spacing: -.035em; color: var(--hero-ink); margin: 0; }
:lang(zh-HK) .hero-h { letter-spacing: -.01em; font-weight: 900; line-height: 1.14; }
.hero-h span { display: block; color: var(--hero-mute); }
.hero-sub { margin: 20px auto 0; max-width: 400px; color: var(--hero-sub); font: 400 clamp(14px, 1.05vw, 16px)/1.5 var(--font-ui); }
.hero-cta { display: flex; justify-content: center; align-items: center; gap: 22px; margin-top: clamp(28px, 3.4vw, 48px); flex-wrap: wrap; }
.glow-btn { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 13px 22px; border-radius: 999px; background: #111; color: #fff; text-decoration: none;
  font: 500 14px/1 var(--font-ui); isolation: isolate; transition: transform .3s ease; }
.glow-btn::before { content: ""; position: absolute; left: 10%; right: 10%; bottom: -6px; height: 16px; border-radius: 50%; z-index: -1;
  background: linear-gradient(90deg, #ffcf5a, #7dffa8, #5ad7ff, #9b7bff, #ff6fd8, #ffb36b); filter: blur(9px); opacity: .85; transition: all .3s ease; }
.glow-btn:hover { transform: translateY(-1px); }
.glow-btn:hover::before { opacity: 1; filter: blur(12px); bottom: -9px; }
:root[data-theme="dark"] .glow-btn { background: #F1ECE3; color: #111; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .glow-btn { background: #F1ECE3; color: #111; } }
.text-link { font: 500 14px/1 var(--font-ui); color: var(--hero-ink); text-decoration: underline; text-underline-offset: 5px; text-decoration-color: var(--hero-mute); }
.text-link:hover { text-decoration-color: var(--hero-ink); }
.hero-stats { position: absolute; left: 0; right: 0; bottom: clamp(18px, 4vh, 44px); z-index: 3; display: flex; justify-content: center; padding: 0 16px; }
.hero-stats-in { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px clamp(22px, 3.4vw, 48px); padding: 12px 22px; border-radius: 999px;
  background: color-mix(in srgb, var(--hero-bg) 86%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid color-mix(in srgb, var(--hero-ink) 10%, transparent); }
.hstat { display: flex; align-items: baseline; gap: 8px; font: 500 14px var(--font-ui); color: var(--hero-sub); }
.hstat b { font: 800 20px/1 "Archivo", var(--font-display); color: var(--hero-ink); font-variant-numeric: tabular-nums; }
@media (max-width: 760px) {
  .hero { min-height: 640px; }
  .hero-copy { top: max(15%, 110px); }
  .hero-stats-in { border-radius: 16px; padding: 10px 14px; }
  .hero .hello { font-size: 21px; }
  .hero-stats { gap: 6px 18px; }
  .hstat { font-size: 12px; }
  .hstat b { font-size: 16px; }
}

/* home sections: each its own colour (viashaan espresso, paper, ink) */
.feature { border-top: 0; padding-block: clamp(80px, 11vw, 140px); background: var(--bg); color: var(--ink); position: relative; overflow: hidden; }
.tone-espresso { --bg: #1C140F; --surface: #261C15; --surface-2: #30241B; --ink: #F1E9DD; --muted: #A8998A; --line: rgba(241,233,221,.12); --line-strong: rgba(241,233,221,.3);
  --accent-text: #FFD400; --ok: #3BD9A8; --dot: #F2D7AE; --dot-mode: light; }
.tone-espresso::before { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse 45% 55% at 78% 40%, rgba(255,150,60,.16), transparent 70%); pointer-events: none; }
.tone-paper { --bg: #E8E1D2; --surface: #F2EDE3; --surface-2: #DDD5C4; --ink: #1B1916; --muted: #5F584E; --line: rgba(27,25,22,.14); --line-strong: rgba(27,25,22,.32);
  --accent-text: #8A6A00; --ok: #0E9E78; --dot: #1B1916; --dot-mode: ink; }
.tone-ink { --bg: #0A0A09; --surface: #151513; --surface-2: #1E1E1B; --ink: #F4F1EA; --muted: #9A958C; --line: rgba(244,241,234,.12); --line-strong: rgba(244,241,234,.3);
  --accent-text: #FFD400; --ok: #3BD9A8; --dot: #FFD400; --dot-mode: light; }
.feature .btn-outline { color: var(--ink); border-color: var(--line-strong); }
.feature .btn-outline:hover { background: var(--surface-2); }
.feature-h .w { opacity: .16; transition: opacity .3s ease; }
.feature-h .w.lit { opacity: 1; }
.feature-media { aspect-ratio: 4 / 5; }
.feature-media canvas, .contact-portrait canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.feature-media .dots-fallback, .contact-portrait .dots-fallback { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 4px; }
.feature-media img { inset: 0; width: 100%; height: 100%; }
.timecode { right: 12px; bottom: 12px; }
.contact-portrait { --dot: var(--ink); --dot-mode: ink; }
.contact-portrait img { inset: 0; width: 100%; height: 100%; }

/* resources: search-engine results */
.res-crumb { gap: 12px; }
.fav { width: 28px; height: 28px; box-shadow: inset 0 0 0 7px var(--ink), inset 0 0 0 14px var(--accent); }
.res-site { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.res-site b { font: 500 14px var(--font-ui); color: var(--ink); }
.res-site small { font: 12px var(--font-ui); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.results.list .res-title { font: 500 21px/1.3 var(--font-ui); color: var(--link); margin-top: 2px; }
.results.list .res-item:hover .res-title { text-decoration-color: var(--link); }
.results.list .res-item:visited .res-title { color: #6B3FA0; }
.res-snippet { font: 14.5px/1.58 var(--font-ui); }
.res-snippet b { color: var(--ink); font-weight: 700; }
.res-date { color: var(--muted); opacity: .8; }
.results.list .res-item { display: grid; grid-template-columns: minmax(0, 1fr) 92px; gap: 6px 22px; align-items: center; padding: 20px 0; }
.results.list .res-thumb { display: grid; place-items: center; order: 2; width: 92px; height: 92px; border-radius: 12px; grid-row: 1;
  background: linear-gradient(160deg, color-mix(in srgb, var(--tint) 45%, var(--surface)), var(--surface)); grid-column: 2; }
.results.list .res-thumb .res-badge, .results.list .res-thumb .res-thumb-title { display: none; }
.results.list .res-thumb .res-icon { position: static; width: 44px; height: 44px; }
.results.list .res-body { grid-column: 1; grid-row: 1; min-width: 0; }
.results.list .pill-tag { height: 22px; font-size: 11.5px; }
@media (max-width: 560px) {
  .results.list .res-item { grid-template-columns: minmax(0, 1fr) 64px; gap: 6px 14px; }
  .results.list .res-thumb { width: 64px; height: 64px; }
  .results.list .res-title { font-size: 19px; }
}
.chips.tabs { gap: 0; flex-wrap: nowrap; overflow-x: auto; border-bottom: 1px solid var(--line); margin-bottom: 14px; scrollbar-width: none; }
.chips.tabs .chip { border: 0; border-radius: 0; background: none; padding: 12px 14px 11px; border-bottom: 3px solid transparent; color: var(--muted); white-space: nowrap; }
.chips.tabs .chip:hover { color: var(--ink); }
.chips.tabs .chip[aria-pressed="true"] { color: var(--ink); background: none; border-bottom-color: var(--ink); }
.lib-stats { color: var(--muted); }
.lib-stats b { color: var(--muted); font-weight: 400; }
:root[data-theme="dark"] .contact-portrait { --dot-mode: light; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .contact-portrait { --dot-mode: light; } }


/* ---------- v5 polish (taste-skill checklist) ---------- */
:root { --ease: cubic-bezier(.2,.8,.2,1); --ease-enter: cubic-bezier(.22,1,.36,1); }

/* one focus ring: 2px in the action colour, 2px off the control, no transition */
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; }
.pill a:focus-visible, .pill button:focus-visible { outline-offset: -2px; }
.search input:focus-visible, .cform :is(input, select, textarea):focus-visible { outline: none; }

/* buttons step up 1px on hover, press sinks and scales .985 */
.btn, .glow-btn { transition: transform 150ms var(--ease), background-color 150ms var(--ease), border-color 150ms var(--ease), box-shadow 150ms var(--ease); }
@media (hover: hover) and (pointer: fine) {
  .btn:hover, .glow-btn:hover { transform: translateY(-1px); }
  .btn-outline:hover { border-color: var(--ink); }
  .arrow { display: inline-block; transition: transform 150ms var(--ease); }
  a:hover > .arrow, button:hover > .arrow { transform: translateX(3px); }
}
.btn:active, .glow-btn:active { transform: translateY(1px) scale(.985); transition-duration: 90ms; }

/* linked cards lift 2px and their border darkens a step */
.channel, .results.grid .res-item, .prod .box-front, .feat-strip { transition: transform 180ms var(--ease), border-color 180ms var(--ease), box-shadow 180ms var(--ease); }
@media (hover: hover) and (pointer: fine) {
  .channel:hover, .results.grid .res-item:hover, .feat-strip:hover { transform: translateY(-2px); }
  .results.grid .res-item:hover { border-color: var(--line-strong); box-shadow: 0 10px 24px rgba(0,0,0,.08); }
}

/* footer words rest bare; a 1px line draws left to right 4px under the word */
.foot-links a { text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; padding-bottom: 4px; transition: background-size 150ms var(--ease); }
.foot-links a:hover, .foot-links a:focus-visible { background-size: 100% 1px; }

/* the library head carries the same pixel wordmark */
.lib-logo { padding: 22px 0 12px; }
.lib-logo .px-logo { height: clamp(34px, 6vw, 60px); margin: 0 auto; }

/* hero enters once on load: lines rise out of their masks, then the rest settles */
.hero-h .ln { display: block; overflow: hidden; padding-bottom: .08em; margin-bottom: -.08em; }
.hero-h .ln > span { display: block; }
.hero-h .mute { color: var(--hero-mute); }
.hero-h span { color: inherit; }
@media (prefers-reduced-motion: no-preference) {
  [data-enter] .hero-h .ln > span { animation: gb-rise 700ms var(--ease-enter) both; }
  [data-enter] .hero-h .ln:nth-child(2) > span { animation-delay: 80ms; }
  [data-enter] :is(.hello, .hero-sub, .hero-cta, .hero-stats) { animation: gb-settle 520ms var(--ease-enter) both; }
  [data-enter] .hello { animation-delay: 0ms; }
  [data-enter] .hero-sub { animation-delay: 380ms; }
  [data-enter] .hero-cta { animation-delay: 440ms; }
  [data-enter] .hero-stats { animation-delay: 620ms; }
  [data-enter] .hero-dots { animation: gb-fade 1100ms var(--ease-enter) 200ms both; }
}
@keyframes gb-rise { from { transform: translateY(105%); } to { transform: none; } }
@keyframes gb-settle { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes gb-fade { from { opacity: 0; } to { opacity: 1; } }
.hero .hello { transform: none; }
.hero .hello { rotate: -2deg; }

/* phone: every nav control at least 44px tall */
@media (max-width: 560px) {
  .pill a, .pill button { min-height: 44px; display: inline-flex; align-items: center; }
  .pill { padding: 3px; }
}
[data-enter].entered, [data-enter].entered * { animation: none !important; }

.catalog-list { margin-block: 2rem 4rem; border-top: 1px solid var(--line); }
.catalog-item { display:grid; grid-template-columns:minmax(9rem, .6fr) 1fr 1.5fr auto; gap:1.5rem; align-items:center; padding:1.6rem 0; border-bottom:1px solid var(--line); color:var(--ink); text-decoration:none; }
.catalog-item h2, .catalog-item p { margin:0; }
.catalog-item h2 { font-size:clamp(1.3rem, 2.4vw, 2rem); }
.catalog-item:hover h2 { text-decoration:underline; text-underline-offset:.15em; }
.p-buy > *, .two-col > * { min-width:0; }
@media(max-width:700px) {
  .catalog-item { grid-template-columns:1fr auto; gap:.45rem 1rem; }
  .catalog-item > :not(:last-child) { grid-column:1; }
  .catalog-item > :last-child { grid-column:2; grid-row:1 / 4; }
  .p-hero .phones { overflow:clip; }
  .price-card, .toollog { overflow-wrap:anywhere; }
}
@media(max-width:560px) {
  .stats.four { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .stats.four .stat { min-width:0; }
  .stats.four .stat b { font-size:clamp(21px,5.7vw,28px); white-space:normal; }
}
