/* ==========================================================================
   CellPPD-MOD  —  stylesheet
   Palette : ink navy / phosphate teal / "modified residue" magenta
   Type    : Newsreader (display) · IBM Plex Sans (body) · IBM Plex Mono (data)
   Note    : the magenta accent is used ONLY for chemically modified residues
             and things that relate to them. Please keep it that way.
   ========================================================================== */

/* --- 1. Tokens ---------------------------------------------------------- */
:root {
  --ink:        #0d1b2a;
  --ink-2:      #16293d;
  --slate:      #4a5c72;
  --slate-lt:   #6f8095;
  --paper:      #f4f6f9;
  --card:       #ffffff;
  --rule:       #dce2ea;
  --rule-soft:  #eaeef3;

  --teal:       #0e6e7d;
  --teal-dk:    #0a5563;
  --teal-tint:  #e4f0f2;

  --mod:        #8a3fa8;
  --mod-dk:     #6f2f88;
  --mod-tint:   #f5ebf9;

  --pos:        #1b7f4b;
  --neg:        #a93226;

  --f-display: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --f-body:    "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-mono:    "IBM Plex Mono", ui-monospace, SFMono-Regular, "Cascadia Mono", Consolas, monospace;

  --wrap: 1160px;
  --pad: clamp(1.1rem, 4vw, 2.5rem);

  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 14px;

  --sh-1: 0 1px 2px rgba(13, 27, 42, .06), 0 1px 8px rgba(13, 27, 42, .04);
  --sh-2: 0 2px 6px rgba(13, 27, 42, .07), 0 12px 32px rgba(13, 27, 42, .07);
}

/* --- 2. Reset ----------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-2);
  font-family: var(--f-body);
  font-size: 16.5px;
  line-height: 1.62;
  font-feature-settings: "kern" 1;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; display: block; }
a { color: var(--teal); text-decoration: none; }
a:hover { color: var(--teal-dk); text-decoration: underline; text-underline-offset: 2px; }

:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
  border-radius: 2px;
}

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--ink); color: #fff; padding: .7rem 1.1rem;
  font-size: .9rem; border-radius: 0 0 var(--r-md) 0;
}
.skip:focus { left: 0; color: #fff; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--pad); }

/* --- 3. Type ------------------------------------------------------------ */
h1, h2, h3, h4 {
  font-family: var(--f-display);
  color: var(--ink);
  font-weight: 500;
  line-height: 1.16;
  letter-spacing: -.012em;
  margin: 0 0 .55em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.02rem, 1.4rem + 2.3vw, 3.1rem); }
h2 { font-size: clamp(1.55rem, 1.2rem + 1.3vw, 2.15rem); }
h3 { font-size: clamp(1.15rem, 1.02rem + .5vw, 1.4rem); }
h4 { font-size: 1.04rem; font-family: var(--f-body); font-weight: 600; letter-spacing: 0; }

p { margin: 0 0 1.05em; }
p:last-child { margin-bottom: 0; }

.lede {
  font-size: clamp(1.03rem, .98rem + .3vw, 1.19rem);
  color: var(--slate);
  line-height: 1.6;
  max-width: 62ch;
}

.eyebrow {
  font-family: var(--f-mono);
  font-size: .715rem;
  letter-spacing: .17em;
  text-transform: uppercase;
  color: var(--teal);
  margin: 0 0 1rem;
  display: flex;
  align-items: center;
  gap: .65rem;
}
.eyebrow::after {
  content: ""; flex: 1; height: 1px; background: var(--rule);
  max-width: 130px;
}

.mono { font-family: var(--f-mono); font-size: .93em; }
em.it { font-style: italic; }

/* --- 4. Institutional bar ---------------------------------------------- */
.instbar {
  background: var(--ink);
  color: rgba(255, 255, 255, .72);
  font-size: .775rem;
  letter-spacing: .01em;
}
.instbar__in {
  display: flex; flex-wrap: wrap; gap: .35rem 1.4rem;
  align-items: center; justify-content: space-between;
  min-height: 38px; padding-block: .45rem;
}
.instbar__unit { font-family: var(--f-mono); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; }
.instbar__links { display: flex; flex-wrap: wrap; gap: 1.15rem; }
.instbar a { color: rgba(255, 255, 255, .78); }
.instbar a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }

/* --- 5. Masthead + nav -------------------------------------------------- */
.masthead {
  background: var(--card);
  border-bottom: 1px solid var(--rule);
  position: sticky; top: 0; z-index: 60;
}
.masthead__in {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 78px;
}

.brand { display: flex; align-items: center; gap: .8rem; color: inherit; }
.brand:hover { text-decoration: none; }
.brand__mark { flex: 0 0 auto; width: 42px; height: 42px; }
.brand__txt { display: flex; flex-direction: column; line-height: 1.2; }
.brand__txt strong {
  font-family: var(--f-display);
  font-size: 1.42rem; font-weight: 600; color: var(--ink);
  letter-spacing: -.02em;
}
.brand__txt span {
  font-size: .715rem; color: var(--slate-lt);
  letter-spacing: .055em; text-transform: uppercase;
  font-family: var(--f-mono);
}

.nav { display: flex; align-items: center; gap: .15rem; }
.nav a {
  display: block;
  padding: .55rem .82rem;
  font-size: .885rem;
  font-weight: 500;
  color: var(--slate);
  border-radius: var(--r-sm);
  position: relative;
}
.nav a:hover { background: var(--teal-tint); color: var(--teal-dk); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--ink); }
.nav a[aria-current="page"]::after {
  content: ""; position: absolute; left: .82rem; right: .82rem; bottom: -.15rem;
  height: 2px; background: var(--teal);
}

.navtoggle {
  display: none;
  background: none; border: 1px solid var(--rule); border-radius: var(--r-sm);
  width: 42px; height: 38px; cursor: pointer; padding: 0;
  color: var(--ink);
}
.navtoggle span, .navtoggle span::before, .navtoggle span::after {
  content: ""; display: block; position: relative;
  width: 18px; height: 1.5px; background: currentColor; margin-inline: auto;
  transition: transform .18s ease;
}
.navtoggle span::before { position: absolute; top: -5.5px; }
.navtoggle span::after { position: absolute; top: 5.5px; }

/* --- 6. Module tab strip (prediction pages) ---------------------------- */
.tabs { background: var(--card); border-bottom: 1px solid var(--rule); }
.tabs__in { display: flex; gap: .2rem; overflow-x: auto; scrollbar-width: thin; }
.tabs a {
  white-space: nowrap;
  padding: .82rem .95rem;
  font-size: .855rem; font-weight: 500; color: var(--slate);
  border-bottom: 2px solid transparent;
}
.tabs a:hover { color: var(--teal-dk); text-decoration: none; border-bottom-color: var(--rule); }
.tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--mod); }

/* --- 7. Sections -------------------------------------------------------- */
.sec { padding-block: clamp(2.8rem, 5.5vw, 5rem); }
.sec--tight { padding-block: clamp(2rem, 3.5vw, 3rem); }
.sec--paper { background: var(--paper); }
.sec--card { background: var(--card); border-block: 1px solid var(--rule); }
.sec--ink { background: var(--ink); color: rgba(255, 255, 255, .8); }
.sec--ink h2, .sec--ink h3 { color: #fff; }
.sec--ink .eyebrow { color: #7fd0dc; }
.sec--ink .eyebrow::after { background: rgba(255, 255, 255, .18); }

.sec__head { max-width: 66ch; margin-bottom: clamp(1.8rem, 3.4vw, 2.8rem); }
.sec__head > *:last-child { margin-bottom: 0; }

/* --- 8. Page header (interior pages) ----------------------------------- */
.phead {
  background: var(--card);
  border-bottom: 1px solid var(--rule);
  padding-block: clamp(2.1rem, 4vw, 3.2rem);
}
.phead h1 { margin-bottom: .45em; }
.phead .lede { max-width: 72ch; }

/* --- 9. Hero + signature sequence strip -------------------------------- */
.hero {
  background: var(--card);
  border-bottom: 1px solid var(--rule);
  padding-block: clamp(2.8rem, 5.5vw, 4.8rem);
  overflow: hidden;
}
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr);
  gap: clamp(1.8rem, 4vw, 3.6rem);
  align-items: end;
}
.hero h1 { margin-bottom: .5em; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.8rem; }

