/* Line: lives inside the site layout (base.html), uses the site's tokens from style.css. */
#line {
  --panel: var(--surface);
  --panel-2: var(--surface-2);
  --line: var(--border);
  --line-strong: var(--border-strong);
  --muted: var(--text-dim);
  --faint: var(--text-faint);
  --field: var(--code-bg);
  /* What each kind of event looks like. */
  --k-message: #7fb6e8;
  --k-done: var(--ok);
  --k-alert: var(--err);
  --k-approval: var(--put);
  --k-warn: var(--accent);
  --k-quiet: var(--text-faint);
  font-family: var(--font-primary);
}
#line [hidden] { display: none !important; }
#line h1, #line h2, #line p { margin: 0; }
#line h2 { font-family: var(--font-primary); font-stretch: normal; font-weight: 700; font-size: 1.05rem; margin: 0 0 .8rem; letter-spacing: 0; }
#line .muted { color: var(--muted); }
#line .small { font-size: .86rem; }
#line .spaced { margin-top: .75rem; }

/* Controls */
#line input, #line select, #line textarea, #line button, #line .button { font: inherit; color: inherit; }
#line input, #line select, #line textarea {
  margin-top: .25rem; width: 100%; padding: .5rem .65rem; background: var(--field);
  border: 1px solid var(--line-strong); border-radius: var(--radius); color: var(--text);
}
#line input:focus, #line select:focus, #line textarea:focus { outline: none; border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-dim); }
#line button, #line .button {
  display: inline-flex; align-items: center; justify-content: center; gap: .35rem; cursor: pointer;
  background: var(--surface-3); border: 1px solid var(--line-strong); border-radius: var(--radius);
  text-decoration: none; padding: .48rem .8rem; white-space: nowrap; color: var(--text); background-image: none;
  transition: border-color .15s var(--ease), background-color .15s var(--ease);
}
#line button:hover, #line .button:hover { border-color: var(--accent-line); color: var(--text); }
#line button:disabled { cursor: wait; opacity: .6; }
#line :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
#line .primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 700; }
#line .primary:hover { background: var(--accent-hi); color: var(--accent-ink); }
#line .quiet { background: transparent; }
#line .danger { color: #ffb4a8; border-color: rgba(239, 107, 91, .45); }
#line .danger:hover { background: var(--del-dim); border-color: var(--err); }
#line .form-row, #line .buttons { display: flex; align-items: end; gap: .6rem; flex-wrap: wrap; }
#line .buttons { margin-top: .75rem; }
#line .buttons.center { justify-content: center; }
#line .form-row label, #line .secret-row input { flex: 1 1 12rem; min-width: 0; }
#line form label { display: block; font-size: .88rem; color: var(--muted); }
#line label.check { display: flex; gap: .55rem; align-items: flex-start; font-size: .88rem; color: var(--muted); }
#line label.check input { width: auto; margin: .2rem 0 0; accent-color: var(--accent); }
#line pre { padding: .8rem; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: auto; background: var(--code-bg); margin: 0; font-size: .82rem; }
#line code { font-family: var(--font-mono); }

/* Layout */
#line .heading { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem 2rem; margin-bottom: 1.25rem; }
#line .signin { max-width: 24rem; display: grid; gap: .4rem; justify-items: start; }
#line .back { display: inline-block; margin-bottom: .4rem; font-size: .88rem; color: var(--muted); text-decoration: none; }
#line .back:hover { color: var(--accent); }
#line .line-title { font-family: var(--font-display); font-stretch: 75%; font-weight: 800; font-size: clamp(2rem, 5vw, 2.8rem); line-height: 1.05; overflow-wrap: anywhere; }
#line .app-title { font-family: var(--font-display); font-stretch: 75%; font-weight: 800; font-size: 1.7rem; margin: 0; }
#line .meta-line { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .6rem; }
#line .panel { padding: 1.15rem; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--panel); min-width: 0; }
#line .layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(15rem, 20rem); gap: 1rem; align-items: start; }
#line .settings-pane { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
#line .stack { display: grid; gap: 1rem; min-width: 0; align-content: start; }
#line .notice { margin-bottom: 1rem; padding: .7rem 1rem; border: 1px solid var(--accent-line); border-radius: var(--radius); background: var(--accent-dim); }
#line .notice.error { border-color: rgba(239, 107, 91, .5); background: var(--del-dim); color: #ffd3c6; }
#line .secret { margin-bottom: 1rem; border-color: var(--accent-line); }
#line img#qr { display: block; margin-top: 1rem; background: white; border-radius: var(--radius); }

