:root {
  --bg: #090c0b;
  --surface: #0d1110;
  --surface-2: #121716;
  --surface-3: #171d1b;
  --text: #f1f0eb;
  --text-soft: #c9ceca;
  --muted: #919b96;
  --faint: #78837d;
  --red: #ff2733;
  --red-strong: #d9101c;
  --red-muted: #6e171d;
  --line: #28312e;
  --line-strong: #3a4541;
  --focus: #ff5861;
  --font-display: "Bahnschrift", "DIN 2014", "DIN Condensed", "Arial Narrow", sans-serif;
  --font-body: "Segoe UI", "Noto Sans", "Liberation Sans", sans-serif;
  --sidebar-w: clamp(252px, 18vw, 292px);
  --shell-gap: clamp(24px, 2.25vw, 40px);
  --page-pad-x: clamp(24px, 3vw, 54px);
  --page-pad-y: clamp(18px, 1.45vw, 24px);
  --mobile-header-h: 62px;
  --ease: 150ms cubic-bezier(.16, 1, .3, 1);
}

* { box-sizing: border-box; }
html {
  background: var(--bg);
  color-scheme: dark;
  scrollbar-color: var(--line-strong) var(--bg);
  scrollbar-gutter: stable;
}
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--text);
  background: var(--bg);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.46;
  letter-spacing: .008em;
  text-rendering: optimizeLegibility;
  font-kerning: normal;
}

button,
a,
input { font: inherit; }
button { color: inherit; }
a {
  color: inherit;
  text-decoration: none;
}
button,
a { -webkit-tap-highlight-color: transparent; }

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

::selection {
  color: #fff8f3;
  background: #8e1c25;
}

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

.icon {
  --icon-accent: var(--red);
  width: 1.35em;
  height: 1.35em;
  display: inline-block;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon-accent { stroke: var(--icon-accent, currentColor); }
.icon-accent-fill { fill: var(--icon-accent, currentColor); stroke: none; }
.icon-bookmark-body { fill: var(--bookmark-fill, none); }
.icon-bookmark-add { display: var(--bookmark-add-display, inline); }
.icon-bookmark-check {
  display: var(--bookmark-check-display, none);
  stroke: var(--bookmark-check-stroke, currentColor);
}

.app {
  width: min(100%, 1940px);
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  gap: var(--shell-gap);
  margin: 0 auto;
  padding: 20px clamp(18px, 2vw, 34px) 20px;
}

.sidebar {
  min-width: 0;
  height: calc(100vh - 40px);
  position: sticky;
  top: 20px;
  display: grid;
  grid-template-rows: 90px minmax(0, 1fr);
  background: var(--bg);
  border-right: 1px solid var(--line);
}

.brand {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 24px 12px 4px;
  user-select: none;
}
.brand-mark {
  display: block;
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  object-fit: contain;
}
.brand-name {
  font-family: var(--font-display);
  font-size: clamp(18px, 1.2vw, 21px);
  line-height: 1;
  font-weight: 720;
  letter-spacing: .075em;
  white-space: nowrap;
}

.nav-scroll {
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 18px 24px 0;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}
.nav-scroll::-webkit-scrollbar { width: 6px; }
.nav-scroll::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: 999px;
}

.nav-section,
.direct-nav {
  margin: 0;
  border-bottom: 1px solid var(--line);
}
.nav-section:first-child,
.direct-nav:first-child { border-top: 1px solid var(--line); }

.section-toggle,
.direct-link {
  width: 100%;
  min-height: 56px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 4px;
  border: 0;
  background: transparent;
  color: var(--text-soft);
  cursor: pointer;
  text-align: left;
  transition: color var(--ease), background-color var(--ease);
}
.section-toggle:hover,
.direct-link:hover {
  color: var(--text);
  background: var(--surface);
}
.nav-section.is-open .section-toggle,
.nav-section.is-current .section-toggle,
.direct-nav.is-current .direct-link { color: var(--text); }

