/* ──────────────────────────────────────────────────────────────
   LingoCell portal: components for the service pages
   Loaded after styles.css and nav.css on every page except the guides.

   Rules of this file
   - Every selector hangs on an lc-* class (tokens on :root are the one exception),
     so nothing here can restyle the existing pages.
   - Written for a 390 px screen first; wider layouts are added with min-width.
   - A solid colour is declared before every color-mix(), for browsers without it.
   - No url(): the page policy allows images from this origin only, and none are needed.
   ────────────────────────────────────────────────────────────── */

:root {
  /* State colours. Text colours are checked against the paper tones in tests-js/test_css.js. */
  --danger-fg: #A63D2F;
  --danger-bg: #FBE2DC;
  --warn-fg: #7A4F00;
  --warn-bg: #FBF0D9;
  --ok-fg: #156F7A;
  --ok-bg: #DCEFEF;
  --muted-strong: #586675;   /* small grey text: --muted is only 3.9:1 on paper */

  --lc-teal: #1B7F8A;        /* button fill: white on it is 4.7:1 (on --signal it is 4.0:1) */
  --lc-edge: #7C858E;        /* input borders: at least 3:1 against paper and paper-2 */
  --lc-line: #C2C6C6;        /* hairlines that sit on the tinted page background, where --rule disappears */
  --lc-on-dark: #F2F2EE;
  --lc-on-dark-2: #C4CBD2;
  --lc-teal-on-dark: #7CC9CE;
  --lc-f-zh: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", sans-serif;
  --lc-ring: 0 0 0 3px rgba(31, 139, 150, 0.3);
  --lc-ring-danger: 0 0 0 3px rgba(166, 61, 47, 0.18);
  --lc-shadow: 0 12px 36px rgba(25, 40, 55, 0.12);
  --lc-nav-h: 73px;          /* app.js measures the real navbar and overwrites this */
}

/* ── Legacy leaks, switched off for lc elements ───────────────
   styles.css styles bare <section> and <footer>. :where() keeps this rule as weak as one
   class, so every component below can still set its own padding and borders. */
[class*="lc-"]:where(section) { padding: 0; border-top: 0; }
[class*="lc-"]:where(footer) { padding: 0; border-top: 0; background: none; }
[class*="lc-"][hidden] { display: none !important; }

/* ── Page ─────────────────────────────────────────────────── */

/* Service pages run no canvas animation. This paints the same colour masses once, and paler:
   text sits directly on this background, so every tone of it must keep the grey and teal text
   colours at 4.5:1 or better. tests-js/test_css.js computes that from these very numbers for
   phone, tablet and desktop viewports; on screenshots the darkest tone measured #DCE5E3. */
.lc-bg::before {
  content: "";
  position: fixed; inset: 0; z-index: -1;
  pointer-events: none;
  background-color: var(--paper);
  background-image:
    radial-gradient(circle 95vmin at 2% 2%, rgba(31, 139, 150, 0.11), rgba(31, 139, 150, 0.035) 45%, rgba(31, 139, 150, 0) 100%),
    radial-gradient(circle 95vmin at 98% 2%, rgba(91, 179, 185, 0.13), rgba(91, 179, 185, 0.04) 45%, rgba(91, 179, 185, 0) 100%),
    radial-gradient(circle 95vmin at 62% 104%, rgba(236, 116, 100, 0.11), rgba(236, 116, 100, 0.035) 45%, rgba(236, 116, 100, 0) 100%),
    radial-gradient(circle 95vmin at 100% 72%, rgba(245, 165, 151, 0.11), rgba(245, 165, 151, 0.035) 45%, rgba(245, 165, 151, 0) 100%),
    radial-gradient(circle 95vmin at 22% 70%, rgba(58, 75, 94, 0.04), rgba(58, 75, 94, 0.012) 45%, rgba(58, 75, 94, 0) 100%);
  background-blend-mode: multiply;
}

.lc-shell { max-width: 1080px; margin: 0 auto; padding: 28px 16px 64px; }
.lc-shell--narrow { max-width: 560px; }
/* One 440 px column for sign-in: opener, notices and the card share their edges */
.lc-shell--narrow > * { max-width: 440px; margin-left: auto; margin-right: auto; }
.lc-shell--wide { max-width: 1280px; }

.lc-hero {
  padding-bottom: 24px; margin-bottom: 28px;
  border-bottom: 1px solid var(--lc-line);
}
.lc-eyebrow {
  font-family: var(--f-mono); font-size: 11px;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--signal-fg);
  display: inline-flex; align-items: center; gap: 12px;
}
.lc-eyebrow::before { content: ""; width: 36px; height: 1px; background: var(--signal); flex: none; }
.lc-title {
  font-family: var(--f-display); font-weight: 700;
  font-size: clamp(36px, 5.5vw, 76px);
  line-height: 1.04; letter-spacing: -0.012em;
  margin: 14px 0 0; color: var(--ink);
  overflow-wrap: anywhere;
}
.lc-title em { font-style: italic; font-weight: 700; color: var(--signal-fg); }
.lc-title--sm { font-size: clamp(30px, 4.2vw, 52px); }
.lc-lede {
  font-size: clamp(16.5px, 1.5vw, 19px); line-height: 1.5;
  color: var(--ink-2); margin: 16px 0 0; max-width: 640px;
}
.lc-heading { font-family: var(--f-display); font-weight: 400; font-size: 22px; line-height: 1.25; letter-spacing: -0.01em; margin: 0; color: var(--ink); }

