/* Hiveframe Systems. Ink on textured off-white paper, one golden-orange accent, thin rules,
   mono labels. No gradients, no shadows, no dark mode, no scroll animation. The only motion is the flow line in the hero graphic. */

/* Archivo, pinned to 80% width, weights 600-700. */
@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo.woff2") format("woff2");
  font-weight: 600 700;
  font-stretch: 80%;
  font-style: normal;
  font-display: swap;
}

/* IBM Plex Sans and IBM Plex Mono, subset and renamed (OFL reserved font name "Plex"). */
@font-face {
  font-family: "Hiveframe Text";
  src: url("../fonts/plex-sans.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Hiveframe Mono";
  src: url("../fonts/plex-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Hiveframe Mono";
  src: url("../fonts/plex-mono-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Hiveframe Mono";
  src: url("../fonts/plex-mono-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Color. One accent: --accent for fills, --accent-deep where it has to read as text or a line. */
  --bg: #f3efe4; /* paper */
  --panel: #faf7ef; /* diagram and card surfaces, a step lighter than the paper */
  --line: #cdc6b3; /* thin rules */
  --fg: #16140f; /* ink: 16.0:1 on --bg */
  --muted: #5b5647; /* labels and secondary text: 6.4:1 on --bg, 6.8:1 on --panel */
  --accent: #d9861a; /* golden orange: marks and tints. Ink on it is 6.5:1 */
  --accent-deep: #8f4c06; /* the accent as text or line: 5.7:1 on --bg */

  /* Type scale. Every font-size on the site is one of these. */
  --t-label: 12px;
  --t-small: 14px;
  --t-body: 17px;
  --t-lede: 20px;
  --t-h3: 26px;
  --t-h2: clamp(30px, 3.6vw, 44px);
  --t-h1: clamp(38px, 5.4vw, 68px);

  /* Spacing scale. */
  --s1: 4px;
  --s2: 8px;
  --s3: 16px;
  --s4: 24px;
  --s5: 40px;
  --s6: 64px;
  --s7: 104px;
  --s8: 152px;

  /* No named fallback fonts: only these three families, then the generic keyword. */
  --display: "Archivo", sans-serif;
  --sans: "Hiveframe Text", sans-serif;
  --mono: "Hiveframe Mono", monospace;

  /* Paper grain, drawn by an SVG noise filter. --grain is on every page; --grain-strong is
     the coarser, heavier grain for sections that are set apart. It also darkens them by
     about a tenth, which is the whole of their darker tone: muted text on it is about 4.9:1. */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .09 0 0 0 0 .08 0 0 0 0 .06 0 0 0 .13 0'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)'/%3E%3C/svg%3E");
  --grain-strong: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.7' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .09 0 0 0 0 .08 0 0 0 0 .06 0 0 0 .2 0'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)'/%3E%3C/svg%3E");

  --wrap: 1200px;
  --gutter: var(--s5);
  --header-h: 64px;
  --radius: 2px;
  --t: 150ms; /* the only transition duration; color changes only */

  color-scheme: light;
}

/* ---------- Base ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + var(--s3));
}

/* Paper: fine grain on every page. */
body {
  margin: 0;
  background-color: var(--bg);
  background-image: var(--grain);
  color: var(--fg);
  font-family: var(--sans);
  font-size: var(--t-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-wrap: break-word;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--display);
  font-stretch: 80%;
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

h1 {
  font-size: var(--t-h1);
}

h2 {
  font-size: var(--t-h2);
}

h3,
h4 {
  font-size: var(--t-h3);
  font-weight: 600;
  line-height: 1.15;
}

h4 {
  font-family: var(--sans);
  font-size: var(--t-body);
  letter-spacing: 0;
  line-height: 1.4;
}

p,
ul,
ol,
dl,
dd,
figure,
blockquote {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  transition: color var(--t);
}

a:hover {
  color: var(--accent-deep);
}

:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 3px;
}

code {
  padding: 1px 5px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  font-family: var(--mono);
  font-size: var(--t-small);
}

::selection {
  background: var(--accent);
  color: var(--fg);
}

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: var(--s3);
  top: -100px;
  z-index: 20;
  padding: var(--s2) var(--s3);
  background: var(--fg);
  color: var(--bg);
}

.skip:focus {
  top: var(--s3);
}

/* Small mono label: section names, paths, table heads. */
.label {
  color: var(--muted);
  font-family: var(--mono);
  font-size: var(--t-label);
  font-weight: 500;
  letter-spacing: 0.12em;
  line-height: 1.4;
  text-transform: uppercase;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: var(--s2) var(--s4);
  border: 1px solid var(--fg);
  border-radius: var(--radius);
  background: transparent;
  color: var(--fg);
  font-family: var(--mono);
  font-size: var(--t-small);
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--t), color var(--t);
}

.btn:hover {
  background: var(--fg);
  color: var(--bg);
}

/* Primary: an orange tint you can see the paper through, a dark-honey edge, and one small
   hexagon mark. Ink on the tint is 13:1. */
.btn--primary {
  gap: var(--s2);
  border-color: var(--accent-deep);
  background: rgb(217 134 26 / 0.16);
  box-shadow: inset 0 0 0 3px var(--bg), inset 0 0 0 4px rgb(143 76 6 / 0.35);
}

.btn--primary::before {
  content: "";
  flex: none;
  width: 10px;
  height: 9px;
  background: var(--accent-deep);
  clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
}

.btn--primary:hover {
  border-color: var(--fg);
}

.btn--primary:hover::before {
  background: var(--accent);
}

.btn--sm {
  min-height: 40px;
  padding-inline: var(--s3);
  font-size: var(--t-label);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s3);
}

