/* TBB Building Breathability & Envelope Testing Pty Ltd — Custom Architectural Layer for HTML5 UP Arcana */

:root {
  --tbb-navy: #0b192c;
  --tbb-slate: #0f2942;
  --tbb-blue: #0284c7;
  --tbb-cyan: #38bdf8;
  --tbb-red: #dc2626;
  --tbb-amber: #f59e0b;
  --tbb-emerald: #10b981;
  --tbb-light: #f8fafc;
  --tbb-border: #cbd5e1;
  --tbb-text: #1e293b;
}

body, input, select, textarea {
  color: var(--tbb-text);
  font-size: 13.5pt;
  line-height: 1.65;
}

/* Top regulatory telemetry strip */
.tbb-topstrip {
  background: #07111e;
  color: #e2e8f0;
  font-size: 0.84rem;
  padding: 0.55rem 1rem;
  border-bottom: 1px solid rgba(56, 189, 248, 0.25);
}

.tbb-topstrip-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.65rem 1.25rem;
}

.tbb-topstrip strong {
  color: #38bdf8 !important;
  font-weight: 700;
}

.tbb-topstrip a {
  color: #7dd3fc !important;
  border-bottom: none;
  font-weight: 600;
}

/* Header & Navigation Overrides for Arcana */
#header {
  padding: 1.35rem 0 0 0 !important;
  background: #ffffff !important;
  border-bottom: 1px solid #e2e8f0;
}

#header h1 {
  padding: 0 1rem 1.15rem 1rem !important;
  margin: 0 !important;
  line-height: 1.3 !important;
}

#header h1 a#logo {
  font-size: 1.42rem !important;
  font-weight: 800 !important;
  color: #0b192c !important;
  letter-spacing: -0.02em;
  text-decoration: none;
  border: 0;
}

#header h1 a#logo em {
  display: inline-block;
  font-weight: 500;
  color: #0284c7 !important;
  font-size: 0.98rem;
  margin-left: 0.35rem;
}

#nav {
  background: #0b192c !important;
  padding: 0 !important;
}

#nav:after {
  height: 4px !important;
  background: linear-gradient(90deg, #0284c7, #38bdf8, #dc2626) !important;
}

#nav > ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.15rem;
  margin: 0 auto !important;
  max-width: 1200px;
  padding: 0.2rem 0.75rem;
}

#nav > ul > li {
  margin-left: 0 !important;
  display: inline-block;
}

#nav > ul > li > a {
  color: #e2e8f0 !important;
  font-size: 0.93rem !important;
  font-weight: 600 !important;
  padding: 0.75rem 0.95rem !important;
  border-radius: 6px;
  transition: background 0.2s ease, color 0.2s ease;
}

#nav > ul > li.current > a,
#nav > ul > li:hover > a {
  color: #ffffff !important;
  background: rgba(56, 189, 248, 0.16) !important;
}

#nav > ul > li.current:before {
  display: none !important;
}

.dropotron {
  background: #0f2942 !important;
  border: 1px solid rgba(56, 189, 248, 0.35) !important;
  border-radius: 8px !important;
  min-width: 17.5rem !important;
  padding: 0.55rem 0 !important;
  text-align: left !important;
  box-shadow: 0 14px 32px rgba(7, 17, 30, 0.55) !important;
}

.dropotron > li {
  line-height: 1.45 !important;
  padding: 0 !important;
  border-top: 1px solid rgba(255, 255, 255, 0.07) !important;
}

.dropotron > li:first-child {
  border-top: none !important;
}

.dropotron > li > a {
  display: block !important;
  padding: 0.55rem 1.1rem !important;
  color: #e2e8f0 !important;
  font-size: 0.9rem !important;
  font-weight: 500 !important;
}

.dropotron > li:hover > a,
.dropotron > li.active > a {
  background: rgba(56, 189, 248, 0.18) !important;
  color: #ffffff !important;
}

/* Override Arcana's fixed height & absolute bottom banner header */
#banner {
  height: auto !important;
  min-height: 0 !important;
  padding: 3.4rem 1.25rem 3.6rem !important;
  position: relative !important;
  text-align: left !important;
  background: linear-gradient(135deg, #071324 0%, #0d243d 54%, #13395e 100%) !important;
  color: #f8fafc !important;
  border-bottom: 4px solid #0284c7;
}

#banner header {
  position: relative !important;
  bottom: auto !important;
  left: auto !important;
  width: 100% !important;
  background: transparent !important;
  padding: 0 !important;
}

.tbb-hero-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.25fr 0.95fr;
  gap: 2.25rem;
  align-items: center;
}

.tbb-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 1rem;
}

.tbb-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.45);
  color: #7dd3fc !important;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  white-space: nowrap;
}

.tbb-pill.red {
  background: rgba(220, 38, 38, 0.2);
  border-color: rgba(248, 113, 113, 0.5);
  color: #fca5a5 !important;
}

