/* ===========================================================================
   Revisia — design language: clean, calm, credible-academic.
   Navy-slate/ink palette on clinical white (Jose-picked 06-12, deliberately
   distinct from Elicit's teal-on-cream), system font stack, serif display
   headings, generous whitespace, hand-rolled components.
   ======================================================================== */

/* Self-hosted wordmark font (was Google Fonts) — removes a render-blocking
   cross-origin request and keeps user IPs off Google (GDPR; see /privacidad).
   Latin subset is enough for "revisia". Vite rewrites this url to /app/fonts/…
   for the bundled app; 11ty serves it from /fonts/… at the marketing root. */
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/poppins-700.woff2") format("woff2");
}

:root {
  /* Palette */
  --brand-900: #16283c;
  --brand-700: #24405e;
  --brand-600: #2c4e73;
  --brand-500: #345c88;
  --brand-100: #dce6ef;
  --brand-50: #eff4f8;
  --brand: var(--brand-700);
  --ink-900: #16242e;
  --ink-700: #2c3e4c;
  --ink-500: #566977;
  --ink-300: #93a5b1;
  --paper: #f7f9f9;
  --card: #ffffff;
  --line: #e2e9ec;
  --line-strong: #c9d5da;
  /* Decisions / verdicts */
  --ok: #2e7d4f;
  --ok-bg: #e4f2e9;
  --warn: #9a6b07;
  --warn-bg: #f9efd8;
  --bad: #b03d36;
  --bad-bg: #f9e6e4;
  --neutral-bg: #eef1f3;
  /* Type */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: Charter, "Bitstream Charter", "Sitka Text", Cambria, Georgia, serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  /* Shape */
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(22, 36, 46, 0.05), 0 4px 14px rgba(22, 36, 46, 0.06);
}

* {
  box-sizing: border-box;
}

html,
body,
#root {
  margin: 0;
  min-height: 100vh;
}

body {
  background: var(--paper);
  color: var(--ink-900);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 600;
  color: var(--ink-900);
  margin: 0 0 0.5rem;
  line-height: 1.25;
}

h1 { font-size: 1.7rem; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.05rem; }

p { margin: 0 0 0.75rem; }

a { color: var(--brand-700); }

/* ---- Form elements ----------------------------------------------------- */

label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-700);
  margin-bottom: 0.25rem;
  letter-spacing: 0.01em;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
select,
textarea {
  width: 100%;
  font: inherit;
  color: var(--ink-900);
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.65rem;
  transition: border-color 120ms, box-shadow 120ms;
}

textarea { resize: vertical; }

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--brand-600);
  box-shadow: 0 0 0 3px var(--brand-100);
}

.field { margin-bottom: 0.9rem; }
.field-hint {
  font-size: 0.78rem;
  color: var(--ink-500);
  margin-top: 0.25rem;
}

.form-row {
  display: flex;
  gap: 0.9rem;
}
.form-row > * { flex: 1; min-width: 0; }

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font: inherit;
  font-weight: 600;
  font-size: 0.88rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  padding: 0.5rem 0.95rem;
  cursor: pointer;
  transition: background 120ms, border-color 120ms;
  text-decoration: none;
}
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.btn-primary {
  background: var(--brand-600);
  color: #fff;
}
.btn-primary:hover:not(:disabled) { background: var(--brand-700); }

.btn-secondary {
  background: var(--card);
  color: var(--brand-700);
  border-color: var(--line-strong);
}
.btn-secondary:hover:not(:disabled) { border-color: var(--brand-600); background: var(--brand-50); }

.btn-ghost {
  background: transparent;
  color: var(--ink-500);
  padding: 0.35rem 0.6rem;
}
.btn-ghost:hover:not(:disabled) { color: var(--bad); }

.btn-sm { font-size: 0.78rem; padding: 0.3rem 0.65rem; }

/* ---- Header ------------------------------------------------------------- */

.app-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.65rem 1.4rem;
  background: var(--card);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  font-family: var(--font-serif);
}
.brand-name {
  font-family: "Poppins", var(--font-sans);
  letter-spacing: -0.03em;
  font-size: 1.25rem;
  font-weight: 700;
  color: #1e3a5c;
}
.brand-ia {
  color: #7aa3d1;
}
.brand-beta {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand-700);
  background: var(--brand-50);
  border: 1px solid var(--brand-100);
  border-radius: 999px;
  padding: 0.1rem 0.5rem;
}
.brand-tagline {
  font-size: 0.8rem;
  color: var(--ink-500);
  font-family: var(--font-sans);
}

.header-spacer { flex: 1; }

.lang-switch {
  display: inline-flex;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  overflow: hidden;
}
.lang-switch button {
  font: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  border: none;
  background: var(--card);
  color: var(--ink-500);
  padding: 0.28rem 0.7rem;
  cursor: pointer;
}
.lang-switch button.active {
  background: var(--brand-600);
  color: #fff;
}

.header-email { font-size: 0.8rem; color: var(--ink-500); }

