/* Public PULSE refinements. Load after mobile.css (after brand.css on /brand).
   Existing tokens, artwork and native account/number controllers remain authoritative.
   Guidance: jakubkrehel/skills (UI, layout, accessibility, typography),
   make-interfaces-feel-better, and Impeccable polish/craft-floor. */

html { color-scheme: dark; }
.light-section, .brand-palette, .brand-reference { color-scheme: light; }

/* Preserve the existing type hierarchy while allowing real content to reflow. */
.hero-copy, .performance-copy > *, .section-intro > *, .access-layout > *,
.member-copy, .member-desk, .apply-copy, .application, .footer-notes > *,
.brand-opening > *, .brand-type > *, .brand-principles > * { min-width: 0; }

.hero-copy > p, .section-intro > p, .member-copy > p, .apply-copy > p,
.step-detail > p, .paid-option-terms, .footer-notes p,
.brand-opening > p, #guide-content p { text-wrap: pretty; }

.footer-notes p, #guide-content p { max-width: 70ch; }
.field-hint, .form-error, .draft-state, .request-privacy,
.paid-option-terms, .footer-notes p { overflow-wrap: break-word; }
.application-top, .form-actions { flex-wrap: wrap; }
.application-top > span:first-child { min-width: 0; }
.required-word { margin-inline-start: 12px; }
.form-page > label, .form-success > label { overflow-wrap: break-word; }
.form-page input, #request-draft { caret-color: var(--gold); }
#request-draft { scrollbar-color: var(--input-border) var(--ink); }

/* Focus stays clear of mobile chrome, including the persistent access action. */
:where(a, button, input, textarea, summary, [tabindex]):focus-visible {
  scroll-margin-block: 100px calc(var(--mobile-access-height, 80px) + 24px);
}
.skip-link:focus-visible { z-index: 60; }
.light-section :is(a, button, summary, input, textarea):focus-visible {
  outline-color: var(--gold-dark);
}
.brand-reference :is(a, summary):focus-visible { outline-color: var(--signal-on-light); }
.button[aria-disabled="true"], .button:disabled { cursor: default; }
.button:disabled:active, .button[aria-disabled="true"]:active { scale: 1; }

.button > .icon, .text-link > .icon, summary > .icon { flex-shrink: 0; }
.text-link, .brand-downloads a, .brand-reference a {
  text-underline-offset: .22em;
  text-decoration-thickness: from-font;
}
.brand-reference a { overflow-wrap: anywhere; }

/* A frequent chart control needs immediate feedback and a persistent state cue.
   This touches controls only, never the live traces or changing-value animation. */
.performance-range::after { transition: none; }
.performance-range:not([data-marker-ready="true"]) button[aria-pressed="true"] {
  text-decoration: underline;
  text-underline-offset: .5em;
  text-decoration-thickness: 2px;
}
.performance-chart-toolbar, .performance-series { flex-wrap: wrap; }

