/* ============================================================================
   oranea.de — accessibility override sheet
   WEB-16, design audit pass 1 (WEB-5). Authored by hand; not build output.

   WHY THIS IS A SEPARATE FILE
   ---------------------------
   oranea.de is a Vite/React build artefact. No source exists on the server or
   in any repository we hold (verified 2026-10-23, see WEB-16). The two files
   the page loads — assets/index-B5mY_UuV.css and assets/index-DqthwWvS.js —
   are minified bundles whose names encode a content hash of a source tree
   nobody at this company has.

   Editing the hashed bundle in place would break the hash/content contract and
   make any future comparison against a rebuild meaningless. So every rule that
   can live in CSS lives here instead, in one file, loaded last. It is additive
   and reversible: deleting the one <link> in index.html restores the previous
   rendering exactly.

   Rules target the Tailwind utility classes the bundle emits. Those class names
   are the only stable contract this artefact offers. They change only if the
   app is rebuilt from source — which already invalidates the bundle hashes and
   therefore this whole patch. That dependency is stated on the issue.

   TOKENS
   ------
   Names follow the agreed WEB-7 `--k-` set. They are declared here rather than
   imported because the shared token sheet (Stage 0) has not been published to
   this document root yet; when it is, these four local declarations are deleted
   and the file consumes the shared ones. Values below are not invented: they are
   the WEB-7 values, and the brand blue is the site's own `brand-blue`.
   ========================================================================== */

:root {
  /* WCAG 2.5.8 is 24x24. The house bar is 44x44 and is what we build to. */
  --k-tap-min: 44px;

  /* 14px. The floor for any rendered label. */
  --k-text-sm: 0.875rem;

  /* The site's own brand-blue, rgb(0 102 204). Measured against the two
     backgrounds a focus ring actually lands on here:
       on #ffffff (page)        5.57:1
       on #0f172a (slate-900 footer) 3.08:1
     Both clear the 3:1 required by WCAG 1.4.11 for a focus indicator. */
  --k-color-focus-ring: #0066cc;

  /* 4.54:1 on white. Used for control boundaries that must be perceivable. */
  --k-color-border-strong: #767676;
}

/* ---------------------------------------------------------------------------
   A8 — target size.  Gate row, and the only below-the-floor failure in the
   portfolio: nav and footer link rows measured 17-20px tall, under WCAG 2.5.8's
   absolute 24x24 minimum.

   Measured before (live, 2026-10-23):
     nav    "Login"                37.0 x 20.0   (1440)
     footer "Funktionen"          358.0 x 20.0   (390)
     footer "Impressum"            73.1 x 17.0   (390 and 1440)
     footer "AGB"                  28.8 x 17.0   (390 and 1440)

   inline-flex + min-height grows the row's hit area without moving the text
   baseline relative to its own box; the footer column gets taller, which is the
   intended and unavoidable consequence of the fix.
--------------------------------------------------------------------------- */
header a,
header nav a,
footer a {
  display: inline-flex;
  align-items: center;
  min-height: var(--k-tap-min);
}

/* The footer brand line wraps the logo; it is already tall enough and
   inline-flex would re-centre it against its neighbouring text. */
footer a:has(img) {
  min-height: 0;
}

/* The "Beratungstermin vereinbaren" contact CTA sits in a section of its own
   rather than inside <footer>, so the rule above does not reach it. Measured
   before: 219.0 x 21.0 at both viewports. It is a standalone target, not a
   link inside a sentence, so the 2.5.8 inline exception does not cover it. */
a.inline-flex.items-center.text-slate-300 {
  min-height: var(--k-tap-min);
}

/* DELIBERATELY NOT RAISED — WCAG 2.5.8 "inline" exception.
   The consent banner's "Datenschutzerklärung" link (148.3 x 17) is a link
   inside a sentence of running text. 2.5.8 exempts targets "in a sentence or
   block of text", and forcing a 44px row on it would break the paragraph's
   line box for no accessibility gain. It is the one remaining sub-24px target
   on the page and it is exempt, not unfixed. */

