/* TC Agent screens: the dark, sleek look ("B").

   Brand colors come from brand.yaml (the page sets --navy, --royal and --accent).
   The six STATUS colors below never change and always mean the same thing:
   green done, blue waiting, yellow due soon, red at risk, purple needs your OK,
   gray not started. Every one is always shown with an icon and a word.
   A test checks that all the text here is readable against its background. */

@font-face {
  font-family: "Inter";
  src: url("/static/fonts/inter-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: dark;
  /* brand (overridden from brand.yaml) */
  --navy: #050e3d;
  --royal: #263993;
  --accent: #00fbf0;

  /* text and surfaces on the dark background */
  --ink: #eef1fb;
  --soft: #a3aed4;
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.18);
  --card: rgba(255, 255, 255, 0.045);
  --card-hover: rgba(255, 255, 255, 0.075);

  /* the status colors: a bright shade (icons, bars), a readable text shade, and a dark tint */
  --green: #34d188;   --green-text: #7aedb4;   --green-tint: #0d3a3c;
  --blue: #5b9bff;    --blue-text: #adcbff;    --blue-tint: #152f72;
  --yellow: #f2c230;  --yellow-text: #f8d867;  --yellow-tint: #3c3420;
  --red: #ff5d55;     --red-text: #ffaba4;     --red-tint: #471a38;
  --purple: #a78bfa;  --purple-text: #d1c4ff;  --purple-tint: #2b2170;
  --gray: #7f8bb8;    --gray-text: #b9c2e3;    --gray-tint: #1a2456;

  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--navy); }
body { margin: 0; min-height: 100vh; color: var(--ink); font: 400 15.5px/1.55 var(--font);
       font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased;
       background:
         radial-gradient(90% 50% at 50% -8%, color-mix(in srgb, var(--royal) 85%, transparent) 0%, transparent 70%),
         linear-gradient(180deg, var(--navy) 0%, color-mix(in srgb, var(--navy) 78%, black) 100%);
       background-attachment: fixed; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font); line-height: 1.2; margin: 0; letter-spacing: -0.02em; }
h1 { font-size: 1.6rem; font-weight: 650; }
h2 { font-size: 1.08rem; font-weight: 600; letter-spacing: -0.01em; }
h3 { font-size: 0.98rem; font-weight: 600; letter-spacing: -0.005em; }
p { margin: 0.5rem 0; }
ul { padding-left: 1.2rem; }
li { margin: 0.3rem 0; }
.soft { color: var(--soft); }
.small { font-size: 0.88rem; }
.icon { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 2;
        stroke-linecap: round; stroke-linejoin: round; vertical-align: -0.2em; }

/* ---------- frame ---------- */
.top { position: sticky; top: 0; z-index: 20; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
       background: color-mix(in srgb, var(--navy) 78%, transparent); border-bottom: 1px solid var(--line); }
.top-in { max-width: 800px; margin: 0 auto; padding: 10px 18px; display: flex; align-items: center; gap: 6px; }
.top a { text-decoration: none; }
.brand { font-weight: 650; font-size: 1.02rem; letter-spacing: -0.01em; margin-right: auto; display: flex;
         align-items: center; gap: 10px; }
.brand img { width: 30px; height: 30px; display: block; }
.top .nav { padding: 7px 12px; border-radius: 9px; font-weight: 500; font-size: 0.93rem; color: var(--soft); }
.top .nav:hover, .top .nav:focus-visible { background: var(--card-hover); color: var(--ink); }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; margin-left: 6px;
          font-size: 0.76rem; font-weight: 650; color: var(--ink); background: var(--card-hover);
          border: 1px solid var(--line-strong); }
.avatar:hover { border-color: var(--accent); }
.notice-bar { font-size: 0.8rem; color: var(--soft); border-bottom: 1px solid var(--line); }
.notice-bar div { max-width: 800px; margin: 0 auto; padding: 6px 18px; }
/* The pretend-date banner. Loud on purpose: a light bar on a dark app, on every screen, so
   nobody records a date without knowing the app's "today" is made up. It is not a status,
   so it uses none of the six status colors. */
