*,*::before,*::after { box-sizing: border-box; }
body { margin: 0; }
img { max-width: 100%; }
[hidden] { display: none !important; }

/* Layout concept: a white multi-page site where one weighment slip leads the reader through the mill's paper trail. */
:root {
  --bg: #FFFFFF;
  --ink: #1F1F1E;
  --muted: #5B5955;
  --line: #E3E0DB;
  --orange: #F26A1B;
  --orange-text: #B24708;
  --now: #1E6B44;
  --next: #8A5A0B;
  --sans: "IBM Plex Sans", "Segoe UI", Arial, sans-serif;
  --mono: "IBM Plex Mono", Consolas, monospace;
  --logo: "Arimo", Arial, sans-serif;
  color-scheme: light;
}
html { scroll-padding-top: 84px; }
body { background: var(--bg); color: var(--ink); font: 400 17px/1.55 var(--sans); }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--bg); }
.wrap { max-width: 1180px; margin-inline: auto; padding-left: max(24px, env(safe-area-inset-left, 0px)); padding-right: max(24px, env(safe-area-inset-right, 0px)); }
section { padding-block: 72px; border-top: 1px solid var(--line); }
section.first { border-top: 0; }
h1, h2, h3 { font-family: var(--sans); text-wrap: balance; margin: 0; }
h1 { font-size: clamp(2.3rem, 4.8vw, 3.6rem); line-height: 1.08; font-weight: 600; letter-spacing: -0.022em; }
h2 { font-size: clamp(1.75rem, 3.1vw, 2.4rem); line-height: 1.16; font-weight: 600; letter-spacing: -0.015em; }
h3 { font-size: 1.06rem; line-height: 1.3; font-weight: 600; }
p { margin: 0; }
a { color: inherit; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 3px; }
.label { font: 500 0.76rem/1.3 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--orange-text); }
.lead { font-size: 1.12rem; color: var(--muted); max-width: 62ch; }
.head { display: grid; gap: 12px; margin-bottom: 36px; max-width: 800px; }
.more { font-weight: 600; color: var(--orange-text); text-decoration: none; }
.more:hover { text-decoration: underline; }

