/* ──────────────────────────────────────────────────────────────
   LingoCell Portal — shared design system
   Laboratory / scientific-journal aesthetic
   ────────────────────────────────────────────────────────────── */

:root {
  /* VaultShield-inspired tokens with LingoCell logo palette */
  --paper:    #F2F2EE;   /* warm cream (matches logo background) */
  --paper-2:  #ECEBE5;
  --paper-3:  #E4E3DC;
  --ink:      #192837;   /* matches logo wordmark */
  --ink-2:    #3A4B5E;
  --muted:    #6B7A8B;
  --rule:     #D7D5CE;
  --rule-2:   #E2E0DA;

  /* Brand accent = teal from logo */
  --signal:    #1F8B96;
  --signal-fg: #156F7A;
  --signal-bg: #DCEFEF;

  /* Secondary accent = coral from logo */
  --coral:     #EC7464;
  --coral-fg:  #C45647;
  --coral-bg:  #FBE2DC;

  /* Background-particle palette (canvas reads these) */
  --cell-a: #1F8B96;     /* teal */
  --cell-b: #5BB3B9;     /* light teal */
  --cell-c: #EC7464;     /* coral */
  --cell-d: #F5A597;     /* soft peach */
  --cell-e: #3A4B5E;     /* deep ink-blue */

  /* Type — Helvetica everywhere; mono kept for code/labels.
     Stack order: real Helvetica Neue (macOS/iOS) → Helvetica
     → Arial (Windows fallback; Helvetica clone) → sans-serif. */
  --f-display: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --f-serif:   "Helvetica Neue", Helvetica, Arial, sans-serif;
  --f-sans:    "Helvetica Neue", Helvetica, Arial, sans-serif;
  --f-mono:    "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  /* Layout */
  --col: 1280px;
  --gutter: 32px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Cross-browser form reset — buttons/inputs inherit font from body
   so Safari/Firefox/Chrome render the same. */
button, input, select, textarea {
  font: inherit;
  color: inherit;
  margin: 0;
}
button {
  appearance: none;
  -webkit-appearance: none;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}
img, svg { display: block; max-width: 100%; }

/* Selection */
::selection { background: var(--signal); color: var(--paper); }

/* ── Typography ───────────────────────────────────────────── */
.serif { font-family: var(--f-serif); font-weight: 400; }
.mono  { font-family: var(--f-mono); }
.sc    { font-variant: all-small-caps; letter-spacing: 0.06em; }
.tnum  { font-variant-numeric: tabular-nums; }

h1, h2, h3, h4 { font-family: var(--f-display); font-weight: 700; letter-spacing: -0.015em; margin: 0; }
h1 { font-size: clamp(40px, 6vw, 84px); line-height: 1.02; letter-spacing: -0.025em; }
h2 { font-size: clamp(26px, 3vw, 40px); line-height: 1.1; }
h3 { font-size: 22px; line-height: 1.25; font-weight: 600; }
h4 { font-size: 17px; line-height: 1.3; font-weight: 600; }

p { margin: 0 0 1em 0; text-wrap: pretty; }
a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 3px; text-decoration-thickness: 1px; transition: text-decoration-color .15s; }
a:hover { text-decoration-color: var(--signal); }

hr { border: 0; border-top: 1px solid var(--rule); margin: 0; }
hr.thick { border-top: 2px solid var(--ink); }

/* ── Layout ───────────────────────────────────────────────── */
.wrap { max-width: var(--col); margin: 0 auto; padding: 0 var(--gutter); }

/* ── Top bar ──────────────────────────────────────────────── */
.topbar {
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(8px);
  background: color-mix(in oklch, var(--paper) 92%, transparent);
}
.topbar .inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 56px;
  max-width: var(--col); margin: 0 auto; padding: 0 var(--gutter);
}
.brand {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none; color: var(--ink);
}
.brand .logomark {
  width: 26px; height: 26px;
  border: 1px solid var(--ink);
  display: grid; place-items: center;
  font-family: var(--f-serif); font-size: 16px; font-weight: 500;
  letter-spacing: -0.02em;
}
.brand .wordmark { font-family: var(--f-serif); font-size: 18px; letter-spacing: -0.01em; }
.brand .wordmark em { font-style: italic; color: var(--cyto-fg); }
.brand .tag { font-family: var(--f-mono); font-size: 10px; color: var(--muted); padding-left: 10px; border-left: 1px solid var(--rule); margin-left: 4px; }

.nav { display: flex; align-items: center; gap: 28px; }
.nav a { font-size: 13px; text-decoration: none; color: var(--ink-2); }
.nav a:hover { color: var(--ink); }
.nav a.active { color: var(--ink); }
.nav .lab-link { font-family: var(--f-mono); font-size: 11px; padding: 5px 9px; border: 1px solid var(--rule); border-radius: 999px; color: var(--ink); }
.nav .lab-link::after { content: " ↗"; color: var(--muted); }
.nav .lab-link:hover { border-color: var(--ink); }

