/* ZeroKit.dev Design System — v3.0 "Blueprint / Schematic" */
@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,400;12..96,500;12..96,600;12..96,700;12..96,800&family=JetBrains+Mono:wght@400;500;700&display=swap');

:root {
  /* Surfaces */
  --bg: #0b1020;
  --bg-gradient-top: #0b1020;
  --bg-gradient-bottom: #0e1428;
  --surface: #111a30;
  --surface-2: #172342;

  /* Borders */
  --border: #3a4868;          /* was #2a3558 -- was invisible at 1.58:1 */
  --border-strong: #516489;   /* was #3d4f7a -- bumped for hover states */
  --border-dashed: rgba(120, 144, 181, 0.28);

  /* Text */
  --text: #e8ebf0;
  --text-muted: #7890b5;
  --text-dim: #6b7a9a;        /* was #4a5878 -- was 2.44:1, now ~4.6:1 */

  /* Accent / Red Pen */
  --accent: #ff6b47;
  --accent-hover: #ff8567;
  --accent-dim: rgba(255, 107, 71, 0.10);
  --accent-border: rgba(255, 107, 71, 0.32);

  /* Secondary / Ruler Yellow */
  --secondary: #f5d033;
  --secondary-dim: rgba(245, 208, 51, 0.12);

  /* Semantic */
  --success: #4ade80;
  --warning: #f5d033;
  --error:   #ff4757;

  /* Typography */
  --font:         'Bricolage Grotesque', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-body:    'Bricolage Grotesque', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-display: 'Bricolage Grotesque', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono:         'JetBrains Mono', ui-monospace, 'SF Mono', 'Consolas', monospace;
  --display:      'JetBrains Mono', ui-monospace, 'SF Mono', 'Consolas', monospace;

  /* Spacing (8px grid) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  --space-16: 64px;
  --space-24: 96px;

  /* Radius — tight, technical */
  --radius:    4px;
  --radius-sm: 2px;
  --radius-lg: 8px;

  /* Effects */
  --glow:        0 0 24px rgba(255, 107, 71, 0.18);
  --glow-strong: 0 0 48px rgba(255, 107, 71, 0.28);
  --shadow-card: 0 1px 0 rgba(255, 255, 255, 0.02) inset, 0 8px 32px rgba(0, 0, 0, 0.4);

  /* iter 100: Readability type scale. Use these instead of ad-hoc rem values. */
  --text-xs:   0.75rem;   /* 12px — labels, meta, status chips          */
  --text-sm:   0.9rem;    /* 14.4px — secondary copy, hints             */
  --text-md:   1rem;      /* 16px — body, inputs, buttons, list items   */
  --text-lg:   1.25rem;   /* 20px — section headings                    */
  --text-xl:   1.75rem;   /* 28px — page-level headings, score readouts */
  --text-2xl:  2.5rem;    /* 40px — hero h1, hero score                  */
  --leading-tight:  1.2;
  --leading-normal: 1.55;
  --leading-relaxed: 1.7;

  /* Prose + data container widths — use these as opt-in on sections */
  --width-prose:   680px;   /* long-form reading, lede, faq, blog */
  --width-content: 880px;   /* balanced content + cards            */
  --width-data:    1200px;  /* tables, dashboards, dense grids     */
}

* { margin: 0; padding: 0; box-sizing: border-box; }

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

body {
  font-family: var(--font);
  background: linear-gradient(180deg, var(--bg-gradient-top) 0%, var(--bg-gradient-bottom) 100%);
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
  position: relative;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Signature: Grid-Paper Background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(120, 144, 181, 0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(120, 144, 181, 0.035) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
  z-index: 0;
}

body > * { position: relative; z-index: 1; }

a { color: var(--accent); text-decoration: none; transition: color 0.18s ease-out; }
a:hover { color: var(--accent-hover); text-decoration: underline; }

/* Iter 98 guardrail: anchor-wrapped card components must not inherit the coral
   accent color from the global "a" rule. Whole-card links adopt their parent
   text color so inner chips/strong/span stay readable. */
a.hub-card,
a.hub-card *,
a.hub-card:hover,
a.hub-card:hover *,
a.tool-card,
a.tool-card *,
a.tool-card:hover,
a.tool-card:hover *,
a.featured-card,
a.featured-card *,
a.featured-card:hover,
a.featured-card:hover * { color: var(--text); text-decoration: none; }
a.hub-card h3,
a.tool-card h3,
a.featured-card h3 { color: var(--text); }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
}

