/* sizechartai.com: tailor's tape + spec sheet */
@font-face { font-family: "Archivo"; font-style: normal; font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; src: url(/assets/fonts/archivo.woff2) format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400 700; font-display: swap; src: url(/assets/fonts/jetbrains-mono.woff2) format("woff2"); }

:root {
  --paper: #ffffff;
  --sheet: #f3f4f1;
  --ink: #1b1e21;
  --ink-2: #4b535b;
  --rule: #c9ced2;
  --rule-soft: #e4e7e9;
  --tape: #f5c518;
  --tape-2: #dcae00;
  --tape-soft: #fdf1bf;
  --red: #c4261c;
  --steel: #9aa3aa;
  --sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --w: 1200px;
  --gut: 20px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1.0625rem/1.6 var(--sans); font-stretch: 100%; }
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--ink); text-decoration-color: var(--tape-2); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--red); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; box-shadow: 0 0 0 6px var(--tape); }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; background: var(--tape); padding: 10px 14px; z-index: 10; font-weight: 700; }
.skip:focus { top: 8px; }
.wrap { max-width: var(--w); margin: 0 auto; padding: 0 var(--gut); }
.mono, .res-size, .equiv dd, table.chart td, table.chart tbody th { font-family: var(--mono); font-variant-numeric: tabular-nums; }

h1, h2, h3 { font-family: var(--sans); line-height: 1.05; margin: 0; color: var(--ink); }
h1 { font-size: clamp(2.6rem, 8.4vw, 5.6rem); font-weight: 800; font-stretch: 70%; letter-spacing: -0.01em; max-width: 14ch; }
h2 { font-size: clamp(1.75rem, 4.2vw, 2.6rem); font-weight: 780; font-stretch: 74%; margin: 2.2em 0 .5em; }
h3 { font-size: 1.2rem; font-weight: 700; font-stretch: 90%; margin: 1.6em 0 .4em; }
p { margin: 0 0 1em; }
.lead { font-size: clamp(1.06rem, 2.2vw, 1.3rem); line-height: 1.5; max-width: 60ch; color: var(--ink-2); margin-top: 1rem; }
.lead-s { color: var(--ink-2); max-width: 62ch; }

/* ---------- header: the ruler edge ---------- */
.site-head { position: relative; background: var(--paper); }
.site-head::after {
  content: ""; display: block; height: 12px;
  background:
    repeating-linear-gradient(90deg, var(--ink) 0 1px, transparent 1px 50px) top / 100% 12px no-repeat,
    repeating-linear-gradient(90deg, var(--ink) 0 1px, transparent 1px 25px) top / 100% 8px no-repeat,
    repeating-linear-gradient(90deg, var(--ink) 0 1px, transparent 1px 5px) top / 100% 4px no-repeat;
  border-top: 2px solid var(--ink);
}
.head-in { display: flex; align-items: center; justify-content: space-between; gap: 4px 16px; min-height: 64px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 2px; }
.brand { display: inline-flex; align-items: stretch; text-decoration: none; font-weight: 800; font-stretch: 70%; font-size: 1.45rem; line-height: 1; letter-spacing: .01em; margin: 0; }
.brand-tape { background: var(--tape); padding: 7px 8px 6px 10px; border-left: 6px solid var(--steel); }
.brand-ai { background: var(--ink); color: var(--tape); padding: 7px 8px 6px; }
.site-head nav { max-width: 100%; overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--gut)); padding: 0 var(--gut); }
.site-head nav::-webkit-scrollbar { display: none; }
.nav { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: nowrap; gap: 0 2px; }
.nav li { flex: none; }
.nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 9px; text-decoration: none; font-weight: 600; font-size: .98rem; border-bottom: 3px solid transparent; }
.nav a:hover { border-bottom-color: var(--tape); }
.nav a[aria-current="page"] { border-bottom-color: var(--red); }

.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 18px 0 0; padding: 0; font-size: .93rem; color: var(--ink-2); }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--steel); }

