/* Kentians theme - main stylesheet.
   Built to the approved mockup v5 (Simon, 4 Nov 2026: kentian-society repo, mockups/Kentian Society website mockup v5.html,
   styles in design/assets/style.css) and the Webstein Design Standards: the 4/8 spacing scale, one section padding
   (96px desktop, 64px phone), one content width (1120px, the same edges as header and footer), three type sizes
   (48/32/18px), sections alternating tan and white.
   Design tokens are the custom properties in :root below: change colours, fonts, sizes and widths there only.
   Sections marked "WordPress" map the mockup's classes onto the block editor's markup. */

:root {
  --navy: #14243b;        /* darkest brand colour: header, footer, small accents only */
  --navy-2: #1f3556;
  --gold: #b8954e;        /* muted gold: rules, borders (not text on light backgrounds) */
  --gold-text: #7d6128;   /* gold dark enough for text on light backgrounds (AA) */
  --gold-light: #e8d9b5;
  --red: #9b2c2c;         /* school red: sparing accent */
  --paper: #f7f3ea;       /* tan: title bands and every other section */
  --white: #ffffff;
  --ink: #1d1d1f;
  --muted: #55565a;
  --line: #e2dccd;
  --radius: 4px;
  --max: 1120px;          /* one content width for header, sections and footer */
  --gutter: 24px;
  --section: 96px;        /* every section, top and bottom */
  /* the three type sizes */
  --fs-1: 3rem;           /* page heading, 48px */
  --fs-2: 2rem;           /* section heading, 32px */
  --fs-3: 1.125rem;       /* everything else, 18px */
  --fs-small: .875rem;    /* footer acknowledgement, grant line and copyright only (Simon, 4 Nov) */
  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  /* side padding that lines a full-width block's content up with .wrap */
  --edge: max(var(--gutter), calc((100% - var(--max)) / 2));
}

* { box-sizing: border-box; }
/* Navy behind the page, so overscroll (iPhone bounce) matches the header and footer */
html { -webkit-text-size-adjust: 100%; background: var(--navy); }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: var(--fs-3);
  line-height: 1.6;
  color: var(--ink);
  /* Navy on body (Safari 26 tints its floating toolbar from it); the page colours are on main */
  background: var(--navy);
  /* Footer sits at the bottom of the window on short pages */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}
body > main { flex: 1 0 auto; background: var(--white); }
body.admin-bar { min-height: calc(100vh - 32px); min-height: calc(100dvh - 32px); }
@media (max-width: 782px) {
  body.admin-bar { min-height: calc(100vh - 46px); min-height: calc(100dvh - 46px); }
}
img { max-width: 100%; display: block; }
a { color: var(--navy-2); text-underline-offset: 4px; }
a:hover { color: var(--red); }
:focus-visible { outline: 3px solid var(--navy-2); outline-offset: 4px; }
.site-header :focus-visible, .site-footer :focus-visible { outline-color: var(--gold); }

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.2; color: var(--navy); margin: 0 0 16px; text-wrap: balance; }
h1 { font-size: var(--fs-1); }
h2 { font-size: var(--fs-2); }
h3, h4 { font-size: var(--fs-3); font-weight: 700; }
p { margin: 0 0 16px; }

.wrap { max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }

.skip { position: absolute; left: -999px; top: 8px; background: var(--white); padding: 8px 12px; z-index: 50; }
.skip:focus { left: 8px; }

.screen-reader-text {
  border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); height: 1px; margin: -1px;
  overflow: hidden; padding: 0; position: absolute; width: 1px; word-wrap: normal !important;
}

/* ---------- Header ---------- */
.site-header { background: var(--navy); color: var(--white); border-bottom: 4px solid var(--gold); position: relative; z-index: 30; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px 32px; min-height: 96px; flex-wrap: wrap; }
.brand { color: var(--white); text-decoration: none; display: flex; flex-direction: column; gap: 4px; line-height: 1.1; padding: 16px 0; }
.brand b { font-family: var(--serif); font-size: var(--fs-2); font-weight: 600; letter-spacing: .02em; }
.brand span { letter-spacing: .12em; text-transform: uppercase; color: var(--gold-light); }
.brand:hover { color: var(--white); }
.nav .menu { display: flex; flex-wrap: wrap; gap: 8px 32px; list-style: none; margin: 0; padding: 0; }
.nav li { position: relative; }
.nav a { display: inline-block; color: var(--white); text-decoration: none; padding: 8px 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current] { border-bottom-color: var(--gold); color: var(--white); }
.nav .menu-item-has-children > a::after { content: ""; display: inline-block; width: 6px; height: 6px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); margin: 0 0 4px 8px; }
/* Dropdowns: open on hover or keyboard focus, left-aligned under their item and below the header's gold line.
   One that would run off the screen gets .flip (assets/js/nav.js) and lines up with the item's right edge. Escape closes it. */
