/* ============================================================
   SmartUtilz – Engineering & Industrial Calculation Tools
   style.css | Professional Engineering Theme
   Colors: Dark Blue #0d1f3c, Steel Gray #4a5568, White #fff
   ============================================================ */

/* ── RESET & BASE ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blue-900:   #0a1628;
  --blue-800:   #0d1f3c;
  --blue-700:   #122653;
  --blue-600:   #1a3a6b;
  --blue-500:   #2563b0;
  --blue-400:   #3b82f6;
  --blue-300:   #93c5fd;
  --steel-900:  #1e2837;
  --steel-700:  #334155;
  --steel-600:  #475569;
  --steel-500:  #64748b;
  --steel-400:  #94a3b8;
  --steel-300:  #cbd5e1;
  --steel-200:  #e2e8f0;
  --steel-100:  #f1f5f9;
  --white:      #ffffff;
  --accent:     #f59e0b;    /* amber – CTA highlights */
  --accent-2:   #10b981;   /* emerald – success / live */
  --danger:     #ef4444;
  --radius-sm:  4px;
  --radius:     8px;
  --radius-lg:  14px;
  --radius-xl:  20px;
  --shadow-sm:  0 1px 3px rgba(0,0,0,.12);
  --shadow:     0 4px 16px rgba(0,0,0,.12);
  --shadow-lg:  0 8px 32px rgba(0,0,0,.18);
  --transition: 0.22s ease;
  --font-sans:  'Inter', 'Segoe UI', system-ui, sans-serif;
  --font-mono:  'JetBrains Mono', 'Fira Code', monospace;
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-sans);
  background: var(--steel-100);
  color: var(--steel-900);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a  { color: var(--blue-500); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--blue-400); }

/* ── TYPOGRAPHY ───────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.25;
  color: var(--blue-800);
}
h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.4rem); }
h4 { font-size: 1.1rem; }
p  { color: var(--steel-600); line-height: 1.75; }

.text-sm  { font-size: .875rem; }
.text-xs  { font-size: .75rem; }
.text-muted { color: var(--steel-500); }
.text-white { color: var(--white); }
.text-accent { color: var(--accent); }
.text-center { text-align: center; }

/* ── LAYOUT UTILITIES ─────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
}
.section { padding: 5rem 0; }
.section-sm { padding: 3rem 0; }
.flex   { display: flex; }
.grid   { display: grid; }
.gap-4  { gap: 1rem; }
.gap-6  { gap: 1.5rem; }
.gap-8  { gap: 2rem; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.hidden { display: none; }

/* ── HEADER / NAV ─────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--blue-800);
  border-bottom: 1px solid var(--blue-700);
  box-shadow: 0 2px 12px rgba(0,0,0,.35);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 1.5rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: .6rem;
  text-decoration: none;
}
.logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--blue-500), var(--blue-400));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--white);
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(37,99,176,.4);
}
.logo-text {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -.5px;
}
.logo-text span { color: var(--accent); }

/* Desktop nav */
.nav-links {
  display: flex;
  align-items: center;
  gap: .25rem;
  list-style: none;
}
.nav-links a {
  color: var(--steel-300);
  font-size: .875rem;
  font-weight: 500;
  padding: .45rem .8rem;
  border-radius: var(--radius-sm);
  transition: background var(--transition), color var(--transition);
}
.nav-links a:hover, .nav-links a.active {
  background: var(--blue-700);
  color: var(--white);
}