/* Mobile hamburger menu (06-15) — hidden on desktop, shown < 640px. */
.header-burger {
  display: none;
  align-items: center;
  background: none;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--brand-800);
  font-size: 1.35rem;
  line-height: 1;
  padding: 0.25rem 0.55rem;
  cursor: pointer;
}
.header-menu-overlay { position: fixed; inset: 0; z-index: 9; }
.header-menu {
  position: absolute;
  top: 100%;
  right: 0.8rem;
  z-index: 11;
  min-width: 14rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.14);
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.header-menu-account {
  text-align: right;
  font-size: 0.78rem;
  color: var(--ink-500);
  padding: 0.3rem 0.5rem 0.5rem;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.header-menu-item {
  text-align: right;
  background: none;
  border: none;
  text-decoration: none;
  cursor: pointer;
  font: inherit;
  font-size: 0.92rem;
  color: var(--ink-700);
  padding: 0.55rem 0.5rem;
  border-radius: var(--radius-sm);
}
.header-menu-item:hover { background: var(--brand-50); }
.header-menu-langs { padding: 0.35rem 0.5rem; text-align: right; }

/* ---- Layout shells ------------------------------------------------------ */

.page {
  max-width: 880px;
  margin: 0 auto;
  padding: 2rem 1.4rem 4rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.4rem;
}

.muted { color: var(--ink-500); font-size: 0.88rem; }
.small { font-size: 0.8rem; }

.alert {
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.85rem;
  font-size: 0.85rem;
  margin: 0.75rem 0;
}
.alert-error { background: var(--bad-bg); color: var(--bad); }
.alert-ok { background: var(--ok-bg); color: var(--ok); }
.alert-info { background: var(--brand-50); color: var(--brand-900); }

/* ---- Import dropzone ---------------------------------------------------- */
.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  padding: 1.6rem 1rem;
  margin: 0.5rem 0 0.85rem;
  border: 2px dashed var(--line-strong);
  border-radius: 10px;
  background: var(--brand-50);
  color: var(--brand-700);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.dropzone:hover { border-color: var(--brand-600); background: var(--brand-100); }
.dropzone:focus-visible { outline: none; border-color: var(--brand-600); box-shadow: 0 0 0 3px var(--brand-100); }
.dropzone.dragover { border-color: var(--brand-600); background: var(--brand-100); box-shadow: 0 0 0 3px var(--brand-100); }
.dropzone.has-file { border-style: solid; border-color: var(--ok); background: var(--ok-bg); color: var(--ok); }
.dropzone-icon { font-size: 1.7rem; line-height: 1; }
.dropzone-text { margin: 0; font-weight: 600; }

/* ---- Auth screen -------------------------------------------------------- */

.auth-wrap {
  min-height: calc(100vh - 54px);
  display: grid;
  place-items: center;
  padding: 2rem 1rem;
}
.auth-card {
  width: 100%;
  max-width: 430px;
}
.auth-brand {
  text-align: center;
  margin-bottom: 1.5rem;
}
.auth-brand .brand-name { font-size: 2.1rem; }
.auth-intro {
  color: var(--ink-500);
  font-size: 0.88rem;
  text-align: center;
  margin: 0.5rem auto 0;
  max-width: 36ch;
}

.tabs {
  display: flex;
  border-bottom: 1px solid var(--line);
  margin-bottom: 1.2rem;
}
.tabs button {
  font: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--ink-500);
  padding: 0.55rem 1rem;
  cursor: pointer;
}
.tabs button.active {
  color: var(--brand-700);
  border-bottom-color: var(--brand-600);
}

/* ---- Projects page ------------------------------------------------------ */

.omnibox-card {
  background: linear-gradient(180deg, var(--brand-50), var(--card) 70%);
  border: 1px solid var(--brand-100);
}
.omnibox-question {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  min-height: 5.2rem;
  padding: 0.85rem 1rem;
}

.project-list { margin-top: 2rem; }
.project-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1.1rem;
  margin-bottom: 0.7rem;
  cursor: pointer;
  transition: border-color 120ms;
}
.project-card:hover { border-color: var(--brand-500); }
.project-card-main { flex: 1; min-width: 0; }
.project-card h3 { margin-bottom: 0.15rem; }
.project-card .muted {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.pill {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 999px;
  padding: 0.12rem 0.55rem;
  white-space: nowrap;
}
.pill-active { background: var(--brand-50); color: var(--brand-700); border: 1px solid var(--brand-100); }
.pill-archived { background: var(--neutral-bg); color: var(--ink-500); }

/* ---- Project view: stepper + content + status rail ---------------------- */

.project-shell {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr) 250px;
  gap: 1.4rem;
  max-width: 1400px;
  margin: 0 auto;
  padding: 1.4rem;
  align-items: start;
}

@media (max-width: 1100px) {
  .project-shell { grid-template-columns: 220px minmax(0, 1fr); }
  .status-rail { grid-column: 1 / -1; }
}

.stage-rail {
  position: sticky;
  top: 70px;
}
.stage-rail h2 {
  font-size: 0.78rem;
  font-family: var(--font-sans);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--ink-500);
  margin: 0 0 0.6rem 0.4rem;
}

