@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/fonts/bricolage-grotesque.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: "Martian Mono";
  src: url("/fonts/martian-mono.woff2") format("woff2");
  font-weight: 100 800;
  font-display: swap;
}

:root {
  --cobalt: #1e23d8;
  --cobalt-soft: #c3c6ff;
  --night: #0d1147;
  --marker: #ffe14d;
  --paper: #f4f5f9;
  --ink: #0d1147;
  --muted: #4d527e;
  --rule: #cfd2e6;
  --code-bg: #e7e9f6;
  --hero-bg: var(--cobalt);
  --hero-fg: #fff;
  --hero-soft: var(--cobalt-soft);
  --caret: var(--marker);
  --tone: var(--cobalt);
  --sans: "Bricolage Grotesque", system-ui, sans-serif;
  --mono: "Martian Mono", ui-monospace, Menlo, Consolas, monospace;
}
/* Dark follows the device setting, unless the footer button has picked a theme. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0d1147;
    --ink: #eef0ff;
    --muted: #aeb2dc;
    --rule: #30357a;
    --code-bg: #191e66;
  }
}
:root[data-theme="dark"] {
  --paper: #0d1147;
  --ink: #eef0ff;
  --muted: #aeb2dc;
  --rule: #30357a;
  --code-bg: #191e66;
}

.tone-amber { --tone: #ffb000; }
.tone-coral { --tone: #ff7a5c; }
.tone-sky { --tone: #4cc2f1; }
.tone-mint { --tone: #3fd6a3; }
.tone-violet { --tone: #c49bff; }
.tone-lemon { --tone: #ffe14d; }
.tone-peach { --tone: #ffb38a; }
.tone-rose { --tone: #ff9ec4; }
.tone-lime { --tone: #b4e65a; }
.tone-aqua { --tone: #5ed9d1; }
.tone-periwinkle { --tone: #9fb3ff; }
.tone-sand { --tone: #e6c98f; }
.tone-orchid { --tone: #e8a4f2; }
.tone-cornflower { --tone: #7aa7ff; }
.tone-sage { --tone: #a7cf9d; }
.tone-cherry { --tone: #ff7f8a; }
.tone-steel { --tone: #a9bcd6; }
.tone-jade { --tone: #6fdc7a; }
.tone-tangerine { --tone: #ff9447; }
.tone-emerald { --tone: #12b886; }
.tone-magenta { --tone: #ff6bcb; }
.tone-ocean { --tone: #3a8fd9; }
.tone-ruby { --tone: #e8456e; }
.tone-blaze { --tone: #f0612e; }
.tone-scarlet { --tone: #ef4f4a; }
.tone-teal { --tone: #26b5a5; }
.tone-plum { --tone: #b57edc; }
.tone-copper { --tone: #e0874a; }
.tone-indigo { --tone: #8b8ff0; }
.hero[class*="tone-"] {
  --hero-bg: var(--tone);
  --hero-fg: #0d1147;
  --hero-soft: #2b2f66;
  --caret: #0d1147;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 1.5rem; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.5 var(--sans);
  font-optical-sizing: auto;
}
[hidden] { display: none !important; }
a { color: inherit; text-underline-offset: .2em; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.hero :focus-visible { outline-color: var(--hero-fg); }
.wrap { max-width: 76rem; margin: 0 auto; padding: 0 1rem; }
@media (min-width: 48rem) { .wrap { padding: 0 2.5rem; } }

/* Hero: the question is the page. */
.hero { background: var(--hero-bg); color: var(--hero-fg); }
.topnav { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .25rem 1rem; padding-top: 1.25rem; }
.topnav a { display: inline-block; padding: .35rem 0; text-decoration: none; }
.topnav a:hover { text-decoration: underline; }
.wordmark { font-size: 1.375rem; font-weight: 800; letter-spacing: -.015em; }
.topnav { align-items: baseline; }

