/* ============================================================
   Abacurio — design system
   Concept: an abacus. Panels are framed with heavy top/bottom
   rails; results are counted in beads. Jade = principal / money
   you put in. Saffron = interest / growth.
   ============================================================ */

:root {
  --paper: #F5F6FA;
  --surface: #FFFFFF;
  --ink: #1B2142;
  --ink-2: #474D6B;
  --ink-3: #6B7090;
  --rule: #DCDFE8;
  --rule-strong: #C3C7D4;
  --rail: #1B2142;
  --jade: #2C6E5F;
  --jade-hi: #4FA08C;
  --saffron: #C98712;
  --saffron-hi: #F2BF55;
  --indigo: #3443A6;
  --field: #FBFBFD;
  --banner: #1B2142;
  --banner-ink: #F5F6FA;

  --font: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --step--1: 0.8125rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.5625rem;
  --step-3: clamp(1.75rem, 1.35rem + 1.6vw, 2.25rem);
  --step-4: clamp(2.125rem, 1.4rem + 3vw, 3.5rem);
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 32px);
  --radius-field: 6px;
  --radius-frame: 4px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #141831;
    --surface: #1B2040;
    --ink: #ECEEF6;
    --ink-2: #BFC3D8;
    --ink-3: #9297B3;
    --rule: #2C3258;
    --rule-strong: #3B4270;
    --rail: #3B4373;
    --jade: #4FA890;
    --jade-hi: #86D3BE;
    --saffron: #E3A332;
    --saffron-hi: #FFD27A;
    --indigo: #9AA6FF;
    --field: #161B38;
    --banner: #ECEEF6;
    --banner-ink: #141831;
    color-scheme: dark;
  }
}

html:lang(ja) { --font: "Onest", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Meiryo", "Noto Sans JP", sans-serif; }
html:lang(ko) { --font: "Onest", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif; }
html:lang(zh-Hans) { --font: "Onest", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif; }
html:lang(ar) { --font: "Onest", "Noto Sans Arabic", "Segoe UI", Tahoma, sans-serif; }
html:lang(hi) { --font: "Onest", "Noto Sans Devanagari", "Nirmala UI", sans-serif; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html.detecting body { visibility: hidden; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.6;
  font-feature-settings: "tnum" 1, "cv11" 1;
  -webkit-font-smoothing: antialiased;
}
html:lang(ar) body, html:lang(hi) body { line-height: 1.75; }
img, svg { display: block; max-width: 100%; }
a { color: var(--indigo); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--indigo); outline-offset: 2px; border-radius: 3px; }
h1, h2, h3 { line-height: 1.15; margin: 0; letter-spacing: -0.02em; text-wrap: balance; }
html:lang(ar) h1, html:lang(ar) h2, html:lang(ar) h3, html:lang(hi) h1, html:lang(hi) h2, html:lang(hi) h3,
html:lang(ja) h1, html:lang(ko) h1, html:lang(zh-Hans) h1 { letter-spacing: 0; line-height: 1.3; }
p { margin: 0; }
html:lang(ja) :is(h1, h2, h3, .lead), html:lang(ko) :is(h1, h2, h3), html:lang(zh-Hans) :is(h1, h2, h3, .lead) { word-break: auto-phrase; }
html:lang(ko) :is(h1, h2, h3, .lead, p) { word-break: keep-all; }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; inset-inline-start: 12px; top: -60px; background: var(--ink); color: var(--paper); padding: 8px 14px; border-radius: 4px; z-index: 50; }
.skip:focus { top: 12px; }

/* ---------- language banner ---------- */
.lang-banner { background: var(--banner); color: var(--banner-ink); font-size: 0.9375rem; }
.lang-banner__inner { display: flex; align-items: center; gap: 14px; min-height: 48px; padding-block: 8px; }
.lang-banner p { flex: 1; }
.lang-banner__go { color: inherit; font-weight: 650; white-space: nowrap; }
.lang-banner__x { background: none; border: 0; color: inherit; width: 36px; height: 36px; display: grid; place-items: center; cursor: pointer; border-radius: 50%; }
.lang-banner__x svg { width: 18px; height: 18px; }
.lang-banner__x:hover { background: color-mix(in srgb, var(--banner-ink) 14%, transparent); }

/* ---------- header ---------- */
.site-header { border-bottom: 1px solid var(--rule); background: var(--paper); }
.site-header__inner { display: flex; align-items: center; gap: 28px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand .logo { width: 30px; height: 30px; color: var(--ink); }
.logo-jade { fill: var(--jade); }
.logo-saffron { fill: var(--saffron); }
.brand__name { font-weight: 780; font-size: 1.3125rem; letter-spacing: -0.035em; line-height: 1; }
.primary-nav { display: flex; gap: 4px; margin-inline-end: auto; }
.primary-nav a { color: var(--ink-2); text-decoration: none; font-size: 0.9688rem; font-weight: 520; padding: 8px 12px; border-radius: 999px; white-space: nowrap; }
.primary-nav a:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 6%, transparent); }
.primary-nav a[aria-current="page"] { color: var(--ink); background: color-mix(in srgb, var(--jade) 13%, transparent); }
.lang-btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding-inline: 12px 14px; border: 1px solid var(--rule-strong); border-radius: 999px; background: var(--surface); color: var(--ink); font: inherit; font-size: 0.9375rem; font-weight: 560; cursor: pointer; }
.lang-btn svg { width: 18px; height: 18px; color: var(--jade); }
.lang-btn:hover { border-color: var(--ink-3); }
.lang-btn__code { display: none; }

@media (max-width: 860px) {
  .site-header__inner { flex-wrap: wrap; gap: 0 12px; min-height: 0; padding-block: 12px 0; }
  .brand { margin-inline-end: auto; }
  .lang-btn { height: 38px; }
  .lang-btn__name { display: none; }
  .lang-btn__code { display: inline; }
  .primary-nav { order: 3; width: calc(100% + 2 * var(--gutter)); margin-inline: calc(-1 * var(--gutter)); padding: 8px var(--gutter) 10px; overflow-x: auto; scrollbar-width: none; }
  .primary-nav::-webkit-scrollbar { display: none; }
  .primary-nav a { padding: 6px 12px; border: 1px solid var(--rule); }
}

