:root {
  --paper: #faf9f6;
  --ink: #203d30;
  --text: #242c27;
  --muted: #5c665d;
  --line: #e2e4db;
  --sage: #eef0e8;
  --serif: Georgia, "Times New Roman", serif;
  --page-width: 1180px;
  --page-gutter: clamp(20px, 5vw, 40px);
  --compact-row: max(38px, 2.375rem);
  --compact-inset: env(safe-area-inset-top, 0px);
  --compact-height: calc(var(--compact-row) + var(--compact-inset));
}

* { box-sizing: border-box; }
html { background: var(--paper); scrollbar-gutter: stable; scroll-padding-top: calc(var(--compact-height) + 12px); }
body {
  margin: 0 auto;
  max-width: var(--page-width);
  background: var(--paper);
  color: var(--text);
  font: 16px/1.7 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
html.dialog-open { overflow: hidden; }
.dialog-open body { position: fixed; inset: var(--dialog-scroll-top) 0 auto; }
[hidden] { display: none !important; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
button, a, summary { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
:where(button, a, summary):focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
}
button:disabled { cursor: default; }
h1, h2, h3 { margin: 0; color: var(--ink); font: 400 1em/1.15 var(--serif); }
h1, h2 { letter-spacing: -0.025em; }
h2 { font-size: clamp(35px, 4.2vw, 55px); margin-bottom: 28px; }
h3 { font-size: 25px; }
p { max-width: 65ch; margin: 16px 0 0; color: var(--muted); }
svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.skip-link {
  position: fixed;
  z-index: 50;
  inset: 8px auto auto 8px;
  padding: 12px 18px;
  background: var(--ink);
  color: white;
  border-radius: 6px;
  transform: translateY(-160%);
}
.skip-link:focus { transform: none; outline: 2px solid white; outline-offset: -4px; }

.site-header {
  position: relative;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: max(16px, env(safe-area-inset-top))
    max(var(--page-gutter), env(safe-area-inset-right))
    16px max(var(--page-gutter), env(safe-area-inset-left));
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}
.logo-brand {
  display: block;
  width: clamp(135px, 36vw, 165px);
  flex: 0 1 auto;
}
.logo-art { display: block; position: relative; width: 100%; aspect-ratio: 856 / 441; }
.logo-part {
  position: absolute;
  display: block;
  background: center / 100% 100% no-repeat;
  pointer-events: none;
}
.part-arc { background-image: url("logo-arc.png"); left: 60.16%; top: .91%; width: 36.68%; height: 35.83%; }
.part-leaves { background-image: url("logo-leaves.png"); left: 67.41%; top: 6.12%; width: 14.84%; height: 46.03%; }
.part-children { background-image: url("logo-children.png"); left: 68.57%; top: 36.73%; width: 30.96%; height: 43.08%; }
.part-name { background-image: url("logo-name.png"); left: .70%; top: 31.07%; width: 68.69%; height: 36.73%; }
.part-surname { background-image: url("logo-surname.png"); left: 7.01%; top: 67.80%; width: 59.70%; height: 9.75%; }
.part-descriptor { background-image: url("logo-descriptor.png"); left: 5.37%; top: 85.26%; width: 74.18%; height: 13.38%; }

.menu-toggle, .dialog-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
}
.menu-lines {
  position: relative;
  width: 23px;
  height: 16px;
  border-block: 1px solid;
}
.menu-lines::before {
  content: "";
  position: absolute;
  inset: 7px 0 auto;
  border-top: 1px solid;
}
.menu-text { font-size: 13px; }
.compact-header {
  position: fixed;
  z-index: 11;
  inset: 0 0 auto;
  height: var(--compact-height);
  padding-top: var(--compact-inset);
  border-bottom: 1px solid var(--line);
  background: #faf9f6f5;
  color: var(--ink);
  visibility: hidden;
}
[data-header-state="down"] .site-header,
[data-header-state="up"] .site-header { visibility: hidden; }
[data-header-state="down"] .compact-header,
[data-header-state="up"] .compact-header { visibility: visible; animation: compact-in 200ms ease-out both; }
.compact-inner {
  --compact-left: max(var(--page-gutter), env(safe-area-inset-left, 0px));
  --compact-right: max(calc(var(--page-gutter) - 8px), env(safe-area-inset-right, 0px));
  position: relative;
  display: flex;
  align-items: center;
  height: var(--compact-row);
  max-width: var(--page-width);
  margin-inline: auto;
  padding-inline: var(--compact-left) calc(var(--compact-right) + 48px);
}
.compact-section {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: clamp(6px, 2vw, 12px);
  font-size: .8125rem;
  line-height: 1.2;
}
.compact-number { flex: none; color: var(--muted); font-variant-numeric: tabular-nums; }
.compact-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.compact-progress { display: flex; gap: 3px; width: clamp(28px, 11vw, 68px); flex-shrink: 0; }
.compact-progress i { flex: 1; height: 3px; border-radius: 3px; background: #cbd2c6; }
.compact-progress .filled { background: var(--ink); }
.compact-menu {
  position: absolute;
  inset: 0 var(--compact-right) auto auto;
  min-height: max(44px, var(--compact-row));
  border-radius: 6px;
  opacity: 0;
  visibility: hidden;
  transform: translateX(5px);
  transition: opacity 200ms ease, transform 200ms ease;
}
[data-header-state="up"] .compact-menu { opacity: 1; visibility: visible; transform: none; }
.compact-menu .menu-lines { width: 18px; height: 12px; margin-bottom: max(0px, calc(44px - var(--compact-row))); }
.compact-menu .menu-lines::before { top: 4px; }
.compact-menu:focus-visible { outline-offset: -3px; }

dialog {
  position: fixed;
  inset: auto 0 0;
  width: min(100%, 480px);
  max-width: 100%;
  max-height: calc(100dvh - max(12px, env(safe-area-inset-top)));
  margin: 0 auto;
  padding: 0;
  border: 0;
  border-radius: 24px 24px 0 0;
  background: var(--paper);
  color: var(--text);
  overflow: auto;
  overscroll-behavior: contain;
  scroll-padding-block: 10px;
  box-shadow: 0 16px 72px #14271f30;
}
dialog::backdrop { background: #1420188c; backdrop-filter: blur(5px); }
.dialog-content {
  position: relative;
  padding: 24px max(22px, env(safe-area-inset-right))
    calc(24px + env(safe-area-inset-bottom)) max(22px, env(safe-area-inset-left));
}
.dialog-content h2 { padding-right: 38px; margin: 0 0 10px; font-size: clamp(28px, 6vw, 35px); }
.dialog-content > p { font-size: 14px; }
.dialog-close {
  position: absolute;
  top: 8px;
  right: max(8px, env(safe-area-inset-right));
  border-radius: 50%;
  color: var(--ink);
  font: 28px/1 system-ui, sans-serif;
}
.dialog-close:hover { background: var(--sage); }
.actions { display: grid; gap: 12px; margin-top: 28px; }
.action.primary {
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  max-width: 340px;
  min-height: 64px;
  padding: 13px 16px;
  border: 1px solid var(--ink);
  border-radius: 8px;
  background: var(--ink);
  color: white;
  text-align: left;
}
.action.primary > svg { width: 22px; height: 22px; flex: 0 0 22px; }
.action.primary .copy { display: flex; flex: 1; flex-direction: column; gap: 5px; min-width: 0; }
.action.primary strong { font: 500 15px/1.3 system-ui, sans-serif; }
.action-zl-logo {
  display: block;
  width: 88px;
  height: 13px;
  object-fit: contain;
  object-position: left;
  filter: brightness(0) invert(1);
}
.action.primary .arrow { font: 20px/1 system-ui; flex-shrink: 0; }

.drawer {
  --drawer-padding: clamp(12px, 4.4vw, 26px);
  inset: 0 0 auto auto;
  width: min(88vw, 480px);
  height: 100vh;
  height: 100dvh;
  max-height: 100%;
  margin: 0;
  border-radius: 18px 0 0 18px;
  background: #fbf8f2;
  color: var(--ink);
  box-shadow: -10px 0 38px #17251b21;
  overflow: hidden;
}
.drawer::backdrop { background: #19241c66; backdrop-filter: blur(2px); }
.drawer-content {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: max(16px, env(safe-area-inset-top, 0px))
    max(var(--drawer-padding), env(safe-area-inset-right, 0px))
    calc(clamp(12px, 3.5vh, 32px) + env(safe-area-inset-bottom, 0px))
    var(--drawer-padding);
}
.drawer .dialog-close {
  top: max(12px, env(safe-area-inset-top, 0px));
  right: max(10px, env(safe-area-inset-right, 0px));
}
.drawer .dialog-close svg { width: 24px; height: 24px; }
.drawer-heading {
  flex: none;
  padding: 4px 48px 0 3px;
  margin-bottom: clamp(10px, 2.6vh, 24px);
}
.drawer-heading h2 { margin: 0; font-size: clamp(1.85rem, 7.8vw, 2.45rem); }
.menu-logo { width: min(100%, 140px); margin-bottom: clamp(8px, 2vh, 18px); }
.menu-list {
  display: flex;
  flex-direction: column;
  gap: clamp(6px, 1.2vh, 10px);
  min-height: 0;
  margin: 0 -4px;
  padding: 4px;
  overflow: auto;
  overscroll-behavior: contain;
  scroll-padding-block: 4px;
}
.menu-list a, .drawer-switch a {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(9px, 3vw, 16px);
  min-height: 44px;
}
.menu-list a {
  flex: none;
  min-height: clamp(48px, 7.5vh, 63px);
  padding: 7px clamp(9px, 3vw, 14px);
  border: 1px solid #d5dacf;
  border-radius: 13px;
  font: 1.16rem/1.22 var(--serif);
  overflow-wrap: anywhere;
}
.menu-list a > svg:first-child { width: 22px; height: 22px; }
.menu-arrow { width: 17px; height: 17px; }
.menu-list a[aria-current], .menu-list a:hover { border-color: #42604e; background: #eef0e6; }
.menu-list a:focus-visible, .drawer-switch a:focus-visible { outline-offset: -3px; }
.drawer-switch {
  flex: none;
  margin-top: auto;
  padding: clamp(8px, 2.3vh, 20px) 2px 0;
}
.drawer-switch p {
  max-width: none;
  margin: 0;
  padding: clamp(8px, 2.3vh, 20px) 2px 0;
  border-top: 1px solid #d5dacf;
  font: 500 .6875rem/1.35 system-ui, sans-serif;
  text-transform: uppercase;
  letter-spacing: .12em;
}
.drawer-switch a {
  padding-inline: 2px;
  color: #506357;
  font: 1rem/1.25 var(--serif);
  overflow-wrap: anywhere;
}
.drawer-switch a > svg:first-child { width: 20px; height: 20px; }
.drawer-switch a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.path-drawer {
  --drawer-padding: clamp(14px, 4.15vw, 24px);
  --drawer-control: clamp(30px, 8.2vw, 38px);
  --drawer-control-gap: clamp(5px, 2.85vw, 14px);
  --drawer-top: clamp(20px, 7.4vw, 36px);
  --drawer-bottom: clamp(18px, 6.2vw, 30px);
  --drawer-item: 53px;
  --drawer-heading-gap: clamp(20px, 7.5vw, 34px);
  --drawer-card-border: #cdd2c6;
  --drawer-chip: #e8ebe0;
  --drawer-link-color: #15362a;
  background: linear-gradient(145deg, #fbf8f3 24%, #faf7f1);
  color: #15362a;
}
.resources-page .path-drawer {
  --drawer-padding: clamp(14px, 4.45vw, 26px);
  --drawer-control-gap: clamp(7px, 3.8vw, 17px);
  --drawer-top: clamp(18px, 6.75vw, 34px);
  --drawer-bottom: clamp(18px, 6.8vw, 32px);
  --drawer-item: 49px;
  --drawer-heading-gap: clamp(18px, 7vw, 32px);
  --drawer-card-border: #d4d3ca;
  --drawer-chip: #f4f1e9;
  --drawer-link-color: #1a2922;
}
.path-drawer::backdrop {
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}
.path-drawer .drawer-content {
  padding-top: max(var(--drawer-top), env(safe-area-inset-top, 0px) + 6px);
  padding-bottom: calc(var(--drawer-bottom) + env(safe-area-inset-bottom, 0px));
}
.path-drawer .drawer-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 0 0 5px;
  margin-bottom: var(--drawer-heading-gap);
}
.path-drawer .drawer-heading h2 {
  margin: 0;
  color: inherit;
  font-size: clamp(1.75rem, 9vw, 2.5rem);
  letter-spacing: -.012em;
  line-height: 1;
}
.drawer-actions {
  display: flex;
  align-items: center;
  gap: var(--drawer-control-gap);
  margin-inline: auto -4px;
}
.resources-page .drawer-actions { margin-inline-end: -7px; }
.path-drawer .drawer-home, .path-drawer .dialog-close {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  flex: none;
  min-width: 44px;
  min-height: 44px;
  color: inherit;
  border-radius: 999px;
}
.path-drawer .drawer-home {
  gap: clamp(5px, 1.65vw, 9px);
  padding-inline: clamp(8px, 3.65vw, 16px);
  font: clamp(.8125rem, 3.55vw, 1rem)/1.2 var(--serif);
  white-space: nowrap;
}
.path-drawer .drawer-home::before, .path-drawer .dialog-close::before {
  position: absolute;
  z-index: -1;
  inset: 50% 0 auto;
  height: var(--drawer-control);
  transform: translateY(-50%);
  border-radius: inherit;
  background: var(--drawer-chip);
  content: "";
}
.path-drawer .dialog-close {
  inset: auto;
  background: transparent;
}
.path-drawer .dialog-close::before { inset-inline: calc((44px - var(--drawer-control)) / 2); }
.resources-page .path-drawer .drawer-home::before {
  border: 1px solid var(--drawer-card-border);
  background: transparent;
}
.path-drawer .drawer-home svg, .path-drawer .dialog-close svg { width: 17px; height: 17px; }
.path-drawer .drawer-home:focus-visible, .path-drawer .dialog-close:focus-visible { outline-offset: -2px; }
.path-drawer .menu-list { gap: clamp(7px, 2.3vw, 11px); padding-block-start: 0; }
.path-drawer .menu-list a {
  min-height: var(--drawer-item);
  gap: clamp(10px, 3.65vw, 20px);
  padding: 6px clamp(11px, 3.45vw, 18px);
  border-color: var(--drawer-card-border);
  border-radius: clamp(10px, 3vw, 14px);
  background: transparent;
  color: var(--drawer-link-color);
  font-size: clamp(1.0625rem, 4.83vw, 1.3rem);
  line-height: 1.2;
}
.path-drawer .menu-list a > svg { color: #173b2c; }
.path-drawer .menu-list a > svg:first-child { width: 22px; height: 22px; stroke-width: 1.65; }
.resources-page .path-drawer .menu-list a { gap: clamp(9px, 3.2vw, 15px); }
.resources-page .path-drawer .menu-list a > svg:first-child {
  box-sizing: content-box;
  width: 20px;
  height: 20px;
  padding: 6px;
  border-radius: 8px;
  background: #eeeee5;
}
.resources-page .path-drawer .menu-list a[aria-current] > svg:first-child { background: transparent; }
.path-drawer .menu-arrow { width: 18px; height: 18px; color: #173b2c; }
.path-drawer .menu-list a[aria-current] {
  border-color: #254738;
  background: linear-gradient(108deg, #efefe8, #e9ede2);
  color: #15362a;
}
.path-drawer .drawer-switch {
  padding: clamp(8px, 2dvh, 16px) 2px 0;
}
.path-drawer .drawer-switch p {
  padding: clamp(10px, 4.4vw, 20px) 1px 0;
  border-color: #d2d3c9;
  color: #505c55;
  font-size: clamp(.625rem, 2.65vw, .75rem);
  letter-spacing: .15em;
}
.path-drawer .drawer-switch a {
  min-height: 44px;
  gap: clamp(9px, 3.15vw, 15px);
  margin-top: 1px;
  padding: 2px 5px;
  color: #465b4f;
  font-size: clamp(.9375rem, 4.1vw, 1.125rem);
}
.path-drawer .drawer-switch a > svg:first-child { width: 20px; height: 20px; color: #284c3b; }
@media (max-width: 359px) {
  .path-drawer .drawer-home { padding-inline: 8px; }
}
@media (min-width: 450px) {
  .path-drawer { --drawer-item: 57px; }
  .resources-page .path-drawer { --drawer-item: 51px; }
}
@media (hover: hover) {
  .path-drawer .drawer-home:hover::before, .path-drawer .dialog-close:hover::before { background: #e3e8db; }
  .path-drawer .menu-list a:hover { border-color: #42604e; background: #eef0e6; }
}
@media (max-height: 500px) {
  .path-drawer, .resources-page .path-drawer {
    --drawer-top: 10px;
    --drawer-bottom: 8px;
    --drawer-heading-gap: 10px;
    --drawer-item: 44px;
  }
  .path-drawer .drawer-switch p { padding-top: 8px; }
}

.drawer[open] { animation: drawer-in 220ms ease-out both; }

@supports (overlay: auto) and (transition-behavior: allow-discrete) {
  .drawer {
    transform: translateX(100%);
    transition: transform 220ms ease, display 220ms allow-discrete, overlay 220ms allow-discrete;
  }
  .drawer[open] { animation: none; transform: none; }
  @starting-style {
    .drawer[open] { transform: translateX(100%); }
  }
}
@media (max-height: 550px) {
  .drawer-heading { margin-bottom: 5px; }
  .drawer-heading h2 { font-size: 1.75rem; }
  .drawer .menu-logo { display: none; }
  .drawer-content { padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px)); }
}
@media (max-height: 550px) and (pointer: coarse) {
  .drawer { width: 88vw; }
}

.site-footer {
  margin: 0 auto;
  padding: 24px var(--page-gutter) calc(24px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  color: var(--muted);
  text-align: center;
  font-size: 12px;
}
.site-footer a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-bottom: 8px;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 4px;
}

@keyframes compact-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes drawer-in { from { transform: translateX(100%); } to { transform: none; } }
@keyframes brand-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

@media (min-width: 761px) {
  html { background: #eeefea; }
  body { width: calc(100% - 48px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
