/* Measurement Convert · site styles */
/* Layout: one centred 1120px column on warm cream; white cards on hairlines; terracotta only for actions and emphasis. */
:root {
  --cream: #faf7f0;        /* page */
  --paper: #ffffff;        /* cards */
  --sand: #f4eee3;         /* result wells, quiet fills */
  --peach: #f3e0d1;        /* soft orange bands */
  --sage: #e5eadf;         /* currency band, tiles */
  --stone: #ebe6dc;        /* neutral tiles */
  --ink: #34332e;          /* charcoal text */
  --quiet: #6d6b61;        /* secondary text */
  --line: #e1ddd3;         /* hairlines */
  --line-strong: #d3ccbe;
  --terracotta: #b95737;   /* actions, emphasis */
  --terracotta-deep: #9b4529;
  --terracotta-soft: #dc9a7d;
  --tan: #c9a46c;
  --sage-ink: #5a6849;
  --stone-ink: #82786a;
  --warn-bg: #fbefd5;
  --warn-fg: #7a4a0c;
  --display: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
  --body: "Source Sans 3", "Source Sans Pro", "Segoe UI", system-ui, sans-serif;
  --r: 10px;
  --r-lg: 14px;
  --offset: 8px 8px 0 #ebe3d4;
  --pop: 0 22px 44px -22px rgba(52, 51, 46, .38);
  --gutter-l: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  color-scheme: light;
}
body.cm-body, body.cm-body * { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.cm-body { margin: 0; background: var(--cream); color: var(--ink); font-family: var(--body); font-size: 17px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
body.cm-body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 60; background: var(--cream); }
body.cm-body h1, body.cm-body h2, body.cm-body h3, body.cm-body h4 { margin: 0; font-family: var(--display); font-weight: 600; letter-spacing: -0.005em; line-height: 1.05; text-wrap: balance; color: var(--ink); }
body.cm-body p, body.cm-body ul, body.cm-body ol, body.cm-body figure, body.cm-body blockquote, body.cm-body dl, body.cm-body dd { margin: 0; }
body.cm-body ul, body.cm-body ol { padding: 0; list-style: none; }
body.cm-body a { color: inherit; text-decoration: none; }
body.cm-body button, body.cm-body input, body.cm-body select, body.cm-body textarea { font: inherit; color: inherit; }
body.cm-body button { cursor: pointer; }
body.cm-body img, body.cm-body svg { max-width: 100%; }
body.cm-body :focus-visible { outline: 2px solid var(--terracotta); outline-offset: 3px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } body.cm-body *, body.cm-body *::before, body.cm-body *::after { transition: none !important; animation: none !important; } }

body.cm-body .wrap { width: 100%; max-width: 1184px; margin-inline: auto; padding-left: max(32px, var(--gutter-l)); padding-right: max(32px, var(--gutter-r)); }
@media (max-width: 640px) { body.cm-body .wrap { padding-left: var(--gutter-l); padding-right: var(--gutter-r); } }
body.cm-body .ic { display: block; flex: none; }
body.cm-body .muted { color: var(--quiet); }
body.cm-body .small { font-size: 14px; }
body.cm-body .visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Type */
body.cm-body .eyebrow { display: inline-flex; align-items: center; gap: 8px; font-family: var(--body); font-size: 12.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--terracotta); }
body.cm-body .eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--terracotta); }
body.cm-body .h2 { font-size: clamp(32px, 4.2vw, 44px); }
body.cm-body .lead { max-width: 62ch; font-size: 18.5px; color: var(--quiet); }

/* Buttons and links */
body.cm-body .btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 46px; padding: 0 18px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--paper); font-size: 15px; font-weight: 600; transition: border-color .15s, transform .15s, background-color .15s; }
body.cm-body .btn:hover { border-color: var(--ink); transform: translateY(-1px); }
body.cm-body .btn-primary { border-color: var(--terracotta); background: var(--terracotta); color: var(--cream); }
body.cm-body .btn-primary:hover { border-color: var(--terracotta-deep); background: var(--terracotta-deep); }
body.cm-body .text-link { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; }
body.cm-body .text-link .ic { transition: transform .15s; }
body.cm-body .text-link:hover .ic { transform: translate(2px, -2px); }
body.cm-body .text-link.down:hover .ic { transform: translateY(2px); }

/* Header */
body.cm-body .site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; background: var(--cream); }
body.cm-body .site-header .bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 18px; border-bottom: 1px solid var(--line); }
body.cm-body .brand { display: inline-flex; align-items: center; gap: 10px; font-size: 21px; font-weight: 700; letter-spacing: -0.01em; }
body.cm-body .brand .ic { color: var(--terracotta); }
body.cm-body .nav { display: flex; align-items: center; gap: 4px; }
body.cm-body .nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 8px; font-size: 15.5px; color: var(--ink); transition: color .15s; }
body.cm-body .nav a:hover { color: var(--terracotta); }
body.cm-body .nav a[aria-current="page"] { color: var(--terracotta); font-weight: 600; }
body.cm-body .menu-btn { display: none; width: 46px; height: 46px; align-items: center; justify-content: center; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--paper); }
body.cm-body .mobile-nav { display: none; }
@media (max-width: 960px) {
  body.cm-body .nav, body.cm-body .header-cta { display: none; }
  body.cm-body .menu-btn { display: inline-flex; }
  body.cm-body .mobile-nav { display: block; border-bottom: 1px solid var(--line); padding-block: 8px 16px; }
  body.cm-body .mobile-nav[hidden] { display: none !important; }
  body.cm-body .mobile-nav a { display: flex; align-items: center; justify-content: space-between; min-height: 48px; padding: 0 4px; border-bottom: 1px solid var(--line); font-size: 18px; font-weight: 600; }
  body.cm-body .mobile-nav a:last-child { border-bottom: 0; }
  body.cm-body .mobile-nav a[aria-current="page"] { color: var(--terracotta); }
}

