/* ==========================================================================
   Sizing guides: threadandfilm theme (0.22.0)
   ==========================================================================
   Loaded only on pages assigned template-sizing-dtf.php or template-sizing-uv.php
   (inc/assets.php), right after pages.css and before responsive.css. Designs of record:
   design/Sizing Guide.html and UV Sizing Guide.html, which share one stylesheet. Plan
   2026-11-24-sizing-guides.md. All three are in the site-redesign folder under .plans/.
   The markup is template-parts/sizing/guide.php's and the classes are the designs'.

   Every selector starts with .taf-sizing-guide, the class on <main> (css-lint.mjs CL-13).

   Sections:
   1. Tokens and page
   2. Widths and buttons
   3. Hero
   4. Chip nav and unit toggle
   5. Sections and cards
   6. Illustrations
   7. Measuring tips and the calculator
   8. FAQ
   9. Call to action
   10. Layout breakpoints, with the phones' block (the mobile twin)
   11. Motion
   12. Print
   ========================================================================== */


/* ── 1. Tokens and page ── */

.taf-sizing-guide {
    /* The illustration palette: the drawings' own greys, declared here and nowhere else. */
    --tsg-art-ink: var(--color-text);
    --tsg-art-paper: var(--color-bg);
    --tsg-art-line: #2a2a2a;
    --tsg-art-shade: #e8e8e8;
    --tsg-art-soft: #9a9a9a;
    --tsg-art-seam: #a0a0a0;
    --tsg-art-rib: #d4d4d4;
    --tsg-art-metal: #dadde0;
    --tsg-art-metal-in: #c9cdd1;
    --tsg-art-metal-line: #7c8086;
    --tsg-art-stripe: #e3e3e3;
    --tsg-art-layer: #f0f0f0;
    --tsg-art-rail: #c4c8cc;
    --tsg-art-quad: rgba(0, 0, 0, 0.04);
    --tsg-art-fold: #6e6e6e;
    --tsg-art-flow: #8a8a8a;
    --tsg-art-print: rgba(0, 174, 239, 0.24);    /* The print area: the brand cyan */
    --tsg-art-print-line: var(--color-cyan);
    --tsg-art-rule: #d6d6d6;
    --tsg-art-glass: #eef4f7;
    --tsg-art-hl: #e2e6e9;
    --tsg-art-emboss: #9fb0ba;
    --tsg-art-cap: #5e5e5e;

    --tsg-print-ink: #000000;
    --tsg-print-rule: #9a9a9a;

    --tsg-nav-h: 0px;    /* sizing.js sets it to the chip nav's height while that is sticky */
    /* Where an anchor stops: below the header and the sticky chip nav. --header-h has a value
       without JavaScript too. */
    --tsg-offset: calc(var(--header-h) + var(--tsg-nav-h) + 16px);

    padding: 0;                         /* header.css's .taf-main padding: the hero meets the header */
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-text-size-adjust: 100%;
}

.taf-sizing-guide *,
.taf-sizing-guide *::before,
.taf-sizing-guide *::after {
    box-sizing: border-box;
}

.taf-sizing-guide :where(h1, h2, h3, p, ul, ol, dl, dd, figure) {
    margin: 0;
}

.taf-sizing-guide :where(ul, ol) {
    padding: 0;
    list-style: none;
}

.taf-sizing-guide a {
    color: var(--color-link);
    text-underline-offset: 3px;
}

.taf-sizing-guide a:hover {
    color: var(--color-accent-text);
}

.taf-sizing-guide :focus-visible {
    outline: 2px solid var(--focus-ring);
    outline-offset: 2px;
}

.taf-sizing-guide .tsg-hero :focus-visible {
    outline-color: var(--focus-ring-inverse);
}

.taf-sizing-guide [hidden] {
    display: none !important;
}

.taf-sizing-guide .tsg-nw {
    white-space: nowrap;
}

.taf-sizing-guide .tsg-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}


/* ── 2. Widths and buttons ── */

/* The gutters are inside the cap, as .taf-main .taf-container has them (base.css), so the guide's
   edges are every inner page's. */
.taf-sizing-guide .tsg-wrap {
    max-width: var(--content-max);
    margin-inline: auto;
    padding-left: max(var(--shell-gutter), env(safe-area-inset-left, 0px));
    padding-right: max(var(--shell-gutter), env(safe-area-inset-right, 0px));
}

