/* Exact match to pugmarkfund.com screenshots + a11y */

:root {
  --black: #36302a;
  --white: #ffffff;
  --accent: #b9a590;
  --light-accent: #ece4da;
  --cream: #f5f2ed;
  --page-beige: #ebe6d9;
  --footer-bg: #c4b5a2;
  --dark-accent: #574c3f;
  /* Darker taupe so white banner text meets WCAG AA (~7:1) */
  --notice-banner-bg: #5a4f42;
  --notice-banner-text: #ffffff;
  --notice-banner-link: #ffffff;
  --focus: #1a5f8a;
  --error: #8b1e1e;
  --max: 1200px;
  --gutter: 1.75rem;
  --gutter-sm: 1.125rem;
  --prose-max: 44rem;
  --section-pad-top: 2.5rem;
  --section-pad-bottom: 3.5rem;
  --font-display: "Instrument Serif", Georgia, "Times New Roman", serif;
  --font-body: "Newsreader", Georgia, "Times New Roman", serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--black);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

#main {
  flex: 1 0 auto;
  width: 100%;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--black);
  text-underline-offset: 0.15em;
}

a:hover {
  color: var(--dark-accent);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

:focus:not(:focus-visible) {
  outline: none;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--black);
  margin: 0 0 1rem;
}

h1 {
  font-size: clamp(2.4rem, 5vw, 3.75rem);
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
}

p {
  margin: 0 0 1rem;
}

ul,
ol {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}

li + li {
  margin-top: 0.75rem;
}

strong {
  font-weight: 700;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100%;
  z-index: 1100;
  background: var(--black);
  color: var(--white);
  padding: 0.65rem 1rem;
  text-decoration: none;
  font-weight: 700;
}

.skip-link:focus {
  top: 1rem;
}

/*
  Third-party accessible-web-widget injects #acc-skip-link with
  transparent text (rgba(..., 0)), which fails WCAG contrast audits.
  Override inline styles and hide off-screen until focused.
*/
#acc-skip-link.acc-skip-link,
.acc-skip-link {
  position: absolute !important;
  left: 1rem !important;
  top: -100% !important;
  z-index: 1200 !important;
  opacity: 1 !important;
  color: #ffffff !important;
  background-color: #36302a !important;
  border: 0 !important;
  border-radius: 0 !important;
  padding: 0.65rem 1rem !important;
  font: inherit !important;
  font-weight: 700 !important;
  line-height: 1.3 !important;
  cursor: pointer !important;
  box-shadow: none !important;
}

#acc-skip-link.acc-skip-link:focus,
#acc-skip-link.acc-skip-link:focus-visible,
.acc-skip-link:focus,
.acc-skip-link:focus-visible {
  top: 1rem !important;
  outline: 3px solid var(--focus) !important;
  outline-offset: 2px !important;
}

.wrap {
  width: min(100% - (var(--gutter) * 2), var(--max));
  margin-inline: auto;
}

@media (max-width: 640px) {
  .wrap {
    width: min(100% - (var(--gutter-sm) * 2), var(--max));
  }
}

/* Top Important Notice banner — high-contrast taupe + white text */
.notice-banner {
  position: relative;
  z-index: 200;
  background: var(--notice-banner-bg);
  color: var(--notice-banner-text);
  padding: 1.1rem calc(var(--gutter) + 2rem) 1.1rem var(--gutter);
  text-align: center;
}

@media (max-width: 640px) {
  .notice-banner {
    padding: 1rem calc(var(--gutter-sm) + 2rem) 1rem var(--gutter-sm);
  }
}

.notice-banner[hidden] {
  display: none !important;
}

.notice-banner__inner {
  width: min(100%, var(--max));
  margin-inline: auto;
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--notice-banner-text);
}

.notice-banner__inner p {
  margin: 0 0 0.35rem;
  color: var(--notice-banner-text);
}

.notice-banner__inner p:last-child {
  margin-bottom: 0;
}

.notice-banner__inner strong,
.notice-banner__inner u {
  color: var(--notice-banner-text);
}

.notice-banner a {
  color: var(--notice-banner-link);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 0.15em;
  word-break: break-word;
}

.notice-banner a:hover,
.notice-banner a:focus-visible {
  color: #fff8ee;
}