/* Small text helpers */
.lc-caps {
  font-family: var(--f-mono); font-size: 11px; font-weight: 400;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted-strong);
}
.lc-mono { font-family: var(--f-mono); font-size: 12.5px; }
.lc-muted { color: var(--muted-strong); }
.lc-num { font-variant-numeric: tabular-nums; }
.lc-break { overflow-wrap: anywhere; word-break: break-word; }
.lc-nowrap { white-space: nowrap; }
.lc-sr {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
.lc-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.lc-row--end { justify-content: flex-end; }
.lc-row--between { justify-content: space-between; }

.lc-link {
  color: var(--signal-fg);
  text-decoration: underline; text-decoration-color: var(--signal); text-underline-offset: 3px; text-decoration-thickness: 1px;
}
.lc-link:hover { color: var(--ink); text-decoration-color: var(--ink); }

/* ── Chinese helper lines ─────────────────────────────────────
   Hidden unless <html class="lc-zh-on"> (app.js: a Chinese browser, or the footer switch).
   Always shown on consent and attestation boxes. */
.lc-zh {
  display: none;
  font-family: var(--lc-f-zh); font-size: 12.5px; line-height: 1.65;
  color: var(--ink-2);
  margin: 4px 0 0;
}
.lc-zh-on .lc-zh, .lc-zh--always, .lc-check--box .lc-zh { display: block; }
.lc-zh-toggle {
  font-family: var(--lc-f-zh); font-size: 11px; letter-spacing: 0.04em; text-transform: none;
  color: var(--muted-strong);
  padding: 4px 10px; margin-left: 18px;
  border: 1px solid var(--rule); border-radius: 999px;
  transition: background .15s, color .15s, border-color .15s;
}
.lc-zh-toggle:hover { border-color: var(--ink); color: var(--ink); }
.lc-zh-toggle[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }

/* ── Focus ────────────────────────────────────────────────── */
.lc-btn:focus-visible, .lc-link:focus-visible, .lc-linkbtn:focus-visible, .lc-tab:focus-visible, .lc-filter:focus-visible,
.lc-seg__item:focus-visible, .lc-option:focus-visible, .lc-user__btn:focus-visible, .lc-user__item:focus-visible,
.lc-sheet-link:focus-visible, .lc-zh-toggle:focus-visible, .lc-banner__close:focus-visible, .lc-details > summary:focus-visible,
.lc-jobrow__id:focus-visible, .lc-nav-pill:focus-visible, .lc-sheet-signin:focus-visible {
  outline: 2px solid var(--signal-fg);
  outline-offset: 2px;
}

/* ── Buttons ──────────────────────────────────────────────── */
.lc-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 20px;
  font-family: var(--f-sans); font-size: 14.5px; font-weight: 600; line-height: 1.2; letter-spacing: -0.005em;
  text-decoration: none; text-align: center; white-space: nowrap;
  color: var(--ink);
  background: var(--paper-2);
  border: 1px solid transparent; border-radius: 999px;
  cursor: pointer;
  transition: transform .15s, filter .15s, background .15s, color .15s, border-color .15s;
}
.lc-btn .lc-ar { font-family: var(--f-mono); font-weight: 500; }
.lc-btn--primary { background: var(--lc-teal); color: #fff; }
.lc-btn--primary:hover { color: #fff; filter: brightness(1.08); transform: translateY(-1px); }
.lc-btn--secondary { background: var(--paper-2); color: var(--ink); border-color: var(--rule); }
.lc-btn--secondary:hover { background: var(--paper-3); color: var(--ink); border-color: var(--ink); }
.lc-btn--danger { background: var(--paper); color: var(--danger-fg); border-color: var(--danger-fg); }
.lc-btn--danger:hover { background: var(--danger-fg); color: #fff; }
.lc-btn--ghost { background: transparent; color: var(--ink); padding-left: 12px; padding-right: 12px; }
.lc-btn--ghost:hover { background: var(--paper-2); color: var(--ink); }
.lc-btn--on-dark { background: var(--paper); color: var(--ink); }
.lc-btn--on-dark:hover { color: var(--ink); transform: translateY(-2px); }
.lc-btn--sm { min-height: 34px; padding: 6px 14px; font-size: 13px; }
.lc-btn--block { display: flex; width: 100%; }
.lc-btn:active { transform: scale(0.98); }
.lc-btn:disabled, .lc-btn[aria-disabled="true"] {
  opacity: 0.5; cursor: not-allowed; transform: none; filter: none;
}
.lc-btn--secondary:disabled:hover, .lc-btn--secondary[aria-disabled="true"]:hover { background: var(--paper-2); border-color: var(--rule); }
.lc-btn--danger:disabled:hover, .lc-btn--danger[aria-disabled="true"]:hover { background: var(--paper); color: var(--danger-fg); }
.lc-btn[aria-busy="true"] { opacity: 0.8; cursor: progress; }
.lc-btn[aria-busy="true"]::before {
  content: ""; width: 14px; height: 14px; flex: none;
  border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%;
  animation: lc-spin .7s linear infinite;
}
@keyframes lc-spin { to { transform: rotate(360deg); } }

/* A button that reads as a link: "Use a different email", "Resend code". */
.lc-linkbtn {
  font-size: inherit; color: var(--signal-fg);
  text-decoration: underline; text-decoration-color: var(--signal); text-underline-offset: 3px; text-decoration-thickness: 1px;
}
.lc-linkbtn:hover { color: var(--ink); text-decoration-color: var(--ink); }
.lc-linkbtn:disabled { color: var(--muted-strong); text-decoration: none; cursor: not-allowed; }

.lc-spinner {
  display: inline-block; width: 16px; height: 16px; vertical-align: -3px;
  border: 2px solid var(--signal-fg); border-right-color: transparent; border-radius: 50%;
  animation: lc-spin .7s linear infinite;
}

/* ── Surfaces ─────────────────────────────────────────────── */
.lc-card {
  background: var(--paper);
  background: color-mix(in oklch, var(--paper) 88%, transparent);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border: 1px solid var(--rule);
  border: 1px solid color-mix(in oklch, var(--rule) 85%, transparent);
  border-radius: 6px;
}
.lc-card--pad { padding: 22px 18px; }
.lc-card__foot {
  padding: 14px 18px;
  border-top: 1px solid var(--rule);
  border-top: 1px solid color-mix(in oklch, var(--rule) 60%, transparent);
  font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.06em; color: var(--muted-strong);
}
.lc-card__foot a { color: var(--muted-strong); text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 3px; }
.lc-card__foot a:hover { color: var(--ink); }

/* Sign-in card: 440 px wide wherever it stands */
.lc-auth { max-width: 440px; margin-left: auto; margin-right: auto; }

/* Numbered block inside a card: "01  Input  one .h5ad file, up to 200 MB" */
.lc-block {
  padding: 24px 18px;
  border-bottom: 1px solid var(--rule);
  border-bottom: 1px solid color-mix(in oklch, var(--rule) 60%, transparent);
}
.lc-block:last-child { border-bottom: 0; }
.lc-block__head { display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: 4px 14px; margin-bottom: 18px; }
.lc-block__num { font-family: var(--f-mono); font-size: 11px; color: var(--muted-strong); letter-spacing: 0.18em; text-transform: uppercase; }
.lc-block__name { font-family: var(--f-display); font-weight: 400; font-size: 22px; line-height: 1.2; letter-spacing: -0.01em; margin: 0; color: var(--ink); }
.lc-block__hint { grid-column: 1 / -1; font-family: var(--f-mono); font-size: 11px; color: var(--muted-strong); letter-spacing: 0.06em; }

/* Dark band at the foot of a card: summary on the left, the action on the right */
.lc-band {
  display: grid; gap: 16px; align-items: center;
  padding: 22px 18px;
  background: var(--ink);
  background: color-mix(in oklch, var(--ink) 96%, transparent);
  color: var(--lc-on-dark);
  border-radius: 0 0 5px 5px;   /* nests inside the 6 px corner of a card with its 1 px border */
}
.lc-band--alone { border-radius: 6px; }
.lc-band__text { font-family: var(--f-mono); font-size: 11.5px; letter-spacing: 0.06em; line-height: 1.6; color: var(--lc-on-dark-2); margin: 0; }
.lc-band__text b { color: var(--lc-on-dark); font-weight: 500; }
.lc-band__accent { color: var(--lc-teal-on-dark); }
.lc-band .lc-zh { color: var(--lc-on-dark-2); }
.lc-band .lc-btn:focus-visible { outline-color: var(--lc-teal-on-dark); }

/* "or continue with" */
.lc-divider {
  display: flex; align-items: center; gap: 16px;
  font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--muted-strong); margin: 24px 0; white-space: nowrap;
}
.lc-divider::before, .lc-divider::after { content: ""; flex: 1; height: 1px; background: var(--lc-line); }

/* A notice with weight, e.g. the mainland-China data restriction */
.lc-notice {
  padding: 14px 16px;
  border-left: 3px solid var(--warn-fg);
  background: var(--warn-bg);
  background: color-mix(in oklch, var(--warn-bg) 80%, transparent);
  font-size: 13.5px; line-height: 1.55; color: var(--ink);
}
.lc-notice p { margin: 0; }
.lc-notice p + p { margin-top: 6px; }
.lc-notice--info { border-left-color: var(--signal-fg); background: var(--ok-bg); background: color-mix(in oklch, var(--ok-bg) 70%, transparent); }
.lc-notice__title { display: block; font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--warn-fg); margin-bottom: 6px; }
.lc-notice--info .lc-notice__title { color: var(--signal-fg); }

.lc-checklist { list-style: none; margin: 0; padding: 0; font-size: 13.5px; line-height: 1.5; color: var(--ink-2); }
.lc-checklist li { position: relative; padding-left: 22px; }
.lc-checklist li + li { margin-top: 6px; }
.lc-checklist li::before {
  content: ""; position: absolute; left: 2px; top: 0.42em;
  width: 9px; height: 5px;
  border-left: 1.5px solid var(--signal-fg); border-bottom: 1.5px solid var(--signal-fg);
  transform: rotate(-45deg);
}

/* ── Banners ──────────────────────────────────────────────── */
.lc-banners { position: relative; z-index: 40; }
.lc-banners--sticky { position: sticky; top: var(--lc-nav-h); }
.lc-banner {
  display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px 14px;
  padding: 12px 16px;
  font-size: 14px; line-height: 1.5;
  color: var(--ink);
  background: var(--ok-bg);
  border: 1px solid #B9DCDD;
  border-left: 3px solid var(--signal-fg);
  border-radius: 4px;
}
.lc-banners > .lc-banner { border-radius: 0; border-width: 0 0 1px 3px; padding-left: 16px; }
.lc-banner__body { flex: 1 1 240px; min-width: 0; }
.lc-banner__text, .lc-banner p { margin: 0; overflow-wrap: anywhere; }
.lc-banner__text + .lc-banner__text { margin-top: 4px; }
.lc-banner__tag {
  flex: none; align-self: flex-start;
  font-family: var(--f-mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 3px 8px; margin-top: 1px;
  border: 1px solid currentColor; border-radius: 999px;
  color: var(--signal-fg);
}
.lc-banner__actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.lc-banner__close {
  flex: none; width: 28px; height: 28px; border-radius: 50%;
  font-family: var(--f-mono); font-size: 16px; line-height: 1; color: var(--ink-2);
}
.lc-banner__close:hover { background: rgba(25, 40, 55, 0.08); color: var(--ink); }
.lc-banner--warn { background: var(--warn-bg); border-color: #E7D3A0; border-left-color: var(--warn-fg); }
.lc-banner--warn .lc-banner__tag { color: var(--warn-fg); }
.lc-banner--error { background: var(--danger-bg); border-color: #EFC0B6; border-left-color: var(--danger-fg); }
.lc-banner--error .lc-banner__tag { color: var(--danger-fg); }
.lc-banner--test {
  background-color: var(--ink);
  background-image: repeating-linear-gradient(135deg, rgba(242, 242, 238, 0.06) 0 8px, rgba(242, 242, 238, 0) 8px 16px);
  border-color: var(--ink); border-left-color: var(--coral);
  color: var(--lc-on-dark);
}
.lc-banner--test .lc-banner__tag { color: var(--ink); background: var(--coral); border-color: var(--coral); font-weight: 500; }
.lc-banner--test .lc-zh { color: var(--lc-on-dark-2); }
.lc-banner--test .lc-banner__close { color: var(--lc-on-dark-2); }
.lc-noscript { margin: 0; padding: 12px 16px; background: var(--warn-bg); border-bottom: 1px solid var(--warn-fg); color: var(--ink); font-size: 14px; }

/* ── Form fields ──────────────────────────────────────────── */
.lc-field { display: grid; gap: 6px; }
.lc-field + .lc-field { margin-top: 18px; }
.lc-label {
  font-family: var(--f-mono); font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink);
}
.lc-label__opt { color: var(--muted-strong); text-transform: none; letter-spacing: 0.02em; }
/* A label that is a sentence ("Enter the 6-digit code we sent to you@institute.org"): no capitals */
.lc-label--text { font-family: var(--f-sans); font-size: 14px; font-weight: 600; letter-spacing: 0; text-transform: none; line-height: 1.45; overflow-wrap: anywhere; }
.lc-hint { font-size: 12.5px; line-height: 1.45; color: var(--muted-strong); margin: 0; }
.lc-counter { font-family: var(--f-mono); font-size: 11px; color: var(--muted-strong); text-align: right; margin: 0; }
.lc-error {
  display: flex; align-items: baseline; gap: 8px;
  font-size: 13px; line-height: 1.45; color: var(--danger-fg); margin: 0;
}
.lc-error::before {
  content: "!"; flex: none;
  width: 15px; height: 15px; border: 1px solid currentColor; border-radius: 50%;
  display: inline-grid; place-items: center;
  font-family: var(--f-mono); font-size: 10px; font-weight: 500; line-height: 1;
  transform: translateY(1px);
}
.lc-saved { font-size: 13px; color: var(--ok-fg); margin: 0; }
/* LC.setFieldError marks the field; its label joins the error line in colour */
.lc-field--invalid > .lc-label { color: var(--danger-fg); }

.lc-input, .lc-select, .lc-textarea {
  width: 100%; min-height: 44px;
  padding: 10px 12px;
  font-family: var(--f-sans); font-size: 16px; line-height: 1.35;
  color: var(--ink);
  background-color: var(--paper);
  background-color: color-mix(in oklch, var(--paper) 92%, transparent);
  border: 1px solid var(--lc-edge);
  border-radius: 3px;
  transition: border-color .15s, box-shadow .15s;
}
.lc-textarea { min-height: 96px; resize: vertical; }
.lc-input::placeholder, .lc-textarea::placeholder { color: var(--muted-strong); opacity: 1; }
.lc-input:hover, .lc-select:hover, .lc-textarea:hover { border-color: var(--ink); }
.lc-input:focus, .lc-select:focus, .lc-textarea:focus {
  outline: 2px solid transparent;
  border-color: var(--signal-fg); box-shadow: var(--lc-ring);
}
.lc-input[aria-invalid="true"], .lc-select[aria-invalid="true"], .lc-textarea[aria-invalid="true"] { border-color: var(--danger-fg); }
.lc-input[aria-invalid="true"]:focus, .lc-select[aria-invalid="true"]:focus, .lc-textarea[aria-invalid="true"]:focus { box-shadow: var(--lc-ring-danger); }
.lc-input:disabled, .lc-select:disabled, .lc-textarea:disabled {
  background-color: var(--paper-3); color: var(--muted-strong); border-color: var(--rule); cursor: not-allowed;
}
.lc-input--mono { font-family: var(--f-mono); }
/* The six-digit sign-in code */
.lc-input--code {
  font-family: var(--f-mono); font-size: 26px; font-variant-numeric: tabular-nums;
  letter-spacing: 0.4em; text-align: center;
  padding: 12px 8px 12px calc(8px + 0.4em);
  max-width: 280px;
}
.lc-select {
  appearance: none; -webkit-appearance: none;
  padding-right: 38px;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--ink-2) 50%),
    linear-gradient(135deg, var(--ink-2) 50%, transparent 50%);
  background-position: calc(100% - 19px) 50%, calc(100% - 14px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

/* Parameter row: label and hint, control, echo of the value */
.lc-param { display: grid; gap: 8px; padding: 12px 0; }
.lc-param + .lc-param { border-top: 1px dashed var(--lc-line); }
.lc-param__label { font-family: var(--f-mono); font-size: 11.5px; letter-spacing: 0.04em; color: var(--ink); }
.lc-param__hint { font-family: var(--f-mono); font-size: 10.5px; line-height: 1.5; color: var(--muted-strong); margin: 3px 0 0; }
.lc-param__val { display: none; font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.06em; color: var(--muted-strong); text-align: right; }

/* Segmented control (enum with up to four choices) */
.lc-seg {
  display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px;
  background: var(--paper);
  background: color-mix(in oklch, var(--paper) 80%, transparent);
  border: 1px solid var(--lc-edge); border-radius: 999px;
}
.lc-seg__item {
  min-height: 32px; padding: 6px 14px; border-radius: 999px;
  font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.06em;
  color: var(--muted-strong);
  transition: background .15s, color .15s;
}
.lc-seg__item:hover { color: var(--ink); }
.lc-seg__item[aria-checked="true"], .lc-seg__item[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.lc-seg__item:disabled { opacity: 0.5; cursor: not-allowed; }

/* Checkbox with its label; .lc-check--box is the consent / attestation box */
.lc-check { display: grid; grid-template-columns: 20px 1fr; gap: 12px; align-items: start; cursor: pointer; font-size: 14px; line-height: 1.5; color: var(--ink); }
.lc-check input[type="checkbox"] {
  appearance: none; -webkit-appearance: none;
  width: 20px; height: 20px; margin: 1px 0 0;
  border: 1.5px solid var(--ink-2); border-radius: 3px;
  background: var(--paper);
  display: inline-grid; place-content: center;
  cursor: pointer;
  transition: background .12s, border-color .12s;
}
.lc-check input[type="checkbox"]::before {
  content: ""; width: 10px; height: 5px;
  border-left: 2px solid #fff; border-bottom: 2px solid #fff;
  transform: translateY(-1px) rotate(-45deg) scale(0);
  transition: transform .12s;
}
.lc-check input[type="checkbox"]:checked { background: var(--lc-teal); border-color: var(--lc-teal); }
.lc-check input[type="checkbox"]:checked::before { transform: translateY(-1px) rotate(-45deg) scale(1); }
.lc-check input[type="checkbox"]:focus-visible { outline: 2px solid var(--signal-fg); outline-offset: 2px; }
.lc-check input[type="checkbox"]:disabled { opacity: 0.5; cursor: not-allowed; }
.lc-check__text p { margin: 0; }
.lc-check--box {
  padding: 14px 14px;
  border: 1px solid var(--rule); border-radius: 4px;
  background: var(--paper);
  background: color-mix(in oklch, var(--paper) 70%, transparent);
  font-size: 13.5px;
  transition: border-color .15s, background .15s;
}
.lc-check--box + .lc-check--box { margin-top: 10px; }
.lc-check--box:hover { border-color: var(--ink); }
.lc-check--box:has(input:checked) {
  border-color: var(--signal);
  background: var(--ok-bg);
  background: color-mix(in oklch, var(--ok-bg) 55%, transparent);
}

/* On/off switch (boolean parameter, notification setting) */
.lc-switch { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; font-size: 14px; color: var(--ink); }
.lc-switch input[type="checkbox"] {
  appearance: none; -webkit-appearance: none;
  position: relative; flex: none;
  width: 40px; height: 24px; margin: 0;
  border-radius: 999px; background: var(--lc-edge);
  cursor: pointer; transition: background .15s;
}
.lc-switch input[type="checkbox"]::before {
  content: ""; position: absolute; left: 3px; top: 3px;
  width: 18px; height: 18px; border-radius: 50%; background: #fff;
  transition: transform .15s;
}
.lc-switch input[type="checkbox"]:checked { background: var(--lc-teal); }
.lc-switch input[type="checkbox"]:checked::before { transform: translateX(16px); }
.lc-switch input[type="checkbox"]:focus-visible { outline: 2px solid var(--signal-fg); outline-offset: 2px; }
.lc-switch input[type="checkbox"]:disabled { opacity: 0.5; cursor: not-allowed; }

/* Radio cards: tasks */
.lc-options { display: grid; gap: 10px; }
.lc-option {
  display: grid; grid-template-columns: 16px 1fr; gap: 6px 14px; align-items: start;
  width: 100%; padding: 16px 16px; text-align: left;
  color: var(--ink);
  background: var(--paper);
  background: color-mix(in oklch, var(--paper) 70%, transparent);
  border: 1px solid var(--rule);
  border: 1px solid color-mix(in oklch, var(--ink) 22%, transparent);
  border-radius: 4px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.lc-option:hover { border-color: var(--ink); }
.lc-option__dot { width: 14px; height: 14px; margin-top: 4px; border-radius: 50%; border: 1.5px solid var(--ink-2); display: grid; place-items: center; }
.lc-option[aria-checked="true"] {
  border-color: var(--signal);
  background: var(--ok-bg);
  background: color-mix(in oklch, var(--ok-bg) 65%, transparent);
}
.lc-option[aria-checked="true"] .lc-option__dot::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--signal); }
.lc-option__id { display: block; font-family: var(--f-mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted-strong); }
.lc-option__name { display: block; font-size: 18px; line-height: 1.25; letter-spacing: -0.01em; margin-top: 2px; }
.lc-option__desc { display: block; font-size: 12.5px; line-height: 1.45; color: var(--ink-2); margin-top: 6px; }
.lc-option__meta { display: block; grid-column: 2; font-family: var(--f-mono); font-size: 10.5px; color: var(--muted-strong); margin-top: 6px; }
.lc-option__side { grid-column: 2; justify-self: start; }
.lc-option[aria-disabled="true"], .lc-option:disabled { cursor: not-allowed; background: transparent; border-style: dashed; }
.lc-option[aria-disabled="true"]:hover, .lc-option:disabled:hover { border-color: var(--rule); }
.lc-option[aria-disabled="true"] .lc-option__name, .lc-option[aria-disabled="true"] .lc-option__desc,
.lc-option:disabled .lc-option__name, .lc-option:disabled .lc-option__desc { color: var(--muted-strong); }
.lc-option[aria-disabled="true"] .lc-option__dot, .lc-option:disabled .lc-option__dot { border-color: var(--rule); }

/* Drop zone around a real, focusable <input type="file" class="lc-sr"> */
.lc-drop {
  display: block; position: relative;
  padding: 32px 18px; text-align: center; cursor: pointer;
  border: 1.5px dashed var(--lc-edge);
  border: 1.5px dashed color-mix(in oklch, var(--ink) 45%, transparent);
  border-radius: 6px;
  background: var(--paper);
  background: color-mix(in oklch, var(--paper) 55%, transparent);
  transition: border-color .15s, background .15s;
}
.lc-drop:hover, .lc-drop.is-over, .lc-drop:focus-within {
  border-color: var(--signal);
  background: var(--ok-bg);
  background: color-mix(in oklch, var(--ok-bg) 50%, transparent);
}
.lc-drop:focus-within { outline: 2px solid var(--signal-fg); outline-offset: 2px; }
.lc-drop__icon {
  width: 32px; height: 32px; margin: 0 auto 10px;
  border: 1.5px solid var(--ink); border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--f-mono); color: var(--ink);
}
.lc-drop__big { display: block; font-size: 18px; line-height: 1.3; color: var(--ink); }
.lc-drop__small { display: block; font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted-strong); margin-top: 6px; }
.lc-drop[aria-disabled="true"] { cursor: not-allowed; opacity: 0.6; }
.lc-drop[aria-disabled="true"]:hover { border-color: var(--lc-edge); background: var(--paper); }

/* ── Chips ────────────────────────────────────────────────── */
.lc-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--f-mono); font-size: 10.5px; font-weight: 500; line-height: 1.2;
  letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap;
  padding: 4px 10px;
  color: var(--ink-2);
  background: transparent;
  border: 1px solid var(--rule); border-radius: 999px;
}
.lc-chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.lc-chip--neutral::before, .lc-chip--na::before, .lc-chip--test::before { content: none; }
.lc-chip--queued { color: var(--muted-strong); background: var(--paper); border-color: var(--lc-edge); }
.lc-chip--running { color: var(--warn-fg); background: var(--warn-bg); border-color: #E7D3A0; }
.lc-chip--running::before { animation: lc-pulse 1.2s ease-in-out infinite; }
.lc-chip--canceling { color: var(--warn-fg); background: transparent; border-color: var(--warn-fg); border-style: dashed; }
.lc-chip--succeeded, .lc-chip--ok { color: var(--ok-fg); background: var(--ok-bg); border-color: #B9DCDD; }
.lc-chip--failed, .lc-chip--danger { color: var(--danger-fg); background: var(--danger-bg); border-color: #EFC0B6; }
.lc-chip--warn { color: var(--warn-fg); background: var(--warn-bg); border-color: #E7D3A0; }
.lc-chip--canceled, .lc-chip--expired, .lc-chip--unknown { color: var(--muted-strong); background: transparent; border-color: var(--lc-edge); }
.lc-chip--canceled::before, .lc-chip--expired::before, .lc-chip--unknown::before { background: transparent; border: 1px solid currentColor; }
.lc-chip--na { color: var(--muted-strong); background: transparent; border-color: var(--lc-edge); border-style: dashed; }
.lc-chip--test { color: var(--paper); background: var(--ink); border-color: var(--ink); }
@keyframes lc-pulse { 50% { opacity: 0.3; } }

/* Worker status line: "GPU worker online · RTX 4090 · queue empty" */
.lc-strip {
  display: inline-flex; align-items: baseline; gap: 8px;
  font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; line-height: 1.5;
  color: var(--muted-strong);
}
.lc-strip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; flex: none; transform: translateY(-1px); border: 1px solid currentColor; }
.lc-strip--on { color: var(--signal-fg); }
.lc-strip--on::before { background: var(--signal); border-color: var(--signal); animation: lc-pulse 1.2s ease-in-out infinite; }
.lc-strip--warn { color: var(--warn-fg); }
.lc-strip--warn::before { background: var(--warn-fg); }
.lc-strip--test { color: var(--ink); }
.lc-strip--test::before { background: var(--coral); border-color: var(--coral); }

/* ── Progress ─────────────────────────────────────────────── */
.lc-progress { display: grid; gap: 8px; }
.lc-progress__track {
  height: 6px; border-radius: 999px; overflow: hidden;
  background: var(--rule);
  background: color-mix(in oklch, var(--ink) 14%, transparent);
}
.lc-progress__fill { display: block; height: 100%; width: 0; border-radius: 999px; background: var(--signal); transition: width .4s ease-out; }
.lc-progress__meta { display: flex; justify-content: space-between; gap: 12px; font-family: var(--f-mono); font-size: 11.5px; line-height: 1.5; color: var(--ink-2); }
.lc-progress__caption { min-width: 0; overflow-wrap: anywhere; }
.lc-progress__note { flex: none; color: var(--ink); font-variant-numeric: tabular-nums; }
.lc-progress--thin .lc-progress__track { height: 3px; border-radius: 0; }
.lc-progress--warn .lc-progress__fill { background: var(--warn-fg); }
.lc-progress--error .lc-progress__fill { background: var(--danger-fg); }
.lc-progress--done .lc-progress__fill { background: var(--signal-fg); }
/* Work in progress with no percentage reported: a band that travels, never a made-up number */
.lc-progress--indeterminate .lc-progress__fill { width: 32%; animation: lc-travel 1.6s ease-in-out infinite; }
@keyframes lc-travel { 0% { transform: translateX(-110%); } 100% { transform: translateX(330%); } }

/* ── Inline confirm ───────────────────────────────────────── */
.lc-confirm {
  display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px;
  padding: 6px 6px 6px 14px;
  background: var(--paper-2);
  border: 1px solid var(--lc-edge); border-radius: 22px;
  font-size: 13.5px; color: var(--ink);
}
.lc-confirm__q { font-weight: 600; margin-right: 4px; }

/* ── Empty state, skeleton ────────────────────────────────── */
.lc-empty {
  padding: 36px 18px; text-align: center;
  border: 1.5px dashed var(--rule);
  border: 1.5px dashed color-mix(in oklch, var(--ink) 25%, transparent);
  border-radius: 6px;
}
.lc-empty__icon {
  width: 32px; height: 32px; margin: 0 auto 12px;
  border: 1.5px solid var(--muted-strong); border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--f-mono); color: var(--muted-strong);
}
.lc-empty__title { font-size: 18px; line-height: 1.3; color: var(--ink); margin: 0; }
.lc-empty__text { font-size: 13.5px; line-height: 1.5; color: var(--ink-2); margin: 6px auto 0; max-width: 420px; }
.lc-empty .lc-btn { margin-top: 16px; }

.lc-skeleton {
  display: block; height: 14px; border-radius: 3px;
  background-color: var(--paper-3);
  background-image: linear-gradient(90deg, rgba(242, 242, 238, 0) 0, rgba(242, 242, 238, 0.85) 50%, rgba(242, 242, 238, 0) 100%);
  background-size: 220px 100%; background-repeat: no-repeat; background-position: -220px 0;
  animation: lc-shimmer 1.4s ease-in-out infinite;
}
.lc-skeleton + .lc-skeleton { margin-top: 10px; }
.lc-skeleton--title { height: 30px; width: 55%; }
.lc-skeleton--short { width: 38%; }
.lc-skeleton--block { height: 96px; }
@keyframes lc-shimmer { to { background-position: calc(100% + 220px) 0; } }

/* ── Tables ───────────────────────────────────────────────────
   A real <table>. Below 641 px each row becomes a block and every cell shows its
   data-label, so give each <td> one: <td data-label="Submitted">. */
.lc-table-wrap { overflow: hidden; }
/* On its own (inside a block, say) the wrapper draws the frame; on an .lc-card the card does. */
.lc-table-wrap:not(.lc-card) {
  border: 1px solid var(--rule); border-radius: 4px;
  background: var(--paper);
  background: color-mix(in oklch, var(--paper) 96%, transparent);
}
.lc-table { width: 100%; border-collapse: collapse; font-size: 13.5px; line-height: 1.45; }
.lc-table caption { text-align: left; padding: 14px 18px; font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted-strong); }
.lc-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.lc-table tr { display: block; padding: 12px 18px; border-top: 1px solid var(--rule); border-top: 1px solid color-mix(in oklch, var(--rule) 70%, transparent); }
.lc-table tbody tr:first-child { border-top: 0; }
.lc-table td { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding: 4px 0; vertical-align: top; overflow-wrap: anywhere; }
.lc-table td::before {
  content: attr(data-label);
  font-family: var(--f-mono); font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--muted-strong); padding-top: 2px;
}
.lc-table td:not([data-label]) { grid-template-columns: 1fr; }
.lc-table td:not([data-label])::before { content: none; }
.lc-table a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--lc-edge); text-underline-offset: 3px; }
.lc-table a:hover { text-decoration-color: var(--signal); }
.lc-table__id { font-family: var(--f-mono); font-size: 12.5px; }

