/* Lords of War. Mobile first: the phone list is the primary surface and the dense
   table appears only from 1024px, because thirteen columns cannot be read at 360px.

   No em or en dash anywhere in content, including generated content, per standing
   owner style. A middle dot separates fields instead. */

:root{
  /* ---- colour ------------------------------------------------------------
     The three partner colours are the owner's choice of HUE: red for Redwane, blue
     for Sam, kaki green for Vincent. The lightness is not his choice, and it moved in
     #15 because the original red was 4.09:1 on this background -- below AA for normal
     text, and the worst one to leave failing, since it is his own colour and the one
     errors are written in. blau and kaki were 1.10 apart in greyscale, which is no
     difference at all once the hue is gone.

     Now, computed from these exact values by tests/test_feinschliff.py:
       rot  #CC635F  4.69:1      rot vs blau  1.22
       blau #6495CC  5.70:1      rot vs kaki  1.48
       kaki #99A86C  6.94:1      blau vs kaki 1.22
     Verkauf sits above all three and is additionally marked by a check rather than an
     initial, which is the distinction that survives greyscale. */
  --bg:#14181C; --panel:#1D2328; --panel-2:#232A30; --line:#2C343B; --line-2:#3C444B;
  --text:#E6E9EC; --text-2:#8A939B;
  --accent:#6E9BC4; --warn:#D9A441; --bad:#CC635F; --good:#7FA86A;
  --mark-rot:#CC635F; --mark-blau:#6495CC; --mark-kaki:#99A86C;
  --mark-verkauf:#C1A3D0;
  /* Every other row of the dense table (#38). Between `--bg` and `--panel`, because the
     row under the pointer takes `--panel` and has to win against the stripe. */
  --zebra:#181D22;

  /* ---- type --------------------------------------------------------------
     Five steps, and nothing between them. The stylesheet had thirty-odd distinct
     font-size values before #15, most of them within a hundredth of a rem of another,
     which is what makes an interface read as assembled rather than designed.

     Raised in #35 (owner, 2026-10-10: "aimed at improving readability"). The figures
     below are what the browser RENDERS, measured by `layout_check`, and the ones they
     replace are measured too rather than read off the file:

       --t-winzig   9.9px -> 11px     micro labels, uppercase
       --t-klein   11.5px -> 13px     secondary text, source lines
       --t-normal  13.4px -> 15px     values, controls, body
       --t-gross   16.3px -> 17px     the price, the name in the list
       --t-titel   20.0px -> 21px     the name plate

     Measuring was not pedantry. `rem` resolves against the ROOT and not against `body`,
     so the old steps were 9.9 and 13.4 rather than the 9.3 and 12.6 that multiplying by
     the body's 15px suggests, and the smallest text on the list and on every detail page
     was 9.9px -- which is the single worst number in the interface and the reason
     "lifeless" lands on the labels first.

     11px is the floor. Nothing is allowed below it, and `layout_check` holds that against
     the rendered page rather than against this file.

     Deliberately NOT a step bigger. The phone fold budget is real and #37 spends what is
     left of it on the organisation block; the gain here is in the labels and the secondary
     text, which were the two unreadable steps. */
  --t-winzig:.6875rem; --t-klein:.8125rem; --t-normal:.9375rem;
  --t-gross:1.0625rem; --t-titel:1.3125rem;

  /* ---- space -------------------------------------------------------------
     A 4px grid. Same reasoning: 6, 7, 9, 10 and 11px were all in use, and no reader
     can see the difference while every one of them is a decision nobody made. */
  --s-1:4px; --s-2:8px; --s-3:12px; --s-4:18px; --s-5:28px;

  --r:6px;
  --nav-h:56px;
}

*{margin:0;padding:0;box-sizing:border-box}

body{
  font-family:'IBM Plex Sans',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
  background:var(--bg); color:var(--text);
  /* The token and not a number. `body` carried its own 15px, which happened to equal
     --t-normal and was a second base beside the scale: raising the token moved every
     label and left the body text where it was. The root is deliberately NOT pinned to
     16px -- `rem` then follows a reader who has set a larger default, and all five steps
     scale with it. */
  font-size:var(--t-normal); line-height:1.45;
  /* Room for the nav, which is fixed on every page at every width. */
  padding-bottom:calc(var(--nav-h) + 24px);
  -webkit-text-size-adjust:100%;
}

a{color:inherit; text-decoration:none}

/* ---------------------------------------------------------------- the base forms

   Three of them, added in #35. The owner's complaint was that the app is "lifeless and
   not differentiated enough, while also lacking visual structuring", and all three parts
   of that have one cause: there was exactly ONE surface in the whole interface (the permit
   card from #31) and everything else was hairlines on the page background, with a 9.9px
   grey heading over each. Nothing showed a block as a block, and nothing showed a state
   as an object. */

/* 1. A block. Everything that is one section of one page becomes one of these. */
.block{
  background:var(--panel); border:1px solid var(--line); border-radius:var(--r);
  padding:var(--s-3); margin-bottom:var(--s-3);
}

/* 2. Its title, with an accent rail. Six almost-identical heading rules existed before
      this -- `.d-felder h2`, `.d-notizen h2`, `.d-protokoll h2`, `.d-karte h2`,
      `.abr-block h2` and `.abr-tabelle th` -- differing in letter-spacing by a hundredth
      of an em and in margin by two pixels, which is the kind of difference nobody can see
      and nobody decided. */
.block-titel{
  display:flex; align-items:center; gap:var(--s-2);
  font-size:var(--t-winzig); font-weight:700; letter-spacing:.07em;
  text-transform:uppercase; color:var(--text-2);
  margin:0 0 var(--s-2);
}
/* The rail. 3px of accent, which in this system means "ours, and you can act on it" --
   the permit card gets a neutral one in #37 for exactly that reason. */
.block-titel::before{
  content:""; flex:0 0 auto; width:3px; height:12px; border-radius:2px;
  background:var(--accent);
}

/* 3. A badge. A state is an object: a border, a fill and a WORD, so it survives
      greyscale the way `test_feinschliff` has demanded of the partner colours since #15.
      The variants for `stand` and `ziel` arrive in #36; this is the form they share. */
.plakette{
  display:inline-flex; align-items:center; gap:4px;
  font-size:var(--t-winzig); font-weight:700; letter-spacing:.05em;
  text-transform:uppercase; white-space:nowrap;
  padding:2px 7px; border-radius:4px;
  border:1px solid var(--line-2); color:var(--text-2);
}

/* ---- #36: the variants ---------------------------------------------------------
   `stand` and `ziel` are the two fields you SEARCH across 66 positions rather than read.
   Everything else on a row is an answer you want once you are already at the position;
   these two are what you scan. Until now both were coloured TEXT in the same size as the
   value beside them, which is most of what "not differentiated enough" means.

   The fill is `color-mix` at 14% rather than a second set of hex values, so a tone can
   never drift from the colour it is a tone of -- and `test_feinschliff` refuses any hex
   outside the palette, which is how a second set would be caught anyway.

   `offen` and `niemand` stay GHOSTS: border and grey text, no fill. 46 of the 66 are
   offen, and 46 filled badges in one column are exactly the noise the other three states
   have to stand out from. Same reasoning as #22, where a warning that fired on an
   ordinary state had to be removed; here it is a colour that would. */
.plakette.s-offen,.plakette.z-niemand{border-color:var(--line-2); color:var(--text-2)}
.plakette.s-reserviert{
  border-color:color-mix(in srgb, var(--warn) 45%, transparent);
  background:color-mix(in srgb, var(--warn) 14%, transparent);
  color:var(--warn);
}
.plakette.s-vergeben{
  border-color:color-mix(in srgb, var(--accent) 45%, transparent);
  background:color-mix(in srgb, var(--accent) 14%, transparent);
  color:var(--accent);
}
.plakette.s-verkauft{
  border-color:color-mix(in srgb, var(--good) 45%, transparent);
  background:color-mix(in srgb, var(--good) 14%, transparent);
  color:var(--good);
}
.plakette.z-rot{
  border-color:color-mix(in srgb, var(--mark-rot) 45%, transparent);
  background:color-mix(in srgb, var(--mark-rot) 14%, transparent);
  color:var(--mark-rot);
}
.plakette.z-blau{
  border-color:color-mix(in srgb, var(--mark-blau) 45%, transparent);
  background:color-mix(in srgb, var(--mark-blau) 14%, transparent);
  color:var(--mark-blau);
}
.plakette.z-kaki{
  border-color:color-mix(in srgb, var(--mark-kaki) 45%, transparent);
  background:color-mix(in srgb, var(--mark-kaki) 14%, transparent);
  color:var(--mark-kaki);
}
.plakette.z-verkauf{
  border-color:color-mix(in srgb, var(--mark-verkauf) 45%, transparent);
  background:color-mix(in srgb, var(--mark-verkauf) 14%, transparent);
  color:var(--mark-verkauf);
}
/* A buyer's name is a name and not a state, so it keeps its capitals: `Buechsenmacher
   Weber` in uppercase is unreadable and is the one value in this badge that a person
   typed. */
.plakette.z-verkauf.hat-namen{text-transform:none; letter-spacing:0}

/* ---- the controls that CHANGE those two -----------------------------------------
   Not a badge inside a control, which cannot be done with a `select`: the control itself
   takes the tone, the border and the text colour of its own value, so it reads as a badge
   you can open. `static/app.js` repaints it on change -- without that the colour would be
   right until somebody edited the row and then lie until the next reload. */
.feld-farbig select{font-weight:600}
.feld-farbig.z-rot select{
  color:var(--mark-rot);
  background:color-mix(in srgb, var(--mark-rot) 12%, var(--panel-2));
  border-color:color-mix(in srgb, var(--mark-rot) 40%, transparent);
}
.feld-farbig.z-blau select{
  color:var(--mark-blau);
  background:color-mix(in srgb, var(--mark-blau) 12%, var(--panel-2));
  border-color:color-mix(in srgb, var(--mark-blau) 40%, transparent);
}
.feld-farbig.z-kaki select{
  color:var(--mark-kaki);
  background:color-mix(in srgb, var(--mark-kaki) 12%, var(--panel-2));
  border-color:color-mix(in srgb, var(--mark-kaki) 40%, transparent);
}
.feld-farbig.z-verkauf select{
  color:var(--mark-verkauf);
  background:color-mix(in srgb, var(--mark-verkauf) 12%, var(--panel-2));
  border-color:color-mix(in srgb, var(--mark-verkauf) 40%, transparent);
}
.feld-farbig.s-reserviert select{
  color:var(--warn);
  background:color-mix(in srgb, var(--warn) 12%, var(--panel-2));
  border-color:color-mix(in srgb, var(--warn) 40%, transparent);
}
.feld-farbig.s-vergeben select{
  color:var(--accent);
  background:color-mix(in srgb, var(--accent) 12%, var(--panel-2));
  border-color:color-mix(in srgb, var(--accent) 40%, transparent);
}
.feld-farbig.s-verkauft select{
  color:var(--good);
  background:color-mix(in srgb, var(--good) 12%, var(--panel-2));
  border-color:color-mix(in srgb, var(--good) 40%, transparent);
}
/* The two quiet states, and `niemand` additionally drops the weight: an undecided
   destination should not look like a decision. */
