html,body{margin:0;min-height:100vh;}


#eh-root {
  --ink: #2E2C2A;
  --ink-soft: #5F6553;
  --paper: #FBF5EE;
  --paper-2: #F0E1D1;
  --card: #F0E1D1;
  --line: rgba(75,79,66,0.18);
  --olive: #4B4F42;
  --olive-muted: #5F6553;
  --copper: #A85F38;
  --champagne: #B98A5E;
  --sand: #E4C8AA;
  --amber: #A85F38;
  --amber-deep: #7f472a;
  --enamel: #5F6553;
  --clay: #A85F38;
  --gold: #B98A5E;
  font-family: 'Source Sans 3', 'Gill Sans', 'Trebuchet MS', Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  min-height: 100%;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}
#eh-root * { box-sizing: border-box; }
#eh-root .serif { font-family: 'Source Sans 3', 'Gill Sans', 'Trebuchet MS', Arial, sans-serif; }
#eh-root .mono { font-family: 'Source Sans 3', 'Gill Sans', 'Trebuchet MS', Arial, sans-serif; font-variant-numeric: tabular-nums; }

#eh-root .wrap { max-width: 1040px; margin: 0 auto; padding: 28px 20px 60px; }

/* ---- topbar ---- */
#eh-root .topbar {
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 16px 20px;
  background: var(--card);
  position: sticky;
  top: 0;
  z-index: 500;
}
#eh-root .brand { display: flex; align-items: baseline; gap: 10px; }
#eh-root .brand .mark {
  font-family: 'Source Sans 3', 'Gill Sans', 'Trebuchet MS', Arial, sans-serif; font-weight: 700; font-size: 20px; letter-spacing: 0.5px;
}
#eh-root .brand .mark .dot { color: var(--amber); }

#eh-root .brand .mark {
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
}
#eh-root .brand .mark:hover {
  color: var(--ink-soft);
}
#eh-root .brand .who { font-family: 'Source Sans 3', 'Gill Sans', 'Trebuchet MS', Arial, sans-serif; font-size: 12px; color: var(--ink-soft); }
#eh-root .topbar-actions { display:flex; gap:10px; align-items:center; }

/* ---- buttons ---- */
#eh-root button { font-family: 'Source Sans 3', 'Gill Sans', 'Trebuchet MS', Arial, sans-serif; cursor: pointer; border-radius: 3px; }
#eh-root .btn {
  background: var(--ink); color: var(--paper); border: 1px solid var(--ink);
  padding: 10px 18px; font-size: 13px; font-weight: 600; letter-spacing: 0.3px;
}
#eh-root .btn:hover { background: var(--ink-soft); }
#eh-root .btn-ghost {
  background: transparent; color: var(--ink); border: 1px solid var(--line);
  padding: 9px 16px; font-size: 13px; font-weight: 600;
}
#eh-root .btn-ghost:hover { border-color: var(--ink); }
#eh-root .btn-ghost.active-nav { background: var(--ink); color: var(--paper); border-color: var(--ink); }
#eh-root .btn-amber { background: var(--amber); border-color: var(--amber); color: #fff; }
#eh-root .btn-amber:hover { background: var(--amber-deep); }
#eh-root .btn-sm { padding: 5px 10px; font-size: 12px; }
#eh-root .btn-danger { background: transparent; border: 1px solid var(--clay); color: var(--clay); }
#eh-root .btn-danger:hover { background: var(--clay); color: #fff; }
#eh-root .btn:disabled { opacity: 0.35; cursor: not-allowed; }

