:root {
  --green: #16261F;
  --green-2: #1F3329;
  --cream: #F6F3EC;
  --parchment: #ECE6D9;
  --brass: #B08D57;
  --brass-soft: #D6C3A0;
  --ink: #1C221F;
  --ink-soft: #4A524D;
  --rule: #D9D2C3;
  --serif: "Cormorant Garamond", "Cormorant", Georgia, serif;
  --sans: "Public Sans", "Helvetica Neue", Arial, sans-serif;
  --measure: 66ch;
  --gutter: clamp(20px, 5vw, 72px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--cream); color: var(--ink); font-family: var(--sans); font-size: 17px; line-height: 1.6; font-weight: 300; }
a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; }
img { max-width: 100%; display: block; }
p { margin: 0 0 1.1em; max-width: var(--measure); }
strong { font-weight: 500; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.1; margin: 0 0 0.5em; letter-spacing: 0.005em; }
h1 { font-size: clamp(2.4rem, 5.4vw, 4.2rem); }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.7rem); }
h3 { font-size: clamp(1.35rem, 2.2vw, 1.7rem); }
.u { border-bottom: 1px solid var(--brass); }
.note { font-size: 0.86rem; color: var(--ink-soft); max-width: 78ch; }
.on-green .note, .band .note { color: var(--brass-soft); }

/* ---------- Header ---------- */
.site-header { padding: 22px var(--gutter) 18px; display: flex; justify-content: space-between; align-items: center; gap: 20px 40px; flex-wrap: wrap; border-bottom: 1px solid var(--rule); }
.logo { display: inline-flex; align-items: center; gap: 12px; }
.logo svg { width: 34px; height: 34px; flex: none; }
.logo .t { font-family: var(--serif); line-height: 1; }
.logo .n { font-size: 1.05rem; letter-spacing: 0.24em; text-transform: uppercase; display: block; }
.logo .s { font-family: var(--sans); font-size: 0.56rem; letter-spacing: 0.42em; text-transform: uppercase; color: var(--brass); display: block; margin-top: 5px; }
.site-nav { display: flex; gap: 26px; flex-wrap: wrap; font-size: 0.92rem; }
.site-nav a { padding-bottom: 3px; border-bottom: 1px solid transparent; }
.site-nav a:hover, .site-nav a[aria-current="page"] { border-bottom-color: var(--brass); }
.band .site-header, .site-header.on-green { border-bottom-color: rgba(246,243,236,0.16); }

/* ---------- Green band + hero ---------- */
.band { background: var(--green); color: var(--cream); }
.band .site-nav a, .band .logo .n { color: var(--cream); }
.hero { padding: clamp(56px, 8vw, 110px) var(--gutter) clamp(48px, 7vw, 90px); display: grid; grid-template-columns: 1fr; gap: 40px; align-items: end; }
@media (min-width: 900px) { .hero { grid-template-columns: 7fr 5fr; } }
.hero h1 { max-width: 16ch; }
.hero .sectors { font-family: var(--serif); font-size: 1.3rem; letter-spacing: 0.04em; color: var(--brass); margin: 0 0 28px; }
.hero p.lead { font-size: 1.12rem; max-width: 56ch; opacity: 0.92; }
.hero .mosaic { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-self: center; align-content: center; }
.hero .mosaic figure { margin: 0; aspect-ratio: 4 / 3; overflow: hidden; position: relative; }
.hero .mosaic img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.9); }
.hero .mosaic figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 6px 9px; font-size: 0.66rem; letter-spacing: 0.03em; background: linear-gradient(transparent, rgba(22,38,31,0.85)); color: var(--cream); }

/* ---------- Inner page heads ---------- */
.page-head { padding: clamp(44px, 6vw, 80px) var(--gutter) clamp(28px, 4vw, 48px); display: grid; grid-template-columns: 1fr; gap: 32px 56px; align-items: center; }
@media (min-width: 900px) { .page-head { grid-template-columns: 3fr 2fr; } .page-head.wide-text { grid-template-columns: 2fr 1fr; } }
.page-head h1 { max-width: 18ch; }
.page-head p.lead { font-size: 1.12rem; }
.page-head figure { margin: 0; position: relative; }
.page-head figure img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.page-head figcaption, figcaption.cap { font-size: 0.74rem; color: var(--ink-soft); margin-top: 8px; letter-spacing: 0.02em; }