.section-icon {
  width: 27px;
  height: 27px;
  color: var(--muted);
}
.nav-section.is-open .section-icon,
.nav-section.is-current .section-icon,
.direct-nav.is-current .section-icon { color: var(--red); }
.section-label {
  font-family: var(--font-display);
  min-width: 0;
  flex: 1;
  font-size: 15.5px;
  line-height: 1.15;
  font-weight: 560;
}
.section-chevron {
  width: 17px;
  height: 17px;
  color: var(--faint);
  transition: transform var(--ease), color var(--ease);
}
.nav-section.is-open .section-chevron {
  transform: rotate(90deg);
  color: var(--text-soft);
}

.submenu {
  padding: 2px 0 10px;
}
.submenu[hidden] { display: none; }
.submenu-link {
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 8px 12px 8px 39px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.25;
  overflow-wrap: anywhere;
  transition: color var(--ease), background-color var(--ease);
}
.submenu-link:hover {
  color: var(--text);
  background: var(--surface);
}
.submenu-link[aria-current="page"] {
  color: var(--text);
  background: var(--surface-2);
  font-weight: 620;
}

.main-shell {
  position: relative;
  min-width: 0;
  min-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  padding: var(--page-pad-y) var(--page-pad-x) 24px;
  background: var(--surface);
  border-top: 1px solid var(--line);
}

.page-head {
  position: relative;
  min-width: 0;
  padding: 0 62px 12px 0;
  border-bottom: 0;
}
.breadcrumb {
  min-height: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 7px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.2;
  letter-spacing: .035em;
}
.breadcrumb-separator {
  color: var(--red);
  font-weight: 700;
}
.page-title {
  font-family: var(--font-display);
  max-width: 1000px;
  margin: 0;
  color: var(--text);
  font-size: clamp(34px, 3vw, 56px);
  line-height: .98;
  font-weight: 760;
  letter-spacing: -.025em;
  text-wrap: balance;
}
.page-subtitle {
  max-width: none;
  margin: 0;
  color: var(--text-soft);
  font-size: 14.5px;
  line-height: 1.35;
  letter-spacing: .006em;
  text-wrap: pretty;
}

.bookmark-button {
  position: absolute;
  top: 0;
  right: 0;
  width: 46px;
  height: 46px;
  z-index: 8;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: transparent;
  color: var(--red);
  cursor: pointer;
  transition: background-color var(--ease), border-color var(--ease), color var(--ease), transform var(--ease);
}
.bookmark-button:hover {
  border-color: var(--text-soft);
  background: var(--surface-2);
}
.bookmark-button:active { transform: translateY(1px); }
.bookmark-button .icon {
  width: 24px;
  height: 24px;
}
.bookmark-button.is-bookmarked {
  --bookmark-fill: currentColor;
  --bookmark-add-display: none;
  --bookmark-check-display: inline;
  --bookmark-check-stroke: var(--red-strong);
  color: #fff8f3;
  border-color: var(--red);
  background: var(--red-strong);
}
.bookmark-button[hidden] { display: none !important; }

.tabs {
  min-width: 0;
  display: flex;
  align-items: stretch;
  gap: 0;
  margin: 0 0 18px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  display: flex;
  align-items: center;
  font-family: var(--font-display);
  min-width: 0;
  min-height: 42px;
  padding: 0 18px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.2;
  font-weight: 650;
  letter-spacing: .065em;
  cursor: pointer;
  white-space: nowrap;
  transition: color var(--ease), border-color var(--ease), background-color var(--ease);
}
.tab:first-child { padding-left: 0; }
.tab:hover {
  color: var(--text);
  background: var(--surface-2);
}
.tab[aria-selected="true"] {
  color: var(--text);
  border-bottom-color: var(--red);
}

.content-grid {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(236px, 300px);
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0 clamp(24px, 2.4vw, 38px);
  align-items: start;
}

.visual-slot {
  min-width: 0;
  overflow: visible;
  grid-column: 1;
  grid-row: 1 / 3;
}
.tab-panel {
  position: relative;
  min-width: 0;
}
.tab-panel[hidden] { display: none; }
.tab-panel-inner { min-width: 0; }