.nav .sub-menu { display: none; position: absolute; left: -16px; top: calc(100% + 4px); z-index: 40; min-width: 288px; list-style: none; margin: 0; padding: 8px 0; background: var(--navy); box-shadow: 0 8px 24px rgba(0,0,0,.25); }
.nav .menu-item-has-children:hover > .sub-menu, .nav .menu-item-has-children:focus-within > .sub-menu { display: block; }
.nav .menu-item-has-children.is-closed > .sub-menu { display: none; }
.nav .sub-menu.flip { left: auto; right: -16px; }
.nav .sub-menu a { display: block; padding: 8px 16px; border-bottom: 0; white-space: nowrap; }
.nav .sub-menu a:hover, .nav .sub-menu a:focus-visible { background: var(--navy-2); }
.nav .sub-menu a[aria-current] { color: var(--gold-light); }
.menu-btn { display: none; }

/* ---------- Sections: one padding everywhere ---------- */
.section { padding: var(--section) 0; }
.section-white { background: var(--white); }
.section-paper { background: var(--paper); }
.section-head { margin-bottom: 32px; }
.section-head p { color: var(--muted); margin: 0; }
.rule { width: 64px; height: 4px; background: var(--gold); border: 0; margin: 0 0 24px; }
.lead, .muted { color: var(--muted); }
.eyebrow { text-wrap: balance; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; color: var(--gold-text); margin-bottom: 8px; display: block; }
.intro-first { font-weight: 600; color: var(--navy); }

/* Page title band: tan, with the content below it on white (Simon, 4 Nov) */
.hero { background: var(--paper); }
.hero .wrap { padding-top: var(--section); padding-bottom: var(--section); }
.hero .wrap > :last-child, .section .wrap > :last-child, .entry-content > :last-child { margin-bottom: 0; }
.crumbs { color: var(--muted); margin-bottom: 16px; }
.crumbs a { color: var(--navy-2); }

