/* Véridique — tool styles, Qídé Studio aesthetic.
   The control panel itself is styled by libraries/qide-ui/qide-ui.css. */

@font-face {
  font-family: "nudicamono-regular";
  src:
    url("../../nudicamono-regular-webfont.woff2") format("woff2"),
    url("../../nudicamono-regular-webfont.woff") format("woff");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "nudicamono-regular";
  src:
    url("../../nudicamono-regularitalic-webfont.woff2") format("woff2"),
    url("../../nudicamono-regularitalic-webfont.woff") format("woff");
  font-weight: normal;
  font-style: italic;
  font-display: swap;
}

:root {
  --bg: #000000;
  --ink: #f1f1f1;
  --ink-soft: rgba(241, 241, 241, 0.6);
  --line: rgba(241, 241, 241, 0.25);
  --line-strong: #f1f1f1;
  --gold: #ffd700;
  --fail: #d64533;
  --fail-soft: #ff8a7a;
  --pass: #5fbf7f;
  --mono: "nudicamono-regular", "Courier New", Courier, monospace;
}

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

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

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.55;
  padding: 32px 340px 64px 20px;
}

.wrap {
  max-width: 980px;
  margin: 0 auto;
}

@media (max-width: 1180px) {
  body {
    padding-right: 20px;
  }
}

header {
  margin-bottom: 28px;
}
header h1 {
  font-size: 24px;
  font-weight: normal;
  letter-spacing: -0.01em;
}
header h1 .name {
  color: var(--gold);
}
header p.thesis {
  margin-top: 8px;
  color: var(--ink-soft);
  max-width: 62ch;
}

.card {
  background: var(--bg);
  border: 1px solid var(--line);
  padding: 20px;
  margin-bottom: 20px;
}

h2 {
  font-size: 12px;
  font-weight: normal;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  margin-bottom: 14px;
}

.note {
  font-size: 12px;
  color: var(--ink-soft);
  max-width: 64ch;
}

/* ---------- toast ---------- */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--bg);
  font-size: 12px;
  font-family: var(--mono);
  padding: 8px 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
  z-index: 1003;
}
.toast.show {
  opacity: 1;
}

/* ---------- panel custom rows ---------- */
.veridique-hexarea {
  width: 100%;
  min-height: 64px;
  resize: vertical;
  background: var(--bg);
  color: var(--ink);
  border: 1px solid var(--line-strong);
  font-family: var(--mono);
  font-size: 12px;
  padding: 6px;
  border-radius: 0;
}
.veridique-hexarea:focus {
  outline: 1px solid var(--gold);
  outline-offset: 1px;
}
/* The drop zone is a real <button> carrying the library's .qide-ui-button
   class, so it reads as a button next to the other panel controls. Only the
   drag-over state is styled here. */
.drop.hover {
  background-color: var(--gold);
  color: var(--bg);
  border-color: var(--gold);
}

/* ---------- simulation board ---------- */
.board {
  overflow-x: auto;
}
.board table {
  border-collapse: collapse;
  width: 100%;
}
.board th.rowlabel {
  text-align: left;
  font-size: 12px;
  font-weight: normal;
  padding: 6px 16px 6px 0;
  white-space: nowrap;
  vertical-align: middle;
}
.board th.rowlabel .method {
  display: block;
  font-size: 11px;
  color: var(--ink-soft);
}
.board td {
  padding: 3px;
}
.swatch {
  height: 64px;
  min-width: 72px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  position: relative;
}
.swatch .hex {
  position: absolute;
  left: 6px;
  bottom: 5px;
  font-family: var(--mono);
  font-size: 10.5px;
  padding: 1px 5px;
  background: rgba(0, 0, 0, 0.75);
  color: var(--ink);
}
.swatch .flag {
  position: absolute;
  top: 5px;
  right: 6px;
  font-family: var(--mono);
  font-size: 11px;
  padding: 0 5px;
  background: var(--fail);
  color: #fff;
}

