:root {
  --tc-red: #b91c1c;
  --tc-red-dark: #991b1b;
  --tc-green: #16833a;
  --tc-ink: #0f172a;
  --tc-muted: #475569;
  --tc-line: #e2e8f0;
  --tc-bg: #f8fafc;
  --tc-card: #ffffff;
  --tc-soft-red: #fff1f2;
  --tc-shadow: 0 14px 40px rgba(15, 23, 42, .10);
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--tc-bg) !important;
  color: var(--tc-ink) !important;
  padding-bottom: 86px;
}

body > header:not(.tc-site-header),
body > footer:not(.tc-site-footer),
body > .chevrons {
  display: none !important;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(185, 28, 28, .38) !important;
  outline-offset: 3px !important;
}

.bg-bg,
.bg-card,
.bg-card2 {
  background-color: var(--tc-card) !important;
}

.text-ink,
.text-muted,
.text-slate-300,
.text-slate-200 {
  color: var(--tc-ink) !important;
}

.border-white\/10 {
  border-color: var(--tc-line) !important;
}

/* Legacy sections were originally designed for a dark theme. After the site
   shell moved to a light background, keep light text only on real dark areas. */
main :is(.on-light-card, .tc-panel, .tc-commercial-card, .tc-link-card, details.bg-card, figure.bg-card, article.bg-card) :is(.text-white, .text-slate-50, .text-slate-100, .text-slate-200, .text-slate-300, .text-muted),
main :is(.on-light-card, .tc-panel, .tc-commercial-card, .tc-link-card, details.bg-card, figure.bg-card, article.bg-card).text-white,
main :is(.on-light-card, .tc-panel, .tc-commercial-card, .tc-link-card, details.bg-card, figure.bg-card, article.bg-card).text-slate-100 {
  color: var(--tc-ink) !important;
}

main :is(.on-light-card, .tc-panel, .tc-commercial-card, details.bg-card, figure.bg-card, article.bg-card) :is(p, li, blockquote, figcaption, small, span):not(.tc-logo-mark):not(.tc-btn):not([class*="bg-red-"]):not([class*="bg-rose-"]):not([class*="bg-emerald-"]):not([class*="bg-green-"]) {
  color: var(--tc-muted) !important;
}

main section.text-slate-100,
main section.text-slate-100 :is(p, div, span, li, blockquote, strong),
main section.text-slate-100 :is(.text-white, .text-slate-100, .text-slate-200, .text-slate-300) {
  color: var(--tc-ink) !important;
}

main section.text-slate-100 :is(h1, h2, h3, h4, h5, h6) {
  color: var(--tc-ink) !important;
}

main section.text-slate-100 :is(a.text-white, a.bg-white\/5, .bg-white\/5),
main :is(.on-light-card, .tc-panel, .tc-commercial-card) :is(a.bg-white\/5, span.bg-white\/5, .bg-white\/5) {
  background: #fff !important;
  border-color: var(--tc-line) !important;
  color: var(--tc-ink) !important;
}

main :is(a.bg-red-700, a.bg-red-800, a.bg-rose-600, a.bg-call, a.bg-wa, .tc-btn-red, .tc-btn-green),
main :is(a.bg-red-700, a.bg-red-800, a.bg-rose-600, a.bg-call, a.bg-wa, .tc-btn-red, .tc-btn-green) :is(span, strong) {
  color: #fff !important;
}

.on-dark,
.on-dark :is(p, li, span, small, blockquote, a, .text-slate-100, .text-slate-200, .text-slate-300, .text-white) {
  color: #f8fafc !important;
}

.on-dark :is(h1, h2, h3, h4, h5, h6) {
  color: #fff !important;
}

main .on-dark,
main .on-dark :is(p, li, span, small, blockquote, a, .text-slate-100, .text-slate-200, .text-slate-300, .text-white) {
  color: var(--tc-muted) !important;
}

main .on-dark :is(h1, h2, h3, h4, h5, h6) {
  color: var(--tc-ink) !important;
}

main .on-dark :is(a.bg-red-700, a.bg-red-800, a.bg-rose-600, a.bg-call, a.bg-wa, .tc-btn-red, .tc-btn-green),
main .on-dark :is(a.bg-red-700, a.bg-red-800, a.bg-rose-600, a.bg-call, a.bg-wa, .tc-btn-red, .tc-btn-green) :is(span, strong) {
  color: #fff !important;
}

.tc-site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid var(--tc-line);
  box-shadow: 0 1px 0 rgba(15, 23, 42, .04);
  backdrop-filter: blur(12px);
}

.tc-header-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.tc-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--tc-ink);
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