/* ---------- Buttons: one style ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--navy-2); color: var(--white); text-decoration: none; padding: 16px 24px; border-radius: var(--radius);
  font-weight: 600; border: 2px solid var(--navy-2); font-size: var(--fs-3); line-height: 1.2; cursor: pointer; font-family: var(--sans);
}
.btn:hover { background: var(--navy); border-color: var(--navy); color: var(--white); }
.btn-outline { background: transparent; color: var(--navy-2); }
.btn-outline:hover { background: var(--navy-2); color: var(--white); }
.btn svg { width: 16px; height: 16px; }

/* ---------- Cards ---------- */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card {
  background: var(--white); border: 1px solid var(--line); border-top: 4px solid var(--gold); border-radius: var(--radius);
  padding: 32px; display: flex; flex-direction: column; gap: 8px; text-decoration: none; color: var(--ink);
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.section-white .card { background: var(--paper); }
a.card:hover { border-color: var(--gold); box-shadow: 0 8px 24px rgba(20,36,59,.08); transform: translateY(-2px); color: var(--ink); }
.card h2, .card h3 { margin: 0; }
.card .meta { color: var(--muted); margin: 0; }
.card .go { margin-top: auto; padding-top: 16px; font-weight: 600; color: var(--navy-2); }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #cfd6e0; padding: var(--section) 0; }
.site-footer .cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 64px; align-items: start; }
.site-footer .footer-title { font-family: var(--serif); font-size: var(--fs-3); font-weight: 700; line-height: 1.2; color: var(--white); margin: 0 0 8px; }
.site-footer p { margin: 0; }
.site-footer a { color: var(--white); }
.site-footer .ack { border-top: 1px solid rgba(255,255,255,.15); margin-top: 48px; padding-top: 32px; color: #aeb8c6; display: grid; gap: 8px; font-size: var(--fs-small); line-height: 1.5; }
.site-footer .ack .footer-widget { display: grid; gap: 8px; }
.site-footer .ack p { text-wrap: pretty; }
/* The copyright line (the strip's last paragraph) on its own line, a little apart */
.site-footer .ack .footer-widget:last-child > p:last-child { margin-top: 8px; }

/* ---------- Page content (WordPress) ----------
   Rules use :is(.entry-content, .is-root-container) so the block editor (.is-root-container, via add_editor_style)
   shows the same text, tables, buttons and images. Content runs the full content width (Simon, 4 Nov). */
:is(.entry-content, .is-root-container) h2 { margin-top: 48px; }
:is(.entry-content, .is-root-container) h3 { margin-top: 32px; }
:is(.entry-content, .is-root-container) > :is(h2, h3):first-child { margin-top: 0; }
/* A heading under a small label, or first in a column, group or card, sits close */
:is(.entry-content, .is-root-container) :is(.is-style-kentians-eyebrow + :is(h1, h2, h3), .wp-block-column > :is(h1, h2, h3):first-child, .wp-block-group > :is(h1, h2, h3):first-child) { margin-top: 0; }
:is(.entry-content, .is-root-container) ul, :is(.entry-content, .is-root-container) ol { padding-left: 24px; margin: 0 0 16px; }
:is(.entry-content, .is-root-container) li { margin-bottom: 8px; }
/* Quote block (no mockup shows one): the design's gold rule on the left, text in line with the column (10 Nov, John's stories) */
:is(.entry-content, .is-root-container) .wp-block-quote { margin: 32px 0; padding: 0 0 0 24px; border-left: 4px solid var(--gold); }
:is(.entry-content, .is-root-container) .wp-block-quote > :last-child { margin-bottom: 0; }
:is(.entry-content, .is-root-container) .wp-block-quote cite { display: block; margin-top: 8px; font-style: normal; color: var(--muted); }
/* Long web addresses written out as link text (Research, Society News) wrap instead of pushing the page sideways on a phone */
:is(.entry-content, .is-root-container) :is(p, li) { overflow-wrap: anywhere; }
:is(.entry-content, .is-root-container) a { overflow-wrap: anywhere; }
:is(.entry-content, .is-root-container) .has-text-align-center { text-align: center; }
p.is-style-kentians-lead { color: var(--muted); }
.is-style-kentians-eyebrow { text-wrap: balance; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; color: var(--gold-text); margin-bottom: 8px; }
p.is-style-kentians-intro { font-weight: 600; color: var(--navy); }
p.is-style-kentians-muted { color: var(--muted); }
hr.wp-block-separator.is-style-kentians-rule { width: 64px; height: 4px; background: var(--gold); border: 0; margin: 0 0 24px; opacity: 1; }

/* Buttons. In a page's text (the Society's pages): equal boxes in a grid, 4 across on desktop, 2 on tablets,
   1 on phones, text centred, rows from the left (Simon, 4 Nov). Outline style (the block's Styles panel) for every
   button after the first. In a full-width section (home page): paired buttons the same width, 256px. */
:is(.entry-content, .is-root-container) .wp-block-button__link {
  display: flex; align-items: center; justify-content: center; text-align: center; width: 100%; height: auto; flex: 1 1 auto; /* core sets height: 100%, which stops the stretch */
  background: var(--navy-2); color: var(--white); border: 2px solid var(--navy-2); border-radius: var(--radius);
  padding: 16px 24px; font-weight: 600; font-size: var(--fs-3); line-height: 1.2; text-decoration: none; font-family: var(--sans);
}
:is(.entry-content, .is-root-container) .wp-block-button__link:hover { background: var(--navy); border-color: var(--navy); color: var(--white); }
:is(.entry-content, .is-root-container) :is(.is-style-outline, .wp-block-button + .wp-block-button) .wp-block-button__link { background: transparent; color: var(--navy-2); }
:is(.entry-content, .is-root-container) :is(.is-style-outline, .wp-block-button + .wp-block-button) .wp-block-button__link:hover { background: var(--navy-2); color: var(--white); }
:is(.entry-content, .is-root-container) .wp-block-buttons { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 24px 0; }
/* The box (not only its wrapper) is at least 80px tall, as the mockup's .btn; the link fills the wrapper's height */
:is(.entry-content, .is-root-container) .wp-block-buttons > .wp-block-button { width: auto; margin: 0; min-height: 80px; display: flex; }
.entry-content .wp-block-buttons:first-child { margin-top: 0; }
.entry-content .wp-block-buttons:last-child { margin-bottom: 0; }
/* Mockup: 32px between the text and a row of buttons. In a column the paragraph's 16px adds to the row's 16px;
   straight in a section the two overlap, so the row asks for 32px */
.wp-block-group.is-style-kentians-section > .wp-block-buttons { margin-top: 32px; }
.entry-full .wp-block-buttons { display: grid; grid-auto-flow: column; grid-auto-columns: 256px; grid-template-columns: none; max-width: 100%; gap: 16px; margin: 16px 0 0; }
.entry-full .wp-block-buttons > .wp-block-button { min-height: 0; }

/* Tables, images, media and text */
:is(.entry-content, .is-root-container) .wp-block-table { margin: 0 0 24px; overflow-x: auto; }
:is(.entry-content, .is-root-container) .wp-block-table table { width: 100%; border-collapse: collapse; background: var(--white); border: 1px solid var(--line); }
:is(.entry-content, .is-root-container) .wp-block-table td, :is(.entry-content, .is-root-container) .wp-block-table th { border: 0; border-bottom: 1px solid var(--line); padding: 8px 16px; vertical-align: top; text-align: left; }
:is(.entry-content, .is-root-container) .wp-block-table thead { border-bottom: 0; }
:is(.entry-content, .is-root-container) .wp-block-table thead th { color: var(--navy); border-bottom: 1px solid var(--line); }
:is(.entry-content, .is-root-container) .wp-block-table tbody th { font-weight: 600; }
:is(.entry-content, .is-root-container) .wp-block-table tr:last-child td { border-bottom: 0; }
:is(.entry-content, .is-root-container) .wp-block-image { margin: 0 0 24px; }
:is(.entry-content, .is-root-container) .wp-block-image img { height: auto; border-radius: var(--radius); }
:is(.entry-content, .is-root-container) .wp-block-image figcaption { margin: 0; } /* as the mockup: straight under the photo, in the text colour */
:is(.entry-content, .is-root-container) .wp-block-media-text { margin: 0 0 24px; gap: 24px; }
:is(.entry-content, .is-root-container) .wp-block-media-text__content { padding: 0; }
:is(.entry-content, .is-root-container) .wp-block-media-text img { border-radius: var(--radius); }
:is(.entry-content, .is-root-container) .wp-block-image.alignleft { float: left; clear: left; margin: 4px 24px 12px 0; }
:is(.entry-content, .is-root-container) .wp-block-image.alignright { float: right; clear: right; margin: 4px 0 12px 24px; }
:is(.entry-content, .is-root-container) .wp-block-image.aligncenter { margin-left: auto; margin-right: auto; }
:is(.entry-content, .is-root-container) .wp-block-image.aligncenter img { margin: 0 auto; }
:is(.entry-content, .is-root-container) :is(.wp-block-table, .wp-block-buttons, .wp-block-media-text, .wp-block-heading, .wp-block-image:not(.alignleft):not(.alignright)) { clear: both; }
.entry-content::after { content: ""; display: table; clear: both; }

/* "Compact" table (Styles panel): only as wide as its text, first column bold (Who we are's membership fees) */
:is(.entry-content, .is-root-container) .wp-block-table.is-style-kentians-compact table { width: auto; min-width: 320px; }
:is(.entry-content, .is-root-container) .wp-block-table.is-style-kentians-compact :is(td, th) { padding: 12px 24px; }
:is(.entry-content, .is-root-container) .wp-block-table.is-style-kentians-compact tbody td:first-child { font-weight: 600; }

/* WordPress adds its own gap above each block in a group or column; the theme's margins set the spacing instead */
.entry-content :where(.is-layout-flow, .is-layout-constrained) > * { margin-block-start: 0; }

/* Society News: the Society's posts as a plain list (Latest Posts block), date under each title at body size */
:is(.entry-content, .is-root-container) .wp-block-latest-posts { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 16px; }
:is(.entry-content, .is-root-container) .wp-block-latest-posts li { margin: 0; }
:is(.entry-content, .is-root-container) .wp-block-latest-posts__post-date { display: block; color: var(--muted); font-size: inherit; }

/* Columns: the photo beside the text (Who we are), and the home page's two halves */
:is(.entry-content, .is-root-container) .wp-block-columns { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; align-items: stretch; margin: 0 0 24px; }
:is(.entry-content, .is-root-container) .wp-block-columns:last-child { margin-bottom: 0; }
:is(.entry-content, .is-root-container) .wp-block-columns > .wp-block-column { min-width: 0; }
:is(.entry-content, .is-root-container) .wp-block-columns > .wp-block-column > :last-child { margin-bottom: 0; }
/* "Text with side photo" columns: the text, then a 240px photo column */
:is(.entry-content, .is-root-container) .wp-block-columns.is-style-kentians-side-photo { grid-template-columns: minmax(0, 1fr) 240px; }
.wp-block-column.is-vertically-aligned-center { display: flex; flex-direction: column; justify-content: center; }
/* Photo cropped to the height of the text beside it (Design Standards) */
:is(.entry-content, .is-root-container) .wp-block-image.is-style-kentians-photo { position: relative; margin: 0; height: 100%; min-height: 320px; border: 8px solid var(--white); border-radius: var(--radius); box-shadow: 0 16px 40px rgba(20,36,59,.18); overflow: hidden; }
:is(.entry-content, .is-root-container) .wp-block-image.is-style-kentians-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 42% center; border-radius: 0; }
:is(.entry-content, .is-root-container) .is-style-kentians-side-photo .wp-block-image.is-style-kentians-photo { box-shadow: 0 8px 24px rgba(20,36,59,.08); }
:is(.entry-content, .is-root-container) .is-style-kentians-side-photo .wp-block-image.is-style-kentians-photo img { object-position: center 15%; }

