/* Calm, large and legible. One stylesheet for phone and desktop. */

:root {
  --ground: #EEF3E7;
  --card: #FCFDF8;
  --white: #FFFFFF;
  --ink: #1F3329;
  --ink-2: #46594E;
  --brand: #3F6B4F;
  --brand-dark: #2F5D43;
  --brand-tint: #DCE9D5;
  --brand-ink: #2F4A3A;
  --line: #CBD8C3;
  --line-strong: #6E8775;
  --gold: #8A4B0F;
  --gold-tint: #F6E7CC;
  --gold-ink: #3D2206;
  --danger: #9B2C2C;
  --danger-tint: #F8E3DF;
  --danger-ink: #4A1414;
  --radius: 20px;
  --display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans: 'Atkinson Hyperlegible', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

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

html { font-size: 112.5%; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.5;
}

h1, h2, h3 { font-family: var(--display); font-weight: 500; margin: 0; }
h1 { font-size: 2.4rem; line-height: 1.15; }
h2 { font-size: 1.45rem; line-height: 1.25; }
h3 { font-size: 1.2rem; line-height: 1.3; }
h4 { font-size: 1rem; margin: 0.8em 0 0.3em; }
p { margin: 0; }
a { color: var(--brand-dark); }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.icon { flex-shrink: 0; }

/* ---------- Layout ---------- */

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 20px;
  padding: 14px 4%;
  background: var(--card);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin-right: auto;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 500;
}
.brand .icon { color: var(--brand); }
.nav { display: flex; flex-wrap: wrap; gap: 6px; }
.nav a {
  padding: 9px 16px;
  border-radius: 999px;
  color: var(--ink);
  text-decoration: none;
}
.nav a:hover { background: var(--ground); }
.nav a[aria-current="page"] { background: var(--brand-tint); font-weight: 700; }