.tc-logo-mark {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background-color: var(--tc-red);
  background-image: linear-gradient(135deg, var(--tc-red), #ef4444);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  box-shadow: 0 8px 22px rgba(185, 28, 28, .22);
}

.tc-logo small {
  display: block;
  color: var(--tc-muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.text-brand-amber {
  color: #9a3412 !important;
}

.text-brand {
  color: var(--tc-red) !important;
}

.text-\[\#f59e0b\] {
  color: #9a3412 !important;
}

.text-slate-400 {
  color: #475569 !important;
}

.bg-call,
.bg-wa {
  background-color: #166534 !important;
}

.tc-primary-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
}

.tc-primary-nav a,
.tc-mobile-menu nav a {
  border-radius: 8px;
  color: #334155;
  font-size: 14px;
  font-weight: 800;
  padding: 9px 10px;
  text-decoration: none;
}

.tc-primary-nav a:hover,
.tc-mobile-menu nav a:hover {
  background: #f1f5f9;
  color: var(--tc-red);
}

.tc-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tc-btn {
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 900;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}

.tc-btn:hover {
  transform: translateY(-1px);
}

.tc-btn-red {
  background: var(--tc-red);
  color: #fff !important;
  box-shadow: 0 10px 20px rgba(185, 28, 28, .18);
}

.tc-btn-red:hover {
  background: var(--tc-red-dark);
}

.tc-btn-green {
  background: var(--tc-green);
  color: #fff !important;
  box-shadow: 0 10px 20px rgba(22, 131, 58, .16);
}

.tc-btn-ghost {
  background: #fff;
  border: 1px solid var(--tc-line);
  color: var(--tc-ink) !important;
}

.tc-phone-secondary {
  border: 1px solid #fecaca;
  background: #fff7f7;
  color: var(--tc-red) !important;
}

.tc-mobile-menu {
  display: none;
  margin-left: auto;
  position: relative;
}

.tc-mobile-menu summary {
  border: 1px solid var(--tc-line);
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 900;
  list-style: none;
  padding: 10px 12px;
}

.tc-mobile-menu summary::-webkit-details-marker {
  display: none;
}

.tc-mobile-menu > div {
  background: #fff;
  border: 1px solid var(--tc-line);
  border-radius: 14px;
  box-shadow: var(--tc-shadow);
  min-width: min(86vw, 330px);
  padding: 12px;
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
}

.tc-mobile-menu nav {
  display: grid;
  gap: 4px;
}

.tc-mobile-menu .tc-mobile-phone-grid {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.tc-site-footer {
  background: #fff;
  border-top: 1px solid var(--tc-line);
  margin-top: 42px;
}

.tc-footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 34px 16px 100px;
}

.tc-footer-grid {
  display: grid;
  gap: 22px;
  grid-template-columns: 1.2fr 1fr 1fr 1fr;
}

.tc-footer-title {
  color: var(--tc-ink);
  font-size: 14px;
  font-weight: 900;
  margin-bottom: 10px;
}

.tc-footer-links {
  display: grid;
  gap: 7px;
}

.tc-footer-links a,
.tc-footer-copy a {
  color: #334155;
  font-size: 14px;
  text-decoration: none;
}

.tc-footer-links a:hover,
.tc-footer-copy a:hover {
  color: var(--tc-red);
  text-decoration: underline;
}

.tc-footer-copy {
  border-top: 1px solid var(--tc-line);
  color: var(--tc-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  margin-top: 26px;
  padding-top: 18px;
}

.tc-contact-fab {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 85;
  display: grid;
  gap: 9px;
  width: min(340px, calc(100vw - 32px));
}

.tc-fab-card {
  background: rgba(255, 255, 255, .97);
  border: 1px solid var(--tc-line);
  border-radius: 14px;
  box-shadow: var(--tc-shadow);
  padding: 12px;
}

.tc-fab-title {
  color: var(--tc-muted);
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 9px;
  text-transform: uppercase;
}

.tc-fab-actions {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr 1fr;
}

.tc-fab-actions .tc-btn {
  min-height: 40px;
  padding: 9px 10px;
}

.tc-mobile-dock {
  display: none;
}

.tc-contact-sheet {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
}

.tc-contact-sheet.is-open {
  display: block;
}

.tc-sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, .56);
}

.tc-sheet-panel {
  background: #fff;
  border-radius: 18px 18px 0 0;
  bottom: 0;
  box-shadow: 0 -16px 48px rgba(15, 23, 42, .22);
  left: 50%;
  max-height: min(88vh, 720px);
  max-width: 560px;
  overflow: auto;
  padding: 18px;
  position: absolute;
  transform: translateX(-50%);
  width: min(100%, 560px);
}

.tc-sheet-header {
  align-items: start;
  display: flex;
  gap: 14px;
  justify-content: space-between;
}

.tc-sheet-header h2 {
  color: var(--tc-ink);
  font-size: 22px;
  font-weight: 900;
  margin: 0;
}

.tc-sheet-header p {
  color: var(--tc-muted);
  margin: 5px 0 0;
}

.tc-sheet-close {
  background: #f1f5f9;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  height: 38px;
  width: 38px;
}

.tc-contact-options {
  display: grid;
  gap: 9px;
  grid-template-columns: 1fr 1fr;
  margin: 16px 0;
}

.tc-lead-form {
  border-top: 1px solid var(--tc-line);
  display: grid;
  gap: 11px;
  padding-top: 14px;
}

.tc-lead-form label {
  color: var(--tc-ink);
  display: grid;
  font-size: 13px;
  font-weight: 900;
  gap: 6px;
}

.tc-lead-form input,
.tc-lead-form textarea {
  border: 1px solid var(--tc-line);
  border-radius: 10px;
  color: var(--tc-ink);
  font: inherit;
  min-height: 42px;
  padding: 10px 11px;
  width: 100%;
}

.tc-lead-form textarea {
  min-height: 80px;
  resize: vertical;
}

.tc-form-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr;
}