.feld-farbig.z-niemand select{color:var(--text-2); font-weight:400}
.feld-farbig.s-offen select{color:var(--text-2)}
/* The OPTION list keeps the system colours. Only the closed control is read while
   scanning, and a tinted dropdown list is unreadable on several platforms. */
.feld-farbig select option{color:var(--text)}

/* ---------------------------------------------------------------- header */

.kopf{padding:14px 16px 10px; border-bottom:1px solid var(--line)}
.kopf-zeile{display:flex; align-items:center; justify-content:space-between; gap:var(--s-3)}
/* The page gets a beginning. A title the same size as a table cell gives it none, and
   this is the only element in the app with real tracking -- three users and no brand to
   serve, but a heading that does not read as one leaves the list starting at the top of
   the screen. */
.kopf h1{font-size:var(--t-titel); font-weight:600; letter-spacing:.04em}
.abmelden button{
  background:none; border:1px solid var(--line-2); color:var(--text-2);
  font-family:inherit; font-size:var(--t-normal); padding:8px 12px;
  border-radius:var(--r); cursor:pointer; min-height:44px;
}
.abmelden button:hover{color:var(--text); border-color:var(--text-2)}
.zaehler{
  font-size:var(--t-klein); color:var(--text-2); margin-top:var(--s-2);
  display:flex; flex-wrap:wrap; align-items:center; gap:var(--s-1) var(--s-2);
}
.zaehler .aktiv{color:var(--accent)}
/* A button and not an underlined word. Clearing the filters is an ACTION, and as a
   footnote beside the count it read as part of the sentence describing the view -- and it
   was 17px tall on a phone, which is not something you hit with a thumb. */
.zuruecksetzen{
  display:inline-flex; align-items:center; min-height:44px; padding:0 10px;
  border:1px solid var(--line-2); border-radius:var(--r);
  color:var(--text-2); font-size:var(--t-klein); text-decoration:none;
}
.zuruecksetzen:hover{color:var(--text); border-color:var(--text-2)}

/* ---------------------------------------------------------------- filters

   Sticky, because the list is 66 rows long and reaching the filters must not mean
   scrolling back to the top with one hand in a gun shop. */

.filter{
  position:sticky; top:0; z-index:20;
  display:flex; flex-wrap:wrap; gap:var(--s-2);
  padding:10px 16px; background:var(--bg);
  border-bottom:1px solid var(--line);
}
.filter input,.filter select,.filter button{
  font-family:inherit; font-size:var(--t-normal);
  background:var(--panel); color:var(--text);
  border:1px solid var(--line-2); border-radius:var(--r);
  padding:9px 10px; min-height:44px;      /* 44px: a thumb target, not a mouse target */
  outline:none;
}
.filter input[type=search]{flex:1 1 100%; min-width:0}
.filter select{flex:1 1 calc(50% - 4px); min-width:0}
.filter button{
  flex:1 1 100%; background:var(--line); border-color:var(--line);
  font-weight:500; cursor:pointer;
}
.filter input:focus,.filter select:focus{border-color:var(--accent)}

/* ---------------------------------------------------------------- status colours */

.s-offen{color:var(--text-2)}
.s-reserviert{color:var(--warn)}
.s-vergeben{color:var(--accent)}
.s-verkauft{color:var(--good)}
/* `stand` keeps the three names it had, so these classes are unchanged. */
/* ---- focus (#15) ---------------------------------------------------------------
   The enrolment form, six filters and several hundred editable controls are all
   reachable by tab, and every one of them was invisible while focused. `:focus-visible`
   rather than `:focus`, so a mouse click does not leave a ring behind on a control
   somebody is simply using. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible{
  outline:2px solid var(--accent); outline-offset:2px; border-radius:var(--r);
}
/* Inside the dense table the offset would overlap the neighbouring cell. */
.tabelle :focus-visible{outline-offset:1px}

/* ---- a save in flight (#15) ----------------------------------------------------
   The script has always added `sendet` while a field is posting and nothing drew it, so
   on a slow connection a control looked exactly like one that had ignored the tap. */
.feld.sendet{opacity:.6}
.feld.sendet input,.feld.sendet select,.feld.sendet textarea{
  border-color:var(--accent);
}
.mark[disabled]{opacity:.5; cursor:progress}

/* ---- pressed (#15) -------------------------------------------------------------
   Touch has no hover, so without this a tap had no acknowledgement at all until the
   server answered. */
button:active,.mark:active,.m-link:active{transform:translateY(1px)}
.mark:active{filter:brightness(1.15)}

/* ---- interest marks and destinations (#12) ------------------------------------
   The three colours are the owner's: Redwane red, Sam blue, Vincent kaki green, and
   `server/marken.py` decides which partner gets which, so a mark cannot be red in the
   list and blue on the detail page.

   They used to be declared in a SECOND :root here, which quietly overrode the palette
   at the top of this file: #15 moved them up for contrast and nothing changed on screen,
   because this block was still winning. A test now refuses any hex outside the palette,
   which is what found it. */
