/* Tuotu Astro-projektista: src/styles/theme-light.css (bin/sync-astro.py). */
/* The front page as a light version, in Kansleri's colours, fourth try (Tapio, 2026-10-01). First: navy and
   white bands with rules ("näyttää hyvin sekavalta"); then all white and no lines; then "joka toinen osio
   sininen ja joka toinen valkoinen ilman borderia", "hero sininen"; now: "osiot, joissa on sininen tausta,
   tulisi olla edelleen bordereilla, vain valkoiset osiot ovat ilman bordereita", "tasaa valkoiset osiot,
   nyt osa boksseista leijuu".
   A TEST on the branch light-front-test: only src/pages/index.astro loads this file, nothing is published.

   Design, in short:
   - The groups of sections alternate navy (.fl-blue) and white (.fl-white): the hero is navy like the
     header, then white, navy, white, navy, white, navy. Kansleri's palette (kansleri.fi --brand-* tokens):
     navy #000024, teal #4cc8bf, white, body text #3d3d3d. The hello bar is the teal.
   - The navy groups, the header and the footer keep the site's rails and rules as they were.
   - The white groups have no lines. What the lines did, space and a quiet tint do: cards and figures are
     soft #f7f7f5 tiles with rounded corners and a gap between them, and everything sits on one left edge,
     the heading's: the tiles, the figures and the text of a row start where the heading starts, so nothing
     floats.
   The blocks read the --gh-* tokens, so redeclaring them on a group recolours everything inside it. */

/* --- The page ---------------------------------------------------------------------------------- */

body.product-home.is-front-switch {
  --header-h: 4.9rem;
}

html.theme-light body {
  --gh-header: #000024;
  --wp-header-deep: #000024;
  --gh-hello: #4cc8bf;
  --tile-radius: 14px;
  --gap: 1rem;
}

/* The hello bar: navy text on the teal, as on kansleri.fi. */
html.theme-light body [class*='hello'],
html.theme-light body [class*='hello'] a,
html.theme-light body [class*='hello'] span {
  color: #000024;
}

/* --- The two tones ---------------------------------------------------------------------------------- */

html.theme-light .fl-white,
html.theme-light .fl-blue {
  position: relative;
  background: var(--gh-bg);
  color: var(--gh-subtle);
}

html.theme-light .fl-white {
  /* The rules of the rails layout all read this token: transparent, the lines are gone. */
  --gh-border: transparent;
  --border: transparent;
  --est-rule: transparent;
  --gh-bg: #ffffff;
  --bg: #ffffff;
  --header-bg: #ffffff;
  --gh-text: #000024;
  --gh-subtle: #3d3d3d;
  --gh-muted: #5b5f6e;
  /* Teal is too pale for text on white: a darker teal of the same hue. */
  --gh-link: #0a7a72;
  --gh-accent: #0a7a72;
  --gh-green: #000024;
  --gh-green-hover: #1d1d4a;
  --accent: #0a7a72;
  --accent-hover: #000024;
  --tile: #f7f7f5;
  --text: var(--gh-subtle);
  --heading: var(--gh-text);
  --muted: var(--gh-muted);
  --wire: var(--tile);
  --alt: var(--tile);
  --panel: #f7f7f5;
  --input-bg: #f3f3f3;
  --row-hover: #ececec;
  --track: #e4e4e4;
  --fill: #555555;
}

/* The contents bar docked to the bottom of phone screens (Toc.astro) is a navy bar inside the white page: it
   takes the navy group's tokens, or its title, numbers and list read as dark text on navy. */