.notice-banner__close {
  position: absolute;
  top: 0.35rem;
  right: 0.35rem;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  color: var(--notice-banner-text);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.notice-banner__close:hover {
  color: #fff8ee;
}

/* Header */
.site-header {
  position: relative;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid rgba(54, 48, 42, 0.08);
}

.site-header__inner {
  position: relative;
  width: min(100% - (var(--gutter) * 2), var(--max));
  margin-inline: auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

@media (max-width: 640px) {
  .site-header__inner {
    width: min(100% - (var(--gutter-sm) * 2), var(--max));
    min-height: 64px;
  }
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  line-height: 0;
}

.brand img {
  height: 33px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
}

.nav-toggle {
  display: none;
  margin-left: auto;
  background: transparent;
  border: 1px solid rgba(54, 48, 42, 0.25);
  color: var(--black);
  min-height: 40px;
  min-width: 44px;
  padding: 0 0.85rem;
  font: inherit;
  cursor: pointer;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 0.1rem;
}

.site-nav li {
  margin: 0;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.9rem;
  text-decoration: none;
  color: var(--dark-accent);
  font-size: 1rem;
  border-bottom: 1px solid transparent;
}

.site-nav a:hover {
  color: var(--black);
}

.site-nav a[aria-current="page"] {
  color: var(--black);
  border-bottom-color: var(--black);
}

@media (max-width: 860px) {
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .site-nav {
    display: none;
    position: absolute;
    left: 50%;
    top: 100%;
    width: 100vw;
    transform: translateX(-50%);
    background: var(--white);
    border-bottom: 1px solid rgba(54, 48, 42, 0.08);
    padding: 0.5rem 0 0.75rem;
    box-shadow: 0 10px 24px rgba(54, 48, 42, 0.06);
  }

  .site-nav.is-open {
    display: block;
  }

  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
    width: min(100% - (var(--gutter-sm) * 2), var(--max));
    margin-inline: auto;
  }

  .site-nav a {
    width: 100%;
    min-height: 48px;
    justify-content: flex-start;
    padding: 0.75rem 0.25rem;
    border-bottom: 1px solid rgba(54, 48, 42, 0.08);
  }

  .site-nav a[aria-current="page"] {
    border-bottom-color: rgba(54, 48, 42, 0.08);
  }
}

body.nav-open {
  overflow: hidden;
}

/* Home */
.home {
  background: var(--cream);
  padding: var(--section-pad-top) 0 var(--section-pad-bottom);
}

.home__grid {
  display: grid;
  gap: 2rem;
  align-items: start;
}

@media (min-width: 960px) {
  .home__grid {
    grid-template-columns: minmax(0, 1.35fr) minmax(15rem, 0.8fr);
    gap: 2.5rem 3rem;
  }
}

.home__copy {
  max-width: 46rem;
}

.home__copy p,
.home__copy li {
  text-align: justify;
}

.caution-title {
  font-size: 1rem;
  font-weight: 700;
  font-family: var(--font-body);
  margin: 0 0 0.75rem;
}

.pillars-title {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 700;
  margin: 1.5rem 0 0.75rem;
}

.pillar-list {
  list-style: disc;
  margin: 0 0 0.85rem;
  padding-left: 1.25rem;
}

.pillar-list > li > strong {
  display: block;
  margin-bottom: 0.1rem;
}

.home__aside {
  display: grid;
  gap: 1.5rem;
  justify-items: center;
}

.home__portrait {
  width: min(100%, 20rem);
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 50%;
}

.home__notice {
  width: min(100%, 22rem);
  text-align: center;
}

.home__notice img {
  width: 100%;
  border: 1px solid rgba(54, 48, 42, 0.12);
}

.home__notice figcaption {
  margin-top: 0.65rem;
  font-size: 0.95rem;
}

/* Split pages: Investment Process / Contact */
.page-split {
  background: var(--cream);
  padding: var(--section-pad-top) 0 var(--section-pad-bottom);
}

.page-split--beige {
  background: var(--page-beige);
}

.page-split__grid {
  display: grid;
  gap: 2rem;
  align-items: start;
}

@media (min-width: 900px) {
  .page-split__grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(14rem, 0.85fr);
    gap: 2.5rem 3rem;
    align-items: start;
  }
}

