/* ==========================================================================
   bravoclubmember.com — member help centre
   Documentation-shell treatment. Brand tokens shared with the family;
   layout logic, accent use and type hierarchy deliberately distinct.
   Dark-first: full palette on bare :root, light variants layered after.
   ========================================================================== */

:root {
  /* ground / surfaces */
  --bg-main: #001C26;
  --surface-1: #002836;
  --surface-2: #003348;
  --surface-3: #003447;
  --bg-deep: #001117;

  /* borders / rules */
  --b1: #004057;
  --b2: #004F6B;
  --b3: #003348;
  --b4: #003F56;

  /* accents */
  --cyan: #4FD1FF;
  --yellow: #FFEB00;
  --yellow-tint: #FDFFE7;
  --teal: #38BEA9;

  /* text */
  --text: #FFFFFF;
  --text-muted: #AEB0B3;

  /* derived roles — every one also defined here so no colour is media-only */
  --link: #4FD1FF;
  --link-hover: #FFFFFF;
  --accent-ink: #4FD1FF;      /* cyan used as text */
  --badge-ink: #FFEB00;       /* the single yellow element per view */
  --teal-ink: #38BEA9;
  --nav-active-bg: #003348;
  --nav-active-ink: #FFFFFF;
  --nav-ink: #AEB0B3;
  --code-bg: #001117;
  --code-ink: #FFFFFF;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.03);
  --focus: #4FD1FF;

  /* radii — brand scale */
  --r-xs: 4px;
  --r-sm: 6px;
  --r-md: 8px;
  --r-mdx: 12px;
  --r-lg: 14px;
  --r-xl: 16px;
  --r-xxl: 24px;
  --r-2xl: 32px;
  --r-3xl: 48px;
  --r-4xl: 64px;

  --font-body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Poppins", "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --measure: 68ch;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg-main: #F2F7FA;
    --surface-1: #FFFFFF;
    --surface-2: #E8F1F6;
    --surface-3: #DFEBF2;
    --bg-deep: #E4EEF3;

    --b1: #C4D8E2;
    --b2: #A9C6D4;
    --b3: #D3E3EC;
    --b4: #BCD5E0;

    --cyan: #00607C;
    --yellow: #FFEB00;
    --yellow-tint: #FDFFE7;
    --teal: #0E7B69;

    --text: #001C26;
    --text-muted: #4C606B;

    --link: #00607C;
    --link-hover: #001C26;
    --accent-ink: #00607C;
    --badge-ink: #6A5E00;
    --teal-ink: #0E7B69;
    --nav-active-bg: #DFEBF2;
    --nav-active-ink: #001C26;
    --nav-ink: #4C606B;
    --code-bg: #E4EEF3;
    --code-ink: #001C26;
    --shadow: 0 1px 0 rgba(0, 28, 38, 0.04);
    --focus: #00607C;
    color-scheme: light;
  }
}

:root[data-theme="light"] {
  --bg-main: #F2F7FA;
  --surface-1: #FFFFFF;
  --surface-2: #E8F1F6;
  --surface-3: #DFEBF2;
  --bg-deep: #E4EEF3;

  --b1: #C4D8E2;
  --b2: #A9C6D4;
  --b3: #D3E3EC;
  --b4: #BCD5E0;

  --cyan: #00607C;
  --yellow: #FFEB00;
  --yellow-tint: #FDFFE7;
  --teal: #0E7B69;

  --text: #001C26;
  --text-muted: #4C606B;

  --link: #00607C;
  --link-hover: #001C26;
  --accent-ink: #00607C;
  --badge-ink: #6A5E00;
  --teal-ink: #0E7B69;
  --nav-active-bg: #DFEBF2;
  --nav-active-ink: #001C26;
  --nav-ink: #4C606B;
  --code-bg: #E4EEF3;
  --code-ink: #001C26;
  --shadow: 0 1px 0 rgba(0, 28, 38, 0.04);
  --focus: #00607C;
  color-scheme: light;
}

