.shell-wrap {
  width: 100%;
  max-width: var(--shell-max);
  margin-inline: auto;
  padding-inline: var(--shell-pad);
}

.shell-wrap--wide {
  max-width: var(--shell-wide);
}

.shell-wrap--narrow {
  max-width: var(--shell-narrow);
}

.shell-header {
  position: sticky;
  top: 0;
  z-index: 500;
  background-color: var(--color-ink);
  border-bottom: 2px solid var(--color-brand);
}

.shell-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding-block: var(--space-sm);
  max-width: var(--shell-max);
  margin-inline: auto;
  padding-inline: var(--shell-pad);
}

.shell-header__brand {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  text-decoration: none;
  flex-shrink: 0;
}

.shell-header__brand-mark {
  width: 36px;
  height: 36px;
  background-color: var(--color-brand);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: var(--type-lg);
  color: var(--color-surface);
  letter-spacing: -0.05em;
}

.shell-header__brand-name {
  font-weight: 800;
  font-size: var(--type-md);
  color: var(--color-surface);
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.shell-header__brand-name span {
  display: block;
  color: var(--color-brand-light);
  font-size: var(--type-xs);
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.shell-nav {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.shell-nav__list {
  display: flex;
  align-items: center;
  gap: 0;
  list-style: none;
}

.shell-nav__item {
  position: relative;
}

.shell-nav__link {
  display: block;
  padding: var(--space-xs) var(--space-sm);
  color: rgba(255,255,255,0.8);
  font-size: var(--type-sm);
  font-weight: 500;
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast), background-color var(--transition-fast);
  white-space: nowrap;
}

.shell-nav__link:hover,
.shell-nav__link[aria-current="page"] {
  color: var(--color-surface);
  background-color: rgba(232,80,10,0.2);
}

.shell-nav__link[aria-current="page"] {
  color: var(--color-brand-light);
}

.shell-nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  background-color: rgba(255,255,255,0.1);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255,255,255,0.15);
  transition: background-color var(--transition-fast);
}

.shell-nav__toggle:hover {
  background-color: rgba(232,80,10,0.3);
}

.shell-nav__toggle-bar {
  width: 20px;
  height: 2px;
  background-color: var(--color-surface);
  border-radius: 2px;
  transition: transform var(--transition-base), opacity var(--transition-base);
  display: block;
}

.shell-nav__toggle[aria-expanded="true"] .shell-nav__toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.shell-nav__toggle[aria-expanded="true"] .shell-nav__toggle-bar:nth-child(2) {
  opacity: 0;
}

.shell-nav__toggle[aria-expanded="true"] .shell-nav__toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 900px) {
  .shell-nav__toggle {
    display: flex;
  }

  .shell-nav__list {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background-color: var(--color-ink);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-lg);
    padding: var(--space-sm);
    flex-direction: column;
    align-items: stretch;
    min-width: 220px;
    box-shadow: var(--shadow-lg);
    z-index: 600;
  }

  .shell-nav__list.is-open {
    display: flex;
  }

  .shell-nav__link {
    padding: var(--space-sm) var(--space-md);
  }

  .shell-nav {
    position: relative;
  }
}

.shell-footer {
  background-color: var(--color-ink);
  color: rgba(255,255,255,0.7);
  margin-top: var(--space-3xl);
}

.shell-footer__top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-xl);
  padding-block: var(--space-2xl);
  max-width: var(--shell-max);
  margin-inline: auto;
  padding-inline: var(--shell-pad);
}

.shell-footer__col-title {
  font-size: var(--type-sm);
  font-weight: 700;
  color: var(--color-surface);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-md);
}

.shell-footer__col-desc {
  font-size: var(--type-sm);
  line-height: 1.7;
  color: rgba(255,255,255,0.55);
  margin-bottom: var(--space-md);
}

