:root {
  --research-paper: #f7f3ea;
  --research-surface: #fffdf7;
  --research-green: #23392c;
  --research-deep: #192a20;
  --research-ink: #222c24;
  --research-muted: #55584e;
  --research-line: #d8d0bf;
  --research-gold: #d4b57b;
  --research-accent: #81552b;
  --research-display: Georgia, 'Times New Roman', serif;
}

.research-page { margin: 0; background: var(--research-paper); color: var(--research-ink); font: 1rem/1.6 system-ui, sans-serif; }
.research-page *, .research-page *::before, .research-page *::after { box-sizing: border-box; }
.research-page a, .research-home a { color: inherit; text-underline-offset: .2em; }
.research-page a:focus-visible, .research-home a:focus-visible, .youtube-channel:focus-visible {
  outline: 3px solid #aa6729;
  outline-offset: 5px;
}
.research-page h1, .research-page h2, .research-home h2, .research-home h3, .research-method h2, .research-method h3 {
  font-family: var(--research-display);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -.026em;
  text-wrap: balance;
}
.research-frame { width: min(100% - 3rem, 70rem); margin-inline: auto; }
.research-skip { position: fixed; z-index: 5; top: .75rem; left: 1rem; padding: .65rem 1rem; background: white; transform: translateY(-200%); }
.research-skip:focus { transform: none; }