/* ---------- Sections laid out in the block editor (Group block, Styles panel) ----------
   "Title band" (tan, the page heading) and "Section" groups run edge to edge; their content lines up with .wrap.
   Backgrounds alternate by themselves so neighbours are never the same: on a Full width page the title band is tan,
   then white, tan, white...; on an ordinary page (under the theme's own title band) the first section is white. */
.wp-block-group.is-style-kentians-hero,
.wp-block-group.is-style-kentians-section { padding: var(--section) var(--edge); margin: 0; }
.wp-block-group.is-style-kentians-hero { background: var(--paper); }
.wp-block-group.is-style-kentians-hero > :last-child, .wp-block-group.is-style-kentians-section > :last-child { margin-bottom: 0; }
.entry-full > .wp-block-group:nth-child(odd) { background: var(--paper); }
.entry-full > .wp-block-group:nth-child(even) { background: var(--white); }
.entry-sections > .wp-block-group:nth-child(odd) { background: var(--white); }
.entry-sections > .wp-block-group:nth-child(even) { background: var(--paper); }
.wp-block-group.is-style-kentians-hero h1 { max-width: 14ch; margin-top: 0; }
.wp-block-group.is-style-kentians-hero > .is-style-kentians-eyebrow + h1 { max-width: none; }
/* Section heading with its short line underneath */
.wp-block-group.is-style-kentians-section-head { margin: 0 0 32px; }
.wp-block-group.is-style-kentians-section-head > * { margin-top: 0; }
.wp-block-group.is-style-kentians-section-head > p { color: var(--muted); margin: 0; }
.wp-block-group.is-style-kentians-section-head > h2 { margin-bottom: 16px; }
.wp-block-group.is-style-kentians-section-head > :last-child { margin-bottom: 0; }

