:root {
  --ink: #18221f;
  --muted: #60706a;
  --paper: #f7f8f5;
  --panel: #ffffff;
  --line: #dce4df;
  --accent: #0f766e;
  --gold: #b7791f;
  --dark: #13221e;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

a {
  color: inherit;
}

button,
input,
select {
  font: inherit;
}

.topbar {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 clamp(18px, 5vw, 64px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  background: var(--dark);
  color: #fff;
}

.brand,
.nav {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand,
.nav a {
  text-decoration: none;
  font-weight: 800;
}

.nav a {
  color: rgba(255, 255, 255, 0.72);
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #fff;
  color: var(--dark);
  font-size: 0.82rem;
}

.hero {
  position: relative;
  min-height: calc(100vh - 70px);
  display: grid;
  align-items: center;
  overflow: hidden;
  padding: clamp(48px, 8vw, 96px) clamp(18px, 6vw, 84px);
}

.hero-image,
.hero-shade {
  position: absolute;
  inset: 0;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-shade {
  background: linear-gradient(90deg, rgba(19, 34, 30, 0.88), rgba(19, 34, 30, 0.48), rgba(19, 34, 30, 0.1));
}

.hero-copy {
  position: relative;
  max-width: 720px;
  color: #fff;
}

.hero h1,
.section-head h2,
.quote-preview h2 {
  margin: 0;
  letter-spacing: 0;
  line-height: 1.02;
}

.hero h1 {
  font-size: clamp(3rem, 8vw, 6.8rem);
}

.hero p:not(.eyebrow) {
  max-width: 620px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 1.16rem;
  line-height: 1.7;
}

.eyebrow {
  margin: 0 0 12px;
  color: #f5c46b;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 18px;
  cursor: pointer;
  font-weight: 900;
  text-decoration: none;
}

.button.primary {
  background: var(--accent);
  color: #fff;
}

.button.ghost,
.button.small {
  border-color: var(--line);
  background: #fff;
  color: var(--ink);
}

.button.small {
  min-height: 38px;
}

.builder-section,
.checklist-section,
.templates-section,
.article-page {
  padding: clamp(48px, 7vw, 84px) clamp(18px, 6vw, 84px);
}

.section-head {
  max-width: 760px;
  margin-bottom: 26px;
}

.section-head h2 {
  font-size: clamp(2rem, 4vw, 3.6rem);
}

.builder-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.75fr);
  gap: 18px;
  align-items: start;
}

.quote-form,
.quote-preview,
.software-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.quote-form,
.quote-preview {
  padding: 20px;
}

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

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 800;
}

input,
select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 0 12px;
}

.items-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 28px 0 12px;
}

.items-head h3 {
  margin: 0;
}

.line-items {
  display: grid;
  gap: 10px;
}

.line-item {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) 92px 110px 40px;
  gap: 10px;
  align-items: end;
}

.remove-item {
  width: 40px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  color: var(--muted);
  font-weight: 900;
}

.quote-preview {
  position: sticky;
  top: 18px;
  display: grid;
  gap: 18px;
}

.quote-preview .eyebrow {
  color: var(--gold);
}

#previewMeta,
.status-text {
  margin: 8px 0 0;
  color: var(--muted);
}

.preview-items {
  display: grid;
  gap: 10px;
}

.preview-row,
.totals div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.preview-row span,
.totals dt {
  color: var(--muted);
}

.preview-row strong,
.totals dd {
  margin: 0;
  text-align: right;
  font-weight: 900;
}

.totals {
  display: grid;
  gap: 10px;
  margin: 0;
}

.totals div:last-child {
  font-size: 1.35rem;
}

.preview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.software-band {
  background: var(--dark);
  color: #fff;
  padding: clamp(48px, 7vw, 84px) clamp(18px, 6vw, 84px);
}

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

.software-card {
  min-height: 170px;
  display: grid;
  align-content: space-between;
  padding: 20px;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
}

.software-card span,
.software-card small {
  color: rgba(255, 255, 255, 0.66);
}

.software-card strong {
  font-size: 1.5rem;
}

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

.template-grid a,
.article-card {
  min-height: 120px;
  display: grid;
  align-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  padding: 20px;
  text-decoration: none;
  font-weight: 900;
}

.article-hero {
  background: var(--dark);
  color: #fff;
  padding: clamp(48px, 8vw, 96px) clamp(18px, 6vw, 84px);
}

.article-hero h1 {
  max-width: 900px;
  margin: 0;
  font-size: clamp(2.8rem, 7vw, 5.8rem);
  line-height: 1.02;
  letter-spacing: 0;
}

.article-hero p {
  max-width: 720px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 1.12rem;
  line-height: 1.65;
}

.article-page {
  display: grid;
  gap: 28px;
}

.article-page h2 {
  margin: 0 0 10px;
  font-size: clamp(1.8rem, 4vw, 3rem);
}

.article-page p,
.article-page li {
  color: var(--muted);
  line-height: 1.7;
}

.article-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 22px;
}

.checklist {
  max-width: 840px;
  display: grid;
  gap: 14px;
  margin: 0;
  padding-left: 22px;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.65;
}

@media (max-width: 920px) {
  .builder-layout,
  .software-grid,
  .template-grid,
  .article-grid {
    grid-template-columns: 1fr;
  }

  .quote-preview {
    position: static;
  }
}

@media (max-width: 680px) {
  .topbar,
  .nav {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar {
    padding-block: 16px;
  }

  .hero {
    min-height: 620px;
  }

  .hero h1 {
    font-size: clamp(2.6rem, 16vw, 4.4rem);
  }

  .field-grid,
  .line-item {
    grid-template-columns: 1fr;
  }

  .remove-item {
    width: 100%;
  }
}
