/* Deed7 public-site accessibility safeguards.
   This stylesheet is intentionally loaded last on every public page. */

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  overflow-x: clip;
}

main,
section,
article,
aside,
header,
footer,
nav,
form,
fieldset,
div {
  min-width: 0;
}

p,
li,
dd,
dt,
label,
legend,
small,
strong,
span,
a,
button,
th,
td {
  overflow-wrap: anywhere;
}

pre,
code {
  max-width: 100%;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

img,
svg,
video,
canvas,
iframe {
  max-width: 100%;
}

[id] {
  scroll-margin-top: 96px;
}

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

.deed7-skip-link {
  position: fixed;
  z-index: 20000;
  top: max(10px, env(safe-area-inset-top));
  left: 12px;
  min-height: 44px;
  padding: 11px 16px;
  border: 2px solid #ffffff;
  border-radius: 9px;
  background: #073b4c;
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.25;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(3, 25, 35, 0.3);
  transform: translateY(-160%);
  transition: transform 140ms ease;
}

.deed7-skip-link:focus {
  color: #ffffff;
  transform: translateY(0);
}

:where(a, button, input, select, textarea, summary, [tabindex]:not([tabindex="-1"])):focus-visible {
  outline: 3px solid #0b6f86 !important;
  outline-offset: 3px !important;
  box-shadow: 0 0 0 3px #ffffff !important;
}

/* Opaque control colors make text contrast deterministic in every state. */
.deed7-download-trigger {
  transition:
    background-color 320ms cubic-bezier(0.22, 1, 0.36, 1),
    border-color 320ms cubic-bezier(0.22, 1, 0.36, 1),
    color 320ms cubic-bezier(0.22, 1, 0.36, 1),
    -webkit-text-fill-color 320ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 320ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 320ms cubic-bezier(0.22, 1, 0.36, 1) !important;
}

/*
 * The old full-button pseudo-element made automated contrast tools unable to
 * determine the text background, even while the overlay was transparent.
 * The button now fades its own opaque background instead, so normal, hover,
 * focus, active, disabled, and touch states all have a measurable contrast.
 */
.deed7-download-trigger::before {
  content: none !important;
  display: none !important;
  background: none !important;
}

/* Keep the blog-card accent out of a text-bearing link pseudo-element. */
.deed7-blog-card {
  border-top-width: 3px;
  border-top-color: #0e7490;
}

.deed7-blog-card::before {
  content: none !important;
  display: none !important;
  background: none !important;
}

.deed7-public .deed7-btn--primary,
.deed7-auth-page .deed7-btn--primary,
.deed7-acquisition-button--primary {
  border-color: #075f70 !important;
  background: #075f70 !important;
  background-image: none !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  text-shadow: none !important;
}

@media (hover: hover) and (pointer: fine) {
  .deed7-public .deed7-btn--primary:hover:not(:disabled),
  .deed7-auth-page .deed7-btn--primary:hover:not(:disabled),
  .deed7-acquisition-button--primary:hover:not(:disabled) {
    border-color: #075f70 !important;
    background: #ffffff !important;
    background-image: none !important;
    color: #071521 !important;
    -webkit-text-fill-color: #071521 !important;
  }
}

.deed7-public .deed7-btn--primary:focus-visible,
.deed7-auth-page .deed7-btn--primary:focus-visible,
.deed7-acquisition-button--primary:focus-visible {
  border-color: #075f70 !important;
  background: #ffffff !important;
  background-image: none !important;
  color: #071521 !important;
  -webkit-text-fill-color: #071521 !important;
}

.deed7-public .deed7-btn--primary:active:not(:disabled),
.deed7-auth-page .deed7-btn--primary:active:not(:disabled),
.deed7-acquisition-button--primary:active:not(:disabled) {
  border-color: #075f70 !important;
  background: #ffffff !important;
  background-image: none !important;
  color: #071521 !important;
  -webkit-text-fill-color: #071521 !important;
  transition-duration: 90ms !important;
}

@media (hover: none) {
  .deed7-public .deed7-btn--primary:not(:active):not(:focus-visible),
  .deed7-auth-page .deed7-btn--primary:not(:active):not(:focus-visible),
  .deed7-acquisition-button--primary:not(:active):not(:focus-visible) {
    border-color: #075f70 !important;
    background: #075f70 !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
  }
}

.deed7-public .deed7-btn--primary:disabled,
.deed7-auth-page .deed7-btn--primary:disabled,
.deed7-acquisition-button--primary:disabled {
  border-color: #b8c5cd !important;
  background: #e4e9ed !important;
  background-image: none !important;
  color: #485863 !important;
  -webkit-text-fill-color: #485863 !important;
  opacity: 1;
}

.deed7-desktop-nav > a:not(.deed7-btn),
.deed7-public-menu-links a {
  color: #3f5363;
}

.deed7-workflow-track li > span,
.deed7-da-example__steps article > span,
#dealAnalyzer .fragility-guide-grid article > span {
  color: #075f70;
}

