/* IGMMZ public site. Look taken from the agreed mock-up (mockup/index.html): charcoal and molten orange from the
   logo, Source Serif 4 for headings, Inter for text. Fonts are kept on this site (fonts/, SIL Open Font Licence). */
@font-face { font-family: Inter; font-weight: 400; font-display: swap; src: url(/fonts/inter-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: Inter; font-weight: 600; font-display: swap; src: url(/fonts/inter-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Source Serif 4"; font-weight: 700; font-display: swap; src: url(/fonts/source-serif-4-latin-700-normal.woff2) format("woff2"); }

:root {
  --bg: #fbfaf7; --surface: #ffffff; --ink: #1d2320; --muted: #5b655f; --line: #e4e1d9;
  --green: #24282c; --on-green: #ffffff; --green-soft: #eeece8;   /* primary: logo charcoal */
  --copper: #b8541a; --copper-soft: #fbeee4;                       /* accent: logo molten orange */
  --draft: #fff4c2; --radius: 10px;
}
/* Dark colours: follow the device ("System", the default), or the visitor's choice in the footer (data-theme). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141618; --surface: #1d2023; --ink: #eceae6; --muted: #a8a49d;
    --line: #30343a; --green: #e6e2da; --on-green: #141618; --green-soft: #2a2e33;
    --copper: #f0954f; --copper-soft: #33241a; --draft: #3a3315;
  }
}
:root[data-theme="dark"] {
  --bg: #141618; --surface: #1d2023; --ink: #eceae6; --muted: #a8a49d;
  --line: #30343a; --green: #e6e2da; --on-green: #141618; --green-soft: #2a2e33;
  --copper: #f0954f; --copper-soft: #33241a; --draft: #3a3315;
}
:root { color-scheme: light dark; }
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 16px/1.6 Inter, system-ui, sans-serif; }
h1, h2, h3 { font-family: "Source Serif 4", Georgia, serif; font-weight: 700; line-height: 1.25; margin: 0 0 .5em; }
h1 { font-size: clamp(1.8rem, 4.5vw, 2.8rem); }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); }
h3, .h3 { font-size: 1.15rem; }
.card h2 { font-size: 1.25rem; }
.card h2.h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
b, strong, th { font-weight: 600; }
a { color: var(--green); }
:focus-visible { outline: 3px solid var(--copper); outline-offset: 2px; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 720px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; z-index: 20; background: var(--surface); padding: 8px 12px; border-radius: 6px; }

/* Shown until the Executive approves the site; the page checks list it with the placeholders. */
.draft-bar { background: var(--draft); font-size: .85rem; text-align: center; padding: 6px 16px; }

header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.head { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; position: relative; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.logo { width: 54px; height: 54px; object-fit: contain; background: #fff; border-radius: 50%; padding: 3px; }
.brand b { display: block; font-family: "Source Serif 4", Georgia, serif; font-weight: 700; font-size: 1.15rem; }
.brand small { display: block; color: var(--muted); font-size: .72rem; line-height: 1.3; max-width: 230px; }
nav ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; flex-wrap: wrap; }
nav a { display: block; padding: 8px 9px; border-radius: 6px; text-decoration: none; color: var(--ink); font-size: .9rem; white-space: nowrap; }
nav a:hover { background: var(--green-soft); }
nav a[aria-current="page"] { color: var(--green); font-weight: 600; background: var(--green-soft); }
.menu-btn { display: none; background: none; border: 1px solid var(--line); border-radius: 6px; padding: 8px 12px; color: var(--ink); font: inherit; cursor: pointer; }
@media (max-width: 900px) {
  /* Without JavaScript the menu simply stays open under the logo; with it, the Menu button opens and closes it. */
  .head { flex-wrap: wrap; padding-bottom: 8px; }
  nav { width: 100%; }
  .js .head { flex-wrap: nowrap; padding-bottom: 0; }
  .js .menu-btn { display: block; }
  .js nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--surface); border-bottom: 1px solid var(--line); }
  .js nav.open { display: block; }
  .js nav ul { flex-direction: column; padding: 8px 16px 16px; }
}

main { display: block; padding: 40px 0 64px; }
main.home { padding-top: 0; }

.hero { background: linear-gradient(135deg, #2b3035 0%, #15181b 100%); color: #fff; padding: 56px 0; }
.hero-inner { display: flex; align-items: center; gap: 32px; }
.hero-logo { width: 230px; height: 230px; object-fit: contain; flex-shrink: 0; background: #fff; border-radius: 50%; padding: 18px; }
@media (max-width: 720px) { .hero-logo { display: none; } }
.hero p { max-width: 640px; font-size: 1.1rem; opacity: .92; }
.hero .kicker { text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; color: #f2c9a6; margin-bottom: .6em; }

.btn { display: inline-block; padding: 11px 20px; border-radius: 8px; text-decoration: none; border: 0; cursor: pointer; font: inherit; font-weight: 600; }
.btn-copper { background: var(--copper); color: #fff; }
.btn-ghost { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.5); }
.btn-green { background: var(--green); color: var(--on-green); }
.row { display: flex; gap: 12px; flex-wrap: wrap; }

.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.card > :last-child { margin-bottom: 0; }
a.card { display: block; text-decoration: none; color: inherit; }
a.card:hover { border-color: var(--copper); }
.card .num { color: var(--copper); font-weight: 600; font-size: .85rem; }
.card .tag + h2, .card .tag + h3 { margin-top: 8px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.tag { font-family: Inter, system-ui, sans-serif; display: inline-block; font-size: .75rem; padding: 2px 8px; border-radius: 99px; background: var(--copper-soft); color: var(--copper); font-weight: 600; }
/* "To confirm": every placeholder carries this class, and the page checks list them all before go-live (Q35). */
.tbc { background: var(--draft); padding: 0 4px; border-radius: 3px; }
.block { margin-top: 40px; }
/* Jump links (#guide, #join) stop below the sticky header. */
[id] { scroll-margin-top: 88px; }
.block-sm { margin-top: 12px; }
.price { font-size: 1.6rem; color: var(--copper); font-weight: 600; }
ol.steps { padding-left: 1.2em; margin: 0; }

table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; font-size: .95rem; }
th { background: var(--green-soft); }
.table-scroll { overflow-x: auto; }

.statement { border-left: 4px solid var(--copper); }
.date { font-size: .85rem; color: var(--muted); }
.statement ul { padding-left: 1.2em; }
.signed { color: var(--muted); }
.notice { background: var(--green-soft); border-radius: var(--radius); padding: 16px 18px; }
.notice > :last-child { margin-bottom: 0; }

.quiz { margin-top: 40px; }
.quiz .opts { display: grid; gap: 10px; margin: 14px 0; }
.quiz .opt { text-align: left; background: var(--bg); color: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; font: inherit; cursor: pointer; }
.quiz .opt:hover, .quiz .opt:focus-visible { border-color: var(--copper); background: var(--copper-soft); outline: none; }
.quiz .step { font-size: .8rem; color: var(--muted); }
.quiz .q { font-weight: 600; }
.quiz .result { border-left: 4px solid var(--copper); padding-left: 14px; }
.quiz .linkbtn { background: none; border: 0; color: var(--green); text-decoration: underline; font: inherit; cursor: pointer; padding: 0; margin: 12px 16px 0 0; }

footer { background: #15181b; color: #cfd8d2; padding: 32px 0; font-size: .9rem; }
footer a { color: #f2c9a6; }
footer .muted { color: #9fb0a6; }
footer .tbc { background: #fff4c2; color: #1d2320; }

/* Theme button in the header (System -> Light -> Dark), shown only when JavaScript works (it needs it). */
.theme-btn { display: none; background: none; border: 1px solid var(--line); border-radius: 6px; width: 40px; height: 40px; padding: 0; color: var(--ink); cursor: pointer; flex-shrink: 0; }
.js .theme-btn { display: inline-flex; align-items: center; justify-content: center; }
.theme-btn:hover { background: var(--green-soft); }
.theme-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; display: none; }
.theme-btn[data-mode="system"] .i-system, .theme-btn[data-mode="light"] .i-light, .theme-btn[data-mode="dark"] .i-dark { display: block; }
@media (max-width: 900px) { .js .theme-btn { margin-left: auto; } }

/* Page heading band: title and introduction across the full width, with a side panel on wide screens. */
main > .page-head:first-child { margin-top: -40px; }
.page-head { background: var(--green-soft); border-bottom: 1px solid var(--line); padding: 40px 0 32px; margin-bottom: 40px; }
.page-head p { max-width: 720px; }
.page-head-inner > div > :last-child { margin-bottom: 0; }
@media (min-width: 860px) { .page-head-inner.has-aside { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; align-items: start; } }
@media (max-width: 859px) { .at-a-glance { margin-top: 24px; } }
.facts { margin: 0 0 16px; display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: .92rem; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.jump { margin: 0; padding-left: 1.1em; }
.jump li { margin: 4px 0; }
/* Single statements and news items: a centred reading column. */
.article { max-width: 760px; margin-left: auto; margin-right: auto; }

/* Dark theme: the hero and footer are dark in both themes; give them a little separation from the dark page. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .hero { background: linear-gradient(135deg, #3a2a1f 0%, #141618 100%); }
  :root:not([data-theme="light"]) footer { border-top: 1px solid var(--line); }
}
:root[data-theme="dark"] .hero { background: linear-gradient(135deg, #3a2a1f 0%, #141618 100%); }
:root[data-theme="dark"] footer { border-top: 1px solid var(--line); }

/* Membership: the grades ladder (Student to Fellow), four across on wide screens, stacked on phones. */
.ladder { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.ladder .card { position: relative; }
.ladder h3 .tag { vertical-align: middle; margin-left: 4px; }
h4 { font-family: "Source Serif 4", Georgia, serif; font-weight: 700; font-size: 1.05rem; margin: 0 0 .4em; }

/* Membership: fee table inside the subscription card. */
.card table.fees { margin: 4px 0 14px; }
.card table.fees td:last-child { font-weight: 600; }
.fee-notes { margin: 0; padding-left: 1.2em; color: var(--muted); font-size: .92rem; }
.fee-notes li { margin: 4px 0; }

/* About: committee member lists. */
.names { margin: 8px 0 0; padding-left: 1.1em; font-size: .92rem; }
.names li { margin: 2px 0; }
