/* JM JWT Decode — jmforu dark editorial tool-desk (factory CSS, site-specific additions at the end).
   Tokens: #111914 / #1b2820 / #f2eee1 / #d4ff88; light paper #f3efe6.
   No purple gradients, no generic card shadows, no external fonts. */

:root,
html[data-theme="dark"] {
  --bg: #111914;
  --surface: #1b2820;
  --ink: #f2eee1;
  --accent: #d4ff88;
  --ink-soft: #c6c1b2;
  --rule: #2c3c33;
  --font-sans: "Avenir Next", "Segoe UI", "PingFang SC", "Hiragino Sans", "Noto Sans JP", "Noto Sans KR", "Noto Sans SC", "Source Han Sans", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --page: 1440px;
  --nav-h: 48px;
  --gutter: 2rem;
  color-scheme: dark;
}

html:has(.theme-checkbox:checked),
html[data-theme="light"]:has(.theme-checkbox:checked) {
  --bg: #f3efe6;
  --surface: #fffdf6;
  --ink: #171512;
  --accent: #21543c;
  --ink-soft: #4a453c;
  --rule: #d4cbb8;
  color-scheme: light;
}

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

[hidden] { display: none !important; }

html { background: var(--bg); }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.55;
}

img, svg, video, canvas, iframe { max-width: 100%; height: auto; display: block; }
pre, code { max-width: 100%; overflow-x: auto; }

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}
a:hover { color: var(--ink); }

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -3.5rem;
  z-index: 60;
  background: var(--ink);
  color: var(--bg);
  padding: 0.4rem 0.7rem;
}
.skip-link:focus { top: 0.4rem; }

.header-inner,
.page-desk,
.page-data,
.page-home,
.page-guide,
.page-wcag,
.page-cvd,
.page-cheatsheet,
.page-examples,
.page-claims,
.page-security,
.page-dialects,
.page-templates,
.page-legal,
.page-missing,
.site-footer {
  width: min(var(--page), calc(100% - var(--gutter)));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--nav-h);
  border-bottom: 1px solid var(--rule);
  background: var(--bg);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
  color: var(--ink);
  text-decoration: none;
  font-weight: 650;
  letter-spacing: 0.01em;
}
.brand:hover { color: var(--ink); }
.brand-mark { color: var(--accent); flex: 0 0 auto; }
.brand-full, .brand-short, .brand-demo {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.brand-short { display: none; }
.brand-demo {
  font-weight: 600;
  font-size: 0.68rem;
  color: var(--ink-soft);
  border: 1px solid var(--rule);
  padding: 0.1rem 0.35rem;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
  flex: 1 1 auto;
  font-size: 0.86rem;
}
.primary-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  white-space: nowrap;
}
.primary-nav a:hover,
.primary-nav a[aria-current="page"] { color: var(--ink); }
.primary-nav a[aria-current="page"] { box-shadow: inset 0 -1px 0 var(--accent); }

.nav-compact { display: none; position: relative; }
.nav-compact > summary {
  list-style: none;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid var(--rule);
  background: var(--surface);
  color: var(--ink);
  height: 30px;
  padding: 0 0.55rem;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}
.nav-compact > summary::-webkit-details-marker { display: none; }
.nav-compact-list {
  position: absolute;
  left: 0;
  top: calc(100% + 4px);
  z-index: 50;
  min-width: 10rem;
  max-width: calc(100vw - 2rem);
  background: var(--surface);
  border: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  padding: 0.28rem;
}
.nav-compact-list a {
  color: var(--ink);
  text-decoration: none;
  padding: 0.4rem 0.55rem;
  font-size: 0.82rem;
}
.nav-compact-list a[aria-current="page"],
.nav-compact-list a:hover { background: var(--bg); color: var(--accent); }

.header-tools {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
  flex: 0 0 auto;
}

