/**
 * sector-artefacts.css — the five demos on the industry pages.
 *
 * Loaded on top of resource-artefacts.css, which already carries the host
 * container, .rx-label, .rx-facts, the pill buttons and the two state toggle.
 * Only what is new to these five lives here.
 *
 * Same discipline as the resource artefacts: site tokens throughout, so these
 * read as part of the page rather than as an embedded widget, and no colour is
 * decorative. Orange means selected or flagged and nothing else.
 */

/* ── holding our own inside the page's prose rules ──────────────────
   A demo sits inside .loc-section__body, which location.css and style.css
   both style: `p` at 18px with a 28px gap, `ul` indented 20px, `li` with a
   marker. Those selectors carry two or three parts and beat any plain .rx-
   class, so the first render came out with 18px UI text and indented lists.

   Two fixes, and neither is a specificity arms race. The demos use div
   rather than p for block text, so the paragraph rules have nothing to
   match. Real lists stay real lists, and are pulled back here with the host
   attributes in front, which clears `.loc-section__body ul` outright. */
[data-artefact][data-ready] ul,
[data-artefact][data-ready] ol { margin: 0; padding: 0; list-style: none; }
[data-artefact][data-ready] li { margin: 0; }

/* ── shared ────────────────────────────────────────────────────────── */

/* The industry prose is capped at 68ch, which is right for a paragraph and
   badly wrong for a two column demo: it left every panel about 280px wide,
   with invoice lines wrapping mid figure. The measure applies to reading, not
   to a table of extracted fields, so the demo section is uncapped. */
.ind-body .loc-section--demo .loc-section__body { max-width: none; }

.rx-split { display: grid; grid-template-columns: 1fr 1.15fr; gap: 22px; align-items: stretch; }
.rx-split--trail { grid-template-columns: 1fr 1.1fr; }

/* The closing line under every demo: what it does not do, and who still
   holds the work. Quiet by design, but it is never optional copy. */
.rx-foot {
  margin: 16px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--rule);
  font-size: 0.84rem;
  line-height: 1.6;
  color: var(--mid);
}

.rx-doc__h { margin: 0 0 10px; font-size: 1.02rem; font-weight: 600; }
.rx-doc__p { margin: 0 0 12px; font-size: 0.92rem; line-height: 1.65; }
.rx-doc__p:last-of-type { margin-bottom: 0; }

/* ── report · notes in, a section out ──────────────────────────────── */
.rx-brief { padding: 16px 18px; background: var(--cream); border-radius: 10px; }
.rx-brief__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
/* Prefixed: `.loc-section__body li` sets 16.5px in --ink-soft and would win
   over a plain class. These are notes on a pad, not page prose. */