/* --------------------------------------------------------------- base --- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--bg-main);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.65;
  font-synthesis-weight: none;
  text-rendering: optimizeLegibility;
}

a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); text-decoration: underline; text-underline-offset: 3px; }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: var(--r-xs);
}

hr {
  border: 0;
  border-top: 1px solid var(--b1);
  margin: 32px 0;
}

::selection { background: var(--cyan); color: var(--bg-main); }

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--b2);
  border-radius: var(--r-sm);
  padding: 10px 16px;
  font-weight: 600;
}
.skip:focus { left: 12px; top: 12px; }

/* ------------------------------------------------------------- masthead --- */

.masthead {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--bg-deep);
  border-bottom: 1px solid var(--b1);
}

.masthead-in {
  max-width: 1360px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
  font-size: 15px;
}
.mark:hover { text-decoration: none; color: var(--text); }
.mark:hover .mark-name { color: var(--accent-ink); }

.mark-glyph {
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: var(--r-md);
  background: var(--surface-2);
  border: 1px solid var(--b2);
  display: grid;
  place-items: center;
  color: var(--accent-ink);
  font-family: var(--font-display);
  font-size: 15px;
  line-height: 1;
  font-weight: 700;
}

.mark-name { transition: color 0.12s ease; }

.mark-sub {
  color: var(--text-muted);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-left: 1px solid var(--b2);
  padding-left: 12px;
  margin-left: 2px;
}

.masthead-spacer { flex: 1 1 auto; }

.masthead-mail {
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  color: var(--link);
  border: 1px solid var(--b2);
  border-radius: var(--r-sm);
  padding: 5px 11px;
  background: var(--surface-1);
  white-space: nowrap;
}
.masthead-mail:hover { border-color: var(--cyan); text-decoration: none; }

/* --------------------------------------------------------------- shell --- */

.layout {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  align-items: start;
}

@media (min-width: 900px) {
  .layout {
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 40px;
  }
}
@media (min-width: 1280px) {
  .layout {
    grid-template-columns: 250px minmax(0, 1fr) 208px;
    gap: 48px;
  }
}

/* ------------------------------------------------------------- sidebar --- */

.sidebar {
  border-bottom: 1px solid var(--b1);
  margin: 0 -20px;
  padding: 10px 20px;
}

.sidebar-in {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: thin;
  padding-bottom: 2px;
}

.nav-group { flex: none; display: flex; gap: 8px; }

.nav-label {
  display: none;
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
  margin: 0 0 8px;
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 8px;
}

.nav-list a {
  display: block;
  white-space: nowrap;
  font-size: 13px;
  color: var(--nav-ink);
  border: 1px solid var(--b1);
  background: var(--surface-1);
  border-radius: var(--r-sm);
  padding: 6px 12px;
}
.nav-list a:hover { color: var(--text); border-color: var(--b2); text-decoration: none; }
.nav-list a[aria-current="page"] {
  color: var(--nav-active-ink);
  background: var(--nav-active-bg);
  border-color: var(--cyan);
}

@media (min-width: 900px) {
  .sidebar {
    position: sticky;
    top: 54px;
    border-bottom: 0;
    border-right: 1px solid var(--b1);
    margin: 0;
    padding: 34px 24px 40px 0;
    max-height: calc(100vh - 54px);
    overflow-y: auto;
  }
  .sidebar-in { display: block; overflow: visible; }
  .nav-group { display: block; margin-bottom: 26px; }
  .nav-label { display: block; }
  .nav-list { display: block; }
  .nav-list li + li { margin-top: 1px; }
  .nav-list a {
    white-space: normal;
    border: 0;
    background: none;
    border-left: 2px solid var(--b1);
    border-radius: 0;
    padding: 5px 0 5px 13px;
    font-size: 13.5px;
  }
  .nav-list a:hover { border-left-color: var(--b2); }
  .nav-list a[aria-current="page"] {
    background: none;
    border-left-color: var(--cyan);
    color: var(--nav-active-ink);
    font-weight: 600;
  }
}