.visual-media {
  position: relative;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  aspect-ratio: 849 / 451;
  height: auto;
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
  contain: layout paint;
  box-sizing: border-box;
  margin: 0 0 18px;
  border: 1px solid var(--line);
  background: #0a0e0d;
}
.visual-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  max-width: 100%;
  max-height: 100%;
  box-sizing: border-box;
  display: block;
  object-fit: contain;
  object-position: center;
}
.visual-media.has-image-error img { display: none; }
.visual-image-error {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.visual-copy {
  min-width: 0;
}
.copy-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px clamp(24px, 2.4vw, 38px);
}
.copy-block {
  min-width: 0;
  padding-top: 11px;
  border-top: 1px solid var(--line);
  overflow-wrap: anywhere;
  hyphens: auto;
}
.copy-block h2 {
  margin: 0 0 8px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 18px;
  line-height: 1.22;
  font-weight: 700;
  letter-spacing: -.012em;
}
.copy-block p {
  margin: 0;
  max-width: 68ch;
  color: var(--text-soft);
  font-size: 15px;
  line-height: 1.46;
}
.copy-block ul {
  margin: 4px 0 0;
  padding-inline-start: 20px;
  color: var(--text-soft);
  font-size: 16px;
  line-height: 1.5;
}
.copy-block li::marker { color: var(--red); }
.copy-block li + li { margin-top: 5px; }
.copy-quote {
  grid-column: 1 / -1;
  margin: 0;
  padding: 18px 0;
  border-block: 1px solid var(--red-muted);
  color: var(--text);
  font-size: 17px;
  line-height: 1.5;
  font-weight: 560;
  text-wrap: pretty;
}

.side-cards {
  min-width: 0;
  grid-column: 2;
  grid-row: 1;
  display: grid;
  align-content: start;
  gap: 20px;
}
.side-cards[hidden] { display: none !important; }
.info-card {
  min-width: 0;
  padding: 11px 0 0;
  overflow-wrap: anywhere;
  border-top: 2px solid var(--red-strong);
}
.info-card-title {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 8px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 15.5px;
  line-height: 1.25;
  font-weight: 720;
  letter-spacing: .025em;
}
.info-card-title .icon {
  width: 19px;
  height: 19px;
  color: var(--red);
}
.info-card p {
  margin: 0;
  color: var(--text-soft);
  font-size: 14.5px;
  line-height: 1.46;
}
.info-card ul {
  margin: 0;
  padding-inline-start: 19px;
  color: var(--text-soft);
  font-size: 14.5px;
  line-height: 1.44;
}
.info-card li::marker { color: var(--red); }
.info-card li + li { margin-top: 5px; }

.bottom-nav {
  min-width: 0;
  grid-column: 2;
  grid-row: 2;
  align-self: end;
  padding-top: 22px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: stretch;
}

.pager {
  font-family: var(--font-display);
  min-width: 0;
  width: 100%;
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .055em;
  transition: background-color var(--ease), border-color var(--ease), color var(--ease), transform var(--ease), opacity var(--ease);
}
.pager .icon { width: 17px; height: 17px; }
.pager-back {
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--text-soft);
}
.pager-next {
  border: 1px solid var(--red-strong);
  background: var(--red-strong);
  color: #fff8f3;
}
.pager:not([disabled]):hover { transform: translateY(-1px); }
.pager-back:not([disabled]):hover {
  border-color: var(--text-soft);
  color: var(--text);
  background: var(--surface-2);
}
.pager-next:not([disabled]):hover {
  border-color: #b30e18;
  background: #b30e18;
}
.pager:not([disabled]):active { transform: translateY(0); }
.pager[disabled] {
  opacity: .34;
  cursor: default;
}

@media (min-width: 991px) {
  .is-topic .side-column {
    min-width: 0;
    grid-column: 2;
    grid-row: 1 / -1;
    align-self: stretch;
    display: flex;
    flex-direction: column;
  }
  .is-topic .side-cards { flex: 0 0 auto; }
  .is-topic .bottom-nav {
    flex: 0 0 auto;
    margin-top: auto;
  }
}

