/* Bürge UI. Dark by default, light when the system asks for it.
   Fonts are served from /static/fonts (SIL Open Font License, see the .txt files there). */

@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/static/fonts/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("/static/fonts/inter-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("/static/fonts/inter-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/static/fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("/static/fonts/jetbrains-mono-latin-500-normal.woff2") format("woff2"); }

:root {
  color-scheme: dark;
  --bg: #0b0d10;
  --surface: #12151a;
  --surface-2: #181c22;
  --line: #1f242c;
  --line-strong: #2b323c;
  --text: #e6e8eb;
  --muted: #8b93a1;
  --accent: #3ee6a8;          /* the one accent: main actions and "verified" */
  --accent-hover: #62ebb9;
  --accent-text: #3ee6a8;     /* accent used as text on --bg / --surface */
  --on-accent: #05140e;
  --accent-soft: rgba(62, 230, 168, .1);
  --focus: #3ee6a8;
  --amber: #f5b544;           /* pledge frozen, no pledge left */
  --amber-soft: rgba(245, 181, 68, .1);
  --red: #f26d6d;             /* blocked, invalid */
  --red-soft: rgba(242, 109, 109, .1);
  --muted-soft: rgba(139, 147, 161, .1);
  /* The four parts of a seal, only used in the seal breakdown. */
  --part-header: #82aaff;
  --part-payload: #c3a6f5;
  --part-ed: #3ee6a8;
  --part-pq: #f0a0c0;
  --radius: 8px;
  --radius-sm: 6px;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --bg: #ffffff;
    --surface: #f7f8fa;
    --surface-2: #eef0f3;
    --line: #e3e6ea;
    --line-strong: #cdd2d9;
    --text: #0f1217;
    --muted: #59616e;
    --accent-hover: #2fd897;
    --accent-text: #0b7a54;
    --accent-soft: rgba(11, 122, 84, .08);
    --focus: #0b7a54;
    --amber: #8f5b00;
    --amber-soft: rgba(143, 91, 0, .08);
    --red: #c02a2f;
    --red-soft: rgba(192, 42, 47, .07);
    --muted-soft: rgba(89, 97, 110, .08);
    --part-header: #2e5fb8;
    --part-payload: #6b46bf;
    --part-ed: #0b7a54;
    --part-pq: #a63a6b;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--text); text-decoration: underline; text-decoration-color: var(--line-strong);
  text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--muted); }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 2px; }

[hidden] { display: none !important; }

.wrap { max-width: 880px; margin: 0 auto; padding: 0 24px; }

/* Demo notice, header, footer */

.demo-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12.5px;
  text-align: center;
  padding: 6px 16px;
}
.demo-bar::before {
  content: "";
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--amber);
  margin-right: 8px;
  vertical-align: 1px;
}

.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: 56px; }
.wordmark { display: inline-flex; align-items: center; gap: 9px; color: var(--text);
  font-weight: 600; font-size: 17px; letter-spacing: -.02em; text-decoration: none; }
.wordmark .mark { width: 10px; height: 10px; border-radius: 2px; background: var(--accent); }
.site-nav { display: flex; gap: 22px; font-size: 14px; }
.site-nav a { color: var(--muted); text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--text); }

.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px;
  padding-top: 20px; padding-bottom: 32px; }
.site-footer a { color: var(--muted); }

main.wrap { padding-top: 48px; padding-bottom: 72px; }

/* Text */

h1 { font-size: 28px; line-height: 1.2; font-weight: 600; letter-spacing: -.02em; margin: 0 0 8px;
  text-wrap: balance; }
h2 { font-size: 15px; font-weight: 600; margin: 48px 0 6px; }
h3 { font-size: 15px; font-weight: 600; margin: 0; }
p { margin: 0 0 12px; }
.lead { color: var(--muted); font-size: 16px; margin: 0 0 28px; max-width: 640px; }
.note { color: var(--muted); font-size: 13.5px; margin: 0 0 12px; max-width: 680px; }
.muted { color: var(--muted); }
.mono, code { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 12.5px; }
code { background: var(--surface-2); border: 1px solid var(--line); border-radius: 4px;
  padding: 1px 5px; }
.num { font-variant-numeric: tabular-nums; }
.error { color: var(--red); font-size: 14px; min-height: 0; margin: 0; }
.error:not(:empty) { margin: 0 0 16px; }