/* Sections */
body.cm-body .section { padding-block: 96px 0; }
body.cm-body .section-sm { padding-block: 56px 0; }
@media (max-width: 640px) { body.cm-body .section { padding-block: 64px 0; } body.cm-body .section-sm { padding-block: 40px 0; } }
body.cm-body .sec-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 32px; margin-bottom: 32px; }
body.cm-body .sec-head > div { display: grid; gap: 12px; min-width: 0; }
body.cm-body .sec-note { font-size: 15.5px; color: var(--quiet); text-align: right; }
@media (max-width: 640px) { body.cm-body .sec-note { text-align: left; } }
body.cm-body .rule { border: 0; border-top: 1px solid var(--line); margin: 96px 0 0; }

/* Hero */
body.cm-body .hero { position: relative; padding-block: 64px 24px; text-align: center; }
body.cm-body .hero .eyebrow { color: var(--ink); letter-spacing: .16em; }
body.cm-body .hero-title { margin-top: 22px; font-size: clamp(50px, 8.2vw, 92px); font-weight: 700; line-height: .98; letter-spacing: -0.015em; }
body.cm-body .hero-title .accent { position: relative; display: inline-block; color: var(--terracotta); }
body.cm-body .scribble { position: absolute; left: 2%; right: 2%; bottom: -10px; width: 96%; height: 14px; overflow: visible; }
body.cm-body .scribble path { fill: none; stroke: var(--terracotta-soft); stroke-width: 3; stroke-linecap: round; }
body.cm-body .hero-lead { max-width: 52ch; margin: 30px auto 0; font-size: 18.5px; color: var(--quiet); }
body.cm-body .side-label { position: absolute; left: 4px; top: 420px; writing-mode: vertical-rl; transform: rotate(180deg); font-size: 11px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--stone-ink); }
@media (max-width: 1240px) { body.cm-body .side-label { display: none; } }
body.cm-body .qc-wrap { position: relative; max-width: 620px; margin: 44px auto 0; text-align: left; }
body.cm-body .doodle { position: absolute; right: -150px; top: 4px; width: 118px; color: var(--tan); transform: rotate(-8deg); }
@media (max-width: 980px) { body.cm-body .doodle { display: none; } }
body.cm-body .down-link { margin-top: 28px; }

/* Quick converter and full converter */
body.cm-body .card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); }
body.cm-body .qc { padding: 24px; box-shadow: var(--offset); }
body.cm-body .qc-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 16px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
body.cm-body .status { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--quiet); }
body.cm-body .status .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--sage-ink); }
body.cm-body .lbl { display: block; margin-bottom: 6px; font-size: 13.5px; font-weight: 600; color: var(--quiet); }
body.cm-body .select { position: relative; }
body.cm-body .select::after { content: ""; position: absolute; right: 14px; top: 50%; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-70%) rotate(45deg); pointer-events: none; opacity: .8; }
body.cm-body .ctl { display: block; width: 100%; -webkit-appearance: none; appearance: none; background: transparent; border: 0; outline: none; cursor: pointer; }
body.cm-body .ctl-flat { height: 46px; padding: 0 36px 0 2px; border-bottom: 1px solid var(--line-strong); font-size: 18px; font-weight: 600; }
body.cm-body .ctl-flat:focus-visible { border-bottom-color: var(--terracotta); }
body.cm-body .ctl-mini { height: 34px; padding: 0 30px 0 0; font-size: 14.5px; font-weight: 600; color: var(--quiet); }
body.cm-body .pair { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: end; gap: 12px; margin-top: 20px; }
body.cm-body .box { min-width: 0; }
body.cm-body .box-in { padding: 10px 14px 6px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--paper); transition: border-color .15s, box-shadow .15s; }
body.cm-body .box-in:focus-within { border-color: var(--terracotta); box-shadow: 0 0 0 3px rgba(185, 87, 55, .14); }
body.cm-body .box-out .box-in { background: var(--sand); border-color: var(--line); }
body.cm-body .big-input { display: block; width: 100%; padding: 4px 0; border: 0; outline: none; background: transparent; font-family: var(--display); font-size: clamp(30px, 4vw, 38px); font-weight: 600; line-height: 1.15; font-variant-numeric: tabular-nums; }
body.cm-body .box-out .big-input { color: var(--sage-ink); cursor: copy; }
body.cm-body .swap { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 30px; border: 1px solid var(--line-strong); border-radius: 50%; background: var(--sand); color: var(--ink); transition: transform .3s, border-color .15s; }
body.cm-body .swap:hover { border-color: var(--terracotta); color: var(--terracotta); }
body.cm-body .swap .ic { transition: transform .35s ease; }
@media (max-width: 560px) {
  body.cm-body .pair { grid-template-columns: minmax(0, 1fr); }
  body.cm-body .swap { justify-self: center; margin: 0; }
  body.cm-body .swap .ic { transform: rotate(90deg); }
}
body.cm-body .result-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; padding: 10px 12px 10px 14px; border-radius: var(--r); background: var(--sand); font-size: 14.5px; font-variant-numeric: tabular-nums; }
body.cm-body .result-line span { min-width: 0; overflow-wrap: anywhere; }
body.cm-body .icon-btn { display: inline-grid; place-items: center; flex: none; width: 40px; height: 40px; border: 0; border-radius: 8px; background: transparent; color: var(--quiet); }
body.cm-body .icon-btn:hover { background: var(--paper); color: var(--ink); }
body.cm-body .qc-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-top: 16px; font-size: 14px; color: var(--quiet); }
body.cm-body .qc-foot .ok { display: inline-flex; align-items: center; gap: 6px; }