.stage-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  text-align: left;
  font: inherit;
  font-size: 0.86rem;
  background: none;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.55rem;
  cursor: pointer;
  color: var(--ink-700);
  margin-bottom: 2px;
}
.stage-item:hover { background: var(--brand-50); }
.stage-item.selected {
  background: var(--card);
  border-color: var(--line);
  box-shadow: var(--shadow);
  font-weight: 600;
}

.stage-num {
  flex: none;
  width: 1.5rem;
  height: 1.5rem;
  display: grid;
  place-items: center;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 50%;
  background: var(--neutral-bg);
  color: var(--ink-500);
}
.stage-item.s-done .stage-num { background: var(--brand-600); color: #fff; }
.stage-item.s-current .stage-num { background: var(--card); color: var(--brand-700); border: 2px solid var(--brand-600); }
.stage-item.s-blocked { color: var(--ink-300); }

.stage-label { flex: 1; min-width: 0; }
.stage-state {
  display: block;
  font-size: 0.66rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-300);
}
.s-done .stage-state { color: var(--brand-600); }
.s-current .stage-state { color: var(--warn); }

/* Stage content */

.stage-content { min-width: 0; }
.stage-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.4rem;
}
.stage-intro { color: var(--ink-500); font-size: 0.88rem; max-width: 70ch; }

.approve-bar {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-top: 1.4rem;
  padding: 0.9rem 1.1rem;
  background: var(--card);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
}
.approve-bar .muted { flex: 1; }

.section { margin-top: 1.3rem; }
.section > h3 { margin-bottom: 0.6rem; }

/* Coming soon */
.coming-soon {
  text-align: center;
  padding: 3rem 2rem;
  border-style: dashed;
}
.coming-soon .pill { margin-bottom: 1rem; }
.coming-soon p { max-width: 52ch; margin: 0 auto 0.5rem; color: var(--ink-500); }

/* ---- Tables / lists ------------------------------------------------------ */

.row-card {
  padding: 0.8rem 1rem;
  margin-bottom: 0.6rem;
}
.row-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.row-head .grow { flex: 1; min-width: 0; }
/* PRISMA header: keep the download buttons clear of the note below
   (they wrap right above it on narrow screens — prod feedback 06-12). */
.prisma-head { margin-bottom: 0.6rem; }

/* Manuscript draft preview: rendered like a document page (prod feedback
   06-12 — "visualización del PDF"), scrollable, never widens the card. */
