/* Shared by index.html and hilfe.html - one palette, one dark mode. */
/* Light is the base; the dark block below redefines only these tokens.
     Every colour on the page comes from here - a literal in a rule would keep
     one theme's value in the other, which is how a page ends up with dark text
     on a dark ground.

     The hero keeps its dark blue gradient in both themes. It is the brand, it
     already reads as "dark", and inverting it would cost the page its one
     recognisable surface for no gain - so --on-brand and --hero-sub stay put. */
  :root {
    /* Tells the browser both themes exist, so scrollbars and any default UI
       follow rather than staying light on a dark page. */
    color-scheme: light dark;

    --brand: #1d2b45;
    --brand-2: #2e4570;
    --accent: #3b6ff0;
    --bg: #f5f7fb;
    --panel: #ffffff;
    --panel-2: #f5f7fb;      /* cards inside a panel section */
    --ink: #1c2430;
    --muted: #5a6572;
    --border: #dfe5ee;
    --good: #2e8b57;
    --part: #d9a63e;
    --open: #c65b5b;
    --on-brand: #ffffff;
    --hero-sub: #d7e0f2;
    --btn-primary-hover: #e8eefc;
    --hero-line: rgba(255,255,255,.55);
    --shadow: 0 1px 3px rgba(20,30,50,.06);
  }

  /* Follows the browser's system setting, which is the whole request: no
     toggle, no stored preference. The accent is lifted and the ground kept off
     pure black - a #000 page with #fff text is the harshest possible pairing,
     and the panels need somewhere above the background to sit. */
  @media (prefers-color-scheme: dark) {
    :root {
      --accent: #7aa2ff;
      --bg: #10141b;
      --panel: #171d27;
      --panel-2: #10141b;
      --ink: #e6e9ef;
      --muted: #9aa4b2;
      --border: #2a3341;
      --good: #4cae7a;
      --open: #e07777;   /* --part carries over: amber reads on both grounds */
      --shadow: 0 1px 3px rgba(0,0,0,.4);
    }
    /* The screenshots are captures of a light interface and glare against a
       dark card, so they are dimmed - brightness rather than opacity, which
       would let the dark ground bleed through and mute the colours instead of
       just lowering them. The slight contrast bump keeps the small type in the
       captures legible after the dimming.

       Full brightness on hover and on keyboard focus: every screenshot is a
       link to its full-size version, so anyone actually looking at one sees the
       product's real colours rather than a version this page darkened. */
    .shot img {
      background: #fff;
      filter: brightness(.82) contrast(1.04);
      transition: filter .2s ease;
    }
    .shot:hover img,
    .shot a:focus-visible img { filter: none; }
  }

  @media (prefers-reduced-motion: reduce) {
    .shot img { transition: none; }
  }
  * { box-sizing: border-box; margin: 0; }
  body { font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: var(--bg); }
  a { color: var(--accent); text-decoration: none; }
  a:hover { text-decoration: underline; }
  .wrap { max-width: 1040px; margin: 0 auto; padding: 0 1.25rem; }

  /* The language switch used to hide one language with CSS on a single URL.
     Each language has its own page now (build.py), so there is nothing left to
     hide - and nothing left for a crawler to read in the wrong language. */

  /* The hero shows the product behind its own promise: a blurred dashboard
     under the brand gradient, rather than a flat block of colour. Three layers,
     bottom to top - the gradient as the ground (and the fallback if the image
     never loads), the blurred screenshot, then a scrim of the same gradient
     that carries the contrast for the white text. The scrim is what makes this
     safe: the readability does not depend on which part of the screenshot
     happens to sit behind a given line. */
  header.hero {
    background: linear-gradient(160deg, var(--brand) 0%, var(--brand-2) 100%);
    color: var(--on-brand); padding: 3.2rem 0 4rem;
    position: relative; isolation: isolate; overflow: hidden;
  }
  header.hero::before {
    content: ""; position: absolute; inset: 0; z-index: -2;
    background: url("img/dashboard.png") center top / cover no-repeat;
    /* Scaled up so the blur's soft edges fall outside the box instead of
       showing as a pale border. */
    filter: blur(13px); transform: scale(1.08); opacity: .85;
  }
  header.hero::after {
    content: ""; position: absolute; inset: 0; z-index: -1;
    /* Directional on purpose: nearly opaque on the left, where the headline and
       the paragraph sit and the contrast has to hold, thinning towards the right
       where nothing is written and the screenshot may actually show. The
       vertical pass keeps the buttons off the brightest part of the image. */
    background:
      linear-gradient(180deg, rgba(29, 43, 69, .35) 0%, rgba(29, 43, 69, .75) 100%),
      linear-gradient(95deg, rgba(29, 43, 69, .96) 0%, rgba(29, 43, 69, .9) 42%,
                             rgba(46, 69, 112, .58) 100%);
  }
  /* The directional scrim assumes the wide layout, where the text sits on the
     left and the thin right-hand side is empty. Narrow, the text runs the full
     width and reaches into that thin part. Measured against the background with
     the text hidden, that costs the paragraph colour 6.67:1 -> 5.95:1: still
     past AA either way, so this is not a fix for a failure - it buys back the
     margin, and the screenshot stays visible as texture underneath. */
  @media (max-width: 760px) {
    header.hero::before { opacity: .5; }
    header.hero::after {
      background: linear-gradient(160deg, rgba(29, 43, 69, .94) 0%,
                                          rgba(46, 69, 112, .92) 100%);
    }
  }
  .hero .wrap { display: flex; flex-direction: column; gap: 1.2rem; align-items: flex-start; }
  .topline { width: 100%; display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.4rem; }
  .logo { display: flex; align-items: center; gap: .6rem; font-size: 1.35rem; font-weight: 800; letter-spacing: .02em; }
  .logo img { width: 34px; height: 34px; border-radius: 7px; display: block; }
  /* A link between two URLs now, not a button toggling a class - so it also
     needs the anchor resets a <button> came with for free. */
  .lang-toggle {
    display: inline-block; text-decoration: none;
    background: transparent; color: var(--on-brand); border: 1.5px solid var(--hero-line);
    border-radius: 8px; padding: .4rem .9rem; font: inherit; font-weight: 700; cursor: pointer;
  }
  .lang-toggle:hover { border-color: var(--on-brand); text-decoration: none; }
  h1 { font-size: clamp(1.7rem, 4vw, 2.6rem); line-height: 1.2; max-width: 34ch; }
  .hero p.sub { max-width: 62ch; color: var(--hero-sub); font-size: 1.06rem; }
  .cta { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: .6rem; }
  .btn { display: inline-block; padding: .65rem 1.3rem; border-radius: 8px; font-weight: 700; }
  .btn-primary { background: var(--on-brand); color: var(--brand); }
  .btn-primary:hover { text-decoration: none; background: var(--btn-primary-hover); }
  .btn-ghost { border: 1.5px solid var(--hero-line); color: var(--on-brand); }
  .btn-ghost:hover { text-decoration: none; border-color: var(--on-brand); }

  section { padding: 3.2rem 0; }
  section.alt { background: var(--panel); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
  h2 { font-size: 1.5rem; margin-bottom: 1.2rem; }
  /* 72ch rendered at 641px inside a 1040px column, while the quote box beside
     it uses 950px - the same prose at two widths, which reads as ragged rather
     than as a deliberate measure. 92ch closes most of that gap and still stops
     well short of the full column, where a line would run past 110 characters. */
  .lede { max-width: 92ch; color: var(--muted); }
  .lede strong { color: var(--ink); }

  .grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; margin-top: 1.5rem; }
  .card { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 1.1rem 1.2rem; }
  section.alt .card { background: var(--panel-2); }
  .card h3 { font-size: 1.02rem; margin-bottom: .35rem; }
  .card p { font-size: .92rem; color: var(--muted); }

  .demo-box { background: var(--panel); border: 1px solid var(--border); border-left: 4px solid var(--good); border-radius: 10px; padding: 1.3rem 1.4rem; margin-top: 1.4rem; }
  .demo-box code { background: var(--bg); border: 1px solid var(--border); border-radius: 5px; padding: .1rem .4rem; font-size: .9em; }
  .demo-box ul { margin: .6rem 0 0 1.2rem; color: var(--muted); font-size: .95rem; }

  .stack { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: 1rem; }
  .pill { background: var(--panel); border: 1px solid var(--border); border-radius: 999px; padding: .25rem .85rem; font-size: .85rem; font-weight: 600; color: var(--muted); }

  .bsi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1rem; margin-top: 1.5rem; }
  .bsi-col { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 1.1rem 1.2rem; }
  .bsi-col h3 { font-size: 1rem; margin-bottom: .6rem; }
  .bsi-col ul { margin: 0 0 0 1.1rem; padding: 0; color: var(--muted); font-size: .9rem; display: flex; flex-direction: column; gap: .45rem; }
  .bsi-ok { border-top: 4px solid var(--good); }
  .bsi-part { border-top: 4px solid var(--part); }
  .bsi-open { border-top: 4px solid var(--open); }
  .shots { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1.2rem; margin-top: 1.5rem; }
  .shot { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
  .shot.wide { grid-column: 1 / -1; }
  .shot a { display: block; line-height: 0; }
  .shot img { width: 100%; height: auto; display: block; border-bottom: 1px solid var(--border); }
  .shot figcaption { padding: .7rem .95rem; font-size: .88rem; color: var(--muted); }
  .shot figcaption strong { color: var(--ink); font-weight: 700; }
  footer { padding: 2.2rem 0 2.8rem; color: var(--muted); font-size: .88rem; }
  footer .wrap { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

  /* Impressum and Datenschutz. The help page carries its own copy of this
     because it is generated in the application repository; these two live
     here, so their styles do too. */
  .doc-head { background: linear-gradient(160deg, var(--brand) 0%, var(--brand-2) 100%); color: var(--on-brand); padding: 1.6rem 0; }
  .doc-head .topline { margin-bottom: 0; }
  .doc-head a.back { color: var(--hero-sub); font-size: .9rem; }
  .doc-topic { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 1.2rem 1.4rem; margin-bottom: 1rem; scroll-margin-top: 1rem; }
  .doc-topic h2 { font-size: 1.15rem; margin-bottom: .7rem; }
  .doc-topic p { font-size: .94rem; color: var(--ink); max-width: 75ch; margin-bottom: .6rem; }
  .doc-topic p:last-child { margin-bottom: 0; }
  /* An address is read line by line, not as prose - so it keeps its own
     line height and does not inherit the paragraph's measure. */
  .doc-topic p.address { line-height: 1.55; color: var(--ink); }
  main.wrap { padding-top: 1.6rem; padding-bottom: 2rem; }