html.theme-light :is(.fl-blue, .wp-toc-dock) {
  --gh-border: rgba(255, 255, 255, 0.14);
  --border: rgba(255, 255, 255, 0.14);
  --est-rule: color-mix(in srgb, #ffffff 14%, #000024);
  --gh-bg: #000024;
  --bg: #000024;
  --header-bg: #000024;
  --gh-text: #ffffff;
  --gh-subtle: #d6daee;
  --gh-muted: #b4b9d6;
  --gh-link: #4cc8bf;
  --gh-accent: #4cc8bf;
  --gh-green: #4cc8bf;
  --gh-green-hover: #7ad9d1;
  --accent: #4cc8bf;
  --accent-hover: #7ad9d1;
  --tile: color-mix(in srgb, #ffffff 7%, #000024);
  --text: var(--gh-subtle);
  --heading: var(--gh-text);
  --muted: var(--gh-muted);
  --wire: var(--tile);
  --alt: var(--tile);
  --panel: color-mix(in srgb, #ffffff 7%, #000024);
  --input-bg: color-mix(in srgb, #ffffff 10%, #000024);
  --row-hover: color-mix(in srgb, #ffffff 6%, #000024);
  --track: color-mix(in srgb, #ffffff 14%, #000024);
  --fill: #aab0cf;
}

/* Most blocks carry .is-header-tone, and the hero its own rule, which set the background token to the
   header's navy (global.css, body.product-home .is-header-tone): inside a group they follow the group. */
html.theme-light body.product-home .fl-white :is(.is-header-tone, .split-hero.split-hero--rails) {
  --gh-bg: #ffffff;
  --gh-border: transparent;
  background-color: #ffffff;
}

html.theme-light body.product-home .fl-blue :is(.is-header-tone, .split-hero.split-hero--rails) {
  --gh-bg: #000024;
  --gh-border: rgba(255, 255, 255, 0.14);
  background-color: #000024;
}

/* The footer closes the page in navy with the site's rules; its button and links in the teal. */
html.theme-light body .big-footer,
html.theme-light body footer {
  --gh-bg: #000024;
  --bg: #000024;
  --gh-green: #4cc8bf;
  --gh-green-hover: #7ad9d1;
  --gh-link: #4cc8bf;
  --gh-accent: #4cc8bf;
  background: #000024;
}

html.theme-light body footer .btn-primary:where(:not(.tk-sec, .tk-sec *, .tk-results, .tk-results *, .tk-fp-hero, .tk-fp-hero *)) {
  background: #4cc8bf;
  border-color: #4cc8bf;
  color: #000024;
}

/* Anything that still draws a line out of the token's reach (borders, pseudo-element rules). */
html.theme-light .fl-white :is(.wrap, section, .rails-intro, .rails-cols-band, .rails-cols, .rails-cell, .icon-cards, .icon-card, .feature-row, .feature-row-copy, .feature-row-media, .logo-wall, .logo-wall--rails):where(:not(.tk-sec, .tk-sec *, .tk-results, .tk-results *, .tk-fp-hero, .tk-fp-hero *)) {
  border-color: transparent !important;
  box-shadow: none !important;
}

html.theme-light .fl-white :is(.rails-intro, .rails-cols-band, .icon-cards, .feature-row, .logo-wall--rails, .landing-section):where(:not(.tk-sec, .tk-sec *, .tk-results, .tk-results *, .tk-fp-hero, .tk-fp-hero *))::before,
html.theme-light .fl-white :is(.rails-intro, .rails-cols-band, .icon-cards, .feature-row, .logo-wall--rails, .landing-section):where(:not(.tk-sec, .tk-sec *, .tk-results, .tk-results *, .tk-fp-hero, .tk-fp-hero *))::after {
  background: transparent !important;
  border-color: transparent !important;
}

/* --- Space instead of rules ------------------------------------------------------------------------- */

html.theme-light .fl-white .rails-intro {
  padding-block: 2.5rem 1.5rem;
}

/* The intro's own 104 px of top padding went too (Tapio: "liikaa padding topia"): ~64 px in all. */
html.theme-light .fl-white .rails-intro .section-intro {
  padding-top: 1.5rem;
}

html.theme-light .fl-white .rails-intro .lede {
  max-width: 42rem;
}

/* The group's cards and columns: tiles on a gap. */
html.theme-light .fl-white .icon-cards--rails > .wrap,
html.theme-light .fl-white .rails-cols {
  gap: var(--gap);
  padding-block: 0 3rem;
}

html.theme-light .fl-white .icon-cards--rails .icon-card,
html.theme-light .fl-white .rails-cols > .rails-cell {
  background: var(--tile);
  border-radius: var(--tile-radius);
  overflow: hidden;
}

/* Rows with a picture or figures: air above and below, the figures as tiles. */
html.theme-light .fl-white .feature-row--rails > .wrap {
  gap: 3rem;
  padding-block: 1.5rem 3.5rem;
  align-items: center;
}

html.theme-light .fl-white .fp-figures {
  background: transparent !important;
}

html.theme-light .fl-white .fp-figures dl {
  gap: var(--gap);
}

html.theme-light .fl-white .fp-figure {
  background: var(--tile);
  border: 0 !important;
  border-radius: var(--tile-radius);
  padding: 1.75rem 1.5rem;
}

@media (max-width: 640px) {
  html.theme-light .fl-white .fp-figure,
  html.theme-light .fl-white .fp-figure:nth-child(even) {
    padding: 1.25rem 1rem;
  }

  html.theme-light .fl-white .rails-intro {
    padding-block: 3.5rem 1.25rem;
  }

  html.theme-light .fl-white .icon-cards--rails > .wrap,
  html.theme-light .fl-white .rails-cols {
    padding-block: 0 3rem;
  }
}

/* --- Buttons ------------------------------------------------------------------------------------------ */

html.theme-light .fl-white .btn-primary:where(:not(.tk-sec, .tk-sec *, .tk-results, .tk-results *, .tk-fp-hero, .tk-fp-hero *)),
html.theme-light .fl-white .split-hero--rails .split-hero-actions > .btn-primary:where(:not(.tk-sec, .tk-sec *, .tk-results, .tk-results *, .tk-fp-hero, .tk-fp-hero *)) {
  background: #000024;
  border-color: #000024;
  color: #ffffff;
}

html.theme-light .fl-white .btn-primary:hover:where(:not(.tk-sec, .tk-sec *, .tk-results, .tk-results *, .tk-fp-hero, .tk-fp-hero *)),
html.theme-light .fl-white .split-hero--rails .split-hero-actions > .btn-primary:hover:where(:not(.tk-sec, .tk-sec *, .tk-results, .tk-results *, .tk-fp-hero, .tk-fp-hero *)) {
  background: #1d1d4a;
  border-color: #1d1d4a;
  color: #ffffff;
}

html.theme-light .fl-white .btn:not(.btn-primary):where(:not(.tk-sec, .tk-sec *, .tk-results, .tk-results *, .tk-fp-hero, .tk-fp-hero *)) {
  border-color: #000024;
  color: #000024;
}

html.theme-light .fl-blue .btn-primary:where(:not(.tk-sec, .tk-sec *, .tk-results, .tk-results *, .tk-fp-hero, .tk-fp-hero *)),
html.theme-light .fl-blue .split-hero--rails .split-hero-actions > .btn-primary:where(:not(.tk-sec, .tk-sec *, .tk-results, .tk-results *, .tk-fp-hero, .tk-fp-hero *)) {
  background: #4cc8bf;
  border-color: #4cc8bf;
  color: #000024;
}

html.theme-light .fl-blue .btn-primary:hover:where(:not(.tk-sec, .tk-sec *, .tk-results, .tk-results *, .tk-fp-hero, .tk-fp-hero *)),
html.theme-light .fl-blue .split-hero--rails .split-hero-actions > .btn-primary:hover:where(:not(.tk-sec, .tk-sec *, .tk-results, .tk-results *, .tk-fp-hero, .tk-fp-hero *)) {
  background: #7ad9d1;
  border-color: #7ad9d1;
  color: #000024;
}

html.theme-light .fl-blue .btn:not(.btn-primary):where(:not(.tk-sec, .tk-sec *, .tk-results, .tk-results *, .tk-fp-hero, .tk-fp-hero *)) {
  border-color: #ffffff;
  color: #ffffff;
}

/* --- The customers' logos are white artwork made for a dark page: kept on navy, dark on white ----------- */

html.theme-light .fl-white .logo-wall img:where(:not(.tk-sec, .tk-sec *, .tk-results, .tk-results *, .tk-fp-hero, .tk-fp-hero *)),
html.theme-light .fl-white .logo-wall svg:where(:not(.tk-sec, .tk-sec *, .tk-results, .tk-results *, .tk-fp-hero, .tk-fp-hero *)) {
  filter: brightness(0);
  opacity: 0.55;
}

html.theme-light .fl-white .logo-wall img:hover:where(:not(.tk-sec, .tk-sec *, .tk-results, .tk-results *, .tk-fp-hero, .tk-fp-hero *)) {
  opacity: 0.85;
}

/* A framed photo (the "Kuka minä olen" row): no white panel around it, rounded like the tiles. */
html.theme-light .fl-white .feature-row-media.wp-media {
  background: transparent !important;
}

html.theme-light .fl-white .feature-row-media.wp-media img {
  border-radius: var(--tile-radius);
}

/* One left edge: the text of a row starts where the heading above and the tiles below start (the row's
   copy cell had a 64 px inset of its own, which made it float), and the row's cells are as tall as its tiles. */
html.theme-light .fl-white .feature-row--rails > .wrap {
  align-items: stretch;
}

html.theme-light .fl-white .feature-row-copy {
  padding-inline-start: 0 !important;
  justify-content: center;
}

/* --- The dark / light switch in the header (both themes) -------------------------------------------- */

.product-theme {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-right: 0.35rem;
  padding: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.product-theme button {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 1.7rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #d6daee;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.product-theme button svg {
  width: 1rem;
  height: 1rem;
}

.product-theme button:hover {
  color: #ffffff;
}

.product-theme button[aria-pressed='true'] {
  background: #ffffff;
  color: #000024;
}

.product-theme button:focus-visible {
  outline: 2px solid #4cc8bf;
  outline-offset: 2px;
}

/* Phones, tablets and the narrowest desktop row (the header has no room for two buttons): one button, the
   active theme's; a tap switches to the other (the page's script). */
@media (max-width: 1279px) {
  .product-theme {
    margin-right: 0;
    padding: 0;
    background: transparent;
  }

  .product-theme button[aria-pressed='false'] {
    display: none;
  }

  .product-theme button[aria-pressed='true'] {
    width: 2.2rem;
    height: 2.2rem;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
  }
}

/* A menu item never breaks onto two lines (the front page's menu has five items now, so there is room). */
body .product-nav .nav-link {
  white-space: nowrap;
}

/* --- The mega panels (Palvelut, Opi) ------------------------------------------------------------------
   Three columns on the page container, each link a block: the label, and a line under it that says what is
   behind it. A link lights up as a soft tile on hover; the first column ("Aloita tästä") is a tinted card,
   the place to start. The headings are small teal capitals. Both themes: the panel takes the header's tone. */
@media (min-width: 1200px) {
  body.page-wp .product-nav .mega-menu {
    align-items: start;
    gap: 1.25rem;
    padding-block: 2rem 2.5rem;
  }

  body.page-wp .product-nav .mega-menu > .sub-item {
    min-width: 0;
    padding: 1.1rem 0.6rem 0.75rem;
    border-radius: 18px;
  }

  body.page-wp .product-nav .mega-menu > .sub-item:first-child {
    background: color-mix(in srgb, #4cc8bf 11%, transparent);
  }

  body.page-wp .product-nav .mega-menu > .sub-item > a {
    display: block;
    margin: 0 0 0.6rem;
    padding: 0 1rem;
    color: #4cc8bf;
    font-size: 0.82rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
  }

  /* The columns' lists carry the panel's own background and rule: none here, the tile shows through. */
  body.page-wp .product-nav .mega-menu .sub-menu {
    position: static;
    gap: 0.15rem;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  body.page-wp .product-nav .mega-menu .sub-menu a {
    padding: 0.7rem 1rem;
    border-radius: 12px;
    transition: background-color 0.15s ease;
  }

  body.page-wp .product-nav .mega-menu .sub-menu a:hover,
  body.page-wp .product-nav .mega-menu .sub-menu a:focus-visible {
    background: rgba(255, 255, 255, 0.08);
  }

  body.page-wp .product-nav .mega-menu .sub-menu .nav-label {
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
  }

  body.page-wp .product-nav .mega-menu .sub-menu a:hover .nav-label,
  body.page-wp .product-nav .mega-menu .sub-menu a:focus-visible .nav-label {
    color: #4cc8bf;
    text-decoration: none;
  }

  body.page-wp .product-nav .mega-menu .nav-text {
    gap: 0.2rem;
  }

  body.page-wp .product-nav .mega-menu .nav-desc {
    color: #aab0c8;
    font-size: 0.86rem;
    line-height: 1.45;
  }
}

/* --- The cards of the white groups: an outlined arrow that fills and reads on hover ------------------------
   (Tapio, 2026-10-01). At rest the arrow is a transparent circle with a navy border. When the pointer is on
   the card the circle fills navy, grows into a pill and the card's own link text appears before the arrow
   ("Lue opas", "Lue case", "Lue artikkeli": the title attribute CardGrid already sets), the arrow nudges
   right, and the card tints a little. All of it eased; no hover on a touch screen, so there the circle is
   simply filled. */
html.theme-light :is(.fl-white, main.site-main) .icon-card {
  transition: background-color 0.3s ease;
}

html.theme-light :is(.fl-white, main.site-main) .icon-card:hover {
  background: #efefec;
}

html.theme-light :is(.fl-white, main.site-main) .icon-card-go {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  width: auto;
  min-width: 2rem;
  height: 2rem;
  padding: 0;
  overflow: hidden;
  white-space: nowrap;
  border: 1px solid #000024;
  border-radius: 999px;
  background: transparent;
  color: #000024;
  transition:
    background-color 0.3s ease,
    color 0.3s ease,
    padding 0.4s cubic-bezier(0.2, 0.7, 0.2, 1);
}

html.theme-light :is(.fl-white, main.site-main) .icon-card-go svg {
  flex: none;
  transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1);
}

html.theme-light :is(.fl-white, main.site-main) .icon-card-go::before {
  content: attr(title);
  max-width: 0;
  margin-right: 0;
  opacity: 0;
  transform: translateX(-8px);
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1;
  transition:
    max-width 0.4s cubic-bezier(0.2, 0.7, 0.2, 1),
    margin 0.4s cubic-bezier(0.2, 0.7, 0.2, 1),
    opacity 0.25s ease 0.08s,
    transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1);
}

html.theme-light :is(.fl-white, main.site-main) .icon-card:is(:hover, :focus-within) .icon-card-go {
  padding: 0 0.85rem 0 1rem;
  background: #000024;
  color: #ffffff;
}

html.theme-light :is(.fl-white, main.site-main) .icon-card:is(:hover, :focus-within) .icon-card-go::before {
  max-width: 10rem;
  margin-right: 0.55rem;
  opacity: 1;
  transform: none;
}

html.theme-light :is(.fl-white, main.site-main) .icon-card:is(:hover, :focus-within) .icon-card-go svg {
  transform: translateX(2px);
}

@media (hover: none) {
  html.theme-light :is(.fl-white, main.site-main) .icon-card-go {
    background: #000024;
    color: #ffffff;
  }
}

@media (prefers-reduced-motion: reduce) {
  html.theme-light :is(.fl-white, main.site-main) .icon-card,
  html.theme-light :is(.fl-white, main.site-main) .icon-card-go,
  html.theme-light :is(.fl-white, main.site-main) .icon-card-go::before,
  html.theme-light :is(.fl-white, main.site-main) .icon-card-go svg {
    transition: none;
  }
}

/* --- The hero without rules (Tapio, 2026-10-01: "korjaa vielä vain herossa borderit"): the navy hero and its
   logo row are one clean block, no rails at the sides and no hairline at the bottom where the white begins;
   the change of colour is the edge. The other navy groups keep their rails. ------------------------------ */
html.theme-light .fl-hero {
  --gh-border: transparent;
  --border: transparent;
}

html.theme-light body.product-home .fl-hero :is(.is-header-tone, .split-hero.split-hero--rails):where(:not(.tk-sec, .tk-sec *, .tk-results, .tk-results *, .tk-fp-hero, .tk-fp-hero *)) {
  --gh-border: transparent;
}

html.theme-light .fl-hero :is(.wrap, section, .logo-wall, .logo-wall--rails, .logo-wall-row, .logo-wall-viewport):where(:not(.tk-sec, .tk-sec *, .tk-results, .tk-results *, .tk-fp-hero, .tk-fp-hero *)) {
  border-color: transparent !important;
  box-shadow: none !important;
}

html.theme-light .fl-hero :is(section, .logo-wall--rails, .split-hero):where(:not(.tk-sec, .tk-sec *, .tk-results, .tk-results *, .tk-fp-hero, .tk-fp-hero *))::before,
html.theme-light .fl-hero :is(section, .logo-wall--rails, .split-hero):where(:not(.tk-sec, .tk-sec *, .tk-results, .tk-results *, .tk-fp-hero, .tk-fp-hero *))::after {
  background: transparent !important;
  border-color: transparent !important;
}

/* ============================================================================================================
   Every page but the front page (main.site-main, from Site.astro): the light theme as one white surface
   (2026-10-01: "tee tämä light/dark sekä valikkomuutos koko sivuston laajuiseksi"). The header and the footer
   are navy, the hero (.split-hero) and the closing "Kysy lisää" band (.contact-band) navy too, everything
   else white with the site's rails and rules in a soft grey: on the long pages the rules are what holds
   tables, the FAQs and the cards together. The blocks read the --gh-* tokens, so redeclaring them on <main>
   recolours everything inside it. The front page keeps its own bands (.fl-blue, .fl-white above).
   ============================================================================================================ */

html.theme-light main.site-main {
  --gh-bg: #ffffff;
  --bg: #ffffff;
  --header-bg: #ffffff;
  --gh-text: #000024;
  --gh-subtle: #3d3d3d;
  --gh-muted: #5b5f6e;
  --gh-border: #dfe1ea;
  --border: #dfe1ea;
  --est-rule: #dfe1ea;
  --gh-link: #0a7a72;
  --gh-accent: #0a7a72;
  --gh-green: #000024;
  --gh-green-hover: #1d1d4a;
  --accent: #0a7a72;
  --accent-hover: #000024;
  --tile: #f7f7f5;
  --text: var(--gh-subtle);
  --heading: var(--gh-text);
  --muted: var(--gh-muted);
  --wire: #f1f2f6;
  --alt: #f7f7f5;
  --panel: #f7f7f5;
  --input-bg: #f3f3f3;
  --row-hover: #ececec;
  --track: #e4e4e4;
  --fill: #555555;
  background: #ffffff;
  color: var(--gh-subtle);
}

/* Blocks that set the background token to the header's navy stay white inside the page ... */
html.theme-light body.product-home main.site-main .is-header-tone {
  --gh-bg: #ffffff;
  --gh-border: #dfe1ea;
  background-color: #ffffff;
}

/* ... except the navy ones: the hero and the closing contact band. */
html.theme-light body.product-home main.site-main :is(.split-hero.split-hero--rails, .contact-band, .contact-band-grid) {
  --gh-bg: #000024;
  --bg: #000024;
  --header-bg: #000024;
  --gh-text: #ffffff;
  --gh-subtle: #d6daee;
  --gh-muted: #b4b9d6;
  --gh-border: rgba(255, 255, 255, 0.14);
  --border: rgba(255, 255, 255, 0.14);
  --est-rule: color-mix(in srgb, #ffffff 14%, #000024);
  --gh-link: #4cc8bf;
  --gh-accent: #4cc8bf;
  --gh-green: #4cc8bf;
  --gh-green-hover: #7ad9d1;
  --accent: #4cc8bf;
  --accent-hover: #7ad9d1;
  --text: var(--gh-subtle);
  --heading: var(--gh-text);
  --muted: var(--gh-muted);
  --wire: color-mix(in srgb, #ffffff 9%, #000024);
  --alt: color-mix(in srgb, #ffffff 6%, #000024);
  --panel: color-mix(in srgb, #ffffff 7%, #000024);
  --input-bg: color-mix(in srgb, #ffffff 10%, #000024);
  --row-hover: color-mix(in srgb, #ffffff 6%, #000024);
  --track: color-mix(in srgb, #ffffff 14%, #000024);
  --fill: #aab0cf;
  background-color: #000024;
  color: var(--gh-subtle);
}

/* Buttons: navy on white, teal on navy. */
html.theme-light main.site-main .btn-primary:where(:not(.tk-sec, .tk-sec *, .tk-results, .tk-results *, .tk-fp-hero, .tk-fp-hero *)),
html.theme-light main.site-main .split-hero--rails .split-hero-actions > .btn-primary:where(:not(.tk-sec, .tk-sec *, .tk-results, .tk-results *, .tk-fp-hero, .tk-fp-hero *)) {
  background: #000024;
  border-color: #000024;
  color: #ffffff;
}

html.theme-light main.site-main .btn-primary:hover:where(:not(.tk-sec, .tk-sec *, .tk-results, .tk-results *, .tk-fp-hero, .tk-fp-hero *)),
html.theme-light main.site-main .split-hero--rails .split-hero-actions > .btn-primary:hover:where(:not(.tk-sec, .tk-sec *, .tk-results, .tk-results *, .tk-fp-hero, .tk-fp-hero *)) {
  background: #1d1d4a;
  border-color: #1d1d4a;
  color: #ffffff;
}

html.theme-light main.site-main .btn:not(.btn-primary):where(:not(.tk-sec, .tk-sec *, .tk-results, .tk-results *, .tk-fp-hero, .tk-fp-hero *)) {
  border-color: #000024;
  color: #000024;
}

html.theme-light main.site-main :is(.split-hero--rails, .contact-band, .contact-band-grid) .btn-primary:where(:not(.tk-sec, .tk-sec *, .tk-results, .tk-results *, .tk-fp-hero, .tk-fp-hero *)),
html.theme-light main.site-main :is(.split-hero--rails, .contact-band, .contact-band-grid) .split-hero-actions > .btn-primary:where(:not(.tk-sec, .tk-sec *, .tk-results, .tk-results *, .tk-fp-hero, .tk-fp-hero *)) {
  background: #4cc8bf;
  border-color: #4cc8bf;
  color: #000024;
}

html.theme-light main.site-main :is(.split-hero--rails, .contact-band, .contact-band-grid) .btn-primary:hover:where(:not(.tk-sec, .tk-sec *, .tk-results, .tk-results *, .tk-fp-hero, .tk-fp-hero *)) {
  background: #7ad9d1;
  border-color: #7ad9d1;
  color: #000024;
}

html.theme-light main.site-main :is(.split-hero--rails, .contact-band, .contact-band-grid) .btn:not(.btn-primary):where(:not(.tk-sec, .tk-sec *, .tk-results, .tk-results *, .tk-fp-hero, .tk-fp-hero *)) {
  border-color: #ffffff;
  color: #ffffff;
}

/* The customers' logos are white artwork for a dark page: dark on the white surface. */
html.theme-light main.site-main .logo-wall img:where(:not(.tk-sec, .tk-sec *, .tk-results, .tk-results *, .tk-fp-hero, .tk-fp-hero *)),
html.theme-light main.site-main .logo-wall svg:where(:not(.tk-sec, .tk-sec *, .tk-results, .tk-results *, .tk-fp-hero, .tk-fp-hero *)) {
  filter: brightness(0);
  opacity: 0.55;
}

html.theme-light main.site-main :is(.split-hero--rails, .contact-band) .logo-wall img:where(:not(.tk-sec, .tk-sec *, .tk-results, .tk-results *, .tk-fp-hero, .tk-fp-hero *)) {
  filter: none;
  opacity: 1;
}

/* The guides' interactive pieces (src/styles/guide-demos.css) name their colours from inside .gd, made for the
   dark page: the light palette here, so their headings, hints and rules read on white. */
html.theme-light main.site-main,
html.theme-light main.site-main .gd {
  --gd-ink: #1f2328;
  --gd-muted: #4b535d;
  --gd-dim: #6b7280;
  --gd-line: #d0d7de;
  --gd-soft: #f6f8fa;
  --gd-green: #1a7f37;
  --gd-red: #cf222e;
  --gd-amber: #9a6700;
  --gd-blue: #0969da;
  --gd-fill-green: #1a7f37;
  --gd-fill-red: #cf222e;
}

/* The demos that have a dark variant (tone="dark": their own variables for a dark panel) take their light
   palette on the white page: the same values their base styles set. */
html.theme-light main.site-main .aic.is-dark {
  --aic-ink: #1f2328;
  --aic-muted: #59636e;
  --aic-line: #e1e4e8;
  --aic-green: #1a7f37;
  --aic-red: #cf222e;
}

html.theme-light main.site-main .opt.is-dark {
  --opt-ink: #1f2328;
  --opt-muted: #59636e;
  --opt-line: #e1e4e8;
  --opt-blue: #1a0dab;
  --opt-green: #1a7f37;
  --opt-red: #cf222e;
  --opt-mark: #d6f4e0;
  --opt-soft: #f6f8fa;
  --opt-hover: #eaeef2;
  --opt-press: #1a7f37;
}

html.theme-light main.site-main .quiz.is-dark .quiz-heading:where(:not(.tk-sec, .tk-sec *, .tk-results, .tk-results *, .tk-fp-hero, .tk-fp-hero *)) {
  color: #1f2328;
}

html.theme-light main.site-main .quiz.is-dark .quiz-result {
  --quiz-ink: #1f2328;
  --quiz-muted: #59636e;
  --quiz-line: #d0d7de;
  --quiz-green: #1a7f37;
  --quiz-red: #cf222e;
  --quiz-panel: #ffffff;
}

/* WordPress's own "black table" (an inline style in the page's text, its table rule broken by a typo, so only the
   header cells are dark): white text on the dark header, the links in the theme's teal. */
html.theme-light main.site-main > :not([data-band='navy']) .blacktable th:where(:not(.tk-sec, .tk-sec *, .tk-results, .tk-results *, .tk-fp-hero, .tk-fp-hero *)) {
  color: #ffffff;
}

html.theme-light main.site-main > :not([data-band='navy']) .blacktable a:where(:not(.tk-sec, .tk-sec *, .tk-results, .tk-results *, .tk-fp-hero, .tk-fp-hero *)) {
  color: #0a7a72;
}

/* The footer's button: navy text on the teal. */
html.theme-light body .site-footer-button {
  color: #000024;
}

/* --- Phones: the front page's tiles keep an inset of their own (2026-10-01: "check mobile optimization, its broken
   on the light version"). The phone rules (global.css, src/styles/mobile/) zero a card's side padding so its
   text sits on the page gutter between the rules; as a tile it needs air inside, and the label chip, whose
   background is the tile's own, sits on the same left edge as the title. ------------------------------------ */
html.theme-light .fl-white .icon-card-label {
  padding-inline: 0;
  background: transparent;
}

@media (max-width: 799px) {
  html.theme-light .fl-white .icon-cards--rails .icon-card {
    padding: 1.5rem 1.25rem;
  }

  html.theme-light .fl-white .icon-cards--rails .icon-card .wp-card-image {
    margin-bottom: 1rem;
  }
}

/* Phones: the white groups' rows sit closer (the desktop's air between intro, row and tiles is too much on a
   narrow screen). */
@media (max-width: 799px) {
  html.theme-light .fl-white .rails-intro {
    padding-bottom: 0.25rem;
  }

  html.theme-light .fl-white .feature-row--rails > .wrap {
    gap: 1rem;
    padding-block: 0 1.5rem;
  }

  html.theme-light .fl-white .feature-row-copy {
    padding-block: 1rem 0.5rem !important;
  }

  html.theme-light .fl-white .fp-figures {
    min-height: 0 !important;
    border-top: 0 !important;
  }
}


/* --- The guides group of the front page, redone as ONE block (Tapio, 2026-10-01: "tämä osio etusivulla on ihan
   karmea, muotoile se uudestaan"; the first redo, a navy tile beside four figure tiles, was "vielä kamalampi: nämä
   tekstit yhden palikan sisään").
   One soft tile holds everything under the heading: the line that says what the guides are for, the most-read guide
   (title, text, button) and its four figures. The tile is made of the two bands it sits in, drawn as one: the
   intro's lede is its top (rounded above), the row is its bottom (rounded below), the same colour and width with no
   gap between, and a hairline inside runs between them. The row's two halves are separated by a hairline too, and
   the figures are a plain 2 x 2 list under hairlines, all from the top of their cell, so their lines sit level.
   The cards under the block are compact tiles. Light theme only: the dark page keeps its rails. ---------------- */
html.theme-light .fl-white .rails-intro:has(+ .fp-flagship) {
  padding-bottom: 0;
  /* The band's own 1 px (transparent here) bottom border would be a white seam between the block's two halves. */
  border-bottom-width: 0;
}

html.theme-light .fl-white .fp-flagship {
  border-top-width: 0;
}

html.theme-light .fl-white .rails-intro:has(+ .fp-flagship) :is(.wrap, .section-intro) {
  padding-bottom: 0;
}

/* The intro's column is 704 px wide; the block's top spans the container like its bottom. */
html.theme-light .fl-white .rails-intro:has(+ .fp-flagship) .section-intro {
  max-width: none;
}

/* The top of the block: the lede. */
html.theme-light .fl-white .rails-intro:has(+ .fp-flagship) .lede {
  max-width: none;
  margin: 1.5rem 0 0;
  padding: 2.25rem 2.5rem 0;
  border-radius: var(--tile-radius) var(--tile-radius) 0 0;
  background: var(--tile);
  color: #000024;
  font-size: 1.25rem;
  line-height: 1.5;
}

html.theme-light .fl-white .rails-intro:has(+ .fp-flagship) .lede::after {
  content: '';
  display: block;
  height: 1px;
  margin-top: 2rem;
  background: rgba(0, 0, 36, 0.12);
}

/* The bottom of the block: the guide and its figures. */
html.theme-light .fl-white .fp-flagship {
  margin-bottom: var(--gap);
}

html.theme-light .fl-white .fp-flagship > .wrap {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 0;
  align-items: start;
  padding: 2rem 2.5rem 2.5rem;
  border-radius: 0 0 var(--tile-radius) var(--tile-radius);
  background: var(--tile);
}

html.theme-light .fl-white .fp-flagship .feature-row-copy {
  padding: 0 3rem 0 0 !important;
  background: transparent;
  justify-content: flex-start;
}

html.theme-light .fl-white .fp-flagship .feature-row-title {
  max-width: 24ch;
  margin: 0 0 0.9rem;
  font-size: clamp(1.6rem, 2.2vw, 2rem);
  line-height: 1.15;
  text-wrap: balance;
}

html.theme-light .fl-white .fp-flagship .feature-row-extra,
html.theme-light .fl-white .fp-flagship .feature-row-extra p {
  max-width: 34rem;
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.55;
}

html.theme-light .fl-white .fp-flagship .feature-row-copy > p.fp-actions {
  margin: 1.5rem 0 0;
}

html.theme-light .fl-white .fp-flagship .fp-figures {
  min-height: 0 !important;
  padding: 0 0 0 3rem !important;
  border-left: 1px solid rgba(0, 0, 36, 0.12) !important;
  border-right: 0 !important;
}

html.theme-light .fl-white .fp-flagship .fp-figures dl {
  gap: 0 2rem;
}

html.theme-light .fl-white .fp-flagship .fp-figure {
  justify-content: flex-start;
  padding: 1.25rem 0 1.4rem;
  border-radius: 0;
  background: transparent;
}

html.theme-light .fl-white .fp-flagship .fp-figure:nth-child(-n + 2) {
  padding-top: 0;
}

html.theme-light .fl-white .fp-flagship .fp-figure:nth-child(n + 3) {
  border-top: 1px solid rgba(0, 0, 36, 0.12) !important;
}

html.theme-light .fl-white .fp-flagship .fp-figure:nth-child(even) {
  border-left: 0 !important;
}

html.theme-light .fl-white .fp-flagship .fp-figure:nth-child(n + 3):last-child,
html.theme-light .fl-white .fp-flagship .fp-figure:nth-child(n + 3):nth-last-child(2) {
  padding-bottom: 0;
}

html.theme-light .fl-white .fp-flagship .fp-figure dt {
  color: #000024;
  font-size: 1.5rem;
  font-weight: 600;
}

html.theme-light .fl-white .fp-flagship .fp-figure dd {
  margin-top: 0.4rem;
  font-size: 0.95rem;
}

/* The cards under the block: compact, text across the tile. */
html.theme-light .fl-white .fp-flagship + .icon-cards--rails > .wrap {
  padding-block: 0 3rem;
}

html.theme-light .fl-white .fp-flagship + .icon-cards--rails .icon-card {
  min-height: 0;
  padding: 1.75rem 1.75rem 1.5rem;
}

html.theme-light .fl-white .fp-flagship + .icon-cards--rails .icon-card-label {
  margin: 0 0 1rem;
}

html.theme-light .fl-white .fp-flagship + .icon-cards--rails .icon-card :is(h3, .wp-card-title) {
  max-width: none;
  margin: 0 0 0.6rem;
  font-size: 1.3rem !important;
}

html.theme-light .fl-white .fp-flagship + .icon-cards--rails .icon-card p.wp-card-text {
  max-width: none;
  margin: 0 0 1.5rem;
  font-size: 1rem !important;
}

/* Tablets and phones: the guide over its figures, the figures under a hairline. */
@media (max-width: 899px) {
  html.theme-light .fl-white .rails-intro:has(+ .fp-flagship) .lede {
    padding: 1.75rem 1.5rem 0;
    font-size: 1.1rem;
  }

  html.theme-light .fl-white .rails-intro:has(+ .fp-flagship) .lede::after {
    margin-top: 1.5rem;
  }

  html.theme-light .fl-white .fp-flagship > .wrap {
    grid-template-columns: minmax(0, 1fr);
    padding: 1.5rem 1.5rem 1.75rem;
  }

  html.theme-light .fl-white .fp-flagship .feature-row-copy {
    padding: 0 !important;
  }

  html.theme-light .fl-white .fp-flagship .feature-row-title {
    max-width: none;
  }

  html.theme-light .fl-white .fp-flagship .fp-figures {
    margin-top: 1.75rem;
    padding: 1.5rem 0 0 !important;
    border-left: 0 !important;
    border-top: 1px solid rgba(0, 0, 36, 0.12) !important;
  }
}

@media (max-width: 640px) {
  html.theme-light .fl-white .fp-flagship .fp-figure {
    padding-block: 1rem 1.1rem;
  }

  html.theme-light .fl-white .fp-flagship .fp-figure:nth-child(-n + 2) {
    padding-top: 0;
  }

  html.theme-light .fl-white .fp-flagship .fp-figure dt {
    font-size: 1.15rem;
  }

  html.theme-light .fl-white .fp-flagship .fp-figure dd {
    font-size: 0.85rem;
  }

  html.theme-light .fl-white .fp-flagship + .icon-cards--rails .icon-card {
    padding: 1.5rem 1.25rem 1.25rem;
  }
}