/* top bar */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 9; background: var(--bg); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand svg { width: 34px; height: 34px; flex: none; color: var(--ink); }
.word { font: 700 1.4rem/1 var(--logo); letter-spacing: -0.01em; color: var(--ink); }
.word b { color: var(--orange); font-weight: 700; }
.links { display: flex; align-items: center; gap: 22px; font-size: 0.98rem; }
.links > a:not(.btn), .links summary { text-decoration: none; color: var(--muted); cursor: pointer; }
.links > a:not(.btn):hover, .links summary:hover, .links > a.on, details.menu.on summary { color: var(--ink); }
.links > a.on { font-weight: 600; }
details.menu { position: relative; }
details.menu summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; }
details.menu summary::-webkit-details-marker { display: none; }
details.menu summary::after { content: ""; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-2px); }
.drop { position: absolute; top: calc(100% + 14px); left: -16px; width: 320px; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 10px 28px rgba(31, 31, 30, 0.1); padding: 8px; display: grid; }
.drop a { display: grid; gap: 1px; padding: 10px 12px; text-decoration: none; border-radius: 4px; color: var(--ink); }
.drop a:hover { background: #F6F5F3; }
.drop span { color: var(--muted); font-size: 0.88rem; line-height: 1.35; }
.btn { display: inline-block; font: 600 1rem/1 var(--sans); text-decoration: none; padding: 14px 20px; border-radius: 4px; border: 1px solid var(--orange); background: var(--orange); color: #FFFFFF; cursor: pointer; }
.btn:hover { background: #DD5D13; border-color: #DD5D13; }
.btn.quiet { background: #FFFFFF; border-color: var(--line); color: var(--ink); }
.btn.quiet:hover { border-color: var(--ink); }
.top .btn { padding: 10px 16px; }
.toggle { display: none; }
.mobile { display: none; }

/* hero */
.hero { padding-block: 60px 68px; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); gap: 60px; align-items: center; }
.hero-copy { display: grid; gap: 20px; min-width: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hub-wrap { margin: 0; min-width: 0; }
.hub { display: block; width: 100%; height: auto; font-family: var(--sans); }
.hub .wires path { fill: none; stroke: #BDB9B2; stroke-width: 1.25; }
.hub .pulse { fill: none; stroke: #F26A1B; stroke-width: 2; stroke-linecap: round; }
.hub .pill rect { fill: #FFFFFF; stroke: #CFCBC4; stroke-width: 1.25; }
.hub .pill text { font-size: 14px; font-weight: 500; fill: #1F1F1E; text-anchor: middle; }
.hub .col { font: 500 10px var(--mono); letter-spacing: 0.07em; text-transform: uppercase; fill: #5B5955; }
.hub-word, .hub-os { font-family: var(--logo); font-weight: 700; text-anchor: middle; }
.hub-word { font-size: 25px; fill: #FFFFFF; }
.hub-os { font-size: 31px; fill: #F26A1B; }
.example { font: 400 0.76rem/1.3 var(--mono); color: var(--muted); margin-top: 10px; }

/* inner page heading */
.page-top { padding-block: 44px 48px; }
.crumb { font: 400 0.82rem/1.3 var(--mono); color: var(--muted); }
.crumb a { text-decoration: none; }
.crumb a:hover { color: var(--ink); }
.page-top .wrap { display: grid; gap: 14px; }
.has-scene .wrap { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.page-copy { display: grid; gap: 14px; min-width: 0; }
.scene { margin: 0; min-width: 0; }
.anim { display: block; width: 100%; height: auto; font-family: var(--sans); }
.anim .t { font-weight: 500; fill: #1F1F1E; text-anchor: middle; }
.anim text.t[fill] { fill: #FFFFFF; }
.anim .c { font: 500 10px var(--mono); letter-spacing: 0.07em; }
.anim .c:not([fill]) { fill: #5B5955; }
.anim .r { font: 500 21px var(--mono); fill: #FFFFFF; }
.anim .w { fill: none; stroke: #BDB9B2; stroke-width: 1.25; }
.anim .s { fill: none; stroke: #F26A1B; stroke-width: 2; stroke-linecap: round; }
.anim .f { fill: none; stroke: #F26A1B; stroke-width: 2; stroke-dasharray: 6 14; }

/* chain */
.chain { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); counter-reset: step; }
.chain li { counter-increment: step; position: relative; padding: 18px 16px 0 0; border-top: 2px solid var(--ink); display: grid; gap: 4px; align-content: start; min-width: 0; }
.chain li::before { content: ""; position: absolute; top: -6px; left: 0; width: 10px; height: 10px; border-radius: 50%; background: var(--orange); }
.chain span { font: 500 0.74rem/1 var(--mono); color: var(--orange-text); }
.chain span::before { content: counter(step); }
.chain p { color: var(--muted); font-size: 0.92rem; line-height: 1.4; }

/* solution links */
.areas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 48px; }
.area { padding-block: 22px; border-top: 1px solid var(--line); display: grid; gap: 6px; text-decoration: none; min-width: 0; }
.area h3 { font-size: 1.2rem; }
.area:hover h3 { color: var(--orange-text); }
.area p { color: var(--muted); }

/* tables */
.scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; min-width: 640px; }
th { text-align: left; font: 500 0.76rem/1.3 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); padding: 0 20px 12px 0; border-bottom: 1px solid var(--ink); }
td { padding: 15px 20px 15px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
td:first-child { font-weight: 500; width: 42%; }
td:last-child, th:last-child { padding-right: 0; }

/* modules */
.group { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; flex-wrap: wrap; }
.state { font: 500 0.76rem/1 var(--mono); padding: 6px 8px; border: 1px solid currentColor; border-radius: 3px; white-space: nowrap; justify-self: start; }
.state.now { color: var(--now); }
.state.next { color: var(--next); }
.mods { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 48px; }
.mod { padding-block: 20px; border-top: 1px solid var(--line); display: grid; gap: 7px; align-content: start; min-width: 0; }
.mod ul { margin: 0; padding-left: 18px; color: var(--muted); display: grid; gap: 4px; }
.mod p { color: var(--muted); }
.next-page { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; align-items: center; }

/* control points and roles */
.split { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 60px; align-items: start; }
.split > * { min-width: 0; }
.stack { display: grid; gap: 14px; }
.rules { list-style: none; margin: 0; padding: 0; }
.rules li { padding-block: 14px; border-top: 1px solid var(--line); display: grid; gap: 3px; }
.rules li:first-child { border-top: 1px solid var(--ink); }
.rules span { color: var(--muted); font-size: 0.97rem; }
.roles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.role { padding: 18px 18px 18px 0; border-top: 2px solid var(--ink); display: grid; gap: 6px; align-content: start; min-width: 0; }
.role code { font: 400 0.82rem/1.4 var(--mono); color: var(--muted); }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; margin: 0; }
.facts div { padding-block: 14px; border-top: 1px solid var(--line); min-width: 0; }
.facts dt { font: 500 0.76rem/1.3 var(--mono); letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.facts dd { margin: 0; }
.status { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; }
.status > div { display: grid; gap: 10px; align-content: start; min-width: 0; }
.status ul { margin: 0; padding-left: 18px; color: var(--muted); display: grid; gap: 7px; }
.golive { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 40px; counter-reset: go; }
.golive li { counter-increment: go; padding-block: 16px; border-top: 1px solid var(--line); display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 8px; }
.golive li::before { content: counter(go); font: 500 0.82rem/1.7 var(--mono); color: var(--orange-text); }

/* blog */
.posts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.post { display: grid; gap: 8px; align-content: start; text-decoration: none; padding-top: 16px; border-top: 2px solid var(--ink); min-width: 0; }
.post:hover h3 { color: var(--orange-text); }
.post p { color: var(--muted); }
.post small { font: 400 0.78rem/1.3 var(--mono); color: var(--muted); }
.article { max-width: 760px; display: grid; gap: 16px; min-width: 0; }
.article p { line-height: 1.65; }
.article h2 { font-size: clamp(1.35rem, 2.4vw, 1.65rem); margin-top: 18px; }
.post-scene { margin: 8px 0 4px; max-width: 600px; }
.article ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.article ul.check { list-style: none; padding-left: 0; }
.article ul.check li { position: relative; padding-left: 28px; }
.article ul.check li::before { content: ""; position: absolute; left: 0; top: 0.3em; width: 15px; height: 15px; border: 1.5px solid var(--ink); border-radius: 2px; }
.article table { min-width: 520px; font-size: 0.95rem; }
.article td:first-child { width: auto; }
.answer { border-left: 3px solid var(--orange); padding-left: 16px; font-size: 1.14rem; font-weight: 500; }
.sources { color: var(--muted); font-size: 0.95rem; }
.sources a { word-break: break-word; }
.faq { border-top: 1px solid var(--line); padding-block: 12px; display: grid; gap: 4px; }
.faq h3 { font-size: 1.02rem; }
.cat-head { margin: 36px 0 18px; }
.cat-head:first-child { margin-top: 0; }

/* contact */
.number { font: 500 clamp(1.5rem, 3vw, 2rem)/1.2 var(--mono); user-select: all; }
.ticks { margin: 0; padding: 0; list-style: none; display: grid; gap: 9px; }
.ticks li { padding-left: 18px; position: relative; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 8px; height: 8px; background: var(--orange); }
#copied { font: 400 0.85rem/1.3 var(--mono); color: var(--muted); min-height: 1.3em; }

/* footer */
footer { padding-block: 48px 28px; border-top: 1px solid var(--line); }
.foot { display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr)); gap: 32px; }
.foot > div { display: grid; gap: 8px; align-content: start; min-width: 0; }
.foot a { text-decoration: none; color: var(--muted); }
.foot a:hover { color: var(--ink); }
.foot h3 { font: 500 0.76rem/1.3 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink); }
.foot p { color: var(--muted); }
.social { display: inline-flex; justify-self: start; margin-top: 6px; color: var(--ink); }
.foot a.social:hover { color: var(--orange-text); }
.social svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.social .dot { fill: currentColor; stroke: none; }
.legal { margin-top: 32px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.9rem; }

@media (max-width: 1040px) {
  .has-scene .wrap { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .links { display: none; }
  .toggle { display: inline-block; font: 600 0.95rem/1 var(--sans); padding: 10px 14px; background: #FFFFFF; color: var(--ink); border: 1px solid var(--line); border-radius: 4px; cursor: pointer; }
  .mobile:not([hidden]) { display: grid; border-top: 1px solid var(--line); padding-block: 8px 16px; }
  .mobile a { padding: 10px 0; text-decoration: none; }
  .mobile .sub { padding-left: 14px; color: var(--muted); }
  .hero .wrap, .split { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .chain { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 26px; }
  .roles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .status { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .golive { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .posts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .foot > div:first-child { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  section { padding-block: 52px; }
  .hero { padding-block: 34px 48px; }
  .chain, .roles, .mods, .areas, .facts, .golive, .posts, .foot { grid-template-columns: minmax(0, 1fr); }
  .wrap { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .view:not([data-view="article"]) table { min-width: 0; }
  .view:not([data-view="article"]) thead { display: none; }
  .view:not([data-view="article"]) tr { display: grid; gap: 4px; padding-block: 14px; border-bottom: 1px solid var(--line); }
  .view:not([data-view="article"]) td { display: block; width: auto; padding: 0; border-bottom: 0; }
}

.article { grid-template-columns: minmax(0, 1fr); }
.article p, .article li { overflow-wrap: anywhere; }
.page-related { display: grid; gap: 14px; }
.tool { border: 1px solid var(--ink); border-radius: 6px; padding: 20px; display: grid; gap: 14px; }
.tool label { display: grid; gap: 4px; font-weight: 500; font-size: 0.95rem; }
.tool input { font: 400 1rem var(--mono); padding: 10px 12px; border: 1px solid var(--line); border-radius: 4px; width: 100%; box-sizing: border-box; background: #FFFFFF; color: var(--ink); }
.tool input:focus { outline: 2px solid var(--orange); }
.tool-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.tool-out { font: 500 1.5rem/1.2 var(--mono); }
.tool-note { color: var(--muted); font-size: 0.92rem; }
.lang-links { display: flex; flex-wrap: wrap; gap: 14px; font-size: 0.95rem; }
@media (max-width: 640px) { .tool-grid { grid-template-columns: minmax(0, 1fr); } }
