/* ============================================================
   PIPE WEIGHT PLATFORM — SHARED DESIGN SYSTEM
   Premium Industrial Engineering UI
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Poppins:wght@400;500;600;700;800&display=swap');

/* ── CSS Variables ── */
:root {
  --navy:        #0f1f3d;
  --navy-mid:    #162848;
  --navy-light:  #1e3a5f;
  --blue-accent: #1d6fa4;
  --blue-bright: #2d8fc4;
  --blue-soft:   #e8f4fd;
  --steel:       #4a6080;
  --steel-light: #7a95b2;
  --gray-dark:   #2c3e50;
  --gray-mid:    #546e7a;
  --gray-light:  #ecf0f4;
  --gray-bg:     #f4f7fa;
  --white:       #ffffff;
  --border:      #d0dce8;
  --border-dark: #b0bec5;
  --success:     #27ae60;
  --warning:     #f39c12;
  --red:         #e74c3c;
  --text-primary:   #0f1f3d;
  --text-secondary: #4a6080;
  --text-muted:     #7a95b2;
  --shadow-sm:  0 1px 4px rgba(15,31,61,0.08);
  --shadow-md:  0 4px 16px rgba(15,31,61,0.12);
  --shadow-lg:  0 8px 32px rgba(15,31,61,0.16);
  --shadow-xl:  0 16px 48px rgba(15,31,61,0.20);
  --radius-sm:  6px;
  --radius-md:  10px;
  --radius-lg:  16px;
  --radius-xl:  24px;
  --font-sans: 'Inter', sans-serif;
  --font-head: 'Poppins', sans-serif;

  /* ── Index page aliases ── */

  --navy:       #0d1b2e;
  --navy-mid:   #112240;
  --navy-light: #1a3157;
  --steel:      #243b55;
  --blue:       #1e6fdc;
  --blue-light: #3b8ef3;
  --blue-soft:  #e8f0fe;
  --white:      #ffffff;
  --gray-50:    #f8fafc;
  --gray-100:   #f1f5f9;
  --gray-200:   #e2e8f0;
  --gray-300:   #cbd5e1;
  --gray-400:   #94a3b8;
  --gray-500:   #64748b;
  --gray-600:   #475569;
  --gray-700:   #334155;
  --gray-800:   #1e293b;
  --green:      #16a34a;
  --shadow-sm:  0 1px 3px rgba(0,0,0,.08),0 1px 2px rgba(0,0,0,.04);
  --shadow-md:  0 4px 16px rgba(0,0,0,.10),0 2px 6px rgba(0,0,0,.06);
  --shadow-lg:  0 12px 40px rgba(0,0,0,.14),0 4px 12px rgba(0,0,0,.08);
  --shadow-xl:  0 24px 60px rgba(0,0,0,.18),0 8px 20px rgba(0,0,0,.10);
  --radius-sm:  6px;
  --radius-md:  10px;
  --radius-lg:  16px;
  --radius-xl:  24px;
  --font-body:  'Inter', sans-serif;
  --font-head:  'Poppins', sans-serif;
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-sans);
  color: var(--text-primary);
  background: var(--gray-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--blue-accent); text-decoration: none; }
a:hover { color: var(--blue-bright); }

/* ── Container ── */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.container--wide { max-width: 1400px; }
.container--narrow { max-width: 800px; }

/* ── Typography ── */
h1,h2,h3,h4,h5,h6 { font-family: var(--font-head); color: var(--navy); line-height: 1.25; }
h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 800; }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 700; }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.4rem); font-weight: 600; }
h4 { font-size: 1.1rem; font-weight: 600; }
p  { color: var(--text-secondary); font-size: 0.97rem; }
.lead { font-size: 1.1rem; color: var(--text-secondary); line-height: 1.7; }
.text-muted { color: var(--text-muted); font-size: 0.875rem; }
.text-accent { color: var(--blue-accent); }
.text-center { text-align: center; }

/* ── Section Spacing ── */
.section { padding: 72px 0; }
.section--sm { padding: 48px 0; }
.section--lg { padding: 96px 0; }
.section--dark { background: var(--navy); }
.section--navy-mid { background: var(--navy-mid); }
.section--gray { background: var(--gray-bg); }
.section--white { background: var(--white); }

/* ── Section Headers ── */
.section-header { text-align: center; margin-bottom: 48px; }
.section-header h2 { margin-bottom: 12px; }
.section-header p { color: var(--text-muted); max-width: 560px; margin: 0 auto; }
.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue-bright);
  background: rgba(29,111,164,0.1);
  border: 1px solid rgba(29,111,164,0.2);
  border-radius: 20px;
  padding: 4px 14px;
  margin-bottom: 14px;
}

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--navy);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 2px 20px rgba(0,0,0,0.3);
  /* Ensure sticky works regardless of parent overflow */
  width: 100%;
  left: 0;
}
/* Force sticky on mobile too */
@media (max-width: 768px) {
  .navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
  }
}
.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.navbar__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.navbar__logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--blue-accent), var(--blue-bright));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: white;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(29,111,164,0.4);
}
.navbar__logo-text { color: white; font-family: var(--font-head); font-weight: 700; font-size: 1.05rem; line-height: 1.2; }
.navbar__logo-sub { color: rgba(255,255,255,0.5); font-size: 0.7rem; font-weight: 400; letter-spacing: 0.05em; display: block; }
.navbar__nav { display: flex; align-items: center; gap: 4px; }
.navbar__link {
  color: rgba(255,255,255,0.75);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
  position: relative;
}
.navbar__link:hover, .navbar__link.active {
  color: white;
  background: rgba(255,255,255,0.08);
}
.navbar__link.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 2px;
  background: var(--blue-bright);
  border-radius: 2px;
}
.navbar__dropdown { position: relative; }
.navbar__dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 220px;
  background: var(--navy-mid);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  z-index: 100;
}
.navbar__dropdown:hover .navbar__dropdown-menu { display: block; }
.navbar__dropdown-item {
  display: block;
  color: rgba(255,255,255,0.75);
  font-size: 0.85rem;
  padding: 10px 16px;
  transition: all 0.15s;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.navbar__dropdown-item:hover { background: rgba(255,255,255,0.08); color: white; }
.navbar__cta {
  background: var(--blue-accent);
  color: white !important;
  border-radius: var(--radius-sm);
  padding: 8px 18px !important;
  font-weight: 600;
  transition: background 0.2s, transform 0.15s;
}
.navbar__cta:hover { background: var(--blue-bright); transform: translateY(-1px); }
.navbar__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}
.navbar__hamburger span {
  width: 22px; height: 2px;
  background: rgba(255,255,255,0.75);
  border-radius: 2px;
  transition: all 0.3s;
}
.navbar__mobile { display: none; }


/* Mobile Navbar */
.navbar__mobile {
  display: none;
  background: var(--navy-mid);
  border-top: 1px solid rgba(255,255,255,0.08);
  animation: slideDown 0.25s ease;
}

.navbar__mobile.open {
  display: block;
}

.navbar__mobile-link {
  display: block;
  padding: 14px 20px;
  color: rgba(255,255,255,0.78);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.navbar__mobile-link:hover {
  background: rgba(255,255,255,0.06);
  color: white;
}


/* ============================================================
   HERO SECTION
   ============================================================ */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 50%, #0d2a4f 100%);
  padding: 72px 0 80px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.02'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero::after {
  content: '';
  position: absolute;
  top: -200px; right: -200px;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(29,111,164,0.15) 0%, transparent 70%);
  pointer-events: none;
}
.hero__content { position: relative; z-index: 1; }
.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 20px;
  padding: 6px 16px;
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(255,255,255,0.8);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.hero__badge-dot { width: 6px; height: 6px; background: var(--blue-bright); border-radius: 50%; animation: pulse 2s infinite; }
@keyframes pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.6;transform:scale(1.3)} }
.hero h1 { color: white; margin-bottom: 16px; }
.hero h1 span { color: var(--blue-bright); }
.hero__sub { color: rgba(255,255,255,0.65); font-size: 1.05rem; max-width: 560px; margin-bottom: 32px; line-height: 1.7; }
.hero__stats {
  display: flex;
  gap: 32px;
  margin-top: 40px;
  flex-wrap: wrap;
}
.hero__stat-item { color: rgba(255,255,255,0.7); font-size: 0.85rem; display: flex; align-items: center; gap: 6px; }
.hero__stat-item strong { color: white; font-family: var(--font-head); }