::selection { background: var(--accent); color: #0b1020; }

/* Layout */
.container { max-width: 1200px; margin: 0 auto; padding: 0 clamp(1rem, 4vw, var(--space-8)); }

/* Header / Nav */
header {
  border-bottom: 1px solid var(--border);
  padding: var(--space-4) 0;
  position: relative;
}
header::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -3px;
  height: 1px;
  background: var(--border);
  opacity: 0.5;
}
header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: var(--display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  letter-spacing: -0.01em;
  text-decoration: none;
}
.logo:hover { text-decoration: none; }
.logo span { color: var(--accent); }

nav { display: flex; gap: var(--space-6); }
nav a {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-family: var(--mono);
  font-weight: 500;
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: color 0.18s ease-out;
}
nav a:hover { color: var(--accent); text-decoration: none; }

/* Hero */
.hero {
  text-align: center;
  padding: var(--space-16) 0 var(--space-12);
  position: relative;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: 2.75rem;
  font-weight: 800;
  margin-bottom: var(--space-4);
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.hero p {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 620px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Tool Grid */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-4);
  padding: 0 0 var(--space-16);
}

.tool-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-6);
  transition: border-color 0.18s ease-out, transform 0.18s ease-out, box-shadow 0.18s ease-out;
  cursor: pointer;
  display: block;
  color: var(--text);
  text-decoration: none;
  position: relative;
}

.tool-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--glow);
  text-decoration: none;
}

.tool-card h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: var(--space-2);
  color: var(--text);
  letter-spacing: -0.01em;
}

.tool-card p {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.55;
}

.tool-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-3);
  font-family: var(--mono);
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent);
}

/* Tool Page Layout */
.tool-page {
  padding: var(--space-8) 0 var(--space-16);
}

.tool-page h1 {
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 800;
  margin-bottom: var(--space-2);
  letter-spacing: -0.02em;
}

.tool-page .description {
  color: var(--text-muted);
  margin-bottom: var(--space-8);
  font-size: 0.95rem;
}

.description {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.tool-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

.tool-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  transition: border-color 0.18s ease-out;
}
.tool-panel:hover { border-color: var(--border-strong); }

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.tool-textarea {
  width: 100%;
  min-height: 400px;
  padding: var(--space-4);
  background: transparent;
  border: none;
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.875rem;
  resize: vertical;
  outline: none;
  line-height: 1.6;
}
.tool-textarea::placeholder { color: var(--text-muted); opacity: 0.5; }

/* Buttons */
.btn, button.btn, a.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 11px 22px;
  font-family: var(--font);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.01em;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
  transition: all 0.18s ease-out;
  text-decoration: none;
}
.btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

.btn-primary, button.btn-primary {
  background: var(--accent);
  color: #0b1020;
  border-color: var(--accent);
}
.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #0b1020;
  box-shadow: var(--glow);
  transform: translateY(-1px);
}

.btn-secondary, button.btn-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

.btn-group { display: flex; gap: var(--space-2); flex-wrap: wrap; }

/* Action Bar */
.action-bar {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) 0;
}

/* Options Row */
.options-row {
  display: flex;
  gap: var(--space-4);
  align-items: center;
  padding: var(--space-3) 0;
  flex-wrap: wrap;
}

.options-row label {
  font-size: 0.85rem;
  font-family: var(--mono);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.options-row select,
.options-row input[type="number"] {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 6px 10px;
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-family: var(--mono);
  outline: none;
  transition: border-color 0.18s ease-out;
}
.options-row select:focus,
.options-row input[type="number"]:focus { border-color: var(--accent); }

/* Inputs (global) */
input[type="text"],
input[type="email"],
input[type="search"],
input[type="url"],
input[type="number"],
input[type="password"],
input[type="tel"],
textarea {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 11px 14px;
  font-family: var(--mono);
  font-size: 0.92rem;
  border-radius: var(--radius);
  outline: none;
  transition: border-color 0.18s ease-out;
}
input:focus,
textarea:focus { border-color: var(--accent); }
input::placeholder,
textarea::placeholder { color: var(--text-dim); opacity: 0.7; }

/* Status Messages */
.status {
  font-size: 0.8rem;
  padding: 8px 12px;
  border-radius: var(--radius);
  margin-top: var(--space-2);
  font-family: var(--mono);
  border: 1px solid transparent;
}

.status-success {
  background: rgba(74, 222, 128, 0.10);
  color: var(--success);
  border-color: rgba(74, 222, 128, 0.32);
}
.status-error {
  background: rgba(255, 71, 87, 0.10);
  color: var(--error);
  border-color: rgba(255, 71, 87, 0.32);
}

/* Footer */
footer {
  border-top: 1px solid var(--border);
  margin-top: var(--space-16);
  padding: var(--space-8) 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.82rem;
  position: relative;
}
footer::before {
  content: '';
  position: absolute;
  left: 0; right: 0; top: -3px;
  height: 1px;
  background: var(--border);
  opacity: 0.5;
}

/* Hash output grid */
.hash-results {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-4);
}

