/* Draw32 — Layout: a slim sticky masthead carrying a persistent order
   capsule; every page is one measured prose column, broken by full-bleed
   bands for the pill set, the spec tables and the shop. The primary button
   is drawn as a capsule, so the thing you click has the shape of the thing
   you are buying. */

:root{
  /* the publish skeleton sets these on the main page; subpages need them too */
  color-scheme:light;
  padding-top:env(safe-area-inset-top,0px);
  padding-bottom:env(safe-area-inset-bottom,0px);

  /* The page is paper. Sections are told apart by space and hairlines, never
     by a change of fill, so --surface matches --bg in light mode and a card is
     white with a border rather than a grey block. Only genuinely contained
     things (the payload chip in the string diagram) take --surface-2. */
  --bg:#ffffff;
  --surface:#ffffff;
  --surface-2:#f2f3f0;
  --fg:#14171a;
  --muted:#5e6468;
  --rule:#e4e6e1;
  --rule-strong:#c2c6be;
  --accent:#e8650d;
  --accent-ink:#a9440a;
  --on-accent:#14171a;

  /* the three colours a pill is printed in */
  --fil-white:#ffffff;
  --fil-black:#171a1e;
  --fil-orange:#f47721;
  --rim-white:#c9cbc4;
  --rim-black:#484b4e;
  --rim-orange:#bd5a16;

  /* the live colour pair, rewritten by the switcher */
  --pill-body:#171a1e;
  --pill-mark:#f47721;
  --pill-rim:#484b4e;

  --wordmark:url(wordmark.png);

  --display:"Archivo",ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;
  --prose:"Spectral",ui-serif,Georgia,"Times New Roman",serif;
  --mono:"IBM Plex Mono",ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;

  --measure:37rem;
  --gutter:1.25rem;
  --s1:.375rem; --s2:.75rem; --s3:1.25rem; --s4:2rem; --s5:3.25rem; --s6:5rem;
}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]){
  color-scheme:dark;
  --bg:#0e1012;
  --surface:#15181a;
  --surface-2:#1d2124;
  --fg:#e9ebe8;
  --muted:#9aa09f;
  --rule:#262a2d;
  --rule-strong:#3b4145;
  --accent:#ff8338;
  --accent-ink:#ffa972;
  --on-accent:#141719;
  --rim-white:#b6b8b2;
  --rim-black:#5a5e61;
  --rim-orange:#ffa066;
  --pill-rim:#5a5e61;
  --wordmark:url(wordmark-dark.png);
}}
:root[data-theme="dark"]{
  color-scheme:dark;
  --bg:#0e1012;
  --surface:#15181a;
  --surface-2:#1d2124;
  --fg:#e9ebe8;
  --muted:#9aa09f;
  --rule:#262a2d;
  --rule-strong:#3b4145;
  --accent:#ff8338;
  --accent-ink:#ffa972;
  --on-accent:#141719;
  --rim-white:#b6b8b2;
  --rim-black:#5a5e61;
  --rim-orange:#ffa066;
  --pill-rim:#5a5e61;
  --wordmark:url(wordmark-dark.png);
}

*{box-sizing:border-box}
html{scroll-padding-top:5rem}
body{
  margin:0; background:var(--bg); color:var(--fg);
  font-family:var(--prose); font-size:1.0625rem; line-height:1.66;
  -webkit-font-smoothing:antialiased; overflow-x:hidden;
}
img{max-width:100%}
[hidden]{display:none!important}

/* ---------- type ---------- */
h1,h2,h3,h4{
  font-family:var(--display); font-weight:800; font-stretch:92%;
  letter-spacing:-.022em; line-height:1.1; margin:0; text-wrap:balance;
}
h1{font-size:clamp(2.1rem,7.2vw,3.35rem)}
h2{font-size:clamp(1.5rem,4.6vw,2.05rem); margin-block:var(--s5) var(--s3)}
h3{font-size:1.125rem; font-weight:700; font-stretch:96%; letter-spacing:-.008em;
   margin-block:var(--s4) var(--s2)}
h4{font-size:.9375rem; font-weight:700; font-stretch:100%; letter-spacing:0; margin-block:var(--s3) var(--s1)}
p{margin:0 0 var(--s3)}
a{color:inherit; text-underline-offset:.16em; text-decoration-thickness:1px;
  text-decoration-color:color-mix(in srgb,var(--accent) 55%,transparent)}
