/* Oats — one conversation. Phone first. */
:root {
  --bg: #f4f2ec; --surface: #ffffff; --ink: #1c211d; --muted: #6a7068; --line: #e2dfd5; --line-strong: #c9c5b8;
  --accent: #2c5a4c; --accent-ink: #ffffff; --accent-soft: #e4ede7; --brass: #9a7b3f; --brass-soft: #f5eedf;
  --warn: #a8461f; --warn-soft: #fbe9df;
  --r: 16px; --r-sm: 10px;
  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body: "Instrument Sans", "Helvetica Neue", Arial, system-ui, sans-serif;
  --top: calc(var(--safe-top, env(safe-area-inset-top, 0px)));
  --bottom: var(--safe-bottom, env(safe-area-inset-bottom, 0px));
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 var(--font-body); -webkit-font-smoothing: antialiased; }
/* No rubber-band scrolling of the whole app, and the strip behind the phone's clock is painted in the page colour,
   so scrolled text never shows up under the time and battery. */
html, body { overscroll-behavior-y: none; }
body::before { content: ""; position: fixed; top: 0; left: 0; right: 0; height: var(--top); background: var(--bg); z-index: 40; pointer-events: none; }
button, input, textarea { font: inherit; color: inherit; }
a { color: var(--accent); }
h1, h2, h3 { font-family: var(--font-display); font-weight: 500; letter-spacing: -.01em; margin: 0; text-wrap: balance; }
h1 { font-size: 32px; line-height: 1.1; }
h2 { font-size: 24px; line-height: 1.15; }
h3 { font-size: 18px; line-height: 1.25; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; line-height: 1.45; }
.eyebrow { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
#app { min-height: 100%; }
.clamp3, .clamp6 { display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; cursor: pointer; }
.clamp3 { -webkit-line-clamp: 3; } .clamp6 { -webkit-line-clamp: 6; }

/* pages (landing, settings, queue, forms) */
.page { max-width: 560px; margin: 0 auto; padding: calc(16px + var(--top)) 16px calc(40px + var(--bottom)); display: flex; flex-direction: column; gap: 16px; }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; }
.wordmark { font-family: var(--font-display); font-size: 22px; font-weight: 600; color: var(--ink); text-decoration: none; }
.link { background: none; border: 0; padding: 8px 0; color: var(--accent); font-weight: 600; cursor: pointer; text-decoration: none; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.card.soft { background: var(--accent-soft); border-color: transparent; }
.card.warn { background: var(--warn-soft); border-color: #efc9b5; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.row { display: flex; gap: 10px; align-items: center; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); font-weight: 600; cursor: pointer; text-decoration: none; color: var(--ink); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.block { width: 100%; }
.btn.small { min-height: 36px; padding: 0 14px; font-size: 14px; }
.btn:disabled { opacity: .5; cursor: default; }
label.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; }
.input, textarea.input { width: 100%; border: 1px solid var(--line-strong); background: var(--surface); border-radius: 12px; padding: 12px 14px; font-weight: 400; font-size: 16px; }
textarea.input { resize: none; min-height: 110px; }
.input:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; font-weight: 400; }
label.card.check { flex-direction: row; }
.check input { flex: none; margin-top: 3px; width: 18px; height: 18px; accent-color: var(--accent); }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-family: var(--font-display); font-size: 18px; flex: none; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.big { width: 64px; height: 64px; font-size: 28px; }
.list a, .list button.item { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; text-align: left; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); color: inherit; text-decoration: none; cursor: pointer; }
.badge { font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--accent); color: #fff; white-space: nowrap; }
.badge.quiet { background: var(--brass-soft); color: var(--brass); }
.hero { display: flex; flex-direction: column; gap: 12px; padding-top: 8px; }
.err { color: var(--warn); font-size: 14px; }