.shell-footer__col-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.shell-footer__col-link {
  font-size: var(--type-sm);
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.shell-footer__col-link:hover {
  color: var(--color-brand-light);
}

.shell-footer__contact-item {
  font-size: var(--type-sm);
  color: rgba(255,255,255,0.6);
  margin-bottom: var(--space-xs);
}

.shell-footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-block: var(--space-md);
  max-width: var(--shell-max);
  margin-inline: auto;
  padding-inline: var(--shell-pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.shell-footer__copy {
  font-size: var(--type-xs);
  color: rgba(255,255,255,0.4);
}

.shell-footer__legal-links {
  display: flex;
  gap: var(--space-md);
}

.shell-footer__legal-link {
  font-size: var(--type-xs);
  color: rgba(255,255,255,0.4);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.shell-footer__legal-link:hover {
  color: var(--color-brand-light);
}

@media (max-width: 900px) {
  .shell-footer__top {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
  }
}

@media (max-width: 560px) {
  .shell-footer__top {
    grid-template-columns: 1fr;
  }

  .shell-footer__bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

.page-crumb {
  background-color: var(--color-surface-alt);
  border-bottom: 1px solid var(--color-border);
  padding-block: var(--space-sm);
  padding-top: 8rem;
}

.page-crumb__inner {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  max-width: var(--shell-max);
  margin-inline: auto;
  padding-inline: var(--shell-pad);
  flex-wrap: wrap;
}

.page-crumb__item {
  font-size: var(--type-xs);
  color: var(--color-ink-faint);
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.page-crumb__item::after {
  content: "›";
  color: var(--color-ink-faint);
  font-size: var(--type-sm);
}

.page-crumb__item:last-child::after {
  display: none;
}

.page-crumb__link {
  color: var(--color-brand);
  font-size: var(--type-xs);
  text-decoration: none;
}

.page-crumb__link:hover {
  text-decoration: underline;
}

.page-crumb__current {
  font-size: var(--type-xs);
  color: var(--color-ink);
  font-weight: 600;
}

.module-section {
  padding-block: var(--space-2xl);
}

.module-section--alt {
  background-color: var(--color-surface-alt);
}

.module-section--deep {
  background-color: var(--color-surface-deep);
}

.module-section--ink {
  background-color: var(--color-ink);
  color: var(--color-surface);
}

.module-section--brand {
  background-color: var(--color-brand);
  color: var(--color-surface);
}

.module-section--accent {
  background-color: var(--color-accent);
  color: var(--color-surface);
}

.rail-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: start;
}

.rail-two--lean-left {
  grid-template-columns: 3fr 2fr;
}

.rail-two--lean-right {
  grid-template-columns: 2fr 3fr;
}

.rail-three {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.rail-four {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
}

@media (max-width: 1024px) {
  .rail-four {
    grid-template-columns: repeat(2, 1fr);
  }
  .rail-three {
    grid-template-columns: repeat(2, 1fr);
  }
  .rail-two--lean-left,
  .rail-two--lean-right {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .rail-two,
  .rail-two--lean-left,
  .rail-two--lean-right,
  .rail-three,
  .rail-four {
    grid-template-columns: 1fr;
  }
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: var(--type-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-brand);
  margin-bottom: var(--space-sm);
}

.section-label::before {
  content: "";
  display: block;
  width: 20px;
  height: 2px;
  background-color: var(--color-brand);
  border-radius: 2px;
}

.section-label--light {
  color: var(--color-brand-light);
}

.section-label--light::before {
  background-color: var(--color-brand-light);
}

.section-title {
  margin-bottom: var(--space-sm);
}

.section-intro {
  font-size: var(--type-md);
  color: var(--color-ink-muted);
  max-width: 60ch;
  line-height: 1.6;
  margin-bottom: var(--space-lg);
}

.section-intro--wide {
  max-width: 80ch;
}

.section-intro--light {
  color: rgba(255,255,255,0.75);
}

.sticky-subnav {
  position: sticky;
  top: 58px;
  z-index: 200;
  background-color: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  overflow-x: auto;
  scrollbar-width: none;
  display: none;
}

.sticky-subnav::-webkit-scrollbar {
  display: none;
}

.sticky-subnav__inner {
  display: flex;
  gap: 0;
  max-width: var(--shell-max);
  margin-inline: auto;
  padding-inline: var(--shell-pad);
}

.sticky-subnav__btn {
  padding: var(--space-sm) var(--space-md);
  font-size: var(--type-sm);
  font-weight: 600;
  color: var(--color-ink-faint);
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color var(--transition-fast), border-color var(--transition-fast);
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  cursor: pointer;
}

.sticky-subnav__btn:hover,
.sticky-subnav__btn.is-active {
  color: var(--color-brand);
  border-bottom-color: var(--color-brand);
}
