/* ---------------------------------------------------------------------------
   SeqNexus site: index.html and features.html

   One stylesheet for the public pages. The editor (app.html) has its own
   design system in app/src/App.css; nothing here applies to it.

   The register is a product sheet for a lab instrument: generous type,
   hairline rules, one accent, monospace for anything that is data (labels,
   positions, file names). No icon grids, no gradients, no cards of three.

   System fonts only, deliberately. A webfont from a third-party CDN would
   contradict the privacy claim these pages make and the Datenschutz page.
   --------------------------------------------------------------------------- */

:root {
  --paper:     #f5f4f0;
  --surface:   #fdfdfc;
  --ink:       #15171b;
  --ink-2:     #3e434b;
  --muted:     #6e7580;
  --faint:     #9aa0a9;
  --rule:      #e1dfd8;
  --rule-2:    #c6c3bb;
  --accent:    #0b5f58;
  --accent-2:  #09504a;
  --accent-ink:#f5f4f0;
  --shadow:    0 1px 2px rgba(20, 22, 26, .06), 0 30px 60px -36px rgba(20, 22, 26, .35);
  /* Under the masthead once the page has scrolled, and under the phone menu. */
  --shadow-bar: 0 8px 24px -16px rgba(20, 22, 26, .35);

  /* Base colours follow the editor's convention (utils/color.ts). */
  --base-a: #2d8a4e;
  --base-c: #d4a017;
  --base-g: #2874a6;
  --base-t: #c0392b;

  /* Plasmid illustration. These are illustration colours, not UI tokens. */
  --pl-cds:    #0b5f58;
  --pl-pbind:  #b26a1c;
  --pl-ori:    #5a5f6a;
  --pl-term:   #8a4a7a;
  --pl-prom:   #2874a6;
  --pl-primer: #9aa0a9;

  --sans:  system-ui, -apple-system, 'Segoe UI Variable Text', 'Segoe UI', Roboto, 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --display: system-ui, -apple-system, 'Segoe UI Variable Display', 'Segoe UI', Roboto, 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --mono:  ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;

  --measure: 1200px;
  --gutter: 32px;
  --radius: 10px;

  color-scheme: light;
}

/* Dark is class-driven so the toggle can override the OS preference. The
   class is set by an inline script in <head> before first paint. */
html.dark {
  --paper:     #0e1013;
  --surface:   #15181c;
  --ink:       #eceef0;
  --ink-2:     #c0c5cc;
  --muted:     #878e98;
  --faint:     #5f666f;
  --rule:      #23272c;
  --rule-2:    #373c43;
  --accent:    #5cc6b8;
  --accent-2:  #82d6ca;
  --accent-ink:#0c1312;
  --shadow:    0 1px 2px rgba(0, 0, 0, .4), 0 30px 60px -36px rgba(0, 0, 0, .8);
  --shadow-bar: 0 8px 24px -16px rgba(0, 0, 0, .9);

  --base-a: #4fb77a;
  --base-c: #e0b23a;
  --base-g: #4f9bd6;
  --base-t: #e0604f;

  --pl-cds:    #5cc6b8;
  --pl-pbind:  #d99a4a;
  --pl-ori:    #8c929c;
  --pl-term:   #c07ab0;
  --pl-prom:   #5d9fd1;
  --pl-primer: #5f666f;

  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }
img { max-width: 100%; height: auto; }