a:hover{text-decoration-color:var(--accent)}
:focus-visible{outline:2px solid var(--accent); outline-offset:3px; border-radius:3px}
strong{font-weight:600}
hr{border:0; border-top:1px solid var(--rule); margin-block:var(--s5)}
.mono{font-family:var(--mono); font-variant-numeric:tabular-nums; font-size:.94em}
.eyebrow{font-family:var(--display); font-size:.71rem; font-weight:700; font-stretch:100%;
  letter-spacing:.15em; text-transform:uppercase; color:var(--muted); margin:0 0 var(--s2)}
.lede{font-family:var(--display); font-weight:400; font-stretch:100%;
  font-size:clamp(1.08rem,3.1vw,1.22rem); line-height:1.5; letter-spacing:-.008em}
.small{font-size:.9rem; line-height:1.6}
.muted{color:var(--muted)}
.ui{font-family:var(--display); font-stretch:100%}

/* ---------- shell ---------- */
.wrap{max-width:var(--measure); margin-inline:auto; padding-inline:var(--gutter)}
.wide{max-width:60rem; margin-inline:auto; padding-inline:var(--gutter)}
main{display:block}
section{min-width:0}

header.mast{
  position:sticky; top:env(safe-area-inset-top,0px); z-index:20;
  background:color-mix(in srgb,var(--bg) 90%,transparent);
  backdrop-filter:blur(12px); border-bottom:1px solid var(--rule);
}
.mast-in{
  max-width:60rem; margin-inline:auto; padding:.55rem var(--gutter);
  display:flex; align-items:center; gap:var(--s3);
}
.wm{background-image:var(--wordmark); background-size:contain; background-repeat:no-repeat;
    background-position:left center; aspect-ratio:2046/768}
.mast .wm{height:2.1rem; width:5.6rem; flex:none}
.mast a.home{display:flex; align-items:center; text-decoration:none}
.mast nav{display:flex; gap:var(--s3); margin-left:auto; font-family:var(--display);
  font-stretch:100%; font-size:.9375rem; font-weight:600}
.mast nav a{text-decoration:none; color:var(--muted); white-space:nowrap}
.mast nav a:hover{color:var(--fg)}
.mast nav a[aria-current="page"]{color:var(--fg)}
.mast .cta-mini{margin-left:var(--s2)}
.icon-btn{flex:none; display:inline-flex; align-items:center; justify-content:center;
  width:2.1rem; height:2.1rem; padding:0; margin-left:var(--s3); cursor:pointer;
  border:1px solid var(--rule); border-radius:999px; background:transparent;
  color:var(--muted)}
.icon-btn:hover{color:var(--fg); border-color:var(--rule-strong)}
.icon-btn svg{display:block; width:1.05rem; height:1.05rem}
@media (max-width:760px){
  .mast nav{gap:.9rem; font-size:.875rem}
  .mast .cta-mini{display:none}
}
@media (max-width:420px){
  .mast .wm{height:1.8rem; width:4.8rem}
}

/* ---------- the capsule button: the product's own shape ---------- */
.btn{
  font-family:var(--display); font-stretch:100%; font-weight:700; font-size:.9375rem;
  letter-spacing:-.005em; cursor:pointer; border:1px solid transparent;
  border-radius:999px; padding:.7rem 1.4rem; display:inline-flex; align-items:center;
  gap:.6rem; text-decoration:none; white-space:nowrap;
  transition:transform .12s ease, filter .12s ease;
}
.btn:hover{filter:brightness(1.05)}
.btn:active{transform:translateY(1px)}
/* The accent fill is fixed rather than following the colour pair: white-bodied
   pills would put orange on white and fail contrast on the one control that
   must always be readable. The capsule shape still comes from the product. */
