/* calheta.eu inner pages. Same tokens as the home page. */
:root {
  --sun: #ffb000; --sun-hot: #ff6a1a; --ocean: #052e52; --ocean-2: #0a4a80; --night: #040a1e;
  --on-dark: #f3f7fb; --on-dark-muted: #a9bdd2;
  --paper: #f4f8fb; --paper-2: #e8f0f6; --card: #ffffff; --ink: #0a1d31; --muted: #4d6175;
  --line: #d3dee8; --link: #0a5694; --kicker: #b24f06; --bar: #c6d6e4; --glass: rgba(244, 248, 251, 0.86);
  --notice: #fff4dc; --notice-line: #f0c46b;
  --display: "Anybody", "Arial Black", "Helvetica Neue", system-ui, sans-serif;
  --body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Martian Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --gutter-l: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  color-scheme: light;
}
/* Ukrainian: the Latin display face has no Cyrillic */
html:lang(uk) { --display: "Montserrat", "Arial Black", system-ui, sans-serif; }
html:lang(uk) h1, html:lang(uk) h2, html:lang(uk) h3 { font-stretch: normal; letter-spacing: -0.01em; }
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #06111e; --paper-2: #0a1828; --card: #0d1d30; --ink: #e6eef6; --muted: #9db0c3;
    --line: #1c3047; --link: #8ccbf5; --kicker: #ffb84d; --bar: #29415b; --glass: rgba(6, 17, 30, 0.86);
    --notice: #2a2210; --notice-line: #8a6a24;
    color-scheme: dark;
  }
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--paper); color: var(--ink); font-family: var(--body);
  font-size: 1.0625rem; line-height: 1.65; -webkit-font-smoothing: antialiased;
  padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px);
}
a { color: var(--link); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--sun); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--display); text-wrap: balance; margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }
.wrap { max-width: 1100px; margin-inline: auto; padding-left: var(--gutter-l); padding-right: var(--gutter-r); }