.contents-index {
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto;
  gap: 26px;
  padding: 0;
}
.contents-search { display: flex; gap: 10px; }
.contents-search input {
  width: min(100%, 760px);
  height: 48px;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  border-radius: 0;
  background: transparent;
  color: var(--text);
  padding: 8px 10px;
  outline: none;
  caret-color: var(--red);
  font-size: 16px;
}
.contents-search input::placeholder { color: var(--faint); }
.contents-search input:focus { border-bottom-color: var(--red); }
.contents-search input:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 4px;
}
.contents-list {
  min-height: 0;
  display: grid;
  align-content: start;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 28px;
}
.contents-link {
  min-width: 0;
  min-height: 66px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 10px 0;
  overflow-wrap: anywhere;
  border-top: 1px solid var(--line);
  transition: color var(--ease), background-color var(--ease);
}
.contents-link:hover {
  color: var(--text);
  background: var(--surface-2);
}
.contents-link strong {
  color: var(--text);
  font-family: var(--font-display);
  font-size: 15px;
  line-height: 1.28;
}
.contents-link span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}
.contents-link .bookmark-mini {
  --bookmark-fill: currentColor;
  --bookmark-add-display: none;
  --bookmark-check-display: inline;
  --bookmark-check-stroke: var(--surface);
  display: inline-flex;
  vertical-align: -2px;
  color: var(--red);
  margin: 0 0 0 6px;
}
.bookmark-mini .icon { width: 14px; height: 14px; }
.contents-empty {
  grid-column: 1 / -1;
  padding: 26px 0;
  color: var(--muted);
  text-align: left;
}
.contents-list.is-grouped { display: block; }
.contents-group {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  align-items: start;
  gap: 24px;
  padding: 14px 0 12px;
  border-top: 1px solid var(--line);
}
.contents-group + .contents-group { margin-top: 0; }
.contents-group-title {
  margin: 2px 0 0;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 18px;
  line-height: 1.2;
  font-weight: 720;
  letter-spacing: .015em;
}
.contents-group-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 28px;
}
.contents-list.is-grouped .contents-link {
  min-height: 40px;
  padding: 7px 0;
}
.contents-list.is-grouped .contents-link > span:not(.bookmark-mini) { display: none; }
.contents-list.is-grouped .contents-link strong { font-size: 14px; }
.main-shell.is-contents .content-grid { grid-template-columns: 1fr; }

.mobile-bar,
.drawer-backdrop { display: none; }

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


/* Compact desktop header: the breadcrumb already names the current page. */
@media (min-width: 991px) {
  .main-shell:not(.is-home):not(.is-about):not(.is-resources) .page-title {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
  }
  .breadcrumb > :last-child {
    color: var(--text-soft);
    font-weight: 600;
  }
}

