/* Apparatus finder (page module [site:gear-finder]). Loaded only on pages that render it.
   Colours come from the per-site brand tokens; two layouts: --cards (warm, rounded)
   and --spec (flat reference sheet). Scoped to .gf, never touches site chrome. */
.gf {
    --gf-ink: var(--gym-dark, #24211e);
    --gf-muted: color-mix(in srgb, var(--gf-ink) 62%, transparent);
    --gf-line: color-mix(in srgb, var(--gf-ink) 14%, transparent);
    --gf-accent: var(--gym-accent, #db5a32);
    --gf-strong: var(--gym-button, var(--gf-accent));
    --gf-paper: var(--gym-paper, #f6f1ea);
    --gf-surface: color-mix(in srgb, var(--gf-paper) 55%, #fff);
    margin-block: 32px;
    color: var(--gf-ink);
    font-family: var(--gym-font-body, 'Montserrat', ui-sans-serif, system-ui, sans-serif);
    font-size: .9375rem;
    line-height: 1.5;
}

.gf *, .gf *::before, .gf *::after { box-sizing: border-box; }
.gf [hidden] { display: none !important; }

/* ---------- Tool ---------- */
.gf__tool { padding: clamp(20px, 3.2vw, 36px); border: 1px solid var(--gf-line); background: var(--gf-surface); }
.gf__head { display: grid; gap: 6px; margin-bottom: clamp(18px, 2.4vw, 28px); }
.gf__eyebrow { color: var(--gf-accent); font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.gf__title { font-size: clamp(1.25rem, 2.6vw, 1.6rem); font-weight: 600; line-height: 1.2; letter-spacing: -.02em; }
.gf__lead { max-width: 56ch; color: var(--gf-muted); }

.gf__controls { display: grid; gap: 18px 22px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 720px) { .gf__controls { grid-template-columns: repeat(2, minmax(0, 1fr)); } .gf__field--level { grid-column: 1 / -1; } }
@media (min-width: 1040px) { .gf__controls { grid-template-columns: minmax(0, .8fr) minmax(0, 1.1fr) minmax(0, 1.6fr); } .gf__field--level { grid-column: auto; } }

.gf__field { display: grid; align-content: start; gap: 8px; min-width: 0; }
.gf__label { color: var(--gf-muted); font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }

.gf__stepper { display: flex; align-items: center; gap: 4px; }
.gf__step {
    display: grid; flex: none; place-items: center; width: 40px; height: 40px; padding: 0;
    border: 1px solid var(--gf-line); background: transparent; color: var(--gf-ink);
    font: inherit; font-size: 1.15rem; line-height: 1; cursor: pointer;
    transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}
.gf__step:hover { border-color: var(--gf-accent); color: var(--gf-accent); }
.gf__step:focus-visible, .gf__level:focus-visible, .gf__number:focus-visible, .gf__range:focus-visible { outline: 2px solid var(--gf-accent); outline-offset: 2px; }
.gf__number {
    width: 4.2ch; min-width: 0; padding: 0; border: 0; background: transparent; color: var(--gf-ink);
    font: inherit; font-size: 1.75rem; font-weight: 600; letter-spacing: -.02em; text-align: right;
    font-variant-numeric: tabular-nums; -moz-appearance: textfield; appearance: textfield;
}
.gf__number::-webkit-outer-spin-button, .gf__number::-webkit-inner-spin-button { margin: 0; -webkit-appearance: none; }
.gf__unit { margin-right: 4px; color: var(--gf-muted); font-size: .85rem; }

.gf__range { width: 100%; height: 22px; margin: 2px 0 0; padding: 0; background: transparent; cursor: pointer; -webkit-appearance: none; appearance: none; accent-color: var(--gf-accent); }
.gf__range::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: var(--gf-line); }
.gf__range::-moz-range-track { height: 4px; border-radius: 4px; background: var(--gf-line); }
.gf__range::-webkit-slider-thumb { width: 20px; height: 20px; margin-top: -8px; border: 3px solid var(--gf-surface); border-radius: 50%; background: var(--gf-accent); box-shadow: 0 0 0 1px var(--gf-accent); -webkit-appearance: none; }
.gf__range::-moz-range-thumb { width: 14px; height: 14px; border: 3px solid var(--gf-surface); border-radius: 50%; background: var(--gf-accent); box-shadow: 0 0 0 1px var(--gf-accent); }

.gf__levels { display: grid; grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr)); gap: 6px; }
.gf__level {
    display: grid; align-content: start; gap: 2px; min-width: 0; padding: 10px 12px; text-align: left;
    border: 1px solid var(--gf-line); background: transparent; color: var(--gf-ink); font: inherit; cursor: pointer;
    transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}
.gf__level:hover { border-color: var(--gf-accent); }
.gf__level-name { font-size: .9rem; font-weight: 600; }
.gf__level-hint { color: var(--gf-muted); font-size: .72rem; line-height: 1.35; }
.gf__level[aria-checked="true"] { border-color: var(--gf-ink); background: var(--gf-ink); color: #fff; }
.gf__level[aria-checked="true"] .gf__level-hint { color: rgb(255 255 255 / 72%); }
@media (max-width: 520px) { .gf__level-hint { display: none; } .gf__level { padding: 11px 8px; text-align: center; } }

/* ---------- Result ---------- */
.gf__result { margin-top: clamp(22px, 3vw, 32px); padding-top: clamp(18px, 2.4vw, 26px); border-top: 1px solid var(--gf-line); }
.gf__summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin-bottom: 16px; }
.gf__summary-main { font-size: 1.05rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.gf__summary-stage { color: var(--gf-muted); font-size: .85rem; }

.gf__items { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .gf__items { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1040px) { .gf__items { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.gf__item { display: grid; gap: 8px 14px; grid-template-columns: 44px minmax(0, 1fr); align-content: start; padding: 16px; border: 1px solid var(--gf-line); background: var(--gf-paper); background: color-mix(in srgb, var(--gf-paper) 30%, #fff); }
.gf__icon { display: block; width: 44px; height: 44px; background: var(--gf-accent); -webkit-mask: var(--gf-icon) center / contain no-repeat; mask: var(--gf-icon) center / contain no-repeat; }
.gf__item-main { display: grid; gap: 2px; min-width: 0; }
.gf__name { color: var(--gf-muted); font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.gf__optimum { font-size: 1.75rem; font-weight: 600; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.gf__optimum small { margin-left: 4px; color: var(--gf-muted); font-size: .85rem; font-weight: 500; letter-spacing: 0; }
.gf__inch { color: var(--gf-muted); font-size: .8rem; font-variant-numeric: tabular-nums; }
.gf__facts { display: grid; grid-column: 1 / -1; gap: 4px; margin: 0; padding: 10px 0 0; border-top: 1px solid var(--gf-line); font-size: .85rem; }
.gf__fact { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 12px; }
.gf__fact span:first-child { color: var(--gf-muted); }
.gf__fact span:last-child { font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.gf__hint { grid-column: 1 / -1; color: var(--gf-muted); font-size: .9rem; line-height: 1.45; }

.gf__advice { display: flex; align-items: center; margin-top: 4px; padding: 14px 16px; border-left: 3px solid var(--gf-accent); background: color-mix(in srgb, var(--gf-accent) 7%, transparent); font-size: .9rem; }

.gf__icon--rope { --gf-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11 9v16c0 15 26 15 26 0V9'/%3E%3Ccircle cx='11' cy='7' r='2.5'/%3E%3Ccircle cx='37' cy='7' r='2.5'/%3E%3C/svg%3E"); }
.gf__icon--hoop { --gf-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48' fill='none' stroke='%23000' stroke-width='3.5' stroke-linecap='round'%3E%3Ccircle cx='24' cy='24' r='16'/%3E%3Cpath d='M13 17a13 13 0 0 1 8-6' stroke-width='2.5'/%3E%3C/svg%3E"); }
.gf__icon--ball { --gf-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='24' cy='24' r='15'/%3E%3Cpath d='M15 18c6 5 12 5 18 0M15 30c6-5 12-5 18 0' stroke-width='2.5'/%3E%3C/svg%3E"); }
.gf__icon--clubs { --gf-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='24' cy='8' r='3.5'/%3E%3Cpath d='M24 12v8c-5 4-7 8-7 14a7 7 0 0 0 14 0c0-6-2-10-7-14'/%3E%3C/svg%3E"); }
.gf__icon--ribbon { --gf-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 40 17 10'/%3E%3Cpath d='M17 10c8 7 12-6 18 1s6 14 0 14'/%3E%3C/svg%3E"); }

/* ---------- Sheet (SSR table, always visible) ---------- */
.gf__sheet { margin-top: clamp(24px, 3.4vw, 40px); }
.gf__sheet-title { margin-bottom: 12px; font-size: 1.05rem; font-weight: 600; letter-spacing: -.01em; }
.gf__table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
/* Article typography styles bare tables (block, border, zebra, min cell width); the finder resets them. */
.gf .gf__table { display: table; max-width: none; margin: 0; border: 0; border-radius: 0; background: transparent; color: inherit; }
.gf .gf__table :is(th, td) { min-width: 0; vertical-align: middle; }
.gf .gf__table tbody tr, .gf .gf__table tbody tr:nth-child(even) { background: transparent; }
.gf .gf__table tbody th { text-transform: none; letter-spacing: normal; }
.gf__table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: .875rem; font-variant-numeric: tabular-nums; }
.gf__table th, .gf__table td { padding: 10px 12px; border: 0; border-bottom: 1px solid var(--gf-line); background: transparent; text-align: left; white-space: nowrap; }
.gf__table thead th { color: var(--gf-muted); font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.gf .gf__table :is(th, td) { font-size: .875rem; line-height: 1.4; }
.gf .gf__table thead th { font-size: .7rem; }
.gf__table tbody th { font-weight: 600; }
.gf__table tbody tr:hover td, .gf__table tbody tr:hover th { background: color-mix(in srgb, var(--gf-accent) 5%, transparent); }
.gf__table tr.is-current td, .gf__table tr.is-current th { background: color-mix(in srgb, var(--gf-accent) 11%, transparent); }
.gf__note { margin-top: 10px; color: var(--gf-muted); font-size: .85rem; line-height: 1.5; }

.gf__brands { margin-top: clamp(22px, 3vw, 32px); }
.gf__brands-title { display: block; margin-bottom: 10px; color: var(--gf-muted); font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.gf__brand-list { display: flex; flex-wrap: wrap; gap: 8px; }
.gf__brand { display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px; border: 1px solid var(--gf-line); font-weight: 600; }
.gf .gf__flag { display: block; width: 20px; height: auto; border-radius: 3px; box-shadow: 0 0 0 1px var(--gf-line); }

/* ---------- Variant: cards (warm, rounded) ---------- */
/* One container per level: the tool is not a card, only the result tiles and the table are. */
.gf--cards .gf__tool { padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.gf--cards .gf__step, .gf--cards .gf__level { border-radius: 14px; }
.gf--cards .gf__level[aria-checked="true"] { border-color: var(--gf-strong); background: var(--gf-strong); }
.gf--cards .gf__item { border-radius: 20px; background: #fff; }
.gf--cards .gf__icon { width: 44px; height: 44px; border-radius: 14px; }
.gf--cards .gf__advice { margin-top: 0; border-radius: 20px; border-left-width: 0; font-size: .85rem; }
@media (min-width: 640px) { .gf--cards .gf__advice { grid-column: span 1; } }
.gf--cards .gf__brand { border-radius: 999px; }
.gf--cards .gf__table-wrap { border: 1px solid var(--gf-line); border-radius: 18px; }
.gf--cards .gf__table tbody tr:last-child :is(th, td) { border-bottom: 0; }

/* ---------- Variant: spec (flat reference sheet) ---------- */
.gf--spec { --gf-surface: transparent; }
.gf--spec .gf__tool { padding-inline: 0; border-width: 1px 0; border-color: var(--gf-ink); background: transparent; }
.gf--spec .gf__title { font-weight: 500; letter-spacing: -.03em; }
.gf--spec .gf__eyebrow { color: var(--gf-ink); }
.gf--spec .gf__step, .gf--spec .gf__level { border-radius: 0; }
.gf--spec .gf__level { border-width: 0 0 2px; border-color: transparent; padding-inline: 0; background: transparent; color: var(--gf-ink); }
.gf--spec .gf__level:hover { border-color: var(--gf-line); }
.gf--spec .gf__level[aria-checked="true"] { border-color: var(--gf-accent); background: transparent; color: var(--gf-ink); }
.gf--spec .gf__level[aria-checked="true"] .gf__level-hint { color: var(--gf-muted); }
.gf--spec .gf__levels { gap: 18px; }
.gf--spec .gf__number { font-weight: 500; }

.gf--spec .gf__items { grid-template-columns: minmax(0, 1fr); gap: 0; }
.gf--spec .gf__item {
    grid-template-columns: 36px minmax(7rem, 1fr) minmax(0, 1.6fr); align-items: center; gap: 4px 20px;
    padding: 14px 0; border-width: 0 0 1px; background: transparent;
}
.gf--spec .gf__icon { width: 30px; height: 30px; background: var(--gf-ink); }
.gf--spec .gf__item-main { grid-template-columns: 1fr; }
.gf--spec .gf__optimum { font-size: 1.5rem; font-weight: 500; }
.gf--spec .gf__facts { grid-column: auto; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 28px; padding: 0; border-top: 0; }
.gf--spec .gf__fact { flex-direction: column; gap: 0; }
.gf--spec .gf__fact span:last-child { text-align: left; }
.gf--spec .gf__hint { grid-column: 2 / -1; }
.gf--spec .gf__advice { border-left-width: 2px; background: transparent; padding-inline: 14px 0; }
.gf--spec .gf__brand { border-radius: 0; border-width: 0 0 1px; padding-inline: 0; margin-right: 12px; }
.gf--spec .gf__table-wrap { border-top: 1px solid var(--gf-ink); }
.gf--spec .gf__table thead th { color: var(--gf-ink); }
@media (max-width: 640px) {
    .gf--spec .gf__item { grid-template-columns: 30px minmax(0, 1fr); }
    .gf--spec .gf__facts { grid-column: 1 / -1; }
    .gf--spec .gf__hint { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) { .gf * { transition: none !important; } }
