/* Enterm site: landing page */

/* ---------- hero ---------- */
.hero { padding: clamp(48px, 8vw, 96px) 0 clamp(56px, 8vw, 100px); overflow: hidden; }
.hero-glow { position: absolute; inset: -20% -10% auto; height: 900px; pointer-events: none;
  background:
    radial-gradient(600px 340px at 50% 8%, rgba(216,238,78,.14), transparent 70%),
    radial-gradient(520px 380px at 18% 40%, rgba(127,166,255,.10), transparent 70%),
    radial-gradient(520px 380px at 84% 46%, rgba(181,157,255,.09), transparent 70%); }
.hero::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: radial-gradient(rgba(255,255,255,.07) 1px, transparent 1.4px); background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 80%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 80%); }
.hero-copy { position: relative; text-align: center; display: flex; flex-direction: column; align-items: center; }
.hero h1 { max-width: 15ch; margin-bottom: .35em; }
.hero h1 .hl { background: linear-gradient(92deg, var(--lime), #f3ffb0 45%, var(--green)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { margin: 0 auto 30px; }
.pill { display: inline-flex; align-items: center; gap: 10px; padding: 6px 8px 6px 14px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(255,255,255,.03); color: var(--muted); text-decoration: none; font-size: .86rem; margin-bottom: 26px; }
.pill:hover { border-color: rgba(216,238,78,.5); color: var(--text); }
.pill-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 0 rgba(216,238,78,.6); animation: ping 2.4s infinite; }
.pill-v { font: 600 .78rem var(--mono); color: var(--lime-ink); background: var(--lime); padding: 2px 8px; border-radius: 999px; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(216,238,78,.55); } 70%, 100% { box-shadow: 0 0 0 9px rgba(216,238,78,0); } }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.hero-brew { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; justify-content: center; color: var(--muted); }
.hero-brew code { background: transparent; color: var(--muted); font-size: .84rem; padding: 0; overflow-wrap: anywhere; }
.brew-chip { appearance: none; cursor: pointer; display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 10px; background: rgba(255,255,255,.03); border: 1px dashed var(--line-2); border-radius: 9px; padding: 6px 12px; color: var(--muted); font: inherit; transition: border-color .2s, color .2s; }
.brew-chip:hover { border-color: rgba(216,238,78,.5); color: var(--text); }
.brew-copy { font-size: .78rem; color: var(--lime); }
.hero-brew a { color: var(--muted); }

/* stage: the animated canvas */
.stage-tilt { margin-top: clamp(40px, 6vw, 72px); perspective: 1600px; }
.stage { transform-origin: 50% 0; transform: rotateX(var(--tilt, 0deg)) scale(var(--scale, 1)); will-change: transform; position: relative; }
.stage::after { content: ""; position: absolute; inset: -1px; border-radius: 16px; pointer-events: none; box-shadow: 0 0 0 1px rgba(216,238,78,.08), 0 0 120px -30px rgba(216,238,78,.25); }
.stage .window-bar { gap: 6px; }
.tab { padding: 4px 10px; border-radius: 7px; color: var(--faint); }
.tab.on { color: var(--text); background: rgba(255,255,255,.06); }
.tab.on::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--blue); margin-right: 7px; vertical-align: 1px; }
.tab-plus { color: var(--faint); }
.bar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; color: var(--faint); }
.usage { display: inline-flex; align-items: center; gap: 8px; font-size: .74rem; }
.usage b { width: 56px; height: 5px; border-radius: 3px; background: rgba(255,255,255,.08); overflow: hidden; display: block; }
.usage b i { display: block; height: 100%; background: var(--green); transition: width 1.2s var(--ease); }
.canvas { position: relative; aspect-ratio: 16 / 8.6; background-color: #0a0d0e;
  background-image: radial-gradient(rgba(255,255,255,.075) 1px, transparent 1.3px); background-size: 22px 22px;
  animation: drift 40s linear infinite; animation-play-state: paused; }
