/*
Theme Name: kipes
Theme URI: https://kipes.eu/
Author: KIPES UG (haftungsbeschraenkt)
Description: The kipes website theme. Carries the application's own design tokens
  so the site and the product read as one thing. Dark only, by decision.
  English only; the German addresses redirect to their English counterparts.
Version: 3.31
Requires at least: 6.0
License: Proprietary
Text Domain: kipes
*/

/* ---------------------------------------------------------------------------
   TOKENS - the application's dark palette (frontend/src/index.css), so a colour
   never has to be reconciled between product and website.
   The site is DARK ONLY by decision: one palette, no toggle, no system
   preference. Everything below therefore states its colour once. Should a light
   theme ever be wanted again, it belongs here as a second block plus a control -
   not as literal colours sprinkled through the rules.
   --------------------------------------------------------------------------- */
:root {
  --bg: #14171c;
  --surface: #1d2127;
  --surface-1: #22262e;
  --surface-2: #262b33;
  --border: #353b45;
  --text: #e7eaee;
  --text-muted: #9aa4b1;
  --accent: #4f8cff;
  --accent-contrast: #0b0d10;
  --danger: #f87171;
  --success: #34d399;
  --warning: #fbbf24;
  /* Paper and ink for printing - the one place the site is not dark. */
  --paper: #fff;
  --ink: #000;
  /* Tells the browser to render form controls, scrollbars and the like dark -
     without it the native widgets stay light and fight the page. */
  color-scheme: dark;

  /* Layout constants. The measure is capped in ch, not px, so the line length
     follows the font - which is what readability actually depends on. */
  --measure: 72ch;
  /* Wide enough that four licence cards fit side by side WITH their tag on
     the heading line - "Education and research" plus "Free" is the longest
     of the four and is what sets this number. */
  --page: 1320px;
  --radius: 10px;
  --step: clamp(1.25rem, 3vw, 2.5rem);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  /* The site quotes measurements; tabular figures keep columns of numbers
     aligned and stop digits shifting between paragraphs. */
  font-variant-numeric: tabular-nums;
}

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }

h1, h2, h3 { line-height: 1.2; letter-spacing: -0.011em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2rem, 5vw, 3.05rem); font-weight: 650; }
h2 { font-size: clamp(1.35rem, 2.6vw, 1.9rem); font-weight: 600; }
h3 { font-size: 1.05rem; font-weight: 620; }
p { margin: 0 0 1em; }

code, .mono {
  font-family: ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.92em;
}

/* Keyboard users must be able to see where they are. */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.wrap { max-width: var(--page); margin: 0 auto; padding: 0 var(--step); }
.prose { max-width: var(--measure); }

/* Skip link: present for screen readers, visible once focused. */
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--surface); color: var(--text);
  padding: 0.6rem 1rem; border: 1px solid var(--border); border-radius: var(--radius);
}
.skip:focus { left: var(--step); top: var(--step); }

/* ---------------------------------------------------------------------------
   HEADER - wordmark, navigation, language switch.
   --------------------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap {
  display: flex; align-items: center; gap: 0.9rem;
  min-height: 60px; flex-wrap: wrap;
}
/* The wordmark is typeset as the application's header sets it (kipes
   frontend/src/components/wordmark.ts, WORDMARK_STYLE): bold, 1.05rem, 0.14em
   tracking - the letters stand apart, so the site and the product show the
   same word the same way. */
.brand {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-weight: 700; font-size: 1.05rem; letter-spacing: 0.14em;
  color: var(--text); text-decoration: none;
}
/* "PES" in the accent, as the site's icon draws the word. The gap above is for
   the suffix beside the word; the two halves of the word itself touch. */
.brand .brand-pes { color: var(--accent); margin-left: -0.55rem; }
.site-nav { display: flex; gap: 0.15rem; margin-left: auto; align-items: center; flex-wrap: wrap; }
.site-nav a {
  color: var(--text-muted); text-decoration: none;
  padding: 0.35rem 0.6rem; border-radius: 7px; font-size: 0.94rem;
}
.site-nav a:hover { color: var(--text); background: var(--surface-2); }
.site-nav a[aria-current="page"] { color: var(--text); background: var(--surface-2); }

