:root {
  --paper: #F6F4EF;
  --band: #EFEBE1;
  --ink: #14201B;
  --text: #33403A;
  --muted: #4A5651;
  --faint: #5C554A;
  --rule: #D5CEC0;
  --rule-soft: #E2DCD1;
  --green: #23443A;
  --green-dark: #1A342C;
  --on-green: #E7EFE7;
  --gold: #7A5A28;
  --brass: #A67C3D;
  --stone: #8C8272;
  --red: #8A3324;
  --red-deep: #6E2A1E;
  --ok: #3D6B4F;
  --serif: Newsreader, Georgia, "Times New Roman", serif;
  --sans: "Public Sans", "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(20px, 6vw, 96px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 17px; line-height: 1.6; }
a { color: var(--green); text-decoration: none; }
a:hover { color: var(--gold); }
a:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
h1, h2, h3 { margin: 0; font-family: var(--serif); font-weight: 400; line-height: 1.12; color: var(--ink); }
p { margin: 0; }
p + p { margin-top: 14px; }

.wrap { max-width: 1440px; margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: clamp(56px, 8vw, 88px) 0; }
.band { background: var(--band); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.dark { background: var(--green); color: var(--on-green); }
.dark h2, .dark h3 { color: #FFFFFF; }

/* Header */
.site-header { border-bottom: 1px solid var(--rule); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px 32px; flex-wrap: wrap; padding-top: 22px; padding-bottom: 22px; }
.brand { display: flex; flex-direction: column; gap: 2px; color: var(--ink); }
.brand-name { font-family: var(--serif); font-size: 22px; line-height: 1.2; }
.brand-tag { font-size: 13px; color: var(--faint); }
.site-nav { display: flex; align-items: center; flex-wrap: wrap; gap: 12px clamp(18px, 3vw, 34px); }
.site-nav a { font-size: 15px; color: var(--text); }
.site-nav a[aria-current="page"] { color: var(--ink); font-weight: 600; border-bottom: 2px solid var(--gold); padding-bottom: 2px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 26px; background: var(--green); border: 1px solid var(--green); border-radius: 2px; color: #FFFFFF; font-size: 16px; font-weight: 500; }
.btn:hover { background: var(--green-dark); color: #FFFFFF; }
.btn-ghost { background: transparent; border-color: #B8B0A0; color: var(--green); }
.btn-ghost:hover { background: transparent; color: var(--gold); }
.site-nav .btn { min-height: 42px; padding: 0 20px; font-size: 15px; color: #FFFFFF; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; margin-top: 32px; }
.text-link { font-weight: 500; border-bottom: 1px solid #B8B0A0; padding-bottom: 2px; }

/* Type */
.hero { padding: clamp(56px, 8vw, 96px) 0 clamp(56px, 7vw, 88px); }
.hero h1 { font-size: clamp(34px, 3.8vw, 50px); line-height: 1.1; letter-spacing: -0.01em; max-width: 900px; }
.hero-sm { padding: clamp(56px, 8vw, 88px) 0 clamp(40px, 5vw, 56px); border-bottom: 1px solid var(--rule); }
.hero-sm h1 { font-size: clamp(34px, 3.6vw, 46px); }
.lede { margin-top: 20px; max-width: 660px; font-size: clamp(17px, 1.4vw, 19px); line-height: 1.58; color: var(--text); }
.section h2 { font-size: clamp(28px, 2.8vw, 38px); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 12px 32px; margin-bottom: 36px; }
.muted { color: var(--muted); }
.small { font-size: 15px; }

/* Three columns */
.cols-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(28px, 4vw, 48px); }
.col { padding-top: 18px; border-top: 2px solid var(--green); }
.col h3 { font-size: 24px; margin-bottom: 10px; }
.col p { color: var(--text); }
.dark .col { border-top-color: #A9C0AC; }
.dark .col p { color: var(--on-green); }

/* Label / content rows */
.rows { border-top: 1px solid var(--rule); }
.row { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 700px); gap: 8px clamp(20px, 5vw, 64px); padding: 22px 0; border-bottom: 1px solid var(--rule); }
.row h3 { font-size: 24px; }
.row p { color: var(--text); }
.rows-compact .row { padding: 16px 0; }
.rows-compact .row h3 { font-family: var(--sans); font-size: 16px; font-weight: 600; line-height: 1.6; }

/* Services */
.service { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 700px); gap: 16px clamp(20px, 5vw, 64px); padding: clamp(40px, 5vw, 56px) 0; border-bottom: 1px solid var(--rule); scroll-margin-top: 16px; }
.service h2 { font-size: clamp(28px, 2.6vw, 34px); }
.terms { margin-top: 8px; font-size: 15px; color: var(--gold); }
.service p { color: var(--text); }
.split { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 700px); gap: 16px clamp(20px, 5vw, 64px); }
.split > div > p { color: inherit; }

/* Steps (a real sequence) */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; counter-reset: step; }
.steps li { counter-increment: step; padding: 26px; background: #FFFFFF; border: 1px solid var(--rule); border-radius: 3px; }
.steps li::before { content: counter(step); display: block; margin-bottom: 8px; font-family: var(--serif); font-size: 30px; line-height: 1; color: #9A8E76; }
.steps h3 { font-family: var(--sans); font-size: 18px; font-weight: 600; margin-bottom: 6px; }
.steps p { font-size: 16px; color: var(--muted); }

/* Contact */
.contact { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 32px 72px; align-items: end; }
.contact p { max-width: 620px; color: var(--text); margin-top: 16px; }
.email { font-family: var(--serif); font-size: clamp(24px, 2.6vw, 32px); line-height: 1.3; border-bottom: 1px solid #B8B0A0; }
.contact-side p { margin-top: 10px; font-size: 15px; color: var(--faint); }

/* About */
.creds { margin: 0; }
.creds .row { grid-template-columns: minmax(0, 300px) minmax(0, 700px); }
.creds dt { font-weight: 600; }
.creds dd { margin: 0; color: var(--text); }

/* Footer */
.site-footer { background: #E7E2D8; border-top: 1px solid #CDC5B5; font-size: 13px; line-height: 1.7; color: #514A40; }
.site-footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px 48px; padding-top: 28px; padding-bottom: 28px; }
.site-footer p { max-width: 900px; margin: 0; }

/* ---------- Shared with the sample program page ----------
   The program page's own rules are in program-page.css, loaded on that page only
   (program-page v0.6). */
.notice-bar { background: #3A2F28; color: #F1EAE0; font-size: 15px; }
.notice-bar .wrap { padding-top: 13px; padding-bottom: 13px; }
.notice-bar strong { color: #E8C89A; font-weight: 600; margin-right: 8px; }

.card { background: #FFFFFF; border: 1px solid var(--rule); border-radius: 3px; padding: 26px; }
.label { display: block; margin-bottom: 12px; font-size: 13px; font-weight: 600; color: var(--faint); }

/* Responsive */
@media (max-width: 860px) {
  .cols-3, .steps { grid-template-columns: minmax(0, 1fr); }
  .contact { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .row, .service, .split, .creds .row { grid-template-columns: minmax(0, 1fr); }
  .site-nav .btn { min-height: 40px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }

/* ---------- Insights posts (Markdown) ---------- */
.post { max-width: 700px; }
.post h2 { font-size: clamp(26px, 2.4vw, 32px); margin: 2em 0 0.5em; }
.post h3 { font-size: 22px; margin: 1.6em 0 0.4em; }
.post h2:first-child, .post h3:first-child { margin-top: 0; }
.post p { color: var(--text); }
.post p + p { margin-top: 1.1em; }
.post ul, .post ol { margin: 1em 0; padding-left: 1.4em; color: var(--text); }
.post li + li { margin-top: 0.4em; }
.post a { border-bottom: 1px solid #B8B0A0; }
.post blockquote { margin: 1.6em 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--gold); color: var(--muted); }
.post hr { border: 0; border-top: 1px solid var(--rule); margin: 2.4em 0; }
.post table { width: 100%; border-collapse: collapse; margin: 1.6em 0; font-size: 15px; }
.post th, .post td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.post th { font-weight: 600; color: var(--ink); border-bottom: 2px solid var(--green); }
.post code { font-size: 0.92em; background: var(--band); padding: 1px 5px; border-radius: 2px; }
.post img { max-width: 100%; height: auto; }
.post-back { margin-top: 56px; }

/* ---------- Services dropdown ---------- */
.nav-menu { position: relative; display: inline-flex; align-items: center; gap: 4px; }
.nav-menu::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 14px; }
.nav-toggle { appearance: none; display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 30px; margin: 0; padding: 0; background: none; border: 0; border-radius: 2px; color: var(--text); cursor: pointer; }
.nav-toggle:hover { color: var(--gold); }
.nav-toggle:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
.nav-toggle svg { transition: transform 0.15s ease; }
.nav-menu.open .nav-toggle svg { transform: rotate(180deg); }
.submenu { display: none; position: absolute; top: calc(100% + 12px); left: -18px; z-index: 30; width: 310px; max-width: calc(100vw - 32px); margin: 0; padding: 8px 0; list-style: none; background: #FFFFFF; border: 1px solid var(--rule); border-radius: 3px; box-shadow: 0 12px 30px rgba(20, 32, 27, 0.12); }
.nav-menu.open .submenu { display: block; }
@media (hover: hover) and (pointer: fine) { .nav-menu:hover .submenu { display: block; } }
.submenu li.sm-sep { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--rule-soft); }
.site-nav .submenu a { display: flex; flex-direction: column; gap: 1px; padding: 9px 20px; font-size: 15px; line-height: 1.35; color: var(--ink); border: 0; }
.site-nav .submenu a:hover { background: var(--band); color: var(--ink); }
.site-nav .submenu a[aria-current="page"] { font-weight: 400; border: 0; padding-bottom: 9px; box-shadow: inset 3px 0 0 var(--gold); background: var(--paper); }
.sm-name { font-weight: 500; }
.sm-desc { font-size: 13px; color: var(--faint); }
.site-nav .submenu .sm-all a { font-size: 14px; color: var(--green); font-weight: 500; }

/* ---------- Service pages ---------- */
.checklist { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px clamp(24px, 4vw, 56px); max-width: 1100px; }
.checklist li { position: relative; padding-left: 22px; color: var(--text); }
.checklist li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 7px; height: 7px; background: var(--brass); }
.checklist.one { grid-template-columns: minmax(0, 1fr); max-width: 700px; }
.after-list { margin-top: 28px; max-width: 760px; color: var(--muted); }

.views { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-top: 32px; max-width: 1100px; }
.views .card h3 { font-size: 26px; margin-bottom: 8px; }
.views .card p { color: var(--text); }
.views .checklist { margin-top: 4px; }
.lead-p { max-width: 760px; color: var(--text); font-size: 18px; }

.situations { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.situations div { padding: 20px 22px; background: var(--band); border: 1px solid var(--rule); border-radius: 3px; color: var(--text); font-size: 17px; }

.pull { margin: 0; max-width: 900px; padding-left: 28px; border-left: 3px solid var(--brass); }
.pull p { font-family: var(--serif); font-style: italic; font-size: clamp(22px, 2.2vw, 28px); line-height: 1.38; color: #FFFFFF; }
.pull footer { margin-top: 14px; font-size: 15px; color: #C9D8CB; }

.groups .col h3 { font-family: var(--sans); font-size: 13px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold); margin-bottom: 4px; }
.items { margin: 0; }
.items div { padding: 12px 0; border-bottom: 1px solid var(--rule); }
.items div:last-child { border-bottom: 0; }
.items dt { font-weight: 600; color: var(--ink); }
.items dd { margin: 2px 0 0; color: var(--text); font-size: 16px; }

.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.pair .card h3 { font-size: 26px; margin-bottom: 8px; }
.pair .card p { color: var(--text); }
.scope-note { margin-top: 28px; font-size: 15px; color: var(--muted); }

.rtl { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 18px; position: relative; }
.rtl::before { content: ""; position: absolute; left: 8px; right: 8px; top: 8px; height: 2px; background: var(--rule); }
.rtl li { position: relative; display: flex; flex-direction: column; gap: 6px; }
.rtl .dotm { width: 18px; height: 18px; border-radius: 50%; background: var(--green); position: relative; }
.rtl li.bind .dotm { background: var(--brass); }
.rtl li.post .dotm { background: var(--paper); border: 2px solid var(--green); }
.rtl time { margin-top: 6px; font-size: 14px; color: var(--faint); }
.rtl strong { font-weight: 600; font-size: 16px; line-height: 1.35; color: var(--ink); }

.also { margin-top: 40px; padding: 26px 28px; background: #FFFFFF; border: 1px solid var(--rule); border-left: 3px solid var(--brass); border-radius: 3px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px 40px; align-items: end; }
.also .label { margin-bottom: 8px; color: var(--gold); letter-spacing: 0.08em; text-transform: uppercase; font-size: 12px; }
.also h3 { font-size: 26px; line-height: 1.2; margin-bottom: 10px; }
.also p { color: var(--text); max-width: 760px; }

@media (max-width: 1000px) {
  .rtl { grid-template-columns: minmax(0, 1fr); gap: 0; padding-left: 4px; }
  .rtl::before { left: 12px; right: auto; top: 10px; bottom: 10px; width: 2px; height: auto; }
  .rtl li { display: grid; grid-template-columns: 18px minmax(0, 1fr); column-gap: 18px; padding-bottom: 20px; }
  .rtl .dotm { grid-row: 1 / span 2; }
  .rtl time { margin-top: 0; }
  .rtl li:last-child { padding-bottom: 0; }
}
@media (max-width: 860px) {
  .situations, .views, .pair { grid-template-columns: minmax(0, 1fr); }
  .also { grid-template-columns: minmax(0, 1fr); align-items: start; }
}
@media (max-width: 720px) {
  .checklist { grid-template-columns: minmax(0, 1fr); }
}
@media print { .submenu, .nav-toggle { display: none !important; } }
.dark p a { color: #FFFFFF; border-bottom: 1px solid #A9C0AC; }
.dark p a:hover { color: #E8C89A; }
.service h2 a { color: var(--ink); }
.service h2 a:hover { color: var(--gold); }

/* Cards on phones (every page) */
@media (max-width: 720px) {
  .card { padding: 20px 18px; }
}

/* ---------- Header on phones: one brand row, one nav row ---------- */
.nav-short { display: none; }
@media (max-width: 860px) {
  .site-header .wrap { flex-direction: column; align-items: stretch; gap: 10px; padding-top: 16px; padding-bottom: 12px; }
}
@media (max-width: 720px) {
  .brand-tag { display: none; }
  .brand-name { font-size: 21px; }
  .site-nav { justify-content: space-between; flex-wrap: nowrap; gap: 8px; }
  .site-nav a { font-size: 14px; white-space: nowrap; }
  .nav-full { display: none; }
  .nav-short { display: inline; }
  .site-nav .btn { min-height: 0; padding: 0; background: none; border: 0; color: var(--green); font-weight: 600; font-size: 14px; }
  .site-nav .btn:hover { color: var(--gold); }
  .nav-toggle { width: 22px; }
  .submenu { left: 0; }
}
@media (max-width: 360px) { .site-nav { flex-wrap: wrap; justify-content: flex-start; gap: 6px 16px; } }

/* Second menu (sample program pages): narrower, and kept on screen on phones */
.submenu.sm-narrow { width: 340px; }
@media (max-width: 720px) { .submenu.sm-narrow { left: -64px; width: 310px; } }
@media (max-width: 380px) { .submenu.sm-narrow { width: 286px; } }

/* Home hero: the lede on the left, the two sample links in the space beside it */
.hero-split { display: grid; grid-template-columns: minmax(0, 660px) minmax(220px, 280px); justify-content: space-between; gap: 32px clamp(40px, 6vw, 96px); align-items: start; margin-top: 20px; }
.hero-split .lede { margin-top: 0; }
.hero-links { display: grid; gap: 12px; }
.hero-links .label { margin-bottom: 2px; }
.hero-links .btn { width: 100%; }
@media (max-width: 860px) { .hero-split { grid-template-columns: minmax(0, 1fr); } .hero-links { max-width: 320px; } }
/* Book a call, where the contact block carries it */
.contact-side .btn { margin-bottom: 14px; }

/* Header: Book a call is the button; email stays as a plain link in the menu.
   On narrow screens the button sits beside the firm name and the menu runs below. */
.site-header .wrap > .site-nav { margin-left: auto; }
.site-header .book-top { min-height: 42px; padding: 0 20px; font-size: 15px; white-space: nowrap; }
@media (max-width: 1240px) { .nav-full { display: none; } .nav-short { display: inline; } }
@media (max-width: 1290px) {
  .site-header .wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px 16px; padding-top: 16px; padding-bottom: 12px; }
  .site-header .wrap > .brand { grid-column: 1; grid-row: 1; }
  .site-header .book-top { grid-column: 2; grid-row: 1; min-height: 36px; padding: 0 14px; font-size: 14px; }
  .site-header .wrap > .site-nav { grid-column: 1 / -1; grid-row: 2; margin-left: 0; justify-content: flex-start; }
}
@media (max-width: 720px) { .site-header .wrap > .site-nav { justify-content: space-between; } }
@media (max-width: 420px) { .site-header .book-top { padding: 0 12px; } .site-header .brand-name { font-size: 19px; white-space: nowrap; } }
@media (max-width: 380px) { .site-header .brand-name { font-size: 17.5px; } }
@media (max-width: 360px) {
  .site-header .wrap > .site-nav { flex-wrap: nowrap; justify-content: space-between; gap: 6px; }
  .site-header .site-nav a, .site-header .site-nav button { font-size: 13px; }
}

/* Placement menu: a small group label, and kept on screen on phones */
.submenu li.sm-label { margin-top: 6px; padding: 10px 20px 2px; border-top: 1px solid var(--rule-soft); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); }
@media (max-width: 720px) { .submenu.sm-mid { left: -40px; } }
.col h3 a { color: var(--ink); }
.col h3 a:hover { color: var(--gold); }
.group-label { margin: 56px 0 0; padding-bottom: 10px; border-bottom: 1px solid var(--rule); color: var(--gold); letter-spacing: 0.08em; text-transform: uppercase; font-size: 12px; }
.hero-sm .label { color: var(--gold); letter-spacing: 0.08em; text-transform: uppercase; font-size: 12px; }
.rk-short { display: none; }
@media (max-width: 720px) { .rk-full { display: none; } .rk-short { display: inline; } }

/* Two service menus: shorten the samples label sooner, and on phones let the menu run to a second row */
@media (max-width: 1400px) { .nav-full { display: none; } .nav-short { display: inline; } }
@media (max-width: 520px) { .site-header .site-nav .nav-email { display: none; } }
@media (max-width: 400px) { .site-header .wrap > .site-nav { flex-wrap: wrap; justify-content: flex-start; gap: 6px 16px; } }
