/* Молодь Львова — site styles.
   Colour tokens live on :root and are redefined for dark mode. Fonts are
   self-hosted (Fixel by MacPaw, SIL OFL 1.1); build.mjs rewrites the font URLs
   to hashed file names and fills in the stitch ring delays at @rings. */

@font-face {
  font-family: "Fixel Display";
  src: url("/assets/fonts/FixelDisplay-ExtraBold.d11c44232f.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fixel Display";
  src: url("/assets/fonts/FixelDisplay-Black.2c34c52989.woff2") format("woff2");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fixel Text";
  src: url("/assets/fonts/FixelText-Regular.0801933461.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fixel Text";
  src: url("/assets/fonts/FixelText-Medium.5846a53364.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fixel Text";
  src: url("/assets/fonts/FixelText-SemiBold.5e3d3ae701.woff2") format("woff2");
  font-weight: 600 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f7f2e8;
  --bg-2: #efe6d6;
  --surface: #fffcf6;
  --text: #101b2d;
  --muted: #4a5566;
  --line: #ddd2bf;
  --line-strong: #c4b69e;
  --accent: #b23d1a;
  --accent-2: #17695b;
  --sun: #ffc53d;
  --sun-soft: #fff0c7;
  --stitch-ink: #101b2d;
  --stitch-clay: #d2512a;
  --stitch-sun: #eea616;
  --wood: #caa074;
  --wood-dark: #a47a4e;
  --weave: rgb(16 27 45 / 0.035);
  --dark-bg: #101b2d;
  --dark-text: #f3ecdd;
  --dark-muted: #b9c0cb;
  --dark-line: #2a3850;
  --shadow: 0 1px 2px rgb(16 27 45 / 0.05), 0 10px 30px -12px rgb(16 27 45 / 0.12);
  --radius: 22px;
  --font-display: "Fixel Display", "Fixel Text", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-text: "Fixel Text", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --header: 68px;
  color-scheme: light;
  quotes: "«" "»" "„" "“";
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c1422;
    --bg-2: #101a2b;
    --surface: #152136;
    --text: #f2ebdd;
    --muted: #aeb6c3;
    --line: #243148;
    --line-strong: #37465f;
    --accent: #ff8f6b;
    --accent-2: #5cc8b1;
    --sun: #ffc53d;
    --sun-soft: #2f2918;
    --stitch-ink: #f2ebdd;
    --stitch-clay: #ff7a52;
    --stitch-sun: #ffc53d;
    --wood: #8d6c4b;
    --wood-dark: #6f5337;
    --weave: rgb(242 235 221 / 0.03);
    --dark-bg: #070c16;
    --dark-line: #1f2a3e;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 10px 30px -12px rgb(0 0 0 / 0.5);
    color-scheme: dark;
  }
}

:lang(en) {
  quotes: "“" "”" "‘" "’";
}

/* ---------- base ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header) + 20px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.65 var(--font-text);
  font-feature-settings: "kern", "liga", "calt";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-wrap: break-word;
}

@media (min-width: 900px) {
  body {
    font-size: 1.125rem;
  }
}

img,
svg {
  display: block;
  max-width: 100%;
}

p,
figure,
blockquote,
h1,
h2,
h3,
h4,
dl,
dd {
  margin: 0;
}

a {
  color: inherit;
  text-decoration-thickness: 0.07em;
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-thickness: 0.13em;
}

.ext::after {
  content: "\2197";
  content: "\2197" / "";
  display: inline-block;
  margin-left: 0.18em;
  font-size: 0.8em;
  text-decoration: none;
}

:focus-visible {
  outline: 3px solid var(--text);
  outline-offset: 3px;
  border-radius: 6px;
}

.dark :focus-visible,
.site-footer :focus-visible {
  outline-color: var(--sun);
}

::selection {
  background: var(--sun);
  color: #101b2d;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.skip {
  position: absolute;
  left: 16px;
  top: -120px;
  z-index: 100;
  padding: 12px 18px;
  border-radius: 12px;
  background: var(--text);
  color: var(--bg);
  font-weight: 600;
  text-decoration: none;
}

.skip:focus {
  top: 12px;
}

main:focus {
  outline: none;
}

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- type ---------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.65em;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.eyebrow::before,
.principles li::before,
.ticks li::before {
  content: "";
  flex: none;
  width: 0.85em;
  height: 0.85em;
  background:
    linear-gradient(45deg, transparent 40%, currentColor 40% 60%, transparent 60%),
    linear-gradient(-45deg, transparent 40%, currentColor 40% 60%, transparent 60%);
}

.h2 {
  margin-top: 0.4em;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 1.15rem + 3.1vw, 3.6rem);
  line-height: 1.02;
  letter-spacing: -0.028em;
  text-wrap: balance;
}

.h2-sm {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.h3 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.25rem, 1.08rem + 0.6vw, 1.6rem);
  line-height: 1.15;
  letter-spacing: -0.012em;
  text-wrap: balance;
}

.h4 {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.lead {
  max-width: 40em;
  color: var(--muted);
  font-size: clamp(1.125rem, 1rem + 0.5vw, 1.375rem);
  line-height: 1.55;
  text-wrap: pretty;
}

.body-lg {
  max-width: 38em;
  font-size: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  text-wrap: pretty;
}

.body-lg + .body-lg {
  margin-top: 1em;
}

.muted {
  color: var(--muted);
}

.num {
  font-variant-numeric: tabular-nums;
}

.code {
  font-family: var(--font-mono);
  font-size: 0.82em;
  letter-spacing: 0.02em;
  word-break: break-all;
}

.ref {
  display: inline-block;
  padding: 0.22em 0.65em;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-2);
  color: var(--muted);
  font-family: var(--font-text);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  line-height: 1.4;
  white-space: nowrap;
  vertical-align: 0.2em;
  font-variant-numeric: tabular-nums;
}

.center {
  margin-top: 48px;
  text-align: center;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  min-height: 48px;
  padding: 11px 22px;
  border: 2px solid transparent;
  border-radius: 999px;
  font: 600 1rem/1.2 var(--font-text);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color 0.16s ease,
    color 0.16s ease,
    border-color 0.16s ease,
    transform 0.16s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--text);
  color: var(--bg);
}

.btn-primary:hover {
  background: var(--accent);
  color: var(--bg);
}

.btn-ghost {
  border-color: var(--text);
  background: transparent;
  color: var(--text);
}

.btn-ghost:hover {
  background: var(--text);
  color: var(--bg);
}

.btn-small {
  min-height: 40px;
  padding: 7px 16px;
  font-size: 0.92rem;
}

.btn-light {
  background: var(--dark-text);
  color: var(--dark-bg);
}

.btn-light:hover {
  background: var(--sun);
  color: #101b2d;
}

.btn-outline-light {
  border-color: var(--dark-text);
  background: transparent;
  color: var(--dark-text);
}

.btn-outline-light:hover {
  background: var(--dark-text);
  color: var(--dark-bg);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.more {
  font-weight: 600;
}

.more::after {
  content: " \2192";
}

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .site-header {
    background: color-mix(in srgb, var(--bg) 86%, transparent);
    -webkit-backdrop-filter: saturate(1.4) blur(14px);
    backdrop-filter: saturate(1.4) blur(14px);
  }
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: var(--header);
}

.brand {
  display: flex;
  flex-direction: column;
  margin-right: auto;
  padding-block: 8px;
  line-height: 1.05;
  text-decoration: none;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.3rem;
  letter-spacing: -0.025em;
}

.brand-sub {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.nav-list {
  display: flex;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-list a {
  display: block;
  padding: 8px 13px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
}

.nav-list a:hover {
  background: var(--bg-2);
}

.nav-mobile {
  display: none;
}

.lang {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 6px 13px;
  border: 1.5px solid var(--text);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-decoration: none;
}

.lang:hover {
  background: var(--text);
  color: var(--bg);
}

@media (max-width: 1079px) {
  .nav-desktop {
    display: none;
  }

  .nav-mobile {
    display: block;
  }

  .nav-mobile summary {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 40px;
    padding: 6px 15px;
    border-radius: 999px;
    background: var(--text);
    color: var(--bg);
    font-size: 0.9rem;
    font-weight: 600;
    list-style: none;
    cursor: pointer;
  }

  .nav-mobile summary::-webkit-details-marker {
    display: none;
  }

  .burger {
    position: relative;
    width: 16px;
    height: 2px;
    background: currentColor;
    transition: background-color 0.2s ease;
  }

  .burger::before,
  .burger::after {
    content: "";
    position: absolute;
    left: 0;
    width: 16px;
    height: 2px;
    background: currentColor;
    transition: transform 0.2s ease;
  }

  .burger::before {
    top: -5px;
  }

  .burger::after {
    top: 5px;
  }

  .nav-mobile[open] .burger {
    background: transparent;
  }

  .nav-mobile[open] .burger::before {
    transform: translateY(5px) rotate(45deg);
  }

  .nav-mobile[open] .burger::after {
    transform: translateY(-5px) rotate(-45deg);
  }

  .nav-mobile > .nav-list {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    flex-direction: column;
    gap: 0;
    padding: 8px var(--gutter) 20px;
    border-bottom: 1px solid var(--line);
    background: var(--surface);
    box-shadow: var(--shadow);
  }

  .nav-mobile > .nav-list a {
    padding: 14px 4px;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    font-size: 1.125rem;
  }
}

@media (max-width: 389px) {
  .header-inner {
    gap: 8px;
  }

  .brand-name {
    font-size: 1.12rem;
  }

  .brand-sub {
    font-size: 0.6rem;
  }

  .nav-mobile summary {
    padding-inline: 13px;
  }

  .nav-mobile summary > span:first-child {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .lang {
    padding-inline: 10px;
  }
}

/* ---------- ornaments ---------- */

.stitch path,
.sprite path {
  fill: none;
  stroke-width: 2.9;
  stroke-linecap: round;
}

.sprite path {
  stroke-width: 3.3;
}

.st-ink {
  stroke: var(--stitch-ink);
}

.st-clay {
  stroke: var(--stitch-clay);
}

.st-sun {
  stroke: var(--stitch-sun);
}

.st-patina {
  stroke: var(--accent-2);
}

.band {
  background: var(--bg);
}

.band-svg {
  display: block;
  width: 100%;
  height: 28px;
}

@media (prefers-reduced-motion: no-preference) {
  .stitch-anim g {
    animation: stitch-in 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both;
    transform-box: fill-box;
    transform-origin: center;
  }

  .stitch-anim .r0{animation-delay:0.15s}
  .stitch-anim .r1{animation-delay:0.22s}
  .stitch-anim .r2{animation-delay:0.29s}
  .stitch-anim .r3{animation-delay:0.36s}
  .stitch-anim .r4{animation-delay:0.43s}
  .stitch-anim .r5{animation-delay:0.50s}
  .stitch-anim .r6{animation-delay:0.57s}
  .stitch-anim .r7{animation-delay:0.64s}
  .stitch-anim .r8{animation-delay:0.71s}
  .stitch-anim .r9{animation-delay:0.78s}
  .stitch-anim .r10{animation-delay:0.85s}
  .stitch-anim .r11{animation-delay:0.92s}
  .stitch-anim .r12{animation-delay:0.99s}
  .stitch-anim .r13{animation-delay:1.06s}
}

@keyframes stitch-in {
  from {
    opacity: 0;
    transform: scale(0.84) rotate(-10deg);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- hero ---------- */

.hero,
.page-head {
  background-image:
    repeating-linear-gradient(0deg, var(--weave) 0 1px, transparent 1px 5px),
    repeating-linear-gradient(90deg, var(--weave) 0 1px, transparent 1px 5px);
}

.hero {
  padding-block: clamp(40px, 7vw, 104px) clamp(48px, 7vw, 96px);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
}

@media (min-width: 980px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  }
}

.hero-title {
  margin-block: 0.2em 0.32em;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(3.5rem, 1.2rem + 10vw, 9.25rem);
  line-height: 0.86;
  letter-spacing: -0.048em;
}

.hero-title span {
  display: block;
}

.hero-title span + span {
  color: var(--accent);
}

.hero-copy .lead {
  margin-bottom: 34px;
}

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin: 34px 0 0;
  padding: 0;
  list-style: none;
}

.facts li {
  padding: 6px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  font-size: 0.85rem;
  font-weight: 500;
}

.hero-art {
  display: grid;
  place-items: center;
  padding: 34px 16px 16px;
}

.hoop {
  position: relative;
  display: grid;
  place-items: center;
  width: min(100%, 500px);
  aspect-ratio: 1;
  border-radius: 50%;
  background-color: var(--surface);
  background-image:
    repeating-linear-gradient(0deg, var(--weave) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(90deg, var(--weave) 0 1px, transparent 1px 4px);
  box-shadow:
    0 0 0 11px var(--wood),
    0 0 0 14px var(--wood-dark),
    0 40px 70px -30px rgb(16 27 45 / 0.45);
}

.hoop::before {
  content: "";
  position: absolute;
  top: -30px;
  left: 50%;
  width: 42px;
  height: 24px;
  border-radius: 7px 7px 4px 4px;
  background: var(--wood-dark);
  box-shadow: inset 0 -5px 0 rgb(0 0 0 / 0.16);
  transform: translateX(-50%);
}

.hoop::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow:
    inset 0 0 0 3px rgb(16 27 45 / 0.06),
    inset 0 12px 30px rgb(16 27 45 / 0.07);
  pointer-events: none;
}

.star {
  width: 80%;
  height: auto;
}

/* ---------- sections ---------- */

.section {
  padding-block: clamp(72px, 10vw, 136px);
}

.tinted {
  background: var(--bg-2);
}

.dark {
  background: var(--dark-bg);
  color: var(--dark-text);
}

.dark .eyebrow {
  color: var(--sun);
}

.dark .section-intro {
  color: var(--dark-muted);
}

.section-head {
  max-width: 48rem;
  margin-bottom: clamp(32px, 5vw, 56px);
}

.section-intro {
  max-width: 40em;
  margin-top: 18px;
  color: var(--muted);
  font-size: 1.125rem;
  text-wrap: pretty;
}

.note {
  margin-top: 28px;
  color: var(--muted);
  font-size: 0.95rem;
}

/* about */

.about-grid {
  display: grid;
  gap: clamp(32px, 6vw, 88px);
}

@media (min-width: 980px) {
  .about-grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    align-items: start;
  }
}

.about-copy .section-head {
  margin-bottom: 28px;
}

.quote {
  padding: 38px 34px 30px;
  border-radius: var(--radius);
  background: var(--sun);
  color: #101b2d;
  outline: 2px dashed rgb(16 27 45 / 0.32);
  outline-offset: -13px;
}

.quote blockquote p {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.2rem, 1.02rem + 0.75vw, 1.55rem);
  line-height: 1.28;
  letter-spacing: -0.01em;
  text-wrap: pretty;
}

