:root {
  color-scheme: light;
  --gdp-bg: #f5f4f1;
  --gdp-bg-soft: #efeeea;
  --gdp-surface: #fbfaf8;
  --gdp-surface-raised: #ffffff;
  --gdp-header: rgba(250, 249, 247, 0.92);
  --gdp-text: #34363a;
  --gdp-text-strong: #16181b;
  --gdp-muted: #6c7077;
  --gdp-muted-strong: #53575e;
  --gdp-border: #d9d8d3;
  --gdp-border-subtle: #e8e6e1;
  --gdp-brand: #c91820;
  --gdp-action-bg: #c91820;
  --gdp-action-hover: #a30d15;
  --gdp-icon: #c91820;
  --gdp-brand-soft: rgba(201, 24, 32, 0.09);
  --gdp-link: #265f8f;
  --gdp-link-hover: #17496f;
  --gdp-focus: #a30d15;
  --gdp-active: #111316;
  --gdp-selection: rgba(201, 24, 32, 0.16);
  --gdp-header-height: 64px;
  --gdp-page-max: 1540px;
  --gdp-reading-measure: 72ch;
  --gdp-context-width: 228px;
  --gdp-outline-width: 216px;
  --gdp-radius-sm: 0.45rem;
  --gdp-radius-md: 0.75rem;
  --gdp-radius-lg: 1rem;
  --gdp-shadow-sm: 0 1px 2px rgba(26, 28, 31, 0.06), 0 5px 18px rgba(26, 28, 31, 0.04);
  --gdp-shadow-lg: 0 24px 60px rgba(26, 28, 31, 0.13);
  --gdp-transition: 150ms ease;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --gdp-bg: #0d0f12;
  --gdp-bg-soft: #111318;
  --gdp-surface: #14171b;
  --gdp-surface-raised: #191d22;
  --gdp-header: rgba(13, 15, 18, 0.91);
  --gdp-text: #d5d8dd;
  --gdp-text-strong: #f4f5f6;
  --gdp-muted: #9298a1;
  --gdp-muted-strong: #aeb3ba;
  --gdp-border: #2a2e35;
  --gdp-border-subtle: #20242a;
  --gdp-brand: #ee3037;
  --gdp-icon: #ff858a;
  --gdp-brand-soft: rgba(238, 48, 55, 0.11);
  --gdp-link: #a7c7f4;
  --gdp-link-hover: #c3daf9;
  --gdp-focus: #ff6268;
  --gdp-active: #ffffff;
  --gdp-selection: rgba(238, 48, 55, 0.22);
  --gdp-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.18), 0 8px 24px rgba(0, 0, 0, 0.12);
  --gdp-shadow-lg: 0 28px 70px rgba(0, 0, 0, 0.38);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --gdp-bg: #0d0f12;
    --gdp-bg-soft: #111318;
    --gdp-surface: #14171b;
    --gdp-surface-raised: #191d22;
    --gdp-header: rgba(13, 15, 18, 0.91);
    --gdp-text: #d5d8dd;
    --gdp-text-strong: #f4f5f6;
    --gdp-muted: #9298a1;
    --gdp-muted-strong: #aeb3ba;
    --gdp-border: #2a2e35;
    --gdp-border-subtle: #20242a;
    --gdp-brand: #ee3037;
    --gdp-icon: #ff858a;
    --gdp-brand-soft: rgba(238, 48, 55, 0.11);
    --gdp-link: #a7c7f4;
    --gdp-link-hover: #c3daf9;
    --gdp-focus: #ff6268;
    --gdp-active: #ffffff;
    --gdp-selection: rgba(238, 48, 55, 0.22);
    --gdp-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.18), 0 8px 24px rgba(0, 0, 0, 0.12);
    --gdp-shadow-lg: 0 28px 70px rgba(0, 0, 0, 0.38);
  }
}

* {
  box-sizing: border-box;
}

html {
  min-width: 0;
  background: var(--gdp-bg);
  color: var(--gdp-text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.68;
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  min-width: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 50% -12rem, var(--gdp-brand-soft), transparent 28rem),
    var(--gdp-bg);
  color: var(--gdp-text);
  transition: background-color var(--gdp-transition), color var(--gdp-transition);
}

::selection {
  background: var(--gdp-selection);
}

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

a {
  color: var(--gdp-link);
}

a:hover {
  color: var(--gdp-link-hover);
}

button,
summary,
a {
  -webkit-tap-highlight-color: transparent;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--gdp-focus);
  outline-offset: 3px;
  border-radius: var(--gdp-radius-sm);
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 0.65rem;
  left: 0.65rem;
  transform: translateY(-180%);
  padding: 0.6rem 0.9rem;
  border-radius: var(--gdp-radius-sm);
  background: var(--gdp-text-strong);
  color: var(--gdp-bg);
  font-weight: 750;
  text-decoration: none;
  box-shadow: var(--gdp-shadow-lg);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  z-index: 100;
  top: 0;
  min-height: var(--gdp-header-height);
  border-bottom: 1px solid var(--gdp-border-subtle);
  background: var(--gdp-header);
  color: var(--gdp-text-strong);
  backdrop-filter: blur(20px) saturate(130%);
  -webkit-backdrop-filter: blur(20px) saturate(130%);
}

.site-header__inner {
  width: min(calc(100% - 2.5rem), var(--gdp-page-max));
  min-height: var(--gdp-header-height);
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: clamp(1.25rem, 2.4vw, 2.6rem);
}

.brand {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 0.72rem;
  color: var(--gdp-text-strong);
  text-decoration: none;
}

.brand:hover {
  color: var(--gdp-text-strong);
}

.brand__mark {
  width: 2rem;
  height: 2rem;
  object-fit: contain;
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--gdp-border-subtle);
}

.brand__lockup {
  min-width: 0;
  display: grid;
  gap: 0.08rem;
}

.brand__name {
  font-size: 0.94rem;
  line-height: 1.05;
  font-weight: 820;
  letter-spacing: 0.055em;
  white-space: nowrap;
}

.brand__descriptor {
  color: var(--gdp-muted);
  font-size: 0.675rem;
  line-height: 1.15;
  font-weight: 620;
  letter-spacing: 0.045em;
  text-transform: uppercase;
  white-space: nowrap;
}

.primary-nav--desktop {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  align-items: stretch;
  height: var(--gdp-header-height);
  gap: 0.05rem;
}

.primary-nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-width: 0;
  padding-inline: 0.65rem;
  color: var(--gdp-muted-strong);
  text-decoration: none;
  white-space: nowrap;
  font-size: 0.845rem;
  font-weight: 590;
  transition: color var(--gdp-transition), background var(--gdp-transition);
}

.primary-nav__link:hover {
  color: var(--gdp-text-strong);
  background: var(--gdp-brand-soft);
}

.primary-nav__link.is-selected {
  color: var(--gdp-text-strong);
}

.primary-nav__link.is-selected::after {
  content: "";
  position: absolute;
  right: 0.72rem;
  bottom: 0;
  left: 0.72rem;
  height: 2px;
  border-radius: 3px 3px 0 0;
  background: var(--gdp-brand);
}

.header-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: auto;
}

.theme-toggle {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.45rem 0.62rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--gdp-muted-strong);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 680;
  cursor: pointer;
  transition: color var(--gdp-transition), background var(--gdp-transition), border-color var(--gdp-transition), transform var(--gdp-transition);
}

.theme-toggle:hover {
  border-color: var(--gdp-border-subtle);
  background: var(--gdp-surface-raised);
  color: var(--gdp-text-strong);
}

.theme-toggle:active {
  transform: translateY(1px);
}

