@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@500;600;700;800&display=swap');

:root {
  --navy: #0d2863;
  --blue: #143b91;
  --blue-light: #3d6bd8;
  --ink: #111936;
  --muted: #68718a;
  --paper: #f6f7fb;
  --white: #ffffff;
  --line: #dde2ef;
  --green: #28b488;
  --yellow: #f4ca4d;
  --orange: #f28b55;
  --red: #e75b72;
  --violet: #765ad6;
  --shadow: 0 18px 55px rgba(15, 37, 86, .13);
  --radius-lg: 28px;
  --radius-md: 18px;
  --page: min(1180px, calc(100% - 40px));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: "DM Sans", system-ui, sans-serif; line-height: 1.6; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { color: inherit; }
svg { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 16px; top: -100px; z-index: 1000; padding: 10px 14px; border-radius: 8px; background: white; color: var(--navy); box-shadow: var(--shadow); }
.skip-link:focus { top: 16px; }

.site-header { position: relative; z-index: 20; color: white; }
.site-header--hero, .site-header--solid { background: var(--navy); }
.nav-wrap { width: var(--page); height: 78px; margin: auto; display: flex; align-items: center; gap: 48px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: "Manrope", sans-serif; font-size: 22px; font-weight: 800; letter-spacing: -.8px; }
.brand-mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px 9px 9px 3px; color: var(--navy); background: var(--yellow); font-size: 18px; box-shadow: inset -4px -4px 0 rgba(255,255,255,.22); }
.main-nav { display: flex; align-items: center; gap: 32px; margin-left: auto; }
.main-nav a { color: rgba(255,255,255,.76); font-size: 14px; font-weight: 600; }
.main-nav a:hover, .main-nav a:focus-visible { color: white; }
.nav-search-button { display: inline-flex; align-items: center; gap: 8px; border: 1px solid rgba(255,255,255,.25); border-radius: 999px; padding: 8px 14px; color: white; background: rgba(255,255,255,.08); cursor: pointer; }
.nav-search-button svg { width: 17px; }

