/* Pages: all pages: reading options -> fields -> validation -> page / panel scrolling -> display preferences.
   UI order: foundation -> header -> content -> forms -> dialogs -> footer.
   Shared property dependencies and responsive override positions preserve the cascade. */
/* 01 Shared foundation */
/* Shared accessibility defaults: readable copy, generous targets and visible focus. */
:root {
  --muted: #40554d;
  --scrollbar-size: 16px;
}

html {
  scroll-behavior: auto;
}

body {
  overflow-wrap: anywhere;
}

/* The permanent page rail replaces the browser's page bar, reserving one gutter. */
html.has-page-scroll-controls {
  padding-inline-end: 24px;
  scrollbar-gutter: auto;
  scrollbar-width: none;
}

html.has-page-scroll-controls::-webkit-scrollbar {
  width: 0;
  height: 0;
}

* {
  scrollbar-width: auto;
  scrollbar-color: #173f35 #e8eddf;
}

/* 08 Responsive and display overrides */
@supports selector(::-webkit-scrollbar) {
  /* 01 Shared foundation */
  * {
    scrollbar-color: auto;
  }

}

/* 01 Shared foundation */
*::-webkit-scrollbar {
  width: var(--scrollbar-size);
  height: var(--scrollbar-size);
}

*::-webkit-scrollbar-track {
  background: #e8eddf;
  border: 2px solid #63796e;
}

*::-webkit-scrollbar-thumb {
  background: #173f35;
  border: 2px solid #e8eddf;
  border-radius: 8px;
  min-height: 16px;
  min-width: 16px;
}

*::-webkit-scrollbar-button:single-button {
  display: block;
  width: var(--scrollbar-size);
  height: var(--scrollbar-size);
  background-color: #173f35;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 10px;
}

*::-webkit-scrollbar-button:vertical:decrement {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='white' d='M10 3 19 16H1Z'/%3E%3C/svg%3E");
}

*::-webkit-scrollbar-button:vertical:increment {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='white' d='m10 17 9-13H1Z'/%3E%3C/svg%3E");
}

*::-webkit-scrollbar-button:horizontal:decrement {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='white' d='M3 10 16 1v18Z'/%3E%3C/svg%3E");
}

*::-webkit-scrollbar-button:horizontal:increment {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='white' d='m17 10-13-9v18Z'/%3E%3C/svg%3E");
}

textarea, .tutorial-copy {
  overflow-y: scroll;
  scrollbar-gutter: stable;
}

/* 04 Main content and research panels */
.table-scroll {
  overflow: scroll;
  scrollbar-gutter: stable;
}

/* 06 Dialogs and reading controls */
.page-scroll-controls {
  position: fixed;
  z-index: 900;
  inset-block: 8px;
  inset-inline-end: 4px;
  width: var(--scrollbar-size);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0;
  background: #e8eddf;
  border: 2px solid #173f35;
}

.page-scroll-controls button, .region-scroll-controls button {
  background: #173f35;
  color: #fff;
  border: 2px solid #173f35;
  min-width: 44px;
  min-height: 44px;
  padding: 6px;
  border-radius: 4px;
  font-size: 1rem;
  line-height: 1.2;
}

.page-scroll-controls button:hover, .region-scroll-controls button:hover {
  background: #173f35;
}

.page-scroll-controls button:disabled, .region-scroll-controls button:disabled {
  color: #40554d;
  background: #e8eddf;
}

.page-scroll-track {
  flex: 1;
  min-height: 44px;
  position: relative;
  border: 2px solid #63796e;
  background: #e8eddf;
  touch-action: none;
  cursor: pointer;
}

.page-scroll-thumb {
  position: absolute;
  inset-inline: 2px;
  background: #173f35;
  border: 2px solid #fff;
  border-radius: 4px;
  min-height: 44px;
  pointer-events: none;
}

.region-scroll-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-block: 4px;
}

.scroll-region-shell {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0,1fr) var(--scrollbar-size);
  grid-template-rows: auto minmax(0,1fr);
  gap: 4px;
}

.scroll-region-shell > .region-scroll-controls {
  grid-column: 1 / -1;
  grid-row: 1;
}

/* 04 Main content and research panels */
.scroll-region-shell > textarea, .scroll-region-shell > .tutorial-copy, .scroll-region-shell > .info-copy, .scroll-region-shell > .table-scroll {
  grid-column: 1;
  grid-row: 2;
  min-width: 0;
}