.btn-buy{
  background:var(--accent); color:var(--on-accent);
  border-color:color-mix(in srgb,var(--accent) 72%,#000);
}
.btn-buy .price{font-variant-numeric:tabular-nums; font-weight:800}
.btn-buy .bar{display:block; width:1.1rem; height:.18rem; border-radius:1px;
  background:var(--on-accent); opacity:.45}
.btn-ghost{background:transparent; color:var(--fg); border-color:var(--rule-strong)}
.btn-ghost:hover{border-color:var(--fg); filter:none}
.btn-sm{font-size:.8125rem; padding:.42rem 1rem}
@media (prefers-reduced-motion:reduce){.btn{transition:none}.btn:active{transform:none}}

/* ---------- hero ---------- */
/* Only the home page opens with one. Every other page starts on its first real
   section, which then carries the space the hero used to give it. */
main>section:first-child:not(.hero){margin-top:var(--s5)}
.hero{padding-block:var(--s6) var(--s4)}
.hero .wm{width:min(22rem,76vw); margin-bottom:var(--s4)}
.hero h1{margin-bottom:var(--s3)}
.hero .lede{max-width:33rem; margin-bottom:var(--s4)}
.rule-pair{display:flex; gap:.4rem; align-items:center; margin-bottom:var(--s4)}
.rule-pair i{display:block; height:3px; border-radius:2px}
.rule-pair i:first-child{width:3rem; background:var(--accent)}
.rule-pair i:last-child{flex:1; background:var(--rule)}
.buyrow{display:flex; flex-wrap:wrap; align-items:center; gap:var(--s3) var(--s2)}

/* ---------- notice ---------- */
.notice{background:var(--surface); border:1px solid var(--rule); border-radius:12px;
  padding:var(--s3); display:grid; grid-template-columns:auto 1fr; gap:var(--s2) var(--s3);
  align-items:start; margin-block:var(--s3)}
.notice .dot{width:.5rem; height:.5rem; border-radius:999px; background:var(--accent);
  margin-top:.62rem}
.notice p{margin:0}
.notice p+p{margin-top:var(--s2)}
.notice>*:nth-child(2){min-width:0}

/* ---------- pills ---------- */
/* No fill: a band is two hairlines and some room, which is enough to mark a
   section off without turning it into a different-coloured slab. */
.band{border-block:1px solid var(--rule); padding-block:var(--s5); margin-block:var(--s5)}
.set{display:grid; grid-template-columns:repeat(8,1fr); gap:.4rem}
.set.cols4{grid-template-columns:repeat(4,1fr); max-width:17rem}
@media (max-width:560px){.set{grid-template-columns:repeat(4,1fr)}}
.pill{display:block; width:100%; height:auto}
.pill .body{fill:var(--pill-body); stroke:var(--pill-rim); stroke-width:.22}
.pill text{fill:var(--pill-mark); font-size:6.5px; font-weight:700; text-anchor:middle;
  font-family:Arial,Helvetica,"Liberation Sans",sans-serif}
.pill .bar{fill:var(--pill-mark)}
.pill.void .body{fill:none; stroke:var(--rule-strong); stroke-width:.32; stroke-dasharray:1.1 .9}
.pill.void text{fill:var(--muted); font-weight:400}
.pill.void line{stroke:var(--muted); stroke-width:.45}

/* ---------- colour switcher ---------- */
.ways{display:grid; grid-template-columns:repeat(auto-fit,minmax(9.5rem,1fr)); gap:.5rem;
  margin-block:var(--s3)}
.ways button{
  font-family:var(--display); font-stretch:100%; font-size:.8125rem; font-weight:600;
  cursor:pointer; text-align:left; display:grid; grid-template-columns:2.4rem 1fr;
  gap:.6rem; align-items:center; padding:.5rem .7rem;
  border:1px solid var(--rule); border-radius:10px; background:var(--surface);
  color:var(--muted); min-width:0;
}
.ways button:hover{color:var(--fg)}
.ways button[aria-pressed="true"]{border-color:var(--fg); color:var(--fg);
  box-shadow:inset 0 0 0 1px var(--fg)}
.ways .sw{width:2.4rem; display:block}
.ways b{display:block; font-weight:700; min-width:0}

/* ---------- lists ---------- */
ol.steps{list-style:none; margin:0; padding:0; display:grid; gap:var(--s3); counter-reset:step}
ol.steps li{counter-increment:step; display:grid; grid-template-columns:2.1rem 1fr; gap:var(--s3)}
ol.steps li>div{min-width:0}
ol.steps li::before{content:counter(step,decimal-leading-zero); font-family:var(--mono);
  font-weight:600; font-size:.8125rem; color:var(--accent-ink); padding-top:.3rem}
ol.steps b{display:block; font-family:var(--display); font-stretch:100%; font-weight:700}
ol.steps li.key{background:var(--surface); border:1px solid var(--rule); border-radius:12px;
  padding:var(--s3)}
ul.plain{margin:0 0 var(--s3); padding-left:1.15rem}
ul.plain li{margin-bottom:.45rem}
ul.kit{list-style:none; margin:0; padding:0; display:grid; gap:0}
ul.kit li{padding-block:var(--s2); border-bottom:1px solid var(--rule)}
ul.kit li:first-child{border-top:1px solid var(--rule)}
ul.kit b{font-family:var(--display); font-stretch:100%; font-weight:700; font-size:.9375rem}
ul.kit p{margin:.15rem 0 0; font-size:.9rem; color:var(--muted)}

/* ---------- reasons ---------- */
.reasons{display:grid; grid-template-columns:repeat(3,1fr); gap:var(--s4) var(--s3);
  margin-block:var(--s4)}
.reasons>div{min-width:0}
.reasons .n{font-family:var(--mono); font-size:.75rem; color:var(--accent-ink);
  display:block; margin-bottom:.5rem}
.reasons h3{margin:0 0 .4rem}
.reasons p{margin:0; font-size:.9rem; line-height:1.6; color:var(--muted)}
@media (max-width:620px){.reasons{grid-template-columns:1fr; gap:var(--s3)}}

/* A standalone link out of a section. Body type with a hairline underline
   reads as a stray sentence once it has no section around it, so it takes the
   UI face and the accent instead. */
.more{margin:var(--s2) 0 0}
.more a{font-family:var(--display); font-stretch:100%; font-weight:600;
  font-size:.9375rem; color:var(--accent-ink);
  text-decoration-color:color-mix(in srgb,var(--accent) 45%,transparent)}
.more a:hover{text-decoration-color:var(--accent)}

/* ---------- figures / tables ---------- */
.figures{display:grid; grid-template-columns:repeat(3,1fr); gap:var(--s3);
  border-block:1px solid var(--rule); padding-block:var(--s4); margin-block:var(--s4)}
.figures>div{min-width:0}
.figures>div+div{border-left:1px solid var(--rule); padding-left:var(--s3)}
.figures .big{display:block; font-family:var(--display); font-weight:800; font-stretch:88%;
  font-size:clamp(2.2rem,8.5vw,3.3rem); letter-spacing:-.04em; line-height:1}
.figures .lbl{display:block; font-family:var(--display); font-stretch:100%; font-size:.71rem;
  font-weight:700; letter-spacing:.11em; text-transform:uppercase; margin-top:.45rem}
.figures .sub{display:block; font-size:.84rem; color:var(--muted)}
@media (max-width:560px){
  .figures{grid-template-columns:1fr}
  .figures>div+div{border-left:0; border-top:1px solid var(--rule); padding-left:0; padding-top:var(--s3)}
}
.scroll{overflow-x:auto; margin-block:var(--s3)}
table{width:100%; border-collapse:collapse; font-family:var(--display); font-stretch:100%;
  font-size:.9rem; font-variant-numeric:tabular-nums}
th,td{text-align:right; padding:.6rem .55rem; border-bottom:1px solid var(--rule); white-space:nowrap}
th:first-child,td:first-child{text-align:left}
thead th{font-size:.71rem; letter-spacing:.1em; text-transform:uppercase; color:var(--muted);
  font-weight:700; border-bottom-color:var(--fg)}
tbody td:not(:first-child){font-family:var(--mono); font-size:.84rem}

dl.spec{display:grid; grid-template-columns:auto 1fr; gap:.45rem var(--s3); margin:0 0 var(--s3);
  font-size:.9375rem}
dl.spec dt{font-family:var(--display); font-stretch:100%; color:var(--muted); font-size:.875rem}
dl.spec dd{margin:0; font-family:var(--mono); font-size:.86rem; font-variant-numeric:tabular-nums;
  min-width:0}
dl.spec dd.txt{font-family:var(--prose); font-size:.9375rem}
@media (max-width:460px){
  dl.spec{grid-template-columns:1fr; gap:.1rem}
  dl.spec dt{margin-top:.5rem}
}

/* ---------- string anatomy ---------- */
.anatomy{display:flex; flex-wrap:wrap; gap:.35rem; margin-block:var(--s3)}
.seg{border-radius:9px; padding:.45rem .6rem; font-family:var(--mono); font-size:.9rem;
  background:var(--surface); border:1px solid var(--rule); text-align:center; min-width:0}
.seg.fixed{background:var(--accent); border-color:var(--accent); color:var(--on-accent); font-weight:600}
.seg.pay{flex:1 1 11rem; background:var(--surface-2)}
.seg small{display:block; font-family:var(--display); font-stretch:100%; font-size:.64rem;
  font-weight:700; letter-spacing:.09em; text-transform:uppercase; opacity:.72; margin-top:.2rem}
.segmented{display:inline-flex; border:1px solid var(--rule); border-radius:999px; padding:2px;
  gap:2px; background:var(--surface)}
.segmented button{font-family:var(--display); font-stretch:100%; font-size:.8125rem;
  font-weight:600; border:0; cursor:pointer; background:transparent; color:var(--muted);
  padding:.32rem .9rem; border-radius:999px}
.segmented button[aria-pressed="true"]{background:var(--accent); color:var(--on-accent)}

/* ---------- warn ---------- */
.warn{border-left:3px solid var(--accent); padding:.15rem 0 .15rem var(--s3); margin-block:var(--s3)}
.warn p{margin:0}

/* ---------- shop ---------- */
.shop{background:var(--surface); border:1px solid var(--rule); border-radius:16px;
  padding:var(--s4) var(--s3); margin-block:var(--s4)}
.shop .price-line{display:flex; flex-wrap:wrap; align-items:baseline; gap:.6rem; margin-bottom:var(--s3)}
.shop .amount{font-family:var(--display); font-weight:800; font-stretch:90%;
  font-size:clamp(2rem,7vw,2.6rem); letter-spacing:-.035em; line-height:1}
.shop .unit{font-family:var(--display); font-stretch:100%; font-weight:700;
  font-size:clamp(1rem,3vw,1.2rem); color:var(--accent-ink); letter-spacing:.01em}
.shop .per{font-family:var(--display); font-stretch:100%; font-size:.875rem; color:var(--muted)}
#buy-fallback{margin-top:var(--s3); padding-top:var(--s3); border-top:1px solid var(--rule)}
#buy-fallback p{margin:0; font-size:.9rem; color:var(--muted)}

/* ---------- worksheet ---------- */
.ws-faces{display:grid; grid-template-columns:repeat(2,1fr); gap:var(--s3);
  margin-block:var(--s3) var(--s4)}
.ws-faces figure{margin:0; min-width:0}
/* the card is a printable, so it stays white paper in both themes */
.ws-faces img{display:block; width:100%; height:auto; background:#ffffff;
  border:1px solid var(--rule); border-radius:8px}
.ws-faces figcaption{font-family:var(--display); font-stretch:100%; font-size:.76rem;
  font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:var(--muted);
  margin-top:.55rem}
#worksheet-fallback{margin-top:var(--s2)}
#worksheet-fallback p{margin:0}

/* ---------- drawings ---------- */
/* Vector, transparent and theme-aware, so they sit on the page's own background
   in either theme rather than on a card of their own. They are drawings, not
   photographs: every dimension in them is the figure the kit is built to, and
   none of them is evidence of how a printed pill or a sewn bag looks. */
img.viz{display:block; width:100%; height:auto; margin-block:var(--s4)}
img.viz.narrow{max-width:24rem}

/* ---------- footer ---------- */
/* Sits on the same measure as the body copy, so its left edge lines up with
   every other line of text on the page rather than starting 11rem out. */
footer{border-top:1px solid var(--rule); margin-top:var(--s6);
  padding-block:var(--s3) var(--s4); color:var(--muted); font-size:.9rem}
footer .f-in{max-width:var(--measure); margin-inline:auto; padding-inline:var(--gutter)}
footer nav{display:flex; flex-wrap:wrap; align-items:baseline; row-gap:.3rem;
  font-family:var(--display); font-stretch:100%; font-size:.875rem; font-weight:600}
footer nav a{text-decoration:none; color:var(--muted)}
footer nav a:hover{color:var(--fg)}
footer nav a+a{margin-left:.55rem}
footer nav a+a::before{content:"\00b7"; margin-right:.55rem; color:var(--rule-strong)}
@media (prefers-reduced-motion:reduce){*{animation:none!important; transition:none!important}}
