:root {
  --ink: #1b1714;
  --ink-soft: #3c342c;
  --muted: #746b62;
  --paper: #f4efe8;
  --paper-2: #ebe3d8;
  --card: #fffcf8;
  --line: #e3d8cb;
  --brass: #8d6b3e;
  --brass-2: #c6a56c;
  --pine: #1e3b32;
  --pine-2: #2f6a54;
  --clay: #9c3b28;
  --ok: #1f7a4d;
  --warn: #9a6412;
  --shadow: 0 18px 40px rgba(48, 32, 16, 0.08);
  --radius: 18px;
  --sans: "Outfit", "Avenir Next", "Segoe UI", sans-serif;
  --serif: "Fraunces", "Iowan Old Style", Palatino, Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.5;
}
button, input, select, textarea { font-family: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }
a { color: inherit; }

.demo-bar {
  position: sticky; top: 0; z-index: 40;
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  padding: 8px 14px;
  background: #241c16;
  color: #f6efe6;
  font-size: 12px;
}
.demo-bar strong { letter-spacing: 0.08em; text-transform: uppercase; font-size: 10px; color: var(--brass-2); }
.demo-bar button {
  border: 1px solid rgba(255,255,255,0.16);
  background: transparent;
  color: #f6efe6;
  border-radius: 999px;
  padding: 6px 10px;
}
.demo-bar button.active { background: var(--brass); border-color: var(--brass); color: white; }
.demo-bar .spacer { flex: 1; }

