/* quorumlogic.io. An engineering-drawing look: warm paper, black ink, one safety-orange accent, hard edges and hard
   shadows, monospace labels. No web fonts and no scripts; the dropdowns are CSS. */
:root {
  --paper: #f4f1e8;
  --paper-2: #ebe6d8;
  --card: #fffdf8;
  --ink: #16150f;
  --ink-2: #3a382f;
  --muted: #6a6556;
  --line: #d6cfbd;
  --accent: #e4572e;
  --accent-ink: #b23a14;
  --go: #2c7a4b;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--accent-ink); text-underline-offset: 3px; }
a:hover { color: var(--accent); }
img { max-width: 100%; height: auto; }
code, pre { font-family: var(--mono); font-size: .88em; }
code { background: var(--paper-2); padding: .1em .35em; border: 1px solid var(--line); }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 28px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; background: var(--ink); color: #fff; padding: 8px 12px; z-index: 50; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ---- header and menus ---- */
header.top { position: sticky; top: 0; z-index: 20; background: var(--paper); border-bottom: 2px solid var(--ink); }
header.top .wrap { display: flex; align-items: center; gap: 28px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font: 800 22px/1 var(--sans); letter-spacing: -.02em; color: var(--ink); text-decoration: none; }
.brand img { width: 34px; height: 34px; }
.menu { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; height: 100%; }
.menu > li { position: relative; display: flex; align-items: center; }
.menu > li > a { font: 600 15px/1 var(--sans); color: var(--ink); text-decoration: none; padding: 10px 12px; border: 2px solid transparent; }
.menu > li > a:hover, .menu > li:focus-within > a { border-color: var(--ink); background: var(--card); color: var(--ink); }
.menu > li > a[aria-current] { box-shadow: inset 0 -3px 0 var(--accent); }
.menu > li:has(.drop) > a::after { content: ""; display: inline-block; margin-left: 7px; width: 6px; height: 6px;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-3px) rotate(45deg); }
.drop { display: none; position: absolute; top: calc(100% - 8px); left: 0; width: 340px; list-style: none; margin: 0; padding: 8px;
  background: var(--card); border: 2px solid var(--ink); box-shadow: 6px 6px 0 var(--ink); }
.menu > li:hover .drop, .menu > li:focus-within .drop { display: block; }
.drop a { display: flex; gap: 12px; padding: 10px; color: var(--ink); text-decoration: none; }
.drop a:hover { background: var(--paper); }
.drop svg { flex: none; width: 22px; height: 22px; color: var(--accent); margin-top: 2px; }
.drop b { display: block; font-size: 15px; }
.drop small { display: block; color: var(--muted); font-size: 13px; line-height: 1.4; }
.cta { margin-left: auto; display: flex; gap: 10px; }
.btn { display: inline-flex; align-items: center; gap: 8px; font: 700 15px/1 var(--sans); padding: 12px 18px; text-decoration: none;
  border: 2px solid var(--ink); color: var(--ink); background: var(--card); transition: transform .12s, box-shadow .12s; }
