:root {
  color-scheme: light;
  --bg: #f6f0e5;
  --panel: #fffaf1;
  --ink: #171111;
  --muted: #675d52;
  --line: #e4d7c3;
  --line-strong: #bea98e;
  --source: #b82222;
  --source-dark: #861616;
  --source-soft: #f2d8d3;
  --steel: #22363d;
  --amber: #d88a12;
  --gold: #eea617;
  --cream: #fff1d2;
  --charcoal: #110f10;
  --ok: #23815a;
  --danger: #b3261e;
  --shadow: 0 12px 30px rgba(31, 19, 13, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.4;
}

a {
  color: inherit;
}

.site-home {
  background: var(--bg);
}

.site-page {
  background: var(--bg);
}

.site-nav {
  position: absolute;
  z-index: 5;
  inset: 0 0 auto;
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px clamp(18px, 4vw, 54px);
  color: #fff;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  text-decoration: none;
}

.brand-mark img,
.footer-brand img,
.app-brand img {
  display: block;
  object-fit: contain;
  background: rgba(255, 241, 210, 0.94);
  border: 1px solid rgba(238, 166, 23, 0.45);
  border-radius: 8px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.26);
}

.brand-mark img {
  width: 52px;
  height: 52px;
  padding: 4px;
}

.brand-mark strong {
  font-size: 15px;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.42);
}

.site-nav nav {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 26px);
  font-size: 14px;
  font-weight: 800;
}

.site-nav nav a,
.site-footer a {
  color: inherit;
  text-decoration: none;
}

.site-nav nav a:hover,
.site-nav nav a[aria-current="page"],
.site-footer a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.site-page .site-nav {
  position: relative;
  color: var(--cream);
  background: var(--charcoal);
  border-bottom: 3px solid var(--source);
}

.hero {
  position: relative;
  min-height: 78svh;
  display: grid;
  align-items: center;
  overflow: hidden;
  color: #fff;
}

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(17, 15, 16, 0.93), rgba(28, 19, 18, 0.68) 42%, rgba(17, 15, 16, 0.16)),
    linear-gradient(0deg, rgba(134, 22, 22, 0.38), rgba(17, 15, 16, 0));
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(760px, calc(100% - 32px));
  margin-left: clamp(18px, 6vw, 76px);
  padding-top: 68px;
}

.hero-content h1 {
  margin: 8px 0 14px;
  max-width: 720px;
  font-size: clamp(54px, 8vw, 112px);
  line-height: 0.92;
  letter-spacing: 0;
}

.hero-logo {
  display: block;
  width: clamp(112px, 16vw, 184px);
  height: auto;
  margin-bottom: 10px;
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.48));
}

.home-quick {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border-bottom: 1px solid var(--line);
}

.home-quick a {
  min-height: 138px;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 24px clamp(18px, 4vw, 42px);
  color: var(--ink);
  background: var(--panel);
  text-decoration: none;
}

.home-quick a:hover {
  background: #fff4dc;
}