/* ============================================================
   CALCULATOR CARD
   ============================================================ */
.calc-card {
  background: white;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  border: 1px solid var(--border);
}
.calc-card__header {
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  padding: 20px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: gap;
}
.calc-card__title { color: white; font-family: var(--font-head); font-size: 1.05rem; font-weight: 700; }
.calc-card__subtitle { color: rgba(255,255,255,0.55); font-size: 0.78rem; }
.calc-card__body { padding: 28px; }

/* Unit Toggle */
.unit-toggle {
  display: inline-flex;
  background: rgba(255,255,255,0.13);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 8px;
  padding: 3px;
  gap: 2px;
}
.unit-toggle__btn {
  padding: 7px 18px;
  font-size: 0.82rem;
  font-weight: 700;
  color: rgba(255,255,255,0.6);
  cursor: pointer;
  transition: all 0.18s;
  border: none;
  background: transparent;
  border-radius: 6px;
  white-space: nowrap;
  font-family: var(--font-body);
  letter-spacing: 0.01em;
}
.unit-toggle__btn.active {
  background: #ffffff;
  color: var(--blue);
  box-shadow: 0 2px 6px rgba(0,0,0,0.18);
  font-weight: 700;
}
.unit-toggle__btn:not(.active):hover {
  color: rgba(255,255,255,0.9);
  background: rgba(255,255,255,0.1);
}
/* unit label shown next to toggle */
.unit-toggle-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(255,255,255,0.35);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-right: 8px;
  align-self: center;
}

/* ── Share Panel ── */
.share-panel {
  display: none;
  margin-top: 20px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  padding: 20px;
  animation: fadeSlideDown 0.22s ease;
}
.share-panel.open { display: block; }
@keyframes fadeSlideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.share-panel__title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.35);
  margin-bottom: 14px;
}
.share-panel__row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.share-panel__row:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.share-panel__section-label {
  width: 100%;
  font-size: 0.67rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: rgba(255,255,255,0.28);
  margin-bottom: 4px;
}
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  border-radius: 9px;
  border: none;
  cursor: pointer;
  font-size: 0.81rem;
  font-weight: 600;
  transition: opacity 0.15s, transform 0.12s;
  text-decoration: none;
  white-space: nowrap;
}
.share-btn:hover { opacity: 0.88; transform: translateY(-1px); }
.share-btn:active { transform: translateY(0); }
.share-btn--wa   { background: #22c55e; color: #fff; }
.share-btn--fb   { background: #1877f2; color: #fff; }
.share-btn--x    { background: #000;    color: #fff; }
.share-btn--li   { background: #0a66c2; color: #fff; }
.share-btn--copy { background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.85); border: 1px solid rgba(255,255,255,0.18); }
.share-btn--pdf  { background: #dc2626; color: #fff; }
.share-btn--print{ background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.85); border: 1px solid rgba(255,255,255,0.18); }
.share-btn--embed{ background: rgba(255,255,255,0.07); color: rgba(255,255,255,0.7); border: 1px solid rgba(255,255,255,0.15); font-family: monospace; }
.share-embed-box {
  display: none;
  margin-top: 10px;
}
.share-embed-box.open { display: block; }
.share-embed-box textarea {
  width: 100%;
  background: rgba(0,0,0,0.35);
  color: #7dd3fc;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.72rem;
  font-family: 'Courier New', monospace;
  resize: none;
  height: 60px;
}
.share-embed-box button {
  margin-top: 8px;
  padding: 7px 16px;
  border-radius: 7px;
  border: none;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 600;
  background: #2563eb;
  color: white;
}


/* Pipe Type Tabs */
.pipe-tabs { display: flex; gap: 8px; margin-bottom: 24px; flex-wrap: wrap; }
.pipe-tab {
  padding: 8px 18px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
  background: white;
}
.pipe-tab.active, .pipe-tab:hover {
  border-color: var(--blue-accent);
  color: var(--blue-accent);
  background: var(--blue-soft);
}
.pipe-tab.active { background: var(--blue-accent); color: white; border-color: var(--blue-accent); }

/* Form Grid */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.form-group input, .form-group select {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-family: var(--font-sans);
  color: var(--text-primary);
  background: var(--gray-bg);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}
.form-group input:focus, .form-group select:focus {
  border-color: var(--blue-accent);
  box-shadow: 0 0 0 3px rgba(29,111,164,0.12);
  background: white;
}
.input-suffix {
  position: relative;
}
.input-suffix input { padding-right: 48px; }
.input-suffix__unit {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  pointer-events: none;
}

/* Result Panel */
.result-panel {
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-top: 24px;
  display: none;
}
.result-panel.visible { display: block; }
.result-panel__title { color: rgba(255,255,255,0.6); font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 16px; }
.result-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 16px; }
.result-item { text-align: center; }
.result-item__value { font-family: var(--font-head); font-size: 1.6rem; font-weight: 800; color: white; line-height: 1.1; }
.result-item__label { color: rgba(255,255,255,0.5); font-size: 0.75rem; font-weight: 500; margin-top: 4px; }
.result-item__unit { color: var(--blue-bright); font-size: 0.8rem; font-weight: 600; }
.result-divider { width: 1px; background: rgba(255,255,255,0.1); align-self: stretch; margin: 0 4px; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}
.btn--primary { background: var(--blue-accent); color: white; }
.btn--primary:hover { background: var(--blue-bright); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(29,111,164,0.35); color: white; }
.btn--outline {
  background: transparent;
  color: var(--blue-accent);
  border: 2px solid var(--blue-accent);
}
.btn--outline:hover { background: var(--blue-accent); color: white; }
.btn--ghost { background: rgba(255,255,255,0.1); color: white; border: 1px solid rgba(255,255,255,0.2); }
.btn--ghost:hover { background: rgba(255,255,255,0.18); }
.btn--sm { padding: 8px 16px; font-size: 0.82rem; }
.btn--lg { padding: 14px 32px; font-size: 1rem; }
.btn--full { width: 100%; }
.btn--danger { background: var(--red); color: white; }
.btn--success { background: var(--success); color: white; }

/* Calc Action Buttons */
.calc-actions { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.calc-actions .btn { flex: 1; min-width: 120px; }

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, transform 0.2s;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card--flat { box-shadow: none; }
.card--dark { background: var(--navy); border-color: rgba(255,255,255,0.08); }
.card--accent { border-left: 4px solid var(--blue-accent); }
.card__icon {
  width: 48px; height: 48px;
  background: var(--blue-soft);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 16px;
}
.card--dark .card__icon { background: rgba(255,255,255,0.08); }

/* Pipe Category Cards */
.pipe-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.pipe-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  transition: all 0.2s;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.pipe-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--blue-accent), var(--blue-bright));
  transform: scaleX(0);
  transition: transform 0.3s;
}
.pipe-card:hover::before, .pipe-card.active::before { transform: scaleX(1); }
.pipe-card:hover, .pipe-card.active { border-color: var(--blue-accent); box-shadow: var(--shadow-md); transform: translateY(-3px); }
.pipe-card__icon { font-size: 2.5rem; margin-bottom: 12px; }
.pipe-card h3 { font-size: 1rem; color: var(--navy); margin-bottom: 6px; }
.pipe-card p { font-size: 0.82rem; color: var(--text-muted); }
.pipe-card__link {
  display: inline-block;
  margin-top: 12px;
  font-size: 0.8rem;
  color: var(--blue-accent);
  font-weight: 600;
}

