/* Calczora shared site frame: one header size, breadcrumbs and one footer on every page.
   Loaded last on each page, so these sizes win over the page's own stylesheet. */

/* ---------- Header: one header, identical on every page (markup in tools/header.html) ---------- */
.hd { position: relative; z-index: 40; color: #12214e; }
.hd-in { display: flex; align-items: center; gap: 8px; width: min(1140px, 100%); height: 64px; margin: 0 auto; padding: 0 20px; }
.hd-logo { display: inline-flex; align-items: center; gap: 8px; flex: none; min-height: 44px; color: inherit; text-decoration: none; }
.hd-logo svg { width: 46px; height: 32px; flex: none; }
.hd .tw { font: 500 24px/1 "Bricolage", system-ui, sans-serif; letter-spacing: -.035em; white-space: nowrap; color: #12214e; }
.hd .tw b { font-weight: 800; color: #f5a422; }
.hd-sp { flex: 1; }
.hd button { font: inherit; color: inherit; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.hd-nav { display: inline-flex; align-items: center; gap: 5px; height: 44px; margin-left: 6px; padding: 0 12px; border: 0; border-radius: 12px; background: none; font-weight: 700 !important; font-size: 15px !important; }
.hd-nav svg { transition: transform .2s ease; }
.hd-nav[aria-expanded="true"] { background: rgba(255, 255, 255, .5); }
.hd-nav[aria-expanded="true"] svg { transform: rotate(180deg); }
@media (hover: hover) { .hd-nav:hover { background: rgba(255, 255, 255, .4); } }
.hd-btn {
  position: relative; display: grid; place-items: center; flex: none; width: 44px; height: 44px; padding: 0; border-radius: 14px;
  background: rgba(255, 255, 255, .36); border: 1px solid rgba(255, 255, 255, .86);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 8px 16px -12px rgba(10, 22, 50, .7);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  transition: background-color .18s ease, transform .14s ease;
}
.hd-btn:active { transform: scale(.94); }
.hd-btn[aria-expanded="true"] { background: #fff; }
@media (hover: hover) { .hd-btn:hover { background: rgba(255, 255, 255, .6); } }
.hd :focus-visible { outline: 3px solid #f5a422; outline-offset: 2px; }
.hd-burger { display: none; }
.hd-burger .i-close, .hd-burger[aria-expanded="true"] .i-open { display: none; }
.hd-burger[aria-expanded="true"] .i-close { display: block; }
.hd-disp { position: relative; flex: none; }

/* popovers */
.hd-pop { position: absolute; z-index: 60; padding: 14px; border-radius: 18px; background: #fff; color: #12214e;
  box-shadow: 0 30px 60px -24px rgba(10, 22, 50, .55), 0 0 0 1px rgba(18, 33, 78, .06); }
.hd-pop[hidden] { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .hd-pop:not([hidden]) { animation: hdPop .18s cubic-bezier(.22, 1, .36, 1); }
  @keyframes hdPop { from { opacity: 0; transform: translateY(-6px) scale(.985); } }
}
.hd-k { margin: 2px 2px 8px; font: 700 12px/1 "Figtree", system-ui, sans-serif; letter-spacing: .07em; text-transform: uppercase; color: #4b5675; }
.hd-dispmenu { right: 0; top: 52px; width: 272px; transform-origin: top right; }
.hd-seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 3px; margin-bottom: 14px; border-radius: 12px; background: #eef2f8; }
.hd-seg button { display: grid; justify-items: center; gap: 4px; min-height: 56px; padding: 8px 4px; border: 0; border-radius: 9px; background: none; font-weight: 700; font-size: 13.5px; }
.hd-seg button[aria-pressed="true"] { background: #fff; box-shadow: 0 2px 6px -2px rgba(12, 34, 80, .4); }
@media (hover: hover) { .hd-seg button[aria-pressed="false"]:hover { background: rgba(255, 255, 255, .55); } }
.hd-fine { margin: -4px 2px 0; font-size: 13px; line-height: 1.4; color: #4b5675; }
.hd-mega { top: 60px; left: max(10px, calc(50% - 422px)); width: min(720px, calc(100vw - 20px)); max-height: calc(100dvh - 76px); overflow-y: auto; overscroll-behavior: contain; transform-origin: top left; }
.mega-find { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 14px; margin-bottom: 6px; border-radius: 13px; background: #fff; border: 1px solid rgba(18, 33, 78, .28); box-shadow: inset 0 1px 2px rgba(20, 42, 92, .08); color: #4b5675; }
.mega-find:focus-within { border-color: #12214e; box-shadow: 0 0 0 4px rgba(245, 164, 34, .28); }
.mega-find input { flex: 1; min-width: 0; height: 46px; border: 0; outline: 0; background: none; font: 500 16px/1.2 "Figtree", system-ui, sans-serif; color: #12214e; }
.mega-find input::placeholder { color: #5d6b88; opacity: 1; }
.mega-none { margin: 10px 4px; font-size: 14.5px; color: #4b5675; }
.mega-none a { color: #1d5bb8; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.mega-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px 22px; }
.mega-cat[hidden], .mega-cat li[hidden] { display: none; }
.mega-cat h3 { margin: 12px 0 4px; font: 700 12px/1 "Figtree", system-ui, sans-serif; letter-spacing: .07em; text-transform: uppercase; }
.mega-cat h3 a { display: inline-flex; align-items: center; gap: 7px; min-height: 28px; color: #4b5675; text-decoration: none; }
.mega-cat h3 i { width: 10px; height: 10px; border-radius: 3px; }
.mega-cat ul { margin: 0; padding: 0; list-style: none; }
.mega-cat li > a, .mega-cat li > span { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 38px; padding: 0 8px; margin: 0 -8px; border-radius: 9px; font-size: 15px; }
.mega-cat li > a { font-weight: 700; color: #12214e; text-decoration: none; }
@media (hover: hover) { .mega-cat li > a:hover, .mega-cat h3 a:hover { background: #f1f5fa; color: #12214e; } }
.mega-cat li > span { color: #5c6683; }
.mega-cat small { font: 700 12px/1 "Figtree", system-ui, sans-serif; padding: 3px 7px; border-radius: 99px; background: #fff1d2; color: #8a5300; white-space: nowrap; }
.mega-all { display: flex; align-items: center; gap: 6px; margin-top: 10px; padding: 12px 4px 2px; border-top: 1px solid rgba(18, 33, 78, .1); font-weight: 700; color: #12214e; text-decoration: none; }
.hd-mega.searching .mega-all { display: none; }

/* night */
[data-theme="dark"] .hd { color: #eaf2ff; }
[data-theme="dark"] .hd .tw { color: #f1f4fb; }
[data-theme="dark"] .hd-nav[aria-expanded="true"] { background: rgba(255, 255, 255, .12); }
@media (hover: hover) { [data-theme="dark"] .hd-nav:hover { background: rgba(255, 255, 255, .08); } }
[data-theme="dark"] .hd-btn { background: rgba(40, 60, 112, .5); border-color: rgba(205, 222, 255, .2); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12); }
[data-theme="dark"] .hd-btn[aria-expanded="true"] { background: rgba(70, 95, 160, .7); }
@media (hover: hover) { [data-theme="dark"] .hd-btn:hover { background: rgba(55, 80, 140, .6); } }
[data-theme="dark"] .hd-pop { background: #141d3d; color: #e8edf8; box-shadow: 0 30px 60px -24px rgba(0, 0, 0, .8), 0 0 0 1px rgba(255, 255, 255, .08); }
[data-theme="dark"] .hd-k, [data-theme="dark"] .hd-fine, [data-theme="dark"] .mega-cat h3 a, [data-theme="dark"] .mega-none { color: #a9b4cf; }
[data-theme="dark"] .hd-seg { background: rgba(255, 255, 255, .06); }
[data-theme="dark"] .hd-seg button[aria-pressed="true"] { background: rgba(255, 255, 255, .92); color: #12214e; box-shadow: none; }
@media (hover: hover) { [data-theme="dark"] .hd-seg button[aria-pressed="false"]:hover { background: rgba(255, 255, 255, .08); } }
[data-theme="dark"] .mega-find { background: rgba(11, 22, 50, .82); border-color: rgba(210, 225, 255, .34); color: #a9b4cf; }
[data-theme="dark"] .mega-find:focus-within { border-color: #f1f4fb; }
[data-theme="dark"] .mega-find input { color: #f1f4fb; }
[data-theme="dark"] .mega-find input::placeholder { color: #a9b4cf; }
[data-theme="dark"] .mega-cat li > a, [data-theme="dark"] .mega-all { color: #f1f4fb; }
@media (hover: hover) { [data-theme="dark"] .mega-cat li > a:hover, [data-theme="dark"] .mega-cat h3 a:hover { background: rgba(255, 255, 255, .06); color: #fff; } }
[data-theme="dark"] .mega-cat li > span { color: #a3aecb; }
[data-theme="dark"] .mega-cat small { background: rgba(245, 165, 36, .16); color: #ffcf7a; }
[data-theme="dark"] .mega-none a { color: #9fcbff; }
[data-theme="dark"] .mega-all { border-color: rgba(255, 255, 255, .1); }
.anim .hd .tw, .theming .hd .tw, .anim .hd-btn, .theming .hd-btn { transition: color .7s ease, background-color .7s ease, border-color .7s ease; }

/* phones and small tablets: logo, Chill | Pro, Display and Menu on one row */
@media (max-width: 760px) {
  .hd-in { gap: 6px; padding: 0 16px; }
  .hd .tw { font-size: 22px; }
  .hd-logo { gap: 7px; }
  .hd-logo svg { width: 40px; height: 28px; }
  .hd-nav, .hd-find { display: none; }
  .hd-burger { display: grid; }
  .hd-btn { width: 42px; height: 42px; border-radius: 13px; }
  .hd-mega { left: 10px; right: 10px; width: auto; top: 60px; padding: 12px; }
  .mega-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
  .hd-dispmenu { right: -48px; }
  .hd-open body { overflow: hidden; }
}
@media (max-width: 420px) { .mega-grid { grid-template-columns: 1fr; } }

/* calculator pages: jump links under the title, where the old header links were */
.jump { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; padding: 0; }
.jump a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: 99px; font-size: 14px; font-weight: 700; color: #12214e; text-decoration: none;
  background: rgba(255, 255, 255, .5); border: 1px solid rgba(255, 255, 255, .85); }
@media (hover: hover) { .jump a:hover { background: rgba(255, 255, 255, .8); } }
[data-theme="dark"] .jump a { color: #eaf2ff; background: rgba(40, 60, 112, .45); border-color: rgba(205, 222, 255, .18); }

/* ---------- Breadcrumbs (Home › Section › Page) ---------- */
.crumbs { margin: 0 0 14px; font-size: 13.5px; font-weight: 600; }
.crumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; margin: 0; padding: 0; list-style: none; }
.crumbs li { display: inline-flex; align-items: center; gap: 6px; color: #12214e; }
.crumbs li + li::before { content: ""; width: 6px; height: 6px; border: solid currentColor; border-width: 1.6px 1.6px 0 0; transform: rotate(45deg); opacity: .55; }
.crumbs a { display: inline-flex; align-items: center; min-height: 32px; color: inherit; text-decoration: none; }
@media (hover: hover) { .crumbs a:hover { text-decoration: underline; text-underline-offset: 3px; } }
.crumbs [aria-current] { color: #12214e; font-weight: 700; }
.crumbs.center ol { justify-content: center; }
.night .crumbs li, [data-theme="dark"] .crumbs li { color: #c3cde6; }
.night .crumbs [aria-current], [data-theme="dark"] .crumbs [aria-current] { color: #f1f4fb; }

/* ---------- Footer: same links on every page ---------- */
.sitefoot {
  display: grid; gap: 28px 32px; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  padding: 34px 28px 22px; border-radius: 26px 26px 0 0; background: #fff; color: #535c73; font-size: 14.5px;
}
.sitefoot .about-col p { margin: 10px 0 0; max-width: 34ch; line-height: 1.55; }
.sitefoot .ft { font: 500 22px/1 var(--display); letter-spacing: -.035em; color: #12214e; text-decoration: none; }
.sitefoot .ft b { font-weight: 800; color: #b97a16; }
.night .sitefoot .ft b, [data-theme="dark"] .sitefoot .ft b { color: #f5a422; }
.sitefoot h2 { margin: 0 0 10px; font: 700 13px/1.2 var(--font); letter-spacing: .08em; text-transform: uppercase; color: #12214e; }
.sitefoot ul { margin: 0; padding: 0; list-style: none; }
.sitefoot li a { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; color: inherit; text-decoration: none; }
@media (hover: hover) { .sitefoot li a:hover { color: #12214e; text-decoration: underline; text-underline-offset: 3px; } }
.sitefoot .soon { font-size: 12px; font-weight: 700; color: #8a5300; background: #fff1d2; padding: 2px 6px; border-radius: 99px; }
.sitefoot .base { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; padding-top: 16px; border-top: 1px solid rgba(18, 33, 78, .1); font-size: 13.5px; }
.sitefoot .base p { margin: 0; }
.night .sitefoot, [data-theme="dark"] .sitefoot { background: #141d3d; color: #a3aecb; }
.night .sitefoot .ft, .night .sitefoot h2, [data-theme="dark"] .sitefoot .ft, [data-theme="dark"] .sitefoot h2 { color: #f1f4fb; }
@media (hover: hover) { .night .sitefoot li a:hover, [data-theme="dark"] .sitefoot li a:hover { color: #fff; } }
.night .sitefoot .soon, [data-theme="dark"] .sitefoot .soon { color: #ffcf7a; background: rgba(245, 165, 36, .16); }
.night .sitefoot .base, [data-theme="dark"] .sitefoot .base { border-color: rgba(255, 255, 255, .1); }
.anim .sitefoot, .theming .sitefoot { transition: background-color .7s ease, color .7s ease; }
@media (max-width: 860px) {
  .sitefoot { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 28px 20px 18px; }
  .sitefoot .about-col { grid-column: 1 / -1; }
}
.sitefoot li > span { display: inline-block; padding-block: 7px; line-height: 1.4; }
.sitefoot li > span .soon { margin-left: 4px; white-space: nowrap; vertical-align: 1px; }
.sitefoot li a { line-height: 1.4; }
.foot-wrap { margin-top: 56px; }

/* ads: built into every calculator page, switched off until AdSense is approved (html.ads-on shows them) */
.ad-slot { display: none; }
.ads-on .ad-slot { display: block; min-height: 280px; margin: 28px auto 0; padding-top: 22px; position: relative; }
.ads-on .ad-slot::before { content: "Advertisements"; position: absolute; top: 0; left: 0; font-size: 12px; font-weight: 600; color: var(--navy-2); }

/* N8: the white headline words get a soft navy shadow so they read clearly on the sky */
html:not([data-look="pro"]) .hero h1 em { text-shadow: 0 2px 14px rgba(16, 36, 80, .32), 0 1px 2px rgba(16, 36, 80, .22); }

/* Phones: a tapped number box is emptied and shows its old value faintly until you type (header.js) */
main input[data-was]::placeholder, main .cf-in.dmy input.seg[data-was]::placeholder { opacity: .45; }