.tc-hp {
  left: -9999px;
  position: absolute;
}

.tc-form-status {
  color: var(--tc-muted);
  font-size: 14px;
  min-height: 20px;
}

.tc-commercial-card,
.tc-contact-page .tc-panel,
.tc-sitemap-page .tc-panel,
.tc-notfound-page .tc-panel {
  background: #fff;
  border: 1px solid var(--tc-line);
  border-radius: 14px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, .05);
}

.tc-contact-page,
.tc-sitemap-page,
.tc-notfound-page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 38px 16px;
}

.tc-page-eyebrow {
  color: var(--tc-red);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.tc-page-title {
  color: var(--tc-ink);
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 950;
  line-height: 1.02;
  margin: 10px 0 14px;
}

.tc-page-lead {
  color: var(--tc-muted);
  font-size: 18px;
  line-height: 1.75;
  max-width: 760px;
}

.tc-hero-actions,
.tc-card-grid,
.tc-link-grid {
  display: grid;
  gap: 12px;
}

.tc-hero-actions {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 20px;
  max-width: 760px;
}

.tc-card-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 24px;
}

.tc-link-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tc-panel {
  padding: 22px;
}

.tc-panel h2,
.tc-panel h3 {
  color: var(--tc-ink);
  font-weight: 900;
  margin-top: 0;
}

.tc-panel p,
.tc-panel li {
  color: var(--tc-muted);
  line-height: 1.75;
}

.tc-link-card {
  border: 1px solid var(--tc-line);
  border-radius: 12px;
  color: var(--tc-ink);
  display: block;
  font-weight: 850;
  padding: 12px 14px;
  text-decoration: none;
}

.tc-link-card:hover {
  border-color: #fecaca;
  color: var(--tc-red);
}

.tc-local-summary {
  background: #fff;
  border: 1px solid var(--tc-line);
  border-radius: 14px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, .05);
  color: var(--tc-muted);
  line-height: 1.75;
  margin: 0 0 24px;
  max-width: 840px;
  padding: 18px;
}

.tc-local-summary p {
  margin: 0 0 12px;
}

.tc-local-summary p:last-child {
  margin-bottom: 0;
}

#map {
  border: 1px solid var(--tc-line);
  border-radius: 14px !important;
  box-shadow: 0 10px 26px rgba(15, 23, 42, .05);
  overflow: hidden;
}

main a[href^="tel:"],
main a[href^="https://wa.me/"],
body > div a[href^="tel:"],
body > div a[href^="https://wa.me/"] {
  word-break: keep-all;
}

/* Final contrast guard for legacy homepage/inner page blocks that still carry
   old dark-theme utility classes while sitting on a light site background. */
html body main :is(section.on-dark, div.on-dark, article.on-dark),
html body main :is(section.on-dark, div.on-dark, article.on-dark) :is(p, li, span, small, blockquote, a, .text-white, .text-slate-50, .text-slate-100, .text-slate-200, .text-slate-300) {
  color: var(--tc-muted) !important;
}

html.theme-light body main :is(section.on-dark, div.on-dark, article.on-dark),
html.theme-light body main :is(section.on-dark, div.on-dark, article.on-dark) :is(p, li, span, small, blockquote, a, .text-white, .text-slate-50, .text-slate-100, .text-slate-200, .text-slate-300) {
  color: var(--tc-muted) !important;
}

html body main :is(section.on-dark, div.on-dark, article.on-dark) :is(h1, h2, h3, h4, h5, h6, strong) {
  color: var(--tc-ink) !important;
}