/* Blog Cards */
.blog-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.blog-card {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: all 0.2s;
}
.blog-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.blog-card__img {
  height: 180px;
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  position: relative;
  overflow: hidden;
}
.blog-card__img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M0 38.59l2.83-2.83 1.41 1.41L1.41 40H0v-1.41zM0 1.4l2.83 2.83 1.41-1.41L1.41 0H0v1.41zM38.59 40l-2.83-2.83 1.41-1.41L40 38.59V40h-1.41zM40 1.41l-2.83 2.83-1.41-1.41L38.59 0H40v1.41zM20 18.6l2.83-2.83 1.41 1.41L21.41 20l2.83 2.83-1.41 1.41L20 21.41l-2.83 2.83-1.41-1.41L18.59 20l-2.83-2.83 1.41-1.41L20 18.59z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.blog-card__body { padding: 20px; }
.blog-card__tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue-accent);
  background: var(--blue-soft);
  border-radius: 4px;
  padding: 3px 8px;
  margin-bottom: 10px;
}
.blog-card__title { font-size: 1rem; color: var(--navy); margin-bottom: 8px; font-weight: 600; line-height: 1.4; }
.blog-card__excerpt { font-size: 0.84rem; color: var(--text-muted); line-height: 1.6; margin-bottom: 14px; }
.blog-card__meta { display: flex; align-items: center; justify-content: space-between; font-size: 0.78rem; color: var(--text-muted); }

/* ============================================================
   TABLES
   ============================================================ */
.table-wrap { overflow-x: auto; border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }
.eng-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  font-size: 0.875rem;
}
.eng-table thead th {
  background: var(--navy);
  color: white;
  padding: 12px 16px;
  text-align: left;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}
.eng-table thead th:first-child { border-radius: var(--radius-md) 0 0 0; }
.eng-table thead th:last-child { border-radius: 0 var(--radius-md) 0 0; }
.eng-table tbody tr { transition: background 0.15s; border-bottom: 1px solid var(--gray-light); }
.eng-table tbody tr:hover { background: var(--blue-soft); }
.eng-table tbody tr:nth-child(even) { background: var(--gray-bg); }
.eng-table tbody tr:nth-child(even):hover { background: var(--blue-soft); }
.eng-table td { padding: 10px 16px; color: var(--text-secondary); white-space: nowrap; }
.eng-table td:first-child { font-weight: 600; color: var(--navy); }
.eng-table tfoot td {
  background: var(--gray-light);
  color: var(--text-muted);
  font-size: 0.75rem;
  padding: 8px 16px;
  text-align: center;
}
.table-section { margin-bottom: 48px; }
.table-section h3 { margin-bottom: 16px; color: var(--navy); }

/* ============================================================
   FORMULA BLOCKS
   ============================================================ */
.formula-block {
  background: var(--navy);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin: 20px 0;
  border-left: 4px solid var(--blue-bright);
  position: relative;
  overflow: hidden;
}
.formula-block::after {
  content: '{ }';
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 4rem;
  font-weight: 800;
  color: rgba(255,255,255,0.04);
  font-family: monospace;
}
.formula-block__label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--blue-bright);
  margin-bottom: 10px;
}
.formula-block__formula {
  font-family: 'Courier New', monospace;
  font-size: 1rem;
  color: white;
  font-weight: 700;
  line-height: 1.6;
  white-space: pre-wrap;
}
.formula-block__note {
  margin-top: 12px;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
  line-height: 1.5;
}

/* ============================================================
   FAQ
   ============================================================ */
.faq-list { display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.2s;
}
.faq-item.open { border-color: var(--blue-accent); }
.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--navy);
  gap: 16px;
}
.faq-question:hover { color: var(--blue-accent); }
.faq-arrow { font-size: 1rem; color: var(--text-muted); transition: transform 0.3s; flex-shrink: 0; }
.faq-item.open .faq-arrow { transform: rotate(180deg); color: var(--blue-accent); }
.faq-answer {
  display: none;
  padding: 0 20px 18px;
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.7;
  border-top: 1px solid var(--gray-light);
  padding-top: 14px;
}
.faq-item.open .faq-answer { display: block; }

/* ============================================================
   FEATURE / BENEFIT ITEMS
   ============================================================ */
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.feature-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.feature-icon {
  width: 44px; height: 44px;
  background: var(--blue-soft);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.feature-item h4 { font-size: 0.95rem; color: var(--navy); margin-bottom: 4px; }
.feature-item p { font-size: 0.84rem; color: var(--text-muted); }

/* Stats Row */
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 24px; }
.stat-item { text-align: center; }
.stat-value { font-family: var(--font-head); font-size: 2.4rem; font-weight: 800; color: var(--blue-bright); }
.stat-label { font-size: 0.85rem; color: rgba(255,255,255,0.6); margin-top: 4px; }

/* ============================================================
   BREADCRUMB
   ============================================================ */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.5);
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.breadcrumb a { color: rgba(255,255,255,0.6); text-decoration: none; }
.breadcrumb a:hover { color: white; }
.breadcrumb__sep { color: rgba(255,255,255,0.3); }

/* ============================================================
   PAGE HERO (inner pages)
   ============================================================ */
.page-hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
  padding: 48px 0 56px;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.02'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.page-hero__content { position: relative; z-index: 1; }
.page-hero h1 { color: white; }
.page-hero p { color: rgba(255,255,255,0.65); max-width: 640px; margin-top: 10px; }

/* ============================================================
   CONTACT PAGE
   ============================================================ */
.contact-grid { display: grid; grid-template-columns: 1fr 1.5fr; gap: 40px; align-items: start; }
.contact-info .card { margin-bottom: 16px; }
.contact-form { background: white; border-radius: var(--radius-lg); padding: 36px; box-shadow: var(--shadow-md); border: 1px solid var(--border); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
textarea.form-control {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.92rem;
  color: var(--text-primary);
  background: var(--gray-bg);
  resize: vertical;
  min-height: 130px;
  outline: none;
  transition: border-color 0.2s;
}
textarea.form-control:focus { border-color: var(--blue-accent); box-shadow: 0 0 0 3px rgba(29,111,164,0.12); background: white; }

/* ============================================================
   ABOUT PAGE
   ============================================================ */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.about-img-block {
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  border-radius: var(--radius-xl);
  padding: 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.about-img-block::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M0 40L40 0H20L0 20M40 40V20L20 40'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.about-icon-big { font-size: 6rem; position: relative; z-index: 1; }

/* ============================================================
   PRIVACY / LEGAL PAGES
   ============================================================ */
.legal-content { background: white; border-radius: var(--radius-lg); padding: 48px; box-shadow: var(--shadow-sm); border: 1px solid var(--border); }
.legal-content h2 { margin-top: 36px; margin-bottom: 12px; font-size: 1.2rem; }
.legal-content h2:first-child { margin-top: 0; }
.legal-content p { margin-bottom: 14px; font-size: 0.92rem; line-height: 1.8; }
.legal-content ul { padding-left: 20px; margin-bottom: 14px; }
.legal-content ul li { font-size: 0.92rem; color: var(--text-secondary); line-height: 1.8; margin-bottom: 6px; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--navy);
  color: rgba(255,255,255,0.7);
  padding: 64px 0 0;
}
.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}
.footer__brand p { font-size: 0.875rem; line-height: 1.7; color: rgba(255,255,255,0.5); margin-top: 12px; max-width: 280px; }
.footer__col h4 { color: white; font-size: 0.85rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 16px; }
.footer__col ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer__col ul li a { color: rgba(255,255,255,0.5); font-size: 0.85rem; transition: color 0.2s; }
.footer__col ul li a:hover { color: white; }
.footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.07);
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.footer__bottom p { font-size: 0.8rem; color: rgba(255,255,255,0.35); }
.footer__bottom-links { display: flex; gap: 20px; }
.footer__bottom-links a { font-size: 0.8rem; color: rgba(255,255,255,0.35); }
.footer__bottom-links a:hover { color: rgba(255,255,255,0.7); }

