/**
 * EEP tools.css — canonical /tools/* shared stylesheet (v1.15.0).
 *
 * Every /tools/*.html page links this file. It provides the canonical
 * brand surface (header / hero / breadcrumb / cards / forms / results /
 * footer) so each tool's inline <style> can stay minimal — only its
 * unique form layout, not the whole page chrome.
 *
 * Brand alignment: matches /dashboard.html (which uses app.css + eep-shell.css)
 *   • Same colors: --blue-700, --text-950, --line, etc.
 *   • Same typography: Inter 14px / 1.45 / -0.01em
 *   • Same nav/footer markup: <header class="pub-header"><div class="container pub-nav">
 *
 * Legacy: the old "unified" palette (--bg, --surface, --accent, etc.) is
 * remapped to brand values for files still using those vars (in case a
 * page hasn't been fully migrated yet).
 */

/* ── 1. CSS variables — brand single source of truth ───────────────── */
:root {
  /* Brand vars (canonical) */
  --blue-700:   #0b5ed7;
  --blue-650:   #1268e8;
  --blue-600:   #176ff2;
  --blue-500:   #2d86ff;
  --blue-75:    #f2f7ff;
  --navy-950:   #061836;
  --text-950:   #0c1f3f;
  --text-850:   #162b52;
  --text-700:   #3d4c66;
  --text-600:   #526176;
  --text-500:   #718097;
  --line:       #dfe7f2;
  --line-soft:  #edf2f8;
  --green:      #17a56b;
  --orange:     #d97706;
  --red:        #dc2626;
  --shadow-soft: 0 10px 28px rgba(15,38,77,.07);
  --shadow-blue: 0 14px 28px rgba(18,104,232,.22);
  --container:  1200px;

  /* Legacy "unified" var aliases — remapped to brand */
  --bg:         #f7f9fc;
  --page-bg:    #f7f9fc;
  --surface:    #ffffff;
  --surface2:   #f2f7ff;
  --white:      #ffffff;
  --border:     #dfe7f2;
  --text:       #0c1f3f;
  --muted:      #526176;
  --accent:     #0b5ed7;
  --accent2:    #0b5ed7;
  --yellow:     #d97706;
  --radius:     10px;
  --font:       "Inter", "Segoe UI", Roboto, Arial, sans-serif;
}

/* ── 2. Base body — single rule everywhere ──────────────────────────── */
body {
  margin: 0;
  font-family: "Inter", "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  letter-spacing: -0.01em;
  background: #f7f9fc;
  color: #0c1f3f;
  -webkit-font-smoothing: antialiased;
}
*, *::before, *::after { box-sizing: border-box; }
a { color: inherit; text-decoration: none; }
.container { width: min(100% - 40px, 1200px); margin: 0 auto; }

