/* ============================================================
   Helpers.work — design tokens + base
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Hanken+Grotesk:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
  /* radius — driven by tweak */
  --r-scale: 1;
  --r-sm: calc(6px * var(--r-scale));
  --r-md: calc(10px * var(--r-scale));
  --r-lg: calc(16px * var(--r-scale));
  --r-xl: calc(22px * var(--r-scale));
  --r-2xl: calc(28px * var(--r-scale));
  --r-pill: 999px;

  /* accent — driven by tweak (default indigo) */
  --accent: #4f46e5;
  --accent-600: #4f46e5;
  --accent-500: #6366f1;
  --accent-50: #eef2ff;
  --accent-soft: #eef2ff;
  --accent-ring: rgba(79, 70, 229, 0.35);

  --ok: #10b981;
  --ok-soft: #ecfdf5;
  --warn: #f59e0b;
  --warn-soft: #fffbeb;
  --err: #ef4444;
  --err-soft: #fef2f2;

  --font-sans: 'Hanken Grotesk', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', monospace;

  /* card style — driven by tweak; default = soft shadow */
  --card-border: 1px solid var(--line);
  --card-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px -12px rgba(15, 23, 42, 0.12);
}

/* ---------- light (default) ---------- */
[data-theme='light'] {
  --bg: #f6f7f9;
  --bg-grid: rgba(15, 23, 42, 0.035);
  --surface: #ffffff;
  --surface-2: #fbfcfd;
  --surface-3: #f3f5f8;
  --line: #e6e9ef;
  --line-strong: #d6dae2;
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --muted-2: #94a3b8;
  --code-bg: #f6f8fb;
}

/* ---------- dark ---------- */
[data-theme='dark'] {
  --bg: #080c17;
  --bg-grid: rgba(255, 255, 255, 0.035);
  --surface: #0e1525;
  --surface-2: #111a2c;
  --surface-3: #162034;
  --line: #1d2740;
  --line-strong: #2a3551;
  --ink: #eef2f8;
  --ink-2: #c2cbda;
  --muted: #8b97ab;
  --muted-2: #66728a;
  --code-bg: #0a1120;
  --accent-soft: rgba(99, 102, 241, 0.14);
  --accent-50: rgba(99, 102, 241, 0.14);
  --ok-soft: rgba(16, 185, 129, 0.13);
  --warn-soft: rgba(245, 158, 11, 0.13);
  --err-soft: rgba(239, 68, 68, 0.13);
  --card-shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 30px -16px rgba(0, 0, 0, 0.6);
}

* {
  box-sizing: border-box;
}

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

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.5;
}

/* faint technical grid backdrop */
.bg-grid {
  background-image:
    linear-gradient(var(--bg-grid) 1px, transparent 1px), linear-gradient(90deg, var(--bg-grid) 1px, transparent 1px);
  background-size: 56px 56px;
}

::selection {
  background: var(--accent-ring);
  color: #fff;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}
p {
  margin: 0;
}

.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}
.wrap-narrow {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 24px;
}

/* eyebrow / mono label motif */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.mono {
  font-family: var(--font-mono);
}

/* card */
.card {
  background: var(--surface);
  border: var(--card-border);
  border-radius: var(--r-lg);
  box-shadow: var(--card-shadow);
}

/* buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 14.5px;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  cursor: pointer;
  padding: 0 16px;
  height: 42px;
  transition:
    transform 0.12s ease,
    background 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    color 0.15s ease;
  white-space: nowrap;
}
.btn:active {
  transform: translateY(1px);
}
.btn-primary {
  background: var(--accent-600);
  color: #fff;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.12),
    0 6px 16px -8px var(--accent-ring);
}
.btn-primary:hover {
  background: var(--accent-500);
}
.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn-secondary:hover {
  background: var(--surface-3);
  border-color: var(--muted-2);
}
.btn-ghost {
  background: transparent;
  color: var(--ink-2);
}
.btn-ghost:hover {
  background: var(--surface-3);
  color: var(--ink);
}
.btn-sm {
  height: 34px;
  font-size: 13px;
  padding: 0 12px;
  border-radius: var(--r-sm);
}

/* badge / chip */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 3px 9px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  color: var(--muted);
  background: var(--surface-2);
  text-transform: uppercase;
}

/* inputs */
.input {
  width: 100%;
  height: 48px;
  border-radius: var(--r-md);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  padding: 0 16px;
  outline: none;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}
.input::placeholder {
  color: var(--muted-2);
}
.input:focus {
  border-color: var(--accent-500);
  box-shadow: 0 0 0 4px var(--accent-ring);
}

/* focus ring helper */
.focusable:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px var(--accent-ring);
  border-radius: var(--r-sm);
}

/* scrollbar (subtle) */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

/* kbd */
.kbd {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: var(--r-sm);
  padding: 1px 6px;
  background: var(--surface-2);
}

/* animations */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes pulseDot {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.35;
  }
}
.spin {
  animation: spin 0.8s linear infinite;
}

/* Entrance reveals — SAFE: content is visible by default. When JS adds
   .reveal-on to <html>, elements start slightly offset (transform only —
   opacity stays 1 so content is NEVER hidden, even if the compositor is
   paused in a background tab). .is-in (added via a background-safe setTimeout)
   eases them into place. Worst case: content is visible, just not animated. */
.fade-up,
.fade-in {
  opacity: 1;
}
html.reveal-on .fade-up {
  transform: translateY(9px);
  transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.3, 1);
}
html.reveal-on .fade-up.is-in {
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  html.reveal-on .fade-up {
    transform: none;
    transition: none;
  }
}

.tabular {
  font-variant-numeric: tabular-nums;
}

/* divider */
.hr {
  height: 1px;
  background: var(--line);
  border: 0;
  width: 100%;
}

/* ============ layout grids ============ */
.grid-tools {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.grid-cats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.grid-why {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

/* ============ hover affordances ============ */
.tool-card {
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease;
}
.tool-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent-600) 40%, var(--line));
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.05),
    0 18px 40px -20px var(--accent-ring);
}
.tool-card:hover .tool-card-arrow {
  color: var(--accent-600);
  transform: translate(2px, -2px);
}
.cat-card {
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease;
}
.cat-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent-600) 35%, var(--line));
}
.cat-card:hover .cat-card-arrow {
  color: var(--accent-600);
  transform: translateX(2px);
}
.tool-row {
  transition:
    background 0.14s ease,
    border-color 0.14s ease;
}
.tool-row:hover {
  background: var(--surface-3);
  border-color: var(--line-strong);
}
.cmd-row {
  transition: background 0.14s ease;
}
.cmd-row:hover {
  background: var(--surface-3);
}
.dns-row:hover {
  background: var(--surface-3);
}

/* mono micro-label toggle */
.no-mono-labels .eyebrow {
  font-family: var(--font-sans);
  letter-spacing: 0.02em;
  text-transform: none;
  font-size: 12.5px;
}

/* nav responsive helpers */
.nav-mobile {
  display: none;
}

/* ============ responsive ============ */
@media (max-width: 1080px) {
  .grid-tools {
    grid-template-columns: repeat(3, 1fr);
  }
  .grid-why {
    grid-template-columns: repeat(2, 1fr);
  }
  .home-two-col {
    grid-template-columns: 1fr !important;
  }
  .ip-grid {
    grid-template-columns: 1fr !important;
  }
}
@media (max-width: 920px) {
  .nav-desktop {
    display: none !important;
  }
  .nav-mobile {
    display: inline-flex;
  }
  .hero-split {
    grid-template-columns: 1fr !important;
  }
  .dns-body {
    grid-template-columns: 1fr !important;
  }
  .dns-aside {
    position: static !important;
  }
  .ip-banner {
    grid-template-columns: 1fr !important;
  }
  .ip-banner > div:last-child {
    border-left: none !important;
    border-top: 1px solid var(--line);
  }
  .whatismyip-grid {
    grid-template-columns: 1fr !important;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 28px !important;
  }
}
@media (max-width: 720px) {
  .grid-tools {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-cats {
    grid-template-columns: 1fr;
  }
  .grid-featured {
    grid-template-columns: 1fr !important;
  }
  .dns-steps {
    grid-template-columns: 1fr !important;
  }
  .dns-form-row {
    flex-direction: column;
  }
  .dns-form-row .btn {
    width: 100%;
  }
  .ip-form {
    flex-wrap: wrap;
  }
  .ip-form .btn {
    flex: 1;
  }
}
@media (max-width: 480px) {
  .grid-tools {
    grid-template-columns: 1fr;
  }
  .grid-why {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr !important;
  }
  .wrap,
  .wrap-narrow {
    padding: 0 18px;
  }
}

/* ══════════════════════════════════════════════════════════════
   EDGE COMPONENT STYLES — server-rendered HTML classes
   ══════════════════════════════════════════════════════════════ */

/* ── screen-reader only ── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── header ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition:
    border-color 0.2s,
    background 0.2s;
}
.site-header.scrolled {
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  border-bottom-color: var(--line);
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.wordmark-text {
  font-weight: 800;
  font-size: 18.6px;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.wordmark-dot {
  color: var(--accent-600);
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
}
.nav-link {
  padding: 8px 12px;
  border-radius: var(--r-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
  transition: color 0.15s;
}
.nav-link:hover {
  color: var(--ink);
}
.search-trigger {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 42px;
  padding: 0 12px 0 14px;
  border-radius: var(--r-md);
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  cursor: pointer;
  color: var(--muted);
  font-size: 13.5px;
  min-width: 188px;
}
.lang-select {
  height: 42px;
  padding: 0 10px;
  border-radius: var(--r-md);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
[data-theme='light'] .theme-icon-light {
  display: inline-flex;
}
[data-theme='light'] .theme-icon-dark {
  display: none;
}
[data-theme='dark'] .theme-icon-light {
  display: none;
}
[data-theme='dark'] .theme-icon-dark {
  display: inline-flex;
}
.mobile-menu {
  display: none;
  flex-direction: column;
  padding: 14px;
  background: var(--surface);
  border-top: 1px solid var(--line);
}
.mobile-menu.is-open {
  display: flex;
}
.mobile-nav-link {
  display: block;
  padding: 12px 8px;
  border-radius: var(--r-sm);
  font-weight: 600;
  color: var(--ink);
}

/* ── footer ── */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  margin-top: 80px;
}
.footer-inner {
  padding: 56px 24px 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(4, 1fr);
  gap: 36px;
}
.footer-brand {
  max-width: 280px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.footer-tagline {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.6;
}
.footer-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-link {
  font-size: 13.5px;
  color: var(--muted);
  transition: color 0.15s;
}
.footer-link:hover {
  color: var(--ink);
}
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-legal {
  display: flex;
  gap: 18px;
}
.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--ok);
  animation: pulseDot 2s infinite;
  display: inline-block;
}

