/* ============================================================
   Urvara / Textile Ontology Systems — WIREFRAME stylesheet
   Low-fidelity sign-off artifact. Greyscale only.
   System font stack, no web fonts, no external dependencies.
   ============================================================ */

:root {
  --ink:        #2b2b2b;   /* near-black text                  */
  --ink-soft:   #555;      /* secondary text                   */
  --ink-faint:  #888;      /* labels, captions, placeholders   */
  --line:       #b3b3b3;   /* standard box border              */
  --line-soft:  #cfcfcf;   /* faint divider                    */
  --fill:       #f4f4f4;   /* panel fill                       */
  --fill-2:     #ececec;   /* nested / darker panel fill       */
  --fill-3:     #e2e2e2;   /* placeholder block fill           */
  --paper:      #fafafa;   /* page background                  */
  --note:       #f3ead2;   /* annotation sticky-note fill      */
  --note-line:  #d9c78c;   /* annotation border                */
  --note-ink:   #6b5d2f;   /* annotation text                  */
  --stamp:      #9a9a9a;   /* WIREFRAME stamp grey             */
  --radius:     3px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink);
  background: var(--paper);
  /* faint grid wash to reinforce "this is a wireframe canvas" */
  background-image:
    linear-gradient(rgba(0,0,0,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,0.02) 1px, transparent 1px);
  background-size: 24px 24px;
}

/* ---------- WIREFRAME corner stamp (on every page) ---------- */
.wf-stamp {
  position: fixed;
  top: 10px;
  right: 10px;
  z-index: 50;
  border: 2px solid var(--stamp);
  color: var(--stamp);
  font-weight: 700;
  letter-spacing: 0.18em;
  font-size: 11px;
  padding: 4px 9px;
  border-radius: var(--radius);
  transform: rotate(4deg);
  background: rgba(250,250,250,0.85);
  text-transform: uppercase;
  pointer-events: none;
}

/* ---------- header ribbon ---------- */
.ribbon {
  background: var(--fill-2);
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 12px;
  letter-spacing: 0.04em;
  padding: 7px 18px;
  text-align: center;
}
.ribbon strong { color: var(--ink); letter-spacing: 0.14em; }
.ribbon .dot { color: var(--ink-faint); margin: 0 7px; }

/* ---------- top nav ---------- */
.topnav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 9px 18px;
  position: sticky;
  top: 0;
  z-index: 40;
}
.topnav .brand {
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-right: 14px;
  color: var(--ink);
  white-space: nowrap;
}
.topnav .brand .sub {
  font-weight: 400;
  color: var(--ink-faint);
  font-size: 11px;
  display: block;
  letter-spacing: 0.06em;
}
.topnav a.nav {
  text-decoration: none;
  color: var(--ink-soft);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 5px 11px;
  font-size: 12.5px;
  background: var(--fill);
  white-space: nowrap;
}
.topnav a.nav:hover { background: var(--fill-2); color: var(--ink); }
.topnav a.nav.active {
  border-style: solid;
  border-color: var(--ink-faint);
  background: var(--fill-2);
  color: var(--ink);
  font-weight: 600;
}
.topnav .nav-num {
  color: var(--ink-faint);
  font-size: 10px;
  margin-right: 5px;
}

/* ---------- layout shell ---------- */
.page {
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px 22px 80px;
}
.page-title {
  font-size: 20px;
  font-weight: 700;
  margin: 6px 0 2px;
}
.page-sub {
  color: var(--ink-faint);
  font-size: 13px;
  margin: 0 0 18px;
}

/* generic wireframe region */
.region {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 16px;
  margin-bottom: 18px;
}
.region.dashed { border-style: dashed; }
.region.fill   { background: var(--fill); }
.region h2 {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  margin: 0 0 12px;
  font-weight: 700;
  border-bottom: 1px solid var(--line-soft);
  padding-bottom: 7px;
}
.region h3 {
  font-size: 13px;
  margin: 0 0 6px;
  color: var(--ink);
}

.cols   { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; }
.col    { flex: 1 1 0; min-width: 240px; }
.col-narrow { flex: 0 0 300px; }
.col-wide   { flex: 2 1 0; min-width: 320px; }