.manuscript-doc {
  max-height: 480px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  padding: 1.4rem 1.6rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.84rem;
  line-height: 1.55;
  color: var(--ink-900, #16242e);
}
.manuscript-doc h2 { font-size: 1.15rem; margin: 0 0 0.8rem; }
.manuscript-doc h3 {
  font-size: 0.98rem;
  margin: 1.3rem 0 0.5rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid var(--line);
}
.manuscript-doc h4 { font-size: 0.88rem; margin: 1rem 0 0.4rem; }
.manuscript-doc blockquote {
  margin: 0 0 0.9rem;
  padding: 0.4rem 0.8rem;
  border-left: 3px solid var(--line);
  color: var(--ink-500);
  font-size: 0.76rem;
  font-style: italic;
}
.manuscript-doc p { margin: 0 0 0.7rem; text-align: justify; }
.manuscript-doc ul { margin: 0 0 0.8rem; padding-left: 1.2rem; }
.manuscript-doc li { margin-bottom: 0.35rem; }
.manuscript-doc .ms-code {
  background: #f4f6f7;
  border-radius: 4px;
  padding: 0.55rem 0.7rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  margin: 0 0 0.8rem;
}
.manuscript-doc .ms-table-wrap { overflow-x: auto; margin: 0 0 0.9rem; }
.manuscript-doc table { border-collapse: collapse; font-size: 0.74rem; min-width: 100%; }
.manuscript-doc th,
.manuscript-doc td { border: 1px solid var(--line); padding: 0.3rem 0.45rem; vertical-align: top; text-align: left; }
.manuscript-doc th { background: #f4f6f7; }
.manuscript-doc .ms-ref { font-size: 0.76rem; margin-bottom: 0.45rem; text-align: left; }

/* App footer + legal pages (RGPD posture, prod task 06-12) */
.app-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.1rem;
  justify-content: center;
  align-items: center;
  padding: 1.1rem 1rem calc(1.1rem + env(safe-area-inset-bottom));
  margin-top: 2rem;
  border-top: 1px solid var(--line);
  color: var(--ink-500);
  font-size: 0.78rem;
}
.app-footer a { color: var(--ink-500); text-decoration: underline; }
.app-footer a:hover { color: var(--ink-900, #16242e); }

.legal-page { max-width: 760px; margin: 1.2rem auto; padding: 0 1rem; }
.legal-card { margin-top: 0.8rem; line-height: 1.6; }
.legal-card h2 { margin-top: 0; }
.legal-card h3 { margin: 1.2rem 0 0.4rem; font-size: 0.98rem; }
.legal-card ul { padding-left: 1.2rem; }
.legal-card li { margin-bottom: 0.4rem; }
.legal-table { border-collapse: collapse; width: 100%; margin: 0.5rem 0 0.9rem; font-size: 0.86rem; }
.legal-table th, .legal-table td { border: 1px solid var(--line, #d8dee5); padding: 0.35rem 0.55rem; text-align: left; }
.legal-table th { background: var(--brand-50, #f2f5f9); font-weight: 600; }

.consent-line { margin-top: 0.7rem; text-align: center; }
.consent-line a { color: inherit; text-decoration: underline; }

/* ---------------------------------------------------------------- landing */
.landing { max-width: 1080px; margin: 0 auto; padding: 0 1.2rem 2rem; }
.landing h2 { font-size: 1.5rem; margin: 0 0 1.2rem; text-align: center; }
.landing section { margin-top: 3.2rem; }

.land-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 2rem;
  align-items: center;
  margin-top: 2.5rem;
}
.land-hero-copy h1 { font-size: 2.1rem; line-height: 1.18; margin: 0 0 0.9rem; }
.land-sub { font-size: 1.02rem; color: var(--ink-500); margin: 0 0 1.4rem; }
.land-hero-shot img,
.land-step-shot img {
  width: 100%;
  height: auto; /* honour the intrinsic ratio from the width/height attrs (no distortion, reserves space → no CLS) */
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(22, 36, 46, 0.10);
}
.land-login { margin-top: 0.8rem; }
.btn-link {
  background: none;
  border: none;
  padding: 0;
  color: var(--brand);
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
}

.wl-form .wl-fields { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.wl-turnstile { margin-top: 0.6rem; }
.import-legal { display: flex; gap: 0.5rem; align-items: flex-start; margin: 0.3rem 0; cursor: pointer; }
.import-legal input { margin-top: 0.18rem; flex: none; }
.wl-form input[type="email"],
.wl-form input[type="text"] {
  flex: 1 1 200px;
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
}
.wl-website { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.wl-success {
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand);
  border-radius: 6px;
  padding: 0.8rem 1rem;
  background: #f4faf9;
}
.wl-error { color: #b3261e; }

.land-numbers {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  border-block: 1px solid var(--line);
  padding: 1.6rem 0.5rem 1.1rem;
}
.land-num { text-align: center; min-width: 150px; }
.land-num strong { display: block; font-size: 1.9rem; color: var(--brand); }
.land-num span { color: var(--ink-500); font-size: 0.85rem; }
.land-numbers-note { flex-basis: 100%; text-align: center; max-width: 760px; margin: 0.6rem auto 0; }

.land-step {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 1.6rem;
  align-items: center;
  margin-bottom: 2rem;
}
.land-step:nth-child(odd) .land-step-copy { order: 2; }
.land-step h3 { margin: 0 0 0.5rem; }
.land-step p { color: var(--ink-500); margin: 0; }
.land-step:not(:has(.land-step-shot)) { grid-template-columns: 1fr; max-width: 720px; margin-inline: auto; }

.land-pillar-grid,
.land-aud-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}
.land-pillar { text-align: left; }
.ic { width: 24px; height: 24px; display: block; }
.land-pillar-icon,
.land-aud-icon { color: var(--brand-600); margin-bottom: 0.4rem; }
.land-pillar-icon .ic,
.land-aud-icon .ic { width: 26px; height: 26px; }
.land-pillar h3,
.land-aud-grid h3 { font-size: 1rem; margin: 0.4rem 0; }
.land-pillar p,
.land-aud-grid p { color: var(--ink-500); font-size: 0.88rem; margin: 0; }
.land-aud-also { max-width: 760px; margin: 1.1rem auto 0; text-align: center; }
.sec-h3 { display: flex; align-items: center; gap: 0.5rem; }
.sec-h3 .ic { width: 20px; height: 20px; color: var(--brand-600); flex: none; }

.land-faq { max-width: 720px; margin-inline: auto; }
.land-faq details { border-bottom: 1px solid var(--line); padding: 0.7rem 0.2rem; }
.land-faq summary { cursor: pointer; font-weight: 600; }
.land-faq p { color: var(--ink-500); margin: 0.5rem 0 0; }

.land-cta { text-align: center; max-width: 640px; margin-inline: auto; }
.land-cta .wl-form { text-align: left; }

@media (max-width: 760px) {
  .land-hero { grid-template-columns: 1fr; margin-top: 1.4rem; }
  .land-hero-copy h1 { font-size: 1.6rem; }
  .land-step { grid-template-columns: 1fr; }
  .land-step:nth-child(odd) .land-step-copy { order: 0; }
  .landing section { margin-top: 2.4rem; }
}

.mono { font-family: var(--font-mono); font-size: 0.82rem; }

.paper-li {
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.86rem;
}
.paper-li:last-child { border-bottom: none; }

/* ---- Chips (verdicts, decisions, stage tags) ----------------------------- */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.74rem;
  font-weight: 600;
  border-radius: 999px;
  padding: 0.14rem 0.6rem;
  white-space: nowrap;
}
.chip-si, .chip-include { background: var(--ok-bg); color: var(--ok); }
.chip-no, .chip-exclude { background: var(--bad-bg); color: var(--bad); }
.chip-incierto, .chip-revisar { background: var(--warn-bg); color: var(--warn); }
.chip-neutral { background: var(--neutral-bg); color: var(--ink-500); }
.chip-teal { background: var(--brand-50); color: var(--brand-700); border: 1px solid var(--brand-100); }

.chip-toggle {
  cursor: pointer;
  border: 1px solid var(--line-strong);
  background: var(--card);
  color: var(--ink-500);
  font: inherit;
  font-size: 0.74rem;
  font-weight: 600;
  border-radius: 999px;
  padding: 0.14rem 0.6rem;
}
.chip-toggle.on { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }

/* ---- Status rail --------------------------------------------------------- */

.status-rail {
  position: sticky;
  top: 70px;
}
.status-card { padding: 1rem 1.1rem; }
.status-card h2 {
  font-size: 0.78rem;
  font-family: var(--font-sans);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--ink-500);
  margin-bottom: 0.8rem;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.32rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.84rem;
}
.stat-row:last-of-type { border-bottom: none; }
.stat-label { color: var(--ink-500); }
.stat-value { font-weight: 700; font-variant-numeric: tabular-nums; }
.stat-sub { font-size: 0.72rem; color: var(--ink-300); display: block; }

.status-foot {
  margin-top: 0.7rem;
  font-size: 0.72rem;
  color: var(--ink-300);
}

/* ---- Pilot results -------------------------------------------------------- */

.verdict-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.4rem 0;
}

details.reasons {
  margin-top: 0.3rem;
  font-size: 0.82rem;
}
details.reasons summary {
  cursor: pointer;
  color: var(--brand-700);
  font-weight: 600;
  font-size: 0.78rem;
}
details.reasons li { margin-bottom: 0.2rem; color: var(--ink-700); }

/* ---- Threshold stage: histogram + band (US-6) ----------------------------- */

.histogram-svg {
  display: block;
  width: 100%;
  max-width: 680px;
  height: auto;
  background: var(--card);
}

.hist-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  font-size: 0.75rem;
  color: var(--ink-500);
  margin: 0.3rem 0 0.6rem;
}
.hist-legend i {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  margin-right: 0.3rem;
}

.band-controls {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: flex-start;
  margin-top: 0.6rem;
}
.band-controls .field { max-width: 230px; margin-bottom: 0; }

.progress-track {
  height: 8px;
  border-radius: 999px;
  background: var(--neutral-bg);
  margin-top: 0.8rem;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--brand-600);
  transition: width 400ms ease;
}

.override-dialog {
  margin-top: 0.7rem;
  border-color: var(--brand-600);
  padding: 1rem 1.1rem;
}

/* ---- Revisar queue (the core human screen) -------------------------------- */

.queue-card { border-left: 4px solid var(--warn); }
.row-abstract {
  margin: 0.3rem 0 0;
  font-size: 0.85rem;
  color: var(--ink-700);
  max-width: 80ch;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  cursor: pointer;
}
.row-abstract.open { display: block; overflow: visible; }
.row-abstract-missing { color: var(--ink-500); cursor: default; font-style: italic; }
.row-authors { margin: 0.15rem 0 0; font-size: 0.8rem; color: var(--ink-500); }
.queue-abstract {
  font-size: 0.9rem;
  color: var(--ink-700);
  max-width: 75ch;
}
.queue-reasons {
  font-size: 0.82rem;
  color: var(--ink-700);
  margin: 0.4rem 0 0;
  padding-left: 1.1rem;
}
.queue-reasons li { margin-bottom: 0.2rem; }

kbd {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  background: var(--neutral-bg);
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  padding: 0 0.3rem;
}
.btn-exclude { color: var(--bad); }
.btn-exclude:hover:not(:disabled) { border-color: var(--bad); background: var(--bad-bg); }

/* ---- Exclusions table ------------------------------------------------------ */

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.data-table th,
.data-table td {
  text-align: left;
  padding: 0.45rem 0.6rem;
  border-bottom: 1px solid var(--line);
}
.data-table th {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-500);
}
.data-table .num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.data-table .muted-row td { color: var(--ink-500); font-style: italic; }
.data-table tfoot td { font-weight: 700; border-top: 2px solid var(--line-strong); border-bottom: none; }

/* ---- Status rail: prominent Revisar pending (US-15) ------------------------ */

.stat-prominent {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin: 0.5rem 0;
  padding: 0.5rem 0.7rem;
  background: var(--warn-bg);
  border: 1px solid #ecd9a8;
  border-radius: var(--radius-sm);
}
.stat-prominent-value {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--warn);
  font-variant-numeric: tabular-nums;
}
.stat-prominent-label {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--warn);
  line-height: 1.2;
}

