:root {
  color-scheme: light;
  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-muted: #edf0f3;
  --surface-strong: #191d22;
  --text: #181b1f;
  --text-muted: #686e76;
  --border: #d8dde2;
  --border-strong: #b9c0c8;
  --brand: #2457d6;
  --brand-hover: #1744b4;
  --brand-soft: #e8eefc;
  --accent: #f16836;
  --danger: #b92d27;
  --focus: #2457d6;
  --content-max: 76rem;
  --reading-max: 52rem;
  --radius-sm: 0.4rem;
  --radius-md: 0.65rem;
  --radius-lg: 0.85rem;
  --shadow-card: 0 1px 2px rgb(18 24 32 / 4%), 0 8px 22px rgb(18 24 32 / 5%);
  --shadow-popover: 0 16px 42px rgb(18 24 32 / 16%);
  font-family: "Segoe UI Variable Text", "Segoe UI", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Arial, sans-serif;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #101214;
  --surface: #181b1f;
  --surface-muted: #22262b;
  --surface-strong: #0b0d0f;
  --text: #f2f3f4;
  --text-muted: #a3a9b1;
  --border: #30353c;
  --border-strong: #4b525b;
  --brand: #7fa2ff;
  --brand-hover: #a9c0ff;
  --brand-soft: #202c48;
  --accent: #ff895b;
  --danger: #ff8179;
  --focus: #9bb7ff;
  --shadow-card: 0 1px 1px rgb(255 255 255 / 3%), 0 10px 28px rgb(0 0 0 / 20%);
  --shadow-popover: 0 18px 48px rgb(0 0 0 / 45%);
}

* { box-sizing: border-box; }
html { min-width: 0; }
body { min-width: 0; margin: 0; background: var(--bg); color: var(--text); font-size: 1rem; line-height: 1.6; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body[data-menu-open="true"] { overflow: hidden; }
button, input, select { font: inherit; }
button { cursor: pointer; }
img { max-width: 100%; }
svg { display: block; width: 1.25rem; height: 1.25rem; flex: 0 0 1.25rem; }
a { color: var(--brand); text-decoration-thickness: 0.08em; text-underline-offset: 0.18em; }
a:hover { color: var(--brand-hover); }
:focus-visible { outline: 0.1875rem solid var(--focus); outline-offset: 0.15rem; }
::selection { background: color-mix(in srgb, var(--brand) 24%, transparent); }

.shell { width: min(var(--content-max), calc(100% - 3rem)); margin-inline: auto; }
.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; z-index: 100; top: 0.65rem; left: 0.65rem; transform: translateY(-160%); border-radius: var(--radius-sm); padding: 0.65rem 0.9rem; background: var(--text); color: var(--surface); font-weight: 700; text-decoration: none; }
.skip-link:focus { transform: translateY(0); }

