/* MGRC Digital v0
   Design language: club heritage, following the MGRC crest.
   Navy (#051C4E) and ivory (#FDFDFD) on warm paper.
   Serif for headings, restrained sans for UI. Flat surfaces, hairline rules,
   square-ish controls. No gradients, no emoji, no decorative shadows. */

:root {
  --green-950: #03142f;
  --green-900: #051c4e;
  --green-800: #0a2a66;
  --green-700: #143a80;
  --green-100: #e8ebf1;
  --gold: #051c4e;
  --gold-soft: #c9c7bd;
  --cream: #f4f3ee;
  --paper: #ffffff;
  --ink: #101a2e;
  --muted: #5b6474;
  --line: #dedcd4;
  --line-strong: #b0afa6;
  --danger: #8f3327;
  --danger-bg: #fbf1ee;
  --ok: #1f5c3f;
  --ok-bg: #eef4f0;
  --amber: #8a611c;
  --amber-bg: #f8f1e2;
  --radius: 4px;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.55;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -.005em;
  margin: 0;
}
h1 { font-size: clamp(1.9rem, 4.4vw, 2.5rem); line-height: 1.12; }
h2 { font-size: 1.22rem; }
p { margin: 0 0 12px; }

a { color: var(--green-800); }

.wrap { width: min(100% - 2rem, 60rem); margin-inline: auto; }
.page { padding: 26px 0 44px; }
.narrow { max-width: 620px; }
.muted { color: var(--muted); }
.hint { color: var(--muted); font-size: .9rem; }
.mono { font-family: var(--font-mono); font-size: .9em; }
.capitalize { text-transform: capitalize; }
.pre { white-space: pre-wrap; }
.nowrap { white-space: nowrap; }

/* ---------- header ---------- */

.site-header {
  background: var(--green-900);
  color: var(--cream);
  border-bottom: 1px solid rgba(253, 253, 253, .30);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 13px;
}

.brand { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; min-width: 0; }
.crest-img { display: block; width: 52px; height: 52px; border-radius: 50%; flex: 0 0 auto; }
.crest-img.small { width: 32px; height: 32px; }

.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-text strong {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.25;
}
.brand-text small {
  color: rgba(253, 253, 253, .66);
  font-size: .72rem;
  letter-spacing: .04em;
}

.lang-toggle {
  display: inline-flex;
  border: 1px solid rgba(253, 253, 253, .30);
  border-radius: 3px;
  padding: 2px;
  flex: 0 0 auto;
}
.lang-toggle button {
  border: 0;
  background: transparent;
  color: rgba(253, 253, 253, .76);
  font: inherit;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .06em;
  padding: 7px 12px;
  min-height: 34px;
  cursor: pointer;
}
.lang-toggle button.active { background: #fdfdfd; color: var(--green-900); }

/* ---------- hero ---------- */

.hero { margin: 10px 0 28px; max-width: 700px; }
.hero::before {
  content: "";
  display: block;
  width: 44px;
  height: 3px;
  background: var(--gold);
  margin-bottom: 16px;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: .15em;
  font-size: .7rem;
  font-weight: 700;
  color: var(--green-700);
  margin-bottom: 8px;
}
.hero h1 { margin-bottom: 10px; }
.lede { font-size: 1.02rem; color: var(--muted); max-width: 62ch; }

/* ---------- cards ---------- */

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 16px;
  overflow: hidden;
}
.card-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--line);
}
.card-head h2 { font-size: 1.18rem; }
.step {
  font-family: var(--font-display);
  color: var(--gold);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1;
  padding-right: 12px;
  border-right: 1px solid var(--line);
  min-width: 26px;
}
.card-body { padding: 22px; }
.section-hint { color: var(--muted); font-size: .9rem; margin-bottom: 14px; }

/* ---------- fields ---------- */

.field-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 720px) {
  .field-grid { grid-template-columns: 1fr 1fr; }
  .span-2 { grid-column: span 2; }
}

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label { font-size: .82rem; font-weight: 600; color: var(--green-950); }

input:not([type]),
input[type="text"], input[type="email"], input[type="tel"], input[type="date"],
input[type="number"], input[type="search"], input[type="password"], select, textarea {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  padding: 11px 12px;
  min-height: 46px;
  transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; min-height: 80px; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--green-800);
  box-shadow: 0 0 0 3px rgba(5, 28, 78, .14);
}
input[type="file"] {
  font: inherit;
  font-size: .88rem;
  padding: 9px;
  border: 1px dashed var(--line-strong);
  border-radius: 4px;
  background: #f6f6f2;
  width: 100%;
}

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ---------- category & check cards ---------- */

.category-grid { display: grid; gap: 10px; }
@media (min-width: 760px) { .category-grid { grid-template-columns: repeat(3, 1fr); } }