.taf-sizing-guide .tsg-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.taf-sizing-guide .tsg-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 24px;
    border-radius: var(--radius-full);
    font-size: 15px;
    font-weight: var(--font-weight-semibold);
    text-decoration: none;
    white-space: nowrap;
}

.taf-sizing-guide .tsg-btn--primary {
    background: var(--color-primary);
    color: var(--color-text);
}

.taf-sizing-guide .tsg-btn--primary:hover {
    background: var(--color-text);
    color: var(--color-bg);
}

.taf-sizing-guide .tsg-hero .tsg-btn--primary:hover {
    background: var(--color-bg);
    color: var(--color-text);
}

.taf-sizing-guide .tsg-btn--ghost {
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: var(--color-bg);
}

.taf-sizing-guide .tsg-btn--ghost:hover {
    border-color: var(--color-bg);
    color: var(--color-bg);
}

.taf-sizing-guide .tsg-btn--outline {
    border: 1.5px solid var(--color-text);
    color: var(--color-text);
}

.taf-sizing-guide .tsg-btn--outline:hover {
    background: var(--color-text);
    color: var(--color-bg);
}


/* ── 3. Hero ──
   The inner-page hero size (base.css --page-hero-*) at every width. */

.taf-sizing-guide .tsg-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a2a3a 100%);
    color: var(--color-bg);
    padding-block: var(--page-hero-pad-top) calc(var(--page-hero-pad-bottom) + 4px);
}

.taf-sizing-guide .tsg-hero::before,
.taf-sizing-guide .tsg-hero::after {
    content: "";
    position: absolute;
    top: var(--page-hero-mark-inset);
    width: 16px;
    height: 16px;
    border-top: 1px solid var(--page-hero-mark);
    pointer-events: none;
}

.taf-sizing-guide .tsg-hero::before {
    left: var(--page-hero-mark-inset);
    border-left: 1px solid var(--page-hero-mark);
}

.taf-sizing-guide .tsg-hero::after {
    right: var(--page-hero-mark-inset);
    border-right: 1px solid var(--page-hero-mark);
}

.taf-sizing-guide .tsg-hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 300px);
    gap: 24px 64px;
    align-items: center;
}

.taf-sizing-guide .tsg-hero-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--page-hero-gap);
    min-width: 0;
}

.taf-sizing-guide .tsg-crumbs ol {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.62);
}

.taf-sizing-guide .tsg-crumbs a {
    color: inherit;
    text-decoration: none;
}

.taf-sizing-guide .tsg-crumbs a:hover,
.taf-sizing-guide .tsg-crumbs [aria-current="page"] {
    color: var(--color-bg);
}

.taf-sizing-guide .tsg-sep {
    margin-left: 8px;
}

.taf-sizing-guide .tsg-hero-eyebrow {
    margin-top: 4px;
    font-size: 12px;
    font-weight: var(--font-weight-semibold);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--color-cyan);
}

.taf-sizing-guide .tsg-h1 {
    font-size: var(--page-hero-title);
    font-weight: var(--font-weight-bold);
    line-height: 1.05;
    letter-spacing: -0.035em;
    text-wrap: balance;
    overflow-wrap: anywhere;
}

.taf-sizing-guide .tsg-hero-lead {
    max-width: 620px;
    font-size: var(--page-hero-lead);
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.82);
    text-wrap: pretty;
}

.taf-sizing-guide .tsg-hero-note {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    max-width: 620px;
    font-size: 14px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.72);
}

.taf-sizing-guide .tsg-hero-note .tsg-sq {
    margin-top: 5px;
}

.taf-sizing-guide .tsg-hero-actions {
    margin-top: 8px;
}

.taf-sizing-guide .tsg-hero-fig {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.taf-sizing-guide .tsg-hero-panel {
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-tile);
    background: rgba(255, 255, 255, 0.04);
    padding: 10px;
}

.taf-sizing-guide .tsg-hero-fig figcaption {
    font-size: 13.5px;
    color: rgba(255, 255, 255, 0.75);
    text-align: center;
}

.taf-sizing-guide .tsg-hero-fig .tsg-num,
.taf-sizing-guide .tsg-hero-fig .tsg-unit {
    font-size: inherit;
    font-weight: var(--font-weight-bold);
    color: var(--color-bg);
    letter-spacing: 0;
}


/* ── 4. Chip nav and unit toggle ── */

.taf-sizing-guide .tsg-nav {
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border-light);
}