.cta-note {
  margin-top: var(--s3);
  color: var(--muted);
  font-family: var(--mono);
  font-size: var(--t-label);
  letter-spacing: 0.04em;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--fg);
  background: var(--bg);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: var(--s4);
  white-space: nowrap;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  margin-right: auto;
  color: var(--fg);
  font-family: var(--mono);
  font-size: var(--t-small);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
}

.brand:hover {
  color: var(--fg);
}

.brand__mark {
  width: 38px;
  height: 38px;
}

.brand__slash {
  margin-inline: var(--s1);
  color: var(--accent-deep);
}

.site-nav ul {
  display: flex;
  gap: var(--s4);
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: block;
  padding-block: var(--s2);
  font-family: var(--mono);
  font-size: var(--t-label);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-decoration: none;
  text-transform: uppercase;
}

.site-nav a[aria-current="page"] {
  box-shadow: inset 0 -2px 0 var(--accent);
}

.menu {
  display: none;
  position: relative;
}

.menu__toggle {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--fg);
  border-radius: var(--radius);
  list-style: none;
  cursor: pointer;
}

.menu__toggle::-webkit-details-marker {
  display: none;
}

.menu__icon {
  width: 18px;
  height: 14px;
  fill: var(--fg);
}

.menu__panel {
  position: absolute;
  right: 0;
  top: calc(100% + var(--s2));
  width: min(300px, calc(100vw - 2 * var(--gutter)));
  padding: var(--s3);
  border: 1px solid var(--fg);
  background: var(--bg);
}

.menu__list {
  padding: 0;
  list-style: none;
}

.menu__link {
  display: flex;
  gap: var(--s3);
  align-items: baseline;
  padding: var(--s3) 0;
  border-top: 1px solid var(--line);
  font-weight: 600;
  text-decoration: none;
}

.menu__idx {
  color: var(--muted);
  font-family: var(--mono);
  font-size: var(--t-label);
  font-weight: 400;
}

/* ---------- Hero ---------- */

