/* ESS group project note (Note Studio "ESS Group Project" template).
   Token colours only (studio-tokens.css): the note sits inside Note Studio's
   daylight .light-band and must also read correctly on the dark studio root. */
.egn {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
  min-width: 0;
  padding: clamp(0.75rem, 2.5vw, 1.25rem);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--surface);
  color: var(--ink-2);
  font-family: var(--font-body);
  overflow-wrap: anywhere;
}
.egn *, .egn *::before, .egn *::after { box-sizing: border-box; }
.egn-head { display: flex; flex-direction: column; gap: 0.35rem; min-width: 0; }
.egn-title {
  margin: 0;
  font-family: var(--font-heading);
  font-size: var(--ah-fs-5, 1.35rem);
  font-weight: 700;
  line-height: 1.25;
  color: var(--ink);
}
.egn-meta, .egn-help, .egn-prompt, .egn-turnin-when {
  margin: 0;
  font-size: var(--ah-fs-2, 0.82rem);
  line-height: 1.5;
  color: var(--muted);
}
.egn-help { color: var(--ink-2); font-size: var(--ah-fs-3, 0.95rem); }
.egn-status-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.egn-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  max-width: 100%;
  padding: 0.25rem 0.65rem;
  border: 1px solid currentColor;
  border-radius: 999px;
  background: var(--surface);
  font-size: var(--ah-fs-2, 0.82rem);
  font-weight: 700;
  color: var(--muted);
}
.egn-pill::before {
  content: '';
  flex: none;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: currentColor;
}
.egn-pill[data-status="saved"] { color: var(--c-geo); }
.egn-pill[data-status="saving"], .egn-pill[data-status="loading"] { color: var(--muted); }
.egn-pill[data-status="offline"] { color: var(--gold); }
.egn-pill[data-status="retry"], .egn-pill[data-status="error"] { color: var(--c-calc); }
.egn-pill[data-status="readonly"] { color: var(--accent); }
.egn-sr {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.egn-body { display: flex; flex-direction: column; gap: 1.1rem; min-width: 0; }
.egn-section { display: flex; flex-direction: column; gap: 0.5rem; min-width: 0; }
.egn-section-title {
  margin: 0;
  font-family: var(--font-heading);
  font-size: var(--ah-fs-4, 1.1rem);
  font-weight: 700;
  color: var(--ink);
}
.egn-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
  padding-left: 0.6rem;
  border-left: 4px solid transparent;
  transition: border-color 0.15s ease;
}
.egn-field[data-editing] { border-left-color: var(--egn-who, var(--accent)); }
.egn-label {
  font-size: var(--ah-fs-2, 0.82rem);
  font-weight: 700;
  color: var(--ink-2);
}
.egn-input {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 6.5em;
  field-sizing: content;
  resize: vertical;
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: var(--ah-fs-3, 0.95rem);
  line-height: 1.55;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.egn-input:focus { outline: 3px solid var(--accent-bright); outline-offset: 2px; border-color: var(--accent); }
.egn-input[readonly] { background: var(--surface-2); }
.egn-field--others .egn-label { color: var(--muted); }
.egn-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.25rem 0.75rem;
  min-height: 1.2em;
  font-size: var(--ah-fs-2, 0.82rem);
  color: var(--muted);
}
.egn-who { font-weight: 700; color: var(--egn-who, var(--muted)); }
.egn-count { margin-left: auto; font-variant-numeric: tabular-nums; }
.egn-near-cap .egn-count { color: var(--c-calc); font-weight: 700; }
.egn-message {
  padding: 0.9rem 1rem;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface-2);
}
.egn-message-title { margin: 0 0 0.3rem; font-weight: 700; color: var(--ink); }
.egn-message-text { margin: 0; color: var(--ink-2); }
.egn-turnin {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line-strong);
}
.egn-turnin-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1rem; }
.egn-btn {
  min-height: 44px;
  padding: 0.55rem 1rem;
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: var(--ah-text-on-accent);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.egn-btn:disabled { opacity: 0.7; cursor: progress; }
.egn-btn:focus-visible { outline: 3px solid var(--accent-bright); outline-offset: 2px; }
.egn[data-state="loading"] .egn-input { opacity: 0.85; }
@media (prefers-reduced-motion: reduce) { .egn-field { transition: none; } }
@media print { .egn-foot, .egn-status-row, .egn-turnin { display: none; } }