/* ---- login ---- */
#eh-root .login-screen { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 30px 16px; }
#eh-root .login-card {
  width: 100%; max-width: 420px; background: var(--card);
  border: 1px solid var(--line); padding: 36px 32px;
  position: relative;
}
#eh-root .login-card::before {
  content: ''; position: absolute; top: 10px; left: 10px; right: 10px; bottom: 10px;
  border: 1px solid var(--line); pointer-events: none;
}
#eh-root .login-title { font-size: 26px; font-weight: 700; margin: 0 0 4px; }
#eh-root .login-sub { font-size: 13px; color: var(--ink-soft); margin: 0 0 26px; }
#eh-root .role-toggle { display: flex; gap: 8px; margin-bottom: 22px; }
#eh-root .role-toggle button {
  flex: 1; padding: 10px; font-size: 13px; font-weight: 600;
  background: var(--paper-2); border: 1px solid var(--line); color: var(--ink-soft);
}
#eh-root .role-toggle button.active { background: var(--ink); color: var(--paper); border-color: var(--ink); }
#eh-root .field { margin-bottom: 16px; }
#eh-root .field label { display:block; font-size: 11px; text-transform: uppercase; letter-spacing: 0.6px; color: var(--ink-soft); margin-bottom: 6px; font-weight: 600; }
#eh-root .field input, #eh-root .field select {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); background: #fff;
  font-size: 14px; font-family: 'Source Sans 3', 'Gill Sans', 'Trebuchet MS', Arial, sans-serif; color: var(--ink); border-radius: 2px;
}
#eh-root .field input:focus, #eh-root .field select:focus { outline: 2px solid var(--amber); outline-offset: 1px; }
#eh-root .login-msg { font-size: 12.5px; padding: 9px 12px; margin-bottom: 14px; border-left: 3px solid var(--amber); background: var(--paper-2); }
#eh-root .login-msg.err { border-color: var(--clay); color: var(--clay); }
#eh-root .fine-print { font-size: 11px; color: var(--ink-soft); margin-top: 18px; line-height: 1.5; }

/* ---- cards / sections ---- */
#eh-root .grid { display: grid; gap: 16px; }
#eh-root .grid-3 { grid-template-columns: repeat(3, 1fr); }
#eh-root .grid-2 { grid-template-columns: 1.3fr 1fr; }
@media (max-width: 760px) { #eh-root .grid-3, #eh-root .grid-2 { grid-template-columns: 1fr; } }

#eh-root .card {
  background: var(--card); border: 1px solid var(--line); padding: 20px;
}
#eh-root .card h3 { margin: 0 0 14px; font-size: 13px; text-transform: uppercase; letter-spacing: 0.7px; color: var(--ink-soft); font-weight: 700; }
#eh-root .stat-big { font-family: 'Source Sans 3', 'Gill Sans', 'Trebuchet MS', Arial, sans-serif; font-size: 30px; font-weight: 600; line-height: 1; }
#eh-root .stat-label { font-size: 11.5px; color: var(--ink-soft); margin-top: 6px; }

#eh-root .tier-bar { height: 8px; background: var(--paper-2); border-radius: 4px; overflow: hidden; margin-top: 10px; }
#eh-root .tier-bar-fill { height: 100%; background: var(--amber); }
#eh-root .tier-labels { display:flex; justify-content: space-between; font-size: 10.5px; color: var(--ink-soft); margin-top: 5px; font-family: 'Source Sans 3', 'Gill Sans', 'Trebuchet MS', Arial, sans-serif; }

/* grade stamp */
#eh-root .stamp {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%; border: 2px solid currentColor;
  font-family: 'Source Sans 3', 'Gill Sans', 'Trebuchet MS', Arial, sans-serif; font-weight: 700; font-size: 14px;
  transform: rotate(-6deg); flex-shrink: 0;
}
#eh-root .stamp.sm { width: 28px; height: 28px; font-size: 11px; }
#eh-root .g-Astar { color: var(--gold); }
#eh-root .g-A { color: var(--enamel); }
#eh-root .g-B { color: #4a7a9c; }
#eh-root .g-C { color: var(--amber-deep); }
#eh-root .g-D { color: var(--clay); }

/* form */
#eh-root .entry-form { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; align-items: end; }
#eh-root .entry-form .field { margin-bottom: 0; }
#eh-root .entry-form .field.wide { grid-column: span 2; }
@media (max-width: 900px) { #eh-root .entry-form { grid-template-columns: repeat(2,1fr); } #eh-root .entry-form .field.wide { grid-column: span 2; } }

/* table */
#eh-root table { width: 100%; border-collapse: collapse; font-size: 13px; }
#eh-root thead th {
  text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--ink-soft); border-bottom: 1px solid var(--ink); padding: 8px 10px; font-weight: 700;
}
#eh-root tbody td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
#eh-root tbody tr:hover { background: var(--paper-2); }
#eh-root .num { font-family: 'Source Sans 3', 'Gill Sans', 'Trebuchet MS', Arial, sans-serif; }
#eh-root .muted { color: var(--ink-soft); }
#eh-root .empty-state { padding: 30px 10px; text-align: center; color: var(--ink-soft); font-size: 13px; }

