/* austinelectricalcontractor.net
   Light-only by deliberate choice: dark mode would double every TEXT_PAIRS
   contrast obligation for marginal gain on a local-services site.
   Every colour below must also exist in chrome.PALETTE — build.py asserts it,
   so the stylesheet and the contrast gate cannot drift apart. */

:root {
  --ink: #16202b;
  --brand: #232c3a;
  --brand-dark: #161d27;
  --cta: #a3175a;
  --cta-dark: #821147;
  --paper: #ffffff;
  --muted: #4f5a68;
  --tint: #eef1f6;
  --tint-cta: #fbeef4;
  --rule: #dde2ea;
  --wrap: 68rem;
  --radius: 10px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.65 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

h1, h2, h3 { line-height: 1.2; color: var(--ink); }
h1 { font-size: clamp(1.9rem, 5vw, 2.6rem); margin: 0 0 .5rem; letter-spacing: -.015em; }
h2 { font-size: clamp(1.3rem, 3.2vw, 1.7rem); margin: 2.4rem 0 .7rem; scroll-margin-top: 5rem; }
h3 { font-size: 1.05rem; margin: 1.4rem 0 .4rem; }
p, li { color: var(--ink); }
a { color: var(--brand-dark); }
a:hover { color: var(--cta-dark); }

.skip {
  position: absolute; left: -9999px; top: 0; background: var(--cta);
  color: var(--paper); padding: .6rem 1rem; z-index: 20;
}
.skip:focus { left: 0; }
:focus-visible { outline: 3px solid var(--cta); outline-offset: 2px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 1rem;
  padding: .55rem 1.25rem;
  background: var(--paper);
  border-top: 3px solid var(--brand);
  border-bottom: 1px solid var(--rule);
}
.wordmark {
  display: inline-flex; align-items: center; gap: .5rem;
  font-weight: 700; text-decoration: none; color: var(--ink); white-space: nowrap;
}
.wordmark span { color: var(--muted); font-weight: 600; }
.mark { flex: none; }
.site-header nav {
  display: flex; gap: 1.1rem; margin-left: auto;
  overflow-x: auto; scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent);
          mask-image: linear-gradient(90deg, #000 88%, transparent);
}
.site-header nav::-webkit-scrollbar { display: none; }
.site-header nav a {
  text-decoration: none; color: var(--muted); font-weight: 600; font-size: .95rem;
  white-space: nowrap; padding: .35rem 0; border-bottom: 2px solid transparent;
}
.site-header nav a.current { color: var(--ink); border-bottom-color: var(--cta); }
.call {
  margin-left: .5rem; padding: .5rem 1rem; border-radius: 999px;
  background: var(--brand); color: var(--paper);
  text-decoration: none; font-weight: 700; white-space: nowrap;
}

/* ---------- layout ---------- */
main {
  max-width: var(--wrap); margin: 0 auto; padding: 1.5rem 1.25rem 4rem;
}
main.home h1 { font-size: clamp(2.05rem, 6vw, 3.1rem); }
.kicker {
  text-transform: uppercase; letter-spacing: .08em; font-size: .78rem;
  font-weight: 700; color: var(--muted); margin: 0 0 .35rem;
}
.lede { font-size: 1.16rem; color: var(--ink); }

/* Guides are long-form reading, so they get a narrower measure than the
   service and area pages, which are scan-and-link. Same shell, different job. */
main.guide { max-width: 48rem; }
main.guide .lede.answer {
  font-size: 1.22rem; font-weight: 500;
  padding-left: 1rem; border-left: 4px solid var(--brand);
}

.crumbs { font-size: .85rem; color: var(--muted); margin: 0 0 .9rem; }
.crumbs a { color: var(--muted); }
.crumbs .sep { padding: 0 .4rem; opacity: .6; }

/* The line under the H1. Styled to be read rather than skipped: since the
   company-voice pivot it states what the company does, and its accuracy is
   what keeps the site outside "offer to perform" under Occ. Code 1305.151. */
.intro-line {
  margin: 0 0 1.6rem; padding: .8rem 1rem;
  border-left: 4px solid var(--cta);
  background: var(--tint-cta);
  font-size: .93rem; color: var(--ink);
}

/* ---------- buttons ---------- */
.cta { display: flex; flex-wrap: wrap; gap: .7rem; margin: 1.4rem 0; }
.btn {
  display: inline-block; padding: .8rem 1.4rem; border-radius: var(--radius);
  background: var(--cta); color: var(--paper);
  text-decoration: none; font-weight: 700;
}
.btn:hover { background: var(--cta-dark); color: var(--paper); }
.btn-call { background: var(--brand); }
.btn-call:hover { background: var(--brand-dark); }

/* ---------- panels ---------- */
.panel-authority, .panel-stat {
  margin: 2rem 0; padding: 1.2rem 1.3rem;
  background: var(--tint); border-radius: var(--radius);
  border-left: 4px solid var(--brand);
}
.panel-authority h2, .panel-stat h2 { margin-top: 0; }
.panel-stat ol { margin: .6rem 0 .6rem 1.1rem; padding: 0; }
.panel-stat li { margin: .45rem 0; }
.punchline { font-weight: 600; }
.checkbill { font-weight: 600; color: var(--brand-dark); }
.unverified {
  font-size: .85rem; color: var(--cta-dark); font-weight: 700; margin-bottom: 0;
}

.safety {
  margin: 1.4rem 0 2rem; padding: 1.1rem 1.25rem;
  background: var(--tint-cta); border: 2px solid var(--cta);
  border-radius: var(--radius);
}
.safety h2 { margin: 0 0 .4rem; font-size: 1.1rem; color: var(--cta-dark); }
.safety p { margin: 0; }

.legal {
  margin: 2rem 0; padding: .9rem 1.1rem; border: 1px solid var(--rule);
  border-radius: var(--radius); font-size: .93rem; color: var(--muted);
}
.legal p { margin: 0; color: var(--muted); }

/* ---------- diagrams ---------- */
.diagram { margin: 1.6rem 0; padding: 1rem; background: var(--tint); border-radius: var(--radius); }
.diagram svg { display: block; width: 100%; max-width: 32rem; height: auto; margin: 0 auto; }
figcaption { font-size: .9rem; color: var(--muted); margin-top: .7rem; }

/* ---------- lists and grids ---------- */
ul.grid { list-style: none; display: grid; gap: .6rem; padding: 0; margin: 1rem 0;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); }
ul.grid li a {
  display: block; padding: .8rem 1rem; border: 1px solid var(--rule);
  border-radius: var(--radius); text-decoration: none; font-weight: 600;
  color: var(--brand-dark); background: var(--paper);
}
ul.grid li a:hover { border-color: var(--cta); color: var(--cta-dark); }

