/* Public product, learning and calculator pages, using the site's brand tokens. */
.guide-hero { padding: 64px 0 42px; border-bottom: 1px solid var(--line); }
.breadcrumbs { margin: 0 0 28px; color: var(--muted); font-size: 13px; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 0 6px; margin: 0; padding: 0; list-style: none; }
.breadcrumbs li + li::before { content: "/"; content: "/" / ""; margin-right: 6px; }
/* A hyphenated word in a heading moves to the next line whole, never split
   at its hyphen ("early-" / "payout"). */
.nobr { white-space: nowrap; }
.guide-hero h1 { max-width: 940px; margin: 0 0 22px; font-size: clamp(34px, 4.5vw, 58px); line-height: 1.09; letter-spacing: -.045em; }
.guide-hero .lede { max-width: 760px; margin: 0; font-size: 20px; color: var(--muted); }
.guide-hero .hero-ctas { margin-top: 26px; }
.guide-layout { display: grid; grid-template-columns: minmax(0, 790px) minmax(210px, 1fr); gap: 70px; padding-top: 44px; padding-bottom: 80px; align-items: start; }
.guide-copy { min-width: 0; }
.guide-copy h2 { margin: 42px 0 14px; font-size: 28px; line-height: 1.2; letter-spacing: -.03em; }
.guide-copy h2:first-child { margin-top: 0; }
.guide-copy h3 { margin: 26px 0 10px; font-size: 20px; }
.guide-copy p, .guide-copy ul, .guide-copy ol { margin: 0 0 20px; }
.guide-copy li { margin-bottom: 10px; }
.guide-copy a, .guide-aside a { text-underline-offset: 3px; text-decoration-color: var(--accent); }
.guide-aside { padding: 22px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
@media (min-width: 901px) {
  .guide-aside { position: sticky; top: 96px; }
}
.guide-aside h2 { font-size: 14px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 14px; }
.guide-aside ul { padding: 0; margin: 0; list-style: none; font-size: 14.5px; }
.guide-aside li + li { margin-top: 11px; }
.aside-cta {
  margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line);
}
.aside-cta b { display: block; font-size: 16px; letter-spacing: -.02em; margin-bottom: 6px; }
.aside-cta p { margin: 0 0 14px; font-size: 13.5px; color: var(--muted); line-height: 1.5; }
.aside-cta .btn { width: 100%; }
.matcher-bridge {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px;
  margin: 28px 0; padding: 22px 24px;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line));
  border-left: 4px solid var(--accent); border-radius: 14px; background: var(--accent-soft);
}
.matcher-bridge div { max-width: 560px; }
.matcher-bridge strong { display: block; font-size: 17px; letter-spacing: -.02em; margin-bottom: 4px; }
.matcher-bridge p { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.5; }
.guide-note { padding: 22px; border-left: 4px solid var(--accent); background: var(--panel); border-radius: 0 12px 12px 0; margin: 26px 0; }
.guide-note p:last-child { margin-bottom: 0; }
.formula { font-family: var(--mono); font-size: 14px; padding: 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); overflow-wrap: anywhere; }
.table-scroll { max-width: 100%; overflow-x: auto; margin: 24px 0; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.data-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: 14px; }
.data-table th, .data-table td { text-align: left; padding: 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.data-table th { background: var(--panel-2); }
.data-table tr:last-child td { border-bottom: 0; }
.data-table caption { text-align: left; padding: 14px; font-weight: 650; }
.data-table .money { white-space: nowrap; }
.data-table tbody th { background: transparent; font-weight: inherit; }
.data-table .highlight { background: var(--accent-soft); font-weight: 650; }
.guide-copy figure { margin: 24px 0; }
.guide-copy figcaption, .fine { margin-top: 12px; font-size: 13px; color: var(--muted); }
.product-board { overflow-x: auto; }
.calculator-shell { padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.calculator-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; margin-bottom: 12px; }
.calculator-fields label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.calculator-fields input, .calculator-fields select, .fix-mode-control select { display: block; width: 100%; min-height: 42px; font-size: 16px; padding: 7px 11px; border: 1px solid var(--control-line); border-radius: 8px; background: var(--bg); color: var(--text); }
.calculator-fields small { display: block; color: var(--muted); font-size: 11.5px; line-height: 1.35; margin-top: 3px; }
.calculator-fields .field-error { color: var(--bad); font-size: 12.5px; }
.calculator-fields [aria-invalid="true"] { border: 2px solid var(--bad); }
.result-summary { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; margin: 14px 0; }
.result-summary div { background: var(--panel-2); padding: 11px 14px; border-radius: 10px; }
.result-summary dt { color: var(--muted); font-size: 12.5px; }
.result-summary dd { margin: 4px 0 0; font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
@media (max-width: 900px) { .guide-layout { grid-template-columns: minmax(0, 1fr); gap: 32px; } .guide-hero { padding-top: 32px; } }
@media (max-width: 540px) { .calculator-shell { padding: 14px; } .result-summary dd { font-size: 20px; } .guide-copy h2 { font-size: 25px; } .guide-hero .lede { font-size: 17px; } }
@media (max-width: 340px) { .calculator-fields { grid-template-columns: 1fr; } }
/* On a phone, a table with row labels becomes one block per row: the label
   across the top, then each amount under its column's name, two to a line,
   so no column sits off-screen. An odd amount out (the combined net, say)
   takes the whole last line. The markup's roles keep it a table to screen
   readers. */
@media (max-width: 540px) {
  .data-table.stack, .data-table.stack tbody, .data-table.stack caption { display: block; }
  .data-table.stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .data-table.stack tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; padding: 14px; border-top: 1px solid var(--line); }
  .data-table.stack th[scope="row"], .data-table.stack td { padding: 0; border: 0; }
  .data-table.stack th[scope="row"] { grid-column: 1 / -1; font-weight: 650; }
  .data-table.stack td::before { content: attr(data-label); content: attr(data-label) / ""; display: block; margin-bottom: 2px; color: var(--muted); font-size: 12px; font-weight: 500; white-space: normal; }
  .data-table.stack td:last-child:nth-child(even) { grid-column: 1 / -1; font-weight: 650; }
  .data-table.stack td { overflow-wrap: anywhere; }
  /* Bookmaker list: a compact card (name, market and tag, eligible matches) with no repeated labels. */
  #bookie-table.stack tr { grid-template-columns: 1fr; gap: 4px; padding: 12px 14px; }
  #bookie-table.stack td::before { display: none; }
  #bookie-table.stack td[data-label="Eligible matches"] { color: var(--muted); font-size: 13px; line-height: 1.45; }
  #bookie-table.stack td br { display: none; }
  #bookie-table.stack .tag-yes, #bookie-table.stack .tag-opt { margin: 2px 0 0 6px; white-space: nowrap; }
}

.calculator-page-content { padding-top: 16px; padding-bottom: 52px; }
.calculator-hero { padding: 20px 0 16px; }
.calculator-hero .breadcrumbs { margin-bottom: 8px; }
.calculator-hero h1 { margin-bottom: 4px; font-size: clamp(26px, 3vw, 36px); }
.calculator-hero .lede { font-size: 15.5px; }
.calculator-nav { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.calculator-nav a {
  display: inline-flex; align-items: center; padding: 7px 13px;
  border: 1px solid var(--line); border-radius: 999px;
  text-decoration: none; background: var(--panel); font-size: 13.5px; font-weight: 600; white-space: nowrap;
}
.calculator-nav a[aria-current] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.calculator-nav a:hover { border-color: var(--accent); }
.calculator-nav b { font-size: inherit; font-weight: inherit; }
.calculator-nav span { display: none; }
.calculator-panel h2 { margin: 0 0 8px; font-size: 20px; letter-spacing: -.025em; line-height: 1.2; }
.calculator-intro { margin: 0 0 12px; font-size: 14px; color: var(--muted); }
.calc-empty {
  margin: 0; padding: 36px 20px; text-align: center;
  border: 1px dashed var(--line); border-radius: 12px;
  color: var(--muted); font-size: 14px; background: var(--bg);
}
@media (max-width: 959px) {
  .calculator-results[data-empty="1"] { display: none !important; }
  .calculator-hero .lede { display: none; }
  .calculator-hero { padding: 14px 0 12px; }
}
.calculator-shell h3 { margin: 0 0 10px; font-size: 16px; }
.calculator-shell .calculator-fields + h3 { margin-top: 18px; }
.calculator-fields > *, .matched-lay-row > * { min-width: 0; }
.calculator-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin-bottom: 10px; }
.calculator-head h3 { margin: 0; }
.segmented { display: inline-flex; margin: 0; padding: 2px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); }
.segmented label { position: relative; cursor: pointer; }
.segmented input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.segmented span { display: block; padding: 4px 10px; border: 1px solid transparent; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.segmented input:checked + span { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.segmented label:hover input:not(:checked) + span { color: var(--text); }
.segmented input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.calculator-check { display: flex; gap: 10px; align-items: center; min-height: 44px; cursor: pointer; }
.calculator-fields .calculator-check { display: flex; align-self: start; margin: 25px 0 0; font-size: 15px; font-weight: 500; line-height: 1.3; }
.calculator-check input { width: 20px; height: 20px; accent-color: var(--accent); }
.calculator-results .result-summary { margin-top: 0; }
.calculator-results p { margin: 12px 0; }
.calculator-results .table-scroll { margin: 14px 0; }
.calculator-results .data-table th, .calculator-results .data-table td, .calculator-results .data-table caption { padding: 9px 12px; }
.calculator-results .data-table tbody th { background: transparent; font-weight: 500; }
.calculator-results { padding-top: 6px; }
.calculator-results > :last-child, .calculator-results > :last-child > :last-child { margin-bottom: 0; }
.calculator-field small:empty, .field-error:empty { display: none; }
.result-summary dd { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; }
.result-value { user-select: all; }
.copy-amount { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; min-width: 84px; padding: 7px 10px; border: 1px solid var(--control-line); border-radius: 8px; background: var(--panel); color: var(--text); font: 500 13px var(--font); cursor: pointer; }
.copy-amount:hover { border-color: var(--accent); color: var(--accent); }
.copy-amount svg { width: 16px; height: 16px; flex: none; }
.position-stats { display: flex; flex-wrap: wrap; gap: 8px 32px; margin: 12px 0; font-variant-numeric: tabular-nums; }
.position-stats div { display: grid; gap: 3px; }
.position-stats dt { color: var(--muted); font-size: 13px; }
.position-stats dd { margin: 0; font-weight: 600; }
.staking-comparison { margin-top: 8px; }
.staking-comparison > summary { cursor: pointer; color: var(--muted); font-size: 14px; min-height: 40px; padding: 8px 0; }
.calculator-field .field-error { display: block; color: var(--bad); font-size: 13px; margin-top: 4px; }
.calculator-shell > form > .field-error { color: var(--bad); }
.fix-mode-control { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-bottom: 16px; }
.fix-mode-control label { font-size: 14px; font-weight: 650; }
.fix-mode-control select { width: auto; min-width: 260px; }
.matched-lays { position: relative; min-width: 0; padding: 0; margin: 0 0 14px; border: 0; }
/* A floated legend sits inside the fieldset, so the add button can share its line. */
.matched-lays legend { float: left; width: 100%; padding: 0 150px 0 0; font-size: 14px; font-weight: 650; line-height: 36px; margin-bottom: 4px; }
#matched-lay-rows, #banker-leg-rows { clear: both; }
.matched-lay-row { display: grid; grid-template-columns: 92px minmax(0, 1fr) minmax(0, 1fr) 84px; gap: 10px; align-items: end; padding: 8px 0 10px; border-top: 1px solid var(--line); }
.matched-lay-row .calculator-field input { width: 100%; min-height: 44px; border: 1px solid var(--control-line); border-radius: 8px; padding: 8px 12px; background: var(--bg); color: var(--text); font-size: 17px; }
.matched-lay-row .calculator-field label { display: block; font-size: 13px; margin-bottom: 4px; }
.matched-lay-row .remove-lay { padding: 8px 10px; font-size: 14px; }
/* The add button sits on the legend's line but stays after the rows in tab order. */
#add-matched-lay { position: absolute; top: 0; right: 0; min-height: 36px; padding: 6px 12px; font-size: 14px; }
.matched-lay-row .calculator-field small { display: none; }
.calculator-field input[aria-invalid="true"], .matched-lay-row .calculator-field input[aria-invalid="true"] { border: 2px solid var(--bad); }
.matched-lay-label { align-self: center; padding-top: 18px; font-size: 13px; font-weight: 600; line-height: 1.3; }
.calculator-reading { display: flex; flex-wrap: wrap; gap: 10px 24px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 14px; }
.calculator-reading a { text-underline-offset: 4px; }
.calc-guide { max-width: 780px; margin-top: 32px; padding-top: 28px; border-top: 1px solid var(--line); }
.calc-guide h2 { margin: 0 0 12px; font-size: 22px; letter-spacing: -.025em; line-height: 1.25; }
.calc-guide h3 { margin: 22px 0 8px; font-size: 17px; letter-spacing: -.015em; }
.calc-guide p { margin: 0 0 14px; color: var(--muted); font-size: 15px; line-height: 1.6; }
.calc-guide ol, .calc-guide ul { margin: 0 0 16px; padding-left: 20px; color: var(--muted); font-size: 15px; line-height: 1.6; }
.calc-guide li + li { margin-top: 8px; }
.calc-guide strong { color: var(--text); }
.calculators-page [hidden] { display: none !important; }
/* On a wide screen the inputs sit beside the results, so a whole calculator
   fits on one laptop screen without scrolling. */
@media (min-width: 960px) {
  .calculator-shell { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 28px; align-items: start; }
  .calculator-shell > form > .calculator-fields:last-of-type { margin-bottom: 0; }
  .calculator-results { padding-top: 0; }
  /* Fix a bet: the mode choice sits beside the heading. */
  #fix-a-bet { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 28px; }
  #fix-a-bet > h2, #fix-a-bet > .calculator-intro { grid-column: 1; }
  #fix-a-bet > .fix-mode-control { grid-column: 2; grid-row: 1 / span 2; align-self: center; margin: 0 0 16px; }
  #fix-a-bet > .calculator-shell { grid-column: 1 / -1; }
}
/* The partial-lay form has the most inputs, so it takes the wider column and,
   with room, three inputs to a row. */
@media (min-width: 960px) {
  .calculator-shell[data-fix-panel="part"] { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
}
@media (min-width: 1100px) {
  #part-calculator > .calculator-fields:first-child { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr) minmax(0, 1fr); }
}
@media (max-width: 650px) {
  .copy-amount { min-height: 40px; }
  .calculator-nav a { padding: 6px 11px; font-size: 13px; }
  .matched-lay-row { grid-template-columns: 1fr 1fr; gap: 8px; }
  .matched-lay-label { grid-column: 1 / -1; padding-top: 0; }
  .calculator-fields .calculator-check { margin-top: 0; grid-column: 1 / -1; }
  .matched-lay-row .remove-lay { grid-column: 2; justify-self: end; }
  .matched-lays legend { padding-right: 0; }
  #add-matched-lay { position: static; min-height: 40px; margin-top: 6px; }
}
.matched-lays-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; margin-bottom: 8px; }
.matched-lays-head strong { font-size: 14px; font-weight: 650; }
.matched-lays-head #add-banker-leg { position: static; min-height: 36px; padding: 6px 12px; font-size: 14px; }

/* 2UP Variance & Bankroll Simulator */
.sim-shell { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); }
@media (max-width: 959px) { .sim-shell { grid-template-columns: 1fr; } }
.sim-form-actions { margin-top: 14px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.sim-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 16px; }
@media (max-width: 1120px) { .sim-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .sim-kpis { grid-template-columns: 1fr; } }
.sim-kpis dd { font-size: 20px; }
.sim-kpis dd.up { color: var(--accent); }
.sim-kpis dd.neg { color: var(--bad); }
.sim-kpis dd small { font-size: 13px; font-weight: 500; color: var(--muted); }
.sim-chart-card {
  margin: 0 0 16px; padding: 16px; border: 1px solid var(--line);
  border-radius: 12px; background: var(--bg);
}
.sim-chart-head {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px;
  margin-bottom: 10px;
}
.sim-chart-head strong { display: block; font-size: 14px; }
.sim-chart-head > div > span { display: block; font-size: 12px; color: var(--muted); }
.sim-legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 11.5px; color: var(--muted); }
.sim-legend span { display: inline-flex; align-items: center; gap: 5px; }
.swatch { display: inline-block; width: 12px; height: 8px; border-radius: 2px; }
.swatch.med { height: 3px; background: var(--accent); }
.swatch.band { background: color-mix(in srgb, var(--accent) 28%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); }
.swatch.path { height: 2px; background: var(--control-line); }
.sim-svg { display: block; width: 100%; height: auto; overflow: visible; }
.sim-grid { stroke: var(--line); stroke-width: 1; }
.sim-zero { stroke: var(--control-line); stroke-width: 1.2; stroke-dasharray: 4 4; }
.sim-axis { fill: var(--muted); font: 500 11px var(--font); font-variant-numeric: tabular-nums; }
.sim-band-outer { fill: color-mix(in srgb, var(--accent) 14%, transparent); }
.sim-band-inner { fill: color-mix(in srgb, var(--accent) 26%, transparent); }
.sim-sample { stroke: color-mix(in srgb, var(--text) 20%, transparent); stroke-width: 1; }
.sim-median { stroke: var(--accent); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.sim-stats { padding-top: 6px; border-top: 1px solid var(--line); }

/* Badges in comparison / bookmaker matrices */
.tag-yes, .tag-opt {
  display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 650; white-space: nowrap;
}
.tag-yes { background: var(--accent-soft); color: var(--accent); }
.tag-opt { background: rgb(var(--back-rgb) / 14%); color: var(--back); }

/* Acca Freeze: minimum-legs hint and bookmaker list filters */
.calc-hint { margin: 10px 0 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.legs-count { font-weight: 500; color: var(--muted); font-size: 14px; }
.calc-terms { max-width: 780px; margin-top: 32px; padding-top: 28px; border-top: 1px solid var(--line); }
.calc-terms h2 { margin: 0 0 12px; font-size: 22px; letter-spacing: -.025em; line-height: 1.25; }
.calc-terms p, .calc-terms li { color: var(--muted); font-size: 15px; line-height: 1.6; }
.calc-terms ul { margin: 0 0 16px; padding-left: 20px; }
.calc-terms li + li { margin-top: 8px; }
.calc-terms strong { color: var(--text); }
.bookie-filters .btn[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

.leg-steps { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 6px; }
.leg-step { padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.leg-step.is-active { padding: 10px 12px; border-color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
.leg-step.is-waiting, .leg-step.is-void { background: transparent; color: var(--muted); }
.leg-step-head { display: flex; align-items: baseline; gap: 8px; min-height: 24px; }
.leg-step-head strong { font-size: 14px; white-space: nowrap; }
.leg-odds { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.leg-badge { margin-left: auto; align-self: center; padding: 1px 8px; border: 1px solid var(--line); border-radius: 999px; font-size: 11.5px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.leg-badge.now, .leg-badge.won { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.leg-badge.lost { border-color: var(--bad); color: var(--bad); }
.leg-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 8px; }
.leg-row > .leg-hint { margin: 0; }
.leg-stake-input { display: flex; align-items: center; width: 116px; flex: none; border: 1px solid var(--control-line); border-radius: 8px; background: var(--bg); }
.leg-stake-input:focus-within { outline: 2px solid var(--accent); outline-offset: 1px; }
.leg-stake-input span { padding-left: 9px; color: var(--muted); }
.leg-stake-input input { width: 100%; min-width: 0; height: 36px; padding: 0 8px 0 4px; border: 0; background: transparent; color: var(--text); font: 600 15px var(--font); font-variant-numeric: tabular-nums; outline: none; }
.leg-stake-input:has(input[aria-invalid="true"]) { border: 2px solid var(--bad); }
.calculator-results .leg-hint { margin: 6px 0 0; font-size: 12.5px; line-height: 1.4; color: var(--muted); font-variant-numeric: tabular-nums; }
.leg-hint strong { color: var(--text); font-weight: 650; }
.link-btn { padding: 0; border: 0; background: none; color: var(--accent); font: inherit; text-decoration: underline; cursor: pointer; }
.leg-outcomes { display: flex; gap: 6px; }
.leg-step.is-active > .leg-outcomes { margin-top: 8px; }
.leg-outcomes .leg-outcome { flex: 1 1 0; }
.leg-row .leg-outcomes { flex: 1 1 0; min-width: 130px; }
.leg-outcome { height: 36px; padding: 0 10px; border: 1px solid var(--control-line); border-radius: 8px; background: var(--panel); color: var(--text); font: 600 13px var(--font); white-space: nowrap; cursor: pointer; }
.leg-outcome.won:hover { border-color: var(--accent); color: var(--accent); }
.leg-outcome.lost:hover { border-color: var(--bad); color: var(--bad); }
.leg-ifs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px 10px; margin: 8px 0 0; font-variant-numeric: tabular-nums; }
.leg-ifs dt { font-size: 11.5px; color: var(--muted); }
.leg-ifs dd { margin: 0; font-size: 13.5px; font-weight: 650; }
.leg-reset { margin-top: 10px; }

.acca-store { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-bottom: 12px; }
.acca-store label { font-size: 14px; font-weight: 650; }
.acca-store select { min-width: 0; flex: 1 1 0; max-width: 320px; min-height: 38px; padding: 6px 10px; border: 1px solid var(--control-line); border-radius: 8px; background: var(--bg); color: var(--text); font: 500 14px var(--font); }
.acca-store .btn-sm { flex: none; }
.acca-store-note { flex-basis: 100%; margin: -2px 0 0; font-size: 12.5px; color: var(--muted); }
.leg-name input { width: 100%; min-width: 0; border: 1px solid var(--control-line); border-radius: 8px; background: var(--bg); color: var(--text); font: 500 15px var(--font); }
.leg-name input::placeholder { color: var(--muted); opacity: .7; }
.freeze-name { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.freeze-name label { flex: none; font-size: 13px; font-weight: 600; }
.freeze-name input { height: 36px; padding: 0 10px; }
#banker-leg-rows .matched-lay-row { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr) auto; }
.matched-lay-label.leg-name { align-self: start; padding-top: 0; }
.matched-lay-label.leg-name label { display: block; margin-bottom: 4px; font-size: 13px; font-weight: 600; line-height: 1.6; }
.matched-lay-label.leg-name input { min-height: 44px; padding: 8px 10px; }
.leg-num { margin-right: 6px; color: var(--muted); font-weight: 600; }
.leg-step-head strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 650px) {
  #banker-leg-rows .matched-lay-row { grid-template-columns: 1fr 1fr; }
  .matched-lay-label.leg-name { display: flex; align-items: center; gap: 10px; }
  .matched-lay-label.leg-name label { flex: none; margin: 0; }
  .matched-lay-label.leg-name input { min-height: 0; height: 36px; }
}
