/* ================================================================
       OpenWhistle — GitHub Pages Design System
       Aesthetic: Notary / Sealed Document — Legal authority, gravitas
       NOT: SaaS startup, Bootstrap cards, purple gradients
       ================================================================ */

    /* ── Hero ────────────────────────────────────────────────────── */
    .hero {
      position: relative;
      min-height: 100svh;
      display: flex;
      align-items: center;
      justify-content: center;
      overflow: hidden;
      padding: var(--space-24) var(--space-8);
    }

    /* Paper texture via CSS */
    .hero::before {
      content: '';
      position: absolute;
      inset: 0;
      background-image:
        repeating-linear-gradient(
          -45deg,
          transparent,
          transparent 6px,
          color-mix(in srgb, var(--ink) 1%, transparent) 6px,
          color-mix(in srgb, var(--ink) 1%, transparent) 7px
        );
      pointer-events: none;
      z-index: 0;
    }

    /* Official seal watermark */
    .hero::after {
      content: '';
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      width: min(600px, 80vw);
      height: min(600px, 80vw);
      border-radius: var(--radius-full);
      background:
        radial-gradient(circle at center, color-mix(in srgb, var(--accent) 4%, transparent) 0%, transparent 60%),
        radial-gradient(circle at center, transparent 62%, color-mix(in srgb, var(--accent) 3%, transparent) 63%, color-mix(in srgb, var(--accent) 3%, transparent) 65%, transparent 66%),
        radial-gradient(circle at center, transparent 72%, color-mix(in srgb, var(--accent) 3%, transparent) 73%, color-mix(in srgb, var(--accent) 3%, transparent) 75%, transparent 76%);
      pointer-events: none;
      z-index: 0;
    }


    .hero-content {
      position: relative;
      z-index: 1;
      text-align: center;
      max-width: 860px;
      width: 100%;
    }

    /* Decorative vertical rules */
    .hero-rule {
      position: absolute;
      top: 0;
      bottom: 0;
      width: 1px;
      background: linear-gradient(
        to bottom,
        transparent,
        var(--hairline) 20%,
        var(--hairline) 80%,
        transparent
      );
      z-index: 0;
    }
    .hero-rule-left  { left: 12%; }
    .hero-rule-right { right: 12%; }

    .hero-eyebrow {
      display: inline-flex;
      align-items: center;
      gap: var(--space-3);
      font-family: var(--font-body);
      font-size: 0.7rem;
      letter-spacing: 0.16em;
      text-transform: uppercase;
      color: var(--accent);
      margin-bottom: var(--space-6);
      animation: rise 0.6s var(--ease-stiff) 0.1s both;
    }
    .hero-eyebrow::before,
    .hero-eyebrow::after {
      content: '';
      width: 2rem;
      height: 1px;
      background: var(--accent);
      opacity: 0.5;
    }

    .hero-headline {
      font-family: var(--font-display);
      font-size: clamp(2.6rem, 6vw, 4.8rem);
      font-weight: 700;
      line-height: 1.08;
      letter-spacing: -0.04em;
      color: var(--ink);
      margin-bottom: var(--space-6);
      animation: rise 0.6s var(--ease-stiff) 0.2s both;
    }
    /* "Hinweisgebersystem-Software" is one line at 3.5rem in the 860px column. */
    .hero-headline:lang(de) { font-size: clamp(2.2rem, 5.6vw, 3.5rem); }
    .hero-headline .accent-green { color: var(--accent); }
    .hero-headline .accent-emphasis  { color: var(--accent); }

    .hero-subline {
      font-family: var(--font-body);
      font-size: clamp(1rem, 2vw, 1.2rem);
      font-weight: 300;
      color: var(--body);
      max-width: 56ch;
      margin: 0 auto var(--space-10);
      line-height: 1.7;
      animation: rise 0.6s var(--ease-stiff) 0.3s both;
    }
    .hero-subline em { font-style: normal; font-weight: 600; color: var(--ink); }

    .hero-actions {
      display: flex;
      gap: var(--space-4);
      justify-content: center;
      flex-wrap: wrap;
      margin-bottom: var(--space-12);
      animation: rise 0.6s var(--ease-stiff) 0.4s both;
    }

    .hero-meta {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: var(--space-6);
      flex-wrap: wrap;
      animation: rise 0.6s var(--ease-stiff) 0.5s both;
    }
    .hero-meta-item {
      font-family: var(--font-body);
      font-size: 0.72rem;
      letter-spacing: 0.04em;
      color: var(--muted);
      display: flex;
      align-items: center;
      gap: var(--space-2);
    }
    .hero-meta-item::before {
      content: '';
      width: 5px;
      height: 5px;
      border-radius: var(--radius-full);
      background: var(--hairline-strong);
    }

    /* ── Buttons ─────────────────────────────────────────────────── */
    .btn {
      display: inline-flex;
      align-items: center;
      gap: var(--space-2);
      padding: var(--space-3) var(--space-6);
      font-family: var(--font-body);
      font-size: 0.82rem;
      font-weight: 600;
      letter-spacing: 0.06em;
      text-transform: uppercase;
      border-radius: var(--radius-md);
      transition: background var(--duration-fast) var(--ease-stiff), box-shadow var(--duration-fast) var(--ease-stiff), color var(--duration-fast) var(--ease-stiff), transform var(--duration-fast) var(--ease-stiff);
      white-space: nowrap;
    }
    .btn-primary {
      background: var(--accent);
      color: var(--accent-ink);
      box-shadow: 0 0 0 1px var(--accent);
    }
    .btn-primary:hover {
      background: var(--accent-strong);
      color: var(--accent-ink);
      transform: translateY(-1px);
      box-shadow: 0 0 0 1px var(--accent-strong), 0 4px 20px color-mix(in srgb, var(--accent) 30%, transparent);
    }
    .btn-outline {
      background: transparent;
      color: var(--ink);
      box-shadow: 0 0 0 1px var(--hairline-strong);
    }
    .btn-outline:hover {
      box-shadow: 0 0 0 1px var(--accent);
      color: var(--accent);
      transform: translateY(-1px);
    }

    /* ── Trust strip ─────────────────────────────────────────────── */
    .trust-strip {
      background: var(--surface);
      border-top: 1px solid var(--hairline);
      border-bottom: 1px solid var(--hairline);
      padding: var(--space-5) var(--space-8);
    }
    .trust-strip-inner {
      max-width: var(--max-width);
      margin: 0 auto;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: var(--space-8);
      flex-wrap: wrap;
    }
    .trust-item {
      display: flex;
      align-items: center;
      gap: var(--space-2);
      font-family: var(--font-body);
      font-size: 0.72rem;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      color: var(--body);
    }
    .trust-item-check {
      color: var(--accent);
      width: 16px;
      height: 16px;
      border-radius: var(--radius-full);
      background: var(--accent-fog);
      box-shadow: 0 0 0 1px var(--accent-dim);
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
    }
    .trust-item-check svg {
      width: 8px;
      height: 8px;
    }

    /* ── Section ─────────────────────────────────────────────────── */
    .section {
      padding: var(--space-24) var(--space-8);
    }
    .section-alt {
      background: var(--surface);
    }
    .section-inner {
      max-width: var(--max-width);
      margin: 0 auto;
    }
    .section-eyebrow {
      font-family: var(--font-mono);
      font-size: 0.65rem;
      letter-spacing: 0.18em;
      text-transform: uppercase;
      color: var(--muted);
      display: flex;
      align-items: center;
      gap: var(--space-3);
      margin-bottom: var(--space-4);
    }
    .section-eyebrow::before {
      content: '';
      width: 2rem;
      height: 1px;
      background: var(--hairline-strong);
    }
    .section-heading {
      font-family: var(--font-display);
      font-size: clamp(1.8rem, 3.5vw, 2.8rem);
      font-weight: 700;
      letter-spacing: -0.03em;
      line-height: 1.15;
      color: var(--ink);
      margin-bottom: var(--space-4);
    }
    .section-subheading {
      font-size: 1.05rem;
      font-weight: 300;
      color: var(--body);
      max-width: 56ch;
      line-height: 1.7;
      margin-bottom: var(--space-12);
    }

    /* Section divider */
    .section-divider {
      width: 4rem;
      height: 2px;
      background: var(--accent);
      margin-bottom: var(--space-10);
    }

    /* ── Problem section ─────────────────────────────────────────── */
    .problem-layout {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: var(--space-16);
      align-items: start;
    }
    .problem-text p {
      color: var(--body);
      font-size: 1rem;
      line-height: 1.75;
      margin-bottom: var(--space-5);
    }
    .problem-text strong { color: var(--ink); font-weight: 600; }

    .comparison-table {
      width: 100%;
      border-collapse: collapse;
      font-size: 0.88rem;
    }
    .comparison-table thead th {
      font-family: var(--font-mono);
      font-size: 0.65rem;
      letter-spacing: 0.12em;
      text-transform: uppercase;
      color: var(--muted);
      padding: var(--space-3) var(--space-4);
      text-align: left;
      border-bottom: 2px solid var(--hairline);
      overflow-wrap: break-word;
    }
    .comparison-table thead th:first-child {
      width: 40%;
    }
    .comparison-table thead th.col-ow {
      color: var(--accent);
    }
    .comparison-table tbody td {
      padding: var(--space-3) var(--space-4);
      border-bottom: 1px solid var(--hairline);
      color: var(--body);
      vertical-align: top;
      line-height: 1.55;
      overflow-wrap: break-word;
    }
    .comparison-table tbody tr:last-child td { border-bottom: none; }
    .comparison-table .val-good {
      color: var(--accent);
      font-family: var(--font-body);
      font-size: 0.85rem;
      font-weight: 600;
    }
    .comparison-table .val-bad {
      color: var(--muted);
      font-family: var(--font-body);
      font-size: 0.85rem;
    }

    /* ── Features ────────────────────────────────────────────────── */
    .features-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: var(--space-5);
    }
    .feature-card {
      background: var(--canvas);
      box-shadow: 0 0 0 1px var(--hairline);
      border-left: 4px solid var(--accent-dim);
      border-radius: 0 var(--radius-md) var(--radius-md) 0;
      padding: var(--space-6);
      transition: border-left-color var(--duration-mid) ease, transform var(--duration-mid) ease, box-shadow var(--duration-mid) ease;
      animation: rise 0.5s var(--ease-stiff) both;
    }
    .feature-card:hover {
      border-left-color: var(--accent);
      transform: translateY(-2px);
      box-shadow: 0 0 0 1px var(--hairline), 0 8px 32px color-mix(in srgb, var(--inverse) 8%, transparent);
    }
    [data-theme="dark"] .feature-card {
      background: var(--surface);
    }
    [data-theme="dark"] .feature-card:hover {
      box-shadow: 0 0 0 1px var(--hairline), 0 8px 32px color-mix(in srgb, var(--inverse) 40%, transparent);
    }
    .feature-card:nth-child(1) { animation-delay: 0.05s; }
    .feature-card:nth-child(2) { animation-delay: 0.10s; }
    .feature-card:nth-child(3) { animation-delay: 0.15s; }
    .feature-card:nth-child(4) { animation-delay: 0.20s; }
    .feature-card:nth-child(5) { animation-delay: 0.25s; }
    .feature-card:nth-child(6) { animation-delay: 0.30s; }

    .feature-icon-wrap {
      color: var(--accent);
      width: 40px;
      height: 40px;
      background: var(--accent-fog);
      box-shadow: 0 0 0 1px var(--accent-dim);
      border-radius: var(--radius-sm);
      display: flex;
      align-items: center;
      justify-content: center;
      margin-bottom: var(--space-4);
    }
    .feature-icon-wrap svg {
      width: 18px;
      height: 18px;
    }
    .feature-title {
      font-family: var(--font-display);
      font-size: 1rem;
      font-weight: 600;
      color: var(--ink);
      margin-bottom: var(--space-2);
      letter-spacing: -0.01em;
    }
    .feature-desc {
      font-size: 0.875rem;
      color: var(--body);
      line-height: 1.65;
    }

    /* ── Compliance ──────────────────────────────────────────────── */
    .compliance-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: var(--space-6);
    }
    .compliance-card {
      box-shadow: 0 0 0 1px var(--hairline);
      border-radius: var(--radius-md);
      padding: var(--space-6);
      background: var(--canvas);
    }
    [data-theme="dark"] .compliance-card {
      background: var(--surface);
    }
    .compliance-card-badge {
      display: inline-block;
      font-family: var(--font-mono);
      font-size: 0.62rem;
      letter-spacing: 0.12em;
      text-transform: uppercase;
      color: var(--accent);
      background: var(--accent-fog);
      box-shadow: 0 0 0 1px var(--accent-dim);
      border-radius: var(--radius-sm);
      padding: var(--space-1) var(--space-3);
      margin-bottom: var(--space-4);
    }
    .compliance-card h3 {
      font-family: var(--font-display);
      font-size: 1.05rem;
      font-weight: 600;
      color: var(--ink);
      margin-bottom: var(--space-3);
    }
    .compliance-card p {
      font-size: 0.875rem;
      color: var(--body);
      line-height: 1.7;
    }
    .compliance-list {
      margin-top: var(--space-4);
      display: flex;
      flex-direction: column;
      gap: var(--space-2);
    }
    .compliance-list li {
      font-size: 0.82rem;
      color: var(--body);
      display: flex;
      align-items: flex-start;
      gap: var(--space-2);
    }
    .compliance-list li::before {
      content: '—';
      color: var(--accent);
      font-family: var(--font-mono);
      font-size: 0.75rem;
      flex-shrink: 0;
      margin-top: 3px;
    }

    /* ── Quick install ───────────────────────────────────────────── */
    .install-layout {
      display: grid;
      grid-template-columns: 1fr 1.1fr;
      gap: var(--space-16);
      align-items: center;
    }
    .install-text p {
      color: var(--body);
      font-size: 0.95rem;
      line-height: 1.75;
      margin-bottom: var(--space-5);
    }
    .install-text strong { color: var(--ink); }
    .install-reqs {
      margin-top: var(--space-6);
      padding: var(--space-4) var(--space-5);
      background: var(--surface-2);
      box-shadow: 0 0 0 1px var(--hairline);
      border-radius: var(--radius-md);
    }
    [data-theme="dark"] .install-reqs {
      background: var(--surface-3);
    }
    .install-reqs-title {
      font-family: var(--font-body);
      font-size: 0.65rem;
      letter-spacing: 0.1em;
      text-transform: uppercase;
      color: var(--muted);
      margin-bottom: var(--space-3);
    }
    .install-reqs ul { list-style: none; }
    .install-reqs li {
      font-family: var(--font-body);
      font-size: 0.82rem;
      color: var(--body);
      padding: var(--space-1) 0;
      display: flex;
      align-items: center;
      gap: var(--space-2);
    }
    .install-reqs li::before {
      content: '';
      width: 4px;
      height: 4px;
      border-radius: var(--radius-full);
      background: var(--hairline-strong);
      flex-shrink: 0;
    }

    /* Terminal */
    .terminal-window {
      background: var(--inverse);
      border-radius: var(--radius-md);
      overflow: hidden;
      box-shadow: 0 0 0 1px color-mix(in srgb, var(--inverse-ink) 8%, transparent), 0 20px 60px color-mix(in srgb, var(--inverse) 25%, transparent);
    }
    [data-theme="dark"] .terminal-window {
      box-shadow: 0 0 0 1px color-mix(in srgb, var(--inverse-ink) 8%, transparent), 0 20px 60px color-mix(in srgb, var(--inverse) 60%, transparent);
    }
    .terminal-bar {
      background: color-mix(in srgb, var(--inverse-ink) 4%, transparent);
      border-bottom: 1px solid color-mix(in srgb, var(--inverse-ink) 7%, transparent);
      padding: var(--space-3) var(--space-5);
      display: flex;
      align-items: center;
      gap: var(--space-3);
    }
    .terminal-dots { display: flex; gap: 6px; }
    .terminal-dot { width: 10px; height: 10px; border-radius: var(--radius-full); }
    .dot-r { background: #ff5f57; } .dot-y { background: #febc2e; } .dot-g { background: #28c840; }
    .terminal-file {
      font-family: var(--font-mono);
      font-size: 0.68rem;
      color: var(--inverse-muted);
      letter-spacing: 0.04em;
    }
    .terminal-body {
      padding: var(--space-6);
      font-family: var(--font-mono);
      font-size: 0.82rem;
      line-height: 1.9;
      overflow-x: auto;
    }
    /* The terminal sits on --inverse in both themes: the light accent would be dark on dark. */
    /* Comment and output share --inverse-muted, the one secondary step DESIGN.md gives on inverse;
       italic (comment) and the smaller size (output) tell them apart. */
    .t-prompt { color: var(--inverse-accent); user-select: none; }
    .t-cmd { color: var(--inverse-ink); }
    .t-comment { color: var(--inverse-muted); font-style: italic; }
    .t-out { color: var(--inverse-muted); font-size: 0.78rem; }

    /* ── FAQ ─────────────────────────────────────────────────────── */
    .faq-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: var(--space-3);
    }
    details.faq-item {
      box-shadow: 0 0 0 1px var(--hairline);
      border-radius: var(--radius-md);
      background: var(--canvas);
    }
    [data-theme="dark"] details.faq-item {
      background: var(--surface);
    }
    details.faq-item[open] {
      box-shadow: 0 0 0 1px var(--hairline-strong);
    }
    details.faq-item summary {
      padding: var(--space-5) var(--space-6);
      font-family: var(--font-display);
      font-size: 0.97rem;
      font-weight: 600;
      color: var(--ink);
      cursor: pointer;
      list-style: none;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: var(--space-4);
      transition: color var(--duration-fast) ease;
    }
    details.faq-item summary::-webkit-details-marker { display: none; }
    details.faq-item summary:hover { color: var(--accent); }
    details.faq-item summary::after {
      content: '+';
      font-family: var(--font-mono);
      font-size: 1.2rem;
      color: var(--muted);
      flex-shrink: 0;
      transition: transform var(--duration-mid) var(--ease-stiff), color var(--duration-fast) ease;
    }
    details.faq-item[open] summary::after {
      content: '−';
      color: var(--accent);
    }
    .faq-answer {
      padding: 0 var(--space-6) var(--space-5);
      font-size: 0.9rem;
      color: var(--body);
      line-height: 1.75;
      border-top: 1px solid var(--hairline);
      margin-top: 0;
      padding-top: var(--space-5);
    }

    /* ── Responsive ─────────────────────────────────────────────── */

    @media (max-width: 768px) {
      .hero-rule-left, .hero-rule-right { display: none; }
      .problem-layout,
      .install-layout { grid-template-columns: 1fr; }
      .features-grid { grid-template-columns: 1fr 1fr; }
      .compliance-grid { grid-template-columns: 1fr; }
      .faq-grid { grid-template-columns: 1fr; }
      .section { padding: var(--space-16) var(--space-5); }
      .trust-strip { padding: var(--space-5); }
    }

    @media (max-width: 540px) {
      .features-grid { grid-template-columns: 1fr; }
      .hero-actions { flex-direction: column; align-items: stretch; }
      .btn { justify-content: center; white-space: normal; text-align: center; }
      .trust-strip-inner { gap: var(--space-5); }
    }