.quote blockquote p::before {
  content: open-quote;
}

.quote blockquote p::after {
  content: close-quote;
}

.quote figcaption {
  margin-top: 18px;
  font-size: 0.9rem;
  font-weight: 600;
}

.principles {
  margin-top: 20px;
  padding: 28px 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.principles ul {
  display: grid;
  gap: 10px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.principles li {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-weight: 500;
}

.principles li::before {
  color: var(--accent);
}

.source {
  margin-top: 16px;
  color: var(--muted);
  font-size: 0.85rem;
}

/* directions */

.dir-cards,
.docs {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 760px) {
  .dir-cards,
  .docs {
    grid-template-columns: 1fr 1fr;
  }
}

.dir-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: clamp(24px, 3vw, 36px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  transition:
    transform 0.2s ease,
    border-color 0.2s ease;
}

.dir-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-3px);
}

.dir-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.dir-icon {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  border-radius: 20px;
  background: var(--bg-2);
  outline: 1.5px dashed var(--line-strong);
  outline-offset: -7px;
}

.dir-icon .stitch {
  width: 56px;
  height: 56px;
}

.dir-icon path {
  stroke-width: 2.3;
}

.dir-card p {
  color: var(--muted);
  font-size: 1rem;
}

.dir-card .dir-extra {
  margin-top: auto;
  color: var(--accent-2);
  font-size: 0.85rem;
  font-weight: 600;
}