::selection { background: var(--accent); color: var(--accent-ink); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.wrap {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Letterspaced monospace label that titles each band. */
.label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 400;
  color: var(--muted);
  margin: 0;
}

.label .num { color: var(--accent); margin-right: .9em; }

h1, h2, h3 { font-family: var(--display); color: var(--ink); margin: 0; }

h2 {
  font-weight: 650;
  font-size: clamp(1.7rem, 2.8vw, 2.35rem);
  line-height: 1.12;
  letter-spacing: -.028em;
  text-wrap: balance;
}

.lede {
  font-size: clamp(1.05rem, 1.4vw, 1.2rem);
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 36em;
}

.muted { color: var(--muted); }

/* --- Buttons -------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 20px;
  background: var(--accent);
  color: var(--accent-ink);
  text-decoration: none;
  font-size: 15px;
  font-weight: 550;
  line-height: 1.2;
  border: 1px solid var(--accent);
  border-radius: 7px;
  white-space: nowrap;
  transition: background .15s, border-color .15s, transform .15s;
}

.btn:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn:active { transform: translateY(1px); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--rule-2);
}

.btn-ghost:hover { background: var(--surface); border-color: var(--ink); }

.btn-small { padding: 8px 14px; font-size: 14px; }

.link {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color .15s;
}

.link:hover { border-bottom-color: currentColor; }

/* --- Masthead ------------------------------------------------------------- */

.masthead {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
  transition: border-color .2s, box-shadow .2s;
}

/* Once the page has scrolled under it, the bar casts a shadow so it reads as
   floating over the content. site.js toggles the class. */
.masthead.scrolled { border-bottom-color: var(--rule-2); box-shadow: var(--shadow-bar); }

.masthead-inner {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 var(--gutter);
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--display);
  font-weight: 650;
  font-size: 17px;
  letter-spacing: -.02em;
  color: var(--ink);
}

.brand svg { display: block; color: var(--accent); }
/* The wordmark is one flex item (the text would split from the span otherwise);
   its second half takes the accent. */
.brand b { font-weight: inherit; color: var(--accent); }

.masthead nav {
  display: flex;
  align-items: center;
  gap: 26px;
  font-size: 14.5px;
}

/* On wide screens the links sit inline in the bar. On phones the same
   element becomes the panel that the menu button opens (below). */
.nav-links { display: contents; }

.masthead nav a:not(.btn) {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  text-decoration: none;
  color: var(--ink-2);
  transition: color .15s;
}

.masthead nav a:not(.btn):hover,
.masthead nav a[aria-current="page"] { color: var(--ink); }
.masthead nav a svg { display: block; }

.theme-toggle,
.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  color: var(--ink-2);
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: 7px;
  cursor: pointer;
  transition: color .15s, border-color .15s;
}

.theme-toggle:hover,
.menu-toggle:hover { color: var(--ink); border-color: var(--rule-2); }
.theme-toggle svg,
.menu-toggle svg { display: block; }
.theme-toggle .icon-moon { display: none; }
html.dark .theme-toggle .icon-sun  { display: none; }
html.dark .theme-toggle .icon-moon { display: block; }

/* The menu button exists only on phones. */
.menu-toggle { display: none; }
.menu-toggle .icon-close { display: none; }
.masthead.menu-open .menu-toggle .icon-menu { display: none; }
.masthead.menu-open .menu-toggle .icon-close { display: block; }

/* --- Sequence rule ---------------------------------------------------------
   A single line of real sequence, coloured by base, used as a divider
   between the big bands. Filled by site.js from a stretch of pDONR221. */

.seq-rule {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .18em;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  padding: 10px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  opacity: .75;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
  user-select: none;
}

.seq-rule .a { color: var(--base-a); }
.seq-rule .c { color: var(--base-c); }
.seq-rule .g { color: var(--base-g); }
.seq-rule .t { color: var(--base-t); }
.seq-rule .pos { color: var(--faint); margin: 0 1.6em; letter-spacing: 0; }

/* --- Screenshot frame ------------------------------------------------------
   One frame for every product image. A missing file (the user has not made
   that screenshot yet) shows a labelled slot of the same size instead. */

.shot {
  margin: 0;
  position: relative;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.shot img {
  display: block;
  width: 100%;
  height: auto;
}

.shot figcaption {
  padding: 10px 14px;
  border-top: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .04em;
  color: var(--muted);
}

.shot.missing img { display: none; }

.shot.missing::before {
  content: 'Screenshot to come';
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  aspect-ratio: 16 / 10;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--faint);
  background:
    repeating-linear-gradient(135deg, transparent 0 14px, var(--rule) 14px 15px);
}

.shot.missing::after {
  content: attr(data-file);
  position: absolute;
  left: 50%;
  top: calc(50% + 16px);
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  background: var(--surface);
  padding: 3px 8px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  white-space: nowrap;
}

/* --- Hero ------------------------------------------------------------------
   Headline on top, then one annotated stretch of real sequence across the
   page: the strip is an inline SVG (see the comment in index.html) that
   draws itself layer by layer, each layer being one tool of the bench. */

