/* Scoped Size Guide embed — tokens aligned to SpareBox #D50037 (site .text-danger). */
.size-guide-page {
  --brand-red: #d50037;
  --brand-red-dark: #b0002e;
  --brand-red-tint: #fde8ee;
  --ink: #212529;
  --ink-soft: #6c757d;
  --bg: #ffffff;
  --bg-alt: #f8f9fa;
  --line: #dee2e6;
  --tick: #adb5bd;
  --sky: #dee5f2;
  --radius: 8px;
  --font: "Myriad Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  padding-bottom: 48px;
}

.size-guide-page :focus-visible {
  outline: 3px solid var(--brand-red);
  outline-offset: 2px;
  border-radius: 4px;
}

.size-guide-page button {
  font-family: inherit;
  cursor: pointer;
}

/* ---------- hero ---------- */
.size-guide-page .hero {
  max-width: 1200px;
  margin: 0 auto;
  padding: 34px 24px 6px;
  text-align: center;
}

.size-guide-page h1 {
  font-weight: 700;
  font-size: clamp(2rem, 4.6vw, 3rem);
  letter-spacing: -0.02em;
  line-height: 1.12;
  color: var(--brand-red);
}

.size-guide-page h1 em {
  font-style: normal;
  color: var(--brand-red);
}

.size-guide-page .hero p {
  margin: 14px auto 0;
  max-width: 62ch;
  color: var(--ink-soft);
  font-size: 1.04rem;
}

.size-guide-page .hero p b {
  color: var(--ink);
  font-weight: 600;
}

/* ---------- category tabs ---------- */
.size-guide-page .tapewrap {
  max-width: 1200px;
  margin: 34px auto 0;
  padding: 0 24px;
}

.size-guide-page .tape {
  display: flex;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius) var(--radius) 0 0;
  overflow-x: auto;
}

.size-guide-page .tape button {
  flex: 1 0 auto;
  background: none;
  border: none;
  border-right: 1px solid var(--line);
  padding: 18px 26px 15px;
  font-weight: 600;
  font-size: 1rem;
  color: var(--ink-soft);
  position: relative;
  white-space: nowrap;
  transition: color 0.15s;
}

.size-guide-page .tape button:last-child {
  border-right: none;
}

.size-guide-page .tape button small {
  display: block;
  font-weight: 400;
  font-size: 0.72rem;
  color: var(--tick);
  margin-top: 2px;
}

.size-guide-page .tape button:hover {
  color: var(--ink);
}

.size-guide-page .tape button[aria-selected="true"] {
  color: var(--brand-red);
}

.size-guide-page .tape button[aria-selected="true"]::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 0;
  height: 4px;
  background: var(--brand-red);
  border-radius: 4px 4px 0 0;
}

/* ---------- viewer panel ---------- */
.size-guide-page .panel {
  max-width: 1200px;
  margin: 0 auto 26px;
  padding: 0 24px;
}

.size-guide-page .panel-in {
  background: var(--bg);
  border: 1px solid var(--line);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  display: grid;
  grid-template-columns: 210px 1fr 300px;
  min-height: 520px;
  overflow: hidden;
}

.size-guide-page .sizes {
  border-right: 1px solid var(--line);
  padding: 18px 0;
  display: flex;
  flex-direction: column;
}

.size-guide-page .sizes h3 {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--tick);
  padding: 0 22px 10px;
}

.size-guide-page .sizes button {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  background: none;
  border: none;
  border-left: 4px solid transparent;
  text-align: left;
  padding: 12px 22px;
  transition: background 0.12s;
}

.size-guide-page .sizes button .dim {
  font-weight: 700;
  font-size: 1.08rem;
}

.size-guide-page .sizes button .sq {
  font-size: 0.78rem;
  color: var(--ink-soft);
}

.size-guide-page .sizes button:hover {
  background: var(--bg-alt);
}

.size-guide-page .sizes button[aria-selected="true"] {
  border-left-color: var(--brand-red);
  background: var(--brand-red-tint);
}

.size-guide-page .sizes button[aria-selected="true"] .dim {
  color: var(--brand-red-dark);
}

.size-guide-page .stage {
  position: relative;
  background: var(--sky);
  min-height: 380px;
}

.size-guide-page .stage canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.size-guide-page .hint {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  font-size: 0.75rem;
  font-weight: 500;
  color: #7d879c;
  background: rgba(255, 255, 255, 0.7);
  padding: 5px 15px;
  border-radius: 999px;
  pointer-events: none;
}

.size-guide-page .facts {
  border-left: 1px solid var(--line);
  padding: 26px 26px 22px;
  display: flex;
  flex-direction: column;
}

.size-guide-page .facts .fdim {
  font-weight: 700;
  font-size: 1.9rem;
  letter-spacing: -0.01em;
  line-height: 1.1;
}

.size-guide-page .facts .fcompare {
  color: var(--ink-soft);
  font-size: 0.92rem;
  margin: 7px 0 18px;
}

.size-guide-page .meters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
}

.size-guide-page .meter {
  background: var(--bg-alt);
  border-radius: 8px;
  padding: 10px 13px;
}

.size-guide-page .meter b {
  display: block;
  font-size: 1.02rem;
  font-weight: 700;
}

.size-guide-page .meter span {
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--tick);
}

.size-guide-page .facts h4 {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--tick);
  margin-bottom: 10px;
}