/* Card grids: 2 or 3 across. A short last row of three is centred. */
.wp-block-group.is-style-kentians-cards,
.wp-block-group.is-style-kentians-cards-3 { display: grid; gap: 24px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; }
.wp-block-group.is-style-kentians-cards-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.wp-block-group.is-style-kentians-cards > *, .wp-block-group.is-style-kentians-cards-3 > * { margin: 0; }
/* Cards (gold top): white on tan, tan on white. The card's last paragraph is its link; the whole card is clickable. */
.wp-block-group.is-style-kentians-card,
.wp-block-group.is-style-kentians-card-red {
  position: relative; background: var(--white); border: 1px solid var(--line); border-top: 4px solid var(--gold); border-radius: var(--radius);
  padding: 32px; display: flex; flex-direction: column; gap: 8px; color: var(--ink);
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.wp-block-group.is-style-kentians-card-red { border-top-color: var(--red); }
.wp-block-group.is-style-kentians-card > *, .wp-block-group.is-style-kentians-card-red > * { margin: 0; }
.wp-block-group.is-style-kentians-card:hover,
.wp-block-group.is-style-kentians-card-red:hover { border-color: var(--gold); box-shadow: 0 8px 24px rgba(20,36,59,.08); transform: translateY(-2px); }
.wp-block-group.is-style-kentians-card:hover { border-top-color: var(--gold); }
.wp-block-group.is-style-kentians-card-red:hover { border-top-color: var(--red); }
.wp-block-group.is-style-kentians-card :is(h2, h3),
.wp-block-group.is-style-kentians-card-red :is(h2, h3) { font-size: var(--fs-3); font-weight: 700; margin: 0; }
.wp-block-group.is-style-kentians-card > p,
.wp-block-group.is-style-kentians-card-red > p { color: var(--muted); }
.wp-block-group.is-style-kentians-card > p.is-style-kentians-eyebrow,
.wp-block-group.is-style-kentians-card-red > p.is-style-kentians-eyebrow { color: var(--gold-text); margin: 0 0 8px; }
.wp-block-group.is-style-kentians-card > p:last-child,
.wp-block-group.is-style-kentians-card-red > p:last-child { margin: auto 0 0; padding-top: 16px; font-weight: 600; }
.wp-block-group.is-style-kentians-card > p:last-child a,
.wp-block-group.is-style-kentians-card-red > p:last-child a { color: var(--navy-2); text-decoration: none; }
.wp-block-group.is-style-kentians-card > p:last-child a::after,
.wp-block-group.is-style-kentians-card-red > p:last-child a::after { content: ""; position: absolute; inset: 0; }
.wp-block-group.is-style-kentians-card:focus-within,
.wp-block-group.is-style-kentians-card-red:focus-within { outline: 3px solid var(--navy-2); outline-offset: 4px; }
.wp-block-group.is-style-kentians-card a:focus-visible,
.wp-block-group.is-style-kentians-card-red a:focus-visible { outline: 0; }

/* Linked logos ("Connect, Remember and Make a Difference"): one box split in two, each half clickable */
.wp-block-group.is-style-kentians-orgs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); margin: 0; }
.wp-block-group.is-style-kentians-org { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 16px; padding: 32px; margin: 0; }
.wp-block-group.is-style-kentians-org + .wp-block-group.is-style-kentians-org { border-left: 1px solid var(--line); }
.wp-block-group.is-style-kentians-org > * { margin: 0; }
.wp-block-group.is-style-kentians-org .wp-block-image { height: 64px; width: 100%; display: flex; align-items: center; justify-content: center; margin: 0; }
.wp-block-group.is-style-kentians-org .wp-block-image img { height: 48px; width: auto; max-width: 100%; object-fit: contain; border-radius: 0; }
.wp-block-group.is-style-kentians-org > p:first-of-type { font-weight: 600; color: var(--navy); }
.wp-block-group.is-style-kentians-org > p:last-child { font-weight: 600; }
.wp-block-group.is-style-kentians-org > p:last-child a { color: var(--navy-2); text-decoration: none; }
.wp-block-group.is-style-kentians-org > p:last-child a::after { content: ""; position: absolute; inset: 0; }
.wp-block-group.is-style-kentians-org:hover > p:last-child a { color: var(--red); }
.wp-block-group.is-style-kentians-org:focus-within { outline: 3px solid var(--navy-2); outline-offset: -4px; }
.wp-block-group.is-style-kentians-org a:focus-visible { outline: 0; }