/* The hero fills the first screen. Row one: the headline on a single line. Row two: the
   summary on the left and the overview graphic on the right, drawn straight on the paper. */
.hero {
  display: flex;
  align-items: center;
  min-height: calc(100vh - var(--header-h) - 1px);
  min-height: calc(100svh - var(--header-h) - 1px);
  padding-block: var(--s4);
  border-bottom: 1px solid var(--fg);
  /* Dark margins: a deeper paper tone at the far left and right, clear in the middle, under the heavier grain. */
  background: var(--grain-strong), linear-gradient(90deg, #c2b698 0, #d9d0b9 9%, var(--bg) 26%, var(--bg) 74%, #d9d0b9 91%, #c2b698 100%);
}

.hero__inner {
  max-width: calc(1440px + 2 * var(--gutter));
}

.hero__title {
  margin-top: var(--s2);
  font-size: clamp(30px, 4.6vw, 68px);
  white-space: nowrap;
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: var(--s5) var(--s6);
  align-items: center;
  margin-top: var(--s4);
}

.hero__lede {
  margin-bottom: var(--s4);
  font-size: var(--t-lede);
  line-height: 1.5;
}

/* As wide as the screen height allows, so the whole hero stays on the first screen where it can. */
.hero__art {
  width: clamp(560px, calc((100svh - 262px) * 1.46), 100%);
  max-width: 100%;
  margin-left: auto;
}

/* The one moving thing on the site: the dashes on the request path drift in the direction
   the calls travel. Off for anyone who asks for reduced motion. */
.hero__art .arch__flow {
  animation: flow 1.6s linear infinite;
}

@keyframes flow {
  to {
    stroke-dashoffset: -16;
  }
}

/* ---------- Terminal block ---------- */

/* The one ink-filled element: a spec readout. Paper text on ink is 16.0:1. */
.term {
  border: 1px solid var(--fg);
  border-radius: var(--radius);
  background: var(--fg);
  color: var(--bg);
  font-family: var(--mono);
  font-size: var(--t-label);
  line-height: 1.5;
}

.term__bar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s1) var(--s3);
  padding: var(--s2) var(--s3);
  border-bottom: 1px solid #45413a;
  color: #bdb7a6; /* 9.2:1 on ink */
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.term__spec > div {
  display: grid;
  gap: var(--s1);
  padding-block: var(--s2);
  border-bottom: 1px dashed #45413a;
}

.term__spec > div:last-child {
  border-bottom: 0;
}

.term__spec dt {
  color: var(--accent);
  font-weight: 600;
}

.term--spec {
  margin-top: var(--s5);
}

/* ---------- Sections ---------- */

/* Spacing follows importance: --major for the platform and contact, default for the
   body sections, --tight for the short pricing pointer. */
.section {
  padding-block: var(--s7);
}

.section--major {
  padding-block: var(--s8);
}

.section--tight {
  padding-block: var(--s6);
}

.section--rule > .wrap {
  position: relative;
}

.section--rule > .wrap::before {
  content: "";
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  top: calc(-1 * var(--s7));
  border-top: 1px solid var(--line);
}

.section--tight.section--rule > .wrap::before {
  top: calc(-1 * var(--s6));
}

/* Uneven two-column layouts. --lead: heading left, content right. --trail: narrow note, wide list. */
.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: var(--s5) var(--s6);
  align-items: start;
}

.split--trail {
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  margin-top: var(--s7);
}

.nowrap {
  white-space: nowrap;
}

.section__head > * + *,
.section__body > * + * {
  margin-top: var(--s4);
}

.section__head .label + h2 {
  margin-top: var(--s3);
}

.section__lede {
  max-width: 58ch;
  font-size: var(--t-lede);
  line-height: 1.5;
}

.h2--sm,
.h3--lg {
  font-size: var(--t-h3);
}

/* Name / description rows between thin rules. */
.rows {
  border-top: 1px solid var(--fg);
}