/* Sticky once sizing.js runs, because only it can tell the anchors how tall the bar is, except in a
   short window and on phones (§10). Below the site header (z-index 1000), so its drawers open over
   this bar. */
.taf-sizing-guide.is-enhanced .tsg-nav {
    position: sticky;
    top: var(--header-h);
    z-index: 5;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.taf-sizing-guide .tsg-nav-inner {
    max-width: var(--content-max);
    margin-inline: auto;
    padding: 10px max(var(--shell-gutter), env(safe-area-inset-right, 0px)) 10px max(var(--shell-gutter), env(safe-area-inset-left, 0px));
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 24px;
}

.taf-sizing-guide .tsg-chipnav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.taf-sizing-guide .tsg-chipnav a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 16px;
    border-radius: var(--radius-full);
    border: 1px solid var(--color-border-mid);
    color: var(--color-text);
    font-size: 14px;
    font-weight: var(--font-weight-semibold);
    text-decoration: none;
    white-space: nowrap;
}

.taf-sizing-guide .tsg-chipnav a:hover {
    border-color: var(--color-text);
    color: var(--color-text);
}

.taf-sizing-guide .tsg-chipnav a[aria-current] {
    background: var(--color-text);
    border-color: var(--color-text);
    color: var(--color-bg);
}

.taf-sizing-guide .tsg-tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

/* Without JavaScript its toggle stays hidden, and an empty row would still take the nav's row gap. */
.taf-sizing-guide:not(.is-enhanced) .tsg-tools {
    display: none;
}

.taf-sizing-guide .tsg-seg {
    display: inline-flex;
    padding: 3px;
    border-radius: var(--radius-full);
    background: var(--color-bg-muted);
}

.taf-sizing-guide .tsg-seg-btn {
    min-height: 44px;
    padding: 0 16px;
    border: 0;
    border-radius: var(--radius-full);
    background: transparent;
    font: inherit;
    font-size: 14px;
    font-weight: var(--font-weight-semibold);
    color: var(--color-text-light);
    cursor: pointer;
}

.taf-sizing-guide .tsg-seg-btn[aria-pressed="true"] {
    background: var(--color-bg);
    color: var(--color-text);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.14);
}


/* ── 5. Sections and cards ── */

.taf-sizing-guide .tsg-body {
    padding-block: 20px 88px;
}

.taf-sizing-guide .tsg-body:focus {
    outline: none;
}

.taf-sizing-guide .tsg-scale-note {
    font-size: 13.5px;
    color: var(--color-text-light);
}

.taf-sizing-guide .tsg-section {
    padding-top: 48px;
}

.taf-sizing-guide .tsg-section,
.taf-sizing-guide .tsg-card,
.taf-sizing-guide #guide {
    scroll-margin-top: var(--tsg-offset);
}

/* Focus moving back up the page (Shift+Tab) stops clear of the header and the sticky chip nav too. The
   nav's own controls are left out where it is sticky: a margin there would scroll the page for a chip
   already in view. */
.taf-sizing-guide :is(.tsg-hero, .tsg-body) :is(a, button, input),
.taf-sizing-guide:not(.is-enhanced) .tsg-nav :is(a, button) {
    scroll-margin-top: var(--tsg-offset);
}

.taf-sizing-guide .tsg-section-head {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 720px;
    margin-bottom: 24px;
}

.taf-sizing-guide .tsg-eyebrow {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    font-weight: var(--font-weight-semibold);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--color-text-light);
}

.taf-sizing-guide .tsg-sq {
    flex-shrink: 0;
    width: 10px;
    height: 10px;
}

.taf-sizing-guide .tsg-sq--cyan {
    background: var(--color-cyan);
}

.taf-sizing-guide .tsg-sq--magenta {
    background: var(--color-magenta);
}

.taf-sizing-guide .tsg-sq--yellow {
    background: var(--color-yellow);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15);
}

.taf-sizing-guide .tsg-sq--ink {
    background: var(--color-text);
}

.taf-sizing-guide .tsg-h2 {
    font-size: clamp(1.6rem, 1.2rem + 1.1vw, 2.15rem);
    font-weight: var(--font-weight-bold);
    line-height: 1.15;
    letter-spacing: -0.025em;
    text-wrap: balance;
}

.taf-sizing-guide .tsg-h3 {
    font-size: 18px;
    font-weight: var(--font-weight-bold);
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.taf-sizing-guide .tsg-lead {
    max-width: 640px;
    font-size: 16.5px;
    line-height: 1.6;
    color: var(--color-text-light);
    text-wrap: pretty;
}

.taf-sizing-guide .tsg-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-sm);
}