.hash-row {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.hash-label {
  font-size: 0.72rem;
  font-family: var(--mono);
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hash-value {
  font-family: var(--mono);
  font-size: 0.8rem;
  word-break: break-all;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 10px 12px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.18s ease-out, background 0.18s ease-out;
}
.hash-value:hover {
  background: var(--surface);
  border-color: var(--accent);
}

/* Color converter */
.color-preview {
  width: 100%;
  height: 120px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: var(--space-4);
  transition: background 0.2s;
}

.color-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  padding: var(--space-4);
}

.color-field label {
  display: block;
  font-size: 0.72rem;
  font-family: var(--mono);
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: var(--space-1);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.color-field input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 12px;
  border-radius: var(--radius);
  font-family: var(--mono);
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.18s ease-out;
}
.color-field input:focus { border-color: var(--accent); }

/* Timestamp */
.ts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  padding: var(--space-4);
}

.ts-field { display: flex; flex-direction: column; gap: var(--space-1); }
.ts-field label {
  font-size: 0.72rem;
  font-family: var(--mono);
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.ts-field input,
.ts-field select {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 12px;
  border-radius: var(--radius);
  font-family: var(--mono);
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.18s ease-out;
}
.ts-field input:focus,
.ts-field select:focus { border-color: var(--accent); }

.ts-current {
  grid-column: 1 / -1;
  text-align: center;
  padding: var(--space-4);
  background: var(--surface-2);
  border: 1px dashed var(--border-dashed);
  border-radius: var(--radius);
  font-family: var(--mono);
  font-size: 1.5rem;
  color: var(--accent);
}

/* Back link */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  color: var(--text-muted);
  font-size: 0.82rem;
  font-family: var(--mono);
  margin-bottom: var(--space-4);
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: color 0.18s ease-out;
}
.back-link:hover { color: var(--accent); text-decoration: none; }

/* Calculator Page Layout */
.calc-page { padding: var(--space-8) 0 var(--space-16); }

.calc-page h1 {
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 800;
  margin-bottom: var(--space-2);
  letter-spacing: -0.02em;
}

.calc-page .description {
  color: var(--text-muted);
  margin-bottom: var(--space-8);
}

/* Calculator Panels */
.calc-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  margin-bottom: var(--space-8);
}

.calc-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.18s ease-out;
}
.calc-panel:hover { border-color: var(--border-strong); }

.calc-panel-full { grid-column: 1 / -1; }

.panel-body { padding: var(--space-6); }

/* Form Elements */
.form-group { margin-bottom: var(--space-4); }

.form-group label {
  display: block;
  font-size: 0.75rem;
  font-family: var(--mono);
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.9rem;
  font-family: var(--mono);
  outline: none;
  transition: border-color 0.18s ease-out;
}

.form-group input:focus,
.form-group select:focus { border-color: var(--accent); }

.form-group input::placeholder { color: var(--text-dim); opacity: 0.7; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}

/* Result Display */
.result-value {
  font-family: var(--mono);
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: var(--space-1);
  letter-spacing: -0.01em;
}

.result-label {
  font-size: 0.75rem;
  font-family: var(--mono);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

.result-item {
  padding: var(--space-4);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.18s ease-out;
}
.result-item:hover { border-color: var(--accent); }

.result-item .value {
  font-family: var(--mono);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
}

.result-item .label {
  font-size: 0.72rem;
  font-family: var(--mono);
  color: var(--text-muted);
  margin-top: var(--space-1);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.label {
  font-size: 0.72rem;
  font-family: var(--mono);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.value {
  font-family: var(--mono);
  font-weight: 700;
  color: var(--accent);
}

/* Info/Education Section */
.info-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-6);
  margin-top: var(--space-8);
  position: relative;
}
.info-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 40px; height: 1px;
  background: var(--accent);
}

