/* domProjects — global styles */

:root {
  --bg: oklch(0.16 0.02 265);
  --bg-2: oklch(0.20 0.025 265);
  --bg-3: oklch(0.24 0.03 265);
  --surface: oklch(0.22 0.025 265 / 0.6);
  --surface-2: oklch(0.28 0.03 270 / 0.5);
  --border: oklch(0.4 0.04 265 / 0.4);
  --border-strong: oklch(0.55 0.06 265 / 0.5);
  --text: oklch(0.96 0.01 265);
  --text-2: oklch(0.78 0.02 265);
  --text-3: oklch(0.62 0.03 265);
  --accent: oklch(0.72 0.17 265);
  --accent-2: oklch(0.72 0.17 295);
  --accent-warm: oklch(0.75 0.15 35);
  --accent-green: oklch(0.78 0.16 155);
  --accent-red: oklch(0.7 0.2 25);
  --gradient-1: linear-gradient(135deg, oklch(0.72 0.17 265) 0%, oklch(0.72 0.17 295) 100%);
  --gradient-2: linear-gradient(135deg, oklch(0.72 0.17 295) 0%, oklch(0.72 0.17 325) 100%);
  --shadow-glow: 0 0 80px -20px oklch(0.72 0.17 280 / 0.5);
  --radius: 14px;
  --radius-sm: 8px;
  --nav-h: 68px;
  --footer-h: auto;
  --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Subtle grid + glow background */
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(800px 500px at 15% -10%, oklch(0.4 0.18 265 / 0.25), transparent 60%),
    radial-gradient(900px 600px at 100% 10%, oklch(0.4 0.18 295 / 0.22), transparent 60%),
    radial-gradient(700px 500px at 50% 110%, oklch(0.4 0.18 280 / 0.18), transparent 60%);
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(oklch(0.5 0.03 265 / 0.06) 1px, transparent 1px),
    linear-gradient(90deg, oklch(0.5 0.03 265 / 0.06) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, black 30%, transparent 80%);
  pointer-events: none;
  z-index: 0;
}

/* Layout */
.container {
  width: min(1200px, 100% - 48px);
  margin-inline: auto;
}

/* Skip link (WCAG 2.4.1 — Bypass Blocks) */
.skip-link {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 200;
  padding: 10px 16px;
  background: var(--accent);
  color: oklch(0.15 0.03 265);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.92rem;
  border-radius: 0 0 8px 0;
  transform: translateY(-100%);
  transition: transform 0.15s;
}
.skip-link:focus {
  transform: translateY(0);
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

/* Visually hidden (for screen-reader-only content like form labels) */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus indicator (WCAG 2.4.7) — keyboard-only via :focus-visible */
:focus { outline: none; }
a:focus-visible,
button:focus-visible,
[role="button"]:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px oklch(0.7 0.18 265 / 0.18);
}

/* Reduced motion (WCAG 2.3.3) */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  /* Loaders must keep rotating — they convey "still working" */
  .spinner {
    animation-duration: 0.8s !important;
    animation-iteration-count: infinite !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
  .terminal { transform: none !important; }
}

main {
  flex: 1 0 auto;
  padding-top: calc(var(--nav-h) + 32px);
  padding-bottom: 80px;
  position: relative;
  z-index: 1;
}

/* Typography */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0;
}

h1 { font-size: clamp(2.4rem, 5vw, 4.2rem); letter-spacing: -0.035em; }
h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); letter-spacing: -0.025em; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1rem; font-family: var(--font-mono); font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-3); }

p { margin: 0; color: var(--text-2); }
a { color: inherit; text-decoration: none; }

.mono { font-family: var(--font-mono); }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.eyebrow::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
}

.gradient-text {
  background: var(--gradient-1);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* NAV */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 100;
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  background: oklch(0.16 0.02 265 / 0.7);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}
.brand-mark {
  width: 32px; height: 32px;
  border-radius: 9px;
  background: var(--gradient-1);
  position: relative;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 24px -8px oklch(0.7 0.2 280 / 0.7);
}
.brand-mark::before {
  content: "</>";
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: oklch(0.15 0.03 265);
}
.brand .dot { color: var(--accent-2); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0; padding: 0;
}
.nav-links a {
  display: block;
  padding: 8px 14px;
  border-radius: 8px;
  color: var(--text-2);
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.15s, background 0.15s;
}
.nav-links a:hover { color: var(--text); background: oklch(1 0 0 / 0.04); }
.nav-links a.active { color: var(--text); background: oklch(1 0 0 / 0.06); }

.nav-actions { display: flex; align-items: center; gap: 8px; }

.lang-toggle {
  display: flex;
  background: oklch(1 0 0 / 0.04);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 3px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
}
.lang-toggle a {
  background: transparent;
  border: 0;
  color: var(--text-3);
  padding: 4px 8px;
  border-radius: 5px;
  cursor: pointer;
  font: inherit;
  letter-spacing: 0.05em;
  transition: all 0.15s;
  text-decoration: none;
}
.lang-toggle a:hover { color: var(--text); }
.lang-toggle a.active {
  background: var(--gradient-1);
  color: oklch(0.15 0.03 265);
  font-weight: 600;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.18s;
  white-space: nowrap;
}
.btn-primary {
  background: var(--gradient-1);
  color: oklch(0.15 0.03 265);
  font-weight: 600;
  box-shadow: 0 8px 30px -10px oklch(0.7 0.2 280 / 0.6);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 36px -10px oklch(0.7 0.2 280 / 0.8); }
