/* member.online — the Portico brand. Monochrome onyx and grey on paper, one signal blue, Geist type, hairlines over shadows.
   A group's pages carry data-theme (chamber, market, alumni, faith, cooperative, club), which sets its type, shapes and
   pattern; --brand and --accent come from the group's own colours and are used sparingly. Mirrors the design system tokens. */
:root {
  --paper: #F6F6F7;
  --surface: #FFFFFF;
  --sunk: #EFEFF1;
  --line: #E4E4E7;
  --line-2: #D4D4D8;
  --line-strong: #8E8E97;
  --ink: #0A0A0B;
  --ink-2: #5C5C66;
  --ink-3: #6B6B75;
  --primary: #0A0A0B;
  --primary-strong: #2A2A2E;
  --primary-soft: #EDEDEF;
  --signal: #3651D4;
  --signal-soft: #E8ECFB;
  --ok: #17784A; --ok-soft: #E3F2EA;
  --warn: #95590A; --warn-soft: #F8EEDD;
  --bad: #B3261E; --bad-soft: #FAE6E4;
  --onyx: #0A0A0B; --onyx-2: #141416; --onyx-3: #1F1F23; --onyx-line: #26262A;
  /* older names kept so existing views keep working */
  --obsidian: var(--onyx); --sapphire: var(--signal); --sapphire-soft: var(--signal-soft); --gold: #D4D4D8; --gold-soft: var(--primary-soft); --porcelain: var(--paper);
  --brand: var(--onyx);
  --accent: var(--signal);
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(10,10,11,.04), 0 12px 32px -18px rgba(10,10,11,.22);
  --display: 'Geist', 'Inter Tight', system-ui, sans-serif;
  --sans: 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', ui-monospace, Menlo, monospace;
  /* theme (overridden by data-theme) */
  --t-font: var(--display); --t-weight: 600; --t-track: -.03em; --t-case: none;
  --t-ground: var(--paper); --t-ink: var(--ink); --t-muted: var(--ink-2);
  --t-radius: 10px; --t-card: 14px; --t-logo: 12px; --t-photo: 50%;
  --t-hero: var(--t-ground); --t-bar: transparent; --t-bar-h: 0px;
  --serif: var(--t-font);
}
/* every theme starts from these, so a nested theme (the picker swatches) never inherits the page theme */
[data-theme] { --t-hero: var(--t-ground); --t-bar: transparent; --t-bar-h: 0px; --t-case: none; }
[data-theme="chamber"] { --t-font: 'Libre Caslon Text', Georgia, serif; --t-weight: 400; --t-track: -.02em; --t-ground: #F3F3F1; --t-ink: #14161A; --t-muted: #5A5D64; --t-radius: 4px; --t-card: 6px; --t-logo: 4px; --t-photo: 4px;
  --t-hero: linear-gradient(#14161A, #14161A) 20px 100% / calc(100% - 40px) 1px no-repeat, #F3F3F1; }
[data-theme="market"] { --t-font: 'Archivo', 'Geist', sans-serif; --t-weight: 800; --t-track: -.03em; --t-case: uppercase; --t-ground: #F2F2F2; --t-ink: #0B0B0C; --t-muted: #565659; --t-radius: 2px; --t-card: 2px; --t-logo: 2px; --t-photo: 2px;
  --t-bar: repeating-linear-gradient(90deg, #0B0B0C 0 22px, #F2F2F2 22px 44px); --t-bar-h: 6px; }
[data-theme="alumni"] { --t-font: 'Playfair Display', Georgia, serif; --t-weight: 700; --t-track: -.02em; --t-ground: #F4F5F7; --t-ink: #1A1C22; --t-muted: #5A5D68; --t-radius: 999px; --t-card: 14px; --t-logo: 999px; --t-photo: 999px 999px 14px 14px; }
[data-theme="faith"] { --t-font: 'Cormorant Garamond', Georgia, serif; --t-weight: 600; --t-track: -.01em; --t-ground: #F6F5F7; --t-ink: #22212A; --t-muted: #5F5C69; --t-radius: 999px; --t-card: 18px; --t-logo: 26px 26px 10px 10px; --t-photo: 999px 999px 18px 18px;
  --t-hero: radial-gradient(60% 90% at 85% 0%, #ECEAF0, #F6F5F7); }
[data-theme="cooperative"] { --t-font: 'Bitter', Georgia, serif; --t-weight: 700; --t-track: -.02em; --t-ground: #F3F4F1; --t-ink: #1C1E1A; --t-muted: #5A5E55; --t-radius: 8px; --t-card: 10px; --t-logo: 8px; --t-photo: 10px;
  --t-hero: repeating-linear-gradient(0deg, transparent 0 11px, rgba(28,30,26,.06) 11px 12px), #F3F4F1; }
[data-theme="club"] { --t-font: 'Oswald', 'Arial Narrow', sans-serif; --t-weight: 600; --t-track: 0; --t-case: uppercase; --t-ground: #F5F5F5; --t-ink: #111111; --t-muted: #59595D; --t-radius: 999px; --t-card: 16px; --t-logo: 50%; --t-photo: 50%;
  --t-hero: linear-gradient(115deg, #F5F5F5 0 62%, #EBEBEB 62%); }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--sans); font-size: 15px; line-height: 1.55; color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; }
a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--ink); }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.15; margin: 0 0 .5em; color: var(--ink); }
h1 { font-size: clamp(1.75rem, 3.2vw, 2.25rem); letter-spacing: -.03em; }
h2 { font-size: 1.35rem; letter-spacing: -.02em; }
h3 { font-size: 1.02rem; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }
.mono { font-family: var(--mono); font-size: .92em; }
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); font-size: .86rem; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 560px; margin: 0 auto; padding: 0 16px; }
.stack > * + * { margin-top: 16px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .g3, .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .g2, .g3, .g4 { grid-template-columns: 1fr; } .wrap { padding: 0 16px; } }

/* Top bar: paper, a hairline, the Portico mark */
.top { background: rgba(246,246,247,.86); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); color: var(--ink); position: sticky; top: 0; z-index: 20; border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 18px; height: 60px; max-width: none; }
.brandmark { display: flex; align-items: center; gap: 10px; color: var(--ink); font: 600 15px var(--display); letter-spacing: -.02em; text-decoration: none; }
.brandmark .portico { width: 24px; height: 24px; }
.top nav { margin-left: auto; display: flex; gap: 4px; align-items: center; }
.top nav a, .top nav button { color: var(--ink-2); font: 500 14px var(--sans); padding: 8px 12px; white-space: nowrap; border-radius: 9px; background: none; border: 0; cursor: pointer; text-decoration: none; }
.top nav a:hover, .top nav button:hover { background: var(--primary-soft); color: var(--ink); }
.top nav .cta { background: var(--primary); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.12); }
.top nav .cta:hover { background: var(--primary-strong); color: #fff; }
.top nav a[aria-current="page"] { color: var(--ink); background: var(--primary-soft); }
.top nav .nav-form { display: inline; margin: 0; }
.top nav .menu-sm { display: none; position: relative; }
.top nav .menu-sm summary { list-style: none; cursor: pointer; font: 600 14px var(--sans); color: var(--ink); padding: 9px 14px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.top nav .menu-sm summary::-webkit-details-marker { display: none; }
.top nav .menu-sm[open] summary { background: var(--primary-soft); }
.top nav .menu-sm-list { position: absolute; right: 0; top: calc(100% + 8px); min-width: 210px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(10,10,11,.14); padding: 6px; display: flex; flex-direction: column; z-index: 30; }
.top nav .menu-sm-list a, .top nav .menu-sm-list button { display: block; width: 100%; text-align: left; padding: 12px 14px; font-size: 15px; }
.top nav .menu-sm-list form { margin: 0; border-top: 1px solid var(--line); margin-top: 4px; padding-top: 4px; }
@media (max-width: 620px) { .top nav .hide-sm { display: none; } .top nav .menu-sm { display: block; } }

/* Buttons and inputs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: 500 14px var(--sans); letter-spacing: -.005em; cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .15s ease, border-color .15s ease, transform .1s ease; }
.btn:hover { background: var(--primary-soft); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.12); }
.btn.primary:hover { background: var(--primary-strong); border-color: var(--primary-strong); }
.btn.gold { background: var(--t-ink); border-color: var(--t-ink); color: #fff; border-radius: var(--t-radius); }
.btn.gold:hover { background: var(--primary-strong); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink-2); padding-left: 8px; padding-right: 8px; }
.btn.ghost:hover { color: var(--ink); background: var(--primary-soft); }
.btn.danger { color: var(--bad); }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
label { display: block; font-weight: 500; font-size: 13px; color: var(--ink); margin-bottom: 6px; }
.field { margin-bottom: 16px; }
.hint { font-weight: 400; color: var(--ink-3); font-size: 12px; margin-top: 5px; }
input:not([type]), input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number], input[type=date], input[type=datetime-local], input[type=url], input[type=search], select, textarea {
  width: 100%; height: 40px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: #fff; font: 400 15px var(--sans); color: var(--ink);
}
textarea { height: auto; min-height: 110px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
input::placeholder, textarea::placeholder { color: var(--ink-3); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--signal); outline-offset: 1px; border-color: var(--ink); }
input[type=color] { width: 48px; height: 36px; border: 1px solid var(--line-strong); border-radius: 8px; padding: 2px; background: #fff; }
.check { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; font-size: 14px; color: var(--ink); }
.check input { margin-top: 4px; accent-color: var(--ink); }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px 16px; }

/* Cards and panels: separated by line, not shadow */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card.flat { box-shadow: none; }
.card h2:first-child, .card h3:first-child { margin-top: 0; }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.panel-head h2, .panel-head h3 { margin: 0; }
.eyebrow { font: 500 11px var(--sans); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); }
.stat { padding: 18px 20px; }
.stat .n { font: 600 1.65rem var(--display); letter-spacing: -.03em; color: var(--ink); }
.stat .l { color: var(--ink-3); font-size: 12px; }
.empty { padding: 28px; text-align: center; color: var(--ink-3); border: 1px dashed var(--line-2); border-radius: var(--radius); background: var(--surface); }

/* Messages */
.flash { padding: 12px 16px; border-radius: 10px; margin-bottom: 18px; font-weight: 500; font-size: 14px; }
.flash.ok { background: var(--ok-soft); color: var(--ok); }
.flash.err { background: var(--bad-soft); color: var(--bad); }
.flash.info { background: var(--signal-soft); color: var(--signal); }

/* Status badges: a dot and a word, never colour alone */
.badge { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 6px; font: 500 12px var(--sans); background: var(--sunk); color: var(--ink-2); white-space: nowrap; vertical-align: middle; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.paid, .badge.active, .badge.released, .badge.closed { background: var(--ok-soft); color: var(--ok); }
.badge.overdue, .badge.rejected, .badge.suspended, .badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.pending, .badge.part_paid, .badge.review, .badge.invited, .badge.open, .badge.in_progress { background: var(--warn-soft); color: var(--warn); }
.badge.exempt, .badge.waived, .badge.free, .badge.draft { background: var(--signal-soft); color: var(--signal); }
.badge.gold { background: var(--primary-soft); color: var(--ink); }
.badge.done, .badge.repaid { background: var(--ok-soft); color: var(--ok); }
.badge.delayed { background: var(--bad-soft); color: var(--bad); }
.badge.planned { background: var(--signal-soft); color: var(--signal); }
.badge.cancelled { background: var(--sunk); color: var(--ink-3); text-decoration: line-through; }

/* Tables */
.table-wrap { position: relative; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font: 500 11px var(--sans); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--paper); white-space: nowrap; }
td { padding: 12px 14px; border-bottom: 1px solid #F0F0F2; vertical-align: top; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-family: var(--mono); font-size: 13px; white-space: nowrap; }
tr.dim td { color: var(--ink-3); }

/* Officers' console: onyx sidebar */
.console { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: calc(100vh - 60px); }
.side { background: var(--onyx); color: #A1A1AA; padding: 20px 14px; position: sticky; top: 60px; height: calc(100vh - 60px); overflow-y: auto; }
.side .g-id { display: flex; gap: 10px; align-items: center; padding: 0 6px 18px; margin-bottom: 8px; border-bottom: 1px solid var(--onyx-line); }
.side .g-id b { color: #F4F4F5; font-family: var(--t-font); font-weight: var(--t-weight); text-transform: var(--t-case); font-size: 15px; line-height: 1.25; letter-spacing: -.01em; }
.side .g-id .logo { background: #F4F4F5; color: var(--onyx); width: 34px; height: 34px; }
.side a { display: flex; gap: 10px; align-items: center; color: #A1A1AA; padding: 8px 10px; border-radius: 8px; font-size: 14px; margin-bottom: 1px; text-decoration: none; }
.side a:hover { background: var(--onyx-3); color: #F4F4F5; }
.side a.on { background: var(--onyx-3); color: #F4F4F5; }
.side a.on svg { color: #8CA2FF; opacity: 1; }
.side .sec { font: 500 10px var(--sans); letter-spacing: .1em; text-transform: uppercase; color: #6A6A73; margin: 18px 10px 6px; }
.side svg { width: 16px; height: 16px; flex: none; opacity: .8; }
.main { padding: 32px 40px 64px; min-width: 0; }
.main > h1 { margin-bottom: 4px; }
.sub { color: var(--ink-2); margin-bottom: 24px; }
@media (max-width: 900px) {
  .console { grid-template-columns: 1fr; }
  .side { position: static; height: auto; display: flex; gap: 4px; overflow-x: auto; padding: 10px; }
  .side .g-id, .side .sec { display: none; }
  .side a { white-space: nowrap; margin: 0; }
  .main { padding: 20px 16px 50px; }
}

/* Logo marks: the group's own, shaped by its theme */
.logo { width: 44px; height: 44px; border-radius: var(--t-logo); background: var(--brand); color: #fff; display: grid; place-items: center; font: 700 13px var(--sans); letter-spacing: .02em; overflow: hidden; flex: none; }
.logo img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.logo.lg { width: 84px; height: 84px; font-size: 1.4rem; }
.avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--primary-soft); color: var(--ink-2); display: grid; place-items: center; font-weight: 600; overflow: hidden; flex: none; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.lg { width: 96px; height: 96px; font-size: 1.6rem; }
.avatar.xl { width: 128px; height: 128px; font-size: 2rem; }

/* Platform home */
.hero { background: var(--paper); color: var(--ink); padding: 104px 0 72px; position: relative; overflow: hidden; text-align: center; }
.hero .wrap { display: flex; flex-direction: column; align-items: center; }
.hero h1 { color: var(--ink); font-size: clamp(2.6rem, 6.6vw, 4.8rem); line-height: 1; letter-spacing: -.045em; max-width: 900px; margin: 0 0 24px; }
.hero h1 em { font-style: normal; color: var(--ink-3); }
.hero p.lead { font-size: 18px; line-height: 28px; max-width: 600px; color: var(--ink-2); }
.hero .arch { position: absolute; left: 50%; bottom: -240px; width: 720px; transform: translateX(-50%); opacity: .05; pointer-events: none; }
.hero .pill { display: inline-flex; align-items: center; gap: 8px; min-height: 30px; max-width: 100%; padding: 6px 14px 6px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 13px; line-height: 18px; color: var(--ink-2); margin-bottom: 26px; text-decoration: none; text-align: left; }
.hero .pill i { flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 0 3px rgba(54,81,212,.18); }
@media (max-width: 640px) {
  .hero { padding: 48px 0 56px; }
  .hero .pill { padding: 10px 16px 10px 14px; gap: 10px; border-radius: 16px; margin-bottom: 22px; font-size: 13.5px; line-height: 19px; }
  .hero h1 { font-size: 2.5rem; }
  .hero p.lead { font-size: 17px; line-height: 26px; }
}
.hero .btn { height: 48px; padding: 0 22px; border-radius: 12px; font-size: 15px; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.features .feature { background: var(--surface); border: 0; border-radius: 0; }
.feature { padding: 26px; }
.feature .ic { width: 34px; height: 34px; border-radius: 10px; background: var(--paper); border: 1px solid var(--line); color: var(--ink); display: grid; place-items: center; margin-bottom: 14px; }
.feature .ic svg { width: 16px; height: 16px; }
.gcard { display: flex; gap: 14px; align-items: center; padding: 16px; color: var(--ink); text-decoration: none; }
.gcard:hover { border-color: var(--line-strong); }

/* Group portal: the theme's ground, type and pattern */
.portal-bar { height: var(--t-bar-h); background: var(--t-bar); }
.portal-hero { background: var(--t-hero); color: var(--t-ink); padding: 64px 0 56px; position: relative; }
.portal-hero h1 { color: var(--t-ink); margin: 0; font-family: var(--t-font); font-weight: var(--t-weight); letter-spacing: var(--t-track); text-transform: var(--t-case); font-size: clamp(2.2rem, 5.4vw, 4.2rem); line-height: 1.02; }
.portal-hero .rule { width: 72px; height: 3px; border-radius: 2px; background: var(--accent); margin: 18px 0 14px; }
.portal-hero .tag { color: var(--t-muted); font-size: 18px; line-height: 28px; max-width: 620px; }
.portal-hero .meta { display: flex; gap: 18px; flex-wrap: wrap; color: var(--t-muted); font-size: 14px; margin-top: 14px; }
.portal-hero .meta b { color: var(--t-ink); font-family: var(--mono); font-weight: 500; }
.portal-hero .meta a { color: var(--t-muted); }
.portal-hero .eyebrow { display: flex; align-items: center; gap: 8px; color: var(--t-muted); }
.portal-hero .eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.portal-hero .btn { border-radius: var(--t-radius); }
[data-theme] h2.t, [data-theme] .t-font { font-family: var(--t-font); font-weight: var(--t-weight); letter-spacing: var(--t-track); text-transform: var(--t-case); }
.exec { text-align: left; padding: 0; border: 0; background: none; }
.exec .avatar { width: 100%; height: auto; aspect-ratio: 4 / 5; border-radius: var(--t-photo); margin: 0 0 12px; font-family: var(--t-font); font-size: 2.4rem; background: linear-gradient(160deg, #E4E4E7, #CFCFD4); color: var(--line-strong); }
.exec .office { font: 400 13px var(--sans); color: var(--t-muted); }
.exec .name { font-family: var(--sans); font-weight: 600; font-size: 16px; letter-spacing: -.01em; margin-top: 0; }
.prose { white-space: pre-line; }
.post { overflow: hidden; padding: 0; border-radius: var(--t-card); }
.post .img { aspect-ratio: 16/8; background: var(--sunk) center/cover; }
.post .body { padding: 18px 20px; }
.timeline { border-left: 1px solid var(--line-2); padding-left: 18px; }
.timeline .t { position: relative; padding-bottom: 14px; }
.timeline .t::before { content: ''; position: absolute; left: -22px; top: 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--ink); box-shadow: 0 0 0 3px var(--paper); }
.datebox { width: 56px; text-align: center; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; flex: none; background: #fff; }
.datebox .m { background: var(--ink); color: #fff; font: 600 10px var(--sans); text-transform: uppercase; letter-spacing: .1em; padding: 3px 0; }
.datebox .d { font: 600 1.35rem var(--display); letter-spacing: -.02em; padding: 4px 0; }

/* Member console header: the group's theme in a slim band */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 24px; overflow-x: auto; }
.tabs a { padding: 12px 12px; color: var(--ink-2); font-weight: 500; font-size: 14px; border-bottom: 2px solid transparent; white-space: nowrap; text-decoration: none; }
.tabs a:hover { color: var(--ink); }
.tabs a.on { color: var(--ink); border-bottom-color: var(--ink); }
.mhead { background: var(--t-ground); border-bottom: 1px solid var(--line); padding: 24px 0 0; }
.mhead h2 { font-family: var(--t-font); font-weight: var(--t-weight); letter-spacing: var(--t-track); text-transform: var(--t-case); font-size: 1.6rem; }

/* Member card: matte onyx, fine engraving, the group's accent as one rule */
.idcard { width: 100%; max-width: 430px; aspect-ratio: 1.586; border-radius: 18px; padding: 20px 22px; color: #F4F4F5; position: relative; overflow: hidden;
  background: var(--onyx-2); box-shadow: 0 30px 60px -24px rgba(10,10,11,.55), inset 0 1px 0 rgba(255,255,255,.08), inset 0 0 0 1px var(--onyx-line); }
.idcard::before { content: ""; position: absolute; inset: 0; opacity: .6; pointer-events: none;
  background: repeating-linear-gradient(115deg, rgba(255,255,255,.03) 0 1px, transparent 1px 7px), radial-gradient(120% 90% at 100% 0%, rgba(255,255,255,.08), transparent 60%); }
.idcard .gl { position: absolute; inset: 0; opacity: .06; pointer-events: none; }
.idcard .head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; position: relative; }
.idcard .head::after { content: ""; position: absolute; left: 0; top: calc(100% + 10px); width: 28px; height: 2px; border-radius: 2px; background: var(--accent); }
.idcard .gname { font-family: var(--t-font); font-weight: var(--t-weight); text-transform: var(--t-case); font-size: 15px; color: #F4F4F5; max-width: 72%; line-height: 1.2; margin-top: 4px; }
.idcard .kind { font: 500 10px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: #8B8B94; }
.idcard .bodyc { display: flex; gap: 14px; align-items: flex-end; position: absolute; left: 22px; right: 22px; bottom: 18px; }
.idcard .ph { width: 64px; height: 76px; border-radius: 32px 32px 8px 8px; background: var(--onyx-3) center/cover; border: 1px solid rgba(255,255,255,.12); flex: none; display: grid; place-items: center; font: 600 1.3rem var(--display); color: #A1A1AA; }
.idcard .who { flex: 1; min-width: 0; }
.idcard .nm { font: 600 17px var(--display); letter-spacing: -.02em; color: #fff; line-height: 1.2; }
.idcard .no { font: 500 13px var(--mono); color: #D4D4D8; letter-spacing: .05em; margin-top: 4px; }
.idcard .small { font: 500 10px var(--mono); color: #8B8B94; margin-top: 4px; letter-spacing: .08em; }
.idcard .qr { width: 74px; height: 74px; flex: none; padding: 6px; background: #F4F4F5; border-radius: 8px; }
.idcard .qr img { width: 100%; height: 100%; }
.idcard .chip { width: 30px; height: 30px; border-radius: var(--t-logo); background: #F4F4F5; opacity: .9; }

/* Minutes editor */
.editor-bar { display: flex; gap: 2px; flex-wrap: wrap; padding: 6px; border: 1px solid var(--line); border-bottom: 0; border-radius: 12px 12px 0 0; background: var(--paper); position: sticky; top: 60px; z-index: 5; }
.editor-bar button { border: 1px solid transparent; background: none; padding: 6px 10px; border-radius: 7px; font: 500 13px var(--sans); color: var(--ink-2); cursor: pointer; }
.editor-bar button:hover { background: #fff; border-color: var(--line); color: var(--ink); }
.editor-bar .sep { width: 1px; background: var(--line); margin: 4px; }
.doc { background: #fff; border: 1px solid var(--line); border-radius: 0 0 12px 12px; padding: 48px clamp(18px, 6vw, 72px); min-height: 520px; font: 400 16px/1.7 var(--sans); }
.doc:focus { outline: none; box-shadow: inset 0 0 0 2px rgba(54,81,212,.2); }
.doc h2 { font-size: 1.5rem; margin-top: 0; } .doc h3 { font-size: 1.12rem; margin-top: 1.4em; }
.doc table { border: 1px solid var(--line); } .doc td, .doc th { border: 1px solid var(--line); }
.doc[contenteditable=false] { background: #FCFCFC; }
.paper { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 44px clamp(18px, 6vw, 72px); font: 400 16px/1.7 var(--sans); }
.savestate { font-size: 12px; color: var(--ink-3); }

/* Receipt */
.receipt { max-width: 640px; margin: 0 auto; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 36px; }
.receipt .rule { height: 2px; background: var(--ink); border-radius: 2px; margin: 18px 0; width: 48px; }
@media print { .top, .noprint, .side, .tabs, .mhead { display: none !important; } body { background: #fff; } .console { display: block; } .main { padding: 0; } .receipt, .card, .paper { box-shadow: none; border: 0; } }

/* Theme picker (group profile) */
.themes { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.theme-opt { margin: 0; cursor: pointer; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; display: flex; flex-direction: column; position: relative; }
.theme-opt input { position: absolute; opacity: 0; }
.theme-opt:has(input:checked) { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.theme-opt:has(input:focus-visible) { outline: 2px solid var(--signal); outline-offset: 2px; }
.theme-sw { height: 96px; background: var(--t-hero); padding: 14px; display: flex; flex-direction: column; justify-content: space-between; border-bottom: 1px solid var(--line); }
.theme-sw .logo-dot { width: 22px; height: 22px; border-radius: var(--t-logo); background: var(--t-ink); }
.theme-sw .t-name { font-family: var(--t-font); font-weight: var(--t-weight); text-transform: var(--t-case); letter-spacing: var(--t-track); font-size: 17px; line-height: 1.1; color: var(--t-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.theme-sw .t-rule { width: 28px; height: 2px; border-radius: 2px; }
.theme-cap { padding: 10px 12px; display: flex; justify-content: space-between; gap: 8px; font-size: 13px; font-weight: 400; color: var(--ink-3); }
.theme-cap b { color: var(--ink); font-weight: 600; }

details > summary { cursor: pointer; font-weight: 500; color: var(--ink); list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details > summary::before { content: "+ "; color: var(--ink-3); }
details[open] > summary::before { content: "− "; }
details[open] > summary { margin-bottom: 12px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }
.foot { padding: 28px 0 40px; color: var(--ink-3); font-size: 13px; border-top: 1px solid var(--line); margin-top: 48px; }
.foot a { color: var(--ink-3); }
.code { background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); padding: 16px 18px; border-radius: 12px; font: 13px/1.7 var(--mono); overflow-x: auto; white-space: pre; }
.keybox { font-family: var(--mono); background: var(--paper); border: 1px solid var(--line); padding: 12px 14px; border-radius: 10px; word-break: break-all; }
.pill-nav { display: inline-flex; gap: 2px; flex-wrap: wrap; margin-bottom: 16px; padding: 3px; background: var(--sunk); border-radius: 10px; }
.pill-nav a { padding: 5px 12px; border-radius: 8px; color: var(--ink-2); font-size: 13px; font-weight: 500; text-decoration: none; }
.pill-nav a.on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(10,10,11,.1); }
.pill-nav a:hover { color: var(--ink); }

/* Site-wide notice (MEMBERS_NOTICE), e.g. on the test site */
.site-notice { background: var(--signal-soft); color: var(--signal); font-size: 13px; font-weight: 500; line-height: 1.45; }
.site-notice .wrap { padding-top: 10px; padding-bottom: 10px; }
@media print { .site-notice { display: none; } }

/* Setup: a drop-down group in the officers' menu */
.side details.navgroup { margin: 4px 0 2px; }
.side details.navgroup > summary { list-style: none; display: flex; gap: 10px; align-items: center; color: #A1A1AA; padding: 8px 10px; border-radius: 8px; font-size: 14px; cursor: pointer; user-select: none; }
.side details.navgroup > summary::-webkit-details-marker { display: none; }
.side details.navgroup > summary:hover, .side details.navgroup[open] > summary { background: var(--onyx-3); color: #F4F4F5; }
.side .chev { margin-left: auto; width: 8px; height: 8px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); transition: transform .15s; opacity: .7; }
.side details.navgroup[open] .chev { transform: rotate(-135deg); }
.side .navgroup-in { padding: 2px 0 4px 14px; margin-left: 12px; border-left: 1px solid var(--onyx-line); }
.side .navgroup-in a { font-size: 13.5px; padding: 7px 10px; }
@media (max-width: 900px) {
  .side details.navgroup { margin: 0; flex: none; }
  .side details.navgroup > summary { white-space: nowrap; }
  .side details.navgroup { display: flex; align-items: center; gap: 4px; }
  .side details.navgroup[open] .navgroup-in { display: flex; gap: 4px; margin: 0; padding: 0 0 0 6px; border-left: 1px solid var(--onyx-line); }
}
.side details.navgroup > summary::before, .side details.navgroup > summary::after { content: none; display: none; }

/* Membership plans side by side */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; align-items: stretch; }
.plan { display: flex; flex-direction: column; gap: 10px; background: var(--surface, #fff); border: 1px solid var(--line); border-radius: 16px; padding: 24px; }
.plan.featured { border-color: var(--ink); box-shadow: 0 18px 40px -26px rgba(10,10,11,.45); }
.plan h2 { margin: 0; font-size: 22px; letter-spacing: -.01em; }
.plan .price { padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.plan .price b { font-size: 26px; letter-spacing: -.02em; }
.plan .price span { color: var(--muted, #6b6b73); margin-left: 6px; font-size: 14px; }
.btn.block { width: 100%; justify-content: center; }
ul.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 7px; }
ul.ticks li { position: relative; padding-left: 22px; font-size: 14.5px; }
ul.ticks li::before { content: ""; position: absolute; left: 2px; top: 6px; width: 9px; height: 5px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); }
.offer-code { font-family: var(--mono); font-size: 18px; letter-spacing: .08em; padding: 8px 12px; border: 1px dashed var(--ink); border-radius: 10px; display: inline-block; background: #fff; }

/* Directory filters: wrap on phones, one line on wide screens */
.dir-filter { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.dir-filter input[type=search] { flex: 1 1 260px; max-width: 360px; }
.dir-filter select { flex: 0 1 200px; max-width: 220px; }
@media (max-width: 640px) { .dir-filter input[type=search], .dir-filter select { flex: 1 1 100%; max-width: none; } }

/* Table fields (qualifications, employment history) */
.ftable { min-width: 100%; border-collapse: collapse; }
.ftable th { font-size: 12px; text-align: left; padding: 4px; }
.ftable td { padding: 2px; }
.ftable input { min-width: 120px; height: 36px; }