.theme-toggle__icon {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-toggle__icon--moon {
  display: none;
}

:root[data-theme="dark"] .theme-toggle__icon--sun {
  display: none;
}

:root[data-theme="dark"] .theme-toggle__icon--moon {
  display: block;
}

.primary-menu {
  position: relative;
  display: none;
}

.primary-menu > summary,
.page-tool > summary {
  list-style: none;
}

.primary-menu > summary::-webkit-details-marker,
.page-tool > summary::-webkit-details-marker {
  display: none;
}

.menu-trigger {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.65rem;
  cursor: pointer;
  color: var(--gdp-text-strong);
  font-size: 0.86rem;
  font-weight: 680;
  border-radius: 999px;
  user-select: none;
}

.menu-trigger:hover {
  background: var(--gdp-surface-raised);
}

.menu-trigger__icon {
  width: 1.05rem;
  display: grid;
  gap: 3px;
}

.menu-trigger__icon > span {
  display: block;
  height: 1.5px;
  border-radius: 2px;
  background: currentColor;
  transition: transform var(--gdp-transition), opacity var(--gdp-transition);
}

.primary-menu[open] .menu-trigger__icon > span:nth-child(1) {
  transform: translateY(4.5px) rotate(45deg);
}

.primary-menu[open] .menu-trigger__icon > span:nth-child(2) {
  opacity: 0;
}

.primary-menu[open] .menu-trigger__icon > span:nth-child(3) {
  transform: translateY(-4.5px) rotate(-45deg);
}

.primary-menu__panel {
  position: fixed;
  z-index: 110;
  top: var(--gdp-header-height);
  right: 0;
  left: 0;
  max-height: calc(100vh - var(--gdp-header-height));
  overflow-y: auto;
  border-top: 1px solid var(--gdp-border-subtle);
  border-bottom: 1px solid var(--gdp-border);
  background: var(--gdp-surface-raised);
  box-shadow: var(--gdp-shadow-lg);
}

.primary-menu__nav {
  width: min(calc(100% - 2rem), 760px);
  margin-inline: auto;
  padding-block: 0.8rem 1rem;
  display: grid;
}

.primary-menu__link {
  min-height: 48px;
  display: flex;
  align-items: center;
  padding-inline: 0.8rem;
  border-bottom: 1px solid var(--gdp-border-subtle);
  color: var(--gdp-muted-strong);
  text-decoration: none;
  font-size: 0.98rem;
  font-weight: 590;
}

.primary-menu__link:last-child {
  border-bottom: 0;
}

.primary-menu__link:hover,
.primary-menu__link.is-selected {
  color: var(--gdp-text-strong);
}

.primary-menu__link.is-selected {
  box-shadow: inset 2px 0 0 var(--gdp-brand);
  background: var(--gdp-brand-soft);
}

.page-tools-shell {
  display: none;
  position: sticky;
  z-index: 80;
  top: var(--gdp-header-height);
  border-bottom: 1px solid var(--gdp-border-subtle);
  background: color-mix(in srgb, var(--gdp-bg) 94%, transparent);
  backdrop-filter: blur(14px);
}

.page-tools {
  width: min(calc(100% - 2rem), 900px);
  min-height: 48px;
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.page-tool {
  position: relative;
}

.page-tool + .page-tool {
  border-left: 1px solid var(--gdp-border-subtle);
}

.page-tool > summary {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding-inline: 0.75rem;
  cursor: pointer;
  color: var(--gdp-text);
  font-size: 0.82rem;
}

.page-tool__label {
  color: var(--gdp-muted);
}

.page-tool__value {
  color: var(--gdp-text-strong);
  font-weight: 660;
}

.page-tool__panel {
  position: absolute;
  top: 100%;
  width: min(88vw, 430px);
  max-height: min(68vh, 540px);
  overflow: auto;
  padding: 0.9rem;
  border: 1px solid var(--gdp-border);
  border-radius: 0 0 var(--gdp-radius-md) var(--gdp-radius-md);
  background: var(--gdp-surface-raised);
  box-shadow: var(--gdp-shadow-lg);
}

.page-tool:first-child .page-tool__panel {
  left: 0;
}

.page-tool:last-child .page-tool__panel {
  right: 0;
}

.page-layout {
  width: min(calc(100% - 4rem), var(--gdp-page-max));
  margin-inline: auto;
  display: grid;
  grid-template-columns: var(--gdp-context-width) minmax(0, 760px) var(--gdp-outline-width);
  justify-content: center;
  gap: clamp(2rem, 2.8vw, 3.2rem);
  padding-block: clamp(3rem, 5vw, 5rem) 6rem;
}

.context-panel,
.outline-panel,
.page-main {
  min-width: 0;
}

.context-panel__inner,
.page-outline:not(.page-outline--compact) {
  position: sticky;
  top: calc(var(--gdp-header-height) + 1.75rem);
  max-height: calc(100vh - var(--gdp-header-height) - 3.5rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--gdp-border) transparent;
}

.panel-eyebrow {
  margin: 0 0 0.42rem;
  color: var(--gdp-muted);
  font-size: 0.68rem;
  font-weight: 780;
  letter-spacing: 0.105em;
  text-transform: uppercase;
}

.panel-title {
  margin: 0 0 1.15rem;
  color: var(--gdp-text-strong);
  font-size: 1rem;
  font-weight: 730;
}

.context-nav ul,
.page-outline ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.context-nav__item {
  margin: 0;
}

.context-nav__item a {
  display: block;
  position: relative;
  padding: 0.36rem 0.48rem;
  border-left: 1px solid transparent;
  border-radius: 0 var(--gdp-radius-sm) var(--gdp-radius-sm) 0;
  color: var(--gdp-muted);
  text-decoration: none;
  font-size: 0.825rem;
  line-height: 1.4;
  transition: color var(--gdp-transition), border-color var(--gdp-transition), background var(--gdp-transition);
}

.context-nav__item a:hover {
  color: var(--gdp-text-strong);
  background: var(--gdp-brand-soft);
}

.context-nav__item.is-selected > a {
  color: var(--gdp-muted-strong);
  font-weight: 650;
}

.context-nav__item a[aria-current="page"] {
  color: var(--gdp-active);
  border-left-color: var(--gdp-brand);
  background: var(--gdp-brand-soft);
  font-weight: 720;
}

.context-nav__item--depth-0 > a {
  padding-left: 0.25rem;
  margin-top: 0.55rem;
  color: var(--gdp-text-strong);
  font-weight: 760;
}

.context-nav__item--depth-1 > a {
  padding-left: 0.5rem;
  color: var(--gdp-muted-strong);
  font-weight: 650;
}

.context-nav__item--depth-2 > a {
  padding-left: 0.95rem;
}

.context-nav__item--depth-3 > a {
  padding-left: 1.4rem;
  font-size: 0.8rem;
}

.technical-content {
  width: min(100%, var(--gdp-reading-measure));
  margin-inline: auto;
  overflow-wrap: anywhere;
}

.technical-content h1,
.technical-content h2,
.technical-content h3 {
  color: var(--gdp-text-strong);
  text-wrap: balance;
  scroll-margin-top: calc(var(--gdp-header-height) + 2rem);
}

.technical-content h1 {
  max-width: 18ch;
  margin: 0 0 1.3rem;
  font-size: clamp(2.55rem, 4.2vw, 3.35rem);
  line-height: 1.03;
  font-weight: 690;
  letter-spacing: -0.045em;
}

.technical-content h1::after {
  content: "";
  display: block;
  width: 3.25rem;
  height: 3px;
  margin-top: 1.15rem;
  border-radius: 999px;
  background: var(--gdp-brand);
}

.technical-content h2 {
  margin: 2.7rem 0 1.1rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--gdp-border-subtle);
  font-size: clamp(1.65rem, 2.5vw, 2rem);
  line-height: 1.16;
  font-weight: 670;
  letter-spacing: -0.028em;
}

.technical-content h3 {
  margin: 2.45rem 0 0.85rem;
  font-size: 1.26rem;
  line-height: 1.28;
  font-weight: 720;
  letter-spacing: -0.012em;
}

.technical-content p,
.technical-content li {
  color: var(--gdp-text);
  font-size: clamp(1.02rem, 1.05vw, 1.075rem);
  line-height: 1.76;
}

.technical-content p {
  margin: 0 0 1.1rem;
}

.technical-content ul,
.technical-content ol {
  margin: 0 0 1.55rem;
  padding-left: 1.45rem;
}

.technical-content li + li {
  margin-top: 0.3rem;
}

.technical-content li::marker {
  color: var(--gdp-brand);
}

.technical-content strong {
  color: var(--gdp-text-strong);
  font-weight: 730;
}

.technical-content a {
  color: var(--gdp-link);
  text-decoration-color: color-mix(in srgb, var(--gdp-link) 42%, transparent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

.technical-content a:hover {
  color: var(--gdp-link-hover);
  text-decoration-color: currentColor;
}

.technical-content img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  margin: 2.7rem auto;
  border-radius: var(--gdp-radius-md);
}

.technical-content hr {
  border: 0;
  border-top: 1px solid var(--gdp-border);
  margin: 1.8rem 0;
}

/* Canonical separators and heading borders must not produce two rules. */
.technical-content hr + h2 {
  margin-top: 1.8rem;
  padding-top: 0;
  border-top: 0;
}

.page-outline ol {
  border-left: 1px solid var(--gdp-border);
  padding-left: 0.78rem;
}

.page-outline__item a {
  display: block;
  padding: 0.27rem 0.18rem;
  color: var(--gdp-muted);
  text-decoration: none;
  font-size: 0.795rem;
  line-height: 1.4;
  transition: color var(--gdp-transition), transform var(--gdp-transition);
}

.page-outline__item a:hover {
  color: var(--gdp-text-strong);
}

.page-outline__item a[aria-current="location"] {
  color: var(--gdp-text-strong);
  font-weight: 690;
}

.page-outline__item--level-3 a {
  padding-left: 0.72rem;
  font-size: 0.76rem;
}

.site-footer {
  border-top: 1px solid var(--gdp-border-subtle);
  background: var(--gdp-bg-soft);
}

.site-footer__inner {
  width: min(calc(100% - 2.5rem), 920px);
  min-height: 74px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--gdp-muted);
  font-size: 0.78rem;
}

.context-nav--compact,
.page-outline--compact {
  padding: 0.25rem;
}

.page-outline--compact ol {
  border-left: 0;
  padding-left: 0;
}

@media (max-width: 1320px) {
  .primary-nav__link {
    padding-inline: 0.5rem;
    font-size: 0.81rem;
  }

  .brand__descriptor {
    display: none;
  }

  .page-layout {
    grid-template-columns: var(--gdp-context-width) minmax(0, 760px);
    max-width: 1120px;
  }

  .outline-panel {
    display: none;
  }

  .page-tools-shell {
    display: block;
  }
}

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

  .primary-menu {
    display: block;
  }

  .page-layout {
    width: min(calc(100% - 3rem), 880px);
    display: block;
    padding-block: 2.8rem 5rem;
  }

  .context-panel {
    display: none;
  }

  .technical-content {
    width: min(100%, 74ch);
  }
}