/* ---------------------------------------------------------------------------
   R3 — micro-type.  Every rendered label at least 14px.

   Measured before (live): 12px at 18 nodes (390) / 23 nodes (1440) via
   .text-xs, and 10px at 7 nodes (390) / 11 nodes (1440) via .text-[10px].

   The .text-[10px] nodes are the hover tooltips in the feature grid
   (opacity-0 / pointer-events-none until hover), so raising them costs nothing
   at rest and makes them legible when they do appear.
--------------------------------------------------------------------------- */
.text-xs {
  font-size: var(--k-text-sm);
  line-height: 1.25rem;
}

.text-\[10px\] {
  font-size: var(--k-text-sm);
  line-height: 1.25rem;
}

/* ---------------------------------------------------------------------------
   A4 — focus indicator.  Gate row. Before: the UA default everywhere
   (`outline: auto 1px rgb(16,16,16)`), and suppressed outright on the contact
   fields by Tailwind's .outline-none.

   Specificity note — rewritten on WEB-674, because the arithmetic that used to
   sit here covered only half the problem. Tailwind emits TWO suppressing
   rules, not one:

     .outline-none                 { outline: 2px solid transparent }  (0,1,0)
     .focus\:outline-none:focus    { outline: 2px solid transparent }  (0,2,0)

   This rule as `html body :focus-visible` was (0,1,2). It beats the first and
   LOSES to the second, so every control carrying the `focus:` variant computed
   `outline: solid 2px rgba(0,0,0,0)` — a 2px ring, fully transparent, which is
   an SC 2.4.7 failure that reads as a pass in any check that only asks whether
   an outline exists. Measured on oranea.de: 18 of 18 offender tab stops across
   9 routes x 2 viewports painted 0 ring pixels.

   Type selectors cannot fix this: column b outranks column c outright, so
   `html body body :focus-visible` at (0,1,3) still loses to (0,2,0). Beating a
   class-plus-pseudo-class needs a second class-or-pseudo-class, hence the
   doubled :focus-visible below — it is a specificity device, it matches exactly
   what the single form matched, and it reaches (0,2,2).

   NOT !important. That would out-rank the `#main` carve-out further down at
   (1,0,1) and paint a 2px box around the entire page body — measured on
   WEB-674, on all probed routes. The sheet's no-!important posture is
   load-bearing here, not stylistic.

   `border-radius: 2px` is KEPT HERE DELIBERATELY, and it is a known defect
   (WEB-674). It does not round the ring — it reshapes the ELEMENT, so every
   focusable control snaps square when focused: the hamburger 8px -> 2px, the
   hero CTA 9999px -> 2px, the skip link 8px -> 2px, the contact fields
   12px -> 2px. Chromium already makes the outline follow the element's own
   radius, so deleting this line is the whole fix and it regresses nothing
   (measured, WEB-674: ~400 focused stops restored, 0 rings lost).

   It is still here because removing it is a site-wide VISUAL change carrying
   no conformance claim, which is outside the four change classes of the
   2026-10-29 standing publish authority — so it needs a CEO decision that this
   payload does not have. This payload is the SC 2.4.7 conformance fix only.
   Deleting this one line is tracked separately; do not fold it in here.

   :focus-visible, not :focus, so a mouse click on a button does not paint a
   ring the pointer user did not ask for.
--------------------------------------------------------------------------- */
html body :focus-visible:focus-visible {
  outline: 2px solid var(--k-color-focus-ring);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ---------------------------------------------------------------------------
   A4b — the FAQ accordion triggers, whose ring the rule above makes opaque and
   still does not paint (WEB-674).

   Each trigger is `w-full` inside `div.bg-white.rounded-2xl.border` carrying
   `overflow: hidden`, and sits 1px inside it — measured 356x72 in a 358x74 box
   at 390px, 1px on the left and top. An outward ring at `outline-offset: 2px`
   needs 4px of clearance per side and has 1px, so the clipping parent eats all
   of it: A4 alone takes these five controls from 0 painted ring pixels to 0
   painted ring pixels. A computed-value check calls that fixed; a user sees
   nothing. So the ring goes INSIDE instead.

   `border-radius` here is the card's 16px minus the 3px inset. Without it the
   ring is a sharp rectangle inside a rounded card and its corners are clipped
   into four broken segments, which reads as a rendering bug rather than a focus
   indicator. Verified with the accordion both closed and open.

   Scoped on `w-full` rather than on the hamburger's `aria-label`, which is the
   other way to tell the two carriers apart: `w-full` is the property that
   CAUSES the defect (full-bleed leaves no room for an outward ring), whereas
   keying on the absence of an accessible name would silently drop the ring the
   day someone gives a FAQ trigger an aria-label. Specificity (0,3,2), so it
   lands on top of A4 above and of Tailwind's (0,2,0).

   Carrier sweep, 2026-10-30: exactly two `focus:outline-none` class strings
   exist in the whole application — this one and the hamburger's — and `w-full`
   appears on this one only.
--------------------------------------------------------------------------- */
html body [class~="focus:outline-none"][class~="w-full"]:focus-visible {
  outline-offset: -3px;
  border-radius: 13px;
}

/* ---------------------------------------------------------------------------
   A13 support — the ROI-calculator sliders.

   The three range inputs are the site's only unlabelled form controls. The
   programmatic name is added in index.html's companion patch; what CSS can fix
   is the other half of the problem: the control is 8px tall, so its boundary is
   also its target. The track keeps its 8px visual weight and the input grows a
   44px hit area around it.

   Measured before (live): 292.0 x 8.0 (390), 487.0 x 8.0 (1440).
--------------------------------------------------------------------------- */
input[type="range"] {
  height: var(--k-tap-min);
  background: transparent;
  padding: 0;
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 9999px;
  background: var(--k-color-border-strong);
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  margin-top: -8px; /* centres a 24px thumb on an 8px track */
  border-radius: 9999px;
  border: 2px solid #ffffff;
  background: var(--k-color-focus-ring);
  box-shadow: 0 1px 3px rgb(15 23 42 / 0.4);
}

input[type="range"]::-moz-range-track {
  height: 8px;
  border-radius: 9999px;
  background: var(--k-color-border-strong);
}

input[type="range"]::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 9999px;
  border: 2px solid #ffffff;
  background: var(--k-color-focus-ring);
}

