/* Study Facts Label (Chunk 5) -- page styles. Shared chrome, the
 * drop zone, progress bar, chips and table come from ui.css and
 * ui/paper-tools-ui.css. */

/* ---------- How it works guide (top of page) ----------
   This page does not load the reference tools' CSS, so the guide needs
   its own copy of the shared .rg-guide pattern here: without it the
   step headings run straight into their descriptions and the numbered
   steps are cramped. */
.rg-guide {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--s3);
  margin: 0 0 var(--s5);
  padding: 0;
  list-style: none;
  counter-reset: rg-step;
}
.rg-guide li {
  display: flex;
  gap: var(--s3);
  align-items: flex-start;
  padding: var(--s4);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}
.rg-guide li::before {
  counter-increment: rg-step;
  content: counter(rg-step);
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: var(--fs-sm);
  font-weight: 700;
}
.rg-guide strong { display: block; margin-bottom: var(--s1); font-size: var(--fs-base); }
.rg-guide span { color: var(--muted); font-size: var(--fs-sm); line-height: var(--lh); }

.sfl-status {
  margin: 0.5rem 0 0;
  min-height: 1.4em;
}

.sfl-paste {
  width: 100%;
  min-height: 9rem;
  resize: vertical;
}

.sfl-summary__title {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 0.25rem;
}

.sfl-summary__meta {
  margin: 0 0 0.5rem;
  color: var(--muted, #5a6b7c);
}

.sfl-notice {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin: 0.75rem 0;
}

.sfl-design__row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.5rem 0;
}

.sfl-evidence {
  margin: 0.25rem 0 0.75rem;
  font-size: 0.95rem;
  color: var(--muted, #5a6b7c);
  font-style: italic;
}

.sfl-radio {
  display: block;
  margin: 0.25rem 0;
  cursor: pointer;
}

.sfl-candidates {
  margin: 0.5rem 0 0.75rem;
  padding-left: 1.1rem;
}

.sfl-candidates li {
  margin: 0.5rem 0;
  line-height: 1.5;
}

.sfl-use-btn {
  margin-left: 0.35rem;
  padding: 0.15rem 0.6rem;
  font-size: 0.85rem;
}

.sfl-funders {
  margin: 0.5rem 0 0;
  padding-left: 1.1rem;
}

.sfl-funders li {
  margin: 0.35rem 0;
}

.sfl-label-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  align-items: flex-end;
  margin-bottom: 1rem;
}

.sfl-size {
  display: block;
  margin-top: 0.25rem;
}

.sfl-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  padding-bottom: 0.35rem;
}

.sfl-label-preview {
  max-width: 560px;
  margin: 0 0 1rem;
}

.sfl-label-preview canvas {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--border, #d7dee6);
  border-radius: 6px;
  background: #fff;
}

.sfl-password {
  width: 100%;
}

/* The facts table is wide (Fact / Value / Evidence). On a phone it
 * scrolls inside its wrapper, and `contain: paint` keeps the table's
 * min-content width out of the page's scrollable overflow area. */
.table-wrap {
  overflow-x: auto;
  max-width: 100%;
  contain: paint;
}

@media (max-width: 600px) {
  .rg-guide {
    grid-template-columns: 1fr;
  }
  .sfl-label-controls {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }
}
