/* ============================================================
   Chartered Accountant - shared stylesheet
   Minimal, professional, monochrome navy. No serifs.
   ============================================================ */

:root {
  --navy-900: #0f1b2d;
  --navy-800: #16263d;
  --navy-700: #1f3350;
  --navy-600: #2c4568;
  --navy-500: #3d5a80;
  --slate-400: #647a99;
  --slate-300: #8ea0b8;
  --slate-200: #c3ccd9;
  --line: #e2e7ee;
  --paper: #ffffff;
  --paper-soft: #f6f8fb;
  --ink: #16263d;
  --ink-soft: #465a75;

  --maxw: 1080px;
  --gap: clamp(1rem, 2.5vw, 2rem);
  --radius: 4px;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, "Noto Sans", sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gap);
}

section {
  padding-block: clamp(3rem, 7vw, 5.5rem);
}

.section-soft {
  background: var(--paper-soft);
  border-block: 1px solid var(--line);
}

/* ---------- Typography ---------- */
h1,
h2,
h3,
h4 {
  color: var(--navy-900);
  line-height: 1.2;
  font-weight: 650;
  letter-spacing: -0.01em;
  margin: 0 0 0.6em;
}

h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
}

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

h3 {
  font-size: 1.2rem;
  font-weight: 600;
}

p {
  margin: 0 0 1.1em;
  color: var(--ink-soft);
  max-width: 62ch;
}

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--slate-400);
  margin-bottom: 0.9rem;
}

.lead {
  font-size: 1.15rem;
  color: var(--ink-soft);
}

a {
  color: var(--navy-700);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 68px;
}

.brand {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand a {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  color: var(--navy-900);
  text-decoration: none;
}

.brand .brand-name {
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.brand .brand-sub {
  margin-top: 0.15rem;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--slate-400);
  font-weight: 600;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 2rem);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--ink-soft);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  padding-block: 0.4rem;
  border-bottom: 2px solid transparent;
}

.nav-links a:hover {
  color: var(--navy-900);
}

.nav-links a.active {
  color: var(--navy-900);
  border-bottom-color: var(--navy-700);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.4rem 0.6rem;
  cursor: pointer;
  font-size: 1rem;
  color: var(--navy-900);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid var(--navy-800);
  transition: background 0.15s ease, color 0.15s ease,
    box-shadow 0.15s ease, transform 0.15s ease;
  cursor: pointer;
}

.btn:focus-visible {
  outline: 2px solid var(--navy-500);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--navy-800);
  color: #fff;
}

.btn-primary:hover {
  background: var(--navy-900);
  box-shadow: 0 6px 16px rgba(15, 27, 45, 0.22);
  transform: translateY(-1px);
  text-decoration: none;
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: none;
}

.btn-outline {
  background: transparent;
  color: var(--navy-800);
}

.btn-outline:hover {
  background: var(--navy-800);
  color: #fff;
  box-shadow: 0 6px 16px rgba(15, 27, 45, 0.18);
  transform: translateY(-1px);
  text-decoration: none;
}

.btn-outline:active {
  transform: translateY(0);
  box-shadow: none;
}

/* Tertiary link-style action (navy) */
.link-action {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--navy-700);
}

/* The anchor itself never carries an underline (including on
   hover/focus/active), so no stray line runs under the arrow. */
.link-action,
.link-action:hover,
.link-action:focus,
.link-action:active {
  text-decoration: none;
}

.link-action .arrow {
  transition: transform 0.15s ease;
  text-decoration: none;
}