.rows__row {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: var(--s1) var(--s4);
  padding-block: var(--s3);
  border-bottom: 1px solid var(--line);
}

.rows dt {
  font-weight: 600;
}

.rows--terms dt {
  font-family: var(--mono);
  font-size: var(--t-small);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.rows--compact {
  border-top-color: var(--line);
}

/* ---------- Architecture diagram ---------- */

.arch {
  margin-top: var(--s6);
  padding: var(--s5);
  border: 1px solid var(--fg);
  border-radius: var(--radius);
  background: var(--panel);
}

.arch__svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.arch__svg--narrow {
  display: none;
  max-width: 420px;
  margin-inline: auto;
}

.arch__svg text {
  fill: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.05em;
}

.arch__svg .arch__strong {
  fill: var(--fg);
  font-weight: 600;
}

/* Thin rules between the sections of the platform diagram. */
.arch__divider {
  fill: none;
  stroke: var(--line);
  stroke-width: 1;
}

.arch__hive {
  fill: var(--bg);
  stroke: var(--muted);
  stroke-width: 1;
  stroke-dasharray: 2 4;
}

.arch__hex,
.arch__box {
  fill: var(--panel);
  stroke: var(--fg);
  stroke-width: 1.5;
}

.arch__hex--open {
  fill: none;
  stroke: var(--muted);
  stroke-width: 1;
  stroke-dasharray: 3 3;
}

.arch__slot {
  cursor: default;
  text-decoration: none;
}

/* Two-tone bevel, as on the H mark: a darker face along the right and bottom of a shape. */
.arch__shade {
  fill: var(--fg);
  fill-opacity: 0.13;
}

.arch__shade--core {
  fill: var(--accent-deep);
  fill-opacity: 0.45;
}

/* Hero graphic pieces. */
.arch__svg .arch__callout {
  fill: var(--accent-deep);
  font-weight: 600;
}

.arch__svg .arch__sub {
  font-size: 11px;
  letter-spacing: 0;
}

.arch__ghost {
  fill: var(--bg);
  stroke: var(--muted);
  stroke-width: 1;
}

.arch__box--thin {
  stroke-width: 1;
}

.arch__box--core {
  fill: rgb(217 134 26 / 0.16);
  stroke-width: 2;
}

.arch__check {
  fill: var(--accent);
  stroke: var(--fg);
  stroke-width: 1.5;
}

.arch__icon,
.arch__leader {
  fill: none;
  stroke: var(--fg);
  stroke-width: 1.5;
}

.arch__leader {
  stroke: var(--muted);
  stroke-width: 1;
  stroke-dasharray: 1 3;
}

.arch__line,
.arch__flow {
  fill: none;
  stroke: var(--fg);
  stroke-width: 1;
}

.arch__flow {
  stroke: var(--accent-deep);
  stroke-width: 1.5;
  stroke-dasharray: 3 5;
}

.arch__arrow {
  fill: var(--fg);
}

.arch__arrow--flow {
  fill: var(--accent-deep);
}

/* Bee mark for an agent: orange hexagon body with circuit traces, light hexagon wings. */
.bee__wing {
  fill: var(--panel);
  stroke: var(--fg);
  stroke-width: 1.2;
}

.bee__body {
  fill: var(--accent);
}

.bee__ink {
  fill: var(--fg);
}

.bee__line {
  fill: none;
  stroke: var(--fg);
  stroke-width: 1.2;
}

.bee__line--trace {
  stroke-width: 1.3;
}

.bee__shade {
  fill: var(--fg);
  fill-opacity: 0.2;
}

.bee__shade--body {
  fill-opacity: 0.3;
}

.step__idx,
.ribbon__idx {
  color: var(--accent-deep);
  font-family: var(--mono);
  font-size: var(--t-label);
  font-weight: 600;
  line-height: 1.9;
}

/* ---------- What it runs ---------- */

.cases__title {
  margin-top: var(--s7);
}

.cases {
  margin-top: var(--s3);
  padding: 0;
  border-top: 1px solid var(--fg);
  list-style: none;
}

.case {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr) minmax(0, 5fr);
  gap: var(--s3) var(--s5);
  padding-block: var(--s4);
  border-bottom: 1px solid var(--line);
}

