@font-face{font-family:"Stencil";src:url(fonts/big-shoulders-stencil-display-latin-800-normal.woff2) format("woff2");font-weight:800;font-display:swap}
@font-face{font-family:"Stencil";src:url(fonts/big-shoulders-stencil-display-latin-700-normal.woff2) format("woff2");font-weight:700;font-display:swap}
@font-face{font-family:"Literata";src:url(fonts/literata-latin-opsz-normal.woff2) format("woff2");font-weight:200 900;font-display:swap}
@font-face{font-family:"Literata";src:url(fonts/literata-latin-opsz-italic.woff2) format("woff2");font-weight:200 900;font-style:italic;font-display:swap}

:root{
  --manila:#E2CC8C;
  --manila-deep:#CDB370;
  --red:#A3241C;
  --red-dark:#7E1A14;
  --graphite:#2B2F33;
  --graphite-soft:#555B60;
  --vinyl:#C9CFC9;
  --paper:#FBF8EF;
  --rule:#D8D2C0;
  --measure:68ch;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth;scroll-padding-top:1.5rem}
@media (prefers-reduced-motion:reduce){html{scroll-behavior:auto}}
body{margin:0;background:var(--manila);color:var(--graphite);font-family:"Literata",Georgia,serif;font-size:1.0625rem;line-height:1.6;-webkit-font-smoothing:antialiased}
img{max-width:100%;height:auto;display:block}
a{color:var(--red-dark);text-underline-offset:.18em;text-decoration-thickness:1px}
a:hover{text-decoration-thickness:2px}
:focus-visible{outline:3px solid var(--red);outline-offset:3px}
h1,h2,h3{font-family:"Stencil",Impact,sans-serif;font-weight:800;line-height:.95;letter-spacing:.01em;margin:0}
p{margin:0 0 1rem;max-width:var(--measure)}