.hero { position: relative; min-height: 600px; padding: 80px 0 140px; overflow: hidden; color: white; background: linear-gradient(145deg, #0d2863 0%, #1748a6 62%, #3c67cf 100%); }
.hero::after { content: ""; position: absolute; inset: auto 0 0; height: 90px; background: var(--paper); clip-path: polygon(0 78%, 66% 18%, 100% 62%, 100% 100%, 0 100%); }
.hero-shape { position: absolute; opacity: .18; background: white; }
.hero-shape--one { width: 500px; height: 500px; right: -80px; top: -70px; clip-path: polygon(48% 0, 100% 25%, 82% 83%, 22% 100%, 0 38%); }
.hero-shape--two { width: 390px; height: 330px; left: -110px; bottom: 10px; opacity: .08; clip-path: polygon(8% 0, 100% 16%, 72% 100%, 0 76%); }
.hero-inner { position: relative; z-index: 2; width: min(820px, calc(100% - 40px)); margin: auto; text-align: center; }
.hero-inner--with-ad { width: var(--page); display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 52px; align-items: center; text-align: left; }
.hero-copy-column { min-width: 0; }
.hero-inner--with-ad .hero-copy { margin-left: 0; }
.hero-inner--with-ad .quick-links { justify-content: flex-start; }
.eyebrow { margin: 0 0 12px; color: #bcd0ff; font-size: 12px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }
.eyebrow--dark { color: var(--blue-light); }
.hero h1 { margin: 0; font-family: "Manrope", sans-serif; font-size: clamp(48px, 7vw, 84px); line-height: 1.03; letter-spacing: -.055em; }
.hero h1 span { color: var(--yellow); }
.hero-copy { max-width: 610px; margin: 22px auto 30px; color: #cfdbf9; font-size: 18px; }
.search-shell { position: relative; display: flex; align-items: center; max-width: 720px; height: 68px; margin: auto; padding: 0 20px; border: 1px solid rgba(255,255,255,.4); border-radius: 15px; background: white; box-shadow: 0 25px 60px rgba(6,22,60,.28); }
.search-shell:focus-within { outline: 4px solid rgba(244,202,77,.26); }
.search-icon { width: 24px; color: #6a7289; }
.search-shell input { width: 100%; height: 100%; border: 0; outline: 0; padding: 0 16px; color: var(--ink); background: transparent; font-size: 17px; }
.search-shell kbd { padding: 2px 8px; border: 1px solid #d9deea; border-radius: 6px; color: #8790a4; background: #f6f7fa; font-size: 13px; box-shadow: 0 1px 0 #ccd2df; }
.search-results { position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 10; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; text-align: left; background: white; box-shadow: var(--shadow); }
.search-results a, .search-results span { display: flex; justify-content: space-between; padding: 13px 18px; color: var(--ink); }
.search-results a:hover, .search-results a:focus-visible { background: #f1f5ff; }
.search-results small { color: var(--muted); }
.quick-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 18px; color: #b9caed; font-size: 13px; }
.quick-links a, .quick-links button { border: 0; padding: 0; color: white; background: none; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

.ad-slot { position: relative; z-index: 3; display: flex; flex-direction: column; align-items: center; justify-content: center; overflow: hidden; }
.ad-label { display: block; margin-bottom: 6px; color: #8a93a8; font-size: 9px; font-weight: 700; letter-spacing: .13em; line-height: 1; text-transform: uppercase; }
.ad-canvas { display: grid; place-items: center; overflow: hidden; }
.ad-slot--rectangle { width: 320px; min-height: 282px; padding: 10px; border: 1px solid rgba(255,255,255,.18); border-radius: 18px; background: rgba(255,255,255,.09); box-shadow: 0 20px 50px rgba(5,19,51,.2); }
.ad-slot--rectangle .ad-label { color: rgba(255,255,255,.6); }
.ad-canvas--300x250 { width: 300px; height: 250px; background: rgba(255,255,255,.06); }
.home-native-ad { width: 100%; min-height: 112px; margin: 34px auto 0; padding: 12px 18px; border: 1px solid var(--line); border-radius: 16px; background: white; }
.ad-canvas--native { width: 100%; min-height: 78px; }
.page-ad-band { width: 100%; min-height: 78px; display: flex; justify-content: center; margin: 18px auto 0; }
.ad-slot--banner { width: min(100%, 380px); min-height: 72px; padding: 8px 16px 12px; border: 1px solid var(--line); border-radius: 13px; background: white; }
.ad-canvas--320x50 { width: 320px; max-width: 100%; height: 50px; }

.category-section, .popular-section, .related-section { width: var(--page); margin: 0 auto; padding: 84px 0; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 40px; margin-bottom: 34px; }
.section-heading h2, .about-section h2, .related-section h2 { margin: 0; font-family: "Manrope", sans-serif; font-size: clamp(30px, 4vw, 46px); line-height: 1.15; letter-spacing: -.04em; }
.section-heading > p { max-width: 440px; margin: 0 0 5px; color: var(--muted); }
.category-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.category-card { min-height: 104px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--white); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.category-card:hover { transform: translateY(-4px); border-color: #b8c6e8; box-shadow: 0 16px 36px rgba(16,43,105,.1); }
.category-card > svg { width: 19px; color: #9ba4b8; }
.category-icon { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 14px; font-family: "Manrope", sans-serif; font-size: 22px; font-weight: 800; }
.category-card strong, .category-card small { display: block; }
.category-card strong { margin-bottom: 2px; font-family: "Manrope", sans-serif; font-size: 15px; }
.category-card small { color: var(--muted); font-size: 12px; }
.icon-health { color: #a83e5f; background: #ffe7ee; }.icon-finance { color: #1c795e; background: #dff8ed; }.icon-math { color: #5340a8; background: #ebe6ff; }.icon-physics { color: #1f639e; background: #e0f2ff; }.icon-conversion { color: #956211; background: #fff3ce; }.icon-construction { color: #9c4e2b; background: #ffeadc; }.icon-chemistry { color: #3c579c; background: #e3eaff; }.icon-biology { color: #397a3f; background: #e4f4df; }.icon-food { color: #a64539; background: #ffe6df; }.icon-sports { color: #177082; background: #ddf4f7; }.icon-statistics { color: #6f4a9b; background: #f1e5fc; }.icon-life { color: #967119; background: #fff1bd; }

.popular-section { padding-top: 56px; }
.section-heading--compact { align-items: center; }
.text-link { border: 0; padding: 8px 0; color: var(--blue); background: none; font-weight: 700; cursor: pointer; }
.popular-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.popular-card { position: relative; min-height: 230px; display: flex; flex-direction: column; justify-content: space-between; padding: 28px; overflow: hidden; border: 1px solid var(--line); border-radius: 24px; background: white; }
.popular-card::after { content: ""; position: absolute; width: 170px; height: 170px; right: -75px; bottom: -75px; border-radius: 50%; background: #f0f3fa; transition: transform .3s ease; }
.popular-card:hover::after { transform: scale(1.15); }
.popular-card--featured { color: white; border-color: var(--blue); background: var(--blue); }
.popular-card--featured::after { background: rgba(255,255,255,.1); }
.pill { align-self: flex-start; padding: 5px 10px; border-radius: 999px; color: #9c3756; background: #ffe4ec; font-size: 11px; font-weight: 700; }
.pill--blue { color: #235587; background: #e4f1ff; }.pill--violet { color: #5945a0; background: #ebe6ff; }.pill--orange { color: #98552f; background: #ffeadf; }
.popular-card h3 { margin: 28px 0 6px; font-family: "Manrope", sans-serif; font-size: 25px; letter-spacing: -.03em; }
.popular-card p { max-width: 370px; margin: 0; color: var(--muted); }
.popular-card--featured p { color: #cbd8f6; }
.circle-arrow { position: absolute; right: 24px; bottom: 24px; z-index: 1; width: 43px; height: 43px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: white; }
.popular-card--featured .circle-arrow { color: white; border-color: rgba(255,255,255,.3); background: rgba(255,255,255,.08); }

.about-section { display: grid; grid-template-columns: 1.3fr 1fr; gap: 80px; align-items: center; margin-top: 70px; padding: 100px max(20px, calc((100vw - 1180px)/2)); color: white; background: #0e2352; }
.about-copy > p:not(.eyebrow) { max-width: 650px; color: #c0cce8; font-size: 17px; }
.light-button { display: inline-flex; gap: 14px; align-items: center; margin-top: 14px; padding: 13px 18px; border-radius: 12px; color: var(--navy); background: var(--yellow); font-weight: 700; }
.number-stack { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.number-stack div { padding: 24px; border: 1px solid rgba(255,255,255,.15); border-radius: 18px; background: rgba(255,255,255,.06); }
.number-stack div:first-child { grid-column: span 2; }
.number-stack strong, .number-stack span { display: block; }
.number-stack strong { font-family: "Manrope", sans-serif; font-size: 38px; }
.number-stack span { color: #aebddb; font-size: 13px; }

.site-footer { padding: 58px max(20px, calc((100vw - 1180px)/2)) 24px; color: #b7c1d9; background: #081a40; }
.footer-top { display: flex; justify-content: space-between; align-items: center; padding-bottom: 36px; border-bottom: 1px solid rgba(255,255,255,.12); }
.footer-top p { margin: 0; }
.brand--footer { color: white; }
.footer-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 36px; padding: 42px 0; }
.footer-grid h2 { margin: 0 0 15px; color: white; font-size: 13px; }
.footer-grid a { display: block; margin: 8px 0; font-size: 13px; }
.footer-grid a:hover { color: white; }
.footer-note p { margin: 0; font-size: 13px; }
.footer-bottom { display: flex; justify-content: space-between; gap: 24px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.12); font-size: 12px; }

/* Calculator page */
.calculator-page { min-height: 80vh; }
.breadcrumbs { width: var(--page); display: flex; gap: 9px; align-items: center; margin: 24px auto 0; color: var(--muted); font-size: 12px; }
.breadcrumbs a:hover { color: var(--blue); }
.calculator-hero { width: var(--page); display: grid; grid-template-columns: .8fr 1.2fr; gap: 76px; align-items: start; padding: 72px 0 100px; }
.calculator-intro { position: sticky; top: 30px; padding-top: 24px; }
.category-kicker { display: inline-flex; gap: 8px; align-items: center; padding: 7px 11px; border-radius: 999px; color: #a43b5c; background: #ffe5ed; font-size: 12px; font-weight: 700; }
.calculator-intro h1 { margin: 24px 0 16px; font-family: "Manrope", sans-serif; font-size: clamp(46px, 6vw, 70px); line-height: 1.03; letter-spacing: -.055em; }
.calculator-intro > p { max-width: 440px; color: var(--muted); font-size: 18px; }
.trust-row { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 28px; color: #697189; font-size: 11px; font-weight: 700; }
.trust-row span::before { content: "✓"; margin-right: 6px; color: var(--green); }
.calculator-card { padding: 30px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: white; box-shadow: var(--shadow); }
.calculator-card__top { display: flex; justify-content: space-between; align-items: start; gap: 20px; margin-bottom: 27px; }
.card-eyebrow { margin: 0; color: var(--blue-light); font-size: 11px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.calculator-card h2 { margin: 4px 0 0; font-family: "Manrope", sans-serif; font-size: 26px; letter-spacing: -.03em; }
.unit-toggle { display: flex; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: #f5f6fa; }
.unit-toggle button { border: 0; border-radius: 7px; padding: 7px 11px; color: var(--muted); background: transparent; cursor: pointer; font-size: 12px; font-weight: 700; }
.unit-toggle button.is-active { color: var(--blue); background: white; box-shadow: 0 2px 7px rgba(15,37,86,.12); }
.form-row { display: grid; grid-template-columns: repeat(2,1fr); gap: 15px; }
.form-row:has(.field--inches:not([hidden])) { grid-template-columns: repeat(3, 1fr); }
.field label { display: block; margin: 0 0 7px; color: #505971; font-size: 12px; font-weight: 700; }
.input-wrap { height: 52px; display: flex; align-items: center; border: 1px solid #cfd5e3; border-radius: 11px; background: #fbfcfe; }
.input-wrap:focus-within { border-color: var(--blue-light); box-shadow: 0 0 0 3px rgba(61,107,216,.12); }
.input-wrap input { min-width: 0; flex: 1; height: 100%; border: 0; outline: 0; padding: 0 12px; background: transparent; font-weight: 700; }
.input-wrap span { padding: 0 12px; border-left: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.form-error { margin: 10px 0 0; color: #bc3d55; font-size: 12px; }
.result-panel { margin-top: 22px; padding: 24px; border-radius: 18px; background: #eef3ff; }
.result-main { display: flex; align-items: center; gap: 12px; }
.result-main > span:first-child { margin-right: auto; color: var(--muted); font-size: 12px; font-weight: 700; }
.result-main > strong { font-family: "Manrope", sans-serif; font-size: 42px; line-height: 1; }
.result-badge { padding: 4px 9px; border-radius: 999px; color: #14694f; background: #d4f5e9; font-size: 11px; font-weight: 700; }
.result-details { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 22px; padding-top: 18px; border-top: 1px solid #d4ddef; }
.result-details span, .result-details strong { display: block; }
.result-details span { color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.result-details strong { margin-top: 2px; font-size: 14px; }
.bmi-scale { margin-top: 23px; }
.scale-bar { position: relative; display: grid; grid-template-columns: 1fr 1.3fr .9fr 1.2fr; height: 8px; gap: 3px; }
.scale-bar span { border-radius: 3px; }.scale-bar span:nth-child(1){background:#65a9dc}.scale-bar span:nth-child(2){background:#42ba8c}.scale-bar span:nth-child(3){background:#e6c34c}.scale-bar span:nth-child(4){background:#df6677}
.scale-bar i { position: absolute; top: -5px; width: 3px; height: 18px; border-radius: 4px; background: var(--ink); transform: translateX(-50%); transition: left .25s ease; }
.scale-labels { display: grid; grid-template-columns: 1fr 1.3fr .9fr 1.2fr; gap: 3px; margin-top: 7px; color: var(--muted); font-size: 9px; text-align: center; }
.calculator-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.primary-button, .secondary-button { border-radius: 10px; padding: 10px 16px; cursor: pointer; font-size: 12px; font-weight: 700; }
.primary-button { border: 1px solid var(--blue); color: white; background: var(--blue); }.secondary-button { border: 1px solid var(--line); background: white; }
.privacy-note { margin: 13px 0 0; color: #9299aa; text-align: right; font-size: 10px; }

.article-layout { width: var(--page); display: grid; grid-template-columns: 220px minmax(0, 760px); gap: 70px; align-items: start; padding: 92px 0; border-top: 1px solid var(--line); }
.article-toc { position: sticky; top: 24px; display: flex; flex-direction: column; gap: 10px; padding-left: 17px; border-left: 2px solid #dfe4ef; }
.article-toc p { margin: 0 0 3px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; }
.article-toc a { color: var(--muted); font-size: 13px; }
.article-toc a:hover { color: var(--blue); }
.calculator-article section { padding: 0 0 72px; }
.calculator-article h2 { margin: 0 0 20px; font-family: "Manrope", sans-serif; font-size: 36px; line-height: 1.2; letter-spacing: -.04em; }
.calculator-article p { color: #4e586f; font-size: 16px; }
.info-callout { margin-top: 28px; padding: 20px 22px; border-left: 4px solid var(--green); border-radius: 0 12px 12px 0; background: #e9f8f3; }
.info-callout p { margin: 4px 0 0; font-size: 14px; }
.formula-box { max-width: 420px; display: flex; align-items: center; gap: 18px; margin: 28px 0; padding: 23px; border: 1px solid #cfd8ef; border-radius: 14px; color: var(--blue); background: #f2f5ff; font-family: "Manrope", sans-serif; font-size: 21px; font-weight: 800; }
.fraction { display: flex; flex-direction: column; text-align: center; font-size: 14px; }.fraction i { padding: 3px 8px; font-style: normal; }.fraction i:first-child { border-bottom: 2px solid currentColor; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: white; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 15px 17px; border-bottom: 1px solid var(--line); text-align: left; }
th { color: var(--muted); background: #f7f8fb; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
tbody tr:last-child td { border-bottom: 0; }
.table-dot { display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; }.table-dot--blue{background:#65a9dc}.table-dot--green{background:#42ba8c}.table-dot--yellow{background:#e6c34c}.table-dot--red{background:#df6677}
.medical-note { display: flex; gap: 13px; margin-top: 25px; padding: 18px; border: 1px solid #f0d592; border-radius: 12px; background: #fff8e7; }
.medical-note > span { flex: 0 0 23px; height: 23px; display: grid; place-items: center; border-radius: 50%; color: #81590d; background: #f6d77d; font-size: 12px; font-weight: 800; }
.medical-note p { margin: 0; font-size: 13px; }
.faq-section details { border-top: 1px solid var(--line); }
.faq-section details:last-child { border-bottom: 1px solid var(--line); }
.faq-section summary { display: flex; justify-content: space-between; gap: 20px; padding: 18px 0; cursor: pointer; font-weight: 700; list-style: none; }
.faq-section summary::-webkit-details-marker { display: none; }
.faq-section details[open] summary span { transform: rotate(45deg); }
.faq-section details p { margin: -4px 0 18px; }
.related-section { border-top: 1px solid var(--line); }
.related-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 15px; margin-top: 30px; }
.related-grid > * { padding: 24px; border: 1px solid var(--line); border-radius: 18px; background: white; }
.related-grid > * > span { color: var(--blue-light); font-size: 11px; font-weight: 800; }
.related-grid h3 { margin: 24px 0 6px; font-family: "Manrope", sans-serif; font-size: 20px; }.related-grid p { margin: 0; color: var(--muted); font-size: 13px; }
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 50; transform: translate(-50%, 100px); padding: 11px 16px; border-radius: 10px; color: white; background: var(--ink); box-shadow: var(--shadow); font-size: 12px; opacity: 0; transition: .25s ease; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* Shared calculator pages */
.tools-directory-hero { padding: 76px 0 86px; color: white; background: linear-gradient(145deg, var(--navy), #2859bd); }
.tools-directory-hero > div { width: var(--page); margin: auto; }
.tools-directory-hero h1 { max-width: 760px; margin: 0; font-family: "Manrope", sans-serif; font-size: clamp(46px, 7vw, 72px); line-height: 1.04; letter-spacing: -.055em; }
.tools-directory-hero p:not(.eyebrow) { max-width: 620px; margin: 20px 0 0; color: #ccd9f8; font-size: 18px; }
.tool-directory { width: var(--page); padding: 76px 0 96px; margin: auto; }
.tool-directory__heading { display: flex; justify-content: space-between; align-items: end; gap: 30px; margin-bottom: 30px; }
.tool-directory__heading h2 { margin: 0; font-family: "Manrope", sans-serif; font-size: 38px; letter-spacing: -.04em; }
.tool-directory__heading p { max-width: 430px; margin: 0; color: var(--muted); }
.tool-list-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.tool-list-card { min-height: 220px; display: flex; flex-direction: column; padding: 24px; border: 1px solid var(--line); border-radius: 21px; background: white; transition: transform .2s ease, box-shadow .2s ease; }
.tool-list-card:hover { transform: translateY(-4px); box-shadow: 0 16px 38px rgba(16,43,105,.1); }
.tool-list-card .category-icon { margin-bottom: 28px; }
.tool-list-card h3 { margin: 0 0 7px; font-family: "Manrope", sans-serif; font-size: 21px; letter-spacing: -.03em; }
.tool-list-card p { margin: 0; color: var(--muted); font-size: 13px; }
.tool-list-card > span:last-child { margin-top: auto; padding-top: 18px; color: var(--blue); font-size: 12px; font-weight: 800; }

.tool-page { min-height: 80vh; }
.simple-tool-hero { width: var(--page); display: grid; grid-template-columns: .82fr 1.18fr; gap: 70px; align-items: start; margin: 0 auto; padding: 64px 0 84px; }
.simple-tool-intro { padding-top: 18px; }
.simple-tool-intro h1 { margin: 20px 0 16px; font-family: "Manrope", sans-serif; font-size: clamp(44px, 6vw, 68px); line-height: 1.04; letter-spacing: -.055em; }
.simple-tool-intro > p { max-width: 460px; color: var(--muted); font-size: 17px; }
.simple-tool-points { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 24px; }
.simple-tool-points span { padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; color: #616b82; background: white; font-size: 10px; font-weight: 700; }
.simple-calculator-card { padding: 30px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: white; box-shadow: var(--shadow); }
.simple-calculator-card__heading { margin-bottom: 22px; }
.simple-calculator-card__heading p { margin: 0; color: var(--blue-light); font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.simple-calculator-card__heading h2 { margin: 4px 0 0; font-family: "Manrope", sans-serif; font-size: 25px; letter-spacing: -.03em; }
.tool-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.tool-field--wide { grid-column: span 2; }
.tool-field label { display: block; margin: 0 0 7px; color: #505971; font-size: 12px; font-weight: 700; }
.tool-input-wrap { min-height: 52px; display: flex; align-items: center; border: 1px solid #cfd5e3; border-radius: 11px; background: #fbfcfe; }
.tool-input-wrap:focus-within { border-color: var(--blue-light); box-shadow: 0 0 0 3px rgba(61,107,216,.12); }
.tool-input-wrap input, .tool-input-wrap select { width: 100%; min-width: 0; height: 50px; border: 0; outline: 0; padding: 0 12px; color: var(--ink); background: transparent; font-weight: 700; }
.tool-input-wrap select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, #758097 50%), linear-gradient(135deg, #758097 50%, transparent 50%); background-position: calc(100% - 16px) 22px, calc(100% - 11px) 22px; background-size: 5px 5px; background-repeat: no-repeat; }
.tool-input-wrap span { padding: 0 12px; border-left: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.tool-error { margin: 12px 0 0; color: #bc3d55; font-size: 12px; }
.tool-result { margin-top: 22px; padding: 24px; border-radius: 18px; background: #eef3ff; }
.tool-result__label, .tool-result__value { display: block; }
.tool-result__label { color: var(--muted); font-size: 11px; font-weight: 700; }
.tool-result__value { margin-top: 3px; font-family: "Manrope", sans-serif; font-size: clamp(30px, 5vw, 44px); line-height: 1.15; letter-spacing: -.04em; }
.tool-result__details { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 20px; padding-top: 18px; border-top: 1px solid #d4ddef; }
.tool-result__details span, .tool-result__details strong { display: block; }
.tool-result__details span { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.tool-result__details strong { margin-top: 3px; font-size: 12px; }
.tool-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.tool-guide { width: min(820px, calc(100% - 40px)); margin: 0 auto; padding: 76px 0 96px; border-top: 1px solid var(--line); }
.tool-guide h2 { margin: 0 0 18px; font-family: "Manrope", sans-serif; font-size: 35px; letter-spacing: -.04em; }
.tool-guide h3 { margin: 36px 0 10px; font-family: "Manrope", sans-serif; font-size: 23px; letter-spacing: -.025em; }
.tool-guide p { color: #505971; }
.tool-formula { margin: 26px 0; padding: 20px 22px; border-left: 4px solid var(--blue-light); border-radius: 0 12px 12px 0; color: var(--navy); background: #eaf0ff; font-family: "Manrope", sans-serif; font-weight: 800; }
.tool-related { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 38px; }
.tool-related a { padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: white; font-size: 12px; font-weight: 700; }

@media (max-width: 900px) {
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .calculator-hero { grid-template-columns: 1fr; gap: 30px; }
  .calculator-intro { position: static; }
  .article-layout { grid-template-columns: 1fr; }
  .article-toc { position: static; display: none; }
  .about-section { grid-template-columns: 1fr; gap: 45px; }
  .hero-inner--with-ad { grid-template-columns: minmax(0, 1fr) 300px; gap: 26px; }
  .ad-slot--rectangle { width: 300px; padding-left: 0; padding-right: 0; }
  .tool-list-grid { grid-template-columns: repeat(2, 1fr); }
  .simple-tool-hero { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 680px) {
  :root { --page: min(100% - 28px, 1180px); }
  .nav-wrap { height: 66px; gap: 16px; }
  .main-nav { display: none; }
  .nav-search-button { margin-left: auto; }
  .nav-search-button span { display: none; }
  .hero { min-height: 560px; padding-top: 64px; }
  .hero-inner--with-ad { grid-template-columns: 1fr; text-align: center; }
  .hero-inner--with-ad .hero-copy { margin-left: auto; }
  .hero-inner--with-ad .quick-links { justify-content: center; }
  .home-ad-first { order: -1; margin: -36px auto 6px; }
  .hero h1 { font-size: 48px; }
  .hero-copy { font-size: 16px; }
  .search-shell { height: 60px; padding: 0 14px; }
  .search-shell input { font-size: 15px; }
  .search-shell kbd { display: none; }
  .section-heading { display: block; }
  .section-heading > p { margin-top: 14px; }
  .category-section, .popular-section, .related-section { padding: 64px 0; }
  .category-grid { grid-template-columns: 1fr; }
  .category-card { min-height: 90px; }
  .popular-grid { grid-template-columns: 1fr; }
  .about-section { margin-top: 20px; padding-top: 70px; padding-bottom: 70px; }
  .number-stack { grid-template-columns: 1fr; }
  .number-stack div:first-child { grid-column: auto; }
  .footer-top, .footer-bottom { align-items: flex-start; flex-direction: column; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .calculator-hero { padding: 45px 0 70px; }
  .calculator-intro h1 { font-size: 48px; }
  .calculator-card { padding: 20px; border-radius: 20px; }
  .calculator-card__top { align-items: stretch; flex-direction: column; }
  .unit-toggle { align-self: flex-start; }
  .form-row, .form-row:has(.field--inches:not([hidden])) { grid-template-columns: 1fr; }
  .result-main { flex-wrap: wrap; }
  .result-main > span:first-child { flex-basis: 100%; }
  .result-details { grid-template-columns: 1fr; }
  .article-layout { padding: 65px 0; }
  .calculator-article h2 { font-size: 30px; }
  .related-grid { grid-template-columns: 1fr; }
  .tool-directory__heading { display: block; }
  .tool-directory__heading p { margin-top: 12px; }
  .tool-list-grid { grid-template-columns: 1fr; }
  .simple-tool-hero { padding: 42px 0 65px; }
  .simple-calculator-card { padding: 20px; border-radius: 20px; }
  .tool-fields { grid-template-columns: 1fr; }
  .tool-field--wide { grid-column: auto; }
  .tool-result__details { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
