:root {
  --paper: #f4efe6;
  --paper-2: #ebe4d6;
  --ink: #1b1714;
  --muted: #6a6258;
  --line: #d9d0c2;
  --copper: #b85c38;
  --copper-d: #8d3f22;
  --forest: #2d5a4e;
  --urgent: #9a2f2f;
  --ok: #2d5a4e;
  --phone-w: 390px;
  --phone-h: 780px;
  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans: "Figtree", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, #fff8ee 0%, transparent 55%),
    #cfc4b3;
}

a { color: inherit; text-decoration: none; }
button, .btn {
  font-family: inherit;
  cursor: pointer;
  border: 0;
}

.stage {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 16px 48px;
}

.chrome {
  width: min(1100px, 100%);
  display: grid;
  gap: 18px;
  justify-items: center;
}

.brand-bar {
  display: flex;
  align-items: baseline;
  gap: 14px;
  color: var(--ink);
}
.brand-bar strong {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.03em;
}
.brand-bar span { color: var(--muted); font-size: 14px; }

.hint {
  max-width: 420px;
  text-align: center;
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 13px;
  color: var(--muted);
}
.hint b { color: var(--copper-d); font-weight: 600; }

.phone {
  width: var(--phone-w);
  height: var(--phone-h);
  background: var(--paper);
  border: 10px solid #2a2420;
  border-radius: 36px;
  box-shadow: 0 30px 80px rgba(40, 30, 20, 0.28);
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}
.phone::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 92px;
  height: 8px;
  background: #1b1714;
  border-radius: 8px;
  z-index: 5;
}

.desktop {
  width: min(1080px, 100%);
  min-height: 720px;
  background: #f7f3ec;
  border: 1px solid #b9ae9c;
  border-radius: 16px;
  box-shadow: 0 24px 70px rgba(40, 30, 20, 0.22);
  overflow: hidden;
}

.screen { display: none; height: 100%; }
.screen.on { display: flex; flex-direction: column; height: 100%; }

.status {
  display: flex;
  justify-content: space-between;
  padding: 18px 20px 6px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 18px 10px;
}
.top h1 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
}
.top p { margin: 2px 0 0; font-size: 12px; color: var(--muted); }
.chip {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid var(--ink);
  padding: 4px 8px;
  border-radius: 4px;
  background: #fff;
}

.scroll {
  flex: 1;
  overflow: auto;
  padding: 0 16px 18px;
}

.stamp {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 8px;
  border: 1.5px solid currentColor;
  transform: rotate(-2deg);
}
.stamp.urgent { color: var(--urgent); }
.stamp.progress { color: var(--forest); }
.stamp.done { color: var(--muted); }
.stamp.ia { color: var(--copper-d); background: #f3d9cc; border-color: var(--copper); }

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 48px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 15px;
}
.btn-primary {
  background: var(--ink);
  color: #f7f1e8;
}
.btn-copper {
  background: var(--copper);
  color: #fff8f3;
}
.btn-ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
}
.btn-row { display: grid; gap: 8px; margin-top: 14px; }

.hero-action {
  background: var(--ink);
  color: #f7f1e8;
  border-radius: 16px;
  padding: 16px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 4px 0 16px;
}
.hero-action b { font-size: 16px; }
.hero-action small { display: block; color: #d8cfc3; font-weight: 500; margin-top: 2px; }
.plus {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--copper); color: white;
  display: grid; place-items: center; font-size: 22px; font-weight: 500;
}

.section-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 8px 0 8px;
}

.card {
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 8px;
}
.card h3 { margin: 8px 0 4px; font-size: 16px; }
.card p { margin: 0; color: var(--muted); font-size: 13px; }
.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  border-top: 1px solid var(--line);
  background: #faf6ee;
}
.tabs button {
  background: none;
  padding: 12px 8px 16px;
  font-size: 12px;
  font-weight: 650;
  color: var(--muted);
}
.tabs button.on { color: var(--ink); }

.photo {
  height: 168px;
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(20,16,12,0.15), rgba(20,16,12,0.45)),
    repeating-linear-gradient(90deg, #7d8c96 0 12px, #6e7c86 12px 24px);
  position: relative;
  overflow: hidden;
  margin-bottom: 12px;
  border: 1px solid #8a7b6a;
}
.photo .readout {
  position: absolute;
  right: 14px;
  top: 14px;
  background: #111;
  color: #f3c14a;
  font-family: ui-monospace, monospace;
  font-size: 22px;
  padding: 8px 10px;
  border-radius: 8px;
  letter-spacing: 0.04em;
}
.photo figcaption {
  position: absolute;
  left: 12px;
  bottom: 10px;
  color: white;
  font-size: 12px;
  font-weight: 600;
}

textarea, input[type="text"] {
  width: 100%;
  border: 1px solid var(--line);
  background: #fffdf8;
  border-radius: 12px;
  padding: 12px;
  font: 15px/1.4 var(--sans);
  color: var(--ink);
  resize: none;
}

.ia-head {
  font-family: var(--serif);
  font-size: 26px;
  line-height: 1.15;
  margin: 4px 0 10px;
  letter-spacing: -0.03em;
}
.kv {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 6px 10px;
  font-size: 14px;
  padding: 10px 0;
  border-top: 1px dashed var(--line);
}
.kv b { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; padding-top: 2px; }