/* ---------------------------------------------------------------------------
   A7 — skip link.  Visible only when focused, first in the tab order.
   The markup lives in index.html, ahead of #root, so it exists before React
   mounts and does not depend on the bundle.
--------------------------------------------------------------------------- */
.k-skip {
  position: absolute;
  left: 8px;
  top: -100px;
  z-index: 10000;
  display: inline-flex;
  align-items: center;
  min-height: var(--k-tap-min);
  padding: 0 16px;
  border-radius: 8px;
  background: #0f172a;
  color: #ffffff;
  font: 600 var(--k-text-sm) / 1.25rem Inter, system-ui, sans-serif;
  text-decoration: none;
  transition: top 120ms ease-out;
}

.k-skip:focus {
  top: 8px;
}

/* <main> carries tabindex="-1" purely so the skip link can move focus into it.
   It is a landmark, not a control, so it does not paint a ring of its own — a
   2px box around the entire page body would be noise, not an indicator. The
   next Tab lands on a real control and that one does show the ring. */
#main:focus,
#main:focus-visible {
  outline: none;
}

/* ---------------------------------------------------------------------------
   L4 — consent choice parity.  Gate row. Before: "Ablehnen" was a flat
   bg-slate-100 chip while "Akzeptieren" carried the brand fill plus an
   elevation shadow, so the two choices did not read as equally available.

   This gives reject the same height, radius and weight as accept and an
   explicit 2px boundary at 4.54:1, so it reads as a real button rather than a
   dismissed one. It deliberately does not restyle accept.

   NOTE: the exact visual treatment of a consent banner is a design call. This
   is the minimum that removes the weight asymmetry; the WebDesigner owns
   whether it is the treatment we ship.
--------------------------------------------------------------------------- */
div.fixed.inset-0 button.bg-slate-100 {
  min-height: var(--k-tap-min);
  border: 2px solid var(--k-color-border-strong);
  background: #ffffff;
  color: #0f172a;
}

