/* The three subjects as a conversation (2026-11-30). The helper says one line, shows a picture, and offers what to say
 * next; the message box (assistant.css) stays at the foot. A cool paper ground with white panels on it; state is a
 * filled colour field with a mark and words. Loaded after app.css, so it wins where the two disagree. */
/* --ground, --panel, --lift and --r-xl now live in tokens.css (glass layer, 2026-12-04). */

body { background: var(--ground); }
.rail, .topbar { background: var(--ground); }
::selection { background: color-mix(in srgb, var(--blue) 26%, transparent); }
.nav a[aria-current="page"] { background: var(--panel); box-shadow: var(--lift); }
.nav-i { display: inline-flex; align-items: center; gap: 10px; }

/* Every page leaves room for the message box. */
.page { padding-bottom: 9rem; }
.page.thread { gap: var(--s-5); padding-top: 3rem; }
.page.thread > * { width: 100%; max-width: 58rem; margin-inline: auto; }

/* ---- the helper's line ---- */
.thread .chdr, .thread .dhead { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s-1) var(--s-3); align-items: start; justify-content: start; }
.thread .chdr > .ast-mark, .thread .dhead > .ast-mark { grid-row: 1 / span 2; margin-top: 2px; }
.thread .big { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); font-weight: 600; letter-spacing: -0.02em; line-height: 1.25; text-wrap: balance; }
.thread .sub, .thread .dhead .stat { font-size: var(--t-sm); color: var(--grey); }

/* ---- what you can say next ---- */
.replies { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.reply { display: inline-flex; align-items: center; min-height: 40px; padding: 0 var(--s-4); border: 1px solid var(--inb); border-radius: 999px; background: var(--panel); color: var(--ink); font: inherit; font-size: var(--t-sm); text-decoration: none; cursor: pointer; transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease); overflow-wrap: anywhere; text-align: left; }
.reply:active { transform: scale(0.97); }
.reply:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
@media (hover: hover) { .reply:hover { border-color: var(--ink); text-decoration: none; } }

/* ---- Risk: how everyone stands, as one bar ---- */
.statebar { display: flex; gap: 6px; align-items: flex-start; }
.sb { flex: 1 1 0; min-width: 4.25rem; display: grid; gap: 6px; }
.sb-fill { height: 14px; border-radius: 7px; }
.sb-stop .sb-fill { background: var(--stop-dot); } .sb-watch .sb-fill { background: var(--watch-dot); } .sb-fine .sb-fill { background: var(--fine-dot); }
.sb-none .sb-fill { background: color-mix(in srgb, var(--grey) 35%, transparent); }
.sb-n { font-size: 1.75rem; font-weight: 600; line-height: 1; letter-spacing: -0.02em; margin-top: 4px; }
.sb-l { font-size: var(--t-sm); color: var(--grey); }

/* ---- Risk: one coloured tile a company that needs a look ---- */
.thread .tiles { list-style: none; margin-block: 0; padding: 0; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: var(--s-3); }
.thread .tile { min-height: 11rem; padding: var(--s-4); border-radius: var(--r-xl); gap: var(--s-3); }
.tile-main { display: grid; gap: 3px; align-content: start; color: inherit; text-decoration: none; }
.tile-main:hover { text-decoration: none; }
.tile-main:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; border-radius: 6px; }
.thread .tile .st { margin-bottom: var(--s-1); }
.thread .tile .n { font-weight: 600; }
.thread .tile .c { color: color-mix(in srgb, var(--ink) 62%, transparent); }
.src { display: inline-flex; align-items: center; gap: 4px; width: fit-content; margin-top: auto; padding: 4px 10px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 9%, transparent); color: var(--ink); font-size: var(--t-xs); text-decoration: none; }
@media (hover: hover) { a.src:hover { background: color-mix(in srgb, var(--ink) 16%, transparent); text-decoration: none; } }
.thread .cextra { max-width: 58rem; }