/* Neutral defaults on touch: a tap must not leave a hover animation behind. */
@media (hover: none) {
  .button-gold:hover:not(:disabled):not([aria-disabled="true"]) {
    background: var(--gold);
    box-shadow: var(--control-lift);
  }
  .button-outline:hover { background: transparent; }
  .button:is(:hover,:focus-visible) > .icon,
  .hero-actions .button:is(:hover,:focus-visible) .icon,
  .text-link:is(:hover,:focus-visible) > .icon { transform: none; }
  .footer-back:is(:hover,:focus-visible) > .icon { transform: rotate(-90deg); }
  .site-header nav a:hover:not(:focus-visible) { color: #d0d4c9; }
  .site-header nav a:hover:not(:focus-visible)::after { transform: scaleX(0); }
  .wordmark:hover:not(:focus-visible) > span { color: inherit; }
  .step-select:hover:not(:focus-visible) { color: inherit; }
  .broker-step-link:hover:not(:focus-visible) { color: var(--signal-on-light); }
  .member-section .member-activity > summary:hover:not(:focus-visible),
  .footer-methods > summary:hover:not(:focus-visible) { color: var(--paper); }
  .paid-option > summary:hover:not(:focus-visible) .paid-option-view,
  .paid-option > summary:hover:not(:focus-visible) > .disclosure-icon { color: var(--muted); }
  .brand-downloads a:hover:not(:focus-visible) { color: var(--gold); }
  .performance-section .performance-range button:hover:not(:disabled):not([aria-pressed="true"]),
  .performance-section .performance-series button:hover:not(:disabled):not([aria-pressed="true"]) {
    color: var(--performance-copy);
  }
}

/* Keep familiar buttons tactile, while tab and row interactions stay still. */
@media (prefers-reduced-motion: no-preference) {
  .button {
    transition: scale 150ms ease-out, background-color 150ms ease-out,
      color 150ms ease-out, box-shadow 150ms ease-out;
  }
  .button:active:not(:disabled):not([aria-disabled="true"]) { scale: .96; }
}

/* Reduced motion affects interface feedback only; value controllers own their
   accessible number settling and the authored artwork owns its existing pause. */
@media (prefers-reduced-motion: reduce) {
  .button:active:not(:disabled):not([aria-disabled="true"]) { scale: 1; }
  .button:is(:hover,:focus-visible) > .icon,
  .hero-actions .button:is(:hover,:focus-visible) .icon,
  .text-link:is(:hover,:focus-visible) > .icon { transform: none; }
  .footer-back:is(:hover,:focus-visible) > .icon { transform: rotate(-90deg); }
}

/* The existing Escape pause also settles a pressed interface control. */
body[data-motion="paused"] .button:active:not(:disabled),
body[data-motion="reduced"] .button:active:not(:disabled) { scale: 1; }

/* Readable documentation is part of the public site, including narrow screens. */
body.brand-guide .brand-type .type-numbers {
  max-width: 100%;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}
#guide-content table { table-layout: fixed; }
#guide-content th, #guide-content td { overflow-wrap: anywhere; vertical-align: top; }
#guide-content th:first-child, #guide-content td:first-child { width: 26%; }
#guide-content th:nth-child(2), #guide-content td:nth-child(2) { width: 25%; }
body.brand-guide .brand-mast, body.brand-guide .brand-foot { flex-wrap: wrap; }

@media (max-width: 760px) {
  .hero-actions { grid-template-columns: minmax(0,1.05fr) minmax(0,.95fr); }
  .hero-actions > *, .member-links > * { min-width: 0; }
  .application .button { max-width: 100%; }
  .form-actions > .button { flex: 1 1 160px; }
  .form-actions > .back-button { flex: 0 0 auto; }
  .brand-guide .brand-mast > span { max-width: min(140px, 55%); }
  #guide-content td, #guide-content th { padding-inline: 6px; }
}

/* System high-contrast colors replace shadows; preserve visible boundaries
   and selected states when the browser suppresses the brand palette. */
@media (forced-colors: active) {
  .button, .application, .member-desk { outline: 1px solid ButtonText; outline-offset: -1px; }
  :is(a, button, input, textarea, summary, [tabindex]):focus-visible {
    outline: 2px solid Highlight;
    outline-offset: 4px;
  }
  .performance-range button[aria-pressed="true"],
  .performance-series button[aria-pressed="true"] {
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: .35em;
  }
  .button:disabled, .button[aria-disabled="true"] { color: GrayText; outline-color: GrayText; }
}

/* Account entry replaces the unsent request draft. */
.member-registration{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:24px;min-height:300px}.member-registration>p{max-width:38ch;color:var(--muted)}.member-registration-signin{font-size:14px}.member-registration-signin .text-link{display:inline-flex;margin-inline-start:8px}

/* Account entry remains readable when labels wrap or browser text is enlarged. */
.member-registration > * { min-width: 0; max-width: 100%; }
.member-registration-signin .text-link { min-height: 44px; align-items: center; }
.brand-downloads, .brand-assets > div { min-width: 0; }
.brand-downloads a { overflow-wrap: anywhere; }

/* The downloadable-asset proof sheet is also readable as a narrow web page. */
body.brand-contact-sheet { padding: clamp(20px, 4vw, 48px); }
.brand-contact-sheet > header { flex-wrap: wrap; align-items: flex-start; }
.brand-contact-sheet > header > *, .brand-contact-sheet .grid > * { min-width: 0; }
.brand-contact-sheet h1 { font-size: clamp(2rem, 4vw, 2.75rem); line-height: 1.15; overflow-wrap: anywhere; }
.brand-contact-sheet .card { overflow: visible; }
.brand-contact-sheet :is(.tile, .avatar) { max-width: 100%; height: auto; }
.brand-contact-sheet :is(.label, .note, .copy) { overflow-wrap: anywhere; }
@media (max-width: 1000px) {
  .brand-contact-sheet :is(.wide, .half, .third) { grid-column: span 6; }
}
@media (max-width: 700px) {
  .brand-contact-sheet :is(.wide, .half, .third, .full) { grid-column: 1 / -1; }
  .brand-contact-sheet .card { padding: 20px; }
}

/* The lower page moves from the access route, to the product, to a clear next step. */
#access { padding-block: 88px 64px; }
#access > .ambient-signal { display: none; }
#access .section-intro { grid-template-columns: 1.4fr 1fr; }
#access h2 { font-size: clamp(42px, 4.5vw, 64px); }
#access h2 span { color: var(--gold-dark); }
#access .access-layout { display: block; margin-top: 44px; }
#access .access-steps { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 32px; }
#access .access-step { display: block; min-height: 0; padding: 22px 0 24px; border-bottom: 0; border-top: 2px solid var(--rule); }
#access .access-step.is-selected { border-top-color: var(--signal-on-light); }
#access .step-number { display: block; margin: 0 0 12px; font: 400 34px/1 Outfit,sans-serif; }
#access .access-step > span:nth-child(2) { display: block; }
#access .access-step strong { font-size: 24px; }
#access .access-step small { max-width: 30ch; font-size: 14px; }
#access .step-visual { flex-direction: row; align-items: center; gap: 48px; padding-top: 24px; border-top: 1px solid var(--rule); }
#access .route-diagram { width: 48%; height: 112px; padding: 0 6px; }
#access .route-diagram > svg { height: 82px; }
#access .step-detail { min-height: 0; padding: 0; }
#access .step-detail h3 { margin: 0; font-size: 26px; }
#access .detail-bottom { margin-top: 12px; padding-top: 0; border: 0; }

#member { padding-block: 100px; gap: clamp(40px,7vw,112px); }
#member .member-copy h2 { font-size: clamp(40px,4.2vw,60px); letter-spacing: -.025em; }
#member .member-copy > p { max-width: 35ch; }
#member .licence-preview { background: var(--jade-ground,#1c3329); border-radius: 0; box-shadow: none; border-top: 2px solid var(--gold); padding: 28px 32px; }
.licence-preview-heading { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 20px; font-size: 12px; color: var(--gold); }
.licence-preview-heading > span:last-child { color: #c0d2c5; }
.licence-preview-count { display: flex; align-items: center; gap: 26px; padding: 22px 0 28px; }
.licence-preview-count strong { font: 400 clamp(76px,8vw,112px)/1 Outfit,sans-serif; letter-spacing: -.06em; color: var(--paper); }
.licence-preview-count > span { font-size: 16px; line-height: 1.5; color: #c0d2c5; }
.licence-preview-slots { list-style: none; padding: 0; margin: 0; }
.licence-preview-slots li { display: grid; grid-template-columns: 32px 1fr; gap: 16px; padding: 12px 0; border-top: 1px solid #496051; font-size: 14px; }
.licence-preview-slots li > span:first-child { color: var(--signal); font-variant-numeric: tabular-nums; }
.licence-preview-slots i { font-style: normal; color: var(--signal); padding-inline: 10px; }
.licence-preview-note { color: #c0d2c5; font-size: 13px; margin-top: 20px; }

#questions { padding-block: 64px; grid-template-columns: .8fr 1.2fr; }
#questions h2 { font-size: clamp(36px,4vw,52px); }
#questions .faq-list { min-width: 0; }
#questions summary { font-size: 17px; min-height: 76px; }
#questions .faq-answer { font-size: 15px; max-width: 60ch; }
#questions details[open] summary > .icon { rotate: 0deg; }
#questions details[open] .disclosure-stem { opacity: 0; }

#apply { background: var(--gold); color: var(--ink); padding-block: 80px 40px; gap: 40px 70px; color-scheme: light; }
#apply .apply-copy h2 { font-size: clamp(48px,5.6vw,80px); letter-spacing: -.04em; }
#apply .apply-copy > p { color: var(--ink-soft); max-width: 32ch; }
#apply .apply-copy .broker-action { background: transparent; border-radius: 0; padding: 12px 0; border-bottom: 1px solid var(--gold-dark); box-shadow: none; text-align: left; justify-content: flex-start; }
#apply .member-registration { background: var(--ink); color: var(--paper); border-radius: 0; box-shadow: none; min-height: 300px; padding: 36px; gap: 22px; }
#apply .member-registration h3 { font-size: 32px; line-height: 1.2; }
#apply .member-registration > .button { width: 100%; justify-content: space-between; }
#apply .paid-option { border-color: var(--gold-dark); }
#apply .paid-option > summary, #apply .paid-option-price { color: var(--ink); }
#apply :is(.paid-option-description,.paid-option-view,.paid-option-period,.paid-option-terms,.paid-option-state,.paid-option > summary > .icon) { color: var(--ink-soft); }
#apply .paid-option-title { font-size: 21px; }
#apply .paid-option-next > .button { color: var(--ink); box-shadow: inset 0 0 0 1px var(--gold-dark); }
#apply .paid-option-next > .button:hover { background: var(--paper); }
#apply :focus-visible { outline-color: var(--ink); }
#apply .member-registration :focus-visible { outline-color: var(--gold); }

@media (max-width: 760px) {
  #access { padding-block: 56px 40px; }
  #access .section-intro { display: block; }
  #access .section-intro > p { margin-top: 20px; }
  #access .access-layout { margin-top: 32px; }
  #access .access-steps { grid-template-columns: 1fr; gap: 0; }
  #access .access-step { display: grid; grid-template-columns: 40px minmax(0,1fr); gap: 16px; padding-block: 20px; }
  #access .step-number { margin-top: 6px; font-size: 26px; }
  #access .access-step strong { font-size: 22px; }
  #access .step-visual { gap: 24px; align-items: stretch; flex-direction: column; padding-top: 12px; }
  #access .route-diagram { width: 100%; height: 100px; }
  #access .step-detail h3 { font-size: 22px; }
  #access .detail-bottom { margin-top: 6px; }
  #member { padding-block: 64px; gap: 32px; }
  #member .licence-preview { padding: 24px; }
  .licence-preview-count { padding-block: 24px; }
  .licence-preview-slots li { gap: 10px; font-size: 13px; }
  .licence-preview-slots i { padding-inline: 4px; }
  #questions { padding-block: 48px; }
  #questions .section-intro { margin-bottom: 28px; }
  #questions h2 br { display: none; }
  #questions summary { font-size: 16px; }
  #questions .faq-answer { padding-right: 16px; }
  #apply { padding-block: 56px 24px; gap: 32px; }
  #apply .member-registration { padding: 28px 24px; min-height: 0; }
  #apply .member-registration h3 { font-size: 28px; }
}
@media (max-width: 760px) {
  #apply .member-registration > .button { gap: 16px; padding-inline: 20px; font-size: 14px; }
}
