/* ==========================================================================
   Northstar Research Coverage: the product theme for Case Study 01 (Global Research Coverage Platform).
   One portfolio design system, multiple product expressions: the portfolio page keeps the site's
   tokens, and everything inside a recreated product frame (.nls) uses this restrained product
   identity: light, global and precise. A white masthead, deep indigo type, a cool blue for
   interaction, pale blue and lilac surfaces, and status that always carries a word, never color
   alone. The interface is a concept reconstruction: same workflow and reasoning as the original
   work, with its own composition (a segmented four-step progress bar, back links above the title,
   a footer action bar, requirements grouped by item, a review side panel, a bottom-sheet save
   prompt). Product frames stay light in both site themes, like a real product screenshot.
   Shared by research-coverage*.html and prototype/research-coverage.html. Frames adapt to their own
   width (container queries), so a frame stays legible on a phone.
   ========================================================================== */

.nls {
  --nls-bg: #f3f5fa;
  --nls-surface: #ffffff;
  --nls-lilac: #eff0fb;
  --nls-sky: #eaf2fd;
  --nls-ink: #141b3d;        /* 15.9:1 on white */
  --nls-ink-2: #4a5272;      /* 7.6:1 on white */
  --nls-ink-3: #6b7290;      /* 4.8:1 on white: hints only */
  --nls-line: #dde2ee;
  --nls-line-strong: #b9c1d6;
  --nls-nav: #18205a;        /* the product's indigo */
  --nls-primary: #2754c5;    /* cool blue interaction: 6.4:1 on white */
  --nls-primary-soft: #e4ebfb;
  --nls-ok: #18724a;         /* 5.9:1 on white */
  --nls-ok-soft: #e3f4ea;
  --nls-wait: #7a4d00;       /* 7.0:1 on its soft fill */
  --nls-wait-soft: #fdf1d8;
  --nls-err: #a42a1f;
  --nls-err-soft: #fbe9e7;
  --nls-font: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;

  container-type: inline-size;
  font-family: var(--nls-font);
  font-size: 13px;
  line-height: 1.45;
  color: var(--nls-ink);
  background: var(--nls-bg);
  -webkit-font-smoothing: antialiased;
}
.nls *,
.nls *::before,
.nls *::after {
  box-sizing: border-box;
}

/* App frame (a recreated screen) */
.nls-app {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #c9d0e2;
  box-shadow: 0 1px 2px rgba(20, 27, 61, 0.06), 0 18px 40px -22px rgba(20, 27, 61, 0.35);
}

/* Masthead: white, product mark in indigo, signed-in user on the right */
.nls-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 16px;
  background: var(--nls-surface);
  color: var(--nls-nav);
  border-top: 3px solid var(--nls-nav);
  border-bottom: 1px solid var(--nls-line);
}
.nls-mark {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 700;
  white-space: nowrap;
}
.nls-mark svg {
  width: 18px;
  height: 18px;
  flex: none;
  color: var(--nls-primary);
}
.nls-mark small {
  font-size: inherit;
  font-weight: 500;
  color: var(--nls-ink-2);
}
.nls-mark small::before {
  content: "·";
  margin-right: 7px;
  color: var(--nls-ink-3);
}
.nls-user {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--nls-ink-2);
}
.nls-user i {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: var(--nls-lilac);
  color: var(--nls-nav);
  font-style: normal;
  font-size: 10.5px;
  font-weight: 700;
}

/* Progress: the current step named in words, then four segments */
.nls-prog {
  padding: 10px 18px 12px;
  background: var(--nls-surface);
  border-bottom: 1px solid var(--nls-line);
}
.nls-prog p {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 7px;
  font-size: 12px;
}
.nls-prog p span {
  color: var(--nls-ink-3);
  font-size: 11.5px;
}
.nls-prog ol {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.nls-prog li {
  padding-top: 7px;
  border-top: 4px solid var(--nls-line);
  color: var(--nls-ink-3);
  font-size: 10.5px;
}
.nls-prog .is-done {
  border-top-color: var(--nls-primary);
  color: var(--nls-ink-2);
}
.nls-prog .is-on {
  border-top-color: var(--nls-nav);
  color: var(--nls-ink);
  font-weight: 600;
}

/* Page body: content sits on the page, not in a boxed card */
.nls-body {
  padding: 18px 20px 4px;
  background: var(--nls-surface);
}
.nls-card {
  min-width: 0;
}
.nls-prev {
  display: inline-block;
  margin-bottom: 6px;
  color: var(--nls-primary);
  font-size: 12px;
  font-weight: 600;
}
.nls-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 12px;
}
.nls-h {
  margin: 0;
  font-size: 19px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--nls-ink);
}
.nls-h2 {
  margin: 14px 0 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--nls-ink-2);
}
.nls-sub {
  margin: 4px 0 0;
  color: var(--nls-ink-2);
  font-size: 12.5px;
}
.nls-meta {
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--nls-lilac);
  color: var(--nls-nav);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.nls-link {
  color: var(--nls-primary);
  font-weight: 600;
  font-size: 12px;
}