/* ---- Outreach: the work as five counts ---- */
.flow { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.flow-s { display: grid; gap: 4px; padding: var(--s-3) var(--s-4); background: var(--panel); border-radius: var(--r-xl); box-shadow: var(--lift); min-width: 0; }
.flow-n { font-size: 1.75rem; font-weight: 600; line-height: 1.1; letter-spacing: -0.02em; }
.flow-l { font-size: var(--t-sm); color: var(--grey); }
.flow-s.is-zero .flow-n { color: color-mix(in srgb, var(--grey) 70%, transparent); }
.flow-s.is-now { background: var(--btn); color: var(--on-btn); }
.flow-s.is-now .flow-l { color: color-mix(in srgb, var(--on-btn) 82%, transparent); }
.news { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-1) var(--s-2); }

/* ---- Outreach: one card an email that waits for a yes ---- */
.mcards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: var(--s-3); }
.mcard { display: grid; gap: var(--s-3); align-content: start; padding: var(--s-4); background: var(--panel); border-radius: var(--r-xl); box-shadow: var(--lift); min-width: 0; }
.mcard:has(details[open]) { grid-column: 1 / -1; }
.mcard-top { display: grid; gap: 2px; }
.mcard .n { font-size: var(--t-lg); font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.mcard .c, .mcard .why { font-size: var(--t-sm); color: var(--grey); }
.mtags { display: flex; flex-wrap: wrap; gap: 6px; }
.mtag { padding: 3px 10px; border-radius: 999px; background: color-mix(in srgb, var(--blue) 11%, var(--panel)); color: var(--ink); font-size: var(--t-xs); white-space: nowrap; }
.mcard-mail > summary { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--s-2); align-items: start; padding: var(--s-2) var(--s-3); border-radius: var(--r-md); background: var(--soft); font-size: var(--t-sm); line-height: 1.45; cursor: pointer; list-style: none; }
.mcard-mail > summary::-webkit-details-marker { display: none; }
.mcard-mail > summary::marker { content: ""; }
.mcard-mail > summary::before { content: none; }
.mcard-mail > summary { color: var(--ink); font-weight: 400; min-height: 0; }
.mcard-mail > summary > svg { margin-top: 2px; color: var(--grey); flex: none; }
.mcard-mail > summary > svg:last-child { transition: rotate var(--dur) var(--ease); }
.mcard-mail[open] > summary > svg:last-child { rotate: 90deg; }
.mcard-mail .subj { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.mcard-mail[open] .subj { -webkit-line-clamp: unset; }
.mcard-mail > summary:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.mcard .letter { display: grid; gap: var(--s-2); margin-top: var(--s-3); padding: var(--s-4); background: var(--soft); border-radius: var(--r-md); white-space: pre-wrap; overflow-wrap: anywhere; font-size: var(--t-sm); line-height: 1.6; }
.mcard .letter b { font-weight: 600; }
.mcard-btns { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-2); margin-top: auto; }
.mcard:has(details[open]) .mcard-btns { max-width: 22rem; }

/* ---- Stock: panels, and a bar for every count ---- */
.thread > .sheet { padding: var(--s-4) var(--s-5) var(--s-2); background: var(--panel); border-radius: var(--r-xl); box-shadow: var(--lift); }
.thread > .sheet .list { border-bottom: 0; }
.thread > .sheet > .small { padding-bottom: var(--s-2); }
.stk-bar { grid-column: 1; height: 8px; border-radius: 4px; background: var(--soft); overflow: hidden; }
.stk-bar > span { display: block; height: 100%; border-radius: 4px; background: var(--fine-dot); transition: width 600ms var(--ease); }
.stk-bar-some > span { background: var(--watch-dot); }
.thread .stk-res { font-size: var(--t-md); }
.thread .stk-n { font-size: var(--t-lg); }

@media (max-width: 899.98px) {
  .page { padding-bottom: 11.5rem; }
  .page.thread { padding-top: 5rem; }
  .flow { gap: 4px; }
  .flow-s { padding: var(--s-2); justify-items: center; text-align: center; }
  .flow-n { font-size: 1.375rem; }
  .flow-l { font-size: var(--t-xs); }
  .sb-n { font-size: 1.5rem; }
  .thread > .sheet { padding-inline: var(--s-4); }
}
@media (prefers-reduced-motion: reduce) { .stk-bar > span, .reply, .ast-send { transition: none; } }