/* ── breadcrumbs ── */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 14px;
}
.breadcrumb-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.breadcrumb-link {
  color: var(--muted);
  transition: color 0.15s;
}
.breadcrumb-link:hover {
  color: var(--accent-600);
}
.breadcrumb-sep {
  color: var(--muted-2);
}
.breadcrumb-current {
  color: var(--ink-2);
}

/* ── section spacing ── */
.section {
  padding: 64px 0 0;
}
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

/* ── tool / category icons ── */
.tool-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: var(--r-md);
  flex-shrink: 0;
}
.cat-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: var(--r-md);
  flex-shrink: 0;
}
.tool-card-arrow {
  color: var(--muted-2);
  transition:
    transform 0.2s,
    color 0.2s;
}
.cat-card-arrow {
  color: var(--muted-2);
  transition: transform 0.2s;
}

/* tool card structure */
.tool-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
  position: relative;
  overflow: hidden;
}
.cat-card {
  display: flex;
  gap: 15px;
  padding: 18px;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.tool-row {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 11px 12px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--surface);
}

/* ── badge variants ── */
.badge-accent {
  color: var(--accent-600);
  border-color: color-mix(in srgb, var(--accent-600) 28%, transparent);
  background: var(--accent-soft);
}
.badge-ok {
  color: var(--ok);
  border-color: color-mix(in srgb, var(--ok) 30%, transparent);
  background: var(--ok-soft);
}
.badge-warn {
  color: var(--warn);
  border-color: color-mix(in srgb, var(--warn) 30%, transparent);
  background: var(--warn-soft);
}

/* ── input icon ── */
.input-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  display: flex;
  pointer-events: none;
}

/* ── search dialog ── */
.search-dialog {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: 100vw;
  max-height: 100vh;
  margin: 12vh auto 0;
}
.search-dialog::backdrop {
  background: rgba(6, 10, 20, 0.5);
  backdrop-filter: blur(4px);
}
.search-dialog-inner {
  width: min(580px, 95vw);
  overflow: hidden;
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.5);
}
.search-dialog-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}
.search-dialog-header input {
  flex: 1;
  border: 0;
  outline: none;
  background: transparent;
  font-size: 16px;
  color: var(--ink);
  font-family: var(--font-sans);
}
.search-results {
  max-height: 360px;
  overflow-y: auto;
  padding: 8px;
}
.search-result-row {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 11px 12px;
  border-radius: var(--r-md);
}
.search-result-row:hover,
.search-result-row.is-active {
  background: var(--surface-3);
}
.search-result-name {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
}
.search-result-desc {
  font-size: 12.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.search-dialog-footer {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
  font-size: 12px;
  color: var(--muted);
}

/* ── hero ── */
.hero {
  border-bottom: 1px solid var(--line);
}
.hero-split {
  padding: 72px 24px;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}
.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.hero-badge {
  background: var(--surface);
  padding: 6px 14px;
  align-self: flex-start;
}
.hero-copy h1 {
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.05;
  letter-spacing: -0.035em;
}
.hero-sub {
  font-size: 18px;
  color: var(--muted);
  max-width: 480px;
}
.hero-search-form {
  position: relative;
  display: flex;
  gap: 0;
  max-width: 560px;
}
.hero-search-form .input {
  border-radius: var(--r-md) 0 0 var(--r-md);
  padding-left: 46px;
  height: 56px;
  font-size: 16px;
}
.hero-search-form .btn {
  border-radius: 0 var(--r-md) var(--r-md) 0;
  height: 56px;
  padding: 0 22px;
}
.hero-search-form .search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}
.hero-terminal {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* trust bar */
.trust-bar {
  display: flex;
  gap: 0;
  flex-wrap: wrap;
}
.trust-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 26px 0 0;
  margin-right: 26px;
}
.trust-stat--bordered {
  border-right: 1px solid var(--line);
}
.trust-num {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.trust-label {
  font-size: 12.5px;
  color: var(--muted);
}

/* terminal card */
.terminal-card {
  overflow: hidden;
}
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
.dot {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  flex-shrink: 0;
}
.dot-red {
  background: #ff5f57;
}
.dot-yellow {
  background: #febc2e;
}
.dot-green {
  background: #28c840;
}
.terminal-body {
  padding: 18px 18px 16px;
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.5;
  background: var(--code-bg);
  display: grid;
  grid-template-columns: 58px 1fr;
  row-gap: 10px;
  column-gap: 14px;
}
.terminal-key {
  color: var(--muted-2);
}
.terminal-val {
  color: var(--ink);
  font-weight: 500;
  word-break: break-all;
}
.terminal-val.accent {
  color: var(--accent-600);
  font-weight: 700;
}
.terminal-cursor {
  grid-column: span 2;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  color: var(--muted);
}
.cursor-block {
  width: 8px;
  height: 16px;
  background: var(--accent-600);
  animation: pulseDot 1.1s steps(1) infinite;
}

/* ── tool page hero ── */
.tool-hero {
  border-bottom: 1px solid var(--line);
}
.tool-hero-inner {
  padding: 24px 24px 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 760px;
}
.tool-hero-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}
.tool-hero-desc {
  font-size: 16.5px;
  color: var(--muted);
  max-width: 620px;
  line-height: 1.6;
}
.tool-card-main {
  padding: 0;
  overflow: hidden;
}

/* ── DNS form ── */
.dns-form {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.dns-form-row {
  display: flex;
  gap: 12px;
}
.type-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.type-btn {
  height: 32px;
  padding: 0 12px;
  border-radius: var(--r-sm);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink-2);
  transition:
    border-color 0.15s,
    background 0.15s,
    color 0.15s;
}
.type-btn:hover {
  border-color: var(--accent-600);
  color: var(--accent-600);
}
.type-btn--active {
  border-color: var(--accent-600);
  background: var(--accent-soft);
  color: var(--accent-600);
}
.try-examples {
  font-size: 12.5px;
  color: var(--muted);
}
.example-link {
  color: var(--accent-600);
  cursor: pointer;
}
.example-link:hover {
  text-decoration: underline;
}

/* ── DNS results ── */
.dns-results {
  border-top: 1px solid var(--line);
  background: var(--surface-2);
}
.dns-result-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
}
.dns-row {
  display: grid;
  grid-template-columns: 80px 1fr 64px 40px;
  gap: 14px;
  align-items: center;
  padding: 13px 16px;
  border-top: 1px solid var(--line);
  transition: background 0.12s;
}
.dns-row:hover {
  background: var(--surface-3);
}
.dns-row-head {
  background: var(--surface-2);
  border-top: 1px solid var(--line);
}
.dns-row-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  border-top: 1px solid var(--line);
}
.dns-empty {
  padding: 34px 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

/* ── DNS page body ── */
.dns-body {
  padding: 52px 24px 0;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 48px;
  align-items: start;
}
.dns-main {
  display: flex;
  flex-direction: column;
  gap: 48px;
  min-width: 0;
}
.dns-aside {
  display: flex;
  flex-direction: column;
  gap: 22px;
  position: sticky;
  top: 88px;
}
.dns-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 6px 0;
}
.dns-step {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.content-section {
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.prose {
  display: flex;
  flex-direction: column;
  gap: 16px;
  font-size: 15.5px;
  color: var(--ink-2);
  line-height: 1.7;
  max-width: 680px;
}
.record-ref-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
}
.record-ref-row--bordered {
  border-top: 1px solid var(--line);
}

/* ── IP page ── */
.ip-form {
  display: flex;
  gap: 12px;
  max-width: 720px;
}
.ip-banner {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.ip-banner-info {
  padding: clamp(20px, 3vw, 30px);
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}
.ip-banner-map {
  padding: 18px;
  border-left: 1px solid var(--line);
  background: var(--surface-2);
  min-width: 0;
}
.ip-headline-stats {
  display: flex;
  gap: 26px;
  flex-wrap: wrap;
}
.ip-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
.whatismyip-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.whatismyip-card {
  padding: 20px;
  display: flex;
  flex-direction: column;
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
.data-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
}
.data-label {
  font-size: 13.5px;
  color: var(--muted);
  width: 130px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.data-val {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  flex: 1;
  display: flex;
  align-items: center;
  gap: 4px;
}
.raw-json {
  margin: 0;
  padding: 20px;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--ink-2);
  background: var(--code-bg);
  overflow-x: auto;
}

/* geo panel */
.geo-panel {
  position: relative;
  width: 100%;
  aspect-ratio: 2/1;
  border-radius: var(--r-md);
  overflow: hidden;
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent-600) 6%, var(--surface-2)), var(--surface-2));
  border: 1px solid var(--line);
}
.geo-grid {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.geo-pin {
  position: absolute;
  transform: translate(-50%, -50%);
}
.geo-pin-ring {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: var(--accent-ring);
  animation: pulseDot 2s infinite;
}
.geo-pin-dot {
  position: relative;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: var(--accent-600);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}
.geo-coords {
  position: absolute;
  left: 12px;
  bottom: 10px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--muted);
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  padding: 3px 8px;
  border-radius: var(--r-sm);
  backdrop-filter: blur(4px);
}
.geo-flag {
  position: absolute;
  right: 12px;
  top: 12px;
  font-size: 26px;
  line-height: 1;
}

