/* NexaCreator manager screen — components.
   Structure carries the information. One rule weight. One accent, meaning-bearing. */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: var(--t-body)/var(--lh-body) var(--font-ui);
  font-variant-numeric: tabular-nums;
}

:focus-visible {
  outline: 2px solid var(--rubric);
  outline-offset: 2px;
}

/* --- Shell ---------------------------------------------------------------- */
.shell { max-width: 1240px; margin: 0 auto; padding: 0 var(--s5); }

.topbar {
  border-bottom: 2px solid var(--ink);
  background: var(--ground);
  position: sticky; top: 0; z-index: 10;
}
.topbar__in {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: var(--s4); padding: var(--s3) 0;
}
.wordmark {
  font-family: var(--font-display);
  font-size: var(--t-lg);
  letter-spacing: 0.01em;
  margin: 0;
}
.wordmark em { font-style: italic; }
.orientation { color: var(--muted); font-size: var(--t-sm); }

/* --- The anchor: what is owed and set aside -------------------------------
   The largest typographic element on the page, set directly on the ground.
   No card, no gradient accent, no supporting stat tiles. */
.anchor { padding: var(--s7) 0 var(--s6); border-bottom: var(--hair); }

.anchor__label {
  font-size: var(--t-sm);
  color: var(--muted);
  margin: 0 0 var(--s2);
}
.anchor__figure {
  font-family: var(--font-display);
  font-size: var(--t-hero);
  line-height: var(--lh-tight);
  font-variant-numeric: lining-nums tabular-nums;
  margin: 0;
  letter-spacing: -0.02em;
}
.anchor__figure .unit {
  font-size: 0.38em;
  font-family: var(--font-ui);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--muted);
  margin-left: 0.5em;
}
.anchor__am { margin: var(--s3) 0 0; color: var(--ink-2); }

/* Coverage: the honest shortfall, in words as well as a number. */
.coverage {
  margin: var(--s5) 0 0;
  padding-top: var(--s3);
  border-top: var(--hair);
  display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5);
  align-items: baseline;
  font-size: var(--t-sm);
}
.coverage__pct { font-weight: 700; font-size: var(--t-lg); font-family: var(--font-ui); }
.coverage__say { color: var(--ink-2); }
.coverage__gap { color: var(--rubric); }

/* --- Section heading. Sentence case, no ALL-CAPS eyebrow. ---------------- */
.sec {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: var(--s4);
  margin: var(--s6) 0 var(--s3);
}
.sec h2 { font-size: var(--t-lg); margin: 0; font-weight: 600; letter-spacing: -0.01em; }
.sec__note { color: var(--muted); font-size: var(--t-sm); }

/* --- Board (desktop >= 768px) ------------------------------------------- */
.board { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--s4); }
.col { min-width: 0; }
.col__head {
  display: flex; align-items: baseline; justify-content: space-between; gap: var(--s2);
  padding-bottom: var(--s2);
  border-bottom: 2px solid var(--ink);
  font-size: var(--t-sm); font-weight: 700;
}
.col__count { color: var(--muted); font-weight: 400; }
.col__body { border-bottom: var(--hair); }

/* Deal rows, not floating cards. No shadow, no coloured side tab. */
.deal {
  display: block; width: 100%; text-align: left;
  background: none; border: 0; border-bottom: var(--hair);
  padding: var(--s3) var(--s2);
  font: inherit; color: inherit; cursor: pointer;
  transition: background-color 120ms ease;
}
.deal:last-child { border-bottom: 0; }
.deal:hover { background: var(--panel-2); }
.deal__who { font-weight: 600; display: block; }
.deal__brand { color: var(--muted); font-size: var(--t-sm); display: block; margin-top: 1px; }
.deal__gross { display: block; margin-top: var(--s2); font-size: var(--t-sm); }
.deal__tax { display: block; margin-top: 2px; font-size: var(--t-sm); color: var(--settled); }
/* "Not yet applicable" is not an error. Only a genuine failure gets the accent. */
.deal__tax--pending { color: var(--muted); }
.deal__tax--failed  { color: var(--rubric); }

/* The Amharic line sits under the Latin one, in the Ethiopic face, slightly
   larger. It is the reading the person legally liable for the number will use. */
.deal__am { display: block; margin-top: var(--s2); color: var(--ink-2); font-size: var(--t-sm); }