h1 {
  font-weight: 700;
  font-size: clamp(2.5rem, 5vw, 4.1rem);
  line-height: 1.0;
  letter-spacing: -.04em;
  text-wrap: balance;
}

h1 em { font-style: normal; color: var(--accent); }

.hero .lede { margin: 26px 0 0; }

.hero-actions {
  margin-top: 36px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-fine {
  margin: 22px 0 0;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .02em;
  color: var(--muted);
}

.hero-fine b { color: var(--ink); font-weight: 600; }

.hero-strip { border-bottom: 1px solid var(--rule); }
.hero-strip-text { padding: 64px var(--gutter) 44px; max-width: var(--measure); }
.hero-strip-text .lede { max-width: 40em; }
.strip-wrap { padding: 0 0 40px; }
.strip-scroll {
  width: 100%;
  overflow: hidden;
  display: flex;
  justify-content: center;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
}
.strip { display: block; flex: none; }

/* Two strips: the wide one where it fits, a 40 bp one for phones and
   tablets that scales to the width of the screen instead of scrolling. */
.strip-narrow, .cap-narrow { display: none; }
@media (max-width: 960px) {
  .strip-wide, .cap-wide { display: none; }
  .strip-narrow { display: block; width: 100%; max-width: 640px; height: auto; }
  .cap-narrow { display: inline; }
  .strip-scroll { padding: 0 var(--gutter); -webkit-mask-image: none; mask-image: none; overflow: hidden; }
}
.strip-cap {
  max-width: var(--measure);
  margin: 18px auto 0;
  padding: 0 var(--gutter);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .04em;
  line-height: 1.6;
  color: var(--muted);
}
@media (max-width: 960px) {
  .hero-strip-text { padding: 56px var(--gutter) 36px; }
}

/* --- strip animation ----------------------------------------------------------
   Layers appear in the order the bench would add them: ruler, sequence typed
   in, reading frame, the cut site, a primer, a guide, coverage, reads, the
   mismatches and finally the variant call. Each layer has its own start time
   (--t) and the pieces inside it offset from that with --i. */
.strip { --skip: 0ms; }
.strip .L { --t: 0ms; }
.strip .L-ruler  { --t: 0ms; }
.strip .L-seq    { --t: 250ms; }
.strip .L-cds    { --t: calc(1150ms - var(--skip)); }
.strip .L-aa     { --t: calc(1300ms - var(--skip)); }
.strip .L-site   { --t: calc(2100ms - var(--skip)); }
.strip .L-primer { --t: calc(2600ms - var(--skip)); }
.strip .L-guide  { --t: calc(3100ms - var(--skip)); }
.strip .L-cov    { --t: calc(3800ms - var(--skip)); }
.strip .L-reads  { --t: calc(4200ms - var(--skip)); }
.strip .L-mm     { --t: calc(4800ms - var(--skip)); }
.strip .L-var    { --t: calc(5050ms - var(--skip)); }

/* A loop replay keeps the ruler and the sequence and redraws only the tools
   over them; --skip removes the typing time from every later layer. */
.strip.again { --skip: 1150ms; }
.strip.play.again .L-ruler,
.strip.play.again .L-seq text { animation: none; opacity: 1; }

/* Between loops the tool layers fade back, leaving the bare sequence. */
.strip .L { transition: opacity .7s ease; }
.strip.out .L:not(.L-ruler):not(.L-seq) { opacity: 0; }

@keyframes s-fade { to { opacity: 1; } }
@keyframes s-draw { to { stroke-dashoffset: 0; } }
@keyframes s-grow { to { transform: scaleX(1); } }
@keyframes s-wipe { to { clip-path: inset(0 0 0 0); } }
@keyframes s-slide { to { opacity: 1; transform: translateX(0); } }

.strip.play .L-ruler { opacity: 0; animation: s-fade .5s ease-out forwards; animation-delay: var(--t); }

.strip.play .L-seq text {
  opacity: 0;
  animation: s-fade .18s ease-out forwards;
  animation-delay: calc(var(--t) + var(--i) * 6ms);
}

.strip.play .pop { opacity: 0; animation: s-fade .35s ease-out forwards; animation-delay: calc(var(--t) + 250ms); }

.strip.play .grow {
  transform: scaleX(0);
  transform-box: fill-box;
  transform-origin: left center;
  animation: s-grow .6s cubic-bezier(.2, .7, .2, 1) forwards;
  animation-delay: var(--t);
}

.strip.play .draw {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: s-draw .45s ease-out forwards;
  animation-delay: var(--t);
}
.strip.play .draw.late { animation-delay: calc(var(--t) + 350ms); }

.strip.play .L-aa > g {
  opacity: 0;
  animation: s-fade .25s ease-out forwards;
  animation-delay: calc(var(--t) + var(--i) * 18ms);
}

.strip.play .wipe {
  clip-path: inset(0 100% 0 0);
  animation: s-wipe .9s cubic-bezier(.2, .7, .2, 1) forwards;
  animation-delay: var(--t);
}

.strip.play .L-reads rect {
  opacity: 0;
  transform: translateX(-12px);
  animation: s-slide .4s ease-out forwards;
  animation-delay: calc(var(--t) + var(--i) * 70ms);
}

.strip.play .L-mm rect {
  opacity: 0;
  animation: s-fade .2s ease-out forwards;
  animation-delay: calc(var(--t) + var(--i) * 40ms);
}

.strip.play .L-var .pop { animation-delay: calc(var(--t) + 150ms); }
.strip.play .L-var .draw { animation-delay: calc(var(--t) + 100ms); }

.strip-replay {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .06em;
  color: var(--accent);
  background: none;
  border: 0;
  padding: 0;
  margin-left: 10px;
  cursor: pointer;
}
.strip-replay:hover { text-decoration: underline; }

@media (prefers-reduced-motion: reduce) {
  .strip.play * { animation: none !important; opacity: 1 !important; transform: none !important; clip-path: none !important; stroke-dashoffset: 0 !important; }
  .strip-replay { display: none; }
}

/* --- Bands ------------------------------------------------------------------ */

.band { padding: 96px 0; border-bottom: 1px solid var(--rule); }

.band-head {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 32px;
  align-items: start;
  margin-bottom: 56px;
}

.band-head .lede { margin: 14px 0 0; font-size: 1.05rem; }

.band-head .more {
  margin: 18px 0 0;
  font-size: 15px;
}

/* --- Bench index -------------------------------------------------------------
   Every tool, grouped by what you are doing, as links into features.html. */

.bench {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0 48px;
  border-top: 1px solid var(--rule);
}

.bench-col { padding: 26px 0 8px; }

.bench-col + .bench-col { border-left: 1px solid var(--rule); padding-left: 24px; margin-left: -24px; }

.bench-col h3 {
  font-family: var(--mono);
  font-weight: 400;
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 18px;
}

.bench-col h3 .num { color: var(--accent); margin-right: .9em; }

.bench-col ul { list-style: none; margin: 0; padding: 0; }

.bench-col li { margin: 0 0 18px; }

.bench-col a {
  display: block;
  text-decoration: none;
  color: var(--ink);
}

.bench-col a strong {
  display: block;
  font-weight: 600;
  font-size: 15.5px;
  letter-spacing: -.01em;
  line-height: 1.3;
  transition: color .15s;
}

.bench-col a span {
  display: block;
  margin-top: 3px;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--muted);
}