/* governance */

.gov-grid {
  display: grid;
  gap: clamp(32px, 5vw, 64px);
}

@media (min-width: 980px) {
  .gov-grid {
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    align-items: start;
  }
}

.flow {
  padding: clamp(24px, 4vw, 36px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-2);
}

.flow-nodes {
  display: grid;
  justify-items: center;
}

.node {
  display: grid;
  gap: 2px;
  width: 100%;
  max-width: 340px;
  padding: 18px 20px;
  border: 1.5px solid var(--line-strong);
  border-radius: 16px;
  background: var(--surface);
  text-align: center;
}

.node strong {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  line-height: 1.2;
}

.node span {
  color: var(--muted);
  font-size: 0.85rem;
}

.node-accent {
  border-color: var(--text);
  background: var(--text);
  color: var(--bg);
}

.node-accent span {
  color: var(--bg);
}

.edge {
  position: relative;
  width: 2px;
  height: 46px;
  background: repeating-linear-gradient(to bottom, var(--accent) 0 6px, transparent 6px 11px);
}

.edge-down::after {
  content: "";
  position: absolute;
  bottom: 1px;
  left: 50%;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: translateX(-50%) rotate(45deg);
}

.edge-both {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  max-width: 420px;
  height: auto;
  min-height: 92px;
  background: none;
}