div.fixed.inset-0 button.bg-slate-100:hover {
  background: #f1f5f9;
}

/* ---------------------------------------------------------------------------
   WEB-448 — reflow (WCAG 1.4.10) on the consent banner below 360px.
   No WEB-5 audit row id: the audit did not measure 320px, so this is a new
   finding rather than one of its rows.

   Before (measured headless Chromium, de-DE, DPR 1, at 320x844, on all eight
   published routes — identical on every one): the banner's content column is
   238px wide (p-4 on the overlay -> 288px card -> p-6 -> 238px) and two
   siblings inside it refuse to fit, independently:

     div.fixed.inset-0.z-[9999]…p-4                 320.0 x 844   L0   R320
       div.bg-white.rounded-3xl…max-w-5xl.w-full    288.0 x 226   L16  R304
         div.p-6.md:p-8                             286.0 x 224   L17  R303
           div.flex…justify-between.gap-6.flex-wrap 238.0 x 176   L41  R279
             div.flex…gap-4.flex-1.min-w-[300px]    300.0 x 100   L41  R341
             div.flex.gap-3.flex-shrink-0           279.6 x  52   L41  R321

   So the "Akzeptieren" button's right edge sits at 320.6px and the headline
   block at 341px — both past a 320px viewport. The overlay is position:fixed,
   which means a fixed subtree contributes nothing to document.scrollWidth
   (measured 320 at a 320px viewport while the banner overflowed by 21px), so
   this is not merely scrollable-to: a fixed overlay does not scroll, and the
   clipped part of the card cannot be brought into view by any user action.
   A visitor on a 320px device is asked for consent through a control that is
   partly off-screen.

   The outer row ALREADY carries flex-wrap and already wraps onto two lines;
   wrapping is not the missing piece and adding it changes nothing (measured).
   Each of the two children has to be allowed to fit on its own.

   Two selector notes, each of which cost an iteration:
     - Scope the button rule to `.gap-3.flex-shrink-0`, NOT bare
       `.flex-shrink-0`. The bare class also matches the cookie-icon wrapper,
       and widening that one pushes the card to 447px — worse than the defect.
     - width:100% on the row is not sufficient alone. Flex items default to
       min-width:auto (min-content), so the buttons will not shrink below their
       own text; flex-direction:column is what actually clears it.

   After, at 320: widest element is 304px — the card's own edge — nothing past
   the viewport, no off-screen button, and both buttons become full-width and
   stacked at 238x52 and 238x48, well over the 44px house target floor.
   360, 390 and 1440 are untouched, which the max-width query makes true by
   construction and the measurement confirms.

   Specified and measured by the WebDesigner on WEB-448; the `min-w-[300px]`
   class occurs exactly once in the whole application (the bundle plus each of
   the seven O3 documents, always this element), so the rule has no collateral.
--------------------------------------------------------------------------- */
@media (max-width: 359px) {
  .z-\[9999\] .min-w-\[300px\] {
    min-width: 0;
  }

  .z-\[9999\] .gap-3.flex-shrink-0 {
    width: 100%;
    flex-direction: column;
  }

  .z-\[9999\] .gap-3.flex-shrink-0 > button {
    width: 100%;
  }
}