/* Category cards */
body.cm-body .group-label { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin-bottom: 16px; }
body.cm-body .group-label h3 { font-family: var(--body); font-size: 19px; font-weight: 700; letter-spacing: 0; }
body.cm-body .group-label span { font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--quiet); }
body.cm-body .cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 14px; }
body.cm-body .cat-card { position: relative; display: flex; flex-direction: column; gap: 6px; min-height: 168px; padding: 20px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); transition: border-color .15s, transform .15s, box-shadow .15s; }
body.cm-body .cat-card:hover { border-color: var(--terracotta-soft); transform: translateY(-2px); box-shadow: var(--pop); }
body.cm-body .cat-card .ic-main { color: var(--terracotta); margin-bottom: 14px; }
body.cm-body .cat-card .go { position: absolute; right: 16px; top: 18px; color: var(--quiet); transition: color .15s, transform .15s; }
body.cm-body .cat-card:hover .go { color: var(--terracotta); transform: translate(2px, -2px); }
body.cm-body .cat-card h3, body.cm-body .cat-card h4 { font-size: 27px; }
body.cm-body .cat-card p { max-width: 26ch; font-size: 14.5px; color: var(--quiet); }
body.cm-body .cat-card.compact { min-height: 0; padding: 18px; }
body.cm-body .cat-card.compact h3, body.cm-body .cat-card.compact h4 { font-size: 23px; }
body.cm-body .cat-card.compact .ic-main { margin-bottom: 8px; }
body.cm-body .promo { position: relative; display: flex; flex-direction: column; justify-content: space-between; min-height: 168px; padding: 20px; overflow: hidden; border-radius: var(--r); background: var(--peach); }
body.cm-body .promo p { position: relative; max-width: 11ch; font-family: var(--display); font-size: 27px; font-weight: 600; line-height: 1.1; color: var(--terracotta-deep); }
body.cm-body .promo .ticks { position: absolute; right: 18px; top: -10px; bottom: -10px; width: 44px; transform: rotate(12deg); background: repeating-linear-gradient(to bottom, var(--terracotta-soft) 0 1.5px, transparent 1.5px 9px); opacity: .9; -webkit-mask: linear-gradient(to left, #000 60%, transparent); mask: linear-gradient(to left, #000 60%, transparent); }
body.cm-body .promo .ticks::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 22px; background: repeating-linear-gradient(to bottom, var(--terracotta-soft) 0 1.5px, transparent 1.5px 45px); }
body.cm-body .promo a { position: relative; font-size: 14px; font-weight: 700; color: var(--terracotta-deep); }

/* Group rows */
body.cm-body .rows { margin-top: 26px; border-top: 1px solid var(--line); }
body.cm-body .row-link { display: grid; grid-template-columns: 40px minmax(0, 1.1fr) minmax(0, 1fr) 28px; align-items: center; gap: 16px; padding: 20px 8px; border-bottom: 1px solid var(--line); transition: background-color .15s; }
body.cm-body .row-link:hover { background: var(--sand); }
body.cm-body .row-link > .ic { color: var(--terracotta); }
body.cm-body .row-link .eyebrow { font-size: 11px; }
body.cm-body .row-link h3 { margin-top: 2px; font-size: clamp(24px, 2.6vw, 28px); }
body.cm-body .row-link p { font-size: 15px; color: var(--quiet); }
body.cm-body .row-link .go { justify-self: end; transition: transform .15s; }
body.cm-body .row-link:hover .go { transform: translate(2px, -2px); color: var(--terracotta); }
@media (max-width: 720px) { body.cm-body .row-link { grid-template-columns: 32px minmax(0, 1fr) 24px; } body.cm-body .row-link p { grid-column: 2; grid-row: 2; } body.cm-body .row-link .go { grid-row: 1; grid-column: 3; } }

/* Currency band */
body.cm-body .fx { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 32px; padding: clamp(24px, 4vw, 48px); border-radius: var(--r-lg); background: var(--sage); }
@media (max-width: 860px) { body.cm-body .fx { grid-template-columns: minmax(0, 1fr); } }
body.cm-body .fx h2 { margin-top: 10px; font-size: clamp(34px, 4.4vw, 48px); }
body.cm-body .fx .eyebrow { color: var(--sage-ink); }
body.cm-body .fx-text p.lead { margin-top: 12px; color: var(--ink); }
body.cm-body .fx-rates { margin-top: 22px; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 160px), 1fr)); gap: 8px; }
body.cm-body .fx-rate { padding: 10px 12px; border-radius: var(--r); background: rgba(255, 255, 255, .55); font-variant-numeric: tabular-nums; }
body.cm-body .fx-rate b { display: block; font-family: var(--display); font-size: 22px; font-weight: 600; }
body.cm-body .fx-rate span { font-size: 13px; color: var(--sage-ink); font-weight: 600; letter-spacing: .04em; }
body.cm-body .fx .card { padding: 22px; box-shadow: 8px 8px 0 #d3dbc8; }
body.cm-body .fx-meta { margin-top: 14px; font-size: 13.5px; color: var(--sage-ink); }

/* Journal */
body.cm-body .post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 28px 22px; }
body.cm-body .post-card { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
body.cm-body .tile { position: relative; display: flex; align-items: center; justify-content: center; gap: 12px; aspect-ratio: 2 / 1; max-width: 100%; border-radius: var(--r); font-family: var(--display); font-size: clamp(46px, 5.6vw, 64px); font-weight: 600; line-height: 1; overflow: hidden; transition: transform .2s; }
body.cm-body .post-card:hover .tile { transform: translateY(-3px); }
body.cm-body .tile .slash { width: 2px; height: .9em; background: currentColor; opacity: .25; transform: rotate(18deg); }
body.cm-body .tile-sage { background: var(--sage); color: var(--sage-ink); }
body.cm-body .tile-peach { background: var(--peach); color: var(--terracotta); }
body.cm-body .tile-stone { background: var(--stone); color: var(--stone-ink); }
body.cm-body .post-meta { display: flex; justify-content: space-between; gap: 12px; margin-top: 6px; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--terracotta); }
body.cm-body .post-meta span:last-child { color: var(--quiet); letter-spacing: .04em; font-weight: 600; text-transform: none; }
body.cm-body .post-card h3 { font-size: 27px; line-height: 1.12; }
body.cm-body .post-card p { font-size: 15.5px; color: var(--quiet); }
body.cm-body .post-card .text-link { margin-top: 2px; }
body.cm-body .post-featured { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 32px; align-items: center; padding-bottom: 40px; margin-bottom: 40px; border-bottom: 1px solid var(--line); }
body.cm-body .post-featured .tile { aspect-ratio: 16 / 9; font-size: clamp(56px, 8vw, 96px); }
body.cm-body .post-featured h2 { font-size: clamp(34px, 4vw, 46px); line-height: 1.05; }
@media (max-width: 820px) { body.cm-body .post-featured { grid-template-columns: minmax(0, 1fr); } }
body.cm-body .chips { display: flex; flex-wrap: wrap; gap: 8px; }
body.cm-body .chip { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--paper); font-size: 14.5px; font-weight: 600; transition: border-color .15s, background-color .15s, color .15s; }
body.cm-body .chip:hover { border-color: var(--ink); }
body.cm-body .chip[aria-pressed="true"], body.cm-body .chip.is-on { border-color: var(--ink); background: var(--ink); color: var(--cream); }

