/* lycian-way.com — shell: colour and font tokens, header, menu, language and theme switches, footer.
   Shared by the site's own pages (loaded after site.css) and by the Transport section (/transport/, built in
   another repository), which loads this file without site.css. Keep it self-contained: nothing here may
   rely on the base rules of site.css. Page rules live in site.css.
   Palette: the trail's purple (#7D76BA) on a cool off-white; waymark red + signpost yellow as small accents. */
:root{
  --paper:#f6f5f9; --surface:#fff; --ink:#23222e; --ink-2:#55536a; --ink-soft:#33324a; --ink-mid:#44435a; --line:#dddbe6; --line-2:#88869a;
  /* --brand: official colour, for decoration only (white on it is 3.7:1).
     --brand-dk / --deep: same hue as text colours (links, headings); they turn light in the dark theme.
     --btn / --footer / --hero: the same purples as fills under white text; they stay dark in both themes. */
  --brand:#7d76ba; --brand-dk:#4f4791; --deep:#2c2853; --link:var(--brand-dk);
  --btn:#4f4791; --footer:#2c2853; --hero:#7d76ba;
  --red:#c8272d; --yellow:#f4c430; --yellow-pale:#fbf0c8; --note:#eceaf6;
  --field:#fff; --field-off:#efeef3; --off:#e3e1ea; --todo-bg:rgba(255,255,255,.6); --ok:#1f6b3a; --err:#a32222; --shadow:rgba(35,34,46,.14);
  --menu-on:#23222e; --menu-on-ink:#fff; --pop-line:var(--line);
  --moon:block; --sun:none; /* which icon the theme button shows */
  --serif:"Iowan Old Style","Palatino Linotype",Palatino,"Book Antiqua",Georgia,serif;
  --sans:system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
  --pad:1.15rem;
  /* Home hero photo slot: set --hero-photo:url(hero.jpg) (file in src/assets/) and --hero-split:40%.
     The purple block then fills the left 40%, the photo shows to its right, the logo stands on the join. */
  --hero-photo:none; --hero-split:100%;
  color-scheme:light;
}
/* Dark theme. Two blocks with the SAME token list: the first follows the system setting (works without JS),
   the second is the visitor's choice made with the header button (data-theme on <html>, kept in localStorage).
   Screen only, so a printed page is always light. Change both blocks together. */
@media screen and (prefers-color-scheme:dark){
  :root:not([data-theme=light]){
    --paper:#14131b; --surface:#1e1d29; --ink:#eceaf5; --ink-2:#aeacc2; --ink-soft:#d3d1e3; --ink-mid:#c2c0d4; --line:#353344; --line-2:#7c7a92;
    --brand-dk:#b7b1ee; --deep:#d9d5fa; --btn:#6860b3; --footer:#211e3f; --hero:#544d92;
    --red:#d9484d; --yellow-pale:#383013; --note:#292741;
    --field:#14131b; --field-off:#2a2936; --off:#2f2e3b; --todo-bg:rgba(255,255,255,.03); --ok:#7fd39b; --err:#ff9d9d; --shadow:rgba(0,0,0,.5);
    --menu-on:#3a3852; --menu-on-ink:#eceaf5; --pop-line:#55536b;
    --moon:none; --sun:block;
    color-scheme:dark;
  }
}
@media screen{
  :root[data-theme=dark]{
    --paper:#14131b; --surface:#1e1d29; --ink:#eceaf5; --ink-2:#aeacc2; --ink-soft:#d3d1e3; --ink-mid:#c2c0d4; --line:#353344; --line-2:#7c7a92;
    --brand-dk:#b7b1ee; --deep:#d9d5fa; --btn:#6860b3; --footer:#211e3f; --hero:#544d92;
    --red:#d9484d; --yellow-pale:#383013; --note:#292741;
    --field:#14131b; --field-off:#2a2936; --off:#2f2e3b; --todo-bg:rgba(255,255,255,.03); --ok:#7fd39b; --err:#ff9d9d; --shadow:rgba(0,0,0,.5);
    --menu-on:#3a3852; --menu-on-ink:#eceaf5; --pop-line:#55536b;
    --moon:none; --sun:block;
    color-scheme:dark;
  }
}

/* Base rules the header and footer need. site.css has the same rules for the whole page; these copies are
   scoped (and add no specificity) so that the shell looks the same on a page without site.css. */
:where(.site-header,.site-footer),:where(.site-header,.site-footer) *,:where(.site-header,.site-footer) ::before,:where(.site-header,.site-footer) ::after{box-sizing:border-box}
:where(.site-header,.site-footer){font:1.0625rem/1.6 var(--sans);color:var(--ink);overflow-wrap:break-word;text-align:start}
:where(.site-header,.site-footer) a{text-decoration-thickness:.07em;text-underline-offset:.18em}
:where(.site-header,.site-footer) a:hover{color:var(--deep);text-decoration-thickness:.14em}
:where(.site-header,.site-footer) :focus-visible,:where(.skip):focus-visible{outline:3px solid var(--brand-dk);outline-offset:2px;border-radius:2px}
:where(.site-header,.site-footer) svg{max-width:100%}
:where(.site-nav) li{margin:.3em 0}