@media (min-width: 1500px) {
  .main-shell.is-contents .contents-list,
  .main-shell.is-contents .contents-group-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 1240px) {
  :root {
    --sidebar-w: 246px;
    --shell-gap: 24px;
    --page-pad-x: 28px;
  }
  .section-label { font-size: 15px; }
  .submenu-link { font-size: 13.5px; padding-inline-start: 34px; }
  .page-title { font-size: clamp(32px, 3.6vw, 44px); }
  .content-grid { grid-template-columns: minmax(0, 1fr) 230px; column-gap: 28px; row-gap: 0; }
  .copy-grid { grid-template-columns: 1fr; gap: 24px; }
  .contents-list,
  .contents-group-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 990px) {
  body.drawer-open { overflow: hidden; }
  .app {
    display: block;
    min-height: 100vh;
    padding: var(--mobile-header-h) 0 0;
  }

  .mobile-bar {
    position: fixed;
    z-index: 50;
    inset: 0 0 auto;
    height: var(--mobile-header-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 14px;
    border-bottom: 1px solid var(--line);
    background: #0a0d0c;
  }
  .mobile-brand {
    font-family: var(--font-display);
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 16px;
    font-weight: 720;
    letter-spacing: .065em;
  }
  .mobile-brand .brand-mark {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
  }
  .menu-button {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line-strong);
    border-radius: 4px;
    background: transparent;
    color: var(--text);
    cursor: pointer;
  }
  .menu-button:hover { background: var(--surface-2); }
  .menu-button .icon { width: 24px; height: 24px; }

  .drawer-backdrop {
    position: fixed;
    z-index: 54;
    inset: var(--mobile-header-h) 0 0;
    display: block;
    border: 0;
    background: rgba(4, 8, 7, .78);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--ease), visibility var(--ease);
  }
  .drawer-open .drawer-backdrop {
    opacity: 1;
    visibility: visible;
  }

  .sidebar {
    position: fixed;
    z-index: 55;
    top: var(--mobile-header-h);
    left: 0;
    width: min(88vw, 340px);
    height: calc(100dvh - var(--mobile-header-h));
    grid-template-rows: auto minmax(0, 1fr);
    border: 0;
    background: #0a0d0c;
    transform: translateX(-104%);
    transition: transform 190ms cubic-bezier(.16, 1, .3, 1);
    box-shadow: 18px 0 42px rgba(2, 6, 5, .46);
  }
  .drawer-open .sidebar { transform: translateX(0); }
  .sidebar .brand { display: none; }
  .nav-scroll { padding: 14px 12px 22px; }
  .submenu-link { min-height: 44px; }

  .main-shell {
    min-height: calc(100vh - var(--mobile-header-h));
    padding: 22px clamp(18px, 5vw, 32px) 28px;
    border-top-width: 1px;
  }
  .page-head { padding-right: 56px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
  .tabs { margin-bottom: 24px; }
  .tab {
    flex: 0 0 auto;
    min-height: 50px;
    padding-inline: 16px;
  }
  .tab:first-child { padding-left: 0; }

  .content-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    gap: 34px;
  }
  .visual-slot,
  .side-cards,
  .bottom-nav {
    grid-column: 1;
    grid-row: auto;
  }
  .visual-media {
    position: relative;
    aspect-ratio: auto;
    height: auto;
    min-height: 0;
  }
  .visual-media.has-image { display: block; }
  .visual-media img {
    position: relative;
    inset: auto;
    width: 100%;
    height: auto;
  }
  .copy-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .side-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
  }
  .panel-side-cards { margin-bottom: 28px; }

  .bottom-nav {
    margin-top: 0;
    padding-top: 14px;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    border-top: 1px solid var(--line);
  }
  .contents-list,
  .contents-group-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .contents-group {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 13px 0 11px;
  }
  .contents-group-title { margin: 0; }
  .main-shell { padding-inline: 18px; }
  .page-head { padding-right: 54px; padding-bottom: 20px; }
  .breadcrumb {
    margin-bottom: 10px;
    font-size: 11.5px;
  }
  .bookmark-button {
    width: 44px;
    height: 44px;
  }

  .tabs {
    gap: 0;
    overflow-x: auto;
  }
  .tab {
    min-height: 48px;
    padding-inline: 13px;
    font-size: 11.5px;
    letter-spacing: .045em;
  }

  .visual-media { margin-bottom: 24px; }
  .visual-copy { padding: 0; }
  .copy-grid { grid-template-columns: 1fr; gap: 22px; }
  .copy-block { padding-top: 13px; }
  .copy-block h2 { font-size: 20px; }
  .copy-block p,
  .copy-block ul {
    font-size: 16px;
    line-height: 1.55;
  }
  .copy-quote { font-size: 16.5px; }

  .side-cards {
    grid-template-columns: 1fr;
    gap: 22px;
  }
  .panel-side-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 24px;
  }
  .info-card p,
  .info-card ul {
    font-size: 15.5px;
  }

  .pager { min-height: 48px; }
  .contents-index { gap: 22px; }
}

@media (max-width: 520px) {
  .panel-side-cards { grid-template-columns: 1fr; }
}

@media (max-width: 360px) {
  .tab { font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0s !important;
    animation-duration: 0s !important;
    animation-iteration-count: 1 !important;
  }
}

/* Home, navigation and mobile refinements */
.page-subtitle { white-space: normal; }
.tabs[hidden],
.bottom-nav[hidden] { display: none !important; }

.submenu-group-label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 12px 6px 39px;
  color: #aeb3b1;
  font-family: var(--font-display);
  font-size: 10px;
  line-height: 1.2;
  font-weight: 720;
  letter-spacing: .14em;
  text-transform: uppercase;
  cursor: default;
  user-select: none;
  pointer-events: none;
}
.submenu-group-label::after {
  content: "";
  min-width: 22px;
  height: 1px;
  flex: 1;
  background: rgba(120, 131, 125, .28);
}
.submenu > .submenu-group-label:first-child { padding-top: 8px; }
.submenu-group-label + .submenu-link { border-top: 0; }

