/* =====================================================================
   About page styles (about.html only). Load after css/site.css.
   ===================================================================== */

/* Sections on the left, "On This Page" on the right (sticky on desktop) */
.about-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 48px;
  align-items: start;
  margin-top: 24px;
}

.about-body {
  font-size: var(--fs-md);
  line-height: var(--lh-body);
}

.about-body p {
  margin: 0 0 1em;
}

.about-section {
  scroll-margin-top: 24px;
}

.about-section + .about-section {
  margin-top: 48px;
}

.about-section .section-title {
  margin-bottom: 16px;
}

/* Text still awaiting final copy */
.copy-pending {
  color: var(--pewter);
  font-style: italic;
}

/* Leadership */
.about-body .person-name {
  margin: 0;
  font-family: var(--font-heading);
  font-size: var(--fs-lg);
  color: var(--navy);
}

.person-title {
  margin: 4px 0 12px;
  font-size: var(--fs-sm);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--pewter);
}

.person-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: var(--fs-base);
}

.person-links span {
  color: var(--mist);
}

/* Offices */
.offices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-bottom: 16px;
}

.office {
  padding: 16px 18px;
  border: 1px solid var(--hairline);
  font-style: normal;
  font-size: var(--fs-base);
  line-height: var(--lh-ui);
}

.office strong {
  display: block;
  margin-bottom: 6px;
  color: var(--navy);
  font-weight: 600;
}

/* Table of contents (same design as the Performance page) */
.toc {
  position: sticky;
  top: 24px;
  font-size: var(--fs-base);
}

.toc summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--mist);
  list-style: none;
  cursor: default;
}

.toc summary::-webkit-details-marker {
  display: none;
}

.toc-title {
  font-size: var(--fs-md);
}

.toc-chev {
  display: none;
  width: 16px;
  height: 16px;
  color: var(--pewter);
  transition: transform 0.15s ease;
}

.toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.toc li {
  border-bottom: 1px solid var(--hairline);
}

.toc a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 8px;
  transition: background-color 0.12s ease, color 0.12s ease;
  color: var(--pewter);
  text-decoration: none;
}

.toc a:hover,
.toc a:focus-visible {
  color: var(--burgundy);
  background: var(--alabaster);
}

@media (max-width: 960px) {
  .about-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  /* Contents first on smaller screens, as an accordion */
  .toc {
    position: static;
    order: -1;
  }

  .toc summary {
    padding: 12px 0;
    border-top: 2px solid var(--mist);
    border-bottom: 1px solid var(--hairline);
    cursor: pointer;
  }

  .toc-chev {
    display: block;
  }

  .toc-details[open] .toc-chev {
    transform: rotate(180deg);
  }

  .toc summary:hover .toc-title,
  .toc summary:hover .toc-chev {
    color: var(--burgundy);
  }
}

@media (max-width: 640px) {
  .offices {
    grid-template-columns: 1fr;
  }
}

/* =====================================================================
   About page content blocks
   ===================================================================== */
.about-body .lead {
  font-size: var(--fs-md);
}

.about-body h3 {
  margin: 0 0 4px;
  font-size: var(--fs-base);
  font-weight: 600;
  color: var(--navy);
}

.sub-title {
  margin: 28px 0 12px !important;
  font-family: var(--font-heading);
  font-size: var(--fs-sm) !important;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Numbered steps and principles */
.steps,
.principles {
  margin: 20px 0;
  padding: 0;
  list-style: none;
  counter-reset: item;
}

.steps li,
.principles li {
  position: relative;
  padding: 14px 0 14px 52px;
  border-top: 1px solid var(--hairline);
  counter-increment: item;
}

.steps li:last-child,
.principles li:last-child {
  border-bottom: 1px solid var(--hairline);
}

.steps li::before,
.principles li::before {
  content: counter(item, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 14px;
  font-family: var(--font-heading);
  font-size: var(--fs-md);
  color: var(--burgundy);
}

.steps p,
.principles p {
  margin: 0;
  font-size: var(--fs-base);
  color: var(--pewter);
}

/* "What Jerry doesn't do" and situations: two-column cards */
.lines,
.situations {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 20px 0 0;
}

.lines > div,
.situations > div {
  padding: 16px 18px;
  border: 1px solid var(--hairline);
  border-top: 2px solid var(--burgundy);
}

.lines dt,
.situations dt {
  margin-bottom: 6px;
  font-weight: 600;
  color: var(--navy);
}

.lines dd,
.situations dd {
  margin: 0;
  font-size: var(--fs-base);
  line-height: var(--lh-ui);
  color: var(--pewter);
}

/* Strategy table */
.strategy-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-base);
  line-height: var(--lh-ui);
}