/* Photo band: full-width photo with headline */
.photo-band { position: relative; color: var(--cream); background: var(--green); overflow: hidden; }
.photo-band img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.5; filter: saturate(0.7); }
.photo-band .in { position: relative; padding: clamp(72px, 10vw, 140px) var(--gutter) clamp(56px, 8vw, 110px); background: linear-gradient(90deg, rgba(22,38,31,0.92) 0%, rgba(22,38,31,0.7) 55%, rgba(22,38,31,0.25) 100%); }
.photo-band h1 { max-width: 16ch; }
.photo-band p.lead { font-size: 1.12rem; max-width: 56ch; opacity: 0.94; }
.photo-band .credit { position: absolute; right: var(--gutter); bottom: 12px; font-size: 0.7rem; opacity: 0.7; }

/* ---------- Sections ---------- */
.section { padding: clamp(44px, 6.5vw, 88px) var(--gutter); }
.section + .section { border-top: 1px solid var(--rule); }
.section.parchment { background: var(--parchment); border-top: none; }
.section.on-green { background: var(--green); color: var(--cream); border-top: none; }
.section.on-green h2, .section.on-green h3 { color: var(--cream); }
.section h2 { margin-bottom: 0.6em; }
.subhead { font-family: var(--serif); font-size: 1.4rem; font-style: italic; color: var(--ink-soft); max-width: 52ch; margin: -0.3em 0 1.6em; }
.on-green .subhead { color: var(--brass-soft); }
.two { display: grid; grid-template-columns: 1fr; gap: 36px 64px; align-items: start; }
@media (min-width: 900px) { .two { grid-template-columns: 1fr 1fr; } .two.narrow-left { grid-template-columns: 2fr 3fr; } }
.two p { max-width: none; }
.two > * { min-width: 0; }

/* ---------- Big numbers ---------- */
.proof { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 28px 40px; margin: 0 0 28px; }
.proof .n { white-space: nowrap; font-family: var(--serif); font-size: clamp(2.4rem, 4.5vw, 3.6rem); line-height: 1; color: var(--green); display: block; margin-bottom: 8px; }
.proof .n.long { font-size: clamp(1.9rem, 3.2vw, 2.6rem); padding-top: 0.25em; }
.proof .l { font-size: 0.95rem; color: var(--ink-soft); max-width: 24ch; display: block; }
.on-green .proof .n, .band .proof .n { color: var(--brass); }
.on-green .proof .l, .band .proof .l { color: var(--cream); opacity: 0.85; }

/* ---------- Tiles, entries ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 36px 48px; }
@media (min-width: 900px) { .tiles.three { grid-template-columns: repeat(3, 1fr); } }
.tiles h3 { margin-bottom: 0.3em; }
.tiles p { font-size: 0.98rem; max-width: none; }
.entry { max-width: 72ch; margin-bottom: 2.4em; }
.entry:last-child { margin-bottom: 0; }
.entry h3 { margin-bottom: 0.35em; }
.entry p { max-width: none; }
.entry ul { margin: 0.4em 0 1em; padding-left: 1.2em; }
.entry li { margin-bottom: 0.3em; }

/* Service rows with photo */
.service { display: grid; grid-template-columns: 1fr; gap: 24px 56px; padding: clamp(32px, 4vw, 56px) 0; border-top: 1px solid var(--rule); align-items: start; }
.service:first-of-type { border-top: none; padding-top: 0; }
@media (min-width: 900px) { .service { grid-template-columns: 3fr 2fr; } .service:nth-of-type(even) { grid-template-columns: 2fr 3fr; } .service:nth-of-type(even) .txt { order: 2; } }
.service figure { margin: 0; }
.service figure img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.service .txt p { max-width: none; }
.service .txt ul { margin: 0.4em 0 0; padding-left: 1.2em; }
.service .txt li { margin-bottom: 0.3em; }