/* risk row */
.risk-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 13px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--surface-2);
}
.risk-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: var(--r-sm);
  flex-shrink: 0;
}
.risk-icon--ok {
  background: var(--ok-soft);
  color: var(--ok);
}
.risk-icon--warn {
  background: var(--warn-soft);
  color: var(--warn);
}

/* ── pro tip ── */
.pro-tip {
  padding: 18px;
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent-600) 22%, transparent);
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

/* ── category pills (tools index) ── */
.cat-pill {
  height: 36px;
  padding: 0 14px;
  border-radius: var(--r-pill);
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 600;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink-2);
  display: inline-flex;
  align-items: center;
  transition:
    border-color 0.15s,
    background 0.15s,
    color 0.15s;
}
.cat-pill:hover {
  border-color: var(--accent-600);
  color: var(--accent-600);
}
.cat-pill--active {
  background: var(--accent-600);
  color: #fff;
  border-color: var(--accent-600);
}

/* ── FAQ (details/summary) ── */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.faq-item {
  padding: 0;
  overflow: hidden;
}
.faq-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  padding: 17px 20px;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
  color: var(--ink);
  list-style: none;
}
.faq-summary::-webkit-details-marker {
  display: none;
}
.faq-content {
  padding: 0 20px 18px;
  font-size: 14.5px;
  color: var(--ink-2);
  line-height: 1.65;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
details[open] .faq-content {
  max-height: 400px;
}
.faq-chevron {
  color: var(--muted);
  flex-shrink: 0;
  transition: transform 0.2s;
}
details[open] .faq-chevron {
  transform: rotate(180deg);
}

/* ── blog ── */
.blog-hero {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  overflow: hidden;
  margin-bottom: 28px;
}
.blog-hero-copy {
  padding: clamp(24px, 3vw, 40px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  justify-content: center;
}
.blog-hero-art {
  display: grid;
  place-items: center;
  min-height: 220px;
  color: var(--accent-600);
  opacity: 0.5;
}

/* ── CTA card ── */
.cta-card {
  padding: clamp(32px, 5vw, 56px);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

/* ── why cards ── */
.why-card {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 13px;
}
.why-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--r-md);
  background: var(--accent-soft);
  color: var(--accent-600);
}

/* ── home two-col layout ── */
.home-two-col {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 40px;
  align-items: start;
}
.grid-featured {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* ═══ EDGE-specific responsive overrides ═══ */
@media (max-width: 1080px) {
  .footer-grid {
    grid-template-columns: 1fr repeat(2, 1fr) !important;
  }
  .blog-hero {
    grid-template-columns: 1fr !important;
  }
  .blog-hero-art {
    display: none;
  }
}
@media (max-width: 920px) {
  .dns-body {
    grid-template-columns: 1fr !important;
  }
  .dns-aside {
    position: static !important;
  }
  .ip-banner {
    grid-template-columns: 1fr !important;
  }
  .ip-grid {
    grid-template-columns: 1fr !important;
  }
  .home-two-col {
    grid-template-columns: 1fr !important;
  }
  .hero-split {
    grid-template-columns: 1fr !important;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 28px !important;
  }
  .trust-bar {
    gap: 20px;
  }
  .trust-stat--bordered {
    border-right: none;
  }
  .ip-banner-map {
    border-left: none !important;
    border-top: 1px solid var(--line);
  }
}
@media (max-width: 720px) {
  .grid-featured {
    grid-template-columns: 1fr !important;
  }
  .dns-steps {
    grid-template-columns: 1fr !important;
  }
  .dns-form-row {
    flex-direction: column;
  }
  .dns-form-row .btn {
    width: 100%;
  }
  .ip-form {
    flex-wrap: wrap;
  }
  .ip-form .btn {
    flex: 1;
  }
  .hero-search-form {
    flex-direction: column;
  }
  .hero-search-form .input {
    border-radius: var(--r-md);
  }
  .hero-search-form .btn {
    border-radius: var(--r-md);
  }
}
@media (max-width: 480px) {
  .footer-grid {
    grid-template-columns: 1fr !important;
  }
  .wrap {
    padding: 0 18px;
  }
  .dns-row {
    grid-template-columns: 64px 1fr 48px 32px;
    gap: 8px;
  }
}

/* ════════════════════════════════════════════════════════════
   ASN page
   ════════════════════════════════════════════════════════════ */

/* peering "constellation" — the map-without-a-map panel */
.net-panel {
  position: relative;
  width: 100%;
  aspect-ratio: 5/3;
  border-radius: var(--r-md);
  overflow: hidden;
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent-600) 6%, var(--surface-2)), var(--surface-2));
  border: 1px solid var(--line);
}
.net-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.net-edge {
  stroke: var(--line-strong);
  stroke-width: 0.4;
  stroke-dasharray: 1.4 1.4;
}
.net-node {
  fill: var(--surface);
  stroke: var(--accent-600);
  stroke-width: 0.9;
}
.net-node--up {
  stroke: var(--warn);
  fill: var(--warn-soft);
}
.net-label {
  fill: var(--muted);
  font-family: var(--font-mono);
  font-size: 2.7px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.net-core-halo {
  fill: var(--accent-ring);
  animation: pulseDot 2.4s infinite;
}
.net-core {
  fill: var(--accent-600);
  stroke: var(--surface);
  stroke-width: 0.7;
}
.net-core-label {
  fill: var(--accent-600);
  font-family: var(--font-mono);
  font-size: 3.4px;
  font-weight: 700;
}
.net-legend {
  position: absolute;
  left: 12px;
  bottom: 10px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--muted);
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  padding: 4px 9px;
  border-radius: var(--r-sm);
  backdrop-filter: blur(4px);
}
.net-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.net-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  display: inline-block;
}
.net-dot--core {
  background: var(--accent-600);
}
.net-dot--peer {
  background: var(--surface);
  border: 1.5px solid var(--accent-600);
}
.net-dot--up {
  background: var(--warn-soft);
  border: 1.5px solid var(--warn);
}

/* banner headline stats — 2×2 grid so long counts never collide */
.asn-headline-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 28px;
}

/* routing summary metrics */
.asn-metric-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.asn-metric {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface-2);
  padding: 13px 14px;
}
.asn-metric-num {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.1;
}
.asn-metric-cap {
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
}

/* announced prefixes table */
.prefix-head {
  display: grid;
  grid-template-columns: 1.4fr 0.7fr 1fr 1.6fr;
  gap: 12px;
  padding: 11px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.prefix-row {
  display: grid;
  grid-template-columns: 1.4fr 0.7fr 1fr 1.6fr;
  gap: 12px;
  align-items: center;
  padding: 12px 20px;
  border-top: 1px solid var(--line);
}
.prefix-row:first-of-type {
  border-top: 0;
}
.prefix-cidr {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-600);
}
.prefix-cidr:hover {
  text-decoration: underline;
}

/* peering grid */
.peer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}
.peer-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-top: 1px solid var(--line);
}
.peer-row:nth-child(odd) {
  border-right: 1px solid var(--line);
}
.peer-row:nth-child(1),
.peer-row:nth-child(2) {
  border-top: 0;
}
.peer-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: var(--r-sm);
  flex-shrink: 0;
  background: var(--accent-soft);
  color: var(--accent-600);
}
.peer-icon--up {
  background: var(--warn-soft);
  color: var(--warn);
}

@media (max-width: 720px) {
  .asn-metric-grid {
    grid-template-columns: 1fr 1fr;
  }
  .prefix-head {
    display: none;
  }
  .prefix-row {
    grid-template-columns: 1fr auto;
    gap: 6px 12px;
  }
  .prefix-row > span:last-child {
    grid-column: 1 / -1;
  }
  .peer-grid {
    grid-template-columns: 1fr;
  }
  .peer-row {
    border-right: 0 !important;
  }
  .peer-row:nth-child(2) {
    border-top: 1px solid var(--line);
  }
}

/* ── WHOIS lifecycle panel ── */
.whois-panel {
  position: relative;
  width: 100%;
  aspect-ratio: 5/3;
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent-600) 6%, var(--surface-2)), var(--surface-2));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 18px;
}
.whois-ring {
  position: relative;
  width: 148px;
  height: 148px;
  flex-shrink: 0;
}
.whois-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.whois-ring-track {
  fill: none;
  stroke: var(--line-strong);
  stroke-width: 9;
}
.whois-ring-fill {
  fill: none;
  stroke: var(--accent-600);
  stroke-width: 9;
  stroke-linecap: round;
}
.whois-ring-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
}
.whois-ring-num {
  font-family: var(--font-mono);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1;
}
.whois-ring-cap {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
}
.whois-life-dates {
  display: flex;
  align-items: center;
  gap: 18px;
}
.whois-life-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.whois-life-date .k {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.whois-life-date .v {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-2);
}
.whois-life-arrow {
  color: var(--muted-2);
  display: flex;
}

/* ── WHOIS contacts ── */
.contacts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}
.contact-card {
  padding: 16px 18px;
  border-top: 1px solid var(--line);
}
.contact-card:nth-child(odd) {
  border-right: 1px solid var(--line);
}
.contact-card .ct-role {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.contact-line {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 5px 0;
  font-size: 13px;
}
.contact-line .ck {
  color: var(--muted);
}
.contact-line .cv {
  color: var(--ink-2);
  font-weight: 600;
  text-align: right;
}
.contact-line .cv.redacted {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted-2);
  font-weight: 500;
}

@media (max-width: 720px) {
  .contacts-grid {
    grid-template-columns: 1fr;
  }
  .contact-card {
    border-right: 0 !important;
  }
}