.factlist {
  list-style: none; margin: .6rem 0 0; padding: 0;
  border-top: 1px solid var(--rule);
}
.factlist li {
  display: flex; gap: 1rem; justify-content: space-between; align-items: baseline;
  padding: .78rem 0; border-bottom: 1px solid var(--rule-soft);
  font-size: .9rem;
}
.factlist dt, .factlist .k { color: var(--slate-lt); font-family: var(--f-mono); font-size: .755rem; letter-spacing: .08em; text-transform: uppercase; }
.factlist .v { color: var(--ink); font-weight: 500; text-align: right; }

/* the signature element: a peptide read-out where modified residues stand out */
.seqstrip { margin: 0; padding: 0; max-width: 900px; }
.seqstrip__label {
  display: flex; flex-wrap: wrap; gap: .5rem 1.1rem; align-items: baseline;
  justify-content: space-between;
  font-family: var(--f-mono); font-size: .73rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--slate-lt);
  margin-bottom: .85rem;
}
/* the FASTA record the user actually pastes in */
.fasta {
  margin: 0 0 .85rem;
  padding: .85rem 1rem;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  font-family: var(--f-mono);
  font-size: .88rem;
  line-height: 1.75;
  color: var(--ink);
  overflow-x: auto;
  white-space: pre;
  scrollbar-width: thin;
}
.fasta__h { color: var(--slate-lt); }
.fasta b {
  font-weight: 500;
  color: var(--mod-dk);
  background: var(--mod-tint);
  border-radius: 2px;
  padding: .1em .1em;
}

.seqstrip__mid {
  display: flex; align-items: center; gap: .75rem;
  margin: 0 0 .85rem;
  font-family: var(--f-mono); font-size: .69rem;
  letter-spacing: .15em; text-transform: uppercase; color: var(--slate-lt);
}
.seqstrip__mid::after { content: ""; flex: 1; height: 1px; background: var(--rule); }

.seqstrip__track {
  position: relative;
  display: flex; flex-wrap: wrap; gap: .3rem; align-items: stretch;
  padding: .55rem;
  background: linear-gradient(180deg, #fbfcfd, #f1f4f8);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
}
.seqstrip__track::after {   /* translocation sweep */
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 38%, rgba(138, 63, 168, .13) 50%, transparent 62%);
  transform: translateX(-100%);
  animation: sweep 7s cubic-bezier(.4, 0, .2, 1) 1.2s infinite;
  pointer-events: none;
}
@keyframes sweep { 0% { transform: translateX(-100%); } 55%, 100% { transform: translateX(100%); } }

.res {
  --_bg: #fff;
  --_bd: var(--rule);
  --_fg: var(--ink);
  flex: 1 0 auto;
  min-width: 46px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .12rem;
  padding: .62rem .3rem .5rem;
  background: var(--_bg);
  border: 1px solid var(--_bd);
  border-radius: var(--r-sm);
  color: var(--_fg);
  font-family: var(--f-mono);
  font-size: 1.02rem;
  font-weight: 500;
  letter-spacing: .02em;
  animation: pop .45s cubic-bezier(.2, .9, .3, 1) both;
  animation-delay: calc(var(--i, 0) * 55ms);
}
.res small {
  font-size: .53rem; letter-spacing: .06em; text-transform: uppercase;
  color: var(--slate-lt); font-weight: 400;
}
.res--mod {
  --_bg: var(--mod-tint);
  --_bd: #d9b4e6;
  --_fg: var(--mod-dk);
  font-weight: 600;
  font-size: .89rem;
}
.res--mod small { color: var(--mod); }
@keyframes pop { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }

.seqstrip__key {
  display: flex; flex-wrap: wrap; gap: .45rem 1.5rem;
  margin-top: .9rem; font-size: .8rem; color: var(--slate);
}
.seqstrip__key .cap { color: var(--slate-lt); font-style: italic; margin-left: auto; }
.seqstrip__key span { display: inline-flex; align-items: center; gap: .45rem; }
.swatch { width: 11px; height: 11px; border-radius: 2px; border: 1px solid var(--rule); background: #fff; }
.swatch--mod { background: var(--mod-tint); border-color: #d9b4e6; }

/* --- 10. Buttons -------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .78rem 1.35rem;
  font-family: var(--f-body); font-size: .9rem; font-weight: 500;
  border-radius: var(--r-sm); border: 1px solid transparent;
  cursor: pointer; text-align: center;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn:hover { text-decoration: none; }
.btn--primary { background: var(--teal); color: #fff; }
.btn--primary:hover { background: var(--teal-dk); color: #fff; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--rule); }
.btn--ghost:hover { border-color: var(--slate-lt); background: #fff; color: var(--ink); }
.btn--mod { background: var(--mod); color: #fff; }
.btn--mod:hover { background: var(--mod-dk); color: #fff; }
.btn--sm { padding: .5rem .85rem; font-size: .82rem; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

.arrow::after { content: "\2192"; font-family: var(--f-mono); }

/* --- 11. Cards & grids -------------------------------------------------- */
/* Column counts are fixed rather than auto-fit, so 4 and 6 item sets land as
   tidy 2x2 / 3x2 blocks instead of leaving one card stranded on its own row. */
.grid { display: grid; gap: 1.15rem; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.card {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  padding: clamp(1.2rem, 2.2vw, 1.7rem);
  display: flex; flex-direction: column;
}
.card--link { transition: box-shadow .17s ease, transform .17s ease, border-color .17s ease; }
.card--link:hover { box-shadow: var(--sh-2); transform: translateY(-2px); border-color: #c6d0dc; }
.card h3 { margin-bottom: .4em; }
.card p { color: var(--slate); font-size: .935rem; }
.card__foot { margin-top: auto; padding-top: 1.1rem; }

/* io signature line: what a module takes in and gives back */
.io {
  display: flex; flex-wrap: wrap; align-items: center; gap: .45rem;
  font-family: var(--f-mono); font-size: .715rem;
  letter-spacing: .05em; text-transform: uppercase;
  color: var(--slate-lt);
  margin: 0 0 1rem;
  padding-bottom: .85rem;
  border-bottom: 1px solid var(--rule-soft);
}
.io b { color: var(--ink); font-weight: 500; }
.io i { font-style: normal; color: var(--mod); }

/* --- 12. Metric band ---------------------------------------------------- */
.metrics { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); background: rgba(255,255,255,.13); border: 1px solid rgba(255,255,255,.13); border-radius: var(--r-md); overflow: hidden; }
.metrics li { background: var(--ink); padding: 1.3rem 1.35rem; }
.metrics .n { font-family: var(--f-display); font-size: 2rem; color: #fff; line-height: 1; display: block; margin-bottom: .35rem; letter-spacing: -.02em; }
.metrics .l { font-family: var(--f-mono); font-size: .705rem; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.6); }

/* --- 13. Forms ---------------------------------------------------------- */
.panel {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-1);
  overflow: hidden;
}
.panel__head {
  padding: 1.15rem clamp(1.1rem, 2.4vw, 1.9rem);
  border-bottom: 1px solid var(--rule);
  background: linear-gradient(180deg, #fdfefe, #f7f9fb);
  display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: baseline; justify-content: space-between;
}
.panel__head h2, .panel__head h3 { margin: 0; font-size: 1.16rem; }
.panel__body { padding: clamp(1.2rem, 2.6vw, 2rem); }
.panel__foot {
  padding: 1.1rem clamp(1.1rem, 2.4vw, 1.9rem);
  border-top: 1px solid var(--rule);
  background: #fafbfc;
  display: flex; flex-wrap: wrap; gap: .7rem; align-items: center;
}
.panel__foot .note { font-size: .82rem; color: var(--slate-lt); margin-left: auto; }

.field { margin-bottom: 1.55rem; }
.field:last-child { margin-bottom: 0; }
.field > label, .field > .flabel {
  display: block;
  font-size: .87rem; font-weight: 600; color: var(--ink);
  margin-bottom: .3rem;
}
.hint { display: block; font-size: .825rem; color: var(--slate-lt); margin-bottom: .6rem; }

input[type="text"], input[type="email"], input[type="file"], textarea, select {
  width: 100%;
  font-family: var(--f-body); font-size: .92rem; color: var(--ink);
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: var(--r-sm);
  padding: .62rem .7rem;
  transition: border-color .15s ease, box-shadow .15s ease;
}
textarea { font-family: var(--f-mono); font-size: .88rem; line-height: 1.65; resize: vertical; min-height: 152px; }
input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(14, 110, 125, .13);
}
select { appearance: none; padding-right: 2.1rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='7' viewBox='0 0 11 7'%3E%3Cpath d='M1 1l4.5 4.5L10 1' fill='none' stroke='%234a5c72' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .8rem center;
}
input[type="file"] { padding: .5rem; font-size: .86rem; cursor: pointer; }
input[type="file"]::file-selector-button {
  font-family: var(--f-body); font-size: .82rem; font-weight: 500;
  margin-right: .8rem; padding: .42rem .8rem; cursor: pointer;
  background: var(--ink); color: #fff; border: 0; border-radius: var(--r-sm);
}

.row { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); }

.or {
  display: flex; align-items: center; gap: .9rem;
  margin: 1.4rem 0;
  font-family: var(--f-mono); font-size: .72rem; letter-spacing: .16em;
  text-transform: uppercase; color: var(--slate-lt);
}
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--rule); }