.wrap {
  flex-grow: 1;
  width: 92%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 32px 0 28px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.row { display: flex; flex-wrap: wrap; gap: 20px; align-items: stretch; }
.row.top { align-items: flex-start; }
.col { flex: 1 1 320px; min-width: 0; }
.col.wide { flex: 999 1 520px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.stack.loose { gap: 20px; }
.spread { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 18px;
  padding: 16px 4%;
  border-top: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 0.9rem;
}

.tabbar { display: none; }

/* ---------- Pieces ---------- */

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 28px;
}
.card.tint { background: var(--brand-tint); border-color: transparent; }
.card.gold { background: var(--gold-tint); border-color: transparent; color: var(--gold-ink); }
.card.danger { background: var(--danger-tint); border-color: transparent; color: var(--danger-ink); }
.card.soft { background: var(--ground); border-color: transparent; border-radius: 14px; padding: 14px 18px; }

.label { font-size: 0.9rem; font-weight: 700; color: var(--ink-2); display: flex; align-items: center; gap: 8px; }
.card.tint .label { color: var(--brand-dark); }
.card.gold .label { color: var(--gold); }
.card.danger .label { color: var(--danger); }
.muted { color: var(--ink-2); }
.small { font-size: 0.9rem; }
.lead { font-size: 1.1rem; color: var(--ink-2); }
.voice { font-family: var(--display); font-size: 1.3rem; line-height: 1.4; }
.center { text-align: center; }

.pill {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 999px;
  background: var(--brand-tint);
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 700;
}
.pill.plain { background: var(--card); border: 1px solid var(--line-strong); font-weight: 400; }
.pill.gold { background: var(--gold-tint); color: var(--gold-ink); }
.pill.danger { background: var(--danger-tint); color: var(--danger-ink); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  /* The space above and below only shows when a long label wraps onto two lines. */
  padding: 6px 24px;
  text-align: center;
  border-radius: 999px;
  border: 2px solid var(--brand);
  background: var(--card);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: var(--brand-tint); color: var(--ink); }
.btn.primary { background: var(--brand); color: var(--white); }
.btn.primary:hover { background: var(--brand-dark); color: var(--white); }
.btn.danger { background: var(--danger); border-color: var(--danger); color: var(--white); }
.btn.danger:hover { background: #7A1F1F; color: var(--white); }
.btn.danger-soft { background: var(--danger-tint); border-color: transparent; color: var(--danger); min-height: 44px; padding: 0 18px; }
.btn.small { min-height: 44px; padding: 4px 18px; }
.btn.call { min-height: 84px; padding: 0 36px; font-size: 1.6rem; width: 100%; max-width: 460px; }
.btn[disabled] { opacity: 0.6; cursor: default; }
.linkbtn {
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--brand-dark);
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}
.textlink { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; }

.meter { height: 12px; border-radius: 999px; background: var(--brand-tint); overflow: hidden; }
.meter span { display: block; height: 100%; border-radius: 999px; background: var(--brand); }
.card.tint .meter { background: var(--card); }
.meter.thin { height: 8px; }

/* The gauge: how much of her picture is filled in. */
.gauge { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.gauge b { font-family: var(--display); font-size: 2.6rem; font-weight: 500; line-height: 1; font-variant-numeric: tabular-nums; }
.gauge span { color: var(--ink-2); }
.gauge-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; }
.gauge-groups div { display: flex; justify-content: space-between; gap: 8px; padding: 8px 12px; border-radius: 12px; background: var(--ground); font-size: 0.95rem; }
.gauge-groups b { font-variant-numeric: tabular-nums; }

.banner { margin: 0; padding: 12px 4%; text-align: center; }
.banner.warn { background: var(--gold-tint); color: var(--gold-ink); }
.flash { background: var(--brand-tint); border-radius: 14px; padding: 14px 18px; font-weight: 700; }
.flash.error { background: var(--danger-tint); color: var(--danger-ink); }

/* The bar across the top of the sample site. It never appears on the real one. */
.samplebar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 18px;
  padding: 8px 4%;
  background: var(--ink);
  color: var(--card);
  font-size: 0.9rem;
}
.samplebar-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; }
.samplebar form { margin: 0; }
.samplebar button, .samplebar a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--card);
  background: transparent;
  color: var(--card);
  font: inherit;
  text-decoration: none;
  cursor: pointer;
}
.samplebar button:hover, .samplebar a:hover, .samplebar button[aria-current="true"] { background: var(--card); color: var(--ink); }
.samplebar button[aria-current="true"] { font-weight: 700; }
.samplebar :focus-visible { outline-color: var(--card); }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px; }
.tile {
  flex: 1 1 210px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 24px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  text-decoration: none;
}
.tile:hover { border-color: var(--brand); color: var(--ink); }
.tile .icon { color: var(--brand); }
.tile strong { font-family: var(--display); font-size: 1.4rem; font-weight: 500; }
.tile span { color: var(--ink-2); font-size: 0.95rem; }
.tile.primary { background: var(--brand); border-color: var(--brand); color: var(--white); }
.tile.primary .icon { color: var(--white); }
.tile.primary span { color: #E5EFE0; }
.tile.primary:hover { background: var(--brand-dark); color: var(--white); }

.stats { display: flex; flex-wrap: wrap; gap: 12px; }
.stat { flex: 1 1 110px; background: var(--ground); border-radius: 14px; padding: 14px 16px; }
.stat b { display: block; font-family: var(--display); font-size: 1.7rem; font-weight: 500; line-height: 1.1; }
.stat span { font-size: 0.9rem; color: var(--ink-2); }

.rows > * { padding: 14px 0; border-top: 1px solid var(--line); }
.rows > *:first-child { border-top: 0; padding-top: 0; }
.rows > *:last-child { padding-bottom: 0; }
.plain-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.plain-list li { display: flex; align-items: flex-start; gap: 10px; }
.plain-list .icon { color: var(--brand); margin-top: 3px; }
ul.tight, ol.tight { margin: 0; padding-left: 1.3em; display: flex; flex-direction: column; gap: 6px; }

.photo { width: 200px; height: 200px; border-radius: 28px; object-fit: cover; flex-shrink: 0; }
.portrait { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.portrait.small { width: 60px; height: 60px; }
.portrait.placeholder { display: flex; align-items: center; justify-content: center; background: var(--gold-tint); color: var(--gold); }

/* ---------- Forms ---------- */

label, legend { font-weight: 700; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { padding: 0; margin-bottom: 8px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field .hint { font-weight: 400; color: var(--ink-2); font-size: 0.9rem; }
input[type="text"], input[type="tel"], input[type="url"], input[type="search"], select, textarea {
  width: 100%;
  min-height: 56px;
  padding: 12px 16px;
  border-radius: 14px;
  border: 2px solid var(--line-strong);
  background: var(--white);
  color: var(--ink);
  font: inherit;
}
textarea { min-height: 96px; resize: vertical; }
input[type="file"] { font: inherit; max-width: 100%; }
.inline { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.inline > .grow { flex: 1 1 260px; min-width: 0; }

.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { position: relative; display: inline-flex; font-weight: 400; cursor: pointer; }
.chip input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.chip span, button.chip {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  border: 2px solid var(--line-strong);
  background: var(--card);
  color: var(--ink);
  font: inherit;
}
button.chip { cursor: pointer; }
button.chip:hover, .chip:hover span { border-color: var(--brand); }
.chip input:checked + span { background: var(--brand); border-color: var(--brand); color: var(--white); font-weight: 700; }
.chip input:focus-visible + span { outline: 3px solid var(--ink); outline-offset: 2px; }

.mic {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid var(--brand);
  background: var(--card);
  color: var(--brand);
  cursor: pointer;
}
.mic.listening { background: var(--brand); color: var(--white); }
[hidden] { display: none !important; }

.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  padding: 36px 24px;
  border: 3px dashed var(--line-strong);
  border-radius: 24px;
  background: var(--card);
}
.dropzone .icon { color: var(--brand); }
.dropzone.over { background: var(--brand-tint); border-color: var(--brand); }
.dropzone input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; }

details > summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-weight: 700; color: var(--brand-dark); }
details[open] > summary { margin-bottom: 8px; }

/* ---------- Conversation ---------- */

.thread { display: flex; flex-direction: column; gap: 18px; }
.msg { display: flex; align-items: flex-start; gap: 14px; }
.msg .avatar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--brand-tint);
  color: var(--brand-dark);
}
.msg .who { font-size: 0.9rem; font-weight: 700; color: var(--brand-dark); margin-bottom: 4px; }
.msg.guide .text { font-family: var(--display); font-size: 1.25rem; line-height: 1.45; }
.msg.guide .text.plain { font-family: var(--sans); font-size: 1rem; }
.msg.you { justify-content: flex-end; }
.msg.you .bubble { max-width: 84%; background: var(--ground); border-radius: 20px; padding: 14px 18px; }
.msg.you .who { color: var(--ink-2); }
.msg .text p + p, .msg .text ul, .msg .text ol { margin-top: 0.6em; }
.msg .text ul, .msg .text ol { padding-left: 1.2em; margin-bottom: 0; }
.msg .text li + li { margin-top: 0.3em; }
.typing { color: var(--ink-2); font-family: var(--sans); font-size: 1rem; }
.composer { display: flex; flex-direction: column; gap: 8px; }
.composer .line { display: flex; align-items: flex-end; gap: 12px; }
.composer textarea { min-height: 56px; }
.gentle { display: flex; flex-wrap: wrap; gap: 4px 24px; padding-top: 8px; border-top: 1px solid var(--line); }
.recommend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }

.urgency { border-radius: var(--radius); padding: 18px 22px; display: flex; flex-direction: column; gap: 10px; }
.urgency.neutral { background: var(--card); border: 1px solid var(--line); }
.urgency.ok { background: var(--brand-tint); }
.urgency.warn { background: var(--gold-tint); color: var(--gold-ink); }
.urgency.danger { background: var(--danger-tint); color: var(--danger-ink); }
.urgency strong { font-family: var(--display); font-size: 1.35rem; font-weight: 500; }

.overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(31, 51, 41, 0.7);
}
.overlay .card { max-width: 560px; width: 100%; display: flex; flex-direction: column; gap: 16px; align-items: center; text-align: center; }

.emergency { align-items: center; text-align: center; gap: 20px; padding: 36px 28px; }
.emergency h1 { color: var(--danger); }
/* The number to dial, written out. It is not a link: the call is made on her own phone. */
.dial { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; max-width: 460px; padding: 18px 24px; background: var(--card); border: 1px solid var(--danger); }
.dial .label { font-size: 1rem; }
.dial-number { font-size: 3.4rem; line-height: 1.1; letter-spacing: 0.06em; color: var(--danger); }
.dial-then { font-weight: 600; }

/* ---------- Reports ---------- */

.lens { background: var(--ground); border-radius: 14px; padding: 16px 20px; display: flex; flex-direction: column; gap: 6px; }
.prose p + p { margin-top: 0.7em; }

