/* Skep site — honey/hive theme. Self-contained (CSP: no CDN, no inline styles). */
:root {
  --bg: #07080C; --card: #0E1117; --panel: #131720; --border: #222938;
  --amber: #F59E0B; --gold: #FBBF24; --honey: #FDE68A; --em: #10B981;
  --text: #E6E8EE; --mut: #9AA3B5; --dim: #6B7488;
  --sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0; color: var(--text); font: 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased;
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(245,158,11,.16), transparent 70%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='98' viewBox='0 0 56 98'%3E%3Cg fill='none' stroke='%23f59e0b' stroke-opacity='0.07' stroke-width='1'%3E%3Cpath d='M28 2l26 15v30L28 62 2 47V17zM0 64l26 15v19M56 64L30 79v19'/%3E%3C/g%3E%3C/svg%3E");
  background-attachment: fixed, scroll;
}
.mono { font-family: var(--mono); }
code { font-family: var(--mono); font-size: .92em; padding: .1em .4em; border-radius: 6px; color: var(--gold); background: rgba(245,158,11,.12); border: 1px solid rgba(245,158,11,.25); }
a { color: inherit; }
h1, h2, h3 { line-height: 1.2; margin: 0; letter-spacing: -.02em; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--amber); color: #111; padding: 8px 12px; border-radius: 8px; }
.skip:focus { left: 8px; }

