/* gatc website — biopunk theme lifted from gatc-preseed. Plain CSS, no build. */
/* Fonts are served from this site: the CSP allows no other origin, and a
   second origin would cost its own connection. Variable fonts, weights
   400-700, latin and latin-ext subsets (fonts/OFL-*.txt). */
@font-face {
  font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("/fonts/jetbrains-mono-latin.woff2?v=df018a5316ad60b7") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("/fonts/jetbrains-mono-latin-ext.woff2?v=df018a5316ad60b7") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Space Grotesk'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("/fonts/space-grotesk-latin.woff2?v=df018a5316ad60b7") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Space Grotesk'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("/fonts/space-grotesk-latin-ext.woff2?v=df018a5316ad60b7") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg-app: #f2f0e9;            /* Bone White */
  --bg-panel: #ffffff;         /* Pure White */
  --border: #1a1a1a;           /* Ink Black */
  --text-primary: #1a1a1a;
  --text-secondary: #4a4a4a;
  --accent: #ff4d00;           /* International Orange */
  --accent-secondary: #00cc66; /* Bio-Slime Green */
  --danger: #c81e1e;           /* abandoned */
  --info: #1b5fd9;             /* attempted */
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --shadow-hard: 4px 4px 0px 0px #1a1a1a;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg-app);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.5;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---- left sidebar layout (preseed-style) ---- */
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 224px; flex-shrink: 0;
  background: var(--bg-panel);
  border-right: 2px solid var(--border);
  display: flex; flex-direction: column;
}
.side-brand {
  display: flex; align-items: center; gap: 10px;
  height: 60px; padding: 0 16px;
  border-bottom: 2px solid var(--border);
  color: inherit; font-weight: 700; text-transform: uppercase; letter-spacing: 0.02em; font-size: 13px;
}
.side-brand:hover { text-decoration: none; }
.side-brand .dim { color: var(--text-secondary); }
.brand-logo { width: 30px; height: 30px; display: block; flex-shrink: 0; }
.side-name { white-space: nowrap; }