/* ---- Misc ----------------------------------------------------------------- */

.inline-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
.spacer { flex: 1; }
hr.sep { border: none; border-top: 1px solid var(--line); margin: 1.1rem 0; }

/* ---- Chat assistant (proposal-only copilot) ------------------------------- */

.chat-fab {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 60;
  padding: 0.6rem 1rem;
  border: none;
  border-radius: 999px;
  background: var(--brand-700);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow);
}
.chat-fab:hover { background: var(--brand-600); }

.chat-panel {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 60;
  width: min(380px, calc(100vw - 2.5rem));
  max-height: min(34rem, calc(100vh - 4rem));
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0.75rem;
  gap: 0.5rem;
}
.chat-head { display: flex; align-items: center; gap: 0.5rem; }
.chat-disclaimer { margin: 0; }
.chat-messages {
  flex: 1;
  min-height: 8rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.25rem 0;
}
.chat-msg {
  max-width: 88%;
  padding: 0.5rem 0.7rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: break-word;
}
.chat-user {
  align-self: flex-end;
  background: var(--brand-50);
  border: 1px solid var(--brand-100);
  color: var(--ink-900);
}
.chat-assistant {
  align-self: flex-start;
  background: var(--neutral-bg);
  color: var(--ink-700);
}
.chat-pending { color: var(--ink-500); font-style: italic; }
.chat-input { display: flex; gap: 0.5rem; align-items: flex-end; }
.chat-input textarea { flex: 1; resize: none; }

