/* PCM: restrained concrete tones. Load after the original theme stylesheet.
   The scene, layout, type scale and existing accessibility modes stay intact. */
@media screen and (forced-colors: none) and (prefers-contrast: no-preference) {
  :root {
    --c-bg: #0b0c0b;
    --c-bg-2: #121310;
    --c-ink: #f2f0eb;
    --c-ink-2: #bdbbb4;
    --c-ink-3: #a5a39b;
    --c-line: #e7ddca26;
    --c-line-strong: #e7ddca73;
    --c-invert-bg: #eee8dc;
    --c-invert-ink: #24251f;
    --glass-surface-fill: #181914e8;
    --glass-surface-border: #e7ddca29;
    --glass-surface-edge: #f5eddc3d;
    --glass-card-fill: #24251fd6;
    --glass-card-border: #e7ddca2b;
    --glass-card-edge: #f5eddc38;
    --glass-card-shadow: 0 20px 44px -28px #000000c7;
    --glass-control-fill: #2b2d25e0;
    --glass-control-border: #e7ddca38;
    --glass-control-edge: #f5eddc47;
    --glass-opaque: #1a1c17;
    --veil-to: var(--c-bg);
    --pcm-accent: #c7b294;
    --pcm-accent-soft: #c7b2941a;
    --take-btn-primary-bg: #eee8dc;
    --take-btn-primary-ink: #24251f;
    --take-btn-fill: #191b17cf;
    --take-btn-border: #eee8dc80;
  }

  html[data-theme="light"] {
    --c-bg: #f3f1ec;
    --c-bg-2: #ebe8e1;
    --c-ink: #272922;
    --c-ink-2: #52554c;
    --c-ink-3: #696c61;
    --c-line: #363a2d26;
    --c-line-strong: #363a2d80;
    --c-invert-bg: #303329;
    --c-invert-ink: #faf7ef;
    --glass-surface-fill: #fffdf8e8;
    --glass-surface-border: #49433426;
    --glass-surface-edge: #fffffff2;
    --glass-card-fill: #fffdf8e6;
    --glass-card-border: #49433426;
    --glass-card-edge: #fffffff2;
    --glass-card-shadow: 0 18px 40px -28px #403b3040;
    --glass-control-fill: #fffdf8eb;
    --glass-control-border: #49433433;
    --glass-control-edge: #fff;
    --glass-opaque: #fffdf8;
    --veil-to: var(--c-bg);
    --pcm-accent: #796044;
    --pcm-accent-soft: #7960440f;
  }

  .flow > .chapter + .chapter {
    border-block-start: 1px solid var(--c-line);
  }

  .btn--primary {
    border-color: transparent;
    box-shadow: 0 2px 3px #0000000d, 0 8px 20px -12px #0000004d;
  }

  .btn--primary:not([aria-disabled="true"]):hover {
    opacity: 1;
    box-shadow: 0 2px 3px #00000014, 0 10px 22px -10px #00000066;
  }

  .btn--quiet:hover,
  .fld__in:not([aria-invalid="true"]):hover {
    border-color: var(--pcm-accent);
  }

  .fld__in:focus-visible {
    border-color: var(--pcm-accent);
  }

  .link {
    text-decoration-color: var(--pcm-accent);
    text-underline-offset: .25em;
  }

  .sheet__link[aria-current] .sheet__no,
  .kz__label {
    color: var(--pcm-accent);
  }

  .fld--check input[type="checkbox"] {
    accent-color: var(--pcm-accent);
  }

  @media (hover: hover) and (pointer: fine) {
    .sheet__link:hover {
      background: var(--pcm-accent-soft);
    }
  }
}

/* Keep a clear focus ring on both page surfaces and the dark hero imagery. */
@media screen and (forced-colors: none) {
  :focus-visible {
    outline-width: 3px;
  }

  .take :focus-visible,
  html.js:not(.off-take) .home .top :focus-visible,
  .take-quiet :focus-visible {
    outline-color: #fff;
    box-shadow: 0 0 0 5px #111c;
  }
}

@media screen and (max-width: 719.98px) {
  .top__menu {
    min-height: 2.75rem;
  }

  .fld--check .fld__lbl {
    display: block;
    min-height: 2.75rem;
  }

  .form__actions .btn {
    min-height: 3rem;
  }
}

/* Preserve the original opaque-surface fallback after our palette overrides. */
@media screen and (prefers-reduced-transparency: reduce) {
  :root,
  html[data-theme="light"] {
    --glass-surface-fill: var(--glass-opaque);
    --glass-card-fill: var(--glass-opaque);
    --glass-control-fill: var(--glass-opaque);
  }
}

/* No added animation; reduced-motion, forced-colors and print stay governed
   by the original theme. All decorative additions above are screen-only. */