/* breakdown bars */
#eh-root .bd-row { display: grid; grid-template-columns: 1fr auto auto 90px; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
#eh-root .bd-name { font-weight: 600; font-size: 13.5px; }
#eh-root .bd-bar-track { height: 6px; background: var(--paper-2); border-radius: 3px; overflow: hidden; }
#eh-root .bd-bar-fill { height: 100%; background: var(--enamel); }
#eh-root .bd-bar-fill.low { background: var(--clay); }
#eh-root .tag { font-size: 10px; padding: 2px 7px; border-radius: 10px; font-weight: 700; letter-spacing: 0.3px; text-transform: uppercase; }
#eh-root .tag.good { background: rgba(79,122,104,0.15); color: var(--enamel); }
#eh-root .tag.bad { background: rgba(177,74,61,0.15); color: var(--clay); }

#eh-root .month-nav { display: flex; align-items: center; gap: 10px; font-family: 'Source Sans 3', 'Gill Sans', 'Trebuchet MS', Arial, sans-serif; font-size: 13px; }
#eh-root .month-nav button { background: none; border: 1px solid var(--line); width: 28px; height: 28px; font-size: 14px; }

#eh-root .assoc-card { background: var(--card); border: 1px solid var(--line); padding: 16px 18px; display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; cursor: pointer; }
#eh-root .assoc-card:hover { border-color: var(--ink); }
#eh-root .assoc-name { font-family: 'Source Sans 3', 'Gill Sans', 'Trebuchet MS', Arial, sans-serif; font-weight: 700; font-size: 16px; }

#eh-root .pill-input { display: flex; gap: 8px; }
#eh-root .chip { display:inline-flex; align-items:center; gap:6px; background: var(--paper-2); padding: 5px 10px; border-radius: 14px; font-size: 12px; margin: 3px 5px 3px 0; }
#eh-root .chip button { background:none; border:none; color: var(--clay); font-weight:700; padding:0; line-height:1; }

#eh-root .back-link { font-size: 12.5px; color: var(--ink-soft); cursor: pointer; display:inline-flex; align-items:center; gap:5px; margin-bottom: 14px; }
#eh-root .back-link:hover { color: var(--ink); }

#eh-root .section-gap { margin-top: 20px; }
#eh-root .help-note { font-size: 12px; color: var(--ink-soft); margin-top: 8px; line-height: 1.5; }
#eh-root .loading-msg { padding: 40px; text-align: center; color: var(--ink-soft); font-family: 'Source Sans 3', 'Gill Sans', 'Trebuchet MS', Arial, sans-serif; font-size: 13px; }

.eh-modal-overlay {
  position: fixed; inset: 0; background: rgba(22,35,44,0.55);
  display: flex; align-items: center; justify-content: center;
  padding: 20px; z-index: 1000;
}
.eh-modal-card {
  font-family: 'Source Sans 3', 'Gill Sans', 'Trebuchet MS', Arial, sans-serif; color: #2E2C2A;
  width: 100%; max-width: 420px; background: #fffdf8;
  border: 1px solid rgba(22,35,44,0.14); padding: 28px 26px;
}

#eh-footer {
  text-align: center;
  font-family: 'Source Sans 3', 'Gill Sans', 'Trebuchet MS', Arial, sans-serif;
  font-size: 11.5px;
  color: var(--ink-soft);
  padding: 28px 20px 22px;
  border-top: 1px solid var(--line);
  margin-top: 24px;
}

body {
  min-height: 100%;
}

body {
  margin: 0;
}

#eh-root {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

#eh-main {
  flex: 1;
}

#eh-footer {
  margin-top: auto;
}

/* Admin user-management rows: allow multiple action buttons to wrap inside the card */
#eh-root .manage-row {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
}
#eh-root .manage-person {
  min-width: 0;
}
#eh-root .manage-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
  max-width: 100%;
}
#eh-root .manage-actions button {
  white-space: nowrap;
}
@media (max-width: 760px) {
  #eh-root .manage-row {
    grid-template-columns: 1fr;
  }
  #eh-root .manage-actions {
    justify-content: flex-start;
  }
}

/* Keep the whole rendered topbar wrapper pinned while the page scrolls */
#eh-topbar {
  position: sticky;
  top: 0;
  z-index: 1000;
}

/* Keep the footer visible at the bottom of the viewport while scrolling */
#eh-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 900;
  background: var(--paper);
}
#eh-main {
  padding-bottom: 78px;
}