.marken{display:inline-flex; gap:var(--s-1); align-items:center; flex-wrap:wrap}
.mark{
  /* 44px, because this is a button and the detail page is used on a phone. The dense
     desktop table shrinks them below, where there is a mouse and no room. */
  min-width:44px; min-height:44px; padding:0 4px; border-radius:4px;
  font-size:var(--t-klein); font-weight:700; line-height:1;
  display:inline-flex; align-items:center; justify-content:center; gap:1px;
  background:transparent; cursor:pointer;
  /* Unset reads as an outline rather than a colour fill, so "who is interested" is
     answerable at a glance across 66 rows instead of needing one read per square. */
  border:1px solid var(--line-2); color:var(--text-2);
}
.mark-an{color:#14181C; font-weight:700}
.mark-rot.mark-an{background:var(--mark-rot); border-color:var(--mark-rot)}
.mark-blau.mark-an{background:var(--mark-blau); border-color:var(--mark-blau)}
.mark-kaki.mark-an{background:var(--mark-kaki); border-color:var(--mark-kaki)}
.mark-verkauf.mark-an{background:var(--mark-verkauf); border-color:var(--mark-verkauf)}
.mark-haken{font-size:var(--t-winzig)}
/* Not a button on the phone list, where the row is itself a link. */
span.mark{cursor:default}
.m-marken{display:inline-flex; gap:var(--s-1); margin-top:var(--s-1)}
/* Read-only on the phone list, so they have no reason to take a tap target's worth of
   space. They are 44px on the detail page, where they are actually tapped. */
.m-marken .mark{
  min-width:20px; min-height:20px; padding:0 3px;
  font-size:var(--t-winzig); border-radius:3px;
}

.z-rot{color:var(--mark-rot)}
.z-blau{color:var(--mark-blau)}
.z-kaki{color:var(--mark-kaki)}
.z-verkauf{color:var(--mark-verkauf)}
.z-niemand{color:var(--text-2)}

/* ---- the tally bar (#18) -------------------------------------------------------
   One row of blocks on a desktop, wrapping to as many as it needs on a phone. The
   figures are tabular-nums so the digits line up as they change under the live
   refresh, which otherwise makes the whole bar jitter on every poll. */
.summen{
  margin-top:var(--s-2); padding-top:8px; border-top:1px solid var(--line);
  font-variant-numeric:tabular-nums;
}
/* The switch itself is off screen rather than display:none, so it stays focusable
   from a keyboard. */
.summen-schalter{position:absolute; opacity:0; width:1px; height:1px; margin:0}
/* The always-visible line, and on a phone the control that opens the rest, so it is a
   44px tap target. */
.summen-kopf{
  display:flex; flex-wrap:wrap; align-items:baseline; gap:var(--s-1) 12px;
  min-height:44px; cursor:pointer;
}
.summen-kopf::after{
  content:"mehr"; font-size:var(--t-winzig); letter-spacing:.06em; text-transform:uppercase;
  color:var(--accent); margin-left:auto; align-self:center;
}
.summen-schalter:checked + .summen-kopf::after{content:"weniger"}
.summen-schalter:focus-visible + .summen-kopf{
  outline:2px solid var(--accent); outline-offset:2px; border-radius:4px;
}
/* A GRID and not a wrapping flex row (#39). Wrapped, which block a figure belonged to
   depended on where the line happened to break, and on a phone the four titles and their
   numbers interleaved. Two columns on a phone, four from the tablet breakpoint, so a
   title is always directly above its own numbers. */
.summen-rest{
  display:none; grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:var(--s-2) var(--s-3); padding:6px 0 2px;
}
.summen-schalter:checked ~ .summen-rest{display:grid}
@media (min-width: 768px) {
  .summen-rest{grid-template-columns:repeat(4, minmax(0, 1fr))}
}
/* Each of the four is a block of the shared form, minus the surface: inside the top bar
   a filled panel per figure would be four panels on a panel. The title and its rail are
   what make it one. */
.summen-rest .summe-block{gap:var(--s-1)}
.summe-block{display:flex; flex-direction:column; gap:var(--s-1); min-width:0}
.summen-kopf .summe-block{flex-direction:row; align-items:baseline; gap:var(--s-2)}
/* The same form as a block title, with the rail, so the strip reads as four named
   things rather than as a paragraph of numbers. */
.summe-titel{
  display:flex; align-items:center; gap:6px;
  font-size:var(--t-winzig); font-weight:700; letter-spacing:.07em;
  text-transform:uppercase; color:var(--text-2);
}
.summen-rest .summe-titel::before{
  content:""; flex:0 0 auto; width:3px; height:10px; border-radius:2px;
  background:var(--accent);
}
/* The one figure the page exists to show, at the title step. It stood at --t-gross,
   which is the size of a price in the list: the total value of the bundle was
   indistinguishable from one position's asking price. */
.summe-wert{font-size:var(--t-titel); font-weight:700}
.summe-klein{font-size:var(--t-klein); color:var(--text-2)}
.summe-gefiltert{color:var(--warn)}
.summe-reihe{display:flex; flex-wrap:wrap; gap:var(--s-1) 10px; align-items:baseline}
/* The tally strip keeps its coloured left edge -- it is a row of counts, not a row of
   states, and a full badge per partner would read as a filter that is switched on. It
   takes the badge's padding and radius so the two do not look like two systems. */
.summe-teil{
  display:inline-flex; align-items:baseline; gap:var(--s-1);
  font-size:var(--t-normal); padding:2px 7px; border-radius:4px;
  border-left:3px solid var(--line-2); background:var(--panel);
}
/* The number is what is counted and the name says what WAS counted, so the number is
   the larger of the two. They were the same size, which made every figure in the strip
   read as a label with a label. */
.summe-name{font-weight:600; font-size:var(--t-klein)}
.summe-zahl{font-variant-numeric:tabular-nums; font-size:var(--t-normal); font-weight:700}
.summe-anzahl{font-size:var(--t-klein); color:var(--text-2)}

.s-rot{border-left-color:var(--mark-rot)}
.s-rot .summe-name{color:var(--mark-rot)}
.s-blau{border-left-color:var(--mark-blau)}
.s-blau .summe-name{color:var(--mark-blau)}
.s-kaki{border-left-color:var(--mark-kaki)}
.s-kaki .summe-name{color:var(--mark-kaki)}
.s-verkauf{border-left-color:var(--mark-verkauf)}
.s-verkauf .summe-name{color:var(--mark-verkauf)}
.s-niemand{border-left-color:var(--line-2)}
.s-niemand .summe-name{color:var(--text-2)}

/* `s-offen`, `s-reserviert` and `s-verkauft` already carry a colour from the status
   column, so the Stand block inherits them and only needs the left edge. */
.summe-teil.s-offen{border-left-color:var(--text-2)}
.summe-teil.s-reserviert{border-left-color:var(--warn)}
.summe-teil.s-vergeben{border-left-color:var(--accent)}
.summe-teil.s-verkauft{border-left-color:var(--good)}

/* A figure the live refresh moved, so a change arriving from one of the others is
   visible rather than silently different from a second ago. */
.summe-wert.fremd,.summe-teil.fremd{animation:fremd 1.2s ease-out}

/* From the tablet breakpoint up there is room for all of it at once, so the disclosure
   stops being one: always open, nothing to tap, no hint to tap it. */
@media (min-width: 768px) {
  .summen-rest{display:flex}
  .summen-kopf{min-height:0; cursor:default}
  .summen-kopf::after{content:none}
  .summen-schalter{display:none}
}
/* The destination control's colour rules moved up beside the badge variants in #36,
   where `stand` joined it and both got a fill rather than only a text colour. */

/* The buyer belongs to Verkauf, and to a position nobody has claimed. Hidden rather
   than removed, so it can come back the moment somebody picks Verkauf, and
   `visibility` rather than `display` in the table so the column does not change width
   as the rows above and below are edited. */
.kaeufer-aus{visibility:hidden}
.tabelle .kaeufer-aus{visibility:hidden}

/* `tag` predates the badge form and is one: same border, same fill-less treatment, so
   it takes the shared rule and keeps only its own colour. */
.tag{vertical-align:middle}
/* The marker goes on the subtitle rather than appended to the title: as a title
   suffix it consumed the name and then got truncated to "(vor...", which is worse
   than not showing it. Here it is first, so truncation eats the calibre instead. */
.m-vor{color:var(--warn)}
/* Neutral, not a warning colour. A barrel is not a problem, it is a different kind of
   thing, and two positions out of 66 flagged in orange would read as an error. */
.m-teil{color:var(--text-2); font-weight:600}
.tag-teil{color:var(--text-2); border-color:var(--line); margin-left:4px}

/* ---------------------------------------------------------------- phone list */

.mobil{list-style:none}
.mobil li{border-bottom:1px solid var(--line)}
.m-link{
  display:flex; align-items:center; gap:var(--s-3);
  padding:10px 16px; min-height:72px;
  /* The destination's colour, on the edge of the row (#38). It is the instrument-panel
     device and it costs no height at all: "whose is this" is answerable down the whole
     list without reading a word. `niemand` gets none rather than a grey one -- a colour
     that means "undecided" on four positions is a colour too many. */
  border-left:3px solid transparent;
}
.mobil li.z-rot .m-link{border-left-color:var(--mark-rot)}
.mobil li.z-blau .m-link{border-left-color:var(--mark-blau)}
.mobil li.z-kaki .m-link{border-left-color:var(--mark-kaki)}
.mobil li.z-verkauf .m-link{border-left-color:var(--mark-verkauf)}
.m-link:active{background:var(--panel)}
/* 56px, not 44. 44 is a tap target; this is a PICTURE, and with 66 positions the
   photograph is what you recognise a weapon by. The row was already 64px tall, so the
   extra twelve cost eight. */
.m-bild{flex:0 0 56px}
.m-bild img,.kein-bild{
  display:block; width:56px; height:56px; object-fit:cover;
  border-radius:4px; background:var(--panel-2); border:1px solid var(--line);
}
.m-text{flex:1 1 auto; min-width:0; display:flex; flex-direction:column; gap:var(--s-1)}
.m-titel{
  font-size:var(--t-normal); font-weight:600;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.m-unter{font-size:var(--t-klein); color:var(--text-2);
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.m-rechts{
  flex:0 0 auto; display:flex; flex-direction:column; align-items:flex-end; gap:var(--s-1);
  font-size:var(--t-klein);
}
/* The one number on the row, and it reads like it: the next step up and the heaviest
   weight on this surface. */
.m-preis{font-variant-numeric:tabular-nums; font-size:var(--t-gross); font-weight:700}
/* A dealer's full company name is as long as the row, so it is capped and truncated,
   the way every other long value on this surface is.

   The cap had never applied. `color:var(--text-2)` was not terminated by a semicolon, so
   it ran into the line after it and the pair `color:var(--text-2) max-width:150px` was one
   invalid declaration -- and an invalid declaration is dropped WHOLE, so the app lost both
   the colour and the cap. The colour went unnoticed because the `z-` class supplies one;
   the cap went unnoticed because nothing measured it. Chrome reports `max-width:none` and
   a 208px badge on the live markup, and `layout_check` holds the figure now. */
.m-wer{
  color:var(--text-2);
  max-width:150px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}

/* ---------------------------------------------------------------- desktop table */

.tabelle-rahmen{display:none}

.tabelle{width:100%; border-collapse:collapse; font-size:var(--t-normal)}
.tabelle th,.tabelle td{
  /* Padding kept getting tighter as columns arrived: 14 of them at 7px each side is
     196px, and at 6px it is 168px, which was the difference between Interesse and Stand
     being on screen at 1280 or behind a horizontal scroll.

     #28 went the other way for the first time, from 14 columns to 11, so there is room
     again -- and it is spent on the values rather than on the gaps, because the WBK column
     now carries a naming and a serial in one cell. The padding stays at 6. */
  text-align:left; padding:6px 6px; border-bottom:1px solid var(--line);
  white-space:nowrap;
}
/* Free text from a hand-kept list: `halbautomatische Büchse` and
   `International Harvester` are real values. Truncating them keeps the decision columns
   reachable, and the full value is in the title attribute and in the detail view. */
.tabelle .lang{
  display:inline-block; max-width:92px; overflow:hidden;
  text-overflow:ellipsis; white-space:nowrap; vertical-align:bottom;
}
.tabelle .lang-kurz{
  display:inline-block; max-width:62px; overflow:hidden;
  text-overflow:ellipsis; white-space:nowrap; vertical-align:bottom;
}
/* Seriennummer is deliberately NOT truncated: a half-shown serial identifies nothing,
   and identifying a specific firearm is the one thing that column is for. */
/* Every other row (#38). At eleven columns and 66 rows the commonest reading error is
   slipping into the neighbouring row, and a stripe is the oldest and best answer to it.
   The row under the pointer keeps `--panel` and wins, so pointing at a row still tells
   you which one you are on. */
.tabelle tbody tr:nth-child(even){background:var(--zebra)}
.tabelle thead th{
  /* top:0, not an offset for the filter bar.
     .tabelle-rahmen scrolls, which makes IT the scrollport for this sticky element,
     not the viewport. A top of 65px therefore pinned the header 65px below the
     container's own top edge and parked it on top of the first two rows, rather than
     below the page's filter bar as intended. */
  position:sticky; top:0; background:var(--bg); z-index:10;
  color:var(--text-2); font-weight:500; font-size:var(--t-klein);
  letter-spacing:.03em; text-transform:uppercase;
}
.tabelle thead th a{color:inherit}
.tabelle thead th a:hover{color:var(--text)}
/* After the zebra, so it wins: a stripe you cannot point at is a stripe that makes the
   row under the pointer harder to find rather than easier. */
.tabelle tbody tr:hover{background:var(--panel)}
/* Which column the table is sorted by, and in which direction. Eleven identical headings
   told you nothing about an order you had asked for yourself. */
.tabelle thead th.sortiert a{color:var(--text)}
.tabelle thead th.sortiert a::after{
  content:"\2191"; margin-left:4px; color:var(--accent);
}
.tabelle thead th.sortiert.abwaerts a::after{content:"\2193"}
.tabelle .geld{text-align:right; font-variant-numeric:tabular-nums}
/* Every figure in the app, not only the ones in the table: columns of numbers that do
   not line up are the clearest sign of an unfinished interface, and this app is mostly
   numbers. */
.f-geld,.m-preis,.zahl,.k-wert,.v-wert{font-variant-numeric:tabular-nums}
.tabelle .stark{font-weight:600}
.tabelle .nr{color:var(--text-2); font-variant-numeric:tabular-nums}
.tabelle .sn{font-family:ui-monospace,'SF Mono',Menlo,Consolas,monospace; font-size:var(--t-klein)}
/* The permit in one cell: its naming on the first line and its serial under it, which is
   how the card itself reads. Two lines rather than one, because the alternative at this
   width is a naming truncated to nothing -- and this is the only column whose whole job is
   to be legible enough to carry onto a registration form. `white-space:normal` undoes the
   nowrap all cells get, and the serial keeps the monospace it has everywhere else. */
.tabelle td.zelle-wbk{white-space:normal; line-height:1.2; max-width:170px}
.tabelle td.zelle-wbk .lang{max-width:160px}
.tabelle td.zelle-wbk .sn{display:block; color:var(--text-2)}
/* The thumbnail column left the ledger in #28. The rule stays for the lightbox, which
   still opens from the phone card. */
.tabelle .bild img,.tabelle .bild .kein-bild{width:28px; height:28px; cursor:zoom-in}
.tabelle tr.vorlaeufig .nr{color:var(--warn)}

/* ---- off the market (#19) ------------------------------------------------------
   Handed over or sold, so it is settled and out of play. Struck through AND dimmed,
   both: a strike on one short line is easy to miss, and dimming alone reads as a
   loading state. `opacity` rather than a colour, so the treatment survives greyscale
   and does not collide with the partner colours.

   The strike is on the TEXT only. A line through a select or an input reads as a
   rendering fault, and the controls have to stay usable anyway: a position marked
   vergeben by mistake has to be changeable back. */
.vom-markt{opacity:.55}
.tabelle tr.vom-markt .nr,
.tabelle tr.vom-markt .sn,
.tabelle tr.vom-markt .lang,
.tabelle tr.vom-markt .lang-kurz,
.tabelle tr.vom-markt .lang-spanne,
.vom-markt .m-titel{text-decoration:line-through}
.tabelle tr.vom-markt td.zelle-edit,
.tabelle tr.vom-markt td.zelle-marken{text-decoration:none}
/* Full strength on hover and while editing, so working on one is not done through a
   dimmed row. */
.tabelle tr.vom-markt:hover,
.vom-markt:focus-within{opacity:1}

/* ---------------------------------------------------------------- empty state */

.leer{padding:32px 16px; color:var(--text-2); font-size:var(--t-normal); text-align:center}

/* ---------------------------------------------------------------- bottom nav */

.unten{
  position:fixed; bottom:0; left:0; right:0; z-index:30;
  display:flex; background:var(--panel); border-top:1px solid var(--line);
}
.unten a{
  flex:1 1 0; text-align:center; padding:14px 8px; min-height:48px;
  font-size:var(--t-normal); color:var(--text-2);
}
.unten a:hover,.unten a:active{color:var(--text); background:var(--panel-2)}

/* ---------------------------------------------------------------- breakpoints */

@media (min-width:768px){
  .filter input[type=search]{flex:1 1 240px}
  .filter select{flex:0 1 160px}
  .filter button{flex:0 0 120px}
}

@media (min-width:1024px){
  /* The table becomes the primary surface here: this is where prices get entered in
     bulk, and where comparing figures across positions actually works. */
  .mobil{display:none}

  /* A flex column rather than a height calculated from the chrome above it.
     The first attempt subtracted a fixed 157px, which was measured at 1280 wide and
     is simply wrong at 1024, where the filter bar wraps onto a second line and
     becomes 209px tall. Any constant here is a value that is correct at exactly one
     viewport. Letting the table area take whatever height is left is correct at all
     of them, and it keeps the column header pinned while 66 rows scroll under it. */
  /* Scoped to the LIST page. This rule used to hit every body, so the Abrechnung
     and the Protokoll inherited height:100vh with overflow:hidden and no scrollable
     child, which silently cut off anything past one screen. */
  .liste-seite{
    display:flex; flex-direction:column;
    height:calc(100vh - var(--nav-h)); overflow:hidden;
  }
  .liste-seite .kopf,.liste-seite .filter,.liste-seite .leer{flex:0 0 auto}
  .liste-seite .filter{position:static}
  .liste-seite .tabelle-rahmen{display:block; flex:1 1 auto; min-height:0; overflow:auto}
}

/* ---------------------------------------------------------------- detail view

   On a phone this is the whole screen: you tapped a position, so showing 66 other
   rows above it would be noise. From 1024px the list returns as a rail on the left
   and the detail reads as a pane beside it. */

.detail-seite{display:block}

.detail{padding:0 16px 24px}

.d-nav{
  display:flex; align-items:center; justify-content:space-between; gap:var(--s-3);
  padding:12px 0; border-bottom:1px solid var(--line); margin-bottom:var(--s-4);
}
.zurueck{
  color:var(--accent); font-size:var(--t-normal);
  /* A thumb target, not a mouse target: inline this was 19px tall. */
  display:inline-flex; align-items:center; min-height:44px;
}
.blaettern{display:flex; gap:14px; font-size:var(--t-normal)}
.blaettern a{color:var(--accent)}
.blaettern .aus{color:var(--text-2)}
.d-nav a,.blaettern a,.blaettern span{min-height:44px; display:inline-flex; align-items:center}

.d-kopf{margin-bottom:var(--s-2)}
/* `.d-nr`, `.d-kopf h1` and `.d-unter` stood here and matched nothing: #31 replaced the
   heading-and-subtitle header with the one read-only line `.d-ist`. A rule that matches
   nothing costs nothing until somebody reads the file to find out what the page is made
   of. */
/* The nine positions the two source lists name differently. Quiet: it explains why
   the Marke and Modell fields below read otherwise, it is not a thing to act on. */
.d-quelle{font-size:var(--t-klein); color:var(--text-2); font-style:italic}

/* The label that says the name is not settled: "Marke / Modell unklar" in place of
   "Marke / Modell". It is a LABEL and not an extra line, because the compact block ends
   6px above the fold on a 360x760 phone and a note beside the name put the worst case 45px
   past it.

   Deliberately NOT --warn: an unestablished maker is an open question, not a mistake, and
   22 of the 66 carry one. Colouring a third of the positions as wrong is how a colour
   stops meaning anything on the ones where it does. So it is only allowed to wrap, which
   the other labels are not: "Marke und Modell unklar" is 23 characters and nowrap would
   widen the cell and push the grid. */
.k-titel-offen{white-space:normal; font-style:italic}

/* `.d-wbk` and `.d-abweichung` went with the permit section they belonged to: it has
   been a card since #31, and `.karte-prosa` and `.karte-abweichung` carry those jobs. */

/* Two thirds of the viewport height, which is what the owner asked for: "showing the
   pic of the weapon two third of the screen". Not a fixed pixel height, because the
   whole point is the proportion of whatever screen it is on.

   `min-height` keeps it above half a screen on a short landscape phone, where 66vh of
   a 360px-tall viewport would be 237px and the picture would stop being the subject.
   `max-height` stops it eating a tall desktop window where two thirds is more picture
   than anybody needs and pushes every field below the fold. */
/* ---- the three compact rows (#20) ---------------------------------------------
   The budget is "no scrolling below the photograph", and the photograph takes two
   thirds of it. What was here was a `dl` of one label-and-value pair per line under
   four headings: 17 lines of vertical space for 12 values. Smaller type would not have
   fixed that, so this is a different structure rather than the same one shrunk.

   Each row wraps rather than scrolling sideways: at 360px the decision row needs two
   lines and that is the right trade, because a horizontally scrolled row hides values
   with nothing to say they are there. */
.d-kompakt{
  font-size:var(--t-normal); display:flex; flex-direction:column; gap:var(--s-1);
  margin-bottom:var(--s-3);
}
/* A grid, not wrapping flex. Wrapping made the number of lines depend on how long a
   buyer's name happened to be, and the no-scroll budget cannot be checked against
   something that moves. Three columns on a phone, everything on one line from 768px. */
.k-reihe{
  display:grid; grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:var(--s-1) 10px; align-items:end;
  padding-bottom:4px; border-bottom:1px solid var(--line);
}
.k-identitaet{grid-template-columns:minmax(0, 1.4fr) minmax(0, .8fr) minmax(0, 1fr)}
/* Four cells since Glas joined in #21, so this row wraps to two lines on a
   phone. Giving Marke/Modell a line of its own was tried and costs the same two
   lines while overflowing by a pixel at 360. */
/* Four cells on a phone: Interesse, Halter, Ziel-with-buyer, Stand. Two columns, so it
   is two predictable lines rather than however many the longest buyer name produces. */
.k-entscheidung{grid-template-columns:repeat(2, minmax(0, 1fr))}
/* Two values in one cell, side by side: the two ends of the Spanne, and Ziel with its
   buyer. */
.k-paar{display:flex; align-items:center; gap:var(--s-1); min-width:0}
.k-paar .feld{min-width:0}
.k-bis{font-size:var(--t-winzig); color:var(--text-2); flex:0 0 auto}
.k-spanne{grid-column:1 / -1}
@media (min-width: 768px) {
  .k-reihe{display:flex; flex-wrap:wrap; gap:var(--s-1) 18px; align-items:flex-end}
  .k-spanne{grid-column:auto}
}
.k-reihe:last-child{border-bottom:0; padding-bottom:0}
.k-feld{display:flex; flex-direction:column; gap:1px; min-width:0}
/* `k-breit` is gone (#33). It gave the maker's cell `flex:1 1 180px`, which took every
   spare pixel of the row and left Modell and Glas pinned at the right edge: one row of
   three fields reading as two groups at two ends. The three cells are equal now and the
   spare room is at the END of the row, where it says nothing. */
/* Very small, and the size IS the point: a label the same size as its value reads as a
   second value and doubles the apparent amount of information. */
.k-titel{
  font-size:var(--t-winzig); line-height:1.1; letter-spacing:.06em; text-transform:uppercase;
  color:var(--text-2); white-space:nowrap;
}
/* `overflow-wrap:anywhere` and not `break-word`, because the values that overflow are
   single unbroken tokens with no space to break at. Found by measuring Nr 66: the Diana
   Oktoberfest rifle's serial is 17 characters of monospace, and the detail page scrolled
   sideways by 13px at 360 and 4px at 390. `min-width:0` lets the GRID CELL shrink but does
   nothing about text that cannot break inside it, so the two are needed together and only
   one of them was here. It was never caught because layout_check measured Nr 40 and Nr 38,
   and neither has a long serial; it now measures Nr 66 as well. */
.k-wert{font-size:var(--t-normal); line-height:1.25; min-width:0; overflow-wrap:anywhere}
.k-identitaet .k-wert{font-weight:600}
.k-sn{font-family:ui-monospace,'SF Mono',Menlo,Consolas,monospace; font-size:var(--t-normal)}
/* The controls inside the rows lose the detail view's roomy 44px treatment on desktop,
   where there is a mouse, and keep it at phone widths where it is a tap target. */
/* Scoped to the PAGE and not to `.d-kompakt` since #31, which split the compact area
   into three blocks: the organisation row, the fields to change, and the information
   card. Two of the three sit outside `.d-kompakt`, so their controls kept the
   browser's own 120px-wide text input -- which overflowed a 360px phone by 27px --
   and a 34px select where the floor is 44. Every control on this page wants the same
   treatment, so the page is the right scope. */
.detail-seite .feld{width:auto}
.detail-seite .f-geld,.detail-seite .f-text{max-width:92px}
.detail-seite .f-auswahl,.detail-seite .f-geld,.detail-seite .f-text{
  font-size:var(--t-normal); padding:3px 5px; min-height:0;
  border-color:var(--line-2); background:var(--bg);
}
.k-geld .f-geld{text-align:right; font-variant-numeric:tabular-nums}
@media (max-width: 767px) {
  /* 44px on a phone, where these are tapped, and that floor is what the row heights
     are built around rather than something squeezed afterwards. */
  /* The snap to the spacing grid in #15 cost 2px here and the three rows went
     past the fold at 360px again. The block is the one place that is
     deliberately tighter than the grid: the owner asked for the contents
     "really pushed together". */
  .d-kompakt{gap:var(--s-1); margin-bottom:var(--s-2); font-size:var(--t-normal)}
  /* Between the photograph and the first row, which is the only gap above the three
     rows and therefore the only one that moves their bottom edge. Snapping the label
     size up to the --t-winzig step cost about 3px across five label lines and put them
     past the fold at 360px again. */
  .d-bilder{margin-bottom:var(--s-1)}
  /* Scoped to `.k-reihe` and not `.d-kompakt` since #30: the header line above the
     photograph is a compact row too and holds the editable Safe, which sits
     OUTSIDE `.d-kompakt` and therefore never got the floor. It came out 34px, and
     the block's own check could not see it because that check looks inside
     `.d-kompakt`. The page-wide smallest-target figure is what caught it. */
  .detail-seite .f-auswahl,.detail-seite .f-geld,.detail-seite .f-text{min-height:44px}
  /* The floors have to be lifted, and with ENOUGH SPECIFICITY to win. `.feld .f-text`
     sets `min-width:120px` further down the file, and at 0,2,0 against 0,2,0 the later
     rule wins -- so `min-width:0` here did nothing and the inputs stayed 120px wide,
     overflowing a 360px phone by 27px from the Kaeufer field in the Ziel cell and the
     third field in the row below. `.detail-seite .feld .f-text` is 0,3,0 and wins.
     
     The floors are right on a desktop, where a 120px text field and an 86px select are
     comfortable and the rows are wide. On a phone a cell is about 103px, so they are the
     difference between a page that fits and one that scrolls sideways. */
  .detail-seite .feld .f-geld,
  .detail-seite .feld .f-text,
  .detail-seite .feld .f-auswahl{
    max-width:100%; width:100%; min-width:0;
  }
  .k-titel{font-size:var(--t-winzig); letter-spacing:.04em}
  .k-wert{font-size:var(--t-normal)}
  .detail-seite .feld{width:100%}
}

/* 55vh on a phone, two thirds on a desktop.

   The figure has moved five times and this is the first time it has gone UP. #14 asked
   for two thirds of the screen; #20 cut the phone to 39vh because the three compact rows
   below had to be readable without scrolling; #24 took 37 for the longer clean names; #30
   took 35 for a header line of five cells above the picture, and very nearly broke the 35%
   floor that exists so the picture cannot be whittled away one issue at a time.

   #31 reversed the cause. The owner: "Above the picture should simply indicate: make,
   model, caliber as we've identified" -- one read-only line in place of that five-cell
   header with its input and its disclosure. The organisation row below now ends 566px
   down a 760px phone, which left 194px doing nothing, and the picture is what that space
   is for.

   Measured at both phone widths with the tallest real positions: 55vh ends the row at 718
   of 760 and 764 of 844, so there is 42px of margin where the budget used to run on 6.
   `layout_check` holds the figure and the fold, and it was 57vh that fitted -- 55 is the
   deliberate two points of slack. */
/* An ALLOWANCE, not a height (#41).

   Owner, 2026-10-10: "you can simply remove or at least reduce the top and lower border
   around the image, that will significantly save space". Those were not borders. They were
   letterbox bands, and they came out of two rules contradicting each other: the picture
   was told to take the section's whole height (`height:100%`) and to derive its width from
   its aspect ratio (`width:auto`) -- but only up to 88vw. On a landscape photograph
   `max-width` won, so the ELEMENT stayed 88vw by 55vh while the image inside it was
   `contain`ed to its own ratio, and the leftover was painted in `--panel-2` with the
   border drawn around the bands rather than around the picture.

   Measured at 360x760: 88vw is 317px, 55vh is 418px, and a 4:3 landscape photograph at
   317px wide is 238px tall. 180px of band, 90 above and 90 below -- more than the whole
   decision row is tall. That is also why the fotohoehe has been moved five times since
   #14: what was measured was the section, what the owner saw was the picture.

   So the number becomes a ceiling and the picture takes what it needs under it. A replaced
   element with `width:auto`, `height:auto` and BOTH maxima set is scaled down by the
   browser on its own intrinsic ratio (CSS 2.1 section 10.4), which is the one arrangement
   that cannot letterbox in either direction: no bands on a landscape photograph, and no
   bands beside a portrait one either, which a `max-height` with `width:100%` would have
   produced instead.

   One number in one place, as before, now as a custom property both rules read. */
.d-bilder{
  --bild-erlaubnis:45vh;
  max-height:var(--bild-erlaubnis);
  margin-bottom:var(--s-1); display:flex; flex-direction:column;
}
@media (min-width: 768px) {
  .d-bilder{--bild-erlaubnis:62vh}
}
/* One of the 66 has no photograph. Reserving the allowance for a picture that does not
   exist opens it as an empty grey box with the data below the fold, which is worse than
   having no rule at all. */
.d-bilder.ohne-bild{max-height:none}
.galerie{display:flex; gap:var(--s-3); overflow-x:auto; scroll-snap-type:x mandatory;
  -webkit-overflow-scrolling:touch;
  /* Takes what the pictures need, up to the allowance above, rather than stretching to
     fill it. `align-items:flex-start`, not `stretch`: stretching a figure taller than its
     picture puts the gap back where this issue took it from. */
  flex:0 1 auto; min-height:0; align-items:flex-start}
.galerie figure{flex:0 0 auto; scroll-snap-align:center; display:flex;
  flex-direction:column; min-height:0; max-width:100%}
.galerie img{
  display:block; width:auto; height:auto;
  max-width:100%; max-height:var(--bild-erlaubnis);
  border-radius:var(--r); cursor:zoom-in;
  /* No background and no frame on a phone: both drew the bands and not the picture, and
     there is nothing left for them to fill. A hairline comes back from 768px, where a
     photograph on a wide dark page runs into it without one. */
}
@media (min-width: 768px) {
  .galerie img{border:1px solid var(--line)}
}
/* Without a photograph the section collapses, so the placeholder is a line of text
   rather than a box pretending a picture is coming. */
.d-bilder.ohne-bild .kein-bild-text{margin:0 0 4px}
.galerie figcaption{
  font-size:var(--t-klein); color:var(--text-2); margin-top:var(--s-1);
  font-family:ui-monospace,'SF Mono',Menlo,Consolas,monospace;
}
.galerie-hinweis,.kein-bild-text{font-size:var(--t-klein); color:var(--text-2); margin-top:var(--s-2)}
/* Room for the scrollbar the swipe needs, and only where there is something to swipe:
   `padding-bottom` on every gallery is 6px under the single picture that 41 of the 66
   have, which is 6px of the band this issue exists to remove. */
.galerie.mehrere{padding-bottom:6px}

/* The three detail-view heading rules are `.block-titel` now. The only thing they
   needed that the shared form does not give them is the space above, which separates one
   block from the one before it. */
.detail-seite .block-titel{margin-top:var(--s-4)}
/* The `.d-felder` definition list was the detail page from #14 to #29: one
   label-and-value pair per line, seventeen lines of height for twelve values. #20
   replaced it with the compact rows and #31 with the blocks, and these five rules have
   matched nothing since. */
.d-hinweis{font-size:var(--t-klein); color:var(--text-2); display:block; margin-top:var(--s-1)}
.warnt{color:var(--warn); font-weight:600}

.notiz{background:var(--panel); border:1px solid var(--line);
  border-radius:var(--r); padding:10px 12px; margin-bottom:var(--s-3)}
/* The same typography as a block title and deliberately NO rail: there are four of
   these inside one block, and four rails would read as four blocks. Each note already
   carries a coloured left edge for its source, which is the distinction that matters. */
.notiz-quelle{font-size:var(--t-winzig); text-transform:uppercase; letter-spacing:.07em;
  font-weight:700; color:var(--text-2); margin-bottom:var(--s-1)}
.notiz.blatt{border-left:3px solid var(--line-2)}
.notiz.eigen{border-left:3px solid var(--accent)}
/* pre, so the merged part serials and any list annotation keep their line breaks and
   are never clipped: that note is the most value-relevant text on the page. */
.notiz pre{
  font-family:inherit; font-size:var(--t-normal); line-height:1.5;
  white-space:pre-wrap; overflow-wrap:anywhere;
}

.verlauf{list-style:none}
/* One entry, in two lines rather than five equal spans. Who and when is the context;
   what changed is the content. As five spans of one size the eye had to parse the order
   to know which was which, on the one page whose whole job is being readable as a
   record. */
.verlauf li{
  display:flex; flex-wrap:wrap; gap:2px 10px; font-size:var(--t-normal);
  padding:8px 0; border-bottom:1px solid var(--line);
}
.v-zeit{
  color:var(--text-2); font-variant-numeric:tabular-nums; font-size:var(--t-klein);
}
.v-wer{color:var(--accent); font-size:var(--t-klein); font-weight:600}
/* The field name is an identifier and reads as one, so a reader can tell `festpreis_cents`
   from a value somebody typed. */
.v-feld{
  color:var(--text-2); font-family:ui-monospace,Menlo,Consolas,monospace;
  font-size:var(--t-klein);
}
/* The change itself gets the line to itself and the body size. */
.v-wert{flex:1 1 100%}
.v-kontext{flex:1 1 100%; color:var(--text-2)}

.fehler{padding:48px 16px; max-width:460px}
.fehler h1{font-size:var(--t-titel); margin-bottom:var(--s-3)}
.fehler p{font-size:var(--t-normal); margin-bottom:var(--s-2); color:var(--text-2)}

/* ---- image lightbox, the Cortex pattern ---- */
#lightbox{
  position:fixed; inset:0; z-index:90; padding:20px;
  background:rgba(10,12,15,.94);
  display:flex; align-items:center; justify-content:center; cursor:zoom-out;
}
#lightbox.hidden{display:none}
#lightbox img{max-width:95vw; max-height:92vh;
  border:1px solid var(--line-2); border-radius:var(--r)}
#lightbox .lb-cap{
  position:fixed; bottom:12px; left:50%; transform:translateX(-50%);
  font-family:ui-monospace,Menlo,Consolas,monospace; font-size:var(--t-winzig);
  letter-spacing:.09em; color:var(--text-2);
}

