/* SizeRight — design system v2.1 (card layout restored) */

:root {
  --bg: #faf8f4;
  --surface: #ffffff;
  --ink: #1b1a17;
  --muted: #6d665e;
  --line: #e7e1d8;
  --line-strong: #d6cec2;
  --accent: #14563f;
  --accent-ink: #0d3829;
  --accent-soft: #e8f1ec;
  --warn: #8a4b12;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(27, 26, 23, .05), 0 8px 24px -18px rgba(27, 26, 23, .35);
  --maxw: 1080px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(.16, 1, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font); font-size: 17px; line-height: 1.6;
  text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-ink); }
::selection { background: #dcebe2; color: var(--ink); }
:focus-visible { outline: 3px solid #7aa38f; outline-offset: 2px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 20px; }

/* header */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(250, 248, 244, .92);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 20px; min-height: 62px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; letter-spacing: -.01em; color: var(--ink); text-decoration: none; }
.brand-mark { width: 28px; height: 28px; border-radius: 8px; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 15px; font-weight: 800; }
.nav { margin-left: auto; display: flex; gap: 4px; flex-wrap: wrap; }
.nav a { padding: 8px 12px; border-radius: 8px; color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 600; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); background: #f1ece4; }

/* hero */
.hero { padding: 54px 0 34px; display: grid; grid-template-columns: 1.1fr .9fr; gap: 44px; align-items: center; }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin: 0 0 14px; }
h1 { font-size: clamp(30px, 4.6vw, 46px); line-height: 1.08; letter-spacing: -.025em; margin: 0 0 16px; font-weight: 800; text-wrap: balance; }
.lede { font-size: clamp(17px, 2.1vw, 20px); color: var(--muted); max-width: 62ch; margin: 0 0 24px; }
.hero-points { display: flex; gap: 18px; flex-wrap: wrap; padding: 0; margin: 0; list-style: none; font-size: 15px; color: var(--muted); }
.hero-points li::before { content: "✓"; color: var(--accent); font-weight: 800; margin-right: 7px; }

