/* ============================================================
   ReCarbonX Carbon Tracking Platform — RCXCTP demo
   ============================================================ */

:root {
  --bg:        #080B0A;
  --bg-1:      #0C1110;
  --panel:     #111817;
  --panel-2:   #151D1B;
  --line:      #1F2A27;
  --line-2:    #2A3733;
  --line-faint:rgba(31,42,39,.6);
  --text:      #E9F0EB;
  --text-2:    #B4C4BB;
  --muted:     #7C8F86;
  --dim:       #566661;
  --accent:    #9BE84F;
  --accent-2:  #6FBF3A;
  --accent-dk: #16240E;
  /* --accent-strong is the accent that must stay legible on small text.
     On dark it equals --accent; on a light sheet it darkens for contrast. */
  --accent-strong: #9BE84F;
  --accent-soft:   rgba(155,232,79,.09);
  --accent-line:   rgba(155,232,79,.34);
  --on-accent:     #0A1206;
  --fill-subtle:   rgba(255,255,255,.025);
  --thead-bg:      transparent;
  --zebra:         transparent;
  --card-shadow:   none;
  --warn:      #E8B44B;
  --danger:    #E4614F;
  --info:      #5AB8D6;

  --mono: "SF Mono", "JetBrains Mono", "IBM Plex Mono", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Inter", "Helvetica Neue", Arial, sans-serif;

  --r:   14px;
  --r-s: 9px;
  --shadow: 0 20px 50px -20px rgba(0,0,0,.8);
  --nav-h: 62px;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ambient background ------------------------------------------------ */
.bg-fx { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.bg-fx .glow {
  position: absolute; border-radius: 50%; filter: blur(90px); opacity: .5;
}
.bg-fx .g1 { width: 720px; height: 720px; top: -300px; right: -180px;
  background: radial-gradient(circle, rgba(111,191,58,.30), transparent 65%); }
.bg-fx .g2 { width: 620px; height: 620px; top: 42%; left: -260px;
  background: radial-gradient(circle, rgba(90,184,214,.13), transparent 65%); }
.bg-fx .grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(155,232,79,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(155,232,79,.045) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 20%, transparent 75%);
}

#app { position: relative; z-index: 1; }

/* ============================================================
   LIGHT SHEET
   A section that re-declares the palette. Every nested component
   reads these custom properties, so nothing needs a light variant
   of its own. Structure follows the food-client: white surfaces,
   one border colour, flat (border-defined) cards, no gradients.
   ============================================================ */
.sheet {
  --bg:        #F4F7F5;
  --bg-1:      #FFFFFF;
  --panel:     #FFFFFF;
  --panel-2:   #F7FAF8;
  --line:      #E2E8E4;
  --line-2:    #CBD5CE;
  --line-faint:#EFF3F0;
  --text:      #0F172A;
  --text-2:    #334155;
  --muted:     #64748B;
  --dim:       #94A3B8;
  --accent:    #4E9B2C;
  --accent-2:  #3E8F32;
  --accent-strong: #2F7A26;
  --accent-soft:   #EDF7E6;
  --accent-line:   #C3E3A8;
  --on-accent:     #FFFFFF;
  --fill-subtle:   #F4F7F5;
  --thead-bg:      #F7FAF8;
  --zebra:         rgba(244,247,245,.55);
  --card-shadow:   0 1px 2px 0 rgba(15,23,42,.05);
  --warn:      #B45309;
  --danger:    #B91C1C;
  --info:      #1D4ED8;

  position: relative;
  background: var(--bg);
  color: var(--text);
}
/* Alternate sheet — pure white, to separate two adjacent light sections. */
.sheet.alt { --bg: #FFFFFF; --panel: #FCFDFC; --zebra: rgba(244,247,245,.7); }

/* Hairline seam where a light sheet meets a dark band. */
.sheet::before {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(155,232,79,.45), transparent);
}

/* typography -------------------------------------------------------- */
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; }
h1 { font-size: clamp(34px, 5vw, 58px); }
h2 { font-size: clamp(24px, 3vw, 34px); }
h3 { font-size: 19px; letter-spacing: -.01em; }
h4 { font-size: 15px; letter-spacing: 0; }
p  { margin: 0 0 14px; color: var(--text-2); }
a  { color: inherit; text-decoration: none; }

