:root{
  --bg:#0b0c0e;
  --surface:#141519;
  --surface-2:#1b1d22;
  --border:#26292f;
  --amber:#f5a623;
  --amber-dim:#8a611c;
  --green:#4ade80;
  --text:#e8e9eb;
  --muted:#8b92a0;
  --mono:'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  --display:'Space Grotesk', system-ui, -apple-system, sans-serif;
  --body:'Inter', system-ui, -apple-system, sans-serif;
}
*{box-sizing:border-box;}
html{scroll-behavior:smooth;}
body{
  margin:0; background:var(--bg); color:var(--text);
  font-family:var(--body); line-height:1.5;
  background-image:
    radial-gradient(circle at 15% 0%, rgba(245,166,35,0.06), transparent 40%),
    radial-gradient(circle at 85% 20%, rgba(74,222,128,0.05), transparent 40%);
}
a{color:inherit;}
.wrap{max-width:1080px; margin:0 auto; padding:0 24px;}
.icon{width:1em; height:1em; vertical-align:-0.15em; display:inline-block;}

/* sprocket strip */
.sprockets{
  height:14px;
  background-image: repeating-linear-gradient(90deg, var(--border) 0 6px, transparent 6px 20px);
  background-position: center;
  background-size: 20px 6px;
  background-repeat: repeat-x;
  opacity:.5;
}
.sprockets.top{border-bottom:1px solid var(--border);}
.sprockets.bottom{border-top:1px solid var(--border);}