.strategy-table th,
.strategy-table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--hairline);
  text-align: left;
  vertical-align: top;
}

.strategy-table thead th {
  font-size: var(--fs-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--pewter);
  font-weight: 600;
  border-bottom: 2px solid var(--mist);
}

.strategy-table tbody th {
  color: var(--navy);
  font-weight: 600;
  white-space: nowrap;
}

/* Due diligence */
.dd-list {
  margin: 12px 0 0;
  padding-left: 22px;
}

.dd-list li {
  padding: 4px 0;
}

/* By the numbers */
.numbers {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
}

.numbers > div {
  padding-top: 10px;
  border-top: 1px solid var(--hairline);
}

.numbers dt {
  font-family: var(--font-heading);
  font-size: 26px;
  line-height: 1.1;
  color: var(--burgundy);
}

.numbers dd {
  margin: 6px 0 0;
  font-size: var(--fs-sm);
  line-height: var(--lh-ui);
  color: var(--pewter);
}

.projects {
  margin: 0 0 16px;
  padding-left: 20px;
}

.projects li {
  padding: 4px 0;
}

/* Credentials */
.credentials {
  margin: 0;
}

.credentials > div {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--hairline);
}

.credentials dt {
  font-weight: 600;
  color: var(--navy);
}

.credentials dd {
  margin: 0;
}

/* FAQ */
.faq details {
  border-bottom: 1px solid var(--hairline);
}

.faq details:first-child {
  border-top: 1px solid var(--hairline);
}

.faq summary {
  padding: 14px 28px 14px 0;
  position: relative;
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 12px;
  font-size: 20px;
  color: var(--burgundy);
}

.faq details[open] summary::after {
  content: "\2212";
}

.faq details p {
  margin: 0 0 16px;
  font-size: var(--fs-base);
  color: var(--pewter);
}

/* Contact */
.about-cta {
  padding: 24px;
  background: var(--alabaster);
  border: 1px solid var(--hairline);
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
}

.cta-phone {
  font-weight: 600;
  color: var(--navy);
}

@media (max-width: 960px) {
  .numbers {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .lines,
  .situations {
    grid-template-columns: 1fr;
  }

  .credentials > div {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

/* Plain bulleted lists (legal and information pages) */
.plain-list {
  margin: 0 0 1em;
  padding-left: 22px;
}

.plain-list li {
  padding: 4px 0;
}

/* Links and primary button (About, Contact and legal pages) */
.about-body a:not(.btn) {
  color: var(--burgundy);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.about-body a:not(.btn):hover {
  color: var(--burgundy-dark);
}

.about-body .btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border: 1px solid var(--burgundy);
  background: var(--burgundy);
  color: var(--white);
  font-size: var(--fs-md);
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.about-body .btn:hover {
  background: var(--burgundy-dark);
  border-color: var(--burgundy-dark);
}

.about-body .cta-phone {
  color: var(--navy);
  text-decoration: none;
}

.offices .office a {
  color: var(--navy);
}

/* Leadership photo (placeholder until a photo is added) */
.leader-photo {
  float: right;
  width: 200px;
  margin: 4px 0 16px 24px;
}

.leader-photo img,
.leader-photo-ph {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.leader-photo-ph {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--alabaster);
  border: 1px dashed var(--mist);
  color: var(--mist);
  font-size: var(--fs-sm);
}

.leader-photo-ph svg {
  width: 56px;
  height: 56px;
}

#jerry-baker .sub-title {
  clear: both;
}

@media (max-width: 640px) {
  .leader-photo {
    float: none;
    width: 160px;
    margin: 0 0 16px;
  }
}

/* Personal Accountability: founder name and role, and sub-headings start below the photo */
.about-body .person-name {
  margin: 0;
  font-family: var(--font-heading);
  font-size: var(--fs-xl);
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text);
}

.about-body .person-role {
  margin: 2px 0 16px;
  font-size: var(--fs-md);
  font-style: italic;
  color: var(--pewter);
}

#owners-name .sub-title {
  clear: both;
}

/* Founder profile links: LinkedIn and BrokerCheck, directly under the name */
#owners-name .person-links {
  gap: 10px;
  margin: 0 0 18px;
}

