.study-research {
  --study-ink: #46281a;
  --study-accent: #85411d;
  --study-line: #c49e7d;
  --study-paper: #fffcf4;
  color: var(--study-ink);
  margin-inline: auto;
  width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
}
.study-research #cases { display: block; }
.study-research [hidden] { display: none !important; }
.study-intro {
  background: #f7e6cd;
  border-block-start: .25rem solid #ac4d23;
  border-radius: .4rem;
  padding: clamp(1rem, 3vw, 2rem);
  margin: 0 0 1.35rem;
}
.study-intro h2 { margin: 0 0 .65rem; font-size: clamp(1.5rem, 4vw, 2.35rem); }
.study-intro p { margin: .45rem 0; max-width: 46em; }
.study-jumps { display: flex; flex-wrap: wrap; column-gap: 1.2rem; margin-top: .8rem; }
.study-jumps a { color: var(--study-accent); font-weight: 700; }
.study-research #case-filters {
  display: grid;
  grid-template-columns: minmax(9rem, 1.6fr) repeat(3, minmax(0, 1fr)) auto;
}
.study-research #case-filters :is(input, select) { max-width: 100%; min-width: 0; }
.study-research #case-filters button { align-self: end; }
.study-research .table-scroll { overflow-x: auto; }
.study-research #cases > h2 { margin: 1.4rem 0 .7rem; }
.study-map { display: grid; gap: .85rem; }
.study-topic {
  min-width: 0;
  padding: clamp(.7rem, 2vw, 1.15rem);
  border: 1px solid #dec5a8;
  border-radius: .55rem;
  background: #fff7e8;
}
.study-topic h3 { margin: 0 0 .65rem; font-size: 1.125rem; }
.study-flow {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  align-items: center;
}
.study-branches {
  display: grid;
  gap: .65rem;
  margin: 0;
  padding: 0;
  list-style: none;
  min-width: 0;
}
.study-branch {
  display: grid;
  grid-template-columns: minmax(7rem, 30%) minmax(0, 1fr);
  min-width: 0;
}
.study-branch > .study-flow { grid-template-columns: minmax(0, 1fr); }
.study-branch .study-branch { grid-template-columns: minmax(0, 1fr); padding-inline-start: .65rem; }
.study-branches:has(> :nth-child(2)) { border-inline-start: 2px solid var(--study-line); }
.study-card {
  display: flex;
  flex-direction: column;
  gap: .32rem;
  padding: .85rem;
  border: 1px solid var(--study-line);
  border-radius: .4rem;
  background: var(--study-paper);
}
.study-card h4 { margin: 0; font-size: 1.07rem; }
.study-card h4 a { color: #6a300f; text-underline-offset: .2em; }
.study-card .case-meta { color: #654b3d; }
.study-card .case-select { margin-top: auto; font-size: .85rem; }
.study-role { margin: 0; color: var(--study-accent); font-size: .81rem; font-weight: 750; }
.study-summary { margin: 0 0 .35rem; }
.study-edge {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  padding: .8rem;
  color: #6e3b21;
  text-align: center;
  font-size: .85rem;
  font-weight: 650;
}
.study-edge::before {
  content: '';
  position: absolute;
  inset: 50% 0 auto;
  border-block-start: 2px solid var(--study-line);
}
.study-edge::after {
  content: '';
  position: absolute;
  top: calc(50% - 4px);
  right: 2px;
  width: 8px;
  height: 8px;
  border: solid var(--study-line);
  border-width: 2px 2px 0 0;
  transform: rotate(45deg);
}
.study-edge span { position: relative; padding: .25rem; background: #fff7e8; }
.study-examples {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .85rem;
}
.study-examples .study-topic { display: flex; flex-direction: column; }
.study-examples .study-card { flex: 1; }
.study-research :is(a, button, input, select):focus-visible {
  outline: 2px solid #7b3516;
  outline-offset: 3px;
}
.study-research :is(#article-connections, #more-cases, .study-topic) { scroll-margin-top: 6rem; }
@media (max-width: 680px) {
  .study-research #case-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .study-research #case-filters label:first-child { grid-column: 1 / -1; }
  .study-flow, .study-branch, .study-examples { grid-template-columns: minmax(0, 1fr); }
  .study-branches:has(> :nth-child(2)) { margin-inline-start: .5rem; padding-inline-start: .65rem; }
  .study-branches { gap: .25rem; }
  .study-edge { padding: .7rem 0 .7rem 1.35rem; text-align: start; justify-items: start; }
  .study-edge::before {
    inset: 0 auto 0 .55rem;
    border-block-start: 0;
    border-inline-start: 2px solid var(--study-line);
  }
  .study-edge::after { top: auto; right: auto; left: calc(.55rem - 3px); bottom: 2px; transform: rotate(135deg); }
}
.study-research { padding-block-start: clamp(.8rem, 2.4vw, 1.75rem); }
.study-research > h1 { margin-block: .45rem .7rem; }
.study-intro { padding: clamp(.85rem, 2vw, 1.5rem); margin-block-end: .75rem; }
.study-tools summary { width: fit-content; cursor: pointer; color: #6a300f; font-weight: 700; }
.study-tools[open] summary { margin-bottom: .4rem; }
.study-controls { display: flex; flex-wrap: wrap; gap: .15rem 1rem; align-items: center; margin-block: .25rem; }
.study-controls p { margin-block: .2rem; }
.study-key { color: #6e3b21; font-size: .9rem; }
.study-examples .study-topic { display: grid; align-content: start; }
.study-hypothesis {
  min-width: 0;
  margin: .8rem 0 0;
  padding: .78rem;
  border: 1px solid #c7c4aa;
  border-radius: .4rem;
  background: #f6f4e9;
}
.study-hypothesis figcaption { font-weight: 750; margin: 0 0 .55rem; }
.hypothesis-path {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.8fr) minmax(0, 1fr);
  align-items: stretch;
  gap: 1.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.hypothesis-path > li {
  position: relative;
  min-width: 0;
  padding: .65rem .75rem;
  border-radius: .35rem;
  background: #fffcf4;
  border: 1px solid #d1c5ae;
  font-size: .9rem;
  line-height: 1.55;
}
.hypothesis-path > :not(:last-child)::after {
  content: '';
  position: absolute;
  top: 50%;
  inset-inline-start: 100%;
  width: 1.35rem;
  border-block-start: 2px dashed #766b55;
}
.hypothesis-path > :not(:last-child)::before {
  content: '';
  position: absolute;
  z-index: 1;
  top: calc(50% - 3px);
  inset-inline-start: calc(100% + .95rem);
  width: .38rem;
  height: .38rem;
  border-top: 2px solid #766b55;
  border-right: 2px solid #766b55;
  transform: rotate(45deg);
}
.hypothesis-path p, .hypothesis-path dl { margin: 0; }
.hypothesis-path .hypothesis-label { margin: 0 0 .3rem; color: #5b3825; font-weight: 750; }
.hypothesis-path .hypothesis-lenses { background: #fffae8; }
.hypothesis-path .hypothesis-behavior { background: #edf2e6; border-color: #b9c4a9; }
.hypothesis-lenses dt { margin-top: .35rem; font-weight: 750; color: #513b26; }
.hypothesis-lenses dd { margin: .08rem 0 0; }
.study-method { margin-top: 1rem; }
.study-method summary { cursor: pointer; font-weight: 700; }
.study-examples .hypothesis-path { grid-template-columns: minmax(0, 1fr); gap: .9rem; }
@media (max-width: 800px) {
  .hypothesis-path { grid-template-columns: minmax(0, 1fr); gap: .9rem; }
}
@media (max-width: 680px) {
  .study-branches .study-edge { min-height: 2rem; }
}
.study-examples .hypothesis-path > :not(:last-child)::after {
  inset: 100% auto auto 1rem;
  height: .9rem;
  width: 0;
  border-block-start: 0;
  border-inline-start: 2px dashed #766b55;
}
.study-examples .hypothesis-path > :not(:last-child)::before {
  inset: calc(100% + .4rem) auto auto calc(1rem - 2px);
  transform: rotate(135deg);
}
@media (max-width: 800px) {
  .hypothesis-path > :not(:last-child)::after {
    inset: 100% auto auto 1rem;
    height: .9rem;
    width: 0;
    border-block-start: 0;
    border-inline-start: 2px dashed #766b55;
  }
  .hypothesis-path > :not(:last-child)::before {
    inset: calc(100% + .4rem) auto auto calc(1rem - 2px);
    transform: rotate(135deg);
  }
}
.study-topic-heading { display: flex; align-items: baseline; flex-wrap: wrap; gap: .2rem .7rem; }
.study-number { font-size: .78rem; font-weight: 750; color: #6a300f; background: #f7e6cd; padding: .14rem .38rem; border-radius: .25rem; }
.hypothesis-context { border-top: 1px solid #d1c5ae; margin-top: .55rem; padding-top: .55rem; }
.hypothesis-context a { display: inline-block; margin-top: .35rem; color: #6a300f; }
.study-research .study-branch > .study-flow { padding-inline-start: .25rem; }
.study-branch .study-branch > .study-edge { padding: .35rem 0 .35rem 1.1rem; }
.study-branch .study-branch > .study-edge::before {
  inset: 0 auto 0 .3rem;
  border-block-start: 0;
  border-inline-start: 2px solid var(--study-line);
}
.study-branch .study-branch > .study-edge::after {
  top: auto;
  right: auto;
  left: calc(.3rem - 3px);
  bottom: 3px;
  transform: rotate(135deg);
}
.ts-article .journal-panel { margin-block: 1.4rem; padding: 1rem; background: #fff6e8; border: 1px solid #e1c8a7; border-radius: .5rem; }
.ts-article .journal-panel h2 { margin-top: 0; }
.ts-article .journal-overview { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; margin: 0; }
.journal-overview > div { padding: .58rem .7rem; border: 1px solid #e1c8a7; border-radius: .36rem; background: #fffcf4; }
.journal-overview dt { font-weight: 700; color: #6a300f; }
.journal-overview dd { margin-inline-start: 0; }
.journal-figure-caption { font-size: .9rem; color: #604839; }
.ts-article .study-hypothesis .hypothesis-path { padding-inline-start: 0; list-style: none; }
.ts-article .study-hypothesis .hypothesis-path > li { margin: 0; }
.ts-article .study-hypothesis { width: 100%; max-width: none; margin-inline: 0; }
.ts-article .journal-episode { margin: .8rem 0; padding-inline-start: .8rem; border-inline-start: 3px solid #ac4d23; }
.ts-article .journal-related { display: flex; flex-wrap: wrap; gap: .25rem 1rem; }
@media (max-width: 500px) {
  .ts-article .journal-overview { grid-template-columns: minmax(0, 1fr); }
}
.hypothesis-sources { margin-top: .65rem; font-size: .85rem; }
.hypothesis-sources summary { font-weight: 700; cursor: pointer; color: #513b26; }
.hypothesis-sources ul { padding-inline-start: 1.2rem; margin: .4rem 0 0; }
.hypothesis-sources li + li { margin-top: .25rem; }

.study-comic-link {
  margin: .8rem 0 0;
}
.study-comic-link a {
  display: inline-block;
  padding: .42rem .75rem;
  border: 1px solid #995128;
  border-radius: .38rem;
  color: #753b20;
  background: #fff8eb;
  font-weight: 700;
}