.research-topbar { background: var(--research-deep); color: #fbf4e7; border-bottom: 1px solid #ffffff2e; }
.research-topbar .research-frame { display: flex; align-items: center; justify-content: space-between; gap: .5rem 1rem; min-height: 4.3rem; }
.research-brand { font-family: var(--research-display); font-size: 1.65rem; letter-spacing: -.04em; text-decoration: none; }
.research-topbar nav { display: flex; flex-wrap: wrap; justify-content: end; gap: .2rem 1.2rem; font-size: .92rem; }
.research-topbar nav a:not([aria-current]) { text-decoration: none; }
.research-topbar nav a:hover { text-decoration: underline; }
.research-hero { background: var(--research-green); color: #fbf4e7; padding-block: clamp(2.6rem, 6vw, 5.5rem); }
.research-hero h1 { font-size: clamp(2.6rem, 5.6vw, 5.35rem); max-width: 18ch; margin: 0; overflow-wrap: anywhere; }
.research-hero.research-article-hero h1 { font-size: clamp(2.15rem, 4.9vw, 4.45rem); max-width: 25ch; }
.research-hero p { max-width: 47rem; margin: 1.2rem 0 0; color: #eee1cc; font-size: clamp(1.03rem, 1.8vw, 1.24rem); }
.research-crumbs { display: flex; flex-wrap: wrap; gap: .35rem .6rem; align-items: baseline; color: #e4cda5; margin-bottom: 1.2rem; font-size: .89rem; }
.research-crumbs a:hover { color: #fff; }

.research-index { padding-block: clamp(2rem, 5vw, 4.5rem); }
.research-index > section + section { margin-top: clamp(2.5rem, 6vw, 4.2rem); }
.research-index h2 { font-size: clamp(1.8rem, 4vw, 2.65rem); margin: 0 0 1.2rem; }
.research-feature {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  padding: clamp(1.2rem, 3.5vw, 2.2rem);
  color: #fbf4e7 !important;
  background: var(--research-deep);
  border: 1px solid var(--research-deep);
  border-radius: .6rem;
  text-decoration: none;
}
.research-feature:hover { background: #2c4636; }
.research-feature strong { display: block; font: 400 clamp(1.55rem, 3.7vw, 2.4rem)/1.15 var(--research-display); }
.research-feature .research-link-description { color: #eee1cc; }
.research-feature .research-arrow { color: var(--research-gold); }
.research-arrow { font-size: 1.35rem; line-height: 1; color: var(--research-accent); }
.research-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .85rem; list-style: none; padding: 0; margin: .85rem 0 0; }
.research-cards li { display: flex; min-width: 0; }
.research-card { display: flex; flex: 1; flex-direction: column; align-items: start; gap: .45rem; background: var(--research-surface); border: 1px solid var(--research-line); border-radius: .6rem; padding: 1.2rem; text-decoration: none; }
.research-card:hover { border-color: var(--research-accent); background: #fdf8ec; }
.research-card strong { font: 400 1.35rem/1.2 var(--research-display); }
.research-card .research-arrow { margin-top: auto; align-self: end; }
.research-link-description { display: block; margin-top: .25rem; font-size: .98rem; color: var(--research-muted); }

.research-method { padding: clamp(1.25rem, 4vw, 2.3rem); border: 1px solid var(--research-line); border-left: 4px solid #ac834e; border-radius: .45rem; background: #efe8da; }
.research-method h2, .research-method h3 { margin: 0 0 .9rem; font-size: clamp(1.5rem, 3vw, 2.05rem); }
.research-method p { margin: .68rem 0 0; max-width: 76ch; }
.research-article { display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); padding-block: 2rem 4rem; }
.research-toc { align-self: start; position: sticky; top: 1.1rem; padding: 1rem 0; border-top: 1px solid var(--research-line); }
.research-toc summary { margin-bottom: .45rem; font-size: .95rem; font-weight: 650; cursor: pointer; }
.research-toc ul { list-style: none; padding: 0 .55rem 0 0; margin: 0; font-size: .92rem; max-height: calc(100vh - 8rem); overflow: auto; }
.research-toc li + li { margin-top: .36rem; }
.research-toc a { display: inline-block; padding-block: .14rem; text-decoration: none; }
.research-toc a:hover { text-decoration: underline; }
.research-body { min-width: 0; font-size: clamp(1rem, 1.6vw, 1.095rem); }
.research-body [id] { scroll-margin-top: 1.25rem; }
.research-body section + section, .research-body .research-method { margin-top: 2.2rem; }
.research-body h2 { font-size: clamp(1.65rem, 3.6vw, 2.4rem); margin: 2.25rem 0 .8rem; }
.research-body .research-method h2 { font-size: clamp(1.5rem, 3vw, 2.05rem); margin-top: 0; }
.research-body h3, .research-body h4 { margin: 1.65rem 0 .55rem; line-height: 1.35; }
.research-body p { margin: .8rem 0; max-width: 74ch; }
.research-body p:first-child { margin-top: 0; }
.research-body a { color: #694522; overflow-wrap: anywhere; }
.research-body ol, .research-body ul { padding-left: 1.45rem; }
.research-body li + li { margin-top: .42rem; }
.document-text > h2:first-child { margin-top: 0; }
.document-text blockquote { border-left: 2px solid var(--research-line); margin-inline: 0; padding-inline-start: 1rem; }
.document-text .footnotes { margin-block: 2rem 1.5rem; font-size: .94rem; }
.document-text .footnotes hr { border: 0; border-top: 1px solid var(--research-line); }
.document-text .footnotes li:target { background: #efe3ca; }
.research-table-wrap { margin: 1.1rem 0; overflow-x: auto; border: 1px solid var(--research-line); border-radius: .45rem; }
.research-table-wrap:focus-visible { outline: 3px solid #aa6729; outline-offset: 3px; }
.research-table-tall { max-height: min(36rem, 70vh); overflow: auto; }
.research-table { width: 100%; min-width: 29rem; border-collapse: collapse; background: var(--research-surface); font-size: .94rem; }
.research-table-wide { min-width: 45rem; }
.research-table caption { text-align: left; padding: .85rem 1rem; font-weight: 650; background: #ebe4d5; }
.research-table th, .research-table td { padding: .68rem .75rem; vertical-align: top; text-align: left; border-top: 1px solid var(--research-line); }
.research-table thead { background: #f0ebde; }
.research-table-tall thead { position: sticky; top: 0; }
.research-table tbody tr:nth-child(even) { background: #faf6ed; }
.research-table p:last-child { margin-bottom: 0; }
.research-next { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem 2rem; border-top: 1px solid var(--research-line); padding-top: 1.3rem; margin-top: 2.5rem; font-size: .96rem; }
.research-footer { border-top: 1px solid var(--research-line); padding-block: 1.25rem; background: #eee7db; color: var(--research-muted); font-size: .92rem; }
.research-footer .research-frame { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .35rem 1rem; }

.youtube-channel-wrap { max-width: 69.375rem; margin: 0 auto clamp(2.5rem, 6vw, 4.5rem); }
.youtube-channel { display: block; border: 1px solid var(--research-deep); border-radius: .9rem; overflow: hidden; box-shadow: 0 12px 36px #15201918; background: var(--research-deep); color: #fff4e3; text-decoration: none; }
.youtube-channel:hover { background: #2c4636; }
.youtube-channel img { display: block; width: 100%; height: auto; }
.youtube-caption { display: flex; justify-content: space-between; align-items: center; gap: .65rem 1.2rem; flex-wrap: wrap; padding: clamp(.85rem, 2.8vw, 1.5rem) clamp(1rem, 3.4vw, 1.85rem); }
.youtube-caption strong { font-size: clamp(1.15rem, 2.6vw, 1.75rem); line-height: 1.2; }
.youtube-caption span { font-size: 1.02rem; color: #f0d9b3; }
.youtube-channel:hover .youtube-caption span { text-decoration: underline; }
.research-home { max-width: 69.375rem; margin: 0 auto clamp(2.6rem, 6vw, 4.5rem); }
.research-home h2 { font-size: clamp(2.1rem, 4.5vw, 3.8rem); margin: 0 0 .85rem; }
.research-home .research-home-lead { max-width: 48rem; font-size: clamp(1.12rem, 2vw, 1.34rem); margin: 0 0 1.3rem; }
.research-home .research-method { margin-top: 1.35rem; font-size: 1.08rem; line-height: 1.55; }
.research-home .research-index-link { display: inline-block; font-size: 1.12rem; font-weight: 700; margin-top: .9rem; }

@media (max-width: 54rem) {
  .research-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .research-article { grid-template-columns: minmax(0, 1fr); }
  .research-toc { position: static; padding: .8rem 0; border-bottom: 1px solid var(--research-line); }
  .research-toc ul { display: flex; flex-wrap: wrap; gap: .25rem 1rem; max-height: none; }
  .research-toc li + li { margin: 0; }
  .research-toc a { text-decoration: underline; }
}
@media (max-width: 36rem) {
  .research-frame { width: calc(100% - 2rem); }
  .research-topbar .research-frame { min-height: 3.6rem; }
  .research-topbar nav { font-size: .83rem; }
  .research-hero h1 { font-size: clamp(2rem, 10vw, 3.35rem); }
  .research-cards { grid-template-columns: minmax(0, 1fr); }
  .research-toc ul { display: block; }
  .research-toc a { padding-block: .24rem; }
  .youtube-channel { border-radius: .6rem; }
}
@media print {
  .research-topbar, .research-toc, .research-next, .research-footer, .research-skip, .youtube-channel img { display: none; }
  .research-frame { width: 100%; }
  .research-hero, .research-feature, .youtube-channel { color: #222 !important; background: white; padding: 0; box-shadow: none; }
  .research-hero p, .research-crumbs, .research-feature .research-link-description, .youtube-caption span { color: #222; }
  .research-hero h1 { font-size: 28pt; }
  .research-article { display: block; }
  .research-method { break-inside: avoid; }
  .research-table { min-width: 0; }
  .research-table-tall { overflow: visible; max-height: none; }
}
