/* The admin zone and the partner dashboard (Q-70), in the app's and the
   website's own look: white paper, near-black ink, Georgia for headings
   and figures, the streak's orange as the one accent. */
:root {
  --paper: #ffffff;
  --ink: #171717;
  --ink-muted: #5c5c5c;
  --ink-faint: #8a8a8a;
  --hairline: #e6e6e6;
  --surface: #f5f5f4;
  --flame: #d9480f;
  --flame-wash: #fdf0ea;
  --good: #2f7a3e;
  --serif: Georgia, Charter, "Noto Serif", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --gutter: 16px;
  --radius: 14px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 15px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.2; margin: 0; }
h1 { font-size: 30px; }
h2 { font-size: 22px; }
h3 { font-size: 18px; }
p { margin: 0; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 var(--gutter); }

/* The demo banner: always on top in demo mode. */
.demo-banner {
  background: var(--flame-wash);
  color: #7a2a08;
  font-size: 13px;
  text-align: center;
  padding: 7px var(--gutter);
  border-bottom: 1px solid #f3d3c4;
}
.demo-banner button {
  border: 0;
  background: none;
  padding: 0;
  margin-left: 6px;
  color: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--hairline);
}
.topbar .wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 60px;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-family: var(--serif);
  font-size: 22px;
}
.brand img { width: 20px; height: auto; }
.brand small {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink-muted);
  border-left: 1px solid var(--hairline);
  padding-left: 9px;
  margin-left: 2px;
}
.topbar .spacer { flex: 1; }
.tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.tabs a {
  padding: 8px 12px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--ink-muted);
  white-space: nowrap;
}
.tabs a[aria-current="page"] { background: var(--ink); color: var(--paper); }
.tabs a:hover:not([aria-current="page"]) { background: var(--surface); color: var(--ink); }

main { padding: 28px 0 64px; }
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.page-head p { color: var(--ink-muted); margin-top: 4px; }

.section { margin-top: 32px; }
.section > h2 { margin-bottom: 12px; }

/* Figures: what a dashboard leads with. */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr));
  gap: 12px;
}
.stats.narrow { grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 280px)); margin-bottom: 20px; }
.stat {
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 14px 16px;
  min-width: 0;
}
.stat .label { color: var(--ink-muted); font-size: 13px; }
.stat .value { font-family: var(--serif); font-size: 28px; line-height: 1.2; margin-top: 4px; overflow-wrap: anywhere; }
.stat .hint { color: var(--ink-faint); font-size: 12px; margin-top: 2px; }
.stat.accent { border-color: var(--flame); }
.stat.accent .value { color: var(--flame); }

.card {
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 18px;
}

/* The chart: one series of thin columns on a hairline grid. */
.chart { position: relative; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .grid { stroke: var(--hairline); stroke-width: 1; }
.chart .tick, .chart .axis-label { fill: var(--ink-muted); font: 12px var(--sans); }
.chart .value-label { fill: var(--ink); font: 12px var(--sans); }
.chart .bar { fill: var(--flame); }
.chart .hit { fill: transparent; cursor: default; }
.chart .bar.active { fill: #a83508; }
.chart .hit:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
.chart-tip {
  position: absolute;
  pointer-events: none;
  background: var(--ink);
  color: var(--paper);
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 13px;
  line-height: 1.35;
  white-space: nowrap;
  transform: translate(-50%, calc(-100% - 10px));
  opacity: 0;
  transition: opacity 0.12s;
}
.chart-tip.shown { opacity: 1; }
.chart-empty {
  position: absolute;
  left: calc(50% + 28px);
  top: 47%;
  transform: translate(-50%, -50%);
  margin: 0;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink-muted);
  font-size: 14px;
  white-space: nowrap;
  pointer-events: none;
}
.chart-table summary { cursor: pointer; color: var(--ink-muted); font-size: 13px; width: max-content; }
.chart-table summary:hover { color: var(--ink); }
.chart-table[open] summary { margin-bottom: 10px; }
.chart-tip strong { font-weight: 600; }

/* Tables scroll inside their own box on a narrow screen, never the page. */
.table-box { overflow-x: auto; border: 1px solid var(--hairline); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--hairline); white-space: nowrap; vertical-align: middle; }
th { font-weight: 500; color: var(--ink-muted); font-size: 13px; background: var(--surface); }
tbody tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td .sub { display: block; color: var(--ink-muted); font-size: 12px; white-space: normal; }
.row-actions { display: flex; gap: 12px; margin-top: 4px; font-size: 13px; }
.row-actions a, .row-actions .link-button { color: var(--ink-muted); font-size: 13px; }
.row-actions a:hover, .row-actions .link-button:hover { color: var(--ink); }
.code-text { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 600; letter-spacing: 0.04em; }

