/* Living Office (E01): WanOS Console identity over the existing native components.
   Formerly «Cristal técnico». The file keeps its name because the public shell lists it.
   Every color is a token; the palette and the two typefaces come from the Living Office design. */
@font-face { font-family: 'Instrument Sans'; src: url('/fonts/InstrumentSans-Variable.woff2') format('woff2'); font-weight: 400 700; font-stretch: 75% 100%; font-style: normal; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url('/fonts/JetBrainsMono-Variable.woff2') format('woff2'); font-weight: 100 800; font-style: normal; font-display: swap; }
:root {
  --lo-bg: #0d0c0b;
  --lo-glow: #1b1815;
  --lo-surface: #151412;
  --lo-surface-raised: #1d1b18;
  --lo-surface-sunken: #121110;
  --lo-surface-hover: #24211d;
  --lo-line: #2e2a25;
  --lo-line-strong: #433d35;
  --lo-line-hover: #5e564b;
  --lo-ivory: #f3ecdf;
  --lo-ivory-2: #e6ddcd;
  --lo-ivory-3: #d8cfbf;
  --lo-ivory-4: #c9bfae;
  --lo-muted: #a69c8d;
  --lo-subtle: #9c9384;
  --lo-crimson: #b22222;
  --lo-crimson-deep: #8f1b1b;
  --lo-crimson-light: #ef5350;
  --lo-crimson-soft: #f28b82;
  --lo-crimson-tint: #2a1616;
  --lo-on-crimson: #fff;
  --lo-amber: #d9a441;
  --lo-amber-light: #e6c07a;
  --lo-amber-tint: #2a2112;
  --lo-amber-line: #6b5226;
  --lo-violet: #a99ed6;
  --lo-violet-line: #514a73;
  --lo-green: #7fa37a;
  --lo-green-tint: #1c241b;
  --lo-green-line: #3d5a3a;
  --lo-scrim: rgba(8, 7, 6, .62);
  --lo-veil: rgba(13, 12, 11, .5);
  --lo-edge: rgba(243, 236, 223, .08);
  --lo-edge-strong: rgba(243, 236, 223, .14);
  --lo-crimson-edge: rgba(178, 34, 34, .35);
  --lo-sheen: rgba(243, 236, 223, .03);
  --lo-shadow: 0 24px 40px -24px rgba(0, 0, 0, .9), inset 0 1px 0 rgba(255, 245, 230, .05);
  --lo-rail: linear-gradient(180deg, #1a1815, #100f0e);
  --lo-room: linear-gradient(180deg, var(--lo-surface-raised), var(--lo-surface));
  --lo-room-warm: linear-gradient(180deg, #221e1a, #171512);
  --lo-side-panel: linear-gradient(180deg, #171412, #100e0d);
  --lo-side-panel-solid: #141210;
  --lo-side-shadow: -10px 0 30px rgba(0, 0, 0, .35);
  /* The Oficina's floor, rooms and cards, from the pinned design (E02). */
  --lo-floor-line: rgba(243, 236, 223, .025);
  --lo-floor-glow: rgba(178, 34, 34, .07);
  --lo-floor-glow-amber: rgba(217, 164, 65, .05);
  --lo-sheen-soft: rgba(243, 236, 223, .02);
  --lo-sheen-strong: rgba(243, 236, 223, .05);
  --lo-edge-soft: rgba(243, 236, 223, .06);
  --lo-edge-mid: rgba(243, 236, 223, .12);
  --lo-crimson-wash: rgba(178, 34, 34, .08);
  --lo-crimson-card-edge: rgba(178, 34, 34, .3);
  --lo-crimson-hot: rgba(178, 34, 34, .15);
  --lo-crimson-hot-edge: rgba(178, 34, 34, .6);
  --lo-crimson-glow: rgba(178, 34, 34, .18);
  --lo-crimson-ring: rgba(178, 34, 34, .5);
  --lo-crimson-dock-edge: rgba(178, 34, 34, .55);
  --lo-amber-wash: rgba(217, 164, 65, .08);
  --lo-amber-card-edge: rgba(217, 164, 65, .3);
  --lo-amber-room-edge: rgba(217, 164, 65, .25);
  --lo-amber-glow: rgba(217, 164, 65, .1);
  --lo-room-quiet: linear-gradient(180deg, #1b1a1a, #141313);
  --lo-room-card: linear-gradient(180deg, #1c1a17, #141311);
  --lo-room-core: linear-gradient(180deg, #1a1917, #121110);
  --lo-room-jarwan: linear-gradient(180deg, #1a1715, #12100f);
  --lo-jarwan-button: linear-gradient(180deg, #2a1414, #1c1010);
  --lo-card-hot: linear-gradient(180deg, rgba(178, 34, 34, .12), rgba(178, 34, 34, .04));
  --lo-crimson-line: rgba(178, 34, 34, .4);
  --lo-room-focus: linear-gradient(180deg, #201c17, #161412);
  --lo-dock-main: linear-gradient(180deg, #2a1616, #1a0f0f);
  --lo-shadow-card: 0 18px 30px -20px rgba(0, 0, 0, .9);
  --lo-shadow-warm: 0 24px 40px -24px rgba(0, 0, 0, .9), inset 0 1px 0 rgba(255, 245, 230, .06);
  --lo-shadow-jarwan: 0 30px 60px -30px rgba(178, 34, 34, .5), inset 0 1px 0 rgba(255, 245, 230, .06);
  --lo-shadow-dock: 0 20px 50px -20px rgba(178, 34, 34, .5), 0 -10px 30px -10px rgba(13, 12, 11, .9);
  --lo-shadow-chip: 0 -10px 30px -10px rgba(13, 12, 11, .9);
  --focus: var(--lo-crimson-light);
  --font-sans: 'Instrument Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Consolas, monospace;
  /* Names that styles.css and the views already use. */
  --brand: var(--lo-crimson);
  --bg: var(--lo-bg);
  --panel: var(--lo-surface);
  --panel-raised: var(--lo-surface-raised);
  --line: var(--lo-line);
  --text: var(--lo-ivory);
  --muted: var(--lo-muted);
  --subtle: var(--lo-subtle);
  --accent: var(--lo-crimson-light);
  --cyan: var(--lo-ivory-3);
  --orange: var(--lo-amber);
  --purple: var(--lo-violet);
  --success: var(--lo-green);
  font-family: var(--font-sans);
  font-size: 16px;
  background: var(--bg);
}
body { background: radial-gradient(1200px 600px at 50% -10%, var(--lo-glow), transparent 60%), var(--bg); }
button { background: var(--lo-surface-raised); border-color: var(--lo-line-strong); border-radius: 8px; transition: background 140ms, border-color 140ms, box-shadow 140ms; }
button:hover { background: var(--lo-surface-hover); border-color: var(--lo-line-hover); }
button.primary { background: var(--brand); border-color: var(--brand); color: var(--lo-on-crimson); }
button.primary:hover { background: var(--lo-crimson-deep); border-color: var(--lo-crimson-light); box-shadow: 0 3px 18px color-mix(in srgb, var(--brand) 13%, transparent); }
button.small { font-size: 13px; }
/* Keyboard focus: 2 px light crimson on every element that shows it. */
:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }
input, textarea, select { background: var(--lo-surface-sunken); border-color: var(--lo-line-strong); font-size: 16px; }
input:focus, textarea:focus, select:focus { outline-color: var(--focus); }
input::placeholder, textarea::placeholder { color: var(--lo-subtle); }
label { font-size: 14px; color: var(--lo-ivory-3); }
small, .meta { font-size: 12px; color: var(--muted); }
.eyebrow, .breadcrumb, .next-label, .mission-meta, code, kbd, pre, samp { font-family: var(--font-mono); }
.eyebrow { font-size: 12px; letter-spacing: 1.3px; color: var(--muted); }
.eyebrow.accent { color: var(--accent); }
h1 { font-size: 32px; letter-spacing: -.8px; }
h2 { font-size: 21px; }
h3 { font-size: 17px; }
.text-button { color: var(--lo-ivory-3); font-size: 14px; }
.text-button:hover { color: var(--lo-ivory); }
a:hover { color: var(--lo-crimson-light); }
.badge, .quiet-badge { font-size: 12px; background: var(--lo-surface-hover); color: var(--lo-ivory-3); }
.quiet-badge { border-color: var(--lo-line-strong); background: transparent; }
.status-active, .status-completed, .status-verified, .status-reading, .status-writing, .status-available, .status-connected { color: var(--success); background: var(--lo-green-tint); }
.status-active::before, .status-completed::before, .status-verified::before { content: '✓'; }
.status-failed, .status-error { color: var(--lo-crimson-soft); background: var(--lo-crimson-tint); }
.status-failed::before { content: '×'; }
.status-verify, .status-approval_required, .status-blocked, .status-waiting_input, .status-permission, .status-cancel_unknown { color: var(--orange); background: var(--lo-amber-tint); }
.status-verify::before, .status-approval_required::before, .status-blocked::before, .status-cancel_unknown::before { content: '⚠'; }
.status-not_configured { color: var(--lo-ivory-4); background: var(--lo-surface-hover); }
/* Living Office shell (E02): top bar, Trabajo layer and side panels; the Oficina itself is in rooms.css.
   An element marked hidden is hidden, whatever display its component sets (buttons are inline-flex). */
[hidden] { display: none !important; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--lo-line); border-radius: 4px; }
/* The startup screen keeps its «W» mark (E01). */
.brand { margin-bottom: 42px; }
.brand-mark { color: var(--lo-on-crimson); background: var(--brand); border-radius: 9px; font-size: 26px; padding: 7px 10px; letter-spacing: -3px; transform: none; }
.brand small { color: var(--muted); letter-spacing: 1.7px; font-size: 11px; font-family: var(--font-mono); }
/* The access screen wears the top bar's brand (E07): its crimson square and «WANOS // CONSOLE», whole at every width. */
.auth-page > .brand { gap: 10px; font-family: var(--font-mono); font-size: 12px; font-weight: 600; letter-spacing: .12em; color: var(--lo-ivory); white-space: nowrap; }
.auth-page > .brand small { display: inline; margin: 0; font: inherit; letter-spacing: inherit; color: var(--lo-ivory); }
:root { --lo-topbar-h: 56px; --lo-main-pad-x: 28px; }
html { scroll-padding-top: calc(var(--lo-sticky-top, var(--lo-topbar-h)) + 12px); scroll-padding-bottom: calc(var(--lo-sticky-bottom, 0px) + 12px); }
.skip-link { z-index: 100; }
.layout { display: grid; min-height: 100vh; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto 1fr; grid-template-areas: "top" "nav" "main"; }
.layout[data-panel="notes"], .layout[data-panel="jarwan"] { grid-template-columns: minmax(0, 1fr) 340px; grid-template-areas: "top top" "nav panel" "main panel"; }
.topbar { grid-area: top; position: sticky; top: 0; z-index: 40; height: var(--lo-topbar-h); margin: 0; padding: 0 16px; display: flex; align-items: center; justify-content: flex-start; gap: 10px; min-width: 0; background: var(--lo-rail); border: 0; border-bottom: 1px solid var(--lo-edge); }
.topbar .brand { display: flex; align-items: center; gap: 10px; flex: none; margin: 0; font-family: var(--font-mono); font-size: 12px; font-weight: 600; letter-spacing: .12em; color: var(--lo-ivory); white-space: nowrap; }
.topbar-mark { flex: none; width: 10px; height: 10px; border-radius: 2px; background: var(--brand); box-shadow: 0 0 12px var(--lo-crimson-edge); }
.brand-sep { color: var(--subtle); }
.topbar .brand small { display: inline; margin: 0; font: inherit; letter-spacing: inherit; color: var(--lo-ivory); }
.layer-switch { display: flex; flex: none; gap: 2px; padding: 2px; border: 1px solid var(--lo-edge-strong); border-radius: 7px; background: var(--lo-surface-sunken); }
.layer-switch button { min-height: 32px; padding: 6px 11px; border: 0; border-radius: 5px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 600; }
.layer-switch button:hover { background: var(--lo-surface-hover); color: var(--lo-ivory); }
.layer-switch button[aria-current] { background: var(--lo-ivory); color: var(--lo-bg); }
.office-back { flex: 0 1 auto; min-width: 0; min-height: 34px; padding: 6px 10px; gap: 4px; border: 1px solid var(--lo-edge-strong); background: transparent; color: var(--lo-ivory); font-size: 13px; white-space: nowrap; }
.office-back-view { min-width: 0; max-width: 220px; margin-left: 4px; overflow: hidden; text-overflow: ellipsis; font-family: var(--font-mono); font-size: 12px; color: var(--subtle); }
.topbar-spacer { flex: 1 1 0; min-width: 0; }
.topbar-counters { flex: none; min-height: 34px; padding: 6px 8px; gap: 14px; border: 0; background: transparent; font-family: var(--font-mono); font-size: 12px; color: var(--lo-ivory-3); white-space: nowrap; }
.topbar-counters:hover { background: var(--lo-surface-hover); }
.counter { display: inline-flex; align-items: center; gap: 6px; }
.counter .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }
.counter-blocked .dot { background: var(--orange); }
.topbar-clock { flex: none; font-family: var(--font-mono); font-size: 12px; color: var(--lo-ivory); }
/* «Buscar o hacer…» opens the palette (E03): the search itself lives in the Trabajo bar, as in the design. */
.palette-button { flex: none; min-height: 34px; padding: 6px 10px; gap: 8px; border: 1px solid var(--lo-edge-strong); border-radius: 6px; background: var(--lo-surface-sunken); color: var(--lo-muted); font-size: 12px; font-weight: 500; white-space: nowrap; }
.palette-button:hover { border-color: var(--lo-line-hover); background: var(--lo-surface-sunken); color: var(--lo-ivory); }
.palette-button .icon { width: 14px; height: 14px; }
.palette-button kbd, .work-search kbd { padding: 1px 6px; border: 1px solid var(--lo-edge-strong); border-radius: 4px; background: transparent; font-family: var(--font-mono); font-size: 12px; color: var(--lo-subtle); }
/* The top bar's Jarwan button as in the design (E06): a crimson edge, Jarwan's square and its name. */
.panel-tools [data-action="chat"] { gap: 8px; min-height: 32px; padding: 6px 10px; border: 1px solid var(--lo-crimson-ring); border-radius: 6px; background: var(--lo-jarwan-button); color: var(--lo-ivory); font-size: 12px; font-weight: 600; }
.panel-tools [data-action="chat"]:hover { border-color: var(--brand); background: var(--lo-jarwan-button); }
.jarwan-square { flex: none; width: 8px; height: 8px; border-radius: 1px; background: var(--brand); }
.panel-tools { display: flex; align-items: center; gap: 5px; flex: none; }
.panel-tools button { min-height: 32px; }
.panel-tools button[aria-expanded="true"] { background: color-mix(in srgb, var(--brand) 15%, transparent); border-color: var(--lo-crimson); color: var(--lo-ivory); }
/* The Trabajo layer as the design (E06, LIVING-OFFICE §9.3): its six tabs, «Buscar en todo…» and Conexiones under the top
   bar; hidden in the Oficina. On phones the same bar wraps in place, as the design's: there is no menu any more. */
.sidebar.work-nav { grid-area: nav; position: sticky; top: var(--lo-topbar-h); z-index: 35; height: auto; display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 6px; padding: 14px 20px; background: var(--lo-bg); border: 0; border-bottom: 1px solid var(--lo-edge); }
.layout[data-layer="office"] .sidebar.work-nav { display: none; }
.work-tabs { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.work-tabs button { min-height: 30px; padding: 7px 12px; gap: 6px; border: 0; border-radius: 6px; background: transparent; color: var(--lo-muted); font-size: 13px; font-weight: 600; line-height: 16px; }
.work-tabs button:hover { background: var(--lo-surface-hover); color: var(--lo-ivory); }
.work-tabs button.on { background: var(--lo-ivory); color: var(--lo-bg); }
.work-tabs button.on .count { background: var(--lo-bg); color: var(--lo-ivory); }
.work-tabs .count:empty { display: none; }
.count { background: var(--lo-crimson-tint); color: var(--lo-ivory); font-family: var(--font-mono); font-size: 12px; }
.work-link { flex: none; min-height: 34px; padding: 6px 10px; gap: 6px; border: 1px solid transparent; color: var(--lo-ivory-3); font-size: 12px; }
.work-link .icon { width: 14px; height: 14px; }
.main { grid-area: main; padding: 24px var(--lo-main-pad-x); min-width: 0; }
.main-footer { border-color: var(--line); color: var(--subtle); margin-top: 36px; }
.page-head { margin-bottom: 24px; }
.page-head .eyebrow { display: none; }
.page-head p { font-size: 16px; color: var(--muted); }
.panel, .project-card, .mission-card, .note-card, .idea-card, .connection-card, .session-card, .resume-card {
  background: var(--lo-room);
  border: 1px solid var(--lo-edge);
  border-radius: 10px;
  box-shadow: var(--lo-shadow);
}
.panel-head { border-color: var(--line); padding: 19px 22px; }
.panel-head h2 { font-size: 18px; }
.panel-body { padding: 22px; }
.panel-body > p, .project-summary, .next-action > p, .mission-card > p, .note-card > p, .idea-card > p { font-size: 16px; }
.home-priority { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(245px, 1fr); gap: 20px; align-items: stretch; }
.resume-card { padding: 28px; background: radial-gradient(ellipse at 0 0, color-mix(in srgb, var(--brand) 8%, transparent), transparent 70%), var(--lo-room-warm); border-top: 2px solid var(--brand); }
.resume-card::after, .resume-card::before { display: none; }
.resume-card h2 { font-size: 28px; line-height: 1.25; margin: 18px 0 14px; color: var(--text); }
.resume-card > p { font-size: 16px; color: var(--lo-ivory-3); }
.resume-next { background: var(--lo-veil); border-left: 2px solid var(--brand); padding: 14px 16px; margin: 20px 0; }
.resume-next strong { font-size: 16px; color: var(--lo-ivory); font-weight: 500; }
.next-label { color: var(--lo-crimson-light); font-size: 11px; }
.resume-card > .flex.wrap button { font-size: 14px; }
details { background: var(--lo-surface-sunken); border-color: var(--lo-line-strong); font-size: 14px; padding: 8px 12px; }
details > summary { color: var(--lo-ivory-4); font-size: 13px; cursor: pointer; padding: 6px 0; line-height: 1.5; }
details[open] > summary { color: var(--lo-ivory); }
.resume-source { margin-top: 16px; }
.home-attention { margin-top: 20px; }
.home-attention .panel-body { padding-top: 14px; padding-bottom: 14px; }
.attention-list article { border-color: var(--line); }
.attention-list p { font-size: 15px; }
.attention-list h3 { font-size: 16px; }
.attention-clear { display: flex; align-items: center; gap: 12px; color: var(--muted); }
.attention-clear .icon { color: var(--success); }
.section-title { margin-top: 30px; }
.section-title h2 { font-size: 22px; }
.project-grid { grid-template-columns: repeat(auto-fit, minmax(min(255px, 100%), 1fr)); gap: 18px; }
.project-grid > .project-card:nth-child(3):last-child { grid-column: auto; }
.project-card { padding: 22px 22px 0; border-top: 1px solid var(--lo-edge-strong); }
.project-mark, .color-cyan .project-mark, .color-orange .project-mark, .color-violet .project-mark, .color-green .project-mark { color: var(--lo-ivory-2); background: var(--lo-surface-hover); border: 1px solid var(--lo-line-strong); }
.project-title h3 { font-size: 20px; }
.project-summary { margin: 16px 0; }
.next-action { background: var(--lo-surface-sunken); border-color: var(--lo-line-strong); }
.next-action > span { color: var(--subtle); font-size: 12px; font-family: var(--font-mono); }
.project-foot { color: var(--muted); font-size: 12px; }
.project-card > .provenance { background: var(--lo-surface-sunken); border-color: var(--line); margin-left: -22px; margin-right: -22px; padding: 12px 22px; font-size: 12px; }
.home-more { border-top: 1px solid var(--line); margin-top: 28px; padding-top: 8px; }
.source-refresh, .filter-notice, .registry-reference, .canonical-fact, .selection-note, .notice, .mission-flow { background: var(--lo-surface-raised); border-color: var(--lo-line-strong); color: var(--lo-ivory-2); }
.source-state, .fact-provenance { font-size: 12px; }
.source-refresh { margin-top: 12px; }
.toolbar .selected, .filter.selected, .toolbar .filter.selected { background: color-mix(in srgb, var(--brand) 19%, transparent); border-color: var(--brand); color: var(--lo-ivory); }
.detail-back { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; margin-bottom: 20px; }
.mission-contract { margin-top: 20px; }
.mission-meta, .mission-meta span { font-size: 12px; }
.mission-actions { border-color: var(--line); }
.note-card p, #notes-conflict p { white-space: pre-wrap; }
.empty p { font-size: 15px; }
.empty h3 { font-size: 17px; }
.event p { font-size: 15px; }
.event time, .event-meta { font-size: 12px; }
dialog { background: var(--lo-surface); border-color: var(--lo-line-strong); }
dialog p { font-size: 16px; }
pre { background: var(--lo-surface-sunken); border-color: var(--lo-line-strong); white-space: pre-wrap; overflow-wrap: anywhere; }
.notice.warning { background: var(--lo-amber-tint); border-color: var(--lo-amber-line); color: var(--lo-amber-light); }
.notice.warning > strong { color: var(--lo-amber); }
.review-banner { background: var(--lo-amber-tint); border-color: var(--lo-amber-line); color: var(--lo-amber-light); }
.notes-panel, .jarwan {
  grid-area: panel; position: sticky; top: var(--lo-topbar-h); height: calc(100dvh - var(--lo-topbar-h)); width: auto; min-width: 0; transform: none;
  display: flex; flex-direction: column; padding: 0;
  background: var(--lo-side-panel);
  border-left: 1px solid var(--lo-edge-strong); box-shadow: var(--lo-side-shadow);
  z-index: 30; overflow: auto; animation: panel-enter 160ms ease-out;
}
.notes-panel[hidden], .jarwan[hidden], .panel-scrim[hidden] { display: none !important; }
.context-head, .jarwan-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 24px 22px 20px; border-bottom: 1px solid var(--line); }
.context-head h2 { display: flex; align-items: center; gap: 9px; margin-top: 8px; font-size: 22px; }
.jarwan { border-left-color: var(--lo-crimson-edge); }
.context-head .eyebrow { font-size: 11px; }
#notes-content { padding: 0 22px 24px; }
.notes-section { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 22px; }
.notes-section h3 { font-size: 14px; }
#notes-list { display: grid; gap: 6px; max-height: 180px; overflow: auto; margin: 8px 0 20px; }
.note-choice { display: grid; text-align: left; justify-content: stretch; gap: 4px; padding: 11px 12px; background: var(--lo-sheen); border: 1px solid var(--lo-edge); }
.note-choice strong { font-size: 14px; overflow-wrap: anywhere; }
.note-choice small { font-size: 12px; }
.note-choice.selected { background: color-mix(in srgb, var(--brand) 12%, transparent); border-color: var(--brand); }
.notes-empty { padding: 10px 0; }
.note-owner { display: flex; gap: 8px; align-items: center; color: var(--lo-ivory-3); font-size: 13px; padding-top: 18px; border-top: 1px solid var(--line); }
#notes-body { min-height: 200px; }
#notes-save { width: 100%; margin-top: 12px; }
#notes-status { font-size: 13px; color: var(--success); margin-top: 12px; line-height: 1.5; }
#notes-status.note-error { color: var(--lo-crimson-soft); }
.notes-storage { margin-top: 12px; }
.notes-placeholder { padding: 50px 0; display: grid; gap: 14px; color: var(--muted); }
.notes-placeholder > span { display: grid; place-items: center; width: 50px; height: 50px; background: var(--lo-sheen); border: 1px solid var(--line); border-radius: 12px; }
.notes-placeholder h3 { color: var(--text); }
.jarwan-head { flex-wrap: wrap; }
.jarwan-head .quiet-badge { margin-left: 0; }
.jarwan-intro { padding: 20px; }
.jarwan-intro > .sprite { display: none; }
.jarwan-intro h3 { font-size: 20px; }
.jarwan-intro p { font-size: 15px; }
.jarwan-context, .jarwan-compose { padding: 20px; border-color: var(--line); }
.chat-message { background: var(--lo-surface-raised); border-color: var(--lo-line-strong); }
.chat-message p { font-size: 15px; }
.chat-message.user { background: var(--lo-crimson-tint); border-color: var(--lo-crimson-edge); }
.panel-scrim { position: fixed; inset: 0; width: 100%; height: 100%; background: var(--lo-scrim); z-index: 49; border: 0; border-radius: 0; }
.panel-scrim:hover { background: var(--lo-scrim); }
@keyframes panel-enter { from { opacity: 0; transform: translateX(8px); } to { opacity: 1; transform: none; } }
@media (min-width: 1101px) and (max-width: 1400px) {
  .layout[data-panel="notes"], .layout[data-panel="jarwan"] { grid-template-columns: minmax(0, 1fr) 310px; }
  :root { --lo-main-pad-x: 24px; }
  .context-open .home-priority { grid-template-columns: 1fr; }
}
@media (max-width: 1279px) {
  .topbar-clock { display: none; }
  .office-back-view { max-width: 140px; }
}
@media (max-width: 1100px) {
  .layout, .layout[data-panel="notes"], .layout[data-panel="jarwan"] { grid-template-columns: minmax(0, 1fr); grid-template-areas: "top" "nav" "main"; }
  :root { --lo-main-pad-x: 24px; }
  .home-priority { grid-template-columns: 1fr; }
  .context-overlay { overflow: hidden; }
  .context-overlay .notes-panel, .context-overlay .jarwan { background: var(--lo-side-panel-solid); }
  .notes-panel, .jarwan, .chat-open .jarwan { position: fixed; inset: 0 0 0 auto; width: min(390px, 100%); height: 100dvh; z-index: 50; transform: none; }
  .topbar-counters, .office-back-view { display: none; }
}
@media (max-width: 760px) {
  .topbar { padding: 0 10px; gap: 6px; }
  .brand-rest, .office-back-label { display: none; }
  .layer-switch button { padding: 6px 9px; }
  .panel-tools button { min-height: 40px; min-width: 40px; padding: 8px 9px; }
  /* Icon buttons on phones: the label stays as their accessible name. */
  .panel-tools button > span { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
  /* The Trabajo bar in place, as the design at 390 px: the tabs wrap and the search goes below; it scrolls with the page. */
  /* The old drawer of styles.css (fixed, 245 px, moved out and hidden below 701 px) no longer applies. */
  .sidebar.work-nav { position: static; width: auto; height: auto; padding: 14px 20px; transform: none; visibility: visible; transition: none; }
  .work-link { min-width: 36px; padding: 6px 8px; }
  .work-link > span { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
  /* The whole bar fits a 360 px phone, also with «← Oficina»: an overflowing bar makes the phone zoom the page out. */
  @media (max-width: 480px) {
    .topbar { padding: 0 8px; gap: 4px; }
    .topbar .brand-name { display: none; }
    .topbar:has(.office-back:not([hidden])) .brand { display: none; }
    .layer-switch button { padding: 6px 8px; font-size: 12px; }
    .office-back { padding: 6px 9px; }
    .panel-tools button { min-width: 36px; padding: 7px; }
  }
  :root { --lo-main-pad-x: 16px; }
  .page-head { align-items: flex-start; gap: 12px; }
  .page-head h1 { font-size: 28px; overflow-wrap: anywhere; }
  .page-head p { font-size: 16px; }
  .page-head > button { font-size: 12px; padding: 8px; flex-shrink: 0; }
  .resume-card { padding: 23px; }
  .resume-card h2 { font-size: 26px; }
  .resume-card > p, .resume-next strong { font-size: 16px; }
  #notes-list { max-height: 128px; }
  #notes-body { min-height: 160px; }
  .project-grid { grid-template-columns: 1fr; }
  .project-card > .meta { font-size: 12px; }
  .project-summary, .next-action > p, .panel-body > p { font-size: 16px; }
  .project-card > .provenance { font-size: 12px; }
  .two-columns, .notes-grid, .connection-grid { grid-template-columns: 1fr; }
  .section-title h2 { font-size: 21px; }
  .main-footer { flex-wrap: wrap; gap: 10px; }
  .main-footer span { font-size: 12px; }
  .review-banner { padding: 14px; }
  .review-banner span { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
.reduced-motion *, .reduced-motion *::before, .reduced-motion *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }

.auth-card { background: var(--lo-surface); border-color: var(--line); }
.auth-card > p, .auth-card input { font-size: 16px; }

/* Mapa del sistema: estados con texto y forma, no solo color; sin indicadores «en vivo». */
.map-status p { font-size: 14px; margin: 6px 0 0; }
.map-legend { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 12px; margin: 16px 0 6px; }
.map-legend > div { display: grid; gap: 8px; align-content: start; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--lo-surface-sunken); }
.map-legend p { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.5; }
.map-state { display: inline-flex; align-items: center; gap: 6px; width: fit-content; padding: 4px 9px; border: 1px solid; border-radius: 6px; font-size: 12px; font-weight: 600; line-height: 1.4; }
.map-state-documented { color: var(--lo-ivory); background: var(--lo-surface-hover); border-color: var(--lo-line-hover); }
.map-state-proposed { color: var(--lo-crimson-soft); background: transparent; border-color: var(--brand); border-style: dashed; }
.map-state-pending { color: var(--orange); background: var(--lo-amber-tint); border-color: var(--lo-amber-line); border-style: dotted; }
.map-state-unknown { color: var(--lo-amber-light); border-color: var(--lo-amber-line); }
.map-status > .small { margin-top: 10px; }
.map-toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 4px; }
.map-toc button { border: 1px solid var(--lo-line-strong); background: var(--lo-surface-raised); }
.map-toc button:hover { border-color: var(--brand); background: var(--lo-surface-hover); }
.map-section { margin-top: 34px; }
.map-section > h2 { font-size: 22px; margin: 0 0 14px; scroll-margin-top: 16px; }
.map-section > h2:focus-visible { outline: 2px solid var(--focus); outline-offset: 6px; border-radius: 4px; }
.map-intro { font-size: 15px; color: var(--muted); max-width: 72ch; margin: 0 0 14px; }
.map-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 16px; }
.map-card { display: grid; align-content: start; gap: 10px; min-width: 0; padding: 20px; background: var(--lo-room); border: 1px solid var(--lo-edge); border-radius: 10px; }
.map-card h3 { margin: 0; font-size: 17px; }
.map-card p, .map-card li { font-size: 15px; line-height: 1.55; margin: 0; overflow-wrap: anywhere; }
.map-facts { display: grid; gap: 4px; margin: 0; }
.map-facts dt { font-family: var(--font-mono); font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--subtle); margin-top: 6px; }
.map-facts dd { margin: 0; font-size: 15px; line-height: 1.55; overflow-wrap: anywhere; }
.map-claims { list-style: none; margin: 4px 0 0; padding: 12px 0 0; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.map-claims li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; font-size: 14px; }
.map-refs { font-size: 12px; color: var(--muted); }
.map-refs a { color: var(--lo-ivory-3); text-decoration: underline; text-underline-offset: 2px; }
.map-flow { list-style: none; margin: 0; padding: 0; display: grid; gap: 26px; }
.map-layer { position: relative; padding: 18px 20px; background: var(--lo-surface); border: 1px solid var(--lo-edge); border-radius: 10px; }
.map-layer:not(:last-child)::after { content: ''; position: absolute; left: 33px; bottom: -27px; height: 26px; border-left: 2px dashed var(--lo-line-hover); }
.map-layer > p { font-size: 15px; line-height: 1.55; margin: 8px 0 0; max-width: 80ch; }
.map-layer-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; }
.map-layer-head h3 { margin: 0; font-size: 17px; }
.map-layer-step { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--brand); background: color-mix(in srgb, var(--brand) 16%, transparent); color: var(--lo-ivory); font-size: 13px; font-weight: 700; flex-shrink: 0; }
.map-nodes { list-style: none; margin: 12px 0 8px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.map-layer-parallel .map-nodes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr)); }
.map-node { display: grid; gap: 2px; min-width: 0; padding: 9px 12px; border: 1px solid var(--lo-line-strong); border-radius: 8px; background: var(--lo-surface-sunken); font-size: 14px; }
.map-node small { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.map-node-optional { border-style: dashed; }
.map-practical { margin-top: 20px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--lo-surface-sunken); }
.map-practical h3 { margin: 0 0 10px; font-size: 16px; }
.map-practical ol { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 10px; font-size: 14px; }
.map-practical li span { color: var(--muted); margin-right: 4px; }
.map-notes { margin: 16px 0; padding-left: 20px; display: grid; gap: 8px; }
.map-notes li, .map-principles p { font-size: 15px; line-height: 1.55; }
.map-principles { margin-top: 12px; }
.map-principles p { margin: 6px 0 0; }
.map-list { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.map-truths { display: grid; gap: 10px; margin: 0 0 12px; }
.map-truths > div { display: grid; grid-template-columns: minmax(150px, 220px) minmax(0, 1fr); gap: 6px 16px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--lo-surface-sunken); }
.map-truths dt { font-weight: 600; font-size: 15px; }
.map-truths dd { margin: 0; font-size: 15px; line-height: 1.55; }
.map-sources { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 10px; }
.map-sources li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: 14px; }
.map-sources .links, .map-sources a { margin: 0; }
.map-sources small { flex-basis: 100%; }
.map-limits { margin-top: 30px; }
.map-limits p { font-size: 14px; }

/* Flujo de misión: estado real del lifecycle y registro externo declarado. */
.mission-flow .text-button { margin-left: auto; font-size: 13px; }
.mission-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: 12px; font-size: 13px; color: var(--lo-ivory-2); }
.mission-tools small { color: var(--muted); }
.manual-note { display: grid; gap: 4px; margin-top: 12px; padding: 10px 12px; border: 1px dashed var(--lo-amber-line); border-radius: 8px; background: var(--lo-amber-tint); font-size: 13px; color: var(--lo-amber-light); }
.status-external { color: var(--lo-amber-light); background: var(--lo-amber-tint); }
.mission-flow-panel { margin-top: 20px; }
.flow-steps { list-style: none; margin: 0 0 16px; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.flow-step { display: flex; gap: 10px; align-items: flex-start; min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--lo-surface-sunken); }
.flow-step > div { display: grid; gap: 3px; min-width: 0; }
.flow-step strong { font-size: 15px; }
.flow-step small { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.flow-step-state { font-family: var(--font-mono); font-size: 11px; letter-spacing: .8px; text-transform: uppercase; color: var(--muted); }
.flow-step-mark { display: grid; place-items: center; flex: 0 0 26px; height: 26px; border-radius: 50%; border: 1px solid var(--lo-line-hover); font-size: 12px; font-weight: 700; color: var(--lo-ivory-2); }
.flow-step.is-done .flow-step-mark { color: var(--success); border-color: var(--lo-green-line); background: var(--lo-green-tint); }
.flow-step.is-current { border-color: var(--brand); box-shadow: inset 0 2px var(--brand); }
.flow-step.is-current .flow-step-state { color: var(--lo-crimson-light); }
.flow-step.is-blocked { border-color: var(--lo-amber-line); }
.flow-step.is-blocked .flow-step-state { color: var(--orange); }
.flow-step.is-skipped { opacity: .75; border-style: dashed; }
.flow-next { display: grid; gap: 6px; margin-bottom: 18px; padding: 14px 16px; border-left: 2px solid var(--brand); background: var(--lo-veil); }
.flow-next strong { font-size: 16px; font-weight: 500; color: var(--lo-ivory); }
.flow-grid, .flow-paths { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 16px; }
.flow-grid h3, .flow-path h3 { margin: 0 0 10px; font-size: 16px; }
.flow-grid .record-details { font-size: 14px; grid-template-columns: minmax(110px, 150px) minmax(0, 1fr); }
.flow-grid .record-details dt { color: var(--subtle); }
.flow-paths { margin-top: 18px; }
.flow-path { display: grid; align-content: start; gap: 10px; padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--lo-surface-sunken); min-width: 0; }
.flow-path p { margin: 0; font-size: 15px; line-height: 1.55; }
.manual-record { display: grid; gap: 12px; margin-top: 18px; padding: 16px; border: 1px dashed var(--lo-amber-line); border-radius: 10px; background: var(--lo-amber-tint); }
.manual-record h3 { margin: 0; font-size: 16px; }
.manual-record > p { margin: 0; font-size: 15px; white-space: pre-wrap; overflow-wrap: anywhere; }
.manual-record .record-details { font-size: 14px; grid-template-columns: minmax(110px, 150px) minmax(0, 1fr); }
.manual-record .record-details dd { white-space: pre-wrap; }
.manual-review { margin: 14px 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; }
.manual-review legend { padding: 0 6px; font-size: 14px; color: var(--lo-ivory-3); }
.manual-history > ol { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 10px; }
.manual-history li { display: grid; gap: 6px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--lo-surface-sunken); }
.manual-history li p { margin: 0; font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.manual-history .links { margin: 4px 0 0; }
.copy-text { width: 100%; min-height: 280px; font-family: var(--font-mono); font-size: 13px; line-height: 1.5; }
@media (max-width: 900px) { .flow-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) {
  .flow-steps { grid-template-columns: 1fr; }
  .map-truths > div { grid-template-columns: 1fr; }
  .flow-grid .record-details, .manual-record .record-details { grid-template-columns: 1fr; gap: 2px; }
  .flow-grid .record-details dd, .manual-record .record-details dd { margin-bottom: 8px; }
}

/* ── E03: the Trabajo search, the command palette and Jarwan's panel (LIVING-OFFICE §8). Only E01 tokens (D8). ── */
.sidebar.work-nav .work-search { flex: 0 1 280px; min-width: 170px; min-height: 34px; margin: 0 0 0 auto; padding: 0 8px 0 12px; display: flex; align-items: center; gap: 8px; border: 1px solid var(--lo-edge-mid); border-radius: 6px; background: var(--lo-surface-sunken); color: var(--lo-subtle); }
.sidebar.work-nav .work-search .icon { flex: none; width: 15px; height: 15px; }
.sidebar.work-nav .work-search input { flex: 1 1 auto; min-width: 0; min-height: 32px; padding: 7px 0; border: 0; border-radius: 0; background: transparent; font-size: 13px; outline-offset: 2px; }
@media (max-width: 960px) {
  .palette-button { min-width: 36px; padding: 7px 9px; }
  .palette-button-label, .palette-button kbd { display: none; }
}
@media (max-width: 760px) {
  .sidebar.work-nav .work-search { flex: 0 1 280px; min-width: 0; margin: 0; }
  .sidebar.work-nav .work-search input { font-size: 16px; }
  .sidebar.work-nav .work-search kbd { display: none; }
  .palette-button { min-height: 40px; min-width: 40px; }
}
@media (max-width: 480px) { .palette-button { min-width: 36px; padding: 7px; } }

/* The palette: a modal dialog of 640 px, 9 vh from the top, as the design; the whole screen on a phone. */
dialog.palette { width: min(640px, calc(100vw - 32px)); max-width: none; max-height: calc(100dvh - 9vh - 16px); margin: 9vh auto 0; padding: 0; border: 1px solid var(--lo-edge-strong); border-radius: 12px; background: var(--lo-side-panel-solid); color: var(--lo-ivory); box-shadow: 0 40px 80px -30px var(--lo-bg); overflow: hidden; }
dialog.palette::backdrop { background: rgba(8, 7, 6, .62); }
.palette-panel { display: flex; flex-direction: column; max-height: inherit; }
.palette-search { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--lo-edge); color: var(--lo-subtle); }
.palette-search .icon { flex: none; width: 16px; height: 16px; }
.palette-search input { flex: 1 1 auto; min-width: 0; min-height: 36px; padding: 4px 6px; border: 0; border-radius: 4px; background: transparent; color: var(--lo-ivory); font-size: 15px; }
.palette-search input:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.palette-search kbd { padding: 1px 6px; border: 1px solid var(--lo-edge-strong); border-radius: 4px; background: transparent; font-family: var(--font-mono); font-size: 12px; color: var(--lo-subtle); }
.palette-list { flex: 1 1 auto; min-height: 120px; overflow-y: auto; padding: 6px 0; }
.palette-group { padding: 6px 0; }
.palette-group-name { padding: 6px 14px 4px; font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--lo-subtle); }
.palette-row { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 9px 14px; cursor: pointer; }
.palette-row.is-active { background: var(--lo-crimson-tint); box-shadow: inset 0 0 0 1px var(--lo-crimson-light); }
.palette-row[aria-disabled="true"] { cursor: not-allowed; }
.palette-row[aria-disabled="true"] .palette-title { color: var(--lo-ivory-4); }
.palette-type { font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--lo-subtle); }
.palette-main { min-width: 0; display: grid; }
.palette-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 600; color: var(--lo-ivory); }
.palette-context { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: var(--lo-subtle); }
.palette-level { display: flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 12px; white-space: nowrap; color: var(--lo-muted); }
.palette-row.level-approval .palette-level { color: var(--lo-crimson-light); }
.palette-lock { width: 12px; height: 12px; flex: none; }
.palette-empty { margin: 0; padding: 18px 14px; font-size: 13px; color: var(--lo-subtle); }
.palette-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; padding: 10px 14px; border-top: 1px solid var(--lo-edge); font-family: var(--font-mono); font-size: 12px; color: var(--lo-subtle); }
.palette-keys { display: flex; flex-wrap: wrap; gap: 12px; }
.palette-safe { display: flex; align-items: center; gap: 6px; }
.palette-form, .palette-done { display: flex; flex-direction: column; gap: 6px; padding: 16px; overflow-y: auto; }
.palette-form-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; margin-bottom: 4px; }
.palette-form h2, .palette-done h2 { margin: 0; font-size: 16px; font-weight: 700; color: var(--lo-ivory); }
.palette-badge { font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--lo-subtle); }
.palette-form label { margin: 8px 0 2px; font-size: 12px; font-weight: 500; color: var(--lo-muted); }
.palette-form input, .palette-form select, .palette-form textarea { min-height: 38px; padding: 8px 12px; border-radius: 6px; font-size: 13px; background: var(--lo-surface-sunken); border-color: var(--lo-line-strong); }
.palette-form textarea { min-height: 70px; }
.palette-row3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0 12px; }
.palette-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.palette-note { font-size: 12px; color: var(--lo-subtle); }
.palette-error { margin: 4px 0 0; font-size: 13px; color: var(--lo-crimson-soft); }
.palette-error:empty { display: none; }
.palette-done { gap: 10px; padding: 22px 16px; }
.palette-done h2 { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.palette-done p { margin: 0; font-size: 13px; line-height: 1.5; color: var(--lo-muted); }
.palette-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); }
@media (max-width: 760px) {
  dialog.palette { width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border: 0; border-radius: 0; }
  .palette-panel { height: 100%; }
  .palette-row { grid-template-columns: 76px minmax(0, 1fr) auto; gap: 10px; }
  .palette-search input { font-size: 16px; }
  .palette-form input, .palette-form select, .palette-form textarea { font-size: 16px; }
}