.site-header { position: sticky; z-index: 30; top: 0; border-bottom: 1px solid var(--border); background: color-mix(in srgb, var(--bg) 94%, transparent); backdrop-filter: blur(14px); }
.header-row { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; min-height: 4.25rem; align-items: center; gap: 2rem; }
.brand { display: inline-flex; min-width: 0; align-items: center; gap: 0.65rem; color: var(--text); font-size: 1rem; font-weight: 780; letter-spacing: -0.025em; text-decoration: none; }
.brand:hover { color: var(--text); }
.brand-mark { display: grid; width: 2.1rem; height: 2.1rem; flex: 0 0 2.1rem; place-items: center; border-radius: 0.35rem; background: var(--text); color: var(--bg); font-size: 1rem; font-weight: 850; line-height: 1; }
.brand-wordmark { white-space: nowrap; }
.brand-wordmark span:last-child { color: var(--brand); }
.desktop-nav { display: flex; align-self: stretch; justify-self: start; align-items: center; gap: 1.5rem; }
.desktop-nav a { position: relative; display: inline-flex; height: 100%; align-items: center; color: var(--text-muted); font-size: 0.9rem; font-weight: 660; text-decoration: none; white-space: nowrap; }
.desktop-nav a:hover { color: var(--text); }
.desktop-nav a[aria-current="page"] { color: var(--text); }
.desktop-nav a[aria-current="page"]::after { position: absolute; right: 0; bottom: -1px; left: 0; height: 0.19rem; background: var(--accent); content: ""; }
.header-actions { display: flex; min-height: 2.65rem; align-items: center; justify-content: flex-end; gap: 0.4rem; }
.icon-button, button.theme-toggle, .language-switch { display: inline-flex; width: 2.65rem; height: 2.65rem; min-width: 2.65rem; flex: 0 0 2.65rem; align-items: center; justify-content: center; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0; background: var(--surface); color: var(--text); line-height: 1; text-decoration: none; transition: border-color 150ms ease, background-color 150ms ease, color 150ms ease; }
.icon-button:hover, button.theme-toggle:hover, .language-switch:hover { border-color: var(--border-strong); background: var(--surface-muted); color: var(--text); }
.theme-toggle > [data-theme-icon] { display: grid; place-items: center; }
.theme-toggle > [data-theme-icon][hidden] { display: none; }
.language-switch { width: auto; min-width: 3rem; flex-basis: auto; padding-inline: 0.65rem; font-size: 0.76rem; font-weight: 800; letter-spacing: 0.05em; }
.language-switch-name { display: none; }
.support-link { display: inline-flex; min-height: 2.65rem; align-items: center; justify-content: center; border: 1px solid var(--text); border-radius: var(--radius-sm); padding: 0.55rem 0.8rem; background: var(--text); color: var(--bg) !important; font-size: 0.85rem; font-weight: 730; line-height: 1; text-decoration: none; transition: opacity 150ms ease; }
.support-link:hover { color: var(--bg) !important; opacity: 0.82; }
.search-trigger { display: inline-flex; }
.mobile-menu-trigger { display: none; }
.site-search { position: relative; }
.header-search { display: none; }
.site-header.is-search-open .header-search { position: absolute; z-index: 34; top: calc(100% + 0.55rem); right: 0; display: block; width: min(28rem, calc(100vw - 2rem)); animation: search-in 160ms ease-out both; }
.header-search label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.search-control { display: flex; min-height: 3.15rem; align-items: center; gap: 0.65rem; border: 1px solid var(--border-strong); border-radius: var(--radius-md); padding: 0 0.9rem; background: var(--surface); box-shadow: var(--shadow-popover); }
.search-control:focus-within { border-color: var(--brand); box-shadow: var(--shadow-popover), 0 0 0 0.18rem color-mix(in srgb, var(--brand) 18%, transparent); }
.search-control input { width: 100%; min-width: 0; min-height: 2.9rem; border: 0; padding: 0.5rem 0; background: transparent; color: var(--text); font-size: 1rem; outline: 0; }
.search-control input::placeholder { color: var(--text-muted); }
.search-control > span { display: grid; flex: 0 0 auto; place-items: center; color: var(--text-muted); }
.search-results { position: absolute; z-index: 35; top: calc(100% + 0.4rem); right: 0; width: 100%; max-height: min(28rem, 65vh); overflow: auto; border: 1px solid var(--border); border-radius: var(--radius-md); padding: 0.35rem; background: var(--surface); box-shadow: var(--shadow-popover); }
.search-results ul { display: grid; gap: 0.1rem; padding: 0; margin: 0; list-style: none; }
.search-results a { display: grid; gap: 0.1rem; border-radius: var(--radius-sm); padding: 0.75rem; color: var(--text); text-decoration: none; }
.search-results a:hover, .search-results a[aria-selected="true"] { background: var(--surface-muted); }
.search-results a span { color: var(--brand); font-size: 0.72rem; font-weight: 780; letter-spacing: 0.05em; text-transform: uppercase; }
.search-results a small { color: var(--text-muted); font-size: 0.8rem; line-height: 1.4; }
.search-results > p { margin: 0; padding: 0.9rem; color: var(--text-muted); }
.mobile-drawer, .mobile-drawer-backdrop { display: none; }

.breadcrumbs { padding-top: 1rem; color: var(--text-muted); font-size: 0.8rem; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 0.4rem; max-width: 100%; padding: 0; margin: 0; list-style: none; overflow-wrap: anywhere; }
.breadcrumbs li:not(:last-child)::after { content: "/"; margin-left: 0.4rem; color: var(--border-strong); }
.breadcrumbs a { color: inherit; text-decoration: none; }
.breadcrumbs a:hover { color: var(--text); }