/* ---- Mobile (review fix H2): single column, stage rail as chip row -------- */

/* Compact mobile stepper replaces the full rail on phones (06-15). */
.stage-rail-mobile { display: none; }

@media (max-width: 640px) {
  .project-shell {
    grid-template-columns: minmax(0, 1fr);
    padding: 0.8rem;
    gap: 1rem;
    /* Clearance so the fixed chat fab never covers the approve bar. */
    padding-bottom: 5.5rem;
  }
  .stage-rail { display: none; }
  .stage-rail-mobile {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    grid-column: 1 / -1;
    position: sticky;
    top: 0;
    z-index: 5;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 0.4rem 0.5rem;
  }
  .stepper-select {
    flex: 1;
    min-width: 0;
    font-weight: 600;
  }
  .stepper-arrow {
    flex: 0 0 auto;
    width: 2.3rem;
    height: 2.3rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--card);
    color: var(--brand-700);
    font-size: 1.4rem;
    line-height: 1;
  }
  .stepper-arrow:disabled { color: var(--ink-300); opacity: 0.45; }
  .status-rail { grid-column: 1 / -1; }
  .form-row { flex-direction: column; }
  .form-row .field { max-width: none !important; }

  .chat-panel {
    right: 0.5rem;
    left: 0.5rem;
    bottom: 0.5rem;
    width: auto;
    /* dvh tracks the iOS visual viewport (100vh hides the input under the
       toolbar); keep clear of the home indicator. */
    max-height: min(34rem, calc(100dvh - 4rem));
    padding-bottom: calc(0.75rem + env(safe-area-inset-bottom));
  }
  .chat-fab {
    right: 0.75rem;
    bottom: calc(0.75rem + env(safe-area-inset-bottom));
  }
}

/* Inline PRISMA SVG scales down instead of forcing horizontal scroll. */
.prisma-svg-box svg { max-width: 100%; height: auto; }

/* Mobile header (live feedback 06-11): compact, no tagline, no overflow. */
@media (max-width: 640px) {
  .app-header {
    gap: 0.5rem;
    padding: 0.55rem 0.8rem;
  }
  .brand-tagline { display: none; }
  /* Inline controls collapse into the hamburger menu on phones. */
  .header-desktop { display: none; }
  .header-burger { display: inline-flex; }
}