.muted   { color: var(--ink-faint); }
.small   { font-size: 12px; }
.tiny    { font-size: 11px; }
.mono    { font-family: ui-monospace, "Cascadia Code", Consolas, "Courier New", monospace; }
.mb0 { margin-bottom: 0; }
.center { text-align: center; }

/* ---------- placeholder boxes ---------- */
.ph {
  background: var(--fill-3);
  border: 1px solid var(--line);
  color: var(--ink-faint);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-radius: var(--radius);
  font-size: 11px;
  line-height: 1.3;
  padding: 6px;
}
/* hatched "scan placeholder" look */
.ph.scan {
  background-color: var(--fill-3);
  background-image: repeating-linear-gradient(
    -45deg,
    rgba(0,0,0,0.045) 0,
    rgba(0,0,0,0.045) 2px,
    transparent 2px,
    transparent 7px
  );
}
.doc-thumb {
  width: 86px;
  height: 112px;
  flex: 0 0 86px;
}
.doc-thumb.sm { width: 54px; height: 70px; flex-basis: 54px; }

/* ---------- form fields (static, wireframe) ---------- */
.field { margin-bottom: 12px; }
.field label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
  margin-bottom: 4px;
}
.control {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 8px 10px;
  font-size: 13px;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.control.select::after {
  content: "▾";
  color: var(--ink-faint);
  font-size: 11px;
}
.control .chosen { color: var(--ink); }
.options {
  border: 1px dashed var(--line);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  background: var(--fill);
}
.options .opt {
  padding: 5px 10px;
  font-size: 12.5px;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--line-soft);
}
.options .opt:last-child { border-bottom: none; }
.options .opt.sel { background: var(--fill-2); color: var(--ink); font-weight: 600; }