.eyebrow {
  font-family: var(--mono); font-size: 11px; letter-spacing: .34em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 16px;
}
.eyebrow.muted { color: var(--muted); }
.mono { font-family: var(--mono); }
.dim  { color: var(--dim); }
.muted{ color: var(--muted); }
.lead { font-size: 17px; color: var(--text-2); max-width: 72ch; }
.hash {
  font-family: var(--mono); font-size: 11.5px; color: var(--muted);
  word-break: break-all; line-height: 1.5;
}
.nowrap { white-space: nowrap; }

/* layout ------------------------------------------------------------ */
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 28px; }
.section { padding: 54px 0; }
.section-tight { padding: 30px 0; }
.stack > * + * { margin-top: 14px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grid { display: grid; gap: 16px; }
/* grid & flex items default to min-width:auto, so a wide child (e.g. a 640px
   table inside .scroll-x) would stretch the track instead of scrolling. */
.grid > *, .row > *, .nav-links, .scroll-x { min-width: 0; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
.g-2-1 { grid-template-columns: 1.65fr 1fr; }
.g-1-2 { grid-template-columns: 1fr 1.65fr; }

@media (max-width: 1080px) {
  .g4 { grid-template-columns: repeat(2, 1fr); }
  .g-2-1, .g-1-2 { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .wrap { padding: 0 18px; }
}

/* nav --------------------------------------------------------------- */
.nav {
  position: sticky; top: 0; z-index: 60; height: var(--nav-h);
  display: flex; align-items: center;
  background: rgba(8,11,10,.82);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.nav .wrap { display: flex; align-items: center; gap: 16px; width: 100%; }
.brand { display: flex; align-items: center; gap: 11px; flex-shrink: 0; }
.brand-txt { line-height: 1.05; }
.brand-txt b { font-size: 16.5px; letter-spacing: -.02em; }
.brand-txt span {
  display: block; font-family: var(--mono); font-size: 8.5px;
  letter-spacing: .22em; color: var(--accent-2); text-transform: uppercase;
}
/* Translated labels run longer than English (pt-BR is the worst case), so the
   link row must shrink and scroll rather than collide with the switcher. */
.nav-links {
  display: flex; gap: 1px; margin-left: auto; flex-wrap: nowrap;
  overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none;
}
.nav-links::-webkit-scrollbar { display: none; }
.brand, .lang { flex-shrink: 0; }
.nav-links a {
  font-size: 12.5px; color: var(--muted); padding: 7px 10px; border-radius: 100px;
  transition: .16s; white-space: nowrap;
}
.nav-links a:hover { color: var(--text); background: rgba(255,255,255,.04); }
.nav-links a.on { color: var(--accent); background: rgba(155,232,79,.10); }
.nav-badge {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .16em;
  color: var(--dim); border: 1px solid var(--line-2); padding: 4px 9px;
  border-radius: 100px; text-transform: uppercase;
  white-space: nowrap; flex-shrink: 0;
}
@media (max-width: 1600px) { .nav-badge { display: none; } }
@media (max-width: 860px) {
  .nav { height: auto; padding: 10px 0; position: relative; }
  .nav .wrap { flex-wrap: wrap; gap: 12px; }
  .nav-links { margin-left: 0; width: 100%; overflow-x: auto; flex-wrap: nowrap; }
}

/* logo mark --------------------------------------------------------- */
.mark { width: 34px; height: 34px; flex-shrink: 0; }

/* cards ------------------------------------------------------------- */
.card {
  background: linear-gradient(160deg, var(--panel), var(--bg-1));
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 22px;
  box-shadow: var(--card-shadow);
}
.sheet .card { background: var(--panel); }
.card.pad-s { padding: 16px; }
.card.hi {
  border-color: var(--accent-line);
  background: linear-gradient(160deg, rgba(155,232,79,.075), rgba(155,232,79,.015));
}
.sheet .card.hi { background: var(--accent-soft); }
.card.flat { background: var(--panel); }
.card-h {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 16px; padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.card-h h3 { font-size: 16px; }
.card-t {
  font-family: var(--mono); font-size: 10px; letter-spacing: .22em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 12px;
}

/* pills / badges ---------------------------------------------------- */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em;
  text-transform: uppercase; padding: 5px 11px; border-radius: 100px;
  border: 1px solid var(--line-2); color: var(--text-2); white-space: nowrap;
}
.pill.ok      { color: var(--accent-strong); border-color: var(--accent-line); background: var(--accent-soft); }
.pill.solid   { color: #0A1206; background: var(--accent); border-color: var(--accent); font-weight: 700; }
.pill.warn    { color: var(--warn);    border-color: rgba(232,180,75,.42); background: rgba(232,180,75,.09); }
.pill.danger  { color: var(--danger);  border-color: rgba(228,97,79,.42);  background: rgba(228,97,79,.09); }
.pill.info    { color: var(--info);    border-color: rgba(90,184,214,.42); background: rgba(90,184,214,.09); }
.pill.dimmed  { color: var(--dim);     border-color: var(--line); }
.dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.dot.pulse { animation: pulse 2.2s infinite; }
@keyframes pulse {
  0%,100% { opacity: 1; box-shadow: 0 0 0 0 currentColor; }
  50%     { opacity: .55; box-shadow: 0 0 0 4px rgba(155,232,79,0); }
}

/* buttons ----------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  font-family: var(--mono); font-size: 12px; letter-spacing: .06em;
  padding: 11px 20px; border-radius: 100px; border: 1px solid var(--line-2);
  background: transparent; color: var(--text); transition: .18s;
}
.btn:hover { border-color: var(--accent-2); color: var(--accent); }
.btn.primary {
  background: var(--accent); color: #0A1206; border-color: var(--accent); font-weight: 700;
}
.btn.primary:hover { background: #AEF463; color: #0A1206; box-shadow: 0 0 26px -6px rgba(155,232,79,.6); }
.btn.sm { padding: 7px 14px; font-size: 11px; }

/* stat tiles -------------------------------------------------------- */
.stat { padding: 18px 20px; }
.stat .k {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .2em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 8px;
}
.stat .v { font-size: 30px; font-weight: 700; letter-spacing: -.03em; line-height: 1; }
.stat .v small { font-size: 14px; font-weight: 500; color: var(--muted); margin-left: 4px; letter-spacing: 0; }
.stat .s { font-size: 12px; color: var(--dim); margin-top: 7px; }
.stat.accent .v { color: var(--accent); }

/* tables ------------------------------------------------------------ */
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th {
  text-align: left; font-family: var(--mono); font-size: 9.5px; font-weight: 500;
  letter-spacing: .18em; text-transform: uppercase; color: var(--muted);
  padding: 0 14px 11px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.tbl td { padding: 13px 14px; border-bottom: 1px solid var(--line-faint); vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr { transition: background .14s; }
.tbl tbody tr:hover { background: var(--fill-subtle); }
.tbl td.num, .tbl th.num { text-align: right; font-family: var(--mono); }
.tbl .lead-cell { font-weight: 600; color: var(--text); }
.scroll-x { overflow-x: auto; }
.scroll-x .tbl { min-width: 640px; }

/* key/value rows ---------------------------------------------------- */
.kv { display: grid; grid-template-columns: minmax(120px, 40%) 1fr; gap: 2px 14px; font-size: 13.5px; }
.kv dt {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted); padding: 9px 0;
  border-bottom: 1px solid var(--line-faint);
}
.kv dd {
  margin: 0; padding: 9px 0; color: var(--text);
  border-bottom: 1px solid var(--line-faint); overflow-wrap: anywhere;
}
.kv dt:last-of-type, .kv dd:last-of-type { border-bottom: 0; }

/* ============================================================
   HERO / SEARCH
   ============================================================ */
.hero { padding: 76px 0 44px; position: relative; }
.hero h1 { max-width: 16ch; margin-bottom: 20px; }
.hero .lead { font-size: 18px; margin-bottom: 30px; }
.hero-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 26px; }

.search-box {
  display: flex; align-items: center; gap: 12px;
  background: rgba(17,24,23,.9); border: 1px solid var(--line-2);
  border-radius: 100px; padding: 7px 8px 7px 22px; max-width: 620px;
  transition: .2s;
}
.search-box:focus-within {
  border-color: var(--accent-2);
  box-shadow: 0 0 0 4px rgba(155,232,79,.09), 0 0 40px -12px rgba(155,232,79,.4);
}
.search-box input {
  flex: 1; background: none; border: 0; outline: 0; color: var(--text);
  font-family: var(--mono); font-size: 14px; min-width: 0; padding: 8px 0;
}
.search-box input::placeholder { color: var(--dim); }
.search-hint { margin-top: 12px; font-size: 12.5px; color: var(--dim); }
.search-hint code {
  font-family: var(--mono); color: var(--accent-2); cursor: pointer;
  border-bottom: 1px dashed rgba(111,191,58,.4);
}
.search-hint code:hover { color: var(--accent); }

/* hero visual ------------------------------------------------------- */
.hero-visual { position: relative; min-height: 380px; }

/* On a phone the hero otherwise eats two full screens — the decorative hex
   graphic alone is ~430px tall — so the reader never reaches a light sheet
   before deciding the page is "dark". Drop the decoration and tighten the
   spacing so the first light content lands within the first scroll. */
@media (max-width: 860px) {
  .hero { padding: 30px 0 26px; }
  .hero-visual { display: none; }
  .hero h1 { font-size: clamp(30px, 8vw, 40px); margin-bottom: 14px; }
  .hero .lead { font-size: 15.5px; margin-bottom: 20px; }
  .hero .grid { gap: 0 !important; }
  .hero-tags { margin-top: 18px; }
  .section { padding: 36px 0; }
  .section-tight { padding: 22px 0; }
}

/* ============================================================
   PASSPORT
   ============================================================ */
.passport-head {
  display: flex; gap: 26px; align-items: flex-start; flex-wrap: wrap;
  justify-content: space-between;
}
.token-id {
  font-family: var(--mono); font-size: clamp(20px, 3vw, 30px);
  letter-spacing: -.01em; color: var(--text); word-break: break-all;
}
.verified-stamp {
  display: flex; align-items: center; gap: 12px;
  border: 1px solid var(--accent-line); background: var(--accent-soft);
  border-radius: var(--r); padding: 14px 18px;
}
.verified-stamp .big {
  font-family: var(--mono); font-size: 13px; letter-spacing: .1em;
  color: var(--accent); text-transform: uppercase; font-weight: 700;
}
.verified-stamp .sub { font-size: 11.5px; color: var(--muted); }

/* lifecycle rail ---------------------------------------------------- */
.rail { position: relative; padding-left: 46px; }
.rail::before {
  content: ''; position: absolute; left: 15px; top: 12px; bottom: 12px; width: 2px;
  background: linear-gradient(180deg, var(--accent-2), rgba(111,191,58,.15));
}
.rail-item { position: relative; padding-bottom: 26px; }
.rail-item:last-child { padding-bottom: 0; }
.rail-node {
  position: absolute; left: -46px; top: 2px;
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 10.5px; font-weight: 700;
  background: var(--bg); border: 2px solid var(--accent-2); color: var(--accent);
}
.rail-item.final .rail-node { background: var(--accent); color: #0A1206; border-color: var(--accent); }
.rail-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.rail-head h4 { font-size: 16px; font-weight: 700; }
.rail-date { font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.rail-actor { font-size: 12.5px; color: var(--accent-2); margin-bottom: 9px; }
.rail-body { font-size: 13.5px; color: var(--text-2); margin-bottom: 12px; max-width: 78ch; }
.fact-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(158px, 1fr));
  gap: 1px; background: var(--line); border: 1px solid var(--line);
  border-radius: var(--r-s); overflow: hidden;
}
.fact { background: var(--panel); padding: 10px 13px; }
.fact .k {
  font-family: var(--mono); font-size: 9px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 3px;
}
.fact .v { font-size: 13px; font-weight: 600; }
.anchor-line {
  margin-top: 10px; display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
  font-family: var(--mono); font-size: 10.5px; color: var(--dim);
}
.anchor-line .h { color: var(--muted); word-break: break-all; }

/* chain of custody -------------------------------------------------- */
.chain-item {
  display: grid; grid-template-columns: 96px 1fr auto; gap: 16px;
  align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line-faint);
}
.chain-item:last-child { border-bottom: 0; }
.chain-item .when { font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.chain-item .who { font-weight: 600; font-size: 14px; }
.chain-item .role { font-size: 12px; color: var(--dim); }
.chain-item .wallet { font-family: var(--mono); font-size: 10.5px; color: var(--muted); margin-top: 3px; word-break: break-all; }
.chain-item.retired .who { color: var(--accent); }
@media (max-width: 700px) {
  .chain-item { grid-template-columns: 1fr; gap: 5px; }
}

/* evidence ---------------------------------------------------------- */
.ev-cat { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--panel); }
.ev-head {
  display: flex; align-items: center; gap: 12px; padding: 15px 18px;
  border-bottom: 1px solid var(--line); background: var(--panel-2);
}
.ev-head .ic {
  width: 32px; height: 32px; border-radius: 8px; flex-shrink: 0;
  background: var(--accent-soft); border: 1px solid var(--accent-line);
  display: flex; align-items: center; justify-content: center; color: var(--accent);
}
.ev-head .t { font-weight: 700; font-size: 14.5px; }
.ev-head .c { font-family: var(--mono); font-size: 11px; color: var(--muted); margin-left: auto; }
.ev-note { padding: 11px 18px 0; font-size: 12.5px; color: var(--dim); }
.ev-items { padding: 12px 18px 18px; display: grid; gap: 10px; }
.ev-item {
  display: grid; grid-template-columns: 62px 1fr; gap: 12px; align-items: center;
  padding: 8px; border-radius: var(--r-s); transition: .15s; cursor: default;
}
.ev-item:hover { background: var(--fill-subtle); }
.ev-thumb {
  width: 62px; height: 46px; border-radius: 6px; overflow: hidden;
  border: 1px solid var(--line-2); position: relative;
}
.ev-item .t { font-size: 13px; font-weight: 600; line-height: 1.3; }
.ev-item .m { font-family: var(--mono); font-size: 10.5px; color: var(--muted); margin-top: 3px; }
.ev-item .b { font-size: 11px; color: var(--dim); }
.ev-seal {
  display: inline-flex; align-items: center; gap: 5px; margin-top: 4px;
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--accent-2);
}

/* manifest terminal ------------------------------------------------- */
.terminal {
  background: #060908; border: 1px solid var(--line-2); border-radius: var(--r);
  overflow: hidden;
}
.terminal-bar {
  display: flex; align-items: center; gap: 8px; padding: 11px 16px;
  border-bottom: 1px solid var(--line); background: var(--panel-2);
}
.terminal-bar .t {
  font-family: var(--mono); font-size: 11px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--accent);
}
.terminal-body { padding: 16px 18px; font-family: var(--mono); font-size: 11.5px; line-height: 1.85; }
.terminal-body .l { display: grid; grid-template-columns: 152px 1fr; gap: 12px; }
.terminal-body .k { color: var(--dim); }
.terminal-body .v { color: var(--text-2); overflow-wrap: anywhere; }
.terminal-body .l.hl .v { color: var(--accent); font-weight: 600; }
.terminal-foot {
  padding: 11px 18px; border-top: 1px solid var(--line);
  font-family: var(--mono); font-size: 10px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--accent-2);
}
@media (max-width: 600px) { .terminal-body .l { grid-template-columns: 1fr; gap: 0; } }

/* compliance -------------------------------------------------------- */
.comp-card { border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); padding: 18px; }
.comp-card .name { font-weight: 700; font-size: 14.5px; margin-bottom: 12px; }
.comp-row {
  display: flex; justify-content: space-between; gap: 10px; align-items: center;
  font-family: var(--mono); font-size: 11.5px; padding: 8px 11px;
  background: var(--fill-subtle); border-radius: 6px; margin-bottom: 6px;
}
.comp-row .k { color: var(--muted); }
.comp-row .v { color: var(--text-2); }
.comp-card .note { font-size: 11.5px; color: var(--dim); margin-top: 11px; line-height: 1.5; }
.state-unknown { color: var(--muted) !important; font-weight: 700; }
.state-pending { color: var(--warn) !important;  font-weight: 700; }
.state-no      { color: var(--dim) !important;   font-weight: 700; }
.state-ok      { color: var(--accent) !important; font-weight: 700; }