/* Newsletter band */
body.cm-body .news { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 340px); align-items: center; gap: 22px 28px; padding: clamp(24px, 4vw, 40px); border-radius: var(--r-lg); background: var(--peach); }
body.cm-body .news > .ic { color: var(--terracotta); }
body.cm-body .news h2 { margin-top: 8px; font-size: clamp(30px, 3.6vw, 38px); }
body.cm-body .news p.muted { margin-top: 6px; font-size: 15.5px; }
body.cm-body .news-form .field-row { display: flex; }
body.cm-body .news-form input[type="email"] { flex: 1; min-width: 0; height: 48px; padding: 0 14px; border: 1px solid var(--line-strong); border-right: 0; border-radius: var(--r) 0 0 var(--r); background: var(--paper); font-size: 15.5px; outline: none; }
body.cm-body .news-form input[type="email"]:focus { border-color: var(--terracotta); }
body.cm-body .news-form .send { display: grid; place-items: center; width: 52px; height: 48px; border: 0; border-radius: 0 var(--r) var(--r) 0; background: var(--terracotta); color: var(--cream); transition: background-color .15s; }
body.cm-body .news-form .send:hover { background: var(--terracotta-deep); }
body.cm-body .check { display: flex; align-items: flex-start; gap: 9px; margin-top: 10px; font-size: 13.5px; color: var(--quiet); cursor: pointer; }
body.cm-body .check input { width: 17px; height: 17px; margin: 2px 0 0; accent-color: var(--terracotta); flex: none; }
body.cm-body .form-msg { margin-top: 10px; font-size: 14px; font-weight: 500; }
body.cm-body .form-msg.is-error { color: #a2361b; }
body.cm-body .form-msg.is-info { color: var(--ink); }
@media (max-width: 860px) { body.cm-body .news { grid-template-columns: minmax(0, 1fr); } body.cm-body .news > .ic { display: none; } }

/* Page heads, breadcrumbs */
body.cm-body .page-head { padding-block: 48px 8px; }
body.cm-body .page-head h1 { margin-top: 12px; font-size: clamp(42px, 6vw, 66px); font-weight: 700; line-height: 1; }
body.cm-body .page-head .lead { margin-top: 16px; }
body.cm-body .crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 22px; font-size: 14px; color: var(--quiet); }
body.cm-body .crumbs a { text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
body.cm-body .crumbs a:hover { color: var(--terracotta); text-decoration-color: currentColor; }

/* Full converter page */
body.cm-body .conv-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: start; margin-top: 32px; }
@media (max-width: 960px) { body.cm-body .conv-layout { grid-template-columns: minmax(0, 1fr); } }
body.cm-body .conv { padding: clamp(20px, 3vw, 30px); box-shadow: var(--offset); }
body.cm-body .conv .pair { margin-top: 0; }
body.cm-body .conv-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-top: 18px; padding: 14px 16px; border-radius: var(--r); background: var(--sand); }
body.cm-body .conv-one { font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
body.cm-body .seg-mini { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--paper); }
body.cm-body .seg-mini span { padding: 0 8px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--quiet); }
body.cm-body .seg-mini button { min-width: 44px; height: 36px; padding: 0 10px; border: 0; border-radius: 7px; background: transparent; font-size: 14px; font-weight: 600; color: var(--quiet); }
body.cm-body .seg-mini button[aria-pressed="true"] { background: var(--ink); color: var(--cream); }
body.cm-body .warn { margin-top: 14px; padding: 10px 14px; border-radius: var(--r); background: var(--warn-bg); color: var(--warn-fg); font-size: 14.5px; font-weight: 500; }
body.cm-body .note-line { margin-top: 14px; font-size: 13.5px; color: var(--quiet); }
body.cm-body .note-line a { text-decoration: underline; text-underline-offset: 2px; }
body.cm-body .aside-block { padding: 20px; }
body.cm-body .aside-block + .aside-block { margin-top: 14px; }
body.cm-body .aside-block h2 { font-size: 22px; margin-bottom: 12px; }
body.cm-body .aside-list { display: grid; gap: 2px; }
body.cm-body .aside-list a, body.cm-body .aside-list button { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 44px; padding: 8px 10px; border: 0; border-radius: 8px; background: transparent; font-size: 15px; text-align: left; transition: background-color .15s; }
body.cm-body .aside-list a:hover, body.cm-body .aside-list button:hover, body.cm-body .aside-list button[aria-current="true"] { background: var(--sand); }
body.cm-body .aside-list small { color: var(--quiet); font-size: 13px; }
body.cm-body .unit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 8px; margin-top: 18px; }
body.cm-body .unit-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; min-height: 52px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--paper); text-align: left; font-size: 14.5px; transition: border-color .15s; }
body.cm-body .unit-row:hover { border-color: var(--terracotta-soft); }
body.cm-body .unit-row.is-on { border-color: var(--terracotta-soft); background: var(--peach); }
body.cm-body .unit-row .n { color: var(--quiet); }
body.cm-body .unit-row .v { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; overflow-wrap: anywhere; }
body.cm-body .unit-row .v small { font-weight: 500; color: var(--quiet); }