.btn-ghost {
  background: oklch(1 0 0 / 0.04);
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover { background: oklch(1 0 0 / 0.07); border-color: var(--border-strong); }

.mobile-menu-btn { display: none; }

@media (max-width: 800px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    position: absolute;
    top: var(--nav-h);
    left: 16px; right: 16px;
    flex-direction: column;
    align-items: stretch;
    background: oklch(0.18 0.02 265 / 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 10px;
    gap: 4px;
  }
  .mobile-menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px; height: 38px;
    background: oklch(1 0 0 / 0.04);
    border: 1px solid var(--border);
    border-radius: 9px;
    color: var(--text);
    cursor: pointer;
  }
}

/* FOOTER */
footer {
  flex-shrink: 0;
  border-top: 1px solid var(--border);
  background: oklch(0.14 0.02 265 / 0.5);
  backdrop-filter: blur(12px);
  margin-top: auto;
  position: relative;
  z-index: 1;
}
.footer-inner {
  padding: 36px 0 28px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
}
.footer-col h2 {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-3);
  margin: 0 0 14px;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.footer-col a { color: var(--text-2); font-size: 0.9rem; transition: color 0.15s; }
.footer-col a:hover { color: var(--text); }
.footer-col p { font-size: 0.9rem; max-width: 320px; }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 18px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-3);
  flex-wrap: wrap;
  gap: 12px;
}
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.status-pill .pulse {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 10px var(--accent-green);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

@media (max-width: 800px) {
  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }
  .footer-col.brand-col { grid-column: 1 / -1; }
}

/* Glass card */
.card {
  background: var(--surface);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s;
}
.card:hover { border-color: var(--border-strong); }
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, oklch(1 0 0 / 0.04) 0%, transparent 40%);
  pointer-events: none;
}

.card-link {
  display: block;
  cursor: pointer;
  color: inherit;
}
.card-link:hover { transform: translateY(-3px); }

/* Section heading */
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 36px;
  gap: 24px;
  flex-wrap: wrap;
}
.section-head .text { display: flex; flex-direction: column; gap: 12px; max-width: 640px; }

/* Forms */
input, textarea, select {
  width: 100%;
  background: oklch(0.12 0.02 265 / 0.6);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 12px 14px;
  border-radius: 10px;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px oklch(0.7 0.18 265 / 0.18);
}
input[aria-invalid="true"],
textarea[aria-invalid="true"],
select[aria-invalid="true"] {
  border-color: oklch(0.7 0.2 25);
}
input[aria-invalid="true"]:focus,
textarea[aria-invalid="true"]:focus,
select[aria-invalid="true"]:focus {
  box-shadow: 0 0 0 3px oklch(0.7 0.2 25 / 0.22);
}

/* Inline form error (visible + announced via role="alert") */
.form-error {
  margin: 10px 0 0;
  font-family: var(--font-mono);
  font-size: 0.86rem;
  color: oklch(0.85 0.18 25);
}
.form-error:empty { display: none; }

/* Tags / chips */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 999px;
  background: oklch(1 0 0 / 0.05);
  border: 1px solid var(--border);
  color: var(--text-2);
  letter-spacing: 0.04em;
}
.tag.php { color: oklch(0.78 0.12 290); border-color: oklch(0.6 0.18 290 / 0.4); }
.tag.css { color: oklch(0.78 0.14 240); border-color: oklch(0.6 0.18 240 / 0.4); }
.tag.js { color: oklch(0.85 0.16 95); border-color: oklch(0.7 0.16 95 / 0.4); }

/* Reveal animation */
@keyframes reveal {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
.reveal { opacity: 0; }
.reveal.in {
  animation: reveal 0.6s cubic-bezier(.2,.7,.2,1) forwards;
}

/* Utilities */
.muted { color: var(--text-3); }
.row { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.divider { height: 1px; background: var(--border); margin: 32px 0; }
.small { font-size: 0.78rem; }

/* ==========================================================================
   Tools listing (audit.php, tools.php, …)
   ========================================================================== */
.page-head { max-width: 720px; margin-bottom: 56px; }
.tools-list { display: flex; flex-direction: column; gap: 16px; }
.tool-row {
  display: grid;
  grid-template-columns: 56px 64px 1fr 30px;
  gap: 24px;
  align-items: center;
  padding: 26px 28px;
}
.tool-row-num {
  font-size: 0.84rem;
  color: var(--text-3);
  letter-spacing: 0.08em;
}
.tool-row-icon {
  width: 56px; height: 56px;
  border-radius: 13px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, oklch(0.7 0.18 265 / 0.18), oklch(0.7 0.18 295 / 0.18));
  border: 1px solid oklch(0.7 0.18 280 / 0.3);
  color: var(--accent);
}
.tool-row-icon svg { width: 26px; height: 26px; }
.tool-row-text h3 { font-family: var(--font-display); font-size: 1.4rem; }
.tool-row-text p { margin-top: 6px; max-width: 580px; }
.tool-row-tags { display: flex; gap: 6px; margin-top: 12px; flex-wrap: wrap; }
.tool-row-go {
  font-size: 1.6rem;
  color: var(--text-3);
  transition: transform 0.2s, color 0.2s;
}
.card-link:hover .tool-row-go { color: var(--accent); transform: translateX(4px); }
@media (max-width: 700px) {
  .tool-row { grid-template-columns: 56px 1fr 24px; gap: 16px; }
  .tool-row-icon { display: none; }
}

/* ==========================================================================
   Tool detail page (services.php + audit-*.php + tool-*.php)
   ========================================================================== */
.tool-page { padding: 8px 0 60px; max-width: 980px; }
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-3);
  margin-bottom: 28px;
  transition: color 0.15s;
}
.back-link:hover { color: var(--accent); }