/* Underline only the label text. */
.link-action:hover .la-text,
.link-action:focus-visible .la-text {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.link-action:hover .arrow {
  transform: translateX(3px);
}

.link-action:focus-visible {
  outline: 2px solid var(--navy-500);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ---------- Hero ---------- */
.hero {
  padding-block: clamp(3.5rem, 9vw, 7rem);
  background: linear-gradient(180deg, var(--paper) 0%, var(--paper-soft) 100%);
  border-bottom: 1px solid var(--line);
}

.hero h1 {
  max-width: 18ch;
}

.hero .lead {
  max-width: 58ch;
}

/* Hero with a photographic background.
   A dark navy overlay keeps the text legible over the image.
   Each page sets its own image via --hero-image. */
.hero--image {
  --hero-image: url("images/hero.jpg");
  position: relative;
  isolation: isolate;
  border-bottom: none;
  /* Navy fallback renders instantly (no blank flash / layout shift). */
  background-color: #0f1b2d;
  background-image:
    var(--hero-film),
    var(--hero-image);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

/* Default (services) keeps the stronger film */
.hero--image {
  --hero-film: linear-gradient(
    100deg,
    rgba(15, 27, 45, 0.92) 0%,
    rgba(15, 27, 45, 0.78) 45%,
    rgba(15, 27, 45, 0.5) 100%
  );
}

/* Services page hero uses its own image */
.hero--services {
  --hero-image: url("images/services-hero.jpg");
}

/* Resources page hero uses its own image */
.hero--resources {
  --hero-image: url("images/resources-hero.jpg");
  background-position: center 30%;
}

/* Contact page hero uses its own image */
.hero--contact {
  --hero-image: url("images/contact-hero.jpg");
}

/* About page hero: zoom into the laptop area (upper-left) so the
   hand (bottom-right) and coffee cup (top-right) fall outside the frame. */
.hero--about {
  --hero-image: url("images/about-hero.jpg");
  background-size: 160%;
  background-position: 30% 30%;
}

/* Home hero: lighter film so the primary button stays visible,
   with a soft dark base on the left for text contrast. */
.hero--home {
  --hero-film: linear-gradient(
    100deg,
    rgba(15, 27, 45, 0.78) 0%,
    rgba(15, 27, 45, 0.55) 45%,
    rgba(15, 27, 45, 0.3) 100%
  );
}

.hero--image .eyebrow {
  color: var(--slate-300);
}

.hero--image h1,
.hero--image .lead {
  color: #fff;
}

.hero--image .lead {
  color: rgba(255, 255, 255, 0.86);
}

/* On the photo hero, lift the primary button with a tight shadow
   only. No visible border on a filled button. */
.hero--image .btn-primary {
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

/* On the photo hero, the outline button needs a light treatment */
.hero--image .btn-outline {
  border-color: rgba(255, 255, 255, 0.6);
  color: #fff;
}

.hero--image .btn-outline:hover {
  background: #fff;
  color: var(--navy-900);
  border-color: #fff;
}

.hero-actions {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-top: 1.8rem;
}

/* ---------- Grid cards ---------- */
.grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem;
}

.card h3 {
  margin-bottom: 0.4rem;
}

.card p {
  margin: 0;
  font-size: 0.96rem;
}

.card .card-num {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--slate-300);
  letter-spacing: 0.1em;
  display: block;
  margin-bottom: 0.8rem;
}

/* Clickable service cards on the home page */
.card-link {
  display: flex;
  flex-direction: column;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.card-link:hover {
  border-color: var(--navy-500);
  box-shadow: 0 6px 20px rgba(15, 27, 45, 0.06);
  transform: translateY(-2px);
  text-decoration: none;
}

.card-link:focus-visible {
  outline: 2px solid var(--navy-500);
  outline-offset: 2px;
}

.card-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: auto;  /* pin to the bottom of the card */
  margin-left: auto; /* and to the right edge */
  padding-top: 1rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--navy-700);
}

.card-arrow .arrow {
  transition: transform 0.15s ease;
}

.card-link:hover .card-arrow .la-text {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.card-link:hover .card-arrow .arrow {
  transform: translateX(3px);
}

/* ---------- Service cards (Services page): horizontal rows ---------- */
.service-grid {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-width: 900px;
}

.service-card {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "head   cta"
    "desc   cta"
    "list   cta";
  column-gap: 2rem;
  row-gap: 0.4rem;
  align-items: start;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem 2rem;
  scroll-margin-top: 90px; /* clear the sticky header on anchor jump */
}

.service-card h3 {
  grid-area: head;
  margin-bottom: 0;
}

.service-card > p {
  grid-area: desc;
  margin: 0;
}

.service-card ul {
  grid-area: list;
  margin: 0.6rem 0 0;
  padding-left: 1.1rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.service-card li {
  margin-bottom: 0.35rem;
}

.service-cta {
  grid-area: cta;
  align-self: end;   /* bottom */
  justify-self: end; /* right  */
  white-space: nowrap;
}

/* Stack the CTA below the content on narrow screens */
@media (max-width: 620px) {
  .service-card {
    grid-template-columns: 1fr;
    grid-template-areas:
      "head"
      "desc"
      "list"
      "cta";
    row-gap: 0.5rem;
  }

  .service-cta {
    justify-self: start;
    margin-top: 0.8rem;
  }
}

/* ---------- Section header ---------- */
.section-head {
  max-width: 60ch;
  margin-bottom: 2.4rem;
}

/* Heading on the left, action link on the right */
.section-head--row {
  max-width: none;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
}

.section-head--row > div {
  max-width: 60ch;
}

.section-head-action {
  flex: none;
  padding-bottom: 0.4rem;
}

@media (max-width: 620px) {
  .section-head--row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.8rem;
  }
}

/* ---------- Fact grid (About firm profile) ---------- */
.fact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin: 0;
}

.fact {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.fact dt {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--slate-400);
}

.fact dd {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--navy-900);
}