.stage.live .canvas { animation-play-state: running; }
@keyframes drift { to { background-position: 220px 110px; } }
.box { position: absolute; left: var(--x); top: var(--y); width: var(--w); height: var(--h); display: flex; flex-direction: column;
  background: rgba(8,10,11,.96); border: 1px solid var(--line-2); border-radius: 11px; overflow: hidden;
  transition: border-color .4s, box-shadow .4s, transform .5s var(--ease); }
.box.need { border-color: rgba(241,199,91,.8); box-shadow: 0 0 0 3px rgba(241,199,91,.14), 0 0 40px -6px rgba(241,199,91,.4); }
.box.done { border-color: rgba(134,209,154,.45); }
.box-head { display: flex; align-items: center; gap: 8px; padding: 0 10px; height: 32px; flex: none; border-bottom: 1px solid var(--line); font-size: .8rem; white-space: nowrap; min-width: 0; }
.box-head b { font-weight: 600; }
.box-head .path { color: var(--faint); font-family: var(--mono); font-size: .68rem; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.spark { width: 9px; height: 9px; flex: none; background: var(--c); clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); }
.status { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; color: var(--muted); flex: none; }
.status i { width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid currentColor; }
.status em { font-style: normal; }
.s-run i { background: var(--blue); border-color: var(--blue); animation: blink 1.2s infinite; }
.s-wait i { border-color: var(--faint); }
.s-need { color: var(--gold); } .s-need i { background: var(--gold); border-color: var(--gold); animation: blink .7s infinite; }
.s-done { color: var(--green); } .s-done i { background: var(--green); border-color: var(--green); }
@keyframes blink { 50% { opacity: .3; } }
.port { margin-left: auto; font: 600 .68rem var(--mono); color: var(--lime-ink); background: var(--lime); padding: 1px 6px; border-radius: 5px; animation: pop .4s var(--ease); }
@keyframes pop { from { transform: scale(.4); opacity: 0; } }
.box-body { padding: 10px 12px; font: clamp(.72rem, .9vw, .82rem)/1.65 var(--mono); color: var(--text); overflow: hidden; flex: 1; display: flex; flex-direction: column; justify-content: flex-start; }
.ln { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ln .pr { color: var(--lime); }
.ln.dim { color: var(--muted); padding-left: 1.3em; }
.ln.bul::before { content: "● "; color: var(--text); }
.ln.ok { color: var(--green); }
.ln.warn { color: var(--gold); }
.ln .add { color: var(--green); } .ln .del { color: var(--coral); }
.cur { display: inline-block; width: .6em; height: 1.05em; vertical-align: -2px; border: 1px solid var(--text); margin-left: 2px; animation: blink 1s steps(1) infinite; }
.link { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.link path { fill: none; stroke: var(--lime); stroke-width: .25; stroke-dasharray: 1 1; opacity: 0; transition: opacity .6s; vector-effect: non-scaling-stroke; stroke-width: 1.5; }
.link.on path { opacity: .7; animation: dash 1.6s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -8; } }
.approve { position: absolute; left: 50%; bottom: 17%; transform: translate(-50%, 12px); opacity: 0; transition: opacity .4s, transform .4s var(--ease);
  background: rgba(22,26,28,.97); border: 1px solid rgba(241,199,91,.5); border-radius: 12px; padding: 12px 14px; min-width: 300px; max-width: 92%;
  box-shadow: 0 20px 60px -12px rgba(0,0,0,.8); font-size: .8rem; z-index: 3; }
.approve.show { opacity: 1; transform: translate(-50%, 0); }
.approve-t { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.approve-t code { font-size: .74rem; }
.approve-b { display: flex; gap: 8px; margin-top: 10px; justify-content: flex-end; }
.ab { padding: 5px 12px; border-radius: 7px; border: 1px solid var(--line-2); font-weight: 600; font-size: .76rem; transition: background .3s, color .3s, transform .2s; }
.ab.allow { background: rgba(216,238,78,.15); color: var(--lime); border-color: rgba(216,238,78,.4); }
.ab.allow.press { background: var(--lime); color: var(--lime-ink); transform: scale(.94); }
.approve-done { display: none; align-items: center; gap: 8px; color: var(--green); margin-top: 8px; font-weight: 600; }
.approve-done svg { width: 14px; height: 14px; }
.approve.ok { border-color: rgba(134,209,154,.6); }
.approve.ok .approve-b { display: none; }
.approve.ok .approve-done { display: flex; }
.cmdbar { position: absolute; left: 50%; bottom: 2.4%; transform: translateX(-50%); width: min(46%, 440px); height: 30px; display: flex; align-items: center; gap: 8px; padding: 0 5px 0 12px;
  background: rgba(16,19,21,.96); border: 1px solid var(--line-2); border-radius: 9px; font-size: .74rem; color: var(--faint); }
.cmdbar .pr { color: var(--lime); }
.cmdbar .cmd-text { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.cmdbar kbd { font-size: .68rem; }
.cmdbar .plus { width: 22px; height: 22px; display: grid; place-items: center; background: var(--lime); color: var(--lime-ink); border-radius: 6px; font-weight: 700; }

@media (max-width: 760px) {
  .canvas { aspect-ratio: auto; display: flex; flex-direction: column; gap: 10px; padding: 12px 12px 56px; min-height: 520px; }
  .box { position: relative; left: auto; top: auto; width: 100%; height: 170px; }
  .box[data-box="codex"] { display: none; }
  .box[data-box="term"] { height: 92px; }
  .link { display: none; }
  .approve { bottom: 56px; min-width: 0; width: calc(100% - 24px); }
  .cmdbar { width: calc(100% - 24px); bottom: 12px; }
  .stage .tab:not(.on), .usage { display: none; }
}

/* ---------- agents marquee ---------- */
.agents { padding: 10px 0 20px; }
.agents-h { color: var(--muted); font-size: .95rem; margin-bottom: 22px; }
.marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-track { display: flex; gap: 12px; width: max-content; animation: marq 48s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span { flex: none; display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.02); font-weight: 550; white-space: nowrap; }
.marquee-track code { color: var(--muted); background: transparent; padding: 0; font-size: .8rem; }
.marquee-track .own { color: var(--lime); border-style: dashed; }
@keyframes marq { to { transform: translateX(calc(-50% - 6px)); } }

/* ---------- why cards ---------- */
.why h2 { max-width: 22ch; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 40px; }
@media (max-width: 920px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .cards { grid-template-columns: minmax(0, 1fr); } }
.card { position: relative; padding: 24px; border-radius: var(--radius); border: 1px solid var(--line); background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.01)); overflow: hidden; transition: border-color .3s, transform .3s var(--ease); }
.card::before { content: ""; position: absolute; inset: 0; background: radial-gradient(400px 160px at var(--mx, 50%) var(--my, 0%), rgba(216,238,78,.09), transparent 70%); opacity: 0; transition: opacity .3s; pointer-events: none; }
.card:hover { border-color: rgba(216,238,78,.3); transform: translateY(-3px); }
.card:hover::before { opacity: 1; }
.card p { color: var(--muted); margin: 0; font-size: .95rem; }
.ic { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; margin-bottom: 16px; font: 600 .95rem var(--mono); color: var(--lime); background: rgba(216,238,78,.08); border: 1px solid rgba(216,238,78,.2); }

/* ---------- race ---------- */
.race-sec { background: linear-gradient(180deg, transparent, rgba(127,166,255,.03) 40%, transparent); }
.race .window-bar { gap: 12px; }
.race-title { color: var(--text); font-weight: 550; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.race-title span { color: var(--blue); }
.race-replay { margin-left: auto; min-height: 28px; padding: 0 10px; font-size: .78rem; flex: none; }
.race-body { padding: 16px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.lanes { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.lane { border: 1px solid var(--line); border-radius: 11px; padding: 11px 13px; background: rgba(255,255,255,.015); transition: border-color .4s; }
.lane.fin { border-color: rgba(255,255,255,.18); }
.lane-top { display: flex; align-items: center; gap: 8px; font-size: .86rem; }
.lane-top b { font-weight: 600; }
.lane-top .wt { color: var(--faint); font: .7rem var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1; }
.lane-st { margin-left: auto; font-size: .76rem; color: var(--muted); flex: none; }
.lane-row { display: flex; align-items: center; gap: 12px; margin-top: 9px; }
.lane-stats { font: .76rem var(--mono); color: var(--muted); white-space: nowrap; min-width: 15.5ch; }
.lane-stats .add { color: var(--green); }
.track { position: relative; flex: 1; height: 16px; min-width: 60px; }
.track::before { content: ""; position: absolute; left: 0; right: 18px; top: 50%; height: 2px; transform: translateY(-50%); background: rgba(255,255,255,.08); border-radius: 2px; }
.track .trail { position: absolute; left: 0; top: 50%; height: 2px; transform: translateY(-50%); background: linear-gradient(90deg, transparent, var(--c)); border-radius: 2px; width: 0; }
.track .flag { position: absolute; right: 0; top: 50%; transform: translateY(-50%); width: 14px; height: 12px; border-radius: 2px;
  background: conic-gradient(#ddd 25%, #333 0 50%, #ddd 0 75%, #333 0) 0 0 / 6px 6px; opacity: .8; }
.runner { position: absolute; top: 50%; left: 0; width: 13px; height: 13px; margin-left: -6px; border-radius: 50%; background: var(--c); transform: translateY(-50%); box-shadow: 0 0 14px var(--c); }
.medal { position: absolute; right: -4px; top: 50%; width: 24px; height: 24px; margin-top: -12px; border-radius: 50%; display: grid; place-items: center; font: 700 .76rem var(--sans); color: #1b1606; transform: scale(0); transition: transform .5s cubic-bezier(.3, 1.8, .5, 1); z-index: 2; }
.medal.m1 { background: radial-gradient(circle at 35% 30%, #fff3c4, var(--gold)); }
.medal.m2 { background: radial-gradient(circle at 35% 30%, #fff, var(--silver)); }
.medal.m3 { background: radial-gradient(circle at 35% 30%, #ffe0c8, var(--bronze)); }
.medal.show { transform: scale(1); }
.results { border: 1px solid var(--line); border-radius: 11px; padding: 14px; background: rgba(255,255,255,.015); opacity: .35; transition: opacity .5s; }
.results.on { opacity: 1; }
.results-h { font-weight: 650; margin-bottom: 8px; }
.results-rows { display: grid; gap: 6px; }
.rrow { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 9px; font-size: .84rem; flex-wrap: wrap; transition: background .4s; }
.rrow.win { background: rgba(216,238,78,.07); }
.rrow > span:nth-child(2) { min-width: 0; }
.rnum { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font: 700 .74rem var(--sans); color: #1b1606; flex: none; }
.rname { font-weight: 600; }
.rmeta { color: var(--faint); font: .72rem var(--mono); }
.rtest { margin-left: auto; font-size: .78rem; font-weight: 600; color: var(--muted); }
.rtest.pass { color: var(--green); } .rtest.fail { color: var(--coral); }
.rtest.run::after { content: ""; display: inline-block; width: 9px; height: 9px; margin-left: 6px; border: 1.5px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -1px; }
@keyframes spin { to { transform: rotate(360deg); } }
.rpick { font-size: .74rem; font-weight: 650; padding: 4px 10px; border-radius: 7px; background: rgba(216,238,78,.14); color: var(--lime); border: 1px solid rgba(216,238,78,.35); transition: background .3s, color .3s, transform .2s; }
.rpick.press { background: var(--lime); color: var(--lime-ink); transform: scale(.94); }
.results-note { font-size: .78rem; color: var(--faint); margin: 10px 0 0; }
.merge { font: .76rem/1.6 var(--mono); color: var(--green); min-height: 1.6em; margin-top: 6px; overflow-wrap: anywhere; }
@media (max-width: 480px) { .lane-stats { min-width: 0; font-size: .7rem; } .race-body { padding: 12px; } .lane-top .wt { display: none; } .rrow { gap: 6px 10px; } .rrow > span:nth-child(2) { flex: 1 1 calc(100% - 40px); } .rmeta { display: block; } .rtest { margin-left: 34px; } }

/* ---------- timeline ---------- */
.tl-head { max-width: 760px; }
.tl { padding: 18px; margin-top: 36px; }
.tl-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.tl-controls .btn { min-width: 0; }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 9px; padding: 2px; }
.seg button { appearance: none; border: 0; background: transparent; color: var(--muted); font: 500 .84rem var(--sans); padding: 6px 11px; border-radius: 7px; cursor: pointer; min-height: 30px; }
.seg button[aria-pressed="true"] { background: rgba(255,255,255,.1); color: var(--text); }
.tl-clock { margin-left: auto; font: .84rem var(--mono); color: var(--muted); }
.tl-save { display: inline-flex; align-items: center; gap: 7px; font-size: .84rem; color: var(--muted); border: 1px solid var(--line); border-radius: 9px; padding: 6px 11px; }
.tl-save svg { width: 15px; height: 15px; }
.tl-lanes { position: relative; margin-top: 16px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; background: rgba(255,255,255,.015); cursor: ew-resize; touch-action: pan-y; user-select: none; }
.tl-lane { display: grid; grid-template-columns: 110px 1fr; align-items: center; height: 46px; }
.tl-name { appearance: none; background: none; border: 0; padding: 4px 0; text-align: left; font: 500 .88rem var(--sans); color: var(--faint); cursor: pointer; }
.tl-name.sel { color: var(--text); font-weight: 650; }
.tl-track { position: relative; height: 100%; }
.tl-track::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 2px; background: rgba(255,255,255,.08); }
.mk { position: absolute; top: 50%; width: 3px; margin-left: -1.5px; border-radius: 2px; background: var(--c); transform: translateY(-50%); height: var(--h); opacity: .22; transition: opacity .25s, box-shadow .25s; }
.mk.lit { opacity: 1; }
.mk.hot { box-shadow: 0 0 12px 2px var(--c); }
.playhead { position: absolute; top: 6px; bottom: 6px; width: 2px; margin-left: -1px; background: var(--lime); box-shadow: 0 0 12px rgba(216,238,78,.7); pointer-events: none; left: 0; }
.playhead::before { content: ""; position: absolute; top: -5px; left: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--lime); }
.tl-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 14px 2px; font-size: .84rem; color: var(--muted); }
.tl-legend span::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 2px; background: var(--c); margin-right: 7px; }
.tl-bottom { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr); gap: 14px; }
@media (max-width: 760px) { .tl-bottom { grid-template-columns: minmax(0, 1fr); } .tl-lane { grid-template-columns: 82px 1fr; } .tl-clock { margin-left: 0; } .tl-save { display: none; } .tl { padding: 12px; } }
.tl-feed, .tl-files { padding: 14px 16px; min-height: 250px; }
.tl-feed h3, .tl-files h3 { font-size: .95rem; margin-bottom: 10px; }
.tl-feed ol, .tl-files ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.tl-feed li { display: grid; grid-template-columns: 16px 40px 1fr; gap: 8px; align-items: center; font-size: .86rem; animation: feedin .35s var(--ease); }
.tl-feed li .k { width: 8px; height: 8px; border-radius: 2px; background: var(--c); }
.tl-feed li time { font: .78rem var(--mono); color: var(--faint); }
.tl-feed li span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-feed li.f-cmd span:last-child, .tl-feed li.f-read span:last-child { font-family: var(--mono); font-size: .8rem; }
@keyframes feedin { from { opacity: 0; transform: translateY(6px); } }
.tl-files li { display: flex; align-items: center; gap: 8px; font-size: .86rem; color: var(--muted); transition: color .3s; }
.tl-files li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--green); flex: none; transition: transform .3s; }
.tl-files li.hot { color: var(--text); font-weight: 600; }
.tl-files li.hot::before { transform: scale(1.6); box-shadow: 0 0 10px var(--green); }
.tl-files li b { margin-left: auto; font: .76rem var(--mono); color: var(--faint); font-weight: 400; }
.tl-files li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.tl-foot { margin: 14px 2px 0; }

/* ---------- screens ---------- */
.shot-main { max-width: 900px; margin: 40px auto 0; position: relative; }
.shot-main video { width: 100%; height: auto; aspect-ratio: 8 / 5; background: #0c0f10; }
.video-toggle { position: absolute; right: 12px; bottom: 12px; background: rgba(10,12,13,.8); }
.shot-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 22px; }
@media (max-width: 760px) { .shot-grid { grid-template-columns: minmax(0, 1fr); } }
.shot-grid figure { margin: 0; }
.shot-grid a { display: block; border-radius: 12px; overflow: hidden; border: 1px solid var(--line-2); transition: transform .35s var(--ease), border-color .3s; }
.shot-grid a:hover { transform: translateY(-4px); border-color: rgba(216,238,78,.4); }
.shot-grid img { width: 100%; height: auto; }
.shot-grid figcaption { font-size: .86rem; color: var(--muted); margin-top: 10px; }

/* ---------- library teaser ---------- */
.lib-count:empty { display: none; }
.lib-stack { position: relative; height: 440px; }
.lib-card { position: absolute; width: min(360px, 86%); padding: 18px; border-radius: 14px; border: 1px solid var(--line-2); background: linear-gradient(180deg, #171c1e, #121617); box-shadow: 0 24px 60px -24px rgba(0,0,0,.9); transition: transform .9s var(--ease), opacity .9s; }
.lib-card b { display: block; font-weight: 650; margin: 10px 0 6px; line-height: 1.3; }
.lib-card p { font-size: .86rem; color: var(--muted); margin: 0 0 12px; }
.lib-acts { display: flex; gap: 8px; }
.lib-acts i { font-style: normal; font-size: .76rem; font-weight: 600; padding: 4px 10px; border-radius: 7px; border: 1px solid var(--line-2); color: var(--muted); }
.lib-acts i.go { background: var(--lime); border-color: var(--lime); color: var(--lime-ink); }
.kind { display: inline-block; font: 600 .7rem var(--mono); text-transform: uppercase; letter-spacing: .04em; padding: 3px 8px; border-radius: 6px; }
.k-prompt { color: var(--lime); background: rgba(216,238,78,.1); }
.k-race { color: var(--blue); background: rgba(127,166,255,.12); }
.k-skill { color: var(--violet); background: rgba(181,157,255,.12); }
.k-comm { color: var(--gold); background: rgba(241,199,91,.12); text-transform: none; }
.lib-card.community { border-style: dashed; border-color: rgba(241,199,91,.45); }
.lib-card.c1 { left: 0; top: 0; transform: rotate(-4deg); }
.lib-card.c2 { right: 0; top: 70px; transform: rotate(3deg); }
.lib-card.c3 { left: 6%; top: 200px; transform: rotate(-1.5deg); }
.lib-card.c4 { right: 3%; top: 290px; transform: rotate(2.5deg); }
.js .lib-stack:not(.in) .lib-card { opacity: 0; transform: translateY(60px) rotate(0deg); }
.lib-stack .lib-card.c2 { transition-delay: .12s; } .lib-stack .lib-card.c3 { transition-delay: .24s; } .lib-stack .lib-card.c4 { transition-delay: .36s; }
.lib-stack .lib-card:hover { z-index: 5; transform: translateY(-6px) rotate(0deg); transition-delay: 0s; transition-duration: .35s; }
@media (max-width: 920px) { .lib-stack { height: 470px; max-width: 520px; } }
@media (max-width: 480px) {
  .lib-stack { height: auto; display: grid; gap: 12px; }
  .lib-card { position: relative; width: 100%; left: auto !important; right: auto !important; top: auto !important; transform: none !important; }
  .js .lib-stack:not(.in) .lib-card { transform: translateY(30px) !important; }
}

/* ---------- design check ---------- */
.dc-body { padding: 16px; font-size: .86rem; }
.dc-cmd { font: .8rem var(--mono); color: var(--text); overflow-wrap: anywhere; }
.dc-cmd .pr { color: var(--lime); }
.caret { display: inline-block; width: .55em; height: 1em; background: var(--lime); vertical-align: -2px; margin-left: 2px; animation: blink 1s steps(1) infinite; }
.dc-totals { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 12px; }
.dc-totals > span { padding: 6px 11px; border-radius: 9px; border: 1px solid var(--line); font-size: .82rem; color: var(--muted); }
.dc-totals b { font: 650 1.05rem var(--mono); }
.t-err b { color: var(--coral); } .t-warn b { color: var(--gold); } .t-note b { color: var(--blue); }
.dc-rows { display: grid; gap: 9px; min-height: 160px; }
.dc-row { display: grid; grid-template-columns: 112px 1fr 30px; gap: 10px; align-items: center; font-size: .8rem; color: var(--muted); }
.dc-row .bar { height: 8px; border-radius: 4px; background: rgba(255,255,255,.06); overflow: hidden; }
.dc-row .bar i { display: block; height: 100%; width: 0; border-radius: 4px; background: var(--c); transition: width .9s var(--ease); }
.dc-row b { font: 600 .8rem var(--mono); color: var(--text); text-align: right; }
.dc-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.dc-act { font-size: .76rem; font-weight: 600; padding: 5px 10px; border-radius: 8px; border: 1px solid var(--line-2); color: var(--muted); transition: all .3s; }
.dc-act.on { background: var(--lime); border-color: var(--lime); color: var(--lime-ink); transform: translateY(-1px); }
.dc-act.did { border-color: rgba(134,209,154,.5); color: var(--green); }

/* ---------- phone ---------- */
.phone-wrap { display: grid; place-items: center; }
.phone { position: relative; width: 300px; max-width: 100%; aspect-ratio: 300 / 620; border-radius: 48px; padding: 18px; overflow: hidden;
  background: radial-gradient(120% 70% at 30% 10%, #2b3a1a 0%, #13190f 40%, #07090a 100%);
  border: 10px solid #1d2123; box-shadow: 0 0 0 1px #2c3235, 0 50px 120px -40px rgba(0,0,0,.95), 0 0 120px -40px rgba(216,238,78,.3); }
.ph-island { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); width: 92px; height: 26px; border-radius: 14px; background: #000; }
.ph-time { text-align: center; margin-top: 46px; font: 600 4.2rem/1 var(--sans); letter-spacing: -0.03em; color: rgba(255,255,255,.92); }
.ph-date { text-align: center; color: rgba(255,255,255,.75); font-size: .9rem; margin-top: 6px; }
.ph-note { margin-top: 30px; padding: 12px 13px; border-radius: 20px; background: rgba(40,44,46,.78); backdrop-filter: blur(10px); font-size: .82rem; transform: translateY(-14px) scale(.96); opacity: 0; transition: transform .6s var(--ease), opacity .5s, background .4s; }
.ph-note.show { transform: none; opacity: 1; }
.ph-note-h { display: flex; align-items: center; gap: 7px; font-size: .7rem; color: rgba(255,255,255,.6); letter-spacing: .03em; }
.ph-note-h img { width: 20px; height: 20px; border-radius: 5px; }
.ph-now { margin-left: auto; }
.ph-note b { display: block; margin-top: 7px; }
.ph-note p { margin: 2px 0 0; color: rgba(255,255,255,.85); }
.ph-note p code { font-size: .76rem; background: rgba(0,0,0,.3); }
.ph-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 10px; max-height: 40px; overflow: hidden; transition: max-height .4s, opacity .3s, margin .4s; }
.ph-btns span { text-align: center; padding: 7px; border-radius: 11px; background: rgba(255,255,255,.1); font-weight: 600; transition: background .3s, color .3s, transform .2s; }
.ph-allow.press { background: var(--lime); color: var(--lime-ink); transform: scale(.95); }
.ph-ok { display: none; margin-top: 9px; color: var(--green); font-weight: 650; }
.ph-check { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--green); color: #0b1a0f; font-size: .7rem; margin-right: 4px; }
.ph-note.ok .ph-btns { max-height: 0; opacity: 0; margin-top: 0; }
.ph-note.ok .ph-ok { display: block; animation: feedin .4s var(--ease); }
.ph-face { position: absolute; left: 50%; top: 44%; width: 64px; height: 64px; margin-left: -32px; color: var(--lime); opacity: 0; transform: scale(.7); transition: opacity .3s, transform .4s var(--ease); background: rgba(0,0,0,.55); border-radius: 18px; padding: 12px; }
.ph-face.show { opacity: 1; transform: scale(1); }
.ph-face.show svg { animation: facepulse .9s ease-in-out; }
@keyframes facepulse { 50% { transform: scale(.88); } }
.ph-live { position: absolute; left: 14px; right: 14px; bottom: 26px; padding: 12px 14px; border-radius: 22px; background: rgba(0,0,0,.7); font-size: .78rem; opacity: 0; transform: translateY(12px); transition: opacity .5s, transform .5s var(--ease); }
.ph-live.show { opacity: 1; transform: none; }
.ph-live-t { display: flex; align-items: center; gap: 7px; }
.ph-live-t span:last-child { margin-left: auto; color: rgba(255,255,255,.7); }
.ph-bar { height: 5px; border-radius: 3px; background: rgba(255,255,255,.12); margin-top: 9px; overflow: hidden; }
.ph-bar i { display: block; height: 100%; width: 12%; background: var(--lime); border-radius: 3px; transition: width 2.5s var(--ease); }
@media (max-width: 380px) { .phone { width: 270px; } .ph-time { font-size: 3.6rem; } }

/* ---------- more ---------- */
.grid-more { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin-top: 40px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
@media (max-width: 920px) { .grid-more { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .grid-more { grid-template-columns: minmax(0, 1fr); } }
.mini { background: var(--bg); padding: 24px; transition: background .3s; }
.mini:hover { background: #0e1112; }
.mini h3 { font-size: 1rem; }
.mini h3::before { content: "❯ "; color: var(--lime); font-family: var(--mono); }
.mini p { color: var(--muted); font-size: .93rem; margin: 0; }

/* ---------- compare ---------- */
.table-wrap { overflow-x: auto; margin-top: 32px; border: 1px solid var(--line); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; min-width: 640px; font-size: .92rem; }
th, td { padding: 13px 16px; border-bottom: 1px solid var(--line); text-align: center; }
tbody tr:last-child > * { border-bottom: 0; }
thead th { font-size: .82rem; color: var(--muted); font-weight: 550; }
tbody th { text-align: left; font-weight: 450; color: var(--text); }
td { color: var(--muted); }
.us { background: rgba(216,238,78,.06); color: var(--lime); font-weight: 650; }

/* ---------- install ---------- */
.install-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 18px; margin-top: 40px; }
@media (max-width: 860px) { .install-grid { grid-template-columns: minmax(0, 1fr); } }
.inst { padding: 26px; }
.inst .codebox { margin: 14px 0 10px; }
.in-after { max-width: 70ch; margin: 28px auto 0; }

/* ---------- star ---------- */
.star-sec { overflow: hidden; }
.star-sec::before { content: ""; position: absolute; inset: 0; background: radial-gradient(500px 300px at 50% 40%, rgba(241,199,91,.10), transparent 70%); pointer-events: none; }
.star-orbit { width: 96px; height: 96px; margin: 0 auto 26px; border-radius: 50%; border: 1px dashed rgba(241,199,91,.4); display: grid; place-items: center; position: relative; animation: spin 24s linear infinite; }
.star-orbit span { font-size: 2.6rem; color: var(--gold); text-shadow: 0 0 30px rgba(241,199,91,.6); animation: spin 24s linear infinite reverse; }
.star-orbit::after { content: ""; position: absolute; top: -4px; left: 50%; width: 8px; height: 8px; margin-left: -4px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 12px var(--lime); }
.btn.big { min-height: 54px; padding: 0 26px; font-size: 1.05rem; }

/* ---------- faq ---------- */
.faq-list { display: grid; gap: 10px; margin-top: 28px; max-width: 820px; }
details { border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.015); transition: border-color .3s; }
details[open] { border-color: var(--line-2); }
summary { cursor: pointer; list-style: none; padding: 16px 48px 16px 18px; font-weight: 600; position: relative; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%); font: 400 1.3rem var(--mono); color: var(--lime); transition: transform .3s; }
details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
details p { padding: 0 18px 16px; margin: 0; color: var(--muted); }
.faq-more { margin-top: 20px; }

@media (prefers-reduced-motion: reduce) {
  .stage { transform: none !important; }
  .marquee-track { animation: none; flex-wrap: wrap; width: auto; justify-content: center; }
  .marquee-track span:nth-child(n+10) { display: none; }
  .marquee { -webkit-mask-image: none; mask-image: none; padding: 0 16px; }
  .js .lib-stack:not(.in) .lib-card { opacity: 1; }
}