[data-artefact][data-ready] .rx-brief__line {
  font-size: 0.84rem; line-height: 1.45; color: var(--ink);
  padding-left: 14px; position: relative;
}
.rx-brief__line::before {
  content: ''; position: absolute; left: 0; top: 0.58em;
  width: 5px; height: 5px; border-radius: 50%; background: var(--warm-2);
}
.rx-doc {
  padding: 18px 20px;
  background: var(--white, #fff);
  border: 1px solid var(--rule);
  border-radius: 10px;
}

/* ── enquiry · before and after ────────────────────────────────────── */
.rx-scene--mail { background: none; padding: 0; }

.rx-age {
  margin: 0 0 14px; padding: 12px 16px;
  border-radius: 10px; border-left: 3px solid var(--warm-2);
  background: var(--cream);
  font-size: 0.88rem; line-height: 1.55;
}
.rx-age[data-state="warm"] { border-left-color: var(--orange); }

.rx-mail {
  padding: 16px 18px; background: var(--cream); border-radius: 10px;
  border: 1px solid var(--rule);
}
.rx-mail__hdr { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.rx-mail__from { font-size: 0.9rem; font-weight: 600; }
.rx-mail__when { font-size: 0.8rem; color: var(--mid); white-space: nowrap; }
.rx-mail__subject { margin: 0 0 10px; font-size: 0.86rem; color: var(--mid); }
.rx-mail__body { margin: 0; font-size: 0.92rem; line-height: 1.65; }

.rx-out { margin-top: 16px; }
.rx-reply {
  margin-top: 16px; padding: 16px 18px;
  background: var(--white, #fff); border: 1px solid var(--rule);
  border-left: 3px solid var(--orange); border-radius: 10px;
}
.rx-reply__body { margin: 0; font-size: 0.92rem; line-height: 1.65; }

/* Where a sample states a boundary rather than a closing note.

   Four of the eighteen samples use it: healthcare, recruitment, legal and
   financial services. The test for earning one is whether "does this decide
   for me?" is the FIRST thing a buyer on that page asks. Where it is, the
   answer cannot be the smallest text in the demo. The other fourteen get the
   quiet closing line, because a guard on every page would teach the eye to
   skip all of them, and then the four that matter would be skipped too. */
.rx-guard {
  margin-top: 18px; padding: 14px 18px;
  background: var(--cream); border-radius: 10px;
  border-left: 3px solid var(--orange);
  font-size: 0.88rem; line-height: 1.6; color: var(--ink);
}

/* The anomaly a demo surfaces but will not act on. Same dashed border and
   same orange pill as the held field in the extract list, so "held for a
   person" looks identical wherever it appears rather than being a phrase that
   happens to recur. */
.rx-held {
  margin-top: 12px; padding: 13px 16px;
  display: grid; gap: 4px; justify-items: start;
  border: 1px dashed var(--rule-2); border-radius: 10px;
}
.rx-held__label { font-size: 0.78rem; color: var(--mid); }
.rx-held__value { font-size: 0.88rem; line-height: 1.6; }
.rx-held .rx-field__tag { grid-column: 1; margin-top: 6px; }

/* ── extract · a document and its fields ───────────────────────────── */
/* The panel stretches to match the field list beside it, so the document
   inside it grows too rather than floating at the top of a tall empty box. */
.rx-src { padding: 16px 18px; background: var(--cream); border-radius: 10px;
  display: flex; flex-direction: column; }
/* The document reads as paper: white, bordered, sitting on the cream panel.
   Without it the source and the fields taken out of it look like two lists. */
.rx-src__doc {
  flex: 1;
  margin-top: 6px; padding: 16px 18px;
  background: var(--white, #fff);
  border: 1px solid var(--rule); border-radius: 8px;
}
.rx-src__line { margin: 0; font-size: 0.85rem; line-height: 1.65; }
.rx-src__line--gap { height: 0.9em; }   /* a blank line in the document, not a tight leading */

.rx-mark {
  cursor: pointer; border-radius: 3px; padding: 1px 3px; margin: 0 -3px;
  box-shadow: inset 0 -1px 0 var(--warm-2);
  transition: background 0.2s var(--ease);
}
.rx-mark:hover { background: var(--warm); }
.rx-mark[data-on="true"] { background: var(--orange); color: var(--black); box-shadow: none; }

.rx-fieldwrap { min-width: 0; }
.rx-fieldlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.rx-field {
  font: inherit; width: 100%; text-align: left; cursor: pointer;
  display: grid; grid-template-columns: 128px 1fr; gap: 4px 14px; align-items: baseline;
  padding: 9px 13px; border-radius: 8px;
  background: var(--cream); border: 1px solid transparent;
}
.rx-field[aria-pressed="true"] { border-color: var(--orange); background: var(--warm); }
.rx-field__label { font-size: 0.78rem; color: var(--mid); }
.rx-field__value { font-size: 0.88rem; }

/* The field the document does not contain. Every sample has one, and it is
   marked as held rather than styled as a failure: the honest outcome here
   is a question for a person, not a blank. */
.rx-field[data-hold="true"] {
  cursor: default; background: none;
  border: 1px dashed var(--rule-2);
  grid-template-columns: 128px 1fr;
}
.rx-field[data-hold="true"] .rx-field__value { color: var(--mid); }
/* "held for a person" — lowercase, like every other label in the demos and
   like the brand's own eyebrows. It was set in caps by habit; the brand does
   not put copy in capitals. */
.rx-field__tag {
  grid-column: 2; justify-self: start;
  margin-top: 4px; padding: 2px 9px; border-radius: 999px;
  font-size: 0.72rem;
  background: var(--orange); color: var(--black);
}

/* ── dashboard · three files, one view ─────────────────────────────── */
.rx-sheets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.rx-sheet { padding: 12px 14px; background: var(--cream); border-radius: 10px; min-width: 0; }
.rx-sheet__name { margin: 0; font-size: 0.82rem; font-weight: 600; word-break: break-word; }
.rx-sheet__by { margin: 2px 0 10px; font-size: 0.72rem; color: var(--mid); line-height: 1.4; }

.rx-tbl { border-collapse: collapse; width: 100%; font-size: 0.8rem; }
.rx-tbl th {
  text-align: left; font-weight: 600; color: var(--mid);
  padding: 4px 8px 6px 0; border-bottom: 1px solid var(--rule);
  font-size: 0.74rem;   /* lowercase column headers: the brand sets no copy in caps */
}
.rx-tbl td { padding: 6px 8px 6px 0; border-bottom: 1px solid var(--rule); font-variant-numeric: tabular-nums; }
.rx-tbl tbody tr:last-child td { border-bottom: none; }
.rx-tbl--merged { font-size: 0.88rem; background: var(--cream); }
.rx-tbl--merged th:first-child, .rx-tbl--merged td:first-child { padding-left: 14px; }
.rx-tbl--merged th:last-child, .rx-tbl--merged td:last-child { padding-right: 14px; }
.rx-tbl--merged th { padding-top: 12px; }

.rx-flag {
  margin: 12px 0 0; padding: 12px 16px;
  border-radius: 10px; background: var(--cream);
  border-left: 3px solid var(--warm-2);
  font-size: 0.88rem; line-height: 1.6;
}
.rx-flag[data-kind="clash"] { border-left-color: var(--orange); }

/* ── audit · the trail ─────────────────────────────────────────────── */
.rx-trail__list { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 4px; }
.rx-step {
  font: inherit; width: 100%; text-align: left; cursor: pointer;
  display: grid; grid-template-columns: 46px 1fr; gap: 2px 12px;
  padding: 9px 13px; border-radius: 8px;
  background: var(--cream); border: 1px solid transparent;
}
.rx-step[aria-pressed="true"] { border-color: var(--orange); background: var(--warm); }
.rx-step__t { font-size: 0.78rem; color: var(--mid); font-variant-numeric: tabular-nums; }
.rx-step__what { font-size: 0.86rem; line-height: 1.4; }
.rx-step__who { grid-column: 2; font-size: 0.72rem; color: var(--mid); }
.rx-step[data-flag="true"] .rx-step__what { color: var(--orange); }
.rx-step[data-human="true"] { background: var(--warm); }

.rx-rec {
  padding: 18px 20px;
  background: var(--white, #fff);
  border: 1px solid var(--rule); border-radius: 10px;
}
.rx-rec__by {
  margin: 0 0 12px; font-size: 0.78rem;   /* "System, 09:02" in its own case, not caps */
  color: var(--mid);
}
.rx-rec__by[data-who="person"] { color: var(--orange); }

/* ── narrow screens ────────────────────────────────────────────────── */
@media (max-width: 780px) {
  .rx-split, .rx-split--trail { grid-template-columns: 1fr; gap: 16px; }
  .rx-sheets { grid-template-columns: 1fr; }
  .rx-field, .rx-field[data-hold="true"] { grid-template-columns: 1fr; gap: 2px; }
  .rx-field__tag { grid-column: 1; }
  .rx-step { grid-template-columns: 1fr; }
  .rx-step__who { grid-column: 1; }
  /* The reconciled table is the widest thing in the set. It scrolls inside
     its own box so the page body never moves sideways. */
  .rx-dash { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .rx-tbl--merged { min-width: 420px; }
}

@media (prefers-reduced-motion: reduce) {
  .rx-mark { transition: none; }
}