/* ---------------------------------------------------------------------------
   R5 — WCAG 1.4.10 Reflow at the normative 320px width.  WEB-452.

   Measured on `main` at 88d7658 — whose nine documents, bundle, stylesheet and
   deploy-patches.js were confirmed byte-identical to the live server at the
   time of measurement, so this is the live surface and not a repo copy.
   Headless Chromium, de-DE, DPR 1, 320x844. Per-element ink census against
   BOTH the viewport box and each element's nearest clipping ancestor:

     /             5 text elements unreachable, worst ink edge 334px
     /datenschutz/ 6, worst 516px (document scrollWidth 504)
     /agb/         2, worst 542px — „Geschäftsbedingungen", 221.7px off-screen
     the other five published routes, and /impressum.html: 0

   ONE CAUSE, TWO SHAPES. Every row is a single unbreakable token wider than
   the space available to it: a German compound („Maßgeschneidert.",
   „Geschäftsbedingungen", „Datenschutzerklärung") or a bare opt-out URL in the
   privacy prose (`https://marketingplatform.google.com/about/analytics/terms/de/`,
   488px). German has no shortage of the first and the second is a legal
   citation we may not shorten, so the fix belongs in CSS: let the token break.

   WHY `anywhere` AND NOT `break-word` — this is the whole rule.
   `break-word` breaks a token that has already overflowed, but it is excluded
   from intrinsic sizing: the element's min-content width stays the width of
   its longest unbreakable token. The homepage hero fails on exactly that
   distinction. Its container is `grid lg:grid-cols-2`, and a grid track is
   floored at its contents' min-content width — measured 309.969px, set by
   „Maßgeschneidert." at 36px with `tracking-tight` — inside a 272px grid box.
   The track hangs 14px past the viewport and the section's `overflow-hidden`
   cuts it. With `break-word` the track stays 310px and all five rows stay
   broken. `anywhere` collapses min-content, the track becomes 272px, and the
   h1, the lede, the CTA and the strapline all come back on screen.

   Those five were never five defects. They are one track, which is why this is
   one declaration and not a rule per carrier.

   BOTH `overflow-wrap` VALUES INHERIT, which is why there is no selector here
   for the gradient `span` inside each hero `h1`, or for the `a` carrying the
   488px URL. They are inline children of the blocks below and take the value
   from them. A per-carrier rule would need four more selectors and would still
   miss the next one.

   SCOPE. `max-width: 639px` is the site's own `sm` boundary — not a new
   breakpoint. Above it every measured token fits with room to spare. The
   selector list is every element that exists on these documents and carries
   German prose: `h4` is deliberately absent because no document has one, and a
   selector nobody has measured does not belong in a register entry.

   WHAT THIS DELIBERATELY DOES NOT DO — `hyphens: auto`.
   Adding it would be the obvious companion: without it the four over-long
   headings break mid-word with no hyphen, and „Maßgeschneid / ert." reads as a
   defect rather than a line break. It was measured and rejected for this
   block, because it does not confine itself to the lines that overflow. On a
   frozen before/after pair it re-typeset prose across every route (46 elements
   reshaped at 360, 35 at 390) and it pushed `/integration/`'s hero heading —
   a page with no defect at any width — from one line onto two. This rule
   reshapes 6 elements at 360 and 390, all of them on `/datenschutz/` and
   `/agb/`, and all of them already failing today. Nothing that currently
   renders correctly moves.

   The mid-word break is therefore a KNOWN, ACCEPTED COST of this block, and
   the right fix for it is not hyphenation but a mobile size step on the
   headings that are too large to fit whole — which is what WEB-441 does for
   the two legal pages and what the k-a11y.css migration should extend to the
   homepage hero. Once a heading fits, it never breaks, and this rule becomes
   invisible on it.

   NOT FIXED HERE, measured and filed rather than folded in:
   - The cookie-consent banner overflows on all 8 routes with a banner. It is
     driven by `min-w-[300px]`, not by token width, so no wrapping rule reaches
     it. That is WEB-448, in the bundle.
   - Five stat labels on `/`, `/features/` and `/impressum.html` overflow their
     own box while staying on screen — a collision defect, not Reflow. Breaking
     a 13-character stat label („Zeitersparnis") would be worse than the
     overlap, so the fix is layout, not wrapping.
   - One carousel card on `/` sits 67.8px past the viewport at 1440px. Desktop,
     outside this block's media query, and unchanged by it.
--------------------------------------------------------------------------- */
@media (max-width: 639px) {
  h1,
  h2,
  h3,
  p,
  li {
    overflow-wrap: anywhere;
  }
}

