:root {
  --ink: #12211f; --muted: #55635f; --line: #dfe5e2; --bg: #f6f4ef; --surface: #ffffff;
  --brand: #0d3b36; --brand-ink: #ffffff; --accent: #c2410c; --accent-soft: #fdeee4; --link: #0f5e55;
  --radius: 12px; --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16.5px/1.6 var(--font); }
a { color: var(--link); text-underline-offset: 3px; }
a:hover { color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.skiplink { position: absolute; left: 12px; top: -100px; padding: 10px 16px; background: #fff; z-index: 10; }
.skiplink:focus { top: 12px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }

.top { background: var(--brand); color: var(--brand-ink); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; min-height: 64px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 800; font-size: 19px; letter-spacing: -.01em; }
.brand svg { width: 32px; height: 32px; }
.brand:hover { color: #fff; }
.top nav { display: flex; gap: 4px 18px; flex-wrap: wrap; font-size: 15px; }
.top nav a { color: #d6e6e2; text-decoration: none; padding: 6px 0; }
.top nav a:hover, .top nav a[aria-current] { color: #fff; }
.top nav a[aria-current] { box-shadow: inset 0 -2px #f7b267; }
.top nav { order: 2; margin-left: auto; }
.lang-menu { order: 3; position: relative; font-size: 14px; }
.lang-menu summary { list-style: none; cursor: pointer; padding: 5px 11px; border: 1px solid #ffffff40; border-radius: 999px; color: #fff; white-space: nowrap; }
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu summary::after { content: " ▾"; color: #d6e6e2; }
.lang-menu[open] summary, .lang-menu summary:hover { border-color: #f7b267; }
.lang-menu ul { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; list-style: none; margin: 0; padding: 6px; min-width: 200px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px #0d3b3633; }
.lang-menu li a { display: block; padding: 7px 10px; border-radius: 6px; color: var(--ink); text-decoration: none; }
.lang-menu li a:hover { background: var(--accent-soft); color: var(--ink); }
.lang-menu li a[aria-current] { font-weight: 700; color: var(--accent); }

.hero { padding: 36px 0 22px; }
.hero h1 { font-size: clamp(28px, 4vw, 42px); line-height: 1.12; letter-spacing: -.025em; margin: 0 0 10px; }
.hero .lead { font-size: 18px; color: #33423f; max-width: 860px; margin: 0; }
.hero-home { padding-top: 44px; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 2px 0; list-style: none; margin: 0 0 10px; padding: 0; font-size: 13.5px; color: var(--muted); }
.crumbs li + li::before { content: "›"; margin: 0 8px; color: var(--muted); }
.crumbs a { color: var(--accent); text-decoration: none; font-weight: 600; }
.crumbs a:hover, .crumbs a:focus-visible { text-decoration: underline; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.panel-title { margin: 0 0 14px; font-size: 18px; }
.converter-card { margin-bottom: 30px; border-top: 4px solid var(--accent); }
.conv-inputs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.conv-inputs label { display: grid; gap: 4px; font-weight: 600; font-size: 14px; }
.conv-inputs[hidden] { display: none; }
.conv-inputs input { font: inherit; font-size: 16px; padding: 9px 10px; border: 1px solid #c9d2cf; border-radius: 9px; background: #fff; color: var(--ink); width: 100%; }
.conv-inputs input:focus { border-color: var(--link); outline: 3px solid #0f5e5533; }
.conv-mode { display: inline-flex; flex-wrap: wrap; margin: 0 0 14px; border: 1px solid #c9d2cf; border-radius: 999px; padding: 3px; background: #fff; }
.conv-mode label { position: relative; padding: 6px 14px; border-radius: 999px; font-weight: 600; font-size: 14px; cursor: pointer; }
.conv-mode input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.conv-mode label:has(input:checked) { background: var(--brand); color: var(--brand-ink); }
.conv-mode label:has(input:focus-visible) { outline: 3px solid #0f5e5555; outline-offset: 2px; }
.conv-others tr.here th, .conv-others tr.here td { background: var(--accent-soft); }
select { font: inherit; font-size: 16px; padding: 9px 10px; border: 1px solid #c9d2cf; border-radius: 9px; background: #fff; color: var(--ink); width: 100%; }
select:focus { border-color: var(--link); outline: 3px solid #0f5e5533; }
.conv-result h3 { margin: 22px 0 4px; font-size: 17px; }
.conv-result h4 { margin: 18px 0 4px; font-size: 15px; }
.conv-own { margin-top: 16px; }
.flag { display: inline-block; min-width: 18px; text-align: center; border-radius: 4px; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 12px; }

.table-wrap { overflow-x: auto; margin: 10px 0; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
caption { text-align: left; font-weight: 700; padding: 10px 12px 6px; }
th, td { padding: 7px 12px; border-top: 1px solid var(--line); text-align: left; white-space: nowrap; }
thead th { background: #eef3f1; border-top: 0; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: #3d4d49; }
tbody tr:nth-child(even) { background: #fafbfa; }
tbody th { font-weight: 700; }
.size-table tbody th { position: sticky; left: 0; background: inherit; }
.hub td, .widths td { white-space: normal; min-width: 12em; }
.source { overflow-wrap: anywhere; }
.source { color: var(--muted); }
.source a { color: var(--muted); }

.section-title { font-size: 26px; margin: 10px 0 6px; }
.cat h3 { font-size: 18px; margin: 22px 0 10px; color: var(--brand); }
.brand-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.brand-card { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; display: flex; flex-direction: column; }
.brand-card h4 { margin: 0 0 4px; font-size: 17px; }
.brand-card h4 a { color: var(--ink); text-decoration: none; }
.brand-card h4 a:hover { color: var(--accent); }
.brand-card p { margin: 0 0 10px; font-size: 14px; color: var(--muted); line-height: 1.45; }
.brand-links { margin-top: auto !important; display: flex; gap: 14px; font-size: 14px !important; }

.brand-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); grid-template-areas: "side top" "side more"; gap: 28px; align-items: start; padding-bottom: 40px; }
.brand-top { grid-area: top; }
.brand-more { grid-area: more; }
.official { grid-area: side; position: sticky; top: 16px; }
.brand-top .facts { margin-top: 24px; }
.chips.small.chart-jump { margin: 0 0 12px; }
.table-wrap[id] { scroll-margin-top: 12px; }
.official h2 { font-size: 17px; margin: 0 0 8px; }
.official h3 { font-size: 14px; margin: 14px 0 6px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.link-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.link-list a { display: block; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; font-weight: 600; }
.link-list a::after { content: " ↗"; color: var(--muted); font-weight: 400; }
.link-list a:hover { border-color: var(--accent); }
.brand-main h2, .page-body h2, .guide h2 { font-size: 23px; margin: 28px 0 8px; letter-spacing: -.01em; }
.brand-main h2:first-child { margin-top: 0; }
.notice { border-left: 4px solid var(--accent); }
.chips { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips a { display: inline-block; padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px; background: #fff; text-decoration: none; font-size: 14px; }
.chips a:hover { border-color: var(--accent); }
.page-body { padding-bottom: 40px; max-width: 900px; }
.page-wide { padding-bottom: 20px; }

.promo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; margin: 0 0 30px; }
.promo { display: block; text-decoration: none; color: var(--ink); border-left: 4px solid var(--brand); }
.promo:hover { border-color: var(--accent); color: var(--ink); }
.promo h2 { font-size: 19px; margin: 0 0 6px; }
.promo p { margin: 0 0 10px; color: var(--muted); font-size: 15px; }
.promo-cta { font-weight: 700; color: var(--link); }

.dir-filters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: 12px; align-items: end; margin-bottom: 16px; position: sticky; top: 0; z-index: 5; }
.dir-filters label { display: grid; gap: 4px; font-weight: 600; font-size: 14px; }
.dir-filters input { font: inherit; font-size: 16px; padding: 9px 10px; border: 1px solid #c9d2cf; border-radius: 9px; width: 100%; }
.dir-count { margin: 0 0 10px; font-weight: 700; white-space: nowrap; }
.dir-list, .plat-list { list-style: none; padding: 0; margin: 0 0 16px; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.dir-row { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.dir-row[hidden] { display: none; }
.dir-head h3 { margin: 0; font-size: 17px; }
.dir-head h3 a { color: var(--ink); text-decoration: none; }
.dir-head h3 a:hover { color: var(--accent); }
.dir-head p { margin: 2px 0 0; }
.dir-summary { margin: 0; font-size: 14px; color: #33423f; line-height: 1.45; }
.dir-links { list-style: none; padding: 0; margin: 2px 0 0; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 14px; }
.dir-links a::after { content: " ↗"; color: var(--muted); }
.dir-links .here a { font-weight: 700; }
.dir-links .here a::after { content: " →"; }
.chips.small { margin: 2px 0 0; gap: 6px; }
.chips.small a { font-size: 13px; padding: 3px 10px; }
.dir-regional summary { cursor: pointer; font-size: 14px; color: var(--link); }
.plat-card { display: flex; flex-direction: column; gap: 6px; }
.plat-card h3 { margin: 0; font-size: 18px; }
.plat-card p { margin: 0; }
.plat-card dl { margin: 0; font-size: 14px; }
.plat-card dt { font-weight: 700; margin-top: 4px; }
.plat-card dd { margin: 0; color: #33423f; }
.guide { background: #fff; border-top: 1px solid var(--line); margin-top: 36px; padding: 36px 0 44px; }
.guide .wrap { max-width: 900px; }
.faq details { border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; margin: 8px 0; background: #fff; }
.faq summary { cursor: pointer; font-weight: 700; }
.chart-notes { margin: 4px 0 8px; }
.chart-notes summary { cursor: pointer; }
.chart-notes p { margin: 6px 0 0; }
.faq p { margin: 8px 0 0; }
.notfound { padding: 60px 24px; text-align: center; }
.btn { display: inline-block; padding: 10px 18px; border-radius: 9px; background: var(--brand); color: #fff; text-decoration: none; font-weight: 700; }
.btn:hover { color: #fff; background: #11524b; }

footer { background: #e9ece6; border-top: 1px solid var(--line); margin-top: 20px; font-size: 14px; color: var(--muted); }
footer .wrap { padding-top: 22px; padding-bottom: 28px; }
footer p { margin: 0 0 10px; max-width: 820px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.foot-links a { color: var(--muted); }

@media (max-width: 900px) {
  .brand-layout { grid-template-columns: minmax(0, 1fr); grid-template-areas: "top" "side" "more"; }
  .official { position: static; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .top .wrap { min-height: 0; padding-top: 10px; padding-bottom: 8px; }
  .lang-menu { order: 1; margin-left: auto; }
  .top nav { order: 2; margin-left: 0; width: 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; gap: 2px 16px; font-size: 14px; }
  .top nav::-webkit-scrollbar { display: none; }
  .top nav a { white-space: nowrap; }
  .hero { padding: 24px 0 16px; }
  .hero .lead { font-size: 16.5px; }
  .conv-inputs { grid-template-columns: minmax(0, 1fr); }
  #c-by-foot { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
  #c-by-foot label:last-child { grid-column: 1 / -1; }
  .dir-filters { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); position: static; }
  .dir-filters label:nth-child(3) { grid-column: 1 / -1; }
  .dir-list, .plat-list { grid-template-columns: minmax(0, 1fr); }
  .card { padding: 16px; }
  th, td { padding: 6px 9px; }
}
@media print { .top nav, .converter-card, footer .foot-links { display: none; } body { background: #fff; } }

/* Conversion, comparison and source pages */
.size-table.spread td:last-child { min-width: 14rem; }
.size-table.spread summary { cursor: pointer; }
.size-table.spread details p { margin: .35rem 0; }
.size-table tr.differs td:nth-last-child(2), .size-table tr.differs td:nth-last-child(3) { font-weight: 600; }
.size-table.sources { font-size: .875rem; }
.size-table.sources td, .size-table.sources th { white-space: normal; }
.model-chart { margin: .35rem 0; }
.model-chart summary { cursor: pointer; font-weight: 600; }
.conv-links { margin-bottom: 1rem; }
/* Printable foot measure: the millimetre sizes come from the SVG's width and height. */
.print-sheet { margin: 1.5rem 0; padding: 1rem; border: 1px solid #ccd; background: #fff; overflow-x: auto; }
.sheet-title { font-weight: 600; margin: 0 0 .5rem; }
.sheet-row { display: flex; gap: 8mm; align-items: flex-start; min-width: 150mm; }
.ruler { flex: none; display: block; }
.check-bar { width: 100mm; height: 8mm; border: .3mm solid #000; display: flex; align-items: center; justify-content: center; font-size: 3mm; box-sizing: border-box; }
.sheet-note { max-width: 100mm; }
@media print {
  header.top, footer, .no-print, .crumbs, .skiplink { display: none !important; }
  .wrap, .page-body { margin: 0 !important; padding: 0 !important; max-width: none !important; }
  .print-sheet { border: 0; margin: 0; padding: 0; break-after: page; overflow: visible; }
  .print-sheet:last-child { break-after: auto; }
  @page { margin: 10mm; }
}