.theme-checkbox {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.theme-switch label {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 0.55rem;
  border: 1px solid var(--rule);
  color: var(--ink-soft);
  font-size: 0.75rem;
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
}
.theme-switch label:hover { color: var(--ink); }
.theme-short { display: none; }

.lang-nav { display: flex; align-items: center; }
.lang-menu { position: relative; display: inline-block; }
.lang-menu > summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 4.5rem;
  height: 30px;
  padding: 0 0.55rem;
  border: 1px solid var(--rule);
  background: var(--surface);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.lang-menu > summary::-webkit-details-marker { display: none; }
.lang-menu > summary:hover,
.lang-menu[open] > summary { border-color: var(--accent); color: var(--accent); }
.lang-menu[open] > summary::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 49;
  cursor: default;
}
.lang-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  z-index: 50;
  min-width: 10rem;
  max-width: calc(100vw - 2rem);
  padding: 0.28rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.lang-dropdown a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  padding: 0.38rem 0.58rem;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.8rem;
  white-space: nowrap;
}
.lang-dropdown a:hover,
.lang-dropdown a[aria-current="page"] {
  background: var(--bg);
  color: var(--accent);
}
.lang-dropdown small { font-size: 0.7rem; color: var(--ink-soft); }

.demo-strip {
  margin: 0;
  padding: 0.45rem 0 0.35rem;
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--rule);
}
.demo-badge {
  color: var(--ink);
  font-weight: 650;
}

.page-desk,
.page-data,
.page-home,
.page-guide,
.page-wcag,
.page-cvd,
.page-cheatsheet,
.page-examples,
.page-claims,
.page-security,
.page-dialects,
.page-templates,
.page-legal,
.page-missing { padding-bottom: 3rem; flex: 1 1 auto; }

.desk-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 16rem;
  gap: 1.5rem 1.75rem;
  padding-top: 0.7rem;
  align-items: start;
}

.section-head,
.page-kicker {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin: 0.7rem 0 0.65rem;
}
.section-head h1,
.page-kicker h1 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 650;
  letter-spacing: 0;
}

.lead {
  margin: 0 0 1rem;
  max-width: 62rem;
  color: var(--ink);
  font-size: 0.95rem;
}

.scroll-x {
  overflow-x: auto;
  max-width: 100%;
  border: 1px solid var(--rule);
  background: var(--surface);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
  font-variant-numeric: tabular-nums;
}
.data-table caption {
  text-align: left;
  padding: 0.45rem 0.7rem;
  font-weight: 650;
  font-size: 0.8rem;
  color: var(--ink-soft);
  caption-side: top;
}
.data-table th,
.data-table td {
  padding: 0.38rem 0.7rem;
  border-top: 1px solid var(--rule);
  vertical-align: top;
  text-align: left;
}
.data-table thead th {
  font-weight: 650;
  font-size: 0.76rem;
  color: var(--ink-soft);
  background: var(--bg);
  white-space: nowrap;
}
.data-table .num,
.data-table th.num,
.data-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.data-table tbody tr:hover td,
.data-table tbody tr:hover th { background: var(--bg); }

.source-note {
  margin: 0.7rem 0 0;
  font-size: 0.8rem;
  color: var(--ink-soft);
  max-width: 62rem;
}

.desk-rail h2 {
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
  font-weight: 650;
}
.rail-links {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  border: 1px solid var(--rule);
}
.rail-links li { border-top: 1px solid var(--rule); }
.rail-links li:first-child { border-top: 0; }
.rail-links a {
  display: block;
  padding: 0.45rem 0.65rem;
  color: var(--ink);
  text-decoration: none;
}
.rail-links a:hover { background: var(--surface); color: var(--accent); }

.convert-card {
  border: 1px solid var(--rule);
  padding: 0.75rem 0.8rem;
  background: var(--surface);
}
.convert-card h2 {
  margin: 0 0 0.4rem;
  font-size: 0.92rem;
}
.convert-card p { margin: 0 0 0.55rem; font-size: 0.82rem; color: var(--ink-soft); }
.convert-btn {
  display: inline-block;
  padding: 0.4rem 0.7rem;
  background: var(--accent);
  color: #111914;
  text-decoration: none;
  font-weight: 650;
  font-size: 0.84rem;
}
html:has(.theme-checkbox:checked) .convert-btn { color: #f3efe6; background: #21543c; }
.convert-btn:hover { color: #111914; opacity: 0.92; }

.calc-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(14rem, 0.7fr);
  gap: 1.25rem;
  margin-bottom: 1.5rem;
  align-items: start;
}
.calc-form {
  border: 1px solid var(--rule);
  background: var(--surface);
  padding: 0.85rem 1rem 1rem;
}
.js-note { margin: 0 0 0.8rem; font-size: 0.82rem; color: var(--ink-soft); }
.field { margin: 0 0 0.7rem; }

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem 0.85rem;
}