/* Photo cards (experiential strip, wider record, sectors) */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 28px 32px; }
.card figure { margin: 0 0 14px; }
.card img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.card h3 { font-size: 1.4rem; margin-bottom: 0.15em; }
.card .what { color: var(--ink-soft); font-size: 0.92rem; margin-bottom: 0.7em; max-width: none; }
.on-green .card .what { color: var(--brass-soft); }
.card .big { font-family: var(--serif); font-size: 2rem; color: var(--green); line-height: 1; margin: 0 0 4px; }
.on-green .card .big { color: var(--brass); }
.card .big + .l { font-size: 0.9rem; color: var(--ink-soft); display: block; margin-bottom: 0.8em; }
.on-green .card .big + .l { color: var(--cream); opacity: 0.85; }
.card ul { list-style: none; padding: 0; margin: 0; font-size: 0.95rem; }
.card li { padding: 6px 0; border-top: 1px solid var(--rule); }
.on-green .card li { border-top-color: rgba(246,243,236,0.18); }
.card li b { font-family: var(--serif); font-weight: 500; font-size: 1.15rem; color: var(--green); margin-right: 6px; }
.on-green .card li b { color: var(--brass); }

/* ---------- Buttons, CTA ---------- */
.button { display: inline-block; border: 1px solid var(--brass); color: var(--green); padding: 12px 22px; font-size: 0.95rem; letter-spacing: 0.02em; }
.button:hover { background: var(--brass); color: var(--cream); }
.band .button, .on-green .button { color: var(--cream); }
.cta p { font-size: 1.35rem; font-family: var(--serif); max-width: 40ch; }
@media (prefers-reduced-motion: no-preference) { .button { transition: background-color 160ms ease, color 160ms ease; } }

/* Founder block */
.founder { display: grid; grid-template-columns: 1fr; gap: 32px 56px; align-items: center; }
@media (min-width: 760px) { .founder { grid-template-columns: 220px 1fr; } }
.founder img { width: 100%; aspect-ratio: 372 / 410; object-fit: cover; }
.founder h2 { margin-bottom: 0.4em; }

/* ---------- Track record ---------- */
.outperf { display: grid; grid-template-columns: 1fr; gap: 36px 56px; max-width: 84ch; margin: 0.4em 0 1.6em; }
@media (min-width: 760px) { .outperf { grid-template-columns: 1fr 1fr; } }
.outperf .period { font-family: var(--serif); font-size: 1.2rem; color: var(--ink-soft); margin-bottom: 4px; }
.outperf .pts { font-family: var(--serif); font-size: clamp(2.8rem, 6vw, 4.4rem); line-height: 1; color: var(--green); margin: 0; }
.outperf .pts small { font-family: var(--sans); font-size: 0.95rem; color: var(--ink-soft); display: block; margin-top: 8px; font-weight: 300; }
.outperf .track { height: 12px; background: var(--rule); margin: 16px 0 6px; position: relative; max-width: 420px; }
.outperf .track i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--brass); }
.outperf .track-label { font-size: 0.82rem; color: var(--ink-soft); display: flex; justify-content: space-between; max-width: 420px; }

.stat-pair { font-family: var(--serif); font-size: clamp(2.2rem, 3.6vw, 3.2rem); line-height: 1; color: var(--green); margin: 0 0 6px; letter-spacing: -0.01em; white-space: nowrap; }
.stat-pair .arrow { color: var(--brass); margin: 0 0.15em; }
.stat-label { font-size: 0.95rem; color: var(--ink-soft); margin-bottom: 0; max-width: 34ch; }
.case { display: grid; grid-template-columns: 1fr; gap: 28px 56px; padding: clamp(40px, 5vw, 72px) 0; border-top: 1px solid var(--rule); align-items: start; }
.case:first-of-type { border-top: none; padding-top: 0; }
@media (min-width: 900px) { .case { grid-template-columns: 2fr 3fr; } .case:nth-of-type(even) { grid-template-columns: 3fr 2fr; } .case:nth-of-type(even) .pic { order: 2; } }
.case .pic { margin: 0; position: sticky; top: 24px; }
.case .pic img { width: 100%; aspect-ratio: 5 / 3; object-fit: cover; }
.case h3 { font-size: clamp(1.7rem, 2.8vw, 2.3rem); margin-bottom: 0.15em; }
.case .where { color: var(--ink-soft); font-size: 0.95rem; margin-bottom: 1.3em; }
.case .stat-wrap { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px 32px; margin-bottom: 1.6em; }
.case-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 36px; margin: 0 0 1.3em; }
.case-grid dt { font-family: var(--serif); font-size: 1.15rem; color: var(--green); margin-bottom: 4px; }
.case-grid dd { margin: 0; font-size: 0.95rem; }
.case .levers { font-size: 0.95rem; color: var(--ink-soft); max-width: none; }
.case .levers span { color: var(--green); }

