/* partitor.ca: the look of the operator guide, plus a site header and footer. Tokens: tokens.css. */
@font-face { font-family: "EB Garamond"; font-weight: 500; font-style: normal; font-display: swap; src: url(/assets/fonts/eb-garamond-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "EB Garamond"; font-weight: 600; font-style: normal; font-display: swap; src: url(/assets/fonts/eb-garamond-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible"; font-weight: 400; font-style: normal; font-display: swap; src: url(/assets/fonts/atkinson-hyperlegible-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible"; font-weight: 400; font-style: italic; font-display: swap; src: url(/assets/fonts/atkinson-hyperlegible-latin-400-italic.woff2) format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible"; font-weight: 700; font-style: normal; font-display: swap; src: url(/assets/fonts/atkinson-hyperlegible-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 400; font-style: normal; font-display: swap; src: url(/assets/fonts/jetbrains-mono-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 600; font-style: normal; font-display: swap; src: url(/assets/fonts/jetbrains-mono-latin-600-normal.woff2) format("woff2"); }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 var(--step)/1.6 var(--body);
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.skip { position: absolute; left: -999px; top: 0; background: var(--paper); color: var(--accent); padding: 0.5rem 1rem; z-index: 10; }
.skip:focus { left: 0; }

.wrap { max-width: var(--measure); margin: 0 auto; display: grid; gap: var(--gap); padding-block: 2.25rem 4rem; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; text-wrap: balance; line-height: 1.15; margin: 0; }
h1 { font-size: clamp(2.1rem, 5vw, 2.9rem); letter-spacing: -0.01em; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.25rem; font-weight: 500; margin-top: 0.5rem; }
p, ul, ol { margin: 0; }
.lede { color: var(--muted); max-width: 40rem; }
.meta { color: var(--muted); font-size: 0.9rem; }
.eyebrow {
  font: 600 0.9rem/1 var(--display); letter-spacing: 0.1em; font-variant-caps: all-small-caps;
  text-transform: lowercase; color: var(--accent);
}
.sec-head .eyebrow, .eyebrow.mono { font-family: var(--mono); letter-spacing: 0.04em; font-variant-caps: normal; text-transform: none; font-size: 0.85rem; }
code, kbd { font-family: var(--mono); font-size: 0.9em; }
code { background: var(--code-bg); padding: 0.08em 0.35em; border-radius: 3px; overflow-wrap: anywhere; }
kbd { border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: 0.05em 0.4em; background: var(--paper); font-weight: 600; }
pre { margin: 0; background: var(--code-bg); padding: 0.9rem 1rem; border-radius: 6px; overflow-x: auto; font: 400 0.88rem/1.55 var(--mono); }
pre code { background: none; padding: 0; font: inherit; overflow-wrap: normal; }
a { color: var(--accent); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }

/* site header */
.site-head { border-bottom: 1px solid var(--line); }
.site-head .bar { max-width: var(--measure); margin: 0 auto; padding: 0.7rem 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1.5rem; }
.brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--ink); font: 600 1.6rem/1 var(--display); }
.brand img { height: 2rem; width: auto; mix-blend-mode: multiply; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .brand img { filter: invert(1); mix-blend-mode: screen; } }
:root[data-theme="dark"] .brand img { filter: invert(1); mix-blend-mode: screen; }
.site-head nav ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.2rem 1.25rem; }
.site-head nav a {
  text-decoration: none; color: var(--ink); font: 600 1.05rem/1 var(--display); letter-spacing: 0.08em;
  font-variant-caps: all-small-caps; text-transform: lowercase; padding: 0.5rem 0; display: inline-block; border-bottom: 2px solid transparent;
}
.site-head nav a:hover { color: var(--accent); }
.site-head nav a[aria-current="page"] { border-bottom-color: var(--accent); color: var(--accent); }
.hero, .guide-head { display: grid; gap: 0.75rem; }
.cta { display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem; align-items: center; }
.button { display: inline-block; background: var(--accent); color: var(--paper); padding: 0.55rem 1.1rem; border-radius: 6px; text-decoration: none; font-weight: 700; overflow-wrap: anywhere; }
.button:hover { filter: brightness(1.12); }
.button.alt { background: none; color: var(--accent); box-shadow: inset 0 0 0 2px var(--accent); }
.assets li { list-style: none; }
.assets { padding-left: 0; }