.tool-hero { margin-bottom: 36px; }
.tool-hero-icon {
  width: 64px; height: 64px;
  border-radius: 16px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, oklch(0.7 0.18 265 / 0.18), oklch(0.7 0.18 295 / 0.18));
  border: 1px solid oklch(0.7 0.18 280 / 0.3);
  color: var(--accent);
  margin-bottom: 18px;
}
.tool-hero-icon svg { width: 30px; height: 30px; }
.tool-hero h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin: 12px 0 14px;
}
.tool-hero p {
  font-size: 1.05rem;
  max-width: 640px;
}

.tool-demo { margin: 36px 0; }
.tool-demo h4 { margin-bottom: 16px; }
.scan-form {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
}
.scan-form input { flex: 1; }

.tool-features { margin-top: 56px; }
.tool-features h2 { margin-bottom: 22px; }
.feat-list {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 28px;
}
@media (max-width: 700px) { .feat-list { grid-template-columns: 1fr; } }
.feat-list li {
  padding: 14px 16px;
  background: oklch(1 0 0 / 0.03);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.92rem;
  color: var(--text-2);
}
.feat-list strong {
  font-family: var(--font-mono);
  color: var(--accent);
  font-weight: 500;
  margin-right: 6px;
}

.dns-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-family: var(--font-mono);
  font-size: 0.86rem;
  margin-top: 16px;
}
.dns-table th, .dns-table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.dns-table th {
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.dns-table tr:last-child td { border-bottom: 0; }
.dns-table .type {
  display: inline-block;
  padding: 2px 8px;
  background: oklch(0.7 0.18 265 / 0.15);
  color: var(--accent);
  border-radius: 5px;
  font-weight: 500;
  font-size: 0.78rem;
}
.dns-table td { vertical-align: top; }
.dns-table .break { word-break: break-word; }

.section-sub {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-3);
  margin: 26px 0 12px;
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.section-sub .count {
  font-size: 0.74rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-3);
}

.table-wrap {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: auto;
  background: oklch(0.1 0.02 265 / 0.5);
}
.table-wrap .dns-table { margin-top: 0; }

/* Status pills: g=ok, y=warning, r=error, b=info */
.pill, .code-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  background: oklch(1 0 0 / 0.06);
  color: var(--text-2);
}
.code-pill { border-radius: 6px; font-weight: 600; font-size: 0.78rem; }
.pill.g, .code-pill.g { background: oklch(0.78 0.16 155 / 0.18); color: var(--accent-green); }
.pill.y, .code-pill.y { background: oklch(0.82 0.16 85 / 0.18);  color: oklch(0.85 0.16 85); }
.pill.r, .code-pill.r { background: oklch(0.7 0.2 25 / 0.2);     color: oklch(0.85 0.18 25); }
.pill.b, .code-pill.b { background: oklch(0.7 0.18 265 / 0.18);  color: var(--accent); }

.error-block {
  background: oklch(0.7 0.2 25 / 0.1);
  border: 1px solid oklch(0.7 0.2 25 / 0.4);
  border-radius: 10px;
  padding: 12px 14px;
  margin-top: 14px;
  font-size: 0.86rem;
  color: oklch(0.85 0.18 25);
}
.error-block strong { margin-right: 6px; }

/* ==========================================================================
   Audit result pages (shared across audit/seo, security, performance,
   accessibility, domain, sitemap)
   ========================================================================== */

/* SERP / social previews */
.serp-preview {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 18px 20px;
  background: oklch(0.1 0.02 265 / 0.5);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 16px;
}
.serp-favicon {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: oklch(1 0 0 / 0.05);
  padding: 4px;
  object-fit: contain;
  flex-shrink: 0;
}
.serp-body { flex: 1; min-width: 0; }
.serp-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--accent);
  word-break: break-word;
  margin-bottom: 6px;
}
.serp-desc {
  font-size: 0.92rem;
  margin: 10px 0 6px;
  color: var(--text-2);
  word-break: break-word;
}
.serp-pill-row { margin-bottom: 4px; }

.social-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
@media (max-width: 800px) { .social-grid { grid-template-columns: 1fr; } }
.social-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 12px;
  background: oklch(0.1 0.02 265 / 0.5);
}
.social-img {
  display: block;
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  background: oklch(0.15 0.02 265);
}
.social-body { padding: 14px 16px; }
.social-host {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 4px;
}
.social-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
  letter-spacing: -0.01em;
  word-break: break-word;
}
.social-desc {
  font-size: 0.85rem;
  color: var(--text-2);
  margin-top: 4px;
  word-break: break-word;
}