/* ----------------------------------------------------------------- toc --- */

.toc { display: none; }

@media (min-width: 1280px) {
  .toc {
    display: block;
    position: sticky;
    top: 54px;
    padding: 40px 0;
  }
  .toc h2 {
    font-family: var(--font-body);
    font-size: 10.5px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 600;
    margin: 0 0 12px;
    padding: 0;
    border: 0;
  }
  .toc h2::before { content: none; }
  .toc ol {
    list-style: none;
    margin: 0;
    padding: 0;
    counter-reset: toc;
  }
  .toc li { counter-increment: toc; margin-bottom: 9px; }
  .toc a {
    display: block;
    font-size: 12.5px;
    line-height: 1.4;
    color: var(--text-muted);
  }
  .toc a::before {
    content: counter(toc, decimal-leading-zero);
    display: inline-block;
    width: 24px;
    color: var(--b2);
    font-variant-numeric: tabular-nums;
  }
  .toc a:hover { color: var(--text); text-decoration: none; }
  .toc a:hover::before { color: var(--cyan); }
}

/* ------------------------------------------------------------ main doc --- */

main {
  padding: 34px 0 72px;
  min-width: 0;
}

.eyebrow {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--accent-ink);
  margin: 0 0 10px;
}

h1 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.12;
  font-size: clamp(28px, 4.4vw, 40px);
  margin: 0 0 16px;
  max-width: 22ch;
}

.lede {
  font-size: 17px;
  line-height: 1.55;
  color: var(--text);
  max-width: var(--measure);
  margin: 0 0 28px;
}

.doc {
  border-top: 1px solid var(--b1);
  padding-top: 26px;
  margin-top: 34px;
  scroll-margin-top: 70px;
}

.doc:first-of-type { margin-top: 28px; }

h2 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.015em;
  font-size: 21px;
  line-height: 1.25;
  margin: 0 0 14px;
  position: relative;
  padding-left: 18px;
}
h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 8px;
  height: 8px;
  border-radius: var(--r-xs);
  background: var(--cyan);
}

h3 {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
  margin: 26px 0 8px;
}

/* step titles: level-3 headings that need sentence case, not the label treatment */
.steps h3 {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0;
  text-transform: none;
  margin: 0 0 6px;
}

p, ul, ol, dl { max-width: var(--measure); }
p { margin: 0 0 14px; }
ul, ol { margin: 0 0 14px; padding-left: 20px; }
li { margin-bottom: 7px; }
li::marker { color: var(--b2); }
ol li::marker { color: var(--text-muted); font-variant-numeric: tabular-nums; }

strong { font-weight: 600; }

.muted { color: var(--text-muted); }
.small { font-size: 13px; line-height: 1.6; }

code, .mono {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: var(--code-bg);
  color: var(--code-ink);
  border: 1px solid var(--b1);
  border-radius: var(--r-xs);
  padding: 1px 6px;
  word-break: break-word;
}

