/* The news function serves its own HTML template and imports this sheet via news.css. */
:is(.performance-theme, body[data-page="aktuelles"]) {
  --bg: #0d131d;
  --bg-deep: #0a1019;
  --panel: #152132;
  --text: #f4f8ff;
  --muted: #bbcadd;
  --line: #3b5167;
  --accent: #64ccff;
  --paper: #e7f1fa;
  --ink: #112031;
  --signal: #ff6570;
  --focus: #b9e7ff;
  --button-fill: #d8efff;
  --card: linear-gradient(148deg, #182a3e, #121d2b 74%);
  --section-glow:
    radial-gradient(ellipse at 12% 0, #173651 0, transparent 55%),
    radial-gradient(ellipse at 96% 100%, #301b2b 0, transparent 44%),
    var(--bg);
  background: var(--bg);
  color: var(--text);
  color-scheme: dark;

  & :is(a, button, input, select, textarea, summary):focus-visible {
    outline-color: var(--focus);
  }

  & .icon-fill { fill: currentColor; fill-opacity: .12; }

  & .site-header {
    background: #0b121cfa;
    border-color: #2c4053;
  }

  & :is(.nav-contact, .header-location) { border-color: #526a80; }
  & .header-location { color: #bacad9; }

  & :is(main, .site-footer) :is(h1, h2, h3, h4, h5, h6) { color: var(--text); }
  & :is(h1, h2, h3, h4, h5, h6) em { color: inherit; }

  & .button,
  & .closing .closing-card .button {
    background: var(--button-fill);
    color: var(--ink);
    border-color: #b9dcf4;
    border-radius: 3px;
  }

  & .button:hover,
  & .closing .closing-card .button:hover { background: #9bdcff; }

  & .button-outline,
  & .hero-home .hero-actions .button-outline {
    background: #121e2bd9;
    color: #e6f4ff;
    border-color: #6485a0;
  }

  & .button-outline:hover,
  & .hero-home .hero-actions .button-outline:hover {
    background: var(--button-fill);
    color: var(--ink);
  }

  & .text-link { color: #afe1ff; }
  & .eyebrow { color: #9ad9ff; }
  & .small-label { color: #aec3d7; }
  & main .section { padding-block: clamp(54px, 7vw, 105px); }
  & .section-heading h2 { overflow-wrap: anywhere; }

  & .hero {
    border-bottom: 1px solid #40596e;
    background: var(--bg-deep);
  }

  & .hero-home .hero-image img { object-position: 65% 57%; }
  & :is(.hero-home, .hero-inner) .hero-image::after {
    background:
      linear-gradient(90deg, #080f19fa 0%, #0a1421e8 28%, #0b162684 52%, #0e192612 84%),
      linear-gradient(0deg, #0d131d, transparent 48%);
  }
  & .hero-inner .hero-image img { object-position: 60% 58%; }
  & .hero-home h1 { font-size: clamp(62px, 7.7vw, 112px); }
  & .hero-intro { color: #e1eaf4; max-width: 50ch; }

  & .hero-text {
    background:
      radial-gradient(ellipse at 9% 15%, #1e3c5a, transparent 64%),
      radial-gradient(ellipse at 90% 110%, #382135, transparent 60%),
      #0d131d;
  }

  & .hero-text .hero-content { padding-block: clamp(40px, 5.7vw, 88px); }
  & .film-trigger > span:first-child { color: #a5e0ff; border-color: #8db7d1; }
  & .film-trigger:hover > span:first-child { color: var(--ink); background: var(--accent); }

  & :is(.credentials, .worlds) {
    background: #111b28;
    border-color: #344b62;
  }

  & .credentials .wrap > div + div { border-color: #3b5269; }
  & .credentials :is(.icon, strong span) { color: #9bdbff; }
  & .credentials .wrap > div > span { color: #cad9e8; }

  & .world {
    border: 1px solid #526d84;
    border-radius: 12px;
    padding: clamp(23px, 4vw, 46px);
    box-shadow: 0 18px 36px #02081048;
  }

  & .world::after {
    background: linear-gradient(0deg, #0a131efc, #0b18264a 62%, #111b2b0a);
  }

  & .world-performance::after {
    background:
      linear-gradient(0deg, #0a131efc, #0b182638 70%),
      radial-gradient(ellipse at 0 70%, #1a789d52, transparent 69%);
  }

  & .world-classic { margin-top: 0; border-color: #92705c; }
  & .world-classic::after { background: linear-gradient(0deg, #211c17f5, #2a241c40 72%); }
  & .world-performance .world-link { color: #a7dfff; }
  & .world-classic .world-link { color: #f0d0a6; }

  & :is(.editorial, .services-overview, .process, .warm, .cost-section, .reviews-section) {
    background: var(--section-glow);
    color: var(--text);
    color-scheme: dark;
  }

  & :is(.editorial, .services-overview, .process, .cost-section, .reviews-section) {
    border-top: 1px solid #3b5369;
  }

  & .editorial-copy { background: #152132; }
  & .editorial-copy p:not(.eyebrow) { color: var(--muted); }
  & .image-caption { color: #e1edf9; }

  & :is(.service-grid, .feature-columns, .process-grid, .values-grid) { gap: 14px; }

  & :is(.service-tile, .feature-columns article, .process-grid li, .values-grid article) {
    min-width: 0;
    padding: clamp(20px, 2.5vw, 34px);
    border: 1px solid #476780;
    border-radius: 10px 15px 10px 15px;
    background: var(--card);
    box-shadow: 0 4px 0 #070e18a6;
  }

  & :is(.feature-columns article:last-child, .process-grid li:last-child, .values-grid article:last-child) {
    --icon-ink: #ff9ba5;
    border-color: #765664;
    background: linear-gradient(147deg, #342333, #1a212f 76%);
  }

  & .service-tile:nth-child(5) { --icon-ink: #f2d4ae; border-color: #796b55; }
  & .service-grid { border: 0; }
  & .service-tile { min-height: 200px; }
  & .service-tile:hover { border-color: #8dd5ff; background: #20354b; }

  & :is(.service-tile, .feature-columns article, .process-grid li, .values-grid article,
        .service-detail, .cost-inner, .founder, .quote-band) p { color: var(--muted); }

  & :is(.service-icon, .process-icon, .privacy-overview article > .icon) {
    display: inline-grid;
    place-items: center;
    width: 52px;
    height: 52px;
    padding: 9px;
    margin: 0 0 19px;
    border: 1px solid #5c7a93;
    border-radius: 8px 14px 8px 14px;
    background: linear-gradient(145deg, #2b4862, #131e2d);
    box-shadow: 3px 4px 0 #0b1421;
    color: var(--icon-ink, #9ae0ff);
  }

  & :is(.service-tile, .feature-columns article, .process-grid li):nth-child(even) :is(.service-icon, .process-icon) {
    transform: rotate(3deg);
  }

  & .process-grid li:last-child .process-icon {
    border-color: #9a6577;
    background: linear-gradient(150deg, #593146, #281d2d);
  }

  & .process-icon .icon { width: 100%; height: auto; }
  & .tile-arrow { color: #8fd7ff; }
  & .service-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }

  & .service-list details {
    min-width: 0;
    border: 1px solid #42627c;
    border-radius: 10px;
    color: var(--text);
    background: var(--card);
  }

  & .service-list details[open] { border-color: #80bddb; }
  & .service-list .service-title { color: var(--text); }
  & .service-list .service-detail .button { color: var(--ink); background: var(--button-fill); border-color: #b9dcf4; }
  & .service-list .service-detail .button:hover { background: #9bdcff; }

  & .service-list summary {
    min-height: 92px;
    padding: clamp(15px, 2vw, 26px);
    gap: clamp(12px, 2vw, 26px);
  }

  & .service-list summary .service-icon {
    width: 49px;
    height: 49px;
    margin: 0;
  }

  & .service-list small { color: #b4cce2; }
  & .service-list .details-toggle { color: #b9e7ff; border-color: #52758f; }
  & .service-list .service-detail { padding-inline: clamp(19px, 3.5vw, 108px); }
  & .service-detail li { color: #d3e1ee; }

  & .founder blockquote {
    border-color: #6998b4;
    color: #e4effb;
  }

  & :is(.founder-line, .founder cite) { color: #a9dfff; }
  & .quote-band { background: var(--section-glow); border-color: #455c72; }

  & :is(.faq-section, .contact-section, .privacy-page) { background: #101a27; color: var(--text); }
  & .faq-list details { border-color: #3c526a; }
  & .faq-list summary span { color: #91ddff; }
  & .faq-list details > p { color: var(--muted); }
  & .closing {
    color: var(--text);
    border-color: #3b5268;
    background: var(--section-glow);
  }

  & .closing::before { content: none; }
  & .closing h2 em::after { background: var(--accent); }
  & :is(.closing .closing-intro, .closing-signature, .closing-card > p, .closing-direct > span) { color: var(--muted); }
  & :is(.closing-signature .icon, .closing-card-top .small-label, .closing-phone-icon, .closing .closing-phone-arrow) { color: #9fddff; }

  & .closing .closing-card {
    border: 1px solid #5d7893;
    border-radius: 12px;
    background: var(--card);
  }

  & .closing-card::before {
    border-color: #a6d5ff1e;
    box-shadow: 0 0 0 42px #90d8ff08, 0 0 0 84px #90d8ff06;
  }

  & .closing-card::after { background: linear-gradient(90deg, var(--accent), var(--signal)); }
  & .closing-card-mark { border-color: #53738d; color: #b4e5ff; }
  & .closing .call-link { color: var(--text); }
  & .closing-person strong { color: var(--text); }

  & :is(.reviews-summary, .review-card, .news-card) {
    border-color: #476078;
    border-radius: 12px;
    background: var(--card);
    color: var(--text);
  }

  & .news-card { overflow: hidden; }
  & .news-image { background: #0c1420; }
  & :is(.review-quote-mark, .reviews-summary > a, .reviews-note a) { color: #ade3ff; }
  & :is(.review-card blockquote p, .review-card figcaption, .reviews-summary > p, .reviews-note) { color: var(--muted); }
  & .review-avatar { color: #c6e8ff; background: #243f57; }

  & .enquiry {
    background: var(--card);
    color: var(--text);
    border: 1px solid #557189;
    border-radius: 12px;
  }

  & .contact-info :is(address, .opening p, .opening dt, .opening dd),
  & .enquiry :is(.required-note, .form-help, .field-hint, .privacy-note, .document-private),
  & .legal-copy :is(p, li, address) { color: #c0cfe0; }

  & :is(.contact-info > a, .enquiry a, .legal-copy a) { color: #b2e1ff; }
  & .enquiry .button { color: var(--ink); }
  & .contact-info .opening { border-color: #456079; }
  & .enquiry :is(input, select, textarea) {
    background: #0f1927;
    color: var(--text);
    border-color: #607a91;
    border-radius: 4px;
    color-scheme: dark;
  }

  & .enquiry :is(input, textarea)::placeholder { color: #a0b2c5; }
  & .document-upload { border-color: #4c6780; background: #132235; }
  & .document-upload input::file-selector-button {
    color: var(--ink);
    background: #c8e7fb;
    border-color: #c8e7fb;
  }

  & :is(.privacy-overview article, .privacy-details details, .privacy-document, .tuning-terms article) {
    background: var(--card);
    border-color: #476279;
    color: var(--text);
  }

  & :is(.privacy-overview article, .privacy-details details, .privacy-document) p { color: var(--muted); }
  & :is(.privacy-page, .tuning-terms) a:not(.button) { color: #afe1ff; }
  & .legal-copy { max-width: 1125px; }

  & .anchor-nav { background: #132235; border-color: #415b73; }
  & .gearbox-nav a { color: #dbefff; }
  & .gearbox-nav a:hover { color: var(--accent); }

  & .gearbox-guide {
    & :is(.gb-methods, .gb-diagnosis, .gb-interval-grid article, .gb-types article) {
      border-color: #4d6880;
      background: var(--card);
      border-radius: 10px;
      color: var(--text);
    }

    & .gb-types { gap: 14px; }
    & .gb-types article { padding: 20px; border: 1px solid #4d6880; }
    & .gb-types p { padding-left: 0; }
    & .gb-tag { color: #d0ecff; border-color: #5a7a96; }
    & :is(.gb-lifetime, .gb-intervals, .gb-evidence) { background: #132031; border-color: #3b546d; }
    & :is(.gb-distance, .gb-keyline, .gb-lifetime-statement .eyebrow, .small-label, .gb-diagnosis > .icon) { color: #a6deff; }
    & .gb-keyline { color: #a6deff !important; border-color: #4b6780; }
    & :is(.gb-lifetime-copy p, .gb-evidence p, .gb-interval-grid article > p:not(.gb-distance)) { color: var(--muted); }
    & :is(.gb-lifetime-copy p strong, .gb-ask strong) { color: var(--text); }
    & :is(.gb-source, .gb-diagnosis a, .gb-evidence a) { color: #b4e6ff; text-decoration-color: #a3d6f8a0; }
    & :is(.gb-age, .gb-methods article + article) { border-color: #4b6680; }
    & .gb-benefit-grid .service-icon { width: 52px; height: 52px; }
  }

  & .site-footer {
    background: #0b121c;
    border-color: #3f566b;
  }

  & :is(.footer-brand-row, .footer-community, .footer-payments, .footer-meta, .footer-hours dl div) { border-color: #33485e; }
  & :is(.footer-main .footer-about, .footer-main .footer-contact-link,
        .footer-location-top .small-label, .footer-location-top .icon, .footer-contact > a .icon,
        .footer-payments .small-label, .footer-payments .icon, .footer-review-badge .icon, .footer-instagram > .icon) { color: #abdef9; }

  & :is(.footer-location, .footer-instagram, .footer-payments li) {
    border-color: #465c73;
    background: var(--card);
  }

  & .footer-main .footer-route {
    background: var(--button-fill);
    color: var(--ink);
  }

  & .footer-main .footer-route:hover { background: #9bdcff; }
  & .footer-main a:not(.footer-route):hover, & .footer-meta a:hover { color: #9bdbff; }

  & .privacy-dialog--consent {
    border-color: #5b7891;
    background: linear-gradient(146deg, #1c3046, #172233 75%);
  }

  & .privacy-dialog--consent .privacy-allow {
    color: var(--ink);
    border-color: #acd9f6;
    background: var(--button-fill);
  }
}

.performance-theme.error-page main {
  min-height: 100svh;
  padding-block: clamp(78px, 14vw, 155px);
}

/* The homepage uses a neutral palette. The tuning and classic pages have their own styling. */
.performance-theme[data-page=""] {
  --signal: #7fc6f1;
  --section-glow: radial-gradient(ellipse at 12% 0, #173651, transparent 60%), var(--bg);

  & .process-grid li:last-child {
    --icon-ink: #9ae0ff;
    border-color: #476780;
    background: var(--card);
  }

  & .process-grid li:last-child .process-icon {
    border-color: #5c7a93;
    background: linear-gradient(145deg, #2b4862, #131e2d);
  }
}

@media (max-width: 980px) {
  :is(.performance-theme, body[data-page="aktuelles"]) {
    & .site-header nav { background: #0f1a28; border-color: #48617a; }
    & .hero-home .hero-image::after {
      background: linear-gradient(180deg, #0b1421 0, #0b1421a8 25%, #1023320a 68%, #0d131dec 100%);
    }
    & .hero-inner .hero-image::after {
      background:
        linear-gradient(90deg, #0a1421f1 0, #0d1927a8 63%, #10192769),
        linear-gradient(0deg, #0d131d, transparent 45%);
    }
    & .hero-home h1 { font-size: clamp(48px, 11.7vw, 88px); }
  }
}

@media (max-width: 760px) {
  :is(.performance-theme, body[data-page="aktuelles"]) {
    & .section-heading h2 { font-size: clamp(34px, 7.5vw, 52px); }
    & .hero-inner h1, & .hero-text h1 { font-size: clamp(49px, 11vw, 76px); }
    & .world { min-height: 385px; }
    & .world h3 { font-size: clamp(42px, 9vw, 58px); }
    & .service-grid > .service-tile {
      display: grid;
      grid-template-columns: 44px minmax(0, 1fr) 19px;
      grid-template-areas: "icon title arrow" "icon description arrow";
      column-gap: clamp(11px, 3vw, 16px);
      row-gap: 5px;
      align-content: center;
      min-height: 105px;
      padding: 16px;
    }
    & .service-grid > .service-tile > .service-icon {
      grid-area: icon;
      position: static;
      align-self: start;
      width: 44px;
      height: 44px;
      padding: 8px;
      margin: 0;
    }
    & .service-tile > h3 {
      grid-area: title;
      min-width: 0;
      max-width: none;
      margin: 0;
      overflow-wrap: anywhere;
    }
    & .service-tile > p {
      grid-area: description;
      min-width: 0;
      max-width: none;
      margin: 0;
      font-size: 13px;
      line-height: 1.6;
    }
    & .service-tile > .tile-arrow {
      grid-area: arrow;
      position: static;
      align-self: center;
      justify-self: end;
    }
    & .process-grid li { position: relative; padding: 20px 20px 20px 85px; }
    & .process-grid .process-icon {
      position: absolute;
      inset: 20px auto auto 19px;
      width: 45px;
      height: 45px;
      margin: 0;
      padding: 8px;
    }
    & .gearbox-guide .gb-benefit-grid article { padding-left: 66px; }
    & .gearbox-guide .gb-benefit-grid .service-icon { width: 46px; height: 46px; }
  }
}

@media (max-width: 525px) {
  :is(.performance-theme, body[data-page="aktuelles"]) {
    & .hero-home .hero-content { padding-top: 42px; }
    & .hero-home .hero-actions { display: grid; grid-template-columns: 1fr; max-width: 285px; }
    & .hero-home .hero-image { top: 235px; }
    & .hero-home .hero-intro, & .hero-inner .hero-intro { font-size: 14px; }
    & .values-grid { grid-template-columns: 1fr; }
    & .service-list summary .service-icon { width: 43px; height: 43px; padding: 7px; }
    & .service-title { font-size: clamp(23px, 6.7vw, 30px); }
    & .closing h2 { font-size: clamp(37px, 10vw, 54px); }
    & .closing-inner, & .enquiry { min-width: 0; }
  }
}