.lc-loadmore {
  display: flex; justify-content: center; padding: 16px;
  border-top: 1px solid var(--rule);
  border-top: 1px solid color-mix(in oklch, var(--rule) 70%, transparent);
}

/* ── Job tray ("Your recent jobs") ────────────────────────── */
.lc-tray { overflow: hidden; }
.lc-tray__head {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 16px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--rule);
  border-bottom: 1px solid color-mix(in oklch, var(--rule) 80%, transparent);
  font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted-strong);
}
.lc-tray__head a { color: var(--muted-strong); text-decoration: underline; text-decoration-color: var(--lc-edge); text-underline-offset: 3px; }
.lc-tray__head a:hover { color: var(--ink); }
.lc-jobrow {
  display: grid; grid-template-columns: 1fr auto; grid-template-areas: "id chip" "what what" "stage stage";
  gap: 4px 12px; align-items: center;
  padding: 14px 18px;
  font-family: var(--f-mono); font-size: 12px; line-height: 1.5;
  border-top: 1px solid var(--rule);
  border-top: 1px solid color-mix(in oklch, var(--rule) 60%, transparent);
}
.lc-jobrow:first-of-type { border-top: 0; }
.lc-tray__empty { margin: 0; padding: 18px; font-family: var(--f-mono); font-size: 12px; line-height: 1.5; color: var(--muted-strong); }
.lc-jobrow__id { grid-area: id; color: var(--ink); text-decoration: underline; text-decoration-color: var(--lc-edge); text-underline-offset: 3px; }
.lc-jobrow__id:hover { text-decoration-color: var(--signal); }
.lc-jobrow__what { grid-area: what; color: var(--ink-2); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lc-jobrow__stage { grid-area: stage; color: var(--muted-strong); }
.lc-jobrow__chip { grid-area: chip; justify-self: end; }
.lc-jobrow .lc-progress { grid-column: 1 / -1; margin-top: 4px; }

/* ── File rows: result files, stored inputs, the chosen file ─ */
.lc-files { display: grid; gap: 1px; background: var(--rule); border: 1px solid var(--rule); border-radius: 4px; overflow: hidden; }
.lc-file {
  display: grid; grid-template-columns: 36px 1fr; gap: 6px 14px; align-items: start;
  padding: 14px 16px;
  background: var(--paper);
  background: color-mix(in oklch, var(--paper) 96%, transparent);
}
.lc-file__icon {
  width: 36px; height: 36px; border: 1px solid var(--ink-2); border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--f-mono); font-size: 9.5px; letter-spacing: 0.04em; color: var(--ink-2);
}
.lc-file--report .lc-file__icon { border-color: var(--signal-fg); color: var(--signal-fg); }
.lc-file__main { min-width: 0; }
.lc-file__name { display: block; font-size: 15px; line-height: 1.35; color: var(--ink); overflow-wrap: anywhere; }
.lc-file__desc { display: block; font-size: 12.5px; line-height: 1.45; color: var(--ink-2); margin-top: 2px; overflow-wrap: anywhere; }
.lc-file__meta { display: block; font-family: var(--f-mono); font-size: 10.5px; line-height: 1.6; color: var(--muted-strong); margin-top: 4px; overflow-wrap: anywhere; }
.lc-file__action { grid-column: 2; justify-self: start; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.lc-file--deleted .lc-file__name { color: var(--muted-strong); text-decoration: line-through; }
.lc-file--deleted .lc-file__icon { border-style: dashed; border-color: var(--lc-edge); color: var(--muted-strong); }

/* ── Key / value list ─────────────────────────────────────── */
.lc-kv { margin: 0; font-size: 13.5px; line-height: 1.5; }
.lc-kv > div { display: grid; gap: 2px; padding: 9px 0; border-bottom: 1px dashed var(--lc-line); }
.lc-kv > div:last-child { border-bottom: 0; }
.lc-kv dt { font-family: var(--f-mono); font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted-strong); }
.lc-kv dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; }