/* 06 Dialogs and reading controls */
.region-scroll-track {
  position: relative;
  border: 2px solid #63796e;
  background: #e8eddf;
  touch-action: none;
  cursor: pointer;
  box-sizing: border-box;
  min-width: var(--scrollbar-size);
  min-height: var(--scrollbar-size);
}

.region-scroll-track.vertical {
  grid-column: 2;
  grid-row: 2;
}

.region-scroll-track.horizontal {
  grid-column: 1;
  grid-row: 3;
  height: var(--scrollbar-size);
}

.region-scroll-thumb {
  position: absolute;
  background: #173f35;
  border: 2px solid #fff;
  pointer-events: none;
}

.region-scroll-track.vertical .region-scroll-thumb {
  inset-inline: 2px;
  min-height: 44px;
}

.region-scroll-track.horizontal .region-scroll-thumb {
  inset-block: 2px;
  min-width: 44px;
}

.tutorial-card > .scroll-region-shell {
  overflow: hidden;
}

.tutorial-card .tutorial-copy {
  flex: 1;
}

/* 08 Responsive and display overrides */
@media (forced-colors: active) {
  /* 06 Dialogs and reading controls */
  .page-scroll-controls, .page-scroll-track {
    background: Canvas;
    border-color: CanvasText;
  }

  .page-scroll-thumb {
    background: Highlight;
    border-color: HighlightText;
    forced-color-adjust: none;
  }

}

/* 01 Shared foundation */
button, .button, .file-button, summary, .site-header nav a, .feature-jumps a,
.site-footer > a, .checkbox, .check {
  min-height: 44px;
  min-width: 44px;
}

button, .button, input, select, textarea, label, summary, .file-button,
.hint, .fine, .muted, .report, .feature p, .feature ul, .steps p,
.plan-description, .offer-card p, .faq details p, .contact-topic p,
.subscription-form > p:not(.form-feedback), .checkbox, .check,
.site-footer .fine.full, footer, .saved-row p, .lead {
  font-size: 1rem;
}

a:not(.button):not(.brand):not(.nav-cta) {
  text-underline-offset: .2em;
}

/* A light inner ring and dark outer ring remain visible on both dark and light surfaces. */
:focus-visible, .file-button:focus-within {
  outline: 3px solid #111;
  outline-offset: 3px;
  box-shadow: 0 0 0 3px #fff;
}

:where(a, button, input, select, textarea, summary, [tabindex]) {
  scroll-margin-block: 24px;
}

/* 02 Header and navigation */
.site-header nav a, .feature-jumps a {
  display: inline-flex;
  align-items: center;
}

.eyebrow, .brand-sub, .feature-number, .feature-tag, .demo-badge,
.offer-badge, .proof-strip .wrap, .visual-caption, .visual-foot,
.site-header nav, .site-footer > p:not(.fine), .site-footer > a:not(.brand) {
  font-size: .875rem;
}

.brand-sub {
  letter-spacing: .04em;
}

.tabs {
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
}

/* 05 Forms, plans and account controls */
.contact-topic > span {
  flex-shrink: 0;
  min-width: 2ch;
}

.checkbox, .check {
  padding-block: 10px;
  cursor: pointer;
}

/* 02 Header and navigation */
.tabs button {
  font-size: 1rem;
  padding: 10px;
}

/* 01 Shared foundation */
table {
  font-size: 1rem;
}

caption {
  text-align: left;
  font-weight: 700;
  padding: 12px;
}

/* 06 Dialogs and reading controls */
.region-scroll-controls button {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}

/* 07 Closing content and footer */
.hint, .muted, .fine, footer, .empty {
  color: #40554d;
}

/* 01 Shared foundation */
.primary {
  background: #173f35;
  border-color: #173f35;
  color: #fff;
}

.primary:hover {
  background: #234b3e;
}

.eyebrow {
  color: #173f35;
}