@media (min-width:1024px){
  .detail-seite{display:flex; height:calc(100vh - var(--nav-h)); overflow:hidden}
  .detail{flex:1 1 auto; min-width:0; min-height:0; overflow-y:auto;
    padding:0 28px 40px; max-width:1100px; margin:0 auto}

}

/* ---------------------------------------------------------------- editable fields

   Controls that look like text until touched. A list of 66 positions where every cell
   is drawn as a form field reads as a wall of boxes; these stay quiet and declare
   themselves on hover and focus.

   That reasoning survives for the dense TABLE and was wrong for the detail page, which
   is the other half of "not differentiated enough": on a page with eight controls and
   twenty read-only values, you cannot see which is which until you touch one. So the
   detail page gives them a visible resting state below, and the table keeps the quiet
   one with a dotted underline to mark a cell as changeable. */

.feld{position:relative; display:inline-block; max-width:100%}
.feld input,.feld select,.feld textarea{
  font-family:inherit; font-size:var(--t-normal); color:var(--text);
  background:transparent; border:1px solid transparent; border-radius:4px;
  padding:6px 7px; min-height:34px; width:100%; outline:none;
}
.feld input:hover,.feld select:hover,.feld textarea:hover{
  border-color:var(--line-2); background:var(--panel);
}
.feld input:focus,.feld select:focus,.feld textarea:focus{
  border-color:var(--accent); background:var(--bg);
}
.feld .f-geld{text-align:right; font-variant-numeric:tabular-nums; min-width:80px}
.feld .f-auswahl{min-width:86px}
.feld .f-text{min-width:120px}
.feld-breit{display:block; width:100%}
.feld .f-notiz{
  display:block; width:100%; resize:vertical; line-height:1.5;
  border-color:var(--line-2); background:var(--bg); min-height:70px;
}
.feld.sendet input,.feld.sendet select,.feld.sendet textarea{opacity:.55}