.field-grid > label,
.field-grid > .field {
  margin: 0;
  min-width: 0;
}

@media (max-width: 640px) {
  .field-grid {
    grid-template-columns: 1fr;
  }
}

.field label, .unit-field legend {
  display: block;
  font-size: 0.78rem;
  font-weight: 650;
  margin-bottom: 0.25rem;
}
.field-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
}
.field-grid > label > span,
.calc-form > label > span {
  display: block;
  font-size: 0.78rem;
  font-weight: 650;
  margin-bottom: 0.25rem;
}
.field input,
.field select,
.field-grid input,
.field-grid select,
.calc-form input[type="text"],
.calc-form button {
  font: inherit;
  font-size: 0.92rem;
  width: 100%;
  max-width: 100%;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--rule);
  padding: 0.35rem 0.45rem;
}
.unit-field {
  border: 0;
  margin: 0 0 0.7rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  justify-content: flex-end;
}
.unit-field label { font-weight: 500; display: flex; gap: 0.35rem; align-items: center; }
.unit-field input { width: auto; }

.mode-set {
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 0.7rem 0.85rem;
  margin: 0 0 0.85rem;
}
.mode-set legend {
  font-weight: 650;
  padding: 0 0.25rem;
}
.mode-option {
  display: flex;
  gap: 0.45rem;
  align-items: flex-start;
  margin: 0.35rem 0 0;
  font-weight: 500;
}
.mode-option input { width: auto; margin-top: 0.2rem; flex: 0 0 auto; }

.form-actions { margin: 0.4rem 0 0.8rem; }
.calc-form button {
  width: auto;
  padding: 0.4rem 0.8rem;
  background: var(--accent);
  color: #111914;
  font-weight: 650;
  cursor: pointer;
  border-color: var(--accent);
}
html:has(.theme-checkbox:checked) .calc-form button { color: #f3efe6; background: #21543c; border-color: #21543c; }
.formula-line { font-size: 0.8rem; color: var(--ink-soft); }
.result-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
  margin: 0.5rem 0 0;
}
.result-grid dt { font-size: 0.74rem; color: var(--ink-soft); }
.result-grid dd {
  margin: 0.15rem 0 0;
  font-variant-numeric: tabular-nums;
  font-size: 1.15rem;
  font-weight: 650;
}

.faq-block { margin-top: 1.75rem; max-width: 52rem; }
.faq-block h2, .page-data > h2 {
  margin: 1.25rem 0 0.6rem;
  font-size: 1rem;
}
.faq-item {
  border-top: 1px solid var(--rule);
  padding: 0.45rem 0;
}
.faq-item summary { cursor: pointer; font-weight: 650; }
.faq-item p { margin: 0.4rem 0 0; color: var(--ink); }

.letter-index {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.7rem;
  margin: 0 0 1rem;
  font-size: 0.88rem;
}
.letter-group h2 {
  margin: 1.1rem 0 0.4rem;
  font-size: 1rem;
  border-top: 1px solid var(--rule);
  padding-top: 0.6rem;
}
.term { margin: 0 0 0.85rem; max-width: 46rem; }
.term h3 { margin: 0 0 0.25rem; font-size: 1rem; }
.term p { margin: 0; }

.tool-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}
.tool-item {
  border: 1px solid var(--rule);
  background: var(--surface);
  padding: 0.8rem 0.85rem;
}
.tool-cat {
  margin: 0 0 0.3rem;
  font-size: 0.75rem;
  color: var(--ink-soft);
}
.tool-item h2 { margin: 0 0 0.2rem; font-size: 1rem; }
.tool-pub { margin: 0 0 0.45rem; font-size: 0.8rem; color: var(--ink-soft); }
.tool-item p { margin: 0 0 0.5rem; font-size: 0.9rem; }
.tool-link { margin: 0; }

.page-legal p, .page-missing p { max-width: 42rem; }

