/* DCWWG Members – matches www.dcwwg.org.uk: canal green, hi-vis yellow, Bricolage + Atkinson Hyperlegible. */
:root {
  --paper: #f4f7f3; --surface: #ffffff; --ink: #12302b; --muted: #4c615c; --line: #d6e0da;
  --canal: #1d5c52; --canal-soft: #e2eeea; --hivis: #d9f13b; --hivis-ink: #12302b; --brick: #a8482a;
  --foot-bg: #12302b; --foot-fg: #eef4f0; --ok-bg: #e5f3ea; --ok-ink: #1b5e3a; --warn-bg: #fff6dc; --warn-ink: #6b4b00;
  --err-bg: #fbe9e4; --err-ink: #8a2f16;
  --font-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --font-body: "Atkinson Hyperlegible", "Segoe UI", system-ui, sans-serif;
  --radius: 14px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0c1715; --surface: #13221f; --ink: #e6efe9; --muted: #a2b5ae; --line: #253b36;
    --canal: #7cc7b6; --canal-soft: #183530; --brick: #e58a66; --foot-bg: #071210; --foot-fg: #e6efe9;
    --ok-bg: #12301f; --ok-ink: #a7e3bf; --warn-bg: #33290c; --warn-ink: #f3d98a; --err-bg: #3a1a12; --err-ink: #f4b49d;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0c1715; --surface: #13221f; --ink: #e6efe9; --muted: #a2b5ae; --line: #253b36;
  --canal: #7cc7b6; --canal-soft: #183530; --brick: #e58a66; --foot-bg: #071210; --foot-fg: #e6efe9;
  --ok-bg: #12301f; --ok-ink: #a7e3bf; --warn-bg: #33290c; --warn-ink: #f3d98a; --err-bg: #3a1a12; --err-ink: #f4b49d;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font-body); font-size: 1.0625rem; line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--canal); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--hivis); outline-offset: 2px; box-shadow: 0 0 0 5px var(--ink); border-radius: 4px; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.12; letter-spacing: -0.01em; margin: 0; text-wrap: balance; }
code, .mono { font-family: ui-monospace, Consolas, monospace; font-size: .92em; }
.wrap { width: min(72rem, 100% - 2rem); margin-inline: auto; }
.narrow { width: min(40rem, 100% - 2rem); }
.section { padding-block: 2.5rem 3.5rem; }
.center { text-align: center; }
.muted { color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--hivis); color: var(--hivis-ink); padding: .5rem 1rem; z-index: 10; }
.skip:focus { left: 1rem; top: 1rem; }
.eyebrow { font-weight: 700; text-transform: uppercase; letter-spacing: .12em; font-size: .85rem; color: var(--canal); margin: 0 0 .5rem; }
.h1 { font-size: clamp(2rem, 4.5vw, 2.8rem); font-weight: 800; margin-bottom: .6rem; }
.h2 { font-size: 1.7rem; font-weight: 800; margin-bottom: .8rem; }
.h3 { font-size: 1.25rem; font-weight: 700; margin-bottom: .75rem; }
.lede { font-size: 1.15rem; color: var(--muted); margin: 0 0 1.5rem; max-width: 46rem; }
.center .lede { margin-inline: auto; }