/* People as cards (Honorary Life Members): photo (or a "Photo unavailable" line) first, then name and roles */
.wp-block-group.is-style-kentians-member { background: var(--white); border: 1px solid var(--line); border-top: 4px solid var(--gold); border-radius: var(--radius); padding: 24px; display: grid; grid-template-columns: 128px minmax(0, 1fr); grid-template-rows: auto 1fr; column-gap: 24px; align-items: start; margin: 0; }
.wp-block-group.is-style-kentians-member > * { margin: 0; grid-column: 2; }
.wp-block-group.is-style-kentians-member > :first-child { grid-column: 1; grid-row: 1 / span 2; width: 128px; aspect-ratio: 4 / 5; background: #ece6d8; border-radius: 2px; overflow: hidden; display: grid; place-items: center; margin: 0; }
.wp-block-group.is-style-kentians-member > .wp-block-image img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; border-radius: 0; }
.wp-block-group.is-style-kentians-member > p:first-child { color: var(--muted); text-align: center; padding: 8px; font-family: var(--serif); overflow-wrap: normal; }
.wp-block-group.is-style-kentians-member > :is(h2, h3) { font-size: var(--fs-3); font-weight: 700; margin: 0 0 8px; }
.wp-block-group.is-style-kentians-member > ul { list-style: none; margin: 0; padding: 0; color: var(--muted); display: grid; gap: 4px; }
.wp-block-group.is-style-kentians-member > ul li { margin: 0; }