.pretend-bar { background: var(--ink); color: var(--navy); font-size: 0.9rem; line-height: 1.4;
               border-bottom: 6px solid transparent;
               border-image: repeating-linear-gradient(-45deg, var(--navy) 0 10px, var(--ink) 10px 20px) 6; }
.pretend-bar > div { max-width: 800px; margin: 0 auto; padding: 9px 18px; display: flex; flex-wrap: wrap;
                     align-items: center; gap: 6px 12px; }
.pretend-bar .icon { width: 22px; height: 22px; }
.pretend-bar .say { flex: 1 1 260px; font-weight: 500; }
.pretend-bar .say b { font-weight: 750; }
.pretend-bar form { margin: 0; }
.pretend-bar button { font: 650 0.86rem var(--font); color: var(--ink); background: var(--navy); border: 0;
                      border-radius: 9px; padding: 8px 14px; cursor: pointer; }
main { max-width: 800px; margin: 0 auto; padding: 22px 18px 44px; }
.stack > * + * { margin-top: 12px; }
.section { margin-top: 30px; }
.section > h2 { margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.count { font-size: 0.76rem; font-weight: 600; color: var(--soft); border: 1px solid var(--line-strong);
         border-radius: 7px; padding: 0 7px; letter-spacing: 0; }
.greeting { margin-bottom: 16px; }
.greeting .date { color: var(--soft); font-size: 0.88rem; font-weight: 500; }
.greeting h1 { margin-top: 2px; }

.flash { border-radius: 12px; padding: 11px 14px; margin-bottom: 16px; font-weight: 500; display: flex; gap: 10px;
         border: 1px solid transparent; }
.flash.good { background: var(--green-tint); color: var(--green-text); border-color: color-mix(in srgb, var(--green) 40%, transparent); }
.flash.info { background: var(--card-hover); color: var(--ink); border-color: var(--line-strong); }
.flash.bad { background: var(--red-tint); color: var(--red-text); border-color: color-mix(in srgb, var(--red) 45%, transparent); }
/* "Details" under "The AI read didn't finish": the technical message, folded away until tapped */
.flash details.tech { margin-top: 6px; font-weight: 400; }
.flash details.tech > summary { cursor: pointer; text-decoration: underline; width: fit-content; list-style: none; }
.flash details.tech > summary::-webkit-details-marker { display: none; }
.flash details.tech > p { margin: 6px 0 0; font-size: 0.85rem; overflow-wrap: anywhere; }

/* ---------- the color system ---------- */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 7px; border-radius: 8px;
        font-size: 0.8rem; font-weight: 600; line-height: 1.4; border: 1px solid transparent; letter-spacing: 0; }
.chip.green  { background: var(--green-tint);  color: var(--green-text);  border-color: color-mix(in srgb, var(--green) 38%, transparent); }
.chip.blue   { background: var(--blue-tint);   color: var(--blue-text);   border-color: color-mix(in srgb, var(--blue) 38%, transparent); }
.chip.yellow { background: var(--yellow-tint); color: var(--yellow-text); border-color: color-mix(in srgb, var(--yellow) 38%, transparent); }
.chip.red    { background: var(--red-tint);    color: var(--red-text);    border-color: color-mix(in srgb, var(--red) 42%, transparent); }
.chip.purple { background: var(--purple-tint); color: var(--purple-text); border-color: color-mix(in srgb, var(--purple) 40%, transparent); }
.chip.gray   { background: var(--gray-tint);   color: var(--gray-text);   border-color: color-mix(in srgb, var(--gray) 35%, transparent); }

/* ".edge" gives a card or hero the tone of its status color */
.edge { --tone: var(--gray); }
.edge.green { --tone: var(--green); }
.edge.blue { --tone: var(--blue); }
.edge.yellow { --tone: var(--yellow); }
.edge.red { --tone: var(--red); }
.edge.purple { --tone: var(--purple); }

