:root {
  --teal: #0f766e;
  --teal-dark: #115e59;
  --gold: #c9a227;
  --ink: #0f172a;
  --muted: #475569;
  --bg: #f7f8f6;
  --card: #ffffff;
  --line: #e2e8f0;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
}
a { color: var(--teal); }
img { max-width: 100%; display: block; }
.wrap { width: min(1100px, calc(100% - 2rem)); margin: 0 auto; }
.site-head {
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: .9rem 0;
}
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { font-weight: 800; color: var(--teal); text-decoration: none; letter-spacing: -.02em; }
.brand span { color: var(--ink); font-weight: 600; }
h1, h2, h3, .ex-hero-title { color: var(--teal); letter-spacing: -.02em; margin: 0 0 .4rem; }
.sub { color: var(--muted); margin: 0 0 1.4rem; }
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .04);
}
.card-hero {
  height: 150px;
  background: linear-gradient(135deg, #0f766e, #14b8a6 55%, #c9a227);
  display: flex;
  align-items: flex-end;
  padding: .8rem 1rem;
  color: #fff;
  font-weight: 700;
}
.card-hero.has-img { position: relative; background: #0f172a; overflow: hidden; }
.card-hero.has-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card-hero.has-img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(15,23,42,0) 45%, rgba(15,23,42,.72)); }
.card-hero.has-img span { position: relative; z-index: 1; text-shadow: 0 1px 3px rgba(0,0,0,.5); }
.card-body { padding: 1rem 1rem 1.1rem; }
.card p:not(:where(.ex-hero-title)) { color: var(--muted); margin: .2rem 0 .8rem; }
.btn {
  display: inline-block;
  background: var(--teal);
  color: #fff;
  text-decoration: none;
  border: none;
  border-radius: 999px;
  padding: .65rem 1.1rem;
  font-weight: 700;
  cursor: pointer;
}
.btn:hover { background: var(--teal-dark); }
.btn-gold { background: var(--gold); color: #1c1403; }
.btn-gold:hover { background: #b48e1c; }
.sticky-bar, .sticky-foot {
  position: sticky;
  z-index: 20;
  background: #0f172a;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .7rem 1rem;
}
.sticky-bar { top: 0; }
.sticky-foot { bottom: 0; }
.example-flag {
  display: inline-block;
  background: #fef3c7;
  color: #92400e;
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: .15rem .45rem;
  border-radius: 999px;
}
.hero {
  background: linear-gradient(160deg, #ecfdf5, #fff 55%);
  padding: 3.2rem 0 2.4rem;
}
.hero h1, .hero .ex-hero-title { font-size: clamp(2rem, 5vw, 3.2rem); }
.services, .about, .quotes, .gallery, .contact {
  padding: 2.4rem 0;
}
.svc {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem;
}
.quote {
  background: #fff;
  border-left: 4px solid var(--gold);
  padding: 1rem;
  border-radius: 10px;
}
.shots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .6rem;
}
.shot {
  height: 120px;
  border-radius: 12px;
  background: #dbeafe;
}
.shot:nth-child(2) { background: #ccfbf1; }
.shot:nth-child(3) { background: #fef3c7; }
.modal-back {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .55);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 40;
}
.modal-back.open { display: flex; }
.modal {
  background: #fff;
  width: min(480px, 100%);
  border-radius: 16px;
  padding: 1.2rem;
}
.modal label { display: block; font-weight: 700; font-size: .85rem; margin: .7rem 0 .2rem; }
.modal input, .modal textarea, .modal select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: .6rem .7rem;
  font: inherit;
}
.modal-actions { display: flex; gap: .5rem; margin-top: 1rem; }
.err { color: #b91c1c; font-size: .9rem; }
.ok { color: var(--teal); }
.table-wrap { overflow-x: auto; background: #fff; border-radius: 12px; border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: .6rem .7rem; border-bottom: 1px solid var(--line); }
th { color: var(--teal); }
@media (max-width: 700px) {
  .shots { grid-template-columns: 1fr; }
  .sticky-bar, .sticky-foot { flex-wrap: wrap; }
}

/* Roofing example — Riverside-style public chrome */
.rr { font-family: "Source Sans 3", system-ui, sans-serif; color: #152228; }
.rr h1, .rr h2, .rr h3, .rr .ex-hero-title { font-family: Oswald, "Barlow Condensed", sans-serif; text-transform: uppercase; letter-spacing: .02em; line-height: 1.12; }
.rr-top { background: #1b2d38; color: #c5d2d9; font-size: 13px; }
.rr-top .wrap { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; flex-wrap: wrap; }
.rr-top a { color: #fff; text-decoration: none; }
.rr-head { position: sticky; top: 0; z-index: 20; background: #1b2d38; border-bottom: 3px solid #e85a1a; }
.rr-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; }
.rr-brand { color: #fff; text-decoration: none; font-family: Oswald, sans-serif; letter-spacing: .04em; text-transform: uppercase; font-size: 1.15rem; }
.rr-brand small { display: block; font-family: "Source Sans 3", sans-serif; letter-spacing: 0; text-transform: none; font-size: .72rem; color: #e85a1a; font-weight: 600; }
.rr-nav { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.rr-nav a { color: #e8eef1; text-decoration: none; font-weight: 600; font-size: 15px; }
.rr-nav a.demo { color: #ffd7c2; border: 1px solid rgba(232,90,26,.6); padding: 4px 8px; border-radius: 2px; font-size: 13px; }
.rr-nav a.demo em { font-style: normal; background: #e85a1a; color: #fff; font-size: 10px; padding: 1px 5px; margin-left: 6px; border-radius: 2px; }
.rr-hero { background: linear-gradient(160deg, #1b2d38 0%, #243844 70%); color: #fff; padding: 64px 0 56px; }
.rr-hero h1, .rr-hero .ex-hero-title { font-size: clamp(2rem, 4vw, 3.2rem); margin: 0 0 12px; }
.rr-hero p:not(:where(.ex-hero-title)) { max-width: 640px; color: #d7e2e8; }
.rr-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 18px; }
.rr .btn-orange { background: #e85a1a; color: #fff; border: 0; padding: 12px 16px; font-weight: 700; text-decoration: none; display: inline-block; cursor: pointer; font: inherit; }
.rr .btn-ghost { border: 1px solid #fff; color: #fff; padding: 11px 16px; text-decoration: none; display: inline-block; }
.rr-section { padding: 48px 0; }
.rr-section.alt { background: #eef3f5; }
.rr-kicker { color: #e85a1a; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: 12px; margin: 0 0 6px; }
.rr-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.rr-card { background: #fff; border: 1px solid #d3dce1; padding: 16px; }
.rr-areas { display: flex; flex-wrap: wrap; gap: 8px; }
.rr-areas span { background: #fff; border: 1px solid #d3dce1; padding: 6px 10px; font-size: 14px; }
.quote-form { display: grid; gap: 10px; max-width: 520px; }
.quote-form label { font-weight: 600; font-size: 14px; }
.quote-form input, .quote-form select, .quote-form textarea { width: 100%; padding: 10px; border: 1px solid #d3dce1; font: inherit; }
.demo-banner { background: #fff6ef; border: 1px solid #e85a1a; color: #1b2d38; padding: 12px 14px; margin: 16px 0; font-size: 14px; }
.pipe { display: grid; grid-template-columns: repeat(5, minmax(200px, 1fr)); gap: 12px; overflow-x: auto; align-items: start; }
.pipe-col { display: flex; flex-direction: column; gap: 8px; }
.pipe-col { background: #eef3f5; border: 1px solid #d3dce1; min-height: 280px; padding: 10px; }
.pipe-col h2 { font-size: 1rem; margin: 0 0 10px; color: #1b2d38; }
.pipe-col .count { color: #5d6d76; font-weight: 500; font-family: "Source Sans 3", sans-serif; text-transform: none; letter-spacing: 0; }
.lead-card { background: #fff; border: 1px solid #d3dce1; padding: 10px; margin-bottom: 8px; }
.lead-card strong { display: block; }
.lead-card small { color: #5d6d76; }
.lead-card select { width: 100%; margin-top: 8px; }
.portal-shell { max-width: 720px; margin: 24px auto; }
.portal-login { background: #fff; border: 1px solid #d3dce1; padding: 20px; display: grid; gap: 10px; }
.portal-status { background: #1b2d38; color: #fff; padding: 16px; }
.portal-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.portal-photos div { background: #d3dce1; aspect-ratio: 4/3; display: grid; place-items: center; color: #5d6d76; font-size: 13px; }
.thread { border: 1px solid #d3dce1; padding: 10px; max-height: 240px; overflow: auto; background: #fff; }
.bubble { background: #eef3f5; padding: 8px 10px; margin: 6px 0; border-radius: 4px; }
.bubble.me { background: #fff0e8; }
@media (max-width: 700px) {
  .rr-nav { display: none; }
  .rr-nav.open { display: flex; flex-direction: column; align-items: flex-start; width: 100%; }
  .rr-head .wrap { flex-wrap: wrap; }
  .portal-photos { grid-template-columns: 1fr; }
}

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.stats div { background: #1b2d38; color: #fff; padding: 16px; text-align: center; }
.stats strong { display: block; font-family: Oswald, sans-serif; font-size: 1.8rem; color: #e85a1a; }
.stats span { font-size: 13px; color: #c5d2d9; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.steps div { background: #fff; border: 1px solid #d3dce1; padding: 14px; }
.steps span { display: inline-grid; place-items: center; width: 28px; height: 28px; background: #e85a1a; color: #fff; font-weight: 700; margin-bottom: 8px; }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.gallery figure { margin: 0; }
.gallery .shot { background: linear-gradient(160deg, #1b2d38, #5d6d76); height: 160px; }
.gallery figcaption { font-size: 13px; color: #5d6d76; margin-top: 6px; }
.finance-strip { background: #e85a1a; color: #fff; padding: 28px 0; }
.finance-strip h2 { color: #fff; margin: 0 0 6px; }
.rr-card { color: inherit; text-decoration: none; display: block; }
.rr-areas a { background: #fff; border: 1px solid #d3dce1; padding: 6px 10px; font-size: 14px; color: #152228; text-decoration: none; }
.pipe-col.over { outline: 2px solid #e85a1a; background: #fff6ef; }
.lead-card { cursor: grab; }
.lead-card.dragging { opacity: .45; }
.crm-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.panel-back { position: fixed; inset: 0; background: rgba(21,34,40,.45); display: none; z-index: 40; }
.panel-back.open { display: block; }
.panel { position: fixed; top: 0; right: 0; width: min(420px, 100%); height: 100%; background: #fff; overflow: auto; padding: 18px; z-index: 41; }
.line-row { display: grid; grid-template-columns: 1fr 60px 80px; gap: 6px; margin-bottom: 6px; }
@media (max-width: 800px) {
  .stats, .steps, .gallery { grid-template-columns: 1fr 1fr; }
}


/* Vertical palettes — roofing stays default */
.plumb { --accent: #1e3a5f; --accent-2: #6b7c8a; }
.shop { --accent: #111111; --accent-2: #ff6b6b; }
.rest { --accent: #5c3317; --accent-2: #c9a227; background: #fdf6e3; }
.plumb .rr-top, .plumb .rr-head, .plumb .rr-hero, .plumb .stats div { background: #1e3a5f; }
.plumb .rr-head { border-bottom-color: #6b7c8a; }
.plumb .rr-brand small, .plumb .rr-kicker, .plumb .stats strong, .plumb .btn-orange, .plumb .finance-strip, .plumb .steps span { background: #6b7c8a; color: #fff; }
.plumb .rr-kicker, .plumb .stats strong { background: transparent; color: #8aa0b3; }
.plumb .btn-orange, .plumb .finance-strip, .plumb .steps span { background: #1e3a5f; }
.shop .rr-top, .shop .rr-head, .shop .rr-hero, .shop .stats div { background: #111; }
.shop .rr-head { border-bottom-color: #ff6b6b; }
.shop .rr-brand small, .shop .rr-kicker, .shop .stats strong { color: #ff6b6b; }
.shop .btn-orange, .shop .finance-strip, .shop .steps span { background: #ff6b6b; }
.rest .rr-top, .rest .rr-head, .rest .rr-hero, .rest .stats div { background: #5c3317; }
.rest .rr-head { border-bottom-color: #c9a227; }
.rest { background: #fdf6e3; }
.rest .rr-brand small, .rest .rr-kicker, .rest .stats strong { color: #c9a227; }
.rest .btn-orange, .rest .finance-strip, .rest .steps span { background: #c9a227; color: #3e2210; }
.prod-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.prod { background: #fff; border: 1px solid #d3dce1; padding: 12px; }
.prod .shot { height: 120px; background: linear-gradient(160deg, #111, #444); margin-bottom: 8px; }
.cart { position: fixed; top: 0; right: 0; width: min(320px, 100%); height: 100%; background: #fff; z-index: 50; padding: 16px; overflow: auto; display: none; }
.cart.open { display: block; }
.menu-item { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid #eadfce; padding: 8px 0; }