/* ── Section primitives ───────────────────────────────────── */
section { padding: 96px 0; border-top: 1px solid var(--rule); }
section:first-of-type { border-top: 0; }

.section-head {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 48px;
  margin-bottom: 56px;
}
.section-head .label {
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding-top: 8px;
  border-top: 1px solid var(--ink);
}
.section-head .label .num { color: var(--ink); }

/* ── Eyebrow / kicker ─────────────────────────────────────── */
.kicker {
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ── Buttons / pills ──────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 18px;
  font-family: var(--f-sans);
  font-size: 13px;
  text-decoration: none;
  color: var(--paper);
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 999px;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.btn:hover { background: var(--cyto-fg); border-color: var(--cyto-fg); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--paper-2); color: var(--ink); }
.btn .arrow { font-family: var(--f-mono); }

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--f-mono); font-size: 10.5px;
  padding: 3px 9px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  color: var(--ink-2);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--cyto); }
.pill.dapi .dot { background: var(--dapi); }
.pill.amber .dot { background: var(--amber); }
.pill.crimson .dot { background: var(--crimson); }

/* ── Cards / panels ───────────────────────────────────────── */
.panel {
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 28px;
  border-radius: 4px;
}
.panel.tinted { background: var(--paper-2); }

/* ── Spec table (regulatory / scientific look) ────────────── */
.spec {
  width: 100%; border-collapse: collapse;
  font-size: 13.5px;
}
.spec th, .spec td {
  text-align: left;
  padding: 12px 0;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}
.spec th {
  font-weight: 500;
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  width: 200px;
  padding-right: 24px;
}
.spec td .sub { color: var(--muted); font-size: 12.5px; }

/* ── Footer ───────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--ink);
  padding: 48px 0 60px;
  background: var(--paper);
}
footer .row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
}
footer h5 {
  font-family: var(--f-mono); font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--muted); margin: 0 0 14px 0; font-weight: 500;
}
footer ul { list-style: none; margin: 0; padding: 0; }
footer li { margin-bottom: 8px; font-size: 13.5px; }
footer .colophon { margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--rule); display: flex; justify-content: space-between; align-items: center; font-family: var(--f-mono); font-size: 11px; color: var(--muted); }

/* ── Placeholder figure (striped) ─────────────────────────── */
.fig-placeholder {
  position: relative;
  background:
    repeating-linear-gradient(
      135deg,
      var(--paper-2) 0 8px,
      var(--paper-3) 8px 9px
    );
  border: 1px solid var(--rule);
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--muted);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 12px;
}
.fig-placeholder .caption {
  background: var(--paper);
  padding: 6px 10px;
  border: 1px solid var(--rule);
  letter-spacing: 0.04em;
}

/* ── Process flow diagram ─────────────────────────────────── */
.flow {
  display: grid; grid-auto-flow: column;
  align-items: stretch;
  gap: 0;
  font-family: var(--f-mono); font-size: 11px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  overflow: hidden;
}
.flow .step {
  padding: 18px 16px;
  border-right: 1px dashed var(--rule);
  background: var(--paper);
  position: relative;
}
.flow .step:last-child { border-right: 0; }
.flow .step .idx {
  font-size: 10px; color: var(--muted); letter-spacing: 0.1em;
  margin-bottom: 8px;
}
.flow .step .name { font-size: 13px; color: var(--ink); font-family: var(--f-sans); font-weight: 500; }
.flow .step .meta { color: var(--muted); margin-top: 6px; }

/* ── Code/sample blocks ───────────────────────────────────── */
pre, code { font-family: var(--f-mono); }
pre.code {
  margin: 0;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 16px 18px;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--ink);
  overflow-x: auto;
  white-space: pre;
}
pre.code .c { color: var(--muted); }     /* comment */
pre.code .k { color: var(--dapi); }      /* keyword */
pre.code .s { color: var(--cyto-fg); }   /* string */
pre.code .n { color: var(--amber); }     /* number */

.tag-line {
  font-family: var(--f-mono); font-size: 11px;
  color: var(--muted); letter-spacing: 0.06em;
  display: flex; gap: 14px; align-items: center;
}
.tag-line .sep { color: var(--rule); }

/* ── Hairlines for marginalia ─────────────────────────────── */
.aside {
  border-left: 1px solid var(--rule);
  padding-left: 16px;
  color: var(--muted);
  font-size: 12.5px;
}

/* ── Utilities ────────────────────────────────────────────── */
.stack > * + * { margin-top: var(--gap, 24px); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

@media (max-width: 900px) {
  .section-head { grid-template-columns: 1fr; gap: 16px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  footer .row { grid-template-columns: 1fr 1fr; }
}
