/* The front door (Ben's design, 6 Oct). Laid out for a laptop in landscape:
   an opening screen that fills the window with one thing to press, and the
   explanation underneath for anyone who scrolls. A phone layout comes later;
   below 760px this simply stacks. */

.lpBody { margin: 0; background: var(--bg); font-family: var(--font); color: var(--ink); }

/* ---------------------------------------------------------- opening screen */

.lpHero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--card);
  border-bottom: 1px solid var(--line);
}

.lpNav {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 40px;
  /* A bar of its own, a shade off the page beneath it. */
  background: #eef2fb;
  border-bottom: 1px solid #dfe5f3;
}
.lpBrand { font-weight: 750; font-size: 24px; letter-spacing: -0.015em; }
.lpNavBtns { display: flex; align-items: center; gap: 24px; }
.lpNavBtns .btn { font-size: 17px; padding: 12px 22px; border-radius: 12px; }
.lpSignIn {
  border: 0;
  background: none;
  font: inherit;
  font-size: 18px;
  font-weight: 600;
  color: var(--label);
  cursor: pointer;
  padding: 8px 4px;
}
.lpSignIn:hover { color: var(--accent); }

.lpArt {
  position: absolute;
  fill: none;
  stroke: #dfe6f5;
  stroke-width: 1.1;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}
.lpArt.a2, .lpArt.a6 { stroke-width: 2; }
.lpArt.a1 { width: 120px; left: 6%; top: 27%; transform: rotate(-12deg); }
.lpArt.a2 { width: 210px; right: 4%; top: 34%; }
.lpArt.a3 { width: 104px; left: 9%; bottom: 14%; transform: rotate(8deg); }
.lpArt.a4 { width: 96px; right: 10%; bottom: 20%; transform: rotate(10deg); }
.lpArt.a5 { width: 84px; left: 20%; top: 52%; transform: rotate(-32deg); }
.lpArt.a6 { width: 180px; left: 3%; bottom: 40%; }

.lpHeroBody {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 0 24px 16px;
  text-align: center;
}

.lpTitle {
  margin: 0;
  /* One line, and wider than the chat beneath it (Ben, 6 Oct). Sized from
     the window so it stays on one line from a small laptop up. */
  font-size: clamp(28px, 3.7vw, 64px);
  line-height: 1.1;
  letter-spacing: -0.025em;
  font-weight: 750;
  white-space: nowrap;
}
.lpSub { margin: 0; font-size: 17px; color: var(--muted); max-width: 64ch; }
.lpScroll { font-size: 13px; color: var(--muted-2); text-decoration: none; }
.lpScroll:hover { color: var(--accent); }

/* The consult screen, as it really looks, faded. The whole panel starts the
   case; the button is the part that says so. */
.lpChat {
  position: relative;
  width: min(clamp(620px, 42vw, 800px), 100%);
  /* Room between the headline and the chat: the gap grows with the window. */
  margin-top: clamp(22px, 4.5vh, 56px);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 14px 40px rgba(16, 24, 40, 0.08);
  cursor: pointer;
  text-align: left;
}
.lpFaded { opacity: 0.5; }
.lpWho { font-size: 14px; font-weight: 650; color: var(--label); margin-bottom: 8px; }
.lpLog { height: auto; min-height: 0; max-height: none; overflow: visible; gap: 8px; padding: 12px 14px; }
.lpLog .bubble { padding: 9px 13px; }
.lpClock { cursor: pointer; opacity: 0.75; }
.lpFakeInput { color: var(--muted-2); background: var(--card); }

.btn.lpTry {
  align-self: center;
  padding: 15px 38px;
  font-size: 19px;
  font-weight: 700;
  border-radius: 14px;
  box-shadow: 0 12px 28px rgba(43, 99, 255, 0.32);
}
.btn.lpTry:hover { transform: translateY(-1px); }