/* Rows in Settings */
#line .rows { list-style: none; padding: 0; margin: .5rem 0 0; }
#line .rows li { display: flex; justify-content: space-between; gap: .6rem; align-items: center; padding: .65rem 0; overflow-wrap: anywhere; }
#line .rows li + li { border-top: 1px solid var(--line); }
#line .rows button { padding: .25rem .55rem; font-size: .82rem; }

/* Chips and pills */
#line .pill { display: inline-flex; align-items: center; gap: .3rem; padding: .12rem .5rem; border-radius: 99px; font-size: .74rem;
  line-height: 1.5; border: 1px solid var(--line-strong); color: var(--muted); background: var(--panel-2); white-space: nowrap; }
#line .pill.mono { font-family: var(--font-mono); font-size: .7rem; }
#line .pill.ok { color: var(--k-done); border-color: rgba(143, 207, 122, .35); background: rgba(143, 207, 122, .08); }
#line .pill.bad { color: #ffb4a8; border-color: rgba(239, 107, 91, .4); background: var(--del-dim); }
#line .pill.warn { color: var(--accent-hi); border-color: var(--accent-line); background: var(--accent-dim); }
#line .pill.violet { color: #cdbaff; border-color: rgba(181, 156, 240, .4); background: var(--put-dim); }

/* Tabs */
#line .tabs { display: flex; gap: .25rem; margin-bottom: 1rem; border-bottom: 1px solid var(--line); overflow-x: auto; }
#line .tabs button { border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: none; padding: .6rem .9rem; color: var(--muted); font-weight: 600; }
#line .tabs button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent); }
#line .tabs button:hover { color: var(--text); }

/* Inbox */
#line .pane-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .6rem; }
#line .pane-head h2 { margin: 0; }
#line .count { color: var(--faint); font-weight: 500; font-size: .9rem; margin-left: .3rem; }
#line .toolbar { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: .5rem; margin-top: .9rem; }
#line .toolbar input, #line .toolbar select { margin: 0; }
#line .chips { display: flex; flex-wrap: wrap; gap: .4rem; margin: .75rem 0 .25rem; }
#line .chips button { padding: .28rem .7rem; border-radius: 99px; font-size: .82rem; background: transparent; color: var(--muted); }
#line .chips button span { color: var(--faint); font-size: .76rem; }
#line .chips button span:empty { display: none; }
#line .chips button[aria-pressed="true"] { background: var(--accent-dim); border-color: var(--accent-line); color: var(--accent-hi); }
#line .chips button[aria-pressed="true"] span { color: var(--accent); }
#line .chips button.has-waiting span { color: #cdbaff; }

#line .day { position: sticky; top: calc(var(--nav-h) - 2px); z-index: 1; margin: 1rem -1.15rem 0; padding: .4rem 1.15rem;
  font: 600 .72rem/1.4 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--faint);
  background: linear-gradient(var(--panel) 70%, transparent); }
#line .events { list-style: none; padding: 0; margin: .2rem 0 0; display: grid; gap: .5rem; }

#line .event { --kind: var(--k-message); position: relative; display: grid; grid-template-columns: 2.1rem minmax(0, 1fr); gap: .75rem;
  padding: .8rem .9rem .8rem .8rem; border: 1px solid var(--line); border-left: 3px solid var(--kind); border-radius: var(--radius-lg);
  background: linear-gradient(90deg, color-mix(in srgb, var(--kind) 7%, var(--panel-2)), var(--panel-2) 40%); }
#line .event.k-done { --kind: var(--k-done); }
#line .event.k-alert { --kind: var(--k-alert); }
#line .event.k-approval { --kind: var(--k-approval); }
#line .event.k-warn { --kind: var(--k-warn); }
#line .event.k-quiet { --kind: var(--k-quiet); }
#line .event.selected { box-shadow: 0 0 0 2px var(--accent-line); }
#line .event.fresh { animation: event-in .9s var(--ease); }
@keyframes event-in { from { transform: translateY(-.4rem); box-shadow: 0 0 0 3px var(--accent-line); opacity: .3; } }
#line .icon { display: grid; place-items: center; width: 2.1rem; height: 2.1rem; border-radius: 50%; font-size: 1rem; line-height: 1;
  color: var(--kind); background: color-mix(in srgb, var(--kind) 16%, transparent); border: 1px solid color-mix(in srgb, var(--kind) 35%, transparent); }