.main-shell.is-home .breadcrumb { display: none; }
.main-shell.is-home .page-head {
  padding: 4px 0 40px;
  border-bottom: 0;
}
.main-shell.is-home .page-title {
  max-width: 1180px;
  font-size: clamp(30px, 2.5vw, 42px);
  line-height: 1.12;
}
.main-shell.is-home .page-subtitle {
  max-width: 78ch;
  margin-top: 12px;
  font-size: 15px;
}
.main-shell.is-home .content-grid { grid-template-columns: 1fr; }
.home-panel {
  width: 100%;
  max-width: 1180px;
}

.home-section-heading {
  margin: 0 0 10px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 17px;
  line-height: 1.2;
  font-weight: 680;
  letter-spacing: .01em;
}

.home-continue {
  margin: -4px 0 27px;
}
.home-continue-link {
  min-height: 54px;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  align-items: center;
  gap: 20px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  transition: border-color var(--ease), background-color var(--ease);
}
.home-continue-link:hover {
  border-color: var(--line-strong);
  background: var(--surface-3);
}
.home-continue-link strong {
  min-width: 0;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 15px;
  line-height: 1.25;
}
.home-continue-link span {
  color: var(--muted);
  font-size: 12.5px;
  white-space: nowrap;
}

.home-overview { margin-top: 0; }
.home-section-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.home-section-link {
  min-height: 72px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  background: transparent;
  transition: border-color var(--ease), background-color var(--ease), transform var(--ease);
}
.home-section-link:hover {
  border-color: var(--line-strong);
  background: var(--surface-2);
  transform: translateY(-1px);
}
.home-section-link strong {
  color: var(--text);
  font-family: var(--font-display);
  font-size: 14px;
  line-height: 1.2;
}
.home-section-link span {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.32;
}

.home-study {
  margin: 0 0 27px;
}
.home-study-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px clamp(24px, 2.4vw, 38px);
}
.home-study-card {
  min-width: 0;
  padding-top: 11px;
  border-top: 1px solid var(--line);
}
.home-study-card h3 {
  margin: 0 0 8px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 15px;
  line-height: 1.22;
  font-weight: 680;
}
.home-study-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

@media (max-width: 990px) {
  .submenu-group-label { padding-inline-start: 39px; }
  .page-head {
    padding-right: 52px;
    padding-bottom: 13px;
  }
  .main-shell:not(.is-home):not(.is-about):not(.is-resources) .page-title {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
  }
  .breadcrumb {
    min-height: 24px;
    align-items: baseline;
    gap: 7px;
    margin-bottom: 5px;
    font-size: 12px;
    line-height: 1.2;
  }
  .breadcrumb > :last-child {
    color: var(--text);
    font-family: var(--font-display);
    font-size: clamp(20px, 5vw, 23px);
    line-height: 1.08;
    font-weight: 720;
    letter-spacing: -.01em;
  }
  .page-subtitle {
    max-width: 72ch;
    margin-top: 5px;
    font-size: 14.5px;
    line-height: 1.35;
  }
  .tabs { margin-bottom: 18px; }
  .tabs.has-overflow-hint {
    -webkit-mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 34px), transparent 100%);
    mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 34px), transparent 100%);
  }
  .main-shell.is-home .page-head { padding: 0 0 36px; }
  .main-shell.is-home .page-title {
    font-size: clamp(28px, 4.5vw, 34px);
    line-height: 1.14;
  }
  .main-shell.is-home .page-subtitle { margin-top: 10px; }
}

@media (max-width: 700px) {
  .home-study-list { grid-template-columns: 1fr; }
  .home-section-link { padding: 11px 13px; }
  .home-section-link strong { font-size: 15px; }
  .home-section-link span { font-size: 12.5px; }
}

@media (min-width: 721px) and (max-width: 990px) {
  .home-section-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .home-section-list { grid-template-columns: 1fr; }
  .home-continue-link { grid-template-columns: 1fr; gap: 3px; }
  .home-continue-link span { white-space: normal; }
}

@media (min-width: 1500px) {
  .home-section-list {
    grid-template-columns: repeat(12, minmax(0, 1fr));
  }
  .home-section-link {
    grid-column: span 3;
  }
  .home-section-link:nth-last-child(-n + 3) {
    grid-column: span 4;
  }
}

