/* The frame of every case study (Brief 16, draft A): the identity block as the top bar, the title block, and the sign-off
   with the identity block in full, the next case study as a small link and the homepage's footer line. Loaded after the
   page's own <style>, with ../shared/identity/identity.css. Type and colour are the homepage's (the id- tokens), never the
   page's. */
html body { padding-bottom: 0; }

/* Every case page stands on the homepage's ground and ink, light and dark (Dom, 16 Nov: one light ground for all; Dom,
   20 Nov 2026: "Projektseiten und Legal ... sollten im dunklen Modus auch dunkel sein"). The page's own ground and ink tokens
   are overridden here (important, so the pages' own dark scheme blocks lose); dark follows .dark on <html>, which
   identity.js sets with the homepage's switch, and takes the tokens from identity.css. case.js drops the dark scheme
   <source>s of the pictures, so the screens stay the same in both. Tile grounds and accent tokens (--plate-ground, --clay,
   --surface, --orange) stay the page's; where a page's own colours need a dark value, the page sets it under :root.dark. */
:root {
  color-scheme: light !important;
  --paper: #fff !important; --page: #fff !important;
  --ink: #121212 !important; --body: #121212 !important;
  --ink-2: #0000008c !important; --ink-3: #0000008c !important;
  --line: color-mix(in srgb, #121212 8%, transparent) !important;
}
:root.dark {
  color-scheme: dark !important;
  --paper: var(--id-bg) !important; --page: var(--id-bg) !important;
  --ink: var(--id-fg) !important; --body: var(--id-fg) !important;
  --ink-2: var(--id-muted) !important; --ink-3: var(--id-muted) !important;
  --line: rgb(var(--id-surface) / .12) !important;   /* the homepage's dark hairline (.dark .b-bar, .fx-hair) */
}

/* the top: the bar, then the title block (the same on all five pages) */
.cs-head > dm-identity { min-height: 68px; padding-top: 24px; }
.cs-title { padding: 56px 0 40px; color: var(--id-fg); font-family: var(--id-sans); -webkit-font-smoothing: antialiased; }
.cs-label { margin: 0 0 12px; font: 500 10px/14px var(--id-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--id-muted); }
.cs-title h1 { margin: 0; max-width: none; font-family: var(--id-sans); font-weight: 400; font-size: round(clamp(22px, calc(19.77px + .5714vw), 28px), 1px);
  line-height: round(1.2em, 1px); letter-spacing: -.02em; color: var(--id-fg); text-wrap: balance; }
.cs-title h1 span { color: var(--id-muted); }
/* the live product under the line: one plain link, the homepage's link with its outward arrow (the sidebar's .p-link) at
   15 px, never a button; 44 px high, the negative margin keeps the 40 px to the first tile under its text */
.cs-live { display: flex; width: max-content; align-items: center; gap: 3px; min-height: 44px; margin: 4px 0 -12px; font-size: 15px; line-height: 21px;
  color: var(--id-fg); text-decoration: none; border-radius: 4px; }
.cs-live::after { content: ""; flex: none; width: 14px; height: 14px; background: var(--id-muted); transition: background-color 150ms;
  -webkit-mask: var(--cs-arrow) center / contain no-repeat; mask: var(--cs-arrow) center / contain no-repeat;
  /* Brief 64: the arrow's line is as thick as the link text's stems (the homepage's rule for line icons, start/tools/home22.py):
     Geist 400's stem 0.084 em x 15 px = 1.26 px, in the 14 px arrow's 24-unit box 1.26 x 24 / 14 = 2.16 */
  --cs-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.16' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 7h10v10'/%3E%3Cpath d='M7 17 17 7'/%3E%3C/svg%3E"); }
.cs-live:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.cs-live:hover::after { background: var(--id-fg); }
.cs-live:focus-visible { outline: 2px solid var(--id-fg); outline-offset: 2px; }

/* the sign-off: on the page's own ground, after space and one hairline (the homepage's 0.5 px line) */
.cs-end { margin-top: 128px; padding-top: 64px; box-shadow: inset 0 .5px 0 rgb(var(--id-surface) / .14);
  font: 400 17px/23.8px var(--id-sans); letter-spacing: normal; color: var(--id-fg); -webkit-font-smoothing: antialiased; }
.cs-end > dm-identity { max-width: 376px; }   /* the sidebar's width, so the sentence breaks as it does there */
/* only the two lines below the block: the block's own links keep identity.css (its button sets its own label colour) */
:is(.cs-next, .cs-foot a) { color: var(--id-muted); text-decoration: none; }
:is(.cs-next, .cs-foot a):focus-visible { outline: 2px solid var(--id-fg); outline-offset: 2px; border-radius: 6px; }

/* the next case study: its logo square (the sidebar's .p-sq: 36 px, 9 px corner, a faint ring) and one line */
.cs-next { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; margin-top: 40px; font-size: 15px; line-height: 22px; color: var(--id-muted); }
.cs-next:hover { color: var(--id-fg); }
.cs-next b { font-weight: 400; color: var(--id-fg); }
.cs-sq { position: relative; flex: none; width: 36px; height: 36px; border-radius: 9px; overflow: hidden; }
.cs-sq img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cs-sq::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgb(var(--id-surface) / .1); pointer-events: none; }

/* the footer line: the mail address and Legal in the muted ink, never a button, 13/18 as the homepage sidebar's footer (Brief 22) */
.cs-foot { display: flex; gap: 4px; margin: 0 0 0 -8px; padding: 64px 0 24px; font-size: 13px; line-height: 18px; color: var(--id-muted); }
/* #322 · Dom, 19 Nov 2026, about the text links' hover grounds: "ja die auch". The box and its keyboard ring are a pill (8 and 6 px
   before); the hover itself only changes the ink here, there is no ground */
.cs-foot a { padding: 6px 8px; border-radius: 9999px; transition: color 150ms; }
.cs-foot a:focus-visible { border-radius: 9999px; }
.cs-foot a:hover { color: var(--id-fg); }

@media (max-width: 760px) {
  .cs-head > dm-identity { min-height: 64px; padding-top: 12px; }
  .cs-title { padding: 32px 0 24px; }
  .cs-end { margin-top: 72px; padding-top: 48px; }
  .cs-next { margin-top: 32px; }
  .cs-foot { padding: 48px 0 16px; }
  .cs-foot a { display: inline-flex; align-items: center; min-height: 44px; }
}