.category-option { position: relative; cursor: pointer; }
.category-option input { position: absolute; opacity: 0; inset: 0; }
.category-box {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  height: 100%;
  padding: 16px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  background: var(--paper);
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.category-option:hover .category-box { border-color: var(--green-700); }
.category-option input:checked + .category-box {
  border-color: var(--green-900);
  box-shadow: inset 4px 0 0 var(--gold);
  background: #f6f6f2;
}
.category-option input:focus-visible + .category-box { box-shadow: 0 0 0 3px rgba(5, 28, 78, .18); }
.category-mark {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 15px;
  height: 15px;
  border: 1.5px solid var(--line-strong);
  border-radius: 50%;
  background: transparent;
}
.category-option input:checked + .category-box .category-mark {
  border-color: var(--green-900);
  background: radial-gradient(circle, var(--green-900) 0 42%, transparent 46%);
}
.category-name { font-family: var(--font-display); font-size: 1.1rem; font-weight: 600; }
.category-desc { font-size: .84rem; color: var(--muted); }
.category-fees {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 3px;
  min-height: 3.4em;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: .78rem;
  color: var(--green-800);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.check-grid { display: grid; gap: 8px; margin-bottom: 16px; }
@media (min-width: 720px) { .check-grid { grid-template-columns: 1fr 1fr 1fr; } }

.check-card {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 13px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
  font-size: .9rem;
}
.check-card input { margin-top: 3px; accent-color: var(--green-900); width: 17px; height: 17px; flex: 0 0 auto; }
.check-card:has(input:checked) { border-color: var(--green-900); background: #f6f6f2; }

.check-line {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  padding: 10px 0;
  font-size: .93rem;
  cursor: pointer;
}
.check-line input { margin-top: 3px; width: 17px; height: 17px; accent-color: var(--green-900); flex: 0 0 auto; }

.subfieldset { border: 0; border-top: 1px solid var(--line); padding: 20px 0 6px; margin: 0; }
.subfieldset:first-of-type { border-top: 0; padding-top: 0; }
.subfieldset legend {
  font-family: var(--font-display);
  font-size: 1.04rem;
  font-weight: 600;
  padding-right: 12px;
  margin-bottom: 8px;
}

/* ---------- alerts ---------- */

.alert {
  border: 1px solid var(--line);
  border-left: 4px solid var(--line-strong);
  border-radius: 4px;
  padding: 13px 16px;
  margin-bottom: 16px;
  font-size: .92rem;
  background: var(--paper);
}
.alert-error { background: var(--danger-bg); border-color: #e4c4bd; border-left-color: var(--danger); color: #5f221a; }
.alert-error ul { margin: 8px 0 0; padding-left: 20px; }
.alert-ok { background: var(--ok-bg); border-color: #c8d8ce; border-left-color: var(--ok); color: #17432f; }
.alert-info { background: #f2f4f8; border-color: var(--line); border-left-color: var(--gold); color: #2a3850; display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: inherit;
  font-weight: 700;
  font-size: .78rem;
  letter-spacing: .07em;
  text-transform: uppercase;
  border-radius: 3px;
  padding: 14px 24px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  min-height: 46px;
  transition: background .15s, color .15s, border-color .15s;
}
.btn-primary { background: var(--green-900); color: #fff; border-color: var(--green-900); }
.btn-primary:hover { background: var(--green-800); border-color: var(--green-800); }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; }
.btn-secondary { background: transparent; color: var(--green-900); border-color: var(--line-strong); }
.btn-secondary:hover { border-color: var(--green-900); background: #f6f6f2; }
.btn-danger { background: transparent; color: var(--danger); border-color: #d8b3ac; }
.btn-danger:hover { background: var(--danger-bg); border-color: var(--danger); }
.btn-small { padding: 8px 12px; font-size: .7rem; min-height: 34px; }
.btn-block { width: 100%; }

.link-btn {
  font: inherit;
  font-size: .86rem;
  background: none;
  border: 0;
  padding: 0;
  color: var(--green-800);
  text-decoration: underline;
  cursor: pointer;
}

.submit-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 18px 0 8px;
  border-top: 1px solid var(--line);
  margin-top: 4px;
}
.submit-bar .btn { min-width: 230px; }
.draft-status { color: var(--muted); font-size: .82rem; margin: 0; }

/* ---------- success & state cards ---------- */

.success-card, .state-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 3px solid var(--gold);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 6vw, 2.875rem);
  text-align: center;
  margin-top: 22px;
}
.success-crest { width: 64px; height: 64px; margin: 0 auto 18px; display: block; border-radius: 50%; }
.success-card .lede { margin-inline: auto; }
.ref-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 22px auto;
  padding: 14px 16px;
  max-width: 360px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: #f6f6f2;
}
.ref-box span { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.ref-box strong { font-family: var(--font-mono); font-size: 1.1rem; color: var(--green-900); }
.next-steps { text-align: left; max-width: 480px; margin: 0 auto 18px; padding-left: 22px; }
.next-steps li { margin-bottom: 8px; }

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 26px 0 34px;
  color: var(--muted);
  font-size: .82rem;
}
.site-footer p { margin: 0 0 4px; }
.footer-brand { color: var(--green-900); font-family: var(--font-display); font-size: 1rem; font-weight: 600; }

/* ---------- admin ---------- */

.admin-body { background: #f2f1ec; }
.admin-header { background: var(--green-900); color: var(--cream); border-bottom: 1px solid rgba(253, 253, 253, .30); }
.admin-header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 11px; flex-wrap: wrap; }
.admin-brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font-family: var(--font-display); font-size: 1.02rem; }
.admin-nav { display: flex; align-items: center; gap: 16px; font-size: .84rem; flex-wrap: wrap; }
.admin-nav a { color: rgba(253, 253, 253, .78); text-decoration: none; }
.admin-nav a:hover { text-decoration: underline; }
.admin-nav a.active { color: #fff; border-bottom: 2px solid #fdfdfd; padding-bottom: 2px; }
.admin-user { color: rgba(253, 253, 253, .68); }
.inline-form { display: inline; margin: 0; }
.admin-nav .link-btn { color: rgba(253, 253, 253, .78); }
.admin-main { padding: 26px 0 52px; }
.admin-footer { border-top: 1px solid var(--line); padding: 18px 0; color: var(--muted); font-size: .78rem; }

.admin-page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.admin-page-head h1 { font-size: 1.8rem; }

.stat-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.stat-chip {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 100px;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-bottom: 2px solid transparent;
  border-radius: 3px;
  background: #fff;
  text-decoration: none;
  color: var(--muted);
  font-size: .74rem;
}
.stat-chip:hover { border-color: var(--line-strong); }
.stat-chip.active { border-bottom-color: var(--gold); color: var(--ink); }
.stat-n { font-family: var(--font-display); font-size: 1.35rem; color: var(--green-900); line-height: 1.1; }

.filter-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.filter-bar input[type="search"] { flex: 1 1 260px; min-width: 0; }
.filter-bar select { flex: 0 0 auto; width: auto; min-width: 160px; }
.filter-bar .btn { min-height: 46px; }

.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.data-table { width: 100%; border-collapse: collapse; font-size: .88rem; min-width: 720px; }
.data-table th {
  text-align: left;
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  padding: 11px 16px;
  border-bottom: 1px solid var(--line);
  background: #f6f6f2;
  font-weight: 700;
}
.data-table td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tr:hover td { background: #f6f6f2; }

.status-chip {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 3px;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
  background: #eeeae0;
  color: #4a4a44;
}
.status-submitted { background: #eef1f4; color: #34506b; }
.status-under_review { background: var(--amber-bg); color: var(--amber); }
.status-approved { background: var(--ok-bg); color: var(--ok); }
.status-active { background: var(--green-900); color: #fff; }
.status-rejected { background: var(--danger-bg); color: var(--danger); }
.status-withdrawn { background: #ececea; color: #5c5c56; }

.empty-state { padding: 44px 20px; text-align: center; background: #fff; border: 1px dashed var(--line-strong); border-radius: var(--radius); }

.login-card {
  max-width: 410px;
  margin: 36px auto;
  background: #fff;
  border: 1px solid var(--line);
  border-top: 3px solid var(--gold);
  border-radius: var(--radius);
  padding: clamp(1.375rem, 5vw, 2.125rem);
}
.login-card h1 { font-size: 1.8rem; margin-bottom: 6px; }
.login-card .field { margin-bottom: 15px; }

.detail-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 860px) { .detail-grid { grid-template-columns: 1fr 1fr; } .detail-grid .span-2 { grid-column: span 2; } }
.detail-grid .card { margin-bottom: 0; padding: 20px; }
.detail-grid .card h2 { margin-bottom: 14px; font-size: 1.1rem; padding-bottom: 8px; border-bottom: 1px solid var(--line); }

.detail-list { display: grid; grid-template-columns: 132px 1fr; gap: 6px 12px; margin: 0; font-size: .88rem; }
.detail-list dt { color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; padding-top: 2px; }
.detail-list dd { margin: 0 0 8px; min-width: 0; overflow-wrap: anywhere; }

.pill-list { list-style: none; margin: 0 0 10px; padding: 0; display: flex; gap: 6px; flex-wrap: wrap; }
.pill { background: var(--green-100); color: var(--green-800); border-radius: 3px; padding: 3px 9px; font-size: .78rem; font-weight: 600; text-transform: capitalize; }

.doc-list { margin: 0 0 14px; padding-left: 18px; font-size: .88rem; }

.note-box { background: #f6f6f2; border: 1px solid var(--line); border-left: 3px solid var(--gold); padding: 10px 12px; margin-bottom: 14px; font-size: .88rem; }

.decision-form { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.decision-form .grow { flex: 1 1 300px; }

.timeline { list-style: none; margin: 0; padding: 0 0 0 16px; border-left: 1px solid var(--line-strong); }
.timeline li { position: relative; padding: 0 0 16px 16px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline-dot { position: absolute; left: -21px; top: 7px; width: 9px; height: 9px; border-radius: 50%; background: var(--gold); border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line-strong); }

/* ---------- small screens ---------- */

@media (max-width: 480px) {
  .brand-text small { display: none; }
  .brand-text strong { font-size: .9rem; }
  .crest-img { width: 40px; height: 40px; }
  .lang-toggle button { padding: 7px 10px; }
  .card-head, .card-body { padding-left: 16px; padding-right: 16px; }
  .submit-bar .btn { width: 100%; }
}

/* ---------- v1: members, ledger, documents ---------- */

.head-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.annual-form { display: flex; gap: 8px; align-items: flex-end; }
.annual-form .field { min-width: 110px; }
.actions-cell { display: flex; gap: 6px; flex-wrap: wrap; }

.balance-box {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px;
  border: 1px solid var(--line);
  background: #f6f6f2;
  margin-bottom: 16px;
}
.balance-amount { font-family: var(--font-display); font-size: 1.9rem; line-height: 1.2; color: var(--green-900); }

.subhead {
  font-family: var(--font-body);
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--muted);
  margin: 22px 0 10px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.action-stack { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.inline-action { display: inline; margin: 0; }
.stack-form { display: flex; flex-direction: column; gap: 10px; }
.field-row { display: flex; gap: 10px; flex-wrap: wrap; }
.field-row .field { flex: 1 1 140px; }
.table-wrap.flat { border: 0; border-radius: 0; }

.status-pending_payment { background: var(--amber-bg); color: var(--amber); }
.status-suspended_arrears, .status-one_year { background: var(--danger-bg); color: var(--danger); }
.status-ceased_arrears { background: #3a3a36; color: #fff; }
.status-current { background: var(--ok-bg); color: var(--ok); }
.status-due { background: var(--amber-bg); color: var(--amber); }
.status-overdue { background: var(--danger-bg); color: var(--danger); }
.status-issued, .status-partially_paid { background: #eef1f4; color: #34506b; }
.status-paid { background: var(--ok-bg); color: var(--ok); }
.status-cancelled, .status-waived { background: #ececea; color: #5c5c56; }

/* printable documents */

.doc-actions { display: flex; justify-content: flex-end; gap: 8px; margin-bottom: 14px; }
.paper-doc {
  background: #fff;
  border: 1px solid var(--line);
  padding: clamp(1.5rem, 5vw, 3.25rem);
  max-width: 820px;
  margin: 0 auto 30px;
}
.doc-head {
  display: flex;
  gap: 16px;
  align-items: center;
  border-bottom: 2px solid var(--green-900);
  padding-bottom: 16px;
  margin-bottom: 24px;
}
.doc-crest { width: 58px; height: 58px; border-radius: 50%; flex: 0 0 auto; }
.doc-head h1 { font-size: 1.45rem; }
.doc-head p { margin: 0; font-size: .82rem; color: var(--muted); }
.doc-title { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: flex-start; margin-bottom: 22px; }
.doc-title h2 { font-size: 1.3rem; text-transform: uppercase; letter-spacing: .04em; }
.doc-title-sub { font-size: .9rem; text-transform: none; letter-spacing: 0; color: var(--muted); font-style: italic; }
.doc-meta { display: flex; gap: 22px; flex-wrap: wrap; font-size: .82rem; }
.doc-meta div { display: flex; flex-direction: column; }
.doc-meta span { color: var(--muted); font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; }

.doc-fields { display: grid; grid-template-columns: 210px 1fr; gap: 8px 16px; font-size: .92rem; margin: 0 0 24px; }
.doc-fields dt { color: var(--muted); font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; padding-top: 3px; }
.doc-fields dd { margin: 0; }
.doc-fields .amount { font-family: var(--font-display); font-size: 1.5rem; color: var(--green-900); }

.doc-table { width: 100%; border-collapse: collapse; font-size: .86rem; margin-bottom: 20px; }
.doc-table th, .doc-table td { border-bottom: 1px solid var(--line); padding: 8px 6px; text-align: left; }
.doc-table thead th { font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.doc-table .right { text-align: right; }
.doc-table tfoot th { border-top: 2px solid var(--green-900); border-bottom: 0; }

.doc-note { font-size: .84rem; background: #f6f6f2; padding: 10px 12px; border-left: 3px solid var(--green-900); }
.doc-sign { display: flex; justify-content: flex-end; margin-top: 48px; }
.doc-sign div { min-width: 240px; text-align: center; font-size: .82rem; }
.sign-line { display: block; border-top: 1px solid var(--ink); margin-bottom: 6px; }
.doc-foot { margin-top: 28px; font-size: .7rem; color: var(--muted); text-align: center; }

.paper-doc.letter { font-size: .95rem; line-height: 1.7; }
.letter-ref { text-align: right; font-size: .82rem; color: var(--muted); margin-bottom: 22px; }
.letter-to { margin-bottom: 18px; }
.letter-subject { font-size: 1rem; text-transform: uppercase; text-decoration: underline; margin: 18px 0; }
.letter p { margin-bottom: 12px; text-align: left; }
.letter-close { margin-top: 20px; }
.letter-sign { justify-content: flex-start; margin-top: 36px; }
.letter-cc { margin-top: 28px; font-size: .78rem; color: var(--muted); }

/* dashboard */

.metric-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 18px; }
@media (min-width: 800px) { .metric-row { grid-template-columns: repeat(4, 1fr); } }
.metric {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-top: 3px solid var(--green-900);
  border-radius: 3px;
  text-decoration: none;
  color: var(--ink);
}
.metric:hover { border-color: var(--line-strong); border-top-color: var(--green-700); }
.metric-n { font-family: var(--font-display); font-size: 1.7rem; line-height: 1.1; color: var(--green-900); }
.metric-n small { font-size: .9rem; color: var(--muted); }
.metric-label { color: var(--muted); font-size: .78rem; }

.dash-grid { display: grid; grid-template-columns: 1fr; gap: 16px; align-items: start; }
@media (min-width: 900px) { .dash-grid { grid-template-columns: 1fr 1fr; } }
.card-title-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.card-title-row h2 { margin: 0; }
.data-table.compact { min-width: 0; font-size: .86rem; }
.data-table.compact td { padding: 8px 6px; border-bottom: 1px solid var(--line); }
.data-table.compact td:last-child { padding-left: 14px; }

.simple-list { list-style: none; margin: 0; padding: 0; }
.simple-list li { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--line); }
.simple-list li:first-child { border-top: 0; }

.module-list { list-style: none; margin: 0; padding: 0; }
.module-list li { border-top: 1px solid var(--line); }
.module-list li:first-child { border-top: 0; }
.module-list a { display: flex; flex-direction: column; gap: 2px; padding: 12px 0; text-decoration: none; color: var(--ink); }
.module-list a:hover strong { text-decoration: underline; }
.module-list span { color: var(--muted); font-size: .82rem; }

/* meetings */

.card.padded { padding: 20px; }
.card.padded > h2 { margin-bottom: 14px; }

.meeting-toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.meeting-toolbar .btn { min-height: 34px; }

.meeting-grid { display: grid; grid-template-columns: 1fr; gap: 16px; margin-bottom: 16px; }
@media (min-width: 960px) { .meeting-grid { grid-template-columns: 1fr 1fr; } }

.quorum-panel { margin-bottom: 14px; }
.quorum-line { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.quorum-count { font-family: var(--font-display); font-size: 2rem; line-height: 1; color: var(--green-900); }
.quorum-bar { height: 10px; background: #ece9df; border: 1px solid var(--line); overflow: hidden; margin-bottom: 8px; }
.quorum-bar span { display: block; height: 100%; background: var(--green-900); transition: width .3s; }

.checkin-form { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.checkin-form select { flex: 1 1 180px; min-width: 0; }
.checkin-form .btn { flex: 0 0 auto; }

.attendance-list { list-style: none; margin: 0; padding: 0; }
.attendance-list li { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--line); }
.attendance-list li:first-child { border-top: 0; }

.agenda-list { list-style: none; margin: 0 0 16px; padding: 0; }
.agenda-list li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--line); }
.agenda-list li:first-child { border-top: 0; }
.agenda-list li.done .agenda-body strong { text-decoration: line-through; color: var(--muted); }
.agenda-seq { font-family: var(--font-display); color: var(--muted); min-width: 20px; }
.agenda-body { flex: 1; min-width: 0; }
.agenda-body strong { font-weight: 600; }

.add-agenda-form { display: flex; gap: 8px; flex-wrap: wrap; }
.add-agenda-form input { flex: 2 1 240px; }
.add-agenda-form select { flex: 0 1 140px; }

.minutes-meta { display: flex; gap: 20px; flex-wrap: wrap; font-size: .84rem; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.minutes-text { font-family: var(--font-mono); font-size: .84rem; line-height: 1.6; }
.form-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }

.status-draft, .status-cancelled { background: #ececea; color: #5c5c56; }
.status-scheduled, .status-notice_sent { background: #eef1f4; color: #34506b; }
.status-in_progress { background: var(--amber-bg); color: var(--amber); }
.status-adjourned { background: var(--danger-bg); color: var(--danger); }
.status-completed { background: var(--ok-bg); color: var(--ok); }

.notice-fields { margin-bottom: 22px; }
.notice-agenda-title { font-size: .82rem; text-transform: uppercase; letter-spacing: .1em; margin: 22px 0 8px; }
.notice-agenda { padding-left: 20px; }
.notice-agenda li { margin-bottom: 6px; }

/* motions */

.motion-list { list-style: none; margin: 0 0 18px; padding: 0; }
.motion-list li { padding: 14px 0; border-top: 1px solid var(--line); }
.motion-list li:first-child { border-top: 0; }
.motion-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 4px; }
.motion-body { background: #f6f6f2; border-left: 3px solid var(--green-900); padding: 8px 10px; font-size: .86rem; margin: 8px 0; }
.vote-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.vote-form input { width: 90px; flex: 0 0 auto; }
.add-motion-form { border-top: 1px solid var(--line); padding-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.form-row { display: flex; gap: 8px; flex-wrap: wrap; }
.form-row input, .form-row select { flex: 1 1 160px; }
.status-passed { background: var(--ok-bg); color: var(--ok); }
.status-validated { background: #eef1f4; color: #34506b; }
.status-failed { background: var(--danger-bg); color: var(--danger); }
.status-tabled { background: var(--amber-bg); color: var(--amber); }

/* homepage */

.header-right { display: flex; align-items: center; gap: 14px; }
.header-link {
  color: rgba(253, 253, 253, .82);
  text-decoration: none;
  font-size: .76rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  font-weight: 700;
}
.header-link:hover { color: #fff; text-decoration: underline; }
@media (max-width: 460px) { .header-link { display: none; } }

.home-hero { background: var(--paper); border-bottom: 1px solid var(--line); padding: 54px 0 46px; }
.home-hero-inner { display: grid; gap: 32px; grid-template-columns: 1fr; align-items: center; }
@media (min-width: 860px) { .home-hero-inner { grid-template-columns: 1.4fr .6fr; gap: 56px; } }
.home-hero h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); max-width: 18ch; margin: 10px 0 16px; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; }
.home-hero-panel { border: 1px solid var(--line); background: var(--cream); padding: 22px; }
.hero-crest { width: 120px; height: 120px; border-radius: 3px; margin: 0 auto 16px; display: block; }
.home-hero-panel dl { margin: 0; }
.home-hero-panel dl > div { display: flex; flex-direction: column; gap: 2px; padding: 8px 0; border-top: 1px solid var(--line); font-size: .84rem; }
.home-hero-panel dl > div:first-child { border-top: 0; }
.home-hero-panel dt { color: var(--muted); text-transform: uppercase; font-size: .66rem; letter-spacing: .08em; }
.home-hero-panel dd { margin: 0; font-weight: 600; }

.home-section { padding: 52px 0; }
.home-section.alt { background: #f0efe9; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 620px; margin-bottom: 28px; }
.section-head h2 { font-size: clamp(1.6rem, 3.4vw, 2.1rem); }
.about-grid { display: grid; gap: 28px; grid-template-columns: 1fr; }
@media (min-width: 860px) { .about-grid { grid-template-columns: 1fr 1fr; gap: 56px; } }
.about-copy p { font-size: 1rem; }
.objectives { border-left: 3px solid var(--green-900); padding-left: 20px; }
.objectives h3 { font-size: 1.05rem; margin-bottom: 10px; }
.objectives ol { margin: 0; padding-left: 18px; }
.objectives li { margin-bottom: 8px; font-size: .92rem; }

.membership-grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .membership-grid { grid-template-columns: repeat(3, 1fr); } }
.membership-card { background: var(--paper); border: 1px solid var(--line); border-top: 3px solid var(--green-900); padding: 20px; display: flex; flex-direction: column; gap: 8px; }
.membership-card h3 { font-size: 1.15rem; }
.fee-list { margin: auto 0 0; padding-top: 12px; border-top: 1px solid var(--line); font-size: .86rem; }
.fee-list > div { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; }
.fee-list dt { color: var(--muted); }
.fee-list dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.membership-note { margin-top: 16px; }

.join-steps { list-style: none; margin: 0 0 30px; padding: 0; display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .join-steps { grid-template-columns: repeat(3, 1fr); gap: 24px; } }
.join-steps li { border-top: 2px solid var(--green-900); padding-top: 14px; }
.step-n { font-family: var(--font-display); color: var(--muted); font-size: .9rem; }
.join-steps h3 { font-size: 1.1rem; margin: 4px 0 6px; }
.join-steps p { font-size: .9rem; color: var(--muted); }
.center { text-align: center; }

.contact-grid { display: grid; gap: 28px; grid-template-columns: 1fr; }
@media (min-width: 860px) { .contact-grid { grid-template-columns: .8fr 1.2fr; gap: 56px; } }
.contact-cards { display: grid; gap: 12px; }
.contact-block { background: var(--paper); border: 1px solid var(--line); padding: 16px 18px; }
.contact-block h3 { font-family: var(--font-body); font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 6px; }
.contact-block p { margin: 0; font-size: .92rem; }

/* elections */

.inline-form-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline-form-row select { width: auto; min-width: 200px; }
.token-alert { align-items: flex-start; }
.token-code { font-size: 1.15rem; letter-spacing: .08em; background: #fff; border: 1px dashed var(--line-strong); padding: 4px 8px; display: inline-block; margin: 4px 0; }
.field.grow { flex: 1 1 240px; }

.candidate-list { display: flex; flex-direction: column; gap: 8px; }
.candidate {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  background: #fff;
  cursor: pointer;
}
.candidate:has(input:checked) { border-color: var(--green-900); background: #f6f6f2; box-shadow: inset 3px 0 0 var(--green-900); }
.candidate input { margin-top: 3px; width: 17px; height: 17px; accent-color: var(--green-900); flex: 0 0 auto; }
.candidate-body { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.candidate-profile { font-size: .84rem; color: var(--muted); }
.ballot-hero { margin-bottom: 18px; }
.ballot-page .card { margin-bottom: 14px; }

/* member self-service */

.member-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 900px) { .member-grid { grid-template-columns: 1fr; } }
.section-head-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.notification-list { list-style: none; padding: 0; margin: 0; }
.notification-list li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.notification-list li:last-child { border-bottom: 0; }
.notification-list li.unread { border-left: 3px solid var(--green-900); padding-left: 10px; }
.row-end { display: flex; align-items: center; gap: 10px; }
.receipt-paper { max-width: 760px; }
.receipt-head { display: flex; align-items: center; gap: 12px; border-bottom: 2px solid var(--green-900); padding-bottom: 10px; margin-bottom: 12px; }
.receipt-head h2 { margin: 0; }
.detail-list { display: grid; gap: 6px; margin: 0 0 14px; }
.detail-list > div { display: flex; justify-content: space-between; gap: 16px; border-bottom: 1px dotted var(--line-strong); padding-bottom: 4px; }
.detail-list dt { color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; }
.detail-list dd { margin: 0; text-align: right; font-weight: 600; }
.action-stack { display: flex; flex-direction: column; gap: 6px; }
.reject-form { display: flex; gap: 6px; align-items: center; }
.reject-reason { width: 120px; padding: 4px 6px; font-size: .8rem; }
.plain-list { margin: 0; padding-left: 18px; display: grid; gap: 8px; font-size: .92rem; }
@media print {
  .admin-topbar, .no-print, .admin-page-head { display: none !important; }
  .receipt-paper { box-shadow: none; border: 0; }
}

/* ---------- print ---------- */

@media print {
  .site-header, .site-footer, .lang-toggle, .submit-bar, .admin-header, .admin-footer { display: none !important; }
  .doc-actions, .no-print { display: none !important; }
  .admin-main { padding: 0; }
  .paper-doc { border: 0; padding: 0; max-width: none; margin: 0; }
  body { background: #fff; }
  .card { border-color: #999; break-inside: avoid; }
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------- v6: footer, legal pages, accessibility ---------- */

.skip-link {
  position: absolute;
  left: 12px;
  top: -70px;
  z-index: 100;
  background: #fff;
  color: var(--green-900);
  padding: 10px 14px;
  border-radius: 4px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .25);
}
.skip-link:focus { top: 12px; }

:focus-visible { outline: 2px solid #2f6fb5; outline-offset: 2px; }

.site-footer {
  background: var(--green-900);
  color: rgba(253, 253, 253, .78);
  margin-top: 48px;
  padding-top: 36px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr .8fr .8fr;
  gap: 26px;
  padding-bottom: 26px;
}
.footer-col { display: flex; flex-direction: column; gap: 7px; font-size: .88rem; }
.footer-col h3 {
  color: #fff;
  font-family: var(--font-body);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
  margin: 0 0 4px;
}
.footer-col a { color: rgba(253, 253, 253, .78); text-decoration: none; }
.footer-col a:hover { color: #fff; text-decoration: underline; }
.footer-brand { font-family: var(--font-display); color: #fff; font-size: 1.06rem; margin: 0; }
.footer-sub { margin: 0; font-size: .8rem; }
.footer-addr { margin: 8px 0 0; font-size: .82rem; line-height: 1.5; }
.footer-reg { margin: 8px 0 0; font-size: .7rem; letter-spacing: .06em; color: rgba(253, 253, 253, .55); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  border-top: 1px solid rgba(253, 253, 253, .18);
  padding-block: 14px;
  font-size: .76rem;
  color: rgba(253, 253, 253, .6);
}
@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand-col { grid-column: 1 / -1; }
}

.legal-page { max-width: 760px; }
.legal-head { margin-bottom: 18px; }
.legal-toc { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 24px; }
.legal-toc a {
  font-size: .78rem;
  padding: 5px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  text-decoration: none;
  color: var(--green-900);
}
.legal-toc a:hover { background: #fff; }
.legal-page section { margin-bottom: 26px; scroll-margin-top: 20px; }
.legal-page h2 { font-size: 1.12rem; margin-bottom: 8px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.legal-page p, .legal-page li { font-size: .94rem; }
.legal-page ul { padding-left: 20px; margin: 0 0 10px; }
.legal-page li { margin-bottom: 5px; }
.bm {
  color: var(--muted);
  font-size: .86rem !important;
  border-left: 2px solid var(--line-strong);
  padding-left: 10px;
  margin-top: 6px;
}

@media (max-width: 720px) {
  .lang-toggle button { min-height: 44px; padding: 10px 14px; }
  .header-link { min-height: 44px; display: inline-flex; align-items: center; }
  .btn { min-height: 44px; }
  .legal-toc { gap: 5px; }
}

/* Small phones: keep the club name readable in the header. */
@media (max-width: 640px) {
  .header-inner { gap: 10px; }
  .crest-img { width: 42px; height: 42px; }
  .brand-text strong { font-size: .82rem; line-height: 1.15; }
  .brand-text small { display: none; }
  .header-right { gap: 8px; }
  .header-link { font-size: .78rem; white-space: nowrap; }
  .header-link[href="/apply"] { display: none; }
  .lang-toggle button { padding: 8px 9px; }
}

/* ---------- help centre ---------- */

.help-page { padding-top: 34px; padding-bottom: 70px; }

.help-hero { max-width: 780px; margin-bottom: 34px; }
.help-hero h1 { font-family: var(--font-display); font-size: clamp(1.875rem, 4vw, 2.625rem); line-height: 1.1; margin: 4px 0 10px; color: var(--green-900); }
.help-hero .hint { font-size: 1rem; max-width: 640px; }
.help-hero.small { margin-bottom: 22px; }

.help-search { display: flex; align-items: center; gap: 8px; margin-top: 18px; background: var(--paper); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 6px 6px 6px 12px; max-width: 640px; }
.help-search svg { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round; }
.help-search input { flex: 1; border: 0; outline: none; font: inherit; font-size: .9375rem; background: transparent; color: var(--ink); min-width: 0; }
.help-search.compact { padding: 4px 8px; margin: 0 0 14px; }
.help-search.compact input { font-size: .8125rem; }

.help-hero-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

.help-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 44px; align-items: start; }

.help-nav { position: sticky; top: 18px; display: flex; flex-direction: column; gap: 20px; font-size: .875rem; max-height: calc(100vh - 40px); overflow: auto; padding-right: 6px; }
.help-nav-group { display: flex; flex-direction: column; gap: 2px; }
.help-nav-title { font-size: .6875rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0 0 6px; font-weight: 700; }
.help-nav a { color: var(--ink); text-decoration: none; padding: 5px 8px; border-radius: var(--radius); border-left: 2px solid transparent; line-height: 1.35; }
.help-nav a:hover { background: var(--green-100); }
.help-nav a.active { background: var(--green-100); border-left-color: var(--green-900); font-weight: 600; }

.help-section { margin-bottom: 34px; }
.help-section h2 { font-family: var(--font-display); font-size: 1.375rem; color: var(--green-900); margin: 0 0 12px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.help-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 12px; }
.help-card { display: flex; flex-direction: column; gap: 5px; padding: 14px 16px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); transition: border-color .15s, transform .15s; }
.help-card:hover { border-color: var(--green-700); transform: translateY(-1px); }
.help-card strong { font-size: .9375rem; color: var(--green-900); }
.help-card-summary { font-size: .8125rem; color: var(--muted); line-height: 1.45; }
.help-card-audience { font-size: .625rem; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); font-weight: 700; }

.help-breadcrumb { display: flex; flex-wrap: wrap; gap: 6px; font-size: .8125rem; color: var(--muted); margin-bottom: 18px; }
.help-breadcrumb a { color: var(--green-700); text-decoration: none; }
.help-breadcrumb a:hover { text-decoration: underline; }

.help-article { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 34px 26px; min-width: 0; }
.help-article-head h1 { font-family: var(--font-display); font-size: clamp(1.625rem, 3vw, 2.125rem); margin: 4px 0 6px; color: var(--green-900); line-height: 1.15; }
.help-article-head .hint { font-size: .8125rem; }

.help-toc { margin: 18px 0 24px; padding: 14px 16px; background: var(--cream); border-left: 3px solid var(--green-900); font-size: .8125rem; display: flex; flex-direction: column; gap: 4px; }
.help-toc p { margin: 0 0 4px; font-size: .6875rem; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.help-toc a { color: var(--green-800); text-decoration: none; }
.help-toc a:hover { text-decoration: underline; }
.help-toc .toc-level-3 { padding-left: 14px; color: var(--muted); }

.doc-body { font-size: .9375rem; line-height: 1.68; color: var(--ink); }
.doc-body h1 { font-family: var(--font-display); font-size: 1.875rem; line-height: 1.15; margin: 0 0 10px; color: var(--green-900); }
.doc-body h2 { font-family: var(--font-display); font-size: 1.4375rem; margin: 30px 0 10px; color: var(--green-900); padding-bottom: 4px; border-bottom: 1px solid var(--line); }
.doc-body h3 { font-size: 1.0625rem; margin: 24px 0 8px; color: var(--green-800); }
.doc-body h4 { font-size: .9375rem; margin: 18px 0 6px; }
.doc-body p { margin: 0 0 12px; }
.doc-body ul, .doc-body ol { margin: 0 0 14px; padding-left: 24px; }
.doc-body li { margin: 3px 0; }
.doc-body a { color: var(--green-700); }
.doc-body strong { color: var(--green-900); }
.doc-body code { font-family: var(--font-mono); font-size: .88em; background: var(--green-100); padding: 1px 5px; border-radius: 3px; }
.doc-body blockquote { margin: 16px 0; padding: 10px 16px; border-left: 3px solid var(--gold-soft); background: var(--cream); color: var(--ink); font-size: .875rem; }
.doc-body blockquote p { margin: 0; }
.doc-body hr { border: 0; border-top: 1px solid var(--line); margin: 26px 0; }
.doc-code { background: #0b1426; color: #e6e9f0; padding: 14px 16px; border-radius: var(--radius); overflow: auto; font-size: 0.78125rem; line-height: 1.55; }
.doc-code code { background: none; padding: 0; color: inherit; font-size: inherit; }
.doc-table-wrap { overflow-x: auto; margin: 0 0 16px; }
.doc-table { width: 100%; border-collapse: collapse; font-size: 0.84375rem; }
.doc-table th, .doc-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.doc-table th { font-size: .6875rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); border-bottom: 1px solid var(--line-strong); }
.doc-table tr:last-child td { border-bottom: 0; }

.help-pager { display: flex; justify-content: space-between; gap: 14px; margin-top: 34px; padding-top: 18px; border-top: 1px solid var(--line); }
.help-pager a { display: flex; flex-direction: column; gap: 3px; text-decoration: none; color: var(--ink); padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); max-width: 48%; }
.help-pager a:hover { border-color: var(--green-700); }
.help-pager span { font-size: .625rem; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.help-pager strong { font-size: .875rem; color: var(--green-900); }
.pager-next { text-align: right; margin-left: auto; }

.help-feedback { margin-top: 20px; font-size: .8125rem; color: var(--muted); }

.help-results { display: flex; flex-direction: column; gap: 10px; max-width: 820px; }
.help-result { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); }
.help-result:hover { border-color: var(--green-700); }
.help-result strong { color: var(--green-900); font-size: .9375rem; }
.help-result-snippet { font-size: .8125rem; color: var(--muted); line-height: 1.5; }
.help-empty { padding: 24px; background: var(--paper); border: 1px dashed var(--line-strong); border-radius: var(--radius); max-width: 820px; }

@media (max-width: 900px) {
  .help-layout { display: flex; flex-direction: column; gap: 22px; }
  .help-article { order: 1; padding: 22px 18px; }
  .help-nav { order: 2; position: static; max-height: none; flex-direction: row; flex-wrap: wrap; gap: 12px 22px; border-top: 1px solid var(--line); padding-top: 18px; }
  .help-nav::before { content: "Browse more topics"; width: 100%; font-size: .6875rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
  .help-nav .help-search.compact { display: none; }
  .help-pager a { max-width: 100%; }
  .help-layout, .help-article, .doc-body { min-width: 0; max-width: 100%; }
  .doc-code { white-space: pre-wrap; overflow-wrap: anywhere; max-width: 100%; }
  .help-article-head h1 { font-size: 1.5rem; }
  .doc-body { font-size: 0.90625rem; }
  .doc-body h2 { font-size: 1.25rem; }
  .doc-table-wrap { max-width: 100%; -webkit-overflow-scrolling: touch; }
  .doc-table { min-width: 420px; }
}

/* help language toggle */
.help-hero-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.help-lang { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--radius); overflow: hidden; background: var(--paper); }
.help-lang a { padding: 4px 10px; font-size: .75rem; font-weight: 700; letter-spacing: .04em; color: var(--muted); text-decoration: none; }
.help-lang a + a { border-left: 1px solid var(--line); }
.help-lang a.active { background: var(--green-900); color: #fff; }
.help-lang a:hover:not(.active) { background: var(--green-100); }
.help-breadcrumb-lang { margin-left: auto; }
.help-translation-note { margin: 16px 0 0; padding: 10px 14px; background: var(--amber-bg); border-left: 3px solid var(--amber); font-size: .8125rem; color: var(--ink); }
.help-nav { scrollbar-width: thin; }

/* compact language switch */
.lang-mini { font-size: .6875rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; text-decoration: none; color: var(--muted); border: 1px solid var(--line-strong); border-radius: 3px; padding: 2px 7px; }
.lang-mini:hover { background: var(--green-100); color: var(--green-900); }