/* Cards and forms */

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; }
.card + .card { margin-top: 12px; }
.card > :last-child { margin-bottom: 0; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.form-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.form-row .grow { flex: 1 1 220px; }
.form-row + .form-row, .form-row + .hint, .hint + .form-row { margin-top: 12px; }
.hint { color: var(--muted); font-size: 13px; margin: 8px 0 0; }

input, textarea {
  font: inherit;
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  min-height: 36px;
}
input::placeholder, textarea::placeholder { color: var(--muted); }
input:hover, textarea:hover { border-color: var(--muted); }
input:focus-visible, textarea:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px;
  border-color: transparent; }
input.mono, textarea.mono { font-family: var(--mono); font-size: 12.5px; }
input[type="number"] { width: 110px; font-variant-numeric: tabular-nums; }
.w-full { width: 100%; }
textarea { width: 100%; min-height: 112px; resize: vertical; line-height: 1.5; word-break: break-all; }

.btn {
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 36px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .12s, border-color .12s, color .12s;
}
.btn:hover { background: var(--line); border-color: var(--muted); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-danger { background: transparent; color: var(--red);
  border-color: color-mix(in srgb, var(--red) 45%, transparent); }
.btn-danger:hover { background: var(--red-soft); border-color: var(--red); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--surface-2); border-color: transparent; color: var(--text); }
.btn-sm { height: 28px; padding: 0 10px; font-size: 13px; gap: 5px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn:disabled:hover { background: var(--surface-2); border-color: var(--line-strong); }
.btn-primary:disabled:hover { background: var(--accent); border-color: var(--accent); }
.buttons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; align-items: center; }
.buttons .msg { font-size: 13px; color: var(--muted); }

.icon { width: 16px; height: 16px; flex: none; }
.btn-sm .icon { width: 14px; height: 14px; }

/* Tables */

.table-wrap { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
  overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th { text-align: left; font-weight: 500; font-size: 12px; color: var(--muted); padding: 9px 14px;
  border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td.mono { font-size: 12.5px; white-space: nowrap; }
td.nowrap { white-space: nowrap; }
td.empty { color: var(--muted); text-align: center; padding: 18px 14px; }
td.actions { text-align: right; white-space: nowrap; }
td.actions .btn + .btn { margin-left: 6px; }
td .sub { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px;
  overflow-wrap: anywhere; }

/* Status tags */

.tag { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 500;
  white-space: nowrap; }
.tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor;
  flex: none; }
.tag > span { white-space: normal; }
.tag.ok { color: var(--accent-text); }
.tag.warn { color: var(--amber); }
.tag.bad { color: var(--red); }
.tag.neutral { color: var(--muted); }

.issued { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.issued .hint { margin: 0 0 12px; color: var(--text); }

/* Account summary in the portal */

.summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0;
  padding: 0; }
.summary > div { padding: 16px 20px; border-right: 1px solid var(--line); min-width: 0; }
.summary > div:last-child { border-right: 0; }
.summary .label { font-size: 12.5px; color: var(--muted); margin-bottom: 4px; }
.summary .value { font-size: 15px; }
.summary .big { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 24px;
  font-weight: 500; letter-spacing: -.01em; }
.summary .mono { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Verification result: status line plus CI-style checks */

.result { margin-top: 16px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); overflow: hidden; }
.result-head { display: flex; gap: 14px; align-items: flex-start; padding: 16px 20px; }
.badge { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  flex: none; }
.badge .icon { width: 16px; height: 16px; }
.result-title { font-size: 16px; font-weight: 600; line-height: 1.3; }
.result-reason { color: var(--muted); font-size: 14px; margin-top: 2px; }
.is-ok .badge { color: var(--accent-text); background: var(--accent-soft); }
.is-ok .result-title { color: var(--accent-text); }
.is-warn .badge { color: var(--amber); background: var(--amber-soft); }
.is-warn .result-title { color: var(--amber); }
.is-bad .badge { color: var(--red); background: var(--red-soft); }
.is-bad .result-title { color: var(--red); }

.checks { list-style: none; margin: 0; padding: 6px 0; border-top: 1px solid var(--line); }
.checks li { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 12px;
  align-items: center; padding: 7px 20px; font-size: 14px; }
.checks .icon { width: 16px; height: 16px; }
.checks .c-ok { color: var(--accent-text); }
.checks .c-warn { color: var(--amber); }
.checks .c-bad { color: var(--red); }
.checks .c-none { color: var(--muted); }
.checks .detail { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 12.5px;
  color: var(--muted); text-align: right; overflow-wrap: anywhere; }
.checks .detail.warn { color: var(--amber); }
.checks .detail.bad { color: var(--red); }

.facts { display: flex; flex-wrap: wrap; gap: 6px 28px; padding: 12px 20px;
  border-top: 1px solid var(--line); font-size: 13px; }
.facts div { display: flex; gap: 8px; min-width: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-family: var(--mono); font-size: 12.5px; font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere; }

.result-note { padding: 12px 20px; border-top: 1px solid var(--line); font-size: 13.5px;
  color: var(--muted); }
.result-note.warn { color: var(--amber); }

/* A seal: collapsed preview, full token on request, decoded parts */

.seal { border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg);
  overflow: hidden; }