/* ── SPF lookup-budget gauge ── */
.spf-gauge {
  position: relative;
  width: 100%;
  aspect-ratio: 5/3;
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent-600) 6%, var(--surface-2)), var(--surface-2));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 18px;
}
.spf-ring {
  position: relative;
  width: 150px;
  height: 150px;
  flex-shrink: 0;
}
.spf-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.spf-ring-track {
  fill: none;
  stroke: var(--line-strong);
  stroke-width: 9;
}
.spf-ring-fill {
  fill: none;
  stroke-width: 9;
  stroke-linecap: round;
  transition: stroke-dasharray 0.5s ease;
}
.spf-ring-fill.is-ok {
  stroke: var(--ok);
}
.spf-ring-fill.is-warn {
  stroke: var(--warn);
}
.spf-ring-fill.is-err {
  stroke: var(--err);
}
.spf-ring-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
}
.spf-ring-num {
  font-family: var(--font-mono);
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ink);
  line-height: 1;
}
.spf-ring-den {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
  margin-top: 2px;
}
.spf-ring-cap {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
  margin-top: 3px;
}
.spf-budget {
  display: flex;
  gap: 5px;
}
.spf-budget i {
  width: 13px;
  height: 7px;
  border-radius: 2px;
  background: var(--line-strong);
  display: block;
}
.spf-budget i.is-used {
  background: var(--ok);
}
.spf-budget i.is-warn {
  background: var(--warn);
}
.spf-budget i.is-over {
  background: var(--err);
}

/* ── SPF record code box (banner) ── */
.spf-record {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-2);
  background: var(--code-bg);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 12px 14px;
  word-break: break-word;
}
.spf-record .v {
  color: var(--accent-600);
  font-weight: 700;
}
.spf-record .all {
  color: var(--warn);
  font-weight: 700;
}

/* ── SPF qualifier chip ── */
.qual {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 3px 9px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--muted);
  text-transform: uppercase;
}
.qual--pass {
  color: var(--ok);
  border-color: color-mix(in srgb, var(--ok) 30%, transparent);
  background: var(--ok-soft);
}
.qual--soft {
  color: var(--warn);
  border-color: color-mix(in srgb, var(--warn) 30%, transparent);
  background: var(--warn-soft);
}
.qual--fail {
  color: var(--accent-600);
  border-color: color-mix(in srgb, var(--accent-600) 28%, transparent);
  background: var(--accent-soft);
}
.qual--neutral {
  color: var(--muted);
}

/* ── SPF mechanism table ── */
.spf-mech-head {
  display: grid;
  grid-template-columns: 108px 128px 1fr 96px;
  gap: 12px;
  padding: 11px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.spf-mech-row {
  display: grid;
  grid-template-columns: 108px 128px 1fr 96px;
  gap: 12px;
  align-items: center;
  padding: 12px 20px;
  border-top: 1px solid var(--line);
}
.spf-mech-row:first-of-type {
  border-top: 0;
}
.spf-mech-type {
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--accent-600);
}
.spf-mech-val {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-2);
  word-break: break-all;
}
.spf-lookup-tag {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  text-align: right;
}
.spf-lookup-tag.has {
  color: var(--accent-600);
}
.spf-lookup-tag.none {
  color: var(--muted-2);
}

/* ── SPF lookup resolution tree ── */
.spf-tree {
  margin: 0;
  padding: 18px 20px;
  background: var(--code-bg);
  overflow-x: auto;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.spf-tline {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 2;
  white-space: nowrap;
}
.spf-tline .branch {
  color: var(--muted-2);
}
.spf-tline .inc {
  color: var(--accent-600);
}
.spf-tline .root {
  color: var(--ink);
  font-weight: 700;
}
.spf-tline .all {
  color: var(--warn);
  font-weight: 700;
}
.spf-tline .cost {
  color: var(--muted);
  flex-shrink: 0;
}
.spf-tline .cost.zero {
  color: var(--muted-2);
}
.spf-ttotal {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px dashed var(--line-strong);
}
.spf-ttotal .ok {
  color: var(--ok);
}

/* ── err variants for the validation checklist ── */
.risk-icon--err {
  background: var(--err-soft);
  color: var(--err);
}
.badge-err {
  color: var(--err);
  border-color: color-mix(in srgb, var(--err) 30%, transparent);
  background: var(--err-soft);
}

@media (max-width: 720px) {
  .spf-mech-head {
    display: none;
  }
  .spf-mech-row {
    grid-template-columns: 1fr auto;
    gap: 6px 12px;
  }
  .spf-mech-row > .spf-mech-val {
    grid-column: 1 / -1;
  }
}

/* ── DKIM selector + domain query form ── */
.dkim-form {
  display: flex;
  gap: 10px;
  align-items: stretch;
  max-width: 760px;
  flex-wrap: wrap;
}
.dkim-field {
  position: relative;
}
.dkim-field--selector {
  flex: 0 1 200px;
  min-width: 150px;
}
.dkim-field--domain {
  flex: 1 1 240px;
  min-width: 180px;
  max-width: 232px;
}
.dkim-sep {
  display: flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
  padding: 0 2px;
}

/* ── DKIM keyprint panel (signature visual) ── */
.dkim-keyprint {
  position: relative;
  width: 100%;
  aspect-ratio: 5/3;
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent-600) 6%, var(--surface-2)), var(--surface-2));
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.dkim-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(16, 1fr);
  grid-template-rows: repeat(8, 1fr);
  gap: 3px;
}
.dkim-cell {
  border-radius: 2px;
  background: var(--accent-600);
  opacity: 0.07;
}
.dkim-cell.l1 {
  opacity: 0.24;
}
.dkim-cell.l2 {
  opacity: 0.52;
}
.dkim-cell.l3 {
  opacity: 0.92;
}
.dkim-keyprint-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.dkim-fp {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  padding: 4px 9px;
  border-radius: var(--r-sm);
  backdrop-filter: blur(4px);
}
.dkim-keytype {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--accent-600);
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent-600) 26%, transparent);
  padding: 4px 10px;
  border-radius: var(--r-pill);
}

/* ── DKIM key-strength meter ── */
.dkim-strength {
  display: flex;
  gap: 5px;
  align-items: center;
}
.dkim-strength i {
  width: 26px;
  height: 7px;
  border-radius: 2px;
  background: var(--line-strong);
  display: block;
}
.dkim-strength i.is-on {
  background: var(--ok);
}
.dkim-strength i.is-weak {
  background: var(--warn);
}
.dkim-strength i.is-bad {
  background: var(--err);
}

/* ── DKIM record code box (banner) ── */
.dkim-record {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-2);
  background: var(--code-bg);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 12px 14px;
  word-break: break-all;
}
.dkim-record .v {
  color: var(--accent-600);
  font-weight: 700;
}
.dkim-record .k {
  color: var(--ink);
  font-weight: 700;
}
.dkim-record .p {
  color: var(--muted);
}

/* ── DKIM tag table ── */
.dkim-tag-head {
  display: grid;
  grid-template-columns: 84px 150px 1fr 96px;
  gap: 12px;
  padding: 11px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.dkim-tag-row {
  display: grid;
  grid-template-columns: 84px 150px 1fr 96px;
  gap: 12px;
  align-items: center;
  padding: 12px 20px;
  border-top: 1px solid var(--line);
}
.dkim-tag-row:first-of-type {
  border-top: 0;
}
.dkim-tag-key {
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--accent-600);
}
.dkim-tag-name {
  font-size: 13.5px;
  color: var(--ink-2);
}
.dkim-tag-val {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-2);
  word-break: break-all;
}
.dkim-tag-req {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  text-align: right;
}
.dkim-tag-req.req {
  color: var(--accent-600);
}
.dkim-tag-req.opt {
  color: var(--muted-2);
}

/* ── validation row tints for warn/fail states (DKIM checklist) ── */
.risk-row--warn {
  border-color: color-mix(in srgb, var(--warn) 32%, var(--line));
  background: var(--warn-soft);
}
.risk-row--fail {
  border-color: color-mix(in srgb, var(--err) 32%, var(--line));
  background: var(--err-soft);
}

@media (max-width: 720px) {
  .dkim-tag-head {
    display: none;
  }
  .dkim-tag-row {
    grid-template-columns: 1fr auto;
    gap: 6px 12px;
  }
  .dkim-tag-row > .dkim-tag-val {
    grid-column: 1 / -1;
  }
}

/* ── DMARC enforcement ladder (the signature visual) ── */
.dmarc-gauge {
  position: relative;
  width: 100%;
  aspect-ratio: 5/3;
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent-600) 6%, var(--surface-2)), var(--surface-2));
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.dmarc-ladder {
  flex: 1;
  display: flex;
  gap: 16px;
}
.dmarc-track {
  width: 9px;
  border-radius: var(--r-pill);
  background: var(--line-strong);
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}
.dmarc-track-fill {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: var(--r-pill);
  transition: height 0.5s ease;
}
.dmarc-track-fill.is-reject {
  background: var(--ok);
}
.dmarc-track-fill.is-quarantine {
  background: var(--warn);
}
.dmarc-track-fill.is-none {
  background: var(--err);
}
.dmarc-rungs {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.dmarc-rung {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.dmarc-rung-dot {
  width: 11px;
  height: 11px;
  margin-top: 3px;
  border-radius: 50%;
  border: 2px solid var(--line-strong);
  background: var(--surface);
  flex-shrink: 0;
}
.dmarc-rung-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--muted-2);
  line-height: 1.3;
}
.dmarc-rung-desc {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 1px;
}
.dmarc-rung.is-active .dmarc-rung-label {
  color: var(--ink);
  font-weight: 700;
}
.dmarc-rung.is-active .dmarc-rung-dot {
  border-color: var(--accent-600);
  background: var(--accent-600);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.dmarc-gauge-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.dmarc-pct {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--accent-600);
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent-600) 26%, transparent);
  padding: 4px 10px;
  border-radius: var(--r-pill);
}
.dmarc-reports {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  padding: 4px 9px;
  border-radius: var(--r-sm);
  backdrop-filter: blur(4px);
}

/* ── DMARC record code box (banner) ── */
.dmarc-record {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-2);
  background: var(--code-bg);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 12px 14px;
  word-break: break-all;
}
.dmarc-record .v {
  color: var(--accent-600);
  font-weight: 700;
}
.dmarc-record .p {
  color: var(--ok);
  font-weight: 700;
}