/* Jarwan's panel as the design: its mark and role, the thread, the quick actions and the field (§8.7). */
@media (min-width: 1101px) { .layout[data-panel="jarwan"] { grid-template-columns: minmax(0, 1fr) 380px; } }
.jarwan { padding: 0; }
.jarwan .jarwan-head { flex-wrap: nowrap; align-items: center; justify-content: flex-start; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--lo-edge); }
.jarwan-mark-sm { flex: none; width: 30px; height: 30px; display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(4, 1fr); gap: 2px; padding: 4px; border: 1px solid var(--lo-crimson-ring); border-radius: 6px; background: var(--lo-bg); }
.jarwan-mark-sm > span.on { background: var(--brand); }
.jarwan-id { flex: 1 1 auto; min-width: 0; }
.jarwan-id h2 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; margin: 0; font-size: 14px; font-weight: 700; color: var(--lo-ivory); }
.jarwan-mode { font-size: 12px; font-weight: 500; color: var(--lo-subtle); }
.jarwan-role { margin: 2px 0 0; font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em; line-height: 1.4; text-transform: uppercase; color: var(--lo-subtle); }
.jarwan .jarwan-head .icon-button { flex: none; }
.jarwan .chat-messages { flex: 1 1 auto; min-height: 120px; max-height: none; margin: 0; padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; overflow-y: auto; }
.jarwan .chat-message { max-width: 92%; padding: 10px 12px; border-radius: 8px; }
.jarwan .chat-message.user { align-self: flex-end; }
.jarwan .chat-message p { font-size: 13px; line-height: 1.45; }
.jarwan .chat-message small, .jarwan .chat-message.user small { color: var(--lo-subtle); }
.jarwan .chat-message.jarwan-greeting { max-width: none; padding: 0; border: 0; border-radius: 0; background: transparent; }
.jarwan .jarwan-greeting p { font-size: 13px; line-height: 1.5; color: var(--lo-muted); }
.jarwan-items { display: grid; gap: 6px; margin-top: 10px; }
.jarwan-item { width: 100%; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr); justify-content: stretch; align-items: start; gap: 2px; margin: 0; padding: 8px 10px; border: 1px solid var(--lo-edge-strong); border-radius: 8px; background: var(--lo-sheen); color: var(--lo-ivory); font: inherit; text-align: left; }
.jarwan-item:hover { border-color: var(--lo-line-hover); background: var(--lo-sheen-strong); }
.jarwan .chat-message .jarwan-item { margin-top: 0; font-size: 12px; }
.jarwan-item-title { min-width: 0; font-size: 12px; font-weight: 600; overflow-wrap: anywhere; }
.jarwan-item-sub { min-width: 0; font-size: 12px; color: var(--lo-subtle); overflow-wrap: anywhere; }
.jarwan-item-level { margin-top: 2px; font-family: var(--font-mono); font-size: 12px; white-space: nowrap; color: var(--lo-muted); }
.jarwan-item.level-approval .jarwan-item-level { color: var(--lo-crimson-light); }
.jarwan .jarwan-compose { margin-top: 0; padding: 14px 18px; display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--lo-edge); }
.jarwan-quick { display: flex; flex-wrap: wrap; gap: 6px; }
.jarwan-chip { min-height: 30px; padding: 5px 10px; border: 1px solid var(--lo-edge-strong); border-radius: 14px; background: transparent; color: var(--lo-ivory); font-size: 12px; font-weight: 500; white-space: nowrap; }
.jarwan-chip:hover { border-color: var(--brand); background: transparent; }
.jarwan .jarwan-compose form { padding: 0; border: 0; background: none; display: grid; gap: 8px; }
.jarwan .jarwan-context { display: flex; align-items: center; gap: 8px; margin: 0; padding: 0; }
.jarwan .jarwan-context label { flex: none; margin: 0; font-size: 12px; color: var(--lo-subtle); letter-spacing: 0; }
.jarwan .jarwan-context select { flex: 0 1 auto; width: auto; max-width: 100%; min-width: 0; min-height: 28px; padding: 3px 8px; border: 1px solid var(--lo-edge-strong); border-radius: 6px; background: transparent; color: var(--lo-ivory-3); font-size: 12px; }
.jarwan-input { display: flex; align-items: center; gap: 8px; }
.jarwan .jarwan-input input { flex: 1 1 auto; min-width: 0; min-height: 36px; padding: 9px 12px; border: 1px solid var(--lo-edge-mid); border-radius: 6px; background: var(--lo-surface-sunken); font-size: 13px; }
.jarwan .jarwan-input input:focus { border-color: var(--focus); box-shadow: 0 0 0 1px var(--focus); }
.jarwan .jarwan-mic, .jarwan .jarwan-send { flex: none; width: 36px; min-width: 36px; height: 36px; min-height: 36px; padding: 0; display: grid; place-items: center; border-radius: 6px; background: transparent; color: var(--lo-subtle); }
.jarwan .jarwan-mic { border: 1px dashed var(--lo-edge-strong); font-family: var(--font-mono); font-size: 11px; font-weight: 500; letter-spacing: .04em; }
.jarwan .jarwan-send { border: 1px solid var(--lo-crimson-ring); color: var(--lo-ivory); }
.jarwan .jarwan-mic:hover, .jarwan .jarwan-send:hover { border-color: var(--lo-line-hover); background: var(--lo-sheen); color: var(--lo-ivory); }
.jarwan-voice-line { margin: 0; font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--lo-subtle); }
.jarwan .jarwan-compose > .meta { margin: 0; text-align: left; font-size: 12px; line-height: 1.5; color: var(--lo-subtle); }
.jarwan #voice-controls { margin: 0; padding: 0 18px 16px; }
@media (max-width: 1100px) { .notes-panel, .jarwan, .chat-open .jarwan { width: min(380px, 100%); } }
@media (max-width: 760px) { .jarwan .jarwan-context select, .jarwan .jarwan-input input { font-size: 16px; } }

/* A mission's page, reached from the palette, the Sala de mando or Jarwan: the section and why you came (§8.3). */
#mission-approval:focus-visible, #mission-manual:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; border-radius: 6px; }
#mission-approval:focus, #mission-manual:focus { outline: 2px solid var(--focus); outline-offset: 4px; border-radius: 6px; }
.approval-note { margin: 12px 0 0; padding: 10px 12px; border: 1px solid var(--lo-crimson-card-edge); border-radius: 8px; background: var(--lo-crimson-wash); font-size: 13px; line-height: 1.5; color: var(--lo-ivory-2); }