header{position:sticky; top:0; z-index:50; background:rgba(11,12,14,0.85); backdrop-filter:blur(10px); border-bottom:1px solid var(--border);}
.nav{height:64px; display:flex; align-items:center; justify-content:space-between; gap:16px;}
.logo{display:flex; align-items:center; gap:10px; font-family:var(--display); font-weight:700; font-size:18px; letter-spacing:-0.02em; text-decoration:none; color:var(--text);}
.logo .mark{width:32px; height:32px; border-radius:8px; background:var(--amber); color:#151515; display:flex; align-items:center; justify-content:center; font-size:16px; flex-shrink:0;}
.tc{font-family:var(--mono); font-size:12px; color:var(--green); background:rgba(74,222,128,0.08); border:1px solid rgba(74,222,128,0.25); padding:5px 10px; border-radius:6px; letter-spacing:0.04em; white-space:nowrap;}
.crumb{font-family:var(--mono); font-size:11px; color:var(--muted); padding:14px 0 0;}
.crumb a{color:var(--muted); text-decoration:none;}
.crumb a:hover{color:var(--amber);}

main{padding:56px 0 40px;}
.hero{text-align:center; max-width:680px; margin:0 auto 40px;}
.eyebrow{font-family:var(--mono); font-size:12px; color:var(--amber); letter-spacing:0.12em; text-transform:uppercase; margin-bottom:14px;}
h1{font-family:var(--display); font-size:clamp(30px,5vw,46px); font-weight:700; letter-spacing:-0.03em; margin:0 0 16px; line-height:1.1;}
h1 .accent{color:var(--amber);}
.sub{color:var(--muted); font-size:16px; max-width:560px; margin:0 auto;}

.console{
  background:var(--surface); border:1px solid var(--border); border-radius:16px;
  padding:14px; max-width:680px; margin:0 auto; box-shadow:0 20px 60px -20px rgba(0,0,0,0.6);
}
.console-row{display:flex; gap:10px; flex-wrap:wrap;}
.input-shell{flex:1; min-width:220px; position:relative; display:flex; align-items:center;}
.input-shell .icon{position:absolute; left:16px; color:var(--muted);}
input[type=text]{
  width:100%; background:var(--bg); border:1px solid var(--border); border-radius:10px;
  padding:14px 14px 14px 42px; color:var(--text); font-family:var(--mono); font-size:13px;
}
input[type=text]:focus{outline:none; border-color:var(--amber);}
input[type=text]::placeholder{color:#565b66;}
button.fetch{
  background:var(--amber); color:#151515; border:none; border-radius:10px; font-family:var(--display);
  font-weight:700; font-size:14px; padding:14px 22px; cursor:pointer; display:flex; align-items:center; gap:8px;
  transition:transform .12s ease, background .12s ease;
}
button.fetch:hover{background:#ffb944;}
button.fetch:active{transform:scale(0.97);}
.hint{font-family:var(--mono); font-size:11px; color:var(--muted); margin-top:10px; padding-left:4px;}
.err{display:none; color:#f87171; font-family:var(--mono); font-size:12px; margin-top:10px; padding-left:4px;}

#video-meta{display:none; max-width:680px; margin:20px auto 0; background:var(--surface-2); border:1px solid var(--border); border-radius:12px; padding:14px 16px; text-align:left; gap:12px; align-items:center;}
#video-meta img{width:64px; height:36px; object-fit:cover; border-radius:5px; flex-shrink:0;}
#video-meta .vt{font-size:13px; font-weight:600; color:var(--text); margin-bottom:2px;}
#video-meta .vc{font-size:12px; color:var(--muted); font-family:var(--mono);}

#results{display:none; max-width:900px; margin:48px auto 0;}
.results-head{display:flex; align-items:center; justify-content:space-between; border-bottom:1px solid var(--border); padding-bottom:14px; margin-bottom:24px;}
.results-head h3{font-family:var(--display); font-size:18px; margin:0;}
.ready{font-family:var(--mono); font-size:11px; color:var(--green); background:rgba(74,222,128,0.08); border:1px solid rgba(74,222,128,0.25); padding:4px 10px; border-radius:20px; display:inline-flex; align-items:center; gap:5px;}

.grid{display:grid; grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); gap:20px;}
.frame{
  background:var(--surface); border:1px solid var(--border); border-radius:14px; overflow:hidden;
  display:flex; flex-direction:column; transition:border-color .15s ease, transform .15s ease;
}
.frame:hover{border-color:var(--amber-dim); transform:translateY(-2px);}
.frame-media{position:relative; aspect-ratio:16/9; background:var(--bg); overflow:hidden;}
.frame-media img{width:100%; height:100%; object-fit:cover; display:block;}
.frame-media .res{position:absolute; bottom:8px; right:8px; font-family:var(--mono); font-size:10px; background:rgba(0,0,0,0.75); padding:3px 7px; border-radius:5px; color:#fff;}
.frame-body{padding:14px; display:flex; flex-direction:column; gap:10px; flex:1;}
.frame-body h4{margin:0; font-size:13px; font-family:var(--display); font-weight:600;}
.frame-body .fname{font-family:var(--mono); font-size:10px; color:var(--muted); word-break:break-all;}
.dl{
  margin-top:auto; background:var(--surface-2); border:1px solid var(--border); color:var(--text);
  text-decoration:none; font-size:12px; font-weight:600; padding:10px; border-radius:8px;
  display:flex; align-items:center; justify-content:center; gap:8px; transition:background .12s ease, border-color .12s ease, color .12s ease;
}
.dl:hover{background:var(--amber); color:#151515; border-color:var(--amber);}

section.info{padding:64px 0; border-top:1px solid var(--border);}
.info h2{font-family:var(--display); font-size:26px; letter-spacing:-0.02em; margin:0 0 8px;}
.info .lead{color:var(--muted); font-size:14px; margin:0 0 32px; max-width:600px;}

.steps{display:grid; grid-template-columns:repeat(3,1fr); gap:20px;}
.step{background:var(--surface); border:1px solid var(--border); border-radius:14px; padding:22px;}
.step .num{font-family:var(--mono); color:var(--amber); font-size:12px; margin-bottom:10px;}
.step h4{margin:0 0 8px; font-family:var(--display); font-size:15px;}
.step p{margin:0; font-size:13px; color:var(--muted);}

table.res-table{width:100%; border-collapse:collapse; font-size:13px;}
table.res-table th, table.res-table td{text-align:left; padding:12px 14px; border-bottom:1px solid var(--border);}
table.res-table th{font-family:var(--mono); font-size:11px; color:var(--muted); text-transform:uppercase; letter-spacing:0.06em; font-weight:500;}
table.res-table td.code{font-family:var(--mono); color:var(--amber); font-size:12px;}
table.res-table tr:last-child td{border-bottom:none;}

.faq-item{border-bottom:1px solid var(--border); padding:18px 0;}
.faq-item summary{cursor:pointer; font-family:var(--display); font-size:15px; font-weight:600; list-style:none; display:flex; justify-content:space-between; align-items:center; gap:12px;}
.faq-item summary::-webkit-details-marker{display:none;}
.faq-item summary::after{content:'+'; color:var(--amber); font-size:18px; font-family:var(--mono); flex-shrink:0;}
.faq-item[open] summary::after{content:'\2013';}
.faq-item p{color:var(--muted); font-size:13px; margin:12px 0 0; max-width:640px;}

.callout{background:var(--surface); border:1px solid var(--border); border-left:3px solid var(--amber); border-radius:10px; padding:16px 18px; font-size:13px; color:var(--muted); max-width:680px;}
.callout a{color:var(--amber); text-decoration:underline;}
.pill-links{display:flex; flex-wrap:wrap; gap:10px; margin-top:24px;}
.pill-links a{font-family:var(--mono); font-size:12px; color:var(--text); background:var(--surface); border:1px solid var(--border); padding:8px 14px; border-radius:20px; text-decoration:none; transition:border-color .12s ease, color .12s ease;}
.pill-links a:hover{border-color:var(--amber); color:var(--amber);}

/* prose (legal pages) */
.prose{max-width:720px; margin:0 auto;}
.prose h2{font-family:var(--display); font-size:20px; margin:36px 0 12px;}
.prose h2:first-child{margin-top:0;}
.prose p, .prose li{color:var(--muted); font-size:14px; line-height:1.7;}
.prose ul{padding-left:20px;}
.prose strong{color:var(--text);}
.updated{font-family:var(--mono); font-size:11px; color:var(--muted); margin-bottom:32px; display:block;}

/* footer sitemap */
footer{border-top:1px solid var(--border); padding:48px 0 24px;}
.foot-grid{display:grid; grid-template-columns:1.4fr 1fr 1fr 1fr; gap:32px; padding-bottom:32px;}
.foot-col h5{font-family:var(--mono); font-size:11px; text-transform:uppercase; letter-spacing:0.08em; color:var(--muted); margin:0 0 14px;}
.foot-col a{display:block; font-size:13px; color:var(--text); text-decoration:none; margin-bottom:10px; opacity:.85;}
.foot-col a:hover{color:var(--amber); opacity:1;}
.foot-col p{font-size:13px; color:var(--muted); max-width:280px; margin:0;}
.foot-bottom{border-top:1px solid var(--border); padding-top:20px; display:flex; flex-wrap:wrap; gap:12px; justify-content:space-between; align-items:center;}
.foot-bottom p{color:var(--muted); font-size:12px; font-family:var(--mono); margin:0;}

@media (max-width:760px){
  .steps{grid-template-columns:1fr;}
  .foot-grid{grid-template-columns:1fr 1fr;}
}
@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto;}
  *{transition:none !important;}
}
:focus-visible{outline:2px solid var(--amber); outline-offset:2px;}