/* Definition list (key/value pairs) */
.meta-dl {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 8px 18px;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.86rem;
}
.meta-dl.small { font-size: 0.8rem; }
@media (max-width: 600px) {
  .meta-dl { grid-template-columns: 1fr; gap: 2px 0; }
  .meta-dl dd { margin-bottom: 8px; }
}
.meta-dl dt {
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  color: var(--text-3);
  text-transform: uppercase;
  padding-top: 2px;
}
.meta-dl dd { margin: 0; color: var(--text); word-break: break-word; }
.meta-dl .break { word-break: break-word; }
.theme-swatch {
  display: inline-block;
  width: 18px; height: 18px;
  border-radius: 4px;
  margin-left: 8px;
  vertical-align: middle;
  border: 1px solid var(--border);
}

/* Pass/fail check grid */
.check-grid {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 8px;
}
.check {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: oklch(1 0 0 / 0.03);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.88rem;
}
.check .icon { width: 16px; height: 16px; flex-shrink: 0; }
.check.ok .icon, .check.pass .icon { color: var(--accent-green); }
.check.warn .icon { color: oklch(0.85 0.16 85); }
.check.ko .icon, .check.fail .icon { color: oklch(0.8 0.18 25); }
.check .label { flex: 1; }
.check .pill { font-size: 0.7rem; flex-shrink: 0; }

/* Tabs */
.tabs { margin-top: 4px; }
.tab-bar {
  display: flex;
  gap: 2px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
}
.tab-link {
  background: transparent;
  border: 0;
  color: var(--text-3);
  font-family: var(--font-body);
  font-size: 0.86rem;
  font-weight: 500;
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.15s, border-color 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.tab-link .count { color: var(--text-3); font-size: 0.74rem; }
.tab-link:hover { color: var(--text-2); }
.tab-link.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab-link.active .count { color: var(--accent); }
.tab-pane { display: none; }
.tab-pane.active { display: block; }
.tab-pane .empty { padding: 12px 4px; }
.dns-table .num { text-align: right; white-space: nowrap; }
.dns-table a { color: var(--accent); }
.dns-table a:hover { text-decoration: underline; }

/* JSON-LD pre block */
.jsonld-pre {
  background: oklch(0.1 0.02 265 / 0.7);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 18px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-2);
  line-height: 1.7;
  margin: 0 0 12px;
  white-space: pre-wrap;
  word-break: break-word;
}
.err-inline { color: oklch(0.85 0.18 25); }

/* Issue / detail block */
.issue-block {
  background: oklch(1 0 0 / 0.03);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 10px;
}
.issue-block summary {
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.86rem;
  color: var(--text-2);
  list-style: none;
}
.issue-block summary::-webkit-details-marker { display: none; }
.issue-block summary::before { content: "▸ "; color: var(--text-3); }
.issue-block[open] summary::before { content: "▾ "; color: var(--accent); }

/* Performance summary tiles */
.perf-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  margin-top: 22px;
}
.perf-stat {
  background: oklch(0.1 0.02 265 / 0.5);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.perf-stat-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
}
.perf-stat-num { display: inline-flex; align-items: center; gap: 8px; font-size: 1.1rem; }
.perf-stat-num .pill { font-size: 0.95rem; }