/* The language switch, as a pill control. */
.ctl {
  display: inline-flex; align-items: center; gap: 0.25rem;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 999px; padding: 2px;
}
.ctl a {
  font: inherit; font-size: 0.82rem; line-height: 1;
  padding: 0.34rem 0.62rem; border-radius: 999px;
  border: 0; background: transparent; color: var(--text-muted);
  text-decoration: none;
}
.ctl a[aria-current="true"] { background: var(--accent); color: var(--accent-contrast); }
.ctl a:hover { color: var(--text); }

/* ---------------------------------------------------------------------------
   BUTTONS
   --------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font: inherit; font-size: 0.95rem; font-weight: 560;
  padding: 0.62rem 1.05rem; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  text-decoration: none;
}
.btn:hover { background: var(--surface-2); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-contrast); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 86%, var(--text)); }
.btn svg { width: 16px; height: 16px; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
/* A control that is available without asking to be pressed. The print
   button sits next to a heading, and a filled button there would compete
   with the one that actually sends the request. */
.btn-quiet { background: transparent; font-size: 0.85rem; padding: 0.3rem 0.7rem; }

/* ---------------------------------------------------------------------------
   HERO - the measurement motif. The faint rule grid behind the heading is the
   instrument's own visual language (a sensor plane with a scale), drawn with
   gradients so it costs no image request and needs no asset.
   --------------------------------------------------------------------------- */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--border); }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(to right, color-mix(in srgb, var(--accent) 13%, transparent) 1px, transparent 1px) 0 0 / 56px 56px,
    linear-gradient(to bottom, color-mix(in srgb, var(--accent) 13%, transparent) 1px, transparent 1px) 0 0 / 56px 56px;
  -webkit-mask-image: radial-gradient(115% 78% at 76% 10%, #000 0%, transparent 70%);
          mask-image: radial-gradient(115% 78% at 76% 10%, #000 0%, transparent 70%);
}
/* THE AIR ABOVE THE HEADLINE IS THE AIR BELOW IT.
   The gap below is the h1's own margin-bottom, 0.5em - so it grows and shrinks
   with the headline. Matching it with a fixed number would be right at one
   window width and wrong at every other, so the padding is half the h1's size
   written term by term: h1 is clamp(2rem, 5vw, 3.05rem), half of it is
   clamp(1rem, 2.5vw, 1.525rem). The two stay equal at every width because they
   are the same quantity.

   The padding below the button keeps its own value: that is the air before the
   rule, not the air around a heading. */
.hero .wrap {
  position: relative;
  padding-top: clamp(1rem, 2.5vw, 1.525rem);
  padding-bottom: clamp(1.5rem, 4.5vw, 2.875rem);
}
.lede { font-size: clamp(1.05rem, 2vw, 1.26rem); color: var(--text-muted); max-width: 62ch; }
/* The six claims. No marker and no indent: they take the place a paragraph had,
   and the repeated "KIPES ist ..." already reads as a list without one. The
   adjective is the only emphasis - it is what differs between the lines. */
.claims { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
/* THE GLYPH SITS IN THE LINE, before the text, and is the size of the text.
   An em, not a rem: a glyph beside a sentence should grow and shrink with the
   sentence, and a fixed size made these read as larger than the words they
   belong to. Inline rather than a grid column, which is also what removes the
   old hazard - as a grid EVERY child was an item, and the sentence once broke
   into one item per word. */
.claims li { padding: 0; }
.claims .claim-icon {
  width: 0.95em; height: 0.95em; color: var(--accent);
  /* Optically centred on the text's own baseline. */
  vertical-align: -0.16em; margin-right: 0.5em;
}
/* The flag, one pixel higher than the rest.

   The rule above centres an icon on the text's baseline, which is right for a
   drawing whose weight is in the middle. The flag is a filled rectangle: its
   mass reaches the bottom edge, so at the same offset it reads as sitting low
   against the letters beside it. */
.claims .claim-icon-flag { vertical-align: calc(-0.16em + 1px); }
.claims strong { color: var(--text); font-weight: 620; }
.hero-actions { display: flex; gap: 0.65rem; flex-wrap: wrap; margin-top: 1.6rem; }

/* ---------------------------------------------------------------------------
   SECTIONS
   --------------------------------------------------------------------------- */
/* The air between the rule and the section's heading is the air between that
   heading and its content: 1.6rem, which is .band-head's margin-bottom. A
   constant is right here and a clamp was right in the hero, and the difference
   is not a matter of taste - .band-head's 1.6rem always WINS the margin
   collapse against the h2's own 0.5em (the h2 reaches 1.9rem at most, so its
   half-em never exceeds 0.95rem), which makes the gap below a fixed quantity.

   The bottom is left as it was: that is the air after the section's CONTENT,
   which is a different measurement from the air around its heading. */
section.band { padding-top: 1.6rem; padding-bottom: clamp(1.25rem, 3vw, 2.125rem); }
section.band + section.band { border-top: 1px solid var(--border); }
.band-head { max-width: var(--measure); margin-bottom: 1.6rem; }
.band-head p { color: var(--text-muted); margin: 0; }

/* The pipeline: ordered steps, readable as a sequence at any width. */
.steps { display: grid; gap: 0.5rem; counter-reset: step; padding: 0; margin: 0; list-style: none; }
.steps li {
  counter-increment: step;
  display: grid; grid-template-columns: 2.1rem 1fr; gap: 0.85rem; align-items: baseline;
  padding: 0.7rem 0.9rem; background: var(--surface-1);
  border: 1px solid var(--border); border-radius: var(--radius);
}
.steps li::before {
  content: counter(step, decimal-leading-zero);
  color: var(--accent); font-weight: 640; font-size: 0.86rem;
}
/* A step may be marked by a glyph instead of by its number - the application's
   own symbol for what the step does, so the site and the product name the thing
   the same way. The counter is then suppressed for that item ONLY; it keeps
   incrementing, so the steps that still show a number keep their true position
   in the sequence rather than being renumbered by the presence of an icon. */
.steps li.has-icon::before { content: none; }
.step-icon {
  width: 1.35rem; height: 1.35rem; color: var(--accent);
  /* The other column is aligned on the first baseline; a box has none, so it is
     nudged to sit on the line of the heading beside it. */
  align-self: center; margin-top: 0.15rem;
}
.steps strong { font-weight: 620; }
.steps span { color: var(--text-muted); }

/* ---------------------------------------------------------------------------
   LICENCE CARDS - the free tiers and the paid ones read differently on purpose:
   the paid ones carry the accent border because they are the ones with an action.
   --------------------------------------------------------------------------- */
/* THREE, THEN TWO, THEN ONE - one column per licence tier at full width.
   The count is written out rather than left to auto-fit, so a row is never
   filled with something else: while there were four tiers this said four, and
   when the military tier was withdrawn the fourth column stayed behind and the
   cards ended three quarters of the way across the page. A number that has to
   be changed with the content is worth the explicitness; a grid that guesses is
   not, because the guess is wrong quietly. */
.licences {
  display: grid;
  gap: 1rem;
  align-content: start;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 1020px) {
  .licences { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  /* Below this two columns stop being a comparison and start being a squeeze. */
  .licences { grid-template-columns: minmax(0, 1fr); }
}
.lic {
  display: flex; flex-direction: column; gap: 0.6rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.25rem;
}
/* The outline says the same thing as the badge, in the same colour: green for
   the free tiers, accent for the paid ones. Colour is never the only signal -
   the badge carries the word - but a card should not have to be read to be
   told apart from the one beside it. */
.lic.free { border-color: color-mix(in srgb, var(--success) 55%, var(--border)); }
.lic.paid { border-color: color-mix(in srgb, var(--accent) 55%, var(--border)); }
/* The heading carries the "Free" tag beside it, so it is a row rather than a
   line of text: baseline-aligned, and allowed to wrap on a narrow card instead
   of pushing the tag off the edge. */
.lic h3 { margin: 0; display: flex; align-items: baseline; gap: 0.55rem; flex-wrap: wrap; }
.lic p { margin: 0; color: var(--text-muted); font-size: 0.95rem; }
.lic ul { margin: 0; padding-left: 1.1rem; color: var(--text-muted); font-size: 0.94rem; }
.lic ul li { margin-bottom: 0.25rem; }
.lic .foot { margin-top: auto; padding-top: 0.6rem; }
/* Status is never colour alone: each card carries a worded tag as well. */
.tag {
  align-self: flex-start; font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase;
  font-weight: 640; padding: 0.2rem 0.5rem; border-radius: 999px;
  border: 1px solid var(--border); color: var(--text-muted); background: var(--surface-2);
}
.tag.free { color: var(--success); border-color: color-mix(in srgb, var(--success) 45%, var(--border)); }
.tag.paid { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }

/* ---------------------------------------------------------------------------
   FORM - the licence request. Labels sit above their fields so the form reads
   as a single column on every width.
   --------------------------------------------------------------------------- */
.form { max-width: 640px; display: grid; gap: 0.9rem; }
.form .row { display: grid; gap: 0.9rem; grid-template-columns: 1fr 1fr; }
@media (max-width: 620px) { .form .row { grid-template-columns: 1fr; } }
/* The enquiry form's rows share one pair of columns, the second as wide as its
   longest label on one line: the fields of a row are items of the form's own
   grid. Narrower than that, the first keeps room for a field and the label
   wraps. */
#kipes-order { grid-template-columns: minmax(12rem, 1fr) auto; }
#kipes-order > * { grid-column: 1 / -1; }
#kipes-order > .row { display: contents; }
#kipes-order > .row-street, #kipes-order > .row-town { display: grid; }
#kipes-order > .row-street { grid-template-columns: minmax(0, 1fr) 8rem; }
#kipes-order > .row-town { grid-template-columns: 8rem minmax(0, 1fr); }
@media (max-width: 620px) { #kipes-order { grid-template-columns: minmax(0, 1fr); } }
/* align-content: a field beside a taller one (a hint under it) keeps its box at
   the top rather than stretching down, so the boxes of a row stay level. */
.field { display: grid; gap: 0.3rem; align-content: start; }
.field label { font-size: 0.88rem; color: var(--text-muted); }
.field .req { color: var(--danger); }
.field input, .field select, .field textarea {
  font: inherit; font-size: 0.95rem;
  padding: 0.55rem 0.65rem; border-radius: 8px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  width: 100%;
}
.field textarea { min-height: 110px; resize: vertical; }
/* A select draws shorter than an input of the same font and padding - it does
   not take the inherited line height - and beside one on a line the two must
   end level. */
.field select { min-height: 2.75rem; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); }
.check { display: grid; grid-template-columns: auto 1fr; gap: 0.55rem; align-items: start; font-size: 0.92rem; color: var(--text-muted); }
.check input { margin-top: 0.25rem; }
.form-msg { padding: 0.85rem 1rem; border-radius: var(--radius); border: 1px solid var(--border); }
.form-msg.ok { border-color: color-mix(in srgb, var(--success) 50%, var(--border)); background: color-mix(in srgb, var(--success) 9%, var(--surface)); }
.form-msg.err { border-color: color-mix(in srgb, var(--danger) 50%, var(--border)); background: color-mix(in srgb, var(--danger) 9%, var(--surface)); }

/* ---------------------------------------------------------------------------
   LICENCE GATE - the agreement, and the download it guards.
   --------------------------------------------------------------------------- */
.licence-lang { color: var(--text-muted); font-size: 0.92rem; }
/* A bounded, scrollable region: the agreement is long, and pushing the accept
   box three screens down would make "read it" a formality nobody performs. */
.licence-box {
  max-height: 26rem; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.1rem 1.3rem;
  font-size: 0.92rem; line-height: 1.6;
}
.licence-box h2 { font-size: 1.1rem; margin-top: 1.4rem; }
.licence-box h3 { font-size: 0.98rem; margin-top: 1.2rem; }
.licence-box h2:first-child { margin-top: 0; }
.licence-box p { margin: 0 0 0.7em; }
.licence-box ul { margin: 0 0 0.9em; padding-left: 1.2rem; color: var(--text-muted); }
.licence-box li { margin-bottom: 0.3em; }
/* The parties block at the top of the agreement - the Licensor's name, seat and
   register (tools/md2html.py). Set off by a rule rather than the browser's deep
   default indent, which would cost a narrow licence column a third of its width. */
.licence-box blockquote { margin: 0 0 0.7em; padding-left: 0.9rem; border-left: 2px solid var(--border); }
/* The disabled state must LOOK disabled and refuse the pointer; the click guard
   in the template is what actually enforces it. */
.btn.is-disabled { opacity: 0.5; cursor: not-allowed; }
.form-msg[hidden] { display: none; }

/* ---------------------------------------------------------------------------
   THE LICENCE REQUEST: the form and the agreement, side by side.

   The form gets the wider column because it is what somebody is here to fill
   in; the agreement gets enough width to be read rather than skimmed. Below
   980px they stack, FORM FIRST - the agreement is what a visitor scrolls to,
   not what stands between them and the fields.
   --------------------------------------------------------------------------- */
.enquiry-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2rem; }
@media (max-width: 980px) { .enquiry-split { grid-template-columns: 1fr; } }
/* The right padding is the lane the print control stands in, so no line of the
   text runs under it. The height limit holds only until the script in
   parts/licence-text.php has measured the form. */
.enquiry-licence .licence-box { max-height: 34rem; padding-right: 3.2rem; }
/* The heading drawn as the form's field labels are, and as far from its box as
   a label is from its field: it then stands on the line of "Licence type" and
   the box starts where the field below that label does. */
.licence-head { margin-bottom: 0.3rem; }
/* Two classes, because .page-body h2 (content pages, further down) would
   otherwise give it 2rem above and push it off the label's line. */
.enquiry-licence .licence-head h2 {
  margin: 0; font: inherit; font-size: 0.88rem; letter-spacing: normal;
  color: var(--text-muted);
}
/* Pinned to the top of the scrolling box, out of the flow of the text: a
   sticky strip of no height, with the control hung into the right padding.
   Its offset counts from inside the box's padding, so 0 keeps it level with
   the first line of the text. */
.licence-tools { position: sticky; top: 0; height: 0; }
/* The strip is the box's first element now, so the agreement's title is no
   longer :first-child and would take a top margin - .page-body h2's 2rem, which
   is why two classes. */
.licence-box .licence-tools + h2 { margin-top: 0; }
.licence-print {
  position: absolute; top: 0; right: -2.6rem;
  padding: 0.35rem; color: var(--text-muted);
}
.licence-print:hover { color: var(--text); }
.licence-lang { color: var(--text-muted); font-size: 0.85rem; margin-top: 0.6rem; }

/* ---------------------------------------------------------------------------
   THE DOWNLOAD, in two steps (parts/download.php): the agreement with its three
   boxes, then one box holding the button, the checksums and the check. Both at
   a reading width rather than the page's: an agreement is read, and a column
   of checksums as wide as the screen is not a column any more.
   --------------------------------------------------------------------------- */
.release-msg { margin: 0 0 1.6rem; max-width: var(--measure); }
/* The agreement and the download box span the content's full width, from the
   left edge to the end of the navigation's last link (operator, 2026-09-26);
   the three boxes under the agreement keep a reading width. */
.download-accept { max-width: 52rem; }
/* On the download page the language notice stands between the heading and the
   box (parts/licence-text.php, lang_first): its air goes below it there. */
.download-licence .licence-lang { margin: 0 0 0.9rem; }
/* The agreement's heading drawn as the request page draws it (a label over its
   box), and the boxes under the agreement at the form's spacing. */
.download-accept { margin-top: 1.4rem; }
.release-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.1rem 1.3rem;
}
.release-card > :last-child { margin-bottom: 0; }
/* The button and the release date on one line; the date wraps under the
   button where the line is too short for both. */
.release-top { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.2rem; margin: 0 0 1.2rem; }
.release-meta { color: var(--text-muted); margin: 0; font-size: 0.92rem; }
/* The checksums: one line each - the name, the value, the copy icon - in three
   columns shared by all lines, so the values start at one edge. Each line's
   div takes no box of its own (display: contents); its three children are the
   grid's items. On a phone the name goes on a line of its own above the value
   and its icon. */
.page-body dl.checksums {
  display: grid; grid-template-columns: max-content minmax(0, 1fr) auto;
  gap: 0.6rem 0.9rem; align-items: center; margin: 0;
}
.page-body .checksums .checksum { display: contents; }
.page-body .checksum dt { font-size: 0.85rem; color: var(--text-muted); margin: 0; }
.page-body .checksum dd { margin: 0; }
@media (max-width: 620px) {
  .page-body dl.checksums { grid-template-columns: minmax(0, 1fr) auto; row-gap: 0.25rem; }
  .page-body .checksum dt { grid-column: 1 / -1; margin-top: 0.5rem; }
}
/* A checksum is one unbroken word of up to 128 characters: it has to be allowed
   to break anywhere, or it pushes the column wider than the screen. */
.checksum code {
  /* pre-wrap: the Linux and macOS lines need TWO spaces between the checksum
     and the name, and selected by hand a collapsed run of spaces copies as
     one - which sha256sum and shasum refuse as a malformed line. */
  display: block; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-all;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px;
  padding: 0.4rem 0.55rem; font-size: 0.78rem; line-height: 1.5; color: var(--text);
}
/* The copy control is an icon: the clipboard, or a tick for a moment once the
   value is on the clipboard (parts/download.php). */
.copy-icon { padding: 0.4rem; line-height: 0; color: var(--text-muted); }
.copy-icon:hover { color: var(--text); }
.copy-icon svg { width: 16px; height: 16px; }
.copy-icon .icon-done { display: none; }
.copy-icon.is-copied .icon-copy { display: none; }
.copy-icon.is-copied .icon-done { display: inline; color: var(--success); }
/* A line of help under a form field, quieter than its label. */
.field-hint { color: var(--text-muted); font-size: 0.82rem; }
/* The order page's sentence under the licence cards. */
.order-note { color: var(--text-muted); margin: 1.2rem 0 0; max-width: var(--measure); }

/* PRINTING PRINTS THE AGREEMENT AND NOTHING ELSE. Somebody who reaches for
   print on this page wants the terms on paper, not the form, the navigation
   and the footer. The box also loses its height limit and its scrollbar -
   printed, a scrolling box comes out as its first screenful and stops, which
   is the worst possible failure for a legal text. */
@media print {
  body { background: var(--paper); color: var(--ink); }
  .site-header, .site-footer { display: none !important; }
  /* Only where the agreement stands beside a form (body class from
     functions.php): there, the agreement and nothing else. Unscoped, hiding
     .prose printed every other page - imprint, privacy, FAQ, news - blank. */
  .kipes-licence-page .enquiry-form, .kipes-licence-page .licence-tools, .kipes-licence-page .prose,
  .kipes-licence-page .release-msg, .kipes-licence-page .download-accept,
  .kipes-licence-page .page-body header { display: none !important; }
  /* Everywhere else: the text, dark on white - the screen's light-on-dark
     colours would print as near-white on paper - without the controls. */
  body:not(.kipes-licence-page) .page-body * { color: var(--ink) !important; background: transparent !important; border-color: var(--ink) !important; }
  body:not(.kipes-licence-page) .page-body .btn,
  .news-back, .news-pager, .news-more { display: none !important; }
  .enquiry-split { display: block; }
  /* Both selectors, because .enquiry-licence .licence-box is two classes and
     would otherwise keep its 34rem - and a legal text that prints its first
     screenful and stops is the worst failure this page could have. The
     !important overrules the height the script measures for the screen. */
  .licence-box,
  .enquiry-licence .licence-box {
    height: auto !important; max-height: none !important; overflow: visible; border: 0; padding: 0;
    background: var(--paper); color: var(--ink); font-size: 10.5pt;
  }
  .licence-box a { color: var(--ink); text-decoration: underline; }
}

/* ---------------------------------------------------------------------------
   CONTENT PAGES (Impressum, Datenschutz) - legal text has to be scannable.
   --------------------------------------------------------------------------- */
.page-body { padding-block: clamp(2rem, 5vw, 3.5rem); }
.page-body h2 { margin-top: 2rem; }
/* An element that is a link target clears the sticky header. Without this the
   browser scrolls it to y=0, which is underneath .site-header, and the reader
   lands past the thing they asked for. */
.page-body h1[id],
.page-body h2[id],
.page-body details[id] { scroll-margin-top: 5rem; }
/* Five links do not fit beside the wordmark on a phone, and the sticky header
   takes a second row - about 7.5rem at 320px - so a target clears that instead. */
@media (max-width: 520px) {
  .page-body h1[id],
  .page-body h2[id],
  .page-body details[id] { scroll-margin-top: 8.5rem; }
}

/* ---------------------------------------------------------------------------
   THE FAQ - one answer open at a time.

   Built on <details name="faq">, which browsers make mutually exclusive by
   themselves: opening one closes its siblings, with no script, no state to keep
   and nothing to go wrong when JavaScript does not run. Where the name
   attribute is not understood the answers simply all open independently, which
   is a usable page rather than a broken one, and parts/faq.php carries a small
   script that restores the exclusivity there.

   The whole summary is the control, not a glyph beside it: it is clicked
   constantly, and a 12-pixel target for that is a nuisance. It is a real
   <summary>, so the keyboard reaches it and a screen reader is told what it
   does.
   --------------------------------------------------------------------------- */
.faq-answer { border-top: 1px solid var(--border); }
.faq-answer:last-of-type { border-bottom: 1px solid var(--border); }

.faq-answer summary {
  display: flex;
  /* CENTRE, not baseline. The chevron is an empty pseudo-element, so its
     baseline is its own bottom edge - baseline alignment therefore sat that
     bottom edge on the heading's baseline and hung the whole mark below the
     middle of a line that is up to 1.9rem tall. Centring aligns it to the
     heading's box, which is what the eye reads as the middle of the row. */
  align-items: center;
  gap: 0.7rem;
  cursor: pointer;
  padding: 0.9rem 0;
  /* Both spellings: list-style kills the marker in Firefox and Chromium, the
     pseudo-element is what Safari still reads. */
  list-style: none;
}
.faq-answer summary::-webkit-details-marker { display: none; }

/* The heading keeps its size and loses its margins - it is a line in a control
   now, not a block on the page. .page-body h2 gives it 2rem of top margin,
   which inside a summary would push the chevron away from its own text. */
.faq-answer summary h2 { margin: 0; }

/* A chevron drawn from two borders: no asset, no font, and it turns with the
   answer it belongs to. */
.faq-answer summary::before {
  content: "";
  flex: none;
  width: 0.42em;
  height: 0.42em;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
  /* Matched to the 260ms the answer itself takes in parts/faq.php, and to the
     same curve, so the chevron and the drawer arrive together. Two durations
     that nearly agree read as a fault; one that agrees reads as one movement. */
  transition: transform 0.26s cubic-bezier(0.32, 0.72, 0, 1);
}
.faq-answer[open] summary::before { transform: rotate(45deg); }

/* The answer itself, indented to the width of the chevron and its gap so the
   text lines up with the heading above it rather than with the marker. */
.faq-answer > *:not(summary) { margin-left: calc(0.42em + 0.7rem); }
.faq-answer > *:last-child { margin-bottom: 1.4rem; }
.page-body dl { display: grid; grid-template-columns: max-content 1fr; gap: 0.35rem 1.2rem; margin: 0 0 1.4rem; }
.page-body dt { color: var(--text-muted); }
.page-body dd { margin: 0; }
@media (max-width: 560px) {
  .page-body dl { grid-template-columns: 1fr; gap: 0; }
  .page-body dd { margin-bottom: 0.7rem; }
}

/* ---------------------------------------------------------------------------
   NEWS - the list at /news/ and one item at /news/<slug>/ (news.php).
   --------------------------------------------------------------------------- */
.news-item { padding: 1.3rem 0; border-top: 1px solid var(--border); }
.news-item:first-child { border-top: 0; padding-top: 0; }
/* The date above the title, small and quiet: it orders the list, the title is
   what is read. */
.news-date { margin: 0 0 0.3rem; color: var(--text-muted); font-size: 0.88rem; }
/* The item's title is a line in a list, not a section of the page: no 2rem of
   .page-body h2 air above it. */
.page-body .news-item h2 { margin: 0 0 0.5rem; font-size: clamp(1.2rem, 2.2vw, 1.5rem); }
.news-item h2 a { color: var(--text); text-decoration: none; }
.news-item h2 a:hover { color: var(--accent); }
.news-excerpt p { margin: 0 0 0.5rem; color: var(--text-muted); }
.news-more { margin: 0; font-size: 0.95rem; }
.news-pager { display: flex; justify-content: space-between; gap: 1rem; padding-top: 1.3rem; border-top: 1px solid var(--border); }
.news-back { margin: 0 0 1.4rem; font-size: 0.95rem; }
.news-download { margin-top: 2rem; }
/* What a post may contain, from WordPress's editor: pictures that fit the
   column, quotes and code that read as such. The site had no user-written
   content before, so nothing styled these. */
.news-content img, .news-content video { max-width: 100%; height: auto; }
.news-content figure { margin: 1.4rem 0; }
.news-content figcaption { color: var(--text-muted); font-size: 0.88rem; margin-top: 0.4rem; }
.news-content blockquote { margin: 1.2rem 0; padding-left: 1rem; border-left: 2px solid var(--border); color: var(--text-muted); }
.news-content pre {
  overflow-x: auto; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 0.8rem 1rem;
}
.news-content ul, .news-content ol { padding-left: 1.3rem; }
.news-content li { margin-bottom: 0.3rem; }
/* One unbroken word - a checksum, a long address in inline code - may break
   anywhere rather than push the page wider than a phone. */
.news-content, .news-excerpt { overflow-wrap: break-word; }
.news-content code { overflow-wrap: anywhere; }
/* Tables, WordPress's striped style included: its #f0f0f0 stripe under the
   site's light text made every other row unreadable. */
.news-content table { border-collapse: collapse; width: 100%; }
.news-content th, .news-content td { border: 1px solid var(--border); padding: 0.4rem 0.6rem; text-align: left; }
.news-content .wp-block-table.is-style-stripes tbody tr:nth-child(odd) { background: var(--surface-1); }
.news-content .wp-block-table.is-style-stripes { border-bottom-color: var(--border); }
.news-content .wp-block-table thead { border-bottom-color: var(--border); }
.news-content .wp-block-table tfoot { border-top-color: var(--border); }
/* Buttons and the File block's download button, drawn as the site's buttons
   rather than WordPress's own dark-grey pill. */
.news-content .wp-block-button__link,
.news-content .wp-block-file__button {
  background: var(--accent); color: var(--accent-contrast); border-radius: 8px;
  padding: 0.55rem 1rem; text-decoration: none;
}
.news-content .is-style-outline .wp-block-button__link { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
/* The separator as the site's rules are drawn; the pullquote without the
   quote's left rule, which beside centred text hung in the air. */
.news-content hr, .news-content .wp-block-separator { border: 0; border-top: 1px solid var(--border); margin: 1.6rem 0; }
.news-content .wp-block-pullquote { padding: 1rem 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.news-content .wp-block-pullquote blockquote { border-left: 0; padding-left: 0; color: var(--text); }
.news-pages { margin-top: 1.4rem; display: flex; gap: 0.6rem; flex-wrap: wrap; }

/* Read by a screen reader, not shown: the words that make "Read more" say which
   item it opens. The usual recipe - clipped rather than display:none, which
   would hide it from the reader as well. */
.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ---------------------------------------------------------------------------
   FOOTER
   --------------------------------------------------------------------------- */
/* A third of the height it had: 8px of padding either side of a 24px row
   instead of 32px either side of a 56px one. It is a colophon, not a section,
   and it was taking the depth of one. */
.site-footer {
  border-top: 1px solid var(--border); background: var(--surface);
  padding-block: 0.5rem; margin-top: 1.5rem; color: var(--text-muted); font-size: 0.9rem;
}
/* THE FOOTER IS ALWAYS AT THE BOTTOM. The page is a column as tall as the
   window; the content between the header and the footer takes whatever is left
   over, so a short page pushes the footer down instead of leaving it floating
   in the middle. On a long page the slack is zero and nothing moves. */
html { height: 100%; }
body { min-height: 100vh; display: flex; flex-direction: column; }
body > .site-header, body > .site-footer { flex: none; }
body > *:not(.site-header):not(.site-footer) { flex: 0 0 auto; }
body > .page-body, body > .hero, body > section.band, body > article { flex: 0 0 auto; }
.site-footer { margin-top: auto; }
/* Right after a request was sent: main takes the height between the header and
   the footer and holds the confirmation in its middle. #main, because the rule
   that keeps body's other children at their own height outranks "main". */
body.kipes-request-sent > #main { flex: 1 0 auto; display: grid; place-items: center; }
body.kipes-request-sent .form-msg { margin: 0; }

.site-footer .wrap { display: flex; gap: 1rem 1.6rem; flex-wrap: wrap; align-items: center;
  /* Both rows share one centre line, and the strip has the same air above
     and below whatever it happens to contain. */
  justify-content: space-between; align-content: center; min-height: 1.5rem; }
.site-footer nav { display: flex; gap: 1.1rem; margin-left: auto; flex-wrap: wrap; }
.site-footer a { color: var(--text-muted); text-decoration: none; }
.site-footer a:hover { color: var(--text); text-decoration: underline; }

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