:root {
  --ink: #171714;
  --ink-soft: #34342f;
  --paper: #f0ede4;
  --paper-light: #f7f4eb;
  --line: rgba(23, 23, 20, 0.18);
  --line-dark: rgba(240, 237, 228, 0.2);
  --gold: #b99864;
  --gold-light: #d3bc94;
  --cinnabar: #a5472d;
  --jade: #264f46;
  --serif: "Songti SC", "STSong", "Noto Serif CJK SC", serif;
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --display: "Bodoni 72", "Didot", "Times New Roman", serif;
  --max: 1440px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--ink);
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

body.reader-open {
  overflow: hidden;
}

button,
input {
  font: inherit;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  color: inherit;
}

::selection {
  color: var(--paper-light);
  background: var(--cinnabar);
}

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

.page-noise {
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  opacity: 0.055;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.78' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.65'/%3E%3C/svg%3E");
}

.site-header {
  position: relative;
  z-index: 10;
  width: 100%;
  height: 92px;
  padding: 0 max(32px, calc((100vw - var(--max)) / 2));
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  color: var(--paper-light);
  background: var(--ink);
  border-bottom: 1px solid var(--line-dark);
}

.brand {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  color: var(--ink);
  background: var(--gold-light);
  font-family: var(--display);
  font-size: 26px;
  line-height: 1;
  border-radius: 50%;
}

.brand strong {
  display: block;
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.16em;
}

.brand small {
  display: block;
  margin-top: 3px;
  color: rgba(247, 244, 235, 0.55);
  font-family: var(--display);
  font-size: 9px;
  letter-spacing: 0.22em;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 36px;
  color: rgba(247, 244, 235, 0.68);
  font-size: 13px;
  letter-spacing: 0.08em;
}

.main-nav a,
.header-cta,
.text-action,
.closing-section a {
  transition: color 180ms ease, opacity 180ms ease;
}

.main-nav a:hover,
.header-cta:hover,
.text-action:hover {
  color: var(--gold-light);
}

.header-cta {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  letter-spacing: 0.08em;
}

.header-cta span {
  color: var(--gold-light);
  font-size: 17px;
}

.hero {
  position: relative;
  min-height: 920px;
  height: 100svh;
  padding: 136px max(32px, calc((100vw - var(--max)) / 2)) 42px;
  overflow: hidden;
  color: var(--paper-light);
  background:
    radial-gradient(circle at 70% 42%, rgba(185, 152, 100, 0.15), transparent 24%),
    linear-gradient(118deg, #181814 0%, #20211d 54%, #121310 100%);
  display: flex;
  flex-direction: column;
}

.hero-grid {
  position: absolute;
  inset: 0;
  opacity: 0.13;
  background-image:
    linear-gradient(rgba(240, 237, 228, 0.22) 1px, transparent 1px),
    linear-gradient(90deg, rgba(240, 237, 228, 0.22) 1px, transparent 1px);
  background-size: 120px 120px;
  mask-image: linear-gradient(90deg, transparent, #000 35%, #000 75%, transparent);
}

.hero-grid::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--ink) 0%, transparent 40%, transparent 78%, var(--ink) 100%);
}

.hero-orbit {
  position: absolute;
  border: 1px solid rgba(211, 188, 148, 0.18);
  border-radius: 50%;
  pointer-events: none;
}

.orbit-one {
  width: min(56vw, 820px);
  aspect-ratio: 1;
  right: -8vw;
  top: 10%;
}

.orbit-two {
  width: min(36vw, 520px);
  aspect-ratio: 1;
  right: 3vw;
  top: 21%;
}

.orbit-two::before,
.orbit-two::after {
  content: "";
  position: absolute;
  width: 7px;
  aspect-ratio: 1;
  background: var(--gold-light);
  border-radius: 50%;
  box-shadow: 0 0 0 8px rgba(211, 188, 148, 0.08);
}

.orbit-two::before {
  left: 12%;
  top: 14%;
}

.orbit-two::after {
  right: 5%;
  bottom: 22%;
}

.hero-kicker {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  color: rgba(247, 244, 235, 0.36);
  font-family: var(--display);
  font-size: 10px;
  letter-spacing: 0.25em;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 100px;
  align-items: center;
}

.hero-copy {
  max-width: 900px;
}

.eyebrow {
  margin: 0 0 22px;
  color: var(--cinnabar);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: var(--gold-light);
}

.hero h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(72px, 8.6vw, 144px);
  font-weight: 400;
  letter-spacing: -0.065em;
  line-height: 0.92;
}

.hero h1 em {
  position: relative;
  color: var(--gold-light);
  font-style: normal;
}

.hero h1 em::after {
  content: "";
  position: absolute;
  right: -72px;
  top: 52%;
  width: 54px;
  height: 1px;
  background: var(--gold-light);
}

.hero-intro {
  max-width: 650px;
  margin: 42px 0 0;
  color: rgba(247, 244, 235, 0.68);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.95;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 32px;
  margin-top: 38px;
}

.primary-action {
  min-width: 176px;
  padding: 17px 20px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  color: var(--ink);
  background: var(--gold-light);
  font-size: 13px;
  letter-spacing: 0.08em;
  transition: background 180ms ease, transform 180ms ease;
}

.primary-action:hover {
  background: var(--paper-light);
  transform: translateY(-2px);
}

.text-action {
  padding-bottom: 5px;
  color: rgba(247, 244, 235, 0.62);
  font-size: 13px;
  border-bottom: 1px solid rgba(247, 244, 235, 0.25);
}

.hero-aside {
  align-self: end;
  margin-bottom: 74px;
}

.index-card {
  min-height: 250px;
  padding: 28px;
  border: 1px solid var(--line-dark);
  background: rgba(23, 23, 20, 0.26);
  backdrop-filter: blur(6px);
}

.index-label {
  color: rgba(247, 244, 235, 0.4);
  font-family: var(--display);
  font-size: 9px;
  letter-spacing: 0.24em;
}

.index-figure {
  margin-top: 34px;
  color: var(--gold-light);
  font-family: var(--display);
  font-size: 98px;
  line-height: 0.85;
}

.index-card p {
  margin: 30px 0 0;
  color: rgba(247, 244, 235, 0.56);
  font-family: var(--serif);
  font-size: 14px;
  line-height: 1.75;
}

.role-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--line-dark);
  border-top: 0;
}

.role-pair > div {
  padding: 18px;
  display: flex;
  gap: 12px;
  align-items: center;
}

.role-pair > div + div {
  border-left: 1px solid var(--line-dark);
}

.role-pair strong {
  font-family: var(--display);
  font-size: 30px;
  font-weight: 400;
}

.role-pair span {
  color: rgba(247, 244, 235, 0.4);
  font-size: 9px;
  letter-spacing: 0.12em;
  line-height: 1.5;
}

.hero-foot {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 22px;
  align-items: center;
  color: rgba(247, 244, 235, 0.34);
  font-family: var(--display);
  font-size: 9px;
  letter-spacing: 0.22em;
}

.hero-line {
  height: 1px;
  background: var(--line-dark);
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  animation: reveal 850ms cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}

.delay-1 {
  animation-delay: 100ms;
}

.delay-2 {
  animation-delay: 180ms;
}

.delay-3 {
  animation-delay: 300ms;
}

.delay-4 {
  animation-delay: 420ms;
}

@keyframes reveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.system-section,
.library-section {
  width: min(calc(100% - 64px), var(--max));
  margin: 0 auto;
}

.system-section {
  padding: 150px 0 170px;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(380px, 0.9fr) minmax(300px, 0.7fr);
  justify-content: space-between;
  align-items: end;
  column-gap: 12vw;
}

.section-heading .eyebrow {
  grid-column: 1 / -1;
}

.section-heading h2,
.library-heading h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(48px, 5.3vw, 78px);
  font-weight: 400;
  letter-spacing: -0.05em;
  line-height: 1.08;
}

.section-heading > p:last-child,
.library-note {
  max-width: 500px;
  margin: 0 0 6px;
  color: #67655e;
  font-family: var(--serif);
  font-size: 15px;
  line-height: 2;
}