#line .event-top { display: flex; align-items: baseline; justify-content: space-between; gap: .75rem; }
#line .event-title { font-weight: 650; overflow-wrap: anywhere; }
#line .event-time { flex: none; color: var(--faint); font-size: .8rem; }
#line .unread .event-title::before { content: ''; display: inline-block; width: .5rem; height: .5rem; margin-right: .45rem; border-radius: 50%;
  background: var(--accent); vertical-align: .1rem; }
#line .event-body { margin-top: .25rem; color: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere; font-size: .92rem;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
#line .event-body.open { display: block; }
#line .more { margin-top: .2rem; padding: 0; border: 0; background: none; color: var(--accent); font-size: .82rem; }
#line .event-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; margin-top: .5rem; }
#line .event-meta a { font-size: .82rem; color: var(--accent); }
#line .answer { margin-top: .65rem; padding: .7rem; border: 1px solid rgba(181, 156, 240, .35); border-radius: var(--radius); background: var(--put-dim); }
#line .answer p { font-size: .92rem; }
#line .answer .buttons { margin-top: .55rem; }
#line .answer .yes { background: var(--ok); border-color: var(--ok); color: #0f1a0b; font-weight: 700; }
#line .answer .no { color: #ffb4a8; }
#line .answer form label { margin-top: .5rem; }
#line .older { width: 100%; margin-top: 1rem; background: transparent; }

#line .empty { text-align: center; padding: 2.5rem 1rem; }
#line .empty-title { font-weight: 700; font-size: 1.1rem; margin-bottom: .3rem; }

/* This device */
#line .push-state { display: flex; align-items: center; gap: .5rem; font-weight: 650; margin-bottom: .35rem; }
#line .dot { width: .6rem; height: .6rem; border-radius: 50%; background: var(--faint); }
#line .push-state.on .dot { background: var(--ok); box-shadow: 0 0 0 4px rgba(143, 207, 122, .18); }
#line .push-state.off .dot { background: var(--err); }
#line .push-state.muted .dot { background: var(--accent); }
#line .legend-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .35rem; font-size: .86rem; color: var(--muted); }
#line .legend-list i { display: inline-block; width: .7rem; height: .7rem; border-radius: 3px; margin-right: .5rem; vertical-align: -.05rem; }
#line i.k-message { background: var(--k-message); }
#line i.k-done { background: var(--k-done); }
#line i.k-alert { background: var(--k-alert); }
#line i.k-approval { background: var(--k-approval); }
#line i.k-warn { background: var(--k-warn); }

/* Channel cards on /notifications */
#line .home-app { display: grid; grid-template-columns: minmax(0, 1fr) minmax(16rem, 22rem); gap: 1rem; align-items: start; margin-bottom: 1rem; }
#line .lines-panel { padding: .6rem; }
#line .line-cards { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
#line .line-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .8rem; align-items: center; padding: .85rem .9rem;
  border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--panel-2); color: var(--text); text-decoration: none; background-image: none;
  transition: border-color .15s var(--ease), transform .15s var(--ease); }
#line .line-card:hover { border-color: var(--accent-line); transform: translateY(-1px); color: var(--text); background-image: none; }
#line .avatar { display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: .7rem; font-weight: 800;
  color: var(--accent-ink); background: var(--accent); font-family: var(--font-display); font-stretch: 75%; font-size: 1.2rem; }
#line .line-name { font-weight: 700; }
#line .line-last { color: var(--muted); font-size: .86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#line .line-side { display: grid; justify-items: end; gap: .3rem; font-size: .78rem; color: var(--faint); }
#line .line-empty { padding: 1.5rem 1rem; text-align: center; color: var(--muted); }