.lpSticker {
  position: absolute;
  right: 10px;
  bottom: 74px;
  transform: rotate(-20deg);
  padding: 11px 18px;
  background: #ffedd5;
  border: 2px solid #fdd3a1;
  border-radius: 16px;
  color: #9a4a00;
  font-size: 16px;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(154, 74, 0, 0.16);
  pointer-events: none;
  /* Two short lines, so the longer wording still sits between the button and
     Send without covering either. */
  text-align: center;
  line-height: 1.25;
}

/* ------------------------------------------------------------- the sections */

.lpMain { max-width: 1040px; margin: 0 auto; padding: 56px 24px 24px; display: flex; flex-direction: column; gap: 28px; }
.lpSection {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 40px 32px;
}
.lpSection h2 { margin: 0 0 6px; font-size: 28px; letter-spacing: -0.02em; text-align: center; }
.lpLead { margin: 0 auto 28px; max-width: 62ch; text-align: center; color: var(--muted); font-size: 16px; }

.lpSteps { list-style: none; margin: 0 auto; padding: 0; max-width: 620px; display: flex; flex-direction: column; gap: 18px; }
.lpSteps li { display: flex; gap: 16px; align-items: flex-start; font-size: 15px; line-height: 1.5; color: var(--muted); }
.lpSteps li > span:nth-child(2) { flex: 1; }
.lpSteps li:first-child { align-items: center; }
.lpYear {
  flex: none; align-self: center; margin-left: 8px;
  background: #ffedd5; color: #9a4a00; border: 2px solid #fdd3a1; border-radius: 12px;
  font-size: 13px; font-weight: 700; padding: 6px 13px; white-space: nowrap;
  transform: rotate(-8deg); box-shadow: 0 6px 14px rgba(154, 74, 0, 0.16);
}
.lpSteps strong { display: block; color: var(--ink); font-size: 17px; font-weight: 650; }
.lpNum {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-weight: 700;
  font-size: 15px;
  display: grid;
  place-items: center;
}
.lpCases { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; max-width: 860px; margin: 0 auto; }
.lpCase {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 22px 20px;
  background: var(--accent-soft);
  border: 2px solid var(--accent-soft);
  border-radius: 14px;
  color: var(--accent-dark);
  font: inherit;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.12s ease;
}
.lpCase strong { font-size: 18px; font-weight: 700; }
.lpCase:hover { transform: translateY(-2px); border-color: var(--accent); }
.lpCase.lpMore { background: var(--card); border-color: var(--accent); }

.lpFeedback { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 32px; align-items: center; max-width: 900px; margin: 0 auto; }
.lpFeedback ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 10px; color: var(--muted); font-size: 15.5px; line-height: 1.5; }
.lpReport { padding: 20px; background: #fbfbfe; border: 1px solid var(--line-soft); border-radius: 14px; }
.lpReport h3 { margin: 0 0 4px; font-size: 16px; }
.lpReport h3 + .missedItem { border-top: 0; }
.lpReport .chips { margin-top: 8px; }
.lpReport .missedItem + h3 { margin-top: 16px; }

/* ---------------------------------------------------- sign in, over the page */

.lpOverlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(246, 247, 251, 0.6);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  overflow-y: auto;
}
.lpModal { position: relative; width: 100%; max-width: 400px; }
.lpModal .authCard { box-shadow: 0 2px 4px rgba(16, 24, 40, 0.06), 0 24px 60px rgba(16, 24, 40, 0.18); }
.lpClose {
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 1;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: none;
  font-size: 22px;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
}
.lpClose:hover { background: var(--line-soft); color: var(--ink); }
.lpLoading { padding: 40px; text-align: center; color: var(--muted); background: var(--card); border-radius: var(--radius); }

/* Phones. The opening screen still fits one screen: a shorter slice of the
   chat, the same single button, and the sections stacked underneath. */
@media (max-width: 760px) {
  .lpNav { padding: 10px 14px; gap: 8px; }
  .lpBrand { font-size: 17px; }
  .lpSignIn { font-size: 14px; white-space: nowrap; }
  .lpNavBtns { gap: 10px; }
  .lpNavBtns .btn { font-size: 13.5px; padding: 8px 12px; white-space: nowrap; }
  .lpArt { display: none; }
  .lpHero { min-height: 100dvh; }
  .lpHeroBody { padding: 0 14px 14px; gap: 10px; justify-content: flex-start; padding-top: 18px; }
  .lpTitle { white-space: normal; text-wrap: balance; font-size: 27px; }
  .lpSub { font-size: 14.5px; }
  .lpChat { margin-top: 12px; padding: 12px; gap: 10px; }
  .lpLog { padding: 10px; gap: 7px; }
  .lpLog .bubble { font-size: 13.5px; padding: 8px 11px; }
  /* The last exchange is dropped so the button stays on the first screen. */
  .lpLog .msg:nth-child(n+5) { display: none; }
  .lpClock { width: 58px; height: 58px; top: -14px; right: -6px; }
  .btn.lpTry { padding: 14px 30px; font-size: 18px; }
  .lpFakeInput { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; padding: 11px 12px; font-size: 14px; }
  .lpYear { align-self: flex-start; margin-left: 0; font-size: 11px; padding: 4px 9px; }
  .lpSticker { right: 2px; bottom: -40px; font-size: 12px; padding: 6px 11px; transform: rotate(-9deg); }
  .lpSub { margin-top: 30px; }
  .lpSub { margin-top: 16px; }
  .lpMain { padding: 28px 14px 16px; gap: 18px; }
  .lpSection { padding: 26px 18px; }
  .lpSection h2 { font-size: 24px; }
  .lpLead { font-size: 15px; margin-bottom: 20px; }
  .lpCases, .lpFeedback { grid-template-columns: 1fr; }
  .lpCases { gap: 10px; }
  .lpCase { padding: 16px; }
  .lpModal .authCard { padding: 22px 18px; }
}

/* ------------------------------------------------------------- about / FAQ */
.lpFaq { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 32px; max-width: 860px; margin: 0 auto; text-align: left; }
.lpFaq h3 { margin: 0 0 6px; font-size: 16px; font-weight: 650; color: var(--ink); }
.lpFaq p { margin: 0; font-size: 14.5px; line-height: 1.55; color: var(--muted); }
@media (max-width: 760px) { .lpFaq { grid-template-columns: 1fr; } }