ul.arealist { list-style: none; display: grid; gap: .55rem; padding: 0; margin: 1rem 0;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); }
ul.arealist li {
  display: flex; align-items: baseline; justify-content: space-between; gap: .6rem;
  padding: .75rem 1rem; border: 1px solid var(--rule); border-radius: var(--radius);
}
ul.arealist a { font-weight: 600; text-decoration: none; }
ul.arealist a:hover { color: var(--cta-dark); }
.areanote { font-size: .82rem; color: var(--muted); white-space: nowrap; }

/* ---------- toc, faq, tables ---------- */
.toc { margin: 1.6rem 0; padding: 1rem 1.2rem; background: var(--tint); border-radius: var(--radius); }
.toc h2 { margin: 0 0 .4rem; font-size: 1rem; }
.toc ul { margin: 0; padding-left: 1.05rem; }

.faq details {
  border-bottom: 1px solid var(--rule); padding: .85rem 0;
}
.faq summary { cursor: pointer; font-weight: 700; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; float: right; color: var(--cta); font-weight: 700; }
.faq details[open] summary::after { content: "\2212"; }

.table-scroll { overflow-x: auto; margin: 1.2rem 0; }
table { border-collapse: collapse; min-width: 34rem; width: 100%; font-size: .95rem; }
th, td { text-align: left; padding: .6rem .7rem; border-bottom: 1px solid var(--rule); }
th { background: var(--tint); text-transform: uppercase; font-size: .78rem; letter-spacing: .04em; }

