/* Sly Man's ACCA Honest Record — leg calibration first,
 * combination-level ROI in the ledger only. Reading room feel:
 * cream ground, dark serif ink, gold accents but no glitter.
 */

.page-acca-hr {
  background: var(--acca-ground);
  color: var(--acca-ink);
}

.acca-hr {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 20px 80px;
  font: 400 15px/1.55 "DM Sans", -apple-system, sans-serif;
}

.acca-hr__masthead { text-align: center; margin: 0 0 32px; }
.acca-hr__eyebrow {
  font: 700 11px/1 "DM Sans", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  color: var(--acca-gold);
  margin: 0 0 10px;
}
.acca-hr__title {
  font: 700 30px/1.15 "Playfair Display", Georgia, serif;
  color: var(--acca-ink);
  margin: 0 0 12px;
  text-wrap: balance;
}
.acca-hr__deck {
  font: 400 15px/1.55 "DM Sans", sans-serif;
  color: var(--acca-ink-2);
  max-width: 60ch;
  margin: 0 auto;
}

/* ── Summary strip ────────────────────────────────────────── */

.acca-hr__summary {
  background: var(--acca-cream);
  border: 1px solid var(--acca-hair);
  border-radius: 10px;
  padding: 22px 20px;
  margin: 0 0 36px;
}

.acca-hr__headline {
  font: 500 14px/1.5 "DM Sans", sans-serif;
  color: var(--acca-ink);
  margin: 0 0 14px;
}

.acca-hr__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin: 0;
}

.acca-hr__meta-cell { display: flex; flex-direction: column; gap: 3px; }
.acca-hr__meta-cell dt {
  font: 700 10.5px/1 "DM Sans", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--acca-ink-3);
  margin: 0;
}
.acca-hr__meta-cell dd {
  font: 700 20px/1 "Playfair Display", Georgia, serif;
  color: var(--acca-ink);
  margin: 0;
  font-variant-numeric: tabular-nums;
}

/* ── Section chrome ───────────────────────────────────────── */

.acca-hr__section {
  border-top: 1px solid var(--acca-gold-soft);
  padding: 26px 0 32px;
}

.acca-hr__section-title {
  font: 700 18px/1 "Playfair Display", Georgia, serif;
  color: var(--acca-ink);
  margin: 0 0 6px;
}
.acca-hr__section-sub {
  font: 400 13.5px/1.55 "DM Sans", sans-serif;
  color: var(--acca-ink-2);
  margin: 0 0 18px;
  max-width: 60ch;
}

/* ── Leg calibration table ────────────────────────────────── */

.acca-hr__cal-wrap {
  width: 100%;
}
.acca-hr__cal {
  width: 100%;
  border-collapse: collapse;
  font: 500 13.5px/1 "DM Sans", sans-serif;
}
.acca-hr__cal th,
.acca-hr__cal td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid var(--acca-hair);
  font-variant-numeric: tabular-nums;
}
.acca-hr__cal thead th {
  font: 700 10.5px/1 "DM Sans", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--acca-ink-3);
}
.acca-hr__cal-role {
  font: 700 13.5px/1 "Playfair Display", Georgia, serif;
  color: var(--acca-ink);
}
.acca-hr__cal-role--anchor  { border-left: 3px solid var(--acca-anchor);  padding-left: 10px; }
.acca-hr__cal-role--core    { border-left: 3px solid var(--acca-core);    padding-left: 10px; }
.acca-hr__cal-role--booster { border-left: 3px solid var(--acca-booster); padding-left: 10px; }