/* Two-column composition: the main task beside a "what you'll need" or "ready to send" panel */
.nls-split {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 18px;
  margin-top: 14px;
  align-items: start;
}
.nls-panel {
  padding: 14px 16px;
  border-radius: 10px;
  background: var(--nls-sky);
}
.nls-panel .nls-h2:first-child {
  margin-top: 0;
}

/* Selected locations: one row each, code + name, remove on the right */
.nls-locs {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--nls-line);
  border-radius: 8px;
}
.nls-locs li {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 10px;
  border-top: 1px solid var(--nls-line);
  font-size: 12.5px;
}
.nls-locs li:first-child {
  border-top: 0;
}
.nls-locs li em {
  margin-left: auto;
  font-style: normal;
  color: var(--nls-ink-3);
  font-size: 11.5px;
}
.nls-locs .is-add {
  color: var(--nls-primary);
  font-weight: 600;
}

/* Country code badges and chips (no flags: precise, and never color alone) */
.nls-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.nls-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px 3px 4px;
  border: 1px solid var(--nls-line);
  border-radius: 6px;
  background: var(--nls-surface);
  font-size: 12px;
  white-space: nowrap;
}
.nls-chip b,
.nls-cc {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 18px;
  padding: 0 4px;
  border-radius: 4px;
  background: var(--nls-nav);
  color: #fff;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.nls-country {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  font-weight: 600;
}

/* Checklist: what every location needs */
.nls-check {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  display: grid;
  gap: 5px;
}
.nls-check li {
  display: flex;
  gap: 8px;
  align-items: baseline;
  color: var(--nls-ink-2);
}
.nls-check li::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: var(--nls-primary);
  transform: translateY(-1px);
}

/* Requirements grouped by item: "Regional study identifier · DE PL" */
.nls-req {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.nls-req li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  padding: 7px 10px;
  border-radius: 7px;
  background: var(--nls-surface);
  font-size: 12px;
}
.nls-req li > span:first-child {
  flex: 1 1 auto;
  font-weight: 600;
}
.nls-codes {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-left: auto;
}
.nls-req .nls-cc {
  background: var(--nls-primary-soft);
  color: #1e3f8f;
}

/* Tables: location rows; stack on narrow frames */
.nls-table {
  width: 100%;
  margin-top: 10px;
  border-top: 2px solid var(--nls-nav);
  font-size: 12px;
}
.nls-tr {
  display: grid;
  grid-template-columns: var(--nls-cols, 1fr 1.6fr);
  gap: 10px;
  align-items: center;
  padding: 8px 4px;
  border-bottom: 1px solid var(--nls-line);
}
.nls-tr--head {
  color: var(--nls-ink-2);
  font-weight: 600;
  font-size: 11px;
}
.nls-range {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  color: var(--nls-ink-2);
}
.nls-tag {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--nls-sky);
  color: #1e3f8f;
  font-size: 10.5px;
  font-weight: 600;
}

/* Fields (recreated, not interactive) */
.nls-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 14px;
  margin-top: 12px;
}
.nls-field {
  display: grid;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--nls-ink);
}
.nls-field--wide {
  grid-column: 1 / -1;
}
.nls-input {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid var(--nls-line-strong);
  border-radius: 4px;
  background: var(--nls-surface);
  color: var(--nls-ink);
  font-size: 12.5px;
  font-weight: 400;
}
.nls-input.is-empty {
  color: var(--nls-ink-3);
}
.nls-input.is-err {
  border-color: var(--nls-err);
  box-shadow: inset 3px 0 0 var(--nls-err);
}
.nls-input--sm {
  min-height: 26px;
  padding: 3px 7px;
  font-size: 11.5px;
}
.nls-help-err {
  color: var(--nls-err);
  font-size: 11px;
  font-weight: 500;
}
.nls-errsum {
  margin-top: 12px;
  padding: 9px 12px;
  border-left: 3px solid var(--nls-err);
  background: var(--nls-err-soft);
  color: var(--nls-err);
  font-size: 12px;
  font-weight: 600;
}

/* Inline note */
.nls-note {
  margin-top: 10px;
  padding-left: 10px;
  border-left: 3px solid var(--nls-primary);
  color: var(--nls-ink-2);
  font-size: 12px;
}

/* Uploads */
.nls-drop {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  padding: 10px 12px;
  border: 1.5px dashed var(--nls-line-strong);
  border-radius: 8px;
  color: var(--nls-ink-2);
  font-size: 12px;
}
.nls-file {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  padding: 7px 10px;
  border-radius: 6px;
  background: var(--nls-bg);
  font-size: 12px;
}
.nls-file::before {
  content: "PDF";
  flex: none;
  padding: 2px 4px;
  border-radius: 3px;
  background: var(--nls-surface);
  color: var(--nls-nav);
  font-size: 8.5px;
  font-weight: 800;
}
.nls-file small {
  margin-left: auto;
  color: var(--nls-ok);
  font-weight: 600;
  font-size: 11px;
}