/* Formerly inline style= attributes: the P4 CSP (style-src without 'unsafe-inline') allows none. */
.btn-spaced { margin-top: var(--space-6); }
.compliance-grid-spaced { margin-top: var(--space-10); }
.link-accent { color: var(--accent); }

/* ── Figures and tables ─────────────────────────────────────── */
/* Themed figures and scrolling tables; docs.css has the same figure rules,
   see docs-tech/diagrams.md for the markup. CSS picks the twin from
   data-theme, the attribute the toggle sets. */
.diagram, .doc-shot { margin: 0; }
.diagram img { max-width: 100%; height: auto; margin: 0 auto; display: block; }
.doc-shot img {
  width: 100%;
  height: auto;
  box-shadow: 0 0 0 1px var(--hairline);
  border-radius: var(--radius-md);
}
.shot-dark { display: none; }
[data-theme="dark"] .shot-light { display: none; }
[data-theme="dark"] .shot-dark { display: block; }
.diagram figcaption { font-size: 0.82rem; color: var(--muted); line-height: 1.6; text-align: center; margin-top: var(--space-3); }
.doc-shot figcaption { font-size: 0.82rem; color: var(--muted); line-height: 1.6; margin-top: var(--space-3); }
.shots-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-8); margin-top: var(--space-10); }