/* ── Result summary: headline numbers, small table, figure ── */
.lc-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--rule); border: 1px solid var(--rule); border-radius: 4px; overflow: hidden; }
.lc-metric { padding: 14px 16px; background: var(--paper); background: color-mix(in oklch, var(--paper) 96%, transparent); min-width: 0; }
.lc-metric__value { display: block; font-family: var(--f-display); font-weight: 700; font-size: 26px; line-height: 1.1; letter-spacing: -0.015em; color: var(--ink); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.lc-metric__unit { font-size: 13px; font-weight: 400; letter-spacing: 0; color: var(--ink-2); margin-left: 3px; }
.lc-metric__label { display: block; font-family: var(--f-mono); font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted-strong); margin-top: 6px; }
.lc-metric__note { display: block; font-size: 12px; line-height: 1.4; color: var(--ink-2); margin-top: 4px; }
.lc-figure { margin: 0; border: 1px solid var(--rule); border-radius: 4px; background: var(--paper); overflow: hidden; }
.lc-figure img { max-width: 100%; height: auto; margin: 0 auto; }
.lc-figure figcaption { padding: 10px 14px; border-top: 1px solid var(--rule); font-size: 12.5px; line-height: 1.45; color: var(--ink-2); }

/* ── Tabs and filter chips ────────────────────────────────── */
.lc-tabs {
  display: flex; gap: 22px; overflow-x: auto; scrollbar-width: none;
  border-bottom: 1px solid var(--lc-line);
}
.lc-tabs::-webkit-scrollbar { display: none; }
.lc-tab {
  flex: none; padding: 14px 0 12px;
  font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; white-space: nowrap;
  color: var(--muted-strong);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: color .15s, border-color .15s;
}
.lc-tab:hover { color: var(--ink); }
.lc-tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--ink); }
.lc-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.lc-filter {
  min-height: 34px; padding: 8px 14px;
  font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-2);
  background: var(--paper);
  background: color-mix(in oklch, var(--paper) 70%, transparent);
  border: 1px solid var(--lc-edge); border-radius: 999px;
  transition: background .15s, color .15s, border-color .15s;
}
.lc-filter:hover { border-color: var(--ink); color: var(--ink); }
.lc-filter[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ── Activity list ────────────────────────────────────────── */
.lc-timeline { list-style: none; margin: 0; padding: 0; font-size: 13.5px; line-height: 1.5; }
.lc-timeline li { display: grid; gap: 2px; padding: 9px 0; border-bottom: 1px dashed var(--lc-line); }
.lc-timeline li:last-child { border-bottom: 0; }
.lc-timeline time { font-family: var(--f-mono); font-size: 11px; color: var(--muted-strong); }

/* ── Disclosure ("Didn't get the email?") ─────────────────── */
.lc-details { border-top: 1px solid var(--lc-line); border-bottom: 1px solid var(--lc-line); }
.lc-details > summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 0; font-size: 14px; font-weight: 600; color: var(--ink);
}
.lc-details > summary::-webkit-details-marker { display: none; }
.lc-details > summary::after {
  content: "+"; flex: none;
  width: 22px; height: 22px; border: 1px solid var(--lc-edge); border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--f-mono); font-size: 13px; font-weight: 400; color: var(--ink-2);
  transition: transform .2s, color .15s, border-color .15s;
}
.lc-details[open] > summary::after { transform: rotate(45deg); color: var(--signal-fg); border-color: var(--signal); }
.lc-details__body { padding: 0 0 14px; font-size: 13.5px; line-height: 1.6; color: var(--ink-2); }
.lc-details__body p { margin: 0 0 8px; }