/* Header */
.top { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.5rem; }
.brand { display: flex; align-items: center; gap: .7rem; color: inherit; text-decoration: none; }
.brand-logo { width: auto; height: 3rem; background: #fff; border-radius: 8px; padding: 2px 3px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-family: var(--font-display); font-size: 1.1rem; }
.brand-text small { color: var(--muted); font-size: .8rem; }
.top-nav { display: flex; align-items: center; gap: .3rem 1.1rem; flex-wrap: wrap; justify-content: flex-end; }
.top-nav a:not(.btn), .link-btn { color: var(--ink); text-decoration: none; font-weight: 700; font-size: .98rem; }
.top-nav a[aria-current] { text-decoration: underline; text-decoration-color: var(--hivis); text-decoration-thickness: 3px; }
.top-nav a:not(.btn):hover, .link-btn:hover { text-decoration: underline; }
.inline { display: inline; margin: 0; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; font-weight: 700; cursor: pointer; color: inherit; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 2.9rem; padding: .6rem 1.3rem; border-radius: 999px; border: 2px solid transparent; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; transition: transform .1s, background-color .15s; }
.btn:active { transform: translateY(1px); }
.btn-sm { min-height: 2.3rem; padding: .35rem 1rem; font-size: .95rem; }
.btn-hivis { background: var(--hivis); color: var(--hivis-ink); }
.btn-hivis:hover { background: #cbe32c; }
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ink:hover { background: var(--canal); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-danger { background: var(--brick); color: #fff; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1rem 0; }
.actions.center { justify-content: center; }

/* Hero */
.hero { background: var(--foot-bg); color: var(--foot-fg); padding-block: 3.5rem; overflow: hidden; }
.hero .eyebrow { color: var(--hivis); }
.hero h1 { font-size: clamp(2.3rem, 5.5vw, 3.8rem); font-weight: 800; margin-bottom: 1rem; }
.hero .hl { background: var(--hivis); color: var(--hivis-ink); padding: 0 .2em; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.hero .lede { color: inherit; opacity: .9; }
.hero .btn-ghost { color: var(--foot-fg); border-color: rgba(255,255,255,.35); }
.hero .btn-ghost:hover { border-color: var(--foot-fg); }
.hero-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 3rem; align-items: center; }
.card-preview .mcard { transform: rotate(-3deg); box-shadow: 0 30px 60px rgba(0,0,0,.35); }
@media (max-width: 760px) { .hero-grid { grid-template-columns: 1fr; } .card-preview { display: none; } }

.perks { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1rem; }
.perks li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; border-top: 5px solid var(--hivis); }
.perks p { margin: .4rem 0 0; color: var(--muted); }

/* Membership card */
.mcard { position: relative; aspect-ratio: 1.586; max-width: 26rem; width: 100%; border-radius: 18px; padding: 1.3rem 1.4rem; color: #eef4f0; display: flex; flex-direction: column; justify-content: space-between;
  background: radial-gradient(120% 140% at 100% 0%, #2a7a6c 0%, #1d5c52 40%, #12302b 100%); overflow: hidden; box-shadow: 0 12px 30px rgba(18,48,43,.25); text-align: left; }
.mcard::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 9px; background: repeating-linear-gradient(90deg, var(--hivis) 0 22px, transparent 22px 34px); opacity: .9; }
.mcard-top { display: flex; align-items: center; gap: .75rem; font-family: var(--font-display); font-weight: 800; line-height: 1.15; }
.mcard-top img { height: 3rem; width: auto; background: #fff; border-radius: 8px; padding: 2px 3px; }
.mcard-top small { font-family: var(--font-body); font-weight: 400; opacity: .85; font-size: .8rem; }
.mcard-name { font-family: var(--font-display); font-size: 1.5rem; font-weight: 800; margin-top: auto; padding-bottom: .4rem; overflow-wrap: anywhere; }
.mcard-meta { display: flex; flex-wrap: wrap; gap: .4rem 1.5rem; font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; opacity: .95; padding-bottom: .5rem; }
.mcard-meta span { display: flex; flex-direction: column; }
.mcard-meta b { font-family: ui-monospace, Consolas, monospace; font-size: .95rem; letter-spacing: .02em; text-transform: none; }
.mcard-foot { position: absolute; right: 1.4rem; bottom: 1.6rem; font-size: .72rem; opacity: .8; }
@media (max-width: 480px) { .mcard-foot { display: none; } }
.mcard-lg { max-width: 34rem; margin: 0 auto 1.5rem; }
.mcard-lg .mcard-top { font-size: 1rem; }

/* Forms and panels */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; margin-bottom: 1.25rem; }
.panel.soft { background: var(--canal-soft); border-color: transparent; }
.panel.flush { padding: 0; overflow: hidden; }
.panel.danger { border-color: var(--brick); }
.panel.ok-panel { border-left: 6px solid var(--ok-ink); }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.form .field, .field { margin-bottom: 1rem; border: 0; padding: 0; min-width: 0; }
label, .label, legend { display: block; font-weight: 700; margin-bottom: .3rem; }
.opt { font-weight: 400; color: var(--muted); }
input[type=text], input:not([type]), input[type=email], input[type=password], input[type=tel], input[type=search], input[type=url], select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--paper); border: 2px solid var(--line); border-radius: 10px; padding: .6rem .8rem; min-height: 2.9rem; }
input:focus, select:focus, textarea:focus { border-color: var(--canal); outline: none; box-shadow: 0 0 0 3px var(--hivis); }
textarea.code { font-family: ui-monospace, Consolas, monospace; font-size: .85rem; line-height: 1.45; white-space: pre; }
.hint { color: var(--muted); font-size: .9rem; margin: .3rem 0 0; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
@media (max-width: 600px) { .row2 { grid-template-columns: 1fr; } }
.choice { display: flex; gap: .6rem; align-items: flex-start; font-weight: 400; margin: .35rem 0; cursor: pointer; }
.choice input { width: 1.25rem; height: 1.25rem; margin-top: .2rem; accent-color: var(--canal); flex: none; }
.choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 0 1rem; }
.consent { margin: 1.25rem 0; padding: .9rem 1rem; background: var(--canal-soft); border-radius: 10px; }
.hp { position: absolute; left: -5000px; width: 1px; height: 1px; overflow: hidden; }
.notice { padding: .85rem 1.1rem; border-radius: 10px; margin: 1rem 0; background: var(--canal-soft); }
.notice.ok { background: var(--ok-bg); color: var(--ok-ink); font-weight: 700; }
.notice.err { background: var(--err-bg); color: var(--err-ink); font-weight: 700; }
.notice.warn { background: var(--warn-bg); color: var(--warn-ink); }
.notice a { color: inherit; }
.big-icon { font-size: 3.5rem; line-height: 1; margin-bottom: 1rem; }
details > summary { cursor: pointer; margin: 0; list-style-position: inside; }
details[open] > summary { margin-bottom: 1rem; }

.account-grid { display: grid; grid-template-columns: minmax(0, 24rem) minmax(0, 1fr); gap: 2rem; margin-top: 1.5rem; align-items: start; }
@media (max-width: 860px) { .account-grid { grid-template-columns: 1fr; } }
.facts { margin: 1rem 0 0; display: grid; gap: .5rem; }
.facts div { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--line); padding-bottom: .4rem; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; text-align: right; }
.pill { display: inline-block; font-size: .8rem; font-weight: 700; padding: .1rem .6rem; border-radius: 999px; background: var(--canal-soft); color: var(--ink); white-space: nowrap; }
.pill-active { background: var(--ok-bg); color: var(--ok-ink); }
.pill-pending, .pill-imported { background: var(--warn-bg); color: var(--warn-ink); }
.pill-suspended { background: var(--err-bg); color: var(--err-ink); }
.card-page .mcard { margin-top: 1rem; }

/* Footer */
.foot { background: var(--foot-bg); color: var(--foot-fg); padding-block: 2.5rem 1.5rem; margin-top: 2rem; }
.foot a { color: inherit; }
.foot-h { font-family: var(--font-body); font-size: .85rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; opacity: .75; margin-bottom: .8rem; }
.quick { list-style: none; margin: 0 0 2rem; padding: 0; display: grid; gap: .6rem; grid-template-columns: repeat(auto-fill, minmax(13.5rem, 1fr)); }
.quick a { display: flex; flex-direction: column; height: 100%; padding: .65rem .9rem; border: 1px solid rgba(255,255,255,.22); border-radius: .75rem; text-decoration: none; line-height: 1.3; }
.quick a:hover, .quick a:focus-visible { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.5); }
.quick a[aria-current] { border-color: var(--hivis); }
.quick strong { font-weight: 700; }
.quick small { font-size: .8rem; opacity: .75; }
.foot-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; border-top: 1px solid rgba(255,255,255,.15); padding-top: 1.25rem; font-size: .9rem; }
.saltway { display: inline-flex; align-items: center; gap: .45rem; font-weight: 700; border: 1px solid rgba(255,255,255,.3); border-radius: 999px; padding: .3rem .8rem; font-size: .85rem; }
.saltway .dot { width: .5rem; height: .5rem; border-radius: 50%; background: var(--hivis); }
@media (max-width: 600px) { .hide-sm { display: none !important; } .top-row { flex-wrap: wrap; padding-block: .6rem; } .brand-text small { display: none; } }