.checks { display: grid; gap: .45rem 1.4rem; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; padding: 0; list-style: none; }
.checks li { margin: 0; }
.check { display: flex; align-items: center; gap: .55rem; font-size: .89rem; color: var(--ink-2); cursor: pointer; padding: .32rem 0; }
.check input { width: 15px; height: 15px; accent-color: var(--teal); flex: 0 0 auto; margin: 0; cursor: pointer; }

fieldset { border: 0; margin: 0; padding: 0; }
legend { font-size: .87rem; font-weight: 600; color: var(--ink); padding: 0; margin-bottom: .3rem; }

/* --- 14. Callouts ------------------------------------------------------- */
.note-box {
  border: 1px solid var(--rule);
  border-left: 3px solid var(--teal);
  background: var(--teal-tint);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  padding: 1rem 1.15rem;
  font-size: .91rem;
  color: var(--ink-2);
}
.note-box--mod { border-left-color: var(--mod); background: var(--mod-tint); }
.note-box h4 { margin-bottom: .3em; }
.note-box p:last-child { margin-bottom: 0; }

/* --- 15. Tables --------------------------------------------------------- */
.tablewrap { overflow-x: auto; border: 1px solid var(--rule); border-radius: var(--r-md); background: var(--card); }
table { width: 100%; border-collapse: collapse; font-size: .91rem; min-width: 620px; }
caption {
  text-align: left; padding: 1rem 1.15rem; font-weight: 600; color: var(--ink);
  border-bottom: 1px solid var(--rule); background: #fafbfc; font-size: .95rem;
}
th, td { padding: .82rem 1.15rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--rule-soft); }
thead th {
  font-family: var(--f-mono); font-size: .705rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--slate-lt); font-weight: 500;
  background: #fff; border-bottom: 1px solid var(--rule);
}
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fbfcfd; }
td.num, th.num { font-family: var(--f-mono); white-space: nowrap; }
.tag {
  display: inline-block; font-family: var(--f-mono); font-size: .72rem;
  padding: .12rem .45rem; border-radius: var(--r-sm); letter-spacing: .04em;
}
.tag--pos { background: #e6f4ec; color: var(--pos); }
.tag--neg { background: #fbeae8; color: var(--neg); }

.dl {
  display: inline-flex; align-items: center; gap: .4rem;
  font-family: var(--f-mono); font-size: .8rem; font-weight: 500;
  padding: .34rem .6rem; border: 1px solid var(--rule); border-radius: var(--r-sm);
  background: #fff; color: var(--teal-dk); white-space: nowrap;
}
.dl:hover { background: var(--teal-tint); border-color: #b9d5da; text-decoration: none; }

/* --- 16. Team ----------------------------------------------------------- */
.person { text-align: left; }
.person__pic {
  width: 100%; aspect-ratio: 1 / 1; object-fit: cover;
  border-radius: var(--r-md); background: var(--rule-soft);
  margin-bottom: 1rem; border: 1px solid var(--rule);
}
.person__ph {
  width: 100%; aspect-ratio: 1 / 1;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--r-md); margin-bottom: 1rem;
  background: linear-gradient(150deg, #eef2f6, #e2e8ef);
  border: 1px dashed var(--rule);
  font-family: var(--f-display); font-size: 2.1rem; color: var(--slate-lt);
  letter-spacing: .02em;
}
.person h3 { font-size: 1.1rem; margin-bottom: .15em; }
.person__role {
  font-size: .74rem; color: var(--teal); margin: 0;
  font-family: var(--f-mono); letter-spacing: .09em; text-transform: uppercase;
}
.person__links { display: flex; flex-wrap: wrap; gap: .8rem; font-size: .83rem; margin-top: auto; }

/* --- 17. Help page ----------------------------------------------------- */
.split { display: grid; gap: clamp(1.6rem, 4vw, 3.2rem); grid-template-columns: 270px minmax(0, 1fr); align-items: start; }
.toc { position: sticky; top: 96px; }
.toc__t { font-family: var(--f-mono); font-size: .715rem; letter-spacing: .12em; text-transform: uppercase; color: var(--slate-lt); margin: 0 0 .7rem; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--rule); }
.toc li a { display: block; padding: .42rem 0 .42rem .9rem; font-size: .875rem; color: var(--slate); border-left: 2px solid transparent; margin-left: -1px; }
.toc li a:hover { color: var(--teal-dk); border-left-color: var(--teal); text-decoration: none; }

.step { padding-bottom: clamp(1.8rem, 3.5vw, 2.6rem); margin-bottom: clamp(1.8rem, 3.5vw, 2.6rem); border-bottom: 1px solid var(--rule); }
.step:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.step h3 { display: flex; align-items: baseline; gap: .7rem; }
.step h3 .mk { font-family: var(--f-mono); font-size: .78rem; color: var(--mod); letter-spacing: .06em; }

.shot { margin: 1.3rem 0 0; }
.shot img { border: 1px solid var(--rule); border-radius: var(--r-md); background: #fff; }
.shot figcaption { font-size: .82rem; color: var(--slate-lt); margin-top: .55rem; }
.imgph {
  border: 1px dashed var(--rule); border-radius: var(--r-md);
  background: repeating-linear-gradient(135deg, #fbfcfd, #fbfcfd 9px, #f4f6f9 9px, #f4f6f9 18px);
  padding: 2.4rem 1.2rem; text-align: center;
  font-family: var(--f-mono); font-size: .8rem; color: var(--slate-lt);
}

/* --- 18. Citation ------------------------------------------------------- */
.cite {
  border: 1px solid var(--rule); border-radius: var(--r-md);
  background: var(--card); padding: clamp(1.1rem, 2.2vw, 1.6rem);
}
.cite p { margin: 0 0 .5rem; font-size: .94rem; }
.cite .j { font-family: var(--f-display); font-style: italic; color: var(--ink); }
.cite .who { color: var(--slate); font-size: .89rem; }

/* --- 19. Contact -------------------------------------------------------- */
.contact-grid { display: grid; gap: clamp(1.4rem, 3.5vw, 2.6rem); grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); align-items: start; }
.cdl { margin: 0; }
.cdl div { display: flex; gap: 1rem; padding: .72rem 0; border-bottom: 1px solid var(--rule-soft); }
.cdl dt { flex: 0 0 92px; font-family: var(--f-mono); font-size: .715rem; letter-spacing: .09em; text-transform: uppercase; color: var(--slate-lt); padding-top: .2rem; }
.cdl dd { margin: 0; font-size: .93rem; }
.embed { position: relative; padding-top: 56.25%; border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--rule); background: var(--ink); }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* --- 20. Footer --------------------------------------------------------- */
.foot { background: var(--ink); color: rgba(255, 255, 255, .68); padding-block: clamp(2.4rem, 4.5vw, 3.4rem) 0; font-size: .89rem; }
.foot__grid { display: grid; gap: 2rem; grid-template-columns: minmax(0, 1.4fr) repeat(auto-fit, minmax(140px, 1fr)); }
.foot h4 { color: #fff; font-family: var(--f-mono); font-size: .715rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 500; margin-bottom: .9rem; }
.foot a { color: rgba(255, 255, 255, .74); }
.foot a:hover { color: #fff; }
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot li { margin-bottom: .5rem; }
.foot__brand strong { display: block; font-family: var(--f-display); font-size: 1.3rem; color: #fff; margin-bottom: .4rem; }
.foot__brand p { max-width: 42ch; font-size: .875rem; }
.foot__base {
  margin-top: clamp(2rem, 4vw, 3rem); padding-block: 1.3rem;
  border-top: 1px solid rgba(255, 255, 255, .12);
  display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between;
  font-size: .8rem; color: rgba(255, 255, 255, .5);
}

/* --- 21. Utilities ------------------------------------------------------ */
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.stack > * + * { margin-top: 1.3rem; }
.center { text-align: center; }
.mt0 { margin-top: 0; }
hr.rule { border: 0; border-top: 1px solid var(--rule); margin: clamp(1.8rem, 3.5vw, 2.6rem) 0; }
.bullets { padding-left: 1.15rem; color: var(--slate); }
.bullets li { margin-bottom: .5rem; }
.bullets strong { color: var(--ink); }

/* --- 22. Responsive ----------------------------------------------------- */
@media (max-width: 1000px) {
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; align-items: start; }
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split { grid-template-columns: 1fr; }
  .toc { position: static; }
  .toc ol { display: flex; flex-wrap: wrap; gap: .2rem .4rem; border-left: 0; }
  .toc li a { padding: .3rem .6rem; border: 1px solid var(--rule); border-radius: var(--r-sm); margin: 0; }
}

@media (max-width: 780px) {
  .navtoggle { display: block; }
  .masthead__in { min-height: 66px; }
  .nav {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--card); border-bottom: 1px solid var(--rule);
    box-shadow: var(--sh-2);
    padding: .5rem var(--pad) 1rem;
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: .8rem .3rem; border-bottom: 1px solid var(--rule-soft); border-radius: 0; }
  .nav a[aria-current="page"]::after { left: .3rem; right: auto; width: 22px; bottom: .55rem; }
  .brand__txt span { display: none; }
  .instbar__in { justify-content: flex-start; }
  .foot__grid { grid-template-columns: repeat(auto-fit, minmax(135px, 1fr)); }
}

@media (max-width: 720px) {
  .grid--2 { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .checks { grid-template-columns: 1fr; }
  .seqstrip__key .cap { margin-left: 0; }
}

@media (max-width: 520px) {
  body { font-size: 16px; }
  .btn { width: 100%; justify-content: center; }
  .panel__foot .note { margin-left: 0; }
  .cdl div { flex-direction: column; gap: .1rem; }
  .cdl dt { flex: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0ms !important; transition-duration: .001ms !important; }
  .res { opacity: 1; transform: none; }
}

@media print {
  .instbar, .navtoggle, .nav, .tabs, .foot, .seqstrip__track::after { display: none !important; }
  body { background: #fff; font-size: 11pt; }
  .panel, .card, .tablewrap { box-shadow: none; }
}

/* --- 23. Tag reference table (prediction page side note) ---------------- */
.tagtable { width: 100%; border-collapse: collapse; min-width: 0; margin-top: .55rem; }
.tagtable td { padding: .2rem 0; border: 0; font-size: .84rem; vertical-align: top; }
.tagtable td:first-child { white-space: nowrap; padding-right: .8rem; color: var(--mod-dk); }
.tagtable td:last-child { color: var(--slate); }
.tagtable tr:hover { background: none; }

/* --- 24. Feature vector read-out (results page) ------------------------- */
.featgrid {
  display: grid; gap: .3rem .9rem;
  grid-template-columns: repeat(auto-fill, minmax(122px, 1fr));
  padding: .7rem 0 .3rem;
  font-size: .82rem;
}
.featgrid span { display: flex; justify-content: space-between; gap: .5rem;
  border-bottom: 1px solid var(--rule-soft); padding-bottom: .18rem; }
.featgrid b { font-weight: 500; color: var(--ink); }
.featgrid span span { color: var(--slate); }
details summary::marker { color: var(--slate-lt); }

/* --- 25. Grouped side links -------------------------------------------- */
.sidelinks { list-style: none; margin: 0; padding: .2rem 0 0; border-top: 1px solid var(--rule); }
.sidelinks li { border-bottom: 1px solid var(--rule-soft); }
.sidelinks a {
  display: block; padding: .62rem 0; font-size: .86rem;
  color: var(--slate); position: relative; padding-right: 1.1rem;
}
.sidelinks a::after {
  content: "\2192"; position: absolute; right: 0; color: var(--slate-lt);
  transition: transform .15s ease;
}
.sidelinks a:hover { color: var(--teal-dk); text-decoration: none; }
.sidelinks a:hover::after { transform: translateX(2px); color: var(--teal); }