.page-split__media img {
  width: 100%;
  max-width: 28rem;
  margin-inline: auto;
  object-fit: cover;
}

.page-split__copy {
  max-width: 40rem;
}

.page-split__copy h1 {
  margin-bottom: 1.25rem;
}

/* About Us */
.about-page {
  background: var(--cream);
  padding: var(--section-pad-top) 0 var(--section-pad-bottom);
}

.about-page__caution {
  max-width: var(--prose-max);
  margin: 0 auto 3rem;
}

.about-page__title {
  text-align: center;
  margin: 0 0 2.5rem;
  font-size: clamp(2.4rem, 5vw, 3.75rem);
}

.team-grid {
  display: grid;
  gap: 2.75rem 3rem;
}

@media (min-width: 800px) {
  .team-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.person h2 {
  font-size: clamp(1.6rem, 2.5vw, 2rem);
  margin-bottom: 0.35rem;
}

.person__role {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  margin: 0 0 0.75rem;
}

.person p:last-child {
  margin-bottom: 0;
}

/* Generic sections / regulatory */
.page-hero {
  background: var(--cream);
  padding: var(--section-pad-top) 0 0.35rem;
}

.page-hero h1 {
  margin: 0 0 0.65rem;
  max-width: 40rem;
}

.page-hero p {
  max-width: var(--prose-max);
  margin: 0;
  color: var(--dark-accent);
  line-height: 1.5;
}

.section {
  padding: 1.5rem 0 var(--section-pad-bottom);
  background: var(--cream);
}

.page-hero + .section {
  padding-top: 1.25rem;
}

.prose {
  max-width: var(--prose-max);
}

.prose > *:last-child {
  margin-bottom: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.7rem 1.35rem;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  background: var(--black);
  color: var(--white);
  border-radius: 999px;
}

.btn:hover {
  background: var(--dark-accent);
  color: var(--white);
}

.btn--primary {
  background: var(--black);
  color: var(--white);
}

.reg-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

@media (min-width: 720px) {
  .reg-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.reg-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 52px;
  padding: 0.9rem 1.1rem;
  text-decoration: none;
  color: var(--black);
  background: var(--white);
  border: 1px solid rgba(54, 48, 42, 0.15);
  border-left: 3px solid var(--accent);
  font-weight: 700;
}

.reg-list a:hover {
  background: var(--light-accent);
}

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.25rem 0 1.75rem;
  border: 2px solid var(--black);
  background: var(--white);
}

.table-wrap:last-child {
  margin-bottom: 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  min-width: 40rem;
}

caption {
  text-align: left;
  font-weight: 700;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--black);
  caption-side: top;
}

th,
td {
  padding: 0.85rem 1rem;
  text-align: left;
  vertical-align: top;
  border: 1px solid var(--black);
  word-break: break-word;
}

.table-note {
  font-size: 0.9rem;
  color: var(--dark-accent);
  margin: -0.5rem 0 1.75rem;
  max-width: var(--prose-max);
}

.table-note:empty {
  display: none;
  margin: 0;
}

#complaints-status:not(:empty) {
  margin: 0 0 1rem;
}

/* Contact form — pill inputs like live */
.form {
  max-width: 28rem;
  display: grid;
  gap: 1.1rem;
  margin-top: 1.5rem;
}

.form__row {
  display: grid;
  gap: 1rem;
}

@media (min-width: 560px) {
  .form__row {
    grid-template-columns: 1fr 1fr;
  }
}

.form__field {
  display: grid;
  gap: 0.35rem;
}

.form label,
.form .field-label {
  font-size: 0.95rem;
}

.form .hint {
  font-size: 0.85rem;
  color: var(--dark-accent);
}

.form .req {
  color: var(--error);
}

.form input,
.form textarea {
  width: 100%;
  font: inherit;
  color: var(--black);
  background: transparent;
  border: 1px solid var(--black);
  border-radius: 999px;
  padding: 0.7rem 1.1rem;
  min-height: 48px;
}

.form textarea {
  border-radius: 1.25rem;
  min-height: 8rem;
  resize: vertical;
}

.form input[aria-invalid="true"],
.form textarea[aria-invalid="true"] {
  border-color: var(--error);
}

.form__errors {
  border: 2px solid var(--error);
  background: #fff5f5;
  color: var(--error);
  padding: 1rem;
  margin: 0;
}

