/* helprick.com: bright, phone-first, no web fonts. Shared with the inbox app. */
:root {
  --paper: #fffaf0;
  --ink: #14291f;
  --ink-soft: rgba(20, 41, 31, 0.68);
  --line: rgba(20, 41, 31, 0.16);
  --coral: #ff6a3d;
  --sun: #ffd23f;
  --mint: #b9f0cd;
  --live: #0c8f43;
  --danger: #b3261e;
  --white: #fff;
  --font: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius: 26px;
  --edge: 2.5px solid var(--ink);
  --column: 480px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; color-scheme: light; }

body {
  margin: 0;
  min-height: 100dvh;
  background:
    radial-gradient(520px 380px at 100% 0%, rgba(255, 210, 63, 0.55), transparent 70%),
    radial-gradient(460px 420px at 0% 100%, rgba(255, 106, 61, 0.18), transparent 70%),
    var(--paper);
  color: var(--ink);
  font: 500 17px/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

[hidden] { display: none !important; }

a { color: inherit; }

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

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

:focus-visible { outline: 3px solid var(--coral); outline-offset: 3px; }

/* Header */
.top, main {
  width: 100%;
  max-width: var(--column);
  margin: 0 auto;
  padding: 0 20px;
}
.top { padding-top: max(18px, env(safe-area-inset-top)); }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.02em;
  text-decoration: none;
}
.brand-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--coral); }

.view { padding: 22px 0 calc(28px + env(safe-area-inset-bottom)); }

/* Home */
h1 {
  margin: 10px 0 14px;
  font-size: clamp(68px, 21vw, 104px);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.045em;
}
.hl { background: linear-gradient(transparent 56%, var(--sun) 56% 90%, transparent 90%); padding: 0 0.06em; }
.lede { margin: 0 0 24px; font-size: 20px; line-height: 1.35; text-wrap: balance; }

.choices { display: grid; gap: 18px; }
.choice {
  position: relative;
  display: block;
  padding: 22px 78px 22px 22px;
  border: var(--edge);
  border-radius: var(--radius);
  box-shadow: 0 6px 0 var(--ink);
  text-decoration: none;
  transition: transform 0.08s, box-shadow 0.08s;
}
.choice:active { transform: translateY(5px); box-shadow: 0 1px 0 var(--ink); }
.coral { background: var(--coral); }
.sun { background: var(--sun); }
.choice-title { display: block; font-size: 28px; font-weight: 800; line-height: 1.1; letter-spacing: -0.025em; }
.choice-sub { display: flex; align-items: center; gap: 8px; margin-top: 7px; font-size: 16px; line-height: 1.3; }
.choice-arrow {
  position: absolute;
  top: 50%;
  right: 20px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-top: -22px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  font-size: 22px;
  font-weight: 800;
}

.live-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: rgba(20, 41, 31, 0.32); }
.live-dot.on { background: var(--live); animation: pulse 2s infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(12, 143, 67, 0.5); }
  100% { box-shadow: 0 0 0 9px rgba(12, 143, 67, 0); }
}

.foot { margin: 30px 0 0; color: var(--ink-soft); font-size: 15px; }
.foot a { color: var(--ink); font-weight: 700; }

/* Message form */
.back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 0;
  font-weight: 700;
  text-decoration: none;
}
h2 { margin: 6px 0 18px; font-size: 40px; font-weight: 800; line-height: 1; letter-spacing: -0.035em; }

.f { margin-bottom: 16px; }
label { display: block; margin-bottom: 6px; font-size: 16px; font-weight: 800; }
input[type="text"], input[type="password"], textarea {
  display: block;
  width: 100%;
  padding: 14px 16px;
  border: var(--edge);
  border-radius: 18px;
  background: var(--white);
  font-size: 17px;
  line-height: 1.4;
}
textarea { resize: none; }
::placeholder { color: rgba(20, 41, 31, 0.42); }
input:focus-visible, textarea:focus-visible { outline: 3px solid var(--coral); outline-offset: 2px; }
[aria-invalid="true"] { border-color: var(--danger) !important; }
.error { margin: 6px 0 0; color: var(--danger); font-size: 15px; font-weight: 700; }
.form-error { margin: 0 0 14px; }

/* Honeypot: off-screen for people, tempting for bots */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.go {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 18px 24px;
  border: var(--edge);
  border-radius: 999px;
  background: var(--ink);
  box-shadow: 0 6px 0 var(--coral);
  color: var(--paper);
  font-size: 20px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.08s, box-shadow 0.08s;
}
.go:active { transform: translateY(5px); box-shadow: 0 1px 0 var(--coral); }
.go:disabled { opacity: 0.6; cursor: progress; }

/* Chat: fills the visible screen, composer stays above the keyboard */
body[data-view="chat"] .top { display: none; }
.chat {
  position: fixed;
  top: 0;
  left: 50%;
  display: flex;
  flex-direction: column;
  width: min(100%, var(--column));
  height: var(--vvh, 100dvh);
  padding: 0;
  transform: translateX(-50%);
  background: var(--paper);
}
.chat-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: max(12px, env(safe-area-inset-top)) 16px 12px;
  border-bottom: var(--edge);
  background: var(--sun);
}
.back.round {
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: var(--edge);
  border-radius: 50%;
  background: var(--paper);
  font-size: 20px;
}
.who { display: grid; line-height: 1.2; }
.who strong { font-size: 19px; font-weight: 800; }
.presence { display: flex; align-items: center; gap: 6px; font-size: 14px; }

.thread {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 16px;
  overflow-y: auto;
  overscroll-behavior: contain;
  list-style: none;
}
.bubble {
  max-width: 84%;
  padding: 10px 15px;
  border: var(--edge);
  border-radius: 20px;
  font-size: 17px;
  line-height: 1.38;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.bubble.them { align-self: flex-start; border-bottom-left-radius: 6px; background: var(--white); }
.bubble.me { align-self: flex-end; border-bottom-right-radius: 6px; background: var(--coral); }
.note { align-self: center; max-width: 34ch; text-wrap: balance; padding: 4px 0; color: var(--ink-soft); font-size: 14px; text-align: center; }

.ask { margin: 0 12px 10px; padding: 14px; border: var(--edge); border-radius: 20px; background: var(--mint); }
.ask p { margin: 0 0 10px; font-size: 16px; font-weight: 700; line-height: 1.3; }
.ask .error { margin: 8px 0 0; }
.ask-row { display: flex; gap: 8px; }
.ask-row input { flex: 1; min-width: 0; padding: 11px 14px; border-radius: 14px; }
.ask-row button {
  padding: 0 18px;
  border: var(--edge);
  border-radius: 14px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 800;
  cursor: pointer;
}

.chat-error { margin: 0 16px 8px; }
.composer {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  border-top: var(--edge);
  background: var(--paper);
}
.composer textarea { flex: 1; max-height: 132px; padding: 11px 16px; border-radius: 22px; }
.composer button {
  flex: none;
  width: 48px;
  height: 48px;
  border: var(--edge);
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  font-size: 22px;
  font-weight: 800;
  cursor: pointer;
}
.composer button:disabled { opacity: 0.5; }

.noscript { max-width: var(--column); margin: 0 auto; padding: 0 20px 24px; font-weight: 700; }

@media (min-width: 560px) {
  .chat { border-inline: var(--edge); }
}
@media (prefers-reduced-motion: reduce) {
  .live-dot.on { animation: none; }
  * { transition: none !important; }
}