.result .seal { margin: 0 20px 20px; }
.seal-bar { display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 12px; }
.seal-preview { flex: 1; min-width: 0; font-family: var(--mono); font-size: 12.5px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seal-preview .dots { color: var(--muted); }
.seal-size { font-family: var(--mono); font-size: 12px; color: var(--muted); white-space: nowrap; }
.seal-full { margin: 0; padding: 12px; border-top: 1px solid var(--line); font-family: var(--mono);
  font-size: 11.5px; line-height: 1.6; white-space: pre-wrap; word-break: break-all;
  max-height: 240px; overflow: auto; }
.seal-full .dot { color: var(--muted); }
.p-header { color: var(--part-header); }
.p-payload { color: var(--part-payload); }
.p-ed { color: var(--part-ed); }
.p-pq { color: var(--part-pq); }
.seal-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 9px 12px;
  border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.seal-legend span { display: inline-flex; align-items: center; gap: 7px; }
.seal-legend i { width: 8px; height: 8px; border-radius: 2px; background: currentColor; }
.seal-legend .mono { font-size: 11.5px; }
.seal-parts { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  border-top: 1px solid var(--line); }
.seal-parts > section { padding: 12px; min-width: 0; }
.seal-parts > section + section { border-left: 1px solid var(--line); }
.seal-parts h4 { font-size: 12px; font-weight: 500; margin: 0 0 8px; }
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 3px 14px; margin: 0;
  font-family: var(--mono); font-size: 12px; font-variant-numeric: tabular-nums; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.kv dd .muted { margin-left: 6px; }

/* Audit log */

.chain { display: flex; align-items: center; gap: 8px; font-size: 13.5px; margin: 0 0 12px; }
.chain.ok { color: var(--accent-text); }
.chain.bad { color: var(--red); }
.chain .rest { color: var(--muted); font-family: var(--mono); font-size: 12.5px; }

/* Home page */

.hero { padding: 24px 0 8px; }
.hero h1 { font-size: 34px; max-width: 680px; }
.hero .lead { font-size: 17px; }
.hero .buttons { margin-top: 24px; }
.hero .btn { height: 40px; padding: 0 18px; }

.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 56px 0 0;
  padding: 0; list-style: none; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); }
.steps li { padding: 18px; border-right: 1px solid var(--line); }
.steps li:last-child { border-right: 0; }
.steps .step-no { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.steps h3 { margin: 6px 0 4px; }
.steps p { color: var(--muted); font-size: 13.5px; margin: 0; }

.anatomy { margin-top: 12px; }
.anatomy .seal-full { border-top: 0; max-height: none; font-size: 12.5px; }

/* Small screens */

@media (max-width: 720px) {
  .wrap { padding: 0 16px; }
  main.wrap { padding-top: 32px; padding-bottom: 56px; }
  .site-nav { gap: 14px; }
  .hero h1 { font-size: 28px; }
  .steps { grid-template-columns: 1fr; }
  .steps li { border-right: 0; border-bottom: 1px solid var(--line); }
  .steps li:last-child { border-bottom: 0; }
  .summary { grid-template-columns: 1fr; }
  .summary > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .summary > div:last-child { border-bottom: 0; }
  .seal-parts { grid-template-columns: 1fr; }
  .seal-parts > section + section { border-left: 0; border-top: 1px solid var(--line); }
  .checks li { grid-template-columns: 18px minmax(0, 1fr); }
  .seal-bar { flex-wrap: wrap; }
  .seal-preview { flex-basis: 100%; }
  .table-wrap table { min-width: 600px; }
  .checks .detail { grid-column: 2; text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important;
    scroll-behavior: auto !important; }
}