/* Top bar menus: Guides and Tools each open a panel. */
.topnav { position: relative; }
.menus { display: flex; gap: 0 1.25rem; }
.menu summary { padding: .35rem 0; font-weight: 600; list-style: none; cursor: pointer; }
.menu summary::-webkit-details-marker { display: none; }
.menu summary::after { content: ""; display: inline-block; width: .4em; height: .4em; margin-left: .45em; vertical-align: .2em; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.menu[open] summary::after { vertical-align: 0; transform: rotate(-135deg); }
.menu summary:hover, .menu[open] summary { text-decoration: underline; text-underline-offset: .2em; }
.menu.is-current summary { font-weight: 800; }
.topnav .nav-link { font-weight: 600; }
.topnav .nav-link:hover { text-underline-offset: .2em; }
.topnav .nav-link[aria-current="page"] { font-weight: 800; }
.menu-panel {
  position: absolute;
  /* Above the section bar that sticks to the top on phones (20) and the back-to-top button (30). */
  z-index: 40;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: .5rem;
  padding: 1.25rem 1.5rem;
  background: var(--night);
  color: #fff;
  border: 2px solid #fff;
}
.menu-panel :focus-visible { outline-color: #fff; }
.menu-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem 2rem; }
.menu-panel ul { list-style: none; margin: 0; padding: 0; }
.menu-heading { margin: 0 0 .25rem; color: var(--cobalt-soft); font: 500 .75rem var(--mono); text-transform: uppercase; letter-spacing: .06em; }
.menu-panel a { display: block; padding: .45rem 0; font-size: 1.125rem; font-weight: 600; }
.menu-panel a:hover { color: var(--marker); }
.menu-panel [aria-current="page"] { color: var(--marker); text-decoration: underline; text-decoration-thickness: 2px; }
@media (min-width: 40rem) {
  .menu-panel { left: auto; min-width: 16rem; }
  .menu-groups { grid-template-columns: repeat(3, max-content); gap: 1.25rem 3rem; }
}
@media (min-width: 64rem) {
  .menu-groups { grid-template-columns: repeat(4, max-content); }
}
@media (min-width: 80rem) {
  .menu-groups { grid-template-columns: repeat(5, max-content); }
}

.ask { padding: clamp(3.5rem, 13vh, 9rem) 0 clamp(2.5rem, 8vh, 5rem); transition: padding .25s ease; }
.ask h1 {
  margin: 0;
  font-size: clamp(3rem, 11.5vw, 9.5rem);
  font-weight: 800;
  line-height: .92;
  letter-spacing: -.028em;
  transition: font-size .25s ease;
}
.ask input {
  display: block;
  width: 100%;
  margin-top: .1em;
  padding: .1em 0 .2em;
  border: 0;
  border-bottom: 4px solid var(--hero-fg);
  border-radius: 0;
  background: transparent;
  color: var(--hero-fg);
  caret-color: var(--caret);
  font: 800 clamp(2rem, 6.6vw, 5.5rem)/1.1 var(--sans);
  letter-spacing: -.022em;
  appearance: none;
  transition: font-size .25s ease;
}
.ask input::placeholder { color: var(--hero-soft); opacity: 1; }
.ask input::-webkit-search-cancel-button { display: none; }
.ask input:focus { outline: 0; border-bottom-width: 8px; padding-bottom: calc(.2em - 4px); }
.try { display: flex; flex-wrap: wrap; align-items: baseline; gap: .15rem 1.25rem; margin-top: 1.25rem; }
.try button {
  padding: .4rem 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: .2em;
  cursor: pointer;
}
.try button:hover { color: var(--marker); }
#status { margin: 1rem 0 0; }
#status:empty { display: none; }
.missing { font-size: 1.25rem; margin-bottom: 0; }

.is-searching .ask { padding: 1.5rem 0; }
.is-searching .ask h1 { font-size: clamp(1.25rem, 3vw, 2rem); letter-spacing: -.02em; }
.is-searching .ask input { font-size: clamp(1.75rem, 4.5vw, 3.5rem); }

.hero-guide .ask { padding: clamp(2.5rem, 8vh, 5rem) 0 2rem; }
.hero-guide .ask h1 { font-size: clamp(2.75rem, 9vw, 7rem); }
.hero-guide .ask input { margin-top: 1.5rem; font-size: clamp(1.25rem, 3vw, 2rem); letter-spacing: -.02em; }
.hero-guide.is-searching .ask h1 { font-size: clamp(1.75rem, 4vw, 3rem); }

/* Home: guides as tiles, grouped like the Guides menu. Each tile has a panel in its own colour. */
.sheet { padding-top: 0; padding-bottom: 3rem; }
.tile-group { margin-top: 3.5rem; }
.tile-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .25rem 1rem; margin-bottom: 1.5rem; padding-bottom: .6rem; border-bottom: 3px solid var(--ink); }
.tile-head h2 { margin: 0; }
.tile-head span { color: var(--muted); font: 500 .8125rem var(--mono); }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem; }
.tile { display: flex; flex-direction: column; border: 2px solid var(--ink); background: var(--paper); text-decoration: none; transition: transform .15s ease, box-shadow .15s ease; }
.tile:hover { transform: translateY(-3px); box-shadow: 6px 6px 0 var(--ink); }
.tile-art { position: relative; display: block; height: 8.5rem; overflow: hidden; border-bottom: 2px solid var(--ink); background: var(--tone); color: #0d1147; }
.tile-art svg { position: absolute; top: -.4rem; right: -.6rem; width: 6.5rem; height: 6.5rem; }
.tile-art code { position: absolute; left: .9rem; bottom: .9rem; padding: .35rem .6rem; background: #0d1147; color: #fff; font: 500 .78rem/1.4 var(--mono); white-space: nowrap; }
.tile-body { display: flex; flex: 1; flex-direction: column; gap: .45rem; padding: 1rem 1.1rem 1.1rem; }
.tile-name { font-size: 1.45rem; font-weight: 800; line-height: 1.1; letter-spacing: -.015em; }
.tile-desc { display: -webkit-box; overflow: hidden; color: var(--muted); font-size: .9rem; line-height: 1.5; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.tile-count { margin-top: auto; padding-top: .4rem; font: 500 .78rem var(--mono); }
@media (max-width: 64rem) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Phones: one tile per row, with the colour panel as a square on the left. */
@media (max-width: 40rem) {
  .tile-group { margin-top: 2.5rem; }
  .tiles { grid-template-columns: minmax(0, 1fr); gap: .75rem; }
  .tile { flex-direction: row; }
  .tile-art { flex: none; width: 6.5rem; height: auto; min-height: 7rem; border-bottom: 0; border-right: 2px solid var(--ink); }
  .tile-art svg { top: 50%; left: 50%; width: 3.5rem; height: 3.5rem; transform: translate(-50%, -50%); }
  .tile-art code { display: none; }
  .tile-body { gap: .3rem; padding: .8rem .9rem; }
  .tile-name { font-size: 1.25rem; }
  .tile-desc { font-size: .85rem; -webkit-line-clamp: 2; }
}

/* Home sidebar: latest updates, latest video, Lab Notes and support. Beside the guides on wide screens,
   under them on smaller ones. Its top lines up with the first group's heading. */
.home-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 3rem; align-items: start; }
.home-side { display: flex; flex-direction: column; gap: 1.5rem; margin-top: 3.5rem; }
@media (min-width: 72rem) {
  .home-layout { grid-template-columns: minmax(0, 1fr) 18.5rem; }
  .home-layout .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .home-side { margin-top: calc(3.5rem + .45rem); }
}
@media (min-width: 40rem) and (max-width: 72rem) {
  .home-side { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
}
.side-card { border: 2px solid var(--ink); background: var(--paper); }
.side-head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin: 0; padding: .7rem 1rem; border-bottom: 2px solid var(--ink); font: 500 .75rem var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.side-tag { padding: .12rem .4rem; background: var(--ink); color: var(--paper); font: 500 .65rem var(--mono); letter-spacing: 0; text-decoration: none; text-transform: none; }
a.side-tag:hover { background: var(--marker); color: #0d1147; }
.side-body { padding: 1rem; }
.side-body p { margin: 0 0 .9rem; color: var(--muted); font-size: .95rem; line-height: 1.5; }
.side-button { display: block; padding: .65rem; background: var(--ink); color: var(--paper); font-weight: 650; text-align: center; text-decoration: none; }
.side-button:hover { background: var(--cobalt); color: #fff; }
.side-coffee { border: 2px solid var(--ink); background: var(--marker); color: #0d1147; }
.side-link { display: block; margin-top: .65rem; font-size: .9rem; font-weight: 600; text-align: center; }
.side-more { display: block; padding: .6rem 1rem; border-top: 2px solid var(--ink); font: 500 .75rem var(--mono); }
.side-lab { background: var(--marker); }
.side-lab .side-head, .side-lab .side-body p { color: #0d1147; }
.side-lab .side-head, .side-lab { border-color: #0d1147; }
.side-lab .side-tag, .side-lab .side-button { background: #0d1147; color: #fff; }
.side-lab .side-button:hover { background: var(--cobalt); }
.updates { list-style: none; margin: 0; padding: 0; }
.updates li + li { border-top: 1px solid var(--rule); }
.updates a { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .15rem .7rem; align-items: center; padding: .6rem 1rem; text-decoration: none; }
.updates a:hover .update-title { text-decoration: underline; }
.swatch { grid-row: span 2; width: .75rem; height: .75rem; border: 1.5px solid var(--ink); background: var(--tone); }
.update-title { font-weight: 650; }
.update-text { color: var(--muted); font: 400 .72rem/1.45 var(--mono); }
.video { display: block; text-decoration: none; }
.video-thumb { position: relative; display: block; border-bottom: 2px solid var(--ink); }
.video-thumb img { display: block; width: 100%; height: auto; }
.video-time { position: absolute; right: .5rem; bottom: .5rem; padding: .15rem .35rem; background: rgba(0, 0, 0, .8); color: #fff; font: 500 .7rem var(--mono); }
.video-title { display: block; padding: .9rem 1rem .3rem; font-weight: 650; line-height: 1.3; }
.video:hover .video-title { text-decoration: underline; }
.video-date { display: block; padding: 0 1rem; color: var(--muted); font: 400 .72rem var(--mono); }
.side-actions { padding-top: .8rem; }
.updates-page .updates { max-width: 44rem; border-top: 3px solid var(--ink); }
.updates-page .updates a { padding: .8rem 0; }
.updates-page .update-text { font-size: .8rem; }

/* Commands */
section { margin-top: 3rem; }
h2 { margin: 0 0 .5rem; font-size: clamp(1.75rem, 3.5vw, 2.5rem); font-weight: 800; line-height: 1.1; letter-spacing: -.015em; }
.commands { list-style: none; margin: 0; padding: 0; border-top: 3px solid var(--ink); }
.cmd { padding: 1.1rem 0 1.25rem; border-bottom: 1px solid var(--rule); }
.cmd-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 0 1.5rem; margin-bottom: .5rem; }
.task { font-size: 1.1875rem; font-weight: 600; line-height: 1.3; }
.cmd small { color: var(--muted); font-size: .875rem; }
.cmd-line { display: flex; align-items: stretch; background: var(--code-bg); }
code {
  flex: 1;
  min-width: 0;
  align-self: center;
  padding: .7rem .9rem;
  font: 500 .875rem/1.6 var(--mono);
  font-variant-ligatures: none;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.cmd button {
  flex: none;
  min-width: 5.25rem;
  min-height: 2.75rem;
  border: 0;
  background: var(--ink);
  color: var(--paper);
  font: 600 .9375rem var(--sans);
  cursor: pointer;
}
.cmd button:hover { background: var(--cobalt); color: #fff; }
.cmd button.is-copied { background: var(--marker); color: #0d1147; }
mark { background: var(--marker); color: #0d1147; }
.variant + .variant { margin-top: .75rem; }
.cmd .variant-label { display: block; margin-bottom: .3rem; color: var(--ink); font-weight: 600; }
.warning { margin: .6rem 0 0; font-weight: 600; }
.guide-note { margin: 1.5rem 0 0; max-width: 62ch; color: var(--muted); }

/* Guide pages: section list beside the commands on wide screens. */
.toc { display: flex; flex-wrap: wrap; gap: 0 1.25rem; padding-top: 1.5rem; }
.toc a { display: flex; gap: .5rem; padding: .4rem 0; text-decoration: none; font-weight: 600; }
.toc a:hover span:first-child { text-decoration: underline; }
.toc span + span { color: var(--muted); font: 500 .75rem/1.9 var(--mono); }
.guide-layout main > section:first-child { margin-top: 1.5rem; }
.toc a.is-current span:first-child { box-shadow: inset 0 -.3em 0 var(--tone); }

/* Phones and tablets: the section list becomes one row that stays at the top and scrolls sideways. */
@media (max-width: 59.99rem) {
  .toc {
    position: sticky;
    top: 0;
    z-index: 20;
    flex-wrap: nowrap;
    gap: .4rem;
    margin: 0 -1rem;
    padding: .6rem 1rem;
    overflow-x: auto;
    scrollbar-width: none;
    background: var(--paper);
    border-bottom: 3px solid var(--ink);
  }
  .toc::-webkit-scrollbar { display: none; }
  .toc a { flex: none; padding: .4rem .7rem; border: 2px solid var(--rule); white-space: nowrap; }
  .toc a:hover span:first-child { text-decoration: none; }
  .toc a:hover { border-color: var(--ink); }
  .toc a.is-current { background: var(--tone); border-color: var(--ink); color: #0d1147; }
  .toc a.is-current span:first-child { box-shadow: none; }
  .toc a.is-current span + span { color: #0d1147; }
  .guide-layout section[id] { scroll-margin-top: 4.5rem; }
}
@media (max-width: 59.99rem) and (min-width: 48rem) { .toc { margin: 0 -2.5rem; padding: .6rem 2.5rem; } }

/* A # after each heading links straight to that section. */
.anchor { margin-left: .2em; padding: 0 .2em; border: 2px solid transparent; color: var(--muted); font: 500 .5em/1.4 var(--mono); text-decoration: none; vertical-align: middle; }
.anchor:hover, .anchor:focus-visible, .anchor.is-copied { color: var(--ink); border-color: var(--ink); }
@media (hover: hover) {
  .anchor { opacity: 0; }
  h2:hover .anchor, .anchor:focus-visible, .anchor.is-copied { opacity: 1; }
}

/* Back to top. */
.to-top {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: .5rem;
  min-height: 2.75rem;
  padding: .75rem 1.1rem;
  border: 0;
  border-bottom: 4px solid var(--tone);
  background: var(--ink);
  color: var(--paper);
  font: 600 1rem/1 var(--sans);
  cursor: pointer;
}
.to-top[hidden] { display: none; }
.to-top:hover { background: var(--cobalt); color: #fff; }
.to-top svg { width: 1.1rem; height: 1.1rem; fill: none; stroke: currentColor; stroke-width: 3; }
@media (max-width: 40rem) {
  .to-top { right: 1rem; bottom: 1rem; padding: .75rem; outline: 3px solid var(--paper); }
  .to-top span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
}
body:has(.consent:not([hidden])) .to-top { display: none; }

@media (min-width: 60rem) {
  .guide-layout { display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: 4rem; align-items: start; }
  .toc { position: sticky; top: 0; display: block; padding-top: 3rem; }
  .toc a { justify-content: space-between; }
  .guide-layout main > section:first-child, .guide-note { margin-top: 3rem; }
  .guide-note + .guide-note { margin-top: 1rem; }
}

/* Subnet calculator, cheat sheet and summariser */
.ask textarea {
  display: block;
  width: 100%;
  margin-top: 1.5rem;
  padding: .75rem 1rem;
  border: 4px solid var(--hero-fg);
  border-radius: 0;
  background: transparent;
  color: var(--hero-fg);
  caret-color: var(--caret);
  font: 600 1.0625rem/1.6 var(--mono);
  font-variant-ligatures: none;
  resize: vertical;
}
.ask textarea:focus { outline: 0; border-width: 6px; padding: calc(.75rem - 2px) calc(1rem - 2px); }
.family { margin: 1.5rem 0 .5rem; color: var(--muted); font: 600 .8125rem var(--mono); text-transform: uppercase; letter-spacing: .06em; }
.pairs { list-style: none; margin: 0; padding: 0; border-top: 3px solid var(--ink); }
.pairs li { padding: .7rem 0; border-bottom: 1px solid var(--rule); }
.pairs .val { font-weight: 700; }
.practice h2 { max-width: 24ch; }
.practice #score h2 { max-width: none; }
.answer label { display: block; margin: 1.5rem 0 .5rem; font-weight: 600; }
.practice .actions { margin: 0 0 1rem; }
.practice input[type="text"] {
  flex: 1 1 14rem;
  max-width: 24rem;
  min-height: 2.75rem;
  padding: 0 .75rem;
  border: 2px solid var(--ink);
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  font: 600 1.0625rem var(--mono);
}
.practice button:disabled, .practice input:disabled { opacity: .45; cursor: default; }
.actions button.quiet { background: none; color: var(--ink); text-decoration: underline; text-underline-offset: .2em; padding: 0 .5rem; }
#score .actions button.quiet { padding-left: 0; }
.actions button.quiet:hover { background: none; color: var(--ink); text-decoration-thickness: 3px; }
.tick { display: inline-flex; align-items: center; gap: .5rem; min-height: 2.75rem; }
.tick input { width: 1.25rem; height: 1.25rem; margin: 0; accent-color: var(--ink); }
.verdict { margin: 1.5rem 0 .75rem; font-size: 1.375rem; font-weight: 800; }
.verdict.is-right { display: inline-block; padding: .1em .4em; background: var(--marker); color: #0d1147; }
.verdict .val { font-size: 1.25rem; font-weight: 700; }
.working { margin: 0 0 1rem; padding-left: 1.5rem; max-width: 62ch; }
.working li { margin: .4rem 0; }
.lead { margin: 1.5rem 0 0; max-width: 46ch; font-size: clamp(1.125rem, 2vw, 1.375rem); }
.sheet-table th[scope="row"] { padding-top: 0; padding-bottom: 0; }
.sheet-table td { padding-top: .45rem; padding-bottom: .45rem; }
.sheet-table tbody tr:hover { background: var(--code-bg); }
a.jump { display: inline-block; }
.hero-tool .ask input { font-size: clamp(1.75rem, 5.5vw, 4rem); letter-spacing: -.022em; }
.hint { margin: 1rem 0 0; }
.hero-tool .try { margin-top: .5rem; }
.hero[class*="tone-"] .try button:hover { color: inherit; text-decoration-thickness: 3px; }
.val { font: 500 .875rem/1.6 var(--mono); font-variant-ligatures: none; overflow-wrap: anywhere; }
.note { margin: .75rem 0; max-width: 62ch; color: var(--muted); }
.note.warning { color: var(--ink); }
.control { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin: 1rem 0; font-weight: 600; }
.control output { min-width: 3.5ch; font: 600 1.0625rem var(--mono); }
.control input[type="range"] { flex: 1 1 14rem; min-height: 2.75rem; margin: 0; accent-color: var(--ink); }
#tool select, #generator select, #cron-tool select, #cron-tool input[type="time"], #cron-tool input[type="number"], .practice select, .needs input {
  min-height: 2.75rem;
  padding: 0 .75rem;
  border: 2px solid var(--ink);
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  font: 500 1rem var(--sans);
}
#tool select, #generator select, #cron-tool select { max-width: 100%; }
.facts { margin: 0; border-top: 3px solid var(--ink); }
.fact { display: grid; grid-template-columns: minmax(0, 1fr); gap: .15rem 1.5rem; padding: .7rem 0; border-bottom: 1px solid var(--rule); }
.fact dt { font-weight: 600; }
.fact dd { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin: 0; }
@media (min-width: 40rem) { .fact { grid-template-columns: 10rem minmax(0, 1fr); align-items: center; } }
.copy, .actions button, .remove {
  flex: none;
  min-height: 2.75rem;
  padding: 0 1rem;
  border: 0;
  background: var(--ink);
  color: var(--paper);
  font: 600 .9375rem var(--sans);
  cursor: pointer;
}
.copy { min-width: 5.25rem; }
.copy:hover, .actions button:hover, .remove:hover { background: var(--cobalt); color: #fff; }
.copy.is-copied { background: var(--marker); color: #0d1147; }
.jump {
  padding: .5rem 0;
  border: 0;
  background: none;
  color: inherit;
  font: 600 .875rem/1.6 var(--mono);
  text-decoration: underline;
  text-underline-offset: .2em;
  cursor: pointer;
}
.jump:hover { text-decoration-thickness: 3px; }
.bits { display: flex; flex-wrap: wrap; gap: 0 .6ch; }
.bits b { font-weight: 800; }
.bits i { color: var(--muted); font-style: normal; font-weight: 300; }
.bits u { font-weight: 800; text-decoration-thickness: 2px; text-underline-offset: .25em; }
.octet + .octet::before { content: "."; margin-right: .6ch; color: var(--muted); }
.hex { gap: 0 .3ch; }
.hex .octet + .octet::before { content: ":"; margin-right: .3ch; }
@media (max-width: 40rem) {
  .bits { gap: 0 .3ch; font-size: .75rem; }
  .octet + .octet::before { margin-right: .3ch; }
  .hex { gap: 0 .1ch; }
  .hex .octet + .octet::before { margin-right: .1ch; }
  .needs li:has(.need-size) { flex-wrap: wrap; margin-bottom: 1rem; }
  .needs li:has(.need-size) .need-name { flex: 1 1 100%; }
  .needs .need-size { flex: 1; width: auto; max-width: none; }
}
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; border-top: 3px solid var(--ink); }
th, td { padding: .6rem 1rem .6rem 0; border-bottom: 1px solid var(--rule); text-align: left; white-space: nowrap; }
th { font-size: .875rem; font-weight: 600; color: var(--muted); }
th:last-child, td:last-child { padding-right: 0; }
.needs { list-style: none; margin: 1rem 0 0; padding: 0; }
.needs li { display: flex; gap: .5rem; margin-bottom: .5rem; }
.needs .need-name { flex: 1; min-width: 0; }
.needs .need-hosts { width: 7rem; font-family: var(--mono); }
.needs .need-size { flex: none; width: 11.5rem; max-width: 45%; }
.actions { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0 1.5rem; }
.space { display: flex; height: 2.5rem; margin: 1rem 0; background: var(--code-bg); }
.space span { min-width: 2px; background: var(--tone); }
.space span + span { border-left: 2px solid var(--paper); }
.space .free, .swatch.free { background: var(--code-bg); }
.legend { display: inline-flex; align-items: center; gap: .6rem; font-weight: 600; }
.swatch { flex: none; width: .8rem; height: .8rem; background: var(--tone); }

.site-footer { border-top: 1px solid var(--rule); color: var(--muted); }
.site-footer .wrap { padding-top: 1.5rem; padding-bottom: 2.5rem; }
.site-footer p { margin: 0; }
.theme-switch {
  margin-top: 1rem;
  padding: .5rem 0;
  border: 0;
  background: none;
  color: var(--ink);
  font: 600 .9375rem var(--sans);
  text-decoration: underline;
  text-underline-offset: .2em;
  cursor: pointer;
}
.theme-switch:hover { text-decoration-thickness: 3px; }
.site-footer .footer-links { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; margin-top: .5rem; }
/* Support link: ink text with the marker colour underneath, so it stands out without shouting. */
.site-footer .footer-support { color: var(--ink); font-weight: 600; text-decoration-color: var(--marker); text-decoration-thickness: 3px; }
.site-footer .footer-support:hover { text-decoration-color: var(--ink); }

/* About: the photo sits above the text on a phone, and beside it on a wider screen. */
.about-photo { display: block; width: min(18rem, 100%); margin: 2.5rem 0 0; }
.about-photo img { display: block; width: 100%; height: auto; border: 2px solid var(--ink); box-shadow: 6px 6px 0 var(--marker); }
@media (min-width: 52rem) {
  .about { display: grid; grid-template-columns: minmax(0, 62ch) 18rem; gap: 0 4rem; align-items: start; }
  .about .prose { grid-row: 1; grid-column: 1; }
  .about-photo { grid-row: 1; grid-column: 2; position: sticky; top: 2rem; margin: 3rem 0 0; }
}

/* Privacy policy and disclaimer */
.prose { max-width: 62ch; }
.prose h3 { margin: 1.5rem 0 .25rem; font-size: 1.1875rem; font-weight: 700; }
.prose p { margin: .75rem 0; }
.prose ul { margin: .75rem 0; padding-left: 1.25rem; }
.prose li + li { margin-top: .5rem; }

.credits { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .25rem 2rem; margin-top: .5rem; color: var(--ink); font-weight: 600; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* Password and key generator. */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
fieldset.control { margin-inline: 0; padding: 0; border: 0; }
.private { padding: 1rem 1.25rem; border-left: 6px solid var(--tone); background: var(--code-bg, transparent); color: var(--ink); font-weight: 600; }
.secret-box { margin: 1rem 0 1.5rem; }
.secret { display: block; min-height: 3.5rem; padding: 1rem 1.25rem; border: 3px solid var(--ink); font: 500 clamp(1rem, 2.2vw, 1.375rem)/1.5 var(--mono); overflow-wrap: anywhere; user-select: all; }
.secret-box .actions { margin: .75rem 0 0; }
.secret-box .note { margin-top: .5rem; }
#key-commands dd code { overflow-wrap: anywhere; }

/* Port reference. */
.ports { margin: 0; padding: 0; list-style: none; border-top: 3px solid var(--ink); }
.port { display: grid; grid-template-columns: 6.5rem 6.5rem minmax(0, 1fr); gap: .25rem 1rem; align-items: baseline; padding: .9rem 0; border-bottom: 1px solid var(--rule); scroll-margin-top: 4.5rem; }
.port[hidden] { display: none; }
.port:target { background: var(--code-bg); box-shadow: -1rem 0 0 var(--code-bg), 1rem 0 0 var(--code-bg); }
.port-num { font: 600 1.25rem/1.2 var(--mono); }
.port-proto { color: var(--muted); font: 500 .8125rem var(--mono); }
.port-what strong { font-size: 1.0625rem; }
.port-desc, .port-see { display: block; margin-top: .2rem; max-width: 62ch; color: var(--muted); }
.port-see { font-size: .875rem; }
.flag { display: inline-block; margin-left: .4rem; padding: .05rem .4rem; border: 2px solid var(--ink); background: var(--tone); color: #0d1147; font: 600 .6875rem/1.4 var(--sans); text-transform: uppercase; letter-spacing: .04em; vertical-align: .15em; }
.toc a[hidden] { display: none; }
@media (max-width: 40rem) {
  .port { grid-template-columns: auto minmax(0, 1fr); gap: .1rem .75rem; }
  .port-what { grid-column: 1 / -1; }
}

/* Glossary. */
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.25rem; }
.filters button { min-height: 2.75rem; padding: 0 1rem; border: 2px solid currentColor; border-radius: 0; background: none; color: inherit; font: 600 1rem var(--sans); cursor: pointer; }
.filters button:hover { text-decoration: underline; text-underline-offset: .2em; }
.filters button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
#term-status { margin: 1rem 0 0; }
#term-status:empty { display: none; }
.terms { margin: 0; padding: 0; list-style: none; border-top: 3px solid var(--ink); }
.term { padding: 1rem 0 1.1rem; border-bottom: 1px solid var(--rule); scroll-margin-top: 4.5rem; }
.term:target { background: var(--code-bg); box-shadow: -1rem 0 0 var(--code-bg), 1rem 0 0 var(--code-bg); }
.term-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .1rem .75rem; }
.term dfn { font: 600 1.25rem/1.3 var(--mono); font-style: normal; }
.term-name { font-size: 1.0625rem; font-weight: 700; }
.term-cat { margin-left: auto; color: var(--muted); font: 500 .75rem var(--mono); text-transform: uppercase; letter-spacing: .06em; }
.term-def { margin: .35rem 0 0; max-width: 62ch; }
.term-more { display: grid; gap: .2rem; margin: .6rem 0 0; font-size: .875rem; }
.term-more div { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: 0 1rem; }
.term-more dt { color: var(--muted); font-weight: 600; }
.term-more dd { margin: 0; max-width: 62ch; }
@media (max-width: 40rem) {
  .term-cat { margin-left: 0; flex-basis: 100%; }
  .term-more div { grid-template-columns: minmax(0, 1fr); }
}
@media (min-width: 60rem) {
  /* Letters sit in a small grid, so the whole alphabet fits beside the list. */
  .toc-letters { display: grid; grid-template-columns: repeat(4, 1fr); gap: .25rem; }
  .toc-letters a { justify-content: center; padding: .35rem 0; border: 2px solid var(--rule); }
  .toc-letters a:hover { border-color: var(--ink); }
  .toc-letters a.is-current { border-color: var(--ink); background: var(--tone); color: #0d1147; }
  .toc-letters a.is-current span:first-child { box-shadow: none; }
}

/* Docker run to Compose converter. */
.hero-tool .ask textarea#run { font-size: .9375rem; }
.yaml { margin: 1rem 0 0; padding: 1.25rem 1.5rem; overflow-x: auto; border: 3px solid var(--ink); background: var(--code-bg); font: 500 .9375rem/1.6 var(--mono); font-variant-ligatures: none; tab-size: 2; }
.compose-list { margin: 0; padding: 0; list-style: none; border-top: 3px solid var(--ink); }
.compose-list li { padding: .7rem 0; border-bottom: 1px solid var(--rule); max-width: 70ch; }
.compose-list code { font-weight: 600; }
#output[hidden], #output section[hidden] { display: none; }
.yaml code { display: block; padding: 0; border: 0; background: none; color: inherit; font: inherit; white-space: pre; }
@media (max-width: 40rem) { .yaml { padding: 1rem; font-size: .8125rem; } }

/* About: support link, styled as a button. */
.prose .support-link { display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 1.25rem; border-bottom: 4px solid var(--marker); background: var(--ink); color: var(--paper); font-weight: 700; text-decoration: none; }
.prose .support-link:hover { background: var(--cobalt); color: #fff; }

/* Summarise networks: one heading per range. */
.range-head { margin: 1.75rem 0 .5rem; font-size: 1rem; font-weight: 600; }
.range-head .val { margin-right: .5rem; font-size: 1.0625rem; }
.perm-grid td, .perm-grid th { text-align: center; }
.perm-grid th[scope="row"] { text-align: left; }
.perm-grid input[type="checkbox"] { width: 1.5rem; height: 1.5rem; accent-color: var(--ink); cursor: pointer; }
.perm-grid label { display: inline-flex; align-items: center; gap: .4rem; font-weight: 500; white-space: nowrap; cursor: pointer; }
.perm-grid output { font: 600 1.25rem var(--mono); }
#calculator .control input[type="text"] { flex: 1 1 14rem; min-height: 2.75rem; padding: 0 .75rem; border: 2px solid var(--ink); border-radius: 0; background: var(--paper); color: var(--ink); font: 500 1rem var(--mono); }
#calculator .control input[type="checkbox"] { width: 1.25rem; height: 1.25rem; margin: 0; accent-color: var(--ink); }
.chmod-common td:last-child { white-space: normal; min-width: 16rem; }
.meaning { margin: 1rem 0; padding-left: 1.25rem; max-width: 62ch; }
.meaning li { margin: .3rem 0; }
#commands .cmd-head h3 { margin: 0; }
.perm-grid th, .perm-grid td { padding-left: .25rem; padding-right: .25rem; }
@media (max-width: 40rem) {
  .perm-grid th, .perm-grid td { white-space: normal; }
  .perm-grid label { flex-direction: column; gap: .2rem; font-size: .8125rem; white-space: normal; }
}

/* Cron expression builder. */
.explained { margin: 1rem 0 1.5rem; max-width: 40ch; font-size: clamp(1.375rem, 3vw, 1.875rem); font-weight: 700; line-height: 1.3; letter-spacing: -.01em; }
.cron-fields code { font-weight: 600; white-space: nowrap; }
.cron-fields td:last-child { white-space: normal; }
.runs { margin: 1rem 0; padding-left: 1.5rem; }
.runs li { padding: .45rem 0; border-bottom: 1px solid var(--rule); color: var(--muted); }
.runs li strong { margin-right: .5rem; color: var(--ink); }
.builder { display: flex; flex-wrap: wrap; gap: .5rem 2rem; align-items: end; margin: 1rem 0; }
.builder .control { margin: 0; }
.builder [hidden] { display: none; }
.builder input[type="number"] { width: 5rem; }
.builder fieldset.days { display: flex; flex-wrap: wrap; gap: .25rem 1rem; margin: 0; padding: 0; border: 0; }
.builder fieldset.days legend { float: left; margin-right: .5rem; font-weight: 600; }
.cron-line code { white-space: pre-wrap; overflow-wrap: anywhere; }
#cron-tool .control input[type="text"] { flex: 1 1 18rem; min-height: 2.75rem; padding: 0 .75rem; border: 2px solid var(--ink); border-radius: 0; background: var(--paper); color: var(--ink); font: 500 1rem var(--mono); }
.builder input[type="checkbox"] { width: 1.25rem; height: 1.25rem; margin: 0; accent-color: var(--ink); }
.builder .tick { display: inline-flex; align-items: center; gap: .4rem; font-weight: 500; cursor: pointer; }
.cron-common td { white-space: normal; min-width: 12rem; }

/* Choose your guides: a line under Try, and a panel of guides to tick. */
.picker-line { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .75rem; margin: 1.4rem 0 0; padding-top: 1.1rem; border-top: 1px solid color-mix(in srgb, var(--hero-soft) 45%, transparent); }
.picker-line svg { flex: none; width: 1.1rem; height: 1.1rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.picker-dot { color: var(--hero-soft); }
.picker-line button, .picker-actions button, .tile-reveal, .status-link {
  padding: .4rem 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  font-weight: 650;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: .22em;
  cursor: pointer;
}
.picker-line button:hover, .picker-actions button:hover, .status-link:hover { color: var(--marker); }
.picker-panel { margin-top: 1rem; border: 2px solid #fff; background: var(--night); color: #fff; }
.picker-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .4rem 1.5rem; padding: 1.25rem 1.5rem 1rem; border-bottom: 1px solid color-mix(in srgb, var(--cobalt-soft) 35%, transparent); }
.picker-head h2 { margin: 0; font-size: 1.625rem; }
.picker-head h2:focus { outline: 0; }
.picker-head h2:focus-visible { outline: 3px solid #fff; outline-offset: 4px; }
.picker-head p { margin: 0; color: var(--cobalt-soft); font-size: .9375rem; }
.picker-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr)); gap: 1.5rem; padding: 1.25rem 1.5rem 1.5rem; }
.picker-groups fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.picker-groups legend { margin: 0 0 .6rem; padding: 0; color: var(--cobalt-soft); font: 500 .75rem var(--mono); text-transform: uppercase; letter-spacing: .06em; }
.picker-chips { display: flex; flex-direction: column; align-items: flex-start; gap: .5rem; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  min-height: 2.75rem;
  padding: 0 .75rem;
  border: 2px solid color-mix(in srgb, var(--cobalt-soft) 60%, transparent);
  background: transparent;
  color: #fff;
  font: 600 .9375rem var(--sans);
  text-align: left;
  cursor: pointer;
}
.chip:hover { border-color: #fff; }
.chip-swatch { flex: none; width: .7rem; height: .7rem; border: 1.5px solid currentColor; background: var(--tone); }
.chip-tick { display: none; width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.chip[aria-pressed="true"] { border-color: var(--marker); background: var(--marker); color: #0d1147; }
.chip[aria-pressed="true"] .chip-tick { display: block; }
.picker-panel :focus-visible { outline-color: #fff; }
.picker-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .75rem 1.5rem; padding: 1rem 1.5rem; border-top: 1px solid color-mix(in srgb, var(--cobalt-soft) 35%, transparent); }
.picker-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem 1.25rem; font-size: .9375rem; }
#picker-count { font: 500 .8125rem var(--mono); }
.picker-note { color: var(--cobalt-soft); }
.picker-done { min-height: 2.75rem; padding: 0 1.75rem; border: 2px solid var(--marker); background: var(--marker); color: #0d1147; font: 750 1.0625rem var(--sans); cursor: pointer; }
.picker-done:hover { background: #fff; border-color: #fff; }
.tile-hidden { margin: .9rem 0 0; color: var(--muted); font-size: .9rem; }
.tile-reveal { padding: 0; color: var(--ink); }
.status-soft { color: var(--hero-soft); }
.result-filter { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: 1rem; }
.result-filter-label { display: inline-flex; align-items: center; gap: .4rem; margin-right: .25rem; color: var(--hero-soft); font-size: .9375rem; }
.result-filter-label svg { width: 1.1rem; height: 1.1rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.result-filter .chip { min-height: 2.5rem; border-color: color-mix(in srgb, var(--hero-soft) 70%, transparent); color: var(--hero-fg); }
.result-filter .chip:hover { border-color: var(--hero-fg); }
.result-filter .chip[aria-pressed="true"] { border-color: var(--marker); background: var(--marker); color: #0d1147; }
.chip-count { font: 500 .8125rem var(--mono); opacity: .75; }
.hidden-results { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .75rem 1.5rem; margin-top: 2.5rem; padding: 1.1rem 1.25rem; border: 2px dashed var(--ink); }
.hidden-results p { margin: 0; }
.hidden-results button { min-height: 2.75rem; padding: 0 1.25rem; border: 2px solid var(--ink); background: var(--paper); color: var(--ink); font: 650 .9375rem var(--sans); cursor: pointer; }
.hidden-results button:hover { background: var(--ink); color: var(--paper); }
@media (max-width: 40rem) {
  .picker-panel { margin-left: -1rem; margin-right: -1rem; border-width: 2px 0; }
  .picker-head, .picker-groups, .picker-foot { padding-left: 1rem; padding-right: 1rem; }
  .picker-groups { grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
  .picker-chips { flex-direction: row; flex-wrap: wrap; }
  .picker-foot { position: sticky; bottom: 0; background: var(--night); }
}