/* Waterfall (timing breakdown) — vertical rows with horizontal bars */
.waterfall {
  background: oklch(0.1 0.02 265 / 0.5);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.wf-row {
  display: grid;
  grid-template-columns: 110px 1fr 90px;
  gap: 14px;
  align-items: center;
  font-size: 0.86rem;
}
.wf-label {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
}
.wf-value { text-align: right; color: var(--text-2); }
.wf-track {
  height: 10px;
  background: oklch(1 0 0 / 0.04);
  border-radius: 4px;
  overflow: hidden;
}
.wf-bar {
  height: 100%;
  border-radius: 4px;
  background: var(--accent);
  transition: width 0.4s ease;
}
.wf-c0 { background: oklch(0.7 0.18 200); }
.wf-c1 { background: oklch(0.72 0.18 240); }
.wf-c2 { background: oklch(0.72 0.18 280); }
.wf-c3 { background: oklch(0.75 0.16 320); }
.wf-c4 { background: oklch(0.78 0.16 50);  }
.wf-total { padding-top: 8px; border-top: 1px solid var(--border); }
.wf-total-bar { background: var(--gradient-1); opacity: 0.6; }

/* Asset inventory tiles */
.assets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  margin-top: 6px;
}
.asset-tile {
  background: oklch(0.1 0.02 265 / 0.5);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.asset-tile-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
}
.asset-tile-num {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.asset-tile .pill { width: fit-content; font-size: 0.7rem; }

/* Performance: reco list */
.reco-list {
  list-style: none;
  padding: 0;
  margin: 14px 0 0 0;
  display: grid;
  gap: 10px;
}
.reco-row {
  display: grid;
  grid-template-columns: max-content 1fr;
  align-items: start;
  gap: 10px 14px;
  padding: 12px 14px;
  background: oklch(0.1 0.02 265 / 0.5);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.reco-row.reco-high   { border-left: 3px solid oklch(0.7 0.2 25); }
.reco-row.reco-medium { border-left: 3px solid oklch(0.82 0.16 85); }
.reco-row.reco-low    { border-left: 3px solid oklch(0.7 0.18 265); }
.reco-row .pill { font-size: 0.72rem; align-self: center; white-space: nowrap; }
.reco-text { line-height: 1.45; }
.reco-samples {
  grid-column: 1 / -1;
  margin: 4px 0 0 0;
  padding-left: 18px;
}
@media (max-width: 600px) {
  .reco-row { grid-template-columns: 1fr; }
}

/* Security summary tiles */
.sec-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-top: 22px;
}
.sec-stat {
  background: oklch(0.1 0.02 265 / 0.5);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sec-stat-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
}
.sec-stat-value {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.sec-stat-value .pill {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  padding: 4px 12px;
}
.sec-score .sec-stat-value { font-size: 1rem; font-weight: 500; }

/* Header name colored by status */
.hdr-name {
  font-family: var(--font-mono);
  font-weight: 600;
  white-space: nowrap;
}
.hdr-name.g { color: var(--accent-green); }
.hdr-name.y { color: oklch(0.85 0.16 85); }
.hdr-name.r { color: oklch(0.8 0.18 25); }

/* Accessibility summary tiles */
.a11y-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 22px;
}
.a11y-stat {
  background: oklch(0.1 0.02 265 / 0.5);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.a11y-stat-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
}
.a11y-stat-num {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* WCAG categories breakdown */
.a11y-cats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.a11y-cat {
  background: oklch(0.1 0.02 265 / 0.5);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.a11y-cat-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
}
.a11y-cat-num { font-size: 1.2rem; font-weight: 600; }
.a11y-cat-num .pill { font-size: 0.85rem; }

/* WCAG check rows */
.check-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.check-row {
  display: grid;
  grid-template-columns: 22px 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 10px 14px;
  background: oklch(1 0 0 / 0.03);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.88rem;
}
@media (max-width: 700px) {
  .check-row { grid-template-columns: 22px 1fr; }
  .check-row .check-wcag, .check-row .check-note { grid-column: 2; }
}
.check-icon { width: 18px; height: 18px; display: grid; place-items: center; }
.check-icon svg { width: 16px; height: 16px; }
.check-row.pass .check-icon { color: var(--accent-green); }
.check-row.warn .check-icon { color: oklch(0.85 0.16 85); }
.check-row.fail .check-icon { color: oklch(0.85 0.18 25); }
.check-row.fail { border-color: oklch(0.7 0.2 25 / 0.4); }
.check-row.warn { border-color: oklch(0.82 0.16 85 / 0.35); }
.check-label { font-weight: 500; color: var(--text); }
.check-wcag {
  font-size: 0.72rem;
  color: var(--text-3);
  padding: 2px 8px;
  background: oklch(1 0 0 / 0.04);
  border-radius: 5px;
  letter-spacing: 0.04em;
}
.check-note { color: var(--text-2); font-size: 0.84rem; word-break: break-word; }

.issue-samples {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.8rem;
  color: var(--text-2);
}
.issue-samples li {
  padding: 6px 10px;
  background: oklch(0.1 0.02 265 / 0.5);
  border: 1px solid var(--border);
  border-radius: 6px;
  word-break: break-word;
}

/* Contrast checker */
.contrast-tool { display: flex; flex-direction: column; gap: 18px; }
.contrast-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .contrast-inputs { grid-template-columns: 1fr; } }
.contrast-inputs label {
  display: flex; flex-direction: column; gap: 8px;
  font-family: var(--font-mono); font-size: 0.78rem;
  color: var(--text-3); text-transform: uppercase; letter-spacing: 0.08em;
}
.color-input {
  display: flex; gap: 8px; align-items: center;
  background: oklch(0.12 0.02 265 / 0.6);
  border: 1px solid var(--border);
  border-radius: 10px; padding: 6px;
}
.color-input input[type="color"] {
  width: 38px; height: 38px; border: 0;
  background: transparent; cursor: pointer; padding: 0; border-radius: 8px;
}
.color-input input[type="text"] { border: 0; padding: 8px; background: transparent; flex: 1; }
.contrast-preview {
  padding: 28px 22px;
  border-radius: 10px;
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}
.contrast-results { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.cr-ratio, .cr-grade {
  background: oklch(0.1 0.02 265 / 0.7);
  border: 1px solid var(--border);
  border-radius: 10px; padding: 14px 16px;
  display: flex; flex-direction: column; gap: 4px;
}
.cr-ratio strong { font-family: var(--font-display); font-size: 1.6rem; font-weight: 600; letter-spacing: -0.02em; }
.cr-grade .badge {
  display: inline-block; padding: 4px 10px;
  border-radius: 6px; font-family: var(--font-mono);
  font-weight: 600; font-size: 0.86rem; width: fit-content;
  background: oklch(1 0 0 / 0.06); color: var(--text-3);
}
.cr-grade.pass .badge { background: oklch(0.78 0.16 155 / 0.2); color: var(--accent-green); }
.cr-grade.fail .badge { background: oklch(0.7 0.2 25 / 0.2); color: oklch(0.8 0.18 25); }

/* Whois / TLS definition list */
.whois-dl {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 10px 18px;
  margin: 0;
  font-size: 0.88rem;
}
@media (max-width: 600px) {
  .whois-dl { grid-template-columns: 1fr; gap: 4px 0; }
  .whois-dl dd { margin-bottom: 10px; }
}
.whois-dl dt {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--text-3);
  text-transform: uppercase;
  padding-top: 2px;
}
.whois-dl dd {
  margin: 0;
  font-family: var(--font-mono);
  color: var(--text);
  word-break: break-word;
}
.whois-dl .tag { margin: 0 4px 4px 0; }
.whois-dl .pill { margin-left: 8px; }
.ns-list {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 2px;
}
.whois-raw { margin-top: 16px; }
.whois-raw summary {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-3);
  cursor: pointer;
  padding: 8px 0;
  list-style: none;
  transition: color 0.15s;
}
.whois-raw summary::-webkit-details-marker { display: none; }
.whois-raw summary::before {
  content: "▸";
  display: inline-block;
  margin-right: 8px;
  transition: transform 0.15s;
}
.whois-raw[open] summary::before { transform: rotate(90deg); }
.whois-raw summary:hover { color: var(--accent); }
.whois-pre {
  background: oklch(0.1 0.02 265 / 0.7);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 18px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-2);
  line-height: 1.7;
  margin: 8px 0 0;
  white-space: pre-wrap;
  word-break: break-word;
}
.redir-table .num { text-align: right; white-space: nowrap; }
.redir-table a { color: var(--accent); }
.redir-table a:hover { text-decoration: underline; }
.error-text { color: oklch(0.85 0.18 25); margin-top: 4px; }