.taf-sizing-guide .tsg-grid-note {
    align-self: start;
}

.taf-sizing-guide .tsg-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    background: var(--color-bg);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-tile);
}

.taf-sizing-guide .tsg-fig {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 3 / 2;
    max-width: 100%;
    padding: 10px;
    background: var(--color-bg-alt);
    border-bottom: 1px solid var(--color-border-light);
}

.taf-sizing-guide .tsg-art {
    display: block;
    width: 100%;
    height: 100%;
}

.taf-sizing-guide .tsg-card-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
    padding: 18px 20px 22px;
}

.taf-sizing-guide .tsg-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.taf-sizing-guide .tsg-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 26px;
    padding: 0 10px;
    border-radius: var(--radius-full);
    background: var(--color-bg-muted);
    font-size: 12px;
    font-weight: var(--font-weight-semibold);
    line-height: 1;
    color: var(--color-text);
    white-space: nowrap;
}

.taf-sizing-guide .tsg-chip--kind {
    background: var(--color-bg);
    border: 1px solid var(--color-border-mid);
}

.taf-sizing-guide .tsg-chip svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.taf-sizing-guide .tsg-card-title {
    font-size: 18px;
    font-weight: var(--font-weight-bold);
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.taf-sizing-guide .tsg-measure {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    column-gap: 6px;
}

.taf-sizing-guide .tsg-num {
    font-size: 30px;
    font-weight: var(--font-weight-bold);
    line-height: 1.15;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}

.taf-sizing-guide .tsg-unit {
    font-size: 16px;
    font-weight: var(--font-weight-semibold);
}

.taf-sizing-guide .tsg-pre,
.taf-sizing-guide .tsg-q {
    font-size: 14.5px;
    font-weight: var(--font-weight-medium);
    color: var(--color-text-light);
}

.taf-sizing-guide .tsg-note {
    font-size: 14.5px;
    line-height: 1.55;
    color: var(--color-text-light);
    text-wrap: pretty;
}

.taf-sizing-guide .tsg-mlist {
    display: flex;
    flex-direction: column;
}

.taf-sizing-guide .tsg-mrow {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 2px 12px;
    padding: 10px 0;
    border-top: 1px solid var(--color-border-light);
}

.taf-sizing-guide .tsg-mrow:first-child {
    border-top: 0;
    padding-top: 2px;
}

.taf-sizing-guide .tsg-mrow dt {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: var(--font-weight-semibold);
}

.taf-sizing-guide .tsg-mrow dd {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.taf-sizing-guide .tsg-mrow .tsg-num {
    font-size: 24px;
}

.taf-sizing-guide .tsg-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--color-text);
    color: var(--color-bg);
    font-size: 12px;
    font-weight: var(--font-weight-bold);
}

.taf-sizing-guide .tsg-callout {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 16px 18px;
    border-radius: var(--radius-md);
    background: var(--color-bg-muted);
}

.taf-sizing-guide .tsg-callout p {
    font-size: 15px;
    line-height: 1.55;
    color: var(--color-text);
    text-wrap: pretty;
}

.taf-sizing-guide .tsg-mark {
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    margin-top: 8px;
    background: var(--color-text);
}

.taf-sizing-guide .tsg-grid + .tsg-callout {
    margin-top: var(--space-sm);
}


/* ── 6. Illustrations ──
   The inlined SVGs of assets/sizing/, drawn by class. Every fill and stroke is the art palette's (§1). */

.taf-sizing-guide .tsg-art * {
    vector-effect: non-scaling-stroke;
}

.taf-sizing-guide .tsg-art .tsg-g {
    fill: var(--tsg-art-paper);
    stroke: var(--tsg-art-line);
    stroke-width: 1.5;
    stroke-linejoin: round;
}

.taf-sizing-guide .tsg-art .tsg-shade {
    fill: var(--tsg-art-shade);
    stroke: var(--tsg-art-line);
    stroke-width: 1.5;
    stroke-linejoin: round;
}

.taf-sizing-guide .tsg-art .tsg-line {
    fill: none;
    stroke: var(--tsg-art-line);
    stroke-width: 1.5;
    stroke-linecap: round;
}

.taf-sizing-guide .tsg-art .tsg-soft {
    stroke: var(--tsg-art-soft);
    stroke-width: 1.1;
}