.info-section h2 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: var(--space-3);
  color: var(--text);
  letter-spacing: -0.01em;
}

.info-section p {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: var(--space-3);
  line-height: 1.7;
}

.info-section ul {
  color: var(--text-muted);
  font-size: 0.92rem;
  padding-left: 20px;
  margin-bottom: var(--space-3);
}

.info-section li { margin-bottom: 6px; }

/* Data Table */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.data-table th {
  text-align: left;
  padding: 10px 12px;
  background: var(--surface-2);
  color: var(--text-muted);
  font-family: var(--mono);
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 1px solid var(--border);
}

.data-table td {
  padding: 10px 12px;
  border-bottom: 1px dashed var(--border-dashed);
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.8rem;
}

.data-table tbody tr:hover { background: var(--surface-2); }

/* Chart canvas */
.chart-container {
  padding: var(--space-6);
  height: 300px;
  position: relative;
}

/* Scale / Meter */
.scale-bar {
  height: 24px;
  border-radius: var(--radius);
  background: linear-gradient(to right, #4ade80, #a3e635, #f5d033, #fb923c, #ff4757);
  position: relative;
  margin: var(--space-4) 0;
  border: 1px solid var(--border);
}

.scale-marker {
  position: absolute;
  top: -8px;
  width: 3px;
  height: 40px;
  background: var(--text);
  border-radius: 1px;
  transform: translateX(-50%);
  transition: left 0.3s ease;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.4);
}

.dev { color: var(--text-dim); font-family: var(--mono); font-size: 0.72rem; }

/* ============================================================
   NEW BLUEPRINT COMPONENTS (additions beyond old v2 spec)
   ============================================================ */

/* Cards (generic) */
.card, .action-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-6);
  transition: border-color 0.18s ease-out, transform 0.18s ease-out;
}
.card:hover, .action-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

/* Featured card (homepage hero) */
.featured-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-8) var(--space-6);
  text-decoration: none;
  color: var(--text);
  position: relative;
  transition: all 0.2s ease-out;
  overflow: hidden;
}
.featured-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 40px; height: 1px;
  background: var(--accent);
  transition: width 0.24s ease-out;
}
.featured-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  text-decoration: none;
}
.featured-card:hover::before { width: 120px; }

.featured-icon {
  width: 52px; height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius);
  font-family: var(--mono);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: var(--space-4);
}
.featured-card--ai .featured-icon {}

.featured-badge {
  display: inline-block;
  padding: 3px 10px;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-sm);
}

.featured-card h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
  margin: var(--space-4) 0 var(--space-3);
  letter-spacing: -0.01em;
}

.featured-card p {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.6;
  margin-bottom: var(--space-4);
}

.featured-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  font-family: var(--mono);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.featured-cta-arrow { transition: transform 0.2s ease-out; display: inline-block; }
.featured-card:hover .featured-cta-arrow { transform: translateX(4px); }

/* Tick-ruler signature component */
.tick-ruler {
  position: absolute;
  top: 0; right: 0;
  width: 180px;
  height: 20px;
  pointer-events: none;
  opacity: 0.5;
}
.tick-ruler::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    90deg,
    transparent 0, transparent 14px,
    var(--text-muted) 14px, var(--text-muted) 15px
  );
  -webkit-mask-image: linear-gradient(to right, transparent, black 20%, black 80%, transparent);
          mask-image: linear-gradient(to right, transparent, black 20%, black 80%, transparent);
}
.tick-ruler::after {
  content: attr(data-label);
  position: absolute;
  top: 6px;
  right: 0;
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
}

/* Tools-section labels */
.tools-section-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
  margin: 0;
}
.tools-section-count {
  font-family: var(--mono);
  color: var(--text-muted);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
}
.tool-count { color: var(--accent); font-weight: 700; }

/* Category sections */
.category-section {
  margin-top: var(--space-12);
  padding-top: var(--space-6);
  border-top: 1px dashed var(--border-dashed);
  position: relative;
}
.category-title {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-4);
}