/* ── DMARC tag table ── */
.dmarc-tag-head {
  display: grid;
  grid-template-columns: 84px 168px 1fr 96px;
  gap: 12px;
  padding: 11px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.dmarc-tag-row {
  display: grid;
  grid-template-columns: 84px 168px 1fr 96px;
  gap: 12px;
  align-items: center;
  padding: 12px 20px;
  border-top: 1px solid var(--line);
}
.dmarc-tag-row:first-of-type {
  border-top: 0;
}
.dmarc-tag-key {
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--accent-600);
}
.dmarc-tag-name {
  font-size: 13.5px;
  color: var(--ink-2);
}
.dmarc-tag-val {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-2);
  word-break: break-all;
}
.dmarc-tag-req {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  text-align: right;
}
.dmarc-tag-req.req {
  color: var(--accent-600);
}
.dmarc-tag-req.opt {
  color: var(--muted-2);
}

/* ── DMARC reporting destinations ── */
.dmarc-rpt-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 20px;
  border-top: 1px solid var(--line);
}
.dmarc-rpt-row:first-of-type {
  border-top: 0;
}
.dmarc-rpt-ic {
  width: 34px;
  height: 34px;
  border-radius: var(--r-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  color: var(--accent-600);
  flex-shrink: 0;
}
.dmarc-rpt-kind {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.dmarc-rpt-addr {
  font-family: var(--font-mono);
  font-size: 13.5px;
  color: var(--ink-2);
  word-break: break-all;
}

@media (max-width: 720px) {
  .dmarc-tag-head {
    display: none;
  }
  .dmarc-tag-row {
    grid-template-columns: 1fr auto;
    gap: 6px 12px;
  }
  .dmarc-tag-row > .dmarc-tag-val {
    grid-column: 1 / -1;
  }
}

/* ── SSL validity panel (ring + lifetime timeline) ── */
.ssl-panel {
  position: relative;
  width: 100%;
  aspect-ratio: 5/3;
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, color-mix(in srgb, var(--ok) 7%, var(--surface-2)), var(--surface-2));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 18px;
}
.ssl-ring {
  position: relative;
  width: 138px;
  height: 138px;
  flex-shrink: 0;
}
.ssl-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.ssl-ring-track {
  fill: none;
  stroke: var(--line-strong);
  stroke-width: 9;
}
.ssl-ring-fill {
  fill: none;
  stroke: var(--ok);
  stroke-width: 9;
  stroke-linecap: round;
}
.ssl-ring-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
}
.ssl-ring-num {
  font-family: var(--font-mono);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1;
}
.ssl-ring-cap {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
}

.ssl-timeline {
  width: 100%;
  max-width: 280px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ssl-track {
  position: relative;
  height: 6px;
  border-radius: 999px;
  background: var(--line-strong);
}
.ssl-track-fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  border-radius: 999px;
  background: var(--ok);
}
.ssl-track-now {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 13px;
  height: 13px;
  border-radius: 999px;
  background: var(--surface);
  border: 3px solid var(--ok);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}
.ssl-track-labels {
  display: flex;
  justify-content: space-between;
}
.ssl-track-labels .k {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.ssl-track-labels .k.right {
  text-align: right;
}
.ssl-track-labels .k .t {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.ssl-track-labels .k .v {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
}

/* ── SAN chips ── */
.san-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 16px 20px;
}
.san-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  padding: 7px 12px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink-2);
}
.san-chip .dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--ok);
  flex-shrink: 0;
}
.san-chip .wild {
  color: var(--accent-600);
}

/* ── certificate chain of trust ── */
.ssl-chain {
  display: flex;
  flex-direction: column;
  padding: 6px 0;
}
.ssl-chain-node {
  display: flex;
  gap: 14px;
  padding: 12px 20px;
  align-items: stretch;
}
.ssl-chain-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  width: 34px;
}
.ssl-chain-marker {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: var(--r-sm);
  flex-shrink: 0;
}
.ssl-chain-marker--leaf {
  background: var(--accent-soft);
  color: var(--accent-600);
}
.ssl-chain-marker--int {
  background: var(--surface-3);
  color: var(--ink-2);
  border: 1px solid var(--line);
}
.ssl-chain-marker--root {
  background: var(--ok-soft);
  color: var(--ok);
}
.ssl-chain-line {
  width: 2px;
  flex: 1;
  min-height: 14px;
  background: var(--line-strong);
  margin: 4px 0 0;
}
.ssl-chain-node:last-child .ssl-chain-line {
  display: none;
}
.ssl-chain-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-bottom: 6px;
}
.ssl-chain-tier {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.ssl-chain-cn {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ink);
}
.ssl-chain-meta {
  font-size: 12.5px;
  color: var(--muted);
}

@media (max-width: 720px) {
  .san-grid {
    padding: 14px 16px;
  }
}

/* ════════════════════════════════════════════════════════════
   JSON Formatter — client-side editor
   ════════════════════════════════════════════════════════════ */

/* syntax-highlight token palette (readable on --code-bg light + dark) */
:root {
  --jf-key: #4f46e5;
  --jf-str: #0e8a5f;
  --jf-num: #b5179e;
  --jf-bool: #c2410c;
  --jf-null: #94a3b8;
  --jf-punc: #94a3b8;
}
[data-theme='dark'] {
  --jf-key: #a5b4fc;
  --jf-str: #34d399;
  --jf-num: #f0abfc;
  --jf-bool: #fbbf24;
  --jf-null: #66728a;
  --jf-punc: #66728a;
}

/* toolbar */
.jf-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
.jf-toolbar .spacer {
  flex: 1;
}
.jf-seg {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--surface);
}
.jf-seg-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0 10px 0 4px;
}
.jf-seg-btn {
  height: 30px;
  min-width: 38px;
  padding: 0 10px;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-2);
  border-left: 1px solid var(--line);
  transition:
    background 0.14s,
    color 0.14s;
}
.jf-seg-btn:first-child {
  border-left: 0;
}
.jf-seg-btn--active {
  background: var(--accent-soft);
  color: var(--accent-600);
}

/* editor: two panes */
.jf-editor {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.jf-pane {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.jf-pane + .jf-pane {
  border-left: 1px solid var(--line);
}
.jf-pane-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.jf-pane-title {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.jf-pane-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.jf-input,
.jf-output {
  height: 460px;
  overflow: auto;
  background: var(--code-bg);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.65;
}
.jf-input {
  width: 100%;
  resize: none;
  border: 0;
  outline: none;
  padding: 14px 16px;
  color: var(--ink);
  tab-size: 2;
  -moz-tab-size: 2;
  white-space: pre;
}
.jf-input::placeholder {
  color: var(--muted-2);
}
.jf-output {
  padding: 14px 0;
}

/* line-numbered output */
.jf-line {
  display: grid;
  grid-template-columns: 48px 1fr;
  column-gap: 14px;
}
.jf-ln {
  text-align: right;
  color: var(--muted-2);
  user-select: none;
  padding-right: 6px;
  border-right: 1px solid var(--line);
  font-size: 12px;
}
.jf-code {
  white-space: pre;
  padding-right: 16px;
  color: var(--ink-2);
}
.jf-line:hover .jf-ln {
  color: var(--ink-2);
}

/* tokens */
.tok-key {
  color: var(--jf-key);
}
.tok-str {
  color: var(--jf-str);
}
.tok-num {
  color: var(--jf-num);
}
.tok-bool {
  color: var(--jf-bool);
  font-weight: 600;
}
.tok-null {
  color: var(--jf-null);
  font-style: italic;
}

/* empty/placeholder output */
.jf-output-empty {
  display: flex;
  height: 100%;
  align-items: center;
  justify-content: center;
  color: var(--muted-2);
  font-family: var(--font-sans);
  font-size: 14px;
  padding: 24px;
  text-align: center;
}

/* status bar */
.jf-status {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
}
.jf-verdict {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 14px;
}
.jf-verdict--ok {
  color: var(--ok);
}
.jf-verdict--err {
  color: var(--err);
}
.jf-verdict-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  flex-shrink: 0;
}
.jf-verdict--ok .jf-verdict-dot {
  background: var(--ok);
}
.jf-verdict--err .jf-verdict-dot {
  background: var(--err);
}
.jf-err-msg {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--err);
}
.jf-stats {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-left: auto;
}
.jf-stat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--muted);
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 4px 9px;
  border-radius: var(--r-pill);
}
.jf-stat b {
  color: var(--ink);
  font-weight: 700;
}

.jf-input.has-error {
  box-shadow: inset 3px 0 0 var(--err);
}

/* tree explorer */
.jf-tree {
  padding: 10px 8px 14px;
  font-family: var(--font-mono);
  font-size: 13px;
  max-height: 460px;
  overflow: auto;
}
.jf-branch > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 3px 8px;
  border-radius: var(--r-sm);
}
.jf-branch > summary::-webkit-details-marker {
  display: none;
}
.jf-branch > summary:hover {
  background: var(--surface-3);
}
.jf-caret {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: var(--muted);
  transition: transform 0.15s;
  display: inline-flex;
}
.jf-branch[open] > summary .jf-caret {
  transform: rotate(90deg);
}
.jf-kids {
  padding-left: 20px;
  border-left: 1px dashed var(--line-strong);
  margin-left: 13px;
}
.jf-leaf {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 3px 8px 3px 0;
}
.jf-tkey {
  color: var(--jf-key);
}
.jf-tcolon {
  color: var(--muted-2);
  margin: 0 2px 0 -3px;
}
.jf-tval-str {
  color: var(--jf-str);
}
.jf-tval-num {
  color: var(--jf-num);
}
.jf-tval-bool {
  color: var(--jf-bool);
  font-weight: 600;
}
.jf-tval-null {
  color: var(--jf-null);
  font-style: italic;
}
.jf-tcount {
  font-family: var(--font-sans);
  font-size: 11px;
  color: var(--muted);
  background: var(--surface-3);
  border: 1px solid var(--line);
  padding: 0 7px;
  border-radius: var(--r-pill);
  white-space: nowrap;
  line-height: 1.5;
}
.jf-index {
  color: var(--muted-2);
}