.nav-cta {
  background: var(--accent) !important;
  color: var(--blue-900) !important;
  font-weight: 700 !important;
  border-radius: var(--radius) !important;
  padding: .45rem 1rem !important;
}
.nav-cta:hover { background: #d97706 !important; }

/* Mobile hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: .4rem;
  border: none;
  background: transparent;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--steel-300);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav {
  display: none;
  background: var(--blue-800);
  border-top: 1px solid var(--blue-700);
  padding: 1rem 0;
}
.mobile-nav.open { display: block; }
.mobile-nav ul { list-style: none; }
.mobile-nav a {
  display: block;
  padding: .75rem 1.5rem;
  color: var(--steel-300);
  font-size: .95rem;
  font-weight: 500;
  border-left: 3px solid transparent;
  transition: all var(--transition);
}
.mobile-nav a:hover {
  color: var(--white);
  background: var(--blue-700);
  border-left-color: var(--accent);
}

/* ── HERO ─────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(145deg, var(--blue-900) 0%, var(--blue-800) 50%, var(--steel-900) 100%);
  position: relative;
  overflow: hidden;
  padding: 5rem 0 4.5rem;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 50%, rgba(37,99,176,.15) 0%, transparent 60%),
    radial-gradient(circle at 80% 20%, rgba(245,158,11,.08) 0%, transparent 50%);
  pointer-events: none;
}
/* Subtle grid texture */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.02) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,.02) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: rgba(37,99,176,.25);
  border: 1px solid rgba(59,130,246,.35);
  color: var(--blue-300);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .35rem .9rem;
  border-radius: 50px;
  margin-bottom: 1.5rem;
}
.hero-badge::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent-2);
  animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .5; transform: scale(.8); }
}

.hero h1 {
  color: var(--white);
  margin-bottom: 1.25rem;
  line-height: 1.15;
}
.hero h1 em {
  font-style: normal;
  color: var(--accent);
}

.hero-sub {
  color: var(--steel-400);
  font-size: 1.1rem;
  max-width: 560px;
  margin-bottom: 2.25rem;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-stats {
  display: flex;
  gap: 2.5rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,.08);
  flex-wrap: wrap;
}
.hero-stat strong {
  display: block;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--white);
  line-height: 1;
  margin-bottom: .25rem;
}
.hero-stat span { font-size: .8rem; color: var(--steel-400); text-transform: uppercase; letter-spacing: .06em; }

/* ── BUTTONS ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .925rem;
  font-weight: 600;
  padding: .7rem 1.5rem;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  font-family: var(--font-sans);
  line-height: 1;
  text-decoration: none;
}
.btn:focus-visible { outline: 2px solid var(--blue-400); outline-offset: 2px; }

.btn-primary {
  background: var(--blue-500);
  color: var(--white);
  border-color: var(--blue-500);
}
.btn-primary:hover {
  background: var(--blue-600);
  border-color: var(--blue-600);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(37,99,176,.35);
}

.btn-accent {
  background: var(--accent);
  color: var(--blue-900);
  border-color: var(--accent);
}
.btn-accent:hover {
  background: #d97706;
  border-color: #d97706;
  color: var(--blue-900);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(245,158,11,.35);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,.3);
}
.btn-outline:hover {
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.6);
  color: var(--white);
}

.btn-ghost {
  background: transparent;
  color: var(--blue-500);
  border-color: var(--blue-500);
}
.btn-ghost:hover {
  background: var(--blue-500);
  color: var(--white);
}

.btn-sm { padding: .45rem 1rem; font-size: .8rem; border-radius: var(--radius-sm); }
.btn-lg { padding: .9rem 2rem; font-size: 1rem; }
.btn-block { width: 100%; justify-content: center; }

/* ── AD PLACEHOLDER ──────────────────────────────────────── */
.ad-placeholder {
  background: repeating-linear-gradient(
    45deg,
    var(--steel-200),
    var(--steel-200) 2px,
    var(--steel-100) 2px,
    var(--steel-100) 12px
  );
  border: 1px dashed var(--steel-300);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--steel-400);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.ad-banner { height: 90px; margin: 2rem 0; }
.ad-sidebar { height: 280px; margin-bottom: 1.5rem; }

/* ── SECTION HEADINGS ─────────────────────────────────────── */
.section-label {
  display: inline-block;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--blue-500);
  margin-bottom: .75rem;
}
.section-title { margin-bottom: .75rem; }
.section-sub   { color: var(--steel-500); max-width: 560px; }

/* ── CATEGORY CARDS ───────────────────────────────────────── */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.category-card {
  background: var(--white);
  border: 1px solid var(--steel-200);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.category-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--blue-500), var(--blue-400));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}
.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--blue-300);
}
.category-card:hover::before { transform: scaleX(1); }

.category-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 1rem;
}
.icon-blue   { background: rgba(37,99,176,.1); }
.icon-amber  { background: rgba(245,158,11,.1); }
.icon-green  { background: rgba(16,185,129,.1); }
.icon-purple { background: rgba(139,92,246,.1); }