/* Fixed-footer spacing: avoid fake scroll on short pages like login */
#eh-main {
  padding-bottom: 0;
}
#eh-root .wrap {
  padding-bottom: 98px;
}
#eh-root .login-screen {
  min-height: calc(100vh - 72px);
}

/* Match fixed footer colour to the topbar/header */
#eh-footer {
  background: var(--card);
}

/* Responsive compact footer, especially for mobile */
#eh-footer {
  font-size: clamp(8.5px, 2.2vw, 11.5px);
  line-height: 1.25;
  padding: clamp(6px, 1.4vh, 14px) clamp(10px, 3vw, 20px);
}
#eh-root .wrap {
  padding-bottom: clamp(56px, 9vh, 98px);
}
#eh-root .login-screen {
  min-height: calc(100vh - clamp(34px, 7vh, 58px));
}
@media (max-width: 760px) {
  #eh-footer {
    font-size: 8.5px;
    padding: 5px 10px 6px;
  }
  #eh-root .wrap {
    padding-bottom: 52px;
  }
  #eh-root .login-screen {
    min-height: calc(100vh - 36px);
  }
}

/* Responsive/dynamic sizing pass across the whole app */
#eh-root .wrap {
  width: min(100%, 1040px);
  padding: clamp(16px, 3vw, 28px) clamp(12px, 4vw, 20px) clamp(58px, 9vh, 98px);
}
#eh-root .topbar {
  flex-wrap: wrap;
  gap: clamp(8px, 2vw, 14px);
  padding: clamp(10px, 2.5vw, 16px) clamp(12px, 4vw, 20px);
}
#eh-root .brand {
  min-width: 0;
  flex-wrap: wrap;
  gap: 6px 10px;
}
#eh-root .brand .mark {
  font-size: clamp(17px, 4.5vw, 20px);
}
#eh-root .brand .who {
  font-size: clamp(9.5px, 2.6vw, 12px);
}
#eh-root .topbar-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: clamp(6px, 2vw, 10px);
}
#eh-root .btn,
#eh-root .btn-ghost {
  padding: clamp(7px, 1.8vw, 10px) clamp(10px, 3vw, 18px);
  font-size: clamp(11.5px, 2.6vw, 13px);
}
#eh-root .btn-sm {
  padding: clamp(5px, 1.4vw, 6px) clamp(8px, 2vw, 10px);
  font-size: clamp(10.5px, 2.4vw, 12px);
}
#eh-root .card {
  padding: clamp(14px, 3vw, 20px);
  overflow-x: auto;
}
#eh-root .card h3 {
  font-size: clamp(11.5px, 2.8vw, 13px);
}
#eh-root .login-card {
  padding: clamp(26px, 7vw, 36px) clamp(20px, 6vw, 32px);
}
#eh-root .login-title {
  font-size: clamp(23px, 6vw, 26px);
}
#eh-root .stat-big {
  font-size: clamp(22px, 6vw, 30px);
}
#eh-root .grid {
  gap: clamp(12px, 3vw, 16px);
}
#eh-root .entry-form {
  grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr));
  gap: clamp(8px, 2vw, 10px);
}
#eh-root .entry-form .field.wide {
  grid-column: span 2;
}
#eh-root table {
  min-width: 820px;
}
#eh-root .bd-row {
  grid-template-columns: minmax(0, 1fr) auto auto minmax(42px, 70px);
  gap: clamp(8px, 2vw, 12px);
}
#eh-root .assoc-card {
  flex-wrap: wrap;
  gap: 12px;
}
#eh-root .assoc-card > div:last-child {
  flex-wrap: wrap;
  justify-content: flex-end;
}
#eh-root .manage-row {
  grid-template-columns: minmax(0, 1fr) minmax(220px, auto);
}

@media (max-width: 760px) {
  #eh-root .topbar {
    align-items: flex-start;
  }
  #eh-root .topbar-actions {
    width: 100%;
    justify-content: flex-start;
  }
  #eh-root .topbar-actions button {
    flex: 1 1 auto;
  }
  #eh-root .entry-form .field.wide {
    grid-column: span 1;
  }
  #eh-root .grid-3,
  #eh-root .grid-2 {
    grid-template-columns: 1fr;
  }
  #eh-root .bd-row {
    grid-template-columns: 1fr;
  }
  #eh-root .bd-row > div {
    min-width: 0;
  }
  #eh-root .manage-row {
    grid-template-columns: 1fr;
  }
  #eh-root .manage-actions {
    justify-content: flex-start;
  }
  #eh-root .manage-actions button {
    flex: 1 1 calc(50% - 6px);
  }
  #eh-root .assoc-card > div:last-child {
    width: 100%;
    justify-content: flex-start;
  }
  #eh-root .role-toggle {
    flex-wrap: wrap;
  }
}

