:root{--bg:#07060d;--fg:#f4f0ff;--dim:#9b92c2;--soft:#cdc6e6;--g:#35ff9e;--brass:#e0ad4a;--line:#27304a;--panel:#0c1220;--font:ui-monospace,"SF Mono",SFMono-Regular,Menlo,Consolas,monospace}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html{scroll-behavior:smooth}
html,body{margin:0}
body{background:radial-gradient(120% 60% at 50% -10%,#141b33 0%,#07060d 60%) no-repeat,#07060d;color:var(--fg);font-family:var(--font);font-size:14px;line-height:1.6;padding:0 16px 80px}
a{color:var(--g);text-decoration:none;border-bottom:1px dotted #2b6a55}
a:hover{color:#fff}
code{background:#131a2c;padding:1px 5px;border-radius:4px;font-size:12.5px}
header.top,main{max-width:980px;margin:0 auto}
.crumb{color:var(--dim);font-size:12px;padding-top:18px}
.crumb a{color:var(--dim);border:0}.crumb a:hover{color:var(--fg)}.crumb span{color:var(--fg)}
h1{font-size:clamp(28px,7vw,48px);letter-spacing:.06em;margin:14px 0 6px;line-height:1.1;color:transparent;background:linear-gradient(90deg,#ffd98a,#e0ad4a 45%,#35ff9e);-webkit-background-clip:text;background-clip:text}
h2{font-size:20px;letter-spacing:.08em;text-transform:uppercase;color:var(--brass);margin:0 0 8px}
h3{font-size:14px;letter-spacing:.08em;text-transform:uppercase;color:var(--fg);margin:22px 0 6px}
p{margin:8px 0;color:var(--soft)}
.lede{font-size:15px;max-width:760px}
.warn{border:1px solid #6b5320;background:#1c160a;color:#f1dfb4;border-radius:10px;padding:10px 14px;max-width:760px}
.warn b{color:#ffd27a}
section{margin-top:44px;border-top:1px solid var(--line);padding-top:26px}
.how .coarse{display:none}
@media (pointer:coarse){.how .fine{display:none}.how .coarse{display:inline}}
.stage{position:relative;width:100%;border:1px solid var(--line);border-radius:14px;background:radial-gradient(80% 80% at 35% 50%,#0f1830,#080a14);overflow:hidden}
#machine{display:block;width:100%}
#crankpad{position:absolute;border-radius:50%;touch-action:none;cursor:grab;outline:none}
#crankpad:active{cursor:grabbing}
#crankpad:focus-visible{box-shadow:0 0 0 2px var(--g)}
.readout{position:absolute;left:10px;top:8px;font-size:12px;color:var(--soft);pointer-events:none;line-height:1.5;text-shadow:0 0 6px #000,0 0 2px #000}
.readout b{color:#fff;font-size:15px}
.readout i{font-style:normal;display:inline-block;width:9px;height:9px;border-radius:50%;margin-right:5px}
.controls{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-top:10px}
button,select{font:inherit;color:var(--fg);background:#121a2c;border:1px solid #2c3a5c;border-radius:8px;padding:8px 12px;cursor:pointer;min-height:40px}
button:hover{border-color:#5a6fa8}
button[aria-pressed=true]{border-color:var(--g);color:var(--g);background:#0f2a24}
button:focus-visible,select:focus-visible,a:focus-visible{outline:2px solid var(--g);outline-offset:2px}
#bPlay{min-width:96px;font-weight:700}
.speed{color:var(--dim);font-size:12px;display:flex;align-items:center;gap:6px}
.toggles{display:flex;gap:6px;flex-wrap:wrap;margin-left:auto}
.toggles button{font-size:12px;padding:6px 10px;min-height:36px}
.closeup{margin-top:18px;border:1px solid var(--line);border-radius:14px;background:var(--panel);padding:12px 14px}
.closeup-head{display:flex;flex-wrap:wrap;gap:10px;align-items:center;justify-content:space-between}
.closeup h3{margin:0}
.pairs{display:flex;gap:6px;flex-wrap:wrap}
.pairs button{font-size:12px;padding:6px 10px;min-height:36px}
#mesh{display:block;width:100%;margin-top:10px;border-radius:10px;background:#080b15}
.cap{font-size:12.5px;color:var(--dim)}
.scroll{overflow-x:auto;-webkit-overflow-scrolling:touch}
table{border-collapse:collapse;width:100%;min-width:640px;font-size:13px;margin:10px 0}
th,td{padding:7px 10px;text-align:right;border-bottom:1px solid #1b2238;white-space:nowrap}
th{color:var(--dim);font-weight:400;font-size:11.5px;letter-spacing:.05em;text-transform:uppercase}
th:first-child,td:first-child{text-align:left}
td .dot{display:inline-block;width:10px;height:10px;border-radius:50%;margin-right:7px;vertical-align:-1px}
td.good{color:var(--g)}
#section svg{display:block;width:100%;min-width:680px;height:auto}
.legend{display:flex;flex-wrap:wrap;gap:6px 14px;font-size:12px;color:var(--soft);margin-top:8px}
.legend span{display:inline-flex;align-items:center;gap:6px;cursor:default}
.legend i{width:12px;height:12px;border-radius:3px;display:inline-block;border:1px solid #0006}
ul.checks{list-style:none;padding:0;margin:12px 0;display:grid;gap:8px}
ul.checks li{border:1px solid var(--line);border-left:3px solid var(--g);background:var(--panel);border-radius:8px;padding:9px 12px;color:var(--soft)}
ul.checks li b{color:#fff}
ul.checks li.bad{border-left-color:#ff6b6b}
ul.plain{padding-left:18px;color:var(--soft)}ul.plain li{margin:6px 0}ul.plain b{color:#fff}
.sets{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:14px 0;color:var(--dim);font-size:12.5px}
.plates{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:14px}
.plate{border:1px solid var(--line);border-radius:12px;background:var(--panel);padding:12px;display:flex;flex-direction:column;gap:8px}
.plate h4{margin:0;font-size:14px;letter-spacing:.04em}
.plate h4 small{color:var(--dim);font-weight:400;margin-right:6px}
.plate svg{width:100%;height:auto;border-radius:8px;background:#0a0e1a;display:block}
.plate .nums{font-size:12.5px;color:var(--soft)}
.plate .nums b{color:#fff}
.plate .dl{display:flex;gap:8px;flex-wrap:wrap;margin-top:auto}
.dl a,a.btn{display:inline-flex;align-items:center;min-height:40px;padding:8px 12px;border:1px solid var(--g);border-radius:8px;background:#0f2a24;color:var(--g);font-weight:700;font-size:12.5px}
.dl a.alt,a.btn.alt{border-color:#2c3a5c;background:#121a2c;color:var(--soft);font-weight:400}
.total{font-size:14px;color:var(--fg)}
.total a{margin-left:4px}
.fit{margin-top:24px;border:1px solid #6b5320;border-radius:14px;background:#141008;padding:14px 16px}
.fit h3{margin-top:0;color:#ffd27a}
.fitgrid{display:grid;grid-template-columns:minmax(220px,320px) 1fr;gap:16px;align-items:start}
.fitgrid svg{width:100%;height:auto;display:block;background:#0a0e1a;border-radius:8px}
.fit ol{margin:0;padding-left:20px;color:var(--soft)}.fit li{margin:0 0 8px}.fit li b{color:#fff}
@media(max-width:640px){.fitgrid{grid-template-columns:1fr}}
.partlist{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:10px;margin:14px 0}
.pcard{border:1px solid var(--line);border-radius:10px;background:var(--panel);padding:8px;font-size:11.5px;color:var(--soft);display:flex;flex-direction:column;gap:4px}
.pcard svg{width:100%;height:84px;display:block}
.pcard b{color:#fff;font-weight:400;font-size:12px}
ol.steps{list-style:none;padding:0;margin:16px 0;display:grid;gap:14px;counter-reset:step}
ol.steps li{counter-increment:step;border:1px solid var(--line);border-radius:12px;background:var(--panel);padding:12px 14px;display:grid;grid-template-columns:minmax(240px,400px) 1fr;gap:14px;align-items:center}
ol.steps li svg{width:100%;height:auto;display:block;background:#0a0e1a;border-radius:8px}
ol.steps li .txt::before{content:counter(step);display:inline-flex;width:26px;height:26px;border-radius:50%;background:var(--brass);color:#1a1204;font-weight:800;align-items:center;justify-content:center;margin-right:8px}
ol.steps li .txt b{color:#fff}
ol.steps li .txt p{margin:6px 0 0}
@media(max-width:700px){ol.steps li{grid-template-columns:1fr}}
#skyfig svg{width:100%;max-width:460px;height:auto;display:block;margin-top:8px}
#today{color:var(--fg)}
.stage.tall .readout{position:static;padding:8px 12px 0;text-shadow:none}
.stage.tall .readout br{display:none}.stage.tall .readout i{margin-left:10px}.stage.tall .readout b{display:inline-block}
.stage3d{position:relative;border:1px solid var(--line);border-radius:14px;background:radial-gradient(80% 90% at 50% 40%,#16203c,#080a14);overflow:hidden}
#view3d{display:block;width:100%;height:min(62vw,520px);min-height:300px;touch-action:pan-y}
.veil3d{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;color:var(--dim);font-size:13px;pointer-events:none}
.veil3d.off{display:none}
input[type=range]{accent-color:var(--brass);width:160px;height:36px}
.jump{display:flex;flex-wrap:wrap;gap:6px 8px;margin:14px 0 0;font-size:12.5px}
.jump a{border:1px solid var(--line);border-radius:999px;padding:6px 12px;color:var(--soft);min-height:32px;display:inline-flex;align-items:center}
.jump a:hover{border-color:var(--g);color:var(--g)}
.scroll.more{border-right:2px solid var(--brass);border-radius:0 4px 4px 0}
.scrollcue{font-size:11.5px;color:var(--brass);text-align:right;margin:2px 0 0}
.readout span.p{white-space:nowrap;display:inline-block}
.stage.tall .readout span.p{margin-right:10px}.stage.tall .readout i{margin-left:0}
@media(max-width:700px){.toggles{margin-left:0}}
.fit ol li i{font-style:normal;display:inline-flex;width:20px;height:20px;border-radius:50%;background:#ffd27a;color:#1a1204;font-weight:800;font-size:12px;align-items:center;justify-content:center;margin-right:4px}
.plate svg{max-width:300px;margin:0 auto}
@media(max-width:640px){.plate svg{max-width:220px}.jump a,.toggles button,.pairs button{min-height:40px}}
.fit li .fix{display:block;color:#f1dfb4;margin-top:3px}
/* On a phone the two wide tables keep only the columns that carry the point; the rest are a rotate or a desktop away. */
@media(max-width:640px){
  #ratios,#meshtable{min-width:0}
  #ratios th:nth-child(3),#ratios td:nth-child(3),#ratios th:nth-child(4),#ratios td:nth-child(4),#ratios th:nth-child(5),#ratios td:nth-child(5),
  #ratios th:nth-child(7),#ratios td:nth-child(7),#ratios th:nth-child(8),#ratios td:nth-child(8),#ratios th:nth-child(10),#ratios td:nth-child(10),
  #meshtable th:nth-child(3),#meshtable td:nth-child(3),#meshtable th:nth-child(6),#meshtable td:nth-child(6),#meshtable th:nth-child(7),#meshtable td:nth-child(7),
  #meshtable th:nth-child(8),#meshtable td:nth-child(8),#meshtable th:nth-child(9),#meshtable td:nth-child(9){display:none}
  th,td{padding:7px 6px;white-space:normal}
  .narrownote{display:block}
}
.narrownote{display:none;font-size:11.5px;color:var(--dim);margin:2px 0 0}
td:first-child{white-space:nowrap}