.form__errors:empty,
.form__errors[hidden],
.form__success[hidden] {
  display: none;
}

.form__errors ul {
  margin: 0.4rem 0 0;
}

.form__success {
  border: 2px solid var(--dark-accent);
  background: var(--light-accent);
  color: var(--black);
  padding: 1rem;
}

.contact-meta {
  margin: 1rem 0 0;
}

.contact-meta p {
  margin-bottom: 0.5rem;
}

.disclosure-block > h2,
.disclosure-block h2,
.page-content > h2 {
  margin-top: 2.25rem;
  margin-bottom: 0.85rem;
}

.disclosure-block > h2:first-child,
.disclosure-block > h2:first-of-type,
.disclosure-block h2:first-child,
.page-content > h2:first-child,
.page-content > #complaints-status + h2,
.page-content > p:first-child + h2 {
  margin-top: 0;
}

#disclosure-content > h2:first-child {
  margin-top: 0;
}

.disclosure-block > p,
.disclosure-block h2 + p,
.page-content > p,
#disclosure-content > p {
  max-width: var(--prose-max);
}

.disclosure-block > ul,
.disclosure-block > ol,
.page-content > ul,
.page-content > ol {
  max-width: var(--prose-max);
}

.disclosure-block > .form,
.page-content > .form {
  margin-top: 1.25rem;
}

.disclosure-block > .table-wrap,
.page-content > .table-wrap,
.disclosure-block > .escalation,
.page-content > .escalation,
.disclosure-block > .callout,
.page-content > .callout {
  max-width: none;
}

.callout {
  border-left: 3px solid var(--accent);
  padding: 1rem 1.15rem;
  background: var(--white);
  margin: 1.25rem 0;
  max-width: var(--prose-max);
}

.callout p:last-child {
  margin-bottom: 0;
}

.escalation {
  margin: 0.5rem 0 1.5rem;
  max-width: var(--prose-max);
}

.escalation ol,
.escalation ul {
  margin-bottom: 0;
}

.page-content {
  /* Keep .wrap side margins — do not force full viewport width */
  max-width: var(--max);
}

.page-content > *:last-child {
  margin-bottom: 0;
}

/* Accessibility / disclosure prose pages */
.disclosure-block.wrap,
.wrap.disclosure-block {
  max-width: min(var(--max), 52rem);
}

/* Complaints tables need more width than prose pages */
#complaints-dynamic.wrap,
.wrap#complaints-dynamic {
  max-width: var(--max);
}

.content-measure {
  max-width: var(--prose-max);
}

/* Footer — solid taupe, 3 columns */
.site-footer {
  background: var(--footer-bg);
  color: var(--black);
  padding: 3rem 0 2.5rem;
  margin-top: auto;
  width: 100%;
}

.site-footer a {
  color: var(--black);
}

.site-footer__grid {
  display: grid;
  gap: 2rem;
}

@media (min-width: 860px) {
  .site-footer__grid {
    grid-template-columns: 1.35fr 0.8fr 1.35fr;
    gap: 2.5rem;
    align-items: start;
  }
}

.site-footer h2 {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0;
  margin: 0 0 0.85rem;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer li + li {
  margin-top: 0.4rem;
}

.site-footer a {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  text-decoration: underline;
}

.site-footer__disclaimer p {
  margin-bottom: 0.75rem;
  font-size: 0.98rem;
}

.footer-line {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 0.55rem;
  align-items: start;
  margin-bottom: 0.75rem;
}

.footer-line img {
  width: 18px;
  height: 18px;
  margin-top: 0.2rem;
  object-fit: contain;
}

.footer-line p {
  margin: 0;
}

.footer-regs {
  margin-top: 0.85rem;
}

.footer-regs p {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
}

@media (min-width: 720px) {
  .page-content table {
    min-width: 0;
  }
}

/* Wide escalation / complaints tables stay readable */
.page-content .table-wrap table {
  font-size: 0.92rem;
}

@media (max-width: 900px) {
  .page-content .table-wrap table {
    font-size: 0.88rem;
    min-width: 44rem;
  }

  .page-content .table-wrap th,
  .page-content .table-wrap td {
    padding: 0.7rem 0.75rem;
  }
}