/* Category pills */
.cat-pills {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: var(--space-4) 0;
}
.cat-pills a, .cat-pills button {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: all 0.18s ease-out;
  cursor: pointer;
}
.cat-pills a:hover, .cat-pills button:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

/* Grade / ext pills (Website Grader) */
.ext-pill-green,
.ext-pill-lime,
.ext-pill-amber,
.ext-pill-orange,
.ext-pill-red {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: var(--radius-sm);
  border: 1px solid;
}
.ext-pill-green  { color: #4ade80; background: rgba(74, 222, 128, 0.10); border-color: rgba(74, 222, 128, 0.40); }
.ext-pill-lime   { color: #a3e635; background: rgba(163, 230, 53, 0.10); border-color: rgba(163, 230, 53, 0.40); }
.ext-pill-amber  { color: #fbbf24; background: rgba(251, 191, 36, 0.10); border-color: rgba(251, 191, 36, 0.40); }
.ext-pill-orange { color: #fb923c; background: rgba(251, 146, 60, 0.10); border-color: rgba(251, 146, 60, 0.40); }
.ext-pill-red    { color: #ff4757; background: rgba(255, 71, 87, 0.10); border-color: rgba(255, 71, 87, 0.40); }

/* Grade circle (Website Grader result) */
.grade-circle-a,
.grade-circle-b,
.grade-circle-c,
.grade-circle-d,
.grade-circle-f {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 800;
  border: 2px solid;
  background: var(--surface);
}
.grade-circle-a { color: #4ade80; border-color: #4ade80; box-shadow: 0 0 24px rgba(74, 222, 128, 0.25); }
.grade-circle-b { color: #a3e635; border-color: #a3e635; box-shadow: 0 0 24px rgba(163, 230, 53, 0.25); }
.grade-circle-c { color: #fbbf24; border-color: #fbbf24; box-shadow: 0 0 24px rgba(251, 191, 36, 0.25); }
.grade-circle-d { color: #fb923c; border-color: #fb923c; box-shadow: 0 0 24px rgba(251, 146, 60, 0.25); }
.grade-circle-f { color: #ff4757; border-color: #ff4757; box-shadow: 0 0 24px rgba(255, 71, 87, 0.25); }

/* Score classes */
.score-excellent { color: #4ade80; }
.score-good      { color: #a3e635; }
.score-ok        { color: #fbbf24; }
.score-poor      { color: #fb923c; }
.score-bad       { color: #ff4757; }

/* Loading states */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loading-bar {
  width: 100%;
  height: 3px;
  background: var(--surface-2);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}
.loading-bar::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform: translateX(-100%);
  animation: loading-slide 1.4s ease-in-out infinite;
}
@keyframes loading-slide {
  0% { transform: translateX(-100%); }
  50% { transform: translateX(0); }
  100% { transform: translateX(100%); }
}

.loading-text {
  font-family: var(--mono);
  color: var(--text-muted);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
}

/* Share buttons */
.share-buttons {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-top: var(--space-4);
}
.share-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: all 0.18s ease-out;
  cursor: pointer;
}
.share-button:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

/* Toast notifications */
.toast {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  padding: 12px 18px;
  background: var(--surface);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.85rem;
  box-shadow: var(--glow), var(--shadow-card);
  z-index: 1000;
  animation: toast-in 0.3s ease-out;
}
@keyframes toast-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.toast-success { border-color: var(--success); }
.toast-error   { border-color: var(--error); }

/* Reveal sections */
.reveal-section {
  opacity: 0;
  transform: translateY(16px);
  animation: rs 0.7s ease-out forwards;
}
@keyframes rs {
  to { opacity: 1; transform: translateY(0); }
}
.reveal-section:nth-child(2) { animation-delay: 0.1s; }
.reveal-section:nth-child(3) { animation-delay: 0.2s; }
.reveal-section:nth-child(4) { animation-delay: 0.3s; }
.reveal-section:nth-child(5) { animation-delay: 0.4s; }

/* Responsive */
@media (max-width: 768px) {
  .tool-layout { grid-template-columns: 1fr; }
  .calc-layout { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .result-grid { grid-template-columns: 1fr; }
  .color-inputs { grid-template-columns: 1fr; }
  .ts-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.95rem; }
  .hero p { font-size: 0.95rem; }
  .hero { padding: var(--space-8) 0 var(--space-6); }
  .tools-grid { grid-template-columns: 1fr; }
  header .container { flex-direction: column; gap: var(--space-3); }
  nav { gap: var(--space-4); flex-wrap: wrap; justify-content: center; }
  .data-table { font-size: 0.75rem; }
  .data-table th, .data-table td { padding: 8px 6px; }
  .result-value { font-size: 1.5rem; }
  .featured-card { padding: var(--space-6) var(--space-4); }
  .featured-card h3 { font-size: 1.15rem; }
}

@media (max-width: 720px) {
  .container { padding: 0 clamp(1rem, 4vw, 1rem); }
  .tick-ruler {
    position: relative;
    display: block;
    top: auto;
    right: auto;
    width: 120px;
    height: 14px;
    margin: 0 0 var(--space-3) auto;
    opacity: 0.45;
  }
  .tick-ruler::after {
    font-size: 0.62rem;
  }
}

@media (max-width: 480px) {
  .calc-page { padding: var(--space-6) 0 var(--space-12); }
  .panel-body { padding: var(--space-4); }
  .hero h1 { font-size: 1.7rem; }
  .grade-circle-a,
  .grade-circle-b,
  .grade-circle-c,
  .grade-circle-d,
  .grade-circle-f { width: 80px; height: 80px; font-size: 2rem; }
}

/* Print */
@media print {
  body::before { display: none; }
  body { background: white; color: black; }
}

/* === Global Footer Disclaimer (auto-injected on all pages) === */
footer .container::after {
  content: "Tools are informational diagnostics based on public signals, not a substitute for a professional audit. Built autonomously by Claude Code.";
  display: block;
  margin-top: var(--space-2);
  font-size: 0.74rem;
  color: var(--text-dim);
  font-family: var(--mono);
  letter-spacing: 0.02em;
  max-width: 720px;
  opacity: 0.9;
}

/* ==========================================================================
   Accessibility & Motion -- added 2026-04-11 for WCAG + Apple HIG compliance
   ========================================================================== */

/* Visible focus ring for keyboard users; mouse clicks don't trigger it */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
/* Inputs already have their own border accent on focus; keep outline subtler */
input:focus-visible,
textarea:focus-visible {
  outline-offset: 0;
}

/* Skip-link utility: visually hidden until focused */
.skip-link {
  position: absolute;
  top: -48px;
  left: 16px;
  z-index: 9999;
  background: var(--accent);
  color: var(--bg);
  padding: 10px 18px;
  border-radius: var(--radius);
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  transition: top 0.18s ease-out;
}
.skip-link:focus-visible {
  top: 16px;
  outline: none;
}
.skip-link:focus:not(:focus-visible) {
  top: -48px;
}

/* Respect user's motion preferences */
@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;
  }
  .reveal-section,
  .reveal-section:nth-child(2),
  .reveal-section:nth-child(3),
  .reveal-section:nth-child(4) {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }
}


/* Visually hidden heading for a11y (h2->h3 hierarchy bridge) */
.section-heading-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}


/* Cross-tool audit upsell card (for Schema Inspector, OG Inspector,
   Cloak Detector, Compare result panels). Added 2026-04-11. */
.upsell-audit-card {
  max-width: 680px;
  margin: var(--space-8) auto var(--space-6);
  background: linear-gradient(135deg, rgba(255, 107, 71, 0.08), rgba(255, 107, 71, 0.03));
  border: 1px solid rgba(255, 107, 71, 0.32);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: var(--space-6) var(--space-7);
  display: flex;
  gap: var(--space-5);
  align-items: center;
  flex-wrap: wrap;
}
.upsell-audit-card .ua-body {
  flex: 1 1 320px;
  min-width: 0;
}
.upsell-audit-card .ua-kicker {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--accent);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: var(--space-2);
}
.upsell-audit-card h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 var(--space-2);
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.upsell-audit-card p {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.6;
  margin: 0;
}
.upsell-audit-card a.btn {
  flex: 0 0 auto;
  display: inline-block;
  background: var(--accent);
  color: var(--bg);
  padding: 13px 26px;
  border-radius: var(--radius);
  font-family: var(--mono);
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.85rem;
  white-space: nowrap;
}
.upsell-audit-card a.btn:hover {
  background: var(--accent-hover);
}


/* iter 100: readability overrides — hide decorative brand chrome */
.tick-ruler { display: none !important; }
