:root {
  --bg-main: #f6f1e8;
  --bg-soft: #fffaf0;
  --ink: #181a1f;
  --muted: #5f6675;
  --accent: #ce612b;
  --accent-deep: #a94b1e;
  --line: #e6d8c5;
  --card: rgba(255, 250, 240, 0.9);
  --card-strong: #ffffff;
  --shadow: 0 20px 48px rgba(38, 24, 12, 0.12);
  --ok: #2f7f4f;
  --warn: #8e5a1a;
  --danger: #983737;
  --font-display: "Sora", "Trebuchet MS", sans-serif;
  --font-sans: "Plus Jakarta Sans", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 12%, #f8d8bf 0%, transparent 48%),
    radial-gradient(circle at 88% 8%, #f3e7d4 0%, transparent 45%),
    radial-gradient(circle at 14% 90%, #f7efe2 0%, transparent 52%),
    linear-gradient(180deg, var(--bg-main) 0%, #efe0cc 100%);
  font-family: var(--font-sans);
  padding: 24px;
}

.page-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.09) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.09) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: radial-gradient(circle at center, black 42%, transparent 100%);
}

.site-header,
.layout,
.site-footer {
  width: min(1160px, 100%);
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.site-header {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto;
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
}

.brand-wrap {
  line-height: 1.08;
}

.eyebrow {
  margin: 0;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: var(--muted);
}

.brand {
  margin: 8px 0 0;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3vw, 2.3rem);
  letter-spacing: 0.02em;
}

.tabs {
  display: inline-flex;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  max-width: 100%;
}

.tabs a {
  text-decoration: none;
  color: var(--ink);
  font-size: 0.9rem;
  padding: 8px 14px;
  border-radius: 999px;
  white-space: nowrap;
}

.tabs a.active {
  background: #fff;
  box-shadow: 0 6px 16px rgba(20, 23, 28, 0.1);
}

.layout {
  display: grid;
  gap: 18px;
}

.planner-shell {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  align-items: start;
}

.card {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 24px;
  padding: clamp(18px, 3vw, 30px);
  box-shadow: var(--shadow);
  backdrop-filter: blur(4px);
}

.hero h2 {
  margin: 10px 0 12px;
  font-size: clamp(1.4rem, 3vw, 2.4rem);
  line-height: 1.14;
  font-family: var(--font-display);
}

.badge {
  display: inline-block;
  margin: 0;
  background: rgba(206, 97, 43, 0.14);
  color: #813519;
  border: 1px solid rgba(206, 97, 43, 0.34);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.82rem;
}

.lead {
  margin: 0;
  color: var(--muted);
  max-width: 70ch;
}

.kpis {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.kpis div {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
}

.kpis span {
  display: block;
  font-weight: 700;
  font-size: 1.08rem;
}

.kpis small {
  color: var(--muted);
}

h2,
h3,
h4 {
  margin: 0 0 14px;
  font-family: var(--font-display);
}

.process-grid,
.trust-grid,
.question-grid {
  display: grid;
  gap: 10px;
}

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

.process-step {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  background: #fff;
  display: grid;
  gap: 8px;
}

.process-step b {
  color: var(--accent);
  font-family: var(--font-display);
}

.process-step p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

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

.trust-grid div {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  background: #fff;
}

.trust-grid p {
  margin: 0;
  color: var(--muted);
}

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

.question-grid p {
  margin: 0;
  border-radius: 14px;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  color: #403728;
}

.prompt-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.chip {
  border: 1px solid #d5c5b0;
  background: #fff;
  color: #3f3224;
  border-radius: 999px;
  padding: 7px 12px;
  cursor: pointer;
  font: inherit;
  font-size: 0.83rem;
}

.chip:hover {
  border-color: #bf8f66;
  transform: translateY(-1px);
}

.chat-shell {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  background: #fff;
}

.chat-log {
  max-height: 270px;
  overflow: auto;
  display: grid;
  gap: 8px;
  padding-right: 4px;
}

.chat-row {
  padding: 10px 12px;
  border-radius: 12px;
  width: fit-content;
  max-width: min(90%, 680px);
  line-height: 1.42;
}

.chat-row.user {
  margin-left: auto;
  background: #1f2128;
  color: #fff;
}

.chat-row.ai {
  background: #f7ede2;
  color: #332215;
}

.chat-form {
  margin-top: 10px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.step-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  margin-bottom: 14px;
}

.step-tab {
  border: none;
  background: transparent;
  color: #4a4137;
  border-radius: 999px;
  padding: 8px 12px;
  cursor: pointer;
  font: inherit;
  font-size: 0.84rem;
  white-space: nowrap;
}

.step-tab.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: #fff;
}

.step-panel {
  display: grid;
  gap: 10px;
}

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

label,
fieldset {
  display: grid;
  gap: 6px;
  font-size: 0.9rem;
}

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

input,
select,
textarea {
  width: 100%;
  border: 1px solid #d9c9b7;
  border-radius: 10px;
  padding: 10px 11px;
  background: #fff;
}

textarea {
  resize: vertical;
}