@media (max-width: 420px) {
  #eh-root .manage-actions button,
  #eh-root .topbar-actions button {
    flex-basis: 100%;
  }
  #eh-root .month-nav {
    flex-wrap: wrap;
    justify-content: flex-start;
  }
}

/* Admin approval rows: keep approve/reject buttons inside the card */
#eh-root .admin-action-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}
#eh-root .admin-action-main {
  min-width: 0;
}
#eh-root .admin-action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
  max-width: 100%;
}
#eh-root .admin-action-buttons button {
  white-space: nowrap;
}
@media (max-width: 760px) {
  #eh-root .admin-action-row {
    grid-template-columns: 1fr;
  }
  #eh-root .admin-action-buttons {
    justify-content: flex-start;
  }
  #eh-root .admin-action-buttons button {
    flex: 1 1 auto;
  }
}


/* ---- Ideal Dental Care brand refresh ----
   Palette taken from the brand guidelines: Deep Olive, Warm Cream,
   Soft Oat, Sand, Refined Copper and Champagne Bronze. */
#eh-root {
  --brand-deep-olive: #4B4F42;
  --brand-muted-olive: #5F6553;
  --brand-copper: #A85F38;
  --brand-champagne: #B98A5E;
  --brand-warm-cream: #FBF5EE;
  --brand-soft-oat: #F0E1D1;
  --brand-sand: #E4C8AA;
  --brand-soft-black: #2E2C2A;
  color: var(--brand-soft-black);
  background:
    radial-gradient(circle at top left, rgba(228,200,170,0.35), transparent 32rem),
    var(--brand-warm-cream);
  font-size: 16px;
  line-height: 1.45;
}

#eh-root .topbar,
#eh-footer {
  background: var(--brand-deep-olive);
  color: var(--brand-warm-cream);
  border-color: rgba(251,245,238,0.18);
}
#eh-root .brand .mark,
#eh-root .brand .who,
#eh-footer {
  color: var(--brand-warm-cream);
}
#eh-root .brand .mark {
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
#eh-root .brand .mark .dot {
  color: var(--brand-champagne);
}
#eh-root .brand .mark:hover {
  color: var(--brand-champagne);
}
#eh-root .brand .who {
  opacity: 0.78;
  letter-spacing: 0.06em;
}

#eh-root .topbar .btn-ghost {
  color: var(--brand-warm-cream);
  border-color: rgba(251,245,238,0.30);
}
#eh-root .topbar .btn-ghost:hover,
#eh-root .topbar .btn-ghost.active-nav {
  background: var(--brand-warm-cream);
  color: var(--brand-deep-olive);
  border-color: var(--brand-warm-cream);
}

#eh-root .card,
#eh-root .login-card,
.eh-modal-card {
  background: rgba(240,225,209,0.88);
  border-color: rgba(75,79,66,0.20);
  box-shadow: 0 12px 36px rgba(46,44,42,0.055);
}
#eh-root .login-card::before {
  border-color: rgba(75,79,66,0.16);
}
#eh-root .card h3,
#eh-root thead th,
#eh-root .field label,
#eh-root .login-title,
#eh-root .assoc-name,
#eh-root .bd-name {
  color: var(--brand-deep-olive);
}
#eh-root .card h3,
#eh-root .field label,
#eh-root thead th {
  letter-spacing: 0.08em;
}
#eh-root .muted,
#eh-root .stat-label,
#eh-root .login-sub,
#eh-root .help-note,
#eh-root .fine-print {
  color: var(--brand-muted-olive);
}

