/* Styles for the individual screens. The shell, tokens and base pieces are in app.css. */

.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 8px; }
.page-head .lead { margin-bottom: 0; }
.eyebrow { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--brand); font-weight: 600; margin: 0 0 6px; }
.flash { background: var(--ok-soft); border: 1px solid #BFE3CF; border-radius: var(--radius-s); padding: 10px 14px; }
.banner { margin: 0 0 16px; padding: 10px 14px; border-radius: var(--radius-s); border: 1px solid; color: var(--ink); }
.banner.warn { background: var(--warn-soft); border-color: #F2CFA0; }
.banner.bad { background: var(--bad-soft); border-color: #F0B8B4; }
.flash.err { background: var(--bad-soft); border-color: #F0B8B4; color: var(--ink); }
.crumbs { margin: 0 0 8px; font-size: 13px; color: var(--muted); }
.label { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 12px 0 3px; }
.btn { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 14px; padding: 8px 16px;
       border: 1px solid var(--line); border-radius: 999px; background: var(--paper); color: var(--ink);
       text-decoration: none; cursor: pointer; }
.btn:hover { border-color: #C9C9C9; text-decoration: none; }
.btn.small { font-size: 13px; padding: 5px 12px; }
.btn[disabled], .primary[disabled] { opacity: .45; cursor: not-allowed; }
.right { margin-left: auto; }
.empty { color: var(--muted); padding: 18px 0; }
details > summary { cursor: pointer; }
textarea { width: 100%; }
textarea.code, textarea.editor { font-family: Consolas, monospace; font-size: 13px; }
.grow { flex: 1 1 260px; }
.grow input { width: 100%; }
.ref { font-family: Consolas, "SF Mono", monospace; font-size: 12px; color: var(--muted); background: var(--wash);
       border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; margin-right: 4px; white-space: nowrap; font-weight: 400; }

/* Tabs, pills, jump links */
.tabs, .pills, .jump { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0; align-items: center; }
.tabs a, .pills a, .jump a { padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper);
       text-decoration: none; color: var(--ink-2); font-size: 14px; }
.tabs a:hover, .pills a:hover, .jump a:hover { border-color: #CFCFCF; }
.tabs a[aria-current], .pills a[aria-current] { background: var(--ink); color: #fff; border-color: var(--ink); }
.tabs a[aria-current] .muted, .pills a[aria-current] .muted { color: #D6D6D6; }
.jump a { font-size: 13px; padding: 4px 12px; }
.tabs .btn.right { border-radius: 999px; }

/* Filters and bulk bar */
.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin: 14px 0; padding: 14px 16px;
           background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.filters input[type=search] { min-width: 240px; }
.bulk { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 14px; margin: 8px 0 14px;
        background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.bulk input { padding: 6px 10px; font-size: 13px; }

/* Cards */
.cards { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.q { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); }
.q h3 { margin: 0; font-size: 16px; font-weight: 600; line-height: 1.4; }
.q-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; align-items: baseline; }
.rank { display: inline-grid; place-items: center; min-width: 28px; height: 28px; border-radius: 50%;
        background: var(--brand); color: #fff; font-size: 13px; font-weight: 600; margin-right: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 5px; }
.chip { display: inline-block; font-size: 12px; padding: 2px 10px; border-radius: 999px; background: var(--wash);
        border: 1px solid var(--line); color: var(--ink-2); white-space: nowrap; }
.chip.s-active, .chip.c-high { background: var(--ok-soft); border-color: #BFE3CF; color: var(--ok); }
.chip.s-candidate { background: #FFF8DB; border-color: #F1DE9A; color: #7A6000; }
.chip.s-rejected { background: var(--bad-soft); border-color: #F0B8B4; color: var(--bad); }
.chip.s-gap, .chip.warn { background: var(--warn-soft); border-color: #F2CFA0; color: var(--warn); }
.chip.s-bot { background: var(--info-soft); border-color: #C9D6F7; color: var(--link); }
.q-ar { margin: 6px 0 0; }
.qsrc { margin: 6px 0; font-size: 13px; color: var(--muted); }
.ev summary, .variants-box summary { font-size: 13px; color: var(--muted); }
.ev p { background: var(--wash); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 10px 12px; }
.metrics { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; color: var(--muted); margin: 10px 0; }
.metrics b { color: var(--ink); margin-right: 3px; font-weight: 600; }
.variants { list-style: none; padding: 0; margin: 6px 0; display: flex; flex-direction: column; gap: 4px; }
.variant { font-size: 14px; background: var(--wash); border-radius: 8px; padding: 5px 10px; }
.variant small { font-weight: 700; color: var(--muted); margin-inline-end: 6px; }
.variant .tag { font-size: 11px; color: var(--muted); margin-inline-start: 8px; }
.meta { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 13px; color: var(--muted); margin-top: 8px; }
.q-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; padding-top: 12px;
             border-top: 1px solid var(--line-2); }
.q-actions input { padding: 5px 10px; font-size: 13px; }
.page-edit { display: flex; gap: 6px; flex: 1 1 320px; }
.page-edit input { flex: 1; }
details.how, details.add { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; margin: 12px 0; }
details.how dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; font-size: 14px; }
details.how dt { font-weight: 600; }
details.how dd { margin: 0; color: var(--muted); }

/* Two columns, English and Arabic */
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.two > section { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; box-shadow: var(--shadow); }
.fact { border-top: 1px solid var(--line-2); padding: 10px 0; }
blockquote { margin: 6px 0; padding: 4px 12px; border-inline-start: 3px solid var(--brand-soft); color: var(--muted); white-space: pre-line; }
pre.capture { white-space: pre-wrap; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
              padding: 16px; font-family: inherit; }

/* Rules */
.layout-side { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.doc { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 26px 20px;
       overflow-x: auto; box-shadow: var(--shadow); }
.doc table { border-collapse: collapse; margin: 10px 0; }
.doc th, .doc td { border: 1px solid var(--line); padding: 6px 9px; vertical-align: top; }
.doc pre { background: var(--wash); padding: 10px; overflow-x: auto; border-radius: 8px; }
.doc pre.front { font-size: 12px; margin-top: 14px; }
.doc blockquote { white-space: normal; }
.history-box { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px;
               position: sticky; top: 16px; box-shadow: var(--shadow); }
.history-box ol { padding-left: 18px; }
.history-box li { margin-bottom: 10px; }
.history-box li.current { font-weight: 600; }
.diff { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); font-family: Consolas, monospace;
        font-size: 13px; overflow-x: auto; }
.diff div { padding: 2px 12px; white-space: pre-wrap; }
.d-removed { background: var(--bad-soft); text-decoration: line-through; color: #8A1C15; }
.d-added { background: var(--ok-soft); color: #145C37; }
.d-gap { color: var(--muted); text-align: center; background: var(--wash); }
.d-mark { display: inline-block; width: 16px; color: var(--muted); }
.history-entry { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 16px; margin-bottom: 8px; }
.item-what { font-weight: 600; }

/* Start */
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; background: var(--paper); }
legend { font-weight: 600; font-size: 13px; padding: 0 6px; }
label.choice { flex-direction: row; align-items: center; gap: 7px; font-weight: 400; font-size: 14px;
               display: inline-flex; margin: 4px 16px 4px 0; color: var(--ink); }
.ask { background: var(--warn-soft); border: 1px solid #F2CFA0; border-radius: var(--radius-s); padding: 10px 12px; }
.draws dt { font-weight: 600; margin-top: 10px; }
.draws dd { margin: 2px 0 0; font-size: 14px; }
.draws ul { padding-left: 18px; margin: 4px 0; }
.run-form { margin: 8px 0 16px; }

/* Settings */
.grid.settings th { width: 44%; font-weight: 400; text-transform: none; letter-spacing: 0; font-size: 14px; color: var(--ink); }
.grid.settings textarea { min-width: 320px; }
tr.has-error td, tr.has-error th { background: var(--bad-soft); }

/* Demand by source on opportunity cards */
.sources { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--muted); margin: 8px 0; }
.sources b { color: var(--ink); }
ul.links { padding-left: 18px; }
ul.links li { margin-bottom: 5px; }

/* In-page updates */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
         background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 999px; font-size: 14px;
         transition: opacity .15s, transform .15s; z-index: 10; max-width: calc(100vw - 32px); box-shadow: var(--shadow); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { background: var(--bad); }
body.busy { cursor: progress; }
body.busy .live-region { opacity: .55; transition: opacity .1s .15s; }

/* Runs */
.events { list-style: none; padding: 0; font-size: 14px; background: var(--paper); border: 1px solid var(--line);
          border-radius: var(--radius); overflow: hidden; }
.events li { padding: 7px 14px; border-top: 1px solid var(--line-2); }
.events li:first-child { border-top: 0; }
.events .ev-announce { color: var(--ink); }
.events .ev-read_page, .events .ev-tool { color: var(--muted); }
.events .ev-result { font-weight: 600; }

@media (max-width: 900px) {
  .two, .layout-side { grid-template-columns: 1fr; }
  .history-box { position: static; }
}

/* --- Home ---------------------------------------------------------------------------------- */
.hero { margin-bottom: 18px; }
.hero h1 { font-size: 34px; max-width: 760px; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 8px 0 22px; }
.kpi { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow);
       display: flex; flex-direction: column; gap: 6px; color: var(--ink); text-decoration: none; }
.kpi:hover { border-color: #CFCFCF; text-decoration: none; }
.kpi-label { font-size: 13px; color: var(--muted); display: flex; gap: 7px; align-items: center; }
.kpi-num { font-size: 36px; font-weight: 600; letter-spacing: -.02em; line-height: 1.1; }
.kpi-sub { font-size: 13px; color: var(--muted); }
.kpi.accent { background: var(--brand); border-color: var(--brand); color: #fff; }
.kpi.accent .kpi-label, .kpi.accent .kpi-sub { color: rgba(255, 255, 255, .85); }
.split { display: grid; grid-template-columns: 1.15fr 1fr; gap: 16px; margin-bottom: 16px; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; box-shadow: var(--shadow); }
.panel h2 { margin: 0; font-size: 17px; }
.panel h3 { color: var(--ink-2); }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.opps { list-style: none; margin: 0; padding: 0; }
.opps li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line-2); }
.opps li:first-child { border-top: 0; }
.opp-body { flex: 1; min-width: 0; }
.opp-title { font-weight: 500; line-height: 1.35; }
.bars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.bars li { display: grid; grid-template-columns: 150px 1fr 34px; gap: 10px; align-items: center; font-size: 13px; }
.bar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.bar { height: 10px; background: var(--wash); border-radius: 999px; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--brand); border-radius: 999px; }
.bar-num { text-align: right; font-weight: 600; }
.stack-bar { display: flex; height: 14px; border-radius: 999px; overflow: hidden; background: var(--wash); margin: 6px 0 8px; }
.stack-bar span { display: block; height: 100%; }
.sb-google { background: var(--link); }
.sb-both { background: #6E4BC2; }
.sb-msa3ed { background: var(--brand); }
.legend { display: flex; flex-wrap: wrap; gap: 14px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.how { margin-bottom: 16px; }
.flow { list-style: none; margin: 14px 0 4px; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; counter-reset: s; }
.flow li { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: var(--radius-s);
           background: var(--wash); }
.flow li:not(:last-child)::after { content: ""; position: absolute; right: -9px; top: 26px; width: 8px; height: 8px;
           border-top: 2px solid #C9C9C9; border-right: 2px solid #C9C9C9; transform: rotate(45deg); }
.flow-step { width: 32px; height: 32px; border-radius: 50%; background: var(--paper); border: 1px solid var(--line);
             display: grid; place-items: center; color: var(--brand); margin-bottom: 4px; }
.quotes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.quotes li { display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; background: var(--wash); border-radius: var(--radius-s); }
.q-text { font-size: 16px; }
.run-list { list-style: none; margin: 0; padding: 0; }
.run-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line-2); }
.run-list li:first-child { border-top: 0; }
.run-list a { color: var(--ink); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; padding: 2px 10px; border-radius: 999px; white-space: nowrap; }
.b-ok { background: var(--ok-soft); color: var(--ok); }
.b-bad { background: var(--bad-soft); color: var(--bad); }
.b-wait { background: var(--info-soft); color: var(--link); }
blockquote.model { background: var(--wash); border: 0; border-radius: var(--radius-s); padding: 10px 14px; color: var(--ink); }
blockquote.model p { margin: 4px 0; }
@media (max-width: 1100px) { .kpis { grid-template-columns: repeat(2, 1fr); } .flow { grid-template-columns: 1fr 1fr; } }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } .kpis { grid-template-columns: 1fr; } .flow { grid-template-columns: 1fr; }
  .flow li::after { display: none; } }

/* --- A run ---------------------------------------------------------------------------------- */
.badge.big { font-size: 14px; padding: 4px 14px; vertical-align: middle; margin-left: 8px; }
.verdicts { display: grid; grid-template-columns: 1.3fr 1.3fr 1fr 1fr; gap: 14px; margin: 6px 0 20px; }
.verdict { display: flex; gap: 14px; align-items: center; background: var(--paper); border: 1px solid var(--line);
           border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.v-icon { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.v-label { font-size: 13px; color: var(--muted); }
.v-word { font-size: 22px; font-weight: 600; }
.v-pass .v-icon { background: var(--ok-soft); color: var(--ok); }
.v-pass .v-word { color: var(--ok); }
.v-fail .v-icon { background: var(--bad-soft); color: var(--bad); }
.v-fail .v-word { color: var(--bad); }
.v-wait .v-icon { background: var(--info-soft); color: var(--link); }
.callout { display: flex; gap: 14px; padding: 16px 20px; border-radius: var(--radius); margin: 0 0 18px; }
.callout.warn { background: var(--warn-soft); border: 1px solid #F2CFA0; color: var(--ink); }
.callout.warn > .icon { color: var(--warn); margin-top: 2px; }
.callout p { margin: 4px 0; }
.callout ul { margin: 4px 0 0; padding-left: 18px; }
.copy-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.copy-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 26px; box-shadow: var(--shadow); }
.copy-lang { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--brand); font-weight: 600; margin-bottom: 10px; }
.copy-main { font-size: 26px; line-height: 1.3; margin: 0 0 14px; font-weight: 500; }
.copy-card[lang="ar"] .copy-main { font-size: 28px; line-height: 1.6; }
.copy-alt { margin: 6px 0; color: var(--ink-2); font-size: 15px; }
.copy-label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-top: 12px; }
.reasons { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.reasons ul { padding-left: 18px; margin: 8px 0 0; }
.reasons li { margin-bottom: 12px; }
.reason-line { margin: 4px 0; padding: 6px 10px; background: var(--wash); border-radius: 8px; font-size: 14px; }
.timeline { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-bottom: 18px; }
.round { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.round-title { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 8px; font-weight: 600; }
.tl-step { display: flex; flex-direction: column; padding: 7px 10px 7px 12px; border-left: 3px solid var(--line); margin: 6px 0; }
.tl-pass { border-left-color: var(--ok); }
.tl-fail { border-left-color: var(--bad); }
.tl-err { border-left-color: var(--bad); background: var(--bad-soft); }
.tl-run { border-left-color: var(--link); background: var(--info-soft); }
.fold { margin: 10px 0; padding: 12px 18px; }
.fold summary { font-weight: 600; }
.fold .events { border: 0; box-shadow: none; }
@media (max-width: 1100px) { .verdicts { grid-template-columns: 1fr 1fr; } }
@media (max-width: 860px) { .copy-grid, .reasons, .verdicts { grid-template-columns: 1fr; } }
.tiles.mini .num { font-size: 20px; }

/* Sign in */
.signin { max-width: 440px; padding: 36px; }
.signin .brand-mark { width: 44px; height: 44px; font-size: 26px; border-radius: 12px; margin-bottom: 18px; }
.signin h1 { font-size: 26px; }
.signin .primary { width: 100%; padding: 11px; }

/* --- Home: the content team ------------------------------------------------------------------ */
.stage { position: relative; border-radius: 20px; padding: 30px 30px 22px; margin-bottom: 18px; color: #E8EEFF; overflow: hidden;
         background: radial-gradient(1200px 500px at 50% 40%, #1C3A8A 0%, #0E1E4F 45%, #081233 100%); box-shadow: 0 12px 40px rgba(8, 18, 51, .25); }
.stage::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .35;
                 background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
                 background-size: 36px 36px; }
.stage-head { position: relative; text-align: center; max-width: 760px; margin: 0 auto 6px; }
.stage-head h1 { color: #fff; font-size: 32px; font-weight: 600; margin: 0 0 6px; }
.eyebrow.light { color: #FF8A9C; }
.stage-sub { color: #AFC0EA; margin: 0; }
.stage-map { position: relative; height: 540px; margin: 18px 0 6px; }
.wires { position: absolute; inset: 0; width: 100%; height: 100%; }
.wires path { fill: none; stroke: rgba(120, 160, 255, .45); stroke-width: 1.6; stroke-dasharray: 5 9; animation: flow 2.2s linear infinite; vector-effect: non-scaling-stroke; }
@keyframes flow { to { stroke-dashoffset: -28; } }
.agent { position: absolute; width: 23%; min-width: 200px; padding: 14px 16px 12px; border-radius: 14px; background: rgba(13, 27, 72, .88);
         border: 1px solid rgba(110, 150, 255, .35); box-shadow: 0 8px 26px rgba(0, 0, 0, .25); backdrop-filter: blur(4px); box-sizing: border-box; }
.agent-tag { position: absolute; top: -10px; left: 14px; font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
             padding: 2px 9px; border-radius: 999px; background: #18A06A; color: #fff; }
.agent-next .agent-tag { background: #44507A; }
.agent-active .agent-tag { background: #F2A33A; }
.agent-tag.lead { background: var(--brand); left: 50%; transform: translateX(-50%); }
.agent-name { font-weight: 600; color: #fff; font-size: 15px; margin-top: 4px; }
.agent-role { font-size: 12px; color: #9FB2E3; margin-top: 2px; }
.agent-bar { height: 4px; border-radius: 999px; background: rgba(255,255,255,.12); margin: 10px 0 8px; overflow: hidden; }
.agent-bar span { display: block; height: 100%; background: linear-gradient(90deg, #18A06A, #5BD69F); border-radius: 999px; }
.agent-active .agent-bar span { background: linear-gradient(90deg, #F2A33A, #FFD27A); animation: pulsebar 1.4s ease-in-out infinite; }
@keyframes pulsebar { 50% { opacity: .5; } }
.agent-line { font-size: 12px; color: #DCE4FF; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.orchestrator .agent-line { -webkit-line-clamp: 3; }
.agent-when { font-size: 11px; color: #8195C9; margin-top: 4px; }
.agent-next { opacity: .6; border-style: dashed; }
.pos-l1 { left: 0; top: 12px; } .pos-l2 { left: 0; top: 190px; } .pos-l3 { left: 0; top: 368px; }
.pos-r1 { right: 0; top: 12px; } .pos-r2 { right: 0; top: 190px; } .pos-r3 { right: 0; top: 368px; }
.orchestrator { left: 50%; top: 50%; transform: translate(-50%, -50%); width: 27%; text-align: center; padding: 22px 20px 16px;
                border: 1px solid rgba(255, 120, 140, .55); background: rgba(20, 30, 80, .95);
                box-shadow: 0 0 0 6px rgba(155, 18, 48, .12), 0 14px 40px rgba(0, 0, 0, .35); }
.orb { width: 46px; height: 46px; margin: 4px auto 8px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #FF6B81, var(--brand) 60%, #6B0716);
       position: relative; }
.orb span { position: absolute; inset: -6px; border-radius: 50%; border: 2px solid rgba(255, 107, 129, .5); animation: ring 2s ease-out infinite; }
@keyframes ring { from { transform: scale(.8); opacity: 1; } to { transform: scale(1.5); opacity: 0; } }
.orchestrator .agent-role { color: #C4D0F2; }
.orchestrator .agent-line { margin-top: 10px; color: #FFD3DA; }
.stage-foot { position: relative; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 8px; }
.pillar { font-size: 12px; color: #DCE4FF; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12);
          border-radius: 999px; padding: 5px 12px; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 7px; }
.d-blue { background: #5B8CFF; } .d-green { background: #18A06A; } .d-red { background: #FF5A70; } .d-grey { background: #B8C2DD; }
.convo { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.msg { display: grid; grid-template-columns: 130px 1fr auto; gap: 10px; align-items: baseline; padding: 9px 12px; border-radius: 10px;
       background: var(--wash); border-left: 3px solid var(--line); font-size: 14px; }
.msg-who { font-weight: 600; font-size: 13px; }
.msg-when { font-size: 12px; color: var(--muted); white-space: nowrap; }
.m-listener { border-left-color: #3B6BE0; } .m-reader { border-left-color: #18A06A; } .m-strategist { border-left-color: #6E4BC2; }
.m-writers { border-left-color: #E08A1E; } .m-checks { border-left-color: var(--brand); }
.queue { list-style: none; margin: 0 0 10px; padding: 0; }
.queue li { display: grid; grid-template-columns: 22px 1fr auto; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; }
.queue li:first-child { border-top: 0; }
.q-box { width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid #C9C9C9; display: grid; place-items: center; font-size: 11px; color: #fff; }
.q-done .q-box { background: #18A06A; border-color: #18A06A; }
.q-failed .q-box { background: var(--brand); border-color: var(--brand); }
.q-running .q-box { border-color: var(--link); animation: pulsebar 1.2s infinite; }
@media (max-width: 1100px) {
  .stage-map { height: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; padding-top: 10px; }
  .wires { display: none; }
  .agent, .orchestrator { position: relative; inset: auto; transform: none; width: auto; min-width: 0; left: auto; right: auto; top: auto; }
  .orchestrator { grid-column: 1 / -1; order: -1; }
  .msg { grid-template-columns: 1fr; }
}
@media (max-width: 640px) { .stage-map { grid-template-columns: 1fr; } .stage { padding: 22px 16px; } .stage-head h1 { font-size: 24px; } }

/* --- Home: today ------------------------------------------------------------------------------- */
.today { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 24px; margin-bottom: 18px; box-shadow: var(--shadow); }
.today-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 16px; }
.today-head h2 { margin: 2px 0 4px; font-size: 24px; }
.today-head p.muted { margin: 0; }
.target { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--brand);
          border: 1.5px dashed var(--brand); border-radius: 999px; padding: 4px 12px; white-space: nowrap; }
.today-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.t-card { display: flex; flex-direction: column; gap: 8px; padding: 16px; border-radius: 14px; background: var(--wash);
          border-top: 4px solid var(--line); min-width: 0; }
.t-card h3 { margin: 0; font-size: 16px; }
.t-ask { border-top-color: #3B6BE0; } .t-opp { border-top-color: #6E4BC2; } .t-ready { border-top-color: #18A06A; } .t-site { border-top-color: var(--brand); }
.t-step { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.t-num { font-size: 28px; font-weight: 600; line-height: 1.1; }
.t-num .small { font-size: 12px; font-weight: 400; }
.t-quotes, .t-problems { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.t-quotes li { background: #fff; border-radius: 8px; padding: 6px 9px; }
.t-problems li { line-height: 1.35; }
.t-lead { font-weight: 600; font-size: 15px; line-height: 1.35; }
.t-next { margin: 4px 0 0; padding-left: 18px; font-size: 13px; color: var(--muted); }
.t-checks { display: flex; flex-wrap: wrap; gap: 6px; }
.t-copy { margin: 0; background: #fff; border-radius: 8px; padding: 8px 10px; font-size: 15px; font-weight: 500; }
.t-card .btn { align-self: flex-start; }
.t-link { margin-top: auto; font-size: 13px; }
@media (max-width: 1200px) { .today-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .today-grid { grid-template-columns: 1fr; } .today-head { flex-direction: column; } }

/* --- Home: five agents and three helpers ------------------------------------------------------ */
.pos-l1b { left: 0; top: 50px; } .pos-l3b { left: 0; top: 335px; }
.ai-chip { display: inline-block; vertical-align: 2px; margin-left: 6px; font-size: 9px; font-weight: 700; letter-spacing: .06em;
           text-transform: uppercase; color: #FFD3DA; border: 1px solid rgba(255, 120, 140, .6); border-radius: 999px; padding: 1px 6px; }
.feeds { position: relative; margin: 18px auto 0; max-width: 920px; text-align: center; }
.feeds-label { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #8195C9; margin-bottom: 8px; }
.feeds-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; text-align: left; }
.helper { display: flex; gap: 10px; align-items: flex-start; padding: 9px 12px; border-radius: 10px;
          background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .12); min-width: 0; }
.helper-next { opacity: .6; border-style: dashed; }
.helper-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; margin-top: 5px; background: #18A06A; box-shadow: 0 0 0 3px rgba(24, 160, 106, .2); }
.helper-next .helper-dot { background: #44507A; box-shadow: none; }
.helper.agent-active .helper-dot { background: #F2A33A; animation: pulsebar 1.2s infinite; }
.helper-body { min-width: 0; }
.helper-name { font-size: 13px; font-weight: 600; color: #fff; }
.muted-light { font-weight: 400; color: #9FB2E3; font-size: 12px; }
.helper-line { font-size: 12px; color: #C4D0F2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feeds-arrow { width: 1px; height: 0; margin: 0 auto; }
.feeds + .stage-map { margin-top: 4px; }
.m-rank { border-left-color: #6E4BC2; } .m-writer { border-left-color: #E08A1E; }
.m-fact_check { border-left-color: var(--brand); } .m-voice_check { border-left-color: #C2417A; }
@media (max-width: 1100px) { .feeds-row { grid-template-columns: 1fr; } }
.feeds + .stage-map { height: 590px; }
.feeds + .stage-map .pos-r1 { top: 8px; } .feeds + .stage-map .pos-r2 { top: 208px; } .feeds + .stage-map .pos-r3 { top: 408px; }
.feeds + .stage-map .pos-l1b { top: 60px; } .feeds + .stage-map .pos-l3b { top: 370px; }
@media (max-width: 1100px) { .feeds + .stage-map { height: auto; } }

/* --- Run page: a web page's copy and the strategist's notes -------------------------------------- */
.copy-page { font-size: 15px; line-height: 1.55; }
.copy-page h1, .copy-page h2, .copy-page h3 { font-size: 16px; margin: 14px 0 4px; }
.copy-page table, .md table { border-collapse: collapse; width: 100%; font-size: 13px; margin: 8px 0; }
.copy-page th, .copy-page td, .md th, .md td { border: 1px solid var(--line); padding: 5px 8px; text-align: start; vertical-align: top; }
.md { overflow-x: auto; }
.m-planner { border-left-color: #8E6BD8; }

/* --- Home: website health loop ------------------------------------------------------------------ */
.h-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 10px; }
.h-head h1 { margin: 2px 0 4px; }
.loop-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 22px; }
.loop-nav a, .loop-nav span { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff; font-size: 14px; color: var(--ink); text-decoration: none; }
.loop-nav b { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 11px; }
.loop-nav .next { opacity: .55; border-style: dashed; }
.loop { margin: 0 0 30px; scroll-margin-top: 16px; }
.loop-title { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.loop-title h2 { margin: 0; font-size: 22px; }
.loop-num { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: #fff;
  font-weight: 700; font-size: 14px; align-self: center; }
.next-step { opacity: .6; }
.next-step .loop-num { background: #9AA3B5; }
h3.sub { font-size: 16px; margin: 18px 0 10px; }
.lens-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.lens { display: flex; flex-direction: column; gap: 4px; padding: 16px; border-radius: 14px; background: #fff; border: 1px solid var(--line);
  border-top: 4px solid var(--line); box-shadow: var(--shadow); color: var(--ink); text-decoration: none; min-width: 0; }
.lens:hover { border-color: var(--link); }
.lens-name { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.lens-num { font-size: 34px; font-weight: 600; line-height: 1.05; }
.lens-sub { font-size: 13px; color: var(--muted); }
.lens-note { font-size: 12px; color: var(--muted); margin-top: 6px; line-height: 1.4; }
.lens-extra { font-size: 12px; margin-top: 4px; font-weight: 500; }
.lens-extra.next { color: var(--muted); font-weight: 400; font-style: italic; }
.l-search { border-top-color: #3B6BE0; } .l-content { border-top-color: #E08A1E; } .l-accuracy { border-top-color: var(--brand); }
.l-technical { border-top-color: #5A6578; } .l-ai { border-top-color: #6E4BC2; }
.chip { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--wash); border-left: 3px solid var(--line); white-space: nowrap; }
.chip.l-search { border-left-color: #3B6BE0; } .chip.l-content { border-left-color: #E08A1E; } .chip.l-accuracy { border-left-color: var(--brand); }
.chip.l-technical { border-left-color: #5A6578; } .chip.l-ai { border-left-color: #6E4BC2; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.do { display: flex; flex-direction: column; gap: 6px; padding: 16px; border-radius: 14px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); }
.do h4 { margin: 4px 0 0; font-size: 16px; line-height: 1.35; }
.do .btn { align-self: flex-start; margin-top: auto; }
.do-improve { border-top: 4px solid #18A06A; } .do-create { border-top: 4px solid #3B6BE0; } .do-website { border-top: 4px solid #5A6578; }
.who { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; align-self: flex-start; }
.who-team { background: #E3F5EC; color: #0E7A4E; } .who-site { background: #ECEEF2; color: #4A5468; }
.rule { margin-top: 8px; }
.panel.tight { padding: 6px 14px 12px; }
.pages-table { width: 100%; border-collapse: collapse; }
.pages-table th { text-align: start; font-size: 12px; color: var(--muted); font-weight: 600; padding: 10px 8px; border-bottom: 1px solid var(--line); }
.pages-table td { padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.pages-table .num { text-align: end; }
.why summary, .how summary { cursor: pointer; color: var(--link); margin-top: 4px; }
.why ul { margin: 6px 0 0; padding-left: 16px; display: flex; flex-direction: column; gap: 3px; }
.how { margin-top: 10px; }
.run-line { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 12px; }
.steps-done { display: flex; flex-wrap: wrap; gap: 4px; }
.step-chip { font-size: 11px; padding: 2px 8px; border-radius: 999px; background: var(--wash); }
.step-chip.ok { background: #E3F5EC; color: #0E7A4E; } .step-chip.run { background: #FFF3DD; color: #8A5A00; } .step-chip.bad { background: #FDE7EA; color: var(--brand); }
.approve { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ba { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px; box-shadow: var(--shadow); min-width: 0; }
.ba-before { background: var(--wash); }
.ba-head { font-weight: 600; margin-bottom: 10px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ba-text { white-space: pre-wrap; font-size: 13px; line-height: 1.5; max-height: 460px; overflow: auto; color: #4A5468; }
.ba-lang summary { cursor: pointer; font-weight: 600; margin: 6px 0; }
.ba-lang .copy-page { max-height: 420px; overflow: auto; }
.panel.empty p { margin: 0; }
#write .stage { margin-bottom: 0; }
@media (max-width: 1200px) { .lens-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 900px) { .three, .approve { grid-template-columns: 1fr; } .lens-grid { grid-template-columns: 1fr 1fr; } .h-head { flex-direction: column; } }
.ai-checks { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; font-size: 12px; }
.ai-checks span::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; background: #9AA3B5; }
.ai-checks .ok::before { background: #18A06A; } .ai-checks .some::before { background: #F2A33A; } .ai-checks .none::before { background: var(--brand); }

/* --- Start: one column, what the run uses in small print under the request -------------------- */
form.brief { max-width: 860px; }
.draws-line { margin: -4px 0 6px; line-height: 1.5; }
.other-pages .pick-pages select { width: 100%; max-width: 520px; }
.save-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.save-row .ask { color: var(--brand); }
.save-row .ok { color: #0E7A4E; }

/* --- Run page: the team at work, then the result ------------------------------------------------ */
.rl { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 20px 22px; margin-bottom: 18px; box-shadow: var(--shadow); }
.rl-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.rl-now { font-size: 18px; font-weight: 600; }
.rl-note { font-size: 13px; color: var(--muted); margin-top: 2px; }
.rl-meter { display: flex; gap: 18px; font-size: 12px; color: var(--muted); }
.rl-meter b { display: block; font-size: 17px; font-weight: 600; color: var(--ink); }
.rl-bar { height: 6px; border-radius: 3px; background: var(--wash); overflow: hidden; margin: 12px 0 16px; }
.rl-bar span { display: block; height: 100%; background: linear-gradient(90deg, #6E4BC2, #9A7BE0); transition: width .6s; }
.rl-strip { display: flex; align-items: flex-start; overflow-x: auto; padding: 4px 2px 6px; }
.rl-a { display: flex; flex-direction: column; align-items: center; gap: 5px; min-width: 56px; text-align: center; flex: 0 0 auto; }
.rl-a span { font-size: 11px; color: var(--muted); line-height: 1.2; }
.rl-c { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid #C9CDD6; background: #fff; color: #8A93A6; transition: all .3s; }
.rl-a.k-ai .rl-c { color: #6E4BC2; border-color: #B9A6EA; }
.rl-a.k-you .rl-c { color: #B7791F; border-color: #EBC98A; }
.rl-a.s-run .rl-c { box-shadow: 0 0 0 5px rgba(110, 75, 194, .16); transform: scale(1.1); animation: glow 1.6s ease-in-out infinite; }
.rl-a.s-wait .rl-c { box-shadow: 0 0 0 5px rgba(242, 163, 58, .22); transform: scale(1.1); }
.rl-a.s-done .rl-c, .rl-a.s-skip .rl-c { background: #E3F5EC; border-color: #8FD3B4; color: #0E7A4E; }
.rl-ln { flex: 1; min-width: 12px; height: 2px; background: #E1E4EA; margin-top: 16px; }
.rl-ln.ok { background: #8FD3B4; }
@keyframes glow { 50% { box-shadow: 0 0 0 9px rgba(110, 75, 194, .06); } }
.rl-legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); margin: 6px 0 14px; }
.rl-legend span::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: 0; }
.rl-legend .k-ai::before { background: #6E4BC2; } .rl-legend .k-auto::before { background: #A0A8B8; } .rl-legend .k-you::before { background: #E3A23B; }
.rl-tl { list-style: none; margin: 0; padding: 0; }
.rl-st { position: relative; display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 12px; padding-bottom: 12px; }
.rl-st:not(:last-child)::before { content: ""; position: absolute; left: 17px; top: 38px; bottom: 0; width: 2px; background: #E1E4EA; }
.rl-st.s-done:not(:last-child)::before, .rl-st.s-skip:not(:last-child)::before { background: #8FD3B4; }
.rl-av { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid #C9CDD6; background: #fff; color: #8A93A6; }
.rl-st.k-ai .rl-av { color: #6E4BC2; border-color: #B9A6EA; }
.rl-st.k-you .rl-av { color: #B7791F; border-color: #EBC98A; }
.rl-st.s-run .rl-av { box-shadow: 0 0 0 5px rgba(110, 75, 194, .14); animation: glow 1.6s ease-in-out infinite; }
.rl-st.s-wait .rl-av { box-shadow: 0 0 0 5px rgba(242, 163, 58, .2); }
.rl-st.s-done .rl-av, .rl-st.s-skip .rl-av { background: #E3F5EC; border-color: #8FD3B4; color: #0E7A4E; }
.rl-st.s-todo { opacity: .55; }
.rl-card { border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.rl-st.s-run .rl-card { border-color: #B9A6EA; }
.rl-st.s-wait .rl-card { border-color: #EBC98A; background: #FFFBF3; }
.rl-card summary { list-style: none; cursor: pointer; padding: 10px 14px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; }
.rl-card summary::-webkit-details-marker { display: none; }
.rl-name { font-weight: 600; font-size: 14px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.rl-tag { font-size: 11px; font-weight: 500; padding: 1px 8px; border-radius: 999px; background: #F1F2F5; color: #5A6578; }
.rl-st.k-ai .rl-tag { background: #EFEAFB; color: #5A3BA8; }
.rl-st.k-you .rl-tag { background: #FFF1D9; color: #8A5A00; }
.rl-side { font-size: 12px; color: var(--muted); white-space: nowrap; }
.rl-sub, .rl-say, .rl-prog, .rl-rounds { grid-column: 1 / -1; }
.rl-sub { font-size: 12px; color: var(--muted); }
.rl-say { font-size: 13px; color: #3D2F6B; margin-top: 4px; }
.rl-say::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #6E4BC2; margin-right: 7px; animation: pulsebar 1.2s infinite; }
.rl-prog { height: 4px; border-radius: 2px; background: #EFEAFB; overflow: hidden; margin-top: 8px; position: relative; }
.rl-prog span { position: absolute; top: 0; bottom: 0; width: 35%; background: linear-gradient(90deg, transparent, #6E4BC2, transparent); animation: sweep 1.4s ease-in-out infinite; }
@keyframes sweep { from { left: -35%; } to { left: 100%; } }
.rl-rounds { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.rd { font-size: 11px; padding: 2px 9px; border-radius: 999px; background: #F1F2F5; color: #4A5468; }
.rd-ok { background: #E3F5EC; color: #0E7A4E; } .rd-bad { background: #FDE7EA; color: #A3122A; } .rd-run { background: #EFEAFB; color: #5A3BA8; }
.rl-det { padding: 4px 14px 12px; border-top: 1px solid var(--line); }
.rl-stepline { display: flex; justify-content: space-between; gap: 10px; padding-top: 8px; }
.rl-given { margin-top: 2px; word-break: break-word; }
.answers label { font-weight: 500; font-size: 14px; }
.answers textarea { margin-top: 4px; }
.result { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 20px 22px; margin-bottom: 18px; box-shadow: var(--shadow); }
.result-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.result-head h2 { margin: 0 0 2px; }
.lang-switch { display: flex; gap: 6px; }
.lang-switch .on { border-color: var(--brand); color: var(--brand); }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.compare .ba-text { max-height: 560px; }
.compare .copy-page { max-height: 560px; overflow: auto; }
.edit-copy { margin-top: 12px; }
.edit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.edit-grid textarea { width: 100%; font-size: 14px; line-height: 1.5; }
@media (max-width: 900px) { .edit-grid { grid-template-columns: 1fr; } }
.decide { display: flex; align-items: center; gap: 12px; margin: 14px 0 6px; }
.for-you { margin-top: 10px; }
.step-out { max-width: 900px; }
@media (max-width: 900px) { .compare { grid-template-columns: 1fr; } .rl-top { flex-direction: column; } }

/* --- Home: Write, the same look as the run page ------------------------------------------------ */
.team-card { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 18px 22px; box-shadow: var(--shadow); }
.tc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.tc-title { margin: 2px 0 2px; font-size: 18px; }
.team-card .rl-bar { margin: 12px 0 10px; }
.team-card .rl-say { margin: 6px 0 0; }
.roster { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.roster-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.roster-label { font-size: 12px; color: var(--muted); width: 130px; }
.who-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); background: #fff; }
.who-chip.k-ai { color: #5A3BA8; border-color: #D7CCF3; background: #F7F4FD; }
.who-chip.k-auto { color: #4A5468; background: #F6F7F9; }
.who-chip.k-you { color: #8A5A00; border-color: #F1DBB0; background: #FFFAF0; }
.who-chip.next { opacity: .6; border-style: dashed; }

/* --- Run replay ------------------------------------------------------------------------------------ */
.replay-tag { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 10px; border-radius: 999px; background: #EFEAFB; color: #5A3BA8; margin-right: 4px; }
.rl-sum { padding: 10px 14px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; }
.replay-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }

/* --- Coming next ----------------------------------------------------------------------------------- */
.nx-hero { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 30px 32px; margin-bottom: 26px; box-shadow: var(--shadow);
  background-image: radial-gradient(600px 220px at 100% 0%, rgba(155, 18, 48, .07), transparent 70%), radial-gradient(500px 200px at 0% 100%, rgba(110, 75, 194, .06), transparent 70%); }
.nx-hero h1 { font-size: 32px; font-weight: 400; margin: 4px 0 8px; }
.nx-hero h1 b { font-weight: 700; }
.nx-lead { max-width: 760px; font-size: 16px; color: #4A5468; margin: 0 0 20px; line-height: 1.55; }
.nx-from-to { display: flex; align-items: stretch; gap: 12px; flex-wrap: wrap; }
.nx-from-to > div:not(.nx-arrow) { flex: 1; min-width: 220px; border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; background: #fff; display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.nx-from-to .nx-next { border-color: rgba(155, 18, 48, .35); background: #FFF6F7; }
.nx-label { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.nx-next .nx-label { color: var(--brand); }
.nx-arrow { display: grid; place-items: center; color: var(--brand); }
.nx-theme { margin-bottom: 28px; }
.nx-theme-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.nx-theme-head h2 { margin: 0; font-size: 20px; }
.nx-theme-head p { margin: 0; }
.nx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.nx-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 18px 18px 14px; box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s; }
.nx-card:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(16, 24, 40, .08); }
.nx-suggested { border-style: dashed; }
.nx-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.nx-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: #FFF0F2; color: var(--brand); }
.nx-suggested .nx-icon { background: #EFEAFB; color: #6E4BC2; }
.nx-tag { font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: #F1F2F5; color: #4A5468; }
.nx-connector { background: #EAF1FF; color: #1F4FB8; } .nx-workflow { background: #E3F5EC; color: #0E7A4E; }
.nx-ambitious { background: #FFF1D9; color: #8A5A00; } .nx-automation { background: #EFEAFB; color: #5A3BA8; } .nx-measurement { background: #E6F4FA; color: #0B6B8F; } .nx-learning { background: #FDECEF; color: #A3122A; } .nx-suggested.nx-card .nx-tag { background: #EFEAFB; color: #5A3BA8; }
.nx-card h3 { margin: 0 0 4px; font-size: 16px; }
.nx-what { margin: 0 0 10px; color: #4A5468; font-size: 14px; }
.nx-card ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: #4A5468; }
.nx-foot { margin-top: 4px; }

/* --- Start: modern two-column brief ---------------------------------------------------------------- */
.st-head h1 { margin: 2px 0 4px; }
.st-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; align-items: start; }
.st-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.st-form { display: flex; flex-direction: column; gap: 16px; max-width: none; }
.st-card { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 18px 20px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 12px; }
.st-card-head { display: flex; align-items: center; gap: 10px; }
.st-card-head h2 { margin: 0; font-size: 17px; }
.st-num { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: #fff; font-size: 13px; font-weight: 700; }
.st-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.st-field { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 500; color: #4A5468; }
.st-field input, .st-field select { font-size: 15px; }
.st-ask { width: 100%; font-size: 15px; line-height: 1.55; border-radius: 12px; }
.st-label { margin: 0; font-size: 13px; font-weight: 500; color: #4A5468; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { position: relative; cursor: pointer; }
.pill input { position: absolute; opacity: 0; pointer-events: none; }
.pill span { display: inline-block; padding: 8px 16px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; font-size: 14px; color: #3A4252; transition: all .15s; }
.pill:hover span { border-color: #C9CDD6; }
.pill input:checked + span { border-color: var(--brand); background: #FFF0F2; color: var(--brand); font-weight: 600; }
.pill input:focus-visible + span { outline: 2px solid var(--link); outline-offset: 2px; }
.st-drop { position: relative; display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1.5px dashed #C9CDD6; border-radius: 14px; cursor: pointer; color: #4A5468; font-weight: 400; }
.st-drop:hover { border-color: var(--brand); background: #FFFAFB; }
.st-drop input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.st-save { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 14px 20px; box-shadow: var(--shadow); }
.st-save .draws-line { margin: 0 0 10px; }
.st-run { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 20px; border-radius: 18px; border: 1.5px solid rgba(155, 18, 48, .35); background: #FFF6F7; }
.st-run-title { font-weight: 600; margin-bottom: 2px; }
button.big { font-size: 16px; padding: 10px 26px; display: inline-flex; align-items: center; gap: 8px; }
.st-side { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 14px; }
.side-card h3 { margin: 0; font-size: 15px; }
.page-runs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.page-runs a { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); text-decoration: none; }
.page-runs a:hover { border-color: var(--brand); background: #FFFAFB; }
.pr-date { font-weight: 600; font-size: 14px; }
.pr-meta { width: 100%; }
@media (max-width: 1000px) { .st-layout { grid-template-columns: 1fr; } .st-side { position: static; } .st-row { grid-template-columns: 1fr; } }

/* --- Profile ----------------------------------------------------------------------------------------- */
.pf-head { display: flex; align-items: center; gap: 18px; margin-bottom: 18px; }
.pf-head h1 { margin: 2px 0 2px; }
.pf-avatar { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-size: 26px; font-weight: 700; color: #fff; background: var(--brand); flex: none; }
.pf-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; align-items: start; max-width: 960px; }
.pf-ic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: #FFF0F2; color: var(--brand); }
.me-link { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; flex: 1; min-width: 0; border-radius: 10px; padding: 4px; margin: -4px; }
.me-link:hover { background: var(--wash); text-decoration: none; }