.checklist {
  grid-column: span 2;
  border: 1px solid #d9c9b7;
  border-radius: 12px;
  padding: 8px 10px 10px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.checklist legend {
  padding: 0 4px;
  color: var(--muted);
}

.checklist label {
  display: flex;
  gap: 6px;
  align-items: center;
}

.wizard-actions {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.actions {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.helper {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 10px 16px;
  text-decoration: none;
  cursor: pointer;
  transition: 140ms ease;
}

.btn-solid {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
}

.btn-solid:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
}

.btn-outline {
  background: #fff;
  color: var(--ink);
  border-color: #d7c8b5;
}

.quick-quote,
.offer-card,
.order-card,
.transparency {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  padding: 16px;
  display: grid;
  gap: 12px;
}

.quick-quote-head,
.transparency-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}

.quick-quote-head b {
  font-size: 1.16rem;
}

.quick-list,
.offer-grid,
.summary-grid,
.order-meta,
.warranty-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.quick-note,
.summary-note,
.transparency-note {
  margin: 0;
  color: var(--muted);
}

.quote-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quote-flag {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  border: 1px solid transparent;
}

.quote-flag.ok {
  color: var(--ok);
  background: rgba(47, 127, 79, 0.12);
  border-color: rgba(47, 127, 79, 0.3);
}

.quote-flag.warn {
  color: var(--warn);
  background: rgba(142, 90, 26, 0.12);
  border-color: rgba(142, 90, 26, 0.3);
}

.quote-flag.danger {
  color: var(--danger);
  background: rgba(152, 55, 55, 0.12);
  border-color: rgba(152, 55, 55, 0.32);
}

.transparency-lists {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.scope-card {
  border: 1px solid #e4d5c4;
  border-radius: 12px;
  padding: 10px;
  background: #fcf7ef;
}

.scope-card h4 {
  margin: 0 0 8px;
  font-size: 0.94rem;
}

.scope-card ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 5px;
}

.offer-output,
.order-output {
  min-height: 180px;
}

.offer-card h3 {
  margin: 0;
}

.offer-meta,
.recommendation-box,
.risks-box {
  display: grid;
  gap: 8px;
  border: 1px solid #e7d7c2;
  background: #fdf6ec;
  border-radius: 12px;
  padding: 12px;
}

.offer-stack {
  display: grid;
  gap: 12px;
}

.offer-section {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: #fff;
  display: grid;
  gap: 8px;
}

.offer-section ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
}

.warranty-grid {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  background: #fff;
}

.placeholder {
  color: var(--muted);
}

.full-width {
  grid-column: span 2;
}

.consent {
  display: flex;
  align-items: center;
  gap: 8px;
}

.consent input {
  width: auto;
}

.order-card.success {
  border-color: rgba(47, 127, 79, 0.4);
  background: #f2fbf5;
}

.order-card.error {
  border-color: rgba(152, 55, 55, 0.4);
  background: #fff5f5;
}

.order-meta span {
  color: var(--muted);
}

.compact-summary {
  position: sticky;
  bottom: 8px;
  margin-top: 12px;
  border: 1px solid #d7c4ae;
  background: rgba(255, 250, 240, 0.95);
  border-radius: 14px;
  padding: 10px 12px;
  backdrop-filter: blur(6px);
  display: none;
  gap: 8px;
}

.compact-summary strong {
  font-family: var(--font-display);
}

.site-footer {
  margin-top: 16px;
  color: var(--muted);
  text-align: center;
  font-size: 0.88rem;
}

.reveal {
  animation: rise 520ms ease both;
}

.delay-1 {
  animation-delay: 80ms;
}

.delay-2 {
  animation-delay: 160ms;
}

@keyframes rise {
  from {
    transform: translateY(14px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@media (max-width: 1080px) {
  .planner-shell {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  body {
    padding: 14px;
  }

  .site-header {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .kpis,
  .process-grid,
  .trust-grid,
  .question-grid,
  .form-grid,
  .transparency-lists {
    grid-template-columns: 1fr;
  }

  .checklist {
    grid-template-columns: 1fr;
  }

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

  .full-width {
    grid-column: auto;
  }
}

body[data-compact="1"] {
  padding: 10px;
}

body[data-compact="1"] .site-header {
  grid-template-columns: 1fr;
}

body[data-compact="1"] .tabs {
  overflow-x: auto;
  width: 100%;
}

body[data-compact="1"] .card {
  padding: 14px;
  border-radius: 18px;
}

body[data-compact="1"] .planner-shell,
body[data-compact="1"] .kpis,
body[data-compact="1"] .process-grid,
body[data-compact="1"] .trust-grid,
body[data-compact="1"] .question-grid,
body[data-compact="1"] .form-grid,
body[data-compact="1"] .checklist,
body[data-compact="1"] .transparency-lists {
  grid-template-columns: 1fr;
}

body[data-compact="1"] .wizard-actions {
  gap: 8px;
}

body[data-compact="1"] .btn {
  width: 100%;
}

body[data-compact="1"] .chat-row,
body[data-compact="1"] .lead {
  max-width: none;
}

body[data-compact="1"] .compact-summary {
  display: grid;
}
