:root {
  --method-paper: #f7f6f4;
  --method-paper-deep: #efeeeb;
  --method-white: #ffffff;
  --method-ink: #090a0c;
  --method-muted: #60646d;
  --method-line: #dededb;
  --method-navy: #34405d;
  --method-navy-deep: #29334d;
  --method-orange: #df6042;
  --method-orange-soft: #f5e5df;
  --method-blue-soft: #e6edf6;
}

html {
  scroll-behavior: smooth;
}

body.subpage {
  color: var(--method-ink);
  background: var(--method-paper);
  font-family: "Manrope", sans-serif;
  font-feature-settings: "ss01", "ss02", "cv11";
}

.subpage .container {
  width: calc(100% - 96px);
  max-width: 1152px;
}

.subpage h1,
.subpage h2,
.subpage h3 {
  font-family: "Manrope", sans-serif;
  text-wrap: balance;
}

.subpage p,
.subpage li {
  text-wrap: pretty;
}

.subpage-header {
  position: sticky;
  top: 22px;
  z-index: 100;
  width: calc(100% - 96px);
  max-width: 1152px;
  margin: 28px auto -102px;
  color: var(--method-ink);
  border: 1px solid rgba(255, 255, 255, .92);
  border-radius: 999px;
  background: rgba(255, 255, 255, .86);
  box-shadow: 0 14px 36px rgba(32, 37, 51, .10);
  backdrop-filter: blur(20px) saturate(130%);
  transform-origin: top center;
  transition:
    top .35s cubic-bezier(.22, .8, .3, 1),
    transform .35s cubic-bezier(.22, .8, .3, 1),
    background-color .35s ease,
    box-shadow .35s ease;
}

.subpage-header.is-scrolled {
  top: 12px;
  background: rgba(255, 255, 255, .95);
  box-shadow: 0 18px 42px rgba(32, 37, 51, .14);
  transform: translateY(-8px) scale(.985);
}

.subpage-header .container {
  width: 100%;
  max-width: none;
}

.subpage-header .header-inner {
  min-height: 70px;
  padding: 0 26px 0 30px;
}

.subpage-header .brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--method-ink);
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  letter-spacing: .02em;
  text-decoration: none;
  white-space: nowrap;
}

.subpage-header .brand-mark {
  width: 27px;
  height: 30px;
  object-fit: contain;
  flex: 0 0 auto;
}

.subpage-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.method-language {
  position: relative;
}

.method-language-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-width: 66px;
  height: 40px;
  padding: 0 13px;
  color: var(--method-white);
  border: 0;
  border-radius: 999px;
  background: var(--method-navy);
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  cursor: pointer;
  transition: background-color .2s ease, transform .2s ease;
}

.method-language-trigger:hover {
  background: var(--method-orange);
  transform: translateY(-1px);
}

.method-language-trigger svg {
  width: 10px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  transition: transform .2s ease;
}

.method-language.is-open .method-language-trigger svg {
  transform: rotate(180deg);
}

.method-language-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 20;
  width: 176px;
  padding: 7px;
  border: 1px solid rgba(52, 64, 93, .09);
  border-radius: 15px;
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 18px 42px rgba(32, 37, 51, .16);
  backdrop-filter: blur(18px);
}

.method-language-menu button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 42px;
  padding: 0 11px;
  color: var(--method-muted);
  border: 0;
  border-radius: 10px;
  background: transparent;
  font-family: "Manrope", sans-serif;
  font-size: 13px;
  cursor: pointer;
  transition: color .2s ease, background-color .2s ease;
}

.method-language-menu button:hover,
.method-language-menu button[aria-selected="true"] {
  color: var(--method-ink);
  background: var(--method-orange-soft);
}

.method-language-menu small {
  color: var(--method-orange);
  font-family: "IBM Plex Mono", monospace;
  font-size: 9px;
}

.subpage-back {
  padding: 12px 17px;
  color: var(--method-ink);
  border-radius: 999px;
  background: var(--method-paper);
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  transition: color .2s ease, background-color .2s ease, transform .2s ease;
}

.subpage-back:hover {
  color: var(--method-white);
  background: var(--method-orange);
  transform: translateY(-1px);
}

.document-hero {
  padding: 190px 0 108px;
  color: var(--method-ink);
  background: var(--method-paper);
}

.document-hero h1 {
  max-width: 900px;
  margin: 0;
  color: var(--method-ink);
  font-size: clamp(52px, 5.8vw, 76px);
  font-weight: 500;
  letter-spacing: -.055em;
  line-height: 1.02;
}

.document-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: 72px;
  align-items: start;
  margin-top: 66px;
  padding-top: 0;
  border: 0;
}

.document-intro > p {
  max-width: 610px;
  margin: 0;
  color: var(--method-muted);
  font-size: 18px;
  line-height: 1.72;
}

.document-intro dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.document-intro dl div {
  min-height: 96px;
  padding: 18px;
  border: 0;
  border-radius: 14px;
  background: var(--method-white);
  box-shadow: inset 0 0 0 1px rgba(52, 64, 93, .07);
}

.document-intro dt {
  color: var(--method-orange);
  font-family: "IBM Plex Mono", monospace;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: .1em;
}

.document-intro dd {
  margin: 13px 0 0;
  color: var(--method-ink);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}

.document-body {
  margin: 0 24px 24px;
  padding: 112px 0 130px;
  border-radius: 38px;
  background: var(--method-white);
}

.document-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 82px;
  max-width: 1152px;
  justify-content: stretch;
}

.document-toc {
  position: sticky;
  top: 118px;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 24px;
  border: 0;
  border-radius: 20px;
  background: var(--method-paper);
}

.document-toc p {
  margin: 0 0 14px;
  color: var(--method-orange);
  font-family: "IBM Plex Mono", monospace;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: .13em;
}