/* Search */
body.cm-body .search { position: relative; max-width: 640px; margin-top: 28px; }
body.cm-body .search-box { display: flex; align-items: center; gap: 10px; height: 56px; padding: 0 8px 0 16px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--paper); transition: border-color .15s, box-shadow .15s; }
body.cm-body .search-box:focus-within { border-color: var(--terracotta); box-shadow: 0 0 0 3px rgba(185, 87, 55, .14); }
body.cm-body .search-box .ic { color: var(--quiet); }
body.cm-body .search-box input { flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: transparent; font-size: 17px; }
body.cm-body .results { position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 30; max-height: 380px; overflow: auto; padding: 6px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--paper); box-shadow: var(--pop); }
body.cm-body .results button { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 54px; padding: 8px 10px; border: 0; border-radius: 8px; background: transparent; text-align: left; }
body.cm-body .results button:hover, body.cm-body .results button.is-hi { background: var(--sand); }
body.cm-body .results .ic { color: var(--terracotta); }
body.cm-body .results b { display: block; font-size: 15.5px; }
body.cm-body .results small { display: block; font-size: 13px; color: var(--quiet); }
body.cm-body .results .empty { padding: 16px; font-size: 14.5px; color: var(--quiet); }
body.cm-body .jump { margin-top: 22px; }
body.cm-body .group-sec { padding-top: 56px; scroll-margin-top: 96px; }
body.cm-body .group-sec .group-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 24px; margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
body.cm-body .group-sec h2 { font-size: clamp(28px, 3.4vw, 36px); }
body.cm-body .group-sec .group-head p { font-size: 15px; color: var(--quiet); }