.bench-col a:hover strong { color: var(--accent); }

/* --- Spotlights --------------------------------------------------------------- */

.spot {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 56px;
  align-items: center;
  padding: 72px 0;
  border-top: 1px solid var(--rule);
}

.spot:first-of-type { border-top: 0; padding-top: 0; }
.spot:last-of-type { padding-bottom: 0; }

.spot.flip { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.spot.flip .spot-text { order: 2; }

.spot-text h3 {
  font-weight: 650;
  font-size: clamp(1.4rem, 2.2vw, 1.8rem);
  line-height: 1.15;
  letter-spacing: -.025em;
  margin: 14px 0 0;
  text-wrap: balance;
}

.spot-text p {
  margin: 16px 0 0;
  color: var(--ink-2);
  font-size: 15.5px;
  max-width: 34em;
}

.spot-text .link { display: inline-block; margin-top: 20px; font-size: 15px; }

/* --- Local first ---------------------------------------------------------------- */

.local-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 64px;
  align-items: center;
}

.local-text h2 { margin-top: 14px; }
.local-text .lede { margin: 18px 0 0; }

.claims {
  margin: 36px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--rule);
}

.claims li {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 24px;
  padding: 16px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 15px;
  color: var(--ink-2);
}

.claims li b {
  font-family: var(--mono);
  font-weight: 400;
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 4px;
}