.case h4 {
  font-family: var(--display);
  font-size: var(--t-h3);
  line-height: 1.1;
}

.case__systems,
.case__tag,
.step__tag {
  color: var(--muted);
  font-family: var(--mono);
  font-size: var(--t-label);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.case__tag {
  display: block;
  margin-bottom: var(--s1);
}

.case__solution .case__tag {
  color: var(--accent-deep);
  font-weight: 600;
}

.runs__foot {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: var(--s5) var(--s6);
  align-items: end;
  margin-top: var(--s6);
}

.quote {
  padding-left: var(--s4);
  border-left: 3px solid var(--accent);
}

.quote blockquote {
  font-family: var(--display);
  font-size: var(--t-h3);
  font-stretch: 80%;
  font-weight: 600;
  line-height: 1.2;
}

.quote figcaption {
  margin-top: var(--s3);
  color: var(--muted);
  font-size: var(--t-small);
}

.linklist {
  padding: 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.linklist a {
  display: block;
  padding-block: var(--s3);
  border-bottom: 1px solid var(--line);
  font-weight: 600;
  text-decoration: none;
}

.linklist a::after {
  content: " ->";
  color: var(--accent-deep);
  font-family: var(--mono);
}

/* ---------- How MSPs offer it ---------- */

/* Client / MSP / Hiveframe rows. The MSP row is marked: it's the reader. */
.stack {
  padding: 0;
  border-top: 1px solid var(--fg);
  list-style: none;
}

.stack__layer {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: var(--s1) var(--s4);
  align-items: baseline;
  padding: var(--s3) 0 var(--s3) var(--s3);
  border-bottom: 1px solid var(--line);
  border-left: 3px solid transparent;
}

.stack__layer--msp {
  border-left-color: var(--accent);
  background: var(--panel);
}

.stack__name {
  font-weight: 600;
}

.stack__role {
  color: var(--muted);
}

.steps {
  padding: 0;
  border-top: 1px solid var(--fg);
  list-style: none;
}

.step {
  display: grid;
  grid-template-columns: 3ch minmax(0, 1fr) auto;
  gap: var(--s1) var(--s4);
  align-items: baseline;
  padding-block: var(--s3);
  border-bottom: 1px solid var(--line);
}

.step__main p {
  color: var(--muted);
}

/* ---------- Contact ---------- */

/* Set apart from the page by the heavier grain. */
.contact {
  border-top: 1px solid var(--fg);
  background: var(--grain-strong) var(--bg);
}

.contact__title {
  max-width: 22ch;
  margin-block: var(--s3) var(--s4);
  font-size: var(--t-h1);
  text-wrap: wrap;
}

.contact .actions {
  margin-top: var(--s5);
  gap: var(--s3) var(--s5);
}

.contact__mail {
  font-family: var(--mono);
  font-size: var(--t-body);
}

/* ---------- Text pages ---------- */

.page {
  display: grid;
  grid-template-columns: minmax(0, 720px);
  gap: var(--s6);
  padding-block: var(--s6) var(--s7);
}

.page--ribbon {
  grid-template-columns: minmax(0, 720px) minmax(0, 300px);
  justify-content: space-between;
}

.page__path {
  margin-bottom: var(--s3);
}

.prose > * + * {
  margin-top: var(--s4);
}

.prose h1 + p {
  font-size: var(--t-lede);
  line-height: 1.5;
}

.prose h2 {
  margin-top: var(--s7);
  padding-top: var(--s4);
  border-top: 1px solid var(--fg);
  font-size: var(--t-h2);
}

.prose h3 {
  margin-top: var(--s6);
}

.prose ul,
.prose ol {
  padding-left: var(--s4);
}

.prose li + li {
  margin-top: var(--s2);
}

.prose ul {
  list-style: square;
}

.prose li::marker {
  color: var(--accent-deep);
  font-family: var(--mono);
  font-size: var(--t-small);
  font-weight: 600;
}

.prose strong {
  font-weight: 600;
}

.prose .fine-print {
  margin-top: var(--s2);
  color: var(--muted);
  font-size: var(--t-small);
}

.prose .btn {
  margin-top: var(--s5);
}

.prose table {
  display: block;
  width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  border-top: 1px solid var(--fg);
  font-size: var(--t-small);
}

.prose th,
.prose td {
  min-width: 14ch;
  padding: var(--s3) var(--s3) var(--s3) 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.prose th {
  color: var(--muted);
  font-family: var(--mono);
  font-size: var(--t-label);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Side list of a page's sections. Inline copy on narrow screens, sticky copy on wide. */
.ribbon--side {
  position: sticky;
  top: calc(var(--header-h) + var(--s5));
  align-self: start;
  margin-top: var(--s6);
}

.ribbon--inline {
  display: none;
}

.ribbon__head {
  padding-bottom: var(--s2);
  border-bottom: 1px solid var(--fg);
  color: var(--muted);
  font-family: var(--mono);
  font-size: var(--t-label);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ribbon__list {
  padding: 0 !important;
  list-style: none;
}

.ribbon__item {
  margin: 0 !important;
}

.ribbon__link {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0 var(--s3);
  padding-block: var(--s3);
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}

.ribbon__name {
  font-weight: 600;
}

.ribbon__summary {
  grid-column: 2;
  color: var(--muted);
  font-size: var(--t-small);
  line-height: 1.45;
}

.ribbon__link:hover .ribbon__summary {
  color: var(--muted);
}

/* FAQ: each question opens and closes. */
.faq {
  margin-top: 0 !important;
  border-bottom: 1px solid var(--line);
}

.faq summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--s3);
  align-items: center;
  padding-block: var(--s3);
  list-style: none;
  cursor: pointer;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  color: var(--accent-deep);
  font-family: var(--mono);
  font-size: var(--t-lede);
}

.faq[open] summary::after {
  content: "-";
}

.faq summary h3 {
  margin: 0;
  font-family: var(--sans);
  font-size: var(--t-body);
  font-stretch: 100%;
  letter-spacing: 0;
  line-height: 1.4;
}

.faq__answer {
  padding-bottom: var(--s4);
}

.faq__answer > * + * {
  margin-top: var(--s3);
}

/* Mock card on the Security page: one service account disabled, the others still running. */
.revoke-card {
  border: 1px solid var(--fg);
  border-radius: var(--radius);
  background: var(--panel);
  font-family: var(--mono);
  font-size: var(--t-label);
}

.revoke-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--s1) var(--s3);
  padding: var(--s3);
  border-bottom: 1px solid var(--fg);
}

.revoke-card__client {
  font-family: var(--sans);
  font-size: var(--t-body);
  font-weight: 600;
}

.revoke-card__sub,
.revoke-card__note,
.revoke-card__acct {
  color: var(--muted);
  letter-spacing: 0.06em;
}

.revoke-card__sub,
.revoke-card__note {
  text-transform: uppercase;
}

.revoke-card__note {
  margin-left: auto;
}

.revoke-card__row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: var(--s2) var(--s3);
  padding: var(--s3);
  border-bottom: 1px solid var(--line);
}