.home-quick span {
  color: var(--source);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.home-quick strong {
  max-width: 340px;
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.12;
}

.hero-copy {
  max-width: 620px;
  margin: 0;
  color: #fff4df;
  font-size: clamp(18px, 2vw, 24px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.link-button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border-radius: 6px;
  font-weight: 800;
  text-decoration: none;
}

.link-button.ghost {
  background: rgba(255, 241, 210, 0.08);
  color: #fff;
  border-color: rgba(255, 241, 210, 0.55);
}

.intro-band,
.work-band,
.quote-band,
.feature-band,
.process-band {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(22px, 4vw, 54px);
  padding: clamp(34px, 6vw, 78px) clamp(18px, 6vw, 76px);
}

.intro-band {
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}

.intro-band h2,
.section-heading h2,
.work-copy h2,
.quote-band h2,
.feature-band h2,
.page-hero h1,
.process-band h2,
.contact-panel h2 {
  margin: 6px 0 0;
  max-width: 760px;
  font-size: clamp(30px, 4vw, 54px);
  line-height: 1.02;
  letter-spacing: 0;
}

.intro-band p,
.work-copy p,
.quote-band p,
.feature-band p,
.page-hero p,
.service-list p,
.contact-panel p,
.service-card p,
.process-list span {
  color: #4b5661;
  font-size: 16px;
}

.feature-band {
  align-items: center;
  background: var(--bg);
}

.feature-photos {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.feature-photos img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
}

.page-hero {
  display: grid;
  gap: 10px;
  padding: clamp(34px, 6vw, 84px) clamp(18px, 6vw, 76px);
  background: var(--charcoal);
  color: var(--cream);
  border-bottom: 4px solid var(--source);
}

.page-hero.compact-page-hero {
  padding-bottom: clamp(28px, 4vw, 52px);
}

.page-hero h1 {
  margin: 0;
  max-width: 920px;
}

.page-hero p {
  max-width: 680px;
  margin: 0;
  color: #eadfca;
  font-size: clamp(17px, 2vw, 21px);
}

.service-list {
  display: grid;
  padding: clamp(22px, 5vw, 64px) clamp(18px, 6vw, 76px);
  background: var(--panel);
}

.service-list article {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: clamp(14px, 4vw, 38px);
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.service-list article:last-child {
  border-bottom: 0;
}

.service-list span {
  color: var(--source);
  font-weight: 900;
}

.service-list h2 {
  margin: 0 0 7px;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.08;
}

.service-list p,
.contact-panel p {
  margin: 0;
}

.process-band {
  background: #eadfce;
  border-block: 1px solid var(--line);
}

.rates-band {
  display: grid;
  gap: clamp(20px, 4vw, 38px);
  padding: clamp(34px, 6vw, 78px) clamp(18px, 6vw, 76px);
  color: var(--cream);
  background: var(--charcoal);
  border-block: 4px solid var(--source);
}

.rates-band h2 {
  margin: 6px 0 0;
  max-width: 860px;
  font-size: clamp(30px, 4vw, 54px);
  line-height: 1.02;
  letter-spacing: 0;
}

.rates-band > div:first-child p:last-child,
.pricing-note {
  max-width: 760px;
  margin: 0;
  color: #eadfca;
  font-size: 16px;
}

.rates-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.rates-grid article {
  min-height: 180px;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 18px;
  background: rgba(255, 241, 210, 0.08);
  border: 1px solid rgba(255, 241, 210, 0.18);
  border-radius: 8px;
}

.rates-grid span {
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.rates-grid strong {
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1;
}

.rates-grid p {
  margin: 0;
  color: #eadfca;
  font-size: 14px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: clamp(18px, 5vw, 58px) clamp(12px, 5vw, 76px) clamp(34px, 6vw, 78px);
}

.gallery-grid figure {
  margin: 0;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.gallery-grid img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.gallery-grid figcaption {
  min-height: 48px;
  display: flex;
  align-items: center;
  padding: 10px 12px;
  color: var(--steel);
  font-size: 13px;
  font-weight: 800;
}

.contact-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: clamp(22px, 5vw, 64px) clamp(18px, 6vw, 76px);
}

.contact-panel {
  display: grid;
  align-content: start;
  gap: 14px;
  min-height: 260px;
  padding: clamp(20px, 4vw, 34px);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.social-links a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  color: var(--cream);
  background: var(--charcoal);
  border-radius: 6px;
  font-weight: 900;
  text-decoration: none;
}

.social-links a:hover {
  background: var(--source-dark);
}

.contact-lines {
  display: grid;
  gap: 6px;
  color: var(--steel);
  font-weight: 800;
}

.contact-lines a {
  color: var(--source);
  text-decoration: none;
}

.contact-lines a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.section-wrap {
  padding: clamp(36px, 6vw, 82px) clamp(18px, 6vw, 76px);
}

.section-heading {
  max-width: 820px;
  margin-bottom: 24px;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.service-card {
  min-height: 230px;
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.service-card span {
  color: var(--source);
  font-weight: 900;
}

.service-card h3 {
  margin: 0;
  font-size: 22px;
}

.service-card p {
  margin: 0;
}

.work-band {
  background: #eadfce;
  border-block: 1px solid var(--line);
}

.process-list {
  display: grid;
  gap: 10px;
}

.process-list div {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 18px;
  align-items: center;
  min-height: 72px;
  padding: 16px 0;
  border-bottom: 1px solid #d4c2a8;
}

.process-list div:last-child {
  border-bottom: 0;
}

.process-list strong {
  color: var(--charcoal);
  font-size: 20px;
}

.quote-band {
  align-items: center;
  background: var(--charcoal);
  color: var(--cream);
}

.quote-band p {
  color: #eadfca;
}

.quote-band .link-button {
  justify-self: end;
}

.site-footer {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px clamp(18px, 6vw, 76px);
  color: var(--cream);
  background: var(--charcoal);
  border-top: 4px solid var(--source-dark);
  font-weight: 800;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.footer-brand img {
  width: 46px;
  height: 46px;
  padding: 3px;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 14px;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
select,
input,
textarea {
  border-radius: 6px;
}

button {
  min-height: 40px;
  border: 1px solid transparent;
  padding: 0 14px;
  font-weight: 700;
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.primary {
  background: var(--source);
  color: #fff9ec;
}

.primary:hover {
  background: var(--source-dark);
}

.secondary {
  background: #fffaf1;
  color: var(--ink);
  border-color: var(--line-strong);
}

.secondary:hover {
  border-color: var(--steel);
}

.app-header {
  min-height: 118px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px clamp(18px, 4vw, 48px);
  background: var(--charcoal);
  color: var(--cream);
  border-bottom: 5px solid var(--source);
}

.app-brand {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  color: inherit;
  text-decoration: none;
}

.app-brand img {
  width: 76px;
  height: 76px;
  padding: 5px;
}

.app-header h1 {
  margin: 3px 0 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.05;
  letter-spacing: 0;
}

.eyebrow {
  margin: 0;
  color: var(--gold);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.source-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 190px;
  min-height: 42px;
  justify-content: center;
  padding: 8px 14px;
  background: rgba(255, 241, 210, 0.1);
  border: 1px solid rgba(255, 241, 210, 0.24);
  border-radius: 6px;
  font-weight: 700;
}

.app-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.header-link {
  min-height: 42px;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--amber);
}

.source-status.ok .status-dot {
  background: var(--ok);
}

.source-status.error .status-dot {
  background: var(--danger);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  padding: 18px clamp(12px, 3vw, 36px) 36px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 18px;
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.panel-heading.compact {
  align-items: center;
}

.panel-heading h2 {
  margin: 0;
  font-size: 18px;
  letter-spacing: 0;
}

.panel-heading p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.button-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-grid,
.quote-controls {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 12px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--steel);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

input,
select,
textarea {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  color: var(--ink);
  background: #fffdf7;
  border: 1px solid var(--line-strong);
  outline: none;
  text-transform: none;
}

textarea {
  min-height: 78px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--source);
  box-shadow: 0 0 0 3px rgba(184, 34, 34, 0.16);
}

.search-box {
  min-width: min(320px, 100%);
}

.results-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.results-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

.results-table th,
.results-table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.results-table th {
  background: #efe2cc;
  color: var(--steel);
  font-size: 12px;
  text-transform: uppercase;
}

.results-table tr:last-child td {
  border-bottom: 0;
}

.item-name {
  display: grid;
  gap: 3px;
}

.item-name strong {
  font-size: 14px;
}

.item-name span,
.mono {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
}

.price {
  font-weight: 800;
}

.delta {
  display: inline-flex;
  min-width: 72px;
  justify-content: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.delta.up {
  color: #8b1d18;
  background: var(--source-soft);
}

.delta.down {
  color: #11633f;
  background: #def7ea;
}

.delta.same {
  color: var(--muted);
  background: #efe7db;
}

.quote-layout {
  display: grid;
  grid-template-columns: minmax(260px, 1.2fr) minmax(280px, 0.8fr);
  gap: 18px;
}

.quote-controls {
  grid-template-columns: repeat(2, minmax(120px, 1fr));
}

.wide {
  grid-column: 1 / -1;
}

.quote-summary {
  display: grid;
  align-content: start;
  gap: 14px;
}

.quote-lines {
  display: grid;
  gap: 8px;
}

.quote-line {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: start;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.quote-line button {
  width: 36px;
  min-height: 32px;
  padding: 0;
}

.totals {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.totals div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
}

.totals div:last-child {
  border-bottom: 0;
}

.totals dt {
  color: var(--muted);
}

.totals dd {
  margin: 0;
  font-weight: 800;
}

.grand-total {
  background: var(--charcoal);
  color: var(--cream);
}

.grand-total dt {
  color: #eadfca;
}

.chat-output {
  width: 100%;
  margin-top: 16px;
  min-height: 210px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  text-transform: none;
}

.history-list {
  display: grid;
  gap: 8px;
}

.history-entry {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.history-entry strong {
  display: block;
  margin-bottom: 3px;
}

.history-entry p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.empty-state {
  padding: 18px;
  color: var(--muted);
  text-align: center;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  max-width: min(360px, calc(100vw - 36px));
  padding: 12px 14px;
  color: #fff;
  background: var(--charcoal);
  border-radius: 8px;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 150ms ease, transform 150ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 980px) {
  .app-header,
  .panel-heading,
  .quote-layout {
    grid-template-columns: 1fr;
  }

  .app-header,
  .panel-heading {
    align-items: stretch;
  }

  .filter-grid,
  .quote-controls {
    grid-template-columns: repeat(2, minmax(140px, 1fr));
  }

  .intro-band,
  .work-band,
  .quote-band,
  .feature-band,
  .process-band,
  .home-quick,
  .contact-layout,
  .service-grid,
  .rates-grid {
    grid-template-columns: 1fr;
  }

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

  .quote-band .link-button {
    justify-self: start;
  }
}

@media (max-width: 640px) {
  .site-nav {
    position: relative;
    color: var(--cream);
    background: var(--charcoal);
    border-bottom: 3px solid var(--source);
    flex-wrap: wrap;
  }

  .brand-mark {
    color: var(--cream);
  }

  .brand-mark img {
    width: 48px;
    height: 48px;
  }

  .site-nav nav {
    width: 100%;
    justify-content: flex-start;
    gap: 18px;
    overflow-x: auto;
    font-size: 13px;
  }

  .hero {
    min-height: 72svh;
  }

  .hero-overlay {
    background: linear-gradient(0deg, rgba(17, 15, 16, 0.86), rgba(49, 18, 16, 0.38));
  }

  .hero-content {
    width: calc(100% - 28px);
    margin-inline: 14px;
    padding-top: 28px;
  }

  .hero-content h1 {
    font-size: 52px;
  }

  .hero-logo {
    width: 118px;
  }

  .home-quick a {
    min-height: 108px;
    padding: 18px 14px;
  }

  .feature-band,
  .rates-band,
  .page-hero,
  .process-band,
  .contact-layout,
  .service-list {
    padding-inline: 14px;
  }

  .feature-photos {
    grid-template-columns: 1fr;
  }

  .page-hero h1 {
    font-size: 34px;
  }

  .service-list article {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 20px 0;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
    padding-inline: 10px;
  }

  .contact-panel {
    min-height: 0;
  }

  .social-links a,
  .hero-actions .link-button,
  .contact-panel .link-button {
    width: 100%;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-footer nav {
    justify-content: flex-start;
  }

  .process-list div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .app-header {
    padding: 22px 14px;
    flex-direction: column;
  }

  .app-brand {
    align-items: flex-start;
  }

  .app-brand img {
    width: 68px;
    height: 68px;
  }

  .app-header-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    justify-content: stretch;
  }

  .app-header-actions .header-link {
    width: 100%;
  }

  .source-status {
    grid-column: 1 / -1;
    min-width: 0;
  }

  .workspace {
    padding: 12px 10px 28px;
  }

  .panel {
    padding: 14px;
  }

  .filter-grid,
  .quote-controls {
    grid-template-columns: 1fr;
  }

  .button-row {
    width: 100%;
  }

  .button-row button,
  .button-row select,
  .panel-heading button {
    flex: 1;
    min-width: 0;
  }
}