.method-track {
  margin: 100px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  list-style: none;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.method-track li {
  position: relative;
  min-height: 220px;
  padding: 30px 24px;
}

.method-track li + li {
  border-left: 1px solid var(--line);
}

.method-track li::before {
  content: "";
  position: absolute;
  inset: -1px 0 auto;
  height: 3px;
  background: var(--cinnabar);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 360ms ease;
}

.method-track li:hover::before {
  transform: scaleX(1);
}

.method-track span {
  color: var(--cinnabar);
  font-family: var(--display);
  font-size: 12px;
  letter-spacing: 0.12em;
}

.method-track strong {
  display: block;
  margin-top: 50px;
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 500;
}

.method-track p {
  margin: 14px 0 0;
  color: #77746c;
  font-size: 12px;
  line-height: 1.7;
}

.role-system {
  margin-top: 110px;
  display: grid;
  grid-template-columns: 1fr 130px 1fr;
  align-items: stretch;
}

.role-panel {
  min-height: 470px;
  padding: 48px;
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 34px;
}

.role-panel-koc {
  color: var(--paper-light);
  background: var(--jade);
}

.role-panel-kos {
  color: var(--paper-light);
  background: var(--cinnabar);
}

.role-number {
  font-family: var(--display);
  font-size: 94px;
  line-height: 0.85;
  opacity: 0.3;
}

.role-caption {
  margin: 0 0 38px;
  font-size: 9px;
  letter-spacing: 0.2em;
  opacity: 0.55;
}

.role-panel h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(38px, 3.6vw, 55px);
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 1.12;
}

.role-panel h3 + p {
  max-width: 410px;
  margin: 36px 0 0;
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.95;
  opacity: 0.72;
}

.role-tags {
  margin-top: 42px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.role-tags span {
  padding: 8px 12px;
  font-size: 10px;
  letter-spacing: 0.06em;
  border: 1px solid rgba(247, 244, 235, 0.24);
  border-radius: 999px;
}

.role-bridge {
  padding: 34px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: #89867d;
  font-size: 10px;
  letter-spacing: 0.16em;
  writing-mode: vertical-rl;
}

.role-bridge i {
  width: 1px;
  height: 150px;
  background: var(--line);
}

.library-section {
  padding: 48px 0 120px;
}

.library-heading {
  display: grid;
  grid-template-columns: 1fr minmax(300px, 430px);
  gap: 10vw;
  align-items: end;
}

.library-toolbar {
  position: sticky;
  top: 0;
  z-index: 8;
  margin-top: 0;
  padding: 18px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: rgba(240, 237, 228, 0.94);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 4px;
}

.filter-button {
  padding: 11px 16px;
  color: #6f6c64;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 12px;
  letter-spacing: 0.04em;
  transition: color 180ms ease, background 180ms ease;
}

.filter-button span {
  margin-left: 5px;
  font-family: var(--display);
  opacity: 0.5;
}

.filter-button:hover,
.filter-button.is-active {
  color: var(--paper-light);
  background: var(--ink);
}

.search-box {
  width: min(420px, 44vw);
  padding: 0 12px 0 14px;
  display: flex;
  align-items: center;
  gap: 11px;
  background: var(--paper-light);
  border: 1px solid var(--line);
}

.search-box svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: #817d73;
  stroke-width: 1.5;
}

.search-box input {
  width: 100%;
  height: 44px;
  padding: 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 12px;
}

.search-box input::placeholder {
  color: #aaa69c;
}

.search-box:focus-within {
  border-color: var(--ink);
}

.search-box kbd {
  color: #a09c92;
  font-family: var(--sans);
  font-size: 10px;
  white-space: nowrap;
}

.library-status {
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 16px;
  color: #858177;
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.status-rule {
  height: 1px;
  flex: 1;
  background: var(--line);
}

#clear-search {
  padding: 0;
  color: var(--cinnabar);
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 11px;
}

.copy-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.copy-card {
  position: relative;
  min-width: 0;
  min-height: 430px;
  padding: 24px;
  text-align: left;
  background: transparent;
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: color 220ms ease;
}

.copy-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--ink);
  transform: translateY(100%);
  transition: transform 380ms cubic-bezier(0.2, 0.72, 0.2, 1);
}

.copy-card::after {
  content: "↗";
  position: absolute;
  right: 24px;
  bottom: 18px;
  color: var(--gold-light);
  font-family: var(--display);
  font-size: 22px;
  opacity: 0;
  transform: translate(-8px, 8px);
  transition: opacity 220ms ease, transform 220ms ease;
}

.copy-card:hover,
.copy-card:focus-visible {
  color: var(--paper-light);
  outline: 0;
}