/* ---------- byline, dates and sources ---------- */
.reviewed { font-size: .85rem; color: var(--muted); margin: -.4rem 0 1.6rem; }
.byline { font-size: .88rem; color: var(--muted); border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule); padding: .55rem 0; margin: 0 0 1.4rem; }
.byline .sep, .reviewed .sep { padding: 0 .5rem; opacity: .6; }
.byline .role, .reviewed .role { font-weight: 400; opacity: .85; }
.sources { margin-top: 2.4rem; padding: 1.1rem 1.25rem; background: var(--tint); border-radius: var(--radius); }
.sources h2 { margin-top: 0; font-size: 1.05rem; }
.sources ul { margin: 0; padding-left: 1.1rem; }
.sources .accessed { color: var(--muted); font-size: .9rem; }

/* ---------- closing band ---------- */
.cta-band {
  margin: 3rem 0 0; padding: 1.8rem 1.4rem; border-radius: var(--radius);
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
}
.cta-band h2, .cta-band p { color: var(--paper); }
.cta-band h2 { margin-top: 0; }
.cta-band .btn-call { background: transparent; border: 2px solid var(--paper); }

/* ---------- footer ---------- */
.site-footer {
  background: var(--tint); border-top: 1px solid var(--rule);
  padding: 2.2rem 1.25rem 6rem;
}
.site-footer .fbrand, .site-footer .cols, .site-footer .disclosure,
.site-footer .copyright { max-width: var(--wrap); margin-left: auto; margin-right: auto; }
.fbrand { display: flex; align-items: center; gap: .5rem; font-weight: 700; margin: 0 0 1.2rem; }
.fbrand span { color: var(--muted); font-weight: 600; }
.site-footer .cols { display: grid; gap: 1.4rem; grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); }
.site-footer h2 { font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 .5rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: .3rem 0; font-size: .94rem; }
.site-footer .disclosure {
  margin-top: 1.8rem; padding-top: 1.2rem; border-top: 1px solid var(--rule);
  font-size: .9rem; color: var(--muted);
}
.site-footer .copyright { font-size: .85rem; color: var(--muted); margin-top: .6rem; }

/* ---------- mobile call bar ---------- */
.callbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 15;
  display: none; text-align: center; padding: .95rem;
  background: var(--cta); color: var(--paper);
  text-decoration: none; font-weight: 700;
}

@media (max-width: 48rem) {
  .site-header .call { display: none; }
  .callbar { display: block; }
  main { padding-bottom: 6rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

@media print {
  .site-header, .callbar, .cta, .cta-band { display: none; }
  body { font-size: 11pt; }
}

/* ---------- contact form (shipped disabled until wired) ---------- */
.notice {
  margin: 1.2rem 0; padding: 1rem 1.15rem;
  background: var(--tint-cta); border: 2px solid var(--cta);
  border-radius: var(--radius);
}
.notice p { margin: 0; }

form.quote { margin: 1.2rem 0; max-width: 34rem; }
form.quote p { margin: 0 0 .9rem; }
form.quote label {
  display: block; font-weight: 600; font-size: .93rem; margin-bottom: .3rem;
}
form.quote input, form.quote textarea, form.quote select {
  width: 100%; padding: .65rem .75rem; font: inherit; color: var(--ink);
  background: var(--paper); border: 1px solid var(--rule);
  border-radius: var(--radius);
}
form.quote button {
  padding: .8rem 1.4rem; border: 0; border-radius: var(--radius);
  background: var(--cta); color: var(--paper); font: inherit; font-weight: 700;
}
/* Disabled state has to read as deliberate rather than broken — the notice
   above the form explains why, and the styling should agree with it. */
form.quote :disabled {
  background: var(--tint); color: var(--muted); cursor: not-allowed;
  border-style: dashed;
}
form.quote button:disabled { background: var(--tint); border: 1px dashed var(--rule); }

.pending {
  padding: .85rem 1rem; border-left: 4px solid var(--cta);
  background: var(--tint-cta); font-size: .93rem;
}

/* An area whose page is not written yet is named, not linked. */
ul.arealist li.pendingarea { border-style: dashed; color: var(--muted); }
ul.arealist li.pendingarea span:first-child { font-weight: 600; }