/* payments ---------------------------------------------------------- */
.pay-bar { height: 10px; border-radius: 100px; overflow: hidden; display: flex; background: var(--line); }
.pay-bar span { display: block; height: 100%; }
.pay-legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 14px; font-size: 12px; }
.pay-legend .i { display: flex; align-items: center; gap: 7px; color: var(--text-2); }
.pay-legend .sw { width: 9px; height: 9px; border-radius: 3px; }

/* QR ---------------------------------------------------------------- */
.qr-panel { text-align: center; }
.qr-frame {
  display: inline-block; padding: 14px; background: #fff; border-radius: 12px;
  box-shadow: 0 0 44px -10px rgba(155,232,79,.35);
}
.qr-frame svg { display: block; }
.qr-cap {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--muted); margin-top: 14px;
}
.qr-url { font-family: var(--mono); font-size: 11px; color: var(--accent-2); margin-top: 6px; word-break: break-all; }

/* map --------------------------------------------------------------- */
.map-shell {
  position: relative; border: 1px solid var(--line-2); border-radius: var(--r);
  overflow: hidden; background: #060B08;
}
.map-shell svg { display: block; width: 100%; height: auto; }
.map-legend {
  position: absolute; left: 14px; bottom: 14px; display: grid; gap: 6px;
  background: rgba(6,11,8,.86); border: 1px solid var(--line);
  border-radius: 9px; padding: 11px 13px; backdrop-filter: blur(8px);
}
.map-legend .i { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--text-2); }
.map-legend .sw { width: 10px; height: 10px; border-radius: 3px; }
.map-badge {
  position: absolute; right: 14px; top: 14px;
  background: rgba(6,11,8,.86); border: 1px solid var(--line);
  border-radius: 9px; padding: 9px 13px; backdrop-filter: blur(8px);
  font-family: var(--mono); font-size: 10px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--accent);
}
@media (max-width: 620px) { .map-legend { position: static; margin: 12px; } }