#eh-root .btn {
  background: var(--brand-deep-olive);
  border-color: var(--brand-deep-olive);
  color: var(--brand-warm-cream);
  border-radius: 2px;
}
#eh-root .btn:hover {
  background: var(--brand-muted-olive);
  border-color: var(--brand-muted-olive);
}
#eh-root .btn-amber {
  background: var(--brand-copper);
  border-color: var(--brand-copper);
  color: var(--brand-warm-cream);
}
#eh-root .btn-amber:hover {
  background: #7F472A;
  border-color: #7F472A;
}
#eh-root .btn-ghost {
  color: var(--brand-deep-olive);
  border-color: rgba(75,79,66,0.26);
  background: rgba(251,245,238,0.42);
  border-radius: 2px;
}
#eh-root .btn-ghost:hover,
#eh-root .btn-ghost.active-nav {
  background: var(--brand-deep-olive);
  color: var(--brand-warm-cream);
  border-color: var(--brand-deep-olive);
}
#eh-root .btn-danger {
  border-color: rgba(168,95,56,0.55);
  color: var(--brand-copper);
  background: rgba(251,245,238,0.36);
}
#eh-root .btn-danger:hover {
  background: var(--brand-copper);
  color: var(--brand-warm-cream);
}

#eh-root .field input,
#eh-root .field select,
#eh-root input,
#eh-root select {
  font-family: 'Source Sans 3', 'Gill Sans', 'Trebuchet MS', Arial, sans-serif;
  background: rgba(251,245,238,0.76);
  border-color: rgba(75,79,66,0.24);
  color: var(--brand-soft-black);
}
#eh-root .field input:focus,
#eh-root .field select:focus,
#eh-root input:focus,
#eh-root select:focus {
  outline: 2px solid var(--brand-champagne);
  border-color: var(--brand-deep-olive);
}

#eh-root tbody tr:hover,
#eh-root .assoc-card:hover {
  background: rgba(228,200,170,0.30);
}
#eh-root .assoc-card {
  background: rgba(240,225,209,0.88);
  border-color: rgba(75,79,66,0.18);
}
#eh-root .login-msg {
  background: rgba(228,200,170,0.34);
  border-color: var(--brand-champagne);
  color: var(--brand-soft-black);
}
#eh-root .login-msg.err {
  border-color: var(--brand-copper);
  color: #7F472A;
}
#eh-root .tag.good {
  background: rgba(95,101,83,0.16);
  color: var(--brand-muted-olive);
}
#eh-root .tag.bad {
  background: rgba(168,95,56,0.14);
  color: var(--brand-copper);
}
#eh-root .chip {
  background: rgba(251,245,238,0.62);
  border: 1px solid rgba(75,79,66,0.16);
}
#eh-root .tier-bar,
#eh-root .bd-bar-track {
  background: rgba(251,245,238,0.72);
}
#eh-root .tier-bar-fill {
  background: var(--brand-copper);
}
#eh-root .bd-bar-fill {
  background: var(--brand-muted-olive);
}
#eh-root .bd-bar-fill.low {
  background: var(--brand-copper);
}

#eh-root .g-Astar { color: var(--brand-champagne); }
#eh-root .g-A { color: var(--brand-deep-olive); }
#eh-root .g-B { color: var(--brand-muted-olive); }
#eh-root .g-C { color: var(--brand-copper); }
#eh-root .g-D { color: #7F472A; }

.eh-modal-overlay {
  background: rgba(46,44,42,0.48);
  backdrop-filter: blur(2px);
}

/* Topbar button colour reversal: normally light, dark on hover/active */
#eh-root .topbar .btn-ghost,
#eh-root .topbar-actions .btn-ghost {
  background: var(--paper, #FBF5EE);
  color: var(--ink, #4B4F42);
  border-color: rgba(251, 245, 238, 0.72);
}

#eh-root .topbar .btn-ghost:hover,
#eh-root .topbar .btn-ghost:focus-visible,
#eh-root .topbar-actions .btn-ghost:hover,
#eh-root .topbar-actions .btn-ghost:focus-visible {
  background: var(--ink, #4B4F42);
  color: var(--paper, #FBF5EE);
  border-color: var(--paper, #FBF5EE);
}

#eh-root .topbar .btn-ghost.active-nav,
#eh-root .topbar-actions .btn-ghost.active-nav {
  background: var(--paper, #FBF5EE);
  color: var(--ink, #4B4F42);
  border-color: var(--paper, #FBF5EE);
}

#eh-root .topbar .btn-ghost.active-nav:hover,
#eh-root .topbar .btn-ghost.active-nav:focus-visible,
#eh-root .topbar-actions .btn-ghost.active-nav:hover,
#eh-root .topbar-actions .btn-ghost.active-nav:focus-visible {
  background: var(--ink, #4B4F42);
  color: var(--paper, #FBF5EE);
  border-color: var(--paper, #FBF5EE);
}