.btn {
  display: inline-block;
  border: 1px solid var(--ink-faint);
  background: var(--fill-2);
  color: var(--ink);
  padding: 7px 14px;
  border-radius: var(--radius);
  font-size: 12.5px;
  text-decoration: none;
}
.btn.ghost { background: #fff; border-style: dashed; color: var(--ink-soft); }

.radioset { display: flex; gap: 8px; flex-wrap: wrap; }
.radio {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 12px;
  color: var(--ink-soft);
  background: #fff;
}
.radio.on {
  border-color: var(--ink-faint);
  background: var(--fill-2);
  color: var(--ink);
  font-weight: 600;
}
.radio .mark { color: var(--ink); margin-right: 5px; }

/* ---------- pills / status tags ---------- */
.pill {
  display: inline-block;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 1px 9px;
  font-size: 11px;
  color: var(--ink-soft);
  background: var(--fill);
  white-space: nowrap;
}
.pill.solid { background: var(--fill-2); color: var(--ink); border-color: var(--ink-faint); }
.pill.orig  { font-weight: 600; }
.pill.copy  { font-style: italic; }
.pill.telex { letter-spacing: 0.04em; }

.leg-tag {
  display: inline-block;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 1px 6px;
}

/* ---------- document table / list ---------- */
table.doclist {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
table.doclist th {
  text-align: left;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
  border-bottom: 1px solid var(--line);
  padding: 6px 8px;
  font-weight: 700;
}
table.doclist td {
  border-bottom: 1px solid var(--line-soft);
  padding: 8px;
  vertical-align: middle;
  color: var(--ink-soft);
}
table.doclist td.thumbcell { width: 60px; }
table.doclist tr:last-child td { border-bottom: none; }

/* ---------- annotation callout (sticky-note) ---------- */
.note {
  background: var(--note);
  border: 1px solid var(--note-line);
  border-left: 4px solid var(--note-line);
  color: var(--note-ink);
  border-radius: var(--radius);
  padding: 10px 13px;
  font-size: 12.5px;
  line-height: 1.5;
  margin: 14px 0;
  box-shadow: 1px 1px 0 rgba(0,0,0,0.04);
}
.note .tag {
  display: inline-block;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--note-ink);
  opacity: 0.8;
  margin-right: 7px;
  border: 1px solid var(--note-line);
  border-radius: 2px;
  padding: 0 5px;
}
.note p { margin: 5px 0 0; }
.note.inline { display: inline-block; max-width: 320px; vertical-align: top; }

/* ---------- chain node (screens 2 & 3) ---------- */
.chain { position: relative; }
.node {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 14px 16px;
  margin: 0 0 6px;
  position: relative;
}
.node .node-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.node .node-step {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
  border: 1px solid var(--line);
  border-radius: 50%;
  width: 24px; height: 24px;
  display: inline-flex;
  align-items: center; justify-content: center;
  flex: 0 0 24px;
}
.node .node-title { font-size: 15px; font-weight: 700; color: var(--ink); }
.node .node-meta  { color: var(--ink-faint); font-size: 12px; }
.connector {
  text-align: center;
  color: var(--ink-faint);
  font-size: 18px;
  line-height: 1;
  margin: 2px 0;
}
.connector .lbl {
  display: block;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 1px;
}

/* origin / processing leg colour-coding via border weight, not colour */
.node.leg-origin { border-left: 4px solid var(--ink-faint); }
.node.leg-process { border-left: 4px dashed var(--ink-faint); }
.node.leg-ship  { border-left: 4px dotted var(--ink-faint); }

.attached {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.attached .doc-chip {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--fill);
  padding: 6px 9px;
  font-size: 11.5px;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  gap: 7px;
}

/* ---------- bale identity widget ---------- */
.bale-widget {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: var(--fill);
  padding: 12px 14px;
}
.bale-spellings { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.bale-spellings .raw {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 3px 8px;
  font-size: 12px;
  color: var(--ink-soft);
  text-decoration: line-through;
  text-decoration-color: var(--ink-faint);
}
.bale-spellings .arrow { color: var(--ink-faint); font-size: 14px; }
.bale-spellings .canon {
  border: 1px solid var(--ink-faint);
  background: var(--fill-2);
  border-radius: var(--radius);
  padding: 3px 10px;
  font-weight: 700;
  color: var(--ink);
}

/* ---------- trust anchors (screen 3) ---------- */
.trust-grid { display: flex; gap: 14px; flex-wrap: wrap; }
.trust-card {
  flex: 1 1 200px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 12px;
  text-align: center;
}
.qr {
  width: 92px; height: 92px;
  margin: 4px auto 8px;
  border: 1px solid var(--line);
  background:
    repeating-conic-gradient(#cfcfcf 0% 25%, #e9e9e9 0% 50%) 50% / 14px 14px;
  border-radius: 2px;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-faint);
  font-size: 9px;
}
.barcode {
  height: 40px;
  margin: 6px 0;
  background: repeating-linear-gradient(
    90deg,
    var(--ink) 0 2px,
    transparent 2px 4px,
    var(--ink) 4px 5px,
    transparent 5px 9px
  );
  opacity: 0.55;
  border-radius: 1px;
}
.verify-link {
  font-size: 12px;
  color: var(--ink-soft);
  word-break: break-all;
}

/* ---------- gap callout (the value-prop, screen 3) ---------- */
.gap-callout {
  border: 2px dashed var(--ink-faint);
  border-radius: var(--radius);
  background: var(--fill);
  padding: 16px 18px;
}
.gap-callout .gap-head {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink);
  margin-bottom: 8px;
}
.gap-callout .missing {
  text-decoration: line-through;
  text-decoration-color: var(--ink-faint);
  color: var(--ink-faint);
}

/* ---------- certificate placeholder ---------- */
.cert {
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 22px;
  text-align: center;
  position: relative;
}
.cert::before, .cert::after {
  content: "";
  position: absolute;
  width: 16px; height: 16px;
  border: 2px solid var(--line);
}
.cert::before { top: 7px; left: 7px; border-right: none; border-bottom: none; }
.cert::after  { bottom: 7px; right: 7px; border-left: none; border-top: none; }
.cert .seal {
  width: 70px; height: 70px;
  border: 2px dashed var(--line);
  border-radius: 50%;
  margin: 10px auto;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-faint);
  font-size: 10px;
  text-align: center;
}