@media (max-width: 860px) {
  .jf-editor {
    grid-template-columns: 1fr;
  }
  .jf-pane + .jf-pane {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .jf-input,
  .jf-output {
    height: 300px;
  }
  .jf-stats {
    margin-left: 0;
    width: 100%;
  }
}

/* ════════════════════════════════════════════════════════════
   JWT Decoder — client-side, token never leaves the browser
   ════════════════════════════════════════════════════════════ */

/* segment + syntax palette (readable on --code-bg light + dark) */
:root {
  --jwt-h: #d6336c;
  --jwt-p: #7048e8;
  --jwt-s: #0c8599;
  --jwt-key: #4f46e5;
  --jwt-str: #0e8a5f;
  --jwt-num: #b5179e;
  --jwt-bool: #c2410c;
  --jwt-null: #94a3b8;
}
[data-theme='dark'] {
  --jwt-h: #f783ac;
  --jwt-p: #b197fc;
  --jwt-s: #3bc9db;
  --jwt-key: #a5b4fc;
  --jwt-str: #34d399;
  --jwt-num: #f0abfc;
  --jwt-bool: #fbbf24;
  --jwt-null: #66728a;
}

.jwt-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
.jwt-toolbar .spacer {
  flex: 1;
}

.jwt-editor {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.jwt-pane {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.jwt-pane + .jwt-pane {
  border-left: 1px solid var(--line);
}
.jwt-pane-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  min-height: 42px;
}
.jwt-pane-title {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.jwt-pane-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}
.jwt-legend {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.jwt-leg {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
}
.jwt-leg::before {
  content: '';
  width: 9px;
  height: 9px;
  border-radius: 3px;
}
.jwt-leg--h::before {
  background: var(--jwt-h);
}
.jwt-leg--p::before {
  background: var(--jwt-p);
}
.jwt-leg--s::before {
  background: var(--jwt-s);
}

/* encoded — highlighted textarea overlay (keep both layers identical) */
.jwt-encoded {
  position: relative;
  height: 330px;
  background: var(--code-bg);
}
.jwt-hl,
.jwt-area {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.75;
  white-space: pre-wrap;
  word-break: break-all;
  overflow: auto;
  border: 0;
}
.jwt-hl {
  color: var(--muted);
  pointer-events: none;
}
.jwt-area {
  background: transparent;
  color: transparent;
  -webkit-text-fill-color: transparent;
  caret-color: var(--accent-600);
  resize: none;
  outline: none;
  tab-size: 2;
}
.jwt-area::placeholder {
  color: var(--muted-2);
  -webkit-text-fill-color: var(--muted-2);
}
.jwt-tok-h {
  color: var(--jwt-h);
}
.jwt-tok-p {
  color: var(--jwt-p);
}
.jwt-tok-s {
  color: var(--jwt-s);
}
.jwt-tok-x {
  color: var(--muted);
}
.jwt-dot {
  color: var(--muted-2);
  font-weight: 700;
}
.jwt-encoded.has-error::after {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--err);
}

/* decoded — stacked header + payload */
.jwt-decoded {
  height: 330px;
  overflow: auto;
  background: var(--code-bg);
}
.jwt-sec + .jwt-sec {
  border-top: 1px solid var(--line);
}
.jwt-sec-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px 6px;
}
.jwt-chip {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: var(--r-pill);
  color: #fff;
}
.jwt-chip--h {
  background: var(--jwt-h);
}
.jwt-chip--p {
  background: var(--jwt-p);
}
.jwt-chip--s {
  background: var(--jwt-s);
}
.jwt-sec-note {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--muted);
}
.jwt-json {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
  padding: 2px 16px 14px;
  color: var(--ink-2);
}

.jwt-empty {
  display: flex;
  height: 100%;
  align-items: center;
  justify-content: center;
  color: var(--muted-2);
  font-family: var(--font-sans);
  font-size: 14px;
  padding: 24px;
  text-align: center;
}

/* json tokens */
.tok-key {
  color: var(--jwt-key);
}
.tok-str {
  color: var(--jwt-str);
}
.tok-num {
  color: var(--jwt-num);
}
.tok-bool {
  color: var(--jwt-bool);
  font-weight: 600;
}
.tok-null {
  color: var(--jwt-null);
  font-style: italic;
}

/* status bar */
.jwt-status {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
}
.jwt-verdict {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 14px;
}
.jwt-verdict--ok {
  color: var(--ok);
}
.jwt-verdict--err {
  color: var(--err);
}
.jwt-verdict-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  flex-shrink: 0;
}
.jwt-verdict--ok .jwt-verdict-dot {
  background: var(--ok);
}
.jwt-verdict--err .jwt-verdict-dot {
  background: var(--err);
}
.jwt-err-msg {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--err);
}
.jwt-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-left: auto;
}
.jwt-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--muted);
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 4px 9px;
  border-radius: var(--r-pill);
}
.jwt-pill b {
  color: var(--ink);
  font-weight: 700;
}
.jwt-pill--alg {
  color: var(--jwt-s);
  border-color: color-mix(in srgb, var(--jwt-s) 40%, var(--line));
}

/* expiry / status tag */
.jwt-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 11px;
  border-radius: var(--r-pill);
}
.jwt-tag--ok {
  color: var(--ok);
  background: var(--ok-soft);
}
.jwt-tag--err {
  color: var(--err);
  background: var(--err-soft);
}
.jwt-tag--warn {
  color: var(--warn);
  background: var(--warn-soft);
}
.jwt-tag-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: currentColor;
}

/* claims */
.jwt-claims {
  display: flex;
  flex-direction: column;
}
.jwt-claim {
  display: grid;
  grid-template-columns: 108px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 13px 20px;
  border-top: 1px solid var(--line);
}
.jwt-claim:first-child {
  border-top: 0;
}
.jwt-claim-code {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--accent-600);
  background: var(--accent-soft);
  padding: 4px 10px;
  border-radius: var(--r-sm);
  justify-self: start;
}
.jwt-claim-code.is-custom {
  color: var(--muted);
  background: var(--surface-3);
}
.jwt-claim-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}
.jwt-claim-desc {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 1px;
}
.jwt-claim-val {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-2);
  word-break: break-word;
}
.jwt-claim-val .sub {
  color: var(--muted);
}
.jwt-claim-col {
  min-width: 0;
}

/* signature / verify */
.jwt-verify-body {
  padding: 18px 20px 20px;
}
.jwt-verify-note {
  font-size: 13.5px;
  color: var(--ink-2);
  line-height: 1.6;
  max-width: 640px;
}
.jwt-verify-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.jwt-secret-wrap {
  flex: 1;
  min-width: 220px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 13px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--muted);
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}
.jwt-secret-wrap:focus-within {
  border-color: var(--accent-600);
  box-shadow: 0 0 0 3px var(--accent-ring);
}
.jwt-secret {
  flex: 1;
  height: 42px;
  border: 0;
  outline: none;
  background: transparent;
  font-family: var(--font-mono);
  font-size: 13.5px;
  color: var(--ink);
}
.jwt-verify-result {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 13px 15px;
  border-radius: var(--r-sm);
  font-size: 14px;
  font-weight: 600;
}
.jwt-verify-result.ok {
  color: var(--ok);
  background: var(--ok-soft);
}
.jwt-verify-result.bad {
  color: var(--err);
  background: var(--err-soft);
}
.jwt-verify-result.info {
  color: var(--muted);
  background: var(--surface-3);
}

@media (max-width: 860px) {
  .jwt-editor {
    grid-template-columns: 1fr;
  }
  .jwt-pane + .jwt-pane {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .jwt-encoded,
  .jwt-decoded {
    height: 250px;
  }
  .jwt-meta {
    margin-left: 0;
    width: 100%;
  }
  .jwt-claim {
    grid-template-columns: 1fr auto;
  }
  .jwt-claim-code {
    grid-column: 1 / -1;
  }
}

/* ════════════════════════════════════════════════════════════
   Base64 — client-side, text & files never leave the browser
   ════════════════════════════════════════════════════════════ */

.b64-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
.b64-toolbar .spacer {
  flex: 1;
}

/* segmented control (Encode/Decode + Text/File) */
.b64-seg {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--surface);
}
.b64-seg-btn {
  height: 32px;
  padding: 0 14px;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  border-left: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition:
    background 0.14s,
    color 0.14s;
}
.b64-seg-btn:first-child {
  border-left: 0;
}
.b64-seg-btn--active {
  background: var(--accent-soft);
  color: var(--accent-600);
}

/* option toggle pills (URL-safe, line wrap) */
.b64-opt {
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--surface);
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition:
    background 0.14s,
    color 0.14s,
    border-color 0.14s;
}
.b64-opt[aria-pressed='true'] {
  background: var(--accent-soft);
  color: var(--accent-600);
  border-color: color-mix(in srgb, var(--accent-600) 40%, var(--line-strong));
}
.b64-opt .b64-opt-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--muted-2);
  flex-shrink: 0;
  transition: background 0.14s;
}
.b64-opt[aria-pressed='true'] .b64-opt-dot {
  background: var(--accent-600);
}
.b64-opt[disabled] {
  opacity: 0.42;
  cursor: not-allowed;
}

/* editor: two panes with a swap button on the divider */
.b64-editor {
  display: grid;
  grid-template-columns: 1fr 1fr;
  position: relative;
}
.b64-pane {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.b64-pane + .b64-pane {
  border-left: 1px solid var(--line);
}
.b64-pane-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  min-height: 42px;
}
.b64-pane-title {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.b64-pane-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.b64-area {
  height: 340px;
  width: 100%;
  resize: none;
  border: 0;
  outline: none;
  overflow: auto;
  padding: 16px;
  background: var(--code-bg);
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--ink);
  white-space: pre-wrap;
  word-break: break-all;
  tab-size: 2;
}
.b64-area::placeholder {
  color: var(--muted-2);
}
.b64-area[readonly] {
  color: var(--ink-2);
}
.b64-area.has-error {
  box-shadow: inset 3px 0 0 var(--err);
}

.b64-empty {
  display: flex;
  height: 340px;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--muted-2);
  font-family: var(--font-sans);
  font-size: 14px;
  padding: 24px;
}

