/* The launcher in Appshell paint (build item: launcher-appshell; D1 A dark only, D8 A three rings + Inter).
   Tokens are People's Appshell :root, character for character. No inline style, no outside font (the CSP forbids it: Inter is
   used when the machine has it, the system stack otherwise), no script-driven layout. Shared components for the screen files
   under screens/ live here: .card .dashed .btn .ghost .optcard .opts .payoff .q .qs .prof .paste .addr .checks .link2 .result
   .stamp .newtag .big .small .line .fprog .sr — the Appshell names, so a screen needs no stylesheet of its own. */
:root {
  --bg: #121212; --surface: #1a1a1a; --surface-hover: #222222; --surface-elevated: #262626; --line: #2d2d2d;
  --ink: #e5e5e5; --muted: #a0a0a0; --muted-2: #8c8c8c;
  --accent: #5e6ad2; --accent-hover: #6b77db; --accent-light: rgba(94, 106, 210, .15); --accent-ink: #c7cbff; --on-accent: #ffffff;
  --success: #10b981; --success-bg: rgba(16, 185, 129, .15); --warning: #f59e0b; --warning-bg: rgba(245, 158, 11, .12);
  --danger: #ef4444; --danger-bg: rgba(239, 68, 68, .1); --danger-ink: #f87171; --blue: #60a5fa;
  --card-hover: #1f1f1f; --line-hover: #3a3a3a; --line-strong: #3d3d3d; --skeleton: #232323;
  --mono: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 400 15px/1.45 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif; }
body { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }

/* the band: the Mark (three rings in ink), the word, the tagline */
.band { display: flex; align-items: center; gap: 10px; min-height: 73px; padding: 18px 20px; border-bottom: 1px solid var(--line); color: var(--ink); }
.band .mark { width: 36px; height: 36px; flex: none; color: var(--ink); }
.band .brand { display: flex; flex-direction: column; min-width: 0; }
.band .word { font-size: 26px; font-weight: 700; letter-spacing: -.01em; line-height: 1; }
.band .tag { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; padding-left: 2px; }

/* the setup trail */
.trail { border-bottom: 1px solid var(--line); padding: 16px 20px 12px; }
.crumbs { list-style: none; margin: 0 auto; padding: 0; display: flex; max-width: 760px; overflow-x: auto; scrollbar-width: none; }
.crumbs::-webkit-scrollbar { display: none; }
.crumb { position: relative; flex: 1 0 128px; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 0 4px; min-width: 0; }
.crumb::before { content: ""; position: absolute; top: 7px; left: -50%; width: 100%; height: 2px; background: var(--line); }
.crumb:first-child::before { display: none; }
.crumb.done::before, .crumb.now::before { background: var(--accent); }
.crumb .dot-mark { position: relative; z-index: 1; width: 16px; height: 16px; border-radius: 50%; background: var(--bg); border: 2px solid var(--line-strong); }
.crumb.done .dot-mark { background: var(--accent); border-color: var(--accent); }
.crumb.now .dot-mark { border-color: var(--accent); box-shadow: inset 0 0 0 3px var(--bg), inset 0 0 0 8px var(--accent); }
.crumb .label { margin-top: 8px; font-size: 12.5px; color: var(--muted); }
.crumb.done .label { color: var(--ink); }
.crumb.now .label { color: var(--ink); font-weight: 600; }
.crumb .caption { margin-top: 2px; font-size: 11.5px; color: var(--accent-ink); }
.attn { margin: 10px 0 0; text-align: center; font-size: 12.5px; color: var(--warning); }
.attn:empty { display: none; }
.muse-status { margin: 0; padding: 12px 20px; text-align: center; color: var(--muted); font-size: 13px; border-bottom: 1px solid var(--line); }
.muse-line { margin: 0; display: flex; gap: 8px; align-items: center; justify-content: center; min-width: 0; }
.muse-line #muse-text { min-width: 0; overflow-wrap: anywhere; }
.muse-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--muted-2); }
.muse-dot.quiet { background: var(--success); }
.muse-dot.working { background: var(--accent); }
.muse-dot.backed_up { background: var(--warning); }
.muse-dot.stopped { background: var(--danger); }
.muse-rows { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 2px; font-size: 12.5px; color: var(--warning); }
.muse-rows:empty { display: none; }
.muse-rows b { font-weight: 600; margin-right: 4px; }
.muse-rows b::after { content: " \2014"; }