/* ---------- the sheet ---------- */
.binder{max-width:1180px;margin:0 auto;padding:2.5rem 4.5rem 3rem 1.5rem;position:relative}
.sheet{background:var(--paper);position:relative;padding:3rem 3.5rem 3rem 6rem;box-shadow:0 1px 0 #b49a5b,0 18px 40px -24px rgba(60,45,10,.45)}
.sheet::before{content:"";position:absolute;left:3.6rem;top:0;bottom:0;border-left:1px solid #E7B9B4}
.holes{position:absolute;left:1.35rem;top:0;bottom:0;width:1.5rem;pointer-events:none}
.holes{background:radial-gradient(circle at 50% 50%,#c9b26f 0 .62rem,#b89f5c .62rem .75rem,transparent .76rem) 0 3.5rem/1.5rem 26rem repeat-y}
.holes span{display:none}

/* ---------- divider tabs ---------- */
.tabs{position:fixed;right:0;top:50%;transform:translateY(-50%);display:flex;flex-direction:column;gap:.35rem;z-index:5;margin:0;padding:0;list-style:none}
.tabs a{display:flex;align-items:center;justify-content:center;writing-mode:vertical-rl;font-family:"Stencil",Impact,sans-serif;font-weight:700;font-size:1.05rem;letter-spacing:.04em;color:var(--graphite);text-decoration:none;background:var(--vinyl);width:2.9rem;padding:1rem 0;border-radius:.45rem 0 0 .45rem;box-shadow:-2px 2px 0 rgba(0,0,0,.12);transition:width .15s,background .15s}
.tabs a:nth-child(odd){background:#E9DFC2}
.tabs a:hover{width:3.3rem}
.tabs a[aria-current="true"]{background:var(--red);color:#fff;width:3.3rem}

/* ---------- masthead ---------- */
.mast{display:flex;justify-content:space-between;align-items:baseline;gap:1rem;border-bottom:3px solid var(--graphite);padding-bottom:.6rem;margin-bottom:2.5rem;flex-wrap:wrap}
.mast .mark{font-family:"Stencil",Impact,sans-serif;font-weight:800;font-size:1.55rem;letter-spacing:.02em;color:var(--graphite);text-decoration:none}
.mast small{font-size:.9rem;color:var(--graphite-soft)}

/* ---------- hero ---------- */
.hero{display:grid;grid-template-columns:1.05fr .95fr;gap:3rem;align-items:center;margin-bottom:4rem}
.hero h1{font-size:clamp(3rem,6.4vw,5.6rem);line-height:.88}
.hero .lede{font-size:1.2rem;margin:1.4rem 0 1.8rem;max-width:34ch}
.hero figure{margin:0}
.hero figure img{border:1px solid var(--rule);width:100%;aspect-ratio:1200/896;object-fit:cover}
.hero figcaption,.cap{font-size:.82rem;color:var(--graphite-soft);margin-top:.5rem;font-style:italic}
.actions{display:flex;flex-wrap:wrap;gap:.75rem 1.25rem;align-items:center}
.btn{display:inline-flex;align-items:center;gap:.6rem;background:var(--red);color:#fff;text-decoration:none;font-family:"Stencil",Impact,sans-serif;font-weight:700;font-size:1.3rem;letter-spacing:.03em;padding:.85rem 1.35rem .8rem;border-radius:.3rem;border:0;cursor:pointer;box-shadow:0 3px 0 var(--red-dark)}
.btn:hover{background:var(--red-dark);text-decoration:none}
.btn:active{transform:translateY(2px);box-shadow:0 1px 0 var(--red-dark)}
.btn svg{width:1.1rem;height:1.1rem;flex:none}
.btn-meta{font-size:.9rem;color:var(--graphite-soft)}

/* ---------- sections ---------- */
section.div{padding-top:3.5rem;margin-top:3.5rem;border-top:1px solid var(--rule)}
.div-head{display:grid;grid-template-columns:auto 1fr;column-gap:1.2rem;align-items:end;margin-bottom:1.6rem}
.div-head .num{font-family:"Stencil",Impact,sans-serif;font-weight:800;font-size:4.2rem;line-height:.8;color:var(--red)}
.div-head h2{font-size:clamp(2.1rem,3.6vw,2.9rem)}
.div-head p{grid-column:2;margin:.6rem 0 0;color:var(--graphite-soft)}

.steps{counter-reset:s;list-style:none;padding:0;margin:0 0 1.5rem;display:grid;grid-template-columns:repeat(4,1fr);gap:1.25rem}
.steps li{counter-increment:s;border-top:2px solid var(--graphite);padding-top:.6rem;font-size:.97rem}
.steps li::before{content:counter(s);font-family:"Stencil",Impact,sans-serif;font-weight:800;font-size:1.6rem;display:block;line-height:1;margin-bottom:.3rem;color:var(--red)}

/* file rows */
.files{list-style:none;margin:0;padding:0;border-top:2px solid var(--graphite)}
.files li{border-bottom:1px solid var(--rule)}
.files a{display:grid;grid-template-columns:1fr auto auto;gap:1rem;align-items:baseline;padding:.85rem .25rem;text-decoration:none;color:var(--graphite)}
.files a:hover{background:#F3EEDD}
.files .t{font-weight:600}
.files .t em{font-style:normal;font-weight:400;color:var(--graphite-soft);font-size:.9rem;margin-left:.5rem}
.files .m{font-size:.85rem;color:var(--graphite-soft);white-space:nowrap}
.files .d{font-family:"Stencil",Impact,sans-serif;font-weight:700;color:var(--red);font-size:1.05rem;white-space:nowrap}

/* schematics */
.figs{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:1.5rem 1.25rem}
.figs a{text-decoration:none;color:var(--graphite);display:block}
.figs img{border:1px solid var(--rule);aspect-ratio:1200/896;object-fit:cover;background:#eee}
.figs a:hover img{border-color:var(--graphite)}
.figs b{font-family:"Stencil",Impact,sans-serif;font-weight:800;color:var(--red);font-size:1.15rem;margin-right:.35rem}
.figs span{display:block;font-size:.88rem;line-height:1.4;margin-top:.45rem}
.chapter-label{grid-column:1/-1;font-family:"Stencil",Impact,sans-serif;font-weight:700;font-size:1.25rem;border-bottom:1px solid var(--graphite);padding-bottom:.25rem;margin-top:.75rem}

/* backup gate */
.gate{background:#F3EEDD;border:1px solid var(--rule);border-left:6px solid var(--red);padding:1.6rem 1.8rem;max-width:44rem}
.gate label{display:block;font-weight:600;margin-bottom:.5rem}
.gate .row{display:flex;gap:.75rem;flex-wrap:wrap}
.gate input{font:inherit;font-size:1.1rem;padding:.65rem .8rem;border:2px solid var(--graphite);border-radius:.3rem;background:#fff;min-width:0;flex:1 1 14rem;text-transform:uppercase;letter-spacing:.08em}
.gate .msg{margin:.8rem 0 0;font-size:.95rem;min-height:1.5em}
.gate .msg.err{color:var(--red-dark);font-weight:600}
.gate .msg.ok{color:#2E5E2E;font-weight:600}
.fine{font-size:.88rem;color:var(--graphite-soft)}

/* tools */
.tools{width:100%;border-collapse:collapse;font-size:.97rem}
.tools th,.tools td{text-align:left;padding:.75rem .6rem;border-bottom:1px solid var(--rule);vertical-align:top}
.tools th{font-family:"Stencil",Impact,sans-serif;font-weight:700;font-size:1.05rem;border-bottom:2px solid var(--graphite);letter-spacing:.02em}
.tools td:first-child{font-weight:600;white-space:nowrap}
.tools td:last-child{white-space:nowrap}
.howto{margin-top:2rem;display:grid;grid-template-columns:1fr 1fr;gap:2rem}
.howto h3{font-size:1.6rem;margin-bottom:.6rem}
.howto ol{margin:0;padding-left:1.2rem}
.howto li{margin-bottom:.4rem}
code{font-family:ui-monospace,Menlo,Consolas,monospace;font-size:.88em;background:#EFE9D6;padding:.1em .35em;border-radius:.2em}

/* updates */
.log{border-top:2px solid var(--graphite);margin:0;padding:0;list-style:none}
.log li{display:grid;grid-template-columns:9rem 1fr;gap:1rem;padding:.9rem 0;border-bottom:1px solid var(--rule)}
.log time{font-family:"Stencil",Impact,sans-serif;font-weight:700;font-size:1.15rem}

footer.foot{margin-top:4rem;padding-top:1.2rem;border-top:3px solid var(--graphite);display:flex;justify-content:space-between;gap:1.5rem;flex-wrap:wrap;font-size:.85rem;color:var(--graphite-soft)}
footer.foot p{max-width:58ch;margin:0}

/* ---------- responsive ---------- */
@media (max-width:980px){
  .hero{grid-template-columns:1fr;gap:2rem}
  .hero figure img{aspect-ratio:4/3;max-height:none;object-position:55% 40%}
  .steps{grid-template-columns:1fr 1fr}
  .howto{grid-template-columns:1fr}
}
@media (max-width:760px){
  body{font-size:1rem}
  .binder{padding:0}
  .sheet{padding:1.25rem 1rem 2rem;box-shadow:none}
  .sheet::before,.holes{display:none}
  .tabs{position:sticky;top:0;transform:none;flex-direction:row;gap:0;overflow-x:auto;background:var(--manila);padding:.5rem .5rem 0;border-bottom:3px solid var(--graphite);scrollbar-width:none}
  .tabs::-webkit-scrollbar{display:none}
  .tabs a{writing-mode:horizontal-tb;width:auto;padding:.55rem .95rem .45rem;border-radius:.4rem .4rem 0 0;box-shadow:none;margin-right:.25rem;font-size:1rem;white-space:nowrap}
  .tabs a:hover,.tabs a[aria-current="true"]{width:auto}
  html{scroll-padding-top:4rem}
  .mast{margin-bottom:1.5rem}
  .mast small{font-size:.8rem}
  .mast .mark{font-size:1.35rem}
  .hero h1{font-size:2.9rem}
  .hero .lede{font-size:1.08rem;margin:1rem 0 1.3rem}
  .hero{margin-bottom:2rem}
  section.div{padding-top:2.25rem;margin-top:2.25rem}
  .div-head .num{font-size:3.2rem}
  .steps{grid-template-columns:1fr}
  .files a{grid-template-columns:1fr auto;row-gap:.15rem}
  .files .m{grid-column:1;grid-row:2}
  .files .d{grid-row:1/3;grid-column:2;align-self:center}
  .files .t em{display:block;margin-left:0}
  .figs{grid-template-columns:1fr 1fr;gap:1rem .75rem}
  .figs span{font-size:.8rem}
  .tools thead{display:none}
  .tools tr{display:block;border-bottom:1px solid var(--rule);padding:.6rem 0}
  .tools td{display:block;border:0;padding:.15rem 0;white-space:normal!important}
  .log li{grid-template-columns:1fr;gap:.2rem}
}
@media print{.tabs,.holes{display:none}body{background:#fff}.sheet{box-shadow:none;padding:0}}