#banner h2.tbb-hero-title,
.tbb-subhero h1 {
  display: block !important;
  color: #ffffff !important;
  font-size: 2.15rem !important;
  font-weight: 800 !important;
  line-height: 1.22 !important;
  margin: 0 0 1rem 0 !important;
  letter-spacing: -0.02em;
}

.tbb-hero-lead {
  color: #e2e8f0 !important;
  font-size: 1.05rem;
  line-height: 1.62;
  margin-bottom: 1.35rem;
}

.tbb-hero-lead strong,
#banner strong,
.tbb-subhero strong {
  color: #7dd3fc !important;
}

.tbb-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}

.tbb-btn-primary {
  display: inline-block;
  background: #0284c7 !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  font-size: 0.95rem !important;
  padding: 0.8rem 1.45rem !important;
  border-radius: 7px !important;
  border: 1px solid #38bdf8 !important;
  text-decoration: none !important;
  box-shadow: 0 6px 18px rgba(2, 132, 199, 0.35);
}

.tbb-btn-primary:hover {
  background: #0369a1 !important;
  color: #ffffff !important;
}

.tbb-btn-secondary {
  display: inline-block;
  background: rgba(255, 255, 255, 0.1) !important;
  color: #f8fafc !important;
  font-weight: 600 !important;
  font-size: 0.95rem !important;
  padding: 0.8rem 1.35rem !important;
  border-radius: 7px !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  text-decoration: none !important;
}

.tbb-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.18) !important;
  color: #ffffff !important;
}

.tbb-kpi-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.tbb-kpi-box {
  background: rgba(15, 23, 42, 0.68);
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 8px;
  padding: 0.7rem 0.85rem;
}

.tbb-kpi-val {
  display: block;
  color: #38bdf8 !important;
  font-size: 1.15rem;
  font-weight: 800;
  white-space: nowrap;
}

.tbb-kpi-lbl {
  display: block;
  color: #cbd5e1 !important;
  font-size: 0.78rem;
  line-height: 1.3;
  margin-top: 0.15rem;
}

.tbb-hero-media {
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 12px;
  padding: 0.9rem;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4);
}

.tbb-hero-media img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

.tbb-hero-caption {
  margin-top: 0.65rem;
  font-size: 0.82rem;
  color: #cbd5e1 !important;
  line-height: 1.45;
}

/* Subpage Hero */
.tbb-subhero {
  background: linear-gradient(135deg, #071324 0%, #0f2942 60%, #163e63 100%);
  color: #f8fafc;
  padding: 2.75rem 1.25rem;
  border-bottom: 4px solid #0284c7;
}

.tbb-subhero-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.tbb-breadcrumb {
  font-size: 0.84rem;
  color: #94a3b8;
  margin-bottom: 0.75rem;
}

.tbb-breadcrumb a {
  color: #38bdf8 !important;
  border-bottom: none;
}

/* Interactive Calculator Section */
.tbb-calc-card {
  background: #0b192c;
  color: #f8fafc;
  border-radius: 14px;
  border: 1px solid rgba(56, 189, 248, 0.35);
  padding: 2rem;
  margin: 1.5rem 0 2.5rem 0;
  box-shadow: 0 20px 45px rgba(11, 25, 44, 0.25);
}

.tbb-calc-card h2,
.tbb-calc-card h3,
.tbb-calc-card h4 {
  color: #ffffff !important;
  margin-top: 0;
}

.tbb-calc-card p {
  color: #cbd5e1 !important;
}

.tbb-calc-card strong {
  color: #7dd3fc !important;
}

.tbb-calc-grid {
  display: grid;
  grid-template-columns: 1.05fr 1.15fr;
  gap: 1.75rem;
  align-items: start;
}

.tbb-calc-controls {
  background: rgba(15, 41, 66, 0.75);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 10px;
  padding: 1.35rem;
}

.tbb-field {
  margin-bottom: 1.1rem;
}

.tbb-field label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #e2e8f0 !important;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
}

.tbb-field label span.tbb-live-val {
  color: #38bdf8 !important;
  font-weight: 800;
  white-space: nowrap;
}

.tbb-field select,
.tbb-field input[type="range"] {
  width: 100%;
}

.tbb-field select {
  background: #071324 !important;
  color: #f8fafc !important;
  border: 1px solid #38bdf8 !important;
  border-radius: 6px;
  padding: 0.55rem 0.75rem;
  font-size: 0.92rem;
}

