/* 9systems brand CSS: base type and shared components.
   Needs tokens.css (colors) and fonts.css (Archivo). Layout of a page lives in its own CSS. */

*{box-sizing:border-box;margin:0;padding:0}
html{scrollbar-gutter:stable}
@supports not (scrollbar-gutter:stable){html{overflow-y:scroll}}
/* the footer stays at the bottom of short pages */
body{display:flex;flex-direction:column;min-height:100vh}
body > .wrap{width:100%}
body > .stripes:first-child + .wrap{flex:1 0 auto}
:root{--s1:color-mix(in oklab,var(--accent) 45%,var(--bg));--s3:color-mix(in oklab,var(--accent) 72%,var(--fg))}
body{background:var(--bg);color:var(--fg);font:400 18px/1.55 Archivo,system-ui,sans-serif;-webkit-font-smoothing:antialiased}
a{color:inherit}
/* one heading size per level, site-wide (phones below); blog post titles are the only exception (site.css) */
h1{font-size:60px}
h2{font-size:34px}
h3{font-size:22px}
h1,h2,h3{font-weight:800;font-stretch:112%;letter-spacing:-0.01em;line-height:1.08}
.wrap{max-width:1180px;margin:0 auto;padding:0 48px}

/* heading marks: a block before every heading, as high as its capitals. Like the logo, it drops
   cuts as the heading gets smaller: three cuts, two, one, then solid; the gaps are 0.8 of a bar.
   .plain removes it. */
:is(h1,h2,h3,h4,h5,h6)::before{content:"";display:inline-block;width:.686em;height:.686em;margin-right:.3em;
  vertical-align:baseline;background:var(--accent)}
h1::before{background:linear-gradient(var(--accent) 0 15.62%,transparent 0 28.12%,var(--accent) 0 43.75%,transparent 0 56.25%,var(--accent) 0 71.88%,transparent 0 84.38%,var(--accent) 0)}
h2::before{background:linear-gradient(var(--accent) 0 21.74%,transparent 0 39.13%,var(--accent) 0 60.87%,transparent 0 78.26%,var(--accent) 0)}
h3::before{background:linear-gradient(var(--accent) 0 35.71%,transparent 0 64.29%,var(--accent) 0)}
:is(h1,h2,h3,h4,h5,h6).plain::before{content:none}

/* speed stripe: three bars, light, full and dark accent */
.stripes{display:grid;grid-template-rows:8px 4px 8px 4px 8px}
.stripes i:nth-child(1){background:var(--s1)}
.stripes i:nth-child(3){background:var(--accent)}
.stripes i:nth-child(5){background:var(--s3)}

/* header and footer */
.site-header{display:flex;align-items:center;gap:30px;padding:28px 0 24px;border-bottom:2px solid var(--fg)}
/* the header stays at the top while scrolling; on narrow screens (two rows) header.js slides it away
   while scrolling down and back in when scrolling up */
.site-header{position:sticky;top:0;z-index:10;background:var(--bg);transition:transform .25s ease}
.site-header.away{transform:translateY(-100%)}
@media (prefers-reduced-motion: reduce){.site-header{transition:none}}
@media (min-width: 901px){html{scroll-padding-top:110px}}
.site-header .logo svg{height:36px;width:auto;display:block}
.site-header nav{margin-left:auto;display:flex;gap:26px;font-weight:500;font-size:16px;color:var(--mid)}
.site-header nav a{text-decoration:none}
.site-header nav a:hover{color:var(--fg)}
/* language and display menus: an outlined box at the right edge, after the button and as tall as it,
   the two split by a rule */
.site-header .tools{position:relative;display:flex;align-items:stretch;align-self:stretch;margin-left:-20px;border:1.5px solid var(--fg)}
.tools > *{display:flex;align-items:center;padding:0 10px}
.tools > * + *{border-left:1.5px solid var(--fg)}
/* header menus: a <details> each (switch.js closes them on outside clicks and Escape); the panel hangs
   below the box, right-aligned; the current choice gets an accent bar, so the panel keeps its width */
.menu{position:static}
.menu summary{display:flex;align-items:center;gap:6px;height:100%;list-style:none;color:var(--mid);cursor:pointer}
.menu summary::-webkit-details-marker{display:none}
.menu summary:hover,.menu[open] summary{color:var(--fg)}
.menu[open] .caret{transform:rotate(180deg)}
.menu .panel{position:absolute;right:-1.5px;top:calc(100% + 8px);z-index:20;list-style:none;margin:0;padding:6px 0;
  background:var(--bg);border:1.5px solid var(--fg);box-shadow:5px 5px 0 var(--mid)}
.menu .item{display:flex;align-items:center;gap:10px;width:100%;padding:7px 18px 7px 14px;border:0;background:none;
  font:500 15px Archivo,sans-serif;color:var(--mid);text-align:left;text-decoration:none;white-space:nowrap;cursor:pointer}