/* #35. Visible at rest on the detail page: raised surface, real border. Hover and focus
   keep the treatments they have had since #15, so the three states stay distinct. */
.detail-seite .feld input,
.detail-seite .feld select,
.detail-seite .feld textarea{
  background:var(--panel-2); border-color:var(--line);
}
/* In the table a border per cell would be the wall of boxes, so the mark is a dotted
   underline: enough to tell an editable cell from a fixed one at a glance down 66 rows,
   not enough to draw a grid. */
.tabelle td.zelle-edit .feld input,
.tabelle td.zelle-edit .feld select{
  border-bottom:1px dotted var(--line-2);
}
.tabelle td.zelle-edit .feld input:hover,
.tabelle td.zelle-edit .feld select:hover,
.tabelle td.zelle-edit .feld input:focus,
.tabelle td.zelle-edit .feld select:focus{border-bottom-style:solid}

.f-meldung{display:none}
.f-meldung.ist-fehler,.f-meldung.ist-warnung{
  display:block; font-size:var(--t-klein); line-height:1.35; margin-top:var(--s-1); max-width:220px;
}
.f-meldung.ist-fehler{color:var(--bad)}
.f-meldung.ist-warnung{color:var(--warn)}

/* A saved field settles back to normal; a refused one stays visibly refused until the
   next attempt; a change made by one of the others arrives in the accent colour so it
   is clear it was not you. */