.about-body a.profile-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border: 1px solid var(--hairline);
  background: var(--white);
  color: var(--navy);
  font-size: var(--fs-base);
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.about-body a.profile-link svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.about-body a.profile-link:hover,
.about-body a.profile-link:focus-visible {
  border-color: var(--burgundy);
  color: var(--burgundy);
}

/* ---------- Numbered lists: plain numbers (1, 2, 3), no leading zero ---------- */
.steps li::before,
.principles li::before {
  content: counter(item);
}

/* ---------- Investment Principles: cards instead of a list ---------- */
.principles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.principles li,
.principles li:last-child {
  padding: 18px 20px 20px;
  border: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  background: var(--alabaster);
}

.principles li::before {
  position: static;
  display: block;
  margin-bottom: 10px;
  font-size: var(--fs-xl);
  line-height: 1;
}

.principles h3 {
  margin: 0 0 6px;
}

/* ---------- Due diligence: five-part review as a row of stages ---------- */
.dd-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  margin: 16px 0 20px;
  padding: 0;
  list-style: none;
  counter-reset: dd;
  border: 1px solid var(--hairline);
}

.dd-list li {
  position: relative;
  padding: 16px 14px 18px;
  counter-increment: dd;
  font-size: var(--fs-base);
  font-weight: 600;
  line-height: var(--lh-ui);
  color: var(--navy);
  background: var(--white);
}

.dd-list li + li {
  border-left: 1px solid var(--hairline);
}

.dd-list li::before {
  content: counter(dd);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin-bottom: 10px;
  border-radius: 50%;
  background: var(--burgundy);
  color: var(--white);
  font-family: var(--font-heading);
  font-size: var(--fs-md);
  font-weight: 600;
}

@media (max-width: 760px) {
  .principles {
    grid-template-columns: 1fr;
  }

  .dd-list {
    grid-template-columns: 1fr;
  }

  .dd-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
  }

  .dd-list li + li {
    border-left: 0;
    border-top: 1px solid var(--hairline);
  }

  .dd-list li::before {
    flex-shrink: 0;
    margin-bottom: 0;
  }
}

/* Leader photo */
.leader-photo img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

/* Customer identification notice (site3.mjs) */
.cip-notice { margin: 1rem 0 0; padding: 1rem 1.25rem; border: 1px solid #d9d3c7; background: #faf8f4; }
.cip-notice p { margin: 0 0 0.6rem; }
.cip-notice p:last-child { margin-bottom: 0; }
.cip-notice .cip-title { letter-spacing: 0.02em; }

/* "Our Commitments to Clients" footnote (aboutfn.mjs) */
.commit-fn { font-size: 0.7em; line-height: 0; margin-left: 1px; }
.commit-fn a { color: var(--burgundy); text-decoration: none; }
.commit-fn a:hover { text-decoration: underline; }
.commit-notes {
  list-style: none;
  margin: 20px 0 0;
  padding: 12px 0 0;
  border-top: 1px solid var(--hairline);
  font-size: var(--fs-sm);
  line-height: 1.55;
  color: var(--pewter);
}
.commit-notes li { display: flex; gap: 8px; scroll-margin-top: 120px; }
.commit-notes .commit-note-num { flex: none; font-size: 0.85em; color: var(--burgundy); }
.commit-notes .commit-back { text-decoration: none; }