/* TLS + Email side by side */
.dual-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin-top: 24px;
}
@media (max-width: 800px) { .dual-grid { grid-template-columns: 1fr; } }
.dual-grid > div { min-width: 0; }
.dual-grid .whois-dl { font-size: 0.84rem; grid-template-columns: 130px 1fr; }
.dual-grid .tag { margin: 0 4px 4px 0; }

.email-list {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.email-row {
  display: grid;
  grid-template-columns: 80px auto 1fr;
  gap: 10px 14px;
  align-items: center;
  padding: 12px 14px;
  background: oklch(0.1 0.02 265 / 0.5);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.email-row.ko { border-color: oklch(0.7 0.2 25 / 0.35); }
.email-row.ok { border-color: oklch(0.78 0.16 155 / 0.3); }
.email-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.04em;
}
.email-row .pill { justify-self: start; font-size: 0.7rem; }
.email-row p, .email-value {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 0.78rem;
  word-break: break-word;
}
.email-value {
  padding: 6px 10px;
  background: oklch(0.06 0.02 265 / 0.6);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-2);
}

/* Sitemap summary stats */
.sm-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 22px;
}
.sm-stat {
  background: oklch(0.1 0.02 265 / 0.5);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.sm-stat-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
}
.sm-stat-value {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--text);
  word-break: break-word;
}
.sm-stat-num {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.sm-stat-link {
  color: var(--accent);
  font-size: 0.78rem;
  word-break: break-all;
}
.sm-stat-link:hover { text-decoration: underline; }
.sm-status-bar { display: flex; flex-wrap: wrap; gap: 4px; }
.sm-status-bar .pill { font-size: 0.74rem; }

/* XML raw blocks */
.xml-block {
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 14px;
  overflow: hidden;
}
.xml-block-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: oklch(0.14 0.02 265 / 0.7);
  border-bottom: 1px solid var(--border);
}
.xml-block-head .pill { margin-left: auto; flex-shrink: 0; }
.xml-pre {
  background: oklch(0.1 0.02 265 / 0.7);
  padding: 14px 18px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-2);
  line-height: 1.6;
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ==========================================================================
   Tool result pages (shared across tools/sri-hash, csp-hash, pem, csp)
   ========================================================================== */

/* Copy-on-click rows — used by SRI, CSP-hash, PEM */
.copy-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}
.copy-row-title {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
  flex: 1;
}
.btn-copy {
  padding: 4px 10px;
  font-size: 0.78rem;
  gap: 6px;
}
.btn-copy.copied {
  background: oklch(0.78 0.16 155 / 0.2);
  border-color: oklch(0.78 0.16 155 / 0.5);
  color: var(--accent-green);
}
.copy-pre {
  background: oklch(0.1 0.02 265 / 0.7);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-2);
  line-height: 1.55;
  margin: 0 0 14px;
  white-space: pre-wrap;
  word-break: break-all;
}

/* Hash card (SRI / CSP-hash / PEM block) */
.hash-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: oklch(0.12 0.02 265 / 0.4);
}
.hash-card.highlight {
  border-color: oklch(0.7 0.18 280 / 0.5);
  box-shadow: 0 0 30px -10px oklch(0.7 0.18 280 / 0.4);
}
.hash-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: oklch(0.14 0.02 265 / 0.6);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.hash-card.highlight .hash-card-head {
  background: linear-gradient(135deg, oklch(0.7 0.18 265 / 0.18), oklch(0.7 0.18 295 / 0.18));
  color: var(--text);
}
.hash-card.highlight .hash-card-head svg { color: var(--accent); }
.hash-card-head strong { font-family: var(--font-mono); font-size: 0.9rem; }
.hash-card-body { padding: 14px 16px; }

