/* Layout for /tools/, the pot odds calculator, and the outs calculator.
   Site chrome comes from the equity calculator stylesheet. */

.tools-lede {
  margin: 16px 0 0;
  max-width: 62ch;
  color: var(--t2);
  font-size: 17px;
  line-height: 1.5;
}
.tools-page .article a,
.tools-page .calc-links a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.tools-index .tools-lede {
  margin-top: 18px;
  font-size: 18px;
  line-height: 1.55;
}
.tool-list {
  list-style: none;
  margin: 40px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 22px;
}
.tool-index-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  border-radius: 22px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--t1);
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(17, 17, 19, 0.04);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}
.tool-index-card:hover {
  color: var(--t1);
  border-color: rgba(21, 128, 61, 0.45);
  box-shadow: 0 18px 44px rgba(17, 17, 19, 0.07);
  transform: translateY(-3px);
}
.tool-index-card:focus-visible {
  outline: 2px solid var(--g);
  outline-offset: 4px;
}
.tool-index-card:hover h2 { color: var(--g); }
.tool-index-art {
  display: block;
  background: #F4F4F2;
  border-bottom: 1px solid var(--line);
  line-height: 0;
}
.tool-index-art svg { display: block; width: 100%; height: auto; }
.tool-index-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  padding: 22px 22px 20px;
}
.tool-index-card h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 28px;
  letter-spacing: -0.03em;
  line-height: 1.05;
}
.tool-index-card p { margin: 0; color: var(--t2); font-size: 15px; line-height: 1.45; }
.tool-index-card .go {
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--g);
  font-size: 14px;
  font-weight: 600;
}
.tool-index-card .go svg { display: block; transition: transform 180ms ease; }
.tool-index-card:hover .go svg { transform: translateX(3px); }

.tool-page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
}
.tool-page-copy { min-width: 0; max-width: 40rem; }
.tool-page-mark {
  flex: 0 0 232px;
  width: 232px;
  margin-bottom: 2px;
  border-radius: 18px;
  overflow: hidden;
  background: #F4F4F2;
  border: 1px solid var(--line);
  line-height: 0;
}
.tool-page-mark svg { display: block; width: 100%; height: auto; }

.tools-index .study-note { margin-top: 32px; }
.tools-index .section { padding-top: 80px; }
.tools-index .faq-list details { padding: 18px 0; }

.tool-card {
  max-width: 980px;
  margin: 22px 0 0;
  background: #0f0f10;
  color: #f4f4f5;
  border: 1px solid #222226;
  border-radius: 18px;
  padding: 22px;
  color-scheme: dark;
}
.tool-card a { color: #93c5fd; }
.tool-card a:hover { color: #bfdbfe; }
.calc-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}
.calc-form { margin: 0; min-width: 0; }
.calc-toggle {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0 0 16px;
  padding: 3px;
  border-radius: 999px;
  border: 1px solid #2a2a2e;
  background: #101012;
}
.calc-toggle label {
  position: relative;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 7px 12px;
  color: #a1a1aa;
  font-size: 13px;
  line-height: 1.2;
  cursor: pointer;
}
.calc-toggle input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}
.calc-toggle label:has(input:checked) {
  background: rgba(96, 165, 250, 0.2);
  color: #93c5fd;
}
.calc-toggle label:has(input:focus-visible) {
  outline: 2px solid #60a5fa;
  outline-offset: 2px;
}
.calc-field { display: block; margin: 0 0 14px; }
.calc-label,
.calc-kicker,
.calc-stat dt,
.outs-rule {
  display: block;
  margin: 0 0 6px;
  color: #71717a;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.calc-input { display: block; position: relative; }
.calc-field input {
  width: 100%;
  height: 52px;
  border-radius: 10px;
  border: 1px solid #2a2a2e;
  background: #111113;
  color: #f4f4f5;
  font-size: 22px;
  font-variant-numeric: tabular-nums;
  padding: 0 14px;
}
.calc-input.has-suffix input { padding-right: 36px; }
.calc-suffix {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #71717a;
  font-size: 18px;
  pointer-events: none;
}
.calc-field input:focus-visible {
  outline: 2px solid #60a5fa;
  outline-offset: 2px;
}
.calc-hint,
.calc-derived,
.calc-note,
.calc-links {
  margin: 0;
  color: #a1a1aa;
  font-size: 14px;
  line-height: 1.45;
}
.calc-derived { margin-top: 8px; color: #d4d4d8; }
.calc-hint { margin-top: 4px; }
.stepper {
  display: flex;
  align-items: center;
  gap: 8px;
}
.calc-field .stepper input {
  flex: 1;
  width: auto;
  min-width: 0;
  text-align: center;
}
.stepper button {
  flex: 0 0 auto;
  width: 44px;
  height: 52px;
  border-radius: 10px;
  border: 1px solid #2a2a2e;
  background: #111113;
  color: #93c5fd;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.stepper button:focus-visible,
.presets button:focus-visible {
  outline: 2px solid #60a5fa;
  outline-offset: 2px;
}
.presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 16px;
}
.presets button {
  border: 1px solid #2a2a2e;
  background: #111113;
  color: #d4d4d8;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 13px;
  cursor: pointer;
}
.presets button[aria-pressed="true"] {
  background: rgba(96, 165, 250, 0.2);
  color: #93c5fd;
  border-color: transparent;
}
.calc-result {
  min-width: 0;
}
.calc-hero {
  margin: 0;
  color: #60a5fa;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: clamp(40px, 5vw, 56px);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1;
  overflow-wrap: anywhere;
}
.calc-hero.is-empty {
  color: #d4d4d8;
  font-family: var(--ui);
  font-size: 22px;
  letter-spacing: -0.02em;
  line-height: 1.3;
}
.calc-percent {
  margin: 10px 0 0;
  color: #f4f4f5;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 28px;
  letter-spacing: -0.03em;
}
.calc-stats {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  margin: 18px 0 0;
}
.calc-stat {
  margin: 0;
  padding: 12px;
  border-radius: 12px;
  background: #17171a;
  border: 1px solid #222226;
}
.calc-stat dd,
.outs-approx {
  margin: 0;
  color: #f4f4f5;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 24px;
  letter-spacing: -0.03em;
}
.calc-note { margin-top: 16px; max-width: 62ch; }
.calc-links { margin-top: 12px; max-width: 62ch; }
.calc-noscript { margin: 12px 0 0; color: #a1a1aa; font-size: 14px; }

@media (min-width: 801px) {
  .tools-page .eq-page-title {
    margin-top: 22px;
    font-size: clamp(40px, 4vw, 56px);
    line-height: 0.98;
  }
  .calc-result {
    padding-left: 22px;
    border-left: 1px solid #222226;
  }
}
@media (min-width: 760px) {
  .tool-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
}
@media (min-width: 1100px) {
  .tool-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 800px) {
  .tool-card { padding: 16px; }
  .tool-page-head { flex-direction: column; align-items: flex-start; gap: 20px; }
  .tool-page-mark { width: min(100%, 280px); flex-basis: auto; }
  .calc-grid { grid-template-columns: 1fr; gap: 18px; }
  .calc-result {
    padding-top: 16px;
    border-top: 1px solid #222226;
  }
  .tools-page .eq-page-title { font-size: 36px; }
  .tool-index-card h2 { font-size: 26px; }
  .calc-toggle label { padding: 8px 12px; }
  .presets button { padding: 9px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .tool-index-card,
  .tool-index-card .go svg { transition: none; }
  .tool-index-card:hover { transform: none; }
  .tool-index-card:hover .go svg { transform: none; }
}