/* the conversation */
.chat { display: flex; flex-direction: column; height: 100dvh; max-width: 680px; margin: 0 auto; }
/* The chat screens fill the screen exactly; the page itself never scrolls, so iOS has nothing to leave pushed out of place. */
html:has(.chat), html:has(.chat) body { overflow: hidden; }
.chat-top { flex: none; display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 6px; padding: calc(6px + var(--top)) 10px 8px; border-bottom: 1px solid var(--line); background: var(--bg); }
.icon-btn { width: 44px; height: 44px; display: grid; place-items: center; border: 0; background: none; cursor: pointer; border-radius: 12px; color: var(--ink); position: relative; }
.icon-btn svg { width: 24px; height: 24px; }
.icon-btn .dot { position: absolute; top: 9px; right: 8px; width: 9px; height: 9px; border-radius: 50%; background: var(--warn); border: 2px solid var(--bg); }
.chat-title { text-align: center; min-width: 0; }
.chat-title b { display: block; font-family: var(--font-display); font-weight: 600; font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-title span { font-size: 12px; color: var(--muted); }
.ride-btn { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); font-weight: 600; font-size: 14px; cursor: pointer; color: var(--ink); text-decoration: none; }
.ride-btn svg { width: 18px; height: 18px; }
.msgs { flex: 1; overflow-y: auto; padding: 16px 14px 8px; display: flex; flex-direction: column; gap: 12px; -webkit-overflow-scrolling: touch; }
.msg { max-width: 88%; padding: 11px 14px; border-radius: 18px; line-height: 1.5; word-wrap: break-word; }
.msg p + p { margin-top: 10px; }
.msg.me { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 6px; white-space: pre-wrap; }
.msg.ai { align-self: flex-start; background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.msg.ai a { word-break: break-all; }
.msg.typing { color: var(--muted); }
.lab { border-left: 3px solid var(--accent); padding: 2px 0 2px 10px; margin: 4px 0; }
.lab + .lab, p + .lab, .lab + p { margin-top: 10px; }
.lab .tag { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); margin-bottom: 2px; }
.lab.general { border-left-color: var(--line-strong); }
.lab.general .tag { color: var(--muted); }
.asked { align-self: flex-start; display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--brass); background: var(--brass-soft); padding: 7px 12px; border-radius: 999px; }
.reply { align-self: stretch; background: var(--surface); border: 1.5px solid var(--accent); border-radius: var(--r); padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.reply-head { display: flex; align-items: center; gap: 10px; }
.reply-head b { display: block; }
.reply-q { font-size: 14px; color: var(--muted); border-left: 2px solid var(--line-strong); padding-left: 10px; }
.reply-body p + p { margin-top: 10px; }
.reply-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.ridecard { align-self: stretch; background: var(--brass-soft); border-radius: var(--r); padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.ridecard p + p { margin-top: 8px; }
.save { align-self: stretch; background: var(--accent-soft); border-radius: var(--r); padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.composer { flex: none; display: flex; gap: 8px; align-items: flex-end; padding: 8px 10px calc(10px + var(--bottom)); border-top: 1px solid var(--line); background: var(--bg); }
.composer textarea { flex: 1; resize: none; max-height: 160px; min-height: 46px; border: 1px solid var(--line-strong); border-radius: 22px; padding: 11px 16px; background: var(--surface); font-size: 16px; line-height: 1.4; }
.composer textarea:focus { outline: none; border-color: var(--accent); }
.send { width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--accent); color: #fff; display: grid; place-items: center; cursor: pointer; flex: none; }
.send:disabled { opacity: .4; }
.send svg { width: 20px; height: 20px; }
.answerbar { flex: none; padding: 0 10px 8px; background: var(--bg); }

/* drawer and sheets */
.scrim { position: fixed; inset: 0; background: rgba(28,33,29,.35); z-index: 40; animation: fade .15s ease; }
.drawer { position: fixed; top: 0; bottom: 0; left: 0; width: min(320px, 86vw); background: var(--bg); z-index: 41; padding: calc(16px + var(--top)) 14px calc(16px + var(--bottom)); display: flex; flex-direction: column; gap: 14px; overflow-y: auto; animation: slide .18s ease; box-shadow: 0 0 40px rgba(0,0,0,.15); }
.drawer .item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px; border-radius: 12px; border: 0; background: none; text-align: left; cursor: pointer; text-decoration: none; color: var(--ink); font-weight: 500; }
.drawer .item.on { background: var(--surface); }
.drawer .item .grow { flex: 1; min-width: 0; }
.drawer .item small { display: block; color: var(--muted); font-weight: 400; font-size: 12px; }
.drawer hr { border: 0; border-top: 1px solid var(--line); margin: 2px 0; width: 100%; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 41; background: var(--bg); border-radius: 22px 22px 0 0; padding: 22px 18px calc(22px + var(--bottom)); display: flex; flex-direction: column; gap: 12px; max-width: 560px; margin: 0 auto; animation: up .2s ease; }
@keyframes fade { from { opacity: 0; } }
@keyframes slide { from { transform: translateX(-100%); } }
@keyframes up { from { transform: translateY(100%); } }
.toast { position: fixed; left: 50%; bottom: calc(90px + var(--bottom)); transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 999px; font-size: 14px; z-index: 60; max-width: 90vw; text-align: center; }
html.native .web-only { display: none !important; }

/* her question to her trainer */
.threadbar { flex: none; background: var(--bg); }
.tb { display: flex; align-items: center; gap: 10px; padding: 8px 12px 0; flex-wrap: wrap; }
.tb.on { justify-content: space-between; color: var(--accent); font-size: 14px; font-weight: 600; }
.msg .to { display: block; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; opacity: .8; margin-bottom: 2px; }
.offer { align-self: flex-start; margin-top: -4px; border-color: var(--accent); color: var(--accent); }
.sentcard { align-self: stretch; border: 1px dashed var(--line-strong); border-radius: var(--r); padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.quiet { align-self: center; font-size: 13px; color: var(--muted); text-align: center; max-width: 90%; }
.reply.ask { border-color: var(--brass); background: var(--brass-soft); }
.round { align-self: stretch; border-radius: var(--r); padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.round p + p { margin-top: 6px; }
.round.ask { background: var(--brass-soft); }
.round.rider { background: var(--accent-soft); }
.round.reply { background: var(--surface); border: 1px solid var(--accent); }
.brief { gap: 8px; }
.brief p + p, .brief p + div, .brief div + p { margin-top: 8px; }
.sheet .brief { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; max-height: 45vh; overflow-y: auto; }
.sheet.tall { max-height: 92dvh; overflow-y: auto; }
.convo .msg { max-width: 92%; }

/* coming back after a while: a fresh start, older messages folded */
.earlier { align-self: center; border: 0; background: var(--surface); color: var(--muted); font: inherit; font-size: 13px; padding: 7px 14px; border-radius: 999px; cursor: pointer; }
.fresh { align-self: stretch; display: flex; flex-direction: column; gap: 6px; padding: 18px 2px 4px; }
.fresh.compact { padding: 10px 2px 4px; }
.nowline { display: flex; align-items: center; gap: 10px; margin: 0; color: var(--muted); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; font-weight: 600; }
.nowline::before, .nowline::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.fresh-hi { font-size: 22px; font-weight: 700; letter-spacing: -.01em; }
.fresh-q { color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.chip { border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; padding: 8px 14px; border-radius: 999px; cursor: pointer; }
.chip.primary { border-color: var(--accent); color: var(--accent); font-weight: 600; }
.sheet .brief-edit { min-height: 45vh; font-size: 15px; line-height: 1.5; }
.sheet [hidden] { display: none !important; }
.sheet .save { background: none; padding: 0; }
.lessonlog summary { cursor: pointer; font-weight: 600; }
.lessonlog p { font-size: 14px; margin-top: 6px; }
.chat-title .whose { border: 0; background: none; padding: 0; font: inherit; font-size: 12px; color: var(--accent); text-decoration: underline; cursor: pointer; }
.callrow { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------- lessons ---------- */
.video { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: var(--r); overflow: hidden; background: #111; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.lessonacts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.lessonacts .btn { justify-content: center; display: inline-flex; align-items: center; gap: 6px; }
.tries { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; line-height: 1.5; }
.lessonrow { display: flex; gap: 12px; align-items: center; padding: 8px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.lessonrow img { width: 96px; height: 54px; object-fit: cover; border-radius: 8px; flex: none; }
.lessonrow span { min-width: 0; }
.lessonrow b { display: block; font-weight: 600; }
.lessonrow small { display: block; color: var(--muted); font-size: 13px; line-height: 1.35; }
.lessonbar { flex: none; display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: var(--brass-soft); border-bottom: 1px solid var(--line); }
.lessonbar > a:first-child { flex: 1; min-width: 0; display: flex; gap: 10px; align-items: center; text-decoration: none; color: var(--ink); }
.lessonbar img { width: 48px; height: 36px; object-fit: cover; border-radius: 6px; flex: none; }
.lessonbar span { min-width: 0; }
.lessonbar small { display: block; font-size: 11px; color: var(--brass); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.lessonbar b { display: block; font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lessonbar .btn { display: inline-flex; align-items: center; gap: 5px; flex: none; }
.lessonbar .icon-btn { flex: none; width: 32px; height: 32px; }
.drawer .avatar.thumb { border-radius: 8px; width: 48px; height: 32px; }
.drawer .avatar.thumb img { width: 100%; height: 100%; object-fit: cover; }
.drawer .avatar svg { width: 20px; height: 20px; }
.drawer .item small.new { color: var(--accent); font-weight: 600; }
.drawer .eyebrow { margin: 6px 0 2px 12px; }

/* ---------- the sidebar stays open on a wide screen, like Claude's ---------- */
.drawer.pinned { animation: none; box-shadow: none; border-right: 1px solid var(--line); width: 288px; z-index: 30; gap: 10px; }
.drawer.pinned .wordmark { padding: 4px 12px 6px; text-decoration: none; }
@media (min-width: 960px) {
  body.side .chat, body.side .page { margin-left: max(300px, calc((100vw - 288px - 680px) / 2 + 288px)); margin-right: auto; }
  body.side .page { max-width: 600px; }
  body.side #menu { visibility: hidden; }
}
.lessonacts .btn { white-space: nowrap; padding-left: 10px; padding-right: 10px; font-size: 15px; }
.authorcard { border-color: var(--brass); background: var(--brass-soft); display: flex; flex-direction: column; gap: 10px; }
.authorcard .eyebrow { color: var(--brass); }
.diff { display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--line); padding-top: 10px; }
.diff .was, .diff .will { border-radius: 10px; padding: 8px 10px; position: relative; }
.diff .was { background: var(--surface); opacity: .75; }
.diff .will { background: var(--accent-soft); }
.diff .tagx { display: block; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 3px; }
.diff .will .tagx { color: var(--accent); }

/* ---------- the four tabs: Chat, Ride, Horses, Inbox ---------- */
.page.tabpage { padding-bottom: calc(96px + var(--bottom)); }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; justify-content: center; background: var(--surface); border-top: 1px solid var(--line); padding: 6px 8px calc(8px + var(--bottom)); }
.tabbar a { flex: 1; max-width: 140px; min-height: 52px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; text-decoration: none; color: var(--muted); font-size: 12px; font-weight: 500; position: relative; }
.tabbar a svg { width: 24px; height: 24px; }
.tabbar a.on { color: var(--accent); font-weight: 600; }
.tabbar a.on svg { stroke-width: 2.2; }
.tabbar i { position: absolute; top: 2px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--warn); color: #fff; font: 600 11px/18px var(--font-body); font-style: normal; text-align: center; }
.me-btn { width: 44px; height: 44px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 600; text-decoration: none; }
.hello { display: flex; flex-direction: column; gap: 6px; padding-top: 10px; }
.hello h1 { font-size: 34px; }
.askcard { background: var(--surface); border: 1px solid var(--line-strong); border-radius: 24px; padding: 14px 14px 12px; display: flex; flex-direction: column; gap: 10px; }
.askcard textarea { border: 0; resize: none; background: none; font-size: 17px; line-height: 1.4; min-height: 52px; padding: 2px 2px; }
.askcard textarea:focus { outline: none; }
.hchip { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px 0 8px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--accent-soft); font-weight: 500; font-size: 14px; cursor: pointer; color: var(--ink); }
.hchip .mini { width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 12px; }
.trows, .hlist { display: flex; flex-direction: column; }
.trows a, .irow, .hrow { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.hlist { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 0 14px; }
.hlist > :last-child, .trows > :last-child { border-bottom: 0; }
.trows b, .hrow b, .irow b, .mecard b { font-weight: 600; display: block; }
.trows small, .hrow small, .irow small, .lrow small, .mecard small { color: var(--muted); font-size: 13px; display: block; }
.grow { flex: 1; min-width: 0; }
.rdot { width: 10px; height: 10px; border-radius: 50%; background: var(--warn); flex: none; }
.nodot { width: 10px; height: 10px; flex: none; }
.mecard { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 22px; background: var(--accent); color: #fff; text-decoration: none; }
.mecard small { color: var(--accent-soft); }
.mebadge { width: 48px; height: 48px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-family: var(--font-display); font-weight: 600; font-size: 20px; flex: none; }
.mebadge.big { width: 56px; height: 56px; background: var(--accent); color: #fff; }
.plus { border: 1px solid var(--line-strong); background: var(--surface); border-radius: 50%; }
.ridehero { background: var(--accent); color: #fff; border-radius: 24px; padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.ridehero p { color: var(--accent-soft); }
.ridehero .btn { align-self: flex-start; background: #fff; color: var(--accent); border-color: #fff; }
.chipscroll { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; }
.chipscroll .chip { white-space: nowrap; }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.lrows { display: flex; flex-direction: column; }
.lrow { display: flex; align-items: center; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.lrow a.grow { text-decoration: none; color: var(--ink); }
.lrow b { font-weight: 600; display: block; }
.btn.soft { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.btn.small { flex: none; }
h2 { font-size: 22px; }

/* a horse's page: header, dots, section cards, team */
.hhead { display: flex; align-items: center; gap: 14px; }
.hhead h1 { font-size: 30px; }
.dotsbox { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 4px 0; }
.dots-svg { width: min(100%, 300px); height: auto; overflow: visible; }
.dots-ring { fill: var(--surface); stroke: var(--line); stroke-width: 1.5; }
.dot { cursor: pointer; animation: dotIn .45s cubic-bezier(.2,.8,.3,1.2) both; outline: none; }
.dot circle { transition: transform .15s ease; }
.dot:hover circle, .dot:focus-visible circle { transform: scale(1.05); }
.dot text { pointer-events: none; font-family: var(--font-body); font-weight: 600; }
.dot-f circle { fill: var(--accent-soft); stroke: #b9cfc3; stroke-width: 1; }
.dot-f text { fill: var(--accent); }
.dot-f.dot-big circle { fill: var(--accent); stroke: var(--accent); }
.dot-f.dot-big text { fill: var(--accent-ink); }
.dot-e circle { fill: var(--bg); stroke: var(--line-strong); stroke-width: 1.5; stroke-dasharray: 4 4; }
.dot-e text { fill: var(--muted); font-weight: 500; }
.dot-badge circle { fill: var(--warn) !important; stroke: var(--surface) !important; stroke-width: 2 !important; }
.dot-badge text { fill: #fff !important; font-weight: 700; }
@keyframes dotIn { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .dot { animation: none; } }
.dots-hint { text-align: center; max-width: 320px; }
.seclist { display: flex; flex-direction: column; gap: 10px; }
.seccard { display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; text-decoration: none; color: var(--ink); }
.seccard b { display: block; font-weight: 600; }
.seccard small { display: block; color: var(--ink); font-size: 14px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.seccard.empty { border-style: dashed; background: transparent; }
.seccard.empty small { color: var(--muted); }
.secicon { width: 40px; height: 40px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-size: 20px; flex: none; }
.chev { color: var(--muted); font-size: 22px; flex: none; }
.secitem h3 { font-size: 19px; }
.dk-lines { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
.dk-lines li { font-size: 15px; }
.voices { display: flex; flex-direction: column; gap: 10px; }
.voice { border-left: 3px solid var(--line-strong); padding: 2px 0 2px 10px; }
.voice.mine { border-left-color: var(--accent); }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
.facts small { display: block; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.facts b { font-weight: 600; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; }
.field .input { font-weight: 400; }
select.input { appearance: auto; }
.ctitle { display: flex; flex-direction: column; align-items: center; text-decoration: none; color: inherit; line-height: 1.2; }
.ctitle span { font-size: 12px; color: var(--accent); }
.hacts { display: flex; gap: 8px; }
.hacts .btn { white-space: nowrap; }
.hacts .btn.primary { flex: 2; }
.hacts .btn.soft { flex: 1; }
.pp-img { width: 100%; border-radius: 12px; border: 1px solid var(--line); cursor: zoom-in; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.report .eyebrow { margin-top: 6px; }
.traits { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 8px; font-size: 15px; }
.trows small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.trows .when { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: none; }
.trows .when small { display: block; }
.owner { font-weight: 400; }
.fresh-row b { font-weight: 700; }
.attach { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); cursor: pointer; flex: none; }
.attach svg { width: 24px; height: 24px; }
/* Talk live (the voice conversation), next to the mic that only types what you say. */
.attach.live { color: var(--accent); text-decoration: none; display: flex; flex-direction: column; gap: 0; justify-content: center; align-items: center; }
.attach.live svg { width: 22px; height: 22px; }
.attach.live small { font-size: 10px; font-weight: 700; line-height: 1; letter-spacing: .04em; text-transform: uppercase; margin-top: 2px; }
.attached { display: flex; align-items: center; gap: 10px; padding: 8px 12px 0; background: var(--bg); }
.attached img { width: 52px; height: 52px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.attached .small { flex: 1; }
.msg-photo { display: block; max-width: 220px; width: 100%; border-radius: 12px; margin-bottom: 6px; }
.msg-doc { display: block; font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.docicon { font-size: 26px; }
.bar2 { height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; }
.bar2 i { display: block; height: 100%; background: var(--accent); transition: width .4s; }

/* plans: the team's thinking per issue */
.planlines { list-style:none; margin:6px 0 0; padding:0; display:flex; flex-direction:column; gap:2px; }
.planline { display:flex; flex-direction:column; gap:2px; width:100%; text-align:left; background:none; border:0; padding:8px 0; border-top:1px solid var(--line, #e6e2d9); font:inherit; color:inherit; cursor:pointer; }
.planlines li:first-child .planline { border-top:0; }
.planline small { color:var(--muted, #6a746f); font-size:12px; }

/* plan chooser */
.plans .plan { display:flex; gap:12px; align-items:center; width:100%; text-align:left; background:var(--surface, #fff); border:1px solid var(--line); border-radius:14px; padding:14px; font:inherit; color:inherit; cursor:pointer; }
.plans .plan.on { border-color: var(--green, #2f5446); box-shadow: 0 0 0 1px var(--green, #2f5446) inset; }
.plans .plan small { display:block; color:var(--muted); font-size:13px; margin-top:2px; }
.plans .plan .pp { white-space:nowrap; }

/* the Home Screen hint (iPhone Safari) */
.installhint { position:fixed; left:12px; right:12px; bottom:calc(76px + env(safe-area-inset-bottom)); z-index:30; display:flex; gap:10px; align-items:flex-start; background:var(--ink, #1c211d); color:#fff; border-radius:14px; padding:12px 14px; font-size:14px; line-height:1.4; box-shadow:0 6px 24px rgba(0,0,0,.18); }
.installhint .link { color:#fff; margin-left:auto; }
/* The ride plan (landing page) */
.planform .chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 8px; }
.planform .field > span, #sf .field > span { font-size: 14px; font-weight: 600; }
#sf .chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.tries li.locked { color: var(--muted); }
.blurline { display: block; height: 10px; border-radius: 6px; background: linear-gradient(90deg, var(--line), var(--line-strong), var(--line)); opacity: .6; margin-top: 8px; filter: blur(1px); }
.blurline.short { width: 60%; }
/* Leads (Joseph) */
.leadrow { text-decoration: none; color: inherit; }
.leadrow small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.leadrow .pill { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); vertical-align: 2px; }
.leadrow .lcost { font-size: 12px; color: var(--muted); white-space: nowrap; margin-left: 6px; font-variant-numeric: tabular-nums; }
.leadrow .lcost:empty { display: none; }
.leadrow .pill.brass { background: var(--brass-soft); color: var(--brass); }
.planform .field > span { font-size: 14px; font-weight: 600; }

/* ---------- the trainer's side: Today, a rider's page (Pipedrive-like) ---------- */
.sheet { max-height: 88vh; overflow-y: auto; }
.lphead { display: flex; gap: 14px; align-items: center; }
.lphead h1 { margin: 0; font-size: 26px; line-height: 1.15; }
.lphead .avatar.big { width: 52px; height: 52px; font-size: 22px; }
.stagebar { display: flex; gap: 4px; }
.stagebar button { flex: 1; height: 8px; border: 0; border-radius: 4px; background: var(--line); cursor: pointer; padding: 0; }
.stagebar button.on { background: var(--accent); }
.lostbtn { color: var(--warn); }
.pill { background: var(--accent-soft); color: var(--accent); border-radius: 999px; padding: 8px 14px; font-weight: 600; font-size: 14px; }
.seg { display: flex; background: var(--line); border-radius: 12px; padding: 3px; }
.seg button { flex: 1; border: 0; background: none; padding: 8px; border-radius: 9px; font: inherit; font-size: 14px; font-weight: 500; color: var(--muted); cursor: pointer; }
.seg button.on { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.tli { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 0; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.hlist > .tli:last-child { border-bottom: 0; }
.tli b { display: block; font-weight: 600; }
.tli small { display: block; color: var(--muted); font-size: 13px; }
.tli.note { background: var(--brass-soft); margin: 0 -14px; padding: 12px 14px; width: calc(100% + 28px); }
.tic { width: 22px; height: 22px; flex: none; color: var(--muted); align-self: flex-start; margin-top: 1px; }
.tic svg { width: 22px; height: 22px; }
.circle { width: 26px; height: 26px; flex: none; border-radius: 50%; border: 2px solid var(--line-strong); background: none; cursor: pointer; padding: 0; }
.circle:hover { border-color: var(--accent); }
.clamp2 { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.counts { display: flex; gap: 8px; overflow-x: auto; }
.counts button { flex: 1; min-width: 76px; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); cursor: pointer; font: inherit; color: var(--ink); }
.counts button svg { width: 20px; height: 20px; color: var(--muted); }
.counts button b { font-size: 20px; line-height: 1.1; }
.counts button small { font-size: 12px; color: var(--muted); }
.counts button.on { border-color: var(--accent); background: var(--accent-soft); }
.page.withfab { padding-bottom: calc(110px + var(--bottom)); }
.fab { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(20px + var(--bottom)); z-index: 30; display: flex; gap: 2px; background: var(--accent); border-radius: 999px; padding: 4px; box-shadow: 0 6px 20px rgba(28,33,29,.25); }
.fab button { width: 54px; height: 46px; border: 0; background: none; color: #fff; cursor: pointer; border-radius: 999px; display: grid; place-items: center; }
.fab button svg { width: 24px; height: 24px; }
.fab button:active { background: rgba(255,255,255,.15); }
.sheet { transition: bottom .15s ease; }
.sheetx { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--line); color: var(--ink); font-size: 15px; cursor: pointer; z-index: 1; }
/* ---------- the rider's conversation as home ---------- */
.chat-top.rtop { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: calc(8px + var(--top)) 14px 8px; border-bottom: 0; }
.rhorse { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); min-width: 0; }
.rhorse b { display: block; font-family: var(--font-display); font-size: 21px; font-weight: 600; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rhorse small { display: block; font-size: 12px; color: var(--muted); }
.rtop .me-btn { width: 40px; height: 40px; flex: none; }
/* Talk (live voice) is the main way in; Ride sits beside it. */
.ctarow { flex: none; display: flex; gap: 8px; margin: 2px 14px 8px; }
.talkcta { flex: 1.7; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-radius: 18px; background: var(--accent); color: var(--accent-ink); text-decoration: none; }
.talkcta svg { width: 26px; height: 26px; flex: none; }
.talkcta b { display: block; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.talkcta small { display: block; font-size: 13px; opacity: .88; line-height: 1.3; }
.ctarow .ridecta { flex: 1; min-width: 0; margin: 0; gap: 8px; padding: 13px 12px; background: var(--accent-soft); color: var(--accent); }
.ctarow .ridecta svg { width: 22px; height: 22px; }
.ctarow .ridecta small { color: var(--ink); opacity: .7; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.livebig { display: flex; align-items: center; gap: 14px; margin: 4px 0 12px; padding: 16px 18px; border-radius: 18px; background: var(--accent); color: var(--accent-ink); text-decoration: none; }
.livebig svg { width: 30px; height: 30px; flex: none; }
.livebig b { display: block; font-size: 18px; }
.livebig small { display: block; font-size: 13px; opacity: .88; }
.ridecta { flex: none; display: flex; align-items: center; gap: 12px; margin: 2px 14px 8px; padding: 13px 16px; border: 0; border-radius: 18px; background: var(--accent); color: var(--accent-ink); font: inherit; text-align: left; cursor: pointer; }
.ridecta svg { width: 26px; height: 26px; flex: none; }
.ridecta b { display: block; font-size: 17px; }
.ridecta small { display: block; font-size: 13px; opacity: .88; }
.nextride { display: flex; flex-direction: column; gap: 3px; padding: 16px; border-radius: 18px; background: var(--accent); color: var(--accent-ink); text-decoration: none; }
.nextride small { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; opacity: .85; }
.nextride b { font-family: var(--font-display); font-size: 20px; font-weight: 600; }
.nextride span { font-size: 13px; opacity: .85; }

/* The trainer's Oats chat: sits above the tab bar; what was sent, under Oats's line. */
.thinkrow { flex: none; display: flex; gap: 8px; margin: 0; padding: 8px 10px; border-bottom: 1px solid var(--line); background: var(--bg); }
.ideasbtn { flex: none; display: grid; place-items: center; padding: 0 12px; border-radius: var(--r-sm); border: 1px solid var(--line-strong); color: var(--accent); font-size: 14px; font-weight: 600; text-decoration: none; text-align: center; max-width: 74px; line-height: 1.2; }
.thinkbar { flex: 1; min-width: 0; display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: var(--r-sm); background: var(--accent-soft); color: var(--ink); text-decoration: none; font-size: 14px; line-height: 1.35; }
.thinkbar svg { flex: none; width: 22px; height: 22px; color: var(--accent); }
.thinkbar b { color: var(--accent); margin-right: 4px; }
.chat.cchat { height: calc(100dvh - 66px - var(--bottom)); }
.sentto { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line); }
.sentto .eyebrow { margin: 0 0 6px; }
#mic { border: 0; background: none; }
#mic.on { color: #fff; background: var(--warn); }
/* The go-between: the trainer's words that are new since she was last in (a message from him), and other riders' words. */
.lab.fresh { border-left-width: 4px; }
.lab.fresh .tag i { font-style: normal; display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 10px; letter-spacing: .04em; vertical-align: 1px; }
.lab.rider { border-left-color: #b08a3e; }
.lab.rider .tag { color: #8a6a2c; }
.msg.away { border-color: var(--accent); }
/* Riders: a small dot when something's new from them. */
.newdot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); vertical-align: 2px; margin-left: 4px; }
.lpact .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.lpact svg { width: 20px; height: 20px; flex: none; }

/* Rider page: the call kit */
.callkit .kitrow { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-top: 1px solid var(--line); }
.callkit .kitrow span { flex: 1; font-size: 14px; font-weight: 600; }
.callkit .kitrow .btn { flex: none; }
.seg { display: flex; gap: 6px; }
.seg button { flex: 1; padding: 10px 8px; border-radius: 999px; border: 1px solid var(--line-strong); background: #fff; font: inherit; font-size: 14px; font-weight: 600; color: var(--ink); cursor: pointer; }
.seg button.on { background: var(--accent); border-color: var(--accent); color: #fff; }

.talkgo { display: flex; align-items: center; justify-content: center; gap: 10px; }
.talkgo svg { width: 22px; height: 22px; }

/* Sharing beyond the app */
.sharebtn { width: 40px; height: 40px; flex: none; border-radius: 50%; border: 1px solid var(--line, rgba(0,0,0,.12)); background: transparent; color: var(--ink, inherit); display: grid; place-items: center; cursor: pointer; padding: 0; }
.sharebtn svg { width: 19px; height: 19px; }
.chat-top .sharebtn { margin-right: 6px; }
.card.ishare { margin: 0; }
.sharestrip { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; background: var(--surface); }
.sharenums { display: flex; gap: 6px; justify-content: space-between; }
.sharenums span { display: flex; flex-direction: column; align-items: center; flex: 1; }
.sharenums b { font-size: 20px; }
.sharenums small { font-size: 11px; color: var(--muted); }

.linkstat { border-top: 1px solid var(--line, rgba(0,0,0,.1)); padding: 10px 0 4px; }
.linkstat .sharenums { flex-wrap: wrap; }

/* the daily card */
.dailystrip { display: flex; align-items: center; gap: 8px; width: calc(100% - 28px); margin: 0 14px 8px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--brass-soft); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.dailystrip .dlabel { display: block; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.dailystrip b { flex: 1; min-width: 0; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dailystrip { flex-wrap: wrap; } .dailystrip .dlabel { width: 100%; } .dailystrip .dgo { color: var(--accent); font-size: 20px; line-height: 1; }
.dailycard h2 { font-family: var(--font-display); font-weight: 500; margin: 2px 0 6px; font-size: 26px; line-height: 1.15; }
.dailycard .dlead { font-size: 17px; margin: 0 0 12px; }
.dailycard h4 { margin: 18px 0 4px; font-size: 13px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.dailycard p, .dailycard li { line-height: 1.5; }
.dailycard ol { padding-left: 20px; margin: 4px 0; } .dailycard li { margin: 4px 0; }
.dailycard blockquote { margin: 8px 0; padding: 8px 12px; border-left: 3px solid var(--brass); background: var(--bg); border-radius: 0 8px 8px 0; font-style: italic; }
.dailycard blockquote a { display: block; font-style: normal; font-size: 14px; margin-top: 4px; color: var(--accent); font-weight: 600; }
.dailycard .dacts { gap: 8px; } .dailycard .dacts .btn { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.dailycard .dacts svg { width: 18px; height: 18px; }
.dailycard .dask { margin: 18px 0 10px; font-size: 17px; }

/* The ideas library */
.idearow { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line); padding: 12px 0; color: var(--ink); font: inherit; cursor: pointer; }
.idearow b { display: block; font-weight: 600; }
.idearow small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.idearow .pill { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--brass-soft, var(--accent-soft)); color: var(--brass, var(--accent)); }
.idearow .dgo { color: var(--muted); }