.tbb-tier-pills {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.tbb-tier-btn {
  background: #071324;
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 7px;
  padding: 0.55rem 0.45rem;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  line-height: 1.25;
}

.tbb-tier-btn.active {
  background: #0284c7;
  color: #ffffff;
  border-color: #7dd3fc;
}

.tbb-calc-output {
  background: rgba(7, 19, 36, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 10px;
  padding: 1.35rem;
}

.tbb-svg-wrap {
  background: #06101e;
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 8px;
  padding: 0.65rem;
  margin-bottom: 1.1rem;
}

.tbb-svg-wrap svg {
  width: 100%;
  height: auto;
  display: block;
}

.tbb-result-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.tbb-res-box {
  background: rgba(15, 41, 66, 0.65);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 8px;
  padding: 0.75rem 0.9rem;
}

.tbb-res-lbl {
  display: block;
  font-size: 0.76rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.tbb-res-val {
  display: block;
  font-size: 1.12rem;
  font-weight: 800;
  color: #38bdf8;
  white-space: nowrap;
  margin-top: 0.2rem;
}

.tbb-res-box.highlight .tbb-res-val {
  color: #34d399;
}

/* Content Cards, Matrices & Tables */
.tbb-section {
  padding: 3.2rem 0;
}

.tbb-section.alt {
  background: #f1f5f9;
}

.tbb-card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.tbb-card-grid.two-col {
  grid-template-columns: repeat(2, 1fr);
}

.tbb-card {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 1.45rem;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.tbb-card img {
  width: 100%;
  height: 210px;
  object-fit: cover;
  border-radius: 7px;
  margin-bottom: 1rem;
}

.tbb-card h3 {
  color: #0b192c !important;
  font-size: 1.18rem !important;
  line-height: 1.32 !important;
  margin: 0 0 0.65rem 0 !important;
}

.tbb-card p {
  font-size: 0.95rem;
  color: #334155;
  margin-bottom: 1rem;
}

.tbb-meta-tag {
  display: inline-block;
  background: #e0f2fe;
  color: #0369a1;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  white-space: nowrap;
  margin-bottom: 0.6rem;
}

.tbb-table-wrap {
  overflow-x: auto;
  margin: 1.5rem 0 2rem 0;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #ffffff;
}

table.tbb-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
  font-size: 0.92rem;
}

table.tbb-table thead th {
  background: #0b192c;
  color: #ffffff !important;
  font-weight: 700;
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 2px solid #0284c7;
}

table.tbb-table tbody td {
  padding: 0.8rem 1rem;
  border-bottom: 1px solid #e2e8f0;
  color: #1e293b;
  vertical-align: top;
}

table.tbb-table tbody tr:nth-child(even) {
  background: #f8fafc;
}

.tbb-nowrap {
  white-space: nowrap;
  font-weight: 700;
}

/* Callout & Technical Box */
.tbb-callout {
  background: #eff6ff;
  border-left: 5px solid #0284c7;
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}

.tbb-callout h4 {
  color: #0b192c !important;
  margin: 0 0 0.45rem 0 !important;
}

/* Footer Overrides */
#footer {
  background: #071324 !important;
  color: #cbd5e1 !important;
  padding: 3.5rem 0 2.5rem 0 !important;
  border-top: 4px solid #0284c7;
}

#footer h3,
#footer h4 {
  color: #ffffff !important;
  font-size: 1.08rem !important;
  margin-bottom: 0.85rem !important;
}

#footer p,
#footer li,
#footer a {
  color: #cbd5e1 !important;
  font-size: 0.92rem;
}

#footer a:hover {
  color: #38bdf8 !important;
}

#footer strong {
  color: #7dd3fc !important;
}

#footer .copyright {
  margin-top: 2.2rem !important;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  color: #94a3b8 !important;
  font-size: 0.86rem;
}

/* Button Safety Override */
.button {
  max-width: none !important;
  overflow: visible !important;
  text-overflow: clip !important;
  height: auto !important;
  line-height: 1.4 !important;
  padding: 0.75rem 1.4rem !important;
}

/* Responsive Breakpoints */
@media screen and (max-width: 980px) {
  .tbb-hero-grid,
  .tbb-calc-grid,
  .tbb-card-grid,
  .tbb-card-grid.two-col {
    grid-template-columns: 1fr !important;
  }

  .tbb-kpi-strip {
    grid-template-columns: 1fr !important;
  }

  #banner h2.tbb-hero-title,
  .tbb-subhero h1 {
    font-size: 1.65rem !important;
  }
}

@media screen and (max-width: 840px) {
  #titleBar {
    background: #07111e !important;
    border-bottom: 1px solid rgba(56, 189, 248, 0.3) !important;
    height: 44px !important;
    line-height: 44px !important;
  }

  #titleBar .title {
    font-size: 1rem !important;
    line-height: 44px !important;
    height: 44px !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    text-overflow: ellipsis !important;
    padding: 0 3rem !important;
  }

  #titleBar .title em {
    display: none !important;
  }
}

@media screen and (max-width: 640px) {
  .tbb-tier-pills,
  .tbb-result-grid {
    grid-template-columns: 1fr !important;
  }

  .tbb-calc-card {
    padding: 1.15rem !important;
  }
}