.category-card h3 { margin-bottom: .5rem; font-size: 1.05rem; }
.category-card p  { font-size: .875rem; margin-bottom: 1.25rem; }

.tool-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.tool-list li a {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .85rem;
  font-weight: 500;
  color: var(--steel-600);
  padding: .45rem .75rem;
  border-radius: var(--radius-sm);
  background: var(--steel-100);
  transition: all var(--transition);
}
.tool-list li a::before {
  content: '→';
  font-size: .8rem;
  color: var(--blue-400);
  flex-shrink: 0;
}
.tool-list li a:hover {
  background: var(--blue-800);
  color: var(--white);
}

/* ── FEATURED TOOLS ───────────────────────────────────────── */
.featured-section {
  background: var(--blue-800);
  padding: 5rem 0;
}
.featured-section .section-label { color: var(--accent); }
.featured-section .section-title { color: var(--white); }
.featured-section .section-sub   { color: var(--steel-400); }

.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.featured-card {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.featured-card.primary {
  background: linear-gradient(135deg, rgba(37,99,176,.3), rgba(59,130,246,.15));
  border-color: rgba(59,130,246,.35);
}
.featured-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0,0,0,.3);
  border-color: rgba(255,255,255,.2);
}

.featured-card-badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .25rem .7rem;
  border-radius: 50px;
  margin-bottom: 1rem;
}
.badge-primary { background: rgba(245,158,11,.2); color: var(--accent); border: 1px solid rgba(245,158,11,.3); }
.badge-new     { background: rgba(16,185,129,.2); color: var(--accent-2); border: 1px solid rgba(16,185,129,.3); }
.badge-popular { background: rgba(139,92,246,.2); color: #a78bfa; border: 1px solid rgba(139,92,246,.3); }

.featured-card h3 { color: var(--white); margin-bottom: .6rem; }
.featured-card p  { color: var(--steel-400); font-size: .9rem; margin-bottom: 1.5rem; }

.featured-card-meta {
  display: flex;
  gap: 1.25rem;
  font-size: .75rem;
  color: var(--steel-500);
  margin-bottom: 1.5rem;
}
.featured-card-meta span { display: flex; align-items: center; gap: .35rem; }

/* ── TRUST SECTION ────────────────────────────────────────── */
.trust-section {
  background: var(--steel-100);
  padding: 4rem 0;
  border-top: 1px solid var(--steel-200);
  border-bottom: 1px solid var(--steel-200);
}
.trust-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  margin-top: 2.5rem;
}
.trust-item {
  text-align: center;
  padding: 1.5rem 1rem;
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--steel-200);
  box-shadow: var(--shadow-sm);
}
.trust-item-icon {
  font-size: 2rem;
  margin-bottom: .75rem;
  display: block;
}
.trust-item h4 { font-size: .95rem; margin-bottom: .4rem; }
.trust-item p  { font-size: .8rem; color: var(--steel-500); }

/* Standards badges */
.standards {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 2rem;
}
.standard-badge {
  background: var(--white);
  border: 1px solid var(--steel-200);
  border-radius: var(--radius);
  padding: .4rem .9rem;
  font-size: .75rem;
  font-weight: 700;
  color: var(--steel-600);
  letter-spacing: .05em;
}

/* ── FOOTER ───────────────────────────────────────────────── */
.site-footer {
  background: var(--blue-900);
  color: var(--steel-400);
  padding: 4rem 0 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}
.footer-brand p { font-size: .9rem; margin: 1rem 0 1.5rem; max-width: 300px; }
.footer-col h5 {
  font-size: .85rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: .65rem; }
.footer-col a {
  font-size: .875rem;
  color: var(--steel-500);
  transition: color var(--transition);
}
.footer-col a:hover { color: var(--white); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.06);
  padding-top: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: .8rem;
}
.footer-disclaimer {
  background: rgba(245,158,11,.08);
  border: 1px solid rgba(245,158,11,.15);
  border-radius: var(--radius);
  padding: .9rem 1.25rem;
  font-size: .8rem;
  color: var(--steel-500);
  margin-bottom: 2rem;
  line-height: 1.6;
}