.taf-sizing-guide .tsg-art .tsg-seam,
.taf-sizing-guide .tsg-art .tsg-seam-r {
    fill: none;
    stroke: var(--tsg-art-seam);
    stroke-width: 1;
    stroke-dasharray: 3 2.5;
}

.taf-sizing-guide .tsg-art .tsg-rib {
    fill: none;
    stroke: var(--tsg-art-rib);
    stroke-width: 1;
}

.taf-sizing-guide .tsg-art .tsg-snap {
    fill: var(--tsg-art-paper);
    stroke: var(--tsg-art-line);
    stroke-width: 1.2;
}

.taf-sizing-guide .tsg-art .tsg-metal {
    fill: var(--tsg-art-metal);
    stroke: var(--tsg-art-line);
    stroke-width: 1.5;
}

.taf-sizing-guide .tsg-art .tsg-metal-in {
    fill: var(--tsg-art-metal-in);
    stroke: var(--tsg-art-metal-line);
    stroke-width: 1;
}

.taf-sizing-guide .tsg-art .tsg-stripe {
    fill: var(--tsg-art-stripe);
}

.taf-sizing-guide .tsg-art .tsg-layer {
    fill: var(--tsg-art-layer);
}

.taf-sizing-guide .tsg-art .tsg-rail {
    fill: var(--tsg-art-rail);
    stroke: var(--tsg-art-line);
    stroke-width: 1.2;
}

.taf-sizing-guide .tsg-art .tsg-quad {
    fill: var(--tsg-art-quad);
}

.taf-sizing-guide .tsg-art .tsg-fold {
    fill: none;
    stroke: var(--tsg-art-fold);
    stroke-width: 1.1;
    stroke-dasharray: 5 4;
}

.taf-sizing-guide .tsg-art .tsg-flow {
    fill: none;
    stroke: var(--tsg-art-flow);
    stroke-width: 1.5;
}

.taf-sizing-guide .tsg-art .tsg-flow-h {
    fill: var(--tsg-art-flow);
}

.taf-sizing-guide .tsg-art .tsg-print {
    fill: var(--tsg-art-print);
    stroke: var(--tsg-art-print-line);
    stroke-width: 1.75;
}

.taf-sizing-guide .tsg-art .tsg-dim {
    fill: none;
    stroke: var(--tsg-art-ink);
    stroke-width: 1.2;
}

.taf-sizing-guide .tsg-art .tsg-tick {
    fill: none;
    stroke: var(--tsg-art-ink);
    stroke-width: 1;
}

.taf-sizing-guide .tsg-art .tsg-head {
    fill: var(--tsg-art-ink);
    stroke: none;
}

.taf-sizing-guide .tsg-art .tsg-divider {
    fill: none;
    stroke: var(--tsg-art-rule);
    stroke-width: 1;
    stroke-dasharray: 4 4;
}

.taf-sizing-guide .tsg-art .tsg-badge-c {
    fill: var(--tsg-art-ink);
}

.taf-sizing-guide .tsg-art .tsg-badge-t {
    fill: var(--tsg-art-paper);
    font: var(--font-weight-bold) 12px var(--font-body);
}

.taf-sizing-guide .tsg-art .tsg-detail-bg {
    fill: var(--tsg-art-paper);
}

.taf-sizing-guide .tsg-art .tsg-detail-frame {
    fill: none;
    stroke: var(--tsg-art-rule);
    stroke-width: 1;
}

.taf-sizing-guide .tsg-art .tsg-glass {
    fill: var(--tsg-art-glass);
    stroke: var(--tsg-art-line);
    stroke-width: 1.5;
    stroke-linejoin: round;
}

.taf-sizing-guide .tsg-art .tsg-hl {
    fill: none;
    stroke: var(--tsg-art-hl);
    stroke-width: 3;
    stroke-linecap: round;
}

.taf-sizing-guide .tsg-art .tsg-emboss {
    fill: none;
    stroke: var(--tsg-art-emboss);
    stroke-width: 1;
    stroke-dasharray: 2 2;
}

.taf-sizing-guide .tsg-art .tsg-cap {
    fill: var(--tsg-art-cap);
    font: var(--font-weight-medium) 11px var(--font-body);
}


/* ── 7. Measuring tips and the calculator ── */

.taf-sizing-guide .tsg-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-sm);
}

.taf-sizing-guide .tsg-step {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 24px;
    border-radius: var(--radius-tile);
    background: var(--color-bg-alt);
}