/* Boxes on a white section take the tan, as cards do (Simon, 4 Nov) */
:is(.section-white, .entry-full > .wp-block-group:nth-child(even), .entry-sections > .wp-block-group:nth-child(odd))
  :is(.wp-block-group.is-style-kentians-card, .wp-block-group.is-style-kentians-card-red, .wp-block-group.is-style-kentians-member, .wp-block-group.is-style-kentians-orgs) { background: var(--paper); }

/* Nominal Rolls board on the home page (plugin shortcode [kentian_roll_board]): the honour-board look, navy as a small accent */
.roll-board { background: var(--navy); border-radius: var(--radius); padding: 32px; position: relative; display: flex; flex-direction: column; justify-content: center; height: 100%; }
.roll-board::before { content: ""; position: absolute; inset: 8px; border: 1px solid rgba(184,149,78,.5); border-radius: 2px; pointer-events: none; }
.roll-board .rb-title { position: relative; display: block; font-family: var(--serif); font-weight: 700; color: var(--white); text-decoration: none; text-align: center; padding-bottom: 16px; margin-bottom: 8px; border-bottom: 1px solid rgba(184,149,78,.5); }
.roll-board .rb-title:hover { color: var(--gold-light); }
.roll-board ul { position: relative; list-style: none; margin: 0; padding: 0; }
.roll-board li { margin: 0; }
.roll-board li a { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; color: var(--gold-light); text-decoration: none; text-transform: uppercase; letter-spacing: .04em; font-weight: 600; overflow-wrap: normal; }
.roll-board li a:hover { color: var(--white); }
.roll-board .yrs { color: #d9dfe8; font-weight: 400; letter-spacing: 0; white-space: nowrap; }
.roll-board :focus-visible { outline-color: var(--gold); }

/* ---------- Phone ---------- */
@media (max-width: 820px) {
  :root { --section: 64px; --fs-1: 2.25rem; --fs-2: 1.5rem; }
  .nav { display: none; }
  .site-header .wrap { min-height: 80px; display: grid; grid-template-columns: minmax(0, 1fr) auto; }
  .brand span { letter-spacing: .04em; }
  .menu-btn { display: inline-flex; background: transparent; border: 1px solid rgba(255,255,255,.5); color: var(--white); padding: 8px 16px; border-radius: 4px; font: inherit; cursor: pointer; }
  .menu-btn:hover { border-color: var(--gold); }
  /* Open menu: full width under the brand, each section's pages indented under it */
  .nav.is-open { display: block; grid-column: 1 / -1; padding-bottom: 24px; }
  .nav .menu { flex-direction: column; gap: 0; }
  .nav a { display: block; padding: 8px 0; }
  .nav .menu-item-has-children > a::after { display: none; }
  .nav .sub-menu { display: block; position: static; min-width: 0; padding: 0 0 8px 16px; background: transparent; border: 0; box-shadow: none; }
  .nav .sub-menu a { padding: 8px 0; color: var(--gold-light); white-space: normal; }
  .nav .sub-menu a:hover { background: transparent; }
  .nav .sub-menu a[aria-current] { border-bottom-color: var(--gold); }
  /* Without JavaScript the menu button can't work, so show the menu instead */
  html:not(.js) .menu-btn { display: none; }
  html:not(.js) .nav { display: block; grid-column: 1 / -1; padding-bottom: 24px; }

  .grid-2, .grid-3, .site-footer .cols { grid-template-columns: 1fr; }
  .card { padding: 24px; }
  .card .go { padding-top: 8px; }

  :is(.entry-content, .is-root-container) .wp-block-buttons { grid-template-columns: 1fr; }
  :is(.entry-content, .is-root-container) .wp-block-table.is-style-kentians-compact table { width: 100%; min-width: 0; }
  :is(.entry-content, .is-root-container) .wp-block-table.is-style-kentians-compact :is(td, th) { padding: 12px 16px; }
  :is(.entry-content, .is-root-container) .wp-block-buttons > .wp-block-button { min-height: 0; }
  .entry-full .wp-block-buttons { grid-auto-flow: row; grid-template-columns: 1fr; grid-auto-columns: auto; width: 100%; }
  :is(.entry-content, .is-root-container) .wp-block-columns,
  :is(.entry-content, .is-root-container) .wp-block-columns.is-style-kentians-side-photo { grid-template-columns: 1fr; gap: 32px; }
  :is(.entry-content, .is-root-container) .wp-block-image.is-style-kentians-photo { min-height: 0; height: auto; aspect-ratio: 3 / 2; }
  :is(.entry-content, .is-root-container) .is-style-kentians-side-photo .wp-block-image.is-style-kentians-photo { max-width: 240px; aspect-ratio: 4 / 5; }
  .wp-block-group.is-style-kentians-cards, .wp-block-group.is-style-kentians-cards-3, .wp-block-group.is-style-kentians-orgs { grid-template-columns: 1fr; }
  .wp-block-group.is-style-kentians-card, .wp-block-group.is-style-kentians-card-red, .wp-block-group.is-style-kentians-org { padding: 24px; }
  .wp-block-group.is-style-kentians-card > p:last-child, .wp-block-group.is-style-kentians-card-red > p:last-child { padding-top: 8px; }
  .wp-block-group.is-style-kentians-org + .wp-block-group.is-style-kentians-org { border-left: 0; border-top: 1px solid var(--line); }
  .wp-block-group.is-style-kentians-member { grid-template-columns: 96px minmax(0, 1fr); column-gap: 16px; }
  .wp-block-group.is-style-kentians-member > :first-child { width: 96px; }
  /* "unavailable" is 92px wide: no side padding in the 96px box, or its last letter is cut off (it is in the mockup too) */
  .wp-block-group.is-style-kentians-member > p:first-child { padding: 8px 0; }
  .roll-board { padding: 24px; }
  .roll-board li a { text-transform: none; letter-spacing: 0; }
}
@media (min-width: 821px) {
  /* Menu items fill the header's height, so a dropdown starts under the header's gold line */
  .site-header .wrap { align-items: stretch; }
  .brand { align-self: center; }
  .nav, .nav .menu { display: flex; }
  .nav .menu { align-items: stretch; }
  .nav .menu > li { display: flex; align-items: center; }
}
@media (min-width: 1061px) {
  .grid-3 > :last-child:nth-child(3n+1),
  .wp-block-group.is-style-kentians-cards-3 > :last-child:nth-child(3n+1) { grid-column: 2; }
}
@media (min-width: 821px) and (max-width: 1060px) {
  :is(.entry-content, .is-root-container) .wp-block-buttons { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3, .wp-block-group.is-style-kentians-cards-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* The last block in a section has no bottom margin, whatever block it is (DESIGN-DECISIONS.md). At the end of the file and
   with :last-child twice so no block's own margin rule (Quote, Image, Table, List, Group ...) can win over it. */
:is(.entry-content, .is-root-container) > :last-child:last-child,
:is(.entry-content, .is-root-container) .wp-block-group > :last-child:last-child { margin-bottom: 0; }
/* A list that is the last block: its last item keeps no 8px item gap either, so the section still ends 96/64px above the
   next one (Financial Donations, 12 Nov 2026). */
:is(.entry-content, .is-root-container) > :is(ul, ol):last-child:last-child > li:last-child,
:is(.entry-content, .is-root-container) .wp-block-group > :is(ul, ol):last-child:last-child > li:last-child { margin-bottom: 0; }
