/* Size chart pop-up: tabs, in/cm switch, selectable sizes, greyed-out sizes. */
.sc-overlay {
  position: fixed; inset: 0; z-index: 150; background: rgba(20, 16, 31, .55);
  display: grid; place-items: center; padding: 14px;
}
.sc-overlay[hidden] { display: none; }
.sc-card {
  width: min(560px, 100%); max-height: 92vh; overflow: auto; background: #fff;
  border: 2px solid var(--ink); border-radius: 20px; box-shadow: 8px 8px 0 var(--ink);
  animation: sc-in .25s cubic-bezier(.2, .8, .2, 1);
}
@keyframes sc-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }

.sc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 18px 18px 8px; }
.sc-title { margin: 2px 0 0; font-size: 1.25rem; line-height: 1.2; }
.sc-x {
  flex: none; width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--ink);
  background: #fff; cursor: pointer; font-weight: 800;
}
.sc-x:hover { background: var(--lime); }

.sc-tabs { display: grid; grid-template-columns: 1fr 1fr; border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); }
.sc-tab {
  padding: 13px 10px; background: #fff; border: 0; cursor: pointer; font-weight: 700; color: var(--muted);
}
.sc-tab + .sc-tab { border-left: 2px solid var(--ink); }
.sc-tab.on { color: var(--pink); box-shadow: inset 0 -4px 0 var(--pink); }

.sc-body { padding: 14px 18px 6px; }
.sc-unit-row { display: flex; justify-content: flex-end; margin-bottom: 10px; }
.sc-unit { display: inline-flex; border: 2px solid var(--ink); border-radius: 999px; overflow: hidden; }
.sc-unit button { padding: 6px 14px; border: 0; background: #fff; cursor: pointer; font-weight: 700; }
.sc-unit button.on { background: var(--ink); color: var(--lime); }

.sc-wrap { overflow-x: auto; }
.sc-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.sc-table th, .sc-table td { padding: 10px 8px; text-align: center; border-bottom: 1px solid #eee; white-space: nowrap; }
.sc-table th { font-size: .78rem; color: var(--muted); font-weight: 700; }
.sc-table td:first-child, .sc-table th:first-child { text-align: left; }
.sc-pick { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 700; }
.sc-pick input { width: 18px; height: 18px; accent-color: var(--pink); }
.sc-pick input:disabled { cursor: not-allowed; }
.sc-row-off td, .sc-off { color: #b5b0bf; text-decoration: line-through; }
.sc-row-off .sc-pick { color: #b5b0bf; cursor: not-allowed; }

.sc-body .meta { margin: 10px 0 4px; font-size: .85rem; }
.sc-tips { margin: 0; padding-left: 20px; display: grid; gap: 10px; font-size: .98rem; }

.sc-foot { padding: 14px 18px 18px; border-top: 2px solid var(--ink); margin-top: 10px; position: sticky; bottom: 0; background: #fff; }
.sc-foot .btn[disabled] { opacity: .5; cursor: not-allowed; box-shadow: none; }

body.sc-open { overflow: hidden; }

/* How-to-measure diagrams */
.sc-diagram { margin: 0 0 14px; text-align: center; }
.sc-diagram svg { width: 100%; max-width: 280px; height: auto; display: block; margin: 0 auto; }
.sc-diagram figcaption { margin-top: 8px; font-size: .85rem; color: var(--muted); }
.sd-shape { fill: #ffd1e8; stroke: var(--ink); stroke-width: 2.5; stroke-linejoin: round; }
.sd-dim { fill: none; stroke: var(--violet); stroke-width: 2.5; stroke-dasharray: 6 4; }
.sd-label { font-size: 13px; font-weight: 700; fill: var(--ink); font-family: 'Space Grotesk', system-ui, sans-serif; }
