/* BreakTV platform docs — doc.breaktv.asia, static files on the breaktv-doc Worker (doc/site/).
   Layout follows the doc.psar.online concept; colours and type follow the BreakTV theme. */
:root {
  color-scheme: dark;
  --bg:        #070708;
  --bg-2:      #0c0c0f;
  --surface:   #121216;
  --surface-2: #18181e;
  --border:    #25252c;
  --border-hi: #37373f;
  --text:      #f4f4f6;
  --text-dim:  #a7a7b1;
  --text-mut:  #75757f;
  --red:       #e50000;
  --red-hi:    #ff4d4d;
  --red-soft:  rgba(229, 0, 0, .14);
  --radius:    16px;
  --maxw:      1180px;
  --font:      'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --cond:      'Roboto Condensed', 'Manrope', sans-serif;
  --km:        'Noto Sans Khmer', 'Manrope', sans-serif;
  --mono:      ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body { font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.65; overflow-x: hidden; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
::selection { background: var(--red); color: #fff; }
:focus-visible { outline: 2px solid var(--red-hi); outline-offset: 3px; border-radius: 6px; }
code { font-family: var(--mono); font-size: .86em; padding: 1px 6px; border-radius: 6px; background: rgba(255,255,255,.06); border: 1px solid var(--border); color: #ffd9d2; }
svg.i { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---- Cinema backdrop: red projector glow, grid, film grain ---- */
.bg-fx { position: fixed; inset: 0; z-index: -3; background:
    radial-gradient(ellipse 75% 55% at 50% -14%, rgba(229,0,0,.24), transparent 62%),
    radial-gradient(ellipse 45% 38% at 94% 6%, rgba(255,150,60,.08), transparent 60%),
    radial-gradient(ellipse 40% 34% at 4% 34%, rgba(229,0,0,.06), transparent 62%),
    radial-gradient(ellipse at bottom, #120c0d 0%, #070708 72%); }
.bg-grid { position: fixed; inset: 0; z-index: -2; opacity: .45; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.026) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,.026) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse 100% 70% at 50% 0%, #000 30%, transparent 80%);
          mask-image: radial-gradient(ellipse 100% 70% at 50% 0%, #000 30%, transparent 80%); }
.bg-grain { position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

/* ---- Nav ---- */
header.nav { position: sticky; top: 0; z-index: 100; -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%);
  background: rgba(7,7,8,.76); border-bottom: 1px solid var(--border); }
.nav-in { max-width: var(--maxw); margin: 0 auto; padding: 12px 24px; display: flex; align-items: center; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.12rem; letter-spacing: -.01em; white-space: nowrap; }
/* The logo: a play button in a square ("square play" from AnimateIcons, MIT, after Lucide), in the
   red. Pointing at the brand link plays its animation: the square draws itself in, then the play
   button pops up (the script at the bottom starts it). */
.logo { width: 30px; height: 30px; flex-shrink: 0; color: var(--red); }
.logo svg { display: block; width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  filter: drop-shadow(0 3px 10px rgba(229,0,0,.45)); }
.logo .play { transform-box: view-box; transform-origin: 12px 12px; }
.logo[data-play] .frame { stroke-dasharray: 1; animation: logo-draw .55s ease-in-out both; }
.logo[data-play] .play { animation: logo-pop .4s cubic-bezier(.34, 1.4, .64, 1) .32s both; }
@keyframes logo-draw { from { stroke-dashoffset: 1; opacity: 0; } to { stroke-dashoffset: 0; opacity: 1; } }
@keyframes logo-pop { 0% { transform: scale(0); opacity: 0; } 60% { transform: scale(1.1); opacity: 1; } 100% { transform: scale(1); opacity: 1; } }
.brand em { font-style: normal; font-family: var(--cond); font-weight: 600; font-size: .68rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--red-hi); border: 1px solid rgba(255,77,77,.42); border-radius: 6px; padding: 2px 7px; }
.nav-links { display: flex; gap: 20px; margin-left: 4px; }
.nav-links a { position: relative; padding: 4px 0; font-size: .86rem; font-weight: 600; color: var(--text-dim); white-space: nowrap; transition: color .15s; }
.nav-links a:hover, .nav-links a.on { color: var(--text); }
.nav-links a.on::after { content: ''; position: absolute; left: 0; right: 0; bottom: -3px; height: 2px; border-radius: 2px; background: var(--red); }
.nav-cta { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.btn { display: inline-flex; align-items: center; gap: 8px; font-family: inherit; font-weight: 700; font-size: .9rem; line-height: 1.2; border-radius: 10px;
  padding: 10px 18px; cursor: pointer; border: 1px solid var(--border-hi); color: var(--text); background: var(--surface-2);
  transition: transform .18s, border-color .18s, color .18s, box-shadow .18s; white-space: nowrap; }
.btn:hover { border-color: var(--red-hi); color: #fff; transform: translateY(-1px); }
.btn-red { background: linear-gradient(135deg, #ff2d2d, var(--red) 60%, #c00000); border-color: transparent; color: #fff; box-shadow: 0 8px 26px rgba(229,0,0,.35); }
.btn-red:hover { border-color: transparent; box-shadow: 0 10px 34px rgba(229,0,0,.52); }
.lang-tog { display: inline-flex; align-items: center; gap: 2px; background: var(--surface-2); border: 1px solid var(--border-hi); border-radius: 999px; padding: 3px; }
.lang-tog button { font-family: var(--font); border: none; background: none; color: var(--text-dim); font-size: .8rem; font-weight: 700;
  padding: 5px 12px; border-radius: 999px; cursor: pointer; line-height: 1.25; transition: background .15s, color .15s; }
.lang-tog button[data-l="km"] { font-family: var(--km); }
.lang-tog button.on { background: var(--red); color: #fff; }
.lang-tog button:not(.on):hover { color: #fff; }

/* ---- Hero ---- */
.hero { position: relative; isolation: isolate; overflow-x: clip; text-align: center; padding: 100px 0 76px; }
.hero::before { content: ''; position: absolute; z-index: -1; left: 50%; top: -90px; width: min(1100px, 150vw); height: 700px; transform: translateX(-50%);
  background: conic-gradient(at 50% 0%, transparent 0deg 154deg, rgba(229,0,0,.10) 166deg, rgba(255,70,70,.24) 180deg, rgba(229,0,0,.10) 194deg, transparent 206deg 360deg);
  -webkit-mask-image: radial-gradient(ellipse 55% 100% at 50% 0%, #000 22%, transparent 78%);
          mask-image: radial-gradient(ellipse 55% 100% at 50% 0%, #000 22%, transparent 78%);
  filter: blur(22px); animation: beam 7s ease-in-out infinite; pointer-events: none; }
.hero::after { content: ''; position: absolute; left: 50%; bottom: 0; width: min(920px, 92vw); height: 1px; transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, rgba(255,77,77,.55), transparent); }
@keyframes beam { 0%, 100% { opacity: .78; } 50% { opacity: 1; } }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 28px; padding: 7px 16px 7px 12px; border-radius: 999px;
  font-family: var(--cond); font-size: .8rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: #ffd2d2;
  background: var(--red-soft); border: 1px solid rgba(229,0,0,.4); }
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: #ff2b2b; animation: pulse 1.8s infinite; flex-shrink: 0; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255,60,60,.7); } 70% { box-shadow: 0 0 0 9px rgba(255,60,60,0); } 100% { box-shadow: 0 0 0 0 rgba(255,60,60,0); } }
.hero h1 { max-width: 980px; margin: 0 auto; font-weight: 800; font-size: clamp(2.5rem, 6.4vw, 4.7rem); line-height: 1.03; letter-spacing: -.04em; }
.hero h1 .g { background: linear-gradient(115deg, #ffe4dc 0%, #ff7a6b 30%, #ff2b2b 58%, #ff9a52 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; }
.hero h1, .sec-head h2 { text-wrap: balance; }
.hero p.sub, .sec-head p { text-wrap: pretty; }
.nw { white-space: nowrap; }
.hero p.sub { max-width: 720px; margin: 26px auto 0; font-size: clamp(1rem, 2.1vw, 1.15rem); color: var(--text-dim); }
.hero p.sub b { color: var(--text); font-weight: 700; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 38px; }
.stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1px; max-width: 1000px; margin: 62px auto 0; overflow: hidden;
  background: var(--border); border: 1px solid var(--border); border-radius: 18px; }
.stat { padding: 22px 10px 20px; background: rgba(11,11,13,.9); }
.stat b { display: block; font-size: 2.1rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.1;
  background: linear-gradient(160deg, #fff 35%, #c9abab); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; }
.stat span { display: block; margin-top: 7px; font-family: var(--cond); font-size: .74rem; font-weight: 600; letter-spacing: .13em; text-transform: uppercase; color: var(--text-mut); }
.rise { animation: rise .85s cubic-bezier(.2,.7,.2,1) both; }
.d1 { animation-delay: .04s; } .d2 { animation-delay: .14s; } .d3 { animation-delay: .24s; } .d4 { animation-delay: .34s; } .d5 { animation-delay: .46s; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* ---- Sections ---- */
section { position: relative; padding: 64px 0; }
.sec-head { text-align: center; max-width: 760px; margin: 0 auto 46px; }
.sec-tag { display: inline-flex; align-items: center; gap: 12px; font-family: var(--cond); font-size: .8rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--red-hi); }
.sec-tag::before, .sec-tag::after { content: ''; width: 26px; height: 1px; background: currentColor; opacity: .55; }
.sec-head h2 { margin: 14px 0 12px; font-weight: 800; font-size: clamp(1.75rem, 4vw, 2.6rem); line-height: 1.15; letter-spacing: -.03em; }
.sec-head p { color: var(--text-dim); font-size: 1.03rem; }

/* ---- Cards ---- */
.grid { display: grid; gap: 20px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
.card { --ac: 255,77,77; position: relative; overflow: hidden; padding: 26px; border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface), var(--bg-2)); border: 1px solid var(--border);
  transition: transform .22s, border-color .22s, box-shadow .22s; }
.card::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 2px; background: linear-gradient(90deg, transparent, rgb(var(--ac)), transparent); opacity: .55; }
.card::after { content: ''; position: absolute; width: 240px; height: 240px; right: -100px; top: -120px; pointer-events: none;
  background: radial-gradient(circle, rgba(var(--ac),.13), transparent 70%); }
.card:hover { transform: translateY(-4px); border-color: rgba(var(--ac),.4); box-shadow: 0 24px 60px rgba(0,0,0,.45); }
.ic { width: 50px; height: 50px; margin-bottom: 18px; border-radius: 14px; display: grid; place-items: center; font-size: 24px; color: rgb(var(--ac));
  background: radial-gradient(circle at 30% 20%, rgba(var(--ac),.30), rgba(var(--ac),.07) 72%); border: 1px solid rgba(var(--ac),.32);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07), 0 10px 26px rgba(var(--ac),.12); }
.card h3 { margin-bottom: 8px; font-size: 1.12rem; font-weight: 800; letter-spacing: -.01em; }
.card > p { color: var(--text-dim); font-size: .93rem; }

/* ---- Recent updates ---- */
.changelog { max-width: 880px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.log { --ac: 255,77,77; display: flex; gap: 22px; padding: 20px 24px; border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface), var(--bg-2)); border: 1px solid var(--border); transition: border-color .2s, transform .2s; }
.log:hover { border-color: rgba(var(--ac),.35); transform: translateX(3px); }
.log-when { flex-shrink: 0; width: 106px; padding-top: 2px; }
.log-when b { display: block; font-size: 1rem; font-weight: 800; }
.log-when span { font-family: var(--cond); font-size: .7rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--red-hi); }
.log-main { flex: 1; padding-left: 22px; border-left: 1px solid var(--border); }
.log-tag { display: inline-block; margin-bottom: 9px; padding: 3px 10px; border-radius: 999px; font-family: var(--cond); font-size: .68rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; background: rgba(var(--ac),.14); color: rgb(var(--ac)); }
.log-main h3 { margin-bottom: 6px; font-size: 1.1rem; font-weight: 800; letter-spacing: -.01em; }
.log-main p { color: var(--text-dim); font-size: .92rem; line-height: 1.6; }

/* ---- Screens ---- */
.browsers { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; margin-bottom: 44px; }
figure.browser { margin: 0; overflow: hidden; border-radius: 14px; background: #0f0f12; border: 1px solid var(--border-hi);
  box-shadow: 0 30px 80px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.02); }
.browser .bar { display: flex; align-items: center; gap: 7px; padding: 10px 14px; background: #16161b; border-bottom: 1px solid var(--border); }
.browser .bar i { width: 10px; height: 10px; border-radius: 50%; background: #ff5f57; opacity: .75; flex-shrink: 0; }
.browser .bar i:nth-child(2) { background: #febc2e; }
.browser .bar i:nth-child(3) { background: #28c840; }
.browser .url { flex: 1; min-width: 0; margin-left: 8px; padding: 4px 10px; border-radius: 7px; background: #0d0d10; border: 1px solid var(--border);
  font-family: var(--mono); font-size: .72rem; color: var(--text-mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.browser .url b { color: var(--text-dim); font-weight: 500; }
.browser img { display: block; width: 100%; height: auto; }
.browser figcaption { padding: 12px 16px; font-size: .85rem; color: var(--text-dim); border-top: 1px solid var(--border); }
.shots-wrap { position: relative; }
.shots { display: flex; gap: 24px; overflow-x: auto; padding: 8px 4px 26px; scroll-snap-type: x mandatory; scrollbar-width: thin; scrollbar-color: var(--border-hi) transparent; }
.shots::-webkit-scrollbar { height: 8px; }
.shots::-webkit-scrollbar-thumb { background: var(--border-hi); border-radius: 8px; }
figure.phone { flex: 0 0 auto; width: 232px; margin: 0; scroll-snap-align: center; }
.phone .frame { position: relative; aspect-ratio: 390 / 844; overflow: hidden; border: 9px solid #17171d; border-radius: 36px; background: #000;
  box-shadow: 0 24px 60px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.05); }
.phone img { display: block; width: 100%; height: 100%; object-fit: cover; }
.phone figcaption { margin-top: 14px; text-align: center; font-size: .85rem; font-weight: 600; color: var(--text-dim); }
.shots-nav { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 2px; }
.shots-nav button { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-size: 18px; cursor: pointer; color: var(--text);
  background: var(--surface-2); border: 1px solid var(--border-hi); transition: border-color .15s, color .15s; }
.shots-nav button:hover { border-color: var(--red-hi); color: var(--red-hi); }
.shots-nav .flip { transform: rotate(180deg); }
.scroll-hint { font-size: .8rem; color: var(--text-mut); }

/* ---- Pipeline & bitrate ladder ---- */
.pipe { display: flex; align-items: stretch; justify-content: center; flex-wrap: wrap; }
.step { flex: 1; min-width: 160px; max-width: 216px; padding: 20px 16px; text-align: center; border-radius: 14px;
  background: linear-gradient(180deg, var(--surface), var(--bg-2)); border: 1px solid var(--border); }
.step .n { width: 34px; height: 34px; margin: 0 auto 12px; border-radius: 50%; display: grid; place-items: center; font-family: var(--cond); font-weight: 700;
  color: #ffb8b8; background: var(--red-soft); border: 1px solid rgba(229,0,0,.45); box-shadow: 0 0 18px rgba(229,0,0,.25); }
.step h4 { margin-bottom: 6px; font-size: 1rem; font-weight: 800; }
.step p { font-size: .8rem; line-height: 1.55; color: var(--text-mut); }
.pipe .arrow { align-self: center; padding: 0 6px; font-size: 18px; color: var(--red-hi); opacity: .7; display: grid; }
/* Pipeline lanes: one row of steps per pipeline, each in its own colour (--ac). */
.lane { --ac: 255,77,77; margin-top: 56px; }
.lane-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin-bottom: 18px; }
.lane-tag { font-family: var(--cond); font-size: .72rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; padding: 5px 11px; border-radius: 999px;
  color: rgb(var(--ac)); background: rgba(var(--ac),.1); border: 1px solid rgba(var(--ac),.38); }
.lane-head h3 { font-size: 1.3rem; font-weight: 800; letter-spacing: -.01em; }
.lane-head p { flex-basis: 100%; max-width: 760px; font-size: .92rem; color: var(--text-dim); }
.lane .step .n { color: rgb(var(--ac)); background: rgba(var(--ac),.12); border-color: rgba(var(--ac),.45); box-shadow: 0 0 18px rgba(var(--ac),.22); }
.lane .pipe .arrow { color: rgb(var(--ac)); }
.ladder-box { margin-top: 28px; padding: 24px 26px 20px; border-radius: 18px; background: linear-gradient(180deg, var(--surface), var(--bg-2)); border: 1px solid var(--border); }
.ladder-head { display: flex; flex-wrap: wrap; gap: 10px 28px; align-items: flex-end; justify-content: space-between; margin-bottom: 40px; }
.ladder-head h3 { font-size: 1.2rem; font-weight: 800; letter-spacing: -.01em; }
.ladder-head p { max-width: 600px; font-size: .88rem; color: var(--text-dim); }
.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: .78rem; color: var(--text-mut); }
.legend i { display: inline-block; width: 12px; height: 12px; margin-right: 7px; vertical-align: -1px; border-radius: 3px; }
.legend .on { background: linear-gradient(180deg, #ff4d4d, #a30000); }
.legend .opt { border: 1px dashed rgba(255,77,77,.7); }
.ladder { display: grid; grid-template-columns: repeat(7, 1fr); gap: 14px; align-items: end; height: 220px; border-bottom: 1px solid var(--border-hi); }
.rung { position: relative; height: var(--h); border-radius: 8px 8px 0 0; transform-origin: bottom;
  background: linear-gradient(180deg, rgba(255,77,77,.95), rgba(150,0,0,.5)); box-shadow: 0 0 26px rgba(229,0,0,.22); }
.rung.opt { background: repeating-linear-gradient(135deg, rgba(255,77,77,.12) 0 6px, transparent 6px 12px); border: 1px dashed rgba(255,77,77,.6); border-bottom: none; box-shadow: none; }
.rung b { position: absolute; top: -24px; left: -6px; right: -6px; text-align: center; font-family: var(--mono); font-size: .7rem; font-weight: 600; color: var(--text-dim); white-space: nowrap; }
.ladder-labels { display: grid; grid-template-columns: repeat(7, 1fr); gap: 14px; margin-top: 10px; text-align: center; }
.ladder-labels div { font-family: var(--cond); font-size: .98rem; font-weight: 700; }
.ladder-labels span { display: block; font-family: var(--mono); font-size: .66rem; font-weight: 400; color: var(--text-mut); }
.js .reveal .rung { transform: scaleY(0); transition: transform 1s cubic-bezier(.2,.7,.2,1); }
.js .reveal.in .rung { transform: scaleY(1); }
.js .reveal.in .rung:nth-child(2) { transition-delay: .07s; } .js .reveal.in .rung:nth-child(3) { transition-delay: .14s; }
.js .reveal.in .rung:nth-child(4) { transition-delay: .21s; } .js .reveal.in .rung:nth-child(5) { transition-delay: .28s; }
.js .reveal.in .rung:nth-child(6) { transition-delay: .35s; } .js .reveal.in .rung:nth-child(7) { transition-delay: .42s; }

/* ---- Split panels, chips, feature lists ---- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: stretch; }
.panel { --ac: 255,77,77; position: relative; overflow: hidden; padding: 30px; border-radius: 20px;
  background: linear-gradient(160deg, var(--surface), var(--bg-2)); border: 1px solid var(--border); }
.panel h3 { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; font-size: 1.55rem; font-weight: 800; line-height: 1.25; letter-spacing: -.02em; }
.panel h3 .g { color: var(--red-hi); }
.panel > p { margin-bottom: 18px; color: var(--text-dim); }
.hdr-ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; font-size: 20px; color: rgb(var(--ac));
  background: rgba(var(--ac),.14); border: 1px solid rgba(var(--ac),.32); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 6px 13px; border-radius: 999px; font-size: .8rem; font-weight: 600; color: var(--text-dim); background: var(--surface-2); border: 1px solid var(--border); transition: border-color .15s, color .15s; }
.chip:hover { border-color: rgba(255,77,77,.6); color: #fff; }
.featlist { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; gap: 14px; align-items: flex-start; }
.row .dot { flex-shrink: 0; width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; font-size: 18px; color: rgb(var(--ac));
  background: rgba(var(--ac),.12); border: 1px solid rgba(var(--ac),.3); }
.row b { display: block; font-size: .98rem; font-weight: 800; }
.row p { font-size: .88rem; color: var(--text-dim); }

/* ---- Studio & Library: atmospheric console panels ---- */
#creators { overflow: hidden; background: #060607; }
#creators .backdrop { position: absolute; inset: 0; z-index: 0; opacity: .6; background: url('/img/backdrop.jpg') center 35% / cover no-repeat; }
#creators .backdrop::after { content: ''; position: absolute; inset: 0; background:
    radial-gradient(ellipse 75% 65% at 50% 45%, rgba(6,6,7,.15), rgba(6,6,7,.72) 100%),
    linear-gradient(180deg, rgba(6,6,7,.94) 0%, rgba(6,6,7,.42) 26%, rgba(6,6,7,.58) 72%, rgba(6,6,7,.97) 100%); }
#creators > .wrap { position: relative; z-index: 1; }
#creators .sec-head h2, #creators .sec-head p { text-shadow: 0 2px 22px rgba(0,0,0,.7); }
.console { --pc: 255,77,77; position: relative; overflow: hidden; border-radius: 18px;
  background: linear-gradient(180deg, rgba(26,14,16,.6), rgba(10,9,12,.66));
  -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid rgba(var(--pc),.3);
  box-shadow: 0 34px 90px rgba(0,0,0,.6), 0 0 46px rgba(var(--pc),.12), inset 0 1px 0 rgba(255,255,255,.05);
  transition: transform .2s, box-shadow .2s, border-color .2s; }
.console:hover { transform: translateY(-4px); border-color: rgba(var(--pc),.5); box-shadow: 0 40px 100px rgba(0,0,0,.65), 0 0 70px rgba(var(--pc),.2), inset 0 1px 0 rgba(255,255,255,.06); }
.console::before { content: ''; position: absolute; top: 0; left: 20px; right: 20px; height: 1px; background: linear-gradient(90deg, transparent, rgba(var(--pc),.85), transparent); }
.console-head { display: flex; align-items: center; gap: 10px; padding: 13px 16px; border-bottom: 1px solid rgba(var(--pc),.16); background: linear-gradient(180deg, rgba(255,255,255,.03), transparent); }
.console-tab { margin: 0; display: inline-flex; align-items: center; gap: 8px; padding: 8px 15px; border-radius: 999px; font-size: .88rem; font-weight: 800; color: #fff1f1;
  background: linear-gradient(180deg, rgba(var(--pc),.34), rgba(var(--pc),.16)); border: 1px solid rgba(var(--pc),.55); box-shadow: 0 0 20px rgba(var(--pc),.32); }
.console-tab .chev { font-family: var(--mono); font-weight: 700; opacity: .65; }
.console-dots { margin-left: auto; display: inline-flex; gap: 6px; }
.console-dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(var(--pc),.4); }
.console-body { padding: 20px 22px 24px; }
.console-comment { margin-bottom: 14px; font-family: var(--mono); font-size: .82rem; color: rgba(255,170,160,.78); }
.console-comment::before { content: '// '; opacity: .65; }
.console-list { list-style: none; counter-reset: ln; font-size: .9rem; line-height: 1.6; }
.console-list li { position: relative; padding: 8px 0 8px 46px; color: #e2d6d6; border-top: 1px dashed rgba(var(--pc),.14); }
.console-list li:first-child { border-top: none; }
.console-list li::before { counter-increment: ln; content: counter(ln, decimal-leading-zero); position: absolute; left: 0; top: 8px; width: 28px; text-align: right;
  font-family: var(--mono); font-size: .78rem; color: rgba(var(--pc),.65); font-variant-numeric: tabular-nums; }

/* ---- Admin modules ---- */
.modules { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.mod-h { grid-column: 1 / -1; margin-top: 10px; display: flex; align-items: center; gap: 12px; font-family: var(--cond); font-size: .76rem; font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase; color: var(--text-mut); }
.mod-h::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.mod-h:first-child { margin-top: 0; }
.mod { display: flex; align-items: center; gap: 12px; padding: 14px 15px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); transition: border-color .18s, transform .18s; }
.mod:hover { border-color: rgba(255,77,77,.55); transform: translateY(-2px); }
.mod .mi { width: 34px; height: 34px; flex-shrink: 0; border-radius: 9px; display: grid; place-items: center; font-size: 17px; color: var(--red-hi); background: var(--red-soft); border: 1px solid rgba(229,0,0,.3); }
.mod b { display: block; font-size: .88rem; font-weight: 800; line-height: 1.3; }
.mod small { display: block; font-size: .72rem; color: var(--text-mut); line-height: 1.35; }
.tabs-strip { margin-top: 28px; text-align: center; }
.tabs-strip .label { display: block; margin-bottom: 12px; font-family: var(--cond); font-size: .76rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--text-mut); }
.tabs-strip .chips { justify-content: center; }

/* ---- Architecture ---- */
.arch { display: flex; flex-direction: column; gap: 10px; max-width: 920px; margin: 0 auto; }
.tier { padding: 18px 20px; border-radius: 16px; background: linear-gradient(160deg, var(--surface), var(--bg-2)); border: 1px solid var(--border); }
.tier .tl { margin-bottom: 12px; font-family: var(--cond); font-size: .78rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--red-hi); }
.boxes { display: flex; flex-wrap: wrap; gap: 10px; }
.node { display: inline-flex; align-items: center; gap: 9px; padding: 9px 14px; border-radius: 11px; font-size: .85rem; font-weight: 600; background: var(--surface-2); border: 1px solid var(--border-hi); }
.node svg.i { font-size: 16px; color: var(--red-hi); }
.tier-arrow { display: grid; place-items: center; font-size: 18px; color: var(--red-hi); opacity: .6; }

/* ---- API ---- */
.api h3 { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.api h3 .hdr-ic { width: 34px; height: 34px; font-size: 17px; border-radius: 10px; }
.ep { display: flex; gap: 10px; align-items: baseline; padding: 6px 0; border-top: 1px dashed var(--border); font-family: var(--mono); font-size: .78rem; }
.ep:first-of-type { border-top: none; }
.ep .m { min-width: 54px; font-size: .68rem; font-weight: 700; letter-spacing: .04em; }
.m.get { color: #2dd4bf; } .m.post { color: #ffb547; } .m.put { color: #4aa3ff; } .m.patch { color: #a78bfa; } .m.del { color: #ff6b6b; } .m.ws { color: #f472b6; } .m.any { color: var(--text-mut); }
.ep .p { color: var(--text-dim); overflow-wrap: anywhere; }
.api-note { margin-top: 22px; text-align: center; font-size: .86rem; color: var(--text-mut); }

/* ---- Tech ---- */
.tech { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; max-width: 960px; margin: 0 auto; }
.tech .t { padding: 9px 16px; border-radius: 10px; font-size: .84rem; font-weight: 600; color: var(--text-dim); background: var(--surface); border: 1px solid var(--border); transition: border-color .15s, color .15s; }
.tech .t:hover { border-color: rgba(255,77,77,.5); color: #fff; }

/* ---- Deep-dive accordions ---- */
.dives { max-width: 920px; margin: 0 auto; }
details.acc { margin-bottom: 12px; overflow: hidden; border-radius: 14px; background: linear-gradient(160deg, var(--surface), var(--bg-2)); border: 1px solid var(--border); transition: border-color .2s; }
details.acc[open] { border-color: rgba(255,77,77,.35); }
details.acc summary { display: flex; align-items: center; gap: 13px; padding: 17px 22px; cursor: pointer; list-style: none; font-size: 1.04rem; font-weight: 800; }
details.acc summary::-webkit-details-marker { display: none; }
details.acc summary .ei { width: 34px; height: 34px; flex-shrink: 0; border-radius: 10px; display: grid; place-items: center; font-size: 17px; color: var(--red-hi); background: var(--red-soft); border: 1px solid rgba(229,0,0,.3); }
details.acc summary .chev { margin-left: auto; font-size: 16px; color: var(--red-hi); transition: transform .2s; display: grid; }
details.acc[open] summary .chev { transform: rotate(90deg); }
details.acc .body { padding: 2px 22px 22px 69px; font-size: .93rem; color: var(--text-dim); }
details.acc .body ul { list-style: none; display: flex; flex-direction: column; gap: 9px; }
details.acc .body li { position: relative; padding-left: 18px; }
details.acc .body li::before { content: '▹'; position: absolute; left: 0; color: var(--red-hi); }
details.acc .body li b { color: var(--text); }
details.acc .tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
details.acc .tags span { padding: 4px 9px; border-radius: 7px; font-family: var(--mono); font-size: .74rem; color: var(--text-mut); background: var(--surface-2); border: 1px solid var(--border); }

/* ---- Footer ---- */
footer { margin-top: 40px; padding: 48px 0 40px; text-align: center; border-top: 1px solid var(--border); }
footer .brand { font-size: 1.25rem; }
footer p { margin-top: 12px; font-size: .86rem; color: var(--text-mut); }
footer .flinks { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 22px; margin-top: 20px; }
footer .flinks a { font-size: .88rem; color: var(--text-dim); }
footer .flinks a:hover { color: var(--red-hi); }

/* ---- Reveal on scroll (only when JS runs, so the page never stays hidden) ---- */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
.js .reveal.in { opacity: 1; transform: none; }
.js .g3 > .reveal:nth-child(3n+2), .js .g2 > .reveal:nth-child(2n), .js .g4 > .reveal:nth-child(4n+2) { transition-delay: .08s; }
.js .g3 > .reveal:nth-child(3n), .js .g4 > .reveal:nth-child(4n+3) { transition-delay: .16s; }
.js .g4 > .reveal:nth-child(4n) { transition-delay: .24s; }

/* ---- Responsive ---- */
@media (max-width: 1020px) {
  .g4 { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .g3 { grid-template-columns: repeat(2, 1fr); }
  .split, .browsers { grid-template-columns: 1fr; }
  .nav-in { flex-wrap: wrap; row-gap: 8px; }
  .nav-links { order: 3; width: 100%; margin: 0; padding: 2px 0 2px; gap: 18px; overflow-x: auto; scrollbar-width: none;
    -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
  .nav-links::-webkit-scrollbar { display: none; }
  .pipe { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .pipe .arrow { display: none; }
  .step { max-width: none; }
  details.acc .body { padding-left: 22px; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  .nav-in { padding: 10px 16px; gap: 12px; }
  .brand em { display: none; }
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .hero { padding: 62px 0 48px; }
  .stats { grid-template-columns: repeat(2, 1fr); margin-top: 46px; }
  .stat b { font-size: 1.8rem; }
  section { padding: 48px 0; }
  .pipe { grid-template-columns: 1fr; }
  .log { flex-direction: column; gap: 8px; padding: 18px; }
  .log-when { width: auto; display: flex; align-items: baseline; gap: 10px; }
  .log-main { padding-left: 0; border-left: none; }
  .panel { padding: 22px; }
  .panel h3 { font-size: 1.3rem; }
  .modules { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .mod { padding: 12px 11px; gap: 10px; }
  .mod .mi { width: 30px; height: 30px; font-size: 15px; }
  .ladder-box { padding: 20px 14px 16px; }
  .ladder, .ladder-labels { gap: 6px; }
  .ladder { height: 180px; }
  .rung b { font-size: .58rem; }
  .ladder-labels div { font-size: .8rem; }
  .ladder-labels span { font-size: .56rem; }
  details.acc summary { padding: 15px 16px; font-size: .98rem; }
  details.acc .body { padding: 2px 16px 18px; }
  figure.phone { width: 210px; }
}
@media (max-width: 440px) {
  .nav-cta .btn-red { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rise, .hero::before, .eyebrow .dot, .logo[data-play] .frame, .logo[data-play] .play { animation: none; }
  .js .reveal, .js .reveal .rung { transition: none; opacity: 1; transform: none; }
}

/* ---- Khmer ---- */
html[lang="km"] body, html[lang="km"] .btn, html[lang="km"] .chip, html[lang="km"] .console-comment { font-family: var(--km); }
html[lang="km"] body { line-height: 1.8; }
html[lang="km"] * { letter-spacing: normal !important; }
html[lang="km"] .hero h1 { line-height: 1.38; font-size: clamp(2.1rem, 5.4vw, 3.9rem); }
html[lang="km"] .sec-head h2, html[lang="km"] .panel h3, html[lang="km"] .lane-head h3 { line-height: 1.45; }
html[lang="km"] .sec-tag, html[lang="km"] .eyebrow, html[lang="km"] .log-tag, html[lang="km"] .stat span, html[lang="km"] .mod-h,
html[lang="km"] .tabs-strip .label, html[lang="km"] .tier .tl, html[lang="km"] .lane-tag { font-family: var(--km); text-transform: none; }