.copy-card:hover::before,
.copy-card:focus-visible::before {
  transform: translateY(0);
}

.copy-card:hover::after,
.copy-card:focus-visible::after {
  opacity: 1;
  transform: translate(0, 0);
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.role-badge {
  padding: 6px 9px;
  color: var(--paper-light);
  background: var(--jade);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.12em;
}

.copy-card[data-role="KOS"] .role-badge {
  background: var(--cinnabar);
}

.card-id {
  color: #9d998e;
  font-family: var(--display);
  font-size: 10px;
  letter-spacing: 0.14em;
}

.copy-card h3 {
  margin: 58px 0 0;
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.48;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
}

.card-meta {
  margin-top: 26px;
  display: grid;
  gap: 10px;
}

.card-meta div {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 8px;
  font-size: 10px;
  line-height: 1.55;
}

.card-meta dt {
  color: #9c988e;
}

.card-meta dd {
  margin: 0;
  color: #625f58;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.copy-card:hover .card-meta dd,
.copy-card:focus-visible .card-meta dd {
  color: rgba(247, 244, 235, 0.65);
}

.copy-card:hover .card-meta dt,
.copy-card:focus-visible .card-meta dt,
.copy-card:hover .card-id,
.copy-card:focus-visible .card-id {
  color: rgba(247, 244, 235, 0.38);
}

.card-foot {
  margin-top: auto;
  padding-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #969287;
  font-size: 9px;
  letter-spacing: 0.08em;
  border-top: 1px solid var(--line);
}

.copy-card:hover .card-foot,
.copy-card:focus-visible .card-foot {
  border-color: var(--line-dark);
}

.empty-state {
  padding: 100px 24px;
  text-align: center;
  border: 1px solid var(--line);
}

.empty-state span {
  color: var(--cinnabar);
  font-family: var(--display);
  font-size: 72px;
}

.empty-state h3 {
  margin: 12px 0 0;
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 500;
}

.empty-state p {
  color: #7d796f;
  font-size: 13px;
}

.empty-state button {
  margin-top: 22px;
  padding: 12px 18px;
  color: var(--paper-light);
  background: var(--ink);
  border: 0;
  cursor: pointer;
  font-size: 12px;
}

.closing-section {
  padding: 140px max(32px, calc((100vw - var(--max)) / 2));
  color: var(--paper-light);
  background:
    radial-gradient(circle at 85% 20%, rgba(185, 152, 100, 0.18), transparent 25%),
    var(--ink);
}

.closing-section .eyebrow {
  color: var(--gold-light);
}

.closing-lead {
  max-width: 1180px;
  margin: 55px 0 0;
  font-family: var(--serif);
  font-size: clamp(38px, 5.3vw, 76px);
  letter-spacing: -0.05em;
  line-height: 1.35;
}

.closing-lead span {
  color: var(--gold-light);
}

.closing-section a {
  width: fit-content;
  margin-top: 58px;
  padding-bottom: 6px;
  display: flex;
  gap: 16px;
  color: rgba(247, 244, 235, 0.68);
  font-size: 12px;
  border-bottom: 1px solid var(--line-dark);
}

.closing-section a:hover {
  color: var(--gold-light);
}

.site-footer {
  padding: 34px max(32px, calc((100vw - var(--max)) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: rgba(247, 244, 235, 0.48);
  background: var(--ink);
  border-top: 1px solid var(--line-dark);
}

.site-footer strong {
  display: block;
  color: rgba(247, 244, 235, 0.76);
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.14em;
}

.site-footer span,
.site-footer p {
  font-family: var(--display);
  font-size: 9px;
  letter-spacing: 0.2em;
}

.site-footer span {
  display: block;
  margin-top: 7px;
}

.reader {
  position: fixed;
  inset: 0;
  z-index: 50;
  visibility: hidden;
  pointer-events: none;
}

.reader.is-open {
  visibility: visible;
  pointer-events: auto;
}

.reader-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  background: rgba(12, 12, 10, 0.74);
  border: 0;
  opacity: 0;
  cursor: zoom-out;
  backdrop-filter: blur(7px);
  transition: opacity 280ms ease;
}

.reader.is-open .reader-backdrop {
  opacity: 1;
}

.reader-panel {
  position: absolute;
  inset: 0 0 0 auto;
  width: min(820px, 92vw);
  height: 100%;
  color: var(--ink);
  background: var(--paper-light);
  box-shadow: -24px 0 90px rgba(0, 0, 0, 0.28);
  transform: translateX(102%);
  transition: transform 420ms cubic-bezier(0.2, 0.75, 0.2, 1);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.reader.is-open .reader-panel {
  transform: translateX(0);
}

.reader-header {
  position: sticky;
  top: 0;
  z-index: 3;
  min-height: 76px;
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(247, 244, 235, 0.93);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.reader-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  color: #88847a;
  font-family: var(--display);
  font-size: 9px;
  letter-spacing: 0.18em;
}

.reader-brand .brand-mark {
  width: 32px;
  height: 32px;
  font-size: 21px;
}

.reader-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

#copy-article {
  height: 38px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 1px solid var(--line);
  cursor: pointer;
  font-size: 11px;
}

#copy-article:hover {
  border-color: var(--ink);
}

#copy-article svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
}

.reader-close {
  width: 38px;
  height: 38px;
  padding: 0;
  background: var(--ink);
  color: var(--paper-light);
  border: 0;
  cursor: pointer;
  font-family: var(--display);
  font-size: 27px;
  line-height: 1;
}

.reader-content {
  max-width: 650px;
  margin: 0 auto;
  padding: 80px 38px 90px;
}

.reader-role {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #8d887d;
  font-size: 10px;
  letter-spacing: 0.12em;
}

.reader-role .role-badge {
  background: var(--jade);
}

.reader-role[data-role="KOS"] .role-badge {
  background: var(--cinnabar);
}

.reader-content h1 {
  margin: 34px 0 0;
  font-family: var(--serif);
  font-size: clamp(34px, 5vw, 53px);
  font-weight: 500;
  letter-spacing: -0.05em;
  line-height: 1.3;
}

.reader-metadata {
  margin: 44px 0 0;
  padding: 22px 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px 28px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.reader-metadata dt {
  color: #9e998e;
  font-size: 9px;
  letter-spacing: 0.1em;
}

.reader-metadata dd {
  margin: 6px 0 0;
  font-family: var(--serif);
  font-size: 13px;
  line-height: 1.6;
}

.reader-section {
  margin-top: 58px;
}

.reader-section > h2 {
  margin: 0 0 24px;
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--cinnabar);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
}

.reader-section > h2::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--line);
}