@media (max-width: 480px) {
  .fact-grid {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }
}

/* ---------- Split / two column ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

/* Vertically center the columns (used where one column is much
   shorter than the other, so the short one doesn't leave dead space). */
.split--center {
  align-items: center;
  gap: clamp(3rem, 8vw, 6rem);
}

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

/* ---------- Definition rows (factual details) ---------- */
.detail-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.detail-list li {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.96rem;
}

.detail-list .label {
  color: var(--slate-400);
  font-weight: 600;
}

.detail-list .value {
  color: var(--ink);
}

@media (max-width: 520px) {
  .detail-list li {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }
}

/* ---------- Services list (detailed page) ---------- */
.service-block {
  padding: 1.6rem 0;
  border-bottom: 1px solid var(--line);
}

.service-block:last-child {
  border-bottom: none;
}

.service-block h3 {
  margin-bottom: 0.5rem;
}

.service-block ul {
  margin: 0.6rem 0 0;
  padding-left: 1.1rem;
  color: var(--ink-soft);
}

.service-block li {
  margin-bottom: 0.35rem;
}

/* ---------- Contact ---------- */
.form {
  display: grid;
  gap: 1rem;
  max-width: 520px;
}

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

.field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy-800);
}

.req {
  color: #b3261e;
  font-weight: 700;
}

.optional {
  color: var(--slate-400);
  font-weight: 400;
}

.form-legend {
  margin: 0 0 0.4rem;
  font-size: 0.8rem;
  color: var(--slate-400);
}

/* ---------- Quick contact (WhatsApp / Email) ---------- */
.quick-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.6rem;
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-icon-svg {
  flex: none;
}

.field input,
.field textarea,
.field select {
  font-family: inherit;
  font-size: 0.97rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  width: 100%;
}

.field select {
  /* Custom chevron with breathing room from the right edge */
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 2.6rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23647a99' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: 2px solid var(--navy-500);
  outline-offset: 1px;
  border-color: var(--navy-500);
}

/* Idle-state affordance: grey placeholder text */
.field input::placeholder,
.field textarea::placeholder {
  color: var(--slate-300);
  opacity: 1;
}

/* Placeholder (unselected) option in the subject select reads grey too */
.field select:invalid,
.field select option[value=""] {
  color: var(--slate-300);
}

.field select option {
  color: var(--ink);
}

/* Validation error state */
.field.has-error input,
.field.has-error textarea,
.field.has-error select {
  border-color: #b3261e;
}

.field.has-error input:focus,
.field.has-error textarea:focus,
.field.has-error select:focus {
  outline-color: #b3261e;
  border-color: #b3261e;
}

.field-error {
  margin: 0;
  font-size: 0.8rem;
  color: #b3261e;
  min-height: 0;
  display: none;
}

.field.has-error .field-error {
  display: block;
}

.form-status {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
}

.form-status.is-success {
  color: #1a7f4b;
}

.form-status.is-error {
  color: #b3261e;
}

.form-note {
  font-size: 0.82rem;
  color: var(--slate-400);
  margin: 0;
}

/* ---------- Resources: filter + posts ---------- */
/* ---------- Resources search ----------
   Width matches a single article card. The search sits in a grid
   identical to .post-grid and occupies one column, so it always
   lines up with the card width at every breakpoint. */
.resource-search-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

.resource-search {
  position: relative;
  grid-column: 1 / 2;
}

.resource-search-icon {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--slate-400);
  pointer-events: none;
}