/* ============================================================
   NOTICE / ALERT
   ============================================================ */
.notice {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 20px;
}
.notice--info { background: var(--blue-soft); border: 1px solid rgba(29,111,164,0.2); color: var(--navy); }
.notice--warning { background: #fff8e7; border: 1px solid rgba(243,156,18,0.3); color: #7c5200; }
.notice--success { background: #e8f8f0; border: 1px solid rgba(39,174,96,0.3); color: #1a5c35; }

/* ============================================================
   DOWNLOAD SECTION
   ============================================================ */
.download-bar {
  background: linear-gradient(90deg, var(--navy), var(--navy-light));
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.download-bar__info h4 { color: white; font-size: 1rem; margin-bottom: 4px; }
.download-bar__info p { color: rgba(255,255,255,0.5); font-size: 0.82rem; }
.download-bar__actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ============================================================
   INTERNAL LINKS
   ============================================================ */
.related-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.related-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: var(--blue-soft);
  border: 1px solid rgba(29,111,164,0.2);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--blue-accent);
  transition: all 0.2s;
}
.related-link:hover { background: var(--blue-accent); color: white; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer__brand { grid-column: 1 / -1; }
  .about-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .navbar__nav { display: none; }
  .navbar__hamburger { display: flex; }
  .navbar__mobile {
    display: block;
    background: var(--navy-mid);
    border-top: 1px solid rgba(255,255,255,0.06);
  }
  .navbar__mobile.open { display: block; }
  .navbar__mobile-link {
    display: block;
    color: rgba(255,255,255,0.75);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 12px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    transition: all 0.2s;
  }
  .navbar__mobile-link:hover { color: white; background: rgba(255,255,255,0.06); }
  .section { padding: 48px 0; }
  .form-row { grid-template-columns: 1fr; }
  .hero__stats { gap: 16px; }
  .footer__grid { grid-template-columns: 1fr; }
  .download-bar { flex-direction: column; align-items: flex-start; }
  .hero { padding: 48px 0 56px; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .calc-card__body { padding: 18px; }
  .form-grid { grid-template-columns: 1fr 1fr; }
  .result-grid { grid-template-columns: 1fr 1fr; }
  .calc-actions { flex-direction: column; }
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeInUp 0.5s ease forwards; }
.fade-in--delay-1 { animation-delay: 0.1s; opacity: 0; animation-fill-mode: forwards; }
.fade-in--delay-2 { animation-delay: 0.2s; opacity: 0; animation-fill-mode: forwards; }
.fade-in--delay-3 { animation-delay: 0.3s; opacity: 0; animation-fill-mode: forwards; }

/* ============================================================
   PRINT
   ============================================================ */
@media print {
  .navbar, .footer, .calc-actions, .btn { display: none !important; }
  body { background: white; }
  .calc-card { box-shadow: none; border: 1px solid #ccc; }
}


/* =========================
   MOBILE NAVBAR FIX
========================= */

@media (max-width: 768px) {

  .navbar__nav {
    display: none;
  }

  .navbar__hamburger {
    display: flex;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
  }

  .navbar__hamburger span {
    width: 24px;
    height: 2px;
    background: #ffffff;
    border-radius: 2px;
  }

  .navbar__mobile {
    display: none;
    background: #0f172a;
    border-top: 1px solid rgba(255,255,255,0.08);
    animation: slideDown 0.25s ease;
    padding: 10px 0;
  }

  .navbar__mobile.open {
    display: block;
  }

  .navbar__mobile-link {
    display: block;
    color: rgba(255,255,255,0.82);
    font-size: 0.95rem;
    font-weight: 500;
    padding: 14px 20px;
    text-decoration: none;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    transition: all 0.2s ease;
  }

  .navbar__mobile-link:hover {
    color: #ffffff;
    background: rgba(255,255,255,0.05);
  }

  .hero__grid,
  .benefits-grid,
  .chart-grid,
  .formula-grid,
  .footer__grid,
  .comparison-grid {
    grid-template-columns: 1fr !important;
  }

  .table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  table {
    min-width: 700px;
  }

  .hero {
    padding-top: 40px;
  }

  .hero h1 {
    font-size: 2rem;
    line-height: 1.2;
  }

  .calc-card {
    padding: 18px;
  }

  .btn,
  button {
    width: 100%;
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* =========================================
   MOBILE RESPONSIVE FIX
========================================= */

@media (max-width: 768px) {

  .navbar__nav {
    display: none;
  }

  .navbar__hamburger {
    display: flex;
  }

  .hero__stats,
  .footer__grid,
  .contact-grid,
  .about-grid,
  .features-grid,
  .blog-grid,
  .pipe-cards,
  .result-grid,
  .form-row {
    grid-template-columns: 1fr !important;
    flex-direction: column;
  }

  .hero {
    padding: 56px 0;
  }

  .hero h1 {
    font-size: 2rem;
    line-height: 1.2;
  }

  .hero__sub {
    font-size: 1rem;
  }

  .calc-card__body {
    padding: 18px;
  }

  .calc-actions {
    flex-direction: column;
  }

  .calc-actions .btn {
    width: 100%;
  }

  .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .eng-table {
    min-width: 700px;
  }

  .footer__grid {
    grid-template-columns: 1fr;
  }

  .contact-grid,
  .about-grid {
    grid-template-columns: 1fr;
  }

  .container {
    padding: 0 16px;
  }

}

/* Animation */

@keyframes slideDown {

  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }

}




/* ============================================================
   INDEX PAGE — HOME SPECIFIC STYLES
   ============================================================ */

/* ============================================================
   INDEX PAGE — HOME SPECIFIC STYLES
   (merged from inline styles)
   ============================================================ */


/* ============================================================
   DESIGN SYSTEM — INDUSTRIAL ENGINEERING PLATFORM
   ============================================================ */

*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth}
body{font-family:var(--font-body);background:var(--gray-50);color:var(--gray-800);font-size:15px;line-height:1.65}
.container{max-width:1200px;margin:0 auto;padding:0 24px}
h1,h2,h3,h4,h5{font-family:var(--font-head);line-height:1.25}
h1{font-size:clamp(28px,4vw,44px);font-weight:800}
h2{font-size:clamp(22px,3vw,32px);font-weight:700}
h3{font-size:clamp(17px,2vw,22px);font-weight:700}
h4{font-size:16px;font-weight:600}
p{color:var(--gray-600)}
a{color:var(--blue);text-decoration:none}
a:hover{color:var(--blue-light)}
.section-tag{font-size:12px;font-weight:700;letter-spacing:1.2px;text-transform:uppercase;color:var(--blue);margin-bottom:10px}

/* ── Navbar ── */
#navbar{position:sticky;top:0;z-index:1000;background:var(--navy);border-bottom:1px solid rgba(255,255,255,.06);box-shadow:0 2px 20px rgba(0,0,0,.25)}
.nav-inner{display:flex;align-items:center;justify-content:space-between;height:62px}
.nav-logo{display:flex;align-items:center;gap:10px;text-decoration:none}
.nav-logo-icon{width:36px;height:36px;background:linear-gradient(135deg,var(--blue),#0a3f8a);border-radius:8px;display:flex;align-items:center;justify-content:center;font-size:16px}
.nav-logo-text{font-family:var(--font-head);font-weight:700;font-size:16px;color:var(--white);line-height:1.2}
.nav-logo-text span{color:var(--blue-light)}
.nav-logo-sub{color:rgba(255,255,255,.4);font-size:11px;font-weight:400;display:block}
.nav-links{display:flex;align-items:center;gap:4px;list-style:none}
.nav-links a{display:block;padding:7px 13px;color:rgba(255,255,255,.75);font-size:13.5px;font-weight:500;border-radius:var(--radius-sm);transition:all .18s;text-decoration:none}
.nav-links a:hover,.nav-links a.active{color:var(--white);background:rgba(255,255,255,.08)}
.nav-dropdown{position:relative}
.nav-dropdown-menu{display:none;position:absolute;top:calc(100% + 8px);left:0;background:var(--white);border:1px solid var(--gray-200);border-radius:var(--radius-md);box-shadow:var(--shadow-lg);min-width:230px;padding:8px;z-index:100}
.nav-dropdown:hover .nav-dropdown-menu{display:block}
.nav-dropdown-menu a{display:block;padding:9px 14px;color:var(--gray-700)!important;font-size:13.5px;border-radius:var(--radius-sm)}
.nav-dropdown-menu a:hover{background:var(--gray-50)!important;color:var(--blue)!important}
.nav-cta{background:var(--blue)!important;color:var(--white)!important;padding:8px 16px!important;border-radius:var(--radius-sm)!important;font-weight:600!important}
.nav-cta:hover{background:var(--blue-light)!important}
.nav-hamburger{display:none;flex-direction:column;gap:5px;background:none;border:none;cursor:pointer;padding:6px}
.nav-hamburger span{display:block;width:22px;height:2px;background:var(--white);border-radius:2px;transition:all .2s}
.nav-mobile{display:none;background:var(--navy-mid);border-top:1px solid rgba(255,255,255,.06);padding:12px 24px 16px}
.nav-mobile.open{display:block}
.nav-mobile a{display:block;padding:10px 0;color:rgba(255,255,255,.8);font-size:14px;font-weight:500;border-bottom:1px solid rgba(255,255,255,.05);text-decoration:none}
.nav-mobile a:last-child{border-bottom:none}
.nav-mobile a:hover{color:var(--white)}

/* ── Buttons ── */
.btn{display:inline-flex;align-items:center;gap:8px;padding:12px 24px;border-radius:var(--radius-md);font-size:14px;font-weight:600;cursor:pointer;transition:all .2s;text-decoration:none;border:none;font-family:var(--font-body)}
.btn-primary{background:var(--blue);color:var(--white);box-shadow:0 4px 14px rgba(30,111,220,.35)}
.btn-primary:hover{background:var(--blue-light);transform:translateY(-1px);box-shadow:0 6px 20px rgba(30,111,220,.45);color:var(--white)}
.btn-outline{background:rgba(255,255,255,.06);color:var(--white);border:1px solid rgba(255,255,255,.2)}
.btn-outline:hover{background:rgba(255,255,255,.12);color:var(--white)}
.btn-white{background:var(--white);color:var(--blue);box-shadow:0 4px 14px rgba(0,0,0,.15)}
.btn-white:hover{background:var(--gray-50);transform:translateY(-1px);color:var(--blue)}
.btn-outline-white{background:transparent;color:var(--white);border:2px solid rgba(255,255,255,.4)}
.btn-outline-white:hover{border-color:var(--white);background:rgba(255,255,255,.08);color:var(--white)}
.btn-sm{padding:9px 18px;font-size:13px}
.btn-lg{padding:15px 32px;font-size:15px}

/* ── Stats Bar ── */
.stats-bar{background:var(--white);border-bottom:1px solid var(--gray-200);padding:13px 0}
.stats-bar-inner{display:flex;align-items:center;justify-content:center;gap:40px;flex-wrap:wrap}
.stat-pill{display:flex;align-items:center;gap:8px}
.stat-pill-num{font-family:var(--font-head);font-weight:700;font-size:18px;color:var(--navy)}
.stat-pill-label{font-size:12.5px;color:var(--gray-500)}
.stat-divider{height:24px;width:1px;background:var(--gray-200);flex-shrink:0}

/* ── Hero ── */
.hero{background:linear-gradient(135deg,var(--navy) 0%,var(--navy-light) 60%,#1a3a6b 100%);padding:64px 0 72px;position:relative;overflow:hidden}
.hero::before{content:'';position:absolute;inset:0;background:url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3Cpattern id='g' width='60' height='60' patternUnits='userSpaceOnUse'%3E%3Cpath d='M 60 0 L 0 0 0 60' fill='none' stroke='rgba(255,255,255,0.03)' stroke-width='1'/%3E%3C/pattern%3E%3C/defs%3E%3Crect width='60' height='60' fill='url(%23g)'/%3E%3C/svg%3E")}
.hero::after{content:'';position:absolute;top:-150px;right:-150px;width:500px;height:500px;background:radial-gradient(circle,rgba(30,111,220,.15),transparent 70%);pointer-events:none}
.hero-inner{position:relative;z-index:1;display:grid;grid-template-columns:1fr 1fr;gap:60px;align-items:center}
.hero-eyebrow{display:inline-flex;align-items:center;gap:8px;background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.12);border-radius:100px;padding:6px 14px;font-size:12px;font-weight:600;color:rgba(255,255,255,.8);letter-spacing:.6px;text-transform:uppercase;margin-bottom:20px}
.eyebrow-dot{width:6px;height:6px;background:#4ade80;border-radius:50%;animation:blink 2s infinite}
@keyframes blink{0%,100%{opacity:1}50%{opacity:.4}}
.hero h1{color:var(--white);margin-bottom:18px}
.hero h1 span{color:var(--blue-light)}
.hero-sub{color:rgba(255,255,255,.7);font-size:16px;line-height:1.7;margin-bottom:30px}
.hero-stats{display:flex;gap:28px;flex-wrap:wrap;margin-bottom:32px}
.hero-stat-num{font-family:var(--font-head);font-size:24px;font-weight:800;color:var(--white);line-height:1}
.hero-stat-label{font-size:12px;color:rgba(255,255,255,.55);margin-top:3px}
.hero-btns{display:flex;gap:12px;flex-wrap:wrap}

/* ── Hero Calc Card ── */
.hero-calc-card{background:var(--white);border-radius:var(--radius-xl);box-shadow:var(--shadow-xl);padding:28px}
.calc-card-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:18px;gap:10px;flex-wrap:wrap}
.calc-card-title{font-size:15px;font-weight:700;color:var(--navy);font-family:var(--font-head)}
.unit-toggle{display:flex;background:var(--gray-100);border-radius:8px;padding:3px;gap:2px}
.unit-btn{padding:5px 14px;border-radius:6px;font-size:12px;font-weight:600;cursor:pointer;border:none;transition:all .18s;background:transparent;color:var(--gray-500);font-family:var(--font-body)}
.unit-btn.active{background:var(--white);color:var(--blue);box-shadow:0 1px 4px rgba(0,0,0,.12)}
.pipe-type-tabs{display:flex;gap:6px;margin-bottom:16px}
.pipe-tab{flex:1;padding:8px 6px;border:1.5px solid var(--gray-200);border-radius:var(--radius-sm);background:var(--white);font-size:12.5px;font-weight:600;cursor:pointer;text-align:center;color:var(--gray-500);transition:all .18s}
.pipe-tab.active{border-color:var(--blue);background:var(--blue-soft);color:var(--blue)}
.pipe-tab:hover:not(.active){border-color:var(--gray-300);color:var(--gray-700)}
.calc-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:14px}
.form-group{display:flex;flex-direction:column;gap:5px}
.form-label{font-size:11.5px;font-weight:600;color:var(--gray-500);text-transform:uppercase;letter-spacing:.4px}
.form-input,.form-select{height:40px;padding:0 12px;border:1.5px solid var(--gray-200);border-radius:var(--radius-sm);font-size:14px;color:var(--gray-800);background:var(--white);transition:border-color .18s;font-family:var(--font-body);width:100%}
.form-input:focus,.form-select:focus{outline:none;border-color:var(--blue);box-shadow:0 0 0 3px rgba(30,111,220,.1)}
.result-box{background:linear-gradient(135deg,var(--navy),var(--steel));border-radius:var(--radius-md);padding:18px 20px;display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:14px}
.result-label{font-size:11px;font-weight:600;color:rgba(255,255,255,.5);text-transform:uppercase;letter-spacing:.5px;margin-bottom:3px}
.result-value{font-family:var(--font-head);font-size:20px;font-weight:700;color:var(--white);line-height:1}
.result-value span{font-size:13px;font-weight:500;color:rgba(255,255,255,.6)}
.calc-actions{display:flex;gap:8px}

/* ── Sections ── */
.section{padding:64px 0}
.section-dark{background:var(--navy);color:var(--white)}
.section-gray{background:var(--gray-100)}
.section-header{text-align:center;margin-bottom:44px}
.section-header h2{color:var(--navy);margin-bottom:12px}
.section-header p{color:var(--gray-500);max-width:560px;margin:0 auto;font-size:15px}
.section-dark .section-header h2{color:var(--white)}
.section-dark .section-header p{color:rgba(255,255,255,.6)}

/* ── Pipe Cards ── */
.pipe-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:20px}
.pipe-card{background:var(--white);border-radius:var(--radius-lg);border:1.5px solid var(--gray-200);padding:28px 24px;cursor:pointer;transition:all .22s;text-decoration:none;display:block;box-shadow:var(--shadow-sm);position:relative;overflow:hidden}
.pipe-card::before{content:'';position:absolute;top:0;left:0;right:0;height:3px;background:linear-gradient(90deg,var(--blue),var(--blue-light));transform:scaleX(0);transition:transform .3s}
.pipe-card:hover::before{transform:scaleX(1)}
.pipe-card:hover{border-color:var(--blue);transform:translateY(-3px);box-shadow:var(--shadow-lg);color:inherit}
.pipe-card-icon{width:52px;height:52px;border-radius:var(--radius-md);display:flex;align-items:center;justify-content:center;font-size:22px;margin-bottom:18px}
.pipe-card h3{font-size:16px;color:var(--navy);margin-bottom:7px}
.pipe-card p{font-size:13.5px;color:var(--gray-500);margin-bottom:14px}
.pipe-card-link{font-size:13px;font-weight:600;color:var(--blue);display:flex;align-items:center;gap:5px}

/* ── Full Calculator ── */
.full-calc-wrap{background:var(--white);border-radius:var(--radius-xl);box-shadow:var(--shadow-lg);border:1px solid var(--gray-200);overflow:hidden}
.full-calc-header{background:linear-gradient(135deg,var(--navy),var(--steel));padding:28px 32px;display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:16px}
.full-calc-title{color:var(--white);font-size:20px;font-weight:700;font-family:var(--font-head)}
.full-calc-sub{color:rgba(255,255,255,.6);font-size:13px;margin-top:3px}
.full-calc-body{padding:32px}
.full-pipe-tabs{display:flex;gap:8px;margin-bottom:28px;flex-wrap:wrap}
.full-pipe-tab{padding:9px 20px;border:1.5px solid var(--gray-200);border-radius:var(--radius-sm);background:var(--white);font-size:13.5px;font-weight:600;cursor:pointer;color:var(--gray-500);transition:all .18s;font-family:var(--font-body)}
.full-pipe-tab.active{border-color:var(--blue);background:var(--blue);color:var(--white)}
.full-pipe-tab:hover:not(.active){border-color:var(--blue);color:var(--blue)}
.full-calc-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px;margin-bottom:24px}
.full-result{background:linear-gradient(135deg,var(--navy),var(--steel));border-radius:var(--radius-lg);padding:24px 28px;margin-bottom:20px;display:grid;grid-template-columns:repeat(4,1fr);gap:16px;transition:opacity .3s}
.full-result-label{font-size:11px;color:rgba(255,255,255,.5);font-weight:600;text-transform:uppercase;letter-spacing:.5px;margin-bottom:5px}
.full-result-value{font-size:22px;font-weight:800;color:var(--white);font-family:var(--font-head);line-height:1}
.full-result-value span{font-size:13px;font-weight:400;color:rgba(255,255,255,.55)}
.full-calc-actions{display:flex;gap:12px;flex-wrap:wrap}

/* ── Formula Cards ── */
.formula-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(340px,1fr));gap:24px}
.formula-card{background:var(--white);border-radius:var(--radius-lg);border:1px solid var(--gray-200);overflow:hidden;box-shadow:var(--shadow-sm)}
.formula-card-head{background:linear-gradient(135deg,var(--navy),var(--steel));padding:20px 24px;display:flex;align-items:center;gap:14px}
.formula-icon{width:56px;height:56px;border-radius:10px;background:rgba(255,255,255,.08);display:flex;align-items:center;justify-content:center;flex-shrink:0;padding:2px}
.formula-icon svg{width:52px;height:52px;display:block}
.formula-card-head h3{color:var(--white);font-size:16px}
.formula-card-head p{color:rgba(255,255,255,.6);font-size:12px;margin-top:2px}
.formula-block-code{background:var(--navy);margin:20px 24px 0;border-radius:var(--radius-md);padding:16px 18px;font-family:'Courier New',monospace;font-size:13px;color:#64d8ff;line-height:1.7;border-left:3px solid var(--blue)}
.formula-vars{padding:16px 24px 20px}
.formula-var-row{display:flex;align-items:flex-start;gap:10px;padding:7px 0;border-bottom:1px solid var(--gray-100);font-size:13px}
.formula-var-row:last-child{border-bottom:none}
.formula-var-name{font-family:'Courier New',monospace;font-weight:700;color:var(--blue);min-width:80px}
.formula-var-desc{color:var(--gray-600)}

/* ── Chart Table ── */
.chart-table-wrap{background:var(--white);border-radius:var(--radius-lg);box-shadow:var(--shadow-md);border:1px solid var(--gray-200);overflow:hidden}
.chart-table-head{background:linear-gradient(135deg,var(--navy),var(--steel));padding:20px 24px;display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px}
.chart-table-head h3{color:var(--white);font-size:16px}
.chart-table-head p{color:rgba(255,255,255,.6);font-size:12.5px;margin-top:2px}
.chart-table-scroll{overflow-x:auto}
table.eng-table{width:100%;border-collapse:collapse;font-size:13.5px}
.eng-table th{background:var(--gray-800);color:var(--white);padding:12px 16px;text-align:left;font-size:11.5px;font-weight:600;text-transform:uppercase;letter-spacing:.5px;white-space:nowrap}
.eng-table td{padding:11px 16px;color:var(--gray-700);border-bottom:1px solid var(--gray-100);white-space:nowrap}
.eng-table tr:hover td{background:var(--blue-soft)}
.eng-table tr:last-child td{border-bottom:none}
.eng-table td:first-child{font-weight:600;color:var(--navy)}
.eng-table td.highlight{color:var(--blue);font-weight:600}

/* ── FAQ ── */
.faq-list{max-width:800px;margin:0 auto}
.faq-item{border:1px solid var(--gray-200);border-radius:var(--radius-md);margin-bottom:10px;overflow:hidden;background:var(--white)}
.faq-item.open{border-color:var(--blue)}
.faq-q{padding:18px 22px;cursor:pointer;display:flex;align-items:center;justify-content:space-between;font-weight:600;font-size:15px;color:var(--navy);gap:12px}
.faq-q:hover{background:var(--gray-50)}
.faq-icon{width:28px;height:28px;min-width:28px;border-radius:50%;background:var(--blue-soft);display:flex;align-items:center;justify-content:center;font-size:16px;color:var(--blue);transition:transform .2s}
.faq-item.open .faq-icon{transform:rotate(45deg)}
.faq-a{max-height:0;overflow:hidden;transition:max-height .3s ease;padding:0 22px}
.faq-item.open .faq-a{max-height:300px;padding-bottom:18px}
.faq-a p{color:var(--gray-600);font-size:14.5px;line-height:1.7}

/* ── Blog Cards ── */
.blog-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:24px}
.blog-card{background:var(--white);border-radius:var(--radius-lg);border:1.5px solid var(--gray-200);overflow:hidden;transition:all .22s;box-shadow:var(--shadow-sm);text-decoration:none;display:block;color:inherit}
.blog-card:hover{transform:translateY(-3px);box-shadow:var(--shadow-lg);border-color:var(--blue)}
.blog-card-img{height:170px;display:flex;align-items:center;justify-content:center;font-size:48px}
.blog-card-body{padding:20px 22px}
.blog-meta{display:flex;align-items:center;gap:8px;font-size:11.5px;color:var(--gray-400);margin-bottom:10px}
.blog-card h3{font-size:16px;color:var(--navy);margin-bottom:9px;line-height:1.35}
.blog-card p{font-size:13.5px;color:var(--gray-500);margin-bottom:14px}
.blog-read-more{font-size:13px;font-weight:600;color:var(--blue);display:flex;align-items:center;gap:5px}

/* ── Benefits ── */
.benefits-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:20px}
.benefit-card{text-align:center;padding:28px 20px;background:rgba(255,255,255,.05);border:1px solid rgba(255,255,255,.08);border-radius:var(--radius-lg)}
.benefit-icon{font-size:34px;margin-bottom:14px;display:block}
.benefit-card h4{color:var(--white);margin-bottom:8px;font-size:15px}
.benefit-card p{color:rgba(255,255,255,.55);font-size:13px}

/* ── Download Banner ── */
.download-banner{background:linear-gradient(135deg,var(--blue),#0a3f8a);border-radius:var(--radius-xl);padding:36px 40px;display:flex;align-items:center;justify-content:space-between;gap:24px;flex-wrap:wrap}
.download-banner h3{color:var(--white);font-size:20px;margin-bottom:6px}
.download-banner p{color:rgba(255,255,255,.7);font-size:14px}
.download-btns{display:flex;gap:10px;flex-wrap:wrap}

/* ── Info Box ── */
.info-box{background:var(--blue-soft);border:1px solid rgba(30,111,220,.2);border-left:4px solid var(--blue);border-radius:var(--radius-md);padding:16px 18px;margin-bottom:24px;font-size:14px;color:var(--gray-700)}
.info-box strong{color:var(--navy)}

/* ── Shortcut Grid ── */
.shortcut-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:12px}
.shortcut-card{background:var(--white);border:1.5px solid var(--gray-200);border-radius:var(--radius-md);padding:16px 18px;text-decoration:none;display:flex;align-items:center;gap:12px;transition:all .18s;color:inherit}
.shortcut-card:hover{border-color:var(--blue);transform:translateY(-2px);box-shadow:var(--shadow-md)}
.shortcut-icon{font-size:22px}
.shortcut-card h4{font-size:13px;color:var(--navy);margin-bottom:2px}
.shortcut-card p{font-size:11.5px;color:var(--gray-500)}

/* ── Toast ── */
#toast{position:fixed;bottom:24px;right:24px;z-index:9999;background:var(--navy);color:var(--white);padding:14px 20px;border-radius:var(--radius-md);font-size:14px;font-weight:500;box-shadow:var(--shadow-xl);transform:translateY(80px);opacity:0;transition:all .3s cubic-bezier(.34,1.56,.64,1);display:flex;align-items:center;gap:10px}
#toast.show{transform:translateY(0);opacity:1}

/* ── Footer ── */
#footer{background:var(--navy);border-top:1px solid rgba(255,255,255,.06)}
.footer-main{display:grid;grid-template-columns:2fr 1fr 1fr 1fr;gap:40px;padding:52px 0 40px}
.footer-logo{display:flex;align-items:center;gap:10px;margin-bottom:16px}
.footer-logo-icon{width:34px;height:34px;border-radius:8px;background:linear-gradient(135deg,var(--blue),#0a3f8a);display:flex;align-items:center;justify-content:center;font-size:15px}
.footer-logo-text{font-family:var(--font-head);font-weight:700;font-size:15px;color:var(--white);line-height:1.2}
.footer-logo-text span{color:var(--blue-light)}
.footer-desc{color:rgba(255,255,255,.45);font-size:13.5px;line-height:1.7;margin-bottom:20px}
.footer-col h5{color:var(--white);font-size:13px;font-weight:700;text-transform:uppercase;letter-spacing:.8px;margin-bottom:16px}
.footer-links{list-style:none}
.footer-links li{margin-bottom:8px}
.footer-links a{color:rgba(255,255,255,.45);font-size:13.5px;text-decoration:none;transition:color .18s}
.footer-links a:hover{color:var(--white)}
.footer-bottom{border-top:1px solid rgba(255,255,255,.06);padding:18px 0;display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:10px}
.footer-bottom p{color:rgba(255,255,255,.35);font-size:12.5px}
.footer-bottom-links{display:flex;gap:20px}
.footer-bottom-links a{color:rgba(255,255,255,.35);font-size:12.5px;text-decoration:none}
.footer-bottom-links a:hover{color:var(--white)}

/* ── Responsive ── */
@media(max-width:992px){
  .hero-inner{grid-template-columns:1fr;gap:36px}
  .full-calc-grid{grid-template-columns:1fr 1fr}
  .full-result{grid-template-columns:1fr 1fr}
  .footer-main{grid-template-columns:1fr 1fr}
}
@media(max-width:768px){
  .nav-links{display:none}
  .nav-hamburger{display:flex}
  .hero{padding:40px 0 48px}
  .full-calc-grid{grid-template-columns:1fr}
  .footer-main{grid-template-columns:1fr;gap:28px}
  .formula-cards{grid-template-columns:1fr}
  .calc-form-grid{grid-template-columns:1fr}
  .result-box{grid-template-columns:1fr}
  .pipe-cards{grid-template-columns:1fr 1fr}
  .download-banner{padding:26px 24px;flex-direction:column;align-items:flex-start}
  .stats-bar-inner{gap:16px}
}
@media(max-width:480px){
  .pipe-cards{grid-template-columns:1fr}
  .full-result{grid-template-columns:1fr 1fr}
  .section{padding:44px 0}
  .full-calc-grid{grid-template-columns:1fr 1fr}
}


/* ============================================================
   COMPREHENSIVE MOBILE RESPONSIVE FIX — v3
   Covers: tables, calculator layout, sidebar, buttons, grids
   ============================================================ */

/* ── Calculator page: sidebar layout ── */
.calc-page-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 32px;
  align-items: start;
}

/* ── Calc actions: don't force full-width on desktop ── */
.calc-actions .btn {
  flex: 0 1 auto;
  min-width: 120px;
}

/* ── Related links ── */
.related-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* ── Table scroll wrapper ── */
.table-scroll-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-md);
}

/* ==============================
   MOBILE — max-width: 768px
   ============================== */
@media (max-width: 768px) {

  /* ── Container padding ── */
  .container {
    padding: 0 14px;
  }

  /* ── Calculator sidebar collapses below main ── */
  .calc-page-layout,
  [style*="grid-template-columns:1fr 320px"],
  [style*="grid-template-columns: 1fr 320px"] {
    display: block !important;
  }

  /* ── Section spacing ── */
  .section {
    padding: 36px 0;
  }
  .section--sm {
    padding: 24px 0;
  }

  /* ── Hero ── */
  .hero {
    padding: 40px 0 48px;
  }
  .hero h1 {
    font-size: clamp(1.6rem, 6vw, 2rem);
  }
  .page-hero__content h1 {
    font-size: clamp(1.5rem, 5.5vw, 2rem);
  }

  /* ── All grids → single column ── */
  .hero__grid,
  .hero__stats,
  .benefits-grid,
  .chart-grid,
  .formula-grid,
  .footer__grid,
  .footer-main,
  .comparison-grid,
  .features-grid,
  .blog-grid,
  .contact-grid,
  .about-grid,
  .pipe-cards,
  .formula-cards,
  .result-box {
    grid-template-columns: 1fr !important;
  }

  /* ── Pipe cards: 2 col on mobile is fine ── */
  .pipe-cards {
    grid-template-columns: 1fr 1fr !important;
  }

  /* ── Calculator card body ── */
  .calc-card__body {
    padding: 16px;
  }
  .calc-card__header {
    padding: 16px;
    flex-wrap: wrap;
    gap: 10px;
  }

  /* ── Form grid: 2 cols on mobile ── */
  .form-grid,
  .calc-form-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 12px;
  }

  /* ── Result grid: 2 cols ── */
  .result-grid,
  .full-result,
  .result-box {
    grid-template-columns: 1fr 1fr !important;
    gap: 10px;
  }

  /* ── Result item text ── */
  .result-item__value {
    font-size: 1.25rem;
  }

  /* ── Calc actions: wrap nicely, not full width ── */
  .calc-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  .calc-actions .btn {
    flex: 1 1 calc(50% - 8px);
    min-width: 100px;
    text-align: center;
    width: auto !important;
  }

  /* ── Pipe type tabs ── */
  .pipe-tabs,
  .full-pipe-tabs {
    gap: 6px;
  }
  .pipe-tab,
  .full-pipe-tab {
    font-size: 0.75rem;
    padding: 7px 10px;
    flex: 1;
  }

  /* ── Tables: scroll on mobile ── */
  .table-wrap,
  .chart-table-scroll,
  .table-scroll-wrap,
  .table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -14px;
    padding: 0 14px;
    border-radius: 0;
  }

  /* Remove min-width overrides on small screens — let tables scroll */
  .eng-table,
  table.eng-table {
    min-width: 560px;
    font-size: 12.5px;
  }
  .eng-table th,
  .eng-table td {
    padding: 9px 12px;
    white-space: nowrap;
  }

  /* ── Sidebar cards: stack and full width ── */
  .calc-page-layout > div:last-child {
    margin-top: 24px;
  }

  /* ── Download bar ── */
  .download-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
  .download-bar__actions {
    width: 100%;
  }
  .download-bar__actions .btn {
    width: 100%;
  }

  /* ── Related links ── */
  .related-links {
    gap: 8px;
  }
  .related-link {
    font-size: 0.78rem;
    padding: 6px 12px;
  }

  /* ── Notice boxes ── */
  .notice {
    font-size: 0.8rem;
    padding: 10px 12px;
  }

  /* ── Formula block ── */
  .formula-block {
    padding: 16px;
    overflow-x: auto;
  }
  .formula-block__formula {
    font-size: 0.82rem;
    white-space: nowrap;
  }

  /* ── Stats bar ── */
  .stats-bar-inner {
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
  }
  .stat-item {
    flex: 0 1 calc(50% - 12px);
    text-align: center;
  }

  /* ── Footer ── */
  .footer__brand {
    grid-column: 1 !important;
  }

  /* ── Breadcrumb ── */
  .breadcrumb {
    font-size: 0.8rem;
    flex-wrap: wrap;
  }

  /* ── Unit toggle compact ── */
  .unit-toggle__btn {
    padding: 5px 12px;
    font-size: 0.78rem;
  }

  /* ── Blog grid ── */
  .blog-grid {
    grid-template-columns: 1fr !important;
  }

  /* ── Chart table head ── */
  .chart-table-head {
    padding: 14px 16px;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  /* ── Sections with inline grids (calculator pages) ── */
  section .container > div[style*="display:grid"],
  section .container > div[style*="display: grid"] {
    display: block !important;
  }

  /* ── Inline style grid children: add top margin when stacked ── */
  section .container > div[style*="display:grid"] > div + div,
  section .container > div[style*="display: grid"] > div + div {
    margin-top: 24px;
  }

  /* ── FAQ ── */
  .faq-question {
    font-size: 0.9rem;
    padding: 14px 16px;
  }
  .faq-answer {
    font-size: 0.85rem;
    padding: 0 16px;
  }
  .faq-a {
    padding: 0 16px;
  }

  /* ── General: no full-width buttons (except explicitly forced) ── */
  .btn:not(.btn--full):not(.calc-actions .btn) {
    width: auto !important;
  }

  /* ── Input suffix ── */
  .input-suffix input {
    font-size: 1rem;
  }

  /* ── Navbar hamburger ── */
  .navbar__hamburger,
  .nav-hamburger {
    display: flex !important;
  }
  .navbar__nav,
  .nav-links {
    display: none !important;
  }

  /* ── Full calc grid ── */
  .full-calc-grid {
    grid-template-columns: 1fr !important;
  }
  .full-calc-wrap {
    border-radius: var(--radius-lg);
  }

}