/* ── TOOL PAGE LAYOUT ─────────────────────────────────────── */
.tool-page-hero {
  background: linear-gradient(145deg, var(--blue-900), var(--blue-800));
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--blue-700);
}
.tool-page-hero h1 { color: var(--white); font-size: clamp(1.4rem, 3vw, 2rem); margin-bottom: .5rem; }
.tool-page-hero p  { color: var(--steel-400); font-size: .95rem; }
.breadcrumb {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .8rem;
  color: var(--steel-500);
  margin-bottom: 1rem;
}
.breadcrumb a { color: var(--steel-400); }
.breadcrumb a:hover { color: var(--white); }
.breadcrumb .sep { color: var(--steel-700); }

.tool-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2rem;
  padding: 2.5rem 0 4rem;
}

/* ── CALCULATOR CARD ──────────────────────────────────────── */
.calc-card {
  background: var(--white);
  border: 1px solid var(--steel-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.calc-card-header {
  background: var(--blue-800);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .75rem;
}
.calc-card-title {
  color: var(--white);
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: .6rem;
}
.calc-card-body { padding: 1.75rem; }

/* Unit Toggle */
.unit-toggle {
  display: flex;
  background: rgba(255,255,255,.1);
  border-radius: var(--radius-sm);
  padding: 3px;
  gap: 2px;
}
.unit-toggle button {
  background: transparent;
  border: none;
  color: var(--steel-400);
  font-size: .75rem;
  font-weight: 600;
  padding: .3rem .7rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font-sans);
}
.unit-toggle button.active {
  background: var(--blue-500);
  color: var(--white);
}

/* Shape selector */
.shape-selector {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: .5rem;
  margin-bottom: 1.5rem;
}
.shape-btn {
  background: var(--steel-100);
  border: 2px solid var(--steel-200);
  border-radius: var(--radius);
  padding: .65rem .25rem;
  cursor: pointer;
  text-align: center;
  transition: all var(--transition);
  font-family: var(--font-sans);
}
.shape-btn .shape-icon { font-size: 1.5rem; display: block; margin-bottom: .3rem; }
.shape-btn .shape-name { font-size: .65rem; font-weight: 600; color: var(--steel-600); display: block; }
.shape-btn:hover { border-color: var(--blue-400); background: rgba(37,99,176,.06); }
.shape-btn.active {
  border-color: var(--blue-500);
  background: rgba(37,99,176,.1);
  color: var(--blue-700);
}
.shape-btn.active .shape-name { color: var(--blue-600); }

/* Form fields */
.field-group {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.field {
  display: flex;
  flex-direction: column;
  gap: .4rem;
}
.field label {
  font-size: .8rem;
  font-weight: 600;
  color: var(--steel-700);
  letter-spacing: .02em;
}
.field label .unit-label {
  font-weight: 400;
  color: var(--steel-400);
  margin-left: .3rem;
}

.field input, .field select {
  height: 44px;
  border: 1.5px solid var(--steel-200);
  border-radius: var(--radius);
  padding: 0 1rem;
  font-size: .95rem;
  color: var(--steel-800);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
  font-family: var(--font-sans);
  width: 100%;
}
.field input:focus, .field select:focus {
  outline: none;
  border-color: var(--blue-400);
  box-shadow: 0 0 0 3px rgba(59,130,246,.12);
}
.field input.error { border-color: var(--danger); }
.field-error { font-size: .75rem; color: var(--danger); display: none; }
.field input.error ~ .field-error { display: block; }

/* Result display */
.result-panel {
  background: linear-gradient(135deg, var(--blue-900), var(--blue-800));
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-top: 1.5rem;
  border: 1px solid var(--blue-700);
}
.result-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}
.result-panel-header h4 {
  color: var(--white);
  font-size: .9rem;
}
.live-indicator {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .72rem;
  color: var(--accent-2);
  font-weight: 600;
}
.live-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent-2);
  animation: pulse-dot 1.5s infinite;
}

.result-values {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.result-value {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius);
  padding: 1rem;
}
.result-value .val-number {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--white);
  font-family: var(--font-mono);
  line-height: 1;
  margin-bottom: .25rem;
}
.result-value .val-unit {
  font-size: .75rem;
  color: var(--steel-400);
  text-transform: uppercase;
  letter-spacing: .05em;
}
.result-value .val-label {
  font-size: .7rem;
  color: var(--steel-500);
  margin-bottom: .3rem;
}