/* header */
.bar { position: sticky; top: 0; z-index: 20; background: var(--glass); -webkit-backdrop-filter: blur(16px) saturate(150%); backdrop-filter: blur(16px) saturate(150%); box-shadow: 0 1px 0 var(--line); }
.bar-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 60px; max-width: 1100px; margin-inline: auto; padding-left: var(--gutter-l); padding-right: var(--gutter-r); }
.mark { font-family: var(--display); font-weight: 800; font-stretch: 120%; font-size: 1.2rem; letter-spacing: -0.02em; color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.mark i { width: 14px; height: 14px; border-radius: 50%; background: var(--sun); box-shadow: 0 0 14px var(--sun); }
.mark span { opacity: 0.65; font-weight: 500; }
.bar nav { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.bar nav::-webkit-scrollbar { display: none; }
.bar nav a { color: var(--ink); text-decoration: none; font-size: 0.9rem; padding: 6px 10px; border-radius: 999px; white-space: nowrap; }
.bar nav a:hover, .bar nav a[aria-current="page"] { background: color-mix(in srgb, var(--sun) 22%, transparent); }
@media (max-width: 620px) { .bar nav a.opt { display: none; } .mark span { display: none; } }

/* hero band */
.hero { color: #fff; background: linear-gradient(172deg, #13235a 0%, #43407f 38%, #c0657a 70%, #f2885a 88%, #ffb000 100%); }
.hero.sea { background: linear-gradient(172deg, #031e38 0%, #052e52 45%, #0a4a80 80%, #0f6aae 100%); }
.hero .wrap { padding-block: clamp(40px, 7vw, 84px) clamp(36px, 6vw, 64px); display: grid; gap: 16px; }
.crumbs { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.06em; color: rgba(255,255,255,0.85); }
.crumbs a { color: #fff; }
.hero h1 { font-size: clamp(2.2rem, 1.2rem + 4.2vw, 4.4rem); font-weight: 850; font-stretch: 112%; line-height: 0.98; max-width: 20ch; }
.hero .lead { font-size: clamp(1.08rem, 1rem + 0.4vw, 1.28rem); line-height: 1.55; max-width: 60ch; color: rgba(255,255,255,0.94); }
.checked { font-family: var(--mono); font-size: 0.72rem; color: rgba(255,255,255,0.8); }

/* content */
main { display: block; }
.sec { padding-block: clamp(44px, 6vw, 80px); }
.sec + .sec { padding-top: 0; }
.sec.alt { background: var(--paper-2); padding-top: clamp(44px, 6vw, 80px); }
.kicker { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--kicker); }
.sec h2 { font-size: clamp(1.7rem, 1.1rem + 2.2vw, 2.8rem); font-weight: 800; font-stretch: 110%; line-height: 1.02; margin-top: 8px; }
.prose { display: grid; gap: 16px; max-width: 68ch; margin-top: 18px; }
.prose ul, .prose ol { margin: 0; padding-left: 1.2em; display: grid; gap: 8px; }
.prose li::marker { color: var(--kicker); }
.prose strong { font-weight: 650; }
.notice { margin-top: 0; background: var(--notice); border: 1px solid var(--notice-line); border-radius: 18px; padding: 16px 20px; display: grid; gap: 6px; max-width: 72ch; }
.notice b { font-family: var(--display); font-stretch: 108%; font-size: 1.1rem; }

.cards { list-style: none; margin: 26px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); gap: 16px; }
.cards li { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 18px 20px; display: grid; gap: 6px; align-content: start; min-width: 0; }
.cards h3 { font-size: 1.25rem; font-weight: 750; font-stretch: 106%; line-height: 1.15; }
.cards .meta { font-family: var(--mono); font-size: 0.72rem; color: var(--kicker); letter-spacing: 0.03em; }
.cards p { font-size: 0.98rem; }
.cards .where { font-family: var(--mono); font-size: 0.72rem; color: var(--muted); }

.steps { counter-reset: s; list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 12px; max-width: 72ch; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 2.4rem 1fr; gap: 12px; align-items: start; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; }
.steps li::before { content: counter(s); font-family: var(--display); font-weight: 800; font-size: 1.4rem; line-height: 1; color: var(--kicker); text-align: center; padding-top: 2px; }
.steps b { display: block; font-weight: 650; }

/* whale calendar */
.cal-scroll { position: relative; overflow-x: auto; margin-top: 22px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.cal { border-collapse: separate; border-spacing: 4px; width: 100%; min-width: 620px; font-variant-numeric: tabular-nums; }
.cal th, .cal td { padding: 0; }
.cal thead th { font-family: var(--mono); font-size: 0.68rem; font-weight: 500; color: var(--muted); padding: 6px 0; }
.cal thead th.sel { color: #1b1200; background: var(--sun); border-radius: 6px; }
.cal tbody th { text-align: left; font-weight: 600; font-size: 0.9rem; padding: 3px 10px; white-space: nowrap; }
.cal td { height: 24px; border-radius: 6px; background: color-mix(in srgb, var(--bar) 35%, transparent); }
.cal td.seen { background: color-mix(in srgb, var(--sun) 35%, var(--card)); }
.cal td.main { background: var(--sun); }
.cal td.sel { box-shadow: inset 0 0 0 2px var(--ink); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 12px; font-family: var(--mono); font-size: 0.7rem; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend i { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }
.legend .l-main { background: var(--sun); }
.legend .l-seen { background: color-mix(in srgb, var(--sun) 35%, var(--card)); border: 1px solid var(--line); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.cta { margin-top: 26px; background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: clamp(20px, 3.5vw, 32px); display: grid; gap: 10px; max-width: 72ch; }
.cta h3 { font-size: 1.5rem; font-weight: 800; font-stretch: 110%; }
.next { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.next a { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 600; font-size: 0.95rem; }
.next a:hover { border-color: var(--kicker); }
.next a::after { content: "→"; color: var(--kicker); }
.facts { margin: 22px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); gap: 12px; }
.facts div { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; display: grid; gap: 2px; }
.facts dt { order: 2; color: var(--muted); font-size: 0.9rem; }
.facts dd { order: 1; margin: 0; font-family: var(--display); font-weight: 800; font-stretch: 112%; font-size: 1.9rem; line-height: 1.05; }

/* footer */
.night { background: linear-gradient(180deg, #0b1838 0%, var(--night) 70%); color: var(--on-dark-muted); padding-block: 56px 40px; }
.foot { display: grid; gap: 22px; }
.foot .mark { color: var(--on-dark); font-size: 1.5rem; }
.foot p { max-width: 72ch; font-size: 0.92rem; }
.foot a { color: #9fd0f5; }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; padding: 0; list-style: none; font-size: 0.95rem; }
.label { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--on-dark); }
.foot-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); gap: 18px 28px; }
.foot-cols div { display: grid; gap: 8px; align-content: start; }
.foot-cols ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; font-size: 0.95rem; }
.foot-langs { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0; padding: 0; list-style: none; font-size: 0.92rem; }

/* language switcher */
.lang { position: relative; flex: none; }
.lang summary { list-style: none; cursor: pointer; font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.06em; padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink); background: var(--card); }
.lang summary::-webkit-details-marker { display: none; }
.lang summary::after { content: " ▾"; color: var(--kicker); }
.lang[open] summary { border-color: var(--kicker); }
.lang ul { position: absolute; right: 0; top: calc(100% + 6px); margin: 0; padding: 6px; list-style: none; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 30px rgba(5, 20, 40, 0.18); min-width: 11rem; z-index: 30; }
.lang a { display: flex; justify-content: space-between; gap: 12px; padding: 7px 10px; border-radius: 9px; color: var(--ink); text-decoration: none; font-size: 0.92rem; }
.lang a:hover, .lang a[aria-current="true"] { background: color-mix(in srgb, var(--sun) 22%, transparent); }
.lang a span { font-family: var(--mono); font-size: 0.72rem; color: var(--muted); }
.bar-end { display: flex; align-items: center; gap: 8px; min-width: 0; }

/* guide */
.toc { margin: 22px 0 0; padding: 16px 20px; list-style: none; display: flex; flex-wrap: wrap; gap: 6px 18px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; font-size: 0.95rem; max-width: 72ch; }
.go { list-style: none; margin: 26px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr)); gap: 14px; }
.go a { display: grid; gap: 6px; height: 100%; padding: 18px 20px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.go a:hover { border-color: var(--kicker); }
.go b { font-family: var(--display); font-weight: 750; font-stretch: 106%; font-size: 1.2rem; line-height: 1.15; }
.go b::after { content: " →"; color: var(--kicker); }
.go span { color: var(--muted); font-size: 0.95rem; }
.cards li a.more { font-size: 0.92rem; font-weight: 600; }
[id] { scroll-margin-top: 76px; }
.tbl-scroll { overflow-x: auto; margin-top: 22px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); max-width: 100%; }
.tbl { border-collapse: collapse; width: 100%; font-size: 0.95rem; font-variant-numeric: tabular-nums; }
.tbl th, .tbl td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl thead th { font-family: var(--mono); font-size: 0.7rem; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.tbl tbody tr:last-child th, .tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody th { font-weight: 650; white-space: nowrap; }
.prose h3 { font-size: 1.3rem; font-weight: 750; font-stretch: 106%; margin-top: 8px; }