/* ---------- phone frame (screen 4) ---------- */
.phone-stage {
  display: flex;
  gap: 30px;
  align-items: flex-start;
  flex-wrap: wrap;
  justify-content: center;
}
.phone {
  flex: 0 0 auto;
  width: 340px;
  border: 10px solid #444;
  border-radius: 34px;
  background: #fff;
  padding: 0;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0,0,0,0.12);
}
.phone .notch {
  height: 22px;
  background: #444;
  border-radius: 0 0 12px 12px;
  width: 130px;
  margin: 0 auto;
}
.phone .screen { padding: 16px 16px 26px; }
.phone .pub-head {
  text-align: center;
  border-bottom: 1px solid var(--line-soft);
  padding-bottom: 12px;
  margin-bottom: 14px;
}
.phone .pub-mark {
  width: 46px; height: 46px;
  border: 1px solid var(--line);
  border-radius: 50%;
  margin: 0 auto 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-faint);
  font-size: 9px;
  background: var(--fill);
}
.journey { margin: 16px 0; }
.journey .stop {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  position: relative;
  padding-bottom: 18px;
}
.journey .stop:last-child { padding-bottom: 0; }
.journey .stop .dot {
  flex: 0 0 14px;
  width: 14px; height: 14px;
  border: 2px solid var(--ink-faint);
  border-radius: 50%;
  background: #fff;
  margin-top: 2px;
  z-index: 1;
}
.journey .stop:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 6px; top: 16px; bottom: -2px;
  width: 2px;
  background: var(--line);
}
.journey .stop .stop-body strong { display: block; font-size: 13px; color: var(--ink); }
.journey .stop .stop-body span { font-size: 11.5px; color: var(--ink-faint); }

.phone-label {
  flex: 0 0 260px;
  max-width: 300px;
}

/* ---------- cover (index) ---------- */
.cover {
  max-width: 760px;
  margin: 40px auto;
  text-align: center;
  padding: 0 20px;
}
.cover .big-stamp {
  display: inline-block;
  border: 3px solid var(--stamp);
  color: var(--stamp);
  font-weight: 800;
  letter-spacing: 0.25em;
  font-size: 22px;
  padding: 10px 22px;
  border-radius: var(--radius);
  transform: rotate(-2deg);
  margin-bottom: 22px;
}
.cover h1 { font-size: 30px; margin: 6px 0; }
.cover .lede { color: var(--ink-soft); font-size: 15px; max-width: 600px; margin: 10px auto 26px; }
.screen-cards { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; text-align: left; }
.screen-card {
  flex: 1 1 220px;
  max-width: 250px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 16px;
  text-decoration: none;
  color: var(--ink);
}
.screen-card:hover { background: var(--fill); }
.screen-card .sc-num {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
}
.screen-card h3 { margin: 4px 0 6px; font-size: 15px; }
.screen-card p { margin: 0; font-size: 12.5px; color: var(--ink-soft); }
.screen-card .hero-tag {
  display: inline-block;
  margin-top: 9px;
  font-size: 10px;
  letter-spacing: 0.08em;
  border: 1px solid var(--ink-faint);
  border-radius: 2px;
  padding: 1px 6px;
  color: var(--ink);
  background: var(--fill-2);
}

.legend {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 28px;
  font-size: 12px;
  color: var(--ink-faint);
}
.legend .item { display: flex; align-items: center; gap: 7px; }
.swatch { width: 26px; height: 14px; border-radius: 2px; display: inline-block; }
.swatch.note { background: var(--note); border: 1px solid var(--note-line); }
.swatch.ph   { background: var(--fill-3); border: 1px solid var(--line); }
.swatch.field { background: #fff; border: 1px dashed var(--line); }

/* ---------- footer ---------- */
.wf-foot {
  border-top: 1px solid var(--line-soft);
  margin-top: 30px;
  padding-top: 14px;
  text-align: center;
  font-size: 11px;
  color: var(--ink-faint);
}

@media (max-width: 720px) {
  .col-narrow { flex: 1 1 100%; }
  .topnav { gap: 6px; }
}