.result-actions {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
}
.result-actions .btn {
  flex: 1;
  min-width: 120px;
  justify-content: center;
  font-size: .8rem;
  padding: .55rem .75rem;
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.12);
  color: var(--steel-300);
}
.result-actions .btn:hover {
  background: rgba(255,255,255,.15);
  color: var(--white);
}

/* Pro upgrade teaser */
.pro-teaser {
  background: linear-gradient(135deg, rgba(245,158,11,.12), rgba(245,158,11,.06));
  border: 1px solid rgba(245,158,11,.25);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-top: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.pro-teaser p { font-size: .82rem; color: var(--steel-600); margin: 0; }
.pro-teaser strong { color: var(--accent); }

/* ── SIDEBAR ──────────────────────────────────────────────── */
.sidebar { display: flex; flex-direction: column; gap: 1.25rem; }

.sidebar-card {
  background: var(--white);
  border: 1px solid var(--steel-200);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
}
.sidebar-card h4 {
  font-size: .9rem;
  margin-bottom: 1rem;
  padding-bottom: .6rem;
  border-bottom: 1px solid var(--steel-200);
  color: var(--blue-800);
}
.formula-block {
  background: var(--steel-100);
  border-radius: var(--radius-sm);
  padding: .75rem 1rem;
  font-family: var(--font-mono);
  font-size: .78rem;
  color: var(--steel-700);
  margin-bottom: .6rem;
  border-left: 3px solid var(--blue-500);
  line-height: 1.6;
}
.related-list { list-style: none; display: flex; flex-direction: column; gap: .5rem; }
.related-list a {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .85rem;
  color: var(--steel-600);
  padding: .4rem .6rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.related-list a:hover { background: var(--steel-100); color: var(--blue-600); }

/* ── CONTENT ARTICLE ──────────────────────────────────────── */
.article-section {
  background: var(--white);
  border: 1px solid var(--steel-200);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-top: 2rem;
  box-shadow: var(--shadow-sm);
}
.article-section h2 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  padding-bottom: .75rem;
  border-bottom: 2px solid var(--steel-200);
}
.article-section h3 {
  font-size: 1.05rem;
  margin: 1.5rem 0 .6rem;
  color: var(--blue-700);
}
.article-section p { margin-bottom: 1rem; font-size: .95rem; }
.article-section ul, .article-section ol {
  margin: .75rem 0 1rem 1.5rem;
  font-size: .95rem;
  color: var(--steel-600);
}
.article-section li { margin-bottom: .4rem; }

.formula-highlight {
  background: var(--steel-100);
  border: 1px solid var(--steel-200);
  border-left: 4px solid var(--blue-500);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin: 1rem 0;
  font-family: var(--font-mono);
  font-size: .88rem;
  color: var(--blue-800);
}

/* ── FAQ SECTION ──────────────────────────────────────────── */
.faq-section { margin-top: 2rem; }
.faq-section h2 { margin-bottom: 1.25rem; }

.faq-item {
  background: var(--white);
  border: 1px solid var(--steel-200);
  border-radius: var(--radius);
  margin-bottom: .75rem;
  overflow: hidden;
}
.faq-question {
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  padding: 1rem 1.25rem;
  font-size: .95rem;
  font-weight: 600;
  color: var(--blue-800);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-family: var(--font-sans);
  transition: background var(--transition);
}
.faq-question:hover { background: var(--steel-100); }
.faq-question::after {
  content: '+';
  font-size: 1.2rem;
  color: var(--blue-500);
  flex-shrink: 0;
  transition: transform var(--transition);
}
.faq-item.open .faq-question::after { transform: rotate(45deg); }
.faq-answer {
  padding: 0 1.25rem;
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease, padding .3s ease;
}
.faq-item.open .faq-answer {
  max-height: 500px;
  padding: 0 1.25rem 1.25rem;
}
.faq-answer p { font-size: .9rem; color: var(--steel-600); }

/* ── BOLT TABLE ───────────────────────────────────────────── */
.bolt-table-wrapper { overflow-x: auto; margin-top: 1.5rem; }
.bolt-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .82rem;
}
.bolt-table th {
  background: var(--blue-800);
  color: var(--white);
  padding: .65rem .85rem;
  text-align: left;
  font-weight: 600;
  white-space: nowrap;
}
.bolt-table td {
  padding: .6rem .85rem;
  border-bottom: 1px solid var(--steel-200);
  color: var(--steel-700);
}
.bolt-table tbody tr:nth-child(even) { background: var(--steel-100); }
.bolt-table tbody tr:hover { background: rgba(37,99,176,.05); }
.bolt-table tbody tr.highlighted {
  background: rgba(245,158,11,.08);
  border-left: 3px solid var(--accent);
}

