/* BatchBeacon — technical enterprise theme
   Deep green · white · graphite · restrained amber */
:root {
  --green-950: #07211a;
  --green-900: #0b2e24;
  --green-800: #0f3d2f;
  --green-700: #145a43;
  --green-600: #1b7356;
  --green-500: #2a8c6a;
  --green-200: #b9d8cb;
  --green-100: #e5f0eb;
  --green-50: #f3f8f5;
  --graphite-950: #15181a;
  --graphite-900: #1f2326;
  --graphite-800: #2b3034;
  --graphite-700: #3a4046;
  --graphite-500: #6b737a;
  --graphite-400: #8d959c;
  --graphite-300: #c9ced2;
  --graphite-200: #dfe3e6;
  --graphite-100: #eef1f2;
  --graphite-50: #f7f8f9;
  --white: #ffffff;
  --amber-600: #b87a10;
  --amber-500: #d4921c;
  --amber-100: #fbf1de;
  --red-700: #9c2f27;
  --red-100: #f8e4e1;

  --bg: var(--white);
  --surface: var(--white);
  --surface-2: var(--graphite-50);
  --text: var(--graphite-900);
  --muted: var(--graphite-500);
  --border: var(--graphite-200);
  --accent: var(--green-700);

  --font: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --radius: 6px;
  --shadow: 0 1px 2px rgba(15, 30, 25, .06), 0 4px 16px rgba(15, 30, 25, .06);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--text); background: var(--bg); font-size: 15px; line-height: 1.55; }
a { color: var(--green-700); }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
code, .mono { font-family: var(--mono); font-size: .92em; }
button, input, select, textarea { font: inherit; color: inherit; }
img, svg { max-width: 100%; }
:focus-visible { outline: 2px solid var(--amber-500); outline-offset: 2px; }

/* ---------- Buttons & form controls ---------- */
.btn { display: inline-flex; align-items: center; gap: .5em; padding: .6em 1.1em; border-radius: var(--radius); border: 1px solid transparent; font-weight: 600; font-size: .92rem; cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s; }
.btn-primary { background: var(--green-700); color: var(--white); }
.btn-primary:hover { background: var(--green-800); }
.btn-secondary { background: var(--white); color: var(--green-800); border-color: var(--graphite-300); }
.btn-secondary:hover { border-color: var(--green-600); }
.btn-ghost { background: transparent; color: inherit; border-color: rgba(255,255,255,.3); }
.btn-ghost:hover { border-color: rgba(255,255,255,.7); }
.btn-amber { background: var(--amber-500); color: var(--graphite-950); }
.btn-amber:hover { background: var(--amber-600); color: var(--white); }
.btn-sm { padding: .35em .75em; font-size: .82rem; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

label { display: block; font-size: .82rem; font-weight: 600; color: var(--graphite-700); margin-bottom: .3em; }
input[type=text], input[type=email], input[type=search], input[type=number], select, textarea {
  width: 100%; padding: .55em .7em; border: 1px solid var(--graphite-300); border-radius: var(--radius); background: var(--white); font-size: .92rem;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--green-600); box-shadow: 0 0 0 3px rgba(27,115,86,.15); }
textarea { resize: vertical; min-height: 90px; }
.check { display: flex; gap: .5em; align-items: flex-start; font-weight: 400; font-size: .85rem; color: var(--graphite-700); }
.check input { margin-top: .25em; }