.legend { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.legend .chip { font-size: 0.74rem; font-weight: 500; }
.legend-title { font-size: 0.78rem; color: var(--soft); width: 100%; }
footer.legend-foot { max-width: 800px; margin: 0 auto; padding: 0 18px 40px; }

/* ---------- the path: contract to closing ---------- */
.path { display: flex; gap: 4px; align-items: center; }
.path .seg { flex: 1; min-width: 0; height: 8px; border-radius: 4px; background: var(--gray-tint); }
.path .seg.green { background: var(--green); box-shadow: 0 0 12px color-mix(in srgb, var(--green) 55%, transparent); }
.path .seg.blue { background: var(--blue); }
.path .seg.yellow { background: var(--yellow); box-shadow: 0 0 12px color-mix(in srgb, var(--yellow) 50%, transparent); }
.path .seg.red { background: var(--red); box-shadow: 0 0 14px color-mix(in srgb, var(--red) 65%, transparent); }
.path .seg.purple { background: var(--purple); box-shadow: 0 0 14px color-mix(in srgb, var(--purple) 65%, transparent); }
.path .seg.gray { background: color-mix(in srgb, var(--gray) 35%, transparent); }
.path .home { flex: none; color: var(--soft); display: flex; margin-left: 2px; }
.path .home .icon { width: 16px; height: 16px; }
.path-names { display: flex; gap: 4px; margin-top: 6px; padding-right: 22px; }
.path-names span { flex: 1; min-width: 0; font-size: 0.68rem; color: var(--soft); text-align: center;
                   overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.path-names span .icon { width: 11px; height: 11px; margin-right: 3px; }
.path-words { font-size: 0.84rem; color: var(--soft); margin-top: 8px; }

/* ---------- cards and rows ---------- */
.card { background: var(--card); border-radius: 16px; padding: 20px; border: 1px solid var(--line); }
.card.edge { border-color: color-mix(in srgb, var(--tone) 38%, transparent);
             background: linear-gradient(180deg, color-mix(in srgb, var(--tone) 13%, transparent), color-mix(in srgb, var(--tone) 3%, transparent)); }
a.card { transition: border-color .15s, background .15s; }
a.card:hover { border-color: var(--line-strong); background: var(--card-hover); }
.hero { border-radius: 18px; padding: 22px; border: 1px solid color-mix(in srgb, var(--tone) 42%, transparent);
        background: linear-gradient(180deg, color-mix(in srgb, var(--tone) 17%, transparent), color-mix(in srgb, var(--tone) 3%, transparent));
        box-shadow: 0 22px 50px -24px color-mix(in srgb, var(--tone) 60%, transparent); }
.hero h1 { margin: 12px 0 4px; }
.hero .btn { margin-top: 18px; }

.rows { background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.row { display: flex; align-items: center; gap: 12px; padding: 13px 16px; text-decoration: none;
       border-top: 1px solid var(--line); min-height: 60px; }
.row:first-child { border-top: 0; }
a.row { transition: background .12s; }
a.row:hover, a.row:focus-visible { background: var(--card-hover); }
.row .body { flex: 1; min-width: 0; }
.row .title { font-weight: 550; }
.row .meta { font-size: 0.84rem; color: var(--soft); }
.row .chev { color: color-mix(in srgb, var(--soft) 60%, transparent); }
.row .side { text-align: right; }
.empty { padding: 18px; color: var(--soft); border: 1px dashed var(--line-strong); border-radius: 16px; }

/* ---------- buttons and forms ---------- */
/* EVERY BRIGHT BUTTON HAS DARK TEXT. The main button is the bright aqua with navy words.
   Never give a color to "every link inside X" (a selector ending in a bare `a` or `button`)
   where a .btn can sit inside X: that rule would win and turn the words white on aqua.
   A test lists the few such rules that exist and checks no button sits inside them. */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px;
       padding: 12px 26px; border: 0; border-radius: 12px; background: var(--accent); color: var(--navy);
       font: 650 1rem var(--font); letter-spacing: -0.005em; text-decoration: none; cursor: pointer;
       box-shadow: 0 10px 30px -14px color-mix(in srgb, var(--accent) 80%, transparent); transition: filter .12s, transform .06s; }
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }
.btn.wide { width: 100%; }
.btn.quiet { background: transparent; color: var(--ink); border: 1px solid var(--line-strong); font-weight: 550;
             min-height: 44px; padding: 8px 18px; font-size: 0.94rem; box-shadow: none; }
.btn.quiet:hover { border-color: var(--accent); background: var(--card); filter: none; }
.btn.danger { background: var(--red); color: #2a0707; box-shadow: none; }
.btn[disabled] { background: var(--gray-tint); color: var(--gray-text); cursor: not-allowed; box-shadow: none; filter: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 16px; }

label { display: block; font-weight: 550; font-size: 0.93rem; margin-top: 16px; }
label .hint { display: block; font-weight: 400; color: var(--soft); font-size: 0.86rem; }
input[type=text], input[type=date], input[type=file], select, textarea {
  width: 100%; font: inherit; padding: 12px 13px; border: 1px solid var(--line-strong); border-radius: 11px;
  background: rgba(255, 255, 255, 0.04); color: var(--ink); margin-top: 6px; transition: border-color .12s, box-shadow .12s; }
select option { background: #0a1552; color: var(--ink); }
input::placeholder, textarea::placeholder { color: color-mix(in srgb, var(--soft) 70%, transparent); }
input[type=file]::file-selector-button { font: 550 0.88rem var(--font); margin-right: 12px; padding: 7px 12px; border-radius: 8px;
  border: 1px solid var(--line-strong); background: var(--card-hover); color: var(--ink); cursor: pointer; }
textarea { min-height: 260px; line-height: 1.5; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.choice { display: flex; align-items: center; gap: 12px; padding: 13px 14px; border: 1px solid var(--line-strong);
          border-radius: 12px; margin-top: 8px; font-weight: 500; cursor: pointer; background: rgba(255, 255, 255, 0.03); }
.choice input { width: 20px; height: 20px; flex: none; margin: 0; accent-color: var(--accent); }
.choice:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 9%, transparent); }
details.more { margin-top: 18px; }
details.more > summary { cursor: pointer; font-weight: 550; padding: 10px 0; color: var(--soft); }
details.more > summary:hover { color: var(--ink); }
.letter { background: rgba(255, 255, 255, 0.035); border: 1px solid var(--line); border-radius: 12px; padding: 16px;
          white-space: pre-wrap; font: 0.92rem/1.6 var(--font); color: #dce1f5; overflow-wrap: anywhere; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px 18px; margin: 0; }
.facts dt { font-size: 0.8rem; color: var(--soft); }
.facts dd { margin: 0; font-weight: 550; }
.missing { color: var(--red-text); font-weight: 600; }

/* "[Earlier step] isn't marked done yet. Mark it done too?" Asked on the step's own form. */
.ask-earlier { margin: 18px 0 0; padding: 14px 14px 12px; border: 1px solid var(--line-strong); border-radius: 14px;
               background: rgba(255, 255, 255, 0.03); min-width: 0; }
/* The question sits inside the box, on its own lines (not across the top border). */
.ask-earlier legend { float: left; width: 100%; padding: 0; font-weight: 550; font-size: 0.95rem; }
.ask-earlier legend + * { clear: both; }
.ask-earlier .choice { margin-top: 8px; }
.ask-earlier .ask-when { padding: 0 0 4px 34px; }
.ask-earlier .ask-when label { margin-top: 10px; }
.ask-note { margin-top: 16px; }

/* The AI reading test: the hand reading next to the AI reading, a line per field. */
.score { background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.score-head, .score-line { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr) 7.2rem;
                           gap: 4px 14px; align-items: center; padding: 10px 14px; }
.score-head { font-size: 0.78rem; color: var(--soft); border-bottom: 1px solid var(--line); }
.score-line { border-top: 1px solid var(--line); font-size: 0.92rem; overflow-wrap: anywhere; }
.score-line:first-of-type { border-top: 0; }
.score-line .what { color: var(--soft); }
.score-line.differs { background: color-mix(in srgb, var(--red) 9%, transparent); }
.score-line .mark { text-align: right; }

/* Undo: what was recorded on a step, each with its own Undo button */
/* The day-count question on a step: "Contract says X days; NJ default is Y. Confirm?" */
.ask-days { margin: 16px 0 4px; padding: 12px 14px; border: 1px solid var(--line-strong);
            border-left: 4px solid var(--purple); border-radius: 14px; }
.ask-days p { margin: 0 0 8px; }
.ask-days .ask-days-q { display: flex; gap: 8px; align-items: flex-start; }
.ask-days .btn-row { margin-top: 10px; }
.undo-box { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.undo-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 10px; }
.undo-line .btn { flex: none; }

/* ---------- "Deal at a glance": the top of every deal page ----------
   Top to bottom: status line, progress bar, next step, key dates, one short money line.
   ONLY two things are bold: the next step and the next date coming up.
   On a phone, everything down to the key dates fits on the first screen.
   The full money list, who's on the deal and the tags are on the "Deal details" tab,
   which uses the same styles. */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
h1.deal-title { font-size: 1.25rem; font-weight: 500; letter-spacing: -0.01em; }
.glance { margin-top: 4px; }
.glance a { text-decoration: none; }       /* no color here: it would repaint the button's dark text */
.glance h3 { color: var(--soft); font-size: 0.8rem; font-weight: 500; margin: 18px 0 4px; }
.glance .chip { font-weight: 500; }
.glance-status { margin: 2px 0 10px; color: var(--soft); font-size: 0.9rem; }
.glance-path .path-words { margin-top: 6px; }

/* (b) the next step: the one prominent thing */
.hero.next { margin-top: 12px; padding: 16px 18px 18px; }
.next-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.next-title { margin: 8px 0 2px; font-size: 1.4rem; font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; }
.next-when { margin: 0; color: var(--soft); font-size: 0.9rem; }
.hero.next .btn { margin-top: 12px; }

/* (c) key dates: one tight line each */
.glance-dates, .glance-list { border: 1px solid var(--line); border-radius: 14px; background: var(--card); overflow: hidden; }
.glance-date { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; align-items: center; gap: 0 9px;
               padding: 6px 12px; border-top: 1px solid var(--line); font-size: 0.9rem; line-height: 1.3; }
.glance-date:first-child, .glance-line:first-child, .glance-person:first-child { border-top: 0; }
.glance-date .icon { width: 16px; height: 16px; color: var(--tone-ink); }
.glance-date .when { text-align: right; }
.glance-date .left, .glance-date .note { color: var(--soft); font-size: 0.82rem; }
.glance-date.past { opacity: 0.55; }                       /* done: checked off and dimmed */
.glance-date.next-date { font-weight: 700; background: color-mix(in srgb, var(--tone-ink) 12%, transparent);
                         box-shadow: inset 3px 0 0 var(--tone-ink); }
.glance-date.next-date .left { font-weight: 500; color: var(--ink); }
.glance a[href]:hover, .glance a[href]:focus-visible { background: var(--card-hover); }
.tone-green { --tone-ink: var(--green); }   .tone-blue { --tone-ink: var(--blue); }
.tone-yellow { --tone-ink: var(--yellow); } .tone-red { --tone-ink: var(--red); }
.tone-purple { --tone-ink: var(--purple); } .tone-gray { --tone-ink: var(--gray-text); }

/* One short money line under the key dates: "$400,000 · FHA $386,000 · Seller credit $8,000" */
.glance-money { display: block; margin-top: 10px; padding: 8px 12px; border-radius: 12px; font-size: 0.92rem;
                border: 1px solid var(--line); background: var(--card); }
#deal-details > h3:first-child { margin-top: 0; }

/* The money and the people (on Deal details): plain lines, nothing bold */
.glance-line, .glance-person { display: flex; align-items: center; gap: 6px 12px; padding: 8px 12px;
                               border-top: 1px solid var(--line); font-size: 0.92rem; }
.glance-line .what, .glance-person .what { flex: 0 0 11.5rem; color: var(--soft); }
.phone-only { display: none; }
.glance-line .value, .glance-person .value { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.reach { display: inline-flex; align-items: center; gap: 5px; min-height: 38px; padding: 0 12px; border-radius: 10px;
         border: 1px solid var(--line-strong); font-size: 0.86rem; white-space: nowrap; }
a.reach { color: var(--accent); }
a.reach:hover { border-color: var(--accent); }
.reach.none { border-style: dashed; color: var(--soft); }
.big-money { font-size: 1.9rem; font-weight: 750; letter-spacing: -0.02em; line-height: 1.15; margin: 8px 0 2px; }

/* (f) tags. A tag is a fact about the deal, not a status, so it is plain: none of the six status colors. */
.glance-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.tag { display: inline-block; padding: 4px 11px; border-radius: 999px; font-size: 0.8rem; font-weight: 500;
       border: 1px solid var(--line-strong); background: rgba(255, 255, 255, 0.04); color: var(--ink); }
a.tag[href]:hover { border-color: var(--accent); }

/* A day picker and a time picker, side by side */
.when-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }

@media (max-width: 560px) {
  .wide-only { display: none; }
  .phone-only { display: inline; }
  h1.deal-title { font-size: 1.1rem; }
  .glance-status { font-size: 0.84rem; margin-bottom: 8px; }
  .hero.next { padding: 12px 14px 14px; margin-top: 10px; }
  .next-title { font-size: 1.25rem; margin-top: 6px; }
  .next-when { font-size: 0.84rem; }
  .hero.next .btn { min-height: 46px; margin-top: 10px; }
  .glance h3 { margin: 12px 0 4px; }
  .glance-money { font-size: 0.82rem; padding: 7px 10px; }      /* so the money stays on one line */
  .score-line { grid-template-columns: minmax(0, 1fr) auto; }
  .score-line .what { grid-column: 1; grid-row: 1; color: var(--ink); }
  .score-line .mark { grid-column: 2; grid-row: 1; }
  .score-line .hand, .score-line .ai { grid-column: 1 / -1; }
  .glance-date { padding: 5px 10px; font-size: 0.84rem; }
  .glance-date .left { font-size: 0.78rem; }
  .glance-person { flex-wrap: wrap; }
  .glance-line .what { flex-basis: 8.5rem; }
  .glance-person .what { flex: 1 1 100%; }
}

/* ---------- "Based on the contract" and its switches ---------- */
.when { margin: 6px 0 0; }
.facts-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px 28px; margin-top: 14px; }
.facts-two h3 { color: var(--soft); font-size: 0.82rem; font-weight: 600; margin-bottom: 4px; }
.fact-list { list-style: none; margin: 0; padding: 0; }
.fact-list li { display: flex; align-items: center; gap: 12px; padding: 9px 0; margin: 0; border-top: 1px solid var(--line); min-height: 46px; }
.fact-list li:first-child { border-top: 0; }
.fact-words { flex: 1; font-weight: 500; }
.fact-list form { margin: 0; }
/* A switch is not a status, so it uses the brand accent, never one of the six status colors. */
.switch { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px 0 4px; border-radius: 999px;
          border: 1px solid var(--line-strong); background: rgba(255, 255, 255, 0.05); color: var(--soft);
          font: 600 0.8rem var(--font); cursor: pointer; }
.switch .knob { width: 26px; height: 26px; border-radius: 50%; background: var(--gray); }
.switch.on { border-color: color-mix(in srgb, var(--accent) 60%, transparent); color: var(--ink);
             background: color-mix(in srgb, var(--accent) 14%, transparent); flex-direction: row-reverse; padding: 0 4px 0 12px; }
.switch.on .knob { background: var(--accent); }
.switch:hover { border-color: var(--accent); }

/* ---------- deal page ---------- */
.back { display: inline-block; margin-bottom: 12px; color: var(--soft); text-decoration: none; font-weight: 500; font-size: 0.9rem; }
.back::before { content: "\2039\00a0"; }
.back:hover { color: var(--accent); }
.tabs { display: flex; gap: 2px; overflow-x: auto; margin: 28px 0 16px; border-bottom: 1px solid var(--line); }
.tabs a { padding: 10px 14px; text-decoration: none; font-weight: 550; font-size: 0.93rem; color: var(--soft);
          white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a:hover { color: var(--ink); }
.tabs a.on { color: var(--ink); border-bottom-color: var(--accent); }
.phase { background: var(--card); border: 1px solid var(--line); border-radius: 16px; margin-top: 10px; overflow: hidden; }
.phase > summary { display: flex; align-items: center; gap: 12px; padding: 13px 16px; cursor: pointer; list-style: none; }
.phase > summary:hover { background: var(--card-hover); }
.phase > summary::-webkit-details-marker { display: none; }
.phase > summary h3 { flex: 1; }
.phase > summary .tally { font-size: 0.82rem; color: var(--soft); white-space: nowrap; }
.phase[open] > summary { border-bottom: 1px solid var(--line); }
.dot { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex: none; }
.dot.green  { background: var(--green-tint);  color: var(--green); }
.dot.blue   { background: var(--blue-tint);   color: var(--blue); }
.dot.yellow { background: var(--yellow-tint); color: var(--yellow); }
.dot.red    { background: var(--red-tint);    color: var(--red); }
.dot.purple { background: var(--purple-tint); color: var(--purple); }
.dot.gray   { background: var(--gray-tint);   color: var(--gray-text); }
.dropbox { display: flex; align-items: center; gap: 14px; border: 1px dashed var(--line-strong); border-radius: 16px;
           padding: 16px; text-decoration: none; background: rgba(255, 255, 255, 0.025); margin-top: 14px; }
a.dropbox:hover { border-color: var(--accent); }

/* ---------- new deal ---------- */
.stepper { display: flex; gap: 6px; margin: 0 0 22px; padding: 0; list-style: none; counter-reset: s; }
.stepper li { flex: 1; text-align: center; font-size: 0.78rem; color: var(--soft); padding-top: 9px;
              border-top: 3px solid var(--line-strong); border-radius: 2px; counter-increment: s; }
.stepper li::before { content: counter(s) ". "; }
.stepper li.on { border-top-color: var(--accent); color: var(--ink); font-weight: 600; }
.stepper li.past { border-top-color: var(--green); }

/* ---------- the practice coach ---------- */
.coach { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
         border-top: 1px solid color-mix(in srgb, var(--accent) 55%, transparent);
         background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 16%, var(--navy)), color-mix(in srgb, var(--royal) 60%, var(--navy)));
         box-shadow: 0 -18px 44px -10px rgba(0, 0, 0, 0.65); }
body.coached { padding-bottom: 170px; }     /* room so the coach never covers the last thing on a page */
.coach > div { max-width: 800px; margin: 0 auto; padding: 12px 18px 14px; display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.coach .say { flex: 1 1 280px; font-size: 0.9rem; line-height: 1.45; }
.coach .say b { color: #fff; font-weight: 650; }
.coach .where { display: block; font-size: 0.74rem; font-weight: 600; color: var(--accent); margin-bottom: 3px; letter-spacing: 0.01em; }
.coach form { margin: 0; }
.coach a, .coach button { font: 550 0.86rem var(--font); color: var(--ink); background: none; border: 0;
                          text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 4px 0; }
.coach button.go { background: var(--accent); color: var(--navy); text-decoration: none; padding: 9px 16px;
                   border-radius: 10px; font-weight: 650; font-size: 0.92rem; }
.coach-target { box-shadow: 0 0 0 2px var(--navy), 0 0 0 4px var(--accent), 0 0 26px 4px color-mix(in srgb, var(--accent) 55%, transparent) !important;
                border-radius: 12px; animation: nudge 1.8s ease-in-out 3; }
@keyframes nudge { 50% { box-shadow: 0 0 0 2px var(--navy), 0 0 0 4px var(--accent), 0 0 40px 10px color-mix(in srgb, var(--accent) 35%, transparent); } }
@media (prefers-reduced-motion: reduce) { .coach-target { animation: none; } .btn, a.row, a.card { transition: none; } }

/* ---------- phone ---------- */
@media (max-width: 560px) {
  body { font-size: 15px; }
  h1 { font-size: 1.38rem; }
  main { padding-top: 12px; }
  .back { margin-bottom: 6px; }
  .btn { width: 100%; }
  .btn.quiet { width: auto; flex: 1 1 auto; }
  .path-names { display: none; }
  .row { flex-wrap: wrap; row-gap: 6px; }
  .row .body { flex: 1 1 0; }
  .row .chev { display: none; }
  .row .side { text-align: left; flex: 1 1 100%; padding-left: 48px; }
  .row.plain .side { padding-left: 0; }
  .tabs { flex-wrap: wrap; overflow: visible; border-bottom: 0; row-gap: 2px; }
  .tabs a { padding: 8px 10px; margin-bottom: 0; }
  .top .nav { padding: 7px 8px; }
  .stepper li { font-size: 0.7rem; }
  .hero { padding: 18px; }
  body.coached { padding-bottom: 230px; }
  .coach .say { font-size: 0.86rem; }
}