/* Admin */
.admin { background: var(--paper); }
.shell { display: grid; grid-template-columns: 15.5rem minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--foot-bg); color: var(--foot-fg); padding: 1.25rem 1rem; display: flex; flex-direction: column; gap: 1rem; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.side .brand-text small { color: inherit; opacity: .7; }
.side nav { display: flex; flex-direction: column; gap: .15rem; }
.side nav a { color: inherit; text-decoration: none; padding: .5rem .75rem; border-radius: 8px; font-weight: 700; display: flex; justify-content: space-between; }
.side nav a:hover { background: rgba(255,255,255,.08); }
.side nav a[aria-current] { background: var(--hivis); color: var(--hivis-ink); }
.side-h { font-size: .75rem; text-transform: uppercase; letter-spacing: .12em; opacity: .6; margin: 1rem .75rem .25rem; }
.side-out { margin-top: auto; padding: 0 .75rem; }
.side-out .link-btn { color: inherit; opacity: .85; }
.dot-warn { background: var(--brick); color: #fff; border-radius: 999px; width: 1.2rem; height: 1.2rem; display: inline-grid; place-items: center; font-size: .75rem; }
.admin-top { display: none; }
.admin-main { padding: 2rem clamp(1rem, 3vw, 2.5rem); max-width: 72rem; }
.admin-foot { padding: 0 clamp(1rem, 3vw, 2.5rem) 2rem; }
.admin-foot .saltway { border-color: var(--line); color: var(--muted); }
.admin .lede { font-size: 1.05rem; }
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; width: 16rem; z-index: 20; transform: translateX(-100%); transition: transform .2s; }
  .side.open { transform: none; box-shadow: 0 0 0 100vmax rgba(0,0,0,.4); }
  .admin-top { display: flex; align-items: center; gap: 1rem; padding: .75rem 1rem; background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; font-weight: 700; }
  .menu-btn { font: inherit; font-weight: 700; border: 2px solid var(--line); background: none; color: inherit; border-radius: 8px; padding: .3rem .8rem; }
}
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.2rem; text-decoration: none; color: inherit; display: flex; flex-direction: column; }
.stat b { font-family: var(--font-display); font-size: 2.2rem; line-height: 1.1; }
.stat span { color: var(--muted); font-size: .95rem; }
.stat:hover { border-color: var(--canal); }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .97rem; }
.table th { text-align: left; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: .6rem .9rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: .6rem .9rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table td a { display: inline-flex; align-items: center; gap: .6rem; font-weight: 700; text-decoration: none; color: var(--ink); }
.table td a:hover { text-decoration: underline; }
.avatar { width: 2rem; height: 2rem; border-radius: 50%; background: var(--canal-soft); color: var(--canal); display: inline-grid; place-items: center; font-weight: 700; font-size: .8rem; flex: none; }
.avatar-lg { width: 3.5rem; height: 3.5rem; font-size: 1.2rem; }
.member-head { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.25rem; }
.member-head .h2 { margin: 0; }
.member-head p { margin: .2rem 0 0; }
.admin-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 1.25rem; align-items: start; }
@media (max-width: 1000px) { .admin-grid { grid-template-columns: 1fr; } }
.filters { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: .75rem; }
.filters input { flex: 1 1 18rem; }
.filters select { flex: 0 1 18rem; }
.narrow-form { max-width: 44rem; }
.steps { padding-left: 1.3rem; }
.steps li { margin-bottom: .6rem; }
.problems { color: var(--err-ink); }
.pad { padding: 1rem 1.25rem; margin: 0; }

@media print {
  .top, .foot, .actions, .muted { display: none !important; }
  body { background: #fff; }
  .mcard { box-shadow: none; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
.mcard-lg .mcard-top img { height: 4.5rem; }