.document-toc a {
  position: relative;
  padding: 10px 11px;
  color: var(--method-muted);
  border-radius: 9px;
  font-size: 11px;
  line-height: 1.4;
  transition: color .2s ease, background-color .2s ease, transform .2s ease;
}

.document-toc a:hover {
  color: var(--method-ink);
  background: var(--method-white);
  transform: translateX(2px);
}

.document-toc a.is-active {
  color: #b84b33;
  background: var(--method-orange-soft);
}

.document-content {
  min-width: 0;
}

.document-content section {
  scroll-margin-top: 120px;
  padding: 0 0 78px;
  margin: 0 0 78px;
  border-bottom: 1px solid var(--method-line);
}

.document-content section:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

.document-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 26px;
  margin-bottom: 18px;
  padding: 0 9px;
  color: #b84b33;
  border-radius: 7px;
  background: var(--method-orange-soft);
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .08em;
}

.document-content h2 {
  max-width: 790px;
  margin: 0 0 30px;
  color: var(--method-ink);
  font-size: clamp(34px, 3.7vw, 48px);
  font-weight: 500;
  letter-spacing: -.045em;
  line-height: 1.08;
}

.document-content p {
  max-width: 790px;
  color: var(--method-muted);
  font-size: 16px;
  line-height: 1.78;
}

.document-content ul {
  display: grid;
  gap: 8px;
  margin: 28px 0;
  padding: 0;
}

.document-content li {
  position: relative;
  padding: 15px 18px 15px 44px;
  color: #484d56;
  border: 0;
  border-radius: 11px;
  background: var(--method-paper);
  line-height: 1.55;
}

.document-content li::before {
  top: 16px;
  left: 17px;
  color: var(--method-orange);
  content: "↗";
}

.document-callout {
  margin: 34px 0;
  padding: 28px 30px;
  border: 0;
  border-left: 4px solid var(--method-orange);
  border-radius: 0 16px 16px 0;
  background: var(--method-blue-soft);
}

.document-callout strong {
  color: var(--method-navy);
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  font-weight: 500;
}

.document-callout p {
  margin: 10px 0 0;
  font-size: 14px;
}

.maturity-table {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 38px 0;
  border: 0;
}

.maturity-table > div {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-content: start;
  align-items: center;
  min-height: 150px;
  padding: 22px;
  border: 0;
  border-radius: 16px;
  background: var(--method-blue-soft);
}

.maturity-table > div:nth-child(4) {
  color: var(--method-white);
  background: var(--method-navy);
}

.maturity-table span {
  color: var(--method-orange);
  font-family: "IBM Plex Mono", monospace;
  font-size: 19px;
}

.maturity-table strong {
  color: inherit;
  font-size: 11px;
  line-height: 1.35;
}

.maturity-table p {
  grid-column: 2;
  margin: 12px 0 0;
  color: var(--method-muted);
  font-size: 13px;
  line-height: 1.55;
}

.maturity-table > div:nth-child(4) p {
  color: rgba(255, 255, 255, .68);
}

.document-footer {
  margin: 0 24px 24px;
  color: var(--method-white);
  border-radius: 32px;
  background: #111318;
}

.document-footer .container {
  min-height: 112px;
  color: rgba(255, 255, 255, .52);
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
}

.document-footer a {
  color: #f19a83;
}

@media (max-width: 900px) {
  .subpage .container {
    width: calc(100% - 48px);
  }

  .subpage-header {
    width: calc(100% - 40px);
  }

  .document-intro {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }

  .document-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 58px;
  }

  .document-toc {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .document-toc p {
    grid-column: 1 / -1;
  }
}

@media (max-width: 600px) {
  .subpage .container {
    width: calc(100% - 32px);
  }

  .subpage-header {
    top: 10px;
    width: calc(100% - 20px);
    margin-top: 10px;
    margin-bottom: -88px;
    border-radius: 24px;
  }

  .subpage-header .header-inner {
    min-height: 66px;
    padding: 0 13px 0 16px;
  }

  .subpage-header .brand {
    max-width: 142px;
    font-size: 9px;
    line-height: 1.2;
  }

  .subpage-header .brand-mark {
    width: 24px;
    height: 27px;
  }

  .subpage-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    overflow: hidden;
    font-size: 0;
  }

  .subpage-back::before {
    content: "←";
    font-size: 16px;
  }

  .method-language-trigger {
    min-width: 58px;
    height: 40px;
    padding: 0 11px;
  }

  .document-hero {
    padding: 150px 0 78px;
  }

  .document-hero h1 {
    font-size: clamp(42px, 13vw, 58px);
  }

  .document-intro {
    margin-top: 46px;
  }

  .document-intro dl {
    grid-template-columns: minmax(0, 1fr);
  }

  .document-body {
    margin: 0 8px 8px;
    padding: 75px 0 88px;
    border-radius: 25px;
  }

  .document-toc {
    grid-template-columns: minmax(0, 1fr);
    padding: 18px;
  }

  .document-content section {
    padding-bottom: 58px;
    margin-bottom: 58px;
  }

  .document-content h2 {
    font-size: 34px;
  }

  .document-content p {
    font-size: 15px;
    line-height: 1.72;
  }

  .maturity-table {
    grid-template-columns: minmax(0, 1fr);
  }

  .document-footer {
    margin: 0 8px 8px;
    border-radius: 24px;
  }

  .document-footer .container {
    min-height: 140px;
    flex-direction: column;
    justify-content: center;
    gap: 18px;
    text-align: center;
  }
}

@media print {
  .subpage-header {
    position: static;
    width: 100%;
    margin: 0;
    box-shadow: none;
  }

  .document-body,
  .document-footer {
    margin: 0;
    border-radius: 0;
  }
}