html.theme-light body main :is(section.on-dark, div.on-dark, article.on-dark) :is(h1, h2, h3, h4, h5, h6, strong) {
  color: var(--tc-ink) !important;
}

html body main :is(section.on-dark, div.on-dark, article.on-dark) :is(a.bg-red-700, a.bg-red-800, a.bg-rose-600, a.bg-call, a.bg-wa, .tc-btn-red, .tc-btn-green),
html body main :is(section.on-dark, div.on-dark, article.on-dark) :is(a.bg-red-700, a.bg-red-800, a.bg-rose-600, a.bg-call, a.bg-wa, .tc-btn-red, .tc-btn-green) :is(span, strong) {
  color: #fff !important;
}

html.theme-light body main :is(section.on-dark, div.on-dark, article.on-dark) :is(a.bg-brand2, button.bg-brand2) {
  color: #0f172a !important;
}

html.theme-light body main :is(.on-dark.bg-gradient-to-br, .on-dark > .bg-gradient-to-br) {
  background-color: #111827 !important;
}

html.theme-light body main :is(.on-dark.bg-gradient-to-br, .on-dark > .bg-gradient-to-br),
html.theme-light body main :is(.on-dark.bg-gradient-to-br, .on-dark > .bg-gradient-to-br) :is(p, li, span, small, blockquote, a, .text-white, .text-slate-50, .text-slate-100, .text-slate-200, .text-slate-300) {
  color: #f8fafc !important;
}

html.theme-light body main :is(.on-dark.bg-gradient-to-br, .on-dark > .bg-gradient-to-br) :is(h1, h2, h3, h4, h5, h6, strong) {
  color: #fff !important;
}

html.theme-light body main :is(.on-dark.bg-gradient-to-br, .on-dark > .bg-gradient-to-br) .on-light-card,
html.theme-light body main :is(.on-dark.bg-gradient-to-br, .on-dark > .bg-gradient-to-br) .on-light-card :is(p, li, span, small, blockquote, figcaption, a, .text-slate-100, .text-slate-200, .text-slate-300, .text-muted) {
  color: var(--tc-muted) !important;
}

html.theme-light body main :is(.on-dark.bg-gradient-to-br, .on-dark > .bg-gradient-to-br) .on-light-card :is(h1, h2, h3, h4, h5, h6, strong) {
  color: var(--tc-ink) !important;
}

html.theme-light body main :is(.on-dark.bg-gradient-to-br, .on-dark > .bg-gradient-to-br) :is(a.bg-brand, a.bg-red-700, a.bg-red-800, a.bg-rose-600, a.bg-call, a.bg-wa, .tc-btn-red, .tc-btn-green) {
  color: #fff !important;
}

html.theme-light body main :is(.on-dark.bg-gradient-to-br, .on-dark > .bg-gradient-to-br) a.bg-brand {
  background-color: var(--tc-red) !important;
}

html.theme-light body main :is(.on-dark.bg-gradient-to-br, .on-dark > .bg-gradient-to-br) :is(a.bg-brand2, button.bg-brand2) {
  color: #0f172a !important;
}

@media (max-width: 1080px) {
  .tc-header-actions .tc-phone-secondary {
    display: none;
  }
}

@media (max-width: 860px) {
  .tc-primary-nav,
  .tc-header-actions {
    display: none;
  }

  .tc-mobile-menu {
    display: block;
  }

  .tc-logo small {
    display: none;
  }

  .tc-contact-fab {
    display: none;
  }

  .tc-mobile-dock {
    align-items: center;
    background: rgba(255, 255, 255, .98);
    border-top: 1px solid var(--tc-line);
    bottom: 0;
    box-shadow: 0 -10px 28px rgba(15, 23, 42, .12);
    display: grid;
    gap: 7px;
    grid-template-columns: 1fr 1fr 1fr;
    left: 0;
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
    position: fixed;
    right: 0;
    z-index: 86;
  }

  .tc-mobile-dock .tc-btn {
    border-radius: 10px;
    font-size: 13px;
    min-height: 44px;
    padding: 8px 6px;
  }

  .tc-footer-grid,
  .tc-card-grid,
  .tc-hero-actions,
  .tc-contact-options,
  .tc-form-grid {
    grid-template-columns: 1fr;
  }

  .tc-footer-inner {
    padding-bottom: 112px;
  }

  .tc-contact-page,
  .tc-sitemap-page,
  .tc-notfound-page {
    padding-top: 28px;
  }
}

@media (max-width: 430px) {
  .tc-header-inner {
    padding: 10px 12px;
  }

  .tc-logo-mark {
    height: 34px;
    width: 34px;
  }

  .tc-logo span:last-child {
    font-size: 15px;
  }
}
