/* Combup: beden tablosu ve numara hesaplama sayfaları (/beden-tablosu, /ayakkabi-numarasi-hesaplama;
   backend/kombinle/beden/render.py). Renk ve yazı tipleri seo.css değişkenlerinden; koyu tema onları izler. */

.bd-page { max-width: 880px; }
.bd-head .bd-source, .bd-head .bd-owner { max-width: 760px; margin: 10px 0 0; color: var(--muted); font-size: 13.5px; line-height: 1.55; }
.bd-head .bd-source a { color: var(--ink-2); text-underline-offset: 3px; }
.bd-section { margin-top: 34px; }
.bd-section > h2, .bd-tool > h2 { margin: 0 0 10px; font-family: var(--font-display); font-size: clamp(21px, 3.2vw, 26px); line-height: 1.2; font-weight: 650; }
.bd-section > p, .bd-tool > p { max-width: 760px; margin: 0 0 14px; color: var(--ink-2); font-size: 15.5px; line-height: 1.65; }

/* ---- araç kartı ---- */
.bd-tool { margin-top: 24px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
@media (min-width: 720px) { .bd-tool { padding: 22px 24px; } }
.bd-form { display: grid; gap: 14px; margin: 0; }
.bd-gender { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; border: 0; min-width: 0; }
.bd-gender legend { width: 100%; margin: 0 0 6px; padding: 0; color: var(--ink-2); font-size: 13px; font-weight: 600; }
.bd-chip { position: relative; display: inline-flex; }
.bd-chip input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.bd-chip span { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--bg); color: var(--ink-2); font-size: 14.5px; font-weight: 600; }
.bd-chip input:checked + span { border-color: var(--ink); background: var(--ink); color: var(--bg); }
.bd-chip input:focus-visible + span { outline: 2px solid var(--ai-2); outline-offset: 2px; }
.bd-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 640px) { .bd-fields { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.bd-convert .bd-fields { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .bd-convert .bd-fields { grid-template-columns: minmax(0, 3fr) minmax(0, 1fr); } }
.bd-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.bd-label { color: var(--ink-2); font-size: 13px; font-weight: 600; }
.bd-input { display: flex; align-items: center; min-width: 0; border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: var(--bg); transition: border-color 0.2s, box-shadow 0.2s; }
.bd-input:focus-within { border-color: color-mix(in srgb, var(--ink) 55%, var(--line)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ai-2) 14%, transparent); }
.bd-input input { flex: 1; min-width: 0; width: 100%; height: 48px; padding: 0 4px 0 14px; border: 0; background: transparent; color: var(--ink); font: 600 17px var(--font-text); font-variant-numeric: tabular-nums; outline: none; -moz-appearance: textfield; appearance: textfield; }
.bd-input input::-webkit-outer-spin-button, .bd-input input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.bd-input input::placeholder { color: var(--muted); font-weight: 400; }
.bd-unit { flex: none; padding: 0 12px 0 4px; color: var(--muted); font-size: 14px; }
.bd-field select { width: 100%; min-width: 0; height: 48px; padding: 0 12px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: var(--bg); color: var(--ink); font: 600 15px var(--font-text); }
.bd-field select:focus-visible { outline: 2px solid var(--ai-2); outline-offset: 2px; }
.bd-hint { color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.bd-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.bd-actions .button { min-height: 48px; padding: 0 22px; font-size: 15px; cursor: pointer; }
@media (max-width: 480px) { .bd-actions .button { flex: 1 1 100%; } }

/* ---- sonuç ---- */
.bd-result { margin-top: 18px; outline: none; }
.bd-result[hidden] { display: none; }
.bd-given { margin: 0 0 10px; font-weight: 650; }
.bd-rule, .bd-empty { margin: 8px 0 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.bd-error { margin: 0; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--accent-soft); color: var(--ink); font-size: 14px; }
.bd-result-table table { font-size: 14px; }
.bd-result-table th[scope="row"] { min-width: 120px; font-weight: 650; }
.bd-result-table th[scope="row"] a { color: var(--ink); text-underline-offset: 3px; }
.bd-sub { display: block; margin-top: 2px; color: var(--muted); font-size: 12.5px; font-weight: 500; }
.bd-size { font-family: var(--font-display); font-size: 22px; font-weight: 650; white-space: nowrap; }
.bd-size.bd-miss { color: var(--muted); font-family: var(--font-text); font-size: 14px; font-weight: 600; }
.bd-why { color: var(--ink-2); font-size: 13.5px; line-height: 1.5; }
@media (max-width: 560px) {
  .bd-result-table thead { display: none; }
  .bd-result-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 10px; padding: 10px 12px; border-top: 1px solid var(--line); }
  .bd-result-table tr:first-child { border-top: 0; }
  .bd-result-table th, .bd-result-table td { padding: 0; border: 0; }
  .bd-result-table .bd-size { grid-row: 1; grid-column: 2; align-self: start; text-align: right; }
  .bd-result-table .bd-why { grid-column: 1 / -1; margin-top: 4px; }
}

/* ---- tablolar ---- */
.bd-block { margin: 0 0 18px; scroll-margin-top: 76px; }
.bd-block .table-wrap { margin-bottom: 6px; }
.bd-table table { font-variant-numeric: tabular-nums; }
.bd-table th[scope="row"] { font-weight: 650; white-space: nowrap; }
.bd-table td { white-space: nowrap; }
.bd-scope, .bd-note { margin: 4px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.bd-equiv th[scope="row"] { position: sticky; left: 0; z-index: 1; background: var(--surface); }
.bd-equiv thead th:first-child { position: sticky; left: 0; z-index: 2; }
.bd-equiv td, .bd-equiv thead th + th { text-align: center; }
/* geniş tabloda başlık yatay kaydırmada ekranda kalsın */
.bd-table caption { position: sticky; left: 0; max-width: calc(100vw - 34px); }
.bd-equiv thead th { white-space: nowrap; }

/* ---- kartlar, ölçüm, bağlantılar ---- */
.bd-cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 560px) { .bd-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 860px) { .bd-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.bd-card { display: flex; flex-direction: column; gap: 3px; height: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); text-decoration: none; }
.bd-card:hover { border-color: var(--ink-2); }
.bd-card strong { font-size: 15px; }
.bd-card span { color: var(--muted); font-size: 13px; }
.bd-howto { max-width: 760px; margin: 0 0 12px; padding-left: 20px; color: var(--ink-2); font-size: 15.5px; line-height: 1.65; }
.bd-howto li + li { margin-top: 6px; }
.bd-howto strong { color: var(--ink); }
.bd-jump ul { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; }
.bd-jump a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink-2); font-size: 13.5px; font-weight: 600; text-decoration: none; }
.bd-jump a:hover { border-color: var(--ink-2); color: var(--ink); }
.bd-section[id], .bd-store[id] { scroll-margin-top: 76px; }
.bd-store { margin: 0 0 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.bd-store > summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; cursor: pointer; list-style: none; }
.bd-store > summary::-webkit-details-marker { display: none; }
.bd-store > summary::after { content: "+"; flex: none; color: var(--muted); font-size: 20px; line-height: 1; }
.bd-store[open] > summary::after { content: "\2212"; }
.bd-store > summary h3 { margin: 0; font-size: 16px; }
.bd-store > .bd-block, .bd-store > .bd-more { margin-inline: 12px; }
.bd-store > .bd-more { margin-top: 4px; margin-bottom: 14px; }
.bd-h3 { margin: 22px 0 8px; font-size: 17px; }
.bd-more { margin: 22px 0 0; }
.bd-more a { color: var(--ai-ink); font-weight: 600; text-underline-offset: 3px; }
.bd-page .chips-block { margin-top: 30px; }