/* Connect tab */
#line .picks { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .9rem; }
#line .picks button { padding: .65rem 1rem; }
#line .picks button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-dim); }
#line .connect .stack { margin-top: 1rem; }
#line .step-title { display: flex; align-items: center; gap: .6rem; }
#line .step-title b { display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-size: .85rem; }
#line .copy-block { position: relative; margin-top: .6rem; }
#line .copy-block button { position: absolute; top: .45rem; right: .45rem; padding: .2rem .55rem; font-size: .78rem; }
#line .copy-block pre { padding-top: 2.4rem; white-space: pre; }
#line .copy-block pre.wrap { white-space: pre-wrap; overflow-wrap: anywhere; }
#line .where { font-family: var(--font-mono); font-size: .78rem; color: var(--faint); margin-top: .7rem; }

/* Introduction on the bare /notifications page */
#line .hero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(16rem, .75fr); gap: 2.5rem; align-items: center; padding: .5rem 0 2.5rem; }
#line .kicker { color: var(--accent); font: 600 .78rem/1.4 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; margin-bottom: .9rem; }
#line .hero h1 { font-family: var(--font-display); font-stretch: 75%; font-weight: 800; font-size: clamp(2.3rem, 5.6vw, 3.8rem); line-height: 1; letter-spacing: -.01em; max-width: 15ch; }
#line .lead { margin-top: 1.1rem; font-size: 1.1rem; color: var(--muted); max-width: 38rem; }
#line .hero-actions { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: 1.6rem; }
#line .hero-actions .button { padding: .7rem 1.1rem; }
#line .hero-code { margin-top: 1.6rem; font-size: .86rem; max-width: 38rem; }
#line .hero-code .code-wrap, #line .hero-code pre { margin: 0; }

#line .phone { justify-self: center; width: min(19rem, 100%); aspect-ratio: 9 / 18.5; padding: .6rem; border-radius: 2.6rem;
  background: linear-gradient(160deg, #3a3833, #141412); box-shadow: 0 30px 80px -20px #000c, inset 0 0 0 1px #4a4740; }
#line .phone-screen { position: relative; height: 100%; border-radius: 2.1rem; overflow: hidden; padding: 2.4rem .75rem .75rem;
  background: radial-gradient(120% 80% at 20% 0%, #2f3a52 0%, #18181d 55%, #0c0c0b 100%); }
#line .phone-screen::before { content: ''; position: absolute; top: .55rem; left: 50%; width: 5.5rem; height: 1.3rem; translate: -50% 0;
  border-radius: 1rem; background: #000; }
#line .phone-time { text-align: center; font-size: 3.2rem; font-weight: 300; line-height: 1; color: #fff; }
#line .phone-date { text-align: center; font-size: .82rem; color: #dfe3ec; margin: .3rem 0 1.1rem; }
#line .lock-note { position: relative; margin-bottom: .55rem; padding: .6rem .7rem; border-radius: 1rem; background: #f3f4f7e8; color: #15161a;
  font-size: .76rem; line-height: 1.3; opacity: 0; transform: translateY(-.6rem) scale(.98); animation: toast-in .6s ease-out forwards; }
#line .lock-note b { font-size: .66rem; letter-spacing: .04em; text-transform: uppercase; color: #5a5f6b; }
#line .lock-note span { position: absolute; right: .7rem; top: .6rem; font-size: .66rem; color: #6b707c; }
#line .lock-note strong { display: block; margin-top: .15rem; font-size: .82rem; }
#line .lock-note p { margin: .1rem 0 0; color: #3a3e48; }
#line .lock-note-actions { display: flex; gap: .4rem; margin-top: .5rem; }
#line .lock-note-actions i { flex: 1; text-align: center; font-style: normal; font-weight: 650; padding: .3rem; border-radius: .6rem; background: #15161a14; }
#line .lock-note-actions i:first-child { background: var(--accent); }
#line .t1 { animation-delay: .3s; } #line .t2 { animation-delay: 1.3s; } #line .t3 { animation-delay: 2.3s; }
@keyframes toast-in { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  #line .lock-note { animation: none; opacity: 1; transform: none; }
  #line .event.fresh { animation: none; }
}

#line #learn { margin-top: 3rem; }
#line .band { padding: 2.5rem 0; border-top: 1px solid var(--line); }
#line .band-title { font-family: var(--font-display); font-stretch: 75%; font-weight: 800; font-size: clamp(1.6rem, 3.2vw, 2.1rem); margin-bottom: 1.4rem; }
#line .band h3 { font-size: 1.02rem; margin: 0 0 .35rem; }
#line .nsteps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
#line .nsteps li { padding: 1.15rem; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--panel); }
#line .nsteps span { display: inline-grid; place-items: center; width: 1.9rem; height: 1.9rem; margin-bottom: .7rem; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink); font-weight: 700; }
#line .nsteps p, #line .uses p, #line .faq p { color: var(--muted); margin: 0; }
#line .snippets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
#line .snippets figure { margin: 0; min-width: 0; }
#line .snippets figcaption { font-size: .85rem; color: var(--muted); margin-bottom: .4rem; }
#line .snippets pre { height: calc(100% - 1.7rem); }
#line .uses { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
#line .uses article { --kind: var(--k-message); display: flex; flex-direction: column; gap: .2rem; padding: 1.15rem; border: 1px solid var(--line);
  border-top: 3px solid var(--kind); border-radius: var(--radius-lg); background: var(--panel); }