/* ---------- Status pills ---------- */
.pill { display: inline-block; padding: .1em .55em; border-radius: 999px; font-size: .72rem; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; border: 1px solid transparent; white-space: nowrap; }
.pill-green { background: var(--green-100); color: var(--green-800); }
.pill-amber { background: var(--amber-100); color: #7a4f05; }
.pill-red { background: var(--red-100); color: var(--red-700); }
.pill-grey { background: var(--graphite-100); color: var(--graphite-700); }
.pill-outline { border-color: var(--graphite-300); color: var(--graphite-700); }
.demo-tag { display: inline-flex; align-items: center; gap: .4em; font-family: var(--mono); font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; color: #7a4f05; background: var(--amber-100); border: 1px solid #ecd3a3; padding: .15em .55em; border-radius: 3px; }

/* ---------- Trace graph (shared) ---------- */
.graph-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--graphite-50) linear-gradient(var(--graphite-100) 1px, transparent 1px) 0 0 / 100% 24px; }
.graph-wrap svg { display: block; max-width: none; }
.g-col-title { font: 600 10px var(--mono); letter-spacing: .08em; fill: var(--graphite-500); text-transform: uppercase; }
.g-node rect { fill: var(--white); stroke: var(--graphite-300); stroke-width: 1; rx: 4; }
.g-node { cursor: pointer; }
.g-node:hover rect, .g-node.selected rect { stroke: var(--green-700); stroke-width: 2; }
.g-node .g-bar { stroke: none; }
.g-node .g-id { font: 600 11.5px var(--mono); fill: var(--graphite-900); }
.g-node .g-sub { font: 400 10.5px var(--font); fill: var(--graphite-500); }
.g-node.ex-ROOT rect { fill: var(--green-800); stroke: var(--green-900); }
.g-node.ex-ROOT .g-id { fill: var(--white); }
.g-node.ex-ROOT .g-sub { fill: var(--green-200); }
.g-bar.ex-VERIFIED { fill: var(--green-600); }
.g-bar.ex-UNVERIFIED { fill: var(--graphite-500); }
.g-bar.ex-POSSIBLE { fill: var(--amber-500); }
.g-bar.ex-ROOT { fill: var(--amber-500); }
.g-edge { fill: none; stroke-width: 1.6; }
.g-edge.ev-VERIFIED { stroke: var(--green-600); }
.g-edge.ev-UNVERIFIED { stroke: var(--graphite-500); stroke-dasharray: 6 4; }
.g-edge.ev-POSSIBLE { stroke: var(--amber-500); stroke-dasharray: 2 4; stroke-width: 2; }
.g-edge.dim { opacity: .15; }
.g-node.dim { opacity: .35; }
.legend { display: flex; flex-wrap: wrap; gap: 1rem; font-size: .8rem; color: var(--graphite-700); }
.legend span { display: inline-flex; align-items: center; gap: .4em; }
.legend i { display: inline-block; width: 26px; height: 0; border-top: 2px solid; }
.legend .lv { border-color: var(--green-600); }
.legend .lu { border-color: var(--graphite-500); border-top-style: dashed; }
.legend .lp { border-color: var(--amber-500); border-top-style: dotted; border-top-width: 3px; }

/* ---------- Gaps list (shared) ---------- */
.gaps { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.gaps li { border: 1px solid var(--border); border-left: 4px solid var(--graphite-300); border-radius: var(--radius); padding: .6rem .8rem; background: var(--white); }
.gaps li.sev-HIGH { border-left-color: var(--red-700); }
.gaps li.sev-MEDIUM { border-left-color: var(--amber-500); }
.gaps li.sev-LOW { border-left-color: var(--graphite-400); }
.gaps .g-title { font-weight: 600; font-size: .9rem; }
.gaps .g-detail { font-size: .84rem; color: var(--graphite-700); margin-top: .15rem; }
.gaps .g-recs { margin-top: .3rem; display: flex; flex-wrap: wrap; gap: .3rem; }

.chip { font-family: var(--mono); font-size: .74rem; padding: .08em .45em; border-radius: 3px; background: var(--graphite-100); color: var(--graphite-800); border: 1px solid var(--graphite-200); cursor: default; white-space: nowrap; }
button.chip { cursor: pointer; }
button.chip:hover { border-color: var(--green-600); color: var(--green-800); }

.safeguard { display: flex; gap: .75rem; align-items: flex-start; background: var(--amber-100); border: 1px solid #ecd3a3; border-radius: var(--radius); padding: .75rem 1rem; color: #4f3405; font-size: .88rem; }
.safeguard strong { color: #3b2703; }
.safeguard svg { flex: none; margin-top: .1rem; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