@media (max-width: 720px) {
  :root {
    --gdp-header-height: 58px;
  }

  .site-header__inner {
    width: calc(100% - 1.4rem);
    gap: 0.5rem;
  }

  .brand {
    gap: 0.55rem;
  }

  .brand__mark {
    width: 1.75rem;
    height: 1.75rem;
  }

  .brand__name {
    font-size: 0.84rem;
    letter-spacing: 0.045em;
  }

  .theme-toggle {
    padding-inline: 0.55rem;
  }

  .theme-toggle__text,
  .menu-trigger__text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .menu-trigger {
    min-width: 44px;
    justify-content: center;
    padding-inline: 0.7rem;
  }

  .page-tools {
    width: calc(100% - 0.8rem);
  }

  .page-tool > summary {
    min-width: 0;
    justify-content: flex-start;
  }

  .page-tool__label {
    display: none;
  }

  .page-tool__value {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .page-layout {
    width: calc(100% - 2rem);
    padding-block: 2.35rem 4rem;
  }

  .technical-content h1 {
    font-size: clamp(2.25rem, 11vw, 2.85rem);
  }

  .technical-content h2 {
    margin-top: 3.25rem;
    padding-top: 1.9rem;
    font-size: 1.62rem;
  }

  .technical-content h3 {
    font-size: 1.2rem;
  }

  .technical-content p,
  .technical-content li {
    font-size: 1rem;
    line-height: 1.72;
  }

  .site-footer__inner {
    width: calc(100% - 2rem);
    min-height: 86px;
    align-items: flex-start;
    justify-content: center;
    flex-direction: column;
    gap: 0.25rem;
    padding-block: 1.25rem;
  }
}

@media (max-width: 420px) {
  .site-header__inner {
    width: calc(100% - 1rem);
  }

  .brand__name {
    font-size: 0.78rem;
  }

  .header-actions {
    gap: 0;
  }

  .theme-toggle,
  .menu-trigger {
    min-width: 42px;
    min-height: 42px;
  }

  .page-layout {
    width: calc(100% - 1.4rem);
  }

  .page-tool > summary {
    padding-inline: 0.55rem;
  }

  .page-tool__value {
    font-size: 0.76rem;
  }
}

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

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

/*
 * Shared editorial table treatment for canonical Markdown content.
 *
 * Tables remain semantic HTML from the Markdown renderer. Presentation is
 * deliberately handled here once, rather than duplicated in Atari-bu content.
 */
.technical-content table {
  width: 100%;
  margin: 1.9rem 0 2.4rem;
  border: 1px solid var(--gdp-border);
  border-top: 2px solid var(--gdp-brand);
  border-collapse: separate;
  border-spacing: 0;
  border-radius: var(--gdp-radius-md);
  overflow: hidden;
  background: var(--gdp-surface);
  box-shadow: var(--gdp-shadow-sm);
  color: var(--gdp-text);
  font-size: 0.94rem;
  line-height: 1.48;
}

.technical-content thead {
  background: color-mix(in srgb, var(--gdp-bg-soft) 78%, var(--gdp-surface));
}

.technical-content th,
.technical-content td {
  padding: 0.78rem 0.9rem;
  text-align: left;
  vertical-align: top;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}

.technical-content th {
  color: var(--gdp-text-strong);
  font-size: 0.79rem;
  font-weight: 760;
  line-height: 1.35;
  letter-spacing: 0.018em;
}

.technical-content tbody td {
  border-top: 1px solid var(--gdp-border-subtle);
}

.technical-content tbody tr:nth-child(even) td {
  background: color-mix(in srgb, var(--gdp-bg-soft) 38%, transparent);
}

/*
 * Technique names are identifiers, not prose. Give the first column enough
 * room for normal names and never auto-hyphenate inside a name (for example
 * Uraken -> Ura- / ken). Multi-word names may still wrap at spaces.
 */
.technical-content th:first-child,
.technical-content td:first-child {
  min-width: 6.5rem;
  word-break: keep-all;
  hyphens: none;
}

.technical-content tbody td:first-child {
  color: var(--gdp-text-strong);
  font-weight: 680;
}

/* Descriptive columns carry more prose, so keep them slightly more compact. */
.technical-content tbody td:not(:first-child) {
  font-size: 0.9rem;
}

.technical-content table strong {
  font-weight: 720;
}

/* Four or more columns get their own native keyboard/touch scroll surface. */
.technical-content .content-table {
  max-width: 100%;
  margin: 1.5rem 0 2rem;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  border: 1px solid var(--gdp-border);
  border-radius: var(--gdp-radius-md);
  background: var(--gdp-surface);
  scrollbar-color: var(--gdp-muted) var(--gdp-bg-soft);
}
.technical-content .content-table:focus-visible {
  outline: 3px solid var(--gdp-focus);
  outline-offset: 3px;
}
.technical-content .content-table--wide table {
  min-width: 56rem;
  margin: 0;
  border: 0;
  border-top: 2px solid var(--gdp-brand);
  border-radius: 0;
  box-shadow: none;
}
.technical-content .content-table--wide th,
.technical-content .content-table--wide td { min-width: 10rem; }
.technical-content .content-table--wide th:first-child,
.technical-content .content-table--wide td:first-child { min-width: 3rem; }
.technical-content .content-table--wide tbody td,
.technical-content .content-table--wide tbody td:not(:first-child) { font-size: 1rem; line-height: 1.55; }
.technical-content .content-table--wide th { font-size: 0.875rem; }

@media print {
  .technical-content .content-table { overflow: visible; }
  .technical-content .content-table--wide table { min-width: 0; }
  .technical-content .content-table--wide th,
  .technical-content .content-table--wide td { min-width: 0; }
}

@media (max-width: 720px) {
  .technical-content table {
    margin-block: 1.6rem 2rem;
    font-size: 0.86rem;
    line-height: 1.42;
  }

  .technical-content th,
  .technical-content td {
    padding: 0.66rem 0.62rem;
  }

  .technical-content th {
    font-size: 0.73rem;
    letter-spacing: 0.01em;
  }

  .technical-content th:first-child,
  .technical-content td:first-child {
    min-width: 5.75rem;
  }

  .technical-content tbody td:not(:first-child) {
    font-size: 0.82rem;
  }
}

:root {
  /* Shared desktop canvas: wide enough for discovery, controlled enough for reading. */
  --gdp-page-max: 1280px;
  --gdp-context-width: 200px;
}

/* General pages without child destinations need no empty context column. */
.page-layout--without-context {
  grid-template-columns: minmax(0, 760px) var(--gdp-outline-width);
}

/*
 * Section landing pages already expose their children as early, actionable links.
 * Do not present the same destinations again in the contextual rail/tool surface.
 * Fragment-based shortcuts (start-here, grade requirements and family openers)
 * keep their contextual navigation because they serve a different purpose.
 */
body:has(.page-shortcuts__links a[href^="/"]) .page-tools-shell {
  display: none;
}

.page-layout:has(.page-shortcuts__links a[href^="/"]) {
  grid-template-columns: minmax(0, 760px) var(--gdp-outline-width);
}

.page-layout:has(.page-shortcuts__links a[href^="/"]) > .context-panel {
  display: none;
}

/*
 * Quick navigation is intentionally secondary. Keep its accessible nav label,
 * but do not render a second visible section heading above a short row of links.
 */
.technical-content .page-shortcuts {
  margin: 1.15rem 0 1.75rem;
  padding: 0.55rem 0 0.65rem;
  border-top: 1px solid var(--gdp-border);
  border-bottom: 0;
  background: transparent;
}

.technical-content .page-shortcuts .panel-eyebrow {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.page-shortcuts__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 1.1rem;
}

.technical-content .page-shortcuts__links a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  max-width: 100%;
  padding: 0.2rem 0;
  border: 0;
  border-bottom: 1px solid transparent;
  background: transparent;
  color: var(--gdp-muted-strong);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
}