/* 02 Header and navigation */
.app-header .brand {
  color: var(--header-ink, #fff);
}

/* 04 Main content and research panels */
.source-section .fine, .source-section .eyebrow {
  color: #f4f7e9;
}

/* 02 Header and navigation */
.app-header a, .app-header .mode {
  color: var(--header-ink, #fff);
}

/* 01 Shared foundation */
input, textarea, select {
  border-color: #63796e;
  color: #163730;
}

input::placeholder, textarea::placeholder {
  color: #52645d;
  opacity: 1;
}

button:disabled {
  opacity: 1;
  color: #52645d;
  background: #e8eddf;
  border-color: #63796e;
}

.skip:focus, .skip-link:focus {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1000;
  color: #111;
  background: #fff;
}

/* Status messages stay in normal flow so they cannot cover the focused control. */
#status, #portal-status {
  position: static;
}

/* 04 Main content and research panels */
.table-scroll {
  border: 1px solid #63796e;
}

/* 06 Dialogs and reading controls */
/* Persistent validation feedback is readable as text, not just a colored border. */
.error-summary {
  border: 3px solid #8c3026;
  background: #fff;
  color: #611b15;
  padding: 18px;
  margin-block: 16px;
}

.error-summary a {
  color: inherit;
}

.field-error {
  color: #8c3026;
  font-weight: 650;
  margin: 6px 0 12px;
}

[aria-invalid="true"] {
  border: 2px solid #8c3026;
}

.password-toggle {
  display: block;
  margin-top: 8px;
}

/* Preferences supplement browser zoom; they do not intercept standard browser shortcuts. */
.reading-preferences {
  margin: 12px auto;
  padding: 12px 18px;
  width: min(1280px, calc(100% - 32px));
  border: 1px solid #63796e;
  background: #f8f8f1;
  color: #163730;
}

/* 01 Shared foundation */
/* Explicit high contrast complements, rather than disables, operating-system forced colors. */
html[data-high-contrast="true"] body, html[data-high-contrast="true"] body * {
  color: #111 !important;
  background-color: #fff !important;
  border-color: #111 !important;
  text-shadow: none !important;
}

html[data-high-contrast="true"] a {
  text-decoration: underline !important;
}

html[data-high-contrast="true"] button[aria-pressed="true"] {
  border-width: 3px;
  text-decoration: underline;
}

html[data-high-contrast="true"] button:disabled {
  border-style: dashed;
  cursor: not-allowed;
}

/* 06 Dialogs and reading controls */
.reading-preferences summary {
  font-size: 1rem;
  display: list-item;
  padding-block: 8px;
}

/* 01 Shared foundation */
html[data-large-text="true"] {
  font-size: 125%;
}

html[data-reading-space="true"] body {
  line-height: 1.8;
  letter-spacing: .04em;
  word-spacing: .12em;
}

html[data-reading-space="true"] h1, html[data-reading-space="true"] h2 {
  letter-spacing: normal;
  line-height: 1.4;
}

/* 06 Dialogs and reading controls */
.reading-preferences .preference-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.reading-preferences label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin: 0;
}

/* 01 Shared foundation */
html[data-reading-space="true"] p {
  margin-bottom: 2em;
}

/* 06 Dialogs and reading controls */
.reading-preferences input {
  width: 24px;
  height: 24px;
  min-height: 24px;
}

/* 08 Responsive and display overrides */
@media (prefers-contrast: more) {
  /* 01 Shared foundation */
  input, select, textarea, .card, button {
    border: 2px solid currentColor;
  }

  .hint, .muted, .fine {
    color: #163730;
  }

}

@media (forced-colors: active) {
  /* 01 Shared foundation */
  :focus-visible, .file-button:focus-within {
    outline: 3px solid Highlight;
    box-shadow: none;
  }

  button, .button, input, select, textarea, .card {
    border: 2px solid ButtonText;
  }

  button[aria-pressed="true"] {
    outline: 2px solid Highlight;
    text-decoration: underline;
  }

}

@media (prefers-reduced-motion: reduce) {
  /* 01 Shared foundation */
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation: none !important;
    transition: none !important;
  }

}

@media (max-width: 760px) {
  /* 02 Header and navigation */
  .brand-sub {
    max-width: 230px;
  }

  .site-header nav {
    flex-wrap: wrap;
  }

  .app-header {
    flex-wrap: wrap;
  }

  /* 04 Main content and research panels */
  .identity, .form-grid, .crm-grid {
    grid-template-columns: minmax(0, 1fr);
  }

}

@media (forced-colors: active) {
  /* 06 Dialogs and reading controls */
  .region-scroll-track {
    background: Canvas;
    border-color: CanvasText;
  }

  .region-scroll-thumb {
    background: Highlight;
    border-color: HighlightText;
    forced-color-adjust: none;
  }

}

/* Standard page scrollbar dimensions, independent of reading text size. */
.page-scroll-controls button {
  box-sizing: border-box;
  min-width: 0;
  width: 100%;
  min-height: 16px;
  height: 16px;
  padding: 0;
  border-width: 1px;
  border-radius: 0;
  font-size: 10px;
  line-height: 1;
}