#line .uses article.k-done { --kind: var(--k-done); }
#line .uses article.k-alert { --kind: var(--k-alert); }
#line .uses article.k-approval { --kind: var(--k-approval); }
#line .uses article.k-warn { --kind: var(--k-warn); }
#line .uses a { margin-top: auto; padding-top: .7rem; font-size: .9rem; }
#line .faq details { border-bottom: 1px solid var(--line); padding: .85rem 0; max-width: 48rem; }
#line .faq summary { cursor: pointer; font-weight: 600; }
#line .faq details p { margin-top: .55rem; }

/* Returning people and the installed app: channels first, a short introduction, the guide stays below. */
.returning #line .hero { grid-template-columns: minmax(0, 1fr); padding-bottom: 1.25rem; }
.returning #line .phone, .returning #line .hero-code, .returning #line .lead { display: none; }
.returning #line .hero h1 { font-size: clamp(1.7rem, 3.6vw, 2.3rem); max-width: none; }
@media (display-mode: standalone) {
  #line .hero { grid-template-columns: minmax(0, 1fr); padding-bottom: 1.25rem; }
  #line .phone, #line .hero-code, #line .lead { display: none; }
  #line .hero h1 { font-size: 1.7rem; max-width: none; }
}

@media (max-width: 56rem) {
  #line .layout, #line .settings-pane, #line .home-app { grid-template-columns: minmax(0, 1fr); }
  #line .legend { display: none; }
  #line .layout > aside { order: -1; }
  /* On a phone the inbox comes first; the device panel jumps above it only when push needs turning on. */
  #line #pane-inbox > aside { order: 1; }
  #line #pane-inbox.needs-push > aside { order: -1; }
  #line #pane-inbox .crew { display: none; }
}
@media (max-width: 48rem) {
  #line .hero { grid-template-columns: minmax(0, 1fr); gap: 2rem; padding-top: 0; }
  #line .phone { width: min(13rem, 66%); }
  #line .nsteps, #line .snippets, #line .uses { grid-template-columns: minmax(0, 1fr); }
  #line .toolbar { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  #line .toolbar input { grid-column: 1 / -1; }
  #line .panel { padding: .95rem; }
  #line .day { margin-inline: -.95rem; padding-inline: .95rem; }
  #line .event { grid-template-columns: 1.8rem minmax(0, 1fr); gap: .6rem; padding: .7rem; }
  #line .icon { width: 1.8rem; height: 1.8rem; font-size: .9rem; }
  #line .chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: .2rem; }
}

/* ---------------------------------------------------------------- Line additions */
#line {
  /* Role colors: cool to warm as the role grows. */
  --r-observer: #9aa3ad;
  --r-notifier: #7fb6e8;
  --r-worker: #8fcf7a;
  --r-reviewer: #5fd0c0;
  --r-coordinator: #f0b44c;
  --r-orchestrator: #b59cf0;
  --r-person: #f08a7a;
  --c: var(--r-worker);
}
#line .tiny { font-size: .74rem; }
#line .faint { color: var(--faint); font-weight: 400; }
#line .small-button { padding: .3rem .7rem; font-size: .84rem; }
#line .sub { font-size: .9rem; margin: 1.2rem 0 .3rem; color: var(--muted); }
#line .two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem; margin-top: 1rem; }
#line .spaced-panel { margin-top: 1rem; }