/* External resources */
.main-shell.is-resources .content-grid { grid-template-columns: minmax(0, 1fr); }
.main-shell.is-resources .side-column,
.main-shell.is-resources .breadcrumb { display: none; }
.main-shell.is-resources .page-head {
  padding: 4px 0 24px;
  border-bottom: 0;
}
.main-shell.is-resources .page-title {
  font-size: clamp(30px, 2.5vw, 42px);
  line-height: 1.05;
}
.main-shell.is-resources .page-subtitle {
  max-width: 76ch;
  margin-top: 9px;
  color: var(--muted);
  line-height: 1.5;
}
.main-shell.is-resources .tabs,
.resources-panel { max-width: 1180px; }
.main-shell.is-resources .tab { text-transform: uppercase; }
.resource-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.resource-list > li { min-width: 0; }
.resource-card {
  display: block;
  height: 100%;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  transition: background-color var(--ease), border-color var(--ease);
}
.resource-card:hover,
.resource-card:focus-visible {
  border-color: var(--line-strong);
  background: var(--surface-2);
}
.resource-card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.resource-card-title {
  min-width: 0;
  margin: 0;
  color: var(--text);
  font-family: var(--font-display);
  font-size: clamp(18px, 1.5vw, 21px);
  line-height: 1.25;
  font-weight: 700;
  overflow-wrap: anywhere;
}
.resource-card-arrow {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  color: var(--muted);
  transition: color var(--ease);
}
.resource-card:hover .resource-card-arrow,
.resource-card:focus-visible .resource-card-arrow { color: var(--red); }
.resource-card-description {
  margin: 12px 0 0;
  color: var(--text-soft);
  font-size: 14.5px;
  line-height: 1.6;
}
@media (max-width: 700px) {
  .resource-list { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .resource-card { padding: 18px; }
}

/* About the project */
.main-shell.is-about .content-grid { grid-template-columns: minmax(0, 1fr); }
.main-shell.is-about .side-column,
.main-shell.is-about .breadcrumb { display: none; }
.main-shell.is-about .page-head {
  padding: 4px 0 24px;
  border-bottom: 0;
}
.main-shell.is-about .page-title {
  font-size: clamp(30px, 2.5vw, 42px);
  line-height: 1.05;
}
.main-shell.is-about .page-subtitle {
  max-width: 76ch;
  margin-top: 9px;
  color: var(--muted);
  line-height: 1.5;
}
.about-panel {
  width: 100%;
  max-width: 1180px;
}
.about-card {
  min-width: 0;
  padding: clamp(20px, 2vw, 28px);
  border: 1px solid var(--line);
  border-top: 2px solid var(--red-strong);
  background: var(--surface-2);
}
.about-intro {
  display: flex;
  align-items: center;
  gap: clamp(24px, 4vw, 60px);
  margin-bottom: 16px;
}
.about-card-copy { min-width: 0; }
.about-eyebrow {
  margin: 0 0 12px;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.about-card-title,
.about-section-title,
.about-method-title {
  margin: 0 0 12px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.22;
  text-wrap: balance;
}
.about-intro .about-card-title {
  font-size: clamp(25px, 2vw, 30px);
  letter-spacing: -.02em;
}
.about-text {
  max-width: 80ch;
  margin: 0;
  color: var(--text-soft);
  font-size: 15px;
  line-height: 1.65;
  text-wrap: pretty;
}
.about-mark {
  display: block;
  flex: 0 0 96px;
  width: 96px;
  height: 96px;
  margin-right: 8px;
  object-fit: contain;
}
.about-principles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.about-principles .about-card { background: transparent; }
.about-visual {
  aspect-ratio: 4 / 3;
  margin: 24px 0 0;
}
.about-support { margin-top: 36px; }
.about-visual + .about-support { margin-top: 42px; }
.about-section-title { font-size: 23px; }
.about-support-intro {
  max-width: 78ch;
  margin-bottom: 20px;
  color: var(--muted);
}
.about-support-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.about-method {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: clamp(20px, 2vw, 28px);
  border: 1px solid var(--line);
  background: var(--surface-2);
}
.about-method-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 6px;
  font-size: 18px;
}
.about-method-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.about-requisite {
  display: block;
  max-width: 100%;
  margin: 24px 0 20px;
  color: var(--text);
  font-family: "Cascadia Mono", "Consolas", "Liberation Mono", monospace;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: .015em;
  overflow-wrap: anywhere;
  user-select: all;
}
.about-card-number {
  font-size: clamp(17px, 1.6vw, 22px);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.about-button,
.about-payment-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  background: transparent;
  color: var(--text-soft);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  cursor: pointer;
  transition: color var(--ease), border-color var(--ease), background-color var(--ease);
}
.about-button { min-width: 142px; margin-top: auto; }
.about-button:hover,
.about-payment-link:hover {
  color: var(--text);
  border-color: var(--text-soft);
  background: var(--surface-3);
}
.about-button.is-copied { color: var(--text); border-color: var(--red); }
.about-button[aria-busy="true"] { cursor: wait; opacity: .65; }
.about-yoomoney {
  width: 100%;
  max-width: 320px;
  height: 48px;
  margin: 21px 0 11px;
  overflow: hidden;
  border-radius: 12px;
}
.about-yoomoney iframe {
  display: block;
  width: 330px;
  height: 50px;
  border: 0;
  color-scheme: normal;
  transform-origin: top left;
}
.about-payment-link {
  min-height: 36px;
  margin-top: auto;
  padding: 5px 0;
  border: 0;
  color: var(--muted);
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 4px;
}
.about-payment-link:hover { background: transparent; }
.about-crypto {
  grid-column: 1 / -1;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.about-crypto-copy { min-width: 0; }
.about-network {
  padding: 4px 7px 3px;
  border: 1px solid var(--red-muted);
  border-radius: 3px;
  color: var(--text-soft);
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: .06em;
}
.about-qr { flex: 0 0 auto; margin: 0; text-align: center; }
.about-qr img {
  box-sizing: content-box;
  display: block;
  width: 141px;
  height: 141px;
  padding: 14px;
  border-radius: 3px;
  background: #fff;
  image-rendering: pixelated;
}
.about-qr figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: .025em;
}
.about-copy-status { margin: 14px 0 0; color: var(--text-soft); font-size: 13px; }
.about-contact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 32px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}
.about-contact .about-section-title { margin-bottom: 8px; font-size: 20px; }
.about-contact-copy { min-width: 0; max-width: 56ch; }
.about-contact .about-text { color: var(--muted); font-size: 13px; }
.about-email {
  min-width: 0;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: var(--text);
  font-size: 15px;
  overflow-wrap: anywhere;
  transition: color var(--ease);
}
.about-email .icon { width: 18px; height: 18px; color: var(--red); }
.about-email:hover { color: var(--red); }