.size-guide-page .fits {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.92rem;
  padding: 0;
  margin: 0;
}

.size-guide-page .fits li {
  display: flex;
  gap: 10px;
  align-items: baseline;
}

.size-guide-page .fits li::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  background: var(--brand-red);
  border-radius: 2px;
}

.size-guide-page .facts .fcta {
  margin-top: auto;
  padding-top: 22px;
}

.size-guide-page .fcta a {
  display: block;
  text-align: center;
  background: var(--brand-red);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  padding: 13px;
  border-radius: 8px;
  transition: background 0.15s;
}

.size-guide-page .fcta a:hover {
  background: var(--brand-red-dark);
  color: #fff;
}

@media (max-width: 980px) {
  .size-guide-page .panel-in {
    grid-template-columns: 1fr;
  }

  .size-guide-page .sizes {
    border-right: none;
    border-bottom: 1px solid var(--line);
    flex-direction: row;
    overflow-x: auto;
    padding: 8px 10px;
  }

  .size-guide-page .sizes h3 {
    display: none;
  }

  .size-guide-page .sizes button {
    border-left: none;
    border-bottom: 4px solid transparent;
    padding: 10px 16px;
  }

  .size-guide-page .sizes button[aria-selected="true"] {
    border-bottom-color: var(--brand-red);
  }

  .size-guide-page .stage {
    min-height: 340px;
  }

  .size-guide-page .facts {
    border-left: none;
    border-top: 1px solid var(--line);
  }
}

/* ---------- to-scale comparison ---------- */
.size-guide-page .scale-sec {
  background: var(--bg-alt);
  margin-top: 64px;
  padding: 56px 0 60px;
}

.size-guide-page .scale-in {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.size-guide-page .scale-sec h2,
.size-guide-page .tips h2 {
  font-weight: 700;
  font-size: clamp(1.5rem, 3vw, 2rem);
  letter-spacing: -0.015em;
  text-align: center;
  color: var(--ink);
}

.size-guide-page .scale-sec .sub,
.size-guide-page .tips .sub {
  color: var(--ink-soft);
  margin: 8px auto 0;
  max-width: 62ch;
  text-align: center;
}

.size-guide-page .scale-card {
  margin-top: 26px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 26px;
  overflow-x: auto;
}

.size-guide-page .scale-card svg {
  display: block;
  min-width: 760px;
  width: 100%;
  height: auto;
}

.size-guide-page .fp {
  cursor: pointer;
  outline: none;
}

.size-guide-page .fp:focus {
  outline: none;
}

.size-guide-page .fp:focus-visible rect {
  stroke-width: 3;
}

.size-guide-page .fp rect {
  fill: var(--brand-red-tint);
  stroke: var(--brand-red);
  stroke-width: 1.6;
  rx: 3;
  transition: fill 0.15s;
}

.size-guide-page .fp:hover rect,
.size-guide-page .fp.active rect {
  fill: var(--brand-red);
  stroke: var(--brand-red-dark);
}

.size-guide-page .fp .fpl {
  font-family: var(--font);
  font-weight: 700;
  font-size: 11.5px;
  fill: var(--brand-red-dark);
  text-anchor: middle;
}

.size-guide-page .fp .fps {
  font-family: var(--font);
  font-size: 10.5px;
  fill: var(--ink-soft);
  text-anchor: middle;
}

/* ---------- tips ---------- */
.size-guide-page .tips {
  max-width: 1200px;
  margin: 60px auto 0;
  padding: 0 24px;
}

.size-guide-page .tipgrid {
  margin-top: 26px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.size-guide-page .tip {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 20px;
  text-align: center;
}

.size-guide-page .tip .tico {
  width: 44px;
  height: 44px;
  margin: 0 auto 12px;
  background: var(--brand-red-tint);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-red);
  font-weight: 700;
  font-size: 1.05rem;
}

.size-guide-page .tip h3 {
  font-weight: 700;
  font-size: 1.02rem;
  margin-bottom: 6px;
}

.size-guide-page .tip p {
  font-size: 0.88rem;
  color: var(--ink-soft);
  margin: 0;
}

@media (max-width: 980px) {
  .size-guide-page .tipgrid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  .size-guide-page .tipgrid {
    grid-template-columns: 1fr;
  }
}

/* ---------- band cta ---------- */
.size-guide-page .band {
  max-width: 1200px;
  margin: 60px auto 0;
  padding: 0 24px;
}

.size-guide-page .band-in {
  background: var(--brand-red);
  color: #fff;
  border-radius: var(--radius);
  padding: 42px 40px;
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}

.size-guide-page .band-in h2 {
  font-weight: 700;
  font-size: clamp(1.35rem, 3vw, 1.9rem);
  letter-spacing: -0.015em;
  flex: 1;
  min-width: 260px;
  color: #fff;
  text-align: left;
  margin: 0;
}

.size-guide-page .band-in .bcta {
  background: #fff;
  color: var(--brand-red);
  border-radius: 8px;
  padding: 13px 28px;
  font-weight: 700;
  text-decoration: none;
}

.size-guide-page .band-in .bcta:hover {
  background: var(--brand-red-tint);
  color: var(--brand-red);
}

.size-guide-page .band-in .bphone {
  color: #fff;
  opacity: 0.9;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}

.size-guide-page .band-in .bphone:hover {
  color: #fff;
  opacity: 1;
}