.technical-content .page-shortcuts__links a::after {
  content: "→";
  margin-left: 0.35rem;
  color: var(--gdp-muted);
  font-weight: 500;
}

.technical-content .page-shortcuts__links a:hover {
  border-bottom-color: var(--gdp-brand);
  background: transparent;
  color: var(--gdp-brand);
}

.technical-content .page-shortcuts__links a:hover::after {
  color: var(--gdp-brand);
}

.page-shortcuts__links a:focus-visible {
  outline: 3px solid var(--gdp-focus);
  outline-offset: 3px;
}

.family-discovery h2 {
  scroll-margin-top: calc(var(--gdp-header-height) + 1.5rem);
}

@media (max-width: 1320px) {
  .page-layout--without-context,
  .page-layout:has(.page-shortcuts__links a[href^="/"]) {
    grid-template-columns: minmax(0, 760px);
  }
}

@media (max-width: 480px) {
  .technical-content .page-shortcuts {
    margin: 0.9rem 0 1.4rem;
    padding: 0.45rem 0 0.5rem;
  }

  .page-shortcuts__links {
    gap: 0.2rem 0.8rem;
  }

  .technical-content .page-shortcuts__links a {
    min-height: 32px;
    font-size: 0.875rem;
  }
}

.language-selector {
  position: relative;
  flex: 0 0 auto;
}

.language-selector > summary {
  list-style: none;
}

.language-selector > summary::-webkit-details-marker {
  display: none;
}

.language-selector__trigger {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.42rem;
  padding: 0.42rem 0.58rem;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--gdp-muted-strong);
  cursor: pointer;
  user-select: none;
  transition:
    color var(--gdp-transition),
    background var(--gdp-transition),
    border-color var(--gdp-transition),
    transform var(--gdp-transition);
}

.language-selector__trigger:hover,
.language-selector[open] .language-selector__trigger {
  border-color: var(--gdp-border-subtle);
  background: var(--gdp-surface-raised);
  color: var(--gdp-text-strong);
}

.language-selector__trigger:active {
  transform: translateY(1px);
}

.language-selector__globe,
.language-selector__chevron,
.language-selector__check {
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.language-selector__globe {
  width: 18px;
  height: 18px;
}

.language-selector__code {
  min-width: 1.6rem;
  color: var(--gdp-text-strong);
  font-size: 0.76rem;
  font-weight: 780;
  letter-spacing: 0.055em;
  text-align: center;
}

.language-selector__chevron {
  width: 13px;
  height: 13px;
  color: var(--gdp-muted);
  transition: transform var(--gdp-transition);
}

.language-selector[open] .language-selector__chevron {
  transform: rotate(180deg);
}

.language-selector__panel {
  position: absolute;
  z-index: 130;
  top: calc(100% + 0.45rem);
  right: 0;
  width: min(15rem, calc(100vw - 1rem));
  padding: 0.42rem;
  border: 1px solid var(--gdp-border);
  border-radius: var(--gdp-radius-md);
  background: var(--gdp-surface-raised);
  box-shadow: var(--gdp-shadow-lg);
}

.language-selector__menu ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.language-selector__option {
  min-height: 48px;
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr) 1.2rem;
  align-items: center;
  gap: 0.65rem;
  padding: 0.48rem 0.65rem;
  border-radius: var(--gdp-radius-sm);
  color: var(--gdp-muted-strong);
  text-decoration: none;
  transition: color var(--gdp-transition), background var(--gdp-transition);
}

.language-selector__option:hover {
  background: var(--gdp-bg-soft);
  color: var(--gdp-text-strong);
}

.language-selector__option[aria-current="page"] {
  background: var(--gdp-brand-soft);
  color: var(--gdp-text-strong);
}

.language-selector__option-code {
  color: var(--gdp-muted);
  font-size: 0.69rem;
  font-weight: 800;
  letter-spacing: 0.07em;
}

.language-selector__option-name {
  min-width: 0;
  overflow: hidden;
  color: inherit;
  font-size: 0.88rem;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.language-selector__check {
  width: 17px;
  height: 17px;
  color: var(--gdp-brand);
}

.language-selector__option:not([aria-current="page"]) .language-selector__check {
  visibility: hidden;
}

@media (max-width: 720px) {
  .language-selector__trigger {
    padding-inline: 0.48rem;
    gap: 0.32rem;
  }

  .language-selector__chevron {
    width: 11px;
    height: 11px;
  }
}

@media (max-width: 420px) {
  .language-selector__trigger {
    min-width: 42px;
    min-height: 42px;
    padding-inline: 0.38rem;
  }

  .language-selector__globe {
    width: 17px;
    height: 17px;
  }

  .language-selector__code {
    min-width: 1.35rem;
    font-size: 0.7rem;
  }

  .language-selector__chevron {
    display: none;
  }

  .language-selector__panel {
    right: -2.6rem;
    width: min(14.5rem, calc(100vw - 0.75rem));
  }
}

.breadcrumbs {
  /* Global path follows the same horizontal canvas as the site-header inner shell. */
  width: min(calc(100% - 2.5rem), var(--gdp-page-max));
  margin: 1rem auto .25rem;
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .35rem .65rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: .875rem;
}

.breadcrumbs li {
  display: inline-flex;
  align-items: center;
}

.breadcrumbs li:not(:last-child)::after {
  content: "›";
  margin-inline-start: .65rem;
  opacity: .45;
}

.breadcrumbs a {
  color: var(--color-text-muted, currentColor);
  text-decoration: none;
}

.breadcrumbs a:hover,
.breadcrumbs a:focus-visible {
  color: var(--color-text, currentColor);
  text-decoration: underline;
  text-underline-offset: .2em;
}

.breadcrumbs a[aria-current="page"] {
  color: var(--color-text, currentColor);
  font-weight: 650;
  text-decoration: none;
}

.collection-pager {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
  margin-block: 3rem 1rem;
  padding-block: 1.25rem;
  border-block: 1px solid var(--color-border, rgba(127, 127, 127, .28));
}

.collection-pager__link {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  min-height: 2.75rem;
  color: inherit;
  text-decoration: none;
  font-weight: 600;
}

.collection-pager__link:hover,
.collection-pager__link:focus-visible {
  text-decoration: underline;
  text-underline-offset: .22em;
}

.collection-pager__link--next {
  justify-self: end;
  text-align: end;
}

.collection-pager__collection {
  justify-self: center;
  padding-inline: .8rem;
  text-align: center;
}

.primary-menu__utilities {
  margin-top: .75rem;
  padding-top: .75rem;
  border-top: 1px solid var(--color-border, rgba(127, 127, 127, .28));
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 1rem;
}

.footer-nav a {
  color: inherit;
}

@media (max-width: 720px) {
  .breadcrumbs {
    width: calc(100% - 1.4rem);
    margin-top: .75rem;
  }

  .collection-pager {
    grid-template-columns: 1fr 1fr;
    gap: .5rem 1rem;
  }

  .collection-pager__collection {
    grid-column: 1 / -1;
    grid-row: 1;
    justify-self: stretch;
    padding-block: .35rem;
  }

  .collection-pager__link--previous {
    grid-column: 1;
  }

  .collection-pager__link--next {
    grid-column: 2;
  }
}

@media (max-width: 420px) {
  .breadcrumbs {
    width: calc(100% - 1rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .breadcrumbs a,
  .collection-pager__link {
    scroll-behavior: auto;
  }
}

.search-toggle {
  display: none;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 0.42rem;
  padding: 0.45rem 0.62rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--gdp-muted-strong);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 680;
  cursor: pointer;
}

.gdp-js .search-toggle {
  display: inline-flex;
}

.search-toggle:hover {
  border-color: var(--gdp-border-subtle);
  background: var(--gdp-surface-raised);
  color: var(--gdp-text-strong);
}

.search-toggle__icon {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.site-search[hidden] {
  display: none;
}

.site-search {
  position: fixed;
  z-index: 300;
  inset: 0;
  display: grid;
  align-items: start;
  justify-items: center;
  padding: max(5rem, calc(var(--gdp-header-height) + 1rem)) 1rem 1rem;
}

.site-search__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 10, 12, 0.56);
  backdrop-filter: blur(4px);
}

.site-search__panel {
  position: relative;
  width: min(760px, 100%);
  max-height: min(78vh, 720px);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  border: 1px solid var(--gdp-border);
  border-radius: var(--gdp-radius-lg);
  background: var(--gdp-surface-raised);
  box-shadow: var(--gdp-shadow-lg);
}

.site-search__header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: end;
  padding: 1.1rem 1.1rem 0.75rem;
  border-bottom: 1px solid var(--gdp-border-subtle);
}