/* the five stages */
.stages { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.5rem; }
.stages li { min-width: 0; }
.stages a { display: grid; gap: 0.25rem; text-decoration: none; color: var(--ink); border-top: 3px solid var(--accent); padding: 0.6rem 0.2rem 0.2rem; }
.stages a:hover .s-name { color: var(--accent); }
.stages .s-num { font: 600 0.8rem/1 var(--mono); color: var(--accent); }
.stages .s-name { font: 600 1.15rem/1.1 var(--display); }
.stages .s-what { font-size: 0.82rem; color: var(--muted); line-height: 1.35; }
.stages .long { border-top-style: dashed; }
@media (max-width: 640px) {
  .stages { grid-template-columns: 1fr; gap: 0; }
  .stages a { grid-template-columns: 2rem 1fr; column-gap: 0.75rem; border-top: none; border-left: 3px solid var(--accent); padding: 0.45rem 0.6rem; }
  .stages .long { border-left-style: dashed; }
  .stages .s-num { grid-row: span 2; align-self: start; padding-top: 0.2rem; }
}
.legend { font-size: 0.85rem; color: var(--muted); margin-top: 0.75rem; }

/* staff-line rule: five lines, as on the parts */
.staff { height: 17px; background: repeating-linear-gradient(to bottom, var(--line) 0 1px, transparent 1px 4px); background-size: 100% 17px; opacity: 0.9; }

section { display: grid; gap: 1rem; scroll-margin-top: 1rem; }
.sec-head { display: grid; gap: 0.3rem; }
ol.steps { padding-left: 1.4rem; display: grid; gap: 0.55rem; }
ul.plain { padding-left: 1.2rem; display: grid; gap: 0.4rem; }
.note { border-left: 3px solid var(--accent); padding: 0.2rem 0 0.2rem 0.9rem; }
.note.proof { border-left-color: var(--proof); }
.note b { color: var(--accent); }
.note.proof b { color: var(--proof); }

.tablewrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
th, td { text-align: left; vertical-align: top; padding: 0.45rem 0.6rem 0.45rem 0; border-bottom: 1px solid var(--line); }
th { font: 600 0.95rem/1.2 var(--display); letter-spacing: 0.08em; font-variant-caps: all-small-caps; text-transform: lowercase; color: var(--muted); }
td:first-child { white-space: nowrap; }
#help td:first-child, #files td:first-child { white-space: normal; }
.op td:first-child { white-space: normal; }
.op td.key { white-space: nowrap; }
.hash { font-size: 0.72rem; word-break: break-all; display: inline-block; max-width: 18rem; }

.pill { display: inline-block; font: 600 0.78rem/1.4 var(--body); padding: 0.05rem 0.55rem; border-radius: 999px; border: 1px solid currentColor; white-space: nowrap; }
.pill.wait { color: var(--muted); }
.pill.act { color: var(--proof); }
.pill.go { color: var(--accent); }
.pill.done { color: var(--ok); }
.panel .pill { white-space: normal; max-width: 100%; border-radius: 0.8rem; } /* a long status line wraps on a phone */

.screen { background: var(--code-bg); border-radius: 6px; padding: 0.9rem 1rem; font: 400 0.86rem/1.55 var(--mono); overflow-x: auto; white-space: pre; }
.screen b { color: var(--accent); font-weight: 600; }
.screen i { color: var(--muted); font-style: normal; }