.site-footer {
  padding: 0.7rem 0 1.2rem;
  border-top: 1px solid var(--rule);
  font-size: 0.78rem;
  color: var(--ink-soft);
}
.footer-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.3rem 1rem;
}
.footer-copy { margin: 0; }
.footer-copy a, .footer-nav a { color: var(--ink-soft); text-decoration: none; }
.footer-copy a:hover, .footer-nav a:hover { color: var(--ink); }
.footer-nav { display: flex; flex-wrap: wrap; gap: 0.65rem; }
.disclosure-zone {
  margin-top: 0.65rem;
  padding-top: 0.55rem;
  border-top: 1px solid var(--rule);
  max-width: 62rem;
}
.disclosure-zone p { margin: 0 0 0.35rem; }
.cj-slot { color: var(--ink-soft); }
.cj-slot code {
  font-family: inherit;
  font-variant-numeric: tabular-nums;
}


.calc-aside {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.partner-offers {
  margin-top: 1rem;
}
.calc-aside .partner-offers,
.desk-rail .partner-offers {
  margin-top: 0;
}
.partner-offers > h2 {
  margin: 0 0 0.4rem;
  font-size: 0.92rem;
}
.partner-offers > p {
  margin: 0 0 0.65rem;
  font-size: 0.82rem;
  color: var(--ink-soft);
}
.partner-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}
.desk-rail .partner-grid,
.calc-aside .partner-grid {
  grid-template-columns: minmax(0, 1fr);
}
.partner-card {
  border: 1px solid var(--rule);
  background: var(--surface);
  padding: 0.75rem 0.8rem;
}
.partner-card h3 {
  margin: 0 0 0.35rem;
  font-size: 0.92rem;
}
.partner-card p { margin: 0 0 0.45rem; font-size: 0.82rem; color: var(--ink-soft); }
.partner-card a {
  color: var(--accent);
  font-weight: 650;
  text-decoration: none;
}
.partner-card a:hover { text-decoration: underline; }
.partner-disclosure {
  margin: 0.15rem 0 0;
  font-size: 0.78rem;
  color: var(--ink-soft);
}
.disclosure-zone .cj-slot {
  margin: 0.55rem 0 0;
}
.disclosure-zone .cj-slot a {
  color: var(--accent);
  font-weight: 650;
  text-decoration: none;
}
.disclosure-zone .cj-slot a:hover { text-decoration: underline; }

@media (min-width: 90rem) {
  /* 1440px desk: keep the first grid tight so the table is in the opening screen. */
  .desk-grid { padding-top: 0.55rem; }
}

@media (max-width: 64rem) {
  :root { --gutter: 1.25rem; }
  .desk-grid,
  .calc-layout { grid-template-columns: minmax(0, 1fr); }
  .tool-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .brand-full { display: none; }
  .brand-short { display: inline; }
}