main { min-height: 55vh; padding-block: 1.5rem 5.5rem; }
main:focus { outline: 0; }
main > * { animation: content-in 260ms ease-out both; }
.eyebrow { display: inline-flex; width: fit-content; align-items: center; margin: 0 0 0.6rem; color: var(--brand); font-size: 0.75rem; font-weight: 800; letter-spacing: 0.085em; text-transform: uppercase; }
.page-header { width: min(var(--content-max), calc(100% - 3rem)); margin: 0 auto 1.5rem; padding: clamp(1.5rem, 3.5vw, 2.75rem) 0 1.4rem; border-bottom: 1px solid var(--border); }
.page-header h1, .article-header h1 { max-width: 26ch; margin: 0; font-size: clamp(2.2rem, 4.5vw, 3.6rem); line-height: 1.03; letter-spacing: -0.05em; }
.page-header h1, .article-header h1, .service-page h1 { overflow-wrap: break-word; hyphens: auto; }
.page-header p, .article-header .lead { max-width: 49rem; margin: 0.8rem 0 0; color: var(--text-muted); font-size: 1.05rem; line-height: 1.62; }
.page-header--simple { display: grid; min-height: calc(100vh - 5rem); place-items: center; margin-bottom: 0; border: 0; }
.page-header--simple > div { width: min(40rem, 100%); border: 1px solid var(--border); border-top: 0.25rem solid var(--accent); border-radius: var(--radius-md); padding: clamp(2rem, 7vw, 4rem); background: var(--surface); box-shadow: var(--shadow-card); text-align: center; }
.page-header--simple h1 { max-width: 100%; }
.page-header--simple .eyebrow { margin-inline: auto; }
.simple-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.65rem; margin-top: 1.4rem; }

.home-intro { width: min(var(--content-max), calc(100% - 3rem)); margin: 0 auto; border-top: 0.3rem solid var(--accent); border-bottom: 1px solid var(--border); padding: clamp(2rem, 6vw, 4.75rem) 0 clamp(2rem, 5vw, 3.75rem); }
.home-intro-copy { display: grid; grid-template-columns: minmax(0, 3fr) minmax(16rem, 1fr); align-items: end; column-gap: clamp(2rem, 7vw, 6rem); row-gap: 0.75rem; }
.home-intro .eyebrow, .home-intro h1 { grid-column: 1; }
.home-intro h1 { max-width: 19ch; margin: 0; font-size: clamp(2.7rem, 6vw, 4.9rem); line-height: 0.98; letter-spacing: -0.065em; }
.home-intro .home-lead { grid-column: 2; grid-row: 1 / span 2; margin: 0; border-left: 1px solid var(--border-strong); padding-left: 1.5rem; color: var(--text-muted); font-size: 1.04rem; line-height: 1.7; }