/* Location cards (research sites): status in the corner, open card shows its fields */
.nls-cards {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}
.nls-lcard {
  padding: 10px 12px;
  border: 1px solid var(--nls-line);
  border-radius: 8px;
}
.nls-lcard.is-open {
  border-color: var(--nls-primary);
  box-shadow: inset 3px 0 0 var(--nls-primary);
}
.nls-lcard__h {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
}
.nls-lcard__h .nls-status {
  margin-left: auto;
}

/* Review: summary list beside a "ready to send" panel */
.nls-sum {
  margin: 0;
  border-top: 2px solid var(--nls-nav);
}
.nls-sum > div {
  display: grid;
  grid-template-columns: 7.5em minmax(0, 1fr) auto;
  gap: 4px 10px;
  align-items: baseline;
  padding: 8px 2px;
  border-bottom: 1px solid var(--nls-line);
  font-size: 12px;
}
.nls-sum dt {
  color: var(--nls-ink-2);
  font-weight: 600;
}
.nls-sum dd {
  margin: 0;
}
.nls-sum dd + dd {
  color: var(--nls-primary);
  font-weight: 600;
  font-size: 11.5px;
}
.nls-ready {
  display: grid;
  gap: 8px;
}
.nls-ready ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 3px;
  font-size: 12px;
  color: var(--nls-ink-2);
}
.nls-ready b {
  color: var(--nls-ink);
}

/* Status: always a word + a shape, never color alone */
.nls-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.nls-status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 1px;
  background: currentColor;
}
.nls-status--ok {
  background: var(--nls-ok-soft);
  color: var(--nls-ok);
}
.nls-status--wait {
  background: var(--nls-wait-soft);
  color: var(--nls-wait);
}
.nls-status--info {
  background: var(--nls-primary-soft);
  color: #1f46a8;
}
.nls-status--draft {
  background: var(--nls-lilac);
  color: var(--nls-ink-2);
}

/* Footer action bar: save for later on the left, the next step on the right */
.nls-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin: 16px -20px 0;
  padding: 10px 20px;
  background: var(--nls-bg);
  border-top: 1px solid var(--nls-line);
}
.nls-foot .nls-later {
  margin-right: auto;
}
.nls-later {
  color: var(--nls-ink-2);
  font-size: 12px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.nls-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 30px;
  padding: 5px 14px;
  border-radius: 999px;
  border: 1px solid var(--nls-primary);
  background: var(--nls-primary);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.nls-btn--ghost {
  background: var(--nls-surface);
  color: var(--nls-primary);
}
.nls-btn--off {
  background: #e7e9f0;
  border-color: #e7e9f0;
  color: #737a92;
}

/* Bottom sheet (save for later) */
.nls-scrim {
  position: relative;
}
.nls-scrim::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(20, 27, 61, 0.38);
}
.nls-sheet {
  position: absolute;
  z-index: 1;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 14px 20px 16px;
  border-radius: 14px 14px 0 0;
  background: var(--nls-surface);
  box-shadow: 0 -18px 40px -18px rgba(10, 14, 40, 0.5);
}
.nls-sheet .nls-h {
  font-size: 15px;
}
.nls-sheet p {
  margin: 4px 0 0;
  color: var(--nls-ink-2);
  font-size: 12px;
}
.nls-sheet__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}

/* Sent state: left-aligned record of what happened and what comes next */
.nls-done {
  display: grid;
  gap: 6px;
}
.nls-done__icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--nls-ok-soft);
  color: var(--nls-ok);
  font-size: 15px;
  font-weight: 700;
}
.nls-next {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  border-top: 2px solid var(--nls-nav);
}
.nls-next li {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  align-items: baseline;
  padding: 8px 2px;
  border-bottom: 1px solid var(--nls-line);
  font-size: 12px;
}
.nls-next li > span:first-child {
  flex: 1 1 160px;
  color: var(--nls-ink-2);
}

/* Narrow frames (phones, small columns): one column, stacked rows */
@container (max-width: 560px) {
  .nls-body {
    padding: 14px 12px 4px;
  }
  .nls-foot {
    margin: 14px -12px 0;
    padding: 10px 12px;
  }
  .nls-split,
  .nls-grid {
    grid-template-columns: 1fr;
  }
  .nls-tr {
    grid-template-columns: 1fr 1fr !important;
    gap: 4px 8px;
  }
  .nls-tr > :first-child {
    grid-column: 1 / -1;
  }
  .nls-tr--head {
    display: none;
  }
  .nls-tr [data-label]::before {
    content: attr(data-label);
    display: block;
    color: var(--nls-ink-3);
    font-size: 10.5px;
    font-weight: 500;
  }
  .nls-sum > div {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .nls-sum dt {
    grid-column: 1 / -1;
  }
  .nls-prog li {
    font-size: 0;
  }
  .nls-prog {
    padding: 8px 12px 10px;
  }
  .nls-user span {
    display: none;
  }
}
@container (min-width: 561px) {
  .nls-prog p b {
    visibility: hidden;
  }
}
@container (max-width: 380px) {
  .nls-mark small {
    display: none;
  }
}
@container (min-width: 760px) {
  .nls-app {
    font-size: 13.5px;
  }
  .nls-body {
    padding: 22px 26px 4px;
  }
  .nls-foot {
    margin: 18px -26px 0;
    padding: 12px 26px;
  }
}
