/* Navigation and footer styles reused from rartozipconverter.wiki; scoped to preserve calculator styles. */
.site-chrome {
  --page-bg: #f8fafc;
  --surface: #ffffff;
  --surface-muted: #f1f5f9;
  --surface-blue: #eff6ff;
  --ink: #0f172a;
  --muted: #475569;
  --muted-light: #64748b;
  --border: #cbd5e1;
  --border-strong: #94a3b8;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-soft: #dbeafe;
  --accent: #15803d;
  --accent-soft: #dcfce7;
  --warning: #a16207;
  --warning-soft: #fef3c7;
  --danger: #b91c1c;
  --danger-soft: #fee2e2;
  --shadow-sm: 0 4px 14px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 18px 42px rgba(15, 23, 42, 0.09);
  --shadow-focus: 0 0 0 4px rgba(37, 99, 235, 0.18);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.site-chrome .wrap {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}
.site-chrome .visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.site-chrome .skip-link {
  position: fixed;
  top: 10px;
  left: 12px;
  z-index: 100;
  transform: translateY(-180%);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  transition: transform 180ms ease;
}
.site-chrome .skip-link:focus {
  transform: translateY(0);
}
.site-chrome.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid rgba(203, 213, 225, 0.82);
  background: rgba(248, 250, 252, 0.92);
  backdrop-filter: blur(16px);
}
.site-chrome .header-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 78px;
}
.site-chrome .brand,
.site-chrome .footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  text-decoration: none;
}
.site-chrome .brand {
  flex: 0 0 auto;
}
.site-chrome .brand-mark {
  display: block;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}
.site-chrome .brand-copy {
  display: block;
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.1;
}
.site-chrome .brand-copy small {
  display: block;
  margin-top: 4px;
  color: var(--muted-light);
  font-family: var(--mono);
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}
.site-chrome .header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}
.site-chrome .mobile-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, box-shadow 180ms ease;
}
.site-chrome .mobile-menu-toggle:hover,
.site-chrome .mobile-menu-toggle[aria-expanded="true"] {
  border-color: var(--border-strong);
  background: var(--surface-blue);
  color: var(--primary-hover);
  box-shadow: var(--shadow-sm);
}
.site-chrome .mobile-menu-toggle svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 2;
}
.site-chrome .menu-icon-line {
  transform-origin: 12px 12px;
  transition: transform 180ms ease, opacity 180ms ease;
}
.site-chrome .mobile-menu-toggle[aria-expanded="true"] .menu-icon-line-top {
  transform: translateY(5px) rotate(45deg);
}
.site-chrome .mobile-menu-toggle[aria-expanded="true"] .menu-icon-line-middle {
  opacity: 0;
}
.site-chrome .mobile-menu-toggle[aria-expanded="true"] .menu-icon-line-bottom {
  transform: translateY(-5px) rotate(-45deg);
}
.site-chrome .primary-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  min-width: 0;
}
.site-chrome .primary-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 180ms ease, color 180ms ease;
}
.site-chrome .primary-nav a:hover {
  background: var(--surface-blue);
  color: var(--primary-hover);
}
.site-chrome .primary-nav .nav-privacy {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
}
.site-chrome .primary-nav .nav-privacy:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
}
.site-chrome .language-menu {
  position: relative;
  flex: 0 0 auto;
  z-index: 50;
}
.site-chrome .language-menu summary {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 118px;
  min-height: 44px;
  padding: 9px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-sm);
  color: var(--muted);
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 800;
  line-height: 1;
  list-style: none;
  white-space: nowrap;
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease, border-color 180ms ease;
}
.site-chrome .language-menu summary::marker {
  content: "";
  font-size: 0;
}
.site-chrome .language-menu summary::-webkit-details-marker {
  display: none;
}
.site-chrome .language-menu summary::after {
  width: 0;
  height: 0;
  border-top: 5px solid currentColor;
  border-right: 4px solid transparent;
  border-bottom: 0;
  border-left: 4px solid transparent;
  content: "";
  flex: 0 0 auto;
  opacity: 0.58;
  transition: transform 180ms ease;
}
.site-chrome .language-menu summary:hover {
  transform: translateY(-1px);
  border-color: var(--border-strong);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}
.site-chrome .language-menu[open] summary {
  border-color: var(--border-strong);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}
.site-chrome .language-menu[open] summary::after {
  transform: rotate(180deg);
}
.site-chrome .language-menu summary svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: var(--primary);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  transition: transform 180ms ease, stroke 180ms ease;
}
.site-chrome .language-menu summary:hover svg,
.site-chrome .language-menu[open] summary svg {
  stroke: var(--primary-hover);
  transform: rotate(8deg);
}
.site-chrome .language-current {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}
.site-chrome .language-current-short {
  display: none;
}
.site-chrome .language-options {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 60;
  display: grid;
  gap: 3px;
  min-width: 160px;
  max-width: calc(100vw - 28px);
  padding: 7px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}