.skip{position:absolute;left:.5rem;top:-4rem;z-index:10;background:var(--ink);color:var(--surface);padding:.6rem 1rem;border-radius:0 0 6px 6px}
.skip:focus{top:0;color:var(--surface)}

/* ---------- header and navigation ---------- */
.site-header{background:var(--surface);border-bottom:1px solid var(--line)}
.header-in{max-width:72rem;margin:0 auto;padding:.45rem var(--pad);display:grid;grid-template-columns:1fr auto auto;align-items:center;gap:.25rem .5rem}
.brand{min-width:0;justify-self:start;display:inline-flex;align-items:center;gap:.6rem;padding:.1rem 0;color:var(--ink);text-decoration:none;font:600 1.3rem/1.2 var(--serif);letter-spacing:.01em}
.brand:hover{color:var(--brand-dk)}
.brand-mark{flex:none;height:2.4rem;width:auto;aspect-ratio:128.3/282.2;color:var(--brand-dk)}
.menu-link{display:inline-flex;align-items:center;gap:.5rem;min-height:2.75rem;padding:.3rem .85rem;border:1.5px solid var(--ink);border-radius:6px;color:var(--ink);text-decoration:none;font-weight:600;font-size:.95rem}
.menu-link::before{content:"";width:1rem;height:.75rem;background:linear-gradient(currentColor,currentColor) 0 0/100% 2px,linear-gradient(currentColor,currentColor) 0 50%/100% 2px,linear-gradient(currentColor,currentColor) 0 100%/100% 2px;background-repeat:no-repeat}
.menu-link[aria-expanded=true]{background:var(--menu-on);color:var(--menu-on-ink)}
.site-nav{display:none;grid-column:1/-1}
.nav-open .site-nav{display:block;padding:.4rem 0 .5rem}
.site-nav ul{list-style:none;margin:0;padding:0}
.site-nav a{display:block;padding:.65rem .25rem;color:var(--ink);text-decoration:none;border-bottom:1px solid var(--line)}
.site-nav a:hover{color:var(--brand-dk);text-decoration:underline}
.nav-primary a{font-weight:600}
.site-nav a[aria-current]{box-shadow:inset 4px 0 var(--brand);padding-left:.8rem;color:var(--deep);font-weight:700}
.more{display:none}
.header-tools{display:flex;align-items:center;gap:.1rem}
/* Theme button: shown only when the script in <head> has run (class "js" on <html>). */
.theme-toggle{display:none;flex:none;align-items:center;justify-content:center;width:2.75rem;height:2.75rem;padding:0;border:0;border-radius:6px;background:none;color:var(--ink);cursor:pointer}
.js .theme-toggle{display:inline-flex}
.theme-toggle:focus-visible{outline-offset:-2px}
.theme-toggle:hover{color:var(--brand-dk);background:var(--paper)}
.theme-toggle svg{width:1.25rem;height:1.25rem}
.theme-toggle .i-moon{display:var(--moon)}
.theme-toggle .i-sun{display:var(--sun)}
.lang-switch{position:relative}
.lang-switch summary{list-style:none;cursor:pointer;display:inline-flex;align-items:center;gap:.35rem;min-height:2.75rem;padding:.3rem .6rem;border-radius:6px;color:var(--ink);font-weight:600;font-size:.9rem;letter-spacing:.03em;white-space:nowrap}
.lang-switch summary::-webkit-details-marker{display:none}
.lang-switch summary::after{content:"";width:.4rem;height:.4rem;border:solid currentColor;border-width:0 1.5px 1.5px 0;transform:translateY(-.12rem) rotate(45deg)}
.lang-switch summary:hover,.lang-switch[open] summary{color:var(--brand-dk);background:var(--paper)}
.lang-switch ul{position:absolute;right:0;top:calc(100% + .35rem);z-index:6;min-width:12.5rem;margin:0;padding:.35rem;list-style:none;background:var(--surface);border:1px solid var(--pop-line);border-radius:8px;box-shadow:0 8px 24px var(--shadow)}
.lang-switch li{margin:0}
.lang-switch a{display:flex;align-items:baseline;gap:.6rem;padding:.6rem .7rem;border-radius:4px;color:var(--ink);text-decoration:none}
.lang-switch a:hover{color:var(--brand-dk);text-decoration:underline}
.lang-switch a[aria-current]{font-weight:700;box-shadow:inset 3px 0 var(--brand)}
.lang-code{flex:none;width:1.7rem;font-size:.78rem;font-weight:700;letter-spacing:.04em;color:var(--ink-2)}
/* narrow screens: brand, theme button, language and Menu must fit one row (longest brand: «Ликийская тропа») */
@media (max-width:31rem){.brand{font-size:1.05rem;gap:.4rem}.brand-mark{height:2.1rem}.lang-icon{display:none}.lang-switch summary{padding:.3rem .4rem}.menu-link{padding:.3rem .6rem}.theme-toggle{width:2.4rem}}
@media (max-width:24rem){.header-in{gap:.25rem}.header-tools{gap:0}.theme-toggle{width:2.1rem}.lang-switch summary{padding:.3rem .25rem}.menu-link{padding:.3rem .5rem;gap:.4rem}}
.nav-extra a{color:var(--ink-2)}
.nav-extra li:last-child a{border-bottom:0}

