/* NorrisAI AlphaLens — Tools / Calculators
   Shared stylesheet. Matches site brand: black + gold, IBM Plex Mono + Inter. */

:root {
  --bg: #0a0e14;
  --bg-card: #11161f;
  --bg-card-2: #1c1c1c;
  --border: #232a38;
  --gold: #c9a84c;
  --gold-dim: #a8873a;
  --text: #e7e6e1;
  --text-dim: #9aa2b1;
  --text-faint: #6f6f6a;
  --red: #d16a5c;
  --green: #6fae7f;
  --font-mono: 'IBM Plex Mono', ui-monospace, Menlo, Consolas, monospace;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --radius: 10px;
  --max-w: 880px;
}

* { box-sizing: border-box; }

body.tools-page {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  margin: 0;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.tools-wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px 64px;
}

/* ---------- Nav ---------- */
.site-nav {
  border-bottom: 1px solid var(--border);
  padding: 18px 20px;
}
.site-nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.brand {
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  font-size: 15px;
}
.brand .dot { color: var(--gold); }
.nav-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 14px;
}
.nav-links a {
  color: var(--text-dim);
  text-decoration: none;
}
.nav-links a:hover, .nav-links a.active { color: var(--gold); }
.nav-cta {
  background: var(--gold);
  color: #0a0a0a !important;
  padding: 8px 14px;
  border-radius: 6px;
  font-weight: 600;
}

/* ---------- Header block ---------- */
.tool-header { padding-top: 40px; }
.eyebrow {
  font-family: var(--font-mono);
  color: var(--gold);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
h1.tool-h1 {
  font-size: clamp(28px, 4vw, 38px);
  margin: 0 0 14px;
  line-height: 1.15;
}
.tool-dek {
  color: var(--text-dim);
  font-size: 16px;
  max-width: 640px;
  margin: 0 0 32px;
}

/* ---------- Calculator card ---------- */
.calc-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 28px;
}
.calc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 560px) {
  .calc-grid { grid-template-columns: 1fr; }
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field label {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
}
.field input, .field select {
  background: #0d0d0d;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 11px 12px;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 15px;
  width: 100%;
}
.field input:focus, .field select:focus {
  outline: none;
  border-color: var(--gold);
}
.field-error { color: var(--red); font-size: 12px; min-height: 16px; }

/* ---------- Results ---------- */
.results {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 18px;
}
.result-item .result-label {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-faint);
  margin-bottom: 4px;
}
.result-item .result-value {
  font-family: var(--font-mono);
  font-size: clamp(22px, 4vw, 30px);
  font-weight: 600;
  color: var(--text);
}
.result-value.positive { color: var(--green); }
.result-value.negative { color: var(--red); }
.result-note {
  grid-column: 1 / -1;
  font-size: 14px;
  color: var(--text-dim);
  margin-top: 4px;
}

.calc-actions {
  margin-top: 18px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.btn {
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 9px 14px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn:hover { border-color: var(--gold); color: var(--gold); }
.btn-gold {
  background: var(--gold);
  border-color: var(--gold);
  color: #0a0a0a;
  font-weight: 600;
}
.btn-gold:hover { background: var(--gold-dim); color: #0a0a0a; }

/* ---------- Prose sections ---------- */
.tool-section { margin: 40px 0; }
.tool-section h2 {
  font-size: 20px;
  margin-bottom: 12px;
}
.tool-section p { color: var(--text-dim); font-size: 15px; }
.formula-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-dim);
  white-space: pre-wrap;
  overflow-x: auto;
}
.related-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.related-links a {
  color: var(--gold);
  text-decoration: none;
  font-size: 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 12px;
}
.related-links a:hover { border-color: var(--gold); }

/* ---------- FAQ ---------- */
.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
}
.faq-item:first-child { padding-top: 0; }
.faq-question {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 8px;
}
.faq-answer {
  font-size: 14px;
  color: var(--text-dim);
  margin: 0;
}

/* ---------- Related tools ---------- */
.related-tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}
.related-tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  text-decoration: none;
  display: block;
}
.related-tool-card:hover { border-color: var(--gold); }
.related-tool-card strong {
  display: block;
  color: var(--gold);
  font-size: 15px;
  margin-bottom: 4px;
}
.related-tool-card span {
  display: block;
  color: var(--text-dim);
  font-size: 13px;
}
.all-tools-link {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 14px;
  font-family: var(--font-mono);
}
.all-tools-link:hover { color: var(--gold); }

/* ---------- CTA ---------- */
.cta-band {
  background: var(--bg-card);
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  margin: 40px 0;
}
.cta-band p { color: var(--text-dim); margin: 0 0 16px; }

/* ---------- Data table ---------- */
.tool-table-wrap { overflow-x: auto; }
table.tool-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  font-family: var(--font-mono);
}
table.tool-table th, table.tool-table td {
  padding: 9px 12px;
  text-align: right;
  border-bottom: 1px solid var(--border);
}
table.tool-table th:first-child, table.tool-table td:first-child { text-align: left; }
table.tool-table th {
  color: var(--text-faint);
  font-weight: 500;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.05em;
}

/* ---------- Checklist (earnings quality) ---------- */
.checklist-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 10px;
}
.checklist-item .cl-q { font-size: 14px; margin-bottom: 10px; }
.cl-options { display: flex; gap: 8px; flex-wrap: wrap; }
.cl-options button {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 7px 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
}
.cl-options button.selected { border-color: var(--gold); color: var(--gold); }
.score-band {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-dim);
}
.score-band.high { color: var(--green); }
.score-band.weak { color: var(--red); }

/* ---------- Embed box ---------- */
.embed-box textarea {
  width: 100%;
  min-height: 90px;
  background: #0d0d0d;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 12px;
}

/* ---------- Disclaimer ---------- */
.disclaimer-box {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  color: var(--text-faint);
  font-size: 12.5px;
  line-height: 1.6;
  margin: 40px 0;
}
.disclaimer-box strong { color: var(--text-dim); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 20px;
  color: var(--text-faint);
  font-size: 13px;
}
.site-footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.site-footer a { color: var(--text-faint); text-decoration: none; }
.site-footer a:hover { color: var(--gold); }

/* ---------- Hub grid ---------- */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin: 28px 0 40px;
}
.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-decoration: none;
  color: var(--text);
  display: block;
}
.tool-card:hover { border-color: var(--gold); }
.tool-card h3 {
  margin: 0 0 8px;
  font-size: 17px;
}
.tool-card p {
  margin: 0;
  color: var(--text-dim);
  font-size: 14px;
}

/* ---------- Embed mode (hide chrome) ---------- */
body.embed-mode .site-nav,
body.embed-mode .site-footer,
body.embed-mode .long-content,
body.embed-mode .tool-header .tool-dek,
body.embed-mode .eyebrow {
  display: none !important;
}
body.embed-mode .tools-wrap { padding: 16px; max-width: 100%; }
body.embed-mode .tool-header { padding-top: 0; }
body.embed-mode h1.tool-h1 { font-size: 20px; margin-bottom: 16px; }
body.embed-mode .disclaimer-box { font-size: 11px; padding: 10px 14px; margin: 16px 0 0; }
.embed-credit {
  display: none;
  font-family: var(--font-mono);
  font-size: 12px;
  margin-top: 14px;
}
.embed-credit a { color: var(--gold); text-decoration: none; }
body.embed-mode .embed-credit { display: block; }

h1, h2 { color: #fff; }