.revoke-card__dot {
  width: 8px;
  height: 8px;
  background: var(--accent);
  outline: 1px solid var(--fg);
}

.revoke-card__agent {
  font-size: var(--t-small);
  font-weight: 600;
}

.revoke-card__row--off .revoke-card__dot {
  background: transparent;
}

.revoke-card__row--off .revoke-card__agent {
  color: var(--muted);
  text-decoration: line-through;
}

.revoke-tag {
  padding: 2px var(--s2);
  border: 1px solid var(--line);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.revoke-tag--off {
  border-color: var(--fg);
  background: var(--fg);
  color: var(--bg);
}

.revoke-card__log {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--s1) var(--s3);
  padding: var(--s3);
  color: var(--muted);
}

.revoke-card__blocked {
  color: var(--fg);
  font-weight: 600;
}

/* ---------- Page diagrams ---------- */

/* One shared drawing style for the inline SVGs in docs/*.md: flat boxes, a dashed honey line
   for the active path, a small hexagon for each check, mono labels. */
.diagram {
  padding: var(--s4);
  border: 1px solid var(--fg);
  border-radius: var(--radius);
  background: var(--panel);
}

.dg {
  display: block;
  width: 100%;
  max-width: 560px;
  height: auto;
  margin-inline: auto;
  overflow: visible;
}

