:root {
    --ink: #101010;
    --muted: #525252;
    --accent: #f74d01;
    --accent-hover: #d94200;
    --canvas: #fff;
    --line: #e2dcd7;
    --bs-body-color: var(--ink);
    --bs-body-bg: var(--canvas);
    --bs-link-color: var(--accent);
    --bs-link-hover-color: var(--accent-hover);
    --bs-border-color: var(--line);
    --bs-primary-rgb: 247, 77, 1;
    --bs-link-color-rgb: 247, 77, 1;
    --bs-link-hover-color-rgb: 217, 66, 0;
    --bs-focus-ring-color: #f74d0133;
    --bs-border-radius: 0;
    --bs-border-radius-sm: 0;
    --bs-border-radius-lg: 0;
    --bs-border-radius-xl: 0;
    --bs-border-radius-xxl: 0;
    --bs-border-radius-pill: 0;
}
* { box-sizing: border-box; }
*, *::before, *::after, *::file-selector-button { border-radius: 0 !important; }
body { font-family: Arial, Helvetica, sans-serif; -webkit-font-smoothing: antialiased; }
a, button, input, select, textarea { -webkit-tap-highlight-color: transparent; }
a { text-underline-offset: .2em; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.icon { flex-shrink: 0; vertical-align: middle; }
.container { max-width: 1200px; padding-inline: 32px; }
.skip-link { position: absolute; z-index: 1100; top: -100px; left: 16px; padding: 12px; background: white; }
.skip-link:focus { top: 12px; }
.site-header { background: white; border-bottom: 1px solid var(--line); }
.site-header .navbar { min-height: 64px; gap: 20px; padding-block: 0; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-size: 28px; font-weight: 800; letter-spacing: -1px; text-decoration: none; }
.brand:hover { color: var(--ink); }
.brand-logo { display: block; width: 200px; height: auto; max-width: 100%; }
.site-header .navbar-nav { gap: 26px; align-items: center; }
.site-header .nav-link { position: relative; color: var(--ink); font-size: 14px; font-weight: 600; padding: 22px 3px; }
.site-header .nav-link:hover { color: var(--accent); }
.site-header .nav-link:not(.dropdown-toggle).active::after { position: absolute; content: ''; height: 3px; background: var(--accent); inset: auto 0 0; }
.dropdown-toggle::after { vertical-align: .2em; margin-left: 8px; }
.dropdown-menu { border: 1px solid var(--line); padding: 8px; border-radius: 0; box-shadow: 0 12px 36px #17171712; min-width: 230px; }
.dropdown-item { padding: 12px 14px; border-radius: 0; font-size: 14px; white-space: normal; }
.dropdown-item:hover, .dropdown-item[aria-current] { background: #fff1e7; color: var(--accent); }
.menu-toggle { display: flex; gap: 9px; align-items: center; font-size: 13px; font-weight: 600; min-height: 44px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 0; }
.menu-toggle .navbar-toggler-icon { width: 18px; height: 18px; }
.page-breadcrumb { padding-top: 22px; }
.breadcrumb { font-size: 12px; margin: 0; }
.breadcrumb a, .breadcrumb-item.active { color: var(--muted); }
.breadcrumb a { text-decoration: none; }
.home-breadcrumb { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; }
.reference-hero { display: grid; grid-template-columns: 1.08fr 1fr; gap: 28px; padding: 42px 0 20px; align-items: start; }
.hero-copy { min-width: 0; }
.hero-badge { display: inline-block; color: var(--accent); background: #ffeddf; font-size: 14px; font-weight: 600; border-radius: 0; padding: 4px 16px; margin: 0 0 20px; line-height: 1.4; }
h1 { font-size: clamp(38px, 5.4vw, 64px); line-height: 1.02; font-weight: 780; letter-spacing: -2px; margin-bottom: 14px; overflow-wrap: anywhere; }
.hero-description { color: var(--muted); font-size: 20px; line-height: 1.35; margin: 0 0 26px; max-width: 560px; }
.tool-hero { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; padding: 40px 0 48px; }
.tool-hero h1 { font-size: clamp(36px, 4.7vw, 58px); }
.tool-hero .hero-description { font-size: 18px; line-height: 1.6; }
.tool-panel { min-width: 0; padding: 25px; border: 1px solid #ded5ce; border-radius: 0; background: #fffcfa; }
.validator-panel { padding: 19px 20px; margin-left: -5px; }
.panel-caption { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; font-size: 15px; font-weight: 650; }
.panel-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 0; background: #ffeddf; color: var(--accent); flex-shrink: 0; }
.panel-icon .icon { width: 21px; height: 21px; }
.step-label { font-size: 10px; color: var(--muted); margin-left: auto; font-weight: 400; }
.form-label { font-size: 14px; font-weight: 600; margin-bottom: 10px; width: 100%; }
.field-hint { float: right; font-size: 11px; color: var(--muted); font-weight: 400; }
.form-control, .form-select { border: 1px solid #d8d0ca; border-radius: 0; padding: 12px 14px; min-height: 49px; background-color: white; font-size: 16px; }
.form-select { padding-right: 36px; }
.form-control:focus, .form-select:focus { border-color: var(--accent); box-shadow: 0 0 0 4px #f74d0112; }
.form-control::placeholder { color: #8a817b; }
.egn-fields { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; }
.egn-input { height: 51px; font-size: 24px; letter-spacing: 2px; font-variant-numeric: tabular-nums; }
.egn-input::placeholder { font-size: 18px; letter-spacing: 1px; }
.form-text { font-size: 12px; line-height: 1.6; color: var(--muted); margin-top: 9px; }
.btn { border-radius: 0; font-size: 15px; font-weight: 600; min-height: 44px; padding: 11px 20px; }
.btn-primary { --bs-btn-focus-shadow-rgb: 247, 77, 1; --bs-btn-bg: var(--accent); --bs-btn-border-color: var(--accent); --bs-btn-hover-bg: var(--accent-hover); --bs-btn-hover-border-color: var(--accent-hover); --bs-btn-active-bg: var(--accent-hover); --bs-btn-active-border-color: var(--accent-hover); }
.btn-outline-primary { --bs-btn-focus-shadow-rgb: 247, 77, 1; --bs-btn-color: var(--accent); --bs-btn-border-color: #edb18a; --bs-btn-hover-bg: var(--accent); --bs-btn-hover-border-color: var(--accent); }
.tool-submit { display: flex; justify-content: center; align-items: center; gap: 14px; width: 100%; min-height: 51px; margin-top: 20px; font-size: 16px; }
.egn-fields .tool-submit { margin: 0; width: auto; white-space: nowrap; }
.tool-submit .icon { width: 20px; height: 20px; }
.tool-note { display: flex; align-items: center; gap: 10px; margin: 16px 0 0; font-size: 12px; color: #66615e; line-height: 1.5; }
.tool-note .icon { width: 24px; height: 24px; color: var(--accent); }
.egn-diagram { margin-top: 48px; padding: 4px 0 75px 32px; border-left: 1px solid var(--line); min-width: 0; }
.diagram-title { color: var(--muted); font-size: 15px; margin-bottom: 30px; }
.egn-structure { display: grid; grid-template-columns: 1.8fr 1.2fr .9fr; gap: 14px; }
.digit-group { text-align: center; min-width: 0; }
.digit-tile { display: grid; place-items: center; border-radius: 0; height: 64px; background: #ffe2cf; font-size: clamp(26px, 3.8vw, 42px); font-weight: 600; letter-spacing: 2px; font-variant-numeric: tabular-nums; }
.digit-tile-neutral { background: #f3f3f4; }
.digit-bracket { position: relative; display: block; height: 14px; border: 1px solid var(--accent); border-top: 0; border-radius: 0; margin: 8px 0 23px; }
.digit-bracket::after { content: ''; position: absolute; width: 1px; height: 14px; background: var(--accent); top: 100%; left: 50%; }
.digit-group strong { display: block; font-size: 15px; line-height: 1.2; font-weight: 600; margin-bottom: 6px; }
.digit-group > span:last-child { display: block; color: #706b67; font-size: 12px; line-height: 1.4; }
.diagram-mobile { display: none; }
.benefits-strip { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--line); padding: 20px 0 30px; }
.benefits-strip > div { display: flex; justify-content: center; align-items: center; gap: 20px; min-height: 36px; font-size: 16px; font-weight: 500; }
.benefits-strip > div + div { border-left: 1px solid var(--line); }
.benefits-strip .icon { width: 29px; height: 29px; color: var(--accent); }
.tool-directory { padding: 34px 0 42px; scroll-margin-top: 24px; }
.section-heading { margin-bottom: 26px; }
.section-heading h2 { font-size: 36px; line-height: 1.15; letter-spacing: -1px; font-weight: 750; margin: 0 0 5px; }
.section-heading p { color: var(--muted); font-size: 17px; line-height: 1.45; margin: 0; }
.tool-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.tool-link { display: flex; flex-direction: column; position: relative; color: var(--ink); background: white; border: 1px solid var(--line); border-radius: 0; padding: 14px 20px 29px; text-decoration: none; min-height: 173px; transition: border-color .16s, box-shadow .16s; }
.tool-link:hover { border-color: #f0a16f; box-shadow: 0 4px 16px #f74d010a; color: var(--ink); }
.tool-link-icon { display: grid; place-items: center; width: 48px; height: 48px; color: var(--accent); background: #fff0e5; border-radius: 0; margin-bottom: 9px; }
.tool-link-icon .icon { width: 29px; height: 29px; }
.tool-link h2, .tool-link h3 { font-size: 20px; line-height: 1.2; letter-spacing: -.5px; font-weight: 700; margin: 0 0 8px; }
.tool-link p { font-size: 14px; line-height: 1.4; margin: 0; color: var(--muted); }
.tool-link-arrow { position: absolute; right: 17px; bottom: 12px; color: var(--accent); }
.tool-link-arrow .icon { width: 19px; height: 19px; }
.developer-banner { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 44px; background: #171717; border-radius: 0; color: white; padding: 25px 36px; }
.developer-copy h2 { font-size: 36px; line-height: 1.02; letter-spacing: -.8px; font-weight: 750; margin-bottom: 12px; }
.developer-copy p { font-size: 17px; line-height: 1.3; margin-bottom: 15px; }
.developer-copy .btn { padding: 10px 20px; }
.developer-copy .icon { margin-left: 18px; width: 21px; height: 21px; }
.code-window { min-width: 0; border: 1px solid #675e58; border-radius: 0; overflow: hidden; }
.code-window-title { display: flex; gap: 24px; align-items: center; padding: 11px 18px; font-size: 12px; background: #2b2521; }
.window-dots { display: flex; gap: 7px; }
.window-dots i { width: 10px; height: 10px; background: #ff6559; border-radius: 0; }
.window-dots i:nth-child(2) { background: #ffc64a; }
.window-dots i:nth-child(3) { background: #42c75b; }
.code-window pre { color: white; font-size: 12px; line-height: 1.35; padding: 12px 20px; margin: 0; overflow-x: auto; }
.code-key { color: #ffbe8f; }
.code-value { color: #ffbe8f; }
.code-string { color: #b3ff85; }
.eyebrow { display: flex; align-items: center; gap: 10px; color: var(--accent); font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 18px; }
.gender-options-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.gender-options .form-check { position: relative; padding: 0; margin: 0; }
.gender-options .form-check-input { position: absolute; opacity: 0; margin: 0; }
.gender-options .form-check-label { display: grid; place-items: center; padding: 11px 6px; border: 1px solid var(--line); border-radius: 0; font-size: 13px; cursor: pointer; }
.gender-options .form-check-input:checked + label { color: var(--accent); background: #fff3eb; border-color: var(--accent); }
.gender-options .form-check-input:focus-visible + label { outline: 3px solid var(--accent); outline-offset: 2px; }
.page-heading { padding: 48px 0 24px; max-width: none; }
.page-heading h1 { font-size: clamp(32px, 4vw, 52px); }
.page-heading .hero-description { max-width: none; }
.page-content:empty { display: none; }
.page-content { margin-bottom: 30px; }
.reading-content, .article-content { max-width: none; }
.article-content { padding: 30px 0 50px; color: var(--muted); font-size: 15px; line-height: 1.85; overflow-wrap: anywhere; }
.article-content h2, .article-content h3, .article-content h4 { color: var(--ink); font-size: 22px; line-height: 1.3; font-weight: 700; margin-top: 30px; margin-bottom: 16px; letter-spacing: -.4px; }
.article-content h3 { font-size: 19px; }
.article-content p, .article-content ul, .article-content ol { margin-bottom: 18px; }
.article-content pre { background: #fff; border: 1px solid var(--line); border-radius: 0; padding: 20px; font-size: 12px; overflow: auto; }
.article-content table { display: block; overflow-x: auto; }
.article-intro { border-left: 3px solid var(--line); padding-left: 20px; }
.result-panel { max-width: 900px; padding: 30px; margin: 0 auto 32px; background: white; border: 1px solid var(--line); border-radius: 0; scroll-margin-top: 24px; }
.result-panel:focus { outline: none; }
.result-panel > h2 { font-size: 27px; font-weight: 700; letter-spacing: -.6px; margin-bottom: 24px; }
.result-panel > p { color: var(--muted); line-height: 1.7; }
.result-panel .eyebrow { font-size: 10px; margin-bottom: 12px; }
.result-status { display: flex; align-items: center; gap: 12px; }
.status-symbol { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 0; font-size: 24px; background: #f0fdf4; color: #15803d; }
.result-valid { border-top: 3px solid #15803d; }
.result-valid .result-status { color: #15803d; }
.result-invalid { border-top: 3px solid #b91c1c; }
.result-invalid .result-status { color: #b91c1c; }
.result-invalid .status-symbol { color: #b91c1c; background: #fef2f2; }
.result-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 0 30px; margin-bottom: 0; }
.result-fact { min-width: 0; padding: 16px 0; border-top: 1px solid var(--line); }
.result-fact-wide { grid-column: 1 / -1; }
.result-facts dt { font-weight: 400; font-size: 12px; color: var(--muted); margin-bottom: 7px; }
.result-facts dd { font-size: 16px; margin: 0; line-height: 1.6; overflow-wrap: anywhere; }
.result-fact:first-child dd { font-size: 25px; font-weight: 700; letter-spacing: 2px; font-variant-numeric: tabular-nums; }
.result-narrative { color: var(--muted); border-top: 1px solid var(--line); font-size: 13px; margin: 18px 0 0; padding-top: 18px; }
.table { --bs-table-bg: #fff; --bs-table-color: var(--ink); font-size: 14px; vertical-align: middle; }
.table th { padding: 15px; background: #f4f2f0; font-size: 11px; color: var(--muted); font-weight: 600; }
.table td { padding: 15px; }
.table-responsive { border: 1px solid var(--line); border-radius: 0; margin-bottom: 24px; }
.table-responsive .table { margin: 0; }
.table tr:last-child td { border-bottom: 0; }
.table tr[data-valid="1"] td:nth-child(2) { color: #15803d; }
.table tr[data-valid="0"] td:nth-child(2) { color: #b91c1c; }
.more-tools { display: flex; align-items: center; justify-content: space-between; gap: 24px; border-top: 1px solid var(--line); padding: 35px 0 50px; }
.more-tools .eyebrow { margin-bottom: 10px; }
.more-tools h2 { font-size: 23px; letter-spacing: -.5px; margin: 0; }
.more-tools .icon { width: 17px; height: 17px; margin-left: 10px; }

.more-tools p { color: var(--muted); font-size: 14px; margin: 8px 0 0; }
/* Full-width footer, with comfortable link targets on every screen. */
.site-footer { background: #000; color: #fff; margin-top: 28px; }
.footer-main { display: grid; grid-template-columns: 1.7fr 1fr 1fr 1.15fr; gap: 40px; padding-top: 68px; padding-bottom: 64px; }
.footer-main .brand { color: #fff; font-size: 40px; gap: 13px; }
.footer-main .brand:hover { color: #fff; }
.footer-main .brand-logo { width: 260px; }
.footer-main p { font-size: 16px; color: #bdbdbd; line-height: 1.65; margin: 20px 0 0; max-width: 295px; }
.footer-main nav { display: flex; flex-direction: column; align-items: flex-start; }
.footer-main nav h2 { color: #fff; font-size: 19px; font-weight: 700; margin: 7px 0 20px; }
.footer-main nav a { display: flex; align-items: center; min-height: 40px; color: #bdbdbd; font-size: 14px; line-height: 1.5; text-decoration: none; padding: 8px 0; }
.footer-main nav a:hover, .footer-bottom a:hover { color: #fff; text-decoration: underline; }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-top: 24px; padding-bottom: 28px; border-top: 1px solid #292929; font-size: 12px; color: #a6a6a6; }
.footer-bottom div { display: flex; gap: 20px; }
.footer-bottom a { color: #bdbdbd; text-decoration: none; padding-block: 8px; }
.footer-bottom a + a { border-left: 1px solid #292929; padding-left: 20px; }
.mobile-shortcuts { display: none; }
@media (min-width: 992px) { .navbar-expand-lg .menu-toggle { display: none; } }
@media (max-width: 1199px) {
    .site-header .navbar { min-height: 58px; }
    .site-header .nav-link { padding-block: 19px; }
    .reference-hero h1 { font-size: 54px; }
    .egn-diagram { padding-left: 28px; }
    .tool-panel { padding: 20px; }
    .developer-banner { gap: 36px; padding-inline: 30px; }
}
@media (min-width: 768px) and (max-width: 991px) {
    .reference-hero { gap: 22px; grid-template-columns: 1.15fr 1fr; }
    .reference-hero h1 { font-size: 43px; }
    .hero-description { font-size: 17px; }
    .egn-fields { grid-template-columns: 1fr; gap: 10px; }
    .egn-diagram { padding-left: 22px; }
    .egn-structure { gap: 8px; }
    .digit-tile { font-size: 27px; letter-spacing: 0; height: 56px; }
    .digit-group strong { font-size: 13px; }
    .digit-group > span:last-child { font-size: 11px; }
    .tool-grid { grid-template-columns: repeat(2, 1fr); }
    .developer-banner { gap: 22px; padding: 24px; }
    .developer-copy h2 { font-size: 29px; }
    .developer-copy p { font-size: 15px; }
    .footer-main { gap: 22px; }
}
@media (max-width: 991px) {
    .site-header .navbar { min-height: 64px; padding-block: 8px; }
    .site-header .navbar-nav { gap: 0; align-items: stretch; padding: 8px 0 12px; }
    .site-header .nav-link { padding: 14px 8px; min-height: 48px; width: 100%; text-align: left; }
    .site-header .nav-link.active { color: var(--accent); }
    .site-header .nav-link:not(.dropdown-toggle).active::after { display: none; }
    .dropdown-menu { box-shadow: none; }
    .step-label { display: none; }
    .tool-hero { gap: 26px; }
}
@media (max-width: 767px) {
    body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
    .container { padding-inline: 20px; }
    .brand { font-size: 25px; gap: 9px; }
    .site-header .brand-logo { width: 170px; }
    .page-breadcrumb { padding-top: 16px; }
    .breadcrumb { font-size: 11px; }
    .reference-hero, .tool-hero { display: flex; flex-direction: column; align-items: stretch; gap: 20px; padding: 26px 0 22px; }
    .hero-badge { font-size: 12px; padding: 5px 12px; margin-bottom: 17px; }
    h1, .reference-hero h1, .tool-hero h1 { font-size: 40px; line-height: 1.04; letter-spacing: -1.6px; margin-bottom: 14px; }
    .hero-description, .tool-hero .hero-description { font-size: 16px; line-height: 1.45; margin-bottom: 22px; }
    .tool-panel { padding: 18px; border-radius: 0; }
    .validator-panel { margin-left: 0; }
    .panel-caption { margin-bottom: 18px; font-size: 14px; }
    .form-label { font-size: 13px; }
    .egn-fields { grid-template-columns: 1fr; gap: 12px; }
    .egn-input { height: 54px; font-size: 25px; letter-spacing: 3px; }
    .egn-input::placeholder { font-size: 19px; letter-spacing: 2px; }
    .tool-submit { min-height: 50px; margin-top: 16px; }
    .tool-note { margin-top: 14px; font-size: 11px; gap: 8px; align-items: flex-start; }
    .tool-note .icon { width: 21px; height: 21px; }
    .egn-diagram { margin: 0; padding: 0; border: 0; }
    .diagram-desktop { display: none; }
    .diagram-mobile { display: block; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--muted); }
    .diagram-mobile summary { padding: 8px 0 15px; min-height: 44px; cursor: pointer; }
    .diagram-mobile[open] summary { color: var(--accent); }
    .diagram-mobile .diagram-title { display: none; }
    .diagram-mobile .egn-structure { padding: 10px 0 22px; gap: 12px; }
    .digit-tile { font-size: 29px; letter-spacing: 1px; height: 54px; }
    .digit-group strong { font-size: 13px; }
    .digit-group > span:last-child { font-size: 11px; }
    .benefits-strip { padding: 0 0 23px; }
    .benefits-strip > div { flex-direction: column; gap: 8px; font-size: 11px; min-height: 44px; text-align: center; }
    .benefits-strip .icon { width: 21px; height: 21px; }
    .tool-directory { padding: 27px 0 30px; }
    .section-heading { margin-bottom: 19px; }
    .section-heading h2 { font-size: 28px; letter-spacing: -.7px; margin-bottom: 7px; }
    .section-heading p { font-size: 14px; line-height: 1.5; }
    .tool-grid { grid-template-columns: 1fr; gap: 12px; }
    .tool-link { display: grid; grid-template-columns: 43px minmax(0, 1fr); column-gap: 14px; row-gap: 5px; min-height: 125px; padding: 18px 35px 18px 16px; align-content: center; }
    .tool-link-icon { grid-row: 1 / 3; width: 43px; height: 43px; margin: 0; }
    .tool-link-icon .icon { width: 26px; height: 26px; }
    .tool-link h2, .tool-link h3 { font-size: 18px; margin: 0; letter-spacing: -.3px; }
    .tool-link p { grid-column: 2; font-size: 13px; line-height: 1.4; }
    .tool-link-arrow { right: 12px; bottom: 12px; }
    .tool-link-arrow .icon { width: 17px; height: 17px; }
    .developer-banner { grid-template-columns: 1fr; padding: 24px 20px; gap: 24px; }
    .developer-copy h2 { font-size: 31px; line-height: 1.06; }
    .developer-copy p { font-size: 15px; line-height: 1.45; }
    .developer-copy .btn { font-size: 13px; width: 100%; padding-inline: 10px; }
    .developer-copy .icon { margin-left: 10px; }
    .code-window-title { padding: 11px 12px; gap: 12px; font-size: 10px; }
    .window-dots { gap: 5px; }
    .window-dots i { width: 8px; height: 8px; }
    .code-window pre { font-size: 10px; padding: 12px; line-height: 1.5; }
    .page-heading { padding: 28px 0 5px; }
    .page-heading h1 { font-size: 35px; letter-spacing: -1.3px; }
    .article-content { font-size: 14px; padding: 20px 0 30px; line-height: 1.8; }
    .article-content h2 { font-size: 21px; }
    .article-content h3 { font-size: 18px; }
    .result-panel { padding: 21px; border-radius: 0; margin-bottom: 24px; scroll-margin-top: 16px; }
    .result-panel > h2 { font-size: 24px; }
    .result-facts { grid-template-columns: 1fr 1fr; gap: 0 18px; }
    .result-fact:nth-child(-n+2) { grid-column: 1 / -1; }
    .tool-hero-compact .hero-description, .tool-hero-compact .panel-caption { display: none; }
    .result-fact { padding: 13px 0; }
    .result-facts dd { font-size: 15px; }
    .result-fact:first-child dd { font-size: 25px; }
    .result-panel > p { font-size: 14px; }
    .table { font-size: 12px; }
    .table td, .table th { padding: 12px 9px; }
    .table th { font-size: 10px; }
    .more-tools { display: block; padding: 26px 0 35px; }
    .more-tools h2 { font-size: 22px; line-height: 1.3; }
    .more-tools .btn { margin-top: 16px; }
    .footer-main { grid-template-columns: 1fr 1fr; gap: 32px 20px; padding-top: 48px; padding-bottom: 40px; }
    .footer-main .brand { font-size: 36px; }
    .footer-main p { font-size: 15px; margin-top: 16px; max-width: 340px; }
    .footer-main nav h2 { font-size: 18px; margin: 0 0 14px; }
    .footer-main nav:last-child { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; column-gap: 20px; }
    .footer-main nav:last-child h2 { grid-column: 1 / -1; }
    .footer-brand { grid-column: 1 / -1; }
    .footer-main nav a { min-height: 44px; font-size: 13px; }
    .footer-bottom { flex-direction: column; align-items: flex-start; font-size: 11px; gap: 12px; padding-block: 24px; }
    .footer-bottom div { flex-wrap: wrap; gap: 10px; }
    .footer-bottom a + a { padding-left: 10px; }
    .mobile-shortcuts { display: grid; grid-template-columns: repeat(3, 1fr); position: fixed; bottom: 0; inset-inline: 0; background: white; border-top: 1px solid var(--line); z-index: 1030; padding: 5px 12px calc(5px + env(safe-area-inset-bottom)); }
    .mobile-shortcuts a { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 3px; min-height: 49px; color: var(--muted); font-size: 11px; text-decoration: none; border-radius: 0; }
    .mobile-shortcuts a[aria-current] { color: var(--accent); background: #fff1e7; }
    .mobile-shortcuts .icon { width: 21px; height: 21px; }
}
@media (max-width: 359px) {
    .container { padding-inline: 16px; }
    h1, .reference-hero h1, .tool-hero h1 { font-size: 34px; }
    .tool-panel { padding: 15px; }
    .benefits-strip > div { font-size: 10px; gap: 4px; }
    .benefits-strip .icon { width: 18px; height: 18px; }
    .tool-link { padding-left: 13px; gap: 5px 10px; }
    .tool-link h2, .tool-link h3 { font-size: 16px; }
    .tool-link p { font-size: 12px; }
    .developer-banner { padding: 22px 16px; }
    .developer-copy h2 { font-size: 28px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }
/* Shared tool pages: heading, settings and results, reference and help. */
.workbench-heading { padding: 27px 0 28px; }
.workbench-heading h1 { font-size: clamp(36px, 4.5vw, 54px); line-height: 1.06; letter-spacing: -1.6px; margin-bottom: 10px; }
.workbench-heading .hero-description { max-width: 1000px; font-size: 20px; line-height: 1.45; margin: 0; }
.tool-workbench { display: grid; grid-template-columns: 1.15fr 1fr; gap: 20px; align-items: stretch; margin-bottom: 22px; }
.tool-workbench > *, .reference-grid > * { min-width: 0; }
.workbench-form { background: white; padding: 23px; border-radius: 0; }
.workbench-form > h2, .output-heading h2, .century-guide > h2 { font-size: 25px; font-weight: 750; letter-spacing: -.6px; line-height: 1.2; margin: 0 0 22px; }
.workbench-form .egn-fields { grid-template-columns: 1fr; }
.workbench-form .egn-input { font-size: 23px; letter-spacing: 1px; }
.workbench-form .egn-input::placeholder { font-size: 17px; }
.workbench-form .tool-submit { min-height: 47px; border-radius: 0; }
.workbench-form .form-control, .workbench-form .form-select { border-radius: 0; min-height: 44px; padding-block: 10px; }
.workbench-form .date-part-label { color: var(--muted); font-size: 12px; font-weight: 400; margin-bottom: 5px; }
.workbench-form .gender-options-row { gap: 0; }
.workbench-form .gender-options .form-check-label { border-radius: 0; min-height: 44px; }
.workbench-form .gender-options .form-check:first-child label { border-radius: 0; }
.workbench-form .gender-options .form-check:last-child label { border-radius: 0; }
.workbench-form .gender-options .form-check + .form-check label { border-left: 0; }
.workbench-form .gender-options .form-check-input:checked + label { background: var(--accent); color: white; border-color: var(--accent); }
.quantity-setting { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.quantity-setting .form-label { width: auto; margin: 0; }
.quantity-setting .form-text { margin: 0; }
.quantity-control { display: flex; align-items: stretch; border: 1px solid #d8d0ca; border-radius: 0; overflow: hidden; }
.quantity-control button { width: 44px; border: 0; background: white; font-size: 22px; color: var(--ink); }
.quantity-control button:hover { background: #fff1e7; color: var(--accent); }
.quantity-control input { width: 66px; text-align: center; border: 0; border-radius: 0; border-inline: 1px solid var(--line); appearance: textfield; }
.quantity-control input::-webkit-inner-spin-button { appearance: none; }
.output-panel { border: 1px solid #ded5ce; border-radius: 0; background: #fffaf7; min-height: 100%; overflow: hidden; }
.output-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: #fff1e7; padding: 20px; }
.output-heading h2 { margin: 0; font-size: 23px; }
.result-count { color: var(--accent); background: #ffdfc9; border-radius: 0; padding: 4px 10px; font-size: 12px; white-space: nowrap; }
.result-count:empty { display: none; }
.result-placeholder { text-align: center; padding: 34px 24px; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 270px; }
.placeholder-icon { display: grid; place-items: center; width: 76px; height: 76px; border-radius: 0; background: #f3f0ee; color: var(--accent); margin-bottom: 18px; }
.placeholder-icon .icon { width: 36px; height: 36px; }
.result-placeholder h3 { font-size: 20px; font-weight: 700; margin: 0 0 8px; }
.result-placeholder p { font-size: 14px; line-height: 1.5; color: var(--muted); max-width: 370px; margin: 0; }
.generator-output [data-result] { padding: 0 18px 16px; scroll-margin-top: 20px; }
[data-result]:focus { outline: none; }
.generated-table { max-height: 355px; overflow: auto; border: 0; border-radius: 0; margin: 0 0 20px; }
.generated-table .table { --bs-table-bg: transparent; }
.generated-table .table td { padding: 6px 7px; }
.generated-table td:first-child { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: 1.6px; font-size: 21px; }
.generated-table td:nth-child(2) { font-size: 11px; text-align: right; }
.generated-table td:last-child { width: 42px; text-align: right; }
.copy-number { display: grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: 0; background: transparent; color: var(--muted); }
.copy-number:hover { color: var(--accent); background: #ffeadb; }
.copy-number .icon { width: 18px; height: 18px; }
.result-actions { display: flex; gap: 12px; }
.result-actions .btn { flex: 1; font-size: 13px; padding-inline: 8px; border-radius: 0; }
.result-actions .icon { width: 19px; height: 19px; margin-right: 5px; }
.copy-status { color: var(--muted); font-size: 12px; margin: 10px 0 0; min-height: 18px; }
.workbench-output > .result-panel { height: 100%; margin: 0; max-width: none; padding: 24px; background: #fffaf7; border-radius: 0; }
.workbench-output .table-responsive { max-height: 450px; overflow: auto; }
.tool-info-bar { display: flex; gap: 12px; align-items: center; border: 1px solid #efbc98; border-radius: 0; color: #9a3412; background: #fff3eb; padding: 13px 17px; margin: 0 0 24px; font-size: 14px; line-height: 1.5; }
.tool-help { margin: 30px 0 22px; }
.tool-help > h2, .region-reference > h2, .region-details > h2 { font-size: 30px; font-weight: 750; letter-spacing: -.7px; margin-bottom: 18px; }
.help-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; }
.help-card { display: flex; align-items: flex-start; gap: 16px; border: 1px solid var(--line); border-radius: 0; padding: 20px; }
.help-card > .icon { width: 30px; height: 30px; color: var(--accent); }
.help-card h3 { font-size: 19px; font-weight: 700; margin: 0 0 8px; }
.help-card p { font-size: 13px; color: var(--muted); line-height: 1.5; margin: 0; }
.tool-api-link { display: flex; align-items: center; gap: 20px; border: 1px solid var(--line); border-radius: 0; padding: 18px 22px; margin: 20px 0; }
.tool-api-link > .icon { width: 32px; height: 32px; color: var(--accent); }
.tool-api-link h2 { font-size: 19px; font-weight: 700; margin: 0 0 4px; }
.tool-api-link p { color: var(--muted); font-size: 14px; margin: 0; }
.tool-api-link .btn { margin-left: auto; white-space: nowrap; }
.tool-api-link .btn .icon { width: 18px; height: 18px; }
.region-workbench { grid-template-columns: .85fr 1.15fr; }
.region-tabs { display: grid; grid-template-columns: 1fr 1fr; margin-bottom: 18px; border: 1px solid #d8d0ca; border-radius: 0; overflow: hidden; }
.region-tabs button { width: 100%; min-height: 44px; background: white; color: var(--ink); border: 0; font-size: 15px; font-weight: 600; }
.region-tabs button.active { background: var(--accent); color: white; }
.region-workbench .result-placeholder { border: 1px solid var(--line); border-radius: 0; background: #faf8f6; min-height: 185px; margin-top: 20px; padding: 20px 14px; }
.region-workbench .placeholder-icon { width: 64px; height: 64px; margin-bottom: 12px; }
.region-workbench .result-placeholder h3 { font-size: 18px; }
.region-summary { border: 1px solid #efbc98; border-radius: 0; padding: 20px; background: #fff1e6; margin-top: 22px; scroll-margin-top: 20px; }
.region-summary .result-label { font-size: 14px; font-weight: 700; margin-bottom: 10px; }
.region-summary-title { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.region-summary-title > .icon { width: 32px; height: 32px; color: var(--accent); }
.region-summary h2 { font-size: 27px; font-weight: 750; margin: 0; letter-spacing: -.5px; }
.region-summary > p:not(.result-label) { font-size: 16px; margin: 5px 0 0 44px; }
.region-map-panel { height: 100%; display: flex; flex-direction: column; justify-content: center; border: 1px solid #ded5ce; border-radius: 0; padding: 24px; text-align: center; }
.region-map { display: block; width: 100%; height: auto; flex-shrink: 0; margin-bottom: 22px; }
.region-map path { fill: #dedbd8; stroke: white; stroke-width: 1.5; stroke-linejoin: round; transition: fill .15s; }
.region-map a:hover path, .region-map a:focus-visible path { fill: #f7ad79; }
.region-map a[aria-current] path { fill: var(--accent); }
.region-map-panel p { color: var(--muted); font-size: 14px; margin-bottom: 8px; }
.region-map-panel small { color: #6b7280; font-size: 11px; line-height: 1.5; }
.region-reference { margin: 36px 0 30px; }
.region-reference > h2 { margin-bottom: 7px; }
.region-reference > p { color: var(--muted); font-size: 16px; margin-bottom: 22px; }
.reference-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 22px; align-items: stretch; }
.region-table-panel { min-width: 0; }
.region-search { position: relative; margin-bottom: 12px; }
.region-search > .icon { position: absolute; top: 12px; left: 13px; width: 20px; height: 20px; color: var(--muted); }
.region-search .form-control { min-height: 44px; padding: 10px 12px 10px 43px; font-size: 14px; border-radius: 0; }
.region-table-scroll { max-height: 294px; overflow: auto; margin-bottom: 0; }
.region-table-scroll th { position: sticky; top: 0; z-index: 1; background: #f2efed; font-size: 12px; color: var(--ink); }
.region-table-scroll td, .region-table-scroll th { padding: 9px 14px; }
.region-table-scroll td:last-child { text-align: center; width: 42px; }
.region-table-scroll td:last-child a { display: inline-grid; place-items: center; min-width: 26px; min-height: 26px; }
.region-table-scroll td:nth-child(2) { white-space: nowrap; font-variant-numeric: tabular-nums; }
.region-table-scroll td:first-child a { color: var(--ink); text-decoration: none; }
.region-table-scroll td:first-child a:hover { color: var(--accent); }
.region-table-scroll .icon { width: 19px; height: 19px; }
.region-search-status { font-size: 12px; color: var(--muted); margin: 8px 0 0; }
.region-search-status:empty { display: none; }
.digit-guide { border: 1px solid #ded5ce; border-radius: 0; padding: 24px; margin-bottom: 24px; }
.reference-grid .digit-guide { margin-bottom: 0; }
.digit-guide h2 { font-size: 24px; font-weight: 700; margin-bottom: 10px; }
.digit-guide > p { font-size: 15px; color: var(--muted); line-height: 1.5; }
.digit-sequence { display: grid; grid-template-columns: repeat(10, minmax(0,1fr)); gap: 5px; margin: 28px 0; }
.digit-sequence span { display: grid; place-items: center; height: 44px; border: 1px solid #d8d0ca; border-radius: 0; font-size: 21px; font-weight: 600; }
.digit-sequence .digit-highlight, .digit-highlight { background: var(--accent); color: white; border-color: var(--accent); }
.digit-guide .digit-caption, .digit-caption { display: flex; align-items: center; gap: 10px; background: #f4f1ef; color: var(--muted); padding: 12px; border-radius: 0; font-size: 13px; margin: 0; }
.region-details { border: 1px solid var(--line); border-radius: 0; padding: 24px; margin: 26px 0; }
.region-details p, .region-details dd { color: var(--muted); font-size: 14px; line-height: 1.65; }
.region-details dt { font-size: 14px; margin-top: 10px; }
.region-capacity { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.region-capacity dd { font-size: 22px; color: var(--ink); }
.century-guide { padding: 24px; }
.century-guide > p { color: var(--muted); line-height: 1.6; font-size: 15px; }
.century-example { display: flex; justify-content: center; gap: 14px; margin: 32px 0 18px; }
.century-example span { padding: 12px 22px; border: 1px solid var(--line); border-radius: 0; font-size: 32px; font-weight: 600; font-variant-numeric: tabular-nums; }
.century-guide .century-date { font-size: 20px; text-align: center; font-weight: 600; color: var(--ink); }
@media (max-width: 991px) {
    .tool-workbench, .region-workbench { grid-template-columns: 1fr 1fr; gap: 16px; }
    .workbench-form { padding: 18px; }
    .workbench-form > h2, .output-heading h2 { font-size: 21px; }
    .quantity-setting { gap: 12px; }
    .result-actions { flex-direction: column; }
    .generated-table td:first-child { font-size: 18px; letter-spacing: 1px; }
    .generated-table td:nth-child(2) { font-size: 10px; }
    .region-map-panel { padding: 18px; }
    .reference-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
    .digit-guide { padding: 18px; }
    .digit-sequence { gap: 3px; }
    .digit-sequence span { height: 36px; font-size: 16px; }
}
@media (max-width: 767px) {
    .workbench-heading { padding: 23px 0; }
    .workbench-heading h1 { font-size: 36px; letter-spacing: -1px; margin-bottom: 10px; }
    .workbench-heading .hero-description { font-size: 16px; line-height: 1.4; }
    .tool-workbench, .region-workbench, .reference-grid { grid-template-columns: 1fr; gap: 18px; }
    .workbench-form > h2 { font-size: 23px; margin-bottom: 20px; }
    .workbench-form .egn-input { height: 52px; }
    .workbench-form .tool-submit { min-height: 48px; }
    .workbench-form .form-control, .workbench-form .form-select { font-size: 16px; }
    .output-heading { padding: 18px; }
    .output-heading h2 { font-size: 22px; }
    .result-placeholder { min-height: 215px; padding: 26px 20px; }
    .result-placeholder h3 { font-size: 19px; }
    .result-placeholder p { font-size: 13px; }
    .placeholder-icon { width: 60px; height: 60px; margin-bottom: 13px; }
    .placeholder-icon .icon { width: 29px; height: 29px; }
    .result-actions { flex-direction: row; gap: 8px; }
    .result-actions .btn { font-size: 12px; }
    .result-actions .icon { width: 16px; height: 16px; margin-right: 2px; }
    .generated-table td:first-child { font-size: 19px; }
    .copy-number { width: 38px; height: 44px; }
    .workbench-output > .result-panel { padding: 20px; }
    .tool-info-bar { font-size: 13px; align-items: flex-start; padding: 13px; }
    .tool-help { margin-top: 26px; }
    .tool-help > h2, .region-reference > h2, .region-details > h2 { font-size: 25px; line-height: 1.15; }
    .help-grid { grid-template-columns: 1fr; gap: 12px; }
    .help-card { padding: 18px; gap: 13px; }
    .help-card h3 { font-size: 18px; }
    .tool-api-link { flex-wrap: wrap; padding: 18px; gap: 13px; }
    .tool-api-link > div { flex: 1; }
    .tool-api-link h2 { font-size: 18px; }
    .tool-api-link p { font-size: 13px; }
    .tool-api-link .btn { width: 100%; }
    .region-summary { padding: 17px; }
    .region-summary h2 { font-size: 24px; }
    .region-map-panel { padding: 18px; }
    .region-map-panel p { font-size: 13px; }
    .region-map-panel small { font-size: 10px; }
    .region-reference { margin-top: 28px; }
    .region-reference > p { font-size: 14px; }
    .region-table-scroll td, .region-table-scroll th { padding: 8px 9px; }
    .region-table-scroll td:first-child a { display: flex; align-items: center; min-height: 28px; }
    .region-table-scroll td:last-child a { min-height: 28px; }
    .digit-guide h2 { font-size: 22px; }
    .digit-guide > p { font-size: 14px; }
    .digit-sequence { gap: 4px; margin-block: 22px; }
    .digit-sequence span { height: 38px; font-size: 18px; }
    .digit-guide .digit-caption { font-size: 12px; }
    .region-details { padding: 18px; }
    .region-capacity { grid-template-columns: 1fr; gap: 0; }
    .century-guide { padding: 20px; }
    .century-example span { padding: 10px 18px; }
}
@media (max-width: 359px) {
    .workbench-heading h1 { font-size: 32px; }
    .workbench-form { padding: 15px; }
    .quantity-setting { gap: 10px; }
    .quantity-control input { width: 54px; }
    .result-actions { flex-direction: column; }
    .generated-table td:first-child { font-size: 16px; }
    .digit-sequence { gap: 3px; }
    .digit-sequence span { font-size: 15px; height: 34px; }
}

/* Inline checker: form and result on the left, explanation on the right. */
.checker-heading { padding-block: 32px 28px; }
.checker-workspace { display: grid; grid-template-columns: 1.12fr 1fr; gap: 22px; align-items: start; margin-bottom: 28px; }
.checker-main, .checker-aside { min-width: 0; }
.checker-form, .checker-readout, .checker-explanation, .checker-empty { border: 1px solid #ded5ce; border-radius: 0; background: white; }
.checker-form { padding: 21px; margin-bottom: 18px; }
.checker-form > h2, .checker-readout h2, .checker-explanation h2 { font-size: 25px; font-weight: 750; letter-spacing: -.5px; margin: 0 0 18px; }
.egn-form .egn-fields { grid-template-columns: minmax(0, 1fr) auto; }
.egn-form .egn-input { height: 52px; font-size: 24px; font-weight: 600; letter-spacing: 1px; }
.egn-form .egn-fields .tool-submit { min-height: 52px; padding-inline: 20px; }
.egn-form .form-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.egn-form .egn-input::placeholder { font-size: 16px; font-weight: 400; letter-spacing: 0; }
.validation-feedback { color: #a51e1e; font-size: 14px; margin: 14px 0 0; }
.checker-empty { background: #faf8f6; }
.checker-empty .result-placeholder { min-height: 270px; }
.checker-readout, .checker-explanation { padding: 22px; }
.checker-explanation { margin-top: 18px; }
.checker-explanation ul { padding-left: 20px; margin: 0; }
.checker-explanation li { color: var(--muted); font-size: 14px; line-height: 1.5; margin-bottom: 13px; padding-left: 3px; }
.checker-explanation li:last-child { margin-bottom: 0; }
.checker-explanation li::marker { color: var(--accent); }
.checker-explanation strong { color: var(--ink); }
.number-readout { display: grid; grid-template-columns: 6fr 3fr 1.25fr; gap: 15px; padding: 5px 0; }
.number-group { min-width: 0; text-align: center; }
.number-digits { display: flex; gap: 4px; }
.number-digits span { flex: 1; min-width: 0; display: grid; place-items: center; height: 40px; border: 1px solid #d8cec6; border-radius: 0; font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; }
.number-readout-filled .number-digits span { background: #fff1e7; border-color: #efbc98; }
.number-bracket { position: relative; display: block; border: 1px solid var(--accent); border-top: 0; height: 10px; border-radius: 0; margin-top: 6px; margin-bottom: 18px; }
.number-bracket::after { position: absolute; content: ''; top: 100%; left: 50%; width: 1px; height: 11px; background: var(--accent); }
.number-label { display: inline-block; font-size: 11px; color: #9a3412; font-weight: 600; background: #fff1e7; border-radius: 0; padding: 6px 7px; white-space: nowrap; }
.readout-description { color: var(--muted); font-size: 13px; line-height: 1.5; margin: 18px 0 0; }
.checker-result { border: 1px solid #63b75e; border-radius: 0; overflow: hidden; scroll-margin-top: 18px; }
.checker-result:focus { outline: none; }
.checker-result-heading { display: flex; gap: 14px; align-items: flex-start; padding: 18px 21px; background: #effbea; }
.checker-status-icon { display: grid; place-items: center; width: 39px; height: 39px; flex-shrink: 0; color: white; background: #208b15; border-radius: 0; }
.checker-status-icon .icon { width: 27px; height: 27px; }
.checker-result-heading h2 { font-size: 24px; font-weight: 750; letter-spacing: -.4px; color: #155c10; margin: 0 0 5px; }
.checker-result-heading p { color: #4c5c4c; font-size: 13px; line-height: 1.4; margin: 0; }
.checker-result-body { padding: 10px 21px 17px; }
.validation-facts { margin: 0 0 12px; }
.validation-facts > div { display: grid; grid-template-columns: 1.15fr 1fr; gap: 16px; align-items: baseline; border-bottom: 1px solid var(--line); padding: 12px 0; }
.validation-facts > div:last-child { border-bottom: 0; }
.validation-facts dt { display: flex; align-items: center; gap: 12px; font-size: 14px; font-weight: 600; }
.validation-facts dt .icon { width: 21px; height: 21px; }
.validation-facts dd { font-size: 15px; margin: 0; overflow-wrap: anywhere; }
.validation-facts dd a { color: var(--ink); text-decoration: none; }
.validation-facts dd a:hover { color: var(--accent); text-decoration: underline; }
.validation-facts .checksum-match { color: #18700f; font-weight: 700; }
.validation-details { border-top: 1px solid var(--line); margin-bottom: 14px; }
.validation-details summary { padding: 13px 0; font-size: 13px; color: var(--muted); cursor: pointer; }
.validation-details .result-facts dd { font-size: 14px; }
.check-another { display: inline-flex; align-items: center; gap: 8px; border: 0; background: transparent; padding: 8px 0; min-height: 44px; color: var(--accent); font-size: 14px; font-weight: 600; }
.check-another .icon { width: 21px; height: 21px; }
.checker-invalid { border-color: #dc8e8e; }
.checker-invalid .checker-result-heading { background: #fff0f0; }
.checker-invalid .checker-status-icon { background: #b91c1c; }
.checker-invalid .checker-result-heading h2 { color: #a11c1c; }
.checker-invalid .checker-result-heading p { color: #704a4a; }
.checker-invalid .checker-result-body > p { font-size: 14px; line-height: 1.6; color: var(--muted); margin: 12px 0; }
.checker-help { margin-top: 28px; }
.related-tools { margin: 28px 0 36px; }
.related-tools > h2 { font-size: 25px; font-weight: 750; margin-bottom: 18px; }
.related-tools-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.related-tool { display: flex; align-items: center; gap: 14px; border: 1px solid var(--line); border-radius: 0; padding: 18px; color: var(--accent); text-decoration: none; }
.related-tool > .icon:first-child { width: 29px; height: 29px; }
.related-tool > .icon:last-child { width: 17px; height: 17px; margin-left: auto; }
.related-tool h3 { font-size: 16px; font-weight: 700; margin: 0 0 5px; }
.related-tool p { color: var(--muted); font-size: 12px; line-height: 1.5; margin: 0; }
.related-tool:hover { border-color: var(--accent); }
@media (min-width: 768px) and (max-width: 991px) {
    .checker-workspace { grid-template-columns: 1fr 1fr; gap: 16px; }
    .checker-form, .checker-readout, .checker-explanation { padding: 17px; }
    .egn-form .egn-fields { gap: 8px; }
    .egn-form .egn-input { font-size: 18px; letter-spacing: 0; padding-inline: 10px; }
    .egn-form .egn-fields .tool-submit { font-size: 13px; padding-inline: 10px; }
    .checker-form > h2, .checker-readout h2, .checker-explanation h2 { font-size: 22px; }
    .number-readout { gap: 8px; }
    .number-digits { gap: 3px; }
    .number-digits span { font-size: 17px; height: 34px; }
    .number-label { font-size: 9px; padding-inline: 3px; }
    .checker-result-body, .checker-result-heading { padding-inline: 16px; }
    .validation-facts > div { grid-template-columns: 1fr; gap: 6px; }
    .validation-facts dd { padding-left: 33px; }
    .related-tools-grid { grid-template-columns: 1fr; }
}
@media (max-width: 767px) {
    .checker-heading { padding: 25px 0 22px; }
    .checker-workspace { grid-template-columns: 1fr; gap: 20px; margin-bottom: 24px; }
    .checker-form { padding: 18px; }
    .checker-form > h2 { font-size: 23px; margin-bottom: 16px; }
    .egn-form .egn-fields { grid-template-columns: minmax(0,1fr) auto; gap: 9px; }
    .egn-form .egn-input { font-size: 19px; letter-spacing: .3px; padding-inline: 10px; }
    .egn-form .egn-input::placeholder { font-size: 12px; letter-spacing: 0; }
    .egn-form .egn-fields .tool-submit { font-size: 13px; padding-inline: 12px; }
    .checker-empty .result-placeholder { min-height: 210px; }
    .checker-readout, .checker-explanation { padding: 18px; }
    .checker-readout h2, .checker-explanation h2 { font-size: 23px; }
    .number-readout { gap: 9px; }
    .number-digits { gap: 4px; }
    .number-digits span { height: 37px; font-size: 19px; }
    .number-label { font-size: 10px; padding: 5px 4px; }
    .checker-explanation li { font-size: 13px; }
    .checker-result-heading { gap: 11px; padding: 16px; }
    .checker-status-icon { width: 34px; height: 34px; }
    .checker-status-icon .icon { width: 23px; height: 23px; }
    .checker-result-heading h2 { font-size: 22px; }
    .checker-result-heading p { font-size: 12px; }
    .checker-result-body { padding-inline: 16px; }
    .validation-facts > div { grid-template-columns: 1fr 1fr; gap: 10px; padding-block: 11px; }
    .validation-facts dt { font-size: 12px; gap: 8px; }
    .validation-facts dt .icon { width: 18px; height: 18px; }
    .validation-facts dd { font-size: 13px; }
    .related-tools-grid { grid-template-columns: 1fr; gap: 12px; }
    .related-tool { padding: 17px; }
}
@media (max-width: 359px) {
    .checker-form { padding: 15px; }
    .egn-form .egn-input { font-size: 17px; }
    .egn-form .egn-fields .tool-submit { font-size: 12px; padding-inline: 8px; }
    .checker-readout { padding: 15px; }
    .number-readout { gap: 6px; }
    .number-digits { gap: 3px; }
    .number-digits span { font-size: 15px; height: 32px; }
    .number-label { font-size: 9px; padding-inline: 2px; }
    .validation-facts dt { gap: 5px; }
}

@media (min-width: 992px) { .site-header .dropdown-toggle.active { color: var(--accent); box-shadow: inset 0 -3px var(--accent); } }
.workbench-form fieldset > legend { float: none; margin-bottom: 8px; }

/* Compact validation API reference; all examples are stored in the page record. */
.api-page-heading { max-width: none; padding: 25px 0 22px; }
.api-page-heading h1 { font-size: 42px; margin-bottom: 10px; letter-spacing: -1px; }
.api-page-heading .hero-description { max-width: none; font-size: 17px; line-height: 1.5; margin: 0; }
.api-empty-content { display: none; }
.api-doc-content { max-width: none; padding: 0 0 28px; font-size: 14px; line-height: 1.5; }
.api-doc-content h2 { font-size: 22px; letter-spacing: -.3px; margin: 0 0 14px; }
.api-doc-content p { margin-bottom: 12px; }
.api-docs code { color: #ad3900; font-size: .92em; }
.api-overview { border: 1px solid var(--line); padding: 17px 20px; margin-bottom: 25px; }
.api-endpoint { display: flex; align-items: center; gap: 12px; }
.api-endpoint > span { background: var(--accent); color: white; font-size: 12px; font-weight: 700; padding: 6px 9px; flex-shrink: 0; }
.api-endpoint > code { color: var(--ink); font-size: 16px; overflow-wrap: anywhere; }
.api-meta { display: flex; flex-wrap: wrap; gap: 8px 20px; color: var(--muted); font-size: 12px; margin: 13px 0 10px; }
.api-meta span + span { border-left: 1px solid var(--line); padding-left: 20px; }
.api-overview p { margin: 0; font-size: 13px; }
.api-columns { display: grid; grid-template-columns: 1.1fr 1fr; gap: 22px; align-items: start; }
.api-columns > * { min-width: 0; }
.api-response h2 { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.api-response h2 span { font-size: 11px; font-weight: 400; letter-spacing: 0; color: var(--muted); }
.api-example-tabs { display: flex; border: 1px solid var(--line); border-bottom: 0; background: #faf8f6; }
.api-example-tabs button { min-height: 42px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); padding: 9px 18px; font-size: 13px; font-weight: 600; }
.api-example-tabs button.active { color: var(--accent); border-bottom-color: var(--accent); background: white; }
.api-code-block { background: #161616; color: #f3f0ec; min-width: 0; }
.api-code-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 16px; background: #24211f; color: #c9c3be; font-size: 11px; min-height: 39px; }
.api-code-toolbar button { color: #ffd2b8; background: transparent; border: 0; min-height: 34px; padding: 6px 0 6px 12px; font-size: 11px; }
.api-code-toolbar button:hover { color: white; }
.api-doc-content .api-code-block pre { margin: 0; border: 0; padding: 17px; background: #161616; color: #f3f0ec; font-size: 12px; line-height: 1.65; max-height: 330px; overflow: auto; white-space: pre; }
.api-code-block pre code { color: inherit; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: inherit; }
.api-code-block .syntax-key { color: #ffc39b; }
.api-code-block .syntax-string { color: #c0e99d; }
.api-code-block .syntax-keyword { color: #dbb9ff; }
.api-code-block .syntax-variable { color: #f2c4a6; }
.api-code-block .syntax-number { color: #ffda90; }
.api-doc-content .api-note { color: var(--muted); font-size: 12px; line-height: 1.5; margin: 11px 0 18px; }
.api-details { border: 1px solid var(--line); margin: 5px 0 25px; }
.api-details summary, .api-error-list summary { min-height: 46px; padding: 13px 16px; cursor: pointer; color: var(--ink); font-size: 13px; font-weight: 600; }
.api-fields { padding: 0 16px 5px; }
.api-fields p { font-size: 13px; }
.api-error-list { border: 1px solid var(--line); }
.api-error-list details + details { border-top: 1px solid var(--line); }
.api-error-list summary span { display: inline-block; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; color: #ac3900; margin: 0 10px 0 4px; }
.api-error-list details > p { padding: 0 16px 10px; font-size: 13px; }
.api-error-list .api-code-block { margin: 0 16px 16px; }
@media (max-width: 767px) {
    .api-page-heading { padding-block: 24px 20px; }
    .api-page-heading h1 { font-size: 32px; }
    .api-page-heading .hero-description { font-size: 15px; }
    .api-overview { padding: 14px; margin-bottom: 23px; }
    .api-endpoint { gap: 9px; align-items: flex-start; }
    .api-endpoint > code { font-size: 12px; padding-top: 5px; }
    .api-meta { gap: 8px 12px; font-size: 11px; }
    .api-meta span + span { padding-left: 0; border-left: 0; }
    .api-overview p { font-size: 12px; }
    .api-columns { grid-template-columns: 1fr; gap: 8px; }
    .api-doc-content h2 { font-size: 21px; }
    .api-example-tabs button { flex: 1; min-height: 44px; padding: 9px 7px; font-size: 12px; }
    .api-code-toolbar { padding-inline: 13px; }
    .api-code-toolbar button { min-height: 40px; }
    .api-doc-content .api-code-block pre { padding: 14px; font-size: 11px; }
    .api-details summary, .api-error-list summary { padding: 13px; font-size: 12px; line-height: 1.6; }
    .api-error-list summary span { margin-inline: 2px 5px; }
    .api-error-list .api-code-block { margin-inline: 10px; }
}

.home-faq .accordion {
    --bs-accordion-active-color: var(--ink);
    --bs-accordion-active-bg: #fff0e5;
    --bs-accordion-border-color: var(--line);
    --bs-accordion-btn-focus-box-shadow: 0 0 0 .2rem #f74d0126;
}
.home-faq .accordion-button { font-weight: 600; line-height: 1.45; }
.home-faq .accordion-button::after { filter: grayscale(1); }
.home-faq .accordion-body { color: var(--muted); line-height: 1.65; }
.home-article { max-width: none; }
.home-article > h2:first-child { margin-top: 0; }

/* Chronological reading layout for the EGN history. */
.history-contents { border: 1px solid var(--line); padding: 24px; margin-bottom: 36px; background: var(--surface, #f8f9fa); }
.article-content .history-contents h2 { margin-top: 0; }
.history-contents ol { padding-left: 22px; margin-bottom: 0; }
.history-contents li + li { margin-top: 8px; }
.history-timeline { border-left: 2px solid var(--line); margin-left: 7px; padding-left: 28px; }
.history-period { position: relative; padding-bottom: 28px; scroll-margin-top: 100px; }
.history-period::before { content: ""; position: absolute; left: -36px; top: 8px; width: 14px; height: 14px; background: #f74d01; border: 3px solid #fff; }
.article-content .history-era { display: inline-block; color: #a33200; background: #fff0e9; padding: 4px 12px; margin-bottom: 12px; font-weight: 700; font-size: 14px; letter-spacing: .03em; }
.article-content .history-period h2 { margin-top: 0; }
.history-period:last-child { padding-bottom: 0; }
.content-updated { padding-bottom: 16px; border-bottom: 1px solid var(--line); font-size: 14px; }
@media (max-width: 575.98px) {
    .history-contents { padding: 18px; }
    .history-timeline { padding-left: 20px; }
    .history-period::before { left: -28px; }
}
@media (min-width: 768px) {
    .history-contents ol { columns: 2; column-gap: 36px; }
    .history-contents li { break-inside: avoid; }
}

.contacts-page .contact-card { height: 100%; display: flex; flex-direction: column; align-items: flex-start; padding: 28px; border: 1px solid var(--line); background: #fff; }
.contacts-page .contact-card-primary { border-top: 3px solid var(--accent); background: #fffaf7; padding-top: 26px; }
.contacts-page .contact-card h2 { margin: 10px 0 12px; font-size: 24px; }
.contacts-page .contact-card p { margin-bottom: 16px; }
.contacts-page .contact-value { display: inline-flex; align-items: center; min-height: 44px; margin-bottom: 22px; color: var(--ink); font-size: clamp(22px, 3vw, 30px); font-weight: 700; letter-spacing: -.5px; text-decoration: none; }
.contacts-page .contact-value:hover { color: var(--accent); }
.contacts-page .contact-action { display: flex; justify-content: space-between; align-items: center; gap: 28px; margin-top: auto; text-decoration: none; }
.contacts-page .contact-company { width: 100%; margin: 0 0 20px; }
.contact-company > div { border-top: 1px solid var(--line); padding: 12px 0; }
.contact-company dt { font-size: 13px; font-weight: 400; }
.contact-company dd { margin: 3px 0 0; color: var(--ink); font-size: 17px; font-weight: 600; }
.contacts-page .contact-checklist { padding-left: 20px; margin-bottom: 20px; }
.contact-checklist li { padding-left: 4px; margin-bottom: 8px; }
.contact-checklist li::marker { color: var(--accent); }
.contact-text-link { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; margin-top: auto; font-weight: 600; }
.contact-policies { display: flex; flex-wrap: wrap; gap: 8px 28px; border-top: 1px solid var(--line); margin-top: 28px; padding-top: 16px; }
.contact-policies a { display: inline-flex; align-items: center; min-height: 44px; }
@media (max-width: 767px) {
    .contacts-page .contact-card { padding: 22px; }
    .contacts-page .contact-card-primary { padding-top: 20px; }
    .contacts-page .contact-card h2 { font-size: 22px; }
    .contacts-page .contact-action { width: 100%; }
    .contact-policies { flex-direction: column; align-items: flex-start; gap: 0; }
}

.tool-faq .accordion-button { min-height: 56px; }
.tool-content-source { border-top: 1px solid var(--line); padding-top: 16px; font-size: 13px; }

/* Shared controls and actions across tools, references and system pages. */
:root { --bs-primary: #f74d01; --bs-primary-bg-subtle: #fff0e5; --bs-primary-border-subtle: #efbc98; --bs-primary-text-emphasis: #9a3412; }
.btn-outline-primary { --bs-btn-active-color: #fff; --bs-btn-active-bg: var(--accent-hover); --bs-btn-active-border-color: var(--accent-hover); }
.dropdown-menu { --bs-dropdown-link-active-bg: #fff1e7; --bs-dropdown-link-active-color: var(--accent); }
.egn-form .egn-input { min-width: 0; }
.workbench-output > .result-panel { padding: 0; overflow: hidden; }
.tool-result-body { padding: 24px; color: var(--muted); line-height: 1.7; }
.tool-result-body > :last-child { margin-bottom: 0; }
.tool-result-body .result-actions { margin-bottom: 20px; }
.copy-number { width: 44px; height: 44px; }
.generated-table td:last-child { width: 48px; }
.generated-table td:nth-child(2) a { display: inline-flex; align-items: center; min-height: 44px; }
.article-content > h2:first-child { margin-top: 0; }
.error-card { border: 1px solid var(--line); padding: 28px; margin-bottom: 36px; }
.error-card .tool-link-icon { margin-bottom: 16px; }
.error-card p { color: var(--muted); line-height: 1.6; margin-bottom: 20px; }
.error-card .result-actions { flex-wrap: wrap; }
.error-card .btn { flex: none; font-size: 15px; padding-inline: 20px; }
@media (max-width: 767px) {
    .region-search .form-control { font-size: 16px; min-height: 44px; }
    .tool-result-body { padding: 18px; }
    .tool-info-bar { align-items: flex-start; }
    .tool-result-body .result-actions .btn { width: 100%; }
    .error-card { padding: 20px; }
    .error-card .result-actions { flex-direction: column; }
    .error-card .btn { width: 100%; }
}
@media (max-width: 359px) {
    .egn-form .egn-input { font-size: 16px; letter-spacing: 0; padding-inline: 8px; }
}

.api-code-toolbar button { min-height: 44px; }
.number-info-icon { display: none; }
@media (max-width: 575px) {
    .generated-table .table td { padding-inline: 2px; }
    .generated-table td:nth-child(2) a { justify-content: center; width: 44px; }
    .number-info-icon { display: inline-flex; }
    .number-info-icon .icon { width: 20px; height: 20px; }
    .number-info-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
}

.number-info-link { display: inline-flex; align-items: center; min-height: 44px; }
@media (max-width: 575px) {
    .number-results .table td, .number-results .table th { padding-inline: 2px; }
    .number-info-link { justify-content: center; width: 44px; }
    .number-results th:last-child { text-align: center; }
}