/* Commands shown to administrators */
.lc-cmd {
  margin: 0; padding: 12px 14px; overflow-x: auto; white-space: pre;
  font-family: var(--f-mono); font-size: 12px; line-height: 1.55; color: var(--ink);
  background: var(--paper-2); border: 1px solid var(--rule); border-radius: 4px;
}

/* ── Long text (privacy, terms) ───────────────────────────── */
.lc-prose { max-width: 720px; font-size: 15.5px; line-height: 1.65; color: var(--ink); }
.lc-prose h2 { font-family: var(--f-display); font-weight: 400; font-size: 26px; line-height: 1.2; letter-spacing: -0.015em; margin: 48px 0 14px; padding-top: 16px; border-top: 1px solid var(--ink); }
.lc-prose h3 { font-family: var(--f-display); font-weight: 600; font-size: 18px; line-height: 1.3; margin: 28px 0 8px; }
.lc-prose p { margin: 0 0 14px; }
.lc-prose ul, .lc-prose ol { margin: 0 0 14px; padding-left: 22px; }
.lc-prose li + li { margin-top: 6px; }
.lc-prose a { color: var(--signal-fg); text-decoration-color: var(--signal); }
.lc-prose [lang="zh-Hans"], .lc-prose--zh { font-family: var(--lc-f-zh); line-height: 1.8; }
.lc-version { font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted-strong); }