/* ---------- language dialog ---------- */
.lang-dialog { width: min(640px, calc(100vw - 24px)); max-height: min(720px, calc(100dvh - 24px)); padding: 0; border: 0; border-radius: 10px; background: var(--surface); color: var(--ink); box-shadow: 0 30px 80px -20px rgba(10, 14, 40, .45); border-top: 7px solid var(--rail); border-bottom: 7px solid var(--rail); }
.lang-dialog::backdrop { background: rgba(14, 18, 42, .5); backdrop-filter: blur(2px); }
.lang-dialog[open] { animation: rise .22s cubic-bezier(.2, .8, .2, 1); }
@keyframes rise { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }
.lang-dialog__head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 10px 24px; }
.lang-dialog__head h2 { font-size: var(--step-1); }
.icon-btn { width: 40px; height: 40px; border: 0; border-radius: 50%; background: none; color: var(--ink); display: grid; place-items: center; cursor: pointer; }
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn:hover { background: color-mix(in srgb, var(--ink) 8%, transparent); }
.lang-list { list-style: none; margin: 0; padding: 6px 16px 22px; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 4px; }
.lang-list a { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 12px; border-radius: 6px; color: var(--ink); text-decoration: none; font-size: 1rem; }
.lang-list a:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); }
.lang-list a[aria-current="true"] { background: color-mix(in srgb, var(--jade) 14%, transparent); font-weight: 650; }
.lang-list a[aria-current="true"] .lang-item__code { color: var(--jade); }
.lang-item__code { font-size: 0.75rem; color: var(--ink-3); font-weight: 600; letter-spacing: 0.04em; }
.lang-list a:lang(ar) { font-family: "Noto Sans Arabic", "Segoe UI", Tahoma, sans-serif; }
.lang-list a:lang(hi) { font-family: "Noto Sans Devanagari", "Nirmala UI", sans-serif; }

/* ---------- ad slots (hidden until ads are switched on) ---------- */
.ad { display: none; margin-block: 32px; }
.ads-on .ad, .ad-preview .ad { display: block; }
.ad::before { content: attr(data-label); display: block; text-align: center; font-size: 0.6875rem; color: var(--ink-3); margin-bottom: 6px; }
.ad__inner { margin-inline: auto; overflow: hidden; }
.ad--leaderboard { margin-block: 16px 0; padding-inline: var(--gutter); }
.ad--leaderboard .ad__inner { min-height: 100px; max-width: 728px; }
@media (min-width: 768px) { .ad--leaderboard .ad__inner { min-height: 90px; } }
.ad--content .ad__inner { min-height: 280px; max-width: 728px; }
.page-home .ad--content { padding-inline: var(--gutter); }
.ad--sidebar { position: sticky; top: 24px; margin-block: 0; }
.ad--sidebar .ad__inner { width: 300px; min-height: 600px; }
.ad-preview .ad__inner { display: grid; place-items: center; border: 2px dashed var(--saffron); border-radius: 6px; background: repeating-linear-gradient(-45deg, transparent 0 10px, color-mix(in srgb, var(--saffron) 9%, transparent) 10px 20px); }
.ad-preview .ad__inner::after { content: "AD SLOT: " attr(data-name); font-size: 0.8125rem; font-weight: 700; color: var(--saffron); }

/* ---------- type ---------- */
h1 { font-size: var(--step-4); font-weight: 760; letter-spacing: -0.035em; }
.lead { font-size: var(--step-1); color: var(--ink-2); line-height: 1.5; max-width: 38em; }
html:lang(ja) .lead, html:lang(zh-Hans) .lead, html:lang(ko) .lead { font-size: 1.125rem; }
.text-link { font-weight: 620; color: var(--ink); text-decoration: underline; text-decoration-color: var(--saffron); text-decoration-thickness: 2px; text-underline-offset: 0.25em; }
.text-link:hover { text-decoration-color: var(--jade); }

/* ---------- home ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 72px); align-items: center; padding-block: clamp(36px, 6vw, 88px) clamp(32px, 5vw, 64px); }
.hero h1 { max-width: 11em; }
.hero .lead { margin-top: 20px; }
.hero__link { margin-top: 28px; }
@media (max-width: 920px) { .hero { grid-template-columns: 1fr; } }

.dir { padding-block: clamp(36px, 5vw, 64px); }
.dir > h2, .principles > h2 { font-size: var(--step-3); font-weight: 720; }
.dir__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px clamp(24px, 5vw, 64px); margin-top: 28px; }
@media (max-width: 760px) { .dir__grid { grid-template-columns: 1fr; } }
.dir__group h3 { font-size: var(--step-1); font-weight: 680; }
.dir__intro { color: var(--ink-3); font-size: 0.9375rem; margin-top: 4px; }
.dir__list { list-style: none; margin: 16px 0 0; padding: 0; border-top: 1px solid var(--rule); }
.dir__list li { border-bottom: 1px solid var(--rule); }
.dir__list a { display: grid; gap: 2px; padding: 16px 0; text-decoration: none; color: var(--ink); position: relative; padding-inline-start: 26px; }
.dir__list a::before { content: ""; position: absolute; inset-inline-start: 2px; top: 23px; width: 12px; height: 12px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, var(--jade-hi), var(--jade) 70%); transition: transform .2s ease; }
.dir__list a:hover::before { transform: translateX(6px); }
html[dir="rtl"] .dir__list a:hover::before { transform: translateX(-6px); }
.dir__name { font-weight: 650; font-size: 1.0625rem; }
.dir__list a:hover .dir__name { text-decoration: underline; text-decoration-color: var(--saffron); text-decoration-thickness: 2px; text-underline-offset: 0.22em; }
.dir__desc { color: var(--ink-2); font-size: 0.9375rem; }

.principles { padding-block: clamp(20px, 4vw, 48px) clamp(40px, 6vw, 80px); }
.principles__list { list-style: none; padding: 0; margin: 24px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px clamp(24px, 4vw, 48px); }
@media (max-width: 860px) { .principles__list { grid-template-columns: 1fr; } }
.principles__list li { border-top: 4px solid var(--rail); padding-top: 16px; }
.principles__list h3 { font-size: 1.125rem; font-weight: 680; }
.principles__list p { color: var(--ink-2); margin-top: 8px; font-size: 0.9688rem; }

/* ---------- calculator page grid ---------- */
.page-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; padding-block: 24px 64px; align-items: start; }
.page-main { min-width: 0; max-width: 820px; }
.page-side { position: sticky; top: 24px; }
@media (max-width: 1180px) { .page-grid { grid-template-columns: minmax(0, 1fr); } .page-side { display: none; } .page-main { margin-inline: auto; width: 100%; } }
.crumbs { display: flex; gap: 8px; font-size: 0.875rem; color: var(--ink-3); margin-bottom: 20px; flex-wrap: wrap; }
.crumbs a { color: var(--ink-2); }
.page-calc h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3rem); max-width: 16em; }
.page-calc .lead { margin-top: 14px; font-size: 1.1875rem; }
.page-calc .calc { margin-top: 32px; }