@keyframes quittung{from{background:rgba(127,168,106,.28)} to{background:transparent}}
@keyframes abgelehnt{from{background:rgba(199,84,80,.32)} to{background:transparent}}
@keyframes fremd{from{background:rgba(110,155,196,.30)} to{background:transparent}}
.feld.gespeichert input,.feld.gespeichert select,.feld.gespeichert textarea{
  animation:quittung 1.1s ease-out;
}
.feld.abgelehnt input,.feld.abgelehnt select,.feld.abgelehnt textarea{
  animation:abgelehnt 1.6s ease-out;
}
.feld.fremd input,.feld.fremd select,.feld.fremd textarea{
  animation:fremd 2.2s ease-out;
}

.tabelle td.zelle-edit{padding:2px 4px; white-space:nowrap}
/* #12 added Kaeufer and Interesse to the table, which pushed it 37px past 1280 and
   put the two right-hand decision columns off screen. Both are trimmed here rather
   than dropped from the table: the point of the dense surface is that every decision
   field is reachable without opening a position. */
/* `min-width` beats `max-width` in CSS, so the 120px floor on .f-text was what made
   Glas and Kaeufer 128px wide each and pushed the table 120px past 1280. The cap alone
   did nothing until the floor was lifted with it. */
.tabelle td.zelle-edit .f-text{min-width:0; max-width:80px}
/* Spanne is read-only and the least decision-critical column in the table, so it is
   the right one to truncate when a column has to give: the full range is in the title
   and on the detail page. */
.tabelle .lang-spanne{
  display:inline-block; max-width:84px; overflow:hidden;
  text-overflow:ellipsis; white-space:nowrap; vertical-align:bottom;
}
.tabelle .mark{min-width:22px; min-height:22px; padding:0 2px; font-size:var(--t-winzig)}
.tabelle .marken{gap:var(--s-1); flex-wrap:nowrap}
.tabelle td.zelle-marken{padding:2px 4px; white-space:nowrap}
.tabelle td.zelle-edit .f-meldung.ist-fehler,
.tabelle td.zelle-edit .f-meldung.ist-warnung{
  position:absolute; z-index:15; left:0; top:100%;
  background:var(--panel); border:1px solid var(--line-2); border-radius:4px;
  padding:5px 7px; width:210px; box-shadow:0 4px 14px rgba(0,0,0,.45);
}

/* The four `.d-felder dd .feld` rules went with the definition list in #37. The detail
   page sizes its controls through `.detail-seite .feld`, which is scoped to the page
   rather than to a container, for the reason #31 recorded: splitting the compact area
   left two of three blocks outside the old scope and their controls at the browser's
   own size. */

.feed li{align-items:baseline}
.v-pos{color:var(--accent)}

/* In the table, a select sized to a fixed width clipped its own text: "unentschieden"
   read as "unentschie" and "reserviert" as "reservier", which is worse than a narrow
   column. These size to their longest option instead, and the width comes back off
   the Art and Marke columns, which were already showing an ellipsis. */
.tabelle .feld{max-width:none}
.tabelle .feld .f-auswahl{width:auto; min-width:0; font-size:var(--t-normal); padding:6px 2px 6px 5px}
.tabelle .feld .f-geld{min-width:76px; font-size:var(--t-normal)}

/* ---------------------------------------------------------------- the login page

   It was the first page that existed and it carried an embedded stylesheet with its own
   `:root`: six colours copied out of the palette, which meant the palette had two versions
   and the guard that refuses a colour outside it could not see one of them. Its type sizes
   were its own too -- 1.15 / .95 / .82 / .8 / .78 / .72rem, none of them a step of the
   scale, and the last sizes in the app outside it.

   Three of its elements have no equivalent elsewhere and live here: the centred column,
   the primary button, and the two message boxes. Everything else is the shared form. */

.login-seite{
  min-height:100vh; display:flex; align-items:flex-start; justify-content:center;
  padding:24px 16px 48px;
  /* No bottom nav on this page, so it does not need the room every other page leaves. */
  padding-bottom:48px;
}
.login-seite .wrap{width:100%; max-width:380px}
.login-seite h1{font-size:var(--t-titel); font-weight:600; letter-spacing:.04em}
.login-seite .sub{font-size:var(--t-klein); color:var(--text-2); margin-bottom:var(--s-5)}
.login-seite .block{padding:var(--s-4); margin-bottom:var(--s-4)}
.login-seite .hint{
  font-size:var(--t-klein); color:var(--text-2); line-height:1.45;
  margin-bottom:var(--s-4);
}
.login-seite label{
  display:block; font-size:var(--t-winzig); font-weight:700; letter-spacing:.06em;
  text-transform:uppercase; color:var(--text-2); margin-bottom:6px;
}
.login-seite input,.login-seite select,.login-seite button{
  width:100%; font-family:inherit; font-size:var(--t-normal);
  border-radius:var(--r); outline:none;
}
.login-seite input,.login-seite select{
  padding:12px; background:var(--panel-2); border:1px solid var(--line-2);
  color:var(--text); margin-bottom:var(--s-4); min-height:46px;
}
.login-seite input:focus,.login-seite select:focus{border-color:var(--accent)}
.login-seite button{
  padding:13px; min-height:46px; background:var(--line);
  color:var(--text); border:1px solid var(--line); cursor:pointer; font-weight:500;
}
.login-seite button:hover{background:var(--line-2)}
/* The one affirmative button in the app: on this page there is a thing you came to do. */
.login-seite button.primary{
  background:var(--accent); border-color:var(--accent); color:var(--bg); font-weight:600;
}
/* A refusal and a confirmation. Both keep the tinted-box treatment the warning block on
   the Abrechnung has, so the three read as one family. */
.login-seite .err,.login-seite .ok{
  font-size:var(--t-klein); line-height:1.45; padding:10px 12px;
  border-radius:var(--r); margin-bottom:var(--s-4);
}
.login-seite .err{
  background:color-mix(in srgb, var(--bad) 12%, transparent);
  border:1px solid var(--bad); color:var(--bad);
}
.login-seite .ok{
  background:color-mix(in srgb, var(--accent) 12%, transparent);
  border:1px solid var(--accent); color:var(--accent);
}
.login-seite .foot{
  font-size:var(--t-winzig); color:var(--text-2); text-align:center; line-height:1.5;
}

/* ---------------------------------------------------------------- Abrechnung */

.abr{padding:0 16px 24px; max-width:860px}
/* A block of the shared form. The section had a top margin and a hairline grid and
   nothing else, on the one page in this app where the numbers are money. */
.abr-block{margin-top:var(--s-4)}
/* `.abr-block h2` was the fifth of the six. */
.abr-dl{display:grid; grid-template-columns:minmax(120px,46%) 1fr; gap:1px 12px}
.abr-dl dt{font-size:var(--t-normal); color:var(--text-2); padding:8px 0;
  border-bottom:1px solid var(--line)}
.abr-dl dd{font-size:var(--t-normal); padding:8px 0; border-bottom:1px solid var(--line)}
.abr-dl dd.zahl{text-align:right; font-variant-numeric:tabular-nums}
/* The figures the page is opened for. `stark` marks them in the markup already; this is
   what makes them look like the answer rather than like the seventeenth row. */
.abr-dl dd.stark{font-size:var(--t-gross); font-weight:700}
.abr-dl dd .feld{width:100%}
.abr-dl dd .feld .f-geld{
  border-color:var(--line-2); background:var(--bg); min-height:44px; font-size:var(--t-gross);
}

.warnblock{
  margin:16px 0 0; padding:11px 13px; border-radius:var(--r);
  background:rgba(217,164,65,.12); border:1px solid var(--warn); color:var(--warn);
  font-size:var(--t-normal); line-height:1.45;
}

.abr-tabelle{font-size:var(--t-normal)}
/* The table head is the same form without the rail: a column heading is not a
   section. */
