/* Timeline uses the same photograph-and-copy hero as Model and Wet Lab.
   The calendar photograph is hosted on iGEM and retains its 2:1 composition. */
body[data-wiki-shell].timeline-notebook-page .page-hero {
  --page-hero-photo-height: clamp(520px, 38vw, 680px);
  position: relative;
  isolation: isolate;
  min-height: var(--page-hero-photo-height);
  padding: clamp(64px, 5.4vw, 96px) 0;
  overflow: hidden;
  background: #000;
}
body[data-wiki-shell].timeline-notebook-page .page-hero > .container {
  position: static !important;
  z-index: auto;
}
body[data-wiki-shell].timeline-notebook-page .page-hero .hero-copy {
  position: relative;
  z-index: 2;
  flex: 0 0 42%;
  width: 42%;
  max-width: 42%;
  text-align: left;
}
body[data-wiki-shell].timeline-notebook-page .page-hero h1 {
  max-width: 21ch;
  font-size: clamp(2.5rem, 3.5vw, 3.7rem);
  line-height: 1.12;
  text-align: left;
  text-wrap: balance;
  overflow-wrap: break-word;
  text-shadow: 0 2px 22px rgb(0 0 0 / 28%);
}
body[data-wiki-shell].timeline-notebook-page .page-hero .hero-lead {
  max-width: 62ch;
  text-align: left;
}
body[data-wiki-shell].timeline-notebook-page .page-hero .hero-edge { z-index: 3; }
body[data-wiki-shell].timeline-notebook-page .tn-hero-photo-visual {
  position: absolute;
  z-index: 0;
  inset: 0;
  width: auto;
  margin: 0;
  padding: 0;
  overflow: hidden;
  pointer-events: none;
}
body[data-wiki-shell].timeline-notebook-page .tn-hero-photo-stage {
  position: absolute;
  inset: 0 0 0 46%;
  overflow: hidden;
  background: #000;
}
body[data-wiki-shell].timeline-notebook-page .tn-hero-photo-stage::before {
  content: "";
  position: absolute;
  inset: -32px;
  background: var(--page-hero-photo) center / cover no-repeat;
  filter: blur(24px) brightness(.36) saturate(.8);
  opacity: .56;
}
body[data-wiki-shell].timeline-notebook-page .tn-hero-photo-window {
  position: absolute;
  top: 50%;
  right: 0;
  width: 100%;
  max-width: calc(var(--page-hero-photo-height) + var(--page-hero-photo-height));
  aspect-ratio: 2 / 1;
  transform: translateY(-50%);
  overflow: hidden;
  -webkit-mask-image:
    linear-gradient(to right, transparent 0%, #000 5%, #000 97%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, #000 6%, #000 94%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to right, transparent 0%, #000 5%, #000 97%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, #000 6%, #000 94%, transparent 100%);
  mask-composite: intersect;
}
body[data-wiki-shell].timeline-notebook-page .tn-hero-photo {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: contain;
  object-position: center;
  border: 0;
  border-radius: 0;
}
body[data-wiki-shell].timeline-notebook-page .tn-hero-photo-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right, #000 0%, rgb(0 0 0 / 48%) 3%, transparent 12%, transparent 95%, rgb(0 0 0 / 65%) 100%),
    linear-gradient(to bottom, rgb(0 0 0 / 28%) 0%, transparent 18%, transparent 93%, #000 100%);
}
/* Give the existing heading, introduction and buttons their own row on tablets
   and phones, keeping the complete photograph below with its full composition visible. */
@media (max-width: 1199.98px) {
  body[data-wiki-shell].timeline-notebook-page .page-hero {
    min-height: 0;
    padding: 54px 0 0;
  }
  body[data-wiki-shell].timeline-notebook-page .page-hero > .container { position: relative !important; }
  body[data-wiki-shell].timeline-notebook-page .page-hero .row { row-gap: 24px !important; }
  body[data-wiki-shell].timeline-notebook-page .page-hero .hero-copy {
    flex: 0 0 100%;
    width: 100%;
    max-width: 100%;
  }
  body[data-wiki-shell].timeline-notebook-page .page-hero h1 {
    max-width: 26ch;
    font-size: clamp(2.3rem, 4.6vw, 3.5rem);
  }
  body[data-wiki-shell].timeline-notebook-page .page-hero .hero-lead { max-width: 64ch; }
  body[data-wiki-shell].timeline-notebook-page .tn-hero-photo-visual {
    position: relative;
    inset: auto;
    flex: 0 0 100%;
    width: 100%;
    max-width: 100%;
    height: auto;
    aspect-ratio: 2 / 1;
    margin-top: 0;
  }
  body[data-wiki-shell].timeline-notebook-page .tn-hero-photo-stage { inset: 0; }
  body[data-wiki-shell].timeline-notebook-page .tn-hero-photo-window {
    inset: 0;
    max-width: none;
    transform: none;
  }
  body[data-wiki-shell].timeline-notebook-page .tn-hero-photo-stage::after {
    background:
      linear-gradient(to right, #000 0%, transparent 5%, transparent 97%, #000 100%),
      linear-gradient(to bottom, #000 0%, transparent 7%, transparent 95%, #000 100%);
  }
}
@media (max-width: 575.98px) {
  body[data-wiki-shell].timeline-notebook-page .page-hero { padding-top: 40px; }
  body[data-wiki-shell].timeline-notebook-page .page-hero .row { row-gap: 20px !important; }
  body[data-wiki-shell].timeline-notebook-page .page-hero h1 {
    max-width: 23ch;
    font-size: clamp(2rem, 7.8vw, 2.5rem);
    margin-bottom: 1rem;
  }
  body[data-wiki-shell].timeline-notebook-page .page-hero .hero-lead { font-size: 1rem; }
  body[data-wiki-shell].timeline-notebook-page .tn-hero-photo-stage::before { filter: blur(16px) brightness(.36) saturate(.8); }
}


.timeline-notebook-page { overflow-x: clip; }
.tn-article { max-width: none; }
.tn-intro { max-width: none; margin-bottom: 3rem; }
.timeline-notebook-page .tn-article > section { scroll-margin-top: calc(var(--nav-height) + 1.5rem); }

.tn-phases ol {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  margin: 1.5rem 0 3rem;
  padding: 0;
  list-style: none;
  border: 1px solid #394340;
  border-radius: 10px;
  overflow: hidden;
  background: #101513;
}
.tn-phases li {
  display: grid;
  grid-template-columns: 90px minmax(145px, .85fr) minmax(0, 1.5fr);
  align-items: start;
  gap: 1rem;
  min-width: 0;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid #394340;
}
.tn-phases li:last-child { border-bottom: 0; }
.tn-phases li > span { padding-top: .25rem; color: var(--brand-green); font: 650 .75rem/1.4 var(--font-mono); letter-spacing: .04em; }
.tn-phases strong { display: block; margin: 0; font-size: .98rem; line-height: 1.6; }
.tn-phases p { margin: 0; color: var(--color-body); line-height: 1.7; }

.tn-filter-shell {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  align-items: end;
  margin: 0 0 3rem;
  padding: 1.1rem 1.2rem;
  border: 1px solid #394340;
  border-radius: var(--radius-md);
  background: #101513;
}

.tn-filter-shell .section-kicker { margin: 0 0 .35rem; }
.tn-filter-shell h2 { margin: 0; font-size: clamp(1.25rem, 2vw, 1.55rem); line-height: 1.4; }
.tn-filters { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: .5rem; }
.tn-filters button {
  min-height: 40px;
  padding: .55rem .8rem;
  border: 1px solid #4a5750;
  border-radius: 7px;
  color: #c9d2cd;
  background: #131917;
  font: 600 .875rem/1.3 var(--font-sans);
  cursor: pointer;
}
.tn-filters button:hover, .tn-filters button:focus-visible { border-color: var(--brand-green); color: var(--color-text); }
.tn-filters button.is-active { border-color: var(--brand-green); color: var(--brand-green); background: #192b23; }
.tn-filter-status { grid-column: 1 / -1; margin: 0; color: var(--color-muted); font-size: .8rem; text-align: left; }

.tn-month { margin: 0 0 5rem; scroll-margin-top: 12rem; }
.tn-month > header {
  display: flex;
  gap: 1.2rem;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #3c4641;
}
.tn-month > header > span { color: var(--brand-green); font-size: clamp(2.5rem, 5vw, 3.6rem); font-weight: 780; letter-spacing: -.08em; line-height: .8; }
.tn-month > header p { margin: 0 0 .25rem; color: var(--brand-green); font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.tn-month > header h2 { margin: 0; font-size: clamp(1.45rem, 2.4vw, 2rem); }
.tn-month-body { position: relative; }
.tn-month-body::before { content: ''; position: absolute; top: 0; bottom: 0; left: 29px; width: 1px; background: linear-gradient(var(--brand-green), #34423b 16%, #34423b 84%, transparent); }

.tn-entry {
  position: relative;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 1.35rem;
  padding: 0 0 2.4rem;
}
.tn-entry[hidden] { display: none; }
.tn-date {
  position: relative;
  z-index: 1;
  display: flex;
  width: 58px;
  height: 64px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid #4f6257;
  border-radius: 10px;
  color: var(--color-text);
  background: #101613;
  box-shadow: 0 0 0 5px var(--color-bg);
}
.tn-date time { font: 750 1rem/1 var(--font-mono); }
.tn-date span { margin-top: .32rem; color: var(--brand-green); font: 700 .58rem/1 var(--font-mono); letter-spacing: .08em; }
.tn-entry-body {
  min-width: 0;
  padding: 1.15rem 1.25rem;
  border: 1px solid #394340;
  border-radius: var(--radius-md);
  background: #101513;
}
.tn-entry-featured .tn-entry-body { border-color: #4d7160; box-shadow: inset 3px 0 0 var(--brand-green); }
.tn-tags { display: flex; flex-wrap: wrap; gap: .45rem; margin-bottom: .8rem; }
.tn-tag { display: inline-flex; padding: .28rem .52rem; border: 1px solid #56635c; border-radius: 4px; color: #ccd6d0; font-size: .65rem; font-weight: 700; letter-spacing: .045em; text-transform: uppercase; }
.tn-tag-dry { border-color: rgb(143 248 199 / 65%); color: var(--brand-green); }
.tn-tag-wet { border-color: rgb(107 172 242 / 70%); color: var(--brand-blue); }
.tn-tag-hp { border-color: rgb(189 121 244 / 70%); color: var(--brand-purple); }
.tn-tag-wiki { border-color: #d1d8d4; color: #e6ece9; }
.tn-tag-artifact { border-style: dashed; }
.tn-entry h3 { margin: 0 0 .65rem; font-size: clamp(1.05rem, 1.8vw, 1.3rem); line-height: 1.35; }
.tn-entry p { max-width: 72ch; margin: 0 0 .7rem; font-size: .88rem; line-height: 1.68; }
.tn-learning { margin-top: 1rem !important; padding-top: .9rem; border-top: 1px solid #334039; color: #d1dbd5 !important; }
.tn-learning strong { color: var(--brand-green); }

.tn-entry-artifact .tn-entry-body { padding: 1.5rem; border-color: #507363; background: #101513; }
.tn-artifact-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(280px, 1.1fr); gap: clamp(1.25rem, 3vw, 2.25rem); align-items: center; }
.tn-artifact-copy { min-width: 0; }
.tn-artifact-label { margin: 0 0 .65rem !important; color: var(--brand-green); font: 700 .68rem/1.3 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; }
.tn-artifact { margin: 0; overflow: hidden; border: 1px solid #3e4d45; border-radius: var(--radius-sm); background: #f7f8f7; }
.tn-artifact img { display: block; width: 100%; height: auto; }
.tn-artifact figcaption { padding: .8rem 1rem; color: #c7d1cb; background: #111815; font-size: .75rem; line-height: 1.55; }
.tn-team-photo img { aspect-ratio: 4 / 3; object-fit: cover; object-position: center 54%; }

.tn-evidence-board, .tn-process-board {
  min-width: 0;
  padding: 1.1rem;
  border: 1px solid #40564b;
  border-radius: var(--radius-sm);
  background: #0b100e;
}
.tn-evidence-board > p { display: flex; align-items: baseline; gap: .65rem; margin: 0; padding: .65rem 0; border-bottom: 1px solid #2f3b35; color: #cbd5cf; font-size: .78rem; }
.tn-evidence-board > p span { min-width: 3.1rem; color: var(--brand-green); font: 750 1.45rem/1 var(--font-mono); }
.tn-process-board ol { display: grid; gap: .45rem; margin: 0; padding: 0; list-style: none; counter-reset: process; }
.tn-process-board li { display: grid; grid-template-columns: 2.3rem 1fr; gap: .65rem; align-items: center; padding: .65rem .75rem; border: 1px solid #33423a; border-radius: 5px; color: #d4ddd8; background: #131b17; font-size: .78rem; }
.tn-process-board li span { color: var(--brand-green); font: 700 .64rem/1 var(--font-mono); }

.tn-inline-chain { display: flex; flex-wrap: wrap; gap: .45rem; margin: 1.15rem 0; }
.tn-inline-chain span { position: relative; padding: .48rem .7rem; border: 1px solid #40554a; border-radius: 5px; color: #d7e2dc; background: #16231c; font-size: .68rem; }
.tn-inline-chain span:not(:last-child)::after { content: '→'; position: absolute; right: -.42rem; color: var(--brand-green); }

.tn-comparison {
  display: grid;
  grid-template-columns: minmax(150px, .42fr) minmax(0, 1fr);
  gap: 1rem;
  margin: 0 0 2.4rem calc(58px + 1.35rem);
  padding: 1rem;
  border: 1px solid #46534d;
  border-radius: var(--radius-md);
  background: #0b0f0d;
}
.tn-comparison[hidden] { display: none; }
.tn-comparison-heading span { color: var(--brand-purple); font: 700 .63rem/1.3 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; }
.tn-comparison-heading h3 { margin: .55rem 0 0; font-size: .96rem; line-height: 1.4; }
.tn-comparison-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
.tn-comparison-pair > div { padding: .85rem; border: 1px solid #37423d; border-radius: 6px; background: #121714; }
.tn-comparison-pair > div:last-child { border-color: rgb(143 248 199 / 45%); background: #132019; }
.tn-comparison-pair small { display: block; margin-bottom: .4rem; color: #89958e; font: 700 .58rem/1 var(--font-mono); letter-spacing: .08em; }
.tn-comparison-pair > div:last-child small { color: var(--brand-green); }
.tn-comparison-pair strong { display: block; margin-bottom: .35rem; color: #e6ece8; font-size: .8rem; }
.tn-comparison-pair p { margin: 0; color: #acb8b1; font-size: .72rem; line-height: 1.55; }

.tn-weekly-progress {
  display: flex;
  gap: 2rem;
  align-items: center;
  justify-content: space-between;
  margin-top: 1rem;
  padding: 1.5rem;
  border: 1px solid #496256;
  border-radius: var(--radius-md);
  background: #101513;
  scroll-margin-top: 8rem;
}
.tn-weekly-progress h2 { margin: .25rem 0 .4rem; font-size: 1.2rem; }
.tn-weekly-progress p { margin: 0; color: #b7c2bc; font-size: .82rem; }
.tn-weekly-progress a { display: inline-flex; flex: 0 0 auto; gap: .5rem; align-items: center; padding: .75rem 1rem; border: 1px solid var(--brand-green); border-radius: 6px; color: #07110c; background: var(--brand-green); font-size: .78rem; font-weight: 750; text-decoration: none; }
.tn-weekly-progress a:hover, .tn-weekly-progress a:focus-visible { color: var(--brand-green); background: transparent; }

@media (max-width: 991.98px) {
  .tn-filter-shell { position: static; grid-template-columns: 1fr; }
  .tn-filters { justify-content: flex-start; }
  .tn-filter-status { text-align: left; }
  .tn-phases li { grid-template-columns: 80px minmax(0, 1fr); }
  .tn-phases li > p { grid-column: 2; }
  .tn-artifact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 575.98px) {
  .tn-phases li { grid-template-columns: minmax(0, 1fr); gap: .4rem; padding: 1rem; }
  .tn-phases li > p { grid-column: auto; }
  .tn-entry { grid-template-columns: 48px minmax(0, 1fr); gap: .8rem; }
  .tn-month-body::before { left: 24px; }
  .tn-date { width: 48px; height: 48px; box-shadow: 0 0 0 4px var(--color-bg); }
  .tn-date time { font-size: .7rem; }
  .tn-date span { font-size: .48rem; }
  .tn-entry-body { padding: 1rem; }
  .tn-entry-artifact .tn-entry-body { padding: 1rem; }
  .tn-comparison { grid-template-columns: 1fr; margin-left: 3.5rem; }
  .tn-comparison-pair { grid-template-columns: 1fr; }
  .tn-weekly-progress { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: no-preference) {
  .tn-entry-body, .tn-filters button { transition: border-color .18s ease, background-color .18s ease; }
  .tn-entry:hover .tn-entry-body { border-color: #5f7569; }
}