table.record { width: 100%; max-width: 78ch; border-collapse: collapse; font-size: 0.95rem; margin: 0.6em 0 1em; }
table.record th, table.record td { text-align: left; padding: 10px 14px 10px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
table.record th { font-weight: 500; color: var(--green); font-family: var(--serif); font-size: 1.05rem; }
table.record td.num, table.record th.num { text-align: right; padding-right: 0; font-variant-numeric: tabular-nums; }
table.record td.num { padding-left: 10px; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.attribution { font-size: 0.86rem; color: var(--ink-soft); max-width: 78ch; border-top: 1px solid var(--rule); padding-top: 1.2em; }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1fr; gap: 40px 64px; align-items: start; }
@media (min-width: 820px) { .about-grid { grid-template-columns: 300px 1fr; } .figures { grid-template-columns: repeat(3, 1fr); max-width: 60ch; } }
.about-grid .portrait { margin: 0; position: sticky; top: 24px; }
.about-grid .portrait img { width: 100%; aspect-ratio: 372 / 410; object-fit: cover; }
.figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 22px 32px; margin: 0.6em 0 0; }
.figures .n { font-family: var(--serif); font-size: 2.1rem; color: var(--green); line-height: 1; display: block; margin-bottom: 6px; }
.figures .l { font-size: 0.88rem; color: var(--ink-soft); display: block; }
dl.plain dt { font-family: var(--serif); font-size: 1.2rem; color: var(--green); margin-top: 1em; }
dl.plain dd { margin: 0.2em 0 0; max-width: 66ch; }
.on-green dl.plain dt { color: var(--brass); }
.strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (min-width: 760px) { .strip { grid-template-columns: repeat(6, 1fr); } }
.strip figure { margin: 0; }
.strip img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.strip figcaption { font-size: 0.68rem; color: var(--ink-soft); margin-top: 5px; }

/* ---------- Approach levers ---------- */
ol.levers { padding-left: 0; list-style: none; counter-reset: lever; margin: 0; display: grid; grid-template-columns: 1fr; gap: 0 56px; }
@media (min-width: 900px) { ol.levers { grid-template-columns: 1fr 1fr; } }
ol.levers li { counter-increment: lever; display: grid; grid-template-columns: 2.4rem 1fr; gap: 0 12px; padding: 20px 0; border-top: 1px solid rgba(246,243,236,0.18); }
ol.levers li::before { content: counter(lever); font-family: var(--serif); font-size: 1.6rem; color: var(--brass); line-height: 1.1; }
ol.levers li h3 { margin-bottom: 0.2em; font-size: 1.3rem; }
ol.levers li p { margin: 0; font-size: 0.98rem; max-width: none; }
ol.levers li .ex { color: var(--brass-soft); font-size: 0.9rem; margin-top: 4px; }

/* ---------- Contact ---------- */
.contact-card { font-family: var(--serif); font-size: 1.4rem; line-height: 1.5; }
.contact-card a { border-bottom: 1px solid var(--brass); }

/* ---------- Footer ---------- */
.site-footer { background: var(--green); color: var(--brass-soft); padding: 40px var(--gutter) 44px; font-size: 0.85rem; display: flex; flex-wrap: wrap; gap: 20px 40px; justify-content: space-between; align-items: center; }
.site-footer .logo .n { color: var(--cream); }
.site-footer a:hover { color: var(--cream); }
.site-footer nav { display: flex; gap: 20px; flex-wrap: wrap; }

@media (max-width: 640px) {
  body { font-size: 16px; }
  .case-grid { grid-template-columns: 1fr; gap: 16px; }
  .proof .n.long { font-size: 1.8rem; }
  table.record { min-width: 560px; }
  .site-nav { gap: 14px 18px; font-size: 0.88rem; }
  .case .pic, .about-grid .portrait { position: static; }
}