.resource-search input {
  width: 100%;
  font-family: inherit;
  font-size: 0.97rem;
  padding: 0.7rem 0.9rem 0.7rem 2.6rem;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
}

.resource-search input::placeholder {
  color: var(--slate-400);
}

.resource-search input:focus {
  outline: 2px solid var(--navy-500);
  outline-offset: 1px;
  border-color: var(--navy-500);
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2.2rem;
}

.filter-chip {
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-soft);
  background: #fff;
  border: 1px solid var(--slate-200);
  border-radius: 999px;
  padding: 0.45rem 1rem;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.filter-chip:hover {
  border-color: var(--navy-500);
  color: var(--navy-900);
}

.filter-chip.is-active {
  background: var(--navy-800);
  border-color: var(--navy-800);
  color: #fff;
}

.post-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.post-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

/* Clickable card affordance. The whole card is the hover target,
   so nothing inside it should ever underline. */
.post-card,
.post-card:hover,
.post-card:focus,
.post-card *,
.post-card:hover * {
  text-decoration: none;
}

.post-card:hover {
  border-color: var(--navy-500);
  box-shadow: 0 6px 20px rgba(15, 27, 45, 0.06);
  transform: translateY(-2px);
}

.post-card:focus-visible {
  outline: 2px solid var(--navy-500);
  outline-offset: 2px;
}

.post-card h3 {
  transition: color 0.15s ease;
}

.post-card:hover h3 {
  color: var(--navy-700);
}

.post-card.is-hidden {
  display: none;
}

.post-tag {
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--navy-700);
  background: var(--paper-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.2rem 0.7rem;
  margin-bottom: 0.9rem;
}

.post-card h3 {
  font-size: 1.08rem;
  margin-bottom: 0.5rem;
}

.post-card p {
  font-size: 0.95rem;
  margin: 0 0 1.1rem;
}

.post-foot {
  margin-top: auto;
  padding-top: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.post-meta {
  font-size: 0.8rem;
  color: var(--slate-400);
}

.post-read {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--navy-700);
  white-space: nowrap;
}

.post-read .arrow {
  transition: transform 0.15s ease;
}

.post-card:hover .post-read .la-text {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.post-card:hover .post-read .arrow {
  transform: translateX(3px);
}

.empty-state {
  text-align: center;
  color: var(--slate-400);
  padding: 2.5rem 0;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-900);
  color: var(--slate-200);
  padding-block: 2.8rem;
  font-size: 0.9rem;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1.4fr;
  gap: clamp(2rem, 6vw, 4.5rem);
}

.site-footer h4 {
  color: #fff;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.9rem;
}

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

.site-footer li {
  margin-bottom: 0.5rem;
}

.footer-brand-name {
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
}

.footer-bottom {
  margin-top: 2rem;
  padding-top: 1.4rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.8rem;
  font-size: 0.82rem;
  color: var(--slate-300);
}

.disclaimer {
  font-size: 0.8rem;
  color: var(--slate-300);
  max-width: 34ch;
  margin-top: 0.6rem;
}

@media (max-width: 720px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.6rem;
  }
}

/* ---------- Mobile nav ---------- */
@media (max-width: 720px) {
  .nav-toggle {
    display: inline-block;
  }

  .nav-links {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    padding: 0.5rem var(--gap) 1rem;
    display: none;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: 0.7rem 0;
    border-bottom: 1px solid var(--line);
  }

  .nav-links a.active {
    border-bottom-color: var(--line);
  }
}

/* ---------- Utilities ---------- */
.mt-0 { margin-top: 0; }
.center { text-align: center; }
.muted { color: var(--slate-400); }

/* ============================================================
   Article / blog post page
   ============================================================ */
.article {
  padding-block: clamp(2rem, 5vw, 3.5rem);
}

/* No width cap here at all: the article fills the same 1080px
   .container as every other page. Paragraph line-length is handled
   by the existing global `p { max-width: 62ch }` rule, exactly like
   every other page's body copy, so nothing about this page's grid
   is special-cased. */

/* Breadcrumb */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--slate-400);
  margin-bottom: 1.5rem;
}

.breadcrumb a {
  color: var(--slate-400);
}

.breadcrumb a:hover {
  color: var(--navy-700);
}

.breadcrumb [aria-current="page"] {
  color: var(--ink-soft);
}