.menu .item:hover{color:var(--fg);background:var(--surface)}
.menu .item:is([aria-current],[aria-pressed="true"]){color:var(--fg);box-shadow:inset 3px 0 0 var(--accent)}
.flag{display:block;outline:1px solid var(--fg);outline-offset:-0.5px}
.display-menu summary .ico{display:none}
:root:not([data-mode]) .display-menu summary .ico-auto,:root[data-mode="light"] .display-menu summary .ico-light,
:root[data-mode="dark"] .display-menu summary .ico-dark{display:block}
.display-menu .panel{display:grid;grid-template-columns:auto auto;padding:10px 0}
.display-menu .panel > div + div{border-left:1px solid var(--line)}
.menu-h{margin:0 0 4px;padding:0 14px;font-size:12px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--mid)}
.display-menu .sw{display:block;width:16px;height:16px;margin:2px;border:1px solid var(--fg);background:var(--sw)}
.site-header nav a[aria-current="page"]{color:var(--fg);text-decoration:underline;text-decoration-thickness:2px;text-underline-offset:7px}
.site-footer{display:flex;gap:30px;align-items:center;padding:24px 0 30px;font-size:14px;color:var(--mid);flex-wrap:wrap}
.site-footer .logo svg{height:24px;width:auto;display:block}
.site-footer .r{margin-left:auto;display:flex;gap:18px}
.site-footer a{text-decoration:none}

/* buttons: plain ink, no shadow */
.btn{display:inline-block;background:var(--fg);color:var(--bg);font:600 16px Archivo,sans-serif;padding:13px 22px;
  text-decoration:none;border:0;cursor:pointer}
.btn.small{padding:10px 16px;font-size:15px}


/* nameplate: model data as on the rating plate of a machine */
.nameplate{border-collapse:collapse;border:2px solid var(--fg)}
.nameplate td,.nameplate th{text-align:left;border-left:1.5px solid var(--fg);padding:0 16px}
.nameplate td:first-child,.nameplate th:first-child{border-left:0}
.nameplate td{font-size:12px;color:var(--mid);padding-top:7px}
.nameplate th{font-size:21px;font-weight:800;font-stretch:118%;padding-bottom:7px;white-space:nowrap}

/* spec list with dotted leaders */
.spec{list-style:none;font-size:16.5px;font-variant-numeric:tabular-nums}
.spec li{display:flex;align-items:baseline;gap:8px;padding:9px 0;border-bottom:1px dotted color-mix(in srgb,var(--fg) 35%,transparent)}
.spec b{font-weight:600;white-space:nowrap}
.spec span{margin-left:auto;text-align:right}
.spec .warn span{font-weight:700}

/* reply card: a coupon to cut out */
.reply{position:relative;border:1.5px dashed var(--fg);padding:34px 30px 30px}
.reply .scis{position:absolute;top:-15px;left:24px;background:var(--bg);padding:0 8px;font-size:19px;line-height:28px}
.reply h3{margin-bottom:12px}
.reply p{color:var(--mid);font-size:16px;margin-bottom:24px}
.reply .fine{margin:22px 0 0;padding-top:14px;border-top:1px solid var(--line);font-size:14px;color:var(--mid)}

/* technical figure with numbered callouts and a legend */
.fig svg{display:block;width:100%;height:auto}
.fig .fig-v{display:none}
.fig :is(.fig-h,.fig-v) text{font:500 14px Archivo,sans-serif;fill:var(--fg)}
.fig svg .lab-m{fill:var(--mid)}
.fig svg .lab-b{font-weight:700}
.fig svg .lab-s{font-size:12.5px}
.fig svg .num{font:700 13px Archivo,sans-serif}
.fig svg .cap{font:600 13.5px Archivo,sans-serif}
.fig svg.fig-h text{font-size:18px}
.fig svg.fig-h .num{font-size:15px}
.fig svg.fig-h .cap{font-size:17px}
.fig figcaption{margin-top:18px;font-size:14px;color:var(--mid)}
.fig figcaption b{color:var(--fg);margin-right:10px}
.legend{list-style:none;counter-reset:n;max-width:820px}
.legend li{counter-increment:n;position:relative;padding:0 0 12px 40px;color:var(--mid)}
.legend li b{color:var(--fg)}
.legend li::before{content:counter(n);position:absolute;left:0;top:1px;width:24px;height:24px;border:1.5px solid var(--fg);
  border-radius:50%;font:700 13px/21px Archivo,sans-serif;text-align:center;color:var(--fg)}

@media (max-width: 900px){
  .wrap{padding:0 28px}
  .site-header{flex-wrap:wrap;row-gap:14px}
  .site-header .btn{margin-left:auto}
  .site-header nav{order:3;width:100%;margin-left:0;flex-wrap:wrap;gap:6px 22px}
}
@media (max-width: 640px){
  .wrap{padding:0 20px}
  .site-header{row-gap:16px;column-gap:14px}
  .site-header .tools{margin-left:-6px}
  .tools > *{padding:0 7px}
  .menu summary{gap:4px}
  h1{font-size:42px}
  h2{font-size:26px}
  .site-header .logo svg{height:28px}
  .site-header .btn{font-size:14px;padding:9px 12px}
  .nameplate th{font-size:17px}
  .nameplate td,.nameplate th{padding-left:10px;padding-right:10px}
  .fig .fig-h{display:none}
  .fig .fig-v{display:block;max-width:360px;margin:0 auto}
  .spec li{flex-wrap:wrap}
  .spec span{margin-left:0;text-align:left;width:100%}
  .reply{padding:30px 20px 24px}
  .site-footer .r{margin-left:0}
}
@media (max-width: 400px){
  /* room for logo, button and the menu box in one row */
  .site-header .logo svg{height:23px}
  .tools .caret{display:none}
}
/* email button: the address stays selectable, a small copy button sits beside it */
.mail{display:inline-flex;align-items:stretch;gap:2px}
.mail a.btn{user-select:text;-webkit-user-select:text;-webkit-user-drag:none}
.mail .copy{display:flex;align-items:center;padding:0 12px;border:0;cursor:pointer}
.mail .copy.done{background:var(--accent)}