/* the page: one screen on the left, the Updates column on the right */
.page { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) 300px; width: 100%; min-width: 0; }
.stage { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px; padding: 28px 24px; min-width: 0; }
.stage:empty { justify-content: flex-start; }
.status { max-width: 36em; text-align: center; color: var(--ink); }
.status p { margin: 0; }
.line { max-width: 36em; text-align: center; margin: 0; color: var(--muted); font-size: 14px; }
.big { font-size: 24px; font-weight: 600; line-height: 1.25; margin: 0 0 6px; text-align: center; text-wrap: balance; }
.small { font-size: 13px; color: var(--muted); text-align: center; margin: 0; }

/* the app grid: a tile is the Open affordance; Install and its note sit under it */
.tiles { display: flex; gap: 28px; justify-content: center; flex-wrap: wrap; }
.app { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 148px; min-width: 0; }
.tile { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 140px; padding: 6px; text-decoration: none; color: var(--ink); border-radius: 12px; border: 1px solid transparent; }
.tile[href]:hover { background: var(--surface-hover); }
.tile .art { width: 128px; height: 128px; display: block; }
.tile .name { font-weight: 600; font-size: 15px; }
.tile .open { font-size: 12px; color: var(--accent-ink); }
.tile[aria-disabled="true"] { opacity: .55; cursor: default; }
.tile[aria-disabled="true"] .open { visibility: hidden; }
.app .note { font-size: 12px; color: var(--muted); min-height: 1em; text-align: center; }