.site-chrome .language-option,
.site-chrome .language-options a {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  min-height: 40px;
  padding: 9px 12px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 150ms ease, color 150ms ease;
}
.site-chrome .language-option:hover,
.site-chrome .language-options a:hover {
  background: var(--primary-soft);
  color: var(--primary-hover);
  text-decoration: none;
}
.site-chrome .language-option.is-current {
  background: var(--primary-soft);
  color: var(--primary-hover);
  cursor: default;
}
.site-chrome.site-footer {
  padding: 48px 0 28px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.site-chrome .footer-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 42px;
}
.site-chrome .footer-brand {
  max-width: 510px;
}
.site-chrome .footer-logo {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.025em;
}
.site-chrome .footer-logo img {
  width: 38px;
  height: 38px;
  border-radius: 10px;
}
.site-chrome .footer-brand > p {
  margin: 13px 0 0;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.7;
}
.site-chrome .footer-email {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 14px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
  text-decoration: none;
}
.site-chrome .footer-email:hover {
  color: var(--primary-hover);
}
.site-chrome .footer-email svg {
  width: 16px;
  height: 16px;
}
.site-chrome .footer-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, auto));
  gap: 36px;
}
.site-chrome .footer-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}
.site-chrome .footer-group p {
  margin: 0 0 3px;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.site-chrome .footer-group a {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 650;
  text-decoration: none;
}
.site-chrome .footer-group a:hover {
  color: var(--primary-hover);
}
.site-chrome .footer-bottom {
  margin-top: 34px;
  padding-top: 17px;
  border-top: 1px solid var(--border);
}
.site-chrome .footer-bottom p {
  margin: 0;
  color: var(--muted-light);
  font-family: var(--mono);
  font-size: 0.67rem;
  line-height: 1.6;
}

/* Integration boundaries: keep calculator typography, box sizing and theme intact. */
.site-chrome { width: 100vw; max-width: 100%; color: var(--ink); font: 16px/1.6 var(--sans); }
.site-chrome, .site-chrome *, .site-chrome *::before, .site-chrome *::after { box-sizing: border-box; }
.site-chrome.site-header { left: 0; margin-bottom: 20px; }
.site-chrome.site-footer { clear: both; position: relative; margin-top: 40px; }
.site-chrome .header-inner { max-width: none; }
.site-chrome a:is(:link, :visited) { color: inherit; }
.site-chrome .primary-nav a:is(:link, :visited), .site-chrome .footer-group a:is(:link, :visited) { color: var(--muted); }
.site-chrome .primary-nav a:hover, .site-chrome .footer-group a:hover { color: var(--primary-hover); }
.site-chrome .primary-nav a[aria-current="page"] { color: var(--primary-hover); background: var(--primary-soft); }
.site-chrome button { font: inherit; }
.site-chrome :is(a, button, summary):focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; }
.site-chrome .brand-copy { max-width: 280px; }
.site-chrome .brand-mark { object-fit: contain; }
.calculator-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; margin-bottom: 16px; }
.calculator-toolbar #switchTheme, .calculator-toolbar .dex-change { margin: 0; width: auto; }
.chrome-skip-link { position: fixed; top: 8px; left: 12px; z-index: 100; padding: 12px 16px; color: #fff !important; background: #0f172a; border-radius: 8px; transform: translateY(-160%); }
.chrome-skip-link:focus { transform: translateY(0); }
@media (max-width: 960px) {
  .site-chrome .header-inner { gap: 14px; }
  .site-chrome .brand-copy { font-size: 0.95rem; max-width: 220px; }
  .site-chrome .primary-nav a { padding-inline: 8px; font-size: 0.8rem; }
}
@media (max-width: 760px) {
  .site-chrome .wrap { width: min(calc(100% - 28px), 620px); }
  .site-chrome .header-inner { flex-wrap: wrap; gap: 0 10px; padding: 12px 0 10px; }
  .site-chrome .header-actions { order: 2; margin-left: auto; }
  .site-chrome .mobile-menu-toggle { display: inline-flex; }
  .site-chrome .primary-nav { order: 3; flex: 1 0 100%; width: 100%; display: none; margin-top: 8px; padding: 8px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-md); }
  .site-chrome .primary-nav.is-mobile-open { display: grid; grid-template-columns: minmax(0, 1fr); justify-content: stretch; }
  .site-chrome .primary-nav.is-mobile-open a { width: 100%; min-height: 48px; padding: 12px 14px; font-size: 0.95rem; }
  .site-chrome .footer-inner { flex-direction: column; gap: 28px; }
  .site-chrome .footer-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; width: 100%; }
  .site-chrome .footer-group a { overflow-wrap: anywhere; }
}
@media (max-width: 480px) {
  .site-chrome .brand-copy { font-size: 0.9rem; max-width: 215px; }
  .site-chrome .brand-copy small { display: none; }
  .site-chrome .brand-mark { width: 40px; height: 40px; }
  .site-chrome .brand { gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .site-chrome *, .site-chrome *::before, .site-chrome *::after { transition: none !important; }
}