.site-search__field {
  min-width: 0;
  display: grid;
  gap: 0.35rem;
}

.site-search__label {
  color: var(--gdp-muted);
  font-size: 0.72rem;
  font-weight: 760;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-search__input {
  width: 100%;
  min-height: 48px;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--gdp-border);
  border-radius: var(--gdp-radius-md);
  background: var(--gdp-bg);
  color: var(--gdp-text-strong);
  font: inherit;
  font-size: 1rem;
}

.site-search__input::placeholder {
  color: var(--gdp-muted);
}

.site-search__close {
  min-width: 44px;
  min-height: 44px;
  border: 1px solid var(--gdp-border-subtle);
  border-radius: 999px;
  background: transparent;
  color: var(--gdp-muted-strong);
  font: inherit;
  font-size: 1.45rem;
  line-height: 1;
  cursor: pointer;
}

.site-search__close:hover {
  background: var(--gdp-brand-soft);
  color: var(--gdp-text-strong);
}

.site-search__status {
  min-height: 2.75rem;
  margin: 0;
  padding: 0.72rem 1.1rem;
  color: var(--gdp-muted);
  font-size: 0.86rem;
  border-bottom: 1px solid var(--gdp-border-subtle);
}

.site-search__results {
  margin: 0;
  padding: 0.55rem;
  overflow-y: auto;
  list-style: none;
  overscroll-behavior: contain;
}

.site-search__result + .site-search__result {
  margin-top: 0.2rem;
}

.site-search__result-link {
  display: grid;
  gap: 0.22rem;
  padding: 0.8rem 0.85rem;
  border-radius: var(--gdp-radius-md);
  color: var(--gdp-text-strong);
  text-decoration: none;
}

.site-search__result-link:hover,
.site-search__result-link:focus-visible {
  background: var(--gdp-brand-soft);
  color: var(--gdp-text-strong);
}

.site-search__result-title {
  font-size: 0.98rem;
  font-weight: 720;
}

.site-search__result-context {
  color: var(--gdp-muted);
  font-size: 0.78rem;
  line-height: 1.4;
}

body.search-active {
  overflow: hidden;
}

@media (max-width: 1040px) {
  .search-toggle__text {
    display: none;
  }
}

@media (max-width: 560px) {
  .site-search {
    padding: calc(var(--gdp-header-height) + 0.5rem) 0.5rem 0.5rem;
  }

  .site-search__panel {
    max-height: calc(100vh - var(--gdp-header-height) - 1rem);
    border-radius: var(--gdp-radius-md);
  }

  .site-search__header {
    padding: 0.8rem 0.8rem 0.65rem;
  }

  .site-search__status {
    padding-inline: 0.8rem;
  }
}

/* WEB-R2: editorial Galaz Dojo landing page — quiet, technical and domain-led. */
.home-main { width: 100%; min-width: 0; }
.home-hero, .home-paths, .home-depth { width: min(calc(100% - 3rem), var(--gdp-page-max)); margin-inline: auto; }
.home-hero { padding-block: clamp(2.4rem, 5vw, 4.4rem) 3.4rem; }
.home-hero__inner { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); align-items: center; gap: clamp(2.5rem, 5.5vw, 5rem); }
.home-hero__copy { min-width: 0; }
.home-hero__eyebrow, .home-section-label { margin: 0 0 1rem; color: var(--gdp-muted-strong); font-size: 0.75rem; font-weight: 750; letter-spacing: 0.11em; line-height: 1.5; text-transform: uppercase; }
.home-hero h1 { margin: 0; color: var(--gdp-text-strong); font-weight: 720; }
.home-hero h1::after { content: ""; display: block; width: 3rem; height: 2px; margin-top: 1.45rem; background: var(--gdp-brand); }
.home-hero__title { display: block; max-width: 12ch; font-size: clamp(3rem, 5.8vw, 4.9rem); line-height: 0.98; letter-spacing: -0.05em; text-wrap: balance; }
.home-hero__subtitle { display: block; max-width: 29ch; margin-top: 0.85rem; font-size: clamp(1.35rem, 2.2vw, 1.85rem); font-weight: 600; line-height: 1.28; letter-spacing: -0.024em; text-wrap: balance; }
.home-hero__subtitle::first-letter { text-transform: uppercase; }
/* Preserve the complete canonical title in its accessible text. */
.home-hero__separator { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.home-hero__lead { max-width: 52ch; margin: 1.35rem 0 0; color: var(--gdp-text); font-size: 1.0625rem; line-height: 1.72; }
.home-hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 1.5rem; margin-top: 1.8rem; }
.home-hero__action { display: inline-flex; align-items: center; justify-content: center; gap: 0.8rem; min-height: 44px; max-width: 100%; padding: 0.55rem 0; border: 0; border-bottom: 1px solid var(--gdp-border-strong, var(--gdp-border)); border-radius: 0; background: transparent; color: var(--gdp-text-strong); font-size: 0.95rem; font-weight: 720; letter-spacing: 0.01em; text-decoration: none; transition: color var(--gdp-transition), border-color var(--gdp-transition); }
.home-hero__action--primary { border-bottom: 2px solid var(--gdp-brand); background: transparent; color: var(--gdp-text-strong); }
.home-hero__action:hover, .home-hero__action--primary:hover { border-color: var(--gdp-brand); background: transparent; color: var(--gdp-brand); }
.home-portrait { min-width: 0; margin: 0; }
.home-portrait img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 2px; background: var(--gdp-bg-soft); filter: saturate(0.82) contrast(1.03); }
.home-portrait figcaption { display: grid; grid-template-columns: 1fr auto; gap: 0.25rem 1rem; margin-top: 0.72rem; padding-top: 0.6rem; border-top: 1px solid var(--gdp-border); color: var(--gdp-muted-strong); font-size: 0.75rem; line-height: 1.55; }
.home-paths { padding-block: 2.6rem 3rem; border-top: 1px solid var(--gdp-border); }
.home-section-label { margin-bottom: 0.55rem; }
.home-paths__heading { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 0.72fr); column-gap: 3rem; align-items: end; }
.home-paths__heading .home-section-label { grid-column: 1 / -1; }
.home-paths__heading h2 { margin: 0; color: var(--gdp-text-strong); font-size: clamp(2rem, 3.2vw, 2.7rem); font-weight: 700; line-height: 1.08; letter-spacing: -0.035em; }
.home-paths__heading > p:not(.home-section-label) { margin: 0; color: var(--gdp-muted-strong); font-size: 0.975rem; line-height: 1.65; }
.home-path-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0 1.35rem; margin-top: 2.3rem; counter-reset: home-path; border-bottom: 1px solid var(--gdp-border); }
.home-path-link { counter-increment: home-path; position: relative; display: flex; flex-direction: column; align-items: start; gap: 1rem; min-width: 0; min-height: 13.5rem; padding: 1rem 0.45rem 1.3rem 0; border: 0; border-top: 2px solid var(--gdp-border); border-radius: 0; background: transparent; box-shadow: none; color: var(--gdp-text-strong); text-decoration: none; transition: border-color var(--gdp-transition), color var(--gdp-transition); }
.home-path-link::before { content: "0" counter(home-path); color: var(--gdp-brand); font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em; line-height: 1; }
.home-path-link__content { min-width: 0; }
.home-path-link strong { display: block; font-size: 1.05rem; font-weight: 740; line-height: 1.35; }
.home-path-link__description { display: block; margin-top: 0.62rem; color: var(--gdp-muted-strong); font-size: 0.925rem; line-height: 1.58; }
.home-path-link__arrow { align-self: start; margin-top: auto; color: var(--gdp-brand); font-size: 1.05rem; }
.home-path-link:hover { border-color: var(--gdp-brand); background: transparent; color: var(--gdp-brand); }
.home-path-link:hover .home-path-link__description { color: var(--gdp-text); }
.home-approach { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 1.5rem; margin-top: 2.35rem; padding-top: 1.3rem; border-top: 1px solid var(--gdp-border); }
.home-approach h3 { margin: 0; color: var(--gdp-text-strong); font-size: 0.9rem; font-weight: 750; letter-spacing: 0.02em; line-height: 1.6; }
.home-approach p { margin: 0; max-width: 67ch; color: var(--gdp-muted-strong); font-size: 0.975rem; line-height: 1.72; }
.home-depth { padding-bottom: 4rem; }
.home-depth > details { border-top: 1px solid var(--gdp-border); border-bottom: 1px solid var(--gdp-border); }
.home-depth summary { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 68px; padding-block: 1rem; color: var(--gdp-text-strong); font-size: 0.925rem; font-weight: 700; letter-spacing: 0.01em; line-height: 1.6; list-style: none; cursor: pointer; }
.home-depth summary::-webkit-details-marker { display: none; }
.home-depth summary::after { content: "+"; color: var(--gdp-brand); font-size: 1.35rem; font-weight: 400; }
.home-depth details[open] summary::after { content: "−"; }
.home-depth__content { width: min(100%, 72ch); margin: 0; padding: 1.2rem 0 2.8rem; }
.home-depth__content h2:first-child { margin-top: 1rem; }
.home-main a:focus-visible, .home-depth summary:focus-visible { outline: 3px solid var(--gdp-focus); outline-offset: 4px; }
@media (max-width: 1100px) {
  .home-path-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: 0; }
  .home-path-link { min-height: 11.5rem; border-bottom: 1px solid var(--gdp-border); }
}
@media (max-width: 900px) {
  .home-hero__inner { gap: 2rem; }
  .home-portrait img { aspect-ratio: 5 / 4; object-position: 72% center; }
  .home-paths__heading { grid-template-columns: 1fr; gap: 0.7rem; }
}
@media (max-width: 720px) {
  .home-hero, .home-paths, .home-depth { width: calc(100% - 2rem); }
  .home-hero { padding-top: 2rem; }
  .home-hero__inner { grid-template-columns: 1fr; }
  .home-hero__title { max-width: 10ch; font-size: clamp(2.7rem, 12vw, 3.7rem); }
  .home-hero__subtitle { font-size: 1.45rem; }
  .home-portrait img { aspect-ratio: 3 / 2; object-position: center; }
  .home-portrait figcaption { grid-template-columns: 1fr; }
  .home-path-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-path-link { min-height: 10.75rem; }
  .home-approach { grid-template-columns: 1fr; gap: 0.55rem; }
}
@media (max-width: 480px) {
  .home-path-grid { grid-template-columns: 1fr; }
  .home-path-link { min-height: auto; padding-block: 1rem 1.25rem; }
  .home-path-link__arrow { margin-top: 0.25rem; }
}
@media (prefers-reduced-motion: reduce) { .home-main a { transition: none; } }