/* ---------- Elmsworth Partners additions: forms, gate, admin ---------- */
.form { max-width: 520px; }
.form label { display: block; font-size: 0.82rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-soft); margin: 18px 0 6px; }
.form input, .form textarea { width: 100%; font: inherit; font-size: 1rem; font-weight: 300; padding: 11px 12px; border: 1px solid var(--rule); background: #fff; color: var(--ink); border-radius: 0; }
.form textarea { min-height: 96px; resize: vertical; }
.form input:focus, .form textarea:focus { outline: 2px solid var(--brass); outline-offset: 1px; border-color: var(--brass); }
.form .button { margin-top: 22px; cursor: pointer; font-family: var(--sans); background: transparent; }
.form .button[disabled] { opacity: 0.5; cursor: default; }
.form .msg { margin-top: 16px; font-size: 0.95rem; }
.form .msg.ok { color: var(--green); font-family: var(--serif); font-size: 1.2rem; }
.form .msg.err { color: #8A3B2E; }
.on-green .form input, .on-green .form textarea { background: rgba(246,243,236,0.06); color: var(--cream); border-color: rgba(246,243,236,0.25); }
.on-green .form label { color: var(--brass-soft); }
.on-green .form .msg.ok { color: var(--cream); }
.on-green .form .msg.err { color: #E8B4A6; }
.gate-steps { counter-reset: s; list-style: none; padding: 0; margin: 1em 0 0; display: grid; gap: 14px; max-width: 60ch; }
.gate-steps li { counter-increment: s; display: grid; grid-template-columns: 2rem 1fr; gap: 10px; font-size: 0.98rem; }
.gate-steps li::before { content: counter(s); font-family: var(--serif); font-size: 1.5rem; color: var(--brass); line-height: 1; }

/* Deck viewer */
.deck-shell { background: #2A2A28; min-height: 70vh; padding: 24px var(--gutter) 48px; }
.deck-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; color: var(--brass-soft); font-size: 0.85rem; margin-bottom: 18px; }
.deck-bar b { color: var(--cream); font-weight: 400; }
.deck-pages { display: grid; gap: 18px; max-width: 1200px; margin: 0 auto; }
.deck-page { position: relative; background: #fff; box-shadow: 0 6px 30px rgba(0,0,0,0.35); }
.deck-page canvas { width: 100%; height: auto; display: block; }
.deck-page .wm { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; font-family: var(--sans); font-size: clamp(0.9rem, 2.2vw, 1.6rem); color: rgba(22,38,31,0.12); transform: rotate(-24deg); text-align: center; letter-spacing: 0.08em; white-space: nowrap; user-select: none; }
.deck-status { color: var(--brass-soft); text-align: center; padding: 40px 0; }

/* Admin */
.admin { padding: 28px var(--gutter) 60px; }
.admin h2 { font-size: 1.7rem; margin: 1.6em 0 0.4em; }
.admin h2:first-of-type { margin-top: 0.4em; }
.admin .bar { display: flex; gap: 12px 24px; flex-wrap: wrap; align-items: center; font-size: 0.9rem; color: var(--ink-soft); margin-bottom: 8px; }
.admin .kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px 28px; margin: 12px 0 8px; }
.admin .kpis .n { font-family: var(--serif); font-size: 2.2rem; color: var(--green); line-height: 1; display: block; }
.admin .kpis .l { font-size: 0.82rem; color: var(--ink-soft); }
table.grid { width: 100%; border-collapse: collapse; font-size: 0.86rem; margin: 0.4em 0 1em; }
table.grid th, table.grid td { text-align: left; padding: 8px 10px 8px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
table.grid th { font-weight: 500; color: var(--green); font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; }
table.grid td.mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.82rem; white-space: nowrap; }
table.grid td .sub { display: block; color: var(--ink-soft); font-size: 0.8rem; }
.pill { display: inline-block; padding: 2px 8px; border: 1px solid var(--rule); border-radius: 999px; font-size: 0.74rem; letter-spacing: 0.04em; text-transform: uppercase; }
.pill.pending { border-color: var(--brass); color: var(--brass); }
.pill.approved { border-color: var(--green); color: var(--green); }
.pill.declined, .pill.revoked { color: var(--ink-soft); }
.btn-sm { font: inherit; font-size: 0.8rem; padding: 5px 11px; border: 1px solid var(--brass); background: transparent; color: var(--green); cursor: pointer; margin: 0 6px 4px 0; }
.btn-sm:hover { background: var(--brass); color: var(--cream); }
.btn-sm.quiet { border-color: var(--rule); color: var(--ink-soft); }
.code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 1rem; letter-spacing: 0.1em; color: var(--green); background: var(--parchment); padding: 2px 8px; }
.admin .empty { color: var(--ink-soft); font-style: italic; font-family: var(--serif); font-size: 1.1rem; }
.admin details { margin: 0.4em 0 1em; }
.admin summary { cursor: pointer; color: var(--ink-soft); font-size: 0.9rem; }
.admin .upload { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; font-size: 0.9rem; }