.plasmid-wrap { position: relative; }

.plasmid {
  display: block;
  width: 100%;
  height: auto;
  max-width: 520px;
  margin: 0 auto;
  font-family: var(--mono);
}

.plasmid-cap {
  margin: 14px 0 0;
  text-align: center;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .06em;
  color: var(--muted);
}

.pl-ring { fill: none; stroke: var(--rule-2); stroke-width: 1; }
.pl-ticks { fill: none; stroke: var(--rule-2); stroke-width: 1; }
.pl-tick-label { fill: var(--faint); font-size: 9.5px; letter-spacing: .04em; }
/* The type classes set only the colour. If they set fill too, they would win
   over .pl-feat's fill: none and every arc would fill its chord. */
.pl-feat { fill: none; stroke: currentColor; stroke-width: 11; stroke-linecap: butt; }
.pl-arrow { fill: currentColor; stroke: none; }
.pl-cds   { color: var(--pl-cds); }
.pl-pbind { color: var(--pl-pbind); }
.pl-ori   { color: var(--pl-ori); }
.pl-term  { color: var(--pl-term); }
.pl-prom  { color: var(--pl-prom); }
.pl-primer{ color: var(--pl-primer); }
.pl-feat.pl-primer { stroke-width: 6; }
.pl-leader { fill: none; stroke: var(--rule-2); stroke-width: 1; }
.pl-label { fill: var(--ink); font-size: 12.5px; font-weight: 500; }
.pl-name { fill: var(--ink); font-family: var(--display); font-weight: 650; font-size: 20px; letter-spacing: -.02em; }
.pl-len { fill: var(--muted); font-size: 11.5px; letter-spacing: .08em; }

/* --- Formats --------------------------------------------------------------------- */

.fmt-table {
  width: 100%;
  border-collapse: collapse;
  border-top: 1px solid var(--rule);
}

.fmt-table th,
.fmt-table td {
  text-align: left;
  padding: 20px 0;
  border-bottom: 1px solid var(--rule);
  vertical-align: baseline;
}

.fmt-table th {
  width: 200px;
  padding-right: 32px;
  font-family: var(--mono);
  font-weight: 400;
  font-size: 11px;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--muted);
}

.fmt-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.fmt-list li {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--ink-2);
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 5px;
  padding: 4px 9px;
  white-space: nowrap;
}

.fmt-list li small { color: var(--muted); margin-left: 6px; }

.fmt-note { margin: 22px 0 0; font-size: 14.5px; color: var(--muted); max-width: 60em; }

/* --- Free ---------------------------------------------------------------------- */

.free { background: var(--surface); }

.free-grid {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 32px;
}

.free h2 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  letter-spacing: -.035em;
  text-wrap: initial;
}

.free h2 em { font-style: normal; color: var(--accent); }

.free-cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px;
  margin-top: 36px;
}

.free-cols p { margin: 0; color: var(--ink-2); font-size: 15.5px; }
.free-cols p + p { margin-top: 12px; }
.free-cols strong { color: var(--ink); font-weight: 600; }

.cite {
  margin: 0;
  padding: 16px 18px;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 7px;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--ink-2);
  user-select: all;
  cursor: text;
}

.cite-head { margin: 0 0 10px; }

/* --- Closing -------------------------------------------------------------------- */

.closing { padding: 112px 0; text-align: center; border-bottom: 1px solid var(--rule); }

.closing h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -.035em;
  max-width: 16em;
  margin: 0 auto;
}

.closing p { margin: 18px auto 32px; color: var(--ink-2); max-width: 36em; }

.closing .hero-actions { justify-content: center; margin-top: 0; }

/* --- Footer --------------------------------------------------------------------- */

/* Four columns over a base bar: who and on what terms, two link lists, and
   the citation. The base bar carries the copyright and the legal pages. */

.site-foot { padding: 64px 0 0; color: var(--muted); }

.foot-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, .7fr) minmax(0, .9fr) minmax(0, .7fr) minmax(0, 1.2fr);
  gap: 40px;
  padding-bottom: 56px;
}