/* Calculators */
body.cm-body .calc { padding: clamp(20px, 3vw, 32px); box-shadow: var(--offset); margin-top: 32px; }
body.cm-body .calc-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 24px; align-items: start; }
body.cm-body .fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 16px; }
body.cm-body .span { grid-column: 1 / -1; }
body.cm-body .f-label { display: block; margin: 0 0 6px; font-size: 14.5px; font-weight: 600; }
body.cm-body .f-hint { font-weight: 500; color: var(--quiet); }
body.cm-body .field { display: block; width: 100%; height: 48px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--paper); font-size: 16px; font-variant-numeric: tabular-nums; outline: none; -webkit-appearance: none; appearance: none; transition: border-color .15s, box-shadow .15s; }
body.cm-body .field:focus { border-color: var(--terracotta); box-shadow: 0 0 0 3px rgba(185, 87, 55, .14); }
body.cm-body select.field { padding-right: 38px; cursor: pointer; }
body.cm-body textarea.field { height: auto; min-height: 220px; padding: 12px 14px; line-height: 1.7; resize: vertical; }
body.cm-body .weight-pair { display: grid; grid-template-columns: minmax(0, 1fr) 104px; gap: 8px; }
body.cm-body .seg { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; padding: 4px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--sand); }
body.cm-body .seg label { position: relative; display: block; }
body.cm-body .seg input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
body.cm-body .seg span { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 44px; padding: 6px 8px; border-radius: 7px; font-size: 14.5px; font-weight: 600; color: var(--quiet); text-align: center; transition: background-color .15s, color .15s; }
body.cm-body .seg small { font-size: 12px; font-weight: 500; }
body.cm-body .seg input:checked + span { background: var(--paper); color: var(--ink); box-shadow: 0 1px 2px rgba(52, 51, 46, .1), 0 4px 10px -6px rgba(52, 51, 46, .35); }
body.cm-body .seg input:focus-visible + span { outline: 2px solid var(--terracotta); outline-offset: 1px; }
body.cm-body .result { padding: 22px; border-radius: var(--r-lg); background: var(--peach); }
body.cm-body .result .eyebrow { color: var(--terracotta-deep); }
body.cm-body .big { margin-top: 6px; font-family: var(--display); font-size: clamp(38px, 5vw, 54px); font-weight: 700; line-height: 1.02; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
body.cm-body .result .strong { margin-top: 6px; font-weight: 600; }
body.cm-body .result .body { margin-top: 12px; }
body.cm-body .tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
body.cm-body .t { min-width: 0; padding: 12px 14px; border-radius: var(--r); background: rgba(255, 255, 255, .7); }
body.cm-body .t i { display: block; font-style: normal; font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--quiet); }
body.cm-body .t b { display: block; font-family: var(--display); font-size: 26px; font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
body.cm-body .t span { display: block; margin-top: 2px; font-size: 13.5px; color: var(--quiet); }
body.cm-body .safety { margin-top: 16px; padding-left: 18px; list-style: disc; font-size: 14.5px; color: var(--quiet); }
body.cm-body .safety li + li { margin-top: 6px; }
body.cm-body .safety b { color: var(--ink); }
body.cm-body .lines { margin-top: 14px; }
body.cm-body .lines li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; padding: 9px 0; border-top: 1px solid rgba(185, 87, 55, .18); font-size: 15.5px; }
body.cm-body .lines li:first-child { border-top: 0; }
body.cm-body .lines b { font-variant-numeric: tabular-nums; }
body.cm-body .lines small { margin-left: auto; font-size: 12.5px; color: var(--quiet); }
body.cm-body .table-wrap { margin-top: 14px; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--paper); }
body.cm-body .tbl { width: 100%; min-width: 460px; border-collapse: collapse; font-size: 15px; }
body.cm-body .tbl th { padding: 11px 16px; background: var(--sand); text-align: left; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--quiet); }
body.cm-body .tbl td { padding: 11px 16px; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; }
body.cm-body .tbl td small { font-size: 12.5px; color: var(--quiet); }
body.cm-body .tbl tr.is-on td { background: var(--peach); font-weight: 600; }
body.cm-body .h3 { margin-top: 36px; font-size: 26px; }
body.cm-body .howto { margin-top: 24px; border-top: 1px solid var(--line); }
body.cm-body .howto summary { display: flex; align-items: center; justify-content: space-between; min-height: 52px; cursor: pointer; list-style: none; font-weight: 600; }
body.cm-body .howto summary::-webkit-details-marker { display: none; }
body.cm-body .howto summary::after { content: "+"; font-size: 22px; font-weight: 500; color: var(--terracotta); }
body.cm-body .howto[open] summary::after { content: "–"; }
body.cm-body .howto .howto-body { display: grid; gap: 10px; max-width: 72ch; padding-bottom: 16px; font-size: 15.5px; color: var(--quiet); }
body.cm-body .howto ul { list-style: disc; padding-left: 18px; }
body.cm-body .howto a, body.cm-body .prose a { color: var(--terracotta-deep); text-decoration: underline; text-underline-offset: 2px; }
body.cm-body .btn-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