/* AI-fill callout: the stage-1 hero action, impossible to miss (live feedback 06-11). */
.ai-callout {
  background: var(--brand-50);
  border: 1px solid var(--brand-100);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.8rem;
  margin-bottom: 0.9rem;
}
.ai-callout .btn { background: var(--brand-700); color: #fff; border-color: var(--brand-700); }
.ai-callout .btn:hover:not(:disabled) { background: var(--brand-600); }

/* Mobile audit fixes (06-11): tables scroll instead of squeezing; download
   rows stack. */
.evidence-table th, .evidence-table td { min-width: 120px; }
.evidence-table th:first-child, .evidence-table td:first-child { min-width: 180px; }
@media (max-width: 640px) {
  .dl-row .row-head { flex-direction: column; align-items: flex-start; gap: 0.35rem; }
  .dl-row .row-head .grow { width: 100%; }
}

/* Chat apply chips (06-12): proposal cards under assistant bubbles. */
.chat-msg-group { display: flex; flex-direction: column; gap: 0.35rem; }
.chat-group-user { align-items: flex-end; }
.chat-proposal {
  max-width: 95%;
  border: 1px solid var(--brand-100);
  border-left: 3px solid var(--brand-600);
  border-radius: var(--radius-sm);
  background: #fff;
  padding: 0.45rem 0.6rem;
}
.chat-proposal .small { overflow-wrap: break-word; }

/* Search stage — AI assistant block: sensitivity↔specificity amplitude slider
   (Option I). Calm navy palette, one primary action. */
.search-assist {
  margin-top: 0.9rem;
  background: var(--brand-50);
  border: 1px solid var(--brand-100);
  border-radius: var(--radius);
  padding: 0.85rem 0.95rem;
}
.search-assist-head {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--brand-700);
  margin-bottom: 0.7rem;
}
.search-assist-ends {
  display: flex;
  justify-content: space-between;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--ink-500);
  margin: 0 0.15rem 0.4rem;
}
.amplitude-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 7px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--brand-100), var(--brand-500));
  outline: none;
  margin: 0.1rem 0 0.2rem;
}
.amplitude-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--brand-700);
  box-shadow: 0 1px 4px rgba(22, 36, 46, 0.22);
  cursor: pointer;
}
.amplitude-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--brand-700);
  box-shadow: 0 1px 4px rgba(22, 36, 46, 0.22);
  cursor: pointer;
}
.amplitude-labels {
  display: flex;
  margin: 0.55rem 0 0;
  /* inset by ~thumb radius so the three equal columns line up with the 0/50/100
     thumb stops (native range thumb is inset by half its width at the ends). */
  padding: 0 11px;
}
.amplitude-labels button {
  flex: 1;
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink-300);
  cursor: pointer;
}
.amplitude-labels button:first-child { text-align: left; }
.amplitude-labels button:nth-child(2) { text-align: center; }
.amplitude-labels button:last-child { text-align: right; }
.amplitude-labels button:hover { color: var(--brand-500); }
.amplitude-labels button.on { color: var(--brand-700); }
.search-assist-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.6rem;
  margin-top: 0.9rem;
  flex-wrap: wrap;
}
.amplitude-level {
  font-size: 0.78rem;
  color: var(--ink-500);
  font-weight: 600;
}
.search-assist-btn { white-space: nowrap; }
.search-assist-count {
  margin-top: 0.6rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--brand-700);
}
.chip-count {
  background: var(--brand-50);
  color: var(--brand-700);
  border: 1px solid var(--brand-100);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.chip-count-busy { color: var(--ink-300); }
.variant-toggle { margin-top: 0.7rem; }
.variant-hint { margin: 0.5rem 0 0; opacity: 0.85; }

/* Advanced search — per-concept-block amplitude (feat/advanced-search). */
.advanced-toggle {
  margin-top: 0.7rem;
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--brand-700);
  border-bottom: 1px dashed var(--brand-100);
  cursor: pointer;
}
.fw-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.7rem;
}
.fw-bar .fw-label { font-size: 0.78rem; color: var(--ink-500); font-weight: 600; }
.fw-bar select {
  font: inherit;
  font-size: 0.82rem;
  padding: 0.3rem 0.5rem;
  border: 1px solid var(--brand-100);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--brand-700);
  font-weight: 600;
}
.field-amp-row {
  display: grid;
  grid-template-columns: 100px 1fr;
  align-items: center;
  gap: 0.6rem;
  margin: 0.5rem 0;
}
.field-amp-label { font-size: 0.8rem; font-weight: 600; color: var(--ink-900); }
.seg-amp {
  display: inline-flex;
  width: 100%;
  border: 1px solid var(--brand-100);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.seg-amp button {
  flex: 1;
  background: #fff;
  border: none;
  border-right: 1px solid var(--brand-100);
  padding: 0.38rem 0.3rem;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--brand-600);
  cursor: pointer;
}
.seg-amp button:last-child { border-right: none; }
.seg-amp button.on { background: var(--brand-700); color: #fff; }
.fw-note { margin: 0.7rem 0 0; font-size: 0.72rem; }
@media (max-width: 640px) {
  .field-amp-row { grid-template-columns: 1fr; gap: 0.25rem; }
}

/* Blog — reuses the marketing tokens, .card and .btn system (same design language). */
.blog-index { max-width: 980px; margin: 0 auto; padding: 0 1.2rem 3rem; }
.blog-hero { max-width: 720px; margin: 2.5rem auto 0; text-align: center; }
.blog-hero h1 { font-size: 2rem; margin: 0 0 0.6rem; }
.blog-hero p { color: var(--ink-500); font-size: 1.02rem; margin: 0; }
.blog-hero-rss { margin: 0.8rem 0 0 !important; }
.blog-list { margin-top: 2.4rem; }
.blog-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.1rem; }
.blog-card { display: flex; flex-direction: column; gap: 0.5rem; text-align: left; }
.blog-card-meta { color: var(--ink-500); font-size: 0.8rem; margin: 0; }
.blog-card h2 { font-size: 1.12rem; margin: 0; line-height: 1.25; }
.blog-card h2 a { color: var(--ink-900); text-decoration: none; }
.blog-card h2 a:hover { color: var(--brand-700); }
.blog-card p { color: var(--ink-500); font-size: 0.9rem; margin: 0; flex: 1 1 auto; }
.blog-card .btn-link { align-self: flex-start; }

