:root { color-scheme: light dark; }
body {
  font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
  max-width: 820px; margin: 3rem auto; padding: 0 1rem; line-height: 1.5;
}
h1 { font-size: 1.5rem; }
h2 { font-size: 1.15rem; margin-bottom: 0.2rem; }
h3 { font-size: 0.95rem; margin: 0.9rem 0 0.3rem; opacity: 0.75; }
.ext-row { margin: 0.2rem 0; }
section { margin: 2rem 0; padding-top: 1rem; border-top: 1px solid rgba(127,127,127,0.25); }
button {
  font: inherit; padding: 0.6rem 1rem; border-radius: 8px;
  border: 1px solid #f6821f; background: #f6821f; color: #fff;
  cursor: pointer; margin: 0.25rem 0.25rem 0.25rem 0;
}
button.secondary { background: transparent; color: #f6821f; }
button:disabled { opacity: 0.5; cursor: default; }
label { font-size: 0.95rem; display: inline-block; margin: 0.3rem 0.5rem 0.3rem 0; }
label.full { display: block; }
input, textarea { font: inherit; font-size: 1.05rem; padding: 0.55rem; border-radius: 6px;
  border: 1px solid rgba(127,127,127,0.5); }
input { width: 22rem; max-width: 100%; }
input[type="checkbox"] { width: auto; padding: 0; vertical-align: middle; }
.wide { width: 100%; box-sizing: border-box; }
textarea.wide { min-height: 6.5rem; resize: vertical; line-height: 1.4;
  font-family: ui-monospace, Menlo, Consolas, monospace; }
pre {
  background: rgba(127,127,127,0.12); padding: 1rem; border-radius: 8px;
  overflow-x: auto; white-space: pre-wrap; word-break: break-word; margin-top: 0.5rem;
}
pre:empty { display: none; }
pre.ok { outline: 2px solid #1a7f37; } pre.bad { outline: 2px solid #cf222e; }
.note { font-size: 0.85rem; opacity: 0.8; }
.desc { font-size: 0.9rem; }

/* jwt.io-style byte-field breakdown for Inspect token. */
.breakdown[hidden] { display: none; }
.breakdown { margin-top: 0.75rem; }
.breakdown h3 { margin: 0.9rem 0 0.3rem; opacity: 0.75; }
.b64view {
  font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.82rem;
  line-height: 2; word-break: break-all; background: rgba(127,127,127,0.1);
  padding: 0.75rem; border-radius: 8px; letter-spacing: 0.02em;
}
.b64view .seg { border-radius: 3px; padding: 0.12rem 0; cursor: help; }
.b64view .pad { opacity: 0.4; }
.legend { display: flex; flex-wrap: wrap; gap: 0.35rem 1rem; margin: 0.5rem 0; font-size: 0.85rem; }
.legend span { display: inline-flex; align-items: center; gap: 0.35rem; }
.legend i { width: 0.8rem; height: 0.8rem; border-radius: 2px; display: inline-block; }
table.fields { border-collapse: collapse; width: 100%; margin-top: 0.6rem; font-size: 0.85rem; }
table.fields th, table.fields td {
  text-align: left; padding: 0.3rem 0.5rem;
  border-bottom: 1px solid rgba(127,127,127,0.2); vertical-align: top;
}
table.fields td.mono { font-family: ui-monospace, Menlo, Consolas, monospace; word-break: break-all; }
table.fields i.sw { width: 0.7rem; height: 0.7rem; border-radius: 2px; display: inline-block; margin-right: 0.4rem; vertical-align: middle; }