/* ---------- Her journey ---------- */

.plainlink { display: inline-flex; align-items: center; min-height: 44px; }
.print-only { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

/* One dot for each stage, joined into a path: done, current, still ahead. */
.journey-dots { display: flex; align-items: center; padding: 6px 4px; }
.journey-dots .dot { flex: 0 0 auto; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line-strong); background: var(--card); }
.journey-dots .dot.done { background: var(--brand); border-color: var(--brand); }
.journey-dots .dot.current { background: var(--gold-tint); border-color: var(--gold); box-shadow: 0 0 0 4px var(--gold-tint); }
.journey-dots .join { flex: 1 1 0; min-width: 4px; max-width: 44px; height: 2px; background: var(--line); }
.journey-dots .join.done { background: var(--brand); }

/* The whole path as a list, with a line running down through the stages. */
.path { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.path-step { position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 0 18px; padding-bottom: 26px; scroll-margin-top: 20px; }
.path-step:last-child { padding-bottom: 0; }
.path-step::before { content: ""; position: absolute; left: 21px; top: 44px; bottom: 0; width: 2px; background: var(--line); }
.path-step.done::before { background: var(--brand); }
.path-step:last-child::before { display: none; }
.path-mark {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--line-strong);
  background: var(--card);
  color: var(--ink-2);
  font-family: var(--display);
  font-size: 1.15rem;
  font-variant-numeric: tabular-nums;
}
.path-step.done .path-mark { background: var(--brand); border-color: var(--brand); color: var(--white); }
.path-step.current .path-mark { background: var(--gold-tint); border-color: var(--gold); color: var(--gold-ink); box-shadow: 0 0 0 4px var(--gold-tint); }
.path-body { display: flex; flex-direction: column; gap: 8px; padding-top: 5px; min-width: 0; }
.path-body h2 { font-size: 1.3rem; }
.path-step.current .path-body { padding: 16px 20px 18px; border-radius: 16px; background: var(--ground); }

/* An assessment: made to be read slowly, and to print. */
.assessment .opening { font-family: var(--display); font-size: 1.25rem; line-height: 1.5; }
.assessment .opening p + p { margin-top: 0.7em; }
.assessment h2 { font-size: 1.3rem; }
.assessment ul.tight { gap: 10px; }

/* ---------- A plan for the dog ---------- */

/* Shown on paper only, in ordinary lettering. */
.on-paper { display: none; }

/* A plan: made to be read, kept and printed. */
.plan .going-on { font-family: var(--display); font-size: 1.2rem; line-height: 1.5; }
.plan .going-on p + p { margin-top: 0.7em; }
.plan h2 { font-size: 1.3rem; }
.plan ul.tight { gap: 10px; }

/* The week's steps: when on the left, what to do on the right. */
.plan-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.plan-steps li { display: grid; grid-template-columns: 9rem minmax(0, 1fr); gap: 4px 20px; padding: 12px 0; border-top: 1px solid var(--line); }
.plan-steps li:first-child { border-top: 0; padding-top: 0; }
.plan-steps li:last-child { padding-bottom: 0; }
.plan-steps .when { font-weight: 700; }