.acca-hr__cal-delta { font-weight: 700; color: var(--acca-ink-3); }
.acca-hr__cal-delta.is-pos { color: #2E7A3E; }
.acca-hr__cal-delta.is-neg { color: #A83E3E; }

/* Stack calibration rows as cards on narrow screens — a 6-column
 * table can't shrink without truncating the delta cell. Cells fall
 * into a 2-col grid so the value/label pair reads at a glance. */
@media (max-width: 640px) {
  .acca-hr__cal,
  .acca-hr__cal thead,
  .acca-hr__cal tbody,
  .acca-hr__cal tr,
  .acca-hr__cal td,
  .acca-hr__cal th {
    display: block;
  }
  .acca-hr__cal thead {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
  }
  .acca-hr__cal tr {
    background: var(--acca-cream);
    border: 1px solid var(--acca-hair);
    border-radius: 10px;
    padding: 14px 14px 6px;
    margin: 0 0 12px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px 12px;
  }
  .acca-hr__cal tbody tr:last-child { margin-bottom: 0; }
  .acca-hr__cal-role {
    grid-column: 1 / -1;
    padding: 4px 0 8px 10px;
    border-bottom: 1px solid var(--acca-hair);
    margin-bottom: 6px;
    font-size: 15px;
  }
  .acca-hr__cal td {
    padding: 6px 0;
    border: 0;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    font-size: 14px;
  }
  .acca-hr__cal td::before {
    content: attr(data-label);
    font: 700 10.5px/1 "DM Sans", sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--acca-ink-3);
  }
}

/* ── Survival curve ───────────────────────────────────────── */

.acca-hr__curve {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.acca-hr__curve li {
  display: grid;
  grid-template-columns: 100px 1fr 120px;
  align-items: center;
  gap: 12px;
}
.acca-hr__curve-label {
  font: 500 12.5px/1 "DM Sans", sans-serif;
  color: var(--acca-ink-2);
}
.acca-hr__curve-bar {
  height: 12px;
  background: var(--acca-hair);
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}
.acca-hr__curve-fill {
  display: block;
  height: 100%;
  background: var(--acca-gold);
}
.acca-hr__curve-value {
  font: 700 12.5px/1 "DM Sans", sans-serif;
  color: var(--acca-ink);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

/* ── Histogram ────────────────────────────────────────────── */

.acca-hr__histogram {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  height: 160px;
  align-items: end;
}
.acca-hr__histogram li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  height: 100%;
  justify-content: end;
}
.acca-hr__hist-label {
  font: 700 10.5px/1 "DM Sans", sans-serif;
  color: var(--acca-ink-3);
  text-transform: uppercase;
  letter-spacing: 0.10em;
}
.acca-hr__hist-bar {
  width: 100%;
  height: 100px;
  background: rgba(122, 90, 15, 0.10);
  border-radius: 4px;
  position: relative;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.acca-hr__hist-fill {
  display: block;
  width: 100%;
  background: linear-gradient(180deg, var(--acca-gold) 0%, var(--acca-anchor) 100%);
  min-height: 2px;
}
.acca-hr__hist-value {
  font: 700 11.5px/1 "DM Sans", sans-serif;
  color: var(--acca-ink);
  font-variant-numeric: tabular-nums;
}

/* ── ROI ledger ───────────────────────────────────────────── */

.acca-hr__section--roi { padding-bottom: 40px; }

.acca-hr__roi {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 16px;
  margin: 0;
}
.acca-hr__roi > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--acca-cream);
  border: 1px solid var(--acca-hair);
  border-radius: 8px;
  padding: 14px 12px;
}
.acca-hr__roi dt {
  font: 700 10.5px/1 "DM Sans", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--acca-ink-3);
  margin: 0;
}
.acca-hr__roi dd {
  font: 700 20px/1 "Playfair Display", Georgia, serif;
  color: var(--acca-ink);
  margin: 0;
  font-variant-numeric: tabular-nums;
}
.acca-hr__roi dd.is-pos { color: #2E7A3E; }
.acca-hr__roi dd.is-neg { color: #A83E3E; }

/* ── Ticket tape (per-ticket ledger, latest-first) ────────── */

.acca-hr__section--tape { padding-bottom: 40px; }

.acca-hr__tape-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--acca-hair);
  border-radius: 10px;
  background: var(--acca-cream);
}