/* Code-block textarea (PEM / CSP-hash) */
.csp-form,
.pem-form { display: flex; flex-direction: column; gap: 10px; }
.csp-textarea,
.pem-textarea {
  width: 100%;
  min-height: 220px;
  background: oklch(0.1 0.02 265 / 0.7);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 14px 16px;
  border-radius: 10px;
  font-size: 0.86rem;
  line-height: 1.55;
  resize: vertical;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.csp-textarea:focus,
.pem-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px oklch(0.7 0.18 265 / 0.18);
}
.csp-form-row,
.pem-form-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* CSP-hash summary tiles */
.csp-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 22px;
}
.csp-stat {
  background: oklch(0.1 0.02 265 / 0.5);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.csp-stat-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
}
.csp-stat-value { display: inline-flex; align-items: center; gap: 8px; }
.csp-stat-num {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.csp-stat code { font-size: 0.78rem; }

/* PEM certificate table (X.509 / CSR / Key) */
.cert-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: oklch(0.1 0.02 265 / 0.5);
  margin: 4px 0 0;
  font-size: 0.86rem;
}
.cert-table th, .cert-table td { padding: 10px 16px; vertical-align: top; }
.cert-table thead th {
  background: oklch(0.14 0.02 265);
  border-bottom: 1px solid var(--border);
}
.cert-th-empty { width: 1%; }
.cert-th {
  text-align: left;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-3);
  font-weight: 500;
}
.cert-band-row > td {
  background: linear-gradient(135deg, oklch(0.7 0.18 265 / 0.18), oklch(0.7 0.18 295 / 0.12));
  color: var(--accent);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 9px 16px;
}
.cert-band-sub {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  opacity: 0.75;
  font-weight: 500;
}
.cert-table tbody tr:not(.cert-band-row) + tr:not(.cert-band-row) > td {
  border-top: 1px solid oklch(1 0 0 / 0.04);
}
.cert-field { color: var(--text-2); width: 28%; min-width: 170px; }
.cert-code-cell { width: 1%; white-space: nowrap; }
.cert-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: oklch(0.18 0.02 265);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1px 8px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text);
  min-width: 30px;
}
.cert-val { color: var(--text); word-break: break-word; }
.cert-val.break { word-break: break-all; }
.cert-val.mono { font-family: var(--font-mono); }
.cert-val.small { font-size: 0.78rem; }

/* Yes/No toggles for purposes column */
.yn-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  padding: 2px 8px;
  margin-right: 6px;
  border-radius: 5px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  border: 1px solid transparent;
}
.yn-pill.y {
  background: oklch(0.78 0.16 155 / 0.18);
  border-color: oklch(0.78 0.16 155 / 0.4);
  color: var(--accent-green);
}
.yn-pill.n {
  background: oklch(1 0 0 / 0.04);
  border-color: oklch(1 0 0 / 0.08);
  color: var(--text-3);
}
@media (max-width: 720px) {
  .cert-table { font-size: 0.8rem; }
  .cert-table th, .cert-table td { padding: 8px 12px; }
  .cert-field { width: auto; min-width: 0; }
}