/* charts ------------------------------------------------------------ */
.chart { width: 100%; height: auto; display: block; }
.chart-legend { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 12px; font-size: 12px; color: var(--text-2); }
.chart-legend .i { display: flex; align-items: center; gap: 7px; }
.chart-legend .sw { width: 14px; height: 3px; border-radius: 2px; }

/* audit log --------------------------------------------------------- */
.log-item {
  display: grid; grid-template-columns: 148px 190px 1fr; gap: 16px;
  padding: 12px 14px; border-bottom: 1px solid var(--line-faint);
  font-size: 13px; align-items: start; transition: .14s;
}
.log-item:hover { background: var(--fill-subtle); }
.log-item .ts { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.log-item .ty { font-family: var(--mono); font-size: 11.5px; font-weight: 600; }
.log-item.ok   .ty { color: var(--accent); }
.log-item.warn .ty { color: var(--warn); }
.log-item.danger .ty { color: var(--danger); }
.log-item .de { color: var(--text-2); }
.log-item .ac { font-family: var(--mono); font-size: 10.5px; color: var(--dim); margin-top: 3px; }
@media (max-width: 860px) { .log-item { grid-template-columns: 1fr; gap: 4px; } }

/* findings ---------------------------------------------------------- */
.finding {
  border: 1px solid var(--line); border-left: 3px solid var(--accent-2);
  border-radius: var(--r-s); padding: 15px 18px; background: var(--panel);
}
.finding.minor { border-left-color: var(--muted); }
.finding .id { font-family: var(--mono); font-size: 11px; color: var(--accent); letter-spacing: .1em; }
.finding .t { font-weight: 600; font-size: 14px; margin: 5px 0 8px; }
.finding .r { font-size: 12.5px; color: var(--text-2); }
.finding .d { font-family: var(--mono); font-size: 10.5px; color: var(--dim); margin-top: 8px; }

/* landowner --------------------------------------------------------- */
.phone {
  max-width: 380px; margin: 0 auto; border: 10px solid #171F1D;
  border-radius: 38px; overflow: hidden; background: var(--bg-1);
  box-shadow: 0 30px 70px -24px rgba(0,0,0,.9), 0 0 0 1px var(--line-2);
}
.phone-notch { height: 26px; background: #171F1D; position: relative; }
.phone-notch::after {
  content: ''; position: absolute; left: 50%; transform: translateX(-50%);
  top: 6px; width: 88px; height: 5px; border-radius: 100px; background: #0A0F0E;
}
.phone-body { padding: 20px 18px 26px; }
.lo-hero { text-align: center; padding: 8px 0 18px; border-bottom: 1px solid var(--line); }
.lo-hero .n { font-size: 18px; font-weight: 700; }
.lo-hero .p { font-family: var(--mono); font-size: 11px; color: var(--muted); margin-top: 3px; }
.lo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 18px 0; }
.lo-tile {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 11px; padding: 13px;
}
.lo-tile .k {
  font-family: var(--mono); font-size: 8.5px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 5px;
}
.lo-tile .v { font-size: 20px; font-weight: 700; letter-spacing: -.02em; }
.lo-tile.accent { border-color: var(--accent-line); background: var(--accent-soft); }
.lo-tile.accent .v { color: var(--accent); }
.lo-pay { display: flex; justify-content: space-between; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line-faint); }
.lo-pay .d { font-family: var(--mono); font-size: 10.5px; color: var(--muted); }
.lo-pay .n { font-size: 11.5px; color: var(--text-2); }
.lo-pay .a { font-family: var(--mono); font-size: 13px; font-weight: 700; color: var(--accent); white-space: nowrap; }