.deed7-da-example__assumptions,
.deed7-da-example__assumptions p,
.deed7-da-example__steps p,
.deed7-da-example__takeaway,
#dealAnalyzer .deed7-da-panel-heading p,
#dealAnalyzer .deed7-da-results-heading p,
#dealAnalyzer .margin-header > div > p:last-child,
#dealAnalyzer .fragility-metrics small,
#dealAnalyzer .fragility-guide-grid p,
#dealAnalyzer .fragility-assumptions-heading p,
#dealAnalyzer .deed7-da-local-note,
#dealAnalyzer .deed7-da-disclaimer,
#dealAnalyzer .deed7-da-section-intro > p,
#dealAnalyzer .deed7-da-method-card p {
  color: #4a6071;
}

.deed7-da-panel-heading > span,
.deed7-da-results-heading > div > span,
#dealAnalyzer .stress-assumption-toggle > span,
#dealAnalyzer .fragility-table tbody tr.is-excluded td {
  color: #075f70 !important;
}

#dealAnalyzer .deed7-da-money-input > span,
#dealAnalyzer .deed7-da-percent-input > span {
  color: #4a6071;
}

.deed7-acquisition-step > header p,
.deed7-field > span small,
.deed7-beta-contact {
  color: #4a6071;
}

.deed7-desktop-nav > a.deed7-desktop-nav__featured:not(.deed7-btn) {
  border-color: #8ab3bc;
  background: #eef7f8;
  background-image: none;
  color: #075f70;
}

.deed7-desktop-nav > a:not(.deed7-btn):hover,
.deed7-desktop-nav > a:not(.deed7-btn):focus-visible,
.deed7-desktop-nav > a:not(.deed7-btn).active,
.deed7-public-menu-links a:hover,
.deed7-public-menu-links a:focus-visible,
.deed7-public-menu-links a.active {
  background: #dff1f4;
  color: #064f60;
}

.deed7-property-consents {
  margin: 0;
  padding: 0;
  border: 0;
}

.deed7-property-consents legend {
  margin: 0 0 10px;
  padding: 0;
  color: #173a4c;
  font-size: 0.82rem;
  font-weight: 800;
}

.deed7-property-consents input,
.deed7-beta-consent input {
  align-self: start;
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  min-width: 20px;
  margin: 1px 0 0;
  accent-color: #075f70;
}

.deed7-public input:not([type="range"]):not([type="checkbox"]):not([type="radio"]),
.deed7-public select,
.deed7-public textarea,
.deed7-auth-page input:not([type="checkbox"]):not([type="radio"]),
.deed7-auth-page select,
.deed7-auth-page textarea,
#dealAnalyzer .deed7-da-money-input,
#dealAnalyzer .deed7-da-percent-input {
  border-color: #6b7d8b;
}

.deed7-property-consents a,
.deed7-beta-consent a,
.deed7-policy-card a,
.deed7-acquisition-legal a,
.deed7-compliance-footer a {
  color: #075f70;
  font-weight: 750;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.deed7-compliance-footer {
  display: grid;
  gap: 6px;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 0 0 max(24px, env(safe-area-inset-bottom));
  color: #435866;
  font-size: 0.75rem;
  line-height: 1.6;
}

.deed7-compliance-footer p {
  margin: 0;
}

.deed7-compliance-footer strong {
  color: #173a4c;
}

.deed7-auth-preview-notice[role="alert"],
.deed7-acquisition-step-error[role="alert"] {
  color: #8a1c1c;
}

/* The table wrappers remain usable when text is enlarged to 200 percent. */
.deed7-da-table-wrap,
.deed7-blog-table-wrap,
.table-wrap {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 760px) {
  .deed7-compliance-footer {
    width: min(100% - 28px, 1180px);
    font-size: 0.78rem;
  }

  .deed7-property-consents label,
  .deed7-beta-consent {
    grid-template-columns: 20px minmax(0, 1fr) !important;
    align-items: start !important;
  }
}

@media (max-width: 420px) {
  .deed7-acquisition-actions {
    align-items: stretch;
  }

  .deed7-acquisition-actions button,
  .deed7-auth-actions .deed7-btn {
    width: 100%;
    max-width: 100%;
    white-space: normal;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto !important;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