.side-nav { padding: 16px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.nav-item {
  display: block; width: 100%; padding: 10px 14px;
  border: 2px solid var(--border);
  box-shadow: var(--shadow-hard);
  background: var(--bg-panel); color: var(--text-primary);
  font-family: var(--font-mono); font-weight: 700; font-size: 12px;
  text-transform: uppercase; letter-spacing: 0.05em; text-align: left;
}
.nav-item:hover { text-decoration: none; background: #faf8f2; }
.nav-item.active {
  background: var(--accent); color: #fff;
  box-shadow: none; transform: translate(2px, 2px);
}
.side-foot { padding: 16px; border-top: 2px solid var(--border); }

/* ---- sidebar tree (unix `tree`-style expandable groups) ---- */
.tree-group { margin: 0; }
.tree-head { display: flex; align-items: center; gap: 8px; }
.tree-head .caret { display: inline-block; font-size: 10px; transition: transform 0.1s ease; }
.tree-group.open > .tree-head .caret { transform: rotate(90deg); }
.tree-children {
  display: none;
  margin: 6px 0 2px 12px; padding-left: 10px;
  border-left: 2px solid var(--border);
}
.tree-group.open > .tree-children { display: block; }
.tree-leaf {
  display: block; padding: 4px 4px; font-size: 12px;
  color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tree-leaf::before { content: "\251C\2500 "; color: var(--text-secondary); }
.tree-leaf:last-child::before { content: "\2514\2500 "; }
.tree-leaf:hover { background: #faf8f2; color: var(--accent); text-decoration: none; }
.tree-empty { display: block; padding: 4px; font-size: 12px; color: var(--text-secondary); }

.main { flex: 1; min-width: 0; }

/* homepage hero: white panel so the dot grid doesn't distract from the text */
.hero {
  background: var(--bg-panel);
  border: 2px solid var(--border);
  box-shadow: var(--shadow-hard);
  /* Fluid, so a narrow desktop window does not overflow either: at 720-800px
     the fixed 96px sides plus the sidebar were wider than the viewport. */
  padding: clamp(32px, 6vw, 72px) clamp(20px, 8vw, 96px);
  text-align: center;
}
/* One long unbreakable word in a mono face, so it is sized against the viewport
   and allowed to break rather than force the page wider. */
.hero-name { font-size: clamp(18px, 5vw, 48px); margin: 0; overflow-wrap: break-word; }
.hero-logo { width: 156px; height: 156px; display: block; margin: 40px auto; }
.hero-stat { font-family: var(--font-display); font-weight: 500; letter-spacing: 0.02em; font-size: 32px; margin: 0; }
.hero-note { font-size: 12px; margin: 16px 0 0; color: var(--text-secondary); }
.hero .btn { margin-top: 40px; font-size: 14px; padding: 14px 28px; }

/* ---- layout ---- */
.wrap { max-width: 960px; margin: 0 auto; padding: 32px 20px; }
.center { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 32px; }

/* ---- panels ---- */
.panel {
  background: var(--bg-panel);
  border: 2px solid var(--border);
  box-shadow: var(--shadow-hard);
  padding: 24px;
}
.panel + .panel { margin-top: 24px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.panel-head h2 { font-size: 18px; margin: 0; }

/* code chip — shows the SDK call for the current view (python-flavored) */
.code-hint {
  font-family: var(--font-mono);
  font-size: 12.5px;
  background: var(--bg-app);
  border: 1.5px solid var(--border);
  box-shadow: 2px 2px 0 0 var(--border);
  padding: 6px 10px;
  white-space: nowrap;
  line-height: 1.7;
  color: var(--text-secondary);
}
.code-hint .c-var { color: var(--text-primary); }
.code-hint .c-obj { color: var(--text-primary); font-weight: 700; }
.code-hint .c-fn { color: var(--accent); }
.code-hint .c-str { color: var(--accent-secondary); }
.head-right { display: flex; align-items: center; gap: 12px; }

/* ---- buttons ---- */
.btn {
  display: inline-block;
  border: 2px solid var(--border);
  box-shadow: var(--shadow-hard);
  background: var(--bg-panel);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 10px 18px;
  cursor: pointer;
  transition: transform 0.05s ease, box-shadow 0.05s ease;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 0 var(--border); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-block { display: block; width: 100%; text-align: center; }

/* ---- forms ---- */
label { display: block; text-transform: uppercase; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; margin: 14px 0 6px; }
input {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid var(--border);
  border-radius: 0;
  background: var(--bg-app);
  font-family: var(--font-mono);
  font-size: 14px;
}
input:focus { outline: none; background: #fff; box-shadow: var(--shadow-hard); }
select {
  padding: 9px 10px;
  border: 2px solid var(--border);
  border-radius: 0;
  background: var(--bg-app);
  font-family: var(--font-mono);
  font-size: 13px;
}
.form-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.form-row input { width: auto; flex: 1 1 180px; }
.plate-img { display: block; max-width: 100%; border: 2px solid var(--border); margin: 0 0 14px; }

/* ---- tables / lists ---- */
table { width: 100%; border-collapse: collapse; }
/* A wide table scrolls inside its panel rather than pushing the page sideways. */
.table-scroll { overflow-x: auto; }
.wrap-anywhere { overflow-wrap: anywhere; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); }
th { text-transform: uppercase; font-size: 11px; letter-spacing: 0.05em; color: var(--text-secondary); }
tbody tr { cursor: pointer; }
tbody tr:hover { background: #faf8f2; }
.mono-dim { color: var(--text-secondary); font-size: 12px; }
.id-sub { margin-top: 4px; font-size: 11px; }

/* ---- status pill ---- */
.pill {
  display: inline-block; padding: 2px 8px; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.04em; border: 1.5px solid var(--border); background: #fff;
}
.pill-accent { background: var(--accent); color: #fff; }
.pill-green { background: var(--accent-secondary); color: #000; }
.pill-red { background: var(--danger); color: #fff; }

/* Attempts: how many times a construct has physically been tried. Blue when it
   has been, plain when it has not — so a queued-and-untouched construct is
   visually distinct from a queued-and-struggling one at a glance. */
.attempts {
  display: inline-block; min-width: 2.2em; text-align: center;
  padding: 2px 6px; margin-right: 6px; border: 2px solid var(--border);
  font-family: var(--font-mono); font-size: 11px; font-weight: 700;
  background: var(--bg-panel); color: var(--text-secondary);
}
.attempts-some { background: var(--info); color: #fff; }

/* The hard numbers above a construct table. */
.facts { display: flex; gap: 20px; flex-wrap: wrap; align-items: baseline; margin: 0 0 14px; }
.fact { font-family: var(--font-mono); font-size: 12px; }
.fact-k { color: var(--text-secondary); text-transform: uppercase; letter-spacing: .04em; }
.fact-v { font-weight: 700; font-size: 15px; margin-left: 6px; }
.fact-head { font-weight: 700; min-width: 34ch; }

/* ---- oligo pool: receipt controls + oligo table ---- */
.btn-sm { padding: 6px 12px; font-size: 11px; }
.btn-on { background: var(--accent-secondary); color: #000; }
.btn[disabled] { cursor: default; opacity: 0.55; box-shadow: none; }
.pool-status { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.status-actions { display: flex; gap: 8px; margin-left: auto; }
#pool-oligos td[title] { font-family: var(--font-mono); white-space: nowrap; }

/* ---- status pill + hover tooltip (shows the full lifecycle) ---- */
.status-wrap { position: relative; display: inline-block; cursor: help; }
.status-tip {
  display: none; position: absolute; z-index: 20; left: 0; top: calc(100% + 6px);
  background: var(--bg-panel); border: 2px solid var(--border); box-shadow: var(--shadow-hard);
  padding: 8px 10px; min-width: 148px; font-size: 11px; line-height: 1.7; white-space: nowrap;
}
.status-wrap:hover .status-tip { display: block; }
.tip-head { text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-secondary); font-size: 10px; margin-bottom: 4px; }
.tip-row { color: var(--text-secondary); }
.tip-now { color: var(--accent); font-weight: 700; }

/* ---- construct meta row + sequence ---- */
.meta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; }
.meta-item { display: inline-flex; align-items: center; gap: 8px; }
.meta-k { text-transform: uppercase; font-size: 10px; letter-spacing: 0.06em; color: var(--text-secondary); }
.meta-v { font-weight: 700; }
.seq {
  font-family: var(--font-mono); font-size: 12px; line-height: 1.55;
  background: var(--bg-app); border: 1.5px solid var(--border);
  padding: 12px; margin: 0; max-height: 320px; overflow: auto;
  white-space: pre-wrap; word-break: break-all;
}

/* ---- admin ---- */
.admin-banner {
  display: inline-block; background: var(--accent); color: #fff;
  font-weight: 700; font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em;
  padding: 6px 12px; border: 2px solid var(--border); box-shadow: var(--shadow-hard); margin-bottom: 20px;
}

/* ---- misc ---- */
.tagline { color: var(--text-secondary); max-width: 46ch; }
.msg { margin-top: 14px; font-size: 13px; }
.msg-err { color: var(--accent); font-weight: 700; }
.msg-ok { color: var(--accent-secondary); font-weight: 700; }
.hidden { display: none; }
.spacer-lg { height: 64px; }

/* ---- phones ---------------------------------------------------------------

The desktop layout puts a fixed 224px sidebar beside the content. On a 390px
screen that is well over half the width, and the hero's own 96px side padding
then overflows what is left. Below this width the sidebar becomes a bar above
the content and the hero shrinks to fit.                                     */
@media (max-width: 720px) {
  .layout { flex-direction: column; min-height: 100vh; }
  .sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 2px solid var(--border);
  }
  /* Nav items sit in a row and wrap, instead of a tall stack that would push
     the content off the first screen. */
  .side-nav { flex-direction: row; flex-wrap: wrap; padding: 12px; gap: 8px; }
  .nav-item { width: auto; flex: 0 1 auto; }
  .side-foot { padding: 12px; }

  .center { min-height: 0; padding: 24px 16px; }
  .hero { width: 100%; }
  /* Sized so the name stays on one line down to a 320px screen; the <wbr> in
     the markup is the fallback if it ever cannot. */
  .hero-name { font-size: clamp(18px, 6.2vw, 44px); }
  .hero-logo { width: 96px; height: 96px; margin: 24px auto; }
  .hero-stat { font-size: clamp(18px, 5.5vw, 32px); }
  .hero .btn { margin-top: 28px; }

  /* Tables are the other thing that cannot shrink: let them scroll sideways
     inside their panel rather than stretching the page. */
  .panel { padding: 16px; }
  .panel table { display: block; overflow-x: auto; }
}

/* section headings inside a panel (e.g. Colonies) need air above them */
.panel h3 { margin: 22px 0 8px; }

/* colony picking: the spot under review beside its details, and plate maps */
.pick-review { display: flex; gap: 20px; flex-wrap: wrap; align-items: flex-start; }
.pick-review canvas { width: 480px; max-width: 100%; border: 2px solid var(--border); cursor: crosshair; background: #000; }
.pick-side { flex: 1 1 280px; min-width: 0; }
.pick-view { display: flex; flex-direction: column; gap: 8px; }
.pick-review canvas.by-hand { cursor: copy; border-color: #00cc66; }
.pk-map td[data-item] { cursor: pointer; }
.pick-grid .pk-here { background: var(--accent); outline: 2px solid var(--border); }
.pick-grid .pk-todo { background: var(--bg-app); border-color: var(--accent); }
.pick-sources .btn b { color: var(--accent); }
.pick-plates { display: flex; gap: 16px; flex-wrap: wrap; }
.pick-grid { width: auto; border-collapse: separate; border-spacing: 2px; }
.pick-grid td { width: 14px; height: 14px; padding: 0; border: 1px solid var(--border); font-size: 9px; line-height: 12px; text-align: center; }
.pick-grid .pk-fill { background: var(--accent-secondary); }
.pick-grid .pk-backfill { background: var(--accent); color: #fff; }
.pick-grid .pk-empty { background: var(--bg-app); }

/* pick run detail: destination grids beside the source plate image */
.pr-image { margin: 0 0 16px; }
.pr-grids { display: flex; gap: 20px; flex-wrap: wrap; }
.pr-plate { margin: 0 0 14px; }
.pr-grid { border-collapse: collapse; font-family: var(--font-mono); font-size: 10px; }
.pr-grid th { padding: 1px 3px; font-size: 9px; border: none; }
.pr-grid td { width: 26px; height: 18px; padding: 0; text-align: center; border: 1px solid var(--border); cursor: default; }
.pr-grid td.pr-backfill { background: var(--accent); color: #fff; }
.pr-grid td.pr-missed { text-decoration: line-through; color: var(--danger); }
.pr-grid td.pr-empty { background: #f3f1ea; }
.pr-grid td[data-pick]:hover { outline: 2px solid #000; }
.pr-key { border-left: 6px solid; padding: 0 6px; font-family: var(--font-mono); font-size: 11px; }
.pr-imgwrap { position: relative; }
.pr-imgwrap .plate-img { margin: 0; }
.pr-imgwrap svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.pr-imgwrap circle { fill: none; stroke-width: 3; }
.pr-imgwrap circle.pr-hl { stroke-width: 9; stroke: #000; }
.pr-imgwrap circle.pr-hand { stroke: #00cc66; stroke-width: 3; }