.app-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 22px;
  background: rgba(244, 239, 232, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 42px; z-index: 30;
}
.brand { display: flex; gap: 10px; align-items: center; background: none; border: 0; padding: 0; text-align: left; }
.mark {
  width: 36px; height: 36px; border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.45), transparent 40%),
    linear-gradient(160deg, #f7f4ef, #d9d3cb 40%, #b7b1a8);
  border: 1px solid #cfc6ba;
  box-shadow: inset 0 0 0 4px rgba(255,255,255,0.35);
}
.brand b { font-family: var(--serif); font-weight: 560; font-size: 18px; display: block; line-height: 1; }
.brand small { color: var(--muted); letter-spacing: 0.04em; }
.nav { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.nav button, .text-btn {
  background: none; border: 0; padding: 8px 10px; color: var(--ink-soft); border-radius: 999px;
}
.nav button.active { background: white; box-shadow: 0 1px 0 var(--line); }
.btn {
  border: 0; border-radius: 999px; padding: 12px 16px;
  background: var(--pine); color: white; font-weight: 600;
}
.btn.secondary { background: white; color: var(--ink); border: 1px solid var(--line); }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn.brass { background: var(--brass); }
.btn.warn { background: var(--clay); }
.btn.small { padding: 8px 12px; font-size: 13px; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.wrap { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }
.hero {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 28px;
  padding: 34px 0 18px; align-items: center;
}
.kicker { color: var(--brass); letter-spacing: 0.14em; text-transform: uppercase; font-size: 12px; font-weight: 700; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 560; letter-spacing: -0.03em; margin: 0 0 8px; }
h1 { font-size: clamp(40px, 6vw, 68px); line-height: 0.96; }
h2 { font-size: clamp(28px, 4vw, 42px); line-height: 1.05; }
.lede { font-size: 18px; color: var(--ink-soft); max-width: 46ch; }
.hero-photo { border-radius: 28px; overflow: hidden; min-height: 320px; box-shadow: var(--shadow); }
.hero-photo img { width: 100%; height: 460px; object-fit: cover; }
.cta-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.trust { display: flex; gap: 18px; margin-top: 18px; color: var(--muted); font-size: 13px; }

.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; padding: 10px 0 28px; }
.step, .card, .panel {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.step { padding: 16px; }
.step em { font-family: var(--serif); font-style: normal; color: var(--brass); font-size: 22px; }
.gallery { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 10px; }
.gallery figure { margin: 0; border-radius: 20px; overflow: hidden; position: relative; min-height: 180px; }
.gallery img { width: 100%; height: 240px; object-fit: cover; }
.gallery figcaption {
  position: absolute; left: 10px; bottom: 10px; background: rgba(27,23,20,0.72); color: white;
  padding: 6px 10px; border-radius: 999px; font-size: 12px;
}
.section { padding: 28px 0; }
.quote-band {
  background: var(--pine); color: #f6f1ea; border-radius: 28px; padding: 28px;
  display: flex; justify-content: space-between; gap: 18px; align-items: center;
}

.layout { display: grid; grid-template-columns: 280px 1fr; gap: 18px; padding: 18px 0 40px; }
.side { position: sticky; top: 116px; align-self: start; }
.panel { padding: 16px; }
.muted { color: var(--muted); }
.tiny { font-size: 12px; color: var(--muted); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.field label { font-size: 13px; font-weight: 650; }
.field input, .field select, .field textarea {
  border: 1px solid var(--line); background: white; border-radius: 12px; padding: 11px 12px; font-size: 15px;
}
.help {
  background: #f8f3ea; border: 1px dashed #ddcdae; border-radius: 12px; padding: 10px 12px; font-size: 13px; color: var(--ink-soft);
}
.shapes { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.shape-btn, .swatch, .slot {
  border: 1px solid var(--line); background: white; border-radius: 14px; padding: 10px; text-align: left;
}
.shape-btn.active, .swatch.active, .slot.active { border-color: var(--pine); box-shadow: 0 0 0 3px rgba(47,106,84,0.15); }
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; max-height: 460px; overflow: auto; padding: 8px 4px 8px 0; }
.swatch { position: relative; overflow: visible; }
.slab-pop { display: none; position: fixed; z-index: 30; width: 240px; background: white; border: 1px solid var(--line); border-radius: 12px; padding: 8px; box-shadow: var(--shadow); pointer-events: none; }
.slab-pop img { height: 160px; width: 100%; object-fit: cover; }
.edge-dd-btn { text-align: left; border: 1px solid var(--line); background: white; border-radius: 12px; padding: 10px 12px; }
.edge-dd-menu { display: none; position: absolute; z-index: 8; left: 0; right: 130px; top: 44px; background: white; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 6px; }
.edge-dd-menu.open { display: block; }
.edge-dd-opt { position: relative; display: block; width: 100%; text-align: left; border: 0; background: transparent; border-radius: 8px; padding: 8px 10px; }
.edge-dd-opt:hover { background: #f4efe8; }
.edge-dd-opt .edge-tip { display: none; position: absolute; left: 100%; top: 0; margin-left: 8px; background: white; border: 1px solid var(--line); border-radius: 12px; padding: 8px; box-shadow: var(--shadow); }
.edge-dd-opt:hover .edge-tip { display: block; }
.edge-now { background: #fbf8f4; border-radius: 12px; padding: 4px; }
.swatch { position: relative; overflow: visible; }
.slab-pop { display: none; position: fixed; z-index: 30; width: 240px; background: white; border: 1px solid var(--line); border-radius: 12px; padding: 8px; box-shadow: var(--shadow); pointer-events: none; }
.slab-pop img { height: 160px; width: 100%; object-fit: cover; }
.chip { background-size: cover; }
.price { font-family: var(--serif); font-size: 34px; }
.pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 4px 8px; font-size: 12px; background: var(--paper-2); }
.pill.ok { background: #e5f4ec; color: var(--ok); }
.pill.warn { background: #f8ecd8; color: var(--warn); }
.pill.bad { background: #f8e4df; color: var(--clay); }
.pill.pine { background: #e7f0ec; color: var(--pine); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.job-row { display: flex; justify-content: space-between; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.kpi { padding: 14px; }
.kpi b { display: block; font-family: var(--serif); font-size: 28px; }
.timeline { display: flex; flex-direction: column; gap: 0; }
.tl {
  display: grid; grid-template-columns: 16px 1fr; gap: 10px;
}
.tl i {
  width: 12px; height: 12px; border-radius: 50%; background: var(--line); margin-top: 4px; display: block;
}
.tl.done i { background: var(--pine-2); }
.tl .body { border-left: 1px solid var(--line); margin-left: -16px; padding: 0 0 14px 18px; }
.sign-pad { border: 1px dashed var(--line); border-radius: 12px; background: white; width: 100%; touch-action: none; }
.notice {
  background: #fff7ea; border: 1px solid #ead7b4; border-radius: 14px; padding: 12px; margin: 10px 0;
}
.problem { outline: 2px solid #e7b2a6; background: #fff8f6; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.tabs button { border: 1px solid var(--line); background: white; border-radius: 999px; padding: 7px 11px; }
.tabs button.active { background: var(--ink); color: white; border-color: var(--ink); }
.drawing { background: #fbf8f4; border-radius: 16px; padding: 8px; }
.drawing svg { width: 100%; height: auto; display: block; }
.modal-back {
  position: fixed; inset: 0; background: rgba(27,23,20,0.46); z-index: 50;
  display: flex; align-items: end; justify-content: center; padding: 12px;
}
.modal {
  background: var(--card); width: min(640px, 100%); border-radius: 22px 22px 16px 16px;
  padding: 18px; max-height: min(88vh, 820px); overflow: auto;
}
.story { display: grid; grid-template-columns: 120px 1fr; gap: 12px; align-items: center; }
.tape {
  height: 86px; border-radius: 12px; background:
    repeating-linear-gradient(90deg, #f4e2b8 0 10px, #e7c98a 10px 12px);
  position: relative; overflow: hidden;
}
.tape span {
  position: absolute; top: 28px; height: 8px; width: 40%; background: var(--pine);
  animation: measure 2.8s ease-in-out infinite;
  border-radius: 99px;
}
@keyframes measure { 0% { left: 6%; width: 18%; } 50% { left: 10%; width: 74%; } 100% { left: 6%; width: 18%; } }
.log { font-family: var(--mono); font-size: 12px; background: #211c18; color: #f3eadf; border-radius: 12px; padding: 12px; white-space: pre-wrap; }
.footer { padding: 28px 0 48px; color: var(--muted); font-size: 13px; }
.split { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.hide-mobile { }
@media (max-width: 860px) {
  .hero, .layout, .steps, .gallery, .grid-3, .swatches, .shapes { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .hero-photo img, .gallery img { height: 220px; }
  .app-header { top: 74px; }
  .side { position: static; }
  .hide-mobile { display: none; }
  .quote-band { flex-direction: column; align-items: flex-start; }
}