/* ==============================
   MOBILE — max-width: 480px
   ============================== */
@media (max-width: 480px) {

  /* Single column for small phones */
  .form-grid,
  .calc-form-grid {
    grid-template-columns: 1fr !important;
  }

  .pipe-cards {
    grid-template-columns: 1fr !important;
  }

  .result-grid,
  .full-result {
    grid-template-columns: 1fr 1fr !important;
  }

  .calc-actions .btn {
    flex: 1 1 100%;
  }

  .hero h1 {
    font-size: 1.6rem;
  }
  .page-hero__content h1 {
    font-size: 1.5rem;
  }

  .section {
    padding: 28px 0;
  }

  .section-header {
    margin-bottom: 28px;
  }

  .result-item__value {
    font-size: 1.1rem;
  }

  .result-item__label {
    font-size: 0.68rem;
  }

  .pipe-tab,
  .full-pipe-tab {
    font-size: 0.7rem;
    padding: 6px 8px;
  }

  /* Slightly smaller table font */
  .eng-table,
  table.eng-table {
    font-size: 11.5px;
    min-width: 500px;
  }

  .stat-item {
    flex: 0 1 100%;
  }

}

/* ── About page two-col grid ── */
@media (max-width: 768px) {
  .about-two-col,
  [style*="grid-template-columns:1fr 1fr"][style*="gap:60px"] {
    display: block !important;
  }
  .about-two-col > * + * {
    margin-top: 32px;
  }
}