.reader-prose {
  font-family: var(--serif);
  font-size: 16px;
  line-height: 2;
}

.reader-prose p {
  margin: 0 0 1.25em;
}

.reader-prose strong {
  font-weight: 600;
}

.reader-prose blockquote {
  margin: 0 0 16px;
  padding: 15px 18px;
  color: #625e56;
  background: #ede8dc;
  border-left: 2px solid var(--gold);
  font-size: 14px;
}

.reader-prose ul,
.reader-prose ol {
  margin: 0;
  padding: 0 0 0 1.25em;
}

.reader-prose li {
  margin: 0 0 12px;
  padding-left: 5px;
}

.candidate-list {
  display: grid;
  gap: 10px;
}

.candidate-list p {
  margin: 0;
  padding: 14px 16px;
  font-family: var(--serif);
  font-size: 13px;
  line-height: 1.6;
  background: #ede8dc;
}

.candidate-list span {
  margin-right: 10px;
  color: var(--cinnabar);
  font-family: var(--display);
  font-size: 10px;
}

.reader-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.reader-tags span {
  padding: 8px 11px;
  color: var(--jade);
  background: rgba(38, 79, 70, 0.08);
  font-size: 11px;
}

.reader-footer {
  max-width: 650px;
  margin: 0 auto;
  padding: 26px 38px 50px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 24px;
  align-items: center;
  color: #8f8a7f;
  border-top: 1px solid var(--line);
}

.reader-footer button {
  padding: 0;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 11px;
}

.reader-footer button:last-child {
  justify-self: end;
}

.reader-footer button:hover {
  color: var(--cinnabar);
}

.reader-footer span {
  font-family: var(--display);
  font-size: 10px;
  letter-spacing: 0.12em;
}