/* misc -------------------------------------------------------------- */
.notice {
  display: flex; gap: 14px; align-items: flex-start;
  border: 1px solid var(--accent-line); background: var(--accent-soft);
  border-radius: var(--r); padding: 18px 20px;
}
.notice .ic { color: var(--accent); flex-shrink: 0; margin-top: 1px; }
.notice h4 { margin-bottom: 4px; }
.notice p { margin: 0; font-size: 13.5px; }

.footer {
  border-top: 1px solid var(--line); margin-top: 60px; padding: 34px 0 46px;
  font-size: 12.5px; color: var(--dim);
}
.footer .wrap { display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; align-items: center; }

.demo-flag {
  position: fixed; right: 14px; bottom: 14px; z-index: 90;
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--dim);
  background: rgba(8,11,10,.9); border: 1px solid var(--line-2);
  padding: 7px 13px; border-radius: 100px; backdrop-filter: blur(8px);
}

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 24px; flex-wrap: wrap; }
.tab {
  padding: 11px 17px; cursor: pointer; font-size: 13.5px; color: var(--muted);
  border-bottom: 2px solid transparent; margin-bottom: -1px; transition: .16s; white-space: nowrap;
}
.tab:hover { color: var(--text); }
.tab.on { color: var(--accent); border-bottom-color: var(--accent); }