/* nav */
.nav { position: sticky; top: 0; z-index: 50; backdrop-filter: blur(16px); background: rgba(7,8,12,.78); border-bottom: 1px solid rgba(245,158,11,.15); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 60px; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.hex { width: 26px; height: 26px; fill: var(--amber); filter: drop-shadow(0 0 8px rgba(245,158,11,.5)); }
.brand-name { font-weight: 800; font-size: 20px; background: linear-gradient(90deg, var(--amber), var(--honey)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ver { font-size: 11px; padding: 2px 8px; border-radius: 999px; color: var(--gold); background: rgba(245,158,11,.14); border: 1px solid rgba(245,158,11,.3); }
.nav-links { display: flex; gap: 24px; font-size: 14px; color: var(--mut); }
.nav-links a { text-decoration: none; transition: color .2s; }
.nav-links a:hover { color: var(--gold); }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.lang { background: var(--card); color: var(--text); border: 1px solid var(--border); border-radius: 8px; padding: 6px 8px; font-size: 13px; min-height: 36px; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 16px; border-radius: 10px; font: 600 14px var(--sans); text-decoration: none; border: 1px solid transparent; cursor: pointer; transition: transform .15s, filter .15s, border-color .15s; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: linear-gradient(90deg, var(--amber), var(--gold)); color: #14100a; box-shadow: 0 6px 24px rgba(245,158,11,.25); }
.btn-primary:hover { filter: brightness(1.07); }
.btn-ghost { border-color: var(--border); background: rgba(14,17,23,.7); color: var(--text); }
.btn-ghost:hover { border-color: rgba(245,158,11,.5); }
.copy-btn { flex: none; min-height: 32px; padding: 0 12px; border-radius: 8px; border: 0; background: var(--amber); color: #14100a; font: 700 12px var(--sans); cursor: pointer; }
.copy-btn.copied { background: var(--em); }

/* hero */
.hero { padding: 72px 0 40px; text-align: center; }
.hero-inner { display: flex; flex-direction: column; align-items: center; gap: 20px; }
.pill { display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 4px 12px; border-radius: 999px; font-size: 12px; color: var(--gold); background: rgba(245,158,11,.12); border: 1px solid rgba(245,158,11,.3); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); animation: ping 1.8s ease-out infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(245,158,11,.6); } 100% { box-shadow: 0 0 0 10px rgba(245,158,11,0); } }
.hero h1 { font-size: clamp(32px, 6vw, 56px); font-weight: 800; max-width: 16em; background: linear-gradient(90deg, #fff, var(--honey) 60%, var(--amber)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { margin: 0; max-width: 40em; color: var(--mut); font-size: clamp(16px, 2.2vw, 19px); }
.install { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: min(100%, 560px); padding: 10px 12px 10px 16px; border: 2px solid rgba(245,158,11,.55); border-radius: 12px; background: var(--card); box-shadow: 0 10px 40px rgba(245,158,11,.12); }
.install code { background: none; border: 0; padding: 0; color: var(--text); font-size: 14px; overflow-x: auto; white-space: nowrap; }
.prompt { color: var(--amber); margin-right: 8px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.fine { margin: 0; font-size: 12px; color: var(--dim); }
.hero-cmd { margin-top: -8px; border-width: 1px; border-color: rgba(245,158,11,.3); box-shadow: none; }
.hero-cmd .c-mut { margin: 0 4px; }

/* sections */
.section { padding: 64px 0; }
.section h2 { font-size: clamp(26px, 4vw, 36px); font-weight: 800; }
.sub { margin: 8px 0 28px; color: var(--mut); }

/* hive stage */
.stage { border: 1px solid rgba(245,158,11,.3); border-radius: 16px; background: rgba(11,14,20,.92); box-shadow: 0 20px 60px rgba(245,158,11,.08); overflow: hidden; }
.stage-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 16px; background: #111622; border-bottom: 1px solid var(--border); }
.stage-label { font-size: 13px; font-weight: 700; color: var(--gold); margin-right: auto; }
.modes { display: flex; gap: 6px; }
.mode { min-height: 32px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--border); background: var(--panel); color: var(--mut); font-size: 12px; cursor: pointer; }
.mode.is-on { background: var(--amber); border-color: var(--amber); color: #14100a; font-weight: 700; }
.replay { color: var(--gold); border-color: rgba(245,158,11,.5); background: transparent; }
.stage-body { display: grid; grid-template-columns: 1.2fr 1fr; gap: 0; }
.topo { width: 100%; height: auto; display: block; padding: 8px; }
.log { margin: 0; padding: 18px; font-size: 12.5px; line-height: 1.8; border-left: 1px solid var(--border); background: #0A0D13; white-space: normal; overflow-wrap: anywhere; min-height: 220px; }
.c-mut { color: var(--dim); } .c-amber { color: var(--gold); } .c-em { color: var(--em); }

/* svg parts */
.svg-mono { font-family: var(--mono); font-size: 12px; }
.svg-strong { fill: var(--honey); font-weight: 700; }
.svg-dim { fill: var(--dim); font-size: 10px; }
.svg-tag { fill: var(--honey); font-size: 10px; font-weight: 700; }
.svg-bee { font-size: 18px; }
.hex-shape { fill: rgba(245,158,11,.12); stroke: var(--amber); stroke-width: 2; animation: hivePulse 2.4s ease-in-out infinite; }
.hive-peer rect { fill: var(--panel); stroke: var(--border); stroke-width: 1.5; transition: stroke .3s, opacity .3s; }
.p1 rect, .p2 rect { stroke: rgba(245,158,11,.6); }
.p3 rect, .p4 rect, .p5 rect { stroke: rgba(16,185,129,.6); }
.p5 rect { stroke-dasharray: 5 4; }
.contract-card { transition: opacity .3s; }
.contract-card rect { fill: rgba(245,158,11,.14); stroke: var(--gold); stroke-width: 1.2; }
.flight-line { fill: none; stroke: url(#amber); stroke-width: 2; stroke-dasharray: 6 6; animation: dashFlow 1.6s linear infinite; transition: opacity .3s; }
.halo { fill: var(--amber); fill-opacity: .2; }
.flyer { transition: opacity .3s; }
.bee-sprite { animation: wingFlutter .35s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.confirm-chip { opacity: 0; transition: opacity .3s; }
.confirm-chip rect { fill: #131720; stroke: var(--gold); stroke-width: 1.2; }
@keyframes dashFlow { to { stroke-dashoffset: -48; } }
@keyframes hivePulse {
  0%, 100% { filter: drop-shadow(0 0 4px rgba(245,158,11,.35)); }
  50% { filter: drop-shadow(0 0 16px rgba(245,158,11,.75)); }
}
@keyframes wingFlutter { 0%, 100% { transform: scaleY(1) translateY(0); } 50% { transform: scaleY(.92) translateY(-2px); } }

/* orchestrate modes */
[data-mode="confirm"] .confirm-chip { opacity: 1; }
[data-mode="confirm"] .flyer, [data-mode="confirm"] .flight-line { opacity: .25; }
[data-mode="confirm"] .flight-line { animation-duration: 4s; }
[data-mode="off"] .f2, [data-mode="off"] .f3, [data-mode="off"] .f4, [data-mode="off"] .f5,
[data-mode="off"] .t2, [data-mode="off"] .t3, [data-mode="off"] .t4, [data-mode="off"] .t5,
[data-mode="off"] .p2, [data-mode="off"] .p3, [data-mode="off"] .p4, [data-mode="off"] .p5, [data-mode="off"] .contract-card { opacity: .15; }

/* stage strip: lights up in order with the log; off mode skips the skill stages */
.stages { list-style: none; margin: 0; padding: 10px 16px; display: flex; flex-wrap: wrap; gap: 8px; border-bottom: 1px solid var(--border); background: #0C1018; font-size: 12px; }
.stg { padding: 4px 10px; border-radius: 999px; border: 1px solid var(--border); color: var(--dim); }
[data-mode="auto"] .stg, [data-mode="confirm"] .stg, [data-mode="off"] .stg.g1, [data-mode="off"] .stg.g4 { animation: stgOn .4s both; }
.stg.g1 { animation-delay: .4s !important; } .stg.g2 { animation-delay: 1.4s !important; } .stg.g3 { animation-delay: 1.9s !important; }
.stg.g4 { animation-delay: 2.2s !important; } .stg.g5 { animation-delay: 2.5s !important; }
[data-mode="confirm"] .stg.g4, [data-mode="confirm"] .stg.g5 { animation-delay: 3.2s !important; }
@keyframes stgOn { to { color: #14100a; background: var(--gold); border-color: var(--gold); } }

/* terminal log: only the active mode's lines, revealed in sequence */
.ln { display: none; white-space: pre-wrap; }
[data-mode="auto"] .ln.mode-auto, [data-mode="confirm"] .ln.mode-confirm, [data-mode="off"] .ln.mode-off { display: block; animation: lnIn .45s both; }
.ln.d1 { animation-delay: .1s !important; } .ln.d2 { animation-delay: .4s !important; } .ln.d3 { animation-delay: .7s !important; }
.ln.d4 { animation-delay: 1s !important; } .ln.d5 { animation-delay: 1.4s !important; } .ln.d6 { animation-delay: 1.9s !important; }
.ln.d7 { animation-delay: 2.5s !important; } .ln.d8 { animation-delay: 3s !important; }
@keyframes lnIn { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; transform: none; } }

/* quickstart */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.step, .card { position: relative; min-width: 0; padding: 20px; border: 1px solid var(--border); border-radius: 14px; background: rgba(14,17,23,.85); transition: border-color .2s, transform .2s; }
.step:hover, .card:hover { border-color: rgba(245,158,11,.45); transform: translateY(-2px); }
.num { display: inline-grid; place-items: center; width: 30px; height: 34px; margin-bottom: 12px; font-weight: 800; color: #14100a; background: var(--amber); clip-path: polygon(25% 5%, 75% 5%, 100% 50%, 75% 95%, 25% 95%, 0 50%); }
.step h3, .card h3 { font-size: 17px; margin-bottom: 6px; }
.step p, .card p { margin: 0 0 14px; color: var(--mut); font-size: 14.5px; }
.card p { margin: 0; }
.cmd { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 8px 8px 12px; border-radius: 10px; background: #0A0D13; border: 1px solid rgba(245,158,11,.25); font-size: 12.5px; }
.cmd code { min-width: 0; background: none; border: 0; padding: 0; color: var(--text); overflow-x: auto; white-space: nowrap; }
.note { margin: 20px 0 0; font-size: 12.5px; color: var(--dim); }

/* skills */
.skills { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 16px; }
.skill { display: flex; flex-direction: column; gap: 10px; }
.skill h3 { margin: 0; }
.skill .cmd { margin-top: auto; }
.skill-featured { border-color: rgba(245,158,11,.5); background: linear-gradient(160deg, rgba(245,158,11,.1), rgba(14,17,23,.9) 60%); }
.skill .tag { align-self: flex-start; margin: 0; padding: 2px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; color: #14100a; background: var(--gold); }
.skill .tag-dim { color: var(--mut); background: var(--panel); border: 1px solid var(--border); font-weight: 600; }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; font-size: 12px; }
.chips li { padding: 2px 10px; border-radius: 999px; border: 1px solid rgba(245,158,11,.5); color: var(--gold); }
.chips li.opt { border-style: dashed; border-color: rgba(16,185,129,.55); color: var(--em); }
.skill p.meta { font-size: 12px; color: var(--dim); }

/* features */
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 28px; }
.card-new { border-color: rgba(245,158,11,.35); }

/* security */
.secure { display: flex; gap: 20px; align-items: flex-start; padding: 28px; border-radius: 16px; border: 1px solid rgba(16,185,129,.35); background: linear-gradient(135deg, rgba(16,185,129,.1), rgba(14,17,23,.9)); }
.secure h2 { font-size: clamp(22px, 3vw, 28px); margin-bottom: 8px; }
.section-sm { padding: 32px 0 56px; }
.section-sm .secure { padding: 20px 24px; }
.section-sm .secure h2 { font-size: clamp(18px, 2.4vw, 22px); }
.section-sm .secure p { font-size: 14.5px; }
.secure p { margin: 0; color: var(--mut); }
.badge { flex: none; padding: 6px 12px; border-radius: 8px; font-weight: 800; color: #04140E; background: var(--em); }

/* footer */
.footer { border-top: 1px solid var(--border); padding: 24px 0; color: var(--dim); font-size: 13px; }
.footer-inner { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.foot-links { display: flex; gap: 16px; }
.foot-links a:hover { color: var(--gold); }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); padding: 10px 16px; border-radius: 10px; background: var(--panel); border: 1px solid rgba(245,158,11,.4); opacity: 0; pointer-events: none; transition: .25s; font-size: 14px; z-index: 90; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* reveal */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s, transform .6s; }
.reveal.is-visible { opacity: 1; transform: none; }

/* 404 */
.notfound { min-height: 80vh; display: grid; place-items: center; text-align: center; }
.notfound .kicker { color: var(--amber); font-size: 14px; }
.notfound h1 { font-size: 36px; margin: 8px 0; }
.notfound .cta-row { margin-top: 20px; }

@media (max-width: 900px) {
  .steps, .grid { grid-template-columns: repeat(2, 1fr); }
  .skills { grid-template-columns: 1fr 1fr; }
  .skill-featured { grid-column: 1 / -1; }
  .stage-body { grid-template-columns: 1fr; }
  .log { border-left: 0; border-top: 1px solid var(--border); }
  .nav-links { display: none; }
}
@media (max-width: 560px) {
  .steps, .grid, .skills { grid-template-columns: 1fr; }
  .nav-install, .nav-actions .btn-ghost { display: none; }
  .hero { padding-top: 48px; }
  .secure { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