/* ── Navbar additions (the markup comes from app.js) ──────── */
.lc-nav-slot { display: contents; }
/* styles.css turns every link inside .nav dark on hover, also the white-on-teal and white-on-ink pills */
.lc-nav-pill.primary:hover, .lc-nav-pill.lab:hover { color: #fff; }
.lc-nav-pill.secondary:hover { color: var(--ink); }
.lc-nav-signin, .lc-user { display: none; }
/* "Sign in / Sign up": the second half shows where the navbar has room for it (wide screens,
   below) and always in the mobile sheet, whose pill has the whole width. */
.lc-nav-signin .lc-nav-signup { display: none; }
.lc-nav-signup { white-space: pre; }
.lc-user { position: relative; }
.lc-user__btn {
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--f-mono); font-size: 11.5px; font-weight: 500; letter-spacing: 0.04em;
  color: var(--ink); background: var(--paper-2); border: 1px solid var(--rule);
  transition: background .15s, color .15s, border-color .15s;
}
.lc-user__btn:hover { border-color: var(--ink); }
.lc-user__btn[aria-expanded="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.lc-user__menu {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 60;
  min-width: 232px; max-width: min(320px, calc(100vw - 32px));
  padding: 8px;
  background: var(--paper);
  border: 1px solid var(--rule); border-radius: 6px;
  box-shadow: var(--lc-shadow);
}
.lc-user__who { display: grid; gap: 2px; padding: 8px 10px 12px; margin-bottom: 6px; border-bottom: 1px solid var(--rule); }
.lc-user__label { font-family: var(--f-mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted-strong); }
.lc-user__email { font-size: 13.5px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lc-user .lc-user__item {
  display: block; width: 100%; padding: 9px 10px; text-align: left;
  font-family: var(--f-sans); font-size: 14px; font-weight: 500; line-height: 1.3;
  color: var(--ink); text-decoration: none; border-radius: 4px;
}
.lc-user .lc-user__item:hover { background: var(--paper-2); color: var(--ink); }

/* The closed sheet sits just outside the viewport, but its shadow reaches 60 px back into it. */
.lc-sheet:not(.open) { box-shadow: none; }

/* Mobile sheet: the same entries, above its "Submit a Job" pill */
.lc-sheet-account { display: grid; gap: 10px; }
.lc-sheet-who { display: grid; gap: 2px; padding-top: 14px; border-top: 1px solid rgba(25, 40, 55, 0.18); }
.lc-sheet-who .lc-user__label { color: var(--ink-2); }
.lc-sheet-links { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-bottom: 4px; }
.lc-sheet-link { padding: 6px 0; font-family: var(--f-sans); font-size: 15px; font-weight: 600; color: var(--ink); text-decoration: underline; text-decoration-color: rgba(25, 40, 55, 0.35); text-underline-offset: 3px; }
.lc-sheet-link:hover { color: var(--signal-fg); }
.lc-sheet-signin { justify-content: center; }

/* ── Vertical rhythm ──────────────────────────────────────────
   .lc-stack spaces its children evenly. It stands after the components on purpose: many of
   them reset their own margin, and here the stack has the last word. */
.lc-stack > * + * { margin-top: var(--lc-gap, 20px); }
.lc-stack--tight { --lc-gap: 10px; }
.lc-stack--loose { --lc-gap: 32px; }
.lc-stack > .lc-zh { margin-top: 4px; }

/* ── Wider screens ────────────────────────────────────────── */
@media (min-width: 541px) {
  /* Below this the navbar has room for the logo, one pill and the menu button only;
     sign-in and the account entries live in the mobile sheet there. */
  .lc-nav-signin { display: inline-flex; }
  .lc-user { display: block; }
}

/* Measured with the site's own fonts: between these widths the navbar keeps at least 60 px free
   on either side of its links with the longer pill. From 901 to 1023 px the four links and three
   pills leave no room for it, and below 600 px neither do the logo and two pills. */
@media (min-width: 600px) and (max-width: 900px), (min-width: 1024px) {
  .lc-nav-signin .lc-nav-signup { display: inline; }
}

@media (min-width: 641px) {
  .lc-shell { padding: 40px 20px 72px; }
  .lc-card--pad { padding: 32px 36px; }
  .lc-card__foot { padding: 16px 36px; }
  .lc-block { padding: 32px 36px; }
  .lc-block__head { grid-template-columns: 66px 1fr auto; gap: 14px; margin-bottom: 20px; }
  .lc-block__hint { grid-column: auto; }
  .lc-band { grid-template-columns: 1fr auto; gap: 24px; padding: 26px 36px; }
  .lc-input, .lc-select, .lc-textarea { font-size: 15px; min-height: 42px; }
  .lc-input--code { font-size: 26px; }
  .lc-btn { min-height: 42px; }
  .lc-btn--sm { min-height: 32px; }
  /* Page-wide banners line up with the navbar content (1320 px column, 32 px gutter) */
  .lc-banners > .lc-banner { padding: 12px max(32px, calc((100vw - 1320px) / 2 + 32px)); }

  .lc-param { grid-template-columns: 200px 1fr; gap: 12px 24px; align-items: center; }
  .lc-options--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lc-option { grid-template-columns: 16px 1fr auto; padding: 18px 20px; }
  .lc-option__side { grid-column: 3; grid-row: 1; justify-self: end; }
  .lc-option__meta { grid-column: 2 / 4; }
  .lc-drop { padding: 40px 28px; }

  .lc-table thead { position: static; width: auto; height: auto; overflow: visible; clip-path: none; }
  .lc-table tr { display: table-row; padding: 0; border-top: 0; }
  .lc-table th {
    text-align: left; padding: 12px 18px;
    font-family: var(--f-mono); font-size: 11px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase;
    color: var(--muted-strong); white-space: nowrap;
    border-bottom: 1px solid var(--ink);
  }
  .lc-table td { display: table-cell; padding: 13px 18px; border-top: 1px solid var(--rule); border-top: 1px solid color-mix(in oklch, var(--rule) 70%, transparent); }
  .lc-table td::before { content: none; }
  .lc-table tbody tr:first-child td { border-top: 0; }
  .lc-table tbody tr:hover td { background: var(--paper); background: color-mix(in oklch, var(--paper) 70%, transparent); }
  .lc-table__num { text-align: right; font-variant-numeric: tabular-nums; }

  .lc-tray__head { padding: 16px 24px; }
  .lc-tray__empty { padding: 18px 24px; }
  .lc-jobrow { grid-template-columns: 124px minmax(0, 1fr) minmax(0, 190px) auto; grid-template-areas: "id what stage chip"; gap: 18px; padding: 16px 24px; }
  .lc-file { grid-template-columns: 36px 1fr auto; padding: 16px 20px; }
  .lc-file__action { grid-column: 3; grid-row: 1; justify-self: end; align-self: center; margin-top: 0; }
  .lc-kv > div { grid-template-columns: 180px 1fr; gap: 16px; }
  .lc-kv dt { padding-top: 3px; }
  .lc-metrics { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
  .lc-timeline li { grid-template-columns: 210px 1fr; gap: 16px; }
  .lc-timeline time { padding-top: 2px; }
  .lc-empty { padding: 48px 28px; }
  .lc-user__btn { width: 40px; height: 40px; font-size: 12px; }
}

@media (min-width: 901px) {
  .lc-shell { padding: 64px var(--gutter) 96px; }
  .lc-hero { padding-bottom: 36px; margin-bottom: 44px; }
  .lc-block__head { grid-template-columns: 80px 1fr auto; gap: 24px; }
  /* Content sits under the block's name, as on the existing server page */
  .lc-block__body { padding-left: 104px; }
  .lc-param { grid-template-columns: 200px 1fr 140px; }
  .lc-param__val { display: block; }
}

/* ── Motion and contrast preferences ──────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .lc-btn, .lc-progress__fill, .lc-details > summary::after { transition: none; }
  .lc-chip--running::before, .lc-strip--on::before, .lc-skeleton { animation: none; }
  .lc-progress--indeterminate .lc-progress__fill { animation: none; width: 100%; opacity: 0.45; }
  .lc-btn[aria-busy="true"]::before, .lc-spinner { animation-duration: 2s; }
}
@media (forced-colors: active) {
  .lc-progress__fill { background: Highlight; }
  .lc-option[aria-checked="true"], .lc-tab[aria-selected="true"], .lc-filter[aria-pressed="true"], .lc-seg__item[aria-checked="true"] { outline: 2px solid Highlight; }
}