.acca-hr__tape {
  width: 100%;
  border-collapse: collapse;
  font: 500 13.5px/1 "DM Sans", sans-serif;
  min-width: 780px;
}
.acca-hr__tape th,
.acca-hr__tape td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--acca-hair);
  font-variant-numeric: tabular-nums;
  vertical-align: middle;
}
.acca-hr__tape tbody tr:last-child th,
.acca-hr__tape tbody tr:last-child td {
  border-bottom: 0;
}
.acca-hr__tape thead th {
  font: 700 10.5px/1 "DM Sans", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--acca-ink-3);
  background: rgba(122, 90, 15, 0.05);
  border-bottom: 1px solid var(--acca-gold-soft);
}
.acca-hr__tape-date {
  font: 700 13.5px/1 "Playfair Display", Georgia, serif;
  color: var(--acca-ink);
  white-space: nowrap;
}
.acca-hr__tape-datelink {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--acca-gold-soft);
  padding-bottom: 1px;
  transition: color 120ms ease, border-color 120ms ease;
}
.acca-hr__tape-datelink:hover,
.acca-hr__tape-datelink:focus-visible {
  color: var(--acca-gold);
  border-bottom-color: var(--acca-gold);
  outline: none;
}
.acca-hr__tape tbody tr:hover {
  background: rgba(122, 90, 15, 0.04);
}
.acca-hr__tape-odds {
  font: 700 14px/1 "Playfair Display", Georgia, serif;
  color: var(--acca-gold);
  white-space: nowrap;
}
.acca-hr__tape-legs,
.acca-hr__tape-lines {
  width: 96px;
}
.acca-hr__tape-legs-cell {
  display: inline-flex;
  align-items: baseline;
  gap: 1px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(122, 90, 15, 0.08);
  color: var(--acca-ink-2);
}
.acca-hr__tape-legs-cell strong {
  font: 700 14px/1 "Playfair Display", Georgia, serif;
  color: var(--acca-ink);
}
.acca-hr__tape-legs-sep {
  opacity: 0.5;
  padding: 0 1px;
}
.acca-hr__tape-num {
  text-align: right;
  font: 700 14px/1 "DM Sans", sans-serif;
  color: var(--acca-ink);
  white-space: nowrap;
}
.acca-hr__tape-num.is-pos { color: #2E7A3E; }
.acca-hr__tape-num.is-neg { color: #A83E3E; }

.acca-hr__pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font: 700 10.5px/1 "DM Sans", sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.acca-hr__pill--profit {
  background: linear-gradient(180deg, #F0D68A, #C69A2E);
  color: #3A2A05;
  box-shadow: inset 0 0 0 1px rgba(58, 42, 5, 0.15);
}
.acca-hr__pill--returning {
  background: rgba(46, 122, 62, 0.12);
  color: #2E7A3E;
  box-shadow: inset 0 0 0 1px rgba(46, 122, 62, 0.28);
}
.acca-hr__pill--lost {
  background: rgba(168, 62, 62, 0.10);
  color: #A83E3E;
  box-shadow: inset 0 0 0 1px rgba(168, 62, 62, 0.25);
}
.acca-hr__pill--void {
  background: rgba(90, 90, 90, 0.10);
  color: var(--acca-ink-3);
  box-shadow: inset 0 0 0 1px rgba(90, 90, 90, 0.20);
}

.acca-hr__tape-num--return {
  color: var(--acca-ink);
}

.acca-hr__tape-empty {
  font: 400 14px/1.5 "DM Sans", sans-serif;
  color: var(--acca-ink-3);
  padding: 22px;
  border: 1px dashed var(--acca-hair);
  border-radius: 10px;
  text-align: center;
  background: var(--acca-cream);
}

/* ── Footer note ──────────────────────────────────────────── */

.acca-hr__foot {
  border-top: 1px solid var(--acca-hair);
  padding-top: 20px;
  margin-top: 20px;
  font: 400 13px/1.55 "DM Sans", sans-serif;
  color: var(--acca-ink-3);
  max-width: 62ch;
}
.acca-hr__foot code {
  font: 500 12.5px/1 "DM Mono", ui-monospace, monospace;
  background: rgba(122, 90, 15, 0.10);
  padding: 2px 5px;
  border-radius: 3px;
  color: var(--acca-ink-2);
}