.btn svg { width: 18px; height: 18px; }
.btn:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--ink); color: var(--ink); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { color: #fff; }
.btn-ghost { background: transparent; }
details.mobile { display: none; margin-left: auto; }
details.mobile summary { list-style: none; cursor: pointer; width: 40px; height: 40px; border: 2px solid var(--ink); display: grid; place-items: center; }
details.mobile summary svg { width: 24px; height: 24px; }
details.mobile nav { position: absolute; right: 16px; top: 64px; width: min(320px, 90vw); max-height: 80vh; overflow: auto; background: var(--card);
  border: 2px solid var(--ink); box-shadow: 6px 6px 0 var(--ink); padding: 12px 16px; }
details.mobile nav b { display: block; font: 700 12px/1 var(--mono); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 14px 0 4px; }
details.mobile nav a { display: block; padding: 6px 0; color: var(--ink); text-decoration: none; }

/* ---- hero ---- */
.hero { position: relative; padding: 76px 0 64px; border-bottom: 2px solid var(--ink);
  background-color: var(--paper);
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 28px 28px; background-position: -1px -1px; }
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--paper) 30%, rgba(244,241,232,.55)); pointer-events: none; }
.hero .wrap { position: relative; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.eyebrow { font: 700 13px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--accent-ink); margin: 0 0 18px; }
.eyebrow::before { content: "■ "; color: var(--accent); }
h1 { font: 850 clamp(38px, 5.2vw, 64px)/1.03 var(--sans); letter-spacing: -.035em; margin: 0 0 22px; }
h1 em { font-style: normal; color: var(--accent); }
.lede { font-size: 20px; color: var(--ink-2); max-width: 640px; margin: 0 0 30px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.fine { font: 13px/1.5 var(--mono); color: var(--muted); margin-top: 18px; }

/* the rulebook card in the hero */
.sheet { background: var(--card); border: 2px solid var(--ink); box-shadow: 10px 10px 0 var(--ink); }
.sheet .bar { display: flex; justify-content: space-between; font: 700 12px/1 var(--mono); padding: 10px 14px; border-bottom: 2px solid var(--ink); background: var(--paper-2); }
.sheet pre { margin: 0; padding: 16px 18px; font-size: 13.5px; line-height: 1.7; overflow-x: auto; white-space: pre; }
.sheet .k { color: var(--accent-ink); font-weight: 700; }
.sheet .c { color: var(--muted); }
.sheet .out { border-top: 2px dashed var(--line); padding: 12px 18px; font: 13px/1.6 var(--mono); }
.sheet .out b { color: var(--go); }

/* ---- numbers strip ---- */
.strip { background: var(--ink); color: var(--paper); }
.strip .wrap { display: grid; grid-template-columns: repeat(4, 1fr); }
.strip div > div { padding: 30px 22px; border-left: 1px solid #3a382f; }
.strip div > div:first-child { border-left: 0; padding-left: 0; }
.strip b { display: block; font: 800 34px/1 var(--mono); color: #fff; letter-spacing: -.02em; }
.strip span { display: block; margin-top: 8px; font-size: 14px; color: #c9c3b2; }

/* ---- sections ---- */
section.band { padding: 84px 0; border-bottom: 2px solid var(--ink); }
section.band.alt { background: var(--paper-2); }
h2 { font: 820 clamp(30px, 3.6vw, 44px)/1.08 var(--sans); letter-spacing: -.03em; margin: 0 0 16px; }
h3 { font: 780 21px/1.25 var(--sans); letter-spacing: -.01em; margin: 0 0 8px; }
.intro { max-width: 720px; color: var(--ink-2); font-size: 18px; margin: 0 0 40px; }

/* the big squares */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.tile, .card { display: flex; flex-direction: column; background: var(--card); border: 2px solid var(--ink); padding: 22px; color: var(--ink);
  text-decoration: none; transition: transform .14s, box-shadow .14s; }
.tile:hover, .card:hover { transform: translate(-4px, -4px); box-shadow: 8px 8px 0 var(--accent); color: var(--ink); }
.tile img { display: block; width: calc(100% + 44px); max-width: none; margin: -22px -22px 18px; aspect-ratio: 16 / 9; object-fit: cover;
  border-bottom: 2px solid var(--ink); background: var(--paper-2); }
.tag { align-self: flex-start; font: 700 11.5px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; padding: 5px 8px;
  border: 1.5px solid var(--ink); margin-bottom: 12px; }
.tile p, .card p { color: var(--ink-2); font-size: 15.5px; margin: 0 0 16px; }
.tile .more { margin-top: auto; font: 700 14px/1 var(--mono); color: var(--accent-ink); }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.cards.four { grid-template-columns: repeat(4, 1fr); }
.card .icon { width: 46px; height: 46px; display: grid; place-items: center; border: 2px solid var(--ink); background: var(--paper); margin-bottom: 16px; }
.card .icon svg { width: 24px; height: 24px; color: var(--accent); }
.card .num { font: 800 13px/1 var(--mono); color: var(--accent-ink); margin-bottom: 12px; }

/* feature rows */
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; margin-bottom: 76px; scroll-margin-top: 90px; }
.row:last-child { margin-bottom: 0; }
.row.flip > :first-child { order: 2; }
.row ul, .checks { list-style: none; padding: 0; margin: 16px 0; }
.row li, .checks li { position: relative; padding-left: 28px; margin: 8px 0; }
.row li::before, .checks li::before { content: ""; position: absolute; left: 2px; top: 8px; width: 12px; height: 12px; background: var(--accent); }
.shot { border: 2px solid var(--ink); box-shadow: 10px 10px 0 var(--ink); background: var(--card); }
.shot img { display: block; }
[id] { scroll-margin-top: 90px; }

/* steps */
.steps { counter-reset: s; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border: 2px solid var(--ink); background: var(--card); }
.steps > div { padding: 24px; border-left: 2px solid var(--ink); }
.steps > div:first-child { border-left: 0; }
.steps > div::before { counter-increment: s; content: "0" counter(s); display: block; font: 800 30px/1 var(--mono); color: var(--accent); margin-bottom: 14px; }
.steps p { margin: 0; color: var(--ink-2); font-size: 15.5px; }

/* tables */
.tablewrap { overflow-x: auto; border: 2px solid var(--ink); background: var(--card); margin: 24px 0; }
table { border-collapse: collapse; width: 100%; font-size: 15.5px; }
th { text-align: left; font: 700 12.5px/1.3 var(--mono); text-transform: uppercase; letter-spacing: .06em; background: var(--paper-2); border-bottom: 2px solid var(--ink); }
th, td { padding: 12px 16px; vertical-align: top; }
td { border-bottom: 1px solid var(--line); }
tr:last-child td { border-bottom: 0; }
td.ok { color: var(--go); font-weight: 700; }

/* callouts */
.notyet { border: 2px solid var(--ink); border-left: 10px solid var(--accent); background: var(--card); padding: 20px 24px; margin: 28px 0 0; }
.notyet b { font-family: var(--mono); text-transform: uppercase; letter-spacing: .08em; font-size: 13px; }

/* downloads */
.dl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.dl .card h3 { display: flex; align-items: center; gap: 10px; }
.dl .card .btn { align-self: flex-start; margin-top: auto; }
.dl small { display: block; font: 12.5px/1.5 var(--mono); color: var(--muted); margin-bottom: 18px; }

/* ---- guides ---- */
.article-hero { padding: 56px 0 46px; }
.crumb { display: inline-block; font: 700 13px/1 var(--mono); margin-bottom: 26px; color: var(--ink); }
.article { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 56px; padding-top: 56px; padding-bottom: 90px; }
.toc { position: sticky; top: 96px; align-self: start; font-size: 14.5px; border-left: 2px solid var(--ink); padding-left: 16px; }
.toc b { display: block; font: 700 12px/1 var(--mono); text-transform: uppercase; letter-spacing: .12em; margin-bottom: 12px; color: var(--muted); }
.toc a { display: block; color: var(--ink-2); text-decoration: none; padding: 5px 0; }
.toc a:hover { color: var(--accent-ink); }
.prose { max-width: 760px; }
.prose .lead-img { display: block; width: 100%; border: 2px solid var(--ink); box-shadow: 8px 8px 0 var(--ink); margin-bottom: 40px; background: var(--paper-2); }
.prose h2 { font-size: 31px; margin: 52px 0 14px; padding-top: 18px; border-top: 2px solid var(--ink); }
.prose h3 { margin: 30px 0 8px; }
.prose p, .prose li { color: var(--ink-2); }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin: 6px 0; }
.prose figure { margin: 30px 0; }
.prose figure img { display: block; width: 100%; border: 2px solid var(--ink); background: var(--card); }
.prose figcaption { font: 13px/1.5 var(--mono); color: var(--muted); margin-top: 10px; }
.prose pre { background: var(--ink); color: #f4f1e8; padding: 18px 20px; overflow-x: auto; border: 2px solid var(--ink); }
.prose pre code { background: none; border: 0; padding: 0; color: inherit; }
aside.plain { background: var(--card); border: 2px solid var(--ink); border-left: 10px solid var(--go); padding: 16px 20px; margin: 24px 0; color: var(--ink-2); }
.next { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 56px; padding-top: 28px; border-top: 2px solid var(--ink); }

/* ---- footer ---- */
footer.site { background: var(--ink); color: #c9c3b2; padding: 64px 0 36px; font-size: 15px; }
footer.site .cols { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
footer.site .brand { color: #fff; }
footer.site .brand img { background: var(--paper); padding: 2px; }
footer.site p { margin: 14px 0 0; }
footer.site b { display: block; font: 700 12px/1 var(--mono); text-transform: uppercase; letter-spacing: .12em; color: #fff; margin-bottom: 14px; }
footer.site .cols a { display: block; color: #c9c3b2; text-decoration: none; padding: 4px 0; }
footer.site a:hover { color: var(--accent); }
.maker { display: flex; gap: 20px; align-items: center; margin-top: 44px; padding-top: 28px; border-top: 1px solid #3a382f; }
.maker img { background: #fff; padding: 4px; display: block; }
.maker p { margin: 0; max-width: 760px; }
.maker a { color: #fff; }
.legal { margin-top: 26px; font: 12.5px/1.6 var(--mono); color: #8d8775; }

/* ---- small screens ---- */
@media (max-width: 1020px) {
  .menu, .cta { display: none; }
  details.mobile { display: block; }
  .hero-grid, .row, .article { grid-template-columns: 1fr; }
  .row.flip > :first-child { order: 0; }
  .tiles, .cards, .cards.four, .dl { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .steps > div:nth-child(3) { border-left: 0; }
  .steps > div:nth-child(n+3) { border-top: 2px solid var(--ink); }
  .toc { position: static; }
  footer.site .cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap { padding: 0 18px; }
  .tiles, .cards, .cards.four, .dl, .steps { grid-template-columns: 1fr; }
  .steps > div { border-left: 0; border-top: 2px solid var(--ink); }
  .steps > div:first-child { border-top: 0; }
  .strip .wrap { grid-template-columns: 1fr 1fr; }
  .strip div > div { padding: 22px 12px; border-left: 0; }
  .sheet { box-shadow: 6px 6px 0 var(--ink); }
  section.band { padding: 60px 0; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