/* Category pill */
.article-category {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--navy-700);
  background: var(--paper-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.25rem 0.8rem;
  margin-bottom: 1rem;
  text-decoration: none;
}

.article-category:hover {
  border-color: var(--navy-500);
  text-decoration: none;
}

.article h1 {
  margin-bottom: 1.25rem;
}

/* Byline */
.byline {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.25rem 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 2rem;
}

.byline-people {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2.5rem;
}

.byline-person {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.byline-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--slate-400);
}

.byline-name {
  font-weight: 700;
  color: var(--navy-900);
  font-size: 0.98rem;
}

.byline-name:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.byline-cred {
  font-size: 0.82rem;
  color: var(--slate-400);
}

.byline-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--slate-400);
}

/* Article figure / image */
.article-figure {
  margin: 0 0 2rem;
}

.article-figure img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  display: block;
}

.article-figure figcaption {
  margin-top: 0.6rem;
  font-size: 0.82rem;
  color: var(--slate-400);
}

/* Callouts: TL;DR and Quick answer */
.callout {
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
}

.callout h2 {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.callout p {
  margin: 0;
  max-width: none;
}

.callout-tldr {
  background: var(--paper-soft);
  border: 1px solid var(--line);
}

.callout-tldr h2 {
  color: var(--slate-400);
}

.callout-quick {
  background: #fff;
  border: 1px solid var(--navy-500);
  border-left: 4px solid var(--navy-700);
}

.callout-quick h2 {
  color: var(--navy-700);
}

/* Table of contents */
.toc {
  background: var(--paper-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem 1.25rem 1.5rem;
  margin-bottom: 2.5rem;
}

.toc h2 {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--slate-400);
  margin-bottom: 0.6rem;
}

.toc ol {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--navy-700);
}

.toc li {
  margin-bottom: 0.35rem;
}

.toc a {
  color: var(--navy-700);
}

.toc a:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Article body */
.article-body section {
  padding: 0;
  scroll-margin-top: 90px;
}

.article-body h2 {
  margin-top: 2.5rem;
  margin-bottom: 0.8rem;
}

.article-body section:first-child h2 {
  margin-top: 0;
}

.article-body p {
  max-width: none;
}

/* Table */
.table-wrap {
  overflow-x: auto;
  margin: 1.5rem 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.article-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.article-body caption {
  caption-side: bottom;
  text-align: left;
  font-size: 0.8rem;
  color: var(--slate-400);
  padding: 0.6rem 1rem;
}

.article-body th,
.article-body td {
  text-align: left;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--line);
}

.article-body thead th {
  background: var(--paper-soft);
  font-size: 0.8rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--navy-700);
}

.article-body tbody tr:last-child td {
  border-bottom: none;
}

/* Article CTA */
.article-cta {
  background: var(--paper-soft);
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: var(--radius);
  padding: 2rem;
  margin: 3rem 0;
}

.article-cta h2 {
  color: var(--navy-900);
  margin-bottom: 0.5rem;
}

.article-cta p {
  color: var(--ink-soft);
  max-width: 55ch;
  margin-bottom: 1.4rem;
}

.article-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

/* FAQs (native accordion) */
.faqs {
  margin: 3rem 0;
}

.faqs h2 {
  margin-bottom: 1rem;
}

.faqs details {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 1.25rem;
  margin-bottom: 0.7rem;
  background: #fff;
}

.faqs summary {
  cursor: pointer;
  padding: 1rem 0;
  font-weight: 600;
  color: var(--navy-900);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

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

.faqs summary::after {
  content: "+";
  font-size: 1.3rem;
  color: var(--slate-400);
  font-weight: 400;
  flex: none;
}

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

.faqs details p {
  margin: 0 0 1rem;
  max-width: none;
}

/* Author card */
.author-card {
  background: var(--paper-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem;
  margin: 3rem 0;
}

.author-card h3 {
  margin: 0.3rem 0 0.2rem;
}

.author-card-cred {
  font-size: 0.85rem;
  color: var(--slate-400);
  margin-bottom: 0.8rem;
}

.author-card p:last-child {
  margin-bottom: 0;
  max-width: none;
}

/* Related articles */
.related {
  margin-top: 3rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--line);
}

.related h2 {
  margin-bottom: 1.25rem;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}