.content-section { width: min(var(--content-max), calc(100% - 3rem)); margin: 3.75rem auto 0; }
.home-section:nth-of-type(2) { animation-delay: 40ms; }
.home-section:nth-of-type(3) { animation-delay: 80ms; }
.home-section:nth-of-type(4) { animation-delay: 120ms; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.section-heading h2 { margin: 0; font-size: clamp(1.55rem, 3vw, 1.95rem); line-height: 1.2; letter-spacing: -0.035em; }
.section-heading a { display: inline-flex; min-height: 2.5rem; flex: 0 0 auto; align-items: center; border-bottom: 1px solid currentColor; color: var(--text); font-size: 0.82rem; font-weight: 700; text-decoration: none; white-space: nowrap; }
.section-heading a:hover { color: var(--brand); }

.tool-list, .article-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.8rem; }
.tool-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; min-width: 0; min-height: 8.2rem; align-items: start; gap: 1rem; border: 1px solid var(--border); border-radius: var(--radius-md); padding: 1.15rem 1.2rem; background: var(--surface); color: var(--text); text-decoration: none; transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease; }
.tool-row:hover { border-color: var(--border-strong); background: color-mix(in srgb, var(--surface) 92%, var(--brand)); color: var(--text); box-shadow: var(--shadow-card); }
.article-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; min-width: 0; min-height: 9.25rem; align-items: start; gap: 1rem; border-top: 2px solid var(--text); padding: 1rem 0.15rem 0; color: var(--text); text-decoration: none; transition: border-color 160ms ease; }
.article-row:hover { border-color: var(--brand); color: var(--text); }
.tool-row > span:first-child, .article-row-copy, .category-row .article-row-copy, .footer-grid > div, .result-metric dt, .result-metric dd { min-width: 0; overflow-wrap: anywhere; }
.tool-row h2, .article-row h2, .category-row h2 { margin: 0; font-size: 1.02rem; font-weight: 730; line-height: 1.32; letter-spacing: -0.018em; }
.tool-row p, .article-row p, .category-row p { display: -webkit-box; overflow: hidden; margin: 0.35rem 0 0; color: var(--text-muted); font-size: 0.875rem; line-height: 1.48; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.row-meta { display: block; margin-bottom: 0.38rem; color: var(--brand); font-size: 0.7rem; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase; }
.row-arrow { display: grid; width: 2rem; height: 2rem; align-self: end; place-items: center; color: var(--text-muted); font-size: 1.1rem; line-height: 1; transition: color 160ms ease, transform 160ms ease; }
.tool-row:hover .row-arrow, .article-row:hover .row-arrow, .category-row:hover .row-arrow { color: var(--brand); transform: translateX(0.18rem); }

.topic-groups { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.8rem; }
.topic-group { border: 1px solid var(--border); border-left: 0.24rem solid var(--accent); border-radius: var(--radius-sm); padding: 1.15rem; background: var(--surface); }
.topic-group h3 { margin: 0 0 0.65rem; font-size: 1.03rem; letter-spacing: -0.02em; }
.category-links { display: grid; }
.topic-group .category-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; min-height: 2.7rem; align-items: center; gap: 0.5rem; border: 0; border-top: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0.7rem 0.75rem; background: transparent; box-shadow: none; }
.topic-group .category-row:first-child { border-top: 0; }
.topic-group .category-row:hover { background: var(--surface-muted); color: var(--brand); }
.topic-group .category-row p, .topic-group .row-meta { display: none; }
.topic-group .category-row h2 { font-size: 0.9rem; font-weight: 650; }
.topic-group .row-arrow { width: 1.4rem; height: 1.4rem; font-size: 0.9rem; }

.catalog-list { width: min(var(--content-max), calc(100% - 3rem)); margin-inline: auto; }
.topic-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.8rem; }
.category-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; min-width: 0; min-height: 8rem; align-items: start; gap: 1rem; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 1.15rem; background: var(--surface); color: var(--text); text-decoration: none; transition: border-color 160ms ease, background-color 160ms ease; }
.category-row:hover { border-color: var(--brand); background: color-mix(in srgb, var(--surface) 94%, var(--brand)); color: var(--text); }
.topic-list .row-meta { display: none; }