.edge-label {
  position: relative;
  display: flex;
  align-items: center;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.3;
}

.edge-label-a {
  justify-content: flex-end;
  padding-right: 30px;
  text-align: right;
}

.edge-label-b {
  padding-left: 30px;
}

.edge-label::before {
  content: "";
  position: absolute;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: repeating-linear-gradient(to bottom, currentColor 0 6px, transparent 6px 11px);
}

.edge-label-a::before {
  right: 14px;
}

.edge-label-b::before {
  left: 14px;
}

.edge-label::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
}

.edge-label-a::after {
  right: 10px;
  bottom: 6px;
  transform: rotate(45deg);
}

.edge-label-b::after {
  top: 6px;
  left: 10px;
  transform: rotate(-135deg);
}

.flow figcaption {
  margin-top: 24px;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
  text-wrap: pretty;
}

.rules {
  margin: 0;
  padding: 0;
  list-style: none;
}

.rules li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 20px;
  align-items: baseline;
  padding-block: 18px;
  border-top: 1px solid var(--line);
}

.rules li:last-child {
  border-bottom: 1px solid var(--line);
}

@media (max-width: 599px) {
  .rules li {
    grid-template-columns: 1fr;
  }

  .rules .ref {
    justify-self: start;
  }
}

.person {
  display: grid;
  gap: 2px;
  margin-top: 28px;
  padding: 22px 26px;
  border: 1px solid var(--line);
  border-left: 6px solid var(--sun);
  border-radius: var(--radius);
  background: var(--surface);
}