/* answer-first block */
.quick { margin: 0 0 26px; padding: 16px 18px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.quick strong { display: block; font-size: 11.5px; letter-spacing: .09em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }
.quick p { margin: 0; font-size: 15.5px; line-height: 1.55; color: #3d3a35; }

.hero-card { position: relative; }
.mini { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 18px; box-shadow: 0 24px 48px -32px rgba(27, 26, 23, .55); transform: rotate(-1.2deg); }
.mini-row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 14px; color: var(--muted); }
.mini-row strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.mini-out { display: flex; justify-content: space-between; align-items: baseline; margin-top: 14px; padding: 12px 14px; background: var(--accent-soft); border-radius: 10px; }
.mini-out span { font-size: 11.5px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--accent); }
.mini-out strong { font-size: 27px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.mini-note { margin: 10px 0 0; font-size: 12.5px; color: var(--muted); }

.stat-band { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 26px 0 0; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stat-band div { display: flex; flex-direction: column; gap: 2px; }
.stat-band strong { font-size: 26px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat-band span { font-size: 13px; color: var(--muted); }

/* steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 8px 0 0; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.step h3 { margin: 10px 0 4px; font-size: 16px; }
.step p { margin: 0; font-size: 14px; color: var(--muted); }
.step-n { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 800; font-size: 14px; }

/* cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; padding: 0; margin: 0; list-style: none; }
.card {
  display: flex; flex-direction: column; gap: 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 18px 16px; text-decoration: none; color: inherit; box-shadow: var(--shadow);
  transition: transform .16s var(--ease), border-color .16s var(--ease);
}
.card:hover { transform: translateY(-2px); border-color: var(--line-strong); }
.card h3 { margin: 0; font-size: 17px; letter-spacing: -.01em; }
.card p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.45; }
.card .tag { margin-top: 10px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.card .tag--start { color: var(--warn); }
.card-icon { width: 38px; height: 38px; border-radius: 11px; background: var(--accent-soft); display: grid; place-items: center; color: var(--accent); margin-bottom: 10px; }
.card-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* tool */
.tool-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); margin: 26px 0 8px; }
.tool-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.tool-title { margin: 0; font-size: 18px; letter-spacing: -.01em; }
.units { display: inline-flex; background: #f1ece4; padding: 3px; border-radius: 10px; }
.units button { border: 0; background: transparent; padding: 7px 13px; border-radius: 8px; font: inherit; font-size: 14px; font-weight: 600; color: var(--muted); cursor: pointer; }
.units button.is-on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; color: var(--muted); }
.control { display: flex; align-items: stretch; background: #fbf9f6; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); overflow: hidden; transition: border-color .15s, box-shadow .15s; }
.control:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(20, 86, 63, .12); }
.control input, .control select { flex: 1; min-width: 0; width: 100%; border: 0; background: transparent; padding: 12px; font: inherit; font-size: 16px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; appearance: none; }
.control input::-webkit-outer-spin-button, .control input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.control input[type=number] { -moz-appearance: textfield; }
.control select { cursor: pointer; padding-right: 34px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
.suffix { display: grid; place-items: center; padding: 0 12px; font-size: 13px; font-weight: 700; color: var(--muted); background: #f3eee7; border-left: 1px solid var(--line); white-space: nowrap; }

.result { margin-top: 22px; padding: 22px; border-radius: var(--radius); background: linear-gradient(180deg, #f4f8f5, #ffffff); border: 1px solid #d8e5dd; }
.result-kicker { margin: 0 0 6px; font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.result-primary { margin: 0; line-height: 1; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.result-num { font-size: clamp(38px, 7vw, 54px); font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.result-unit { font-size: 20px; font-weight: 700; color: var(--muted); }
.result-label { margin: 8px 0 0; font-weight: 700; font-size: 15px; }
.result-note { margin: 10px 0 0; color: #46514a; font-size: 14.5px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 18px 0 0; padding: 14px 0 0; border-top: 1px dashed #cfe0d6; }
.stat { margin: 0; }
.stat dt { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.stat dd { margin: 2px 0 0; font-variant-numeric: tabular-nums; }
.stat dd strong { font-size: 17px; }
.stat dd span { color: var(--muted); font-size: 13px; }
.tool-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.btn { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); padding: 10px 16px; border-radius: 10px; font: inherit; font-size: 14.5px; font-weight: 700; cursor: pointer; text-decoration: none; transition: border-color .15s, transform .1s; }
.btn:hover { border-color: var(--accent); color: var(--accent-ink); }
.btn:active { transform: scale(.985); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-ink); color: #fff; }
.micro { margin: 12px 0 0; font-size: 12.5px; color: var(--muted); }

/* prose */
.prose { max-width: 72ch; }
.prose h2 { font-size: clamp(22px, 3vw, 28px); letter-spacing: -.02em; margin: 44px 0 12px; }
.prose h2:first-child { margin-top: 30px; }
.prose h3 { font-size: 18px; margin: 26px 0 8px; }
.prose p { margin: 0 0 14px; }
.formula { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; padding: 16px 18px; margin: 18px 0; }
.formula h3 { margin: 0 0 8px; font-size: 15px; }
.formula ul { margin: 0; padding-left: 18px; }
.formula li { margin: 4px 0; font-size: 15px; color: #3d3a35; }
.formula code { background: #f3eee7; padding: 1px 5px; border-radius: 4px; font-size: 13.5px; }
.callout { background: var(--accent-soft); border-radius: var(--radius-sm); padding: 16px 18px; margin: 20px 0; font-size: 15px; }
.callout strong { display: block; margin-bottom: 4px; }

/* glance */
.glance { margin: 20px 0 8px; padding: 16px 18px; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.prose .glance h2 { margin: 0 0 8px; font-size: 12px; letter-spacing: .09em; text-transform: uppercase; color: var(--accent); }
.glance ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.glance li { position: relative; padding-left: 24px; font-size: 14.5px; color: #3d3a35; line-height: 1.45; }
.glance li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 800; }

/* tables */
.table-wrap { overflow-x: auto; margin: 18px 0 8px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
caption { text-align: left; padding: 12px 14px 0; font-size: 13px; color: var(--muted); font-weight: 600; }
th, td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; font-variant-numeric: tabular-nums; }
thead th { position: sticky; top: 0; background: #f7f3ed; font-size: 12.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
tbody tr:nth-child(even) td { background: #fdfbf7; }
tr:last-child td { border-bottom: 0; }
td code { background: #f3eee7; padding: 1px 5px; border-radius: 4px; font-size: 13px; }

/* faq */
.faq { margin: 18px 0 0; }
.faq details { border-bottom: 1px solid var(--line); padding: 14px 0; }
.faq summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-weight: 800; }
.faq details[open] summary::after { content: "–"; }
.faq p { margin: 10px 0 0; color: #3d3a35; font-size: 15.5px; }

/* buying tips */
.tips { margin: 0 0 10px; padding-left: 20px; }
.tips li { margin: 9px 0; color: #3d3a35; font-size: 15.5px; line-height: 1.55; }
.tips li::marker { color: var(--accent); }

/* related */
.related { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin: 16px 0 0; padding: 0; list-style: none; }
.related a { display: block; padding: 14px 16px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); text-decoration: none; font-weight: 600; font-size: 15px; }
.related a span { display: block; font-weight: 400; color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.related a:hover { border-color: var(--accent); }

/* ads */
.ad-slot { margin: 28px 0; min-height: 260px; display: grid; place-items: center; border: 1px dashed var(--line-strong); border-radius: var(--radius-sm); background: #f6f2ec; color: #9b9389; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; }
.ad-slot[data-size="banner"] { min-height: 110px; }

/* Adsterra Native Banner: the script fills this container; 120px reserves room */
.ad-native { margin: 30px 0; min-height: 120px; width: 100%; overflow: hidden; }
.ad-native > div { width: 100%; }

/* Adsterra 300x250 banner */
.ad-banner { margin: 34px 0; min-height: 250px; display: grid; place-items: center; overflow: hidden; }
.ad-banner--slim { min-height: 64px; }

/* figure */
.figure { margin: 22px 0; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.figure svg { width: 100%; height: auto; }
.figure figcaption { margin-top: 10px; font-size: 13.5px; color: var(--muted); line-height: 1.5; }

/* crumbs + footer */
.crumbs { font-size: 13.5px; color: var(--muted); margin: 18px 0 0; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.site-footer { margin-top: 60px; border-top: 1px solid var(--line); background: #f4f0e9; padding: 34px 0 40px; font-size: 14px; color: var(--muted); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 24px; }
.footer-grid h4 { margin: 0 0 8px; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink); }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin: 5px 0; }
.footer-grid a { color: var(--muted); text-decoration: none; }
.footer-grid a:hover { color: var(--ink); text-decoration: underline; }
.footer-note { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 12.5px; line-height: 1.55; }

.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 46px 0 14px; flex-wrap: wrap; }
.section-head h2 { margin: 0; font-size: clamp(20px, 2.6vw, 26px); letter-spacing: -.02em; }
.section-head a { font-size: 14px; font-weight: 700; text-decoration: none; }

.reveal { opacity: 1; transform: none; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 24px; }
  .hero-card { order: 2; max-width: 420px; }
  .stat-band { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  body { font-size: 16px; }
  .hero { padding: 34px 0 22px; }
  .tool-card { padding: 16px; margin-inline: -4px; }
  .result-num { font-size: 31px; }
  .result-unit { font-size: 16px; }
  .fields { grid-template-columns: 1fr 1fr; gap: 10px; }
  .footer-grid { grid-template-columns: 1fr; }
  .nav a { padding: 7px 9px; font-size: 14px; }
  .site-header .wrap { gap: 10px; }
  .ad-slot { min-height: 250px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* print */
@media print {
  .site-header, .nav, .site-footer, .ad-slot, .tool-actions, .units, .crumbs, .related,
  .hero-points, .faq, .section-head, .tool-card .micro, .glance, .figure, .index { display: none !important; }
  body { background: #fff; font-size: 12pt; color: #000; }
  .wrap { max-width: none; padding: 0; }
  .tool-card { border: 0; box-shadow: none; padding: 0; margin: 0; }
  .result { background: #fff; border: 1px solid #000; }
  .result-num { font-size: 28pt; }
  .fields { display: grid; grid-template-columns: 1fr 1fr; gap: 6pt 18pt; }
  .control { border: 0; border-bottom: 1px solid #999; border-radius: 0; background: #fff; }
  .control input, .control select { padding: 2pt 0; font-size: 11pt; }
  .suffix { background: #fff; border: 0; }
  .stats { border-top: 1px solid #000; }
  h1 { font-size: 16pt; }
}