/* Shared layout for static pages; original palette and card design are retained. */
body { font-family: Tahoma, Arial, sans-serif; font-size: 15px; line-height: 1.8; }
[hidden] { display: none !important; }
a:focus-visible, summary:focus-visible { outline: 3px solid #087e71; outline-offset: 4px; border-radius: 3px; }
.skip-link { position: fixed; inset-block-start: -100px; inset-inline-start: 16px; z-index: 200; background: #fff; color: #075b53; padding: 12px 20px; border: 2px solid currentColor; }
.skip-link:focus { inset-block-start: 12px; }
.js-only { display: none !important; }
.js .js-only { display: flex !important; }
.sidebar { gap: 24px; overflow-y: auto; }
.brand { padding: 0; flex-shrink: 0; }
.brand .mark { flex-shrink: 0; }
.brand b { letter-spacing: -.6px; }
.brand small { font-size: 9px; color: #526b65; }
.side-label { color: #526b65; }
.side-link { padding: 9px 12px; }
.side-link:hover { text-decoration: underline; }
.sidebar-bottom { margin-top: 0; }
.topbar { background: #fff; }
.desktop-tagline { color: #506b63; font-size: 13px; }
.top-actions { font-size: 12px; flex-wrap: wrap; }
.top-actions a:hover, .footer a:hover { text-decoration: underline; }
.mobile-header { display: none; }
.menu-toggle { display: grid; place-items: center; width: 46px; height: 46px; padding: 0; border: 1px solid #cdded5; border-radius: 12px; background: #f0f7f3; color: #075b53; cursor: pointer; list-style: none; }
.menu-toggle::-webkit-details-marker { display: none; }
.menu-close, .mobile-menu[open] .menu-bars { display: none; }
.mobile-menu[open] .menu-close { display: block; }
.mobile-menu-panel { position: absolute; inset-inline: 0; top: 100%; padding: 16px 24px 24px; background: #fff; border-bottom: 1px solid #dce8e1; box-shadow: 0 15px 25px #123c3214; max-height: 70vh; max-height: 70dvh; overflow-y: auto; overscroll-behavior: contain; }
.mobile-menu-panel a { display: block; padding: 10px 12px; border-radius: 9px; color: #173c32; font-size: 14px; }
.mobile-menu-panel a:hover { background: #eff6f1; color: #075b53; }
.mobile-menu-label { margin: 12px 12px 4px; padding-top: 12px; border-top: 1px solid #e1ebe4; color: #526b65; font-size: 12px; font-weight: 700; }
.page { max-width: 1280px; }
.hero { align-items: center; min-height: 275px; padding-block: 36px; }
.hero h1 { font-size: clamp(26px, 3vw, 38px); line-height: 1.5; margin: 15px 0; }
.hero p { font-size: 14px; line-height: 2; }
.hero-art { text-align: center; }
.hero-art img { display: inline-block; border-radius: 40px; transform: rotate(-9deg); box-shadow: 0 14px 40px #003f3b55; }
.section-head h2 { font-size: 21px; }
.section-head p, .country small, .tool p { color: #526b62; font-size: 12px; }
.countries { gap: 10px; }
.country { padding: 17px 5px; }
.country b { font-size: 12px; }
.tool { padding: 22px; min-height: 220px; }
.tool h3 { font-size: 16px; line-height: 1.7; margin-block: 14px 8px; }
.tool h3 a:hover { color: #087e71; text-decoration: underline; }
.tool p { line-height: 1.9; }
.tool-foot { margin-top: 7px; }
.tag { color: #476f62; }
.open-tool { color: #076557; font-size: 12px; }
.favorite { min-width: 32px; min-height: 32px; color: #647d73; align-items: center; justify-content: center; }
.favorite.active { color: #986600; }
.filter { color: #49675b; display: inline-block; }
.filter[aria-pressed="true"] { background: #087e71; color: #fff; }
.search-row { align-items: end; gap: 14px; margin-block: 18px; }
.search-label { flex: 1; font-size: 12px; color: #48665d; font-weight: 700; }
.search-label input { display: block; width: 100%; padding: 12px 15px; background: #fff; border: 1px solid #cdded5; border-radius: 12px; margin-top: 5px; }
[data-result-count] { white-space: nowrap; font-size: 12px; padding-bottom: 12px; color: #526b62; }
.breadcrumb { font-size: 12px; color: #47665b; }
.breadcrumb ol { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; list-style: none; padding: 0; }
.breadcrumb li + li::before { content: '/'; margin-inline-end: 8px; color: #7a8c84; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb [aria-current] { color: #075b53; font-weight: 700; }
.page-heading { margin-block: 12px 28px; max-width: 880px; }
.kicker { font-size: 12px; font-weight: 700; color: #087e71; }
.page-heading h1 { font-size: clamp(25px, 3vw, 36px); line-height: 1.6; margin-block: 8px 12px; }
.page-heading p { color: #526b62; max-width: 780px; line-height: 2; margin: 0; }
.prose { line-height: 2.1; font-size: 14px; color: #3e5c51; }
.prose h2 { font-size: 20px; color: #173c32; margin-block: 27px 10px; line-height: 1.7; }
.prose h2:first-child { margin-top: 0; }
.prose p { font-size: 14px; line-height: 2.1; color: #3e5c51; margin-block: 12px; }
.prose li { margin-block: 10px; }
.prose a { text-decoration: underline; text-underline-offset: 3px; color: #076557; }
.home-guide { margin-top: 30px; padding: 27px; }
.calculator-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(240px, 1fr); gap: 24px; align-items: start; }
.calculator-panel { border: 1px solid #dce8e1; border-radius: 22px; background: #fff; padding: 27px; box-shadow: var(--shadow); min-width: 0; }
.calculator-intro { display: flex; gap: 12px; align-items: center; padding-bottom: 18px; margin-bottom: 19px; border-bottom: 1px solid #e5eee8; }
.calculator-intro h2 { font-size: 18px; margin: 0; }
.country-select { padding-bottom: 18px; border-bottom: 1px solid #e5eee8; margin-bottom: 18px; }
.field-grid { margin-top: 12px; }
.field { min-width: 0; }
.field label { line-height: 1.7; }
.field small, .form-note { font-size: 12px; color: #536d61; line-height: 1.9; }
.form-note { background: #f1f7f3; padding: 12px; border-radius: 10px; }
.field input, .field select { min-height: 46px; background: #fff; border-color: #b9cec2; }
.field select { padding-inline: 10px 26px; }
.calculate { min-height: 48px; }
.speed-metrics { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin-block: 24px; }
.speed-metric { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 16px 0; min-width: 0; }
.speed-metric-label { font-size: 13px; color: #3e5c51; margin-bottom: 12px; }
.speed-gauge { position: relative; width: min(100%, 190px); aspect-ratio: 160 / 140; }
.speed-gauge svg { display: block; width: 100%; height: 100%; overflow: visible; }
.speed-gauge-track, .speed-gauge-fill { fill: none; stroke-width: 16; stroke-linecap: butt; }
.speed-gauge-track { stroke: #e1e2e3; }
.speed-gauge-fill { stroke: #24b064; stroke-dasharray: 88 100; }
.speed-gauge-base { stroke: #e1e2e3; stroke-width: 5; }
.speed-gauge-value { position: absolute; inset: 33% 16% auto; display: flex; flex-direction: column; align-items: center; color: #080808; font-family: Arial, sans-serif; }
.speed-gauge-value strong { font-size: clamp(18px, 2.4vw, 30px); font-weight: 750; line-height: 1.15; letter-spacing: -.7px; font-variant-numeric: tabular-nums; max-width: 100%; }
.speed-gauge-value small { color: #080808; font-size: 16px; font-weight: 700; line-height: 1.3; }
@media(max-width:560px) { .speed-metrics { grid-template-columns: 1fr; gap: 8px; } .speed-gauge-value strong { font-size: 30px; } }
.speed-actions { display: flex; gap: 12px; align-items: stretch; flex-wrap: wrap; }
.speed-actions button { margin-top: 0; }
.speed-actions .calculate { flex: 1; width: auto; }
.speed-panel progress { display: block; width: 100%; height: 12px; accent-color: #087e71; }
.calculate:disabled { opacity: .5; cursor: wait; }
.field input:read-only { background: #eff6f1; }
.form-note a { color: #075b53; text-decoration: underline; }
.result-box { display: block; overflow-wrap: anywhere; }
.result-caption { font-size: 13px; margin: 0; color: #466b5b; }
.result-primary { line-height: 1.7; font-size: 24px; }
.result-box[data-error="true"] { background: #fff3ed; border-color: #f0c6b0; }
.result-box[data-error="true"] .result-primary { color: #8a3217; }
.quick-guide { padding: 18px 8px; }
.quick-guide ol { padding-inline-start: 23px; }
.quick-guide li { margin-block: 15px; }
.reading-panel { background: #fff; border: 1px solid #e0eae3; padding: 30px; border-radius: 20px; margin-top: 28px; }
.formula { border-inline-start: 3px solid #087e71; background: #f0f7f3; border-radius: 6px; padding: 16px 20px; }
.reading-panel details { border-top: 1px solid #e0eae3; padding-block: 15px; }
summary { color: #173c32; font-weight: 700; cursor: pointer; }
.grade-row { grid-template-columns: minmax(60px, 1fr) minmax(60px, 1fr) auto; gap: 8px; padding: 12px; border: 1px solid #e0eae3; border-radius: 10px; align-items: end; min-width: 0; }
.grade-row label { font-size: 11px; }
.remove-course { background: #fff; border: 1px solid #d2dfd7; color: #7b3926; border-radius: 8px; min-height: 40px; padding: 5px 8px; }
.remove-course:disabled { opacity: .45; cursor: default; }
.ad-space { border: 1px solid #dde5df; border-radius: 12px; background: #f0f3f0; margin-block: 40px; padding: 12px; text-align: center; min-height: 280px; display: flex; flex-direction: column; }
.ad-label { color: #657269; font-size: 10px; letter-spacing: .3px; }
.ad-placeholder { flex: 1; display: grid; place-items: center; color: #748078; font-size: 12px; }
.ad-compact { min-height: 250px; }
.footer { font-size: 12px; color: #526b62; gap: 18px; margin-top: 38px; }
.footer nav { display: flex; flex-wrap: wrap; gap: 16px; }
.footer p { flex-basis: 100%; margin: 0; line-height: 1.9; }
.footer a { color: #076557; }
@media (max-width: 1100px) {
  .calculator-layout { grid-template-columns: 1fr; }
  .quick-guide { padding: 10px; }
  .countries { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .sidebar, .desktop-tagline { display: none; }
  .mobile-header { position: relative; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 16px; background: #fff; padding: 16px 24px; border-bottom: 1px solid #e1ebe4; }
  .topbar { height: auto; min-height: 82px; padding-block: 14px; }
  .hero-art { display: block; width: 150px; }
  .hero-art img { width: 130px; height: 130px; }
}
@media (max-width: 560px) {
  .page { padding: 22px 16px 35px; }
  .topbar { gap: 12px; }
  .top-actions { font-size: 11px; gap: 8px; }
  .mobile-header { padding: 14px 16px; }
  .hero-art { display: none; }
  .hero { padding: 26px 23px; min-height: 0; }
  .hero p { font-size: 13px; }
  .hero h1 { font-size: 29px; }
  .tools { grid-template-columns: 1fr; gap: 14px; }
  .tool { min-height: 185px; padding: 20px; }
  .tool h3 { font-size: 17px; }
  .tool p { font-size: 13px; }
  .search-row { flex-wrap: wrap; gap: 10px; }
  .search-label { flex-basis: 100%; }
  [data-result-count] { padding-bottom: 5px; }
  .calculator-panel, .reading-panel, .home-guide { padding: 20px; border-radius: 16px; }
  .field-grid { grid-template-columns: 1fr; gap: 16px; }
  .field.full { grid-column: auto; }
  .grade-row { grid-template-columns: 1fr 1fr; }
  .prose { font-size: 14px; }
  .ad-space { margin-block: 32px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