.person-role,
.label {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.person-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.5rem;
  line-height: 1.2;
}

.person-note {
  color: var(--muted);
  font-size: 0.9rem;
}

/* membership */

.membership .section-head {
  margin-bottom: 18px;
}

.cite {
  margin-bottom: clamp(32px, 5vw, 48px);
  color: var(--muted);
  font-size: 0.88rem;
}

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.step,
.rd {
  padding: 30px 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.step {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.step-num {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 4.2rem;
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: transparent;
  -webkit-text-stroke: 2px var(--accent);
}

.step p {
  color: var(--muted);
  font-size: 1rem;
}

.step .more {
  color: var(--text);
}

.rd-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 18px;
  margin-top: 18px;
}

.rd .h3 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.ticks {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ticks li {
  display: flex;
  align-items: baseline;
  gap: 14px;
}

.ticks li::before {
  position: relative;
  top: 0.08em;
  color: var(--accent-2);
}

.rd-duties .ticks li::before {
  color: var(--accent);
}

.leaving {
  max-width: 62rem;
  margin-top: clamp(40px, 6vw, 64px);
}

.leaving .h3 {
  margin-bottom: 10px;
}

/* support */

.support-grid {
  display: grid;
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
}

@media (min-width: 980px) {
  .support-grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  }
}

.support .section-head {
  margin-bottom: 26px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 28px 0 32px;
  padding: 0;
  list-style: none;
}

.chips li {
  padding: 9px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  font-size: 0.95rem;
  font-weight: 500;
}

.notice {
  padding: 30px 28px;
  border: 2px dashed var(--accent);
  border-radius: var(--radius);
  background: var(--sun-soft);
}

.notice .h3 {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.notice .h3::before {
  content: "!";
  display: grid;
  flex: none;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--bg);
  font-size: 1.1rem;
}

/* transparency */

.docs {
  margin: 0;
  padding: 0;
  list-style: none;
}

.doc {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: clamp(24px, 3vw, 36px);
  border: 1px solid var(--dark-line);
  border-radius: var(--radius);
  background: rgb(255 255 255 / 0.04);
}

.doc p {
  color: var(--dark-muted);
  font-size: 0.98rem;
}

.doc .doc-code .code {
  color: var(--sun);
  font-size: 0.74rem;
}

.doc .doc-empty {
  color: var(--sun);
  font-weight: 600;
}

.doc .doc-ref {
  margin-top: auto;
  font-size: 0.85rem;
}

.doc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
  padding-top: 6px;
}