figure { margin: 0 0 1.6rem; display: grid; gap: 0.4rem; }
figure.small img { max-width: 16rem; justify-self: center; }
figure img { max-width: min(100%, 30rem); justify-self: start; height: auto; border: 1px solid var(--line); border-radius: 4px; background: #fff; }
details.setup { border: 1px solid var(--line); border-radius: 6px; background: var(--card); }
details.setup > :not(summary) { margin-inline: 1rem; }
details.setup > :last-child { margin-bottom: 1rem; }
details.setup summary { cursor: pointer; display: grid; gap: 0.15rem; padding: 0.8rem 2.6rem 0.8rem 1rem; position: relative; list-style: none; border-radius: 6px; }
details.setup summary::-webkit-details-marker { display: none; }
details.setup summary::after { content: ""; position: absolute; right: 1.1rem; top: 50%; width: 0.6rem; height: 0.6rem; margin-top: -0.45rem; border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(45deg); transition: transform 0.15s; }
details.setup[open] > summary::after { transform: rotate(-135deg); margin-top: -0.1rem; }
details.setup summary:hover { background: var(--code-bg); }
details.setup summary:hover .h2 { color: var(--accent); }
details.setup summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
details.setup summary .h2 { font: 600 1.35rem/1.2 var(--display); }
details.setup summary .hint { font-size: 0.88rem; color: var(--muted); }
details.setup[open] > summary { border-bottom: 1px solid var(--line); border-radius: 6px 6px 0 0; margin-bottom: 0.8rem; }
details.setup[open] .hint { display: none; }
figcaption { font-size: 0.88rem; color: var(--muted); }

.faq { display: grid; gap: 0.4rem; }
.faq details { border-bottom: 1px solid var(--line); padding: 0.5rem 0; }
.faq summary { cursor: pointer; font: 600 1.2rem/1.3 var(--display); list-style-position: outside; padding-left: 0.2rem; }
.faq summary::marker { color: var(--accent); }
.faq .answer { padding: 0.5rem 0 0.5rem 1.2rem; display: grid; gap: 0.6rem; }

.guide-foot, .site-foot { color: var(--muted); font-size: 0.85rem; }
.site-foot .wrap { padding-block: 0 2.5rem; gap: 0.6rem; }
.status { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; align-items: center; }

/* download tabs: no script (the policy forbids it). */
.tabs { display: grid; gap: 0; }
.tablist { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.tablist a { cursor: pointer; padding: 0.55rem 1rem; border: 1px solid transparent; border-bottom: 0; border-radius: 8px 8px 0 0; font: 600 1.15rem/1.2 var(--display); display: grid; position: relative; top: 1px; color: inherit; text-decoration: none; }
.tablist a small { font: 400 0.8rem/1.3 var(--body); color: var(--muted); }
.tablist a:hover { background: var(--accent-soft); }
.tablist a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.panel { display: none; background: var(--card); border: 1px solid var(--line); border-radius: 0 8px 8px 8px; padding: 1.75rem 2rem 2rem; gap: 1.25rem; align-content: start; scroll-margin-top: 5.5rem; }
.panel .sec-head h2 { font-size: 1.4rem; }
.panel .button { font-size: 1.05rem; padding: 0.7rem 1.4rem; }
.panel p + p { margin-top: 0; }
.panel h3 { margin-top: 0.75rem; }
/* Each tab is a link to its panel: the panel that is the target shows; with no target, Linux shows. A link from
   another page (/download/#web) and a click on a tab work the same way. Without :has, Linux shows above the target. */
.panels > #linux, .panel:target { display: grid; }
.tabs:has(.panel:target) #linux:not(:target) { display: none; }
.tabs:not(:has(.panel:target)) .tablist [href="#linux"], .tabs:has(#linux:target) .tablist [href="#linux"], .tabs:has(#windows:target) .tablist [href="#windows"], .tabs:has(#web:target) .tablist [href="#web"], .tabs:has(#source:target) .tablist [href="#source"] { border-color: var(--line); background: var(--card); color: var(--accent); }

/* download page rhythm: whitespace between blocks, cards for the parallel items */
.wrap:has(.tabs) { gap: 3.5rem; }
.block { gap: 1.25rem; }
.block > .sec-head h2 { font-size: 1.6rem; }
#platforms ul { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(12.5rem, 1fr)); gap: 1rem; }
#platforms li { background: var(--card); border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: 6px; padding: 1rem 1.1rem; font-size: 0.95rem; line-height: 1.5; }
#platforms li > strong:first-child { display: block; font: 600 1.2rem/1.2 var(--display); margin-bottom: 0.4rem; }
.verify-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1.25rem; }
.verify-grid pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.verify-grid h3 { font-size: 1.1rem; margin: 0 0 0.4rem; color: var(--muted); }
@media (max-width: 640px) { .panel { padding: 1.25rem 1rem 1.5rem; scroll-margin-top: 9rem; } .wrap:has(.tabs) { gap: 2.5rem; } }

/* architecture diagrams (lib/diagram.mjs draws them; colours only here: the policy allows no inline style) */
.diagram { display: grid; gap: 0.5rem; }
.diagram-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 6px; padding: 0.75rem; }
svg.dg { display: block; margin: 0 auto; max-width: none; height: auto; }
svg.dg text { font-family: var(--body); font-size: 14.5px; fill: var(--ink); }
.dg-sub rect { fill: var(--code-bg); stroke: var(--line); }
.dg-sub.dg-d1 rect { fill: var(--accent-soft); }
.dg-sub-title { font-weight: 600; font-size: 13px; fill: var(--muted); }
.dg-node rect { fill: var(--paper); stroke: var(--accent); stroke-width: 1.5; }
.dg-edge { fill: none; stroke: var(--accent); stroke-width: 1.5; }
.dg-dotted { stroke-dasharray: 5 4; }
.dg-arrow { fill: var(--accent); }
svg.dg .dg-edge-label { font-size: 12px; fill: var(--muted); paint-order: stroke; stroke: var(--paper); stroke-width: 4px; stroke-linejoin: round; }
.diagram-text summary { cursor: pointer; font-size: 0.9rem; color: var(--muted); }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media print {
  :root, :root:not([data-theme="light"]) { --paper: #fff; --ink: #000; --muted: #333; --line: #888; --accent: #000; --code-bg: #fff; --card: #fff; }
  .site-head nav, .skip, .cta, .staff, .tablist { display: none; }
  .panel { display: grid !important; margin-bottom: 1rem; }
  body { font-size: 11pt; padding: 0; }
  .wrap { max-width: none; padding: 0; }
  a { color: #000; }
  .faq details:not([open]) .answer { display: block; }
  details.setup:not([open]) > :not(summary) { display: block; }
  details.setup summary::after { display: none; }
  .diagram-scroll { overflow: visible; border: 0; }
  .diagram-text { display: none; }
  pre, .screen { border: 1px solid #888; white-space: pre-wrap; }
  .button { border: 1px solid #000; background: none; color: #000; }
}