.calculator-page, .category-page { width: min(var(--content-max), calc(100% - 3rem)); margin-inline: auto; }
.calculator-page > .page-header, .category-page > .page-header { width: auto; margin-bottom: 1.5rem; }
.calculator-workspace { display: grid; grid-template-columns: minmax(0, 7fr) minmax(19rem, 5fr); align-items: start; gap: 1rem; }
.calc-form-column, .calc-result-column { min-width: 0; border: 1px solid var(--border); border-radius: var(--radius-md); padding: clamp(1.2rem, 3vw, 2rem); background: var(--surface); box-shadow: var(--shadow-card); }
.calc-form-column { border-top: 0.25rem solid var(--brand); }
.calc-result-column { position: sticky; top: 5.5rem; border-top: 0.25rem solid var(--accent); background: var(--surface-strong); color: #f6f7f8; }
.calc-form-column h2, .calc-result-column h2 { margin: 0; font-size: 1.28rem; line-height: 1.2; letter-spacing: -0.025em; }
.calculator-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin: 1.35rem 0; }
.field { display: grid; min-width: 0; align-content: start; gap: 0.4rem; }
.field label { color: var(--text); font-size: 0.875rem; font-weight: 670; line-height: 1.38; }
.field label span { color: var(--text-muted); font-weight: 430; }
.field-control { display: flex; min-width: 0; min-height: 3rem; align-items: stretch; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg); transition: border-color 150ms ease, box-shadow 150ms ease; }
.field-control:focus-within { border-color: var(--brand); box-shadow: 0 0 0 0.18rem color-mix(in srgb, var(--brand) 16%, transparent); }
.field-control input, .field-control select, .field > input, .field > select { width: 100%; min-width: 0; min-height: 3rem; border: 0; border-radius: inherit; padding: 0.62rem 0.75rem; background: transparent; color: var(--text); font-variant-numeric: tabular-nums; outline: 0; }
.field-control:has(select) { position: relative; }
.field-control:has(select)::after { position: absolute; top: 50%; right: 0.9rem; width: 0.42rem; height: 0.42rem; border-right: 0.11rem solid var(--text-muted); border-bottom: 0.11rem solid var(--text-muted); content: ""; pointer-events: none; transform: translateY(-70%) rotate(45deg); }
.field-control select { appearance: none; -webkit-appearance: none; padding-right: 2.5rem; cursor: pointer; }
.field-control select option, .field-control select optgroup { background: var(--surface); color: var(--text); }
.field-unit { display: grid; flex: 0 0 auto; place-items: center; border-left: 1px solid var(--border); padding: 0 0.7rem; color: var(--text-muted); font-size: 0.8rem; }
.field-hint { margin: 0; color: var(--text-muted); font-size: 0.78rem; line-height: 1.42; }
.primary-button, .secondary-button { display: inline-flex; min-height: 2.9rem; align-items: center; justify-content: center; border-radius: var(--radius-sm); padding: 0.68rem 1.1rem; font-weight: 740; line-height: 1.1; text-decoration: none; transition: border-color 150ms ease, background-color 150ms ease, color 150ms ease, transform 150ms ease; }
.primary-button { border: 1px solid var(--brand); background: var(--brand); color: #fff; }
.primary-button:hover { border-color: var(--brand-hover); background: var(--brand-hover); color: #fff; }
.primary-button:active, .secondary-button:active { transform: translateY(1px); }
.secondary-button { border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); }
.secondary-button:hover { border-color: var(--text); color: var(--text); }
.form-status { min-height: 1.4rem; margin: 0.75rem 0 0; color: var(--text-muted); font-size: 0.85rem; }
.form-status.is-error { color: var(--danger); font-weight: 670; }
.result-panel { min-height: 12rem; }
.result-kicker { margin: 0 0 0.75rem; color: #a8afb7; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.085em; text-transform: uppercase; }
.result-empty { color: #a8afb7; font-size: 0.95rem; }
.result-empty.is-error { color: #ff9e96; }
.result-primary-label { margin: 0; color: #a8afb7; font-size: 0.85rem; }
.result-primary { margin: 0.25rem 0 1.15rem; color: #fff; font-size: clamp(2.15rem, 5vw, 3rem); font-variant-numeric: tabular-nums lining-nums; font-weight: 780; letter-spacing: -0.055em; line-height: 1; }
.result-metrics { display: grid; gap: 0; margin: 0; border-top: 1px solid rgb(255 255 255 / 14%); }
.result-metric { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding: 0.7rem 0; border-bottom: 1px solid rgb(255 255 255 / 14%); font-size: 0.875rem; }
.result-metric dt { color: #a8afb7; }
.result-metric dd { margin: 0; color: #fff; font-variant-numeric: tabular-nums lining-nums; font-weight: 680; text-align: right; }
.result-note { margin: 1rem 0 0; color: #a8afb7; font-size: 0.82rem; }
.result-copy { display: inline-flex; min-height: 2.55rem; align-items: center; gap: 0.45rem; margin-top: 1rem; border: 1px solid rgb(255 255 255 / 22%); border-radius: var(--radius-sm); padding: 0.5rem 0.75rem; background: transparent; color: #fff; font-size: 0.82rem; font-weight: 680; }
.result-copy[hidden] { display: none; }
.result-copy:hover { border-color: rgb(255 255 255 / 45%); background: rgb(255 255 255 / 6%); }

.formula-card, .faq-section, .related-materials { margin-top: 1rem; border: 1px solid var(--border); border-radius: var(--radius-md); padding: clamp(1.2rem, 3vw, 1.65rem); background: var(--surface); }
.formula-card h2, .faq-section h2, .related-section h2 { margin: 0 0 0.65rem; font-size: 1.3rem; line-height: 1.2; letter-spacing: -0.025em; }
.formula-card p { max-width: 50rem; margin: 0.45rem 0; color: var(--text-muted); }
.faq-section details { border-top: 1px solid var(--border); padding: 0.85rem 0; }
.faq-section details:first-of-type { border-top: 0; }
.faq-section summary { display: flex; min-height: 2.6rem; align-items: center; justify-content: space-between; gap: 1rem; cursor: pointer; font-weight: 670; list-style: none; }
.faq-section summary::-webkit-details-marker { display: none; }
.faq-section summary::after { flex: 0 0 auto; content: "+"; color: var(--brand); font-size: 1.25rem; font-weight: 400; }
.faq-section details[open] summary::after { content: "−"; }
.faq-section details[open] p { animation: details-in 160ms ease-out both; }
.faq-section p { max-width: 50rem; margin: 0.55rem 0 0; color: var(--text-muted); }
.related-materials { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem; }
.related-section ul { padding: 0; margin: 0; list-style: none; }
.related-section li { margin: 0; border-top: 1px solid var(--border); }
.related-section a { display: block; padding: 0.68rem 0; font-weight: 620; text-decoration: none; }
.category-page > .content-section { width: 100%; }
.category-section { margin-top: 1rem; }
.category-section h2 { margin: 0 0 0.8rem; font-size: 1.45rem; letter-spacing: -0.025em; }
.notice-block { margin-top: 1rem; border: 1px solid var(--border); border-left: 0.25rem solid var(--accent); border-radius: var(--radius-sm); padding: 0.95rem 1rem; background: var(--surface); }
.notice-block strong { display: block; margin-bottom: 0.3rem; }
.notice-block p { margin: 0; color: var(--text-muted); }
.empty-note, .locale-notice { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 1rem; background: var(--surface); color: var(--text-muted); }
.locale-notice { width: min(var(--content-max), calc(100% - 3rem)); margin: 0 auto 1rem; border-left: 0.25rem solid var(--brand); }

.article-layout { display: block; width: min(var(--reading-max), calc(100% - 3rem)); margin-inline: auto; }
.article-body { min-width: 0; border: 1px solid var(--border); border-top: 0.3rem solid var(--accent); border-radius: var(--radius-md); padding: clamp(1.5rem, 5vw, 3.4rem); background: var(--surface); box-shadow: var(--shadow-card); }
.article-header { width: auto; margin: 0 0 2.4rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--border); }
.article-header h1 { max-width: 23ch; }
.article-header .lead { font-size: 1.06rem; }
.article-meta { margin: 0.85rem 0 0; color: var(--text-muted); font-size: 0.82rem; }
.article-body > p, .article-body > ul, .article-body > ol, .article-body > h2, .article-body > h3, .article-body > table, .article-body > blockquote { max-width: 46rem; }
.article-body p { margin: 0 0 1.2rem; font-size: 1.04rem; line-height: 1.78; }
.article-body h2 { margin: 2.55rem 0 0.75rem; font-size: clamp(1.4rem, 3vw, 1.8rem); line-height: 1.24; letter-spacing: -0.032em; }
.article-body h3 { margin: 1.9rem 0 0.65rem; font-size: 1.2rem; line-height: 1.3; }
.article-body ul, .article-body ol { padding-left: 1.3rem; margin: 0 0 1.25rem; }
.article-body .related-section ul { padding-left: 0; }
.article-body li { margin-bottom: 0.5rem; line-height: 1.7; }
.article-body table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; margin-bottom: 1.25rem; }
.article-body th, .article-body td { border: 1px solid var(--border); padding: 0.58rem 0.7rem; text-align: left; }

.service-page { width: min(var(--reading-max), calc(100% - 3rem)); margin-inline: auto; border: 1px solid var(--border); border-top: 0.3rem solid var(--brand); border-radius: var(--radius-md); padding: clamp(1.5rem, 5vw, 3.4rem); background: var(--surface); box-shadow: var(--shadow-card); }
.service-page h1 { margin: 0; font-size: clamp(2.2rem, 4.5vw, 3.6rem); line-height: 1.03; letter-spacing: -0.05em; }
.service-page .lead { max-width: 48rem; margin: 0.8rem 0 2rem; color: var(--text-muted); font-size: 1.06rem; line-height: 1.68; }
.service-page h2 { margin: 2.15rem 0 0.55rem; font-size: 1.45rem; letter-spacing: -0.025em; }
.service-page p { max-width: 48rem; margin: 0 0 1rem; line-height: 1.75; }
.site-footer { border-top: 1px solid #2c3137; padding: 3.2rem 0 3.5rem; background: #15181c; color: #f4f5f6; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(2, minmax(0, 1fr)); gap: 2.4rem; width: min(var(--content-max), calc(100% - 3rem)); margin-inline: auto; }
.footer-brand { margin-bottom: 0.75rem; color: #fff; }
.footer-brand:hover { color: #fff; }
.footer-brand .brand-mark { background: #fff; color: #15181c; }
.site-footer .brand-wordmark span:last-child { color: #83a4ff; }
.site-footer p { max-width: 26rem; margin: 0; color: #aab0b7; font-size: 0.875rem; line-height: 1.6; }
.site-footer h2 { margin: 0 0 0.75rem; color: #7d848d; font-size: 0.72rem; letter-spacing: 0.09em; text-transform: uppercase; }
.site-footer a:not(.brand) { display: block; width: fit-content; max-width: 100%; margin: 0.45rem 0; color: #d8dce0; font-size: 0.875rem; text-decoration: none; overflow-wrap: anywhere; }
.site-footer a:not(.brand):hover { color: #fff; }

@keyframes content-in { from { opacity: 0; transform: translateY(0.3rem); } to { opacity: 1; transform: translateY(0); } }
@keyframes search-in { from { opacity: 0; transform: translateY(-0.3rem); } to { opacity: 1; transform: translateY(0); } }
@keyframes drawer-in { from { opacity: 0; transform: translateX(0.5rem); } to { opacity: 1; transform: translateX(0); } }
@keyframes details-in { from { opacity: 0; transform: translateY(-0.2rem); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 68rem) {
  .desktop-nav, .desktop-support, .header-actions > .language-switch, .header-actions > button.desktop-theme { display: none; }
  .mobile-menu-trigger { display: inline-flex; }
  .header-row { grid-template-columns: auto 1fr auto; min-height: 4rem; gap: 0.75rem; }
  .header-actions { grid-column: 3; }
  .mobile-drawer { position: fixed; z-index: 34; top: 4.4rem; right: 0.75rem; display: grid; gap: 0.75rem; width: min(22rem, calc(100vw - 1.5rem)); max-height: calc(100dvh - 5.15rem); overflow-y: auto; border: 1px solid var(--border); border-radius: var(--radius-md); padding: 0.9rem; background: var(--surface); box-shadow: var(--shadow-popover); animation: drawer-in 180ms ease-out both; }
  .mobile-drawer[hidden] { display: none; }
  .mobile-drawer-backdrop { position: fixed; z-index: 33; inset: 4rem 0 0; display: block; background: rgb(8 10 12 / 48%); animation: content-in 140ms ease-out both; }
  .mobile-drawer-backdrop[hidden] { display: none; }
  .mobile-drawer .drawer-close { position: absolute; top: 0.7rem; right: 0.7rem; }
  .mobile-drawer nav { display: grid; gap: 0; padding-top: 3.1rem; }
  .mobile-drawer nav a { display: flex; min-height: 3rem; align-items: center; border-top: 1px solid var(--border); padding: 0.65rem 0.55rem; color: var(--text); font-size: 1rem; font-weight: 680; text-decoration: none; }
  .mobile-drawer nav a:first-child { border-top: 0; }
  .mobile-drawer nav a:hover, .mobile-drawer nav a[aria-current="page"] { color: var(--brand); }
  .mobile-drawer .drawer-actions { display: grid; gap: 0; border-top: 1px solid var(--border); padding-top: 0.65rem; }
  .mobile-drawer .theme-toggle, .mobile-drawer .language-switch, .mobile-drawer .support-link { width: 100%; min-height: 2.85rem; justify-content: flex-start; border: 0; border-radius: 0; padding-inline: 0.55rem; background: transparent; color: var(--text) !important; box-shadow: none; }
  .mobile-drawer .theme-toggle:hover, .mobile-drawer .language-switch:hover, .mobile-drawer .support-link:hover { background: var(--surface-muted); color: var(--text) !important; opacity: 1; }
  .mobile-drawer .language-switch-name { display: inline; font-size: 0.9rem; font-weight: 680; letter-spacing: 0; }
  .mobile-drawer .language-switch-code { min-width: 1.75rem; color: var(--text-muted); }
  .mobile-drawer .mobile-theme { gap: 0.65rem; }
  .mobile-drawer .mobile-theme .sr-only { position: static; width: auto; height: auto; padding: 0; margin: 0; overflow: visible; clip: auto; white-space: normal; font-size: 0.9rem; font-weight: 680; }
  .home-intro-copy { grid-template-columns: 1fr; column-gap: 0; row-gap: 0.75rem; }
  .home-intro .eyebrow, .home-intro h1, .home-intro .home-lead { grid-column: 1; }
  .home-intro .home-lead { grid-row: auto; max-width: 44rem; margin-top: 0.5rem; border-left: 0; padding-left: 0; }
  .topic-groups, .topic-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 52rem) {
  .calculator-workspace { grid-template-columns: 1fr; }
  .calc-result-column { position: relative; top: auto; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid > :first-child { grid-column: 1 / -1; }
}

@media (max-width: 40rem) {
  .shell, .page-header, .content-section, .home-intro, .catalog-list, .calculator-page, .category-page, .footer-grid { width: calc(100% - 2rem); }
  .locale-notice { width: calc(100% - 2rem); }
  .header-row { gap: 0.5rem; }
  .brand { gap: 0.5rem; font-size: 0.95rem; }
  .brand-mark { width: 2rem; height: 2rem; flex-basis: 2rem; }
  .site-header.is-search-open .header-search { position: fixed; top: 4.4rem; right: 1rem; left: 1rem; width: auto; }
  .breadcrumbs { padding-top: 0.85rem; }
  .breadcrumbs li { display: none; }
  .breadcrumbs li:nth-last-child(2) { display: block; }
  .breadcrumbs li:nth-last-child(2)::before { content: "← "; }
  .breadcrumbs li:nth-last-child(2)::after { display: none; }
  main { padding-top: 1rem; padding-bottom: 4rem; }
  .home-intro { padding: 2rem 0 2.25rem; }
  .home-intro h1 { font-size: clamp(2.35rem, 12vw, 3.25rem); }
  .home-intro .home-lead { font-size: 1rem; }
  .content-section { margin-top: 3rem; }
  .section-heading { align-items: flex-start; }
  .section-heading h2 { font-size: 1.5rem; }
  .section-heading a { min-height: 2.25rem; font-size: 0.77rem; }
  .tool-list, .article-list, .topic-list, .topic-groups, .calculator-grid, .related-materials { grid-template-columns: 1fr; }
  .tool-row, .article-row, .category-row { min-height: 0; }
  .page-header { padding-top: 1.15rem; }
  .page-header h1, .article-header h1, .service-page h1 { font-size: clamp(2.05rem, 11vw, 2.9rem); }
  .page-header p, .article-header .lead { font-size: 1rem; }
  .calc-form-column, .calc-result-column, .article-body, .service-page { border-radius: var(--radius-md); padding: 1.15rem; }
  .primary-button { width: 100%; }
  .article-layout, .service-page { width: calc(100% - 2rem); }
  .article-body p { font-size: 1rem; }
  .footer-grid { gap: 1.8rem 1rem; }
  .simple-actions { display: grid; grid-template-columns: 1fr; }
  .simple-actions .primary-button, .simple-actions .secondary-button { width: 100%; }
}

@media (max-width: 23rem) {
  .brand-wordmark { display: none; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-grid > :first-child { grid-column: auto; }
  .section-heading { display: grid; }
  .section-heading a { justify-self: start; white-space: normal; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-delay: 0ms !important; }
}