/* ---------- the frame (abacus rails) ---------- */
.frame { background: var(--surface); border: 1px solid var(--rule); border-top: 7px solid var(--rail); border-bottom: 7px solid var(--rail); border-radius: var(--radius-frame); }
.calc__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--rule); }
.calc__name { font-weight: 680; font-size: 0.9688rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.currency { flex: none; }
@media (max-width: 640px) { .currency select { max-width: 52vw; } }
.currency select { appearance: none; -webkit-appearance: none; font: inherit; font-size: 0.875rem; font-weight: 600; color: var(--ink); background: var(--field) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%236B7090' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 10px center / 10px 7px; border: 1px solid var(--rule-strong); border-radius: 999px; padding: 6px 30px 6px 12px; max-width: 220px; cursor: pointer; }
html[dir="rtl"] .currency select { background-position: left 10px center; padding: 6px 12px 6px 30px; }

.calc__body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.calc__inputs { padding: 20px; display: grid; gap: 4px; align-content: start; border-inline-end: 1px solid var(--rule); }
.calc__results { padding: 24px 24px 20px; display: flex; flex-direction: column; }
@media (max-width: 640px) {
  .calc__body { grid-template-columns: 1fr; }
  .calc__inputs { border-inline-end: 0; border-bottom: 1px solid var(--rule); padding: 16px; }
  .calc__results { padding: 20px 16px; }
  .calc__bar { padding: 10px 16px; }
}
.calc--compact .calc__inputs { gap: 0; }

.field { display: grid; gap: 6px; min-width: 0; }
.field + .field, .more__body .field { margin-top: 2px; }
.field__hint:not(:empty) { margin-bottom: 6px; }
.field label { font-size: 0.875rem; font-weight: 600; color: var(--ink-2); }
.input { display: flex; align-items: center; height: 48px; border: 1.5px solid var(--rule-strong); border-radius: var(--radius-field); background: var(--field); transition: border-color .15s, box-shadow .15s; }
.input:focus-within { border-color: var(--indigo); box-shadow: 0 0 0 3px color-mix(in srgb, var(--indigo) 22%, transparent); }
.input input, .input select { flex: 1 1 0; width: 0; min-width: 0; height: 100%; border: 0; background: none; font: inherit; font-size: 1.0625rem; font-weight: 560; color: var(--ink); padding-inline: 12px; outline: none; font-variant-numeric: tabular-nums; }
.input select { appearance: none; -webkit-appearance: none; cursor: pointer; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%236B7090' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 14px center / 11px 8px; }
html[dir="rtl"] .input select { background-position: left 14px center; }
.input__affix { padding-inline-start: 12px; color: var(--ink-3); font-weight: 600; font-size: 0.9375rem; white-space: nowrap; }
.input__affix--end { padding-inline: 0 12px; }
.input input:not(:first-child) { padding-inline-start: 6px; }
.field.is-invalid .input { border-color: #C2413A; }
.field__hint { min-height: 1.25rem; font-size: 0.8125rem; color: var(--ink-3); line-height: 1.5; }
.field.is-invalid .field__hint { color: #C2413A; }
@media (prefers-color-scheme: dark) { .field.is-invalid .input { border-color: #FF8A80; } .field.is-invalid .field__hint { color: #FF8A80; } }

.more { margin-top: 6px; border-top: 1px dashed var(--rule-strong); padding-top: 10px; }
.more summary { cursor: pointer; font-weight: 600; font-size: 0.9375rem; color: var(--indigo); list-style: none; display: inline-flex; align-items: center; gap: 6px; padding: 6px 0 10px; }
.more summary::-webkit-details-marker { display: none; }
.more summary::before { content: "+"; display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid currentColor; font-size: 14px; line-height: 1; }
.more[open] summary::before { content: "−"; }
.more__body { display: grid; gap: 4px; }

.result__label { font-size: 0.875rem; font-weight: 600; color: var(--ink-2); }
.result__big { font-size: clamp(2.4rem, 1.6rem + 3vw, 3.25rem); font-weight: 760; letter-spacing: -0.04em; line-height: 1.05; margin-top: 4px; font-variant-numeric: tabular-nums; white-space: nowrap; max-width: 100%; overflow: hidden; }
.result__sub { color: var(--ink-3); font-size: 0.875rem; margin-top: 6px; min-height: 1.3em; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 20px; margin: 20px 0 0; padding-top: 16px; border-top: 1px solid var(--rule); }
.stats div { min-width: 0; }
.stats dt { font-size: 0.8125rem; color: var(--ink-3); }
.stats dd { margin: 2px 0 0; font-weight: 650; font-size: 1.0625rem; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.split { display: flex; height: 10px; border-radius: 999px; overflow: hidden; margin-top: 22px; background: var(--rule); }
.split__a { background: var(--jade); transition: width .35s ease; }
.split__b { background: var(--saffron); transition: width .35s ease; }
.split__note { font-size: 0.875rem; color: var(--ink-2); margin-top: 8px; }
.savings { margin-top: 14px; padding: 10px 12px; border-radius: 6px; background: color-mix(in srgb, var(--jade) 12%, transparent); color: var(--ink); font-size: 0.9063rem; line-height: 1.5; }

/* ---------- abacus ---------- */
.abacus { margin: 0; padding: 18px 20px 20px; border-top: 1px solid var(--rule); }
.abacus__cap { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; margin-bottom: 14px; font-size: 0.875rem; }
.abacus__title { font-weight: 680; color: var(--ink); margin-inline-end: auto; }
.legend { display: inline-flex; gap: 14px; color: var(--ink-2); }
.legend__item { display: inline-flex; align-items: center; gap: 6px; }
.bead { display: inline-block; width: 11px; height: 11px; border-radius: 50%; }
.bead--a { background: radial-gradient(circle at 35% 30%, var(--jade-hi), var(--jade) 70%); }
.bead--b { background: radial-gradient(circle at 35% 30%, var(--saffron-hi), var(--saffron) 70%); }
.abacus__unit { color: var(--ink-3); width: 100%; }
.abacus__svg { width: 100%; }
.abacus__svg svg { width: 100%; height: auto; overflow: visible; }
.abacus__svg .rod { stroke: var(--rule-strong); stroke-width: 1.5; }
.abacus__svg .yr { fill: var(--ink-3); font-size: 11px; font-family: var(--font); font-variant-numeric: tabular-nums; }
.abacus__svg .row:hover .yr { fill: var(--ink); font-weight: 700; }
.abacus__svg .row:hover .rod { stroke: var(--ink-3); }
.abacus__svg .row { cursor: default; }
.abacus__svg .bd { transform-box: fill-box; }
.abacus__svg.is-entering .bd { animation: slide .6s cubic-bezier(.2, .9, .25, 1.15) both; }
@keyframes slide { from { transform: translateX(var(--from, 200px)); opacity: 0; } 30% { opacity: 1; } to { transform: none; } }
.abacus__tip { position: absolute; pointer-events: none; background: var(--ink); color: var(--paper); font-size: 0.8125rem; line-height: 1.4; padding: 6px 10px; border-radius: 6px; white-space: nowrap; transform: translate(-50%, calc(-100% - 10px)); z-index: 5; }
.abacus { position: relative; }
.calc--compact .abacus { padding-bottom: 16px; }

/* ---------- schedule table ---------- */
.schedule { border-top: 1px solid var(--rule); }
.schedule summary { cursor: pointer; padding: 14px 20px; font-weight: 620; font-size: 0.9375rem; color: var(--indigo); list-style: none; }
.schedule summary::-webkit-details-marker { display: none; }
.schedule summary::after { content: ""; display: inline-block; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-3px); margin-inline-start: 10px; transition: transform .2s; }
.schedule[open] summary::after { transform: rotate(-135deg) translateY(-1px); }
.schedule__scroll { overflow-x: auto; padding: 0 20px 20px; }
table { width: 100%; border-collapse: collapse; font-size: 0.9063rem; font-variant-numeric: tabular-nums; }
th, td { padding: 9px 10px; text-align: end; border-bottom: 1px solid var(--rule); white-space: nowrap; }
th:first-child, td:first-child { text-align: start; }
thead th { font-size: 0.8125rem; font-weight: 650; color: var(--ink-3); border-bottom: 2px solid var(--rule-strong); }
tbody tr:hover { background: color-mix(in srgb, var(--ink) 4%, transparent); }

/* ---------- prose (calculator explainers and articles) ---------- */
.prose { margin-top: 56px; max-width: 68ch; }
.prose > section { margin-top: 44px; }
.prose > section:first-child { margin-top: 0; }
.prose h2 { font-size: var(--step-2); font-weight: 720; }
.prose h3 { font-size: var(--step-1); font-weight: 680; margin-top: 28px; }
.prose > section > :is(p, ul, ol) { margin-top: 16px; color: var(--ink); }
.prose > section > :is(ul, ol) { padding-inline-start: 1.3em; }
.prose > section > :is(ul, ol) > li + li { margin-top: 8px; }
.prose > section > ul > li::marker { color: var(--jade); }
.prose > section > ol > li::marker { color: var(--jade); font-weight: 700; }
.prose strong { font-weight: 680; }
.prose .ad { max-width: none; }
.formula { margin-top: 20px; padding: 18px 20px; background: var(--surface); border: 1px solid var(--rule); border-inline-start: 4px solid var(--jade); border-radius: var(--radius-frame); }
.formula__eq { font-size: 1.1875rem; font-weight: 620; direction: ltr; text-align: start; unicode-bidi: isolate; overflow-x: auto; white-space: nowrap; }
html[dir="rtl"] .formula__eq { text-align: right; }
.formula__where { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 4px; font-size: 0.9375rem; color: var(--ink-2); }

.faq { margin-top: 56px; max-width: 68ch; }
.faq h2, .related h2 { font-size: var(--step-2); font-weight: 720; margin-bottom: 12px; }
.faq details { border-bottom: 1px solid var(--rule); }
.faq details:first-of-type { border-top: 1px solid var(--rule); }
.faq summary { cursor: pointer; list-style: none; padding: 16px 0; font-weight: 640; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: color-mix(in srgb, var(--jade) 14%, transparent); color: var(--jade); font-weight: 700; }
.faq details[open] summary::after { content: "−"; }
.faq__a { padding-bottom: 18px; color: var(--ink-2); }
.related { margin-top: 56px; max-width: 68ch; }

.notfound { padding-block: 64px; max-width: 720px; }
.notfound .lead { margin-block: 16px 24px; }

/* ---------- footer ---------- */
.site-footer { border-top: 7px solid var(--rail); background: var(--surface); margin-top: 24px; padding-block: 48px 28px; font-size: 0.9375rem; }
.site-footer__grid { display: grid; grid-template-columns: 1.3fr 1fr 2fr; gap: 32px; }
@media (max-width: 860px) { .site-footer__grid { grid-template-columns: 1fr; } }
.site-footer__brand p { color: var(--ink-2); margin-top: 12px; max-width: 30em; }
.site-footer h2 { font-size: 0.875rem; font-weight: 680; color: var(--ink-3); margin-bottom: 10px; letter-spacing: 0; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.site-footer__langs ul { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 6px 12px; }
.site-footer a { color: var(--ink-2); text-decoration: none; }
.site-footer a:hover { color: var(--ink); text-decoration: underline; }
.site-footer__langs a:lang(ar) { font-family: "Noto Sans Arabic", "Segoe UI", Tahoma, sans-serif; }
.site-footer__langs a:lang(hi) { font-family: "Noto Sans Devanagari", "Nirmala UI", sans-serif; }
.site-footer__legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--rule); color: var(--ink-3); font-size: 0.8125rem; }

/* ---------- guides ---------- */
.article__head h1 { font-size: clamp(2.1rem, 1.3rem + 3vw, 3.25rem); max-width: 15em; }
.article__head .lead { margin-top: 16px; }
.article__meta { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-top: 18px; font-size: 0.875rem; color: var(--ink-3); }
.summary { margin-top: 32px; padding: 20px 24px 22px; max-width: 68ch; }
.summary h2 { font-size: 1.0625rem; font-weight: 700; }
.summary ul { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 12px; }
.summary li { position: relative; padding-inline-start: 24px; }
.summary li::before { content: ""; position: absolute; inset-inline-start: 0; top: 0.5em; width: 11px; height: 11px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, var(--saffron-hi), var(--saffron) 70%); }
.toc { margin-top: 28px; max-width: 68ch; }
.toc h2 { font-size: 0.9375rem; font-weight: 700; color: var(--ink-2); }
.toc ol { margin: 10px 0 0; padding-inline-start: 1.4em; display: grid; gap: 6px; font-size: 0.9688rem; }
.toc li::marker { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.toc a { color: var(--ink); text-decoration-color: var(--rule-strong); }
.toc a:hover { text-decoration-color: var(--saffron); }
.prose--article { margin-top: 40px; }
.prose--article > section { scroll-margin-top: 20px; }
.steps { counter-reset: none; }
.steps li { padding-inline-start: 4px; }
.table-wrap { margin-top: 20px; overflow-x: auto; border: 1px solid var(--rule); border-radius: var(--radius-frame); background: var(--surface); }
table.data { font-size: 0.9375rem; }
table.data th, table.data td { padding: 11px 14px; }
table.data tbody th { font-weight: 650; color: var(--ink); }
table.data tbody tr:last-child :is(th, td) { border-bottom: 0; }
.figure { margin: 28px 0 0; padding: 18px 18px 14px; background: var(--surface); border: 1px solid var(--rule); border-top: 5px solid var(--rail); border-radius: var(--radius-frame); }
.figure__chart svg { width: 100%; height: auto; display: block; }
.figure figcaption { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin-top: 10px; font-size: 0.875rem; color: var(--ink-2); line-height: 1.5; }
.figure__cap { flex: 1 1 260px; }
.figure__axis { color: var(--ink-3); font-size: 0.8125rem; }
.swatch { display: inline-block; width: 18px; height: 3px; border-radius: 2px; }
.swatch--ink { background: var(--ink); } .swatch--a { background: var(--jade); } .swatch--b { background: var(--saffron); }
.fg .fg-grid { stroke: var(--rule); stroke-width: 1; }
.fg .fg-axis { fill: var(--ink-3); font-size: 12px; font-family: var(--font); }
.fg .fg-label { fill: var(--ink); font-size: 14px; font-weight: 600; font-family: var(--font); }
.fg .fg-value { fill: var(--ink-2); font-size: 13px; font-weight: 600; font-family: var(--font); }
.fg .fg-note { fill: var(--ink); font-size: 12.5px; font-weight: 600; font-family: var(--font); paint-order: stroke; stroke: var(--surface); stroke-width: 4px; }
.fg .fg-a { fill: var(--jade); } .fg .fg-b { fill: var(--saffron); }
.fg .fg-area { fill: color-mix(in srgb, var(--jade) 14%, transparent); }
.fg .fg-line { fill: none; stroke-width: 2.5; stroke-linejoin: round; }
.fg .fg-line--a { stroke: var(--jade); } .fg .fg-line--b { stroke: var(--saffron); } .fg .fg-line--ink { stroke: var(--ink); }
.fg .fg-guide { stroke: var(--ink-3); stroke-dasharray: 3 4; }
.fg .fg-dot { fill: var(--saffron); stroke: var(--surface); stroke-width: 2.5; }
.embed { margin-top: 32px; }
.embed__title { font-weight: 700; font-size: 1.0625rem; margin-bottom: 12px; }
.article__outro { margin-top: 40px; max-width: 68ch; font-size: 1.125rem; line-height: 1.6; padding-inline-start: 18px; border-inline-start: 4px solid var(--saffron); }
.guides { padding-block: clamp(8px, 2vw, 24px) clamp(28px, 4vw, 48px); }
.guides > h2 { font-size: var(--step-3); font-weight: 720; }
.guide-list { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 16px; }
.guide-list a { display: grid; gap: 8px; padding: 22px 24px; text-decoration: none; color: var(--ink); background: var(--surface); border: 1px solid var(--rule); border-top: 7px solid var(--rail); border-bottom: 7px solid var(--rail); border-radius: var(--radius-frame); max-width: 820px; }
.guide-list__title { font-size: var(--step-2); font-weight: 720; letter-spacing: -0.02em; line-height: 1.2; }
.guide-list__dek { color: var(--ink-2); max-width: 60ch; }
.guide-list__more { font-weight: 620; text-decoration: underline; text-decoration-color: var(--saffron); text-decoration-thickness: 2px; text-underline-offset: 0.25em; margin-top: 4px; }
.guide-list a:hover .guide-list__more { text-decoration-color: var(--jade); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media (max-width: 640px) { .page-calc .calc__name { display: none; } .page-calc .calc__bar { justify-content: flex-end; } }

/* ============================================================
   Calculator collection: home search, directory, tools,
   scientific calculator, unit converter
   ============================================================ */
.search { position: relative; margin-top: 28px; max-width: 30rem; }
.search svg { position: absolute; inset-inline-start: 16px; top: 50%; width: 20px; height: 20px; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }
.search input { width: 100%; height: 54px; border: 1.5px solid var(--rule-strong); border-radius: 999px; background: var(--surface); color: var(--ink); font: inherit; font-size: 1.0625rem; padding-inline: 48px 20px; outline: none; transition: border-color .15s, box-shadow .15s; }
.search input:focus { border-color: var(--indigo); box-shadow: 0 0 0 3px color-mix(in srgb, var(--indigo) 22%, transparent); }
.hero__chips { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.hero__chips a { display: inline-block; padding: 7px 14px; border: 1px solid var(--rule-strong); border-radius: 999px; color: var(--ink-2); text-decoration: none; font-size: 0.9063rem; font-weight: 560; background: var(--surface); }
.hero__chips a:hover { border-color: var(--jade); color: var(--ink); }
.page-home .hero { align-items: start; }
.page-home .hero h1 { max-width: 12em; }

.all { padding-block: 8px clamp(32px, 5vw, 56px); scroll-margin-top: 16px; }
.all > h2 { font-size: var(--step-3); font-weight: 720; }
.cat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px clamp(20px, 3vw, 40px); margin-top: 24px; }
@media (max-width: 1000px) { .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .cat-grid { grid-template-columns: 1fr; } }
.cat-col h3 { font-size: 1.0625rem; font-weight: 720; padding-bottom: 10px; border-bottom: 7px solid var(--rail); }
.cat-col h3 a { color: var(--ink); text-decoration: none; }
.cat-col h3 a:hover { text-decoration: underline; text-decoration-color: var(--saffron); text-decoration-thickness: 2px; }
.cat-col ul { list-style: none; margin: 0; padding: 0; }
.cat-col li { border-bottom: 1px solid var(--rule); }
.cat-col li a { display: flex; align-items: center; gap: 10px; padding: 10px 0; color: var(--ink); text-decoration: none; font-weight: 540; font-size: 0.9688rem; }
.cat-col li a::before { content: ""; flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--jade); transition: transform .2s; }
.cat-col li:nth-child(even) a::before { background: var(--saffron); }
.cat-col li a:hover { color: var(--indigo); }
.cat-col li a:hover::before { transform: translateX(3px); }
.search-empty { margin-top: 20px; color: var(--ink-2); }

.dir__list--cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; border-top: 0; margin-top: 28px; }
.dir__list--cols li { border-top: 1px solid var(--rule); border-bottom: 0; }
@media (max-width: 680px) { .dir__list--cols { grid-template-columns: 1fr; } }
.page-cat h1 { font-size: var(--step-3); }
.related__all { margin-top: 16px; }

/* generic tool */
.tool .calc__inputs { gap: 2px; }
.field[hidden] { display: none; }
.input--area { height: auto; align-items: stretch; }
.input--area textarea { flex: 1; min-height: 120px; border: 0; background: none; font: inherit; font-size: 1.0625rem; color: var(--ink); padding: 12px; resize: vertical; outline: none; font-variant-numeric: tabular-nums; }
.input input[type="date"], .input input[type="time"] { font-variant-numeric: tabular-nums; }
.input input[type="date"]::-webkit-calendar-picker-indicator, .input input[type="time"]::-webkit-calendar-picker-indicator { opacity: .6; cursor: pointer; }
@media (prefers-color-scheme: dark) { .input input[type="date"]::-webkit-calendar-picker-indicator, .input input[type="time"]::-webkit-calendar-picker-indicator { filter: invert(1); } }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; margin-top: 8px; padding-inline: 20px; border: 0; border-radius: var(--radius-field); background: var(--ink); color: var(--paper); font: inherit; font-weight: 650; cursor: pointer; }
.btn svg { width: 18px; height: 18px; }
.btn:hover { background: var(--indigo); }
.result__note { font-size: 0.875rem; color: var(--ink-2); margin-top: 14px; line-height: 1.5; }
.result__note:empty { display: none; }
.tool .stats { margin-top: 18px; }
.tool .split { margin-top: 18px; }
.tool .result__big[data-f="text"], .tool .result__big[data-f="key"], .tool .result__big[data-f="date"], .tool .result__big[data-f="dur"] { font-size: clamp(1.75rem, 1.3rem + 1.8vw, 2.4rem); white-space: normal; overflow-wrap: anywhere; }
.callout { margin-top: 28px; padding: 14px 18px; border-inline-start: 4px solid var(--saffron); background: color-mix(in srgb, var(--saffron) 9%, var(--surface)); border-radius: var(--radius-frame); font-size: 0.9375rem; color: var(--ink-2); max-width: 68ch; }

.meter { margin-top: 20px; }
.meter__bar { position: relative; display: flex; height: 14px; border-radius: 999px; overflow: visible; }
.meter__seg { height: 100%; opacity: .45; }
.meter__seg:first-child { border-start-start-radius: 999px; border-end-start-radius: 999px; }
.meter__seg:nth-last-child(2) { border-start-end-radius: 999px; border-end-end-radius: 999px; }
.meter__seg.is-on { opacity: 1; }
.meter__seg--0 { background: var(--indigo); } .meter__seg--1 { background: var(--jade); } .meter__seg--2 { background: var(--saffron); } .meter__seg--3 { background: #C2413A; }
.meter__pin { position: absolute; top: -5px; width: 6px; height: 24px; margin-inline-start: -3px; border-radius: 3px; background: var(--ink); box-shadow: 0 0 0 2px var(--surface); transition: inset-inline-start .35s ease; }
.meter__ticks { position: relative; height: 18px; font-size: 0.75rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.meter__ticks span { position: absolute; top: 4px; transform: translateX(-50%); }
[dir="rtl"] .meter__ticks span { transform: translateX(50%); }
.meter__names { display: flex; font-size: 0.75rem; color: var(--ink-3); margin-top: 2px; }
.meter__names span { text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-inline: 2px; }

/* scientific calculator */
.sci { overflow: hidden; }
.sci__screen { position: relative; background: var(--ink); color: var(--paper); padding: 16px 20px 14px; text-align: end; }
@media (prefers-color-scheme: dark) { .sci__screen { background: #0E1124; color: var(--ink); } }
.sci__expr { min-height: 1.5em; font-size: 0.9688rem; opacity: .72; white-space: nowrap; overflow-x: auto; scrollbar-width: none; font-variant-numeric: tabular-nums; }
.sci__expr::-webkit-scrollbar { display: none; }
.sci__res { font-size: clamp(2.1rem, 1.6rem + 2vw, 2.75rem); font-weight: 720; letter-spacing: -0.03em; line-height: 1.15; white-space: nowrap; overflow: hidden; font-variant-numeric: tabular-nums; }
.sci__res.is-preview { opacity: .55; }
.sci__mem { position: absolute; inset-inline-start: 16px; top: 12px; font-size: 0.75rem; font-weight: 700; color: var(--saffron-hi); display: none; }
.sci.has-mem .sci__mem { display: block; }
.sci__pads { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 4fr); gap: 12px; padding: 14px; }
.sci__fns { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; align-content: start; }
.sci__num { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.key { min-width: 0; height: 40px; border: 1px solid var(--rule); border-radius: 6px; background: var(--field); color: var(--ink); font: inherit; font-size: 1rem; font-weight: 600; cursor: pointer; touch-action: manipulation; transition: background .1s, transform .06s; font-variant-numeric: tabular-nums; }
.key:hover { background: color-mix(in srgb, var(--ink) 7%, var(--field)); }
.key:active, .key.is-pressed { transform: translateY(1px); background: color-mix(in srgb, var(--ink) 14%, var(--field)); }
.key--fn, .key--mem { font-size: 0.875rem; font-weight: 560; color: var(--ink-2); background: var(--surface); }
.key--mem { font-size: 0.8125rem; }
.sci__num .key { height: 50px; font-size: 1.1875rem; }
.key--op { color: var(--indigo); background: color-mix(in srgb, var(--indigo) 8%, var(--field)); font-size: 1.25rem; }
.key--clr { color: #A4520C; background: color-mix(in srgb, var(--saffron) 14%, var(--field)); }
@media (prefers-color-scheme: dark) { .key--clr { color: var(--saffron-hi); } }
.key--eq { grid-column: span 2; background: var(--jade); border-color: var(--jade); color: #fff; font-size: 1.375rem; }
.key--eq:hover { background: color-mix(in srgb, var(--jade) 85%, #000); }
.key[data-angle][aria-pressed="true"] { color: var(--saffron); border-color: var(--saffron); }
@media (max-width: 640px) {
  .sci__pads { grid-template-columns: 1fr; padding: 10px; gap: 8px; }
  .key { height: 38px; }
  .sci__num .key { height: 54px; }
}
.sci--compact .sci__pads { grid-template-columns: 1fr; }
@media (min-width: 1100px) { .sci--compact .sci__pads { grid-template-columns: minmax(0, 5fr) minmax(0, 4fr); } }
.sci__hist { border-top: 1px solid var(--rule); padding: 14px 20px 18px; }
.sci__hist h2 { font-size: 0.875rem; font-weight: 650; color: var(--ink-2); }
.sci__hist ol { list-style: none; margin: 8px 0 0; padding: 0; }
.sci__hist li { border-bottom: 1px solid var(--rule); }
.sci__hist li:last-child { border-bottom: 0; }
.sci__hist button { display: flex; justify-content: space-between; gap: 16px; width: 100%; padding: 8px 0; border: 0; background: none; color: var(--ink-2); font: inherit; font-size: 0.9375rem; cursor: pointer; text-align: start; font-variant-numeric: tabular-nums; }
.sci__hist button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sci__hist button strong { color: var(--ink); white-space: nowrap; }
.sci__hist button:hover strong { color: var(--indigo); }
.sci__empty { font-size: 0.875rem; color: var(--ink-3); padding: 4px 0; }
.page-sci .page-main > .sci { max-width: 760px; }

/* unit converter */
.conv__body { padding: 20px; display: grid; gap: 4px; }
.conv__pair { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 10px; align-items: end; }
.conv__swap { width: 44px; height: 48px; border: 1.5px solid var(--rule-strong); border-radius: var(--radius-field); background: var(--surface); color: var(--ink-2); cursor: pointer; display: grid; place-items: center; }
.conv__swap:hover { border-color: var(--indigo); color: var(--indigo); }
.conv__swap svg { width: 20px; height: 20px; }
.conv__res { margin-top: 18px; font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.2rem); }
.conv__all { border-top: 1px solid var(--rule); padding: 16px 20px 20px; }
.conv__all h2 { font-size: 0.875rem; font-weight: 650; color: var(--ink-2); margin-bottom: 8px; }
.conv__table th { font-weight: 650; }
.conv__table th span { display: block; font-weight: 400; font-size: 0.8125rem; color: var(--ink-3); }
.conv__table td { text-align: end; font-variant-numeric: tabular-nums; }
.conv__table tr.is-on { background: color-mix(in srgb, var(--jade) 10%, transparent); }
@media (max-width: 520px) { .conv__pair { grid-template-columns: 1fr; } .conv__swap { justify-self: center; transform: rotate(90deg); } }
.page-tool .page-main > .frame { margin-top: 28px; }
.meter__names { display: none; }
@media (max-width: 640px) { .page-tool .calc__bar:not(:has(select)) { display: none; } }

/* ---------- country tax calculators ---------- */
.tax__year { font-size: 0.8125rem; color: var(--ink-3); font-weight: 600; margin-inline-start: auto; }
.tax__meta { font-size: 0.8125rem; color: var(--ink-3); margin-top: 10px; }
.quick { font-size: 1.0625rem; line-height: 1.55; color: var(--ink); margin: 14px 0 22px; padding-inline-start: 14px; border-inline-start: 4px solid var(--saffron); max-width: 68ch; }
.taxnotes { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 8px; }
.taxnotes:empty { display: none; }
.taxnotes li { font-size: 0.875rem; color: var(--ink-2); line-height: 1.5; padding-inline-start: 14px; position: relative; }
.taxnotes li::before { content: ""; position: absolute; inset-inline-start: 0; top: 0.55em; width: 6px; height: 6px; border-radius: 50%; background: var(--jade); }
.tax__break { border-top: 1px solid var(--rule); padding: clamp(16px, 3vw, 28px); }
.tax__break h2 { font-size: var(--step-1); font-weight: 680; margin-bottom: 14px; }
.taxbar { display: flex; height: 22px; border-radius: 6px; overflow: hidden; background: var(--rule); margin-bottom: 18px; }
.taxbar__seg { display: block; height: 100%; min-width: 2px; }
.s0 { background: var(--jade); } .s1 { background: var(--saffron); } .s2 { background: var(--indigo); } .s3 { background: #C2413A; }
.s4 { background: #7A8B3C; } .s5 { background: #8E5BB5; } .s6 { background: #2C8FB0; } .s7 { background: #8A6D3B; }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-inline-end: 8px; vertical-align: baseline; }
.taxtable td, .taxtable th:not(:first-child) { text-align: end; font-variant-numeric: tabular-nums; white-space: nowrap; }
.taxtable th[scope="row"] { text-align: start; font-weight: 600; }
.taxtable tr.is-gross th, .taxtable tr.is-gross td, .taxtable tr.is-net th, .taxtable tr.is-net td { font-weight: 720; }
.taxtable tr.is-net { background: color-mix(in srgb, var(--jade) 9%, transparent); }
.tax__sources { margin-top: 36px; }
.tax__sources h2 { font-size: var(--step-1); font-weight: 680; }
.tax__sources ul { margin: 10px 0 0; padding-inline-start: 1.1em; display: grid; gap: 4px; font-size: 0.875rem; overflow-wrap: anywhere; }
/* hub list */
.taxlist { list-style: none; margin: 24px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 0 32px; border-top: 1px solid var(--rule); }
.taxlist li { border-bottom: 1px solid var(--rule); }
.taxlist li[hidden], .taxlist li.hidden { display: none; }
.taxlist a { display: flex; align-items: center; gap: 14px; padding: 14px 0; text-decoration: none; color: var(--ink); }
.taxlist .cc { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; border: 1.5px solid var(--ink); font-weight: 760; font-size: 0.8125rem; letter-spacing: 0.04em; background: var(--paper); box-shadow: 3px 3px 0 var(--saffron); }
.taxlist .taxlist__body { display: grid; gap: 2px; min-width: 0; }
.taxlist a:hover .dir__name { text-decoration: underline; text-decoration-color: var(--saffron); text-decoration-thickness: 2px; text-underline-offset: 0.22em; }
.taxlist .dir__desc { font-size: 0.875rem; }
.taxlist__yours, .is-yours .taxlist__yours { font-size: 0.75rem; font-weight: 700; color: var(--jade); }
.taxlist li.is-yours { background: color-mix(in srgb, var(--jade) 8%, transparent); }
.hero__chips a.is-yours { border-color: var(--jade); font-weight: 700; }
/* home tax column: extra countries only appear while searching */
.cat-col li.is-more { display: none; }
.searching .cat-col li.is-more { display: list-item; }
.cat-col__all a { font-weight: 700; }
.cat-grid { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
@media (max-width: 640px) { .tax__year { display: none; } .taxtable { font-size: 0.8125rem; } .taxtable th:nth-child(3), .taxtable td:nth-child(3) { display: none; } }

/* ---------- downloads, ad notes, ad-blocker notice ---------- */
.dl-link { margin: 14px 0 0; font-size: 0.9375rem; }
.dl-link a { display: inline-flex; align-items: center; gap: 8px; font-weight: 650; color: var(--ink); text-decoration-color: var(--saffron); text-decoration-thickness: 2px; text-underline-offset: 0.2em; }
.dl-card { padding: clamp(20px, 4vw, 32px); display: grid; gap: 14px; justify-items: start; margin-top: 8px; }
.dl-btn { height: 56px; font-size: 1.0625rem; padding-inline: 28px; margin-top: 0; text-decoration: none; background: var(--jade); color: #fff; }
.dl-btn:hover { background: var(--ink); }
.ad-note { display: none; font-size: 0.8125rem; color: var(--ink-3); margin: 0; }
.ads-on .ad-note { display: block; }
.dl-more h2, .page-download .prose h2 { font-size: var(--step-1); font-weight: 680; }
.page-download .prose { margin-block: 22px; }
.btn--ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--rule); }
.btn--ghost:hover { background: var(--rule); color: var(--ink); }
.offline-bar { margin: 0; padding: 6px 16px; text-align: center; font-size: 0.75rem; background: var(--ink); color: var(--paper); }
.abn { position: fixed; inset-inline: 0; bottom: 0; z-index: 90; padding: 12px; display: flex; justify-content: center; pointer-events: none; }
.abn__box { pointer-events: auto; max-width: 560px; background: var(--paper); color: var(--ink); border: 1.5px solid var(--ink); border-radius: 14px; padding: 18px 20px; box-shadow: 6px 6px 0 var(--saffron), 0 20px 60px rgba(0,0,0,.25); }
.abn__box p { margin: 6px 0 0; font-size: 0.9375rem; color: var(--ink-2); }
.abn__btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.abn__btns .btn { height: 42px; margin-top: 0; }