.abr-tabelle th{
  text-transform:uppercase; font-size:var(--t-winzig); font-weight:700;
  letter-spacing:.07em; color:var(--text-2);
}
.tabelle-rahmen.offen{display:block; overflow-x:auto; max-height:none}
/* Who owes whom is exactly the kind of thing you search a settlement for rather than
   read, so it is a badge like `stand` and `ziel` (#36). The sign stays in the number. */
.plakette.schuldet,.plakette.bekommt{
  text-transform:none; letter-spacing:0; font-variant-numeric:tabular-nums;
  font-size:var(--t-normal);
}
.schuldet{
  color:var(--bad); border-color:color-mix(in srgb, var(--bad) 45%, transparent);
  background:color-mix(in srgb, var(--bad) 14%, transparent);
}
.bekommt{
  color:var(--good); border-color:color-mix(in srgb, var(--good) 45%, transparent);
  background:color-mix(in srgb, var(--good) 14%, transparent);
}

.auslagen{list-style:none; margin-bottom:14px}
.auslagen li{
  display:flex; flex-wrap:wrap; gap:var(--s-1) 10px; align-items:baseline;
  padding:9px 0; border-bottom:1px solid var(--line); font-size:var(--t-normal);
}
.a-datum{color:var(--text-2); font-variant-numeric:tabular-nums}
.a-wer{color:var(--accent)}
.a-zweck{flex:1 1 120px}
.a-betrag{font-variant-numeric:tabular-nums; font-weight:600}
.a-weg{
  background:none; border:1px solid var(--line-2); color:var(--text-2);
  font-family:inherit; font-size:var(--t-klein); padding:6px 9px; border-radius:4px;
  cursor:pointer; min-height:44px;
}
.a-weg:hover{border-color:var(--bad); color:var(--bad)}

.auslage-neu{display:flex; flex-wrap:wrap; gap:var(--s-2); align-items:flex-start}
.auslage-neu input,.auslage-neu select,.auslage-neu button{
  font-family:inherit; font-size:var(--t-normal); min-height:44px; padding:9px 10px;
  background:var(--panel); color:var(--text);
  border:1px solid var(--line-2); border-radius:var(--r); outline:none;
}
.auslage-neu input[name=datum]{flex:0 0 150px}
.auslage-neu select{flex:0 0 120px}
.auslage-neu input[name=zweck]{flex:1 1 150px; min-width:0}
.auslage-neu input[name=betrag]{flex:0 0 110px; text-align:right}
.auslage-neu button{flex:0 0 auto; background:var(--line); border-color:var(--line);
  cursor:pointer; font-weight:500}
.auslage-neu button:hover{background:var(--line-2)}
.auslage-neu .f-meldung{flex:1 1 100%}


/* The Salden table stacks on a phone. Seven columns needed 257px of sideways
   scrolling at 360px, and a settlement you have to drag around to read is a
   settlement nobody checks. Labels come from data-label on each cell. */
@media (max-width:767px){
  .abr-tabelle thead{display:none}
  .abr-tabelle,.abr-tabelle tbody,.abr-tabelle tr,.abr-tabelle td{display:block; width:100%}
  .abr-tabelle tr{
    border:1px solid var(--line); border-radius:var(--r);
    margin-bottom:var(--s-3); padding:4px 10px; background:var(--panel);
  }
  .abr-tabelle td{
    display:flex; justify-content:space-between; align-items:baseline; gap:var(--s-3);
    border-bottom:1px solid var(--line); padding:8px 0; white-space:normal;
  }
  .abr-tabelle td:last-child{border-bottom:none}
  .abr-tabelle td::before{
    content:attr(data-label); color:var(--text-2); font-size:var(--t-klein); flex:0 0 auto;
  }
  .abr-tabelle td:first-child{font-weight:600; font-size:var(--t-gross)}
  .abr-tabelle td:first-child::before{content:none}
  .abr-tabelle td.geld{text-align:right}
  .tabelle-rahmen.offen{overflow-x:visible}
}

/* ---------------------------------------------------------------- photographs */

.galerie figcaption{
  display:flex; gap:var(--s-2); margin-top:var(--s-1); align-items:center;
}
.galerie figcaption button{
  background:none; border:1px solid var(--line-2); color:var(--text-2);
  font-family:inherit; font-size:var(--t-klein); padding:7px 9px; border-radius:4px;
  cursor:pointer; min-height:44px;
}
.galerie figcaption .b-weg:hover{border-color:var(--bad); color:var(--bad)}
.galerie figcaption .b-vor:hover{border-color:var(--accent); color:var(--accent)}

.bild-upload{margin-top:var(--s-3)}
.bild-waehlen{
  display:inline-flex; align-items:center; min-height:44px; cursor:pointer;
  padding:0 14px; border:1px dashed var(--line-2); border-radius:var(--r);
  color:var(--text-2); font-size:var(--t-normal);
}
.bild-waehlen:hover{border-color:var(--accent); color:var(--text)}
/* The input itself is hidden behind its label: a bare file input cannot be styled
   and is a 20px target on a phone. */
.bild-waehlen input[type=file]{
  position:absolute; width:1px; height:1px; opacity:0; overflow:hidden;
}
.bild-upload .f-meldung{margin-top:var(--s-2)}

/* Three note sources, three accents: the owner's working list, the inventory list,
   and what the partners typed themselves. */
.notiz.arbeit{border-left:3px solid var(--warn)}


/* The nav is fixed on every page at every width. Which tab is current is marked,
   because three identical links give no sense of place. */
.unten a.hier{color:var(--text); box-shadow:inset 0 2px 0 var(--accent)}

/* ---- #30: the detail view, line by line -----------------------------------
   Owner, 2026-10-08: "harmonize sizes and format, so everything fits into the line and
   has the same height, titles are kept small above as you did for most".

   Three things were uneven before, and all three were the same cause: a cell's height was
   whatever its contents happened to be. A `select` is one height, a text input another, a
   run of plain text a third, and across five cells in a row that reads as a ragged edge
   rather than a line. So the VALUE row of every cell gets one height and everything inside
   it is stretched to fill it. */
.k-reihe .k-wert{display:flex; align-items:stretch; min-height:var(--k-hoehe)}
.k-reihe .k-wert > *{align-self:stretch}
.k-reihe .feld,.k-reihe .feld > select,.k-reihe .feld > input{width:100%}
/* Plain text has no control to stretch, so it is centred in the same height instead of
   sitting on the top edge next to one that is. */
.k-reihe .k-wert:not(:has(.feld)){align-items:center}
:root{
  /* 44px on a phone is the tap-target floor the rows have been built around since #13,
     and it is what a select and an input both come out at there. On a desktop the
     controls are 26px and the floor would be 18px of empty space per row. */
  --k-hoehe:44px;
}
@media (min-width: 768px) {
  /* 30px since #35, not 28. A select with 15px text comes out 30px tall on its own, so
     the old figure left the plain-text cells at 28 and the controls at 30: a 2px spread,
     which is exactly at the limit the row-harmonising check allows and would fail on the
     next pixel anybody spends. The row is built around the tallest thing in it. */
  :root{--k-hoehe:30px}
  /* The marks are buttons sized for a thumb, 44px since #13. In a compact row on a
     DESKTOP, where the row's own height is 28px, they stood 16px proud of every cell
     beside them -- exactly the ragged edge the owner asked to be harmonised, and which
     the per-row spread measurement in `layout_check` found the moment it existed. There
     is a mouse here and no thumb, so they come down to the row. */
  .d-kompakt .mark{min-width:28px; min-height:28px}
}

/* The #30 header line is gone. It put five cells above the photograph, one of them an
   input and one the whole permit behind a disclosure, and the owner's verdict on
   2026-10-09 was that the page had become worse for it: nothing up there simply stood
   there to be read. #31 replaced it with one read-only line (`.d-ist`) and moved the
   permit to a card at the end (`.d-karte`), so every `.k-papier` and `.d-papier` rule
   that used to live here targets nothing and is deleted rather than left to rot. */
/* `tag-kat` stood here and matched nothing: the legal category became a line of the
   permit card in #30 and the class left the markup with the cell it was in. */

/* ---- #31: the detail view as the owner corrected it -----------------------
   Read above the picture, organise below it, change below that, notes, then the permit as
   a card. #30 mixed those and the result was a page with no readable top: every value up
   there was a control or a source note. */

/* 1. What the weapon IS. One line, no controls, and it is the only thing above the
   picture now -- which is also what buys the photograph its height back. */
.d-ist{
  display:flex; flex-wrap:wrap; align-items:baseline; gap:2px 8px;
  margin:0 0 var(--s-1); font-size:var(--t-normal); line-height:1.3;
}
.d-ist-nr{
  color:var(--text-2); font-variant-numeric:tabular-nums;
  font-family:ui-monospace,'SF Mono',Menlo,Consolas,monospace; font-size:var(--t-klein);
}
/* The title step, and the only text on the page that is read from further than arm's
   length: it is what tells you which of the 66 you have open. */
.d-ist-name{font-weight:600; font-size:var(--t-titel); line-height:1.2}
.d-ist-kaliber{color:var(--text-2); font-size:var(--t-klein)}
/* An open question, not a mistake: 22 of the 66 carry one, and --warn on a third of the
   list is how a colour stops meaning anything on the ones where it does. */
/* A ghost badge (#37), not italic grey. An open name is a different KIND of statement
   from the name itself, and 22 of the 66 carry one -- so it needs a form, and it must not
   be the warning colour. The badge form gives it the first and `--text-2` the second. */
.d-ist-offen{letter-spacing:0; text-transform:none}

/* 4. The fields to change. Its own block with its own heading, because the separation
   from the reading line above the picture IS the correction. */
.d-aendern .k-reihe{border-bottom:0; padding-bottom:0}
/* The organisation row's own border is the block edge now, so the rule inside it goes. */
.d-kompakt .k-reihe{border-bottom:0; padding-bottom:0}
/* The blocks sit tighter on the detail page than the shared form's default: there are
   five of them above the Protokoll and the phone fold is the budget. */
.detail-seite .block{padding:var(--s-2) var(--s-3); margin-bottom:var(--s-2)}
.detail-seite .block-titel{margin-top:0}

/* 6. The information card. "displayed differently, like a fixed entry, different color,
   more like an information card" -- so it carries its own background and border rather
   than only a different type size, which is what makes it read as a separate object
   instead of one more section. */
/* A `block` with its own layout, not a second definition of one. It carried the same
   four declarations as `.block` after #35 added that form, which the mutation pre-flight
   caught: the guard on the card's surface matched two rules and would have mutated
   whichever came first. The surface comes from the class in the template now, and this
   rule says only what is different about a card. #37 gives it the raised fill and the
   neutral rail that make it read as a reproduction rather than as one of our own
   sections. */