/* ---------- hero ---------- */
.hero { padding-top: clamp(18px, 5vw, 64px); padding-bottom: 16px; }
.hero-sub { padding-top: 22px; }
.hero-home h1 span { display: block; }
.hero-home h1 { max-width: none; }
.hero-home .hero-cta { margin: 1.2rem 0 0; }
.c-ext { margin: 0 0 12px; font-weight: 600; }
.doc { display: grid; gap: 0 56px; grid-template-columns: minmax(0, 1fr); }
.doc > * { min-width: 0; }
.toc { display: none; }
.hero-sub h1 { font-size: clamp(2.3rem, 6.4vw, 4.4rem); max-width: 18ch; }
.tape-row { overflow: hidden; margin: 6px 0 28px; filter: drop-shadow(0 2px 0 rgba(27, 30, 33, .14)); }
.tape { width: 100%; height: 72px; }
.tape-body { fill: var(--tape); }
.tape-hook { fill: #b9c0c6; }
.tape-hook-edge { fill: #8e979e; }
.tick { stroke: var(--ink); stroke-width: 1.4; }
.tick-t { font: 600 15px var(--mono); fill: var(--ink); }
.tick-t.sm { font-size: 12px; }
.tick-t.red { fill: var(--red); font-weight: 700; }

/* ---------- tool ---------- */
.tool { border: 2px solid var(--ink); background: var(--paper); margin: 0 0 12px; scroll-margin-top: 12px; }
.tool-title { font-size: 1.25rem; font-stretch: 85%; font-weight: 750; padding: 14px 16px 0; margin: 0; }
.tool-tabs { display: flex; gap: 0; padding: 12px 16px 0; border-bottom: 2px solid var(--ink); overflow-x: auto; }
.tool-tabs button {
  font: 650 1rem var(--sans); color: var(--ink-2); background: none; border: 2px solid transparent; border-bottom: 0;
  padding: 10px 14px; min-height: 48px; cursor: pointer; margin-bottom: -2px; white-space: nowrap;
}
.tool-tabs button[aria-selected="true"] { color: var(--ink); background: var(--paper); border-color: var(--ink); border-bottom: 2px solid var(--paper); box-shadow: inset 0 4px 0 var(--tape); }
.pane { display: grid; grid-template-columns: 1fr; }
.pane[hidden] { display: none; }
.controls { padding: 16px; display: grid; gap: 14px; align-content: start; background: var(--sheet); border-bottom: 1px solid var(--rule); }
.output { padding: 16px; min-width: 0; }
.field { display: grid; gap: 4px; }
.field label, legend { font-weight: 650; font-size: .95rem; }
.field small { color: var(--ink-2); font-size: .85rem; }
.unit { font-family: var(--mono); font-weight: 500; font-size: .82rem; color: var(--ink-2); }
select, input[type="text"] {
  font: 500 1.05rem var(--sans); color: var(--ink); background: var(--paper); width: 100%;
  min-height: 48px; padding: 8px 12px; border: 2px solid var(--ink); border-radius: 2px;
}
input[type="text"] { font-family: var(--mono); }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 38px; }
fieldset.seg { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0; }
fieldset.seg legend { width: 100%; margin-bottom: 4px; padding: 0; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border: 2px solid var(--ink); margin: 0 -2px -2px 0; background: var(--paper); cursor: pointer; font-weight: 600; font-size: .97rem; }
.seg input:checked + span { background: var(--ink); color: var(--tape); }
.seg input:focus-visible + span { outline: 3px solid var(--ink); outline-offset: 2px; box-shadow: 0 0 0 6px var(--tape); position: relative; z-index: 1; }
.fgroup { display: grid; gap: 14px; }
.fgroup[hidden] { display: none; }
.howto { font-size: .93rem; margin: 0; }

.res, .fit-head { margin: 0 0 12px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.res-sys { font-weight: 650; color: var(--ink-2); }
.res-size { font-size: clamp(2.2rem, 6vw, 3rem); font-weight: 700; line-height: 1; }
.res-span { font-size: .9rem; color: var(--ink-2); }
.equiv { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); margin: 0 0 16px; border-top: 2px solid var(--ink); border-left: 1px solid var(--rule); }
.eq { border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: 8px 10px 10px; }
.eq dt { font-size: .82rem; font-weight: 600; color: var(--ink-2); line-height: 1.25; min-height: 2.05em; }
.eq dd { margin: 2px 0 0; font-size: 1.35rem; font-weight: 700; }
.eq-from { background: var(--tape); }
.eq-from dt { color: var(--ink); }

.tool-foot { border-top: 1px solid var(--rule); padding: 12px 16px; display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; }
#share-msg { font-size: .93rem; }
.private { margin: 0 0 0 auto; font-size: .88rem; color: var(--ink-2); }

.fit-empty { color: var(--ink-2); border-left: 4px solid var(--tape); padding: 6px 0 6px 12px; margin: 0 0 12px; }
.fit-lines { list-style: none; padding: 0; margin: 0 0 12px; border-top: 1px solid var(--rule); }
.fit-lines li { display: flex; flex-wrap: wrap; gap: 4px 14px; padding: 8px 0; border-bottom: 1px solid var(--rule-soft); align-items: baseline; }
.fit-lines li span:first-child { min-width: 9.5em; }
.fit-lines em { font-style: normal; font-size: .85rem; color: var(--ink-2); }
.fit-lines li.drv em { color: var(--red); font-weight: 700; }
.fit-block { padding-bottom: 14px; margin-bottom: 18px; border-bottom: 2px solid var(--ink); }
.fit-block:last-child { border-bottom: 0; margin-bottom: 0; }
.fit-side { font-size: .95rem; background: var(--sheet); padding: 8px 12px; }
.fit-table summary { cursor: pointer; font-weight: 650; min-height: 44px; display: flex; align-items: center; }
.tape-fit { width: 100%; max-width: 640px; margin: 4px 0 12px; }
.tape-fit .band { fill: var(--sheet); stroke: var(--rule); }
.tape-fit .band-alt { fill: #e9ebe7; }
.tape-fit .band-on { fill: var(--ink); }
.tape-fit .band-t { font: 600 12px var(--mono); fill: var(--ink); }
.tape-fit .band-on + .band-t { fill: var(--tape); }
.tape-fit .mark { stroke: var(--red); stroke-width: 3; }
.tape-fit .mark-t { font: 700 13px var(--mono); fill: var(--red); }

/* ---------- tables ---------- */
.tablewrap { overflow-x: auto; margin: 0 0 8px; -webkit-overflow-scrolling: touch; }
table.chart { border-collapse: collapse; width: 100%; font-size: .98rem; }
table.chart caption { text-align: left; font-weight: 700; font-stretch: 88%; font-size: 1.05rem; padding: 0 0 8px; }
table.chart th, table.chart td { padding: 9px 12px; text-align: center; border-bottom: 1px solid var(--rule-soft); white-space: nowrap; }
table.chart thead th { font-family: var(--sans); font-size: .84rem; font-weight: 650; color: var(--ink-2); line-height: 1.25; white-space: normal; min-width: 4.5em; vertical-align: bottom; border-bottom: 2px solid var(--ink); }
table.chart tbody th { font-weight: 700; text-align: left; position: sticky; left: 0; background: var(--paper); }
table.chart tbody tr:nth-child(even) td, table.chart tbody tr:nth-child(even) th { background: #f7f8f6; }
table.chart tr.hi td, table.chart tr.hi th { background: var(--tape) !important; font-weight: 700; }
table.chart tr.hi th { box-shadow: inset 5px 0 0 var(--red); }
table.chart td.txt { font-family: var(--sans); text-align: left; white-space: normal; }
table.chart tbody th.txt { font-family: var(--sans); font-weight: 500; white-space: normal; position: static; }
table.rules tr.grp th { font-family: var(--sans); font-weight: 750; font-stretch: 85%; font-size: 1.02rem; text-align: left; background: var(--paper) !important; padding-top: 16px; border-bottom: 1px solid var(--ink); position: static; }
table.rules td.rule { white-space: nowrap; font-weight: 600; }
table.rules tbody tr:nth-child(even) td, table.rules tbody tr:nth-child(even) th { background: transparent; }
.tnote { font-size: .9rem; color: var(--ink-2); max-width: 75ch; margin: 6px 0 1.2em; }
.tnote b { color: var(--ink); }

/* ---------- prose / sections ---------- */
.prose-wrap { max-width: 860px; }
.prose-wrap > p, .prose-wrap > ul, .prose-wrap > ol, .prose > p, .prose > ul { max-width: 70ch; }
.prose-wrap .tablewrap { margin-top: 12px; }
ul, ol { padding-left: 1.25em; margin: 0 0 1em; }
li { margin: 0 0 .35em; }
.split { display: grid; gap: 24px; }
.split .tablewrap { margin-top: 2.2em; }
.spec { margin: 18px 0 0; border-top: 2px solid var(--ink); display: grid; }
.spec > div { display: grid; gap: 4px 24px; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.spec dt { font-weight: 750; font-stretch: 85%; font-size: 1.12rem; }
.spec dd { margin: 0; max-width: 62ch; }
.steps { counter-reset: s; list-style: none; padding: 0; }
.steps li { counter-increment: s; position: relative; padding: 10px 0 10px 46px; border-bottom: 1px solid var(--rule-soft); max-width: 66ch; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 8px; width: 30px; height: 30px; background: var(--tape); font: 700 .95rem/30px var(--mono); text-align: center; }
.index-list { list-style: none; padding: 0; margin: 12px 0 0; border-top: 2px solid var(--ink); }
.index-list li { display: grid; gap: 2px 28px; padding: 14px 0; border-bottom: 1px solid var(--rule); margin: 0; }
.index-list a { font-weight: 750; font-stretch: 85%; font-size: 1.25rem; }
.index-list span { color: var(--ink-2); max-width: 64ch; }

.measure-grid { display: grid; gap: 24px; align-items: start; }
.fig-wrap { margin: 2.2em 0 0; background: var(--sheet); padding: 18px; border-top: 2px solid var(--ink); }
.fig-wrap figcaption { font-size: .9rem; color: var(--ink-2); margin-top: 8px; }
.figure { width: 100%; max-width: 360px; margin: 0 auto; }
.fig-body { fill: #dfe2df; stroke: var(--ink-2); stroke-width: 1.5; }
.fig-lines line, .fig-lines path { stroke: var(--red); stroke-width: 3; fill: none; }
.fig-lines .dash { stroke-dasharray: 6 5; }
.fig-lines .lead { stroke: var(--steel); stroke-width: 1; }
.fig-text text { font: 600 14px var(--mono); fill: var(--ink); }

/* ---------- try-on ---------- */
.tryon { max-width: var(--w); margin: clamp(40px, 7vw, 88px) auto 0; padding: clamp(24px, 4vw, 40px) var(--gut); display: grid; gap: 28px; background: var(--sheet); border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); }
.tryon h2 { margin-top: 0; }
.tryon-text p { max-width: 58ch; }
.honest { border-left: 4px solid var(--red); padding-left: 12px; }
.tryon-demo { width: 100%; max-width: 440px; justify-self: center; }
.compare-switch { display: flex; margin-bottom: 10px; }
.compare-switch button { flex: 1; font: 650 1rem var(--sans); min-height: 46px; border: 2px solid var(--ink); background: var(--paper); color: var(--ink); cursor: pointer; margin-right: -2px; }
.compare-switch button[aria-pressed="true"] { background: var(--ink); color: var(--tape); }
.compare { position: relative; aspect-ratio: 880 / 1179; overflow: hidden; background: #ddd; border: 2px solid var(--ink); touch-action: pan-y; }
.compare img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; max-width: none; }
.cmp-top { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.cmp-handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 3px; margin-left: -1.5px; background: var(--tape); box-shadow: 0 0 0 1px var(--ink); pointer-events: none; }
.cmp-handle::after { content: ""; position: absolute; top: 50%; left: 50%; width: 30px; height: 46px; transform: translate(-50%, -50%); background: var(--tape) repeating-linear-gradient(180deg, transparent 0 7px, var(--ink) 7px 8.5px); border: 2px solid var(--ink); background-clip: padding-box; }
.cmp-l { position: absolute; top: 10px; font: 700 .85rem var(--sans); background: var(--paper); border: 2px solid var(--ink); padding: 3px 8px; pointer-events: none; }
.cmp-la { left: 10px; }
.cmp-lb { right: 10px; }
.compare input[type="range"] { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.compare input[type="range"]:focus-visible ~ .cmp-handle, .compare:focus-within .cmp-handle { box-shadow: 0 0 0 3px var(--ink); }
.gin { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.gin figure { margin: 0; display: flex; gap: 8px; align-items: center; }
.gin img { width: 64px; height: auto; border: 1px solid var(--rule); background: #fff; }
.gin figcaption { font-size: .85rem; line-height: 1.3; color: var(--ink-2); }
.gin figcaption span { display: block; font-weight: 700; color: var(--ink); }
.ai-label { grid-column: 1 / -1; font-size: .85rem; color: var(--ink-2); margin: 2px 0 0; }

/* ---------- buttons / CTA ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 20px; font: 700 1rem var(--sans); text-decoration: none; border: 2px solid var(--ink); border-radius: 2px; cursor: pointer; background: var(--paper); color: var(--ink); }
.btn-tape { background: var(--tape); }
.btn-tape:hover { background: var(--tape-2); }
.btn-line:hover { background: var(--tape-soft); }
.cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.cta-note { flex-basis: 100%; font-size: .9rem; color: var(--ink-2); margin: 4px 0 0; max-width: 58ch; }

/* ---------- FAQ ---------- */
.faq { max-width: var(--w); margin: 0 auto; padding: 0 var(--gut); }
.faq > * { max-width: 860px; }
.faq details { border-bottom: 1px solid var(--rule); }
.faq details:first-of-type { border-top: 2px solid var(--ink); }
.faq summary { cursor: pointer; font-weight: 700; padding: 14px 32px 14px 0; min-height: 48px; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 12px; font: 700 1.2rem var(--mono); }
.faq details[open] summary::after { content: "−"; }
.faq details div { padding: 0 0 8px; max-width: 70ch; }

/* ---------- footer ---------- */
.site-foot { margin-top: clamp(56px, 8vw, 96px); background: var(--ink); color: #e7e9ea; padding: 0 0 32px; }
.site-foot::before { content: ""; display: block; height: 14px; background: var(--tape) repeating-linear-gradient(90deg, var(--ink) 0 1.5px, transparent 1.5px 10px) top / 100% 7px no-repeat; }
.foot-in { display: grid; gap: 24px; padding-top: 28px; }
.site-foot p { max-width: 62ch; font-size: .95rem; }
.site-foot a { color: #fff; }
.brand-foot { margin-bottom: 14px; }
.brand-foot .brand-tape { color: var(--ink); }
.brand-foot .brand-ai { box-shadow: inset 0 0 0 2px var(--tape); }
.foot-nav { list-style: none; padding: 0; margin: 0; columns: 2; gap: 20px; }
.foot-nav a { display: inline-flex; min-height: 44px; align-items: center; font-weight: 600; }

/* ---------- wider screens ---------- */
@media (min-width: 760px) {
  :root { --gut: 32px; }
  .site-head nav { margin: 0; padding: 0; }
  .head-in { padding-bottom: 10px; }
  .controls { border-bottom: 0; border-right: 1px solid var(--rule); }
  .pane { grid-template-columns: 300px 1fr; }
  .output { padding: 20px 24px; }
  .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; }
  .spec > div { grid-template-columns: 15em 1fr; }
  .index-list li { grid-template-columns: 17em 1fr; align-items: baseline; }
  .foot-in { grid-template-columns: 1.4fr 1fr; }
  .measure-grid { grid-template-columns: minmax(0, 1fr) 360px; gap: 48px; }
  .hero-home { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 56px; align-items: end; }
  .hero-home .lead { margin: 0 0 .6em; }
  .hero-home .hero-cta { grid-column: 1 / -1; margin: 1rem 0 0; }
}
@media (min-width: 1100px) {
  .doc { grid-template-columns: minmax(0, 860px) 1fr; }
  .doc .prose-wrap { grid-column: 1; grid-row: 1; }
  .toc { display: block; grid-column: 2; grid-row: 1; align-self: start; position: sticky; top: 16px; margin-top: 2.6rem; border-top: 2px solid var(--ink); padding-top: 10px; font-size: .95rem; }
  .toc p { font-weight: 750; font-stretch: 85%; margin: 0 0 6px; }
  .toc ol { list-style: none; padding: 0; margin: 0; }
  .toc li { margin: 0; border-bottom: 1px solid var(--rule-soft); }
  .toc a { display: block; padding: 7px 0 7px 12px; text-decoration: none; border-left: 3px solid transparent; }
  .toc a:hover { border-left-color: var(--tape); }
}
@media (max-width: 959px) {
  .tryon { gap: 0; }
  .tryon-text { display: contents; }
  .tryon-text > * { order: 3; }
  .tryon-text > h2, .tryon-text > p:first-of-type { order: 1; }
  .tryon-demo { order: 2; margin: 8px 0 22px; }
}
@media (min-width: 960px) {
  .tryon { grid-template-columns: minmax(0, 1fr) 440px; align-items: center; gap: 56px; padding-left: 40px; padding-right: 40px; }
  .pane { grid-template-columns: 320px 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }
@media print {
  .site-head, .tool, .tryon, .site-foot, .tape-row, .faq { display: none; }
  table.chart th, table.chart td { padding: 4px 8px; }
}