.taf-sizing-guide .tsg-step-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: var(--color-bg);
    border: 1px solid var(--color-border-light);
}

.taf-sizing-guide .tsg-step-icon svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: var(--color-text);
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.taf-sizing-guide .tsg-step-n {
    position: absolute;
    top: 24px;
    right: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--color-text);
    color: var(--color-bg);
    font-size: 13px;
    font-weight: var(--font-weight-bold);
}

.taf-sizing-guide .tsg-step h3 {
    margin-top: 6px;
    font-size: 17px;
    font-weight: var(--font-weight-bold);
    line-height: 1.3;
}

.taf-sizing-guide .tsg-step p {
    font-size: 15px;
    line-height: 1.6;
    color: var(--color-text-light);
}

.taf-sizing-guide .tsg-measure-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-sm);
    margin-top: var(--space-sm);
    align-items: start;
}

.taf-sizing-guide .tsg-tips,
.taf-sizing-guide .tsg-calc {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 24px;
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-tile);
    background: var(--color-bg);
}

.taf-sizing-guide .tsg-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.taf-sizing-guide .tsg-list li {
    display: flex;
    gap: 12px;
    font-size: 15.5px;
    line-height: 1.6;
}

.taf-sizing-guide .tsg-list li::before {
    content: "";
    flex-shrink: 0;
    width: 6px;
    height: 6px;
    margin-top: 10px;
    background: var(--color-cyan);
}

.taf-sizing-guide .tsg-calc-intro {
    font-size: 15px;
    line-height: 1.55;
    color: var(--color-text-light);
}

.taf-sizing-guide .tsg-fields {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.taf-sizing-guide .tsg-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.taf-sizing-guide .tsg-field label {
    font-size: 13px;
    font-weight: var(--font-weight-semibold);
    line-height: 1.35;
}

.taf-sizing-guide .tsg-field .tsg-unit {
    font-size: inherit;
}

.taf-sizing-guide .tsg-unit-paren {
    font-weight: var(--font-weight-medium);
    color: var(--color-text-light);
}

.taf-sizing-guide .tsg-field input {
    width: 100%;
    min-height: 48px;
    padding: 0 14px;
    border: 1px solid var(--color-border-mid);
    border-radius: var(--radius-md);
    background: var(--color-bg);
    font: inherit;
    font-size: 16px;
    color: var(--color-text);
    font-variant-numeric: tabular-nums;
}

/* The ring is the indicator (:focus-visible, §1); the dark border and the cyan glow support it. */
.taf-sizing-guide .tsg-field input:focus {
    border-color: var(--color-text);
    box-shadow: 0 0 0 3px rgba(0, 174, 239, 0.3);
}

.taf-sizing-guide .tsg-field input[aria-invalid="true"] {
    border-color: var(--state-error-text);
}

.taf-sizing-guide .tsg-result {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 4px 16px;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    background: var(--color-bg-muted);
}

.taf-sizing-guide .tsg-result-label {
    font-size: 12px;
    font-weight: var(--font-weight-semibold);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-text-light);
}

.taf-sizing-guide .tsg-result-value {
    font-size: 24px;
    font-weight: var(--font-weight-bold);
    letter-spacing: -0.01em;
    font-variant-numeric: tabular-nums;
}

.taf-sizing-guide .tsg-result-value.is-empty {
    font-size: 15px;
    font-weight: var(--font-weight-medium);
    letter-spacing: 0;
    color: var(--color-text-light);
}

.taf-sizing-guide .tsg-result-value.is-error {
    font-size: 15px;
    font-weight: var(--font-weight-semibold);
    letter-spacing: 0;
    color: var(--state-error-text);
}

.taf-sizing-guide .tsg-calc-foot {
    font-size: 13px;
    color: var(--color-text-light);
}


/* ── 8. FAQ ── */

.taf-sizing-guide .tsg-faq {
    max-width: 860px;
    border-bottom: 1px solid var(--color-border-light);
}

.taf-sizing-guide .tsg-faq-item {
    border-top: 1px solid var(--color-border-light);
}

.taf-sizing-guide .tsg-faq-q {
    font-size: inherit;
}

.taf-sizing-guide .tsg-faq-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    min-height: 60px;
    padding: 14px 4px;
    border: 0;
    background: none;
    font: inherit;
    font-size: 17px;
    font-weight: var(--font-weight-semibold);
    line-height: 1.4;
    color: var(--color-text);
    text-align: left;
    cursor: pointer;
}