/* ── NOTIFICATIONS / TOAST ────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--blue-800);
  color: var(--white);
  padding: .75rem 1.5rem;
  border-radius: 50px;
  font-size: .875rem;
  font-weight: 500;
  z-index: 9999;
  transition: transform .3s ease;
  box-shadow: var(--shadow-lg);
  white-space: nowrap;
  pointer-events: none;
}
.toast.show { transform: translateX(-50%) translateY(0); }

/* ── ANIMATIONS ───────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up {
  animation: fadeUp .5s ease both;
}
.fade-up-1 { animation-delay: .1s; }
.fade-up-2 { animation-delay: .2s; }
.fade-up-3 { animation-delay: .3s; }
.fade-up-4 { animation-delay: .4s; }

@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}
.calculating .val-number {
  background: linear-gradient(90deg, var(--steel-400) 25%, var(--white) 50%, var(--steel-400) 75%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 1s linear;
}

/* ── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .tool-layout { grid-template-columns: 1fr; }
  .sidebar { display: grid; grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .hero { padding: 3.5rem 0 3rem; }
  .hero-stats { gap: 1.5rem; }
  .shape-selector { grid-template-columns: repeat(3, 1fr); }
  .field-row { grid-template-columns: 1fr; }
  .result-values { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .sidebar { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .shape-selector { grid-template-columns: repeat(3, 1fr); }
  .result-values { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; }
  .result-actions { flex-direction: column; }
}

/* ── UTILITIES ────────────────────────────────────────────── */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
.mb-1 { margin-bottom: .25rem; }
.mb-2 { margin-bottom: .5rem; }
.mb-3 { margin-bottom: .75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mt-2 { margin-top: .5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.pt-4 { padding-top: 1rem; }
.divider { border: none; border-top: 1px solid var(--steel-200); margin: 1.5rem 0; }

/* ============================================================
   UPGRADE ADDITIONS v2.0
   Engineering Notes | Recent Calcs | Cost Tool | Print CSS
   ============================================================ */

/* ── ENGINEERING NOTES ACCORDION ─────────────────────────── */
.eng-notes {
  background: linear-gradient(135deg, #f0f7ff, #e8f4fd);
  border: 1px solid rgba(37,99,176,.2);
  border-left: 4px solid var(--blue-500);
  border-radius: var(--radius-lg);
  margin-top: 1.5rem;
  overflow: hidden;
}

.eng-notes-toggle {
  width: 100%;
  background: transparent;
  border: none;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  cursor: pointer;
  font-family: var(--font-sans);
  text-align: left;
  transition: background var(--transition);
}
.eng-notes-toggle:hover { background: rgba(37,99,176,.06); }

.eng-notes-toggle-left {
  display: flex;
  align-items: center;
  gap: .75rem;
}
.eng-notes-toggle-icon {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, var(--blue-500), var(--blue-400));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .95rem;
  flex-shrink: 0;
}
.eng-notes-toggle-title {
  font-size: .9rem;
  font-weight: 700;
  color: var(--blue-800);
}
.eng-notes-toggle-sub {
  font-size: .72rem;
  color: var(--steel-500);
  display: block;
  margin-top: .1rem;
}
.eng-notes-chevron {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: rgba(37,99,176,.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .7rem;
  color: var(--blue-600);
  flex-shrink: 0;
  transition: transform var(--transition);
}
.eng-notes.open .eng-notes-chevron { transform: rotate(180deg); }

.eng-notes-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height .4s ease;
}
.eng-notes.open .eng-notes-body { max-height: 1200px; }

.eng-notes-inner {
  padding: 0 1.25rem 1.25rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 640px) {
  .eng-notes-inner { grid-template-columns: 1fr; }
}

.eng-note-block {
  background: var(--white);
  border: 1px solid rgba(37,99,176,.12);
  border-radius: var(--radius);
  padding: .9rem 1rem;
}
.eng-note-block h5 {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--blue-600);
  margin-bottom: .6rem;
  display: flex;
  align-items: center;
  gap: .4rem;
}
.eng-note-block ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .35rem;
}
.eng-note-block li {
  font-size: .8rem;
  color: var(--steel-600);
  padding-left: .9rem;
  position: relative;
  line-height: 1.5;
}
.eng-note-block li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--blue-400);
}
.eng-note-block li strong { color: var(--steel-800); }
.eng-note-full {
  grid-column: 1 / -1;
}
.eng-note-warning {
  background: rgba(245,158,11,.06);
  border-color: rgba(245,158,11,.25);
}
.eng-note-warning h5 { color: #92400e; }

/* ── RECENT CALCULATIONS ──────────────────────────────────── */
.recent-calcs {
  background: var(--white);
  border: 1px solid var(--steel-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-top: 1.5rem;
  box-shadow: var(--shadow-sm);
}
.recent-calcs-header {
  background: var(--steel-100);
  border-bottom: 1px solid var(--steel-200);
  padding: .85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.recent-calcs-header h4 {
  font-size: .875rem;
  color: var(--blue-800);
  display: flex;
  align-items: center;
  gap: .5rem;
}
.recent-calcs-clear {
  background: none;
  border: none;
  font-size: .72rem;
  color: var(--steel-400);
  cursor: pointer;
  font-family: var(--font-sans);
  padding: .2rem .5rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.recent-calcs-clear:hover { color: var(--danger); background: rgba(239,68,68,.06); }

.recent-calcs-list {
  padding: .75rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.recent-calc-item {
  background: var(--steel-100);
  border: 1px solid var(--steel-200);
  border-radius: var(--radius);
  padding: .75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  transition: all var(--transition);
  cursor: pointer;
}
.recent-calc-item:hover {
  border-color: var(--blue-300);
  background: rgba(37,99,176,.04);
}
.recent-calc-info { flex: 1; min-width: 0; }
.recent-calc-tool {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--blue-500);
  margin-bottom: .2rem;
}
.recent-calc-inputs {
  font-size: .8rem;
  color: var(--steel-600);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.recent-calc-result {
  font-family: var(--font-mono);
  font-size: .85rem;
  font-weight: 700;
  color: var(--blue-800);
  white-space: nowrap;
  flex-shrink: 0;
}
.recent-calc-time {
  font-size: .67rem;
  color: var(--steel-400);
  white-space: nowrap;
}
.recent-calcs-empty {
  text-align: center;
  padding: 1.5rem;
  color: var(--steel-400);
  font-size: .85rem;
}

/* ── COST CALCULATOR SPECIFICS ────────────────────────────── */
.cost-summary {
  background: linear-gradient(145deg, var(--blue-900), #0f2445);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-top: 1.5rem;
  border: 1px solid var(--blue-700);
}
.cost-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.25rem;
}
@media (max-width: 640px) {
  .cost-summary-grid { grid-template-columns: 1fr 1fr; }
}
.cost-value-block {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius);
  padding: .85rem 1rem;
}
.cost-value-block.highlight {
  background: linear-gradient(135deg, rgba(245,158,11,.2), rgba(245,158,11,.1));
  border-color: rgba(245,158,11,.3);
}
.cost-value-block .cvb-label {
  font-size: .67rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--steel-400);
  margin-bottom: .35rem;
}
.cost-value-block .cvb-num {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--white);
  line-height: 1;
}
.cost-value-block.highlight .cvb-num { color: var(--accent); }
.cost-value-block .cvb-unit {
  font-size: .65rem;
  color: var(--steel-500);
  margin-top: .2rem;
}

.cost-breakdown {
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: .4rem;
}
.cost-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .83rem;
  padding: .3rem 0;
  border-bottom: 1px solid rgba(255,255,255,.04);
}
.cost-row:last-child { border-bottom: none; }
.cost-row .cr-label { color: var(--steel-400); }
.cost-row .cr-val {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--white);
}
.cost-row.cr-total {
  margin-top: .25rem;
  padding-top: .5rem;
  border-top: 1px solid rgba(255,255,255,.12);
  border-bottom: none;
}
.cost-row.cr-total .cr-label { color: var(--steel-200); font-weight: 700; font-size: .9rem; }
.cost-row.cr-total .cr-val  { color: var(--accent); font-size: 1rem; }