/* A wide table scrolls inside its column instead of widening the page. */
.table-scroll { overflow-x: auto; }
.table-scroll + .table-scroll { margin-top: var(--space-8); }
.table-wide { width: 100%; margin-top: var(--space-8); }
.comparison-table a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.comparison-table code { font-family: var(--font-mono); font-size: 0.8em; }
.comparison-table caption {
  caption-side: top;
  text-align: left;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
  padding-bottom: var(--space-3);
}
/* Duty tables: fixed widths for the narrow columns. */
.comparison-table.duties thead th:first-child { width: 34%; }
.comparison-table.duties.cols-norm th:nth-child(2) { width: 18%; }
.comparison-table.duties.cols-version th:nth-child(3) { width: 10%; }
.nowrap { white-space: nowrap; }

/* A table beside its figure; one column on a phone. */
.figure-row {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: var(--space-10);
  align-items: start;
}
.figure-row + .figure-row { margin-top: var(--space-12); }
.section-note { color: var(--body); max-width: 68ch; margin-top: var(--space-8); }
.section-note a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.note-muted { font-size: 0.85rem; color: var(--muted); margin-top: var(--space-4); line-height: 1.6; }
.note-muted a, .problem-text a { color: var(--accent); }
@media (max-width: 900px) {
  .figure-row { grid-template-columns: 1fr; gap: var(--space-6); }
}
@media (max-width: 768px) { .shots-grid { grid-template-columns: 1fr; } }
/* Key-value tables beside a figure: a narrow key column, keys in full colour. */
.figure-row .comparison-table thead th:first-child,
.figure-row .comparison-table tbody td:first-child { width: 9.5rem; }
.figure-row .comparison-table tbody td:first-child { color: var(--ink); font-weight: 500; }
/* A diagram is too wide for the 2fr column: it goes under its table, at its own size. */
.figure-row:has(> .diagram) { grid-template-columns: 1fr; }
/* A three-column table stacks per row on a phone: each row becomes a small card. A legal
   source (.cite) is set small in mono; a cell with data-label announces its column. */
@media (max-width: 600px) {
  .stack-table thead { display: none; }
  .stack-table tr { display: block; padding: var(--space-3) 0; border-bottom: 1px solid var(--hairline); }
  .stack-table tbody td { display: block; border: none; padding: var(--space-1) var(--space-2); }
  .stack-table tbody td:first-child { color: var(--ink); font-weight: 500; }
  .stack-table tbody td.cite { font-family: var(--font-mono); font-size: 0.75rem; color: var(--muted); }
  .stack-table tbody td[data-label]::before { content: attr(data-label) ": "; color: var(--muted); font-weight: 400; }
}
@media (max-width: 600px) {
  .figure-row .comparison-table thead th:first-child,
  .figure-row .comparison-table tbody td:first-child { width: 6.5rem; }
  .figure-row .comparison-table tbody td { padding-left: var(--space-2); padding-right: var(--space-2); }
}
@media (max-width: 540px) {
  .hero-headline:lang(de) { font-size: clamp(1.7rem, 7.4vw, 2.6rem); }
}