.discovery-main {
  width: min(calc(100% - 3rem), var(--gdp-page-max));
  margin-inline: auto;
  padding-block: clamp(2.5rem, 4vw, 4rem) 6rem;
}

.discovery-hero {
  display: grid;
  gap: 1rem;
  width: min(100%, 960px);
}

.discovery-hero h1 {
  margin: 0;
  max-width: 20ch;
  color: var(--gdp-text-strong);
  font-size: clamp(2.4rem, 5vw, 4.5rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.discovery-hero__lead {
  max-width: 68ch;
  margin: 0;
  color: var(--gdp-muted-strong);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  line-height: 1.65;
}

.discovery-search-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-top: 1.25rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid var(--gdp-border);
  border-radius: var(--gdp-radius-lg);
  background: linear-gradient(135deg, var(--gdp-surface-raised), var(--gdp-surface));
  box-shadow: var(--gdp-shadow-sm);
}

.discovery-search-card h2,
.discovery-section h2 {
  margin: 0;
  color: var(--gdp-text-strong);
  letter-spacing: -0.025em;
}

.discovery-search-card p,
.discovery-section__heading > p {
  max-width: 62ch;
  margin: 0.45rem 0 0;
  color: var(--gdp-muted);
  line-height: 1.55;
}

/* Search is an enhancement. Keep the hub a useful link directory without JS. */
.discovery-search-card__action {
  display: none;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.65rem;
  min-height: 46px;
  padding: 0.75rem 1rem;
  border: 1px solid var(--gdp-action-bg);
  border-radius: 999px;
  background: var(--gdp-action-bg);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform var(--gdp-transition), box-shadow var(--gdp-transition), opacity var(--gdp-transition);
}

.gdp-js .discovery-search-card__action {
  display: inline-flex;
}

.discovery-search-card__action:hover {
  background: var(--gdp-action-hover);
  transform: translateY(-1px);
  box-shadow: var(--gdp-shadow-sm);
}

.discovery-search-card__action:focus-visible,
.discovery-card:focus-visible,
.stance-index__item:focus-visible {
  outline: 3px solid var(--gdp-focus);
  outline-offset: 3px;
}

.discovery-section {
  width: 100%;
  margin-top: clamp(2.5rem, 4vw, 3.5rem);
}

.discovery-section__heading {
  max-width: var(--gdp-reading-measure);
  margin-bottom: 1.5rem;
}

.discovery-section__heading--split {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(280px, 1.2fr);
  gap: 2rem;
  align-items: end;
  max-width: none;
}

.discovery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.discovery-card {
  position: relative;
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: start;
  min-height: 176px;
  padding: 1.25rem;
  border: 1px solid var(--gdp-border);
  border-radius: var(--gdp-radius-lg);
  background: var(--gdp-surface);
  color: inherit;
  text-decoration: none;
  box-shadow: var(--gdp-shadow-sm);
  transition: border-color var(--gdp-transition), transform var(--gdp-transition), box-shadow var(--gdp-transition);
}

.discovery-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--gdp-brand) 42%, var(--gdp-border));
  box-shadow: var(--gdp-shadow-lg);
}

.discovery-card__mark {
  display: grid;
  place-items: start center;
  width: 88px;
  height: 88px;
  flex: 0 0 88px;
  border-radius: 0;
  background: transparent;
  color: var(--gdp-icon);
  padding-top: 0;
  transition: transform var(--gdp-transition);
}

.discovery-card__icon {
  display: block;
  width: 72px;
  height: 72px;
  overflow: visible;
  opacity: 1;
}

.technical-icon__solid,
.technical-icon__solid * {
  shape-rendering: geometricPrecision;
}

.discovery-icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}

.discovery-card:hover .discovery-card__mark {
  transform: scale(1.04);
}

.discovery-card__content {
  display: grid;
  gap: 0.6rem;
}

.discovery-card__content strong {
  color: var(--gdp-text-strong);
  font-size: 1.15rem;
}

.discovery-card__content > span {
  color: var(--gdp-muted);
  line-height: 1.55;
}

.discovery-card__arrow {
  color: var(--gdp-brand);
  font-size: 1.2rem;
  transition: transform var(--gdp-transition);
}

.discovery-card:hover .discovery-card__arrow {
  transform: translateX(2px);
}

.discovery-section--dachi {
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border: 1px solid var(--gdp-border);
  border-radius: var(--gdp-radius-lg);
  background: var(--gdp-bg-soft);
}

.stance-index {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
  margin-top: 1.5rem;
}

.stance-index__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 48px;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--gdp-border-subtle);
  border-radius: var(--gdp-radius-md);
  background: var(--gdp-surface);
  color: var(--gdp-text-strong);
  text-decoration: none;
  transition: border-color var(--gdp-transition), background var(--gdp-transition);
}

.stance-index__item:hover {
  border-color: var(--gdp-border);
  background: var(--gdp-surface-raised);
}

.stance-index__item span:last-child {
  color: var(--gdp-brand);
}

/* The hub uses the full canvas below the cards instead of collapsing back to a
   single reading column. Both editorial columns start with the same heading
   hierarchy so the close reads as one coherent two-column section. */
.discovery-editorial {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  column-gap: clamp(3rem, 6vw, 6rem);
  align-items: start;
  margin: clamp(3rem, 6vw, 5rem) 0 0;
  padding-top: clamp(2rem, 4vw, 3rem);
  border-top: 1px solid var(--gdp-border-subtle);
}

.discovery-editorial > h2 {
  margin: 0 0 1.2rem;
  padding-top: 0;
  border-top: 0;
  color: var(--gdp-text-strong);
  letter-spacing: -0.025em;
}

.discovery-editorial > h2:first-child {
  grid-column: 1;
  grid-row: 1;
}