/* Article */
body.cm-body .article { max-width: 720px; margin: 0 auto; }
body.cm-body .article .tile { aspect-ratio: 21 / 9; margin-top: 32px; font-size: clamp(56px, 9vw, 104px); }
body.cm-body .article h1 { margin-top: 14px; font-size: clamp(40px, 6vw, 62px); font-weight: 700; line-height: 1.02; }
body.cm-body .prose { display: grid; gap: 18px; margin-top: 32px; font-size: 18px; line-height: 1.7; }
body.cm-body .prose h2 { margin-top: 14px; font-size: 30px; }
body.cm-body .prose ul { display: grid; gap: 6px; padding-left: 20px; list-style: disc; }
body.cm-body .prose .tbl { min-width: 320px; font-size: 16px; }
body.cm-body .cta-box { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; margin-top: 36px; padding: 22px 24px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--paper); box-shadow: var(--offset); }
body.cm-body .cta-box h2 { font-size: 26px; }

/* Contact */
body.cm-body .contact-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 28px; align-items: start; margin-top: 32px; }
@media (max-width: 880px) { body.cm-body .contact-grid { grid-template-columns: minmax(0, 1fr); } }
body.cm-body .form-card { display: grid; gap: 18px; padding: clamp(20px, 3vw, 32px); box-shadow: var(--offset); }
body.cm-body .form-card .two { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 18px; }
body.cm-body .field.is-bad { border-color: #a2361b; }
body.cm-body .err { margin-top: 6px; font-size: 13.5px; color: #a2361b; }
body.cm-body .tips { display: grid; gap: 14px; }
body.cm-body .tip { padding: 20px; border-radius: var(--r-lg); background: var(--sand); }
body.cm-body .tip h2 { font-size: 23px; }
body.cm-body .tip p { margin-top: 6px; font-size: 15.5px; color: var(--quiet); }
body.cm-body .tip.peach { background: var(--peach); }
body.cm-body .tip.sage { background: var(--sage); }

/* Footer */
body.cm-body .site-footer { margin-top: 96px; }
body.cm-body .site-footer .top { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 28px; padding-block: 40px 32px; border-top: 1px solid var(--line); }
@media (max-width: 820px) { body.cm-body .site-footer .top { grid-template-columns: repeat(2, minmax(0, 1fr)); } body.cm-body .site-footer .about { grid-column: 1 / -1; } }
body.cm-body .site-footer .about p { margin-top: 12px; font-size: 15.5px; color: var(--quiet); }
body.cm-body .site-footer h2 { font-family: var(--body); font-size: 12.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--quiet); }
body.cm-body .site-footer ul { display: grid; gap: 2px; margin-top: 10px; }
body.cm-body .site-footer ul a { display: inline-flex; min-height: 36px; align-items: center; font-size: 15.5px; }
body.cm-body .site-footer ul a:hover { color: var(--terracotta); }
body.cm-body .site-footer .bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-block: 18px 32px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--quiet); }

body.cm-body .toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); z-index: 70; padding: 10px 16px; border-radius: 999px; background: var(--ink); color: var(--cream); font-size: 14.5px; font-weight: 600; opacity: 0; pointer-events: none; transform: translate(-50%, 10px); transition: opacity .2s, transform .2s; }
body.cm-body .toast.is-on { opacity: 1; transform: translate(-50%, 0); }
body.cm-body .notfound { padding-block: 80px 0; text-align: center; }
body.cm-body .notfound h1 { font-size: clamp(44px, 7vw, 72px); }
body.cm-body .notfound p { margin: 14px auto 24px; max-width: 46ch; color: var(--quiet); }

/* ---- WordPress additions ---- */
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/barlow-condensed-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/barlow-condensed-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 200 900; font-display: swap; src: url("fonts/source-sans-3-latin-wght-normal.woff2") format("woff2"); }

body.cm-body.admin-bar::before { height: 0; }
body.cm-body.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { body.cm-body.admin-bar .site-header { top: 46px; } }
@media (max-width: 600px) { body.cm-body.admin-bar .site-header { top: 0; } }
body.cm-body .skip-link { position: absolute; left: 12px; top: -60px; z-index: 80; padding: 10px 14px; border-radius: 8px; background: var(--ink); color: var(--cream); font-weight: 600; }
body.cm-body .skip-link:focus { top: 12px; }
body.cm-body .hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
body.cm-body .main { display: block; outline: none; }
body.cm-body .notfound .eyebrow { justify-content: center; }

/* Guide text under each converter */
body.cm-body .guide { max-width: 820px; }
body.cm-body .guide h2 { font-size: clamp(28px, 3.4vw, 36px); }
body.cm-body .guide h3 { margin-top: 30px; font-size: 25px; }
body.cm-body .guide p { margin-top: 10px; font-size: 17px; color: var(--quiet); }
body.cm-body .guide p strong { color: var(--ink); }
body.cm-body .guide .table-wrap { max-width: 460px; }
body.cm-body .guide .tbl { min-width: 0; }