.blog-post { max-width: 720px; }
.blog-post-head { margin: 1rem 0 1.6rem; }
.blog-post-meta { color: var(--ink-500); font-size: 0.85rem; margin: 0 0 0.4rem; }
.blog-post-head h1 { font-size: 2rem; line-height: 1.2; margin: 0.4rem 0 0.6rem; }
.blog-post-lede { color: var(--ink-500); font-size: 1.05rem; margin: 0; }

.blog-body { line-height: 1.7; }
.blog-body > :first-child { margin-top: 0; }
.blog-body h2 { font-size: 1.3rem; margin: 1.9rem 0 0.6rem; }
.blog-body h3 { font-size: 1.08rem; margin: 1.4rem 0 0.4rem; }
.blog-body p { margin: 0 0 1rem; }
.blog-body ul, .blog-body ol { padding-left: 1.3rem; margin: 0 0 1rem; }
.blog-body li { margin-bottom: 0.4rem; }
.blog-body a { color: var(--brand-700); }
.blog-body img { max-width: 100%; height: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.blog-body blockquote {
  margin: 1.2rem 0;
  padding: 0.6rem 0 0.6rem 1rem;
  border-left: 3px solid var(--brand-100);
  color: var(--ink-700);
  background: var(--brand-50);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.blog-body blockquote p { margin: 0; }
.blog-body code { font-family: var(--font-mono); font-size: 0.85em; background: var(--neutral-bg); padding: 0.1rem 0.3rem; border-radius: 4px; }
.blog-body pre { background: var(--neutral-bg); padding: 0.9rem 1rem; border-radius: var(--radius-sm); overflow: auto; }
.blog-body pre code { background: none; padding: 0; }

.blog-cta { margin-top: 2.6rem; text-align: center; }
.blog-cta h2 { font-size: 1.3rem; margin: 0 0 0.5rem; }
.blog-cta p { color: var(--ink-500); margin: 0 0 1rem; }
.blog-cta-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; align-items: center; justify-content: center; }
.blog-inline-cta { margin: 1.6rem 0; padding: 0.85rem 1.1rem; background: var(--brand-50); border: 1px solid var(--brand-100); border-radius: var(--radius); font-size: 0.95rem; line-height: 1.55; }
.blog-inline-cta a { font-weight: 700; }
.blog-author { margin-top: 2.2rem; }
.blog-author-head { display: flex; align-items: center; gap: 0.8rem; }
.blog-author-avatar { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; flex: none; border-radius: 50%; background: var(--brand-700); color: #fff; font-weight: 700; font-family: var(--font-sans); }
.blog-author-photo { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex: none; }
.blog-author-name { margin: 0; font-weight: 700; color: var(--ink-900); }
.blog-author-role { margin: 0.1rem 0 0; font-size: 0.85rem; color: var(--ink-500); }
.blog-author-bio { margin: 0.8rem 0 0.6rem; font-size: 0.92rem; color: var(--ink-700); line-height: 1.6; }
.blog-author-links { margin: 0; font-size: 0.85rem; color: var(--ink-500); }
.blog-author-links a { font-weight: 600; }

@media (max-width: 760px) {
  .blog-hero h1, .blog-post-head h1 { font-size: 1.55rem; }
}

/* ---- AI-filled fields ---------------------------------------------------- */
/* A field the AI just populated gets a soft tint — a hint that it was generated,
   not written by the user. Cleared the moment the user edits it (and on focus,
   so editing happens on a clean white field). Deliberately subtle. */
input.ai-filled,
textarea.ai-filled {
  background-color: #edf4fd;
  border-color: var(--brand-100);
}
input.ai-filled:focus,
textarea.ai-filled:focus {
  background-color: var(--card);
}

/* ---- Suggestion action bar ----------------------------------------------- */
/* Keep "Añadir todas / Descartar" clear of the suggested items right below. */
.suggest-actions { margin-bottom: 0.9rem; }

/* ---- Inline help tooltip (?) --------------------------------------------- */
.omnibox-head { display: flex; align-items: center; gap: 0.5rem; }
.omnibox-head h1 { margin: 0; }

.help-tip {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  flex: none;
  border-radius: 50%;
  background: var(--brand-50);
  color: var(--brand-700);
  border: 1px solid var(--brand-100);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: help;
  user-select: none;
}
.help-tip:hover,
.help-tip:focus-visible { background: var(--brand-100); outline: none; }

.help-pop {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  z-index: 30;
  display: none;
  flex-direction: column;
  gap: 0.4rem;
  width: min(24rem, 82vw);
  padding: 0.8rem 0.9rem;
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  color: var(--ink-700);
  font-size: 0.85rem;
  font-weight: 400;
  line-height: 1.45;
  text-align: left;
  cursor: auto;
}
.help-tip:hover .help-pop,
.help-tip:focus .help-pop,
.help-tip:focus-within .help-pop { display: flex; }
.help-pop strong { color: var(--brand-700); font-size: 0.9rem; }
.help-ex b { color: var(--brand-700); font-weight: 600; }
.help-key {
  color: var(--ink-500);
  font-size: 0.78rem;
  border-top: 1px solid var(--line);
  padding-top: 0.4rem;
}