/* ---------------------------------------------------------------------------
   R6 — WCAG 2.4.7 Focus Visible (AA) and 2.3.3 Animation from Interactions
   (AAA): the focused control is painted off-screen while a smooth scroll is
   still animating.  WEB-665.

   Specified and measured by the WebDesigner on WEB-665; implemented here with
   one correction to the selector, recorded below because the correction is the
   whole reason this block works.

   THE DEFECT.  Every document except impressum.html carries
   <html lang="de" class="scroll-smooth">, and the bundle emits Tailwind's
   `.scroll-smooth{scroll-behavior:smooth}` — the only scroll-behavior
   declaration in either stylesheet, and `scroll-smooth` occurs exactly once per
   document, always on <html>. So every Tab that moves focus a long way starts
   an animated scroll, and a Tab arriving before the previous animation settles
   RETARGETS it, so the lag compounds. The ring is painted on every stop; it is
   painted somewhere the user cannot see.

   Measured headless Chromium, de-DE, DPR 1, 390x844, 22 Tabs at a 250ms cadence
   (4 Tabs/sec — a SLOW keyboard cadence), against the tree confirmed
   byte-identical to live at the time of measurement:

     route        before            after
     #/            2 / 22   9%      0 / 22   0%
     #/features    6 / 21  29%      0 / 21   0%
     #/agb         9 / 21  43%      0 / 21   0%

   Per-stop settle times across 193 stops (WebDesigner, WEB-665): median 45ms,
   p90 364ms, max 1,479ms; 15 of 193 over the 400ms Doherty Threshold, 6 over a
   second.

   WHY `html.scroll-smooth` AND NOT `html` — this is the correction.
   The spec named the declaration as `html { scroll-behavior: auto }`. That is
   specificity (0,0,1); `.scroll-smooth` is (0,1,0). A class beats a type
   selector REGARDLESS OF SOURCE ORDER, so the literal form loses even though
   k-a11y.css is the last stylesheet linked on all nine documents. Measured, not
   assumed: with `html{scroll-behavior:auto}` appended, the computed value on
   <html> stays `smooth` and the off-screen counts stay 1/22, 6/21, 8/21 —
   indistinguishable from no patch at all. The spec's own control measurement
   had been taken with `!important`, which is why the gap did not show up there.
   `html.scroll-smooth` is (0,1,1) and wins on specificity without !important,
   which keeps the override as narrow as the thing it is overriding.

   The bare `html` in each selector list is deliberate and currently inert: it
   is what keeps these two blocks meaningful if a future rebuild drops the
   `scroll-smooth` class from the element. It changes nothing today.

   WHAT THE SECOND BLOCK COSTS, enumerated rather than estimated.
   `scroll-behavior:auto` suppresses animation for every scroll the UA performs
   on the document, so the complete surface is:
     - the ONLY in-page anchor on the site, the `.k-skip` skip link's
       href="#main" (2 occurrences in index.html, 0 elsewhere). It now jumps.
       The skip link is an accessibility affordance whose entire point is
       getting there fast, so this is a gain, not a cost.
     - the bundle's one scroll call, `scrollTo(0,0)` on route change — the only
       scroll API call in the bundle, which has no `behavior` argument and no
       `scrollIntoView` anywhere. A route change now snaps to the top instead of
       gliding, which is the correct behaviour for a navigation.
   There is no third carrier: no other in-page anchor, no scroll container with
   its own scroll-behavior, and no smooth scrolling in JS to lose.

   WHY BOTH BLOCKS, when the second subsumes the first today.
   The reduced-motion block is the normative fix for 2.3.3 and is the half that
   survives: the plan of record is to drop `scroll-smooth` from the element at
   the next bundle rebuild and apply smooth only where it is wanted, at which
   point the unconditional block below is deleted and this one stays. Keeping
   both makes that revert a single-block deletion rather than a rewrite.

   NOTE FOR THAT REBUILD: a CSS prefers-reduced-motion block does NOT restrain a
   JS `scrollTo({behavior:'smooth'})` — the scriptual behavior argument wins over
   the stylesheet. If the rebuild introduces JS-driven smooth scrolling it must
   carry its own reduced-motion check; this block will not cover it.
--------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html,
  html.scroll-smooth {
    scroll-behavior: auto;
  }
}

html,
html.scroll-smooth {
  scroll-behavior: auto;
}