/* Article and WordPress content */
body.cm-body .prose > * { margin: 0; }
body.cm-body .prose h3 { margin-top: 8px; font-size: 24px; }
body.cm-body .prose ol { display: grid; gap: 6px; padding-left: 22px; list-style: decimal; }
body.cm-body .prose img, body.cm-body .prose video { height: auto; border-radius: var(--r); }
body.cm-body .prose figure { margin: 0; }
body.cm-body .prose figcaption { margin-top: 8px; font-size: 14px; color: var(--quiet); }
body.cm-body .prose blockquote { padding-left: 18px; border-left: 3px solid var(--terracotta-soft); font-style: italic; color: var(--quiet); }
body.cm-body .prose code { padding: 1px 6px; border-radius: 6px; background: var(--sand); font-size: .92em; }
body.cm-body .prose hr { border: 0; border-top: 1px solid var(--line); }
body.cm-body .prose .wp-block-table { overflow-x: auto; }
body.cm-body .prose .wp-block-table table, body.cm-body .prose table:not(.tbl) { width: 100%; border-collapse: collapse; font-size: 16px; }
body.cm-body .prose .wp-block-table th, body.cm-body .prose .wp-block-table td, body.cm-body .prose table:not(.tbl) th, body.cm-body .prose table:not(.tbl) td { padding: 10px 14px; border: 1px solid var(--line); text-align: left; }
body.cm-body .prose .wp-block-table thead, body.cm-body .prose table:not(.tbl) thead { background: var(--sand); }
body.cm-body .prose .wp-block-button__link, body.cm-body .prose .wp-element-button { display: inline-flex; align-items: center; min-height: 46px; padding: 0 18px; border-radius: var(--r); background: var(--terracotta); color: var(--cream); font-weight: 600; text-decoration: none; }
body.cm-body .prose .alignwide, body.cm-body .prose .alignfull { width: 100%; }
body.cm-body .prose .table-wrap .tbl { min-width: 320px; }
body.cm-body .post-date { color: var(--quiet); }
body.cm-body .tile-img { padding: 0; background: var(--sand); }
body.cm-body .tile-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
body.cm-body .chips a.chip { text-decoration: none; }
body.cm-body .chip.is-on { border-color: var(--ink); background: var(--ink); color: var(--cream); }
body.cm-body .pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 40px; }
body.cm-body .pager .page-numbers { display: inline-grid; place-items: center; min-width: 44px; height: 44px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--paper); font-weight: 600; }
body.cm-body .pager .page-numbers.current { border-color: var(--ink); background: var(--ink); color: var(--cream); }
body.cm-body .pager a.page-numbers:hover { border-color: var(--ink); }
body.cm-body .empty-note { padding: 28px; border: 1px dashed var(--line-strong); border-radius: var(--r-lg); color: var(--quiet); text-align: center; }

/* Fallback fonts sized to match the web fonts, so text doesn't jump when they finish loading */
@font-face { font-family: "Barlow Condensed Fallback"; font-weight: 500 800; size-adjust: 75%; src: local("Arial Bold"), local("Arial-BoldMT"), local("Roboto Bold"), local("Roboto-Bold"), local("Helvetica Bold"), local("Liberation Sans Bold"); }
@font-face { font-family: "Source Sans 3 Fallback"; font-weight: 200 500; size-adjust: 93%; src: local("Arial"), local("ArialMT"), local("Roboto"), local("Roboto-Regular"), local("Helvetica"), local("Liberation Sans"); }
@font-face { font-family: "Source Sans 3 Fallback"; font-weight: 600 900; size-adjust: 90%; src: local("Arial Bold"), local("Arial-BoldMT"), local("Roboto Bold"), local("Roboto-Bold"), local("Helvetica Bold"), local("Liberation Sans Bold"); }
:root {
  --display: "Barlow Condensed", "Barlow Condensed Fallback", "Arial Narrow", sans-serif;
  --body: "Source Sans 3", "Source Sans 3 Fallback", system-ui, sans-serif;
  /* Text colours that meet the 4.5:1 contrast guideline on every background used */
  --quiet: #625f56;
  --terracotta-ink: #ad5032;
}
body.cm-body .eyebrow, body.cm-body .post-meta, body.cm-body .nav a:hover, body.cm-body .nav a[aria-current="page"], body.cm-body .mobile-nav a[aria-current="page"], body.cm-body .crumbs a:hover { color: var(--terracotta-ink); }
body.cm-body .news .eyebrow, body.cm-body .tip .eyebrow, body.cm-body .promo .eyebrow { color: var(--terracotta-deep); }
body.cm-body .btn-primary, body.cm-body .news-form .send { border-color: var(--terracotta-ink); background: var(--terracotta-ink); }
body.cm-body .btn-primary:hover, body.cm-body .news-form .send:hover { border-color: var(--terracotta-deep); background: var(--terracotta-deep); }

/* Uploaded logo in the header */
body.cm-body .brand-has-logo { gap: 0; }
body.cm-body .brand-logo { display: block; width: auto; height: 44px; max-width: 70vw; }
@media (max-width: 640px) { body.cm-body .brand-logo { height: 36px; } }