.requisites {
  margin-top: clamp(40px, 6vw, 72px);
  padding: clamp(24px, 4vw, 44px);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
}

.requisites :focus-visible {
  outline-color: var(--text);
}

.requisites .h3 {
  margin-bottom: 14px;
}

.req-row {
  display: grid;
  gap: 4px 28px;
  padding-block: 14px;
  border-top: 1px solid var(--line);
}

@media (min-width: 760px) {
  .req-row {
    grid-template-columns: 15rem minmax(0, 1fr);
  }
}

.req dt {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 600;
}

.req dd {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 14px;
}

.req-value {
  min-width: 0;
  overflow-wrap: anywhere;
}

.req .code {
  display: block;
  margin-top: 2px;
  color: var(--muted);
}

.plain {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tag {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--sun);
  color: #101b2d;
  font-size: 0.72rem;
  font-weight: 600;
  vertical-align: 0.12em;
}

.copy {
  padding: 7px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font: 600 0.78rem/1 var(--font-text);
  letter-spacing: 0.02em;
  cursor: pointer;
}

.copy:hover {
  border-color: var(--text);
}

.copy.is-done {
  border-color: transparent;
  background: var(--accent-2);
  color: var(--bg);
}

.verify {
  margin-top: 20px;
  color: var(--muted);
  font-size: 0.9rem;
}

/* contact */

.contact-grid {
  display: grid;
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
}