/* App shell: a rail on the left on desktop, tabs along the bottom on a phone. */
#line .shell { display: grid; grid-template-columns: 11.5rem minmax(0, 1fr); gap: 1rem; align-items: start; }
#line .rail { position: sticky; top: calc(var(--nav-h) + .75rem); display: grid; gap: .2rem; padding: .4rem; border: 1px solid var(--line);
  border-radius: var(--radius-lg); background: var(--panel); }
#line .rail button { justify-content: flex-start; gap: .6rem; border: 0; background: transparent; color: var(--muted); padding: .6rem .7rem; font-weight: 600; }
#line .rail button:hover { background: var(--surface-3); color: var(--text); }
#line .rail button[aria-selected="true"] { background: var(--accent-dim); color: var(--accent-hi); }
#line .rail button span { flex: 1; text-align: left; }
#line .badge { min-width: 1.3rem; padding: 0 .35rem; border-radius: 99px; font-size: .72rem; line-height: 1.3rem; text-align: center;
  background: var(--accent); color: var(--accent-ink); font-weight: 700; }
#line .badge:empty { display: none; }
#line .badge.quiet { background: var(--surface-3); color: var(--muted); }
#line .badge.violet { background: var(--put); color: #17121f; }
/* Icons drawn with CSS masks so the strict CSP needs no inline SVG. */
#line .ri { width: 1.15rem; height: 1.15rem; flex: none; background: currentColor; -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat; }
#line .ri-inbox { --icon: url('/static/img/line/inbox.svg'); }
#line .ri-threads { --icon: url('/static/img/line/threads.svg'); }
#line .ri-agents { --icon: url('/static/img/line/agents.svg'); }
#line .ri-approvals { --icon: url('/static/img/line/approvals.svg'); }
#line .ri-connect { --icon: url('/static/img/line/connect.svg'); }
#line .ri-settings { --icon: url('/static/img/line/settings.svg'); }
#line .panes { min-width: 0; }

/* Who sent it: a colored initial and a role badge. */
#line .who { display: inline-flex; align-items: center; gap: .4rem; font-size: .8rem; color: var(--muted); }
#line .av { display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: .5rem; flex: none;
  font-weight: 800; font-size: .8rem; color: #111; background: var(--c); }
#line .av.big { width: 2.6rem; height: 2.6rem; border-radius: .8rem; font-size: 1.15rem; }
#line .role { display: inline-flex; align-items: center; padding: .05rem .45rem; border-radius: 99px; font-size: .7rem;
  font-weight: 650; letter-spacing: .02em; color: var(--c); border: 1px solid color-mix(in srgb, var(--c) 45%, transparent);
  background: color-mix(in srgb, var(--c) 12%, transparent); text-transform: capitalize; white-space: nowrap; }
#line .r-observer { --c: var(--r-observer); }
#line .r-notifier { --c: var(--r-notifier); }
#line .r-worker { --c: var(--r-worker); }
#line .r-reviewer { --c: var(--r-reviewer); }
#line .r-coordinator { --c: var(--r-coordinator); }
#line .r-orchestrator { --c: var(--r-orchestrator); }
#line .r-owner, #line .r-admin, #line .r-member, #line .r-viewer, #line .r-person { --c: var(--r-person); }
#line .scope { font-family: var(--font-mono); font-size: .7rem; color: var(--faint); }

/* The small agent list beside the inbox */
#line .crew-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
#line .crew-list li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .55rem; align-items: center; font-size: .88rem; }
#line .crew-list .status { color: var(--faint); font-size: .76rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#line .online { width: .5rem; height: .5rem; border-radius: 50%; background: var(--faint); }
#line .online.on { background: var(--ok); box-shadow: 0 0 0 3px rgba(143, 207, 122, .18); }