/* ------------------------------------------------------------- modules --- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin: 22px 0 8px;
  max-width: none;
  list-style: none;
  padding: 0;
}
.cards li { margin: 0; }

.card {
  display: block;
  height: 100%;
  background: var(--surface-1);
  border: 1px solid var(--b1);
  border-radius: var(--r-mdx);
  padding: 16px 18px;
  color: var(--text);
}
.card:hover {
  border-color: var(--cyan);
  text-decoration: none;
  color: var(--text);
}
.card-k {
  display: block;
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-weight: 600;
}
.card-t {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.01em;
  margin-bottom: 5px;
}
.card:hover .card-t { color: var(--accent-ink); }
.card-d {
  display: block;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-muted);
}

.note {
  border: 1px solid var(--b2);
  border-left: 3px solid var(--cyan);
  background: var(--surface-1);
  border-radius: var(--r-md);
  padding: 14px 18px;
  margin: 20px 0;
  max-width: var(--measure);
}
.note > :last-child { margin-bottom: 0; }
.note-k {
  display: block;
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--accent-ink);
  margin-bottom: 6px;
}
.note.is-positive { border-left-color: var(--teal); }
.note.is-positive .note-k { color: var(--teal-ink); }

.panel {
  background: var(--surface-1);
  border: 1px solid var(--b1);
  border-radius: var(--r-lg);
  padding: 20px 22px;
  margin: 22px 0;
  max-width: var(--measure);
}
.panel > :last-child { margin-bottom: 0; }
.panel h3:first-child { margin-top: 0; }

.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 18px 0;
  max-width: var(--measure);
}
.steps > li {
  counter-increment: step;
  position: relative;
  padding-left: 42px;
  margin-bottom: 16px;
}
.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--b2);
  background: var(--surface-1);
  color: var(--accent-ink);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.checks { list-style: none; padding: 0; margin: 16px 0; max-width: var(--measure); }
.checks li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 10px;
}
.checks li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.55em;
  width: 9px;
  height: 9px;
  border: 1px solid var(--cyan);
  border-radius: var(--r-xs);
}

.dl { margin: 18px 0; max-width: var(--measure); }
.dl dt {
  font-weight: 600;
  font-size: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--b3);
  margin-bottom: 4px;
}
.dl dd {
  margin: 0 0 12px;
  color: var(--text-muted);
  font-size: 14px;
}

.scroll {
  overflow-x: auto;
  border: 1px solid var(--b1);
  border-radius: var(--r-md);
  margin: 20px 0;
  background: var(--surface-1);
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 520px;
  font-size: 13.5px;
}
caption {
  text-align: left;
  padding: 12px 16px 0;
  font-size: 12px;
  color: var(--text-muted);
}
th, td {
  text-align: left;
  padding: 11px 16px;
  border-bottom: 1px solid var(--b3);
  vertical-align: top;
}
thead th {
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
  background: var(--surface-2);
  border-bottom: 1px solid var(--b1);
}
tbody tr:last-child td { border-bottom: 0; }

.mail {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.95em;
  word-break: break-word;
}

.mail-block {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--surface-2);
  border: 1px solid var(--b2);
  border-radius: var(--r-md);
  padding: 10px 16px;
  margin: 6px 0 18px;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 14px;
  color: var(--link);
  max-width: 100%;
  word-break: break-word;
}
.mail-block:hover { border-color: var(--cyan); text-decoration: none; }

.pagenav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 44px;
  padding-top: 22px;
  border-top: 1px solid var(--b1);
}
.pagenav a {
  font-size: 13px;
  border: 1px solid var(--b1);
  border-radius: var(--r-sm);
  padding: 8px 14px;
  background: var(--surface-1);
}
.pagenav a:hover { border-color: var(--cyan); text-decoration: none; }

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

.site-foot {
  background: var(--bg-deep);
  border-top: 1px solid var(--b1);
  margin-top: 0;
}

.foot-in {
  max-width: 1360px;
  margin: 0 auto;
  padding: 34px 20px 44px;
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 760px) {
  .foot-in { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
}

.foot-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  font-size: 13px;
}
.foot-links a { color: var(--text-muted); }
.foot-links a:hover { color: var(--link); }

.foot-note {
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 62ch;
  margin: 14px 0 0;
}

.age {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--b2);
  border-radius: var(--r-sm);
  padding: 7px 13px;
  font-size: 12.5px;
  color: var(--text-muted);
}
.age b {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  color: var(--badge-ink);
  letter-spacing: 0.02em;
}

.foot-domain {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 12.5px;
  color: var(--text-muted);
  margin: 16px 0 0;
}