.sec-title { display: flex; align-items: baseline; gap: 14px; margin-bottom: 20px; flex-wrap: wrap; }
.sec-title h2 { font-size: 24px; }
.sec-title .n {
  font-family: var(--mono); font-size: 11px; color: var(--accent-2); letter-spacing: .18em;
}

.fadein { animation: fadein .45s ease both; }
@keyframes fadein { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: none; } }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-1); }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 100px; }
::-webkit-scrollbar-thumb:hover { background: #384743; }

/* ============================================================
   LIGHT-SHEET COMPONENT ADJUSTMENTS
   Only what the variable swap alone cannot express.
   ============================================================ */

/* Buttons: on light, outline buttons need a real surface. */
.sheet .btn { background: var(--panel); border-color: var(--line-2); color: var(--text-2); }
.sheet .btn:hover { border-color: var(--accent-2); color: var(--accent-strong); background: var(--accent-soft); }
.sheet .btn.primary {
  background: var(--accent-strong); color: #fff; border-color: var(--accent-strong);
}
.sheet .btn.primary:hover { background: #276A1F; color: #fff; box-shadow: none; }

/* Solid pill: dark green field, white text (inverted from the dark theme). */
.sheet .pill.solid { background: var(--accent-strong); color: #fff; border-color: var(--accent-strong); }
.sheet .pill.warn   { background: #FEF3C7; border-color: #FDE68A; color: #B45309; }
.sheet .pill.danger { background: #FEE2E2; border-color: #FECACA; color: #B91C1C; }
.sheet .pill.info   { background: #DBEAFE; border-color: #BFDBFE; color: #1D4ED8; }
.sheet .pill.dimmed { background: var(--panel-2); border-color: var(--line); color: var(--text-2); }

/* Tables: tinted sticky header + zebra rows, as in the food-client DataTable. */
.sheet .tbl thead th { background: var(--thead-bg); color: var(--text-2); }
.sheet .tbl tbody tr:nth-child(even) { background: var(--zebra); }
.sheet .tbl tbody tr:hover { background: var(--accent-soft); }

/* Search box on a light sheet. */
.sheet .search-box { background: var(--panel); border-color: var(--line-2); }

/* Eyebrow / section number stay green but need the darker tone. */
.sheet .eyebrow { color: var(--accent-strong); }
.sheet .sec-title .n { color: var(--accent-strong); }
.sheet .stat.accent .v { color: var(--accent-strong); }
.sheet .card-h { border-bottom-color: var(--line); }
.sheet .finding { border-left-color: var(--accent); }
.sheet .rail-node { background: var(--panel); }
.sheet .rail-actor { color: var(--accent-strong); }
.sheet .chain-item.retired .who { color: var(--accent-strong); }
.sheet .ev-seal { color: var(--accent-strong); }
.sheet .lo-tile.accent .v { color: var(--accent-strong); }
.sheet .lo-pay .a { color: var(--accent-strong); }
.sheet .state-ok { color: var(--accent-strong) !important; }
.sheet .log-item.ok .ty { color: var(--accent-strong); }
.sheet .log-item.warn .ty { color: #B45309; }
.sheet .qr-frame { box-shadow: 0 1px 3px rgba(15,23,42,.12); border: 1px solid var(--line); }
.sheet .fact-grid { background: var(--line); border-color: var(--line); }
.sheet .verified-stamp { background: var(--accent-soft); border-color: var(--accent-line); }
.sheet .verified-stamp .big { color: var(--accent-strong); }

/* Surfaces that stay dark inside a light sheet: they are "screens", not
   panels — a terminal, a satellite map and a phone. Re-assert dark tokens. */
.sheet .terminal,
.sheet .map-shell,
.sheet .phone {
  --panel: #111817; --panel-2: #151D1B; --line: #1F2A27; --line-2: #2A3733;
  --line-faint: rgba(31,42,39,.6);
  --text: #E9F0EB; --text-2: #B4C4BB; --muted: #7C8F86; --dim: #566661;
  --accent: #9BE84F; --accent-strong: #9BE84F;
  --accent-soft: rgba(155,232,79,.09); --accent-line: rgba(155,232,79,.34);
  --fill-subtle: rgba(255,255,255,.025);
  --on-accent: #0A1206;
  color: var(--text);
}
.sheet .phone { background: #0C1110; }
.sheet .phone .card-t { color: var(--muted); }
.sheet .terminal { box-shadow: 0 8px 24px -12px rgba(15,23,42,.35); }
.sheet .map-shell { box-shadow: 0 8px 24px -12px rgba(15,23,42,.35); }

/* ============================================================
   LANGUAGE SWITCHER
   ============================================================ */
.lang {
  display: flex; gap: 2px; padding: 3px; border-radius: 100px;
  border: 1px solid var(--line-2); flex-shrink: 0;
}
.lang button {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em;
  padding: 5px 10px; border-radius: 100px; border: 0; cursor: pointer;
  background: transparent; color: var(--muted); transition: .15s;
}
.lang button:hover { color: var(--text); }
.lang button.on { background: var(--accent); color: var(--on-accent); font-weight: 700; }
@media (max-width: 860px) { .lang { order: 3; } }

@media print {
  .nav, .demo-flag, .footer { display: none; }
  body { background: #fff; color: #000; }
}