.pill {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
  background: var(--surface);
  color: var(--ink-muted);
}
.pill.on { background: #e8f3ea; color: var(--good); }
.pill.off { background: var(--surface); color: var(--ink-faint); }
.pill.wait { background: var(--flame-wash); color: #9a3409; }

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}
.button.secondary { background: var(--paper); color: var(--ink); border-color: #cfcfcf; }
.button.small { min-height: 32px; padding: 4px 12px; font-size: 13px; }
.button:disabled { opacity: 0.45; cursor: default; }
.link-button { border: 0; background: none; padding: 0; text-decoration: underline; cursor: pointer; color: var(--ink); }

/* Forms */
.dialog {
  border: 0;
  border-radius: 18px;
  padding: 0;
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
}
.dialog::backdrop { background: rgba(23, 23, 23, 0.35); }
.dialog form { padding: 22px; display: grid; gap: 16px; }
.dialog .actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
/* Its parts keep their own height at the top: beside a taller field in a
   row, the control stays level with its neighbour's. */
.field { display: grid; gap: 6px; align-content: start; margin: 0; padding: 0; border: 0; min-width: 0; }
.field > span, .field > legend { font-size: 13px; color: var(--ink-muted); padding: 0; margin-bottom: 6px; }
.field > legend + * { margin-top: 0; }
.field input:not([type="radio"]):not([type="checkbox"]), .field select, .field textarea {
  width: 100%;
  border: 1px solid #cfcfcf;
  border-radius: 10px;
  padding: 9px 11px;
  background: var(--paper);
  min-height: 40px;
}
.field input:not([type="radio"]):not([type="checkbox"]):focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--ink); outline-offset: 1px; border-color: var(--ink); }
.field .help { font-size: 12px; color: var(--ink-faint); }
.field textarea { resize: vertical; line-height: 1.45; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
/* Three short numbers, such as a chapter and its verses: side by side on a phone too. */
.row.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.inline { display: flex; flex-wrap: wrap; gap: 8px; align-items: stretch; }
.inline input { flex: 1; min-width: 0; }
.choices { display: grid; gap: 8px; }
.choice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
}
.choice:has(input:checked) { border-color: var(--ink); background: var(--surface); }
.choice input { margin: 3px 0 0; accent-color: var(--ink); flex: none; width: 16px; height: 16px; }
.choice small { display: block; color: var(--ink-muted); }
/* Several may be ticked, such as a creator's languages: side by side. */
.choices.checks { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.choices.checks .choice { padding: 8px 12px; }
/* One thing on or off, such as showing a creator in the app. */
.switch { display: flex; align-items: center; gap: 10px; width: max-content; max-width: 100%; cursor: pointer; }
.switch input {
  appearance: none;
  flex: none;
  position: relative;
  width: 40px;
  height: 24px;
  margin: 0;
  border-radius: 999px;
  background: #cfcfcf;
  cursor: pointer;
  transition: background 0.15s;
}
.switch input::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--paper);
  transition: transform 0.15s;
}
.switch input:checked { background: var(--good); }
.switch input:checked::after { transform: translateX(16px); }
.switch input:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.dialog .form-note { color: var(--ink-muted); font-size: 13px; }
.problems { background: var(--flame-wash); color: #7a2a08; border-radius: 10px; padding: 10px 12px; font-size: 13px; }
.problems:empty { display: none; }
.problems p + p { margin-top: 4px; }
.summary { background: var(--surface); border-radius: 12px; padding: 12px 14px; font-size: 14px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--paper);
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 14px;
  z-index: 20;
  max-width: calc(100vw - 32px);
}

/* The partner's codes, large enough to read out on a video. */
.codes { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 12px; }
.code-card { border: 1px solid var(--hairline); border-radius: var(--radius); padding: 18px; display: grid; gap: 8px; min-width: 0; }
.code-card .head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
.code-card .head .pill { flex: none; }
.code-card .big { min-width: 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 28px; font-weight: 700; letter-spacing: 0.06em; overflow-wrap: anywhere; }
.code-card .muted { color: var(--ink-muted); font-size: 14px; }

