:root {
  color-scheme: light;
  --ink: #1d2430;
  --dim: #6b7688;
  --line: #e2e6ee;
  --card: #ffffff;
  --page: #f5f6fa;
  --brand: #ff6a3d;
  --deep: #123b52;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, sans-serif;
}

h1, h2, h3 { line-height: 1.2; }

/* ---- bars ---- */

.bar {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: 1rem 1.5rem;
}

.bar.solid { background: var(--deep); color: #fff; position: sticky; top: 0; z-index: 1000; }

.mark {
  font-weight: 800;
  letter-spacing: -.02em;
  font-size: 1.15rem;
}

.mark::before {
  content: "";
  display: inline-block;
  width: .6rem; height: .6rem;
  margin-right: .45rem;
  border-radius: 50%;
  background: var(--brand);
}

.bar .who { margin-left: auto; font-size: .9rem; opacity: .85; }
.bar a.ghost { margin-left: auto; }

.ghost {
  border: 1px solid currentColor;
  background: none;
  color: inherit;
  font: inherit;
  font-size: .85rem;
  padding: .3rem .8rem;
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
  opacity: .8;
}

.ghost:hover { opacity: 1; }

/* ---- landing ---- */

#landing { background: linear-gradient(175deg, #fff6f1 0%, var(--page) 45%); }

.hero {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 3rem;
  align-items: center;
  max-width: 62rem;
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
}

.pitch h1 { font-size: clamp(2.1rem, 5vw, 3.2rem); margin: 0 0 1rem; letter-spacing: -.03em; }

.lead { font-size: 1.1rem; color: #3c4658; max-width: 30rem; }

.cta {
  display: inline-block;
  margin-top: 1rem;
  padding: .7rem 1.5rem;
  border: 0;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.cta:hover { background: #e85a2f; }
.cta.wide { display: block; width: 100%; border-radius: 10px; }

.fine { color: var(--dim); font-size: .82rem; }
.fine.mid { text-align: center; padding: 2rem 0 3rem; }

.sample { display: grid; gap: 1rem; }

.demo {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem 1.1rem;
  box-shadow: 0 12px 30px rgba(18, 59, 82, .08);
}

.demo.tilt { transform: rotate(-1.4deg); opacity: .9; }
.demo-top { display: flex; justify-content: space-between; gap: 1rem; }
.demo-top span { color: var(--dim); font-size: .85rem; }
.demo-where { color: var(--dim); font-size: .9rem; margin: .2rem 0 .6rem; }
.demo-row { display: flex; gap: .4rem; flex-wrap: wrap; }

.chip {
  font-size: .75rem;
  background: #eef1f6;
  color: #45506a;
  border-radius: 999px;
  padding: .15rem .6rem;
}

.chip.warm { background: #ffece4; color: #b4431c; }
.chip.bad { background: #ffe1e1; color: #a51f1f; }
.chip.new { background: #e3f5ea; color: #1b7a4b; font-weight: 600; }

.three {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: 62rem;
  margin: 0 auto;
  padding: 1rem 1.5rem 3rem;
}

.three h3 { font-size: 1rem; margin: 0 0 .3rem; }
.three p { margin: 0; color: var(--dim); font-size: .92rem; }

.gate {
  max-width: 24rem;
  margin: 0 auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 12px 30px rgba(18, 59, 82, .08);
}

.gate h2 { margin: 0 0 .8rem; font-size: 1.2rem; }

/* ---- forms ---- */

input, textarea, select {
  width: 100%;
  padding: .6rem .75rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: inherit;
  font: inherit;
  margin-bottom: .6rem;
}

textarea { resize: vertical; }

label { display: block; font-size: .82rem; color: var(--dim); margin-bottom: .2rem; }
label input, label textarea { margin-top: .25rem; }

.problem { color: #b4231c; font-size: .85rem; min-height: 1.2em; margin: .4rem 0 0; }
.problem.good { color: #1b7a4b; }

.tabs { display: flex; gap: .4rem; align-items: center; margin-bottom: 1rem; flex-wrap: wrap; }

.tab {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--dim);
  font: inherit;
  font-size: .85rem;
  padding: .35rem .9rem;
  border-radius: 999px;
  cursor: pointer;
}

.tab.on { background: var(--deep); border-color: var(--deep); color: #fff; }
.push { margin-left: auto; }

.row { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin-bottom: .6rem; }

/* ---- maps ---- */

/* z-index 0 gives each map its own stacking context, so Leaflet's panes stay
   under the sticky header instead of sliding over it */
.map {
  position: relative;
  z-index: 0;
  height: 16rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #e8ecf2;
  margin-bottom: .5rem;
}

.map.small { height: 11rem; }
.map .fine { padding: 1rem; }

.pin {
  background: var(--brand);
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 1px 5px rgba(0, 0, 0, .45);
}

.pinstate { margin: 0 0 .6rem; }
.pinstate.good { color: #1b7a4b; }

.here {
  display: flex;
  align-items: center;
  gap: .5rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: .55rem .6rem .55rem 1rem;
  margin-bottom: .8rem;
}

.herelabel { flex: 1; font-weight: 600; font-size: .95rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.herelabel::before { content: ""; display: inline-block; width: .55rem; height: .55rem; border-radius: 50%; background: var(--brand); margin-right: .5rem; vertical-align: .05rem; }
.here select { width: auto; margin: 0; padding: .3rem .5rem; font-size: .85rem; }

.herepanel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: .9rem;
  margin-bottom: 1rem;
}

.herepanel .fine { margin: 0; }

.find { display: flex; gap: .4rem; flex: 1; min-width: 14rem; }
.find input { margin: 0; padding: .35rem .7rem; font-size: .88rem; }

/* ---- the board ---- */

.board {
  display: grid;
  grid-template-columns: 20rem 1fr;
  gap: 2rem;
  max-width: 66rem;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
  align-items: start;
}

aside {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.25rem;
  position: sticky;
  top: 5rem;
}

aside h2 { margin: 0 0 .8rem; font-size: 1.05rem; }

.plan {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem 1.15rem;
  margin-bottom: .9rem;
}

.plan.mine { border-left: 3px solid var(--brand); }

.plan h3 { margin: 0; font-size: 1.05rem; }
.plan .where { color: var(--dim); font-size: .92rem; margin: .15rem 0 .5rem; }
.plan .where a { color: var(--deep); }
.plan .notes { font-size: .92rem; margin: .5rem 0 0; }
.head { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; }
.time { font-size: .85rem; color: var(--deep); font-weight: 600; white-space: nowrap; }
.chips { display: flex; flex-wrap: wrap; gap: .35rem; margin: .5rem 0; }

.actions { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .7rem; }

.act {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: .82rem;
  padding: .35rem .8rem;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}

.act:hover { border-color: #b9c2d4; }
.act.main { background: var(--brand); border-color: var(--brand); color: #fff; }
.act.on { background: #eef1f6; }

.chat { border-top: 1px solid var(--line); margin-top: .8rem; padding-top: .7rem; }
.chat .lines { max-height: 14rem; overflow: auto; margin-bottom: .5rem; }
.line { font-size: .9rem; margin-bottom: .35rem; }
.line b { color: var(--deep); }
.line span { color: var(--dim); font-size: .75rem; margin-left: .35rem; }
.chat form { display: flex; gap: .4rem; }
.chat input { margin: 0; }
.chat .cta { margin: 0; white-space: nowrap; }

.empty { color: var(--dim); background: var(--card); border: 1px dashed var(--line); border-radius: 14px; padding: 2rem; text-align: center; margin-bottom: .9rem; }

@media (max-width: 800px) {
  .hero, .three, .board { grid-template-columns: 1fr; }
  .three { gap: 1rem; }
  aside { position: static; }
  .sample { display: none; }
  .map { height: 13rem; }
}
