/* Shared interaction hierarchy. Load last.
   Orange advances a task; filled forest buttons support it; green underlines navigate;
   warm paper disclosures reveal content. Color is reinforced by shape and labels. */
@media screen {
  :root {
    --cg-action: #e58b3d;
    --cg-action-hover: #f09d50;
    --cg-action-ink: #123e2d;
    --cg-action-border: #97450b;
    --cg-link: #176044;
    --cg-link-hover: #123e2d;
    --cg-secondary-border: #6b7967;
    --cg-secondary-hover: #ece2cc;
    --cg-button-secondary: #123e2d;
    --cg-button-secondary-hover: #245840;
    --cg-button-ink: #fff8e9;
    --cg-button-border: #0d3426;
    --cg-disclosure: #e9e1cf;
    --cg-disclosure-hover: #e2d7c0;
    --cg-disclosure-ink: #123e2d;
    --cg-disclosure-border: #6b7967;
    --cg-focus: #8a3d0b;
    --cg-focus-inner: #fff;
  }
  /* Keep the login/workspace and preferences surfaces consistent with the site.
     Document previews retain their own backgrounds and original pixels. */
  :is(.review-app, .unsubscribe-page) {
    --canvas: #f3ead7;
    --paper: #fff8e9;
    --white: #fff8e9;
    --wash: #e9e1cf;
    --line: #c9c4b2;
    --ink: #123e2d;
    --muted: #46584b;
    --orange: #e58b3d;
    --orange-ink: #8a3d0b;
    background: var(--canvas);
    color: var(--ink);
  }
  .unsubscribe-header, .review-header { background: #f3ead7; color: #123e2d; border-top-color: #e58b3d; border-bottom-color: #c9c4b2; }
  .review-header img { background: transparent; }
  .unsubscribe-card { background: var(--paper); border-color: var(--line); border-top-color: #176044; box-shadow: none; }
  .review-app :is(.account-label, .review-footer, .review-preview figcaption, .review-zoom-status) { color: var(--muted); }
  .review-app input:not([type=checkbox]), .review-app select, .review-app textarea,
  .unsubscribe-card input[type=email] { background: #fffaf0; color: var(--ink); border-color: #5f806d; }
  .review-app :is(input, textarea)::placeholder,
  .unsubscribe-card input::placeholder { color: var(--muted); opacity: 1; }
  .review-app .error, .unsubscribe-card .error { background: #f3dfbd; color: #71270c; }


  /* Light cards reset their own contrast inside forest sections. */
  :is(.hero, .method-band, .comparison-teaser, .handoff-proof, .tool-output, .preview) {
    --cg-link: #f3ead7;
    --cg-link-hover: #fff8e9;
    --cg-secondary-border: #f3ead7;
    --cg-secondary-hover: #1c6248;
    --cg-button-border: #94ad8a;
    --cg-disclosure: #e9e1cf;
    --cg-disclosure-hover: #e2d7c0;
    --cg-disclosure-ink: #123e2d;
    --cg-disclosure-border: #56a078;
    --cg-focus: #f6e8bd;
    --cg-focus-inner: #0d3426;
  }
  :is(.pro-brief, .pro-pillar, .pro-evidence-card, .pro-update-note,
      .guarantee-summary, .side-block, .ongoing-card, .guarantee-terms,
      .example-tile, .contact-letter, .before-after, .real-proof,
      .inquiry-card, .service-group, .intake-output, .home-hero-proof,
      .context-help, .real-case, .case-added, .case-preview,
      .proof-image, .home-document-preview, .quantity-field, .tool-notice,
      .review-welcome, .review-card, .review-text-copy, .review-preview-dialog,
      .review-text-table, .unsubscribe-card, .scope-before-pay, .review-methods,
      .custom-project, .task-guide, .catalog-row, .journal-item),
  .real-mini-change > div, .quote-fields fieldset {
    --cg-link: #176044;
    --cg-link-hover: #123e2d;
    --cg-secondary-border: #6b7967;
    --cg-secondary-hover: #ece2cc;
    --cg-button-border: #0d3426;
    --cg-disclosure: #e9e1cf;
    --cg-disclosure-hover: #e2d7c0;
    --cg-disclosure-ink: #123e2d;
    --cg-disclosure-border: #6b7967;
    --cg-focus: #8a3d0b;
    --cg-focus-inner: #fff;
  }

  /* A normal destination is a text link, including after visiting it. */
  a:any-link, a:visited {
    background: transparent !important;
    color: var(--cg-link) !important;
    border: 0 !important;
    border-radius: 0;
    padding: 0 !important;
    box-shadow: none;
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal;
    overflow-wrap: anywhere;
    text-decoration: underline !important;
    text-decoration-thickness: .08em !important;
    text-underline-offset: .19em;
    cursor: pointer;
  }
  a:any-link:hover {
    color: var(--cg-link-hover) !important;
    text-decoration-thickness: .14em !important;
    filter: none !important;
  }
  /* The global link reset must not erase the keyboard skip link surface. */
  a.skip:any-link {
    background: #0d3426 !important;
    color: #fff8e9 !important;
    border: 1px solid #e58b3d !important;
    border-radius: .5rem;
    padding: .75rem 1rem !important;
    font-weight: 700;
    text-decoration: none !important;
    box-shadow: 0 .35rem 1rem rgb(15 40 31 / 24%);
  }
  a[aria-current]:not([aria-current=false]):not(.button):not(.header-contact) {
    text-decoration-style: double !important;
    font-weight: 750;
  }
  :is(.desktop-nav, .mobile-panel nav, .review-header nav) > a,
  .header-client-login, .unsubscribe-header > a:last-child {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: .45rem .25rem !important;
  }
  :is(.desktop-nav, .mobile-panel nav, .review-header nav) > a[aria-current]:not([aria-current=false]) {
    text-decoration: none !important;
    box-shadow: inset 0 -3px var(--orange, #e58b3d);
    font-weight: 750;
  }

  /* Solid surfaces make secondary actions recognizable without relying on an outline. */
  :is(button, input[type=button], input[type=reset], input[type=submit].secondary,
      a.button, a.pro-pillar-cta, a.header-client-login,
      .pro-evidence-card > a.text-link, .pro-actions > a.text-link) {
    background: var(--cg-button-secondary) !important;
    color: var(--cg-button-ink) !important;
    border: 1px solid var(--cg-button-border) !important;
    border-radius: .5rem !important;
    padding: .7rem 1rem !important;
    min-height: 44px;
    max-width: 100%;
    box-sizing: border-box;
    font-weight: 650 !important;
    line-height: 1.45;
    text-decoration: none !important;
    white-space: normal;
    overflow-wrap: anywhere;
    cursor: pointer;
    box-shadow: none;
    transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
  }
  :is(a.button, a.pro-pillar-cta, a.header-client-login,
      .pro-evidence-card > a.text-link, .pro-actions > a.text-link) { display: inline-flex; align-items: center; justify-content: center; }
  :is(button, input[type=button], input[type=reset], input[type=submit].secondary,
      a.button, a.pro-pillar-cta, a.header-client-login,
      .pro-evidence-card > a.text-link, .pro-actions > a.text-link):hover:not(:disabled):not([aria-disabled=true]) {
    background: var(--cg-button-secondary-hover) !important;
    color: var(--cg-button-ink) !important;
    filter: none !important;
  }

  /* Primary intent is explicit; downloads and utility submits stay secondary. */
  :is(a.button.primary, .header-contact, button.primary, input[type=button].primary,
      button[type=submit]:not(.secondary), input[type=submit]:not(.secondary)) {
    background: var(--cg-action) !important;
    color: var(--cg-action-ink) !important;
    border: 1px solid var(--cg-action-border) !important;
    cursor: pointer;
    border-radius: .5rem !important;
    padding: .7rem 1rem !important;
    min-height: 44px;
    font-weight: 650 !important;
    text-decoration: none !important;
    box-shadow: none;
  }
  :is(a.button.primary, .header-contact, button.primary, input[type=button].primary,
      button[type=submit]:not(.secondary), input[type=submit]:not(.secondary)):hover:not(:disabled):not([aria-disabled=true]) {
    background: var(--cg-action-hover) !important;
    color: var(--cg-action-ink) !important;
  }
  :is(button, input[type=button], input[type=submit], input[type=reset],
      a.button, a.pro-pillar-cta, .header-client-login, .header-contact,
      .pro-evidence-card > a.text-link, .pro-actions > a.text-link):active:not(:disabled):not([aria-disabled=true]) {
    box-shadow: inset 0 2px 3px rgb(15 40 31 / 24%);
  }

  /* Service rows are decision cards; guides stay quieter reading surfaces. */
  a:any-link.catalog-row {
    background: #fff8e9 !important;
    color: #123e2d !important;
    border: 1px solid #8b9582 !important;
    border-radius: .5rem;
    padding: 1.15rem !important;
    text-decoration: none !important;
  }
  a:any-link.catalog-row:hover {
    background: #ece2cc !important;
    border-color: #6b7967 !important;
  }
  a:any-link.catalog-row :is(p, span, strong, small) { color: inherit !important; }
  a:any-link.catalog-row :is(h2, h3, h4, .catalog-price small) {
    color: #176044 !important;
    text-decoration: underline !important;
    text-decoration-thickness: .08em !important;
    text-underline-offset: .2em;
  }
  a:any-link.catalog-row:hover :is(h2, h3, h4, .catalog-price small) {
    text-decoration-thickness: .14em !important;
  }
  a:any-link.journal-item {
    background: var(--paper, #fff8e9) !important;
    color: var(--ink, #123e2d) !important;
    border: 1px solid var(--line, #c9c4b2) !important;
    border-left: 3px solid var(--green, #176044) !important;
    border-radius: .5rem;
    padding: 1.15rem !important;
    text-decoration: none !important;
  }
  a:any-link.journal-item:hover {
    background: var(--wash, #e9e1cf) !important;
    border-color: var(--green, #176044) !important;
  }
  a:any-link.journal-item :is(p, span, strong, small) { color: inherit !important; }
  a:any-link.journal-item :is(h2, h3, h4) {
    color: #176044 !important;
    text-decoration: underline !important;
    text-decoration-thickness: .08em !important;
    text-underline-offset: .2em;
  }
  a:any-link.journal-item:hover :is(h2, h3, h4) {
    text-decoration-thickness: .14em !important;
  }

  /* Image links keep a restrained outline without a colored button fill. */
  a:any-link:has(img), a:any-link:is(.brand, .footer-brand) {
    background: transparent !important;
    border: 1px solid var(--cg-secondary-border) !important;
    border-radius: .375rem !important;
    padding: .125rem !important;
    text-decoration: none !important;
  }
  a:any-link:has(img):hover, a:any-link:is(.brand, .footer-brand):hover { background: var(--cg-secondary-hover) !important; }

  /* Transparent wordmarks keep only focus and hover cues. */
  a:any-link:is(.brand, .footer-brand), .review-header > a:first-child {
    border: 0 !important;
    padding: 0 !important;
  }
  a:any-link:is(.brand, .footer-brand):hover, .review-header > a:first-child:hover {
    background: transparent !important;
    filter: brightness(.94) !important;
  }

  /* Keep single-purpose access forms compact and balanced in the workspace. */
  .review-welcome { margin-inline: auto; border-radius: .65rem; }
  .review-welcome form { gap: .55rem; }
  .review-welcome form > input { margin-top: 0; }
  .review-welcome form > button { margin-top: .45rem; }

  /* Disclosures reveal information; the navigation Menu remains a utility. */
  summary {
    background: var(--cg-disclosure) !important;
    color: var(--cg-disclosure-ink) !important;
    border: 1px solid var(--cg-disclosure-border) !important;
    border-radius: .5rem !important;
    padding: .7rem 1rem !important;
    min-height: 44px;
    list-style-position: inside;
    font-weight: 650 !important;
    cursor: pointer;
  }
  summary:hover { background: var(--cg-disclosure-hover) !important; }
  :is(.mobile-menu, .nav-services) > summary {
    background: var(--cg-button-secondary) !important;
    color: var(--cg-button-ink) !important;
    border-color: var(--cg-button-border) !important;
    box-shadow: none;
    line-height: 1.45;
  }
  .mobile-menu > summary::after { line-height: 1; }
  :is(.mobile-menu, .nav-services) > summary:hover { background: var(--cg-button-secondary-hover) !important; }
  .footer-inner ul a { font-weight: 450; padding: .2rem 0 !important; }
  /* One green help band provides a clear transition into the cream footer. */
  .public-site .site-help-wrap {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 1.1rem clamp(1rem, 4vw, 3rem);
    box-sizing: border-box;
  }
  .site-help-wrap, .site-help, .site-help .help-content, .site-help .mini-help {
    background: #0d3426 !important;
    color: #f6e8bd !important;
    border-color: #56a078 !important;
    --cg-link: #f3ead7;
    --cg-link-hover: #fff8e9;
    --cg-secondary-border: #f3ead7;
    --cg-secondary-hover: #1c6248;
    --cg-focus: #f6e8bd;
    --cg-focus-inner: #0d3426;
  }
  .site-help .help-content :is(p, li, strong, dt, dd) {
    color: #f6e8bd !important;
  }
  .public-site .site-help {
    max-width: 1184px;
    margin-inline: auto;
    padding: 0 !important;
    border: 0 !important;
    border-block: 1px solid #56a078 !important;
    border-radius: 0;
  }
  .public-site .site-help summary {
    border: 0 !important;
    border-radius: 0;
    padding: .85rem 1rem !important;
    background: #176044 !important;
    color: #f6e8bd !important;
    border-color: #56a078 !important;
  }
  .public-site .site-help summary:hover:not(:disabled):not([aria-disabled=true]) {
    background: #227a52 !important;
    color: #fff8e9 !important;
  }


  :is(input[type=checkbox], input[type=radio], input[type=range]) { accent-color: #8a3d0b; cursor: pointer; }
  select, input[type=file] { cursor: pointer; }
  input[type=file]::file-selector-button {
    padding: .55rem .8rem;
    min-height: 44px;
    margin-right: .75rem;
    background: var(--cg-button-secondary);
    color: var(--cg-button-ink);
    border: 1px solid var(--cg-button-border);
    border-radius: .5rem !important;
    font: inherit;
    font-weight: 650;
    cursor: pointer;
  }
  input[type=file]::file-selector-button:hover { background: var(--cg-button-secondary-hover); }
  :is(a[href], button, summary, input, textarea, select, [tabindex]):focus-visible {
    outline: 3px solid var(--cg-focus) !important;
    outline-offset: 3px !important;
    box-shadow: 0 0 0 3px var(--cg-focus-inner) !important;
  }
  :root :is(button, input, select, textarea):disabled, :root [aria-disabled=true],
  :root input[type=file]:disabled::file-selector-button {
    background: #b5c0be !important;
    color: #344b54 !important;
    border-color: #718b90 !important;
    opacity: 1 !important;
    cursor: not-allowed !important;
    filter: none !important;
    box-shadow: none !important;
  }
}

@media screen and (max-width: 650px) {
  .review-app form > button { width: 100%; justify-self: stretch; text-align: center; }
}
@media screen and (max-width: 560px) {
  .public-site .inquiry-card :is(#inquiry-submit, #inquiry-retry) { width: 100%; text-align: center; }
}

@media (forced-colors: active) {
  a:any-link:is(.brand, .footer-brand):hover, .review-header > a:first-child:hover { filter: none !important; }

  a:any-link, a:visited, a:any-link:hover { background: Canvas !important; color: LinkText !important; border-color: LinkText !important; }
  :is(button, input[type=button], input[type=submit], input[type=reset], a.button, a.pro-pillar-cta,
      .pro-evidence-card > a.text-link, .pro-actions > a.text-link, .header-client-login, .header-contact, summary),
  :is(button, input[type=button], input[type=submit], input[type=reset], a.button, a.pro-pillar-cta,
      .pro-evidence-card > a.text-link, .pro-actions > a.text-link, .header-client-login, .header-contact, summary):hover {
    background: ButtonFace !important; color: ButtonText !important; border-color: ButtonText !important;
    box-shadow: none !important;
  }
  input[type=file]::file-selector-button { background: ButtonFace !important; color: ButtonText !important; border-color: ButtonText !important; }
  a:any-link:is(.catalog-row, .journal-item), a:any-link:is(.catalog-row, .journal-item):hover { background: Canvas !important; color: LinkText !important; border-color: LinkText !important; }
  a:any-link:is(.catalog-row, .journal-item) :is(h2, h3, h4, p, span, strong, small) { color: LinkText !important; }
  a:any-link:has(img), a:any-link:is(.brand, .footer-brand), a:any-link:has(img):hover, a:any-link:is(.brand, .footer-brand):hover { background: Canvas !important; border-color: LinkText !important; }
  .site-help-wrap, .site-help, .site-help .help-content, .site-help .mini-help { background: Canvas !important; color: CanvasText !important; border-color: CanvasText !important; }
  .site-help .help-content :is(p, li, strong, dt, dd) { color: CanvasText !important; }
  .public-site .site-help summary, .public-site .site-help summary:hover { background: ButtonFace !important; color: ButtonText !important; border-color: ButtonText !important; }
  :is(a[href], button, summary, input, textarea, select, [tabindex]):focus-visible { outline-color: Highlight !important; box-shadow: none !important; }
}