@media (min-width: 980px) {
  .contact-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.contact .section-head {
  margin-bottom: 24px;
}

.contact-cards {
  display: grid;
  gap: 18px;
}

.contact-card {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.label {
  margin-bottom: 8px;
}

.contact-mail a {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.45rem, 1rem + 2vw, 2.25rem);
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
  text-decoration-color: var(--sun);
  text-decoration-thickness: 0.12em;
}

address {
  font-size: 1.05rem;
  font-style: normal;
  font-weight: 500;
}

.contact-card .muted {
  margin-top: 10px;
  font-size: 0.92rem;
}

/* ---------- footer ---------- */

.site-footer {
  background: var(--dark-bg);
  color: var(--dark-text);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
  gap: 36px;
  padding-block: 56px 36px;
}

.footer-name {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.7rem;
  letter-spacing: -0.025em;
}

.footer-legal {
  margin-block: 10px 14px;
  color: var(--dark-muted);
  font-size: 0.85rem;
}

.footer-title {
  margin-bottom: 14px;
  color: var(--sun);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.footer-col ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-col a {
  font-size: 0.95rem;
  text-decoration: none;
}

.footer-col a:hover {
  text-decoration: underline;
}

.footer-col p {
  color: var(--dark-muted);
  font-size: 0.92rem;
}

.footer-col p + p {
  margin-top: 8px;
}

.footer-col .num {
  color: var(--dark-text);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  padding-block: 22px 32px;
  border-top: 1px solid var(--dark-line);
  color: var(--dark-muted);
  font-size: 0.82rem;
}

/* ---------- inner pages ---------- */

.page-head {
  padding-block: clamp(44px, 7vw, 96px) clamp(32px, 5vw, 56px);
}

.page-title {
  margin-block: 0.22em 0.32em;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2.7rem, 1.4rem + 5vw, 5.6rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.page-head .actions {
  margin-top: 28px;
}

.updated {
  margin-top: 18px;
  color: var(--muted);
  font-size: 0.9rem;
}

.code-box {
  display: grid;
  gap: 12px;
  max-width: 48rem;
  margin-top: 30px;
  padding: 24px 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.code-label {
  color: var(--muted);
  font-size: 0.88rem;
}

.code-big {
  color: var(--accent);
  font-size: 0.95rem;
  font-weight: 600;
}

.code-box .actions {
  margin-top: 4px;
}

.doc-layout {
  display: grid;
  gap: 40px;
  padding-block: clamp(40px, 6vw, 80px) clamp(64px, 9vw, 120px);
}

@media (min-width: 1024px) {
  .doc-layout {
    grid-template-columns: 16rem minmax(0, 1fr);
    gap: 72px;
  }

  .toc {
    position: sticky;
    top: calc(var(--header) + 28px);
    align-self: start;
    max-height: calc(100vh - var(--header) - 56px);
    overflow: auto;
  }
}

.toc-title {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.toc ol {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  border-left: 2px solid var(--line);
  list-style: none;
}

.toc a {
  display: block;
  margin-left: -2px;
  padding: 6px 0 6px 14px;
  border-left: 2px solid transparent;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.35;
  text-decoration: none;
}

.toc a:hover {
  border-left-color: var(--accent);
  color: var(--text);
}

.statute-text,
.prose {
  max-width: 46rem;
}

.doc-title {
  color: var(--muted);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.statute-section {
  margin-top: 44px;
}

.statute-section h2 {
  margin-bottom: 10px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--text);
}

.statute-text p {
  margin-top: 0.75em;
  text-wrap: pretty;
}

.pt-num {
  margin-right: 0.2em;
  color: var(--accent);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-decoration: none;
}

a.pt-num:hover {
  text-decoration: underline;
}

.sub,
.li {
  position: relative;
  padding-left: 1.8em;
}

.sub .pt-num {
  color: var(--text);
}

.li::before {
  content: "";
  position: absolute;
  top: 0.72em;
  left: 0.6em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--line-strong);
}

.ast {
  color: var(--muted);
  font-size: 0.8em;
}

:target {
  scroll-margin-top: calc(var(--header) + 24px);
}

.statute-text :target {
  border-radius: 6px;
  background: var(--sun-soft);
  box-shadow: 0 0 0 8px var(--sun-soft);
}

.doc-notes {
  display: grid;
  gap: 8px;
  margin-top: 56px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

.prose > section {
  margin-top: 44px;
}

.prose > section:first-child,
.prose > .summary:first-child {
  margin-top: 0;
}

.prose .h3 {
  margin-bottom: 12px;
}

.prose p {
  margin-top: 0.8em;
  text-wrap: pretty;
}

.prose ul,
.prose ol {
  display: grid;
  gap: 0.45em;
  margin: 0.8em 0 0;
  padding-left: 1.3em;
}

.prose li::marker {
  color: var(--accent);
}

.prose .group {
  margin-top: 20px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

.prose .group p:first-of-type {
  margin-top: 8px;
}

.prose .ticks {
  padding-left: 0;
}

.summary {
  padding: 26px 28px;
  border-radius: var(--radius);
  background: var(--sun-soft);
}

.summary .ticks {
  margin-top: 14px;
}

.notice-inline {
  padding: 14px 18px;
  border-left: 4px solid var(--sun);
  border-radius: 0 12px 12px 0;
  background: var(--surface);
  font-size: 0.95rem;
}

/* application sheet: always paper-white, also in dark mode */

.sheet {
  max-width: 52rem;
  margin: clamp(32px, 5vw, 64px) auto;
  padding: clamp(24px, 6vw, 72px);
  border-radius: 6px;
  background: #fffefb;
  color: #101b2d;
  box-shadow:
    0 1px 3px rgb(16 27 45 / 0.12),
    0 30px 70px -30px rgb(16 27 45 / 0.4);
  font-size: 1.02rem;
  line-height: 1.6;
}

.sheet-to {
  display: grid;
  gap: 2px;
  max-width: 24rem;
  margin: 0 0 28px auto;
}

.sheet-to p:last-child {
  font-weight: 600;
}

.sheet-fields {
  max-width: 32rem;
  margin-left: auto;
}

.field {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0 12px;
  align-items: end;
  margin-top: 18px;
}

.field-line {
  min-height: 1.7em;
  border-bottom: 1.5px solid #101b2d;
}

.field-hint {
  grid-column: 2;
  margin-top: 4px;
  color: #4a5566;
  font-size: 0.75rem;
  text-align: center;
}

.sheet-heading {
  margin: 48px 0 22px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: 0.22em;
  text-align: center;
  text-transform: uppercase;
}

.sheet-p {
  margin-top: 0.7em;
  text-indent: 2em;
  text-align: justify;
  hyphens: auto;
}

.tr {
  display: block;
  margin-top: 2px;
  color: #4a5566;
  font-size: 0.8em;
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0;
  text-indent: 0;
  text-transform: none;
}

.sheet-heading .tr {
  font-family: var(--font-text);
}

.sheet-sign {
  display: grid;
  grid-template-columns: 1fr 1fr 1.4fr;
  gap: 24px;
  margin-top: 60px;
}

.sign {
  display: grid;
  gap: 4px;
}

.sign .field-hint {
  grid-column: auto;
}

@media (max-width: 599px) {
  .sheet-sign {
    grid-template-columns: 1fr;
  }

  .sheet-p {
    text-align: left;
  }
}

.after {
  max-width: 52rem;
  margin: 0 auto clamp(64px, 9vw, 120px);
}

.after-list {
  display: grid;
  gap: 8px;
  margin: 14px 0 0;
  padding-left: 1.3em;
}

.after-list li::marker {
  color: var(--accent);
  font-weight: 600;
}

/* 404 */

.not-found {
  padding-block: clamp(56px, 11vw, 150px);
}

.nf-code {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(6rem, 3rem + 14vw, 13rem);
  line-height: 0.8;
  letter-spacing: -0.05em;
  color: transparent;
  -webkit-text-stroke: 3px var(--accent);
}

.not-found .lead {
  margin-bottom: 28px;
}

.nf-en {
  max-width: 36rem;
  margin-top: 56px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.nf-en p {
  margin-top: 10px;
  color: var(--muted);
}

/* ---------- motion ---------- */

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .dir-card,
    .step,
    .rd,
    .doc,
    .contact-card,
    .quote,
    .principles,
    .flow,
    .notice {
      animation: rise linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 45%;
    }
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(26px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* ---------- print ---------- */

@media print {
  @page {
    size: A4;
    margin: 16mm 18mm;
  }

  :root {
    --bg: #fff;
    --surface: #fff;
    --text: #000;
    --muted: #333;
    --line: #bbb;
  }

  body {
    background: #fff;
    color: #000;
    font-size: 11pt;
  }

  .site-header,
  .site-footer,
  .skip,
  .band,
  .toc,
  .copy,
  .application-page .page-head,
  .after {
    display: none !important;
  }

  .doc-layout {
    display: block;
    padding: 0;
  }

  .page-head {
    padding-block: 0 12pt;
    background: none;
  }

  .sheet {
    max-width: none;
    margin: 0;
    padding: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
    font-size: 12pt;
  }

  a {
    text-decoration: none;
  }

  .ext::after {
    content: none;
  }
}