/* PROVISIONAL: rendered on the figure itself, never in a footnote. */
.prov {
  display: inline-block;
  white-space: nowrap;
  color: var(--rubric);
  border: 1px solid var(--rubric);
  background: var(--rubric-tint);
  border-radius: var(--r);
  padding: 0 4px;
  font-size: var(--t-xs);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.col--empty .col__body { padding: var(--s4) var(--s2); }
.col__none { color: var(--muted); font-size: var(--t-sm); margin: var(--s4) var(--s2); }
.col__none--bad { color: var(--rubric); font-weight: 700; }

/* --- Phone list (< 768px) ------------------------------------------------
   Not a stacked board. A different surface: what needs you now. */
.phone { display: none; }

.chips { display: flex; gap: var(--s2); overflow-x: auto; padding: var(--s2) 0 var(--s3); }
.chip {
  flex: 0 0 auto;
  min-height: var(--tap); padding: 0 var(--s3);
  display: inline-flex; align-items: center;
  border: var(--hair); border-radius: var(--r);
  background: var(--panel); color: var(--ink);
  font: inherit; font-size: var(--t-sm); cursor: pointer;
}
.chip[aria-pressed="true"] { background: var(--ink); color: var(--panel); border-color: var(--ink); }

.rowcard { list-style: none; margin: 0; padding: 0; border-top: var(--hair); }
.row {
  display: block; width: 100%; text-align: left;
  background: none; border: 0; border-bottom: var(--hair);
  padding: var(--s4) var(--s2); font: inherit; color: inherit;
  min-height: var(--tap);
}
.row__top { display: flex; justify-content: space-between; gap: var(--s3); align-items: baseline; }
.row__stage { font-size: var(--t-xs); color: var(--muted); }
.row__gross { font-weight: 700; }
.row__tax { color: var(--settled); font-size: var(--t-sm); margin-top: var(--s1); }
.row__tax--pending { color: var(--muted); }
.row__tax--failed  { color: var(--rubric); }

@media (max-width: 767px) {
  .board { display: none; }
  .phone { display: block; }
  .shell { padding: 0 var(--s4); }
  .anchor { padding: var(--s5) 0 var(--s4); }
}

/* --- States ------------------------------------------------------------- */
.notice {
  padding: var(--s3) var(--s4);
  border-left: 3px solid var(--ink);
  background: var(--panel);
  margin: var(--s4) 0;
  font-size: var(--t-sm);
}
.notice--demo { border-left-color: var(--rubric); }

/* Skeletons must be sized like the content they stand in for, and visible
   enough that the page reads as loading rather than as broken. */
.skeleton {
  display: block;   /* otherwise height is ignored when the placeholder is a span */
  height: 34px; background: var(--skeleton);
  border-radius: var(--r); margin: var(--s2) 0;
  animation: breathe 1.4s ease-in-out infinite;
}
.skeleton--hero { height: 62px; width: 62%; margin: 0; }
.skeleton--w70 { width: 70%; }
.skeleton--w45 { width: 45%; }
@keyframes breathe { 0%,100% { opacity: .55 } 50% { opacity: 1 } }

.empty { padding: var(--s7) 0; max-width: 46ch; }
.empty__h { font-family: var(--font-display); font-size: var(--t-xl); margin: 0 0 var(--s2); }
.empty__b { color: var(--ink-2); margin: 0 0 var(--s5); }
.empty__am { color: var(--ink-2); margin: 0 0 var(--s5); }

.err { border: 2px solid var(--rubric); background: var(--rubric-tint); padding: var(--s4); max-width: 54ch; }
.err__h { font-weight: 700; margin: 0 0 var(--s2); }
.err__b { color: var(--ink-2); margin: 0 0 var(--s3); font-size: var(--t-sm); }
.err__ref { font-size: var(--t-xs); color: var(--muted); }

/* --- Buttons: no trailing arrows. ---------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: var(--tap); padding: 0 var(--s4);
  border: 1.5px solid var(--ink); border-radius: var(--r);
  background: var(--ink); color: var(--panel);
  font: inherit; font-weight: 600; cursor: pointer;
}
.btn--quiet { background: transparent; color: var(--ink); border-color: var(--rule); font-weight: 400; }

/* --- State switcher: a dev affordance, not part of the product UI. ------- */
.states {
  border-top: 2px solid var(--ink);
  margin-top: var(--s7);
  padding: var(--s4) 0 var(--s8);
  display: flex; flex-wrap: wrap; gap: var(--s2);
  align-items: center;
}
.states__label { font-size: var(--t-sm); color: var(--muted); margin-right: var(--s3); }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