/* PEM raw data <details> */
.pem-raw {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: oklch(0.1 0.02 265 / 0.5);
  overflow: hidden;
}
.pem-raw[open] summary { border-bottom: 1px solid var(--border); }
.pem-raw summary {
  padding: 10px 14px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.pem-raw summary::-webkit-details-marker { display: none; }
.pem-raw summary::before { content: "▸ "; color: var(--text-3); }
.pem-raw[open] summary::before { content: "▾ "; }
.pem-raw-pre { margin: 0; border: 0; border-radius: 0; }

/* ==========================================================================
   CSP Builder (tools/csp)
   ========================================================================== */

/* Import panel */
.csp-import { padding: 22px 24px; }
.csp-import-tabs {
  display: inline-flex;
  background: oklch(0.1 0.02 265 / 0.7);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 3px;
  gap: 2px;
  margin-bottom: 14px;
}
.csp-imp-tab {
  background: transparent;
  border: 0;
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s;
}
.csp-imp-tab:hover { color: var(--text); }
.csp-imp-tab.is-active {
  background: linear-gradient(135deg, oklch(0.7 0.18 265 / 0.25), oklch(0.7 0.18 295 / 0.25));
  color: var(--text);
}
.csp-imp-pane.is-hidden { display: none; }
.csp-imp-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.csp-imp-input,
.csp-imp-textarea {
  flex: 1;
  min-width: 240px;
  background: oklch(0.08 0.02 265 / 0.7);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 9px 14px;
  border-radius: 8px;
  font-size: 0.86rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.csp-imp-textarea {
  width: 100%;
  min-height: 100px;
  resize: vertical;
  line-height: 1.55;
}
.csp-imp-input:focus,
.csp-imp-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px oklch(0.7 0.18 265 / 0.18);
}
.csp-imp-result {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 10px;
  background: oklch(0.1 0.02 265 / 0.5);
  border: 1px solid var(--border);
  font-size: 0.86rem;
}
.csp-imp-result.is-error {
  background: oklch(0.7 0.2 25 / 0.1);
  border-color: oklch(0.7 0.2 25 / 0.4);
  color: oklch(0.85 0.18 25);
}
.csp-imp-result.is-ok {
  background: oklch(0.78 0.16 155 / 0.1);
  border-color: oklch(0.78 0.16 155 / 0.4);
  color: var(--accent-green);
}
.csp-imp-choices {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.csp-imp-choice {
  background: oklch(0.14 0.02 265 / 0.7);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding: 6px 12px;
  border-radius: 7px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.15s;
}
.csp-imp-choice:hover {
  border-color: oklch(0.7 0.18 280 / 0.5);
  background: linear-gradient(135deg, oklch(0.7 0.18 265 / 0.15), oklch(0.7 0.18 295 / 0.15));
}
.csp-imp-choice .pill { margin: 0; }
.csp-imp-meta {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-3);
  margin-top: 6px;
}

/* Output panel (sticky) */
.csp-output {
  position: sticky;
  top: 12px;
  z-index: 10;
  border: 1px solid oklch(0.7 0.18 280 / 0.45);
  border-radius: 14px;
  background: oklch(0.12 0.02 265 / 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 12px 40px -16px oklch(0.7 0.18 280 / 0.5);
  padding: 14px 16px;
  margin: 18px 0 28px;
}
.csp-output-toolbar {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.csp-mode-tabs {
  display: inline-flex;
  background: oklch(0.1 0.02 265 / 0.7);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 3px;
  gap: 2px;
}
.csp-mode {
  background: transparent;
  border: 0;
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
}
.csp-mode:hover { color: var(--text); }
.csp-mode.is-active {
  background: linear-gradient(135deg, oklch(0.7 0.18 265 / 0.25), oklch(0.7 0.18 295 / 0.25));
  color: var(--text);
}
.csp-ro {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-2);
  cursor: pointer;
  user-select: none;
}
.csp-ro input { accent-color: var(--accent); }
.csp-output-actions {
  display: inline-flex;
  gap: 8px;
  margin-left: auto;
}
.btn-sm { padding: 5px 12px; font-size: 0.78rem; }
.csp-out {
  background: oklch(0.08 0.02 265 / 0.85);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text);
  line-height: 1.6;
  margin: 0;
  white-space: pre-wrap;
  word-break: break-all;
}
.csp-out .muted { color: var(--text-3); }
.csp-output-note { margin: 10px 0 0; }
.csp-output-note code { font-size: 0.78em; }

/* Builder form */
.csp-builder { padding-top: 22px; }
.csp-group { margin-bottom: 28px; }
.csp-group:last-child { margin-bottom: 0; }
.csp-group-head { margin: 4px 0 12px; }

.csp-dir {
  padding: 12px 14px;
  border-radius: 10px;
  background: oklch(0.1 0.02 265 / 0.4);
  border: 1px solid var(--border);
  margin-bottom: 8px;
  transition: border-color 0.15s, background 0.15s;
}
.csp-dir.has-values {
  border-color: oklch(0.7 0.18 265 / 0.45);
  background: linear-gradient(135deg, oklch(0.7 0.18 265 / 0.05), oklch(0.7 0.18 295 / 0.05));
}
.csp-dir-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.csp-dir-name {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text);
  background: oklch(0.18 0.02 265);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: 5px;
}
.csp-dir.has-values .csp-dir-name {
  background: linear-gradient(135deg, oklch(0.7 0.18 265 / 0.3), oklch(0.7 0.18 295 / 0.3));
  border-color: oklch(0.7 0.18 280 / 0.4);
  color: var(--text);
}
.csp-dir-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.csp-dir-toggle input { accent-color: var(--accent); }
.csp-dir-body {
  margin-top: 10px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.csp-keywords {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}
.csp-kw {
  background: oklch(0.14 0.02 265 / 0.7);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  padding: 3px 9px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.12s;
  user-select: none;
}
.csp-kw:hover { border-color: oklch(0.7 0.18 280 / 0.5); color: var(--text); }
.csp-kw.is-active {
  background: linear-gradient(135deg, oklch(0.7 0.18 265 / 0.3), oklch(0.7 0.18 295 / 0.3));
  border-color: oklch(0.7 0.18 280 / 0.55);
  color: var(--text);
}
.csp-custom {
  flex: 1;
  min-width: 220px;
  background: oklch(0.08 0.02 265 / 0.7);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.78rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.csp-custom:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px oklch(0.7 0.18 265 / 0.15);
}
@media (max-width: 720px) {
  .csp-output { position: static; }
  .csp-output-actions { margin-left: 0; }
  .csp-dir-head { gap: 6px; }
  .csp-custom { min-width: 0; width: 100%; }
}

/* Raw text block (whois, xml content, raw headers) */
.raw-block {
  background: oklch(0.08 0.02 265 / 0.85);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-2);
  line-height: 1.65;
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 320px;
  overflow: auto;
}

/* Header row for collapsible raw blocks */
.raw-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-3);
  padding: 6px 0;
  flex-wrap: wrap;
}