@media (max-width: 44rem) {
  .primary-nav { display: none; }
  .nav-compact { display: inline-block; }
  .theme-long { display: none; }
  .theme-short { display: inline; }
  .brand-demo { display: none; }
  .field-row,
  .result-grid { grid-template-columns: minmax(0, 1fr); }
  .tool-list,
  .partner-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  .site-header, .lang-nav, .theme-switch, .skip-link, .convert-card, .partner-offers { display: none !important; }
  body { background: white; color: black; }
  .scroll-x, .tool-item, .calc-form { border-color: #ccc; }
}

/* Rates extras: unverified marks, calculator notes, affiliate tool slots, tighter first-screen table. */
.rail-lead {
  margin: 0 0 0.7rem;
  font-size: 0.82rem;
  color: var(--ink-soft);
}
.mark-unverified {
  display: inline-block;
  margin-left: 0.25rem;
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  border: 1px solid var(--rule);
  padding: 0 0.3rem;
  vertical-align: middle;
  white-space: nowrap;
}
.data-table td.figure,
.data-table th code,
.data-table td code {
  font-family: ui-monospace, "SFMono-Regular", "Menlo", "Consolas", monospace;
  font-size: 0.78rem;
  font-weight: 500;
}
.calc-note {
  margin: 0.7rem 0 0;
  font-size: 0.8rem;
  color: var(--ink-soft);
}
.flag-field label { font-weight: 500; }
.data-table tbody th code { font-weight: 650; }

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.calc-form button[type="button"] {
  background: transparent;
  color: var(--ink);
  border-color: var(--rule);
}
html:has(.theme-checkbox:checked) .calc-form button[type="button"] {
  color: var(--ink);
  background: transparent;
  border-color: var(--rule);
}
.result-grid.rate-results {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.cj-tools {
  border: 1px solid var(--rule);
  padding: 0.75rem 0.8rem;
  background: var(--surface);
  margin: 0 0 1rem;
}
.cj-tools h2 {
  margin: 0 0 0.45rem;
  font-size: 0.8rem;
  font-weight: 650;
}
.cj-tools .cj-lead,
.disclosure-zone .cj-lead {
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
  color: var(--ink-soft);
}
.cj-link-block { margin: 0 0 0.7rem; }
.cj-link-block:last-child { margin-bottom: 0; }
.cj-link-block p {
  margin: 0.28rem 0 0;
  font-size: 0.75rem;
  color: var(--ink-soft);
}
.irs-banner {
  margin: 0.7rem 0 0;
  font-size: 0.8rem;
  color: var(--ink-soft);
  max-width: 62rem;
}
.note-cell { font-size: 0.78rem; color: var(--ink-soft); max-width: 22rem; }

/* Ad Waste extras: first-screen calculator + benchmark table, cache-bust-safe layout. */
.desk-grid.is-tool {
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
}
.article-head h1 {
  max-width: none;
}


.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
  padding: 0;
  margin: -1px;
}

.crumbs {
  margin: 0.7rem 0 0;
  font-size: 0.8rem;
  color: var(--ink-soft);
}
.crumbs a { color: var(--ink-soft); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.page-home .page-kicker { margin-top: 0.45rem; margin-bottom: 0.35rem; }
.page-home .lead { margin-bottom: 0.7rem; }

.kicker {
  margin: 0;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 650;
}
.privacy-banner,
.js-note {
  margin: 0 0 0.55rem;
  font-size: 0.8rem;
  color: var(--ink-soft);
}

.sibling-list li { margin: 0 0 0.3rem; }

/* JWT desk — compact dual-pane, no oversized color blocks. */
.jwt-workbench { margin: 0 0 1.1rem; }
.sample-row,
.secret-row,
.claim-list,
.alg-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.5rem;
  align-items: center;
}
.sample-row { margin: 0 0 0.55rem; }
.sample-label,
.pane-meta {
  margin: 0;
  font-size: 0.75rem;
  color: var(--ink-soft);
  font-weight: 650;
}
.sample-chip,
.jwt-actions button,
.pane-actions button,
.secret-row button,
.alg-row button {
  appearance: none;
  border: 1px solid var(--rule);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 650;
  height: 30px;
  padding: 0 0.65rem;
  cursor: pointer;
  white-space: nowrap;
}
.sample-chip:hover,
.jwt-actions button:hover,
.pane-actions button:hover,
.secret-row button:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.sample-chip[aria-pressed="true"],
button[data-primary] {
  background: var(--accent);
  color: #111914;
  border-color: var(--accent);
}
html:has(.theme-checkbox:checked) button[data-primary],
html:has(.theme-checkbox:checked) .sample-chip[aria-pressed="true"] {
  color: #f3efe6;
  background: #21543c;
  border-color: #21543c;
}
.jwt-desk {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.7rem 0.85rem;
  align-items: start;
}
.jwt-pane {
  min-width: 0;
  border: 1px solid var(--rule);
  background: var(--surface);
  padding: 0.65rem 0.7rem 0.75rem;
}
.pane-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin: 0 0 0.4rem;
}
.pane-head h2 {
  margin: 0;
  font-size: 0.92rem;
}
.pane-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0 0 0.45rem;
}
.jwt-token,
.jwt-json,
.secret-input {
  width: 100%;
  max-width: 100%;
  margin: 0;
  border: 1px solid var(--rule);
  background: var(--bg);
  color: var(--ink);
  font-family: ui-monospace, "SFMono-Regular", "Menlo", "Consolas", monospace;
  font-size: 0.78rem;
  line-height: 1.45;
  padding: 0.5rem 0.55rem;
  resize: vertical;
}
.jwt-token { min-height: 7.2rem; }
.jwt-json { min-height: 8.2rem; }
.secret-input { min-height: 0; height: 32px; resize: none; }
.token-preview {
  margin: 0.45rem 0 0;
  max-height: 7.5rem;
  overflow: auto;
  padding: 0.45rem 0.5rem;
  border: 1px solid var(--rule);
  background: var(--bg);
  font-family: ui-monospace, "SFMono-Regular", "Menlo", "Consolas", monospace;
  font-size: 0.75rem;
  line-height: 1.5;
  word-break: break-all;
}
.seg-header { color: #ff8a80; }
.seg-payload { color: #c9a6e3; }
.seg-signature { color: #7ee0e8; }
.seg-dot { color: var(--ink-soft); }
html:has(.theme-checkbox:checked) .seg-header { color: #b42318; }
html:has(.theme-checkbox:checked) .seg-payload { color: #6b3d86; }
html:has(.theme-checkbox:checked) .seg-signature { color: #0b6e75; }
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.85rem;
  margin: 0.4rem 0 0;
  font-size: 0.72rem;
  color: var(--ink-soft);
}
.legend span { display: inline-flex; align-items: center; gap: 0.28rem; }
.legend i {
  display: inline-block;
  width: 0.65rem;
  height: 0.65rem;
  max-height: 40px;
  border-radius: 1px;
}
.legend .swatch-header { background: #ff8a80; }
.legend .swatch-payload { background: #c9a6e3; }
.legend .swatch-signature { background: #7ee0e8; }

.status-badge,
.claim-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  max-height: 40px;
  padding: 0 0.5rem;
  border: 1px solid var(--rule);
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.01em;
  color: var(--ink-soft);
}
.status-badge.is-valid,
.claim-badge.is-valid { color: #111914; background: var(--accent); border-color: var(--accent); }
.status-badge.is-expired,
.claim-badge.is-expired { color: #ffd4d0; background: #5a2420; border-color: #8a3a34; }
.status-badge.is-nbf,
.claim-badge.is-nbf { color: #111914; background: #e7c37a; border-color: #e7c37a; }
.status-badge.is-wait { color: var(--ink-soft); }
html:has(.theme-checkbox:checked) .status-badge.is-expired,
html:has(.theme-checkbox:checked) .claim-badge.is-expired {
  color: #6b1d18;
  background: #f8d7d4;
  border-color: #e3b3ae;
}
html:has(.theme-checkbox:checked) .status-badge.is-valid,
html:has(.theme-checkbox:checked) .claim-badge.is-valid {
  color: #f3efe6;
  background: #21543c;
  border-color: #21543c;
}

.claim-list {
  margin: 0.45rem 0 0.35rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.35rem;
}
.claim-row {
  display: grid;
  grid-template-columns: 4.6rem minmax(0, 1fr);
  gap: 0.4rem 0.6rem;
  align-items: baseline;
  font-size: 0.78rem;
  padding: 0.28rem 0;
  border-top: 1px solid var(--rule);
}
.claim-row dt {
  margin: 0;
  font-family: ui-monospace, "SFMono-Regular", "Menlo", "Consolas", monospace;
  font-weight: 650;
}
.claim-row dd { margin: 0; color: var(--ink-soft); min-width: 0; }
.claim-row time, .claim-row .local-time { display: block; }

.secret-box {
  margin: 0.55rem 0 0;
  border-top: 1px solid var(--rule);
  padding-top: 0.55rem;
}
.secret-box h3 {
  margin: 0 0 0.35rem;
  font-size: 0.86rem;
}
.secret-row { margin: 0 0 0.4rem; }
.secret-row label.secret-field {
  flex: 1 1 12rem;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.75rem;
  font-weight: 650;
}
.secret-check {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  color: var(--ink-soft);
}
.alg-row label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 650;
}
.alg-row select {
  height: 30px;
  border: 1px solid var(--rule);
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  font-size: 0.78rem;
  padding: 0 0.4rem;
}
.jwt-error,
.secret-hint {
  margin: 0.4rem 0 0;
  font-size: 0.78rem;
  color: var(--ink-soft);
}
.jwt-error { color: #ff8a80; }
html:has(.theme-checkbox:checked) .jwt-error { color: #b42318; }
.scroll-x {
  overflow-x: auto;
  max-width: 100%;
}

.topic-card {
  border: 1px solid var(--rule);
  padding: 0.7rem 0.8rem;
  margin: 0 0 0.7rem;
  background: var(--surface);
  max-width: 52rem;
}
.topic-card h2 {
  margin: 0 0 0.35rem;
  font-size: 1.02rem;
}
.topic-card p { margin: 0 0 0.45rem; }
.topic-card p:last-child { margin-bottom: 0; }

@media (max-width: 60rem) {
  .jwt-desk { grid-template-columns: minmax(0, 1fr); }
  .jwt-token { min-height: 6.5rem; }
  .jwt-json { min-height: 7rem; }
}