@media (min-width: 991px) and (max-width: 1200px), (max-width: 700px) {
  .about-principles,
  .about-support-grid { grid-template-columns: minmax(0, 1fr); }
  .about-contact { align-items: flex-start; flex-direction: column; gap: 12px; }
}
@media (max-width: 700px) {
  .main-shell.is-about .page-head { padding-bottom: 22px; }
  .about-intro { position: relative; gap: 16px; align-items: flex-start; }
  .about-intro .about-eyebrow { max-width: calc(100% - 66px); font-size: 9px; }
  .about-intro .about-card-title { padding-right: 60px; }
  .about-mark {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 52px;
    height: 52px;
    flex-basis: 52px;
    margin: 0;
  }
  .about-text { font-size: 15.5px; line-height: 1.6; }
  .about-card-title { font-size: 19px; }
  .about-visual { margin-top: 16px; }
  .about-visual img {
    aspect-ratio: 8 / 5;
    object-fit: cover;
    object-position: center top;
  }
  .about-support,
  .about-visual + .about-support { margin-top: 30px; }
}
@media (max-width: 520px) {
  .about-crypto { flex-direction: column; align-items: stretch; }
  .about-qr { align-self: center; }
  .about-qr img { width: 188px; height: 188px; padding: 16px; }
  .about-crypto-copy .about-button { width: 100%; }
  .about-wallet-address { font-size: 14px; }
}