/* An earlier version of a plan: what was tried and how it went. */
.tried { padding-left: 18px; border-left: 3px solid var(--line); }
.tried + .tried { margin-top: 4px; }

/* What was said before she came back about a plan, folded away above the conversation. */
.earlier[open] { padding-bottom: 20px; border-bottom: 1px solid var(--line); }

/* A line in a conversation that marks the day she came back to say how a plan went. */
.thread-note { display: flex; align-items: center; gap: 12px; color: var(--ink-2); font-size: 0.9rem; }
.thread-note::before, .thread-note::after { content: ""; flex: 1 1 0; height: 1px; background: var(--line); }

/* ---------- Today's visit ---------- */

/* What the guide has ready for her: a short list of links, each with a line of its own. */
.waiting { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.waiting li { border-top: 1px solid var(--line); }
.waiting li:first-child { border-top: 0; }
.waiting a { display: flex; flex-direction: column; gap: 2px; min-height: 44px; padding: 12px 0; color: var(--ink); text-decoration: none; }
.waiting li:first-child a { padding-top: 0; }
.waiting li:last-child a { padding-bottom: 0; }
.waiting a strong { color: var(--brand-dark); text-decoration: underline; }
.waiting a span { color: var(--ink-2); }

/* "Why I'm asking": folded away under a question, for when she wants the reason. */
details.why { margin-top: 6px; }
details.why > summary { min-height: 40px; font-family: var(--sans); font-size: 0.95rem; font-weight: 400; text-decoration: underline; }
details.why[open] > summary { margin-bottom: 2px; }
details.why p { font-family: var(--sans); font-size: 1rem; color: var(--ink-2); padding-left: 14px; border-left: 3px solid var(--line); }

/* "Not today": always there under a question, and quieter than the answers beside it. */
button.chip.quiet { border-style: dashed; color: var(--ink-2); }

/* A photo she sent in a conversation, and the guide's request for one. */
.sent-photo { display: block; max-width: min(100%, 320px); max-height: 320px; margin-bottom: 8px; border-radius: 14px; }
.photo-ask { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 18px; padding: 14px 18px; border-radius: 14px; background: var(--gold-tint); color: var(--gold-ink); }
.photo-ask p { display: flex; align-items: flex-start; gap: 10px; flex: 1 1 260px; }
.photo-ask .icon { color: var(--gold); margin-top: 2px; }

/* ---------- Her plan and her trials ---------- */

/* The plan: a short numbered list, the most important thing first. */
.plan-items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 22px; }
.plan-item { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 0 18px; padding-top: 22px; border-top: 1px solid var(--line); }
.plan-item:first-child { padding-top: 0; border-top: 0; }
.plan-item .path-mark { background: var(--brand-tint); border-color: var(--brand); color: var(--ink); }
.plan-item.picked .path-mark { background: var(--brand); color: var(--white); }
/* The tick box on each option in her plan. What she ticks is her plan. */
.pick { display: inline-flex; align-items: center; gap: 12px; align-self: flex-start; padding: 8px 16px 8px 12px; border: 2px solid var(--line); border-radius: 12px; background: var(--card); font-weight: 700; cursor: pointer; }
.pick input { flex: none; width: 26px; height: 26px; margin: 0; accent-color: var(--brand); cursor: pointer; }
.pick:has(input:checked) { border-color: var(--brand); background: var(--brand-tint); }
.pick:has(input:focus-visible) { outline: 3px solid var(--ink); outline-offset: 2px; }