@media (min-width:60rem){
  .menu-link{display:none}
  .header-in{grid-template-columns:auto 1fr auto;gap:.25rem 1rem}
  .header-tools{grid-column:3;grid-row:1}
  /* One row in every language: the items that do not fit wrap inside .nav-primary and are cut off by its height;
     site.js then moves them into "More", least important first (data-p on <li>, set in build.py: NAV_KEEP),
     and marks the header .nav-fit. Without the script they stay cut off; the footer lists every page. */
  .site-nav,.nav-open .site-nav{display:flex;grid-column:2;grid-row:1;min-width:0;justify-content:flex-end;align-items:center;gap:.1rem;padding:0}
  .nav-primary{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:0 .1rem;min-width:0;max-height:2.7rem;overflow:hidden}
  .nav-fit .nav-primary{max-height:none;overflow:visible}
  .more{flex:none}
  .site-nav a{padding:.55rem .5rem;border:0;font-size:.93rem;font-weight:500;border-radius:4px;white-space:nowrap}
  .site-nav a[aria-current]{padding-left:.5rem;box-shadow:inset 0 -3px var(--brand);border-radius:0;font-weight:600}
  .nav-extra{display:none}
  .more{display:block;position:relative}
  .more summary{list-style:none;cursor:pointer;padding:.55rem .5rem;font-size:.93rem;font-weight:500;border-radius:4px;white-space:nowrap}
  .more summary::-webkit-details-marker{display:none}
  .more summary::after{content:"";display:inline-block;margin-left:.4rem;width:.4rem;height:.4rem;border:solid currentColor;border-width:0 1.5px 1.5px 0;transform:translateY(-.15rem) rotate(45deg)}
  .more summary:hover{color:var(--brand-dk);text-decoration:underline}
  .more:has([aria-current]) summary{box-shadow:inset 0 -3px var(--brand);font-weight:600}
  .more ul{position:absolute;right:0;top:calc(100% + .35rem);z-index:5;min-width:14rem;padding:.35rem;background:var(--surface);border:1px solid var(--pop-line);border-radius:8px;box-shadow:0 8px 24px var(--shadow)}
  .more ul a{padding:.5rem .7rem;white-space:normal}
  .more ul a[aria-current]{box-shadow:inset 3px 0 var(--brand)}
}

/* ---------- footer ---------- */
.site-footer{background:var(--footer);color:#e9e8f4;border-top:4px solid var(--red);box-shadow:inset 0 4px #fff}
.footer-in{max-width:72rem;margin:0 auto;padding:2rem var(--pad) .5rem}
.nav-all{list-style:none;margin:0;padding:0;columns:11rem 4;column-gap:1.5rem}
.nav-all li{margin:0;break-inside:avoid}
.nav-all a{display:inline-block;padding:.4rem 0;color:#fff;text-decoration:none}
.nav-all a:hover{text-decoration:underline}
.nav-all a[aria-current]{font-weight:700;box-shadow:inset 0 -2px var(--yellow)}
.footer-langs{max-width:72rem;margin:0 auto;padding:.6rem var(--pad) 0}
.lang-list{list-style:none;margin:0;padding:.9rem 0 0;border-top:1px solid rgba(255,255,255,.18);display:flex;flex-wrap:wrap;gap:.1rem 1.4rem}
.lang-list li{margin:0}
.lang-list a{display:inline-block;padding:.4rem 0;color:#fff;text-decoration:none}
.lang-list a:hover{text-decoration:underline}
.lang-list a[aria-current]{font-weight:700;box-shadow:inset 0 -2px var(--yellow)}
.lang-list .lang-code{display:inline-block;width:auto;margin-right:.3rem;color:#c9c7e0}
.site-footer :focus-visible{outline-color:var(--yellow)}
.footer-line{max-width:72rem;margin:0 auto;padding:1rem var(--pad) 1.6rem;font-size:.85rem;color:#c9c7e0}
.footer-line a{color:inherit;text-decoration:underline}
.nav-all a:hover,.lang-list a:hover{color:#fff}
.footer-line a:hover{color:inherit}
@media print{.site-header,.site-footer,.skip,.header-tools,.footer-langs{display:none!important}}