/* swap button on the divider */
.b64-swap {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--accent-600);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  z-index: 2;
  transition:
    transform 0.18s,
    background 0.14s;
}
.b64-swap:hover {
  background: var(--accent-soft);
  transform: translate(-50%, -50%) rotate(180deg);
}

/* file dropzone (encode + File source) */
.b64-drop {
  height: 340px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
  padding: 28px;
  background: var(--code-bg);
  border: 0;
  cursor: pointer;
}
.b64-drop.is-drag {
  background: var(--accent-soft);
}
.b64-drop-ic {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--accent-600) 12%, transparent);
  color: var(--accent-600);
}
.b64-drop-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}
.b64-drop-sub {
  font-size: 13px;
  color: var(--muted);
  max-width: 280px;
  line-height: 1.5;
}
.b64-filechip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-radius: var(--r-pill);
  background: var(--surface-3);
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--ink-2);
}
.b64-filechip b {
  color: var(--ink);
  font-weight: 700;
}

/* the hidden attribute must win over the class display rules above */
.b64-drop[hidden],
.b64-filechip[hidden],
.b64-area[hidden] {
  display: none;
}

/* status bar */
.b64-status {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
}
.b64-verdict {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 14px;
}
.b64-verdict--ok {
  color: var(--ok);
}
.b64-verdict--err {
  color: var(--err);
}
.b64-verdict-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  flex-shrink: 0;
}
.b64-verdict--ok .b64-verdict-dot {
  background: var(--ok);
}
.b64-verdict--err .b64-verdict-dot {
  background: var(--err);
}
.b64-err-msg {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--err);
}
.b64-stats {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-left: auto;
}
.b64-stat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--muted);
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 4px 9px;
  border-radius: var(--r-pill);
}
.b64-stat b {
  color: var(--ink);
  font-weight: 700;
}

@media (max-width: 860px) {
  .b64-editor {
    grid-template-columns: 1fr;
  }
  .b64-pane + .b64-pane {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .b64-area,
  .b64-empty,
  .b64-drop {
    height: 240px;
  }
  .b64-stats {
    margin-left: 0;
    width: 100%;
  }
  .b64-swap {
    top: auto;
    bottom: calc(50% - 4px);
    left: 50%;
    transform: translate(-50%, 50%) rotate(90deg);
  }
  .b64-swap:hover {
    transform: translate(-50%, 50%) rotate(270deg);
  }
}

/* ════════════════════════════════════════════════════════════
   Timestamp Converter — client-side, nothing leaves the browser
   ════════════════════════════════════════════════════════════ */

:root {
  --ts: #7c3aed;
  --ts-2: #8b5cf6;
  --ts-soft: #f5f3ff;
}
[data-theme='dark'] {
  --ts: #a78bfa;
  --ts-2: #8b5cf6;
  --ts-soft: rgba(139, 92, 246, 0.14);
}

/* live "now" bar */
.ts-nowbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 11px 16px;
  border: 1px solid color-mix(in srgb, var(--ts) 26%, var(--line));
  border-radius: var(--r-md);
  background: var(--ts-soft);
}
.ts-now-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--ts);
  animation: pulseDot 1.4s infinite;
  flex-shrink: 0;
}
.ts-now-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ts);
}
.ts-now-val {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.ts-now-iso {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--muted);
}
.ts-now-bar-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* toolbar */
.ts-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
.ts-toolbar .spacer {
  flex: 1;
}
.ts-seg {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--surface);
}
.ts-seg-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0 10px 0 12px;
}
.ts-seg-btn {
  height: 30px;
  min-width: 40px;
  padding: 0 11px;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-2);
  border-left: 1px solid var(--line);
  transition:
    background 0.14s,
    color 0.14s;
}
.ts-seg-btn--active {
  background: var(--ts-soft);
  color: var(--ts);
}

/* smart input */
.ts-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  padding: 16px;
  gap: 14px;
  background: var(--code-bg);
}
.ts-input-icon {
  color: var(--muted-2);
  display: flex;
  flex-shrink: 0;
}
.ts-input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  font-family: var(--font-mono);
  font-size: clamp(18px, 2.6vw, 26px);
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.ts-input::placeholder {
  color: var(--muted-2);
  font-weight: 400;
}

/* sub-tools row: picker + quick chips */
.ts-subtools {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}
.ts-subtools-label {
  font-size: 12.5px;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.ts-picker {
  height: 34px;
  padding: 0 10px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 12.5px;
  outline: none;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}
.ts-picker:focus {
  border-color: var(--ts);
  box-shadow: 0 0 0 3px var(--ts-soft);
}
.ts-chips {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  margin-left: auto;
}
.ts-chip {
  height: 30px;
  padding: 0 12px;
  border-radius: var(--r-pill);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink-2);
  transition:
    border-color 0.15s,
    color 0.15s,
    background 0.15s;
}
.ts-chip:hover {
  border-color: var(--ts);
  color: var(--ts);
  background: var(--ts-soft);
}

/* status bar */
.ts-status {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 13px 16px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
}
.ts-verdict {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 14px;
}
.ts-verdict--ok {
  color: var(--ok);
}
.ts-verdict--err {
  color: var(--err);
}
.ts-verdict-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  flex-shrink: 0;
}
.ts-verdict--ok .ts-verdict-dot {
  background: var(--ok);
}
.ts-verdict--err .ts-verdict-dot {
  background: var(--err);
}
.ts-interp {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--muted);
}
.ts-interp b {
  color: var(--ink-2);
  font-weight: 700;
}
.ts-interp .em {
  color: var(--ts);
  font-weight: 700;
}

/* result grid */
.ts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.ts-tile {
  position: relative;
  padding: 16px 18px;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  min-width: 0;
}
.ts-tile:nth-child(odd) {
  border-left: 0;
}
.ts-tile:nth-child(1),
.ts-tile:nth-child(2) {
  border-top: 0;
}
.ts-tile-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 9px;
}
.ts-tile-label svg {
  color: var(--ts);
}
.ts-tile-val {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  word-break: break-word;
  line-height: 1.4;
}
.ts-tile-sub {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 4px;
  font-family: var(--font-sans);
}
.ts-copy {
  position: absolute;
  top: 13px;
  right: 13px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted-2);
  cursor: pointer;
  opacity: 0;
  transition:
    opacity 0.14s,
    background 0.14s,
    color 0.14s;
}
.ts-tile:hover .ts-copy {
  opacity: 1;
}
.ts-copy:hover {
  background: var(--surface-3);
  color: var(--ts);
}
.ts-copy.copied {
  opacity: 1;
  color: var(--ok);
}

/* details chip strip */
.ts-details {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 14px 18px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
}
.ts-meta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 5px 11px;
  border-radius: var(--r-pill);
}
.ts-meta b {
  color: var(--ink);
  font-weight: 700;
}

/* across time zones */
.ts-zones {
  display: flex;
  flex-direction: column;
}
.ts-zone {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
}
.ts-zone:first-child {
  border-top: 0;
}
.ts-zone--local {
  background: var(--ts-soft);
}
.ts-zone-name {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.ts-zone-city {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.ts-zone-tz {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--muted);
}
.ts-zone-time {
  font-family: var(--font-mono);
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.ts-zone-date {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--muted);
  text-align: right;
  margin-top: 1px;
}
.ts-zone-off {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ts);
  background: var(--ts-soft);
  border: 1px solid color-mix(in srgb, var(--ts) 30%, transparent);
  padding: 4px 9px;
  border-radius: var(--r-pill);
  white-space: nowrap;
  justify-self: end;
}
.ts-local-tag {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  background: var(--ts);
  padding: 2px 7px;
  border-radius: var(--r-pill);
}

.ts-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted-2);
  font-family: var(--font-sans);
  font-size: 14px;
  padding: 40px 24px;
  text-align: center;
}

@media (max-width: 860px) {
  .ts-grid {
    grid-template-columns: 1fr;
  }
  .ts-tile {
    border-left: 1px solid var(--line);
  }
  .ts-tile:nth-child(2) {
    border-top: 1px solid var(--line);
  }
  .ts-chips {
    margin-left: 0;
    width: 100%;
  }
  .ts-zone {
    grid-template-columns: 1fr auto;
    gap: 8px 14px;
  }
  .ts-zone-off {
    grid-column: 2;
    grid-row: 1;
  }
}

/* ════════════════════════════════════════════════════════════
   Hash Generator — client-side, text/files/keys never leave the browser
   ════════════════════════════════════════════════════════════ */

/* class rules carry higher specificity than the [hidden] UA rule, so re-assert it */
.hg-key-row[hidden],
.hg-drop[hidden],
.hg-filechip[hidden],
.hg-area[hidden],
.hg-match-chip[hidden],
.hg-verify-verdict[hidden] {
  display: none !important;
}

.hg-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
.hg-toolbar .spacer {
  flex: 1;
}

/* segmented control (Source + Format) */
.hg-seg {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--surface);
}
.hg-seg-btn {
  height: 32px;
  padding: 0 13px;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  border-left: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition:
    background 0.14s,
    color 0.14s;
}
.hg-seg-btn:first-child {
  border-left: 0;
}
.hg-seg-btn--active {
  background: var(--accent-soft);
  color: var(--accent-600);
}

/* option toggle pills (Uppercase, HMAC) */
.hg-opt {
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--surface);
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition:
    background 0.14s,
    color 0.14s,
    border-color 0.14s;
}
.hg-opt[aria-pressed='true'] {
  background: var(--accent-soft);
  color: var(--accent-600);
  border-color: color-mix(in srgb, var(--accent-600) 40%, var(--line-strong));
}
.hg-opt .hg-opt-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--muted-2);
  flex-shrink: 0;
  transition: background 0.14s;
}
.hg-opt[aria-pressed='true'] .hg-opt-dot {
  background: var(--accent-600);
}
.hg-opt[disabled] {
  opacity: 0.42;
  cursor: not-allowed;
}

/* shared pane title */
.hg-pane-title {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* HMAC secret-key row */
.hg-key-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--accent-600) 5%, var(--surface-2));
  flex-wrap: wrap;
}
.hg-key-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-600);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}
.hg-key-input {
  flex: 1;
  min-width: 200px;
  height: 34px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 0 12px;
  outline: none;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}