/* A trial's days: one square for each, in rows of seven, so that a week reads as one line. */
.trial-days { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; max-width: 520px; }
.trial-days .day { position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 1; min-height: 44px; border-radius: 12px; border: 2px solid var(--line); background: var(--card); }
.trial-days .day .n { position: absolute; top: 3px; left: 7px; font-size: 0.7rem; color: var(--ink-2); }
.trial-days .day .v { font-family: var(--display); font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.trial-days .day.done { background: var(--brand-tint); border-color: var(--brand); }
.trial-days .day.missed { border-style: dashed; border-color: var(--line-strong); }
.trial-days .day.ahead { border-color: transparent; background: var(--ground); }

/* ---------- Choosing which way to go after a research report ---------- */

.choice { display: flex; align-items: flex-start; gap: 14px; padding: 14px 16px; border: 2px solid var(--line); border-radius: 14px; background: var(--card); color: var(--ink); font-weight: 400; cursor: pointer; }
.choice input { flex: none; width: 26px; height: 26px; margin: 1px 0 0; accent-color: var(--brand); cursor: pointer; }
.choice > span { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.choice:has(input:checked) { border-color: var(--brand); background: var(--brand-tint); }
.choice:has(input:focus-visible) { outline: 3px solid var(--ink); outline-offset: 2px; }

/* ---------- Her numbers ---------- */

/* The colour of the marks in a chart. It is a little stronger than the brand green, so that a
   thin line and a small dot stay clear on the card. Lettering in a chart stays in ink. */
:root { --data: #2F7D4F; }
.number-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr)); gap: 20px; }
.number-tile .figure { font-size: 2rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.chart { position: relative; margin: 6px 0 0; max-width: 560px; border-radius: 12px; }
.chart:focus-visible { outline: 3px solid var(--ink); outline-offset: 4px; }
.chart svg { display: block; width: 100%; height: auto; touch-action: pan-y; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .base { stroke: var(--line-strong); stroke-width: 1; }
.chart .tick { fill: var(--ink-2); font-family: var(--sans); font-size: 13px; font-variant-numeric: tabular-nums; }
.chart .line { fill: none; stroke: var(--data); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .dot { fill: var(--data); stroke: var(--card); stroke-width: 2; }
.chart .bar { fill: var(--data); }
.chart .end { fill: var(--ink); font-family: var(--sans); font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.chart .cross { stroke: var(--ink-2); stroke-width: 1; }
.chart .cross[hidden], .chart .tip[hidden] { display: none; }
.chart .tip { position: absolute; top: 4px; transform: translate(-50%, -100%); margin: 0; padding: 6px 10px; border-radius: 10px; background: var(--ink); color: var(--white); font-size: 0.85rem; white-space: nowrap; pointer-events: none; }

/* ---------- Her home screen, laid out as a dashboard ---------- */

/* What is for today is on the left, what is waiting and the quick ways in are on the right, and
   her figures are underneath. Same colours, lettering and rounded cards as everywhere else. */
.wrap.wide { max-width: 1240px; }
.dash-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 28px; }
.dash-head .photo { width: 132px; height: 132px; border-radius: 24px; }
.dash-title { margin-top: 4px; }
.glance.strip .glance-tile { min-height: 124px; }
.dash { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(300px, 1fr); gap: 24px; align-items: start; }
.dash-main, .dash-side { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.dash-side .btn { justify-content: flex-start; }
.glance { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.glance-wide { grid-column: span 2; }
.glance-wide .label .icon { color: var(--brand); }
.glance-figure { font-family: var(--display); font-size: 2.2rem; font-weight: 500; line-height: 1.1; font-variant-numeric: tabular-nums; }
.glance-tile { display: flex; flex-direction: column; gap: 6px; min-height: 148px; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); color: var(--ink); text-decoration: none; }
.glance-tile:hover { border-color: var(--brand); color: var(--ink); }
.glance-tile .label .icon { color: var(--brand); }
.glance-tile b { margin-top: auto; font-family: var(--display); font-size: 2.2rem; font-weight: 500; line-height: 1.1; font-variant-numeric: tabular-nums; }
.glance-tile .words { color: var(--ink-2); font-size: 0.95rem; }
.glance-tile .with-portrait { margin-top: auto; display: flex; align-items: center; gap: 16px; }
.glance-tile .with-portrait > span:last-child { display: flex; flex-direction: column; gap: 6px; }
.glance-tile .with-portrait .portrait.placeholder .icon { color: var(--gold); }
@media (max-width: 1100px) {
  .glance { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  /* The two columns become one list. Each piece carries its place, so they fall into the order
     she needs: the dog's step, what is waiting, her visit, and the rest after. */
  .dash { display: flex; flex-direction: column; gap: 20px; }
  .dash-main, .dash-side { display: contents; }
}
@media (max-width: 760px) {
  .dash-head .photo { width: 96px; height: 96px; border-radius: 20px; }
  .glance { gap: 12px; }
  .glance-tile, .glance.strip .glance-tile { min-height: 0; padding: 14px 16px; }
  .glance-tile b, .glance-figure { font-size: 1.6rem; }
}

/* ---------- Narrower screens: keep her menu on one line where it can be ---------- */

@media (max-width: 1100px) {
  .nav { gap: 2px; }
  .nav a { padding: 9px 11px; }
}

/* ---------- Phone ---------- */

@media (max-width: 760px) {
  html { font-size: 106.25%; }
  h1 { font-size: 1.9rem; }
  .card { padding: 20px; }
  .wrap { padding-top: 22px; }
  .nav-member { display: none; }
  .is-member { padding-bottom: 86px; }
  .site-footer span { display: none; }
  .tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
    display: flex;
    background: var(--card);
    border-top: 1px solid var(--line);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .tabbar a {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 8px 2px;
    border-radius: 14px;
    color: var(--ink-2);
    text-decoration: none;
    font-size: 0.78rem;
    line-height: 1.2;
    text-align: center;
  }
  .tabbar a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
  .tabbar a[aria-current="page"] { background: var(--brand-tint); color: var(--ink); font-weight: 700; }
  .msg.you .bubble { max-width: 92%; }
  .btn.call { font-size: 1.4rem; }
  .journey-dots .dot { width: 14px; height: 14px; }
  .path-step { grid-template-columns: 36px minmax(0, 1fr); gap: 0 12px; }
  .path-step::before { left: 17px; top: 36px; }
  .path-mark { width: 36px; height: 36px; font-size: 1rem; }
  .path-step.current .path-body { padding: 14px 14px 16px; }
  .plan-steps li { grid-template-columns: minmax(0, 1fr); }
  .tried { padding-left: 14px; }
  .tiles { grid-template-columns: 1fr 1fr; gap: 12px; }
  .tile { padding: 16px; }
  .tile strong { font-size: 1.15rem; }
  .plan-item { grid-template-columns: 36px minmax(0, 1fr); gap: 0 12px; }
  .trial-days { gap: 5px; }
}

@media print {
  .site-header, .site-footer, .tabbar, .samplebar, .no-print { display: none !important; }
  body, body.is-member { background: #fff; padding-bottom: 0; }
  .print-only { display: block; font-family: var(--display); font-size: 1.1rem; margin-bottom: 10px; }
  .wrap { width: 100%; max-width: none; padding: 0; }
  .card { border: 0; padding: 0; background: none; }
  .card.tint, .card.gold { background: none; color: inherit; }
  /* Keep a heading with what follows it, and keep each part of an assessment on one page. */
  h1, h2, h3 { break-after: avoid; }
  .assessment section, .assessment li { break-inside: avoid; }
  .assessment section.card.tint { padding-left: 16px; border-left: 3px solid var(--brand); border-radius: 0; }
  /* A plan for the dog: each part stays on one page, and each step of the week gets a box to tick. */
  .on-paper { display: block; }
  .plan li { break-inside: avoid; }
  .plan .label { break-after: avoid; }
  /* On paper the earlier tries keep what worked and what did not, and leave out the old steps. */
  .plan .tried-detail { display: none; }
  .plan section.card.tint, .plan section.card.soft { padding-left: 16px; border-left: 3px solid var(--brand); border-radius: 0; }
  .plan-steps li { grid-template-columns: 22px 8.5rem minmax(0, 1fr); gap: 4px 12px; }
  .plan-steps li::before { content: ""; width: 15px; height: 15px; margin-top: 5px; border: 1.5px solid #000; border-radius: 3px; }
}