.muted { color: var(--ink-muted); }
.empty { color: var(--ink-muted); padding: 24px; text-align: center; }
.privacy { margin-top: 28px; color: var(--ink-muted); font-size: 13px; }

.login { max-width: 420px; margin: 8vh auto; display: grid; gap: 16px; text-align: center; }
.login .brand { justify-content: center; }
.login .choices { text-align: left; }
.login-step { display: grid; gap: 12px; text-align: left; }
.login .problems { text-align: left; }

/* The admin: a menu down the left, the page across the rest of the screen. */
.shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 22px 14px 18px;
  background: var(--surface);
  border-right: 1px solid var(--hairline);
  z-index: 5;
}
.sidebar .brand { padding: 2px 10px; }
.icon { width: 18px; height: 18px; flex: none; }
.side-nav { display: grid; gap: 2px; }
.side-nav a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 10px;
  border-radius: 10px;
  color: var(--ink-muted);
  text-decoration: none;
  white-space: nowrap;
}
.side-nav a:hover { background: #ebebe9; color: var(--ink); }
.side-nav a[aria-current="page"] { background: var(--ink); color: var(--paper); }
.side-nav .count { margin-left: auto; font-size: 12px; color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.side-nav .count.due { color: var(--flame); font-weight: 600; }
.side-nav a[aria-current="page"] .count { color: rgba(255, 255, 255, 0.72); }
.side-foot {
  margin-top: auto;
  display: grid;
  gap: 10px;
  justify-items: start;
  padding: 16px 10px 0;
  border-top: 1px solid var(--hairline);
  font-size: 13px;
}
.side-foot .who { display: grid; color: var(--ink-muted); min-width: 0; max-width: 100%; }
.side-foot .who strong { color: var(--ink); font-weight: 500; overflow-wrap: anywhere; }
.side-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.side-actions .icon { width: 15px; height: 15px; }
.side-foot .loaded { color: var(--ink-faint); font-size: 12px; }
.side-link { color: var(--ink-muted); }

.content { min-width: 0; padding: 32px clamp(16px, 3vw, 44px) 72px; }
.content > .demo-banner { border: 1px solid #f3d3c4; border-radius: 12px; text-align: left; margin-bottom: 24px; padding: 9px 14px; }
.content h1 { font-size: 32px; }
.content .page-head { margin-bottom: 24px; }

/* A dashboard's boxes, such as the partner programme's: the chart and the
   codes wide, beside them a narrow column of partners and what happened
   lately. */
.board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.panel {
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 18px 20px 20px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.panel.wide { grid-column: span 2; }
.panel-head { display: flex; align-items: center; gap: 10px 16px; flex-wrap: wrap; }
.panel-head h2 { font-size: 20px; margin-right: auto; }
.panel-head .more { font-size: 13px; color: var(--ink-muted); }
.panel-head .more:hover { color: var(--ink); }
.panel .empty { padding: 16px 0; }

.segmented { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; border-radius: 999px; background: var(--surface); }
.segmented button {
  border: 0;
  background: none;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--ink-muted);
  cursor: pointer;
  white-space: nowrap;
}
.segmented button:hover { color: var(--ink); }
.segmented button[aria-pressed="true"] { background: var(--paper); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); }

.avatar {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--flame-wash);
  color: #9a3409;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
}
.who-cell { display: flex; gap: 12px; align-items: flex-start; }

.ranking { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.ranking li { display: flex; gap: 12px; align-items: flex-start; }
.ranking-body { flex: 1; min-width: 0; display: grid; gap: 5px; }
.ranking-line { display: flex; gap: 8px; justify-content: space-between; align-items: baseline; }
.ranking-line strong { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ranking .figure { font-variant-numeric: tabular-nums; white-space: nowrap; }
.ranking .sub { color: var(--ink-muted); font-size: 12px; }
.meter { height: 6px; border-radius: 999px; background: var(--surface); overflow: hidden; }
.meter span { display: block; height: 100%; border-radius: 999px; background: var(--flame); }

.activity { list-style: none; margin: 0; padding: 0; display: grid; }
.activity li {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: baseline;
  padding: 10px 0;
  border-top: 1px solid var(--hairline);
  font-size: 14px;
}
.activity li:first-child { border-top: 0; padding-top: 0; }
.activity .sub { display: block; color: var(--ink-muted); font-size: 12px; }
.activity .sub .code-text { font-size: 11px; }
.activity .when { color: var(--ink-faint); font-size: 12px; white-space: nowrap; }
.activity .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-faint); }
.activity .dot.redeemed { background: var(--ink); }
.activity .dot.payment { background: var(--good); }
.activity .dot.refund { background: var(--flame); }

.start { margin-bottom: 16px; border-color: var(--flame); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.steps li { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.steps li > div { flex: 1 1 240px; }
.steps .step-no {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid var(--hairline);
  font-size: 13px;
  color: var(--ink-muted);
}
.steps li.done .step-no { background: #e8f3ea; border-color: #e8f3ea; color: var(--good); }
.steps li.done strong { color: var(--ink-muted); text-decoration: line-through; }

.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 12px; }
.search {
  flex: 1 1 260px;
  max-width: 420px;
  min-height: 40px;
  border: 1px solid #cfcfcf;
  border-radius: 999px;
  padding: 8px 14px 8px 38px;
  background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a8a8a' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E") 14px center / 16px no-repeat;
}
.search:focus { outline: 2px solid var(--ink); outline-offset: 1px; border-color: var(--ink); }

/* The partner zone: their codes at a glance, what is owed, texts to share. */
.mini-codes { list-style: none; margin: 0; padding: 0; display: grid; }
.mini-codes li {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-top: 1px solid var(--hairline);
}
.mini-codes li:first-child { border-top: 0; padding-top: 0; }
.mini-codes li > div { min-width: 0; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.mini-codes .code-text { font-size: 20px; letter-spacing: 0.06em; overflow-wrap: anywhere; }
.mini-codes .sub { flex-basis: 100%; color: var(--ink-muted); font-size: 13px; }
.mini-codes .button { flex: none; }
.owed { display: grid; gap: 2px; }
.owed .muted { font-size: 13px; }
.owed strong { font-family: var(--serif); font-weight: 400; font-size: 30px; line-height: 1.2; }
.owed strong.due { color: var(--flame); }
.share-intro { margin: 4px 0 14px; }
.shares { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 12px; }
.share-card {
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
}
.share-card .label { font-size: 13px; color: var(--ink-muted); }
.share-card p { flex: 1; font-family: var(--serif); font-size: 17px; line-height: 1.5; }
.explain { display: grid; gap: 10px; }
.explain ul { margin: 0; padding-left: 20px; display: grid; gap: 4px; }
.side-foot .who span:last-child:not(:first-child) { font-size: 12px; overflow-wrap: anywhere; }

/* The usage overview (Q-88): figures, then horizontal bars in the accent
   colour, each with its numbers beside it in the text colours. */
.usage-controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.select {
  appearance: none;
  min-height: 34px;
  border: 0;
  border-radius: 999px;
  padding: 5px 34px 5px 14px;
  font-size: 13px;
  color: var(--ink);
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a8a8a' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") right 12px center / 12px no-repeat;
  cursor: pointer;
}
.select:hover { color: var(--ink); background-color: #ebebe9; }
.select:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }
.usage-range { color: var(--ink-muted); font-size: 13px; margin: -10px 0 14px; }
.usage .loading { opacity: 0.45; transition: opacity 0.2s; }
.stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.stack > .panel:last-child { flex: 1; }
.panel-lead { color: var(--ink-muted); font-size: 14px; margin-top: -6px; }
.panel-note { color: var(--ink-muted); font-size: 13px; border-top: 1px solid var(--hairline); padding-top: 12px; margin-top: auto; }

.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.bars li { display: grid; gap: 6px; min-width: 0; }
.bar-line { display: flex; justify-content: space-between; align-items: baseline; gap: 4px 12px; font-size: 14px; }
.bar-name { min-width: 0; }
.bar-note { margin-left: 8px; color: var(--ink-muted); font-size: 12px; white-space: nowrap; }
.bar-figures { display: flex; gap: 10px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.bar-detail { color: var(--ink-muted); min-width: 3.4em; text-align: right; }
.bar-track { height: 8px; }
.bar-track span { display: block; height: 100%; min-width: 2px; border-radius: 0 4px 4px 0; background: var(--flame); }

/* Eleven features read down one column, then the next, beside a short box. */
@media (min-width: 641px) {
  .feature-bars .bars { display: block; columns: 2; column-gap: 40px; }
  .feature-bars .bars li { break-inside: avoid; margin-bottom: 14px; }
}

.figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 130px), 1fr)); gap: 16px; }
.figure { min-width: 0; }
.figure .label { color: var(--ink-muted); font-size: 13px; }
.figure .value { font-family: var(--serif); font-size: 28px; line-height: 1.2; margin-top: 4px; }
.figure .hint { color: var(--ink-faint); font-size: 12px; margin-top: 2px; }

.outcomes { list-style: none; margin: 0; padding: 0; display: grid; }
.outcomes li {
  display: flex;
  gap: 12px;
  align-items: baseline;
  justify-content: space-between;
  padding: 10px 0;
  border-top: 1px solid var(--hairline);
  font-size: 14px;
}
.outcomes li:first-child { border-top: 0; padding-top: 0; }
.outcomes strong { font-weight: 500; }
.outcomes .sub { display: block; color: var(--ink-muted); font-size: 13px; }
.outcome-share { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Creators (D4, D6): one's profile, then their favourite verses and their
   prayers, a row each with its buttons at the end. */
.back { display: inline-block; margin-bottom: 14px; color: var(--ink-muted); font-size: 13px; text-decoration: none; }
.back:hover { color: var(--ink); }
.name-link { text-decoration: none; }
.name-link:hover { text-decoration: underline; }
.intro { display: grid; gap: 10px; justify-items: start; max-width: 760px; }
.profile { display: grid; gap: 14px; }
.profile-head { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: center; }
.profile-about { font-family: var(--serif); font-size: 17px; line-height: 1.5; max-width: 70ch; overflow-wrap: anywhere; }
.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 18px; margin: 0; font-size: 14px; }
.facts dt { color: var(--ink-muted); }
.facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.section-head { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.section-note { margin-top: 10px; color: var(--ink-muted); font-size: 13px; max-width: 80ch; }
.entries { list-style: none; margin: 0; padding: 0; border: 1px solid var(--hairline); border-radius: var(--radius); }
.entries li {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-top: 1px solid var(--hairline);
}
.entries li:first-child { border-top: 0; }
.entry-body { flex: 1 1 260px; min-width: 0; display: grid; gap: 3px; }
.entry-title { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; font-family: var(--serif); font-size: 18px; }
.entry-title .pill { font-family: var(--sans); }
.entry-body .sub { color: var(--ink-muted); font-size: 13px; overflow-wrap: anywhere; }
.entry-count { font-size: 14px; font-weight: 500; }
.entry-actions { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; font-size: 13px; }
.entry-actions .link-button { color: var(--ink-muted); font-size: 13px; }
.entry-actions .link-button:hover { color: var(--ink); }
.entry-actions .button.small { min-width: 32px; padding: 4px 8px; }
/* A prayer that is over: still there to read, no longer the matter. */
.entries li.past .entry-title, .entries li.past .entry-body .sub, .entries li.past .entry-count { color: var(--ink-faint); }

@media (forced-colors: active) {
  .bar-track span { background: CanvasText; }
  .switch input { border: 1px solid CanvasText; }
  .switch input:checked { background: Highlight; }
}

@media (max-width: 1180px) {
  .board { grid-template-columns: minmax(0, 1fr); }
  .panel.wide { grid-column: auto; }
}

@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar {
    height: auto;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    padding: 10px 16px;
    border-right: 0;
    border-bottom: 1px solid var(--hairline);
    background: rgba(245, 245, 244, 0.96);
    backdrop-filter: blur(8px);
  }
  .sidebar .brand { padding: 0; }
  .side-nav { order: 3; width: 100%; display: flex; overflow-x: auto; scrollbar-width: none; }
  .side-nav a { padding: 7px 11px; border-radius: 999px; }
  .side-nav .icon, .side-nav .count { display: none; }
  .side-foot { margin: 0 0 0 auto; padding: 0; border: 0; display: flex; align-items: center; }
  .side-foot .who, .side-foot .loaded, .side-foot .side-link { display: none; }
  .content { padding-top: 24px; }
}

@media (max-width: 640px) {
  h1 { font-size: 26px; }
  .row { grid-template-columns: 1fr; }
  .stat .value { font-size: 24px; }
  .shell .stats:not(.narrow) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .shell .stat { padding: 12px 14px; }
  .shell .stat .value { font-size: 21px; }
  .content h1 { font-size: 28px; }
  .brand small { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .chart-tip, .usage .loading, .switch input, .switch input::after { transition: none; }
}