.score {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f3d9cc;
  border-radius: 12px;
  padding: 10px 12px;
  margin: 8px 0 4px;
}
.score strong { font-size: 22px; font-family: var(--serif); color: var(--copper-d); }

.provider {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 12px;
  align-items: center;
}
.provider .eta { font-weight: 800; color: var(--forest); }
.pick {
  grid-column: 1 / -1;
  margin-top: 6px;
}

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li {
  position: relative;
  padding: 0 0 16px 18px;
  border-left: 2px solid var(--line);
  margin-left: 7px;
  font-size: 14px;
}
.timeline li:last-child { border-left-color: transparent; }
.timeline li::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--copper);
}
.timeline .when { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }

.roles {
  background: var(--paper);
  width: min(920px, 100%);
  border-radius: 20px;
  padding: 36px 28px;
  border: 1px solid #b9ae9c;
}
.roles h2 {
  font-family: var(--serif);
  font-size: 40px;
  margin: 0 0 8px;
  letter-spacing: -0.04em;
}
.roles .lede { color: var(--muted); margin: 0 0 22px; max-width: 40em; }
.who-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 0 0 22px;
  text-align: left;
}
.who-col h3 { margin: 0 0 10px; font-size: 14px; }
.who-col ul { list-style: none; margin: 0; padding: 0; }
.who-col li {
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  margin-bottom: 6px;
  font-size: 13px;
}
.who-col li b { display: block; }
.who-col li span { color: var(--muted); font-size: 12px; }
.who-col.matt li { opacity: 0.78; }
.who-col.matt .gone { text-decoration: line-through; color: var(--muted); }
.role-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}
.role {
  text-align: left;
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
}
.role:hover { border-color: var(--ink); }
.role b { display: block; font-size: 18px; margin-bottom: 6px; }
.role span { color: var(--muted); font-size: 14px; }
.alt {
  margin-top: 16px;
  background: none;
  color: var(--copper-d);
  font-weight: 700;
  font-size: 14px;
}

.hq-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  background: #fffdf8;
}
.hq-top h1 { margin: 0; font-family: var(--serif); font-size: 26px; }
.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 18px 22px;
}
.metric {
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
}
.metric span { color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; }
.metric b { display: block; font-size: 28px; font-family: var(--serif); margin-top: 6px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); }
th { font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
tr.active { background: #f3d9cc; }
.hq-body { padding: 0 22px 22px; }

.back {
  background: none;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  padding: 0;
}

.kfc .chip { background: #fff; }
.pulse { color: var(--urgent); font-weight: 800; }

.case-kicker {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--copper-d);
  margin: 0 0 8px;
}
.chat { display: grid; gap: 10px; margin-bottom: 12px; }
.bubble {
  max-width: 92%;
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.4;
}
.bubble.bot {
  background: #fffdf8;
  border: 1px solid var(--line);
  border-bottom-left-radius: 4px;
}
.bubble.me {
  justify-self: end;
  background: var(--ink);
  color: #f7f1e8;
  border-bottom-right-radius: 4px;
}
.price {
  font-family: var(--serif);
  font-size: 28px;
  margin: 4px 0;
}
.visits { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.visit {
  font-size: 11px;
  font-weight: 700;
  padding: 5px 8px;
  border-radius: 8px;
}
.visit.ok { background: #d7ebe3; color: #1e4a3e; }
.visit.warn { background: #f7e3c4; color: #7a4a12; }
.visit.miss { background: #f3d0d0; color: #7a1f1f; }
.visit.plan { background: #dce6f2; color: #1d3a5c; }
.insight {
  background: var(--ink);
  color: #f7f1e8;
  border-radius: 14px;
  padding: 14px 16px;
  margin: 0 22px 16px;
}
.insight small { color: #d8cfc3; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; font-size: 11px; }
.insight p { margin: 6px 0 0; font-size: 15px; }
.alert-strip {
  background: #f3d9cc;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13px;
  margin-bottom: 12px;
}
.vs {
  font-size: 11px;
  color: var(--muted);
  background: #efe8dc;
  border-radius: 8px;
  padding: 8px 10px;
  margin: 0 0 12px;
  line-height: 1.35;
}
.offer {
  background: var(--ink);
  color: #f7f1e8;
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 10px;
}
.offer .who { font-size: 13px; color: #d8cfc3; }
.offer .eta { font-size: 15px; font-weight: 700; color: #e8c4b0; margin-top: 4px; }
.actions3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  padding: 0 22px 18px;
}
.act {
  text-align: left;
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
}
.act b { display: block; font-size: 18px; margin: 4px 0 6px; }
.act span { color: var(--muted); font-size: 13px; }
.act.hot { border-color: var(--ink); background: #f3d9cc; }

@media (max-width: 820px) {
  .role-grid, .who-wrap { grid-template-columns: 1fr; }
  .metrics, .actions3 { grid-template-columns: 1fr 1fr; }
  .phone { transform: scale(0.92); transform-origin: top center; }
}