/* ------------------------------------------------------- home, signed in */
.srOnly { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hmBody .lpNavBtns { gap: 18px; }
.hmBody a.lpSignIn { text-decoration: none; }
.hmUser { font-size: 15px; font-weight: 600; color: var(--ink); }
.hmUserYear { font-weight: 500; color: var(--muted); margin-left: 4px; }
.hmBody a.caseCard { text-decoration: none; color: inherit; }
.hmBody #cases { text-align: left; }
.hmBody #cases > h2, .hmBody #cases > .lpLead { text-align: center; }
.hmBody #cases .caseGrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.hmBar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap;
  padding: 14px 18px; margin-bottom: 26px; border: 1px solid var(--line); border-radius: 14px; background: #f8faff;
}
.hmProgress { display: flex; align-items: center; gap: 12px; font-size: 15px; color: var(--muted); }
.hmProgress b { color: var(--ink); }
.hmTrack { width: 140px; height: 8px; border-radius: 99px; background: #e3e8f4; overflow: hidden; }
.hmFill { display: block; height: 100%; border-radius: 99px; background: #2f9e5b; }
.hmYear { margin: 0; }

.hmSubHead { display: flex; align-items: baseline; justify-content: space-between; margin: 0 0 12px; }
.hmSubHead h3 { margin: 0; font-size: 18px; font-weight: 650; color: var(--ink); }
.hmSubHead { margin-top: 34px; }
.hmBar + .hmSubHead { margin-top: 0; }
.hmSeeAll { border: 0; background: none; padding: 4px 0; font: inherit; font-size: 15px; font-weight: 600; color: var(--accent); cursor: pointer; }
.hmSeeAll:hover { text-decoration: underline; }

.hmRegions { display: flex; flex-direction: column; gap: 10px; }
.hmRegion { border: 1px solid var(--line); border-radius: 14px; background: #fff; overflow: hidden; }
.hmRegionHead {
  width: 100%; display: flex; align-items: center; gap: 14px; padding: 15px 18px;
  border: 0; background: none; font: inherit; text-align: left; cursor: pointer; color: var(--ink);
}
button.hmRegionHead:hover { background: #f6f8fd; }
.hmRegionName { font-size: 16px; font-weight: 650; }
.hmRegionCount { font-size: 14px; color: var(--muted); margin-left: auto; }
.hmChevron { color: var(--muted); transition: transform 0.15s ease; }
.hmRegion.isOpen .hmChevron { transform: rotate(180deg); }
.hmRegionBody { padding: 4px 16px 16px; }
.hmRegion.isEmpty { background: #fafbfd; }
.hmRegion.isEmpty .hmRegionHead { cursor: default; color: var(--muted-2, #98a2b3); }
.hmSoon { margin-left: auto; font-size: 13px; font-weight: 600; color: #9a4a00; background: #ffedd5; border: 1px solid #fdd3a1; border-radius: 99px; padding: 3px 10px; }

.caseCard.isDone { background: #f4fbf6; border-color: var(--good-line); }
.hmTick { width: 24px; height: 24px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--good-bg); color: var(--good-ink); border: 1px solid var(--good-line); }
.hmTick svg { width: 13px; height: 13px; }
.hmDraft { font-size: 11px; font-weight: 600; color: var(--warn-ink); background: var(--warn-bg); border: 1px solid var(--warn-line); border-radius: 99px; padding: 1px 7px; vertical-align: middle; }

.hmRecent { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; max-width: 900px; margin: 0 auto; }
.hmRecentCard { flex: 0 1 280px; }
.hmRecentCard { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: #fff; text-decoration: none; color: var(--ink); }
.hmRecentCard:hover { border-color: var(--accent-soft-line); box-shadow: 0 4px 14px rgba(43, 99, 255, 0.08); }
.hmRecentCard strong { font-size: 16px; }
.hmRecentCard span { font-size: 14px; color: var(--muted); }
.hmAllRecent { text-align: center; margin: 16px 0 0; font-size: 15px; }
.hmError { padding: 80px 20px; text-align: center; color: var(--muted); }

@media (max-width: 900px) { .hmBody #cases .caseGrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .hmBody #cases .caseGrid { grid-template-columns: 1fr; }
  .hmRecentCard { flex-basis: 100%; }
  .hmUser { display: none; }
  .hmBar { flex-direction: column; align-items: stretch; }
  .hmTrack { flex: 1; }
  .hmRegionCount { font-size: 13px; }
}
@media (max-width: 760px) {
  .hmBody .lpNavBtns { gap: 10px; }
  .hmBody .lpNavBtns a[href="/admin.html"] { display: none; }
  .hmBody .lpBrand { font-size: 15px; }
}

.caseCard.isHeld { background: var(--warn-bg); border-color: var(--warn-line); }
.hmHeld { flex: none; font-size: 12px; font-weight: 600; color: var(--warn-ink); background: #fff; border: 1px solid var(--warn-line); border-radius: 99px; padding: 3px 9px; white-space: nowrap; }

/* Voice or typed, on a case card. */
.hmMode { display: inline-block; margin-top: 5px; font-size: 11.5px; font-weight: 600; border-radius: 99px; padding: 2px 9px; border: 1px solid; width: fit-content; }
.hmMode.voice { color: var(--good-ink); background: var(--good-bg); border-color: var(--good-line); }
.hmMode.chat { color: #9a4a00; background: #ffedd5; border-color: #fdd3a1; }
/* On a phone the two-line sticker hangs below the chat: room for it above the line of text. */
@media (max-width: 760px) { .lpHero .lpSub { margin-top: 40px; } }