.discovery-editorial > h2:first-child + p {
  grid-column: 1;
  grid-row: 2;
  max-width: 54ch;
  margin: 0;
}

.discovery-editorial > h2:not(:first-child) {
  grid-column: 2;
  grid-row: 1;
}

.discovery-editorial > h2:not(:first-child) ~ p {
  grid-column: 2;
  max-width: 62ch;
}

@media (max-width: 1040px) {
  .discovery-main {
    width: min(calc(100% - 2rem), 960px);
    padding-block: 2.8rem 5rem;
  }

  .discovery-hero,
  .discovery-editorial {
    width: min(100%, 74ch);
  }

  .discovery-editorial {
    display: block;
  }

  .discovery-editorial > h2:first-child + p,
  .discovery-editorial > h2:not(:first-child) ~ p {
    max-width: none;
  }

  .discovery-editorial > h2:not(:first-child) {
    margin-top: 2.75rem;
  }
}

@media (max-width: 900px) {
  .discovery-grid,
  .stance-index {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .discovery-section__heading--split {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
}

@media (max-width: 640px) {
  .discovery-main {
    width: calc(100% - 1.2rem);
    padding-block: 2.1rem 4rem;
  }

  .discovery-search-card {
    align-items: stretch;
    flex-direction: column;
  }

  .gdp-js .discovery-search-card__action {
    justify-content: center;
    width: 100%;
  }

  .discovery-grid,
  .stance-index {
    grid-template-columns: 1fr;
  }

  .discovery-card {
    min-height: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .discovery-search-card__action,
  .discovery-card,
  .discovery-card__mark,
  .discovery-card__arrow {
    transition: none;
  }
}

.family-main {
  width: min(calc(100% - 4rem), var(--gdp-page-max));
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 760px) var(--gdp-outline-width);
  justify-content: center;
  column-gap: clamp(2rem, 2.8vw, 3.2rem);
  padding-block: clamp(3rem, 5vw, 5rem) 6rem;
}

/* Family openers do not render the article context sidebar. Keep the canonical
   reading column and real TOC together instead of reserving an empty left rail. */
.family-editorial {
  grid-column: 1;
  grid-row: 1;
  width: min(100%, var(--gdp-reading-measure));
  margin-inline: 0;
}

.family-outline-panel {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
}

.family-outline-panel .page-outline {
  position: sticky;
  top: calc(var(--gdp-header-height) + 1.75rem);
  max-height: calc(100vh - var(--gdp-header-height) - 3.5rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--gdp-border) transparent;
}

.family-outline-compact {
  display: none;
}

/* Discovery is the family-level navigation surface. Two- and three-group
   families should both use the available desktop width without leaving a
   visually empty reserved column. Collections still span the full row below. */
.family-discovery {
  grid-column: 1 / -1;
  grid-row: 2;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: clamp(1.5rem, 2.8vw, 2.5rem);
  margin: clamp(3rem, 6vw, 5rem) 0 0;
  padding-top: clamp(2rem, 4vw, 3rem);
  border-top: 1px solid var(--gdp-border);
}

.family-discovery__section {
  min-width: 0;
}

.family-discovery__section--collection {
  grid-column: 1 / -1;
  margin-top: clamp(0.5rem, 1.5vw, 1.25rem);
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid var(--gdp-border);
  border-radius: var(--gdp-radius-lg);
  background: var(--gdp-bg-soft);
}

.family-discovery__heading {
  max-width: var(--gdp-reading-measure);
  margin-bottom: 1.25rem;
}

.family-discovery__heading h2 {
  margin: 0;
  color: var(--gdp-text-strong);
  font-size: clamp(1.55rem, 2.5vw, 2rem);
  line-height: 1.16;
  letter-spacing: -0.025em;
}

.family-discovery__heading p {
  margin: 0.55rem 0 0;
  color: var(--gdp-muted);
  line-height: 1.6;
}

.family-link-grid,
.family-reference-index {
  display: grid;
  gap: 0.75rem;
}

.family-link-grid {
  grid-template-columns: 1fr;
}

.family-reference-index {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.family-reference-index > [role="listitem"] {
  display: flex;
}

.family-reference-index__item {
  flex: 1;
}

.family-link-card,
.family-reference-index__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 48px;
  padding: 0.82rem 0.95rem;
  border: 1px solid var(--gdp-border-subtle);
  border-radius: var(--gdp-radius-md);
  background: var(--gdp-surface);
  color: var(--gdp-text-strong);
  text-decoration: none;
  line-height: 1.4;
  transition: border-color var(--gdp-transition), background var(--gdp-transition), transform var(--gdp-transition);
}

.family-link-card:hover,
.family-reference-index__item:hover {
  border-color: var(--gdp-border);
  background: var(--gdp-surface-raised);
  transform: translateY(-1px);
}

.family-link-card:focus-visible,
.family-reference-index__item:focus-visible {
  outline: 3px solid var(--gdp-focus);
  outline-offset: 3px;
}

.family-link-card span:last-child,
.family-reference-index__item span:last-child {
  flex: 0 0 auto;
  color: var(--gdp-brand);
}

@media (max-width: 1120px) {
  .family-main {
    grid-template-columns: minmax(0, 760px);
    max-width: 880px;
  }

  .family-outline-panel {
    display: none;
  }

  .family-outline-compact {
    grid-column: 1;
    grid-row: 1;
    display: block;
    width: min(100%, var(--gdp-reading-measure));
    margin-bottom: 1.5rem;
    border-top: 1px solid var(--gdp-border-subtle);
    border-bottom: 1px solid var(--gdp-border-subtle);
  }

  .family-outline-compact > summary {
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    list-style: none;
    cursor: pointer;
    color: var(--gdp-text-strong);
    font-size: 0.86rem;
    font-weight: 680;
  }

  .family-outline-compact > summary::-webkit-details-marker {
    display: none;
  }

  .family-outline-compact__meta {
    color: var(--gdp-muted);
    font-weight: 520;
  }

  .family-outline-compact__panel {
    padding: 0.25rem 0 1rem;
  }

  .family-editorial {
    grid-column: 1;
    grid-row: 2;
  }

  .family-discovery {
    grid-column: 1;
    grid-row: 3;
  }
}

@media (max-width: 1040px) {
  .family-main {
    width: min(calc(100% - 3rem), 880px);
    display: block;
    padding-block: 2.8rem 5rem;
  }

  .family-outline-compact,
  .family-editorial {
    width: min(100%, 74ch);
    margin-inline: auto;
  }

  .family-discovery {
    width: 100%;
    margin-inline: auto;
  }

  .family-outline-compact {
    margin-bottom: 1.5rem;
  }
}

@media (max-width: 900px) {
  .family-discovery {
    grid-template-columns: 1fr;
  }

  .family-discovery__section--collection {
    grid-column: 1;
  }

  .family-link-grid,
  .family-reference-index {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .family-main {
    width: calc(100% - 2rem);
    padding-block: 2.35rem 4rem;
  }

  .family-link-grid,
  .family-reference-index {
    grid-template-columns: 1fr;
  }

  .family-discovery__section--collection {
    padding: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .family-link-card,
  .family-reference-index__item {
    transition: none;
  }
}

.grading-discovery-main {
  width: min(calc(100% - 3rem), var(--gdp-page-max));
  margin-inline: auto;
  padding-block: clamp(2.5rem, 4vw, 4rem) 6rem;
}

.grading-hero {
  display: grid;
  gap: 1rem;
  width: min(100%, 960px);
}

.grading-hero h1 {
  max-width: 14ch;
  margin: 0;
  font-size: clamp(2.4rem, 6vw, 5rem);
  line-height: .98;
  letter-spacing: -.045em;
  color: var(--gdp-text-strong);
}

.grading-hero__lead {
  max-width: 68ch;
  margin: 0;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  line-height: 1.65;
  color: var(--gdp-muted-strong);
}

.grading-chooser,
.grading-guidance {
  width: 100%;
  margin-top: clamp(3rem, 6vw, 5rem);
}

.grading-section-heading {
  max-width: var(--gdp-reading-measure);
  margin-bottom: 1.5rem;
}

.grading-section-heading h2,
.grading-level-group h3 {
  margin: 0;
  color: var(--gdp-text-strong);
}

.grading-section-heading h2 {
  font-size: clamp(1.6rem, 3vw, 2.35rem);
  letter-spacing: -.025em;
}

.grading-section-heading--split {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(280px, 1.2fr);
  gap: 2rem;
  align-items: end;
  max-width: none;
}

.grading-section-heading--split p {
  max-width: 62ch;
  margin: 0;
  color: var(--gdp-muted);
  line-height: 1.65;
}

.grading-level-group + .grading-level-group {
  margin-top: 2rem;
}

.grading-level-group h3 {
  margin-bottom: .8rem;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--gdp-muted-strong);
}

.grading-level-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1rem;
}

.grading-level-grid--dan {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grading-level-card {
  --grading-belt-color: #72757c;
  --grading-belt-edge: rgba(18, 20, 23, .28);
  --grading-belt-kyu-mark: #15171b;
  --grading-belt-dan-mark: #d4ad3d;
  min-height: 96px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .9rem 1.1rem .9rem .95rem;
  border: 1px solid var(--gdp-border);
  border-radius: var(--gdp-radius-md);
  background: var(--gdp-surface);
  color: var(--gdp-text-strong);
  text-decoration: none;
  font-weight: 700;
  box-shadow: var(--gdp-shadow-sm);
  transition: transform var(--gdp-transition), border-color var(--gdp-transition), box-shadow var(--gdp-transition);
}

.grading-level-card__identity {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: .95rem;
}

.grading-level-card__label {
  white-space: nowrap;
}

.grading-level-card__arrow {
  flex: 0 0 auto;
  color: var(--gdp-muted-strong);
  font-size: 1.05rem;
  transition: transform var(--gdp-transition), color var(--gdp-transition);
}

.grading-belt {
  width: 84px;
  height: 54px;
  flex: 0 0 84px;
  overflow: visible;
  filter: drop-shadow(0 4px 5px rgba(0, 0, 0, .16));
}

.grading-belt__shape {
  fill: var(--grading-belt-color);
  stroke: var(--grading-belt-edge);
  stroke-width: .9;
  vector-effect: non-scaling-stroke;
}

.grading-belt__shadow {
  fill: rgba(0, 0, 0, .18);
  pointer-events: none;
}

.grading-belt__highlight {
  fill: none;
  stroke: rgba(255, 255, 255, .28);
  stroke-width: 1.15;
  stroke-linecap: round;
  opacity: .75;
  pointer-events: none;
}

.grading-belt__kyu-mark,
.grading-belt__dan-bar {
  opacity: 0;
  pointer-events: none;
}

.grading-belt__kyu-mark,
.grading-belt__dan-bar {
  fill: none;
  stroke-linecap: round;
}

.grading-belt__kyu-mark {
  stroke: var(--grading-belt-kyu-mark);
  stroke-width: 2.6;
}

.grading-belt__dan-bar {
  stroke: var(--grading-belt-dan-mark);
  stroke-width: 3.4;
}

/* Presentation mapping is intentionally keyed by stable grading IDs. Labels
   and routes remain authoritative IA projections; only visual treatment lives here. */
.grading-level-card--grade-10-kyu,
.grading-level-card--grade-09-kyu {
  --grading-belt-color: #e87822;
}

.grading-level-card--grade-08-kyu,
.grading-level-card--grade-07-kyu {
  --grading-belt-color: #2768c8;
}

.grading-level-card--grade-06-kyu,
.grading-level-card--grade-05-kyu {
  --grading-belt-color: #dcb42c;
}

.grading-level-card--grade-04-kyu,
.grading-level-card--grade-03-kyu {
  --grading-belt-color: #238151;
}

.grading-level-card--grade-02-kyu,
.grading-level-card--grade-01-kyu {
  --grading-belt-color: #79503a;
}

.grading-level-card--grade-shodan,
.grading-level-card--grade-nidan,
.grading-level-card--grade-sandan {
  --grading-belt-color: #292b30;
  --grading-belt-edge: rgba(255, 255, 255, .2);
}

.grading-level-card--grade-09-kyu .grading-belt__kyu-mark,
.grading-level-card--grade-07-kyu .grading-belt__kyu-mark,
.grading-level-card--grade-05-kyu .grading-belt__kyu-mark,
.grading-level-card--grade-03-kyu .grading-belt__kyu-mark,
.grading-level-card--grade-01-kyu .grading-belt__kyu-mark {
  opacity: 1;
}

.grading-level-card--grade-nidan .grading-belt__dan-bar--1,
.grading-level-card--grade-nidan .grading-belt__dan-bar--2,
.grading-level-card--grade-sandan .grading-belt__dan-bar--1,
.grading-level-card--grade-sandan .grading-belt__dan-bar--2,
.grading-level-card--grade-sandan .grading-belt__dan-bar--3 {
  opacity: 1;
}

.grading-level-card--dan {
  min-height: 104px;
  font-size: 1.05rem;
}

.grading-level-card:hover {
  transform: translateY(-2px);
  border-color: var(--gdp-muted);
  box-shadow: var(--gdp-shadow-lg);
}

.grading-level-card:hover .grading-level-card__arrow {
  transform: translateX(2px);
  color: var(--gdp-brand);
}

.grading-level-card:focus-visible,
.grading-guidance-card:focus-visible {
  outline: 3px solid var(--gdp-focus);
  outline-offset: 3px;
}

.grading-guidance-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.grading-guidance-card {
  min-height: 132px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.35rem;
  border: 1px solid var(--gdp-border);
  border-radius: var(--gdp-radius-lg);
  background: var(--gdp-surface);
  color: var(--gdp-text-strong);
  text-decoration: none;
  box-shadow: var(--gdp-shadow-sm);
  transition: transform var(--gdp-transition), border-color var(--gdp-transition), box-shadow var(--gdp-transition);
}

.grading-guidance-card:hover {
  transform: translateY(-2px);
  border-color: var(--gdp-muted);
  box-shadow: var(--gdp-shadow-lg);
}

.grading-guidance-card__content {
  display: grid;
  gap: .45rem;
}

.grading-guidance-card__content strong {
  font-size: 1.05rem;
}

.grading-guidance-card__content span {
  color: var(--gdp-muted);
  line-height: 1.55;
}

.grading-guidance-card__arrow {
  flex: 0 0 auto;
  color: var(--gdp-brand);
  font-size: 1.15rem;
}

/* Keep the Gradering close on the same wide discovery canvas used by the
   Technical Library hub. The titled orientation block anchors the left
   column while the progression guidance reads down the right column. */
.grading-editorial {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  column-gap: clamp(3rem, 6vw, 6rem);
  align-items: start;
  margin: clamp(3rem, 6vw, 5rem) 0 0;
  padding-top: clamp(2rem, 4vw, 3rem);
  border-top: 1px solid var(--gdp-border-subtle);
}

.grading-editorial > h2:first-of-type,
.grading-editorial > p:first-of-type {
  grid-column: 1;
  max-width: 54ch;
}

.grading-editorial > h2:not(:first-of-type),
.grading-editorial > p:not(:first-of-type) {
  grid-column: 2;
}

.grading-editorial > h2 {
  margin: 0 0 1.2rem;
  padding-top: 0;
  border-top: 0;
  color: var(--gdp-text-strong);
  letter-spacing: -.025em;
}

.grading-editorial > h2:first-of-type,
.grading-editorial > h2:nth-of-type(2) {
  margin-top: 0;
}

.grading-editorial > h2:nth-of-type(n + 3) {
  margin-top: 2.75rem;
}

.grading-editorial > p:first-of-type {
  margin-top: 0;
}

.grading-editorial > p:not(:first-of-type) {
  max-width: 62ch;
}

@media (max-width: 1040px) {
  .grading-discovery-main {
    width: min(calc(100% - 2rem), 960px);
    padding-block: 2.8rem 5rem;
  }

  .grading-hero,
  .grading-editorial {
    width: min(100%, 74ch);
  }

  .grading-editorial {
    display: block;
  }

  .grading-editorial > p {
    max-width: none;
  }

  .grading-editorial > h2 {
    margin: 2.75rem 0 1.2rem;
  }

  .grading-editorial > h2:first-of-type {
    margin-top: 0;
  }
}

@media (max-width: 900px) {
  .grading-level-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grading-level-grid--dan {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .grading-section-heading--split {
    grid-template-columns: 1fr;
    gap: .75rem;
  }
}

@media (max-width: 640px) {
  .grading-discovery-main {
    width: calc(100% - 1.2rem);
    padding-block: 2.1rem 4rem;
  }

  .grading-level-grid,
  .grading-level-grid--dan,
  .grading-guidance-grid {
    grid-template-columns: 1fr;
  }

  .grading-level-card,
  .grading-level-card--dan {
    min-height: 70px;
  }

  .grading-belt {
    width: 72px;
    height: 46px;
    flex-basis: 72px;
  }

  .grading-guidance-card {
    min-height: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .grading-level-card,
  .grading-level-card__arrow,
  .grading-guidance-card {
    transition: none;
  }
}