.dg text {
  fill: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
}

.dg .dg__strong,
.dg .dg__accent {
  fill: var(--fg);
  font-size: 13px;
  font-weight: 600;
}

.dg .dg__accent {
  fill: var(--accent-deep);
}

.dg .dg__text-fg {
  fill: var(--fg);
}

.dg__box {
  fill: var(--bg);
  stroke: var(--muted);
  stroke-width: 1;
}

.dg__box--fg {
  stroke: var(--fg);
  stroke-width: 1.5;
}

.dg__box--accent {
  stroke: var(--accent-deep);
  stroke-width: 1.5;
}

/* Something that's blocked, absent, or not the default. */
.dg__box--off {
  stroke: var(--muted);
  stroke-dasharray: 3 3;
}

/* A span of time, like the 30 days' notice. */
.dg__span {
  fill: none;
  stroke: var(--accent);
  stroke-width: 3;
}

.dg__icon,
.dg__wire,
.dg__flow,
.dg__rule,
.dg__stop {
  fill: none;
}

.dg__icon {
  stroke: var(--fg);
  stroke-width: 1.5;
}

.dg__wire {
  stroke: var(--muted);
  stroke-width: 1;
}

.dg__flow {
  stroke: var(--accent-deep);
  stroke-width: 1.5;
  stroke-dasharray: 3 5;
}

.dg__rule {
  stroke: var(--muted);
  stroke-width: 1;
  stroke-dasharray: 2 4;
}

.dg__stop {
  stroke: var(--fg);
  stroke-width: 2;
}

/* Two-tone bevel on the larger boxes: a darker face along the right and bottom. */
.dg__shade {
  fill: var(--fg);
  fill-opacity: 0.12;
}

.dg__shade--accent {
  fill: var(--accent-deep);
  fill-opacity: 0.35;
}

/* A check on the path: a small hexagon the line passes through. */
.dg__check {
  fill: var(--accent);
  stroke: var(--fg);
  stroke-width: 1.5;
}

.dg__arrow,
.dg__fill-accent {
  fill: var(--accent-deep);
}

.dg__fill-accent {
  fill: var(--accent);
}

.dg__arrow--muted,
.dg__fill-muted {
  fill: var(--muted);
}

.dg__fill-fg {
  fill: var(--fg);
}

/* ---------- 404 and the hidden prompt page ---------- */

.notfound {
  padding-block: var(--s7) var(--s8);
}

.notfound h1 {
  margin-block: var(--s3) var(--s4);
}

.notfound .actions,
.notfound .wrap > p:last-child {
  margin-top: var(--s5);
}

.bw-prompt__form {
  max-width: 480px;
  margin-top: var(--s5);
  font-family: var(--mono);
  font-size: var(--t-small);
}

.bw-prompt__row {
  display: flex;
  gap: var(--s2);
  margin-top: var(--s2);
}