.d-karte{
  display:grid; gap:var(--s-3); margin-bottom:var(--s-4);
}
/* What makes it read as a document and not as one of our sections, now that every section
   has a surface: the RAISED fill, and a rail that is not the accent. In this system the
   accent means "ours, and you can act on it" -- and after #33 there is nothing on this
   card to act on. It is also the only block with no control in it at all, which is the
   other half of the same statement. */
.detail-seite .d-karte{background:var(--panel-2); border-color:var(--line-2)}
.d-karte .block-titel::before{background:var(--line-2)}
/* `.d-karte h2` was the sixth. The card's rail is not the accent -- see #37. */
.d-karte dl{
  display:grid; grid-template-columns:auto 1fr; gap:2px var(--s-2); margin:0;
  font-size:var(--t-klein);
}
.d-karte dt{color:var(--text-2); white-space:nowrap}
.d-karte dd{margin:0; min-width:0; overflow-wrap:anywhere}
/* The permit half is a reproduction and reads like one: the seller's own wording, his own
   dashes, wrapped as prose. */
.d-karte .karte-prosa{white-space:normal; line-height:1.35}
.d-karte .sn{font-family:ui-monospace,'SF Mono',Menlo,Consolas,monospace}
/* The seller's own remark, under a rule and named as his (#33). The rule is what makes
   the card two things: a registration above it, a quotation below it. */
.karte-bemerkung{
  margin-top:var(--s-2); padding-top:var(--s-2); border-top:1px solid var(--line-2);
}
.karte-quelle{
  font-size:var(--t-winzig); letter-spacing:.06em; text-transform:uppercase;
  color:var(--text-2); margin-bottom:2px;
}
/* The two air rifles. No permit line, so no card -- a line of text instead of a box
   pretending to reproduce a document that does not exist. */
.d-ohne-wbk{
  font-size:var(--t-klein); color:var(--text-2); line-height:1.4;
  margin-bottom:var(--s-4);
}
.d-ohne-wbk .sn{font-family:ui-monospace,'SF Mono',Menlo,Consolas,monospace}

/* Two readings of one weapon differing is a fact about the paperwork, not an error, so
   this is a note and not a warning. #21 and #22 each had to remove one that was. */
.karte-abweichung{
  margin:var(--s-2) 0 0; font-size:var(--t-winzig); color:var(--text-2);
  line-height:1.35;
}
/* The card holds no control at all since #33. `.karte-uns` and its two sizing rules went
   with the half they belonged to: the owner asked for the WBK information to be fixed
   throughout and separated from everything of ours. */

/* ---- #32: the filters behind a button on a phone --------------------------
   Owner, 2026-10-09: "Hide the filter options on mobile behind a button, next to the
   search field."

   Eight selects plus the search stood flat underneath each other and pushed the first
   position far down the page. The mechanism is the checkbox and label from #15, for the
   reason recorded there: a closed `details` hides its content through the internal slot,
   which no rule on the child can override, so it could not be forced open again from
   768px. A checkbox is controllable from CSS in both directions, needs no JavaScript, and
   is reachable from a keyboard because it is a real input. */
.filter{flex-direction:column; align-items:stretch}
.filter-kopf{display:flex; gap:var(--s-2); align-items:stretch}
.filter-kopf input[type=search]{flex:1 1 auto; min-width:0}
.filter-schalter{position:absolute; opacity:0; width:1px; height:1px; margin:0}
/* Beside the search field, which is where he asked for it, and a 44px tap target. */
.filter-knopf{
  display:inline-flex; align-items:center; gap:6px; flex:0 0 auto;
  min-height:44px; padding:0 12px; cursor:pointer;
  font-size:var(--t-normal); font-weight:500;
  background:var(--panel); color:var(--text);
  border:1px solid var(--line-2); border-radius:var(--r);
}
.filter-knopf::after{content:"+"; color:var(--accent); font-weight:600}
/* Through `.filter-kopf` since #42, because the switch left it. Both of these used to be
   `+ .filter-knopf` and both WORKED -- the label really was the switch's next sibling --
   which is why the button kept answering a tap while the fields it was supposed to open
   stayed shut: the opening rule reached one level too high and these two did not. */
.filter-schalter:checked ~ .filter-kopf .filter-knopf::after{content:"\2212"}
.filter-schalter:focus-visible ~ .filter-kopf .filter-knopf{
  outline:2px solid var(--accent); outline-offset:2px;
}
/* How many filters are active. A collapsed filter area that does not admit to filtering
   is why the list is shorter than it should be with nobody able to see why. */
/* The count beside the filter button. A badge too, but a filled one: it is a number
   somebody has to notice, not a state to scan past. */
.filter-zahl{
  display:inline-flex; align-items:center; justify-content:center;
  min-width:18px; height:18px; padding:0 4px; border-radius:9px;
  background:var(--accent); color:var(--bg); border-color:var(--accent);
  letter-spacing:0;
}
.filter-felder{display:none; flex-wrap:wrap; gap:var(--s-2)}
/* The one rule that opens them, at every width. The switch is a preceding sibling of this
   element since #42 and the relation is asserted against the rendered HTML, not against
   the text of this line: the test that guarded it held the literal selector string, which
   the broken version satisfied exactly. */
.filter-schalter:checked ~ .filter-felder{display:flex}
.filter-felder select{flex:1 1 calc(50% - 4px); min-width:0}
/* Closed on EVERY width since #34 (owner, 2026-10-10: "also hide the filters by default
   on the desktop"). #32 reopened them from 768px on the grounds that there was room, and
   room is not a reason for something to be on the screen: six dropdowns reading "alle" in
   nineteen cases out of twenty are six rows of controls above the list they are hiding.

   The 768px block that forced them open and hid the button is gone, so the mechanism is
   the same at every width and there is one behaviour to reason about instead of two. On a
   desktop the table gains the height: `.liste-seite` is a flex column, and what the filter
   bar does not take goes to the 66 rows.

   The search field stays visible at every width. Searching is the one action that must not
   be behind a disclosure. */
@media (min-width: 768px) {
  /* The bar still lays out in a row here; only the disclosure is unchanged. */
  .filter{flex-direction:row; flex-wrap:wrap; align-items:center}
  .filter-kopf{flex:1 1 100%}
  .filter-felder{flex:1 1 100%}
  /* The opening rule is NOT repeated here. It was, identically, and a second copy of the
     rule that decides whether the filters can be reached is a second place for it to go
     wrong. Nothing in this block touches `display`, so the base rule governs both
     states at both widths. */
}

/* The two buckets #32 added to the bar. Neither is a person, so neither takes a partner
   colour: "for us" is the three of them together and reads as the accent, "Verkauf" and
   "offen" borrow the words the Stand strip already uses. */
.s-uns{border-left-color:var(--accent)}
.s-uns .summe-name{color:var(--accent)}
.s-verkauf{border-left-color:var(--mark-verkauf)}
.s-verkauf .summe-name{color:var(--mark-verkauf)}
.s-keiner{border-left-color:var(--line-2)}
.s-keiner .summe-name{color:var(--text-2)}

/* ---------------------------------------------------------------- holder tables (#47)

   One block per holder: the table that goes into his contract, the three numbers the
   contract sentence needs, and a button that puts the tab separated version on the
   clipboard.

   The table gets its OWN frame and not `.tabelle-rahmen`, which is `display:none`
   outside the list page at 1024px and would have hidden this everywhere. This one
   always shows and scrolls sideways itself, so six columns of serial numbers never make
   the PAGE overflow. */
.halter-rahmen{overflow-x:auto; -webkit-overflow-scrolling:touch}
.halter-tabelle{min-width:100%; width:max-content}
/* The header does not stick here. In the list it sticks because its own frame is the
   scrollport and 66 rows scroll under it; here the frame scrolls sideways only, so a
   sticky header would pin itself to the viewport and float over the block above. */
.halter-tabelle thead th{position:static}
.halter-tabelle td{white-space:nowrap}

.halter-kopf{
  display:flex; align-items:center; justify-content:space-between;
  gap:var(--s-2); flex-wrap:wrap;
}
.halter-kopf .block-titel{margin-bottom:0; font-size:var(--t-klein)}

.halter-kopieren{
  background:var(--line); border:1px solid var(--line); color:var(--text);
  font-family:inherit; font-size:var(--t-klein); font-weight:500;
  padding:0 var(--s-3); border-radius:var(--r); cursor:pointer;
  /* 44px, because this is tapped on a phone standing in front of a safe. */
  min-height:44px; min-width:44px;
}
.halter-kopieren:hover{border-color:var(--text-2)}
/* A failed copy SAYS so. A button that silently did nothing looks exactly like one that
   worked, and then he pastes whatever was on the clipboard before. */
.halter-kopieren.schlecht{
  color:var(--bad);
  border-color:color-mix(in srgb, var(--bad) 45%, transparent);
  background:color-mix(in srgb, var(--bad) 12%, var(--panel-2));
}

.halter-zahlen{
  font-size:var(--t-klein); color:var(--text-2);
  margin:var(--s-2) 0 var(--s-3);
}
.halter-zahlen strong{color:var(--text)}

.halter-text{margin-top:var(--s-3); font-size:var(--t-klein)}
.halter-text summary{color:var(--text-2); cursor:pointer; min-height:44px;
  display:flex; align-items:center}
.halter-text summary:hover{color:var(--text)}
.halter-text textarea{
  width:100%; margin-top:var(--s-2); box-sizing:border-box;
  font-family:ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size:var(--t-winzig); line-height:1.5;
  background:var(--panel-2); color:var(--text);
  border:1px solid var(--line-2); border-radius:var(--r); padding:var(--s-2);
  white-space:pre; overflow:auto; resize:vertical;
}

/* A list of positions to go and look at, so every link in it is a thumb target like
   any other. Without this they were 17px, which layout_check measured and refused:
   44px on every page at phone widths is a standing rule, and a link inside a list item
   is not an exception to it. */
.halter-liste{margin:0; padding-left:1.1em; font-size:var(--t-klein)}
.halter-liste li{
  display:flex; align-items:center; flex-wrap:wrap; gap:var(--s-1) var(--s-2);
  color:var(--text-2);
}
.halter-liste a{
  color:var(--text); display:inline-flex; align-items:center; min-height:44px;
}
.halter-grund{color:var(--text-2)}

/* Something that needs doing, not something that went wrong: a position with a holder
   but no permit line leaves the contract generator with a cell it cannot fill. */
.halter-warnung{
  border-color:color-mix(in srgb, var(--warn) 40%, transparent);
  background:color-mix(in srgb, var(--warn) 10%, var(--panel));
}
.halter-warnung .block-titel{color:var(--warn)}
.halter-warnung .block-titel::before{background:var(--warn)}