.hg-key-input:focus {
  border-color: var(--accent-500);
  box-shadow: 0 0 0 4px var(--accent-ring);
}
.hg-key-note {
  font-size: 11.5px;
  color: var(--muted);
  white-space: nowrap;
}

/* input pane */
.hg-input-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  min-height: 42px;
}
.hg-area {
  height: 170px;
  width: 100%;
  resize: vertical;
  border: 0;
  outline: none;
  overflow: auto;
  padding: 16px;
  background: var(--code-bg);
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--ink);
  white-space: pre-wrap;
  word-break: break-word;
  tab-size: 2;
  display: block;
}
.hg-area::placeholder {
  color: var(--muted-2);
}

/* file dropzone (File source) */
.hg-drop {
  min-height: 170px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
  padding: 28px;
  background: var(--code-bg);
  border: 0;
  cursor: pointer;
}
.hg-drop.is-drag {
  background: var(--accent-soft);
}
.hg-drop-ic {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--accent-600) 12%, transparent);
  color: var(--accent-600);
}
.hg-drop-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}
.hg-drop-sub {
  font-size: 13px;
  color: var(--muted);
  max-width: 300px;
  line-height: 1.5;
}
.hg-filechip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-radius: var(--r-pill);
  background: var(--surface-3);
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--ink-2);
}
.hg-filechip b {
  color: var(--ink);
  font-weight: 700;
}

/* results header (with verify field) */
.hg-results-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 11px 16px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
.hg-verify {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 1;
  min-width: 240px;
  justify-content: flex-end;
}
.hg-verify-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.hg-verify-input {
  flex: 1;
  max-width: 380px;
  min-width: 140px;
  height: 32px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 12.5px;
  padding: 0 11px;
  outline: none;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}
.hg-verify-input:focus {
  border-color: var(--accent-500);
  box-shadow: 0 0 0 4px var(--accent-ring);
}
.hg-verify-verdict {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.hg-verify-verdict.is-match {
  color: var(--ok);
}
.hg-verify-verdict.is-nomatch {
  color: var(--muted);
}

/* result rows */
.hg-results {
  display: flex;
  flex-direction: column;
}
.hg-row {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 14px 16px;
  border-top: 1px solid var(--line);
  transition: background 0.14s;
}
.hg-row:first-child {
  border-top: 0;
}
.hg-row.is-match {
  background: var(--ok-soft);
  box-shadow: inset 3px 0 0 var(--ok);
}
.hg-row-top {
  display: flex;
  align-items: center;
  gap: 10px;
}
.hg-algo {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 13.5px;
  color: var(--ink);
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.hg-bits {
  text-transform: none;
  white-space: nowrap;
}
.hg-match-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ok);
  background: var(--ok-soft);
  border: 1px solid color-mix(in srgb, var(--ok) 35%, transparent);
  padding: 2px 8px;
  border-radius: var(--r-pill);
}
.hg-row-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
}
.hg-digest {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-2);
  word-break: break-all;
  background: var(--code-bg);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 9px 12px;
  user-select: all;
  cursor: text;
  min-height: 38px;
}
.hg-row.is-match .hg-digest {
  color: var(--ink);
  border-color: color-mix(in srgb, var(--ok) 40%, var(--line));
  background: color-mix(in srgb, var(--ok) 6%, var(--code-bg));
}
.hg-digest.is-pending {
  color: var(--muted-2);
}

/* status bar */
.hg-status {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
}
.hg-verdict {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 14px;
  color: var(--ok);
}
.hg-verdict-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  flex-shrink: 0;
  background: var(--ok);
}
.hg-stats {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-left: auto;
}
.hg-stat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--muted);
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 4px 9px;
  border-radius: var(--r-pill);
}
.hg-stat b {
  color: var(--ink);
  font-weight: 700;
}

@media (max-width: 720px) {
  .hg-results-head {
    flex-direction: column;
    align-items: stretch;
  }
  .hg-verify {
    justify-content: space-between;
  }
  .hg-verify-input {
    max-width: none;
  }
  .hg-stats {
    margin-left: 0;
    width: 100%;
  }
}

/* ════════════════════════════════════════════════════════════
   Cron Expression Generator — client-side, nothing leaves the browser
   ════════════════════════════════════════════════════════════ */

:root {
  --cr: #d97706;
  --cr-2: #f59e0b;
  --cr-soft: #fffbeb;
}
[data-theme='dark'] {
  --cr: #fbbf24;
  --cr-2: #f59e0b;
  --cr-soft: rgba(245, 158, 11, 0.13);
}

/* expression display: five editable cells */
.cron-expr {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: var(--code-bg);
}
.cron-cell {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px 8px 16px;
  border-left: 1px solid var(--line);
}
.cron-cell:first-child {
  border-left: 0;
}
.cron-cell-input {
  width: 100%;
  text-align: center;
  border: 0;
  outline: none;
  background: transparent;
  font-family: var(--font-mono);
  font-size: clamp(20px, 3.4vw, 34px);
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
  padding: 2px 0;
  border-bottom: 2px solid transparent;
  transition:
    border-color 0.15s,
    color 0.15s;
  min-width: 0;
}
.cron-cell-input:focus {
  border-bottom-color: var(--cr);
}
.cron-cell--err .cron-cell-input {
  color: var(--err);
  border-bottom-color: var(--err);
}
.cron-cell-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.cron-cell-range {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted-2);
}

/* readout: verdict + plain-english description */
.cron-readout {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 20px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}
.cron-verdict-dot {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  flex-shrink: 0;
  margin-top: 6px;
  background: var(--ok);
}
.cron-readout--err .cron-verdict-dot {
  background: var(--err);
}
.cron-desc {
  flex: 1;
  min-width: 0;
}
.cron-desc-en {
  font-size: clamp(17px, 2.4vw, 22px);
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
  line-height: 1.35;
}
.cron-readout--err .cron-desc-en {
  color: var(--err);
}
.cron-desc-sub {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 5px;
}
.cron-desc-sub b {
  color: var(--ink-2);
  font-weight: 700;
}

/* presets */
.cron-presets {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.cron-preset {
  height: 32px;
  padding: 0 13px;
  border-radius: var(--r-pill);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink-2);
  transition:
    border-color 0.15s,
    color 0.15s,
    background 0.15s;
}
.cron-preset:hover {
  border-color: var(--cr);
  color: var(--cr);
  background: var(--cr-soft);
}
.cron-preset--active {
  border-color: var(--cr);
  color: var(--cr);
  background: var(--cr-soft);
}

/* builder */
.cron-period {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
.cron-period-btn {
  height: 34px;
  padding: 0 16px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-2);
  transition:
    border-color 0.15s,
    color 0.15s,
    background 0.15s;
}
.cron-period-btn:hover {
  border-color: var(--cr);
  color: var(--cr);
}
.cron-period-btn--active {
  background: var(--cr);
  border-color: var(--cr);
  color: #fff;
}
.cron-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 14px;
  padding: 22px 20px;
  font-size: 15px;
  color: var(--ink-2);
  min-height: 74px;
}
.cron-controls .lead {
  font-weight: 600;
  color: var(--ink);
}
.cron-num {
  width: 64px;
  height: 38px;
  text-align: center;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 600;
  outline: none;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}
.cron-num:focus {
  border-color: var(--cr);
  box-shadow: 0 0 0 3px var(--cr-soft);
}
.cron-select {
  height: 38px;
  padding: 0 30px 0 12px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  outline: none;
  cursor: pointer;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 9px center;
}
.cron-select:focus {
  border-color: var(--cr);
  box-shadow: 0 0 0 3px var(--cr-soft);
}
.cron-time {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.cron-time-sep {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--muted);
}
.cron-days {
  display: inline-flex;
  gap: 6px;
  flex-wrap: wrap;
}
.cron-day {
  width: 42px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
  transition:
    border-color 0.15s,
    color 0.15s,
    background 0.15s;
  user-select: none;
}
.cron-day:hover {
  border-color: var(--cr);
  color: var(--cr);
}
.cron-day--active {
  background: var(--cr);
  border-color: var(--cr);
  color: #fff;
}

/* next runs */
.cron-runs {
  display: flex;
  flex-direction: column;
}
.cron-run {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 13px 20px;
  border-top: 1px solid var(--line);
}
.cron-run:first-child {
  border-top: 0;
}
.cron-run--next {
  background: var(--cr-soft);
}
.cron-run-idx {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  background: var(--surface-3);
  border: 1px solid var(--line);
}
.cron-run--next .cron-run-idx {
  color: #fff;
  background: var(--cr);
  border-color: var(--cr);
}
.cron-run-time {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.cron-run-day {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 2px;
}
.cron-run-rel {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--cr);
  background: var(--cr-soft);
  border: 1px solid color-mix(in srgb, var(--cr) 26%, transparent);
  padding: 4px 10px;
  border-radius: var(--r-pill);
  white-space: nowrap;
  justify-self: end;
}

/* field reference */
.cron-ref {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.cron-ref th,
.cron-ref td {
  text-align: left;
  padding: 11px 14px;
  border-top: 1px solid var(--line);
}
.cron-ref th {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  border-top: 0;
  background: var(--surface-2);
}
.cron-ref td {
  color: var(--ink-2);
}
.cron-ref td:first-child {
  font-weight: 600;
  color: var(--ink);
}
.cron-ref .mono {
  font-family: var(--font-mono);
  color: var(--cr);
  font-weight: 600;
}
.cron-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 16px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
}
.cron-tok {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--muted);
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 6px 11px;
  border-radius: var(--r-pill);
}
.cron-tok b {
  font-family: var(--font-mono);
  color: var(--cr);
  font-weight: 700;
}

.cron-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted-2);
  font-family: var(--font-sans);
  font-size: 14px;
  padding: 34px 24px;
  text-align: center;
}

@media (max-width: 720px) {
  .cron-cell {
    padding: 14px 4px 12px;
  }
  .cron-cell-range {
    display: none;
  }
  .cron-run {
    grid-template-columns: auto 1fr;
  }
  .cron-run-rel {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }
}