.bw-prompt__row input {
  flex: 1;
  min-width: 0;
  min-height: 48px;
  padding-inline: var(--s3);
  border: 1px solid var(--fg);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--fg);
  font: inherit;
}

.bw-prompt__status {
  min-height: 1.5em;
  margin-top: var(--s2);
  color: var(--muted);
}

/* ---------- Footer ---------- */

.site-footer {
  padding-block: var(--s5);
  border-top: 1px solid var(--fg);
  background: var(--grain-strong) var(--bg);
  color: var(--muted);
  font-family: var(--mono);
  font-size: var(--t-label);
  letter-spacing: 0.06em;
}

/* Title block, as on an engineering drawing. Outer top/left rule plus right/bottom per cell,
   so rules line up at any column count. */
.titleblock {
  display: grid;
  grid-template-columns: 2fr auto 2fr 5fr; /* contact column fits the email */
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.titleblock__cell {
  display: grid;
  align-content: start;
  gap: var(--s1);
  padding: var(--s2) var(--s3);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.titleblock dt {
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.titleblock dd {
  color: var(--fg);
  font-size: var(--t-small);
  letter-spacing: 0.02em;
}

.titleblock a {
  text-decoration-thickness: 1px;
}

.site-footer__copy {
  margin-top: var(--s3);
}

/* ---------- Narrower screens ---------- */

@media (max-width: 1040px) {
  .hero {
    display: block;
    min-height: 0;
  }

  .hero__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero__art {
    width: 100%;
    max-width: 760px;
    margin-inline: auto;
  }

  .site-nav {
    display: none;
  }

  .menu {
    display: block;
  }

  .split,
  .split--trail,
  .runs__foot {
    grid-template-columns: minmax(0, 1fr);
  }

  .page--ribbon {
    grid-template-columns: minmax(0, 720px);
  }

  .ribbon--side {
    display: none;
  }

  .ribbon--inline {
    display: block;
  }

  .titleblock {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 820px) {
  .hero__title {
    white-space: normal;
  }

  /* On narrow screens the margins are a thin, lighter edge so they stay clear of the text. */
  .hero {
    background: var(--grain-strong), linear-gradient(90deg, #d9d0b9 0, var(--bg) 14px, var(--bg) calc(100% - 14px), #d9d0b9 100%);
  }

  :root {
    --gutter: var(--s4);
    --s7: 72px;
    --s8: 96px;
  }

  .arch {
    padding: var(--s4) var(--s3);
  }

  .arch__svg--wide {
    display: none;
  }

  .arch__svg--narrow {
    display: block;
  }

  .case {
    grid-template-columns: minmax(0, 1fr);
  }

  .case {
    gap: var(--s3);
  }
}

@media (max-width: 560px) {
  :root {
    --gutter: 20px;
  }

  .site-header__inner {
    gap: var(--s2);
  }

  /* Short wordmark and short label, so the booking button fits beside the menu. */
  .brand__rest,
  .site-header__cta-long {
    display: none;
  }

  .brand {
    letter-spacing: 0.06em;
  }

  .hero {
    padding-block: var(--s5);
  }

  .contact .actions .btn {
    width: 100%;
  }

  .rows__row,
  .stack__layer {
    grid-template-columns: minmax(0, 1fr);
  }

  .step {
    grid-template-columns: 3ch minmax(0, 1fr);
  }

  .step__tag {
    grid-column: 2;
  }

  .contact__mail {
    font-size: var(--t-small);
  }

  .titleblock {
    grid-template-columns: 1fr;
  }

  .revoke-card__row {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .revoke-card__acct,
  .revoke-tag {
    grid-column: 2;
    justify-self: start;
  }

  .diagram {
    padding: var(--s3) var(--s2);
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}

@media print {
  .site-header,
  .menu,
  .skip {
    display: none;
  }

  body {
    background: #fff;
  }
}