.taf-sizing-guide .tsg-faq-btn svg {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.taf-sizing-guide .tsg-faq-btn[aria-expanded="true"] svg {
    transform: rotate(180deg);
}

.taf-sizing-guide .tsg-faq-p {
    padding: 0 4px 20px;
}

.taf-sizing-guide .tsg-faq-p p {
    max-width: 720px;
    font-size: 16px;
    line-height: 1.65;
    color: var(--color-text-light);
}


/* ── 9. Call to action ── */

.taf-sizing-guide .tsg-cta {
    position: relative;
    overflow: hidden;
    margin-top: 64px;
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    gap: 28px 48px;
    align-items: center;
    padding: var(--space-md);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-lg);
    background: var(--color-bg);
}

.taf-sizing-guide .tsg-cta::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    background: linear-gradient(90deg, var(--color-cyan), var(--color-magenta), var(--color-yellow));
}

.taf-sizing-guide .tsg-cta-main {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.taf-sizing-guide .tsg-cta-main .tsg-actions {
    margin-top: 8px;
}

.taf-sizing-guide .tsg-cta-side {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.taf-sizing-guide .tsg-cta-links li {
    border-top: 1px solid var(--color-border-light);
}

.taf-sizing-guide .tsg-cta-links li:last-child {
    border-bottom: 1px solid var(--color-border-light);
}

.taf-sizing-guide .tsg-cta-links a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 48px;
    font-size: 15px;
    font-weight: var(--font-weight-semibold);
    text-decoration: none;
}

.taf-sizing-guide .tsg-cta-links a::after {
    content: "→";
}

.taf-sizing-guide .tsg-cta-contact {
    font-size: 14.5px;
    line-height: 1.6;
    color: var(--color-text-light);
}

.taf-sizing-guide .tsg-cta-contact a {
    font-weight: var(--font-weight-semibold);
}

/* A link inside a sentence is underlined, because its ink is only 1.3:1 against the words around it
   (base.css does the same for page copy). */
.taf-sizing-guide .tsg-faq-p a,
.taf-sizing-guide .tsg-cta-contact a {
    text-decoration: underline;
}


/* ── 10. Layout breakpoints ──
   The design's own: 1023, 899 and 639px, with the short windows' and the phones' blocks between the
   last two. */

@media (max-width: 1023px) {

    .taf-sizing-guide .tsg-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .taf-sizing-guide .tsg-grid--pair .tsg-grid-note {
        grid-column: 1 / -1;
    }

    .taf-sizing-guide .tsg-cta {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 899px) {

    .taf-sizing-guide .tsg-hero-inner {
        grid-template-columns: minmax(0, 1fr) minmax(0, 220px);
        gap: 24px 32px;
    }

    .taf-sizing-guide .tsg-steps,
    .taf-sizing-guide .tsg-measure-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Short windows, whatever their width: the bar scrolls away, because with the header it would cover
   too much of the page. Its controls then stop clear of the header too. */
@media (max-height: 699px) {

    .taf-sizing-guide.is-enhanced .tsg-nav {
        position: static;
        box-shadow: none;
    }

    .taf-sizing-guide.is-enhanced .tsg-nav :is(a, button) {
        scroll-margin-top: var(--tsg-offset);
    }
}

/* Phones (the mobile twin): keep this query byte-identical to its other ten copies
   (css-lint.mjs CL-3). sizing.js reads the bar's computed position, so it holds no copy. */
@media (max-width: 768px), (max-height: 500px) and (orientation: landscape) {

    .taf-sizing-guide.is-enhanced .tsg-nav {
        position: static;
        box-shadow: none;
    }

    /* A 44px hit area around the breadcrumb link without moving the line, as content.css does. */
    .taf-sizing-guide .tsg-crumbs a {
        display: inline-block;
        padding: 15px 5px;
        margin: -15px -5px;
    }

    .taf-sizing-guide.is-enhanced .tsg-nav :is(a, button) {
        scroll-margin-top: var(--tsg-offset);
    }

    .taf-sizing-guide .tsg-tools {
        width: 100%;
        justify-content: space-between;
    }
}

@media (max-width: 639px) {

    .taf-sizing-guide .tsg-hero-inner {
        grid-template-columns: minmax(0, 1fr);
    }

    .taf-sizing-guide .tsg-hero-fig {
        display: none;
    }

    .taf-sizing-guide .tsg-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
    }

    .taf-sizing-guide .tsg-fig {
        aspect-ratio: 4 / 3;
    }

    .taf-sizing-guide .tsg-fields {
        grid-template-columns: minmax(0, 1fr);
    }

    .taf-sizing-guide .tsg-section {
        padding-top: 40px;
    }

    .taf-sizing-guide .tsg-cta {
        padding: 28px 20px 24px;
    }

    .taf-sizing-guide .tsg-hero-actions .tsg-btn {
        padding: 0 18px;
        font-size: 14.5px;
    }

    .taf-sizing-guide .tsg-cta .tsg-btn {
        width: 100%;
        white-space: normal;
        text-align: center;
    }

    .taf-sizing-guide .tsg-chipnav a {
        padding: 0 14px;
    }

    .taf-sizing-guide .tsg-tips,
    .taf-sizing-guide .tsg-calc,
    .taf-sizing-guide .tsg-step {
        padding: var(--space-sm);
    }
}


/* ── 11. Motion ── */

@media (prefers-reduced-motion: no-preference) {

    .taf-sizing-guide .tsg-btn,
    .taf-sizing-guide .tsg-chipnav a,
    .taf-sizing-guide .tsg-seg-btn {
        transition: background-color var(--transition), color var(--transition), border-color var(--transition);
    }

    .taf-sizing-guide .tsg-faq-btn svg {
        transition: transform var(--transition);
    }
}


/* ── 12. Print ──
   The whole guide with every answer, without the hero's buttons, the chip nav, the calculator or the
   call to action. */

@media print {

    .taf-sizing-guide {
        font-size: 11pt;
        color: var(--tsg-print-ink);
    }

    .taf-sizing-guide .tsg-nav,
    .taf-sizing-guide .tsg-hero-actions,
    .taf-sizing-guide .tsg-hero-fig,
    .taf-sizing-guide .tsg-crumbs,
    .taf-sizing-guide .tsg-calc,
    .taf-sizing-guide .tsg-cta {
        display: none !important;
    }

    .taf-sizing-guide .tsg-hero {
        background: none !important;
        color: var(--tsg-print-ink) !important;
        padding: 0 0 8px !important;
    }

    .taf-sizing-guide .tsg-hero::before,
    .taf-sizing-guide .tsg-hero::after {
        display: none;
    }

    .taf-sizing-guide .tsg-hero * {
        color: var(--tsg-print-ink) !important;
    }

    .taf-sizing-guide .tsg-hero-inner {
        display: block;
    }

    .taf-sizing-guide .tsg-wrap {
        max-width: none;
        padding: 0;
    }

    .taf-sizing-guide .tsg-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 12px;
    }

    .taf-sizing-guide .tsg-grid--pair .tsg-grid-note {
        grid-column: auto;
    }

    .taf-sizing-guide #youth-baby,
    .taf-sizing-guide #hats,
    .taf-sizing-guide #can-coolers,
    .taf-sizing-guide #measuring-tips {
        break-before: page;
        page-break-before: always;
    }

    .taf-sizing-guide .tsg-card-body {
        padding: 12px 14px 14px;
        gap: 6px;
    }

    .taf-sizing-guide .tsg-num {
        font-size: 22px;
    }

    .taf-sizing-guide .tsg-mrow .tsg-num {
        font-size: 18px;
    }

    .taf-sizing-guide .tsg-steps {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }

    .taf-sizing-guide .tsg-measure-grid {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .taf-sizing-guide .tsg-card,
    .taf-sizing-guide .tsg-step,
    .taf-sizing-guide .tsg-tips,
    .taf-sizing-guide .tsg-callout,
    .taf-sizing-guide .tsg-faq-item {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .taf-sizing-guide .tsg-section-head {
        break-after: avoid;
        page-break-after: avoid;
    }

    .taf-sizing-guide .tsg-section {
        padding-top: var(--space-sm);
    }

    .taf-sizing-guide .tsg-card {
        border-color: var(--tsg-print-rule);
    }

    .taf-sizing-guide .tsg-fig {
        background: none;
    }

    .taf-sizing-guide .tsg-faq-p[hidden] {
        display: block !important;
    }

    .taf-sizing-guide .tsg-faq-btn {
        min-height: 0;
        padding: 10px 0 4px;
    }

    .taf-sizing-guide .tsg-faq-btn svg {
        display: none;
    }

    .taf-sizing-guide a {
        color: var(--tsg-print-ink);
    }
}