/* Messages */
#line .threads { display: grid; grid-template-columns: minmax(15rem, 21rem) minmax(0, 1fr); gap: 1rem; align-items: start; }
#line .thread-side { padding: .9rem; position: sticky; top: calc(var(--nav-h) + .75rem); max-height: calc(100vh - var(--nav-h) - 2rem); overflow: auto; }
#line .small-chips { margin: .2rem 0 .6rem; }
#line .thread-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }
#line .thread-list button { display: grid; width: 100%; grid-template-columns: minmax(0, 1fr) auto; gap: .15rem .6rem; text-align: left; white-space: normal;
  padding: .65rem .7rem; background: var(--panel-2); border-color: var(--line); }
#line .thread-list button[aria-current="true"] { border-color: var(--accent-line); background: var(--accent-dim); }
#line .thread-list .t-subject { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#line .thread-list .t-time { color: var(--faint); font-size: .74rem; }
#line .thread-list .t-last { grid-column: 1 / -1; color: var(--muted); font-size: .82rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#line .thread-list .t-people { grid-column: 1 / -1; display: flex; gap: .3rem; flex-wrap: wrap; align-items: center; }
#line .thread-list .t-waiting { color: var(--accent); font-size: .74rem; }
#line .thread-list .done .t-subject { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--faint); }
#line .convo { display: flex; flex-direction: column; min-height: min(70vh, 44rem); padding: 0; overflow: hidden; }
#line .convo-head { display: flex; align-items: center; gap: .7rem; padding: .9rem 1.1rem; border-bottom: 1px solid var(--line); }
#line .convo-title { flex: 1; min-width: 0; }
#line .convo-title h2 { margin: 0; overflow-wrap: anywhere; }
#line .back-button { display: none; padding: .3rem .6rem; }
#line .messages { flex: 1; list-style: none; margin: 0; padding: 1rem 1.1rem; display: flex; flex-direction: column; gap: .8rem; overflow: auto; }
#line .msg { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .6rem; max-width: 46rem; }
#line .msg.mine { align-self: flex-end; grid-template-columns: minmax(0, 1fr); }
#line .msg.mine .av { display: none; }
#line .msg-head { display: flex; gap: .45rem; align-items: center; flex-wrap: wrap; font-size: .78rem; color: var(--faint); margin-bottom: .2rem; }
#line .msg.mine .msg-head { justify-content: flex-end; }
#line .msg-head b { color: var(--text); font-weight: 650; font-size: .84rem; }
#line .msg-body { padding: .6rem .8rem; border-radius: .9rem; border-top-left-radius: .25rem; background: var(--panel-2); border: 1px solid var(--line);
  white-space: pre-wrap; overflow-wrap: anywhere; }
#line .msg.mine .msg-body { border-radius: .9rem; border-top-right-radius: .25rem; background: color-mix(in srgb, var(--accent) 16%, var(--panel-2));
  border-color: var(--accent-line); }
#line .msg.task .msg-body { border-style: dashed; }
#line .msg-to { display: flex; gap: .3rem; flex-wrap: wrap; margin-top: .3rem; }
#line .msg.mine .msg-to { justify-content: flex-end; }
#line .composer { border-top: 1px solid var(--line); padding: .8rem 1.1rem 1rem; display: grid; gap: .45rem; background: var(--panel); }
#line .composer-to { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
#line .composer-to > label:first-child { color: var(--muted); font-size: .86rem; }
#line .composer-to select { width: auto; min-width: 11rem; margin: 0; }
#line .task-toggle { margin-left: auto; }
#line .composer-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .5rem; align-items: end; }
#line .composer-row textarea { margin: 0; resize: vertical; min-height: 2.8rem; }
#line .small-empty { padding: 1.5rem .5rem; }

/* Agents */
#line .agent-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: .75rem; margin-top: .9rem; }
#line .agent { display: flex; flex-direction: column; gap: .6rem; padding: .95rem; border: 1px solid var(--line); border-top: 3px solid var(--c);
  border-radius: var(--radius-lg); background: var(--panel-2); }