.foot-about p {
  margin: 22px 0 0;
  max-width: 24em;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ink-2);
}

.foot-about strong { color: var(--ink); font-weight: 600; }

.foot-col { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.foot-col .label { margin-bottom: 8px; }

.foot-col a { color: var(--ink-2); text-decoration: none; font-size: 15px; }
.foot-col a:hover { color: var(--ink); }

.foot-cite {
  margin: 0;
  padding-left: 16px;
  border-left: 1px solid var(--rule-2);
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--ink-2);
  overflow-wrap: anywhere;
  user-select: all;
  cursor: text;
}

.foot-base {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  justify-content: space-between;
  padding: 22px 0 36px;
  border-top: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.foot-base p { margin: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; }

.foot-base a { color: var(--muted); text-decoration: none; }
.foot-base a:hover { color: var(--ink); }

/* --- Features page ----------------------------------------------------------------- */

/* Back link in the page head, set like a label so it reads as a breadcrumb. */
.back { color: var(--accent); text-decoration: none; letter-spacing: .1em; }
.back:hover { text-decoration: underline; text-underline-offset: 3px; }

.page-head { padding: 80px 0 56px; border-bottom: 1px solid var(--rule); }

.page-head h1 { font-size: clamp(2.2rem, 4.4vw, 3.4rem); max-width: 14em; }
.page-head .lede { margin: 22px 0 0; }

.feat-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 72px;
  align-items: start;
  padding-top: 56px;
}

.toc {
  position: sticky;
  top: 88px;
  font-size: 13.5px;
}

.toc .label { margin-bottom: 14px; }

.toc ol { list-style: none; margin: 0 0 22px; padding: 0; }

.toc ol li { margin: 0; }

.toc a {
  display: block;
  padding: 4px 0 4px 12px;
  border-left: 1px solid var(--rule);
  color: var(--muted);
  text-decoration: none;
  transition: color .15s, border-color .15s;
}

.toc a:hover { color: var(--ink); }
.toc a.active { color: var(--ink); border-left-color: var(--accent); }

.toc .label.group { margin: 0 0 8px; }

.feat-group { padding-bottom: 24px; }

.feat-group > .label {
  padding: 14px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.feat-group:first-child > .label { border-top: 0; padding-top: 0; }

.feat {
  padding: 56px 0 64px;
  border-bottom: 1px solid var(--rule);
  scroll-margin-top: 80px;
}

.feat:last-child { border-bottom: 0; }

.feat-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px;
  align-items: start;
  margin-bottom: 36px;
}

.feat h2 {
  font-size: clamp(1.6rem, 2.4vw, 2rem);
  letter-spacing: -.028em;
}

.feat-head p {
  margin: 0;
  color: var(--ink-2);
  font-size: 15.5px;
  line-height: 1.6;
}

.feat .shot { margin: 0; }
.feat .shot + .shot { margin-top: 16px; }
.shot-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.shot-pair .shot + .shot { margin-top: 0; }

.detail {
  margin: 36px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 48px;
  border-top: 1px solid var(--rule);
}

.detail li {
  padding: 14px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-2);
}

.detail li b { color: var(--ink); font-weight: 600; }

/* --- Responsive --------------------------------------------------------------------- */