/* cards, buttons, options — the components the screen files build with */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; max-width: 520px; width: 100%; min-width: 0; }
.card h3 { margin: 0 0 6px; font-size: 18px; font-weight: 500; }
.card p { margin: 0 0 10px; color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
.card p:last-child { margin-bottom: 0; }
.card .acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.card.dashed { border-style: dashed; }
.card .art { width: 64px; height: 64px; display: block; }
.btn { font: inherit; font-size: 15px; font-weight: 600; color: var(--on-accent); background: var(--accent); border: 1px solid var(--accent); border-radius: 8px; padding: 9px 18px; min-height: 44px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.btn:hover { background: var(--accent-hover); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .6; cursor: not-allowed; }
.ghost { font: inherit; font-size: 13px; color: var(--muted); background: transparent; border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px; min-height: 40px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; }
.ghost:hover { color: var(--ink); background: var(--surface-hover); }
.ghost[disabled] { color: var(--muted-2); cursor: not-allowed; }
.opts { display: grid; gap: 10px; max-width: 560px; width: 100%; }
.optcard { display: flex; gap: 14px; align-items: flex-start; width: 100%; text-align: left; font: inherit; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; color: var(--ink); cursor: pointer; }
.optcard:hover { background: var(--surface-hover); }
.optcard[aria-pressed="true"] { border-color: var(--accent); }
.optcard .radio { flex: none; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line-strong); margin-top: 2px; }
.optcard[aria-pressed="true"] .radio { border-color: var(--accent); box-shadow: inset 0 0 0 4px var(--bg), inset 0 0 0 9px var(--accent); }
.optcard b { display: block; font-size: 16px; font-weight: 600; }
.optcard span { display: block; color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.payoff { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; max-width: 640px; width: 100%; }
.payoff .p { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px; text-align: center; font-size: 13px; min-width: 0; }
.payoff .p .art { width: 48px; height: 48px; margin: 0 auto 8px; display: block; }
.payoff .p b { display: block; font-size: 14px; margin-bottom: 2px; }
.payoff .p span { color: var(--muted); }
.link2 { display: flex; align-items: center; gap: 14px; justify-content: center; max-width: 420px; width: 100%; }
.link2 .mark { width: 40px; height: 40px; flex: none; color: var(--ink); }
.link2 .fprog { flex: 1; }
.link2 .agent { flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); display: grid; place-items: center; font-size: 11px; color: var(--muted); text-align: center; line-height: 1.1; }
.fprog { height: 2px; background: var(--line); position: relative; overflow: hidden; border-radius: 2px; }
.fprog::after { content: ""; position: absolute; inset: 0; width: 40%; background: var(--accent); animation: sweep 1s linear infinite; }
@keyframes sweep { from { transform: translateX(-100%); } to { transform: translateX(260%); } }
.paste { font: 13px/1.55 var(--mono); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; color: var(--ink); }
.addr { font: 13px/1.6 var(--mono); color: var(--ink); overflow-wrap: anywhere; }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.checks li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.checks input { margin-top: 3px; accent-color: var(--accent); }
.result { background: var(--success-bg); border: 1px solid rgba(16, 185, 129, .35); border-radius: 10px; padding: 10px 14px; font-size: 14px; color: var(--ink); margin-top: 12px; }
.result.warn { background: var(--warning-bg); border-color: rgba(245, 158, 11, .35); }
.broken { color: var(--danger-ink); font-size: 14px; }
.stamp { display: inline-block; font-size: 13px; color: var(--muted); border-radius: 6px; padding: 1px 6px; }
.stamp.moved { animation: moved 1.6s ease-out; }
@keyframes moved { 0% { background: var(--accent-light); } 100% { background: transparent; } }
.newtag { font-size: 11px; font-weight: 600; letter-spacing: .06em; border-radius: 4px; padding: 2px 6px; background: var(--accent-light); color: #dfe1ff; }
.src { display: inline-block; font-size: 12px; border-radius: 5px; padding: 1px 7px; background: var(--surface-elevated); color: var(--muted); }

/* questions (two columns at width, one below) and the live profile card */
.qs { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 20px; width: 100%; max-width: 960px; align-items: start; }
.qlist { display: grid; gap: 8px; min-width: 0; }
.q { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; min-width: 0; }
.q .why { font-size: 12.5px; color: var(--muted); margin: 2px 0 8px; }
.q label { display: block; font-size: 14px; font-weight: 500; margin: 0 0 2px; }
.q input[type=text], .q input[type=url], .q select, .q textarea { font: inherit; font-size: 14px; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; width: 100%; min-height: 40px; }
.q .row { display: flex; gap: 8px; flex-wrap: wrap; }
.q .row > * { flex: 1 1 120px; min-width: 0; }
.q .days { display: flex; gap: 4px; flex-wrap: wrap; }
.q .days button { font: inherit; font-size: 12px; min-width: 38px; min-height: 30px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); cursor: pointer; }
.q .days button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-light); color: var(--accent-ink); }
.prof { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 20px; position: sticky; top: 12px; min-width: 0; }
.prof .who { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.prof .av { width: 56px; height: 56px; border-radius: 50%; background: var(--bg); border: 1px solid var(--line); display: grid; place-items: center; font-weight: 600; color: var(--muted); font-size: 18px; flex: none; }
.prof .who b { font-size: 20px; font-weight: 600; display: block; }
.prof .who span { color: var(--muted); font-size: 13px; }
.prof table { width: 100%; border-collapse: collapse; font-size: 14px; }
.prof td { padding: 7px 4px; border-top: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; }
.prof td.k { color: var(--muted); white-space: nowrap; width: 38%; }
.prof td.v.absent { color: var(--muted-2); }
.prof .src { margin-left: 6px; font-size: 11px; }

/* the Updates column */
.feed { border-left: 1px solid var(--line); padding: 22px 18px; display: flex; flex-direction: column; overflow-y: auto; max-height: calc(100vh - 73px); min-width: 0; }
.feed-head { display: flex; align-items: baseline; justify-content: space-between; margin: 0 0 12px; }
.feed h2 { margin: 0; font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: .08em; }
.feed .newest { display: none; font-size: 12px; color: var(--accent-ink); text-decoration: none; }
.feed .empty { margin: 0; font-size: 14px; color: var(--muted); }
.posts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.post { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.post.unread { border-color: rgba(94, 106, 210, .6); }
.post-open { all: unset; display: block; width: 100%; min-height: 44px; cursor: pointer; }
.post-open:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 8px; }
.post-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.post-title { color: var(--ink); font-size: 14px; font-weight: 600; }
.post-when { color: var(--muted); font-size: 11.5px; white-space: nowrap; }
.post-summary { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin-right: 6px; vertical-align: middle; }
.new-rule { display: flex; align-items: center; gap: 8px; color: var(--accent-ink); font-size: 11px; font-weight: 600; }
.new-rule::after { content: ""; flex: 1; height: 1px; background: var(--accent); opacity: .5; }
.post-body { margin-top: 10px; color: var(--ink); font-size: 14px; line-height: 1.55; overflow-wrap: anywhere; }
.post-body h2, .post-body h3, .post-body h4 { color: var(--ink); margin: 12px 0 4px; font-size: 15px; }
.post-body p { margin: 0 0 8px; }
.post-body a { color: var(--blue); }
.post-body code { background: var(--bg); padding: 1px 4px; border-radius: 4px; font-size: 12.5px; font-family: var(--mono); }
.post-body pre { background: var(--bg); padding: 8px 10px; border-radius: 6px; overflow-x: auto; }
.feed-note { margin: 10px 0 0; font-size: 12px; color: var(--muted); }

@media (max-width: 1099px) { .qs { grid-template-columns: minmax(0, 1fr); } .prof { position: static; } }
@media (max-width: 760px) {
  .band { padding: 12px 16px; min-height: 0; }
  .trail { padding: 14px 16px 10px; }
  /* the whole trail fits the screen (#250): four steps share the width, a label or caption wraps at its spaces, nothing scrolls sideways */
  .crumbs { overflow-x: visible; }
  .crumb { flex: 1 1 0; padding: 0 2px; }
  .crumb .label, .crumb .caption { max-width: 100%; overflow-wrap: break-word; }
  .page { grid-template-columns: minmax(0, 1fr); }
  .stage { padding: 24px 16px; }
  .tiles { gap: 16px; }
  .app { width: 120px; }
  .tile { width: 112px; }
  .tile .art { width: 96px; height: 96px; }
  .payoff { grid-template-columns: minmax(0, 1fr); }
  .feed { border-left: 0; border-top: 1px solid var(--line); padding: 20px 16px; max-height: none; }
  .feed .newest { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; }
}
/* 44px targets for a thumb (#251): the questions' fields, the weekday buttons, the hand-off's paste button and its checkbox rows */
@media (max-width: 760px), (pointer: coarse) {
  .ghost { min-height: 44px; }
  .q input[type=text], .q input[type=url], .q select, .q textarea { min-height: 44px; }
  .q .days button { min-width: 44px; min-height: 44px; }
  .checks li { align-items: center; min-height: 44px; }
  .checks li label { display: flex; align-items: center; flex: 1; min-height: 44px; }
  .checks input { margin-top: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .fprog::after { animation: none; width: 100%; opacity: .5; }
  .stamp.moved { animation: none; }
}

/* the privacy panel (UX audit C2): a quiet footer on every screen, and the hand-off's card */
.privacy-foot { padding: 14px 20px 28px; text-align: center; }
.privacy-foot summary { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; color: var(--muted); font-size: 13px; cursor: pointer; }
.privacy-foot summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.privacy-foot ul, .privacy-card ul { max-width: 36em; margin: 8px auto 0; padding: 0; list-style: none; text-align: left; color: var(--muted); font-size: 14px; }
.privacy-foot li, .privacy-card li { margin: 0 0 8px; }

.agent-list { list-style: none; margin: 8px 0 12px; padding: 0; color: var(--muted); font-size: 14px; }
.agent-list li { margin: 0 0 6px; }
.agent-list b { color: var(--ink); }
.agent-need { font-size: 17px; margin: 4px 0 8px; }

.needed-list { list-style: none; margin: 4px 0 0; padding: 0; color: var(--muted); font-size: 14px; }
.needed-list li { margin: 0 0 4px; }
.needed-list li[data-now="1"] { color: var(--ink); }
/* during setup the three payoff cards are one line on a narrow screen (UX audit M10): the names stay, the pictures and sentences wait */
@media (max-width: 600px) {
  .payoff { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 16px; }
  .payoff .p { display: inline-flex; width: auto; padding: 0; border: 0; background: none; }
  .payoff .p .art, .payoff .p span { display: none; }
}
.agent-list li.soon { opacity: .75; }
