:root {
  --ink: #142536;
  --muted: #6c7c89;
  --line: #dbe5e9;
  --surface: #ffffff;
  --paper: #ffffff;
  --navy: #102b43;
  --teal: #0f7469;
  --teal-light: #dff3ee;
  --coral: #d66a4d;
  --gold: #b7852d;
  --shadow: 0 20px 60px rgba(30, 68, 82, .11);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid rgba(15, 116, 105, .34); outline-offset: 3px; }

.site-shell { min-height: 100vh; display: flex; flex-direction: column; }
.site-header { width: min(1180px, calc(100% - 48px)); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; min-height: 78px; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -.02em; }
.brand-mark { width: 32px; height: 32px; display: grid; place-items: center; color: #fff; background: var(--navy); border-radius: 10px 10px 10px 3px; font-size: 14px; letter-spacing: .1em; }
.brand-name { font-size: 17px; }
.brand-name strong { color: var(--teal); }
.main-nav { display: flex; gap: 30px; color: var(--muted); font-size: 14px; }
.main-nav a:hover, .footer-nav a:hover, .text-link:hover { color: var(--teal); }
.header-tools { display: inline-flex; align-items: center; gap: 14px; }
.header-trust { color: var(--muted); font-size: 12px; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.language-toggle { border: 1px solid var(--line); padding: 7px 10px; color: var(--teal); background: rgba(255,255,255,.7); border-radius: 8px; cursor: pointer; font-size: 12px; font-weight: 700; }
.language-toggle:hover { background: #fff; border-color: #a8ccc5; }
.status-dot { width: 7px; height: 7px; display: inline-block; background: #5bb991; border-radius: 50%; box-shadow: 0 0 0 4px rgba(91, 185, 145, .14); }

.page-wrap { width: min(1180px, calc(100% - 48px)); margin: 0 auto; flex: 1; }
.ad-layout #app { min-width: 0; outline: none; }
.ad-layout #app:focus { outline: none; }
.ad-layout { width: min(calc(100% - 48px), 1600px); margin: 0 auto; display: grid; grid-template-columns: 160px minmax(0, 1180px) 160px; gap: 20px; align-items: start; justify-content: center; }
.ad-rail { display: none; min-width: 0; position: sticky; top: 92px; }
.ad-unit { width: 160px; height: 600px; display: grid; place-content: center; gap: 8px; padding: 20px 12px; color: #9ba9ad; background: rgba(255,255,255,.6); border: 1px dashed #cbd9da; border-radius: 8px; text-align: center; font-size: 11px; }
.ad-unit strong { color: #829397; font: 600 12px/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.ad-unit::before { content: "AD SPACE"; color: #b3c0c1; font-size: 9px; letter-spacing: .14em; }
.breadcrumb { display: flex; gap: 9px; align-items: center; margin: 18px 0 32px; color: #8a99a3; font-size: 12px; }
.breadcrumb a:hover { color: var(--teal); }
.hero { min-height: 470px; padding: 76px 84px 70px; display: flex; align-items: center; justify-content: space-between; gap: 70px; position: relative; overflow: hidden; background: linear-gradient(132deg, #e1f3ee 0%, #f7fbfa 54%, #fcefe7 100%); border-radius: 22px; }
.hero::after { content: ""; position: absolute; inset: auto -10% -72% 48%; height: 420px; border-radius: 50%; background: rgba(255,255,255,.56); }
.hero-copy { max-width: 610px; position: relative; z-index: 1; }
.eyebrow { display: block; color: var(--teal); font-size: 11px; font-weight: 800; letter-spacing: .16em; line-height: 1.3; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 17px; font-size: clamp(36px, 5vw, 62px); line-height: 1.1; letter-spacing: -.06em; }
.hero h1 em { color: var(--teal); font-style: normal; }
.hero-copy > p { max-width: 490px; margin-bottom: 30px; color: #607580; font-size: 16px; }
.hero-actions { display: flex; gap: 24px; align-items: center; }
.button { border: 0; border-radius: 10px; padding: 12px 17px; cursor: pointer; transition: transform .18s, box-shadow .18s, background .18s; }
.button:hover { transform: translateY(-1px); }
.button-primary { background: var(--navy); color: #fff; box-shadow: 0 8px 20px rgba(16, 43, 67, .16); }
.button-primary:hover { background: #1d4868; box-shadow: 0 12px 25px rgba(16, 43, 67, .22); }
.button-subtle { border: 1px solid var(--line); background: #fff; color: var(--ink); padding: 9px 13px; font-size: 13px; }
.button-subtle:hover { background: #f2f8f7; border-color: #a8ccc5; }
.text-link { color: var(--ink); font-size: 14px; font-weight: 700; }
.text-link span { margin-left: 5px; color: var(--teal); }
.hero-orbit { width: 340px; height: 300px; position: relative; flex: 0 0 auto; z-index: 1; }
.orbit-ring { position: absolute; border: 1px solid rgba(15, 116, 105, .26); border-radius: 50%; transform: rotate(-24deg); }
.ring-one { width: 280px; height: 132px; left: 20px; top: 76px; }
.ring-two { width: 235px; height: 235px; left: 50px; top: 20px; border-color: rgba(214, 106, 77, .2); }
.orbit-core { width: 132px; height: 132px; position: absolute; left: 104px; top: 79px; display: grid; place-content: center; text-align: center; background: rgba(255,255,255,.78); border: 1px solid rgba(255,255,255,.95); border-radius: 50%; box-shadow: 0 18px 42px rgba(45, 94, 99, .13); }
.orbit-core span { display: block; color: var(--navy); font: 700 44px/1 Georgia, serif; letter-spacing: -.08em; }
.orbit-core small { color: var(--muted); font-size: 11px; }
.float-chip { position: absolute; padding: 8px 12px; background: rgba(255,255,255,.85); box-shadow: 0 8px 24px rgba(45, 94, 99, .1); border-radius: 8px; color: #47636b; font-size: 12px; white-space: nowrap; }
.chip-one { top: 28px; right: 0; }.chip-two { bottom: 24px; left: 0; color: var(--coral); }.chip-three { bottom: 1px; right: 12px; color: var(--teal); }
.trust-strip { display: flex; gap: 34px; align-items: center; padding: 20px 2px 52px; color: #70838a; font-size: 12px; border-bottom: 1px solid var(--line); }
.trust-strip i { display: inline-grid; place-items: center; width: 18px; height: 18px; margin-right: 6px; color: var(--teal); background: var(--teal-light); border-radius: 50%; font-style: normal; font-weight: 800; }
.tool-section { padding: 65px 0 20px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 40px; }
.section-heading h2 { margin: 9px 0 0; font-size: 29px; letter-spacing: -.045em; }
.section-note { color: var(--muted); font-size: 13px; }
.category-block { padding: 0 0 48px; }
.category-heading { display: flex; align-items: start; gap: 17px; margin-bottom: 18px; }
.category-number { margin-top: 5px; color: #93a5ab; font: 600 12px/1 Georgia, serif; }
.category-heading h3 { margin: 0 0 3px; font-size: 18px; letter-spacing: -.02em; }
.category-heading p { margin: 0; color: var(--muted); font-size: 13px; }
.tool-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.tool-card { min-height: 106px; display: grid; grid-template-columns: 43px 1fr auto; gap: 14px; align-items: center; padding: 18px; background: rgba(255,255,255,.72); border: 1px solid var(--line); border-radius: 13px; transition: transform .18s, border-color .18s, box-shadow .18s; }
.tool-card:hover { transform: translateY(-3px); background: #fff; border-color: #b9d6d1; box-shadow: var(--shadow); }
.tool-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; font-weight: 800; font-size: 19px; }
.accent-blue .tool-icon { color: #347b99; background: #e1f1f6; }.accent-coral .tool-icon { color: var(--coral); background: #fbe7dd; }.accent-gold .tool-icon { color: var(--gold); background: #f7edd0; }
.tool-card strong { display: block; margin-bottom: 3px; font-size: 15px; }.tool-card small { display: block; color: var(--muted); font-size: 12px; }.card-arrow { color: #99aab0; font-size: 16px; align-self: start; }
.home-note { display: flex; align-items: center; gap: 16px; margin: 10px 0 70px; padding: 19px 21px; background: #edf4f2; border-radius: 12px; color: #597077; }
.home-note .note-mark { width: 29px; height: 29px; display: grid; place-items: center; border: 1px solid #a6c8c1; border-radius: 50%; color: var(--teal); font-weight: 700; }.home-note strong { display: block; margin-bottom: 2px; color: var(--ink); font-size: 13px; }.home-note p { margin: 0; font-size: 12px; }.home-note .text-link { margin-left: auto; white-space: nowrap; }

.tool-header { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin: 24px 0 34px; }.tool-header h1 { margin: 8px 0 8px; font-size: clamp(34px, 5vw, 50px); }.tool-header p { margin: 0; color: var(--muted); }.privacy-pill { display: inline-flex; align-items: center; gap: 8px; padding: 9px 13px; color: #56727a; background: #e8f4f0; border-radius: 99px; font-size: 12px; white-space: nowrap; }
.calculator-layout { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(260px, .85fr); gap: 22px; align-items: start; padding-bottom: 80px; }.calculator-card { background: #fff; border: 1px solid var(--line); border-radius: 17px; box-shadow: 0 12px 36px rgba(30, 68, 82, .05); overflow: hidden; }.calculator-card form { padding: 30px; }.form-intro { display: flex; gap: 14px; align-items: start; margin-bottom: 27px; }.step-tag { width: 25px; height: 25px; display: grid; place-items: center; flex: 0 0 auto; border: 1px solid #b7d5ce; border-radius: 50%; color: var(--teal); font: 700 10px/1 Georgia, serif; }.form-intro h2 { margin: 0 0 4px; font-size: 19px; letter-spacing: -.03em; }.form-intro p { margin: 0; color: var(--muted); font-size: 13px; }.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }.field { display: flex; flex-direction: column; gap: 7px; }.field-label { color: #48616a; font-size: 12px; font-weight: 700; }.field input, .field select { width: 100%; min-height: 46px; padding: 0 13px; color: var(--ink); background: #fbfdfd; border: 1px solid #cfdde0; border-radius: 9px; outline: none; transition: border .18s, box-shadow .18s; }.field input:focus, .field select:focus { border-color: var(--teal); box-shadow: 0 0 0 4px rgba(15, 116, 105, .1); }.field-hint { min-height: 18px; color: #91a0a5; font-size: 11px; }.check-field { display: inline-flex; align-items: center; gap: 9px; margin-top: 23px; color: #60767c; font-size: 12px; cursor: pointer; }.check-field input { accent-color: var(--teal); width: 16px; height: 16px; }.form-actions { display: flex; align-items: center; gap: 15px; margin-top: 30px; padding-top: 23px; border-top: 1px solid #edf2f2; }.keyboard-hint { color: #9aa9ae; font-size: 11px; }.result-panel { min-height: 80px; padding: 0 30px 30px; }.result-card { padding: 23px; border: 1px solid #bde0d7; background: linear-gradient(145deg, #f2fbf8, #fbfefd); border-radius: 13px; }.result-kicker { color: var(--teal); font-size: 10px; font-weight: 800; letter-spacing: .15em; }.result-main { display: flex; align-items: baseline; gap: 13px; flex-wrap: wrap; margin: 7px 0 12px; }.result-main strong { color: var(--navy); font: 700 clamp(27px, 5vw, 40px)/1.1 Georgia, serif; letter-spacing: -.04em; }.result-main span { color: var(--teal); font-size: 13px; font-weight: 700; }.result-detail { color: #5a7178; font-size: 12px; }.result-detail p { margin: 4px 0; }.formula-block { margin-top: 17px; padding: 12px 13px; background: rgba(255,255,255,.78); border-radius: 8px; }.formula-block span { display: block; margin-bottom: 4px; color: #8b9ca0; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }.formula-block code { display: block; color: #375560; font: 500 12px/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre-wrap; }.result-actions { display: flex; gap: 8px; margin-top: 17px; }.error-card { display: flex; gap: 12px; padding: 18px; border: 1px solid #f0c4b6; background: #fff5f1; border-radius: 12px; color: #7a4436; }.error-icon { width: 22px; height: 22px; display: grid; place-items: center; flex: 0 0 auto; color: #fff; background: var(--coral); border-radius: 50%; font-weight: 800; }.error-card strong { display: block; margin-bottom: 3px; color: #743b2c; font-size: 13px; }.error-card p { margin: 0; font-size: 12px; }.info-column { display: grid; gap: 12px; }.info-card { padding: 22px; background: #edf5f3; border-radius: 13px; }.info-card p { margin: 13px 0 0; color: #61797d; font-size: 13px; }.info-card .formula-block { margin-top: 17px; background: rgba(255,255,255,.62); }.mode-tabs { display: flex; gap: 4px; padding: 4px; margin-bottom: 29px; background: #f0f5f4; border-radius: 10px; }.mode-tab { flex: 1; border: 0; padding: 10px 8px; color: #6d8285; background: transparent; border-radius: 7px; cursor: pointer; font-size: 12px; }.mode-tab.active { color: var(--navy); background: #fff; box-shadow: 0 2px 8px rgba(43, 76, 81, .1); font-weight: 700; }.unit-row { display: grid; grid-template-columns: minmax(0, 1.1fr) 24px minmax(0, 1fr) 24px minmax(0, 1fr); gap: 10px; align-items: end; }.unit-arrow { padding-bottom: 13px; color: #9eb1b3; text-align: center; }.unit-actions { display: flex; justify-content: flex-end; margin-top: 15px; }.content-page { max-width: 900px; padding: 44px 0 90px; }.content-page.narrow { max-width: 740px; }.content-page h1 { margin: 10px 0 19px; font-size: clamp(38px, 6vw, 58px); }.content-page .lead { max-width: 690px; margin-bottom: 42px; color: #5d737a; font-size: 18px; }.content-page h2 { margin: 38px 0 8px; font-size: 21px; }.content-page p { color: #63777d; font-size: 14px; }.principle-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; padding: 27px 0 45px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }.principle-number { color: var(--coral); font: 700 27px/1 Georgia, serif; }.principle-grid h2 { margin: 13px 0 7px; font-size: 17px; }.principle-grid p { font-size: 13px; }.example-card { margin-top: 43px; padding: 26px; background: #fff; border: 1px solid var(--line); border-radius: 14px; }.example-card h2 { margin: 9px 0 27px; }.example-flow { display: flex; align-items: center; gap: 17px; margin-bottom: 18px; color: var(--navy); font: 600 18px Georgia, serif; }.example-flow b { color: var(--teal); font: 700 12px ui-sans-serif, system-ui, sans-serif; }.example-flow strong { color: var(--coral); }.faq-list { border-top: 1px solid var(--line); }.faq-list details { padding: 19px 0; border-bottom: 1px solid var(--line); }.faq-list summary { cursor: pointer; color: var(--ink); font-weight: 700; }.faq-list p { margin: 13px 0 3px; }.empty-state { padding: 120px 0; text-align: center; }.empty-state p { color: var(--muted); margin-bottom: 25px; }
.file-help { max-width: 760px; margin: 82px auto 150px; padding: 42px; background: #fff; border: 1px solid var(--line); border-radius: 17px; box-shadow: var(--shadow); }.file-help h1 { margin: 10px 0 16px; font-size: clamp(32px, 5vw, 52px); }.file-help p { max-width: 650px; color: #63777d; font-size: 15px; }.file-help code { color: #375560; font: 500 12px/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }.file-help-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 18px; margin: 28px 0 14px; }.file-help-actions > code { padding: 11px 14px; background: #edf5f3; border-radius: 8px; }.file-help-note { margin-bottom: 0; font-size: 12px !important; }
.site-footer { width: min(1180px, calc(100% - 48px)); display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: auto auto 0; padding: 35px 0 42px; color: #839398; border-top: 1px solid var(--line); font-size: 12px; }.footer-brand { color: var(--ink); font-weight: 800; }.site-footer p { margin: 4px 0 0; }.footer-nav { display: flex; gap: 19px; }

@media (min-width: 1500px) {
  .ad-rail { display: block; }
}

@media (max-width: 1499px) {
  .ad-layout { display: block; width: 100%; }
}

@media (max-width: 860px) {
  .hero { padding: 60px 42px; gap: 25px; }.hero-orbit { transform: scale(.82); transform-origin: right center; margin-right: -34px; }.tool-grid { grid-template-columns: repeat(2, 1fr); }.calculator-layout { grid-template-columns: 1fr; }.info-column { grid-template-columns: 1fr 1fr; }.tool-header { align-items: start; flex-direction: column; }.privacy-pill { margin-top: -14px; }
}
@media (max-width: 620px) {
  .site-header, .page-wrap, .site-footer { width: min(100% - 30px, 1180px); }.site-header { min-height: 68px; }.main-nav { display: none; }.header-tools { gap: 8px; }.header-trust { font-size: 11px; }.breadcrumb { margin: 14px 0 22px; }.hero { min-height: 0; display: block; padding: 42px 24px 26px; border-radius: 16px; }.hero h1 { font-size: 41px; }.hero-copy > p { font-size: 14px; }.hero-actions { align-items: flex-start; flex-direction: column; gap: 17px; }.hero-orbit { width: 290px; height: 210px; margin: 23px auto -18px; transform: scale(.75); transform-origin: center; }.trust-strip { flex-wrap: wrap; gap: 12px 20px; padding: 18px 0 35px; }.tool-section { padding-top: 43px; }.section-heading { display: block; margin-bottom: 27px; }.section-heading h2 { font-size: 26px; }.section-note { display: block; margin-top: 8px; }.category-block { padding-bottom: 35px; }.tool-grid { grid-template-columns: 1fr; }.home-note { align-items: start; flex-wrap: wrap; padding: 16px; }.home-note .text-link { width: 100%; margin-left: 45px; }.tool-header { margin: 15px 0 28px; }.tool-header h1 { font-size: 38px; }.calculator-card form { padding: 22px 18px; }.result-panel { padding: 0 18px 22px; }.form-grid, .info-column, .principle-grid { grid-template-columns: 1fr; }.unit-row { grid-template-columns: 1fr; gap: 11px; }.unit-arrow { display: none; }.unit-actions { justify-content: start; }.form-actions { align-items: flex-start; flex-direction: column; gap: 10px; }.mode-tabs { flex-direction: column; }.mode-tab { flex: auto; }.content-page { padding-top: 25px; }.content-page h1 { font-size: 42px; }.example-flow { align-items: flex-start; flex-direction: column; gap: 8px; }.file-help { margin: 34px auto 80px; padding: 25px 20px; }.file-help-actions { align-items: flex-start; flex-direction: column; gap: 12px; }.site-footer { align-items: flex-start; flex-direction: column; padding: 28px 0 35px; }.footer-nav { flex-wrap: wrap; }
}
/* Unit conversion row alignment: keep labels and controls on one baseline. */
.unit-row { align-items: start; }
.unit-row .field { min-height: 88px; }
.unit-arrow { padding: 36px 0 0; }
.unit-actions { margin-top: 2px; }

@media (max-width: 620px) {
  .unit-arrow { display: none; }
  .unit-row .field { min-height: 0; }
}

/* Five unit categories fit as one balanced row on wide desktop screens. */
.unit-category .tool-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }

@media (max-width: 1100px) {
  .unit-category .tool-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .unit-category .tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .unit-category .tool-grid { grid-template-columns: 1fr; }
}

/* Typography baseline: readable body copy and controls across all calculators. */
:root {
  --muted: #526873;
  font-family: "Segoe UI Variable", "Segoe UI", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}

.main-nav { font-size: 15px; }
.breadcrumb { font-size: 13px; }
.section-note,
.category-heading p { font-size: 14px; }
.tool-card strong { font-size: 16px; }
.tool-card small { font-size: 13px; }
.home-note strong { font-size: 14px; }
.home-note p { font-size: 13px; }
.form-intro p { font-size: 14px; }
.field-label { font-size: 14px; line-height: 1.35; }
.field-hint { color: #688087; font-size: 13px; line-height: 1.5; }
.check-field { font-size: 13px; }
.button-subtle { font-size: 14px; }
.keyboard-hint { color: #71848a; font-size: 12px; }
.result-main span { font-size: 14px; }
.result-main strong { font-family: "Segoe UI Variable", "Segoe UI", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif; font-variant-numeric: tabular-nums; }
.result-detail { font-size: 13px; }
.formula-block span { font-size: 11px; }
.formula-block code { font-size: 13px; }
.info-card p { font-size: 14px; }
.mode-tab { font-size: 13px; }
.error-card strong { font-size: 14px; }
.error-card p { font-size: 13px; }
.content-page p { font-size: 15px; }
.principle-grid p { font-size: 14px; }
.file-help p { font-size: 16px; }
.file-help-note { font-size: 13px !important; }
.site-footer { font-size: 13px; }

@media (max-width: 620px) {
  .hero-copy > p { font-size: 15px; }
  .main-nav { font-size: 14px; }
  .tool-section, .home-note, .info-column { content-visibility: auto; contain-intrinsic-size: 760px; }
}

/* White-surface visual system: use borders and shadows for hierarchy instead of tinted fills. */
.hero,
.tool-card,
.home-note,
.calculator-card,
.result-card,
.info-card,
.mode-tabs,
.field input,
.field select,
.file-help,
.file-help-actions > code,
.ad-unit {
  background: #fff;
}

.mode-tabs { border: 1px solid var(--line); }

/* Layer white surfaces with quiet borders, elevation, and spacing. */
.hero {
  border: 1px solid #e5edef;
  box-shadow: 0 18px 42px rgba(30, 68, 82, .06);
}

.tool-card {
  border-color: #d6e3e6;
  box-shadow: 0 5px 16px rgba(30, 68, 82, .045);
}

.tool-card:hover {
  box-shadow: 0 14px 28px rgba(30, 68, 82, .09);
}

.home-note {
  border: 1px solid #dcebe7;
  box-shadow: 0 7px 18px rgba(30, 68, 82, .04);
}

.calculator-card {
  box-shadow: 0 18px 42px rgba(30, 68, 82, .075);
}

.info-card {
  border: 1px solid #dcebe7;
  box-shadow: 0 9px 22px rgba(30, 68, 82, .045);
}

.result-card {
  box-shadow: 0 8px 22px rgba(15, 116, 105, .055);
}

.mode-tabs {
  box-shadow: 0 4px 12px rgba(30, 68, 82, .035);
}

/* Language picker: compact in the header, generous and readable when opened. */
.language-picker { position: relative; }
.language-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 116px;
  padding: 8px 10px;
  color: var(--ink);
  background: #fff;
  border-color: #d6e3e6;
  font-size: 13px;
  font-weight: 600;
}
.language-toggle[aria-expanded="true"] {
  border-color: #a8ccc5;
  box-shadow: 0 0 0 3px rgba(15, 116, 105, .08);
}
.language-globe { width: 15px; height: 15px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.7; }
.language-chevron { margin-left: auto; color: #71848a; font-size: 15px; line-height: 1; }
.language-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 30;
  width: 242px;
  padding: 7px;
  background: #fff;
  border: 1px solid #d6e3e6;
  border-radius: 10px;
  box-shadow: 0 16px 34px rgba(30, 68, 82, .14);
}
.language-menu[hidden] { display: none; }
.language-option {
  width: 100%;
  display: grid;
  grid-template-columns: 29px 1fr 18px;
  align-items: center;
  gap: 7px;
  padding: 9px 10px;
  color: var(--ink);
  background: #fff;
  border: 0;
  border-radius: 8px;
  text-align: left;
  cursor: pointer;
  font-size: 14px;
}
.language-option:hover,
.language-option[aria-checked="true"] { background: #f4f6f7; }
.language-code { color: #70838a; font-size: 12px; font-weight: 600; }
.language-check { color: var(--teal); font-size: 17px; font-weight: 800; text-align: right; }

@media (max-width: 620px) {
  .language-toggle { min-width: 108px; }
  .language-menu { width: 228px; }
}

/* Extended calculator controls: compact on desktop, one clear column on phones. */
.advanced-intro {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 26px;
}
.advanced-intro h2 { margin: 0 0 6px; font-size: 20px; }
.advanced-intro p { margin: 0; color: var(--muted); }
.single-column { grid-template-columns: minmax(0, 1fr); }
.fraction-input-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(150px, .8fr) minmax(120px, 1fr);
  gap: 18px;
  align-items: end;
}
.fraction-input { display: grid; grid-template-columns: 1fr; gap: 8px; }
.basic-calculator { max-width: 460px; }
.basic-display {
  width: 100%;
  box-sizing: border-box;
  min-height: 72px;
  padding: 14px 16px;
  border: 1px solid #cadcde;
  border-radius: 12px;
  background: #fbfdfd;
  color: var(--ink);
  font: 700 25px/1.2 ui-monospace, SFMono-Regular, Consolas, monospace;
  text-align: right;
}
.keypad {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 9px;
  margin-top: 14px;
}
.calc-key {
  min-height: 48px;
  border: 1px solid #d8e5e7;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-size: 16px;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(24, 64, 78, .04);
}
.calc-key:hover { border-color: #9cc6c0; background: #f7fbfa; }
.calc-operator { color: var(--teal); font-weight: 700; }
.calc-equals { background: var(--ink); color: #fff; border-color: var(--ink); }
.calc-equals:hover { background: #1d425c; }
.business-tabs { margin-bottom: 22px; }
.workweek-panel > strong { display: block; color: var(--ink); font-size: 13px; }
.weekday-picker { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 7px; margin-top: 12px; }
.weekday-option { display: flex; align-items: center; justify-content: center; min-height: 34px; border: 1px solid #d6e5e3; border-radius: 8px; background: #fff; color: var(--muted); font-size: 11px; cursor: pointer; }
.weekday-option:has(input:checked) { border-color: #9cc6c0; background: #eaf7f3; color: var(--teal); font-weight: 700; }
.weekday-option input { position: absolute; opacity: 0; pointer-events: none; }
.ratio-equation { display: flex; align-items: center; justify-content: center; gap: 16px; margin: 4px 0 20px; color: var(--navy); font: 700 20px Georgia, serif; }
.ratio-equation strong { color: var(--teal); }
.extended-unit-row { align-items: end; }
.conversion-table { width: 100%; border-collapse: collapse; margin-top: 10px; }
.conversion-table td { padding: 7px 0; border-bottom: 1px solid #edf2f2; }
.conversion-table td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.result-error { border-color: #f0c8c1; background: #fffaf8; }
.result-error p { color: #a94d3d; margin: 10px 0 0; }
.shortcut-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: -10px 0 20px;
  color: var(--muted);
  font-size: 12px;
}
.shortcut-row > span { margin-right: 4px; font-weight: 700; color: var(--ink); }
.shortcut-button {
  border: 1px solid #d6e3e6;
  border-radius: 999px;
  background: #fff;
  color: var(--teal);
  padding: 6px 10px;
  font-size: 12px;
  cursor: pointer;
}
.shortcut-button:hover { background: #f0f8f6; border-color: #9cc6c0; }
.advanced-options { display: flex; flex-wrap: wrap; gap: 16px; margin: 12px 0 16px; }
.check-field { display: flex; align-items: center; gap: 8px; color: var(--ink); font-size: 13px; }
.check-field input { accent-color: var(--teal); }
.option-panel { padding: 16px; margin: 12px 0 18px; border: 1px solid #dcebe7; border-radius: 12px; background: #f7fbfa; }
.option-panel[hidden] { display: none; }
.field-note { margin: 8px 0 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.textarea-field textarea { width: 100%; box-sizing: border-box; resize: vertical; min-height: 74px; padding: 10px 12px; border: 1px solid #cadcde; border-radius: 9px; background: #fff; color: var(--ink); font: inherit; }
.related-links { margin-top: 14px; }
.unit-link-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px 10px; margin-top: 10px; }
.unit-link-grid a { color: var(--teal); font-size: 13px; text-decoration: none; }
.unit-link-grid a:hover { text-decoration: underline; }
.unit-link-grid span { color: var(--muted); }
.seo-content { max-width: 1050px; margin: 28px auto 0; padding: 26px 30px; border: 1px solid #e3eded; border-radius: 14px; background: #fff; box-shadow: 0 8px 22px rgba(30, 68, 82, .035); }
.seo-content h2 { margin: 0 0 10px; color: var(--ink); font-size: 18px; }
.seo-content h2:not(:first-child) { margin-top: 22px; }
.seo-content p { margin: 0; color: var(--muted); line-height: 1.75; }
.seo-content details { margin-top: 18px; padding-top: 16px; border-top: 1px solid #edf2f2; }
.seo-content summary { color: var(--ink); font-weight: 700; cursor: pointer; }
.seo-content details p { margin-top: 10px; }
.seo-related a { color: var(--teal); text-decoration: none; }
.seo-related a:hover { text-decoration: underline; }

@media (max-width: 760px) {
  .fraction-input-row { grid-template-columns: 1fr; gap: 12px; }
  .extended-unit-row { grid-template-columns: 1fr; }
  .extended-unit-row .unit-arrow { display: none; }
  .basic-calculator { max-width: none; }
  .seo-content { padding: 22px 18px; }
  .unit-link-grid { grid-template-columns: 1fr 1fr; }
  .weekday-picker { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
