/* size-help.css — the size guide page (size-help.html), Release 211.
   Only this page loads it. Uses the site's own tokens (colours, radii, fonts) from styles.css and logical properties
   (inline-start / inline-end), so the page reads right in Arabic (right to left) as well as in English. */

#sizes { scroll-margin-top: 4.5rem; }   /* the sticky header must not cover the top of the cards when linked to */

.size-grid { display: grid; gap: 1.25rem; grid-template-columns: 1fr; align-items: start; }
.size-card { min-width: 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(1.25rem, 4vw, 1.9rem); }
.size-card h2 { font-size: 1.5rem; text-transform: uppercase; color: var(--navy); margin-bottom: 1rem; }
.size-card h3 { font-size: 1rem; text-transform: uppercase; letter-spacing: .05em; color: var(--navy); margin: 1.4rem 0 .6rem; }
.size-lead { margin: 0 0 .75rem; }

/* the three steps for the helmet */
.size-steps { list-style: none; margin: 0 0 1.4rem; padding: 0; display: grid; gap: .8rem; counter-reset: sz; }
.size-steps li { counter-increment: sz; display: grid; grid-template-columns: 1.9rem 1fr; gap: .75rem; align-items: start; color: var(--slate); }
.size-steps li::before { content: counter(sz); display: grid; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: 50%; background: var(--navy); color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 1rem; line-height: 1; }
.size-list { list-style: none; display: grid; gap: .55rem; margin: 0 0 .5rem; padding: 0; }
.size-list li { position: relative; padding-inline-start: 1.25rem; color: var(--slate); }
.size-list li::before { content: ""; position: absolute; inset-inline-start: 0; top: .62em; width: .5rem; height: .5rem; border-radius: 1px; background: var(--navy); }

/* the finder: one box, one button, one answer */
.size-finder label { display: block; margin-bottom: .4rem; font-family: var(--font-display); text-transform: uppercase; letter-spacing: .05em; font-size: .82rem; }
.size-finder__row { display: flex; flex-wrap: wrap; gap: .6rem; }
.size-finder__row input { flex: 1 1 8rem; min-width: 0; padding: .85rem 1rem; border: 1px solid var(--line); border-radius: var(--radius); font-size: 1rem; font-family: var(--font-body); background: #fff; color: var(--ink); }
.size-finder__row input:focus { outline: 2px solid var(--blue); outline-offset: 1px; border-color: var(--blue); }
.size-finder__row input[aria-invalid="true"] { border-color: var(--danger); background: var(--danger-tint); }
.size-finder__row .btn { flex: 0 0 auto; justify-content: center; }

.size-result:empty { display: none; }
.size-result { margin-top: 1rem; padding: 1rem 1.15rem; border: 1px solid var(--line-soft); border-inline-start-width: 6px; border-radius: var(--radius); background: var(--mist); color: var(--ink); }
.size-result p { margin: 0; }
.size-result.is-ok { border-color: var(--navy); }
.size-result.is-info { border-inline-start-color: var(--lime); }
.size-result.is-bad { border-color: var(--danger); background: var(--danger-tint); }
.size-result__label { font-family: var(--font-display); text-transform: uppercase; letter-spacing: .06em; font-size: .85rem; color: var(--slate); }
.size-result__size { font-family: var(--font-display); font-weight: 700; text-transform: uppercase; font-size: 2.1rem; line-height: 1.05; color: var(--navy); }
.size-result__range { margin-top: .15rem; font-size: .95rem; }
.size-result__note { margin-top: .6rem; font-size: .92rem; color: var(--slate); }

/* Bell's chart (the finder reads it: every row carries data-min / data-max) */
.size-chart { margin-top: 1.5rem; }
.size-chart h3 { margin: 0 0 .6rem; }
.size-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.size-table th, .size-table td { padding: .55rem .75rem; text-align: start; border-bottom: 1px solid var(--line-soft); }
.size-table thead th { font-family: var(--font-display); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; font-size: .8rem; color: var(--slate); border-bottom: 2px solid var(--navy); }
.size-table tbody th { font-weight: 600; color: var(--navy); }
.size-table tbody tr.is-match { background: rgba(204, 218, 83, .45); }
.size-table tbody tr.is-match th, .size-table tbody tr.is-match td { color: var(--navy); font-weight: 700; }
.size-table td, .size-table tbody th { white-space: nowrap; }   /* "4X-Small" and "20 1/2–20 7/8" never break across two lines */
.size-note { margin: .6rem 0 0; font-size: .82rem; color: var(--slate); }
@media (max-width: 480px) { .size-table th, .size-table td { padding-inline: .45rem; } }

/* the two PDF sheets, one at the foot of each card (Khaled, 5 Nov 2026: they are offered on the site, "for extra help") */
.size-pdf { margin-top: 1.5rem; display: grid; gap: .5rem; justify-items: start; }
.size-pdf .btn { max-width: 100%; white-space: normal; text-align: center; justify-content: center; }
.size-pdf .size-note { margin: 0; }

/* the 13 measurements for the race suit (a fold-out list) */
.size-measures { margin-top: 1.1rem; border-top: 1px solid var(--line-soft); }
.size-measures > summary { list-style: none; min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: .75rem; cursor: pointer; font-family: var(--font-display); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--navy); }
.size-measures > summary::-webkit-details-marker { display: none; }
.size-measures > summary::after { content: ""; flex: 0 0 auto; width: .6rem; height: .6rem; margin-top: -.25rem; border-inline-end: 2px solid var(--navy); border-bottom: 2px solid var(--navy); transform: rotate(45deg); transition: transform .15s; }
.size-measures[open] > summary::after { margin-top: .25rem; transform: rotate(-135deg); }
.size-measures > summary:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
.size-measure-list { list-style: none; margin: .4rem 0 0; padding: 0; display: grid; gap: .7rem; counter-reset: szm; }
.size-measure-list li { counter-increment: szm; position: relative; padding-inline-start: 2rem; font-size: .95rem; color: var(--slate); }
.size-measure-list li::before { content: counter(szm); position: absolute; inset-inline-start: 0; top: 0; width: 1.5rem; font-family: var(--font-display); font-weight: 700; color: var(--navy); }
.size-measure-list b { color: var(--ink); }

/* "Need a hand?" at the foot of the page: where to reach us */
.size-help { margin-top: 1.25rem; display: grid; gap: 1.1rem; padding: clamp(1.25rem, 4vw, 1.75rem); background: var(--paper); border: 1px solid var(--line); border-inline-start: 6px solid var(--lime); border-radius: var(--radius-lg); }
.size-help h2 { font-size: 1.5rem; text-transform: uppercase; color: var(--navy); }
.size-help p { margin: .4rem 0 0; color: var(--slate); max-width: 60ch; }
.size-help__links { display: flex; flex-wrap: wrap; align-content: center; gap: .5rem 1.5rem; }
.size-help .size-help__links a { color: var(--blue); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
@media (min-width: 720px) {
  .size-help { grid-template-columns: 1fr auto; align-items: center; gap: 2rem; }
  .size-help__links { flex-direction: column; margin: 0; }
}
@media (min-width: 960px) {
  .size-grid { grid-template-columns: 1fr 1fr; }
}

/* Arabic: no capitals, no letter spacing (it would pull the joined letters apart) */
[dir="rtl"] .size-card h2, [dir="rtl"] .size-card h3, [dir="rtl"] .size-help h2, [dir="rtl"] .size-finder label,
[dir="rtl"] .size-result__label, [dir="rtl"] .size-table thead th, [dir="rtl"] .size-measures > summary { text-transform: none; letter-spacing: 0; }