#line .agent.paused { opacity: .7; }
#line .agent-top { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .65rem; align-items: center; }
#line .agent-name { font-weight: 750; overflow-wrap: anywhere; }
#line .agent-sub { display: flex; gap: .35rem; align-items: center; flex-wrap: wrap; margin-top: .15rem; }
#line .agent-seen { font-size: .76rem; color: var(--faint); display: flex; gap: .35rem; align-items: center; margin-top: .2rem; }
#line .agent-status { font-size: .88rem; color: var(--text); padding: .45rem .6rem; border-radius: var(--radius); background: var(--surface-3); }
#line .agent-status:empty { display: none; }
#line .agent-last { font-size: .82rem; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
#line .agent-actions { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; margin-top: auto; padding-top: .55rem; border-top: 1px solid var(--line); }
#line .agent-actions .danger { margin-left: auto; }
#line .agent-actions button, #line .agent-actions select { padding: .28rem .6rem; font-size: .8rem; width: auto; margin: 0; }
#line .role-guide { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; font-size: .86rem; color: var(--muted); }
#line .role-guide li { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: .6rem; align-items: start; }

/* Add an agent */
#line fieldset { border: 0; padding: 0; margin: 1rem 0 0; min-width: 0; }
#line legend { font-size: .88rem; color: var(--muted); margin-bottom: .45rem; padding: 0; }
#line .role-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: .5rem; }
#line .role-grid label { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .15rem .55rem; padding: .65rem .75rem; cursor: pointer;
  border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--panel-2); color: var(--text); font-size: .9rem; }
#line .role-grid label:has(input:checked) { border-color: var(--c); background: color-mix(in srgb, var(--c) 10%, var(--panel-2)); }
#line .role-grid label:has(input:disabled) { opacity: .45; cursor: not-allowed; }
#line .role-grid input, #line .picks input { width: auto; margin: .15rem 0 0; accent-color: var(--accent); }
#line .role-grid b { color: var(--c); }
#line .role-grid small { grid-column: 2; color: var(--muted); font-size: .78rem; }
#line .picks label { display: inline-flex; gap: .45rem; align-items: center; padding: .55rem .85rem; border: 1px solid var(--line-strong); border-radius: var(--radius);
  cursor: pointer; color: var(--text); font-size: .9rem; }
#line .picks label:has(input:checked) { border-color: var(--accent); background: var(--accent-dim); }
#line .code-big { font: 700 1.05rem/1.4 var(--font-mono); letter-spacing: .02em; overflow-wrap: anywhere; }

/* Role cards on the introduction */
#line .role-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
#line .role-cards article { padding: 1.1rem; border: 1px solid var(--line); border-left: 3px solid var(--c); border-radius: var(--radius-lg); background: var(--panel); }
#line .role-cards h3 { color: var(--c); }
#line .role-cards p { color: var(--muted); margin: 0; }

/* The phone in the hero also shows a reply going back. */
#line .bubble { margin: 0 0 .55rem auto; max-width: 78%; padding: .5rem .7rem; border-radius: 1rem 1rem .25rem 1rem; background: var(--accent);
  color: var(--accent-ink); font-size: .78rem; font-weight: 600; opacity: 0; transform: translateY(-.6rem); animation: toast-in .6s ease-out forwards; }
@media (prefers-reduced-motion: reduce) { #line .bubble { animation: none; opacity: 1; transform: none; } }

@media (max-width: 64rem) {
  #line .shell { grid-template-columns: minmax(0, 1fr); }
  #line .rail { position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; top: auto; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 0;
    border-radius: 0; border-width: 1px 0 0; padding: .25rem .25rem calc(.25rem + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--panel) 94%, transparent);
    backdrop-filter: blur(10px); }
  #line .rail button { flex-direction: column; gap: .15rem; padding: .4rem .2rem; font-size: .68rem; position: relative; }
  #line .rail button span { text-align: center; }
  #line .rail .badge { position: absolute; top: .15rem; left: calc(50% + .35rem); min-width: 1.05rem; line-height: 1.05rem; font-size: .62rem; }
  #line .shell { padding-bottom: 4.5rem; }
  #line .threads { grid-template-columns: minmax(0, 1fr); }
  #line .threads .thread-side { position: static; max-height: none; }
  #line .threads.reading .thread-side { display: none; }
  #line .threads:not(.reading) .convo { display: none; }
  #line .back-button { display: inline-flex; }
  #line .two-col { grid-template-columns: minmax(0, 1fr); }
  #line .role-cards { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
@media (max-width: 40rem) {
  #line .role-cards { grid-template-columns: minmax(0, 1fr); }
  #line .convo { min-height: calc(100vh - var(--nav-h) - 9rem); }
  #line .task-toggle { margin-left: 0; }
  #line .composer-to select { flex: 1; }
}