/* ── Other Calculators Card ── */
.other-calcs-card { padding: 16px; }
.other-calcs-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.other-calcs-list { display: flex; flex-direction: column; gap: 4px; }
.other-calc-link {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  color: var(--navy);
  padding: 8px 10px;
  border-radius: 7px;
  background: var(--gray-bg);
  text-decoration: none;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}
.other-calc-link:hover { background: var(--blue-soft); color: var(--blue-accent); }

/* ── 4-button calc-actions ── */
.calc-actions {
  display: flex;
  gap: 8px;
  margin-top: 20px;
  flex-wrap: wrap;
}
.calc-actions .btn {
  flex: 1;
  min-width: 110px;
  text-align: center;
}
@media (max-width: 480px) {
  .calc-actions { gap: 6px; }
  .calc-actions .btn { min-width: 80px; font-size: 0.78rem; padding: 10px 8px; }
}

/* ── Scroll to Top Button ── */
.scroll-top-btn {
  position: fixed;
  bottom: 28px;
  right: 24px;
  width: 46px;
  height: 46px;
  background: var(--blue-accent);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  box-shadow: 0 4px 16px rgba(29,111,164,0.45);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.25s, visibility 0.25s, transform 0.25s, background 0.18s;
  z-index: 999;
}
.scroll-top-btn.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.scroll-top-btn:hover {
  background: var(--blue-bright);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(29,111,164,0.55);
}
.scroll-top-btn svg {
  width: 20px;
  height: 20px;
  stroke: white;
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
@media (max-width: 480px) {
  .scroll-top-btn { bottom: 20px; right: 16px; width: 42px; height: 42px; }
}