/* ── RESULT VALUE HIGHLIGHT ANIMATIONS ────────────────────── */
@keyframes resultFlash {
  0%   { background: rgba(37,99,176,.25); }
  100% { background: rgba(255,255,255,.06); }
}
.result-value.updated {
  animation: resultFlash .5s ease forwards;
}

/* ── IMPROVED MOBILE INPUTS ───────────────────────────────── */
@media (max-width: 768px) {
  .field input, .field select {
    height: 50px;
    font-size: 1rem;
    padding: 0 1rem;
  }
  .shape-btn { padding: .75rem .25rem; }
  .shape-btn .shape-icon { font-size: 1.6rem; }
  .calc-card-body { padding: 1.25rem 1rem; }
  .result-panel { padding: 1.25rem 1rem; }
}

/* ── INLINE AD (after results) ────────────────────────────── */
.ad-inline {
  height: 100px;
  margin: 1.5rem 0;
}

/* ── SECTION FADE-IN ANIMATION ────────────────────────────── */
@keyframes sectionReveal {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.reveal {
  animation: sectionReveal .45s ease both;
  animation-play-state: paused;
}
.reveal.visible { animation-play-state: running; }

/* ── INTERNAL LINK STRIP ──────────────────────────────────── */
.tool-links-strip {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
  margin: 1.25rem 0;
  padding: 1rem 1.25rem;
  background: var(--steel-100);
  border-radius: var(--radius);
  border: 1px solid var(--steel-200);
}
.tool-link-chip {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .4rem .85rem;
  background: var(--white);
  border: 1px solid var(--steel-200);
  border-radius: 50px;
  font-size: .8rem;
  font-weight: 600;
  color: var(--steel-600);
  transition: all var(--transition);
  text-decoration: none;
}
.tool-link-chip:hover {
  background: var(--blue-800);
  border-color: var(--blue-800);
  color: var(--white);
}

/* ── PRINT / PDF STYLES ───────────────────────────────────── */
@media print {
  .site-header, .site-footer, .sidebar,
  .ad-placeholder, .ad-inline, .result-actions,
  .pro-teaser, .recent-calcs, .eng-notes,
  .nav-toggle, .mobile-nav, .breadcrumb { display: none !important; }

  body { background: white; color: #111; }
  .tool-layout { grid-template-columns: 1fr; }
  .calc-card { box-shadow: none; border: 1px solid #ccc; }
  .result-panel {
    background: #f8fafc !important;
    border: 1px solid #ccc !important;
    color: #111 !important;
  }
  .val-number { color: #0d1f3c !important; }
  .val-unit, .val-label { color: #475569 !important; }
  .result-panel-header h4 { color: #0d1f3c !important; }
  .live-indicator { display: none; }
}

/* ── COST ESTIMATOR RESULT BADGE ──────────────────────────── */
.cost-badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: rgba(16,185,129,.15);
  border: 1px solid rgba(16,185,129,.3);
  color: var(--accent-2);
  font-size: .72rem;
  font-weight: 700;
  padding: .25rem .7rem;
  border-radius: 50px;
  margin-left: .5rem;
}

/* ── CURRENCY SYMBOL SELECT ───────────────────────────────── */
.currency-field {
  display: flex;
  gap: .5rem;
}
.currency-select {
  width: 80px !important;
  flex-shrink: 0;
  padding: 0 .5rem !important;
  font-weight: 700;
  text-align: center;
}

/* ── TOOLTIP HELPER ───────────────────────────────────────── */
.help-tip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--steel-300);
  color: var(--steel-700);
  font-size: .65rem;
  font-weight: 800;
  cursor: help;
  position: relative;
  flex-shrink: 0;
}
.help-tip::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--blue-900);
  color: var(--white);
  font-size: .72rem;
  font-weight: 400;
  white-space: nowrap;
  padding: .4rem .75rem;
  border-radius: var(--radius-sm);
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--transition);
  z-index: 100;
  max-width: 220px;
  white-space: normal;
  text-align: center;
}
.help-tip:hover::after { opacity: 1; }