/* ---------- image strip ---------- */
#imageCard {
  display: none;
}
.strip {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.strip figure {
  margin: 0;
}
.strip canvas {
  border: 1px solid var(--line);
  display: block;
  max-width: 200px;
  height: auto;
}
.strip figcaption {
  font-size: 11px;
  color: var(--ink-soft);
  margin-top: 4px;
}

/* ---------- matrix ---------- */
.split {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(320px, 1.2fr);
  gap: 20px;
}
@media (max-width: 820px) {
  .split {
    grid-template-columns: 1fr;
  }
}

.matrix table {
  border-collapse: collapse;
  font-family: var(--mono);
  font-size: 12px;
}
.matrix th,
.matrix td {
  padding: 4px;
  text-align: center;
}
.matrix .chip {
  width: 22px;
  height: 22px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: inline-block;
  vertical-align: middle;
}
.matrix td.cell {
  min-width: 52px;
  border: 1px solid var(--line);
}
.matrix td.cell.fail {
  background: rgba(214, 69, 51, 0.15);
  color: var(--fail-soft);
}
.matrix td.cell.fail::after {
  content: " ✕";
}
.matrix-note {
  font-size: 11px;
  color: var(--ink-soft);
  margin-top: 10px;
  max-width: 56ch;
}

/* ---------- issues ---------- */
.issue {
  border: 1px solid var(--line);
  padding: 12px 14px;
  margin-bottom: 10px;
}
.issue .pair {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.issue .chip {
  width: 20px;
  height: 20px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: inline-block;
}
.issue .mono {
  font-family: var(--mono);
  font-size: 12px;
}
.issue .role-tag {
  font-size: 11px;
  color: var(--ink-soft);
}
.sev {
  font-size: 10.5px;
  padding: 1px 7px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.sev.critical {
  background: var(--fail);
  color: #fff;
}
.sev.high {
  color: var(--fail-soft);
  border: 1px solid var(--fail);
}
.sev.moderate {
  color: var(--ink);
  border: 1px solid var(--line);
}
.sev.low {
  color: var(--ink-soft);
  border: 1px solid var(--line);
}
.issue .worst {
  color: var(--fail-soft);
}
.issue .fix {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.issue .strategy {
  font-size: 11px;
  color: var(--ink-soft);
  width: 100%;
}
.issue .arrow {
  color: var(--ink-soft);
}
.issue button {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 5px 10px;
  background: var(--bg);
  color: var(--ink);
  border: 1px solid var(--line-strong);
  cursor: pointer;
  border-radius: 0;
}
.issue button:hover,
.issue button:focus-visible {
  background: var(--gold);
  color: var(--bg);
  border-color: var(--gold);
  outline: none;
}
.all-clear {
  color: var(--pass);
}

/* ---------- conformance checks ---------- */
.check-summary {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 12px 0 14px;
}
.pill {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  padding: 5px 9px;
  text-transform: uppercase;
}
.pill.PASS {
  background: #1f6f43;
  color: #eafaf0;
}
.pill.FAIL {
  background: #8b2e2e;
  color: #fdeaea;
}
.pill.WARN {
  background: #8a6d1f;
  color: #fdf6e3;
}
.pill.INFO {
  background: #2f4f76;
  color: #e9f1fa;
}
.pill.SKIP {
  background: #4a4a4a;
  color: #e8e8e8;
}
.pill.ERROR {
  background: #5c1f6f;
  color: #f7eafa;
}
.check {
  border-top: 1px solid #222222;
  padding: 12px 0;
}
.check:first-of-type {
  border-top: 0;
}
.check-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.check-head .pill {
  flex: none;
  margin-top: 1px;
}
.check-body {
  flex: 1;
  min-width: 0;
}
.check-id {
  font-size: 11.5px;
  color: var(--ink-soft);
  word-break: break-all;
}
.check-title {
  margin: 2px 0 3px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.check-msg {
  font-size: 12.5px;
}
.check details {
  margin-top: 7px;
}
.check summary {
  cursor: pointer;
  font-size: 11px;
  color: var(--ink-soft);
}
.check .rationale {
  font-size: 12px;
  line-height: 1.6;
  margin: 7px 0 0;
  padding-left: 12px;
  border-left: 1px solid #333333;
  color: var(--ink-soft);
}

/* ---------- method footer ---------- */
footer.method {
  margin-top: 28px;
  font-size: 12px;
  color: var(--ink-soft);
  max-width: 78ch;
}
footer.method p {
  margin-bottom: 8px;
}
footer.method strong {
  color: var(--ink);
  font-weight: normal;
}

/* ---------- chrome (version badge, footer, clean UI) ---------- */
#version-badge {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 1001;
  font-size: 13px;
  color: var(--ink);
  pointer-events: none;
}

#site-footer {
  position: fixed;
  bottom: 10px;
  left: 10px;
  z-index: 1001;
  font-size: 12px;
  color: rgba(241, 241, 241, 0.7);
  pointer-events: none;
}
#site-footer p {
  margin: 0;
}

.qide-ui-panel {
  position: fixed;
  font-family: var(--mono) !important;
}


/* Hidden until a DSP extraction status is shown via JS (style.display). */
#dspStatus {
  margin: 0 0 10px;
  display: none;
}