/* ── 3. Header — canonical brand nav (pub-header + pub-nav) ──────────── */
.pub-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 60px;
  background: rgba(255,255,255,.95);
  border-bottom: 1px solid #edf2f8;
  backdrop-filter: blur(18px);
}
.pub-header .pub-nav,
header.pub-header > .container.pub-nav {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.pub-brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.pub-brand-logo {
  color: #0b5ed7; font-size: 26px; font-weight: 900; letter-spacing: -.09em; line-height: 1;
}
.pub-brand-div { width: 1px; height: 24px; background: #b8c9e5; }
.pub-brand-sub { color: #0b5ed7; font-size: 9px; line-height: 1.15; font-weight: 700; }
.pub-nav-right { display: flex; align-items: center; gap: 14px; }
.pub-login {
  color: #3d4c66; font-size: 12.5px; font-weight: 600;
  text-decoration: none; transition: color 160ms;
}
.pub-login:hover { color: #0b5ed7; }
.pub-btn-try {
  display: inline-flex; align-items: center; height: 34px; padding: 0 14px;
  border-radius: 7px; background: linear-gradient(135deg, #0b5ed7, #2d86ff);
  color: #fff !important; font-size: 12.5px; font-weight: 700;
  box-shadow: 0 6px 16px rgba(18,104,232,.25);
  text-decoration: none; transition: transform 140ms;
}
.pub-btn-try:hover { transform: translateY(-1px); }

/* Old-style nav.pub-nav (some legacy files still ship the bare nav) */
nav.pub-nav {
  background: rgba(255,255,255,.95) !important;
  border-bottom: 1px solid #edf2f8 !important;
  box-shadow: 0 1px 3px rgba(15,38,77,.05) !important;
  height: 60px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 0 24px !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 100 !important;
  backdrop-filter: blur(18px);
}
nav.pub-nav .logo { color: #0b5ed7 !important; font-weight: 900 !important; font-size: 22px !important; letter-spacing: -.09em !important; }
nav.pub-nav .logo span { color: #0b5ed7 !important; }
nav.pub-nav .nav-links { display: flex; gap: 24px; align-items: center; }
nav.pub-nav .nav-links a { color: #3d4c66 !important; font-size: 13px !important; font-weight: 600; }
nav.pub-nav .nav-cta,
nav.pub-nav a.nav-cta {
  background: linear-gradient(135deg, #0b5ed7, #2d86ff) !important;
  color: #fff !important; padding: 0 14px !important; height: 34px !important;
  border-radius: 7px !important; font-size: 12.5px !important; font-weight: 700 !important;
  display: inline-flex !important; align-items: center !important;
  box-shadow: 0 6px 16px rgba(18,104,232,.25) !important;
}

/* ── 4. Tool hero (in-app + public) ──────────────────────────────────── */
.tool-hero,
.hero.tool-hero {
  background: linear-gradient(160deg, #061836, #0a2a5c 55%, #0b3a7a) !important;
  color: #fff !important;
  padding: 52px 0 44px;
  text-align: center;
  border-bottom: 1px solid var(--line);
}
.tool-hero h1,
.hero.tool-hero h1 {
  color: #fff !important;
  font-size: clamp(26px, 4vw, 38px) !important;
  font-weight: 900 !important; letter-spacing: -.04em !important;
  margin: 0 0 12px !important;
}
.tool-hero p,
.hero.tool-hero p {
  color: #9fc3f5 !important;
  font-size: 15px; max-width: 600px; margin: 0 auto 18px; line-height: 1.6;
}
.tool-hero-badge,
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px; height: 24px;
  padding: 0 11px; border-radius: 999px;
  background: rgba(45,134,255,.2); border: 1px solid rgba(45,134,255,.4);
  color: #7bbfff; font-size: 10.5px; font-weight: 700; margin-bottom: 18px;
}
.tool-hero-meta,
.hero-meta {
  display: flex; align-items: center; justify-content: center; gap: 20px;
  flex-wrap: wrap; font-size: 11.5px; color: #7bbfff !important; font-weight: 600;
}
.tool-hero-meta span { color: #7bbfff; }

/* ── 5. Breadcrumb ──────────────────────────────────────────────────── */
.pub-breadcrumb {
  font-size: 11.5px; color: #718097; padding: 10px 0;
  display: flex; align-items: center; gap: 6px;
}
.pub-breadcrumb a { color: #0b5ed7; font-weight: 600; }

/* ── 6. Tool layout grids ────────────────────────────────────────────── */
.tool-layout {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 24px; padding: 30px 0; align-items: start;
}
@media (max-width: 760px) {
  .tool-layout { grid-template-columns: 1fr; }
}
.tool-wrap {
  max-width: 1100px; margin: 0 auto; padding: 32px 24px;
  display: grid; grid-template-columns: 1fr 380px; gap: 24px; align-items: start;
}
@media (max-width: 860px) {
  .tool-wrap { grid-template-columns: 1fr; }
}

/* ── 7. Cards ───────────────────────────────────────────────────────── */
.tool-card,
.card {
  background: #fff;
  border: 1px solid #dfe7f2;
  border-radius: 14px;
  padding: 26px;
  box-shadow: 0 10px 28px rgba(15,38,77,.07);
}
.tool-card h2,
.tool-card h3,
.card-title {
  font-size: 15px; font-weight: 800; color: #0c1f3f;
  margin: 0 0 4px; letter-spacing: -.02em;
}
.tool-card .tool-ref,
.tool-ref {
  font-size: 11px; color: #718097; font-weight: 600; margin-bottom: 18px;
}

/* ── 8. Form fields ─────────────────────────────────────────────────── */
.form-row,
.field { margin-bottom: 13px; }
.form-label,
.field label {
  display: block; font-size: 10.5px; font-weight: 700; color: #3d4c66;
  margin-bottom: 5px; text-transform: uppercase; letter-spacing: .04em;
}
.form-input, .form-select,
.field input, .field select,
input[type="number"], input[type="text"], input[type="email"],
select {
  width: 100%; padding: 8px 11px;
  border: 1px solid #dfe7f2 !important; border-radius: 7px;
  font-family: inherit; font-size: 13px;
  color: #0c1f3f !important; background: #fff !important;
  transition: border-color 160ms;
}
.form-input:focus, .form-select:focus,
.field input:focus, .field select:focus,
input[type="number"]:focus, select:focus {
  outline: none;
  border-color: #0b5ed7 !important;
  box-shadow: 0 0 0 3px rgba(11,94,215,.1) !important;
}
.form-row-2,
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.hint { font-size: 11px; color: #718097; margin-top: 4px; }

/* ── 9. Primary calc button ─────────────────────────────────────────── */
.calc-btn,
.btn-primary {
  width: 100%; height: 42px; border: none; border-radius: 9px;
  background: linear-gradient(135deg, #0b5ed7, #2d86ff) !important;
  color: #fff !important; font-family: inherit; font-size: 14px; font-weight: 700;
  cursor: pointer; margin-top: 6px; transition: transform 160ms;
  box-shadow: 0 14px 28px rgba(18,104,232,.22) !important;
}
.calc-btn:hover,
.btn-primary:hover { transform: translateY(-1px); }
.btn-outline {
  background: #fff; border: 1px solid #bcd2f3; border-radius: 7px;
  color: #0b5ed7; font-size: 13px; font-weight: 700; padding: 8px 14px; cursor: pointer;
}

/* ── 10. Results ────────────────────────────────────────────────────── */
.results-empty {
  color: #718097; font-size: 13px; text-align: center;
  padding: 36px 0; line-height: 1.7;
}
.result-headline {
  font-size: 36px; font-weight: 900; letter-spacing: -.05em; margin-bottom: 4px;
}
.result-sub { font-size: 12px; color: #718097; margin-bottom: 18px; }
.result-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 9px; margin-bottom: 16px;
}
@media (max-width: 760px) { .result-grid { grid-template-columns: 1fr; } }
.result-tile,
.stat-box {
  background: #f2f7ff !important; border: 1px solid #d0e4ff !important;
  border-radius: 9px; padding: 11px 13px; text-align: left;
}
.stat-box { text-align: center; padding: 14px; }
.result-tile-label,
.stat-box .lbl {
  font-size: 10px; font-weight: 700; color: #0b5ed7;
  text-transform: uppercase; letter-spacing: .04em; margin-bottom: 3px;
}
.stat-box .lbl { color: #526176 !important; }
.result-tile-val,
.stat-box .val {
  font-size: 18px; font-weight: 900; color: #0c1f3f; letter-spacing: -.03em;
}
.stat-box .val { font-size: 22px; }
.result-tile-unit { font-size: 11px; color: #718097; font-weight: 600; }
.stat-ok { color: #17a56b !important; }
.stat-warn { color: #d97706 !important; }
.stat-crit { color: #dc2626 !important; }
.stat-blue { color: #0b5ed7 !important; }
.result-trace {
  font-size: 11.5px; color: #3d4c66; background: #f7f9fc;
  border: 1px solid #edf2f8; border-radius: 8px;
  padding: 12px 14px; line-height: 1.7; margin-bottom: 14px;
}
.result-row {
  display: flex; justify-content: space-between;
  padding: 9px 0; border-bottom: 1px solid #edf2f8 !important;
  font-size: 14px; color: #0c1f3f !important;
}
.result-row:last-child { border-bottom: none !important; }
.result-row .rk { color: #526176 !important; }
.result-row .rv { font-weight: 600; }
.section-head {
  font-size: 13px; font-weight: 700; color: #0b5ed7 !important;
  margin: 16px 0 8px; text-transform: uppercase; letter-spacing: .5px;
}

/* Status chips */
.status-ok, .status-warn, .status-fail {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 700;
}
.status-ok { color: #17a56b; }
.status-warn { color: #d97706; }
.status-fail { color: #dc2626; }

/* Alerts */
.alert {
  border-radius: 8px; padding: 12px 14px; font-size: 13px;
  margin-bottom: 14px; display: flex; gap: 10px; align-items: flex-start;
}
.alert-warn,
.alert-warning {
  background: #fff8e6 !important; border: 1px solid #f5d8a0 !important;
  color: #d97706 !important;
}
.alert-ok {
  background: #ecfdf3 !important; border: 1px solid #b8e6c9 !important;
  color: #17a56b !important;
}
.alert-info {
  background: #f0f7ff !important; border: 1px solid #bfdbfe !important;
  color: #1e40af !important;
}

/* ── 11. Standard pill (NEC / CEC indicator inside tool body) ────────── */
.tool-std-pill {
  display: inline-flex; align-items: center; gap: 5px;
  height: 22px; padding: 0 9px; border-radius: 999px;
  background: #f2f7ff; border: 1px solid #d0e4ff;
  color: #0b5ed7; font-size: 10.5px; font-weight: 700; margin-left: 6px;
}

/* ── 12. Paywall zones ──────────────────────────────────────────────── */
.pw-section-hd { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.pw-section-title { font-size: 13px; font-weight: 800; color: #0c1f3f; }
.pw-preview-tag {
  display: inline-flex; align-items: center; gap: 4px;
  height: 22px; padding: 0 9px; border-radius: 999px;
  background: #fff8e6; border: 1px solid #f5d8a0;
  color: #d97706; font-size: 10px; font-weight: 700;
}
.pw-zone { position: relative; }
.pw-content { filter: blur(3px); opacity: .45; pointer-events: none; user-select: none; }
.pw-overlay {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 10px;
  background: rgba(15,17,23,.7); border-radius: 10px;
  z-index: 10; text-align: center; padding: 20px; color: #fff;
}
.pw-overlay .pw-icon { font-size: 28px; }
.pw-overlay .pw-label { font-weight: 700; font-size: 15px; }
.pw-overlay .pw-desc { font-size: 13px; color: #c8d8f3; max-width: 260px; }
.pw-overlay .pw-cta {
  background: linear-gradient(135deg, #0b5ed7, #2d86ff); color: #fff;
  border: 0; border-radius: 7px; padding: 9px 20px;
  font-size: 14px; font-weight: 700; cursor: pointer;
}

/* ── 13. FAQ ────────────────────────────────────────────────────────── */
.faq-list { display: flex; flex-direction: column; gap: 0; }
.faq-item {
  border: 1px solid #edf2f8 !important; border-radius: 9px;
  margin-bottom: 7px; background: #fff !important; overflow: hidden;
}
.faq-q {
  padding: 14px 18px; font-size: 13px; font-weight: 700;
  color: #0c1f3f !important; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; user-select: none;
}
.faq-q:hover { background: #f2f7ff; }
.faq-icon { font-size: 10px; color: #8aa0bf; transition: transform 250ms; }
.faq-item.open .faq-icon { transform: rotate(180deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .3s; }
.faq-item.open .faq-a { max-height: 400px; }
.faq-a-inner { padding: 0 18px 14px; font-size: 12.5px; color: #526176 !important; line-height: 1.65; }
details.faq {
  border-bottom: 1px solid #edf2f8 !important;
  background: #fff !important;
}
details.faq summary {
  padding: 15px 0; cursor: pointer; font-weight: 600; font-size: 14px;
  list-style: none; display: flex; justify-content: space-between; align-items: center;
  color: #0c1f3f !important;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after {
  content: '+'; color: #0b5ed7 !important; font-size: 18px;
}
details.faq[open] summary::after { content: '×'; }
details.faq p { padding-bottom: 14px; font-size: 14px; color: #526176 !important; line-height: 1.7; }

/* ── 14. Related tools grid ────────────────────────────────────────── */
.related-tools,
.tools-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 14px; margin-top: 16px;
}
@media (max-width: 760px) { .related-tools, .tools-grid { grid-template-columns: 1fr 1fr; } }
.rtc, .tool-card[href] {
  background: #fff !important; border: 1px solid #dfe7f2 !important;
  border-radius: 10px; padding: 14px;
  display: flex; align-items: center; gap: 10px;
  transition: border-color 160ms, transform 160ms; text-decoration: none;
}
.rtc:hover, .tool-card[href]:hover {
  border-color: #bcd2f3 !important; transform: translateY(-2px);
}
.rtc-icon { font-size: 20px; flex-shrink: 0; }
.rtc-label, .tc-name { font-size: 12.5px; font-weight: 700; color: #0c1f3f !important; margin: 0 0 2px; }
.rtc-sub, .tc-desc { font-size: 11px; color: #718097 !important; }

/* ── 15. Upgrade CTA ────────────────────────────────────────────────── */
.upgrade-cta {
  background: linear-gradient(135deg, #062a63, #0a3a7a) !important;
  border: 0 !important;
  border-radius: 14px; padding: 30px 26px;
  text-align: center; color: #fff !important; margin: 36px 0;
}
.upgrade-cta h3 {
  font-size: 19px; font-weight: 800; margin: 0 0 9px;
  letter-spacing: -.03em; color: #fff !important;
}
.upgrade-cta p { font-size: 13px; color: #9fc3f5 !important; margin: 0 0 18px; line-height: 1.6; }
.upgrade-cta ul { list-style: none; text-align: left; margin: 0 0 16px; padding: 0; font-size: 13px; }
.upgrade-cta ul li {
  padding: 4px 0; display: flex; align-items: center; gap: 8px; color: #c8d8f3 !important;
}
.upgrade-cta ul li::before { content: '✓'; color: #34d399; font-weight: 700; }
.btn-upgrade, a.btn-upgrade {
  display: inline-flex; align-items: center; height: 40px; padding: 0 20px;
  border-radius: 8px;
  background: linear-gradient(135deg, #0b5ed7, #2d86ff) !important;
  color: #fff !important; font-size: 13.5px; font-weight: 700;
  box-shadow: 0 6px 16px rgba(18,104,232,.25);
  text-decoration: none;
}

/* ── 16. Footer ──────────────────────────────────────────────────────── */
.pub-footer {
  background: linear-gradient(180deg, #062a63, #041c46) !important;
  color: #c8d8f3 !important;
  padding: 28px 0 16px;
  margin-top: 60px;
  border-top: none !important;
}
.pub-footer .pub-footer-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; flex-wrap: wrap;
  border-bottom: 1px solid rgba(255,255,255,.1);
  padding-bottom: 16px; margin-bottom: 12px;
}
.pub-footer .pub-footer-links { display: flex; gap: 16px; flex-wrap: wrap; }
.pub-footer a { color: #c8d8f3 !important; font-size: 11px; text-decoration: none; }
.pub-footer a:hover { color: #fff !important; }
.pub-footer .pub-footer-copy { font-size: 10.5px; color: #9fb3d6; }
.pub-footer p { color: #c8d8f3; }

/* ── 17. Content sections (FAQ, formula, etc.) ──────────────────────── */
.content-section {
  max-width: 1100px; margin: 0 auto; padding: 44px 24px;
}
.content-section h2 {
  font-size: 21px; font-weight: 800; color: #0c1f3f !important;
  margin: 0 0 10px; letter-spacing: -.03em;
}
.content-section h3 {
  font-size: 14px; font-weight: 800; color: #162b52 !important;
  margin: 20px 0 10px;
}
.content-section p {
  color: #3d4c66 !important; font-size: 13px;
  margin: 0 0 14px; line-height: 1.7;
}
.content-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
@media (max-width: 760px) { .content-2col { grid-template-columns: 1fr; } }

/* ── 18. Unit cards (power-unit-converter) ──────────────────────────── */
.unit-card {
  background: #f2f7ff !important;
  border: 1px solid #dfe7f2 !important;
  border-radius: 9px;
  padding: 12px 14px;
  color: #0c1f3f !important;
  cursor: pointer;
  transition: border-color 160ms;
}
.unit-card:hover { border-color: #bcd2f3 !important; }
.unit-card.active {
  background: #eef4ff !important; border-color: #0b5ed7 !important;
  box-shadow: 0 0 0 3px rgba(11,94,215,.1);
}
.unit-card .ul { font-size: 10px; color: #526176 !important; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.unit-card .un { font-size: 11px; color: #718097 !important; }
.unit-card input {
  background: transparent !important; color: #0c1f3f !important;
  border: 0 !important; padding: 0 !important;
  font-size: 18px; font-weight: 800; width: 100%;
}
.unit-card input:focus { outline: none; box-shadow: none !important; }

/* ── 19. Formula / monospace boxes ──────────────────────────────────── */
.formula {
  background: #f2f7ff !important; border: 1px solid #dfe7f2 !important;
  color: #526176 !important;
  border-radius: 7px; padding: 12px 14px; font-size: 12px;
  font-family: ui-monospace, "Cascadia Code", "Fira Code", Menlo, monospace;
  line-height: 1.7;
}
.formula strong { color: #0c1f3f !important; }

/* ── 20. Trace blocks (cable pulling, etc.) ─────────────────────────── */
.trace {
  background: #f7f9fc; border: 1px solid #edf2f8;
  border-radius: 7px; padding: 12px 14px;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 11.5px; color: #526176; line-height: 1.7;
}
.trace strong { color: #0c1f3f; font-family: inherit; }
.code-ref { font-family: ui-monospace, Menlo, Consolas, monospace; color: #0b5ed7; font-weight: 700; }

/* ── 21. Case study (cable-size, etc.) ──────────────────────────────── */
.case {
  background: #f7f9fc !important; border: 1px solid #dfe7f2 !important;
  border-radius: 9px; padding: 16px; font-size: 13px;
}
.case h4 { font-size: 14px; font-weight: 800; margin: 0 0 10px; color: #0b5ed7 !important; }
.case-step { display: flex; gap: 10px; margin-bottom: 8px; align-items: flex-start; }
.case-num {
  width: 22px; height: 22px; flex-shrink: 0;
  background: #0b5ed7; color: #fff; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
}

/* ── 22. Sidebar gap (cable-size legacy) ────────────────────────────── */
.sidebar > * + * { margin-top: 16px; }

/* ── 23. Standard badge inline */
.std-tag-nec { color: #b35b00; background: #fef3c7; padding: 1px 6px; border-radius: 4px; font-size: 10px; font-weight: 700; }
.std-tag-cec { color: #1d4ed8; background: #dbeafe; padding: 1px 6px; border-radius: 4px; font-size: 10px; font-weight: 700; }