.toast {
  position: fixed;
  z-index: 80;
  left: 50%;
  bottom: 28px;
  padding: 12px 18px;
  color: var(--paper-light);
  background: var(--ink);
  font-size: 11px;
  letter-spacing: 0.08em;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 1160px) {
  .copy-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .hero-content {
    gap: 48px;
  }

  .role-panel {
    padding: 38px;
    grid-template-columns: 64px 1fr;
  }
}

@media (max-width: 900px) {
  .site-header {
    width: 100%;
    padding-inline: 20px;
  }

  .main-nav {
    display: none;
  }

  .site-header {
    grid-template-columns: 1fr 1fr;
  }

  .hero {
    height: auto;
    min-height: 860px;
    padding-inline: 24px;
  }

  .hero-content {
    padding: 90px 0 60px;
    grid-template-columns: 1fr;
  }

  .hero-aside {
    width: min(100%, 430px);
    margin: 0;
  }

  .hero h1 em::after {
    display: none;
  }

  .section-heading,
  .library-heading {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .method-track {
    grid-template-columns: repeat(2, 1fr);
  }

  .method-track li:nth-child(odd) {
    border-left: 0;
  }

  .method-track li:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }

  .role-system {
    grid-template-columns: 1fr;
  }

  .role-bridge {
    height: 100px;
    flex-direction: row;
    writing-mode: horizontal-tb;
  }

  .role-bridge i {
    width: 120px;
    height: 1px;
  }

  .copy-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .site-header {
    width: 100%;
    height: 76px;
    padding-inline: 16px;
  }

  .brand strong {
    font-size: 14px;
  }

  .header-cta {
    font-size: 11px;
  }

  .hero {
    min-height: 820px;
    padding: 112px 20px 28px;
  }

  .hero-kicker span:last-child,
  .hero-foot span:first-child {
    display: none;
  }

  .hero-content {
    padding: 70px 0 45px;
  }

  .hero h1 {
    font-size: clamp(58px, 19vw, 82px);
    line-height: 0.98;
  }

  .hero-intro {
    margin-top: 32px;
    font-size: 15px;
  }

  .hero-actions {
    align-items: flex-start;
    flex-direction: column;
    gap: 20px;
  }

  .hero-aside {
    display: none;
  }

  .hero-foot {
    grid-template-columns: 1fr auto;
  }

  .system-section,
  .library-section {
    width: calc(100% - 40px);
  }

  .system-section {
    padding-block: 100px;
  }

  .library-section {
    padding: 28px 0 80px;
  }

  .section-heading h2,
  .library-heading h2 {
    font-size: 44px;
  }

  .method-track {
    margin-top: 64px;
    grid-template-columns: 1fr;
  }

  .method-track li {
    min-height: auto;
    padding: 26px 4px;
    display: grid;
    grid-template-columns: 42px 1fr;
    align-items: center;
  }

  .method-track li + li,
  .method-track li:nth-child(n + 3) {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .method-track strong {
    margin: 0;
    font-size: 20px;
  }

  .method-track p {
    grid-column: 2;
    margin-top: 7px;
  }

  .role-system {
    margin-top: 70px;
  }

  .role-panel {
    min-height: 430px;
    padding: 32px 26px;
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .role-number {
    font-size: 56px;
  }

  .role-panel h3 {
    font-size: 38px;
  }

  .library-toolbar {
    margin-top: 0;
    padding: 12px 0;
    align-items: stretch;
    flex-direction: column;
  }

  .filter-group {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  .filter-button {
    padding-inline: 8px;
    font-size: 10px;
  }

  .search-box {
    width: 100%;
  }

  .copy-grid {
    grid-template-columns: 1fr;
  }

  .copy-card {
    min-height: 360px;
  }

  .copy-card h3 {
    margin-top: 42px;
  }

  .closing-section {
    padding: 100px 20px;
  }

  .closing-lead {
    font-size: 38px;
  }

  .site-footer {
    padding: 28px 20px;
    align-items: flex-start;
    flex-direction: column;
    gap: 20px;
  }

  .reader-panel {
    width: 100vw;
  }

  .reader-header {
    min-height: 66px;
    padding: 12px 16px;
  }

  .reader-content {
    padding: 56px 22px 70px;
  }

  .reader-content h1 {
    font-size: 34px;
  }

  .reader-metadata {
    grid-template-columns: 1fr;
  }

  .reader-footer {
    padding: 24px 22px 44px;
  }
}

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

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