* { box-sizing: border-box; margin: 0; padding: 0; }

html { min-height: 100%; scroll-behavior: smooth; }

body {
  min-height: 100vh;
  background: var(--tb-backdrop);
  color: var(--tb-cream);
  font-family: var(--tb-font-ui);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--tb-gold-ink); text-underline-offset: 3px; }
a:hover { color: var(--tb-gold-hi); }

.site-header {
  border-bottom: 1px solid rgba(238, 213, 150, .12);
}

.site-header__inner {
  width: min(1120px, calc(100% - 40px));
  min-height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.site-brand { display: inline-flex; flex: 0 0 auto; text-decoration: none; }
.site-brand img { display: block; width: 52px; height: 52px; object-fit: contain; }
.site-nav { display: flex; align-items: center; gap: 24px; }
.site-nav a, .site-footer a {
  color: var(--tb-cream-2);
  font-size: .82rem;
  font-weight: 600;
  text-decoration: none;
}
.site-nav a:hover, .site-footer a:hover { color: var(--tb-gold-ink); }

.policy-hero {
  width: min(860px, calc(100% - 40px));
  margin: 0 auto;
  padding: 78px 0 48px;
}

.eyebrow {
  margin-bottom: 12px;
  color: var(--tb-gold-ink);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: var(--tb-tracking-label);
  text-transform: uppercase;
}

h1, h2, h3 {
  color: var(--tb-cream);
  font-family: var(--tb-font-felt);
  line-height: 1.2;
}

h1 { max-width: 820px; font-size: clamp(2.25rem, 6vw, 4rem); }
.policy-lead { max-width: 760px; margin-top: 22px; color: var(--tb-cream-2); font-size: 1.08rem; }
.updated { margin-top: 14px; color: var(--tb-muted); font-size: .82rem; }

.policy-shell {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 0 0 90px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: 64px;
  align-items: start;
}

.policy-copy {
  min-width: 0;
  padding-top: 36px;
  border-top: 1px solid rgba(238, 213, 150, .14);
}

.policy-copy section + section { margin-top: 48px; }
.policy-copy h2 { margin-bottom: 14px; font-size: clamp(1.45rem, 3vw, 2rem); }
.policy-copy h3 { margin: 24px 0 10px; font-size: 1.12rem; }
.policy-copy p + p { margin-top: 14px; }
.policy-copy p, .policy-copy li { color: var(--tb-cream-2); }
.policy-copy ul, .policy-copy ol { margin: 14px 0 0 22px; }
.policy-copy li + li { margin-top: 8px; }
.policy-copy strong { color: var(--tb-cream); }

.callout {
  margin-top: 22px;
  padding: 20px 22px;
  border: 1px solid var(--tb-glass-br);
  border-radius: var(--tb-r-md);
  background: var(--tb-glass-2);
}
.callout--gold { border-color: rgba(216, 180, 92, .45); }
.callout p:first-child { margin-top: 0; }

.page-toc {
  position: sticky;
  top: 24px;
  padding: 22px;
  border: 1px solid rgba(238, 213, 150, .16);
  border-radius: var(--tb-r-md);
  background: rgba(20, 28, 22, .55);
}
.page-toc strong {
  display: block;
  margin-bottom: 12px;
  color: var(--tb-gold-ink);
  font-size: .72rem;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.page-toc a { display: block; color: var(--tb-cream-2); font-size: .82rem; text-decoration: none; }
.page-toc a + a { margin-top: 9px; }
.page-toc a:hover { color: var(--tb-gold-ink); }

.resource-list { list-style: none; margin-left: 0 !important; }
.resource-list li {
  padding: 16px 0;
  border-bottom: 1px solid rgba(238, 213, 150, .1);
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 20px;
}
.article-card {
  padding: 22px;
  border: 1px solid rgba(238, 213, 150, .14);
  border-radius: var(--tb-r-md);
  background: rgba(20, 28, 22, .5);
}
.article-card h3 { margin-top: 0; }

.table-scroll { margin-top: 20px; overflow-x: auto; }
.strategy-table { width: 100%; border-collapse: collapse; font-size: .84rem; }
.strategy-table caption { padding-bottom: 12px; color: var(--tb-muted); text-align: left; }
.strategy-table th, .strategy-table td {
  min-width: 48px;
  padding: 10px 9px;
  border: 1px solid rgba(238, 213, 150, .14);
  text-align: center;
}
.strategy-table thead th, .strategy-table tbody th { color: var(--tb-cream); background: rgba(20, 28, 22, .9); }
.strategy-table td { color: var(--tb-cream-2); }
.strategy-table .hit { color: #ffd0a2; }
.strategy-table .stand { color: var(--tb-win); }
.strategy-table .double { color: var(--tb-gold-hi); font-weight: 700; }
.strategy-table .split { color: #a9d4ff; font-weight: 700; }

.policy-hero.chart-hero { width: min(1040px, calc(100% - 40px)); padding-bottom: 42px; }
.policy-shell--chart { width: min(1240px, calc(100% - 40px)); grid-template-columns: minmax(0, 1fr); gap: 28px; }
.policy-shell--chart .chart-toc { position: static; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 24px; padding: 17px 20px; }
.policy-shell--chart .chart-toc strong { margin: 0 8px 0 0; }
.policy-shell--chart .chart-toc a { display: inline-block; }
.policy-shell--chart .chart-toc a + a { margin-top: 0; }
.chart-copy { padding-top: 38px; }
.chart-copy section + section { margin-top: 68px; }
.chart-copy > section { scroll-margin-top: 24px; }
.action-legend { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 24px; }
.action-key { min-height: 74px; padding: 14px 16px; border: 1px solid rgba(238, 213, 150, .13); border-radius: var(--tb-r-sm); background: rgba(20, 28, 22, .62); display: flex; align-items: center; gap: 12px; }
.action-key strong { flex: 0 0 auto; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-family: var(--tb-font-felt); }
.action-key span { color: var(--tb-cream-2); font-size: .78rem; line-height: 1.35; }
.action-key--hit strong { background: rgba(255, 208, 162, .12); color: #ffd0a2; }
.action-key--stand strong { background: rgba(140, 224, 168, .12); color: var(--tb-win); }
.action-key--double strong { background: rgba(246, 230, 174, .12); color: var(--tb-gold-hi); }
.action-key--split strong { background: rgba(169, 212, 255, .12); color: #a9d4ff; }
.chart-rules { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin-top: 20px; overflow: hidden; border: 1px solid rgba(238, 213, 150, .13); border-radius: var(--tb-r-md); background: rgba(238, 213, 150, .12); }
.chart-rules p { margin: 0 !important; padding: 14px 16px; background: #111713; font-size: .8rem; }
.section-heading-row { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 18px; }
.section-heading-row .eyebrow { margin-bottom: 6px; }
.section-heading-row h2 { margin-bottom: 0; }
.section-heading-row > p { color: var(--tb-muted); font-size: .82rem; text-align: right; }
.chart-table-wrap { margin-top: 0; border: 1px solid rgba(238, 213, 150, .2); border-radius: var(--tb-r-md); background: rgba(8, 14, 10, .55); box-shadow: 0 18px 45px -32px #000; }
.chart-table-wrap:focus-visible { outline: 2px solid var(--tb-gold-hi); outline-offset: 3px; }
.strategy-matrix { min-width: 820px; font-size: .86rem; }
.strategy-matrix caption, .comparison-table caption { padding: 14px 16px; }
.strategy-matrix th, .strategy-matrix td { min-width: 58px; height: 51px; padding: 11px 10px; }
.strategy-matrix thead th { position: sticky; top: 0; z-index: 2; background: #182019; }
.strategy-matrix thead th:first-child, .strategy-matrix tbody th { position: sticky; left: 0; z-index: 3; min-width: 130px; text-align: left; background: #182019; box-shadow: 1px 0 rgba(238, 213, 150, .16); }
.strategy-matrix thead th:first-child { z-index: 4; }
.strategy-matrix tbody tr:nth-child(even) td { background: rgba(255, 255, 255, .018); }
.strategy-matrix td.hit { background-color: rgba(255, 208, 162, .055); }
.strategy-matrix td.stand { background-color: rgba(140, 224, 168, .055); }
.strategy-matrix td.double { background-color: rgba(246, 230, 174, .07); }
.strategy-matrix td.split { background-color: rgba(169, 212, 255, .055); }
.chart-note { margin-top: 16px; color: var(--tb-muted) !important; font-size: .86rem; }
.compact-table-wrap { max-width: 760px; border-radius: var(--tb-r-md); }
.comparison-table th, .comparison-table td { min-width: 110px; padding: 13px 16px; }

.legend { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-top: 14px; color: var(--tb-muted); font-size: .8rem; }
.formula {
  margin-top: 18px;
  padding: 18px;
  border-left: 3px solid var(--tb-gold-lo);
  background: rgba(138, 109, 24, .08);
  color: var(--tb-cream);
  font-family: var(--tb-font-felt);
  font-size: 1.05rem;
}

.calculator {
  margin-top: 20px;
  padding: clamp(20px, 4vw, 32px);
  border: 1px solid rgba(238, 213, 150, .18);
  border-radius: var(--tb-r-lg);
  background: rgba(20, 28, 22, .58);
}
.calculator-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.calculator label, .calculator legend { color: var(--tb-cream); font-size: .82rem; font-weight: 700; }
.calculator select {
  width: 100%;
  margin-top: 7px;
  padding: 12px 14px;
  border: 1px solid var(--tb-glass-br);
  border-radius: var(--tb-r-sm);
  background: #141c16;
  color: var(--tb-cream);
  font: inherit;
}
.calculator select:focus, .calculator button:focus-visible, .calculator input:focus-visible { outline: 2px solid var(--tb-gold-hi); outline-offset: 2px; }
.calculator-note { margin-top: 14px; color: var(--tb-muted) !important; font-size: .8rem; }
.calculator fieldset { display: flex; flex-wrap: wrap; gap: 12px 24px; margin-top: 22px; padding: 16px; border: 1px solid rgba(238, 213, 150, .14); border-radius: var(--tb-r-sm); }
.calculator legend { padding: 0 7px; }
.calculator .check-label { display: inline-flex; align-items: center; gap: 9px; color: var(--tb-cream-2); font-weight: 500; }
.calculator input { width: 18px; height: 18px; accent-color: var(--tb-gold); }
.calculator button { margin-top: 22px; padding: 13px 18px; border: 1px solid var(--tb-gold); border-radius: var(--tb-r-sm); background: #705813; color: var(--tb-cream); font: 700 .8rem var(--tb-font-ui); letter-spacing: .08em; text-transform: uppercase; cursor: pointer; }
.calculator button:hover { background: #624b0f; }
.calculator-result { min-height: 126px; margin-top: 24px; padding: 20px; border-left: 3px solid var(--tb-gold); background: rgba(8, 14, 10, .58); }
.calculator-result__label { color: var(--tb-muted) !important; font-size: .72rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.calculator-result strong { display: block; margin: 4px 0; color: var(--tb-gold-hi); font-family: var(--tb-font-felt); font-size: 1.8rem; }
.calculator-result strong:focus-visible { outline: 2px solid var(--tb-gold-hi); outline-offset: 4px; }
.calculator-result p + p { margin-top: 4px; }
.calculator-result .calculator-result__reason { max-width: 680px; margin-top: 12px; color: var(--tb-cream) !important; }
.calculator-result .calculator-result__context { margin-top: 16px; color: var(--tb-muted) !important; font-size: .76rem; }
.calculator-result__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 20px; }
.calculator .calculator-result__actions .calculator-share { margin: 0; padding: 10px 14px; background: transparent; font-size: .72rem; }
.calculator .calculator-result__actions .calculator-share:hover { background: rgba(112, 88, 19, .35); }
.calculator-practise { color: var(--tb-gold-ink); font-size: .82rem; font-weight: 700; }
.calculator-share-status { min-height: 1.5em; margin-top: 8px; color: var(--tb-win) !important; font-size: .76rem; }

.calculator-examples { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 20px; }
.calculator-example {
  min-height: 152px;
  padding: 20px;
  border: 1px solid rgba(238, 213, 150, .16);
  border-radius: var(--tb-r-md);
  background: rgba(20, 28, 22, .5);
  color: var(--tb-cream-2);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.calculator-example:hover { border-color: rgba(216, 180, 92, .55); background: rgba(31, 40, 32, .68); }
.calculator-example:focus-visible { outline: 2px solid var(--tb-gold-hi); outline-offset: 3px; }
.calculator-example span { display: block; color: var(--tb-cream); font-size: .82rem; font-weight: 700; }
.calculator-example strong { display: block; margin-top: 7px; color: var(--tb-gold-hi); font-family: var(--tb-font-felt); font-size: 1.3rem; }
.calculator-example small { display: block; margin-top: 7px; color: var(--tb-muted); font-size: .76rem; line-height: 1.5; }

.site-footer {
  border-top: 1px solid rgba(238, 213, 150, .12);
  color: var(--tb-muted);
}
.site-footer__inner {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 32px 0 40px;
  display: flex;
  justify-content: space-between;
  gap: 28px;
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: 10px 20px; max-width: 720px; }
.site-footer p { margin-top: 12px; font-size: .78rem; }

@media (max-width: 780px) {
  .site-header__inner { width: min(1120px, calc(100% - 28px)); min-height: 60px; gap: 16px; }
  .site-brand img { width: 44px; height: 44px; }
  .site-nav { gap: 14px; }
  .site-nav a { font-size: .72rem; }
  .site-nav a:nth-child(2), .site-nav a:nth-child(3) { display: none; }
  .policy-hero, .policy-shell, .site-footer__inner { width: min(100% - 32px, 1120px); }
  .policy-hero { padding: 54px 0 38px; }
  .policy-shell { display: block; padding-bottom: 64px; }
  .article-grid { grid-template-columns: 1fr; }
  .calculator-grid, .calculator-examples { grid-template-columns: 1fr; }
  .policy-hero.chart-hero, .policy-shell--chart { width: min(100% - 28px, 1240px); }
  .policy-shell--chart .chart-toc { gap: 8px 16px; }
  .policy-shell--chart .chart-toc strong { flex-basis: 100%; }
  .chart-copy { padding-top: 30px; }
  .chart-copy section + section { margin-top: 56px; }
  .action-legend { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chart-rules { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section-heading-row { display: block; }
  .section-heading-row > p { margin-top: 8px; text-align: left; }
  .strategy-matrix { font-size: .8rem; }
  .strategy-matrix th, .strategy-matrix td { min-width: 52px; height: 48px; padding: 10px 8px; }
  .strategy-matrix thead th:first-child, .strategy-matrix tbody th { min-width: 112px; }
  .page-toc { position: static; margin-top: 38px; }
  .site-footer__inner { display: block; }
}

@media (max-width: 480px) {
  .action-legend, .chart-rules { grid-template-columns: 1fr; }
}