@media (max-width: 1080px) {
  .bench { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bench-col + .bench-col { border-left: 0; padding-left: 0; margin-left: 0; }
  .bench-col:nth-child(2n) { border-left: 1px solid var(--rule); padding-left: 24px; margin-left: -24px; }
  .bench-col:nth-child(n+3) { border-top: 1px solid var(--rule); }
  .feat-layout { grid-template-columns: 1fr; gap: 0; }
  .toc { position: static; display: none; }
}

@media (max-width: 960px) {
  .band-head, .free-grid, .local-grid, .spot, .spot.flip, .feat-head { grid-template-columns: 1fr; }
  .band-head { gap: 12px; margin-bottom: 40px; }
  .spot { gap: 28px; padding: 56px 0; }
  .spot.flip .spot-text { order: 0; }
  .local-grid { gap: 40px; }
  .free-cols { grid-template-columns: 1fr; gap: 24px; }
  .detail { grid-template-columns: 1fr; }
  .shot-pair { grid-template-columns: 1fr; }
  .feat-head { gap: 16px; }
  .fmt-table th { width: auto; display: block; padding-bottom: 8px; border-bottom: 0; }
  .fmt-table td { display: block; padding-top: 0; }
  .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 32px; }
  .foot-about, .foot-grid > .foot-col:last-child { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
  :root { --gutter: 20px; }
  .masthead nav { gap: 12px; }
  /* The text links move into a panel under the bar that the menu button
     opens; the editor button and the theme toggle stay in the bar. */
  .menu-toggle { display: inline-flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    padding: 4px var(--gutter) 10px;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
    box-shadow: var(--shadow-bar);
  }
  .masthead.menu-open .nav-links { display: flex; }
  .masthead .nav-links a:not(.btn) {
    padding: 13px 0;
    font-size: 16px;
    border-top: 1px solid var(--rule);
  }
  .masthead .nav-links a:first-child { border-top: 0; }
  .bench { grid-template-columns: 1fr; }
  .bench-col:nth-child(2n) { border-left: 0; padding-left: 0; margin-left: 0; }
  .bench-col:nth-child(n+2) { border-top: 1px solid var(--rule); }
  .band, .closing { padding: 64px 0; }
  .claims li { grid-template-columns: 1fr; gap: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}

/* --- Guide pages ---------------------------------------------------------------------
   plasmid-map.html, primer-design.html and snapgene-alternative.html: one column of
   prose under a .page-head, with the features page's figures and the formats table's
   hairlines. */

.doc { max-width: 46em; padding: 56px 0 96px; }

.doc h2 {
  font-size: clamp(1.45rem, 2.2vw, 1.85rem);
  letter-spacing: -.02em;
  margin: 64px 0 18px;
}
.doc h2:first-child { margin-top: 0; }

.doc h3 { font-size: 1.1rem; font-weight: 650; margin: 36px 0 10px; letter-spacing: -.01em; }

.doc p, .doc li { color: var(--ink-2); font-size: 16px; line-height: 1.65; }
.doc p { margin: 0 0 18px; }
.doc ul, .doc ol { margin: 0 0 18px; padding-left: 1.4em; }
.doc li { margin: 6px 0; }
.doc li::marker { color: var(--muted); }
.doc b, .doc strong { color: var(--ink); font-weight: 600; }
.doc address { font-style: normal; color: var(--ink-2); line-height: 1.65; margin: 0 0 18px; }
.doc .muted { color: var(--muted); }
.doc hr { border: 0; border-top: 1px solid var(--rule); margin: 64px 0; }
/* An anchored section (the languages on the privacy page) stops below the sticky bar. */
.doc section[id] { scroll-margin-top: 80px; }
.doc code { font-family: var(--mono); font-size: .92em; }

.doc .shot { margin: 28px 0; }
.doc .shot figcaption { margin-top: 10px; font-size: 13.5px; color: var(--muted); }

.doc-table {
  width: 100%;
  border-collapse: collapse;
  border-top: 1px solid var(--rule);
  margin: 20px 0 28px;
  font-size: 14.5px;
  line-height: 1.5;
}
.doc-table th, .doc-table td {
  text-align: left;
  padding: 10px 16px 10px 0;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
  color: var(--ink-2);
}
.doc-table th {
  font-family: var(--mono);
  font-weight: 400;
  font-size: 11px;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--muted);
}
.doc-table td:first-child { color: var(--ink); }
.doc-table td.num { font-family: var(--mono); font-size: 13.5px; }

/* A short list of where to find the tool in the editor. */
.doc-where {
  margin: 28px 0;
  padding: 18px 22px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--surface);
}
.doc-where .label { margin-bottom: 8px; }
.doc-where p { margin: 0; font-size: 15px; }
.doc-where p + p { margin-top: 8px; }

.doc-related {
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
}
.doc-related .label { margin-bottom: 10px; }
.doc-related ul { list-style: none; padding: 0; margin: 0; }
.doc-related li { margin: 8px 0; }

/* A guide link under a features page section. */
.feat .more { margin: 24px 0 0; font-size: 15px; }

@media (max-width: 600px) {
  .doc-table th, .doc-table td { padding-right: 10px; font-size: 13.5px; }
}
