/* Cyber Girlie OS tokens — Document 02, Section 5 */
:root {
  --bg: #0B1220; --surface: #1A2433; --surface-2: #212C40; --surface-3: #283552;
  --border: #2B3752; --accent: #E0009A; --accent-soft: rgba(224,0,154,0.14);
  --primary: #2F80ED; --primary-soft: rgba(47,128,237,0.14);
  --success: #27AE60; --success-soft: rgba(39,174,96,0.14);
  --warning: #F2C94C; --warning-soft: rgba(242,201,76,0.14);
  --critical: #EB5757; --critical-soft: rgba(235,87,87,0.14);
  --text: #EDF1F9; --text-muted: #8E9AB8; --text-faint: #5C6987;
  --radius: 10px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { background: var(--bg); color: var(--text); font-family: 'Inter', system-ui, sans-serif; }
a { color: inherit; text-decoration: none; }

.topbar { height: 56px; display: flex; align-items: center; gap: 16px; padding: 0 18px; background: var(--surface); border-bottom: 1px solid var(--border); }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 14px; letter-spacing: .5px; }
.brand .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 3px var(--success-soft); animation: pulse 3.4s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px transparent; } }
.topbar-spacer { flex: 1; }
.user-chip { display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border-radius: 20px; background: var(--surface-2); font-size: 12.5px; }
.avatar { width: 26px; height: 26px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--primary)); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; }

.body-row { display: flex; min-height: calc(100vh - 56px); }
.rail { width: 208px; flex-shrink: 0; background: var(--surface); border-right: 1px solid var(--border); padding: 14px 10px; }
.rail-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: 1px; color: var(--text-faint); padding: 12px 10px 6px; font-weight: 600; }
.rail-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; color: var(--text-muted); font-size: 13.5px; font-weight: 500; }
.rail-item:hover { background: var(--surface-2); color: var(--text); }
.rail-item.active { background: var(--accent-soft); color: var(--accent); }

.workspace { flex: 1; padding: 26px 30px; }
h1.page-title { font-size: 22px; font-weight: 600; margin-bottom: 4px; }
.page-sub { color: var(--text-muted); font-size: 13.5px; margin-bottom: 24px; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; transition: transform .2s ease, box-shadow .2s ease; }
.card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0,0,0,.25); }
.card-title { font-size: 14px; font-weight: 600; margin-bottom: 14px; }

.greet-banner { background: linear-gradient(120deg, rgba(224,0,154,0.14), rgba(47,128,237,0.10)); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 24px; margin-bottom: 22px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.greet-banner h2 { font-size: 19px; font-weight: 600; margin-bottom: 4px; }
.greet-banner p { color: var(--text-muted); font-size: 13.5px; max-width: 480px; }

.kpi-row { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; margin-bottom: 22px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.kpi .kv { font-size: 22px; font-weight: 600; }
.kpi .kl { font-size: 11.5px; color: var(--text-muted); margin-top: 2px; }

.ticket-row { display: flex; align-items: center; gap: 12px; padding: 12px 10px; border-radius: 8px; border-bottom: 1px solid var(--border); }
.ticket-row:last-child { border-bottom: none; }
.ticket-row:hover { background: var(--surface-2); }
.ticket-icon { width: 34px; height: 34px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 15px; }
.ticket-main { flex: 1; min-width: 0; }
.ticket-main .t-title { font-size: 13.5px; font-weight: 500; }
.ticket-main .t-meta { font-size: 11.5px; color: var(--text-faint); }
.pill { font-size: 10.5px; font-weight: 600; padding: 3px 9px; border-radius: 20px; white-space: nowrap; }
.pill.open { background: var(--primary-soft); color: var(--primary); }
.pill.progress { background: var(--warning-soft); color: var(--warning); }
.pill.review { background: var(--accent-soft); color: var(--accent); }
.pill.done { background: var(--success-soft); color: var(--success); opacity: .7; }
.pill.critical { background: var(--critical-soft); color: var(--critical); }

.mini-avatar { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: #fff; flex-shrink: 0; }
.halo { box-shadow: 0 0 0 2px var(--bg), 0 0 14px 1px var(--halo, rgba(224,0,154,.5)); }

.modal-shell { max-width: 960px; margin: 0 auto; background: var(--bg); }
.modal-grid { display: grid; grid-template-columns: 1fr 300px; gap: 0; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.modal-main { padding: 26px 28px; background: var(--bg); }
.modal-side { background: var(--surface); border-left: 1px solid var(--border); padding: 22px; }
.modal-eyebrow { font-size: 11px; color: var(--primary); font-weight: 600; letter-spacing: .5px; text-transform: uppercase; margin-bottom: 8px; }
.modal-title { font-size: 21px; font-weight: 600; margin-bottom: 8px; }
.modal-desc { color: var(--text-muted); font-size: 13.5px; line-height: 1.6; margin-bottom: 22px; }
.modal-section-title { font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--text-faint); font-weight: 600; margin: 20px 0 10px; }
.impact-callout { display: flex; gap: 10px; background: var(--warning-soft); border: 1px solid rgba(242,201,76,.3); border-radius: 8px; padding: 11px 13px; margin-bottom: 20px; font-size: 12.5px; line-height: 1.5; }
.impact-callout .ic-label { font-weight: 700; color: var(--warning); flex-shrink: 0; }
.check-item { display: flex; align-items: center; gap: 10px; padding: 8px 0; font-size: 13px; }
.check-box { width: 16px; height: 16px; border-radius: 4px; border: 1.5px solid var(--border); flex-shrink: 0; cursor: pointer; }
.check-box.done { background: var(--success); border-color: var(--success); }
.status-form { display: flex; gap: 8px; margin-top: 20px; flex-wrap: wrap; }
.status-btn { padding: 8px 14px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font-size: 12.5px; font-weight: 500; cursor: pointer; }
.status-btn.current { border-color: var(--accent); color: var(--accent); }
.activity-item { display: flex; gap: 10px; padding: 7px 0; font-size: 12.5px; border-bottom: 1px solid var(--border); }
.activity-item:last-child { border-bottom: none; }
.activity-item .a-time { color: var(--text-faint); font-size: 10.5px; min-width: 100px; }
.mentor-card { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; margin-bottom: 20px; }
.mentor-card .mtop { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.mentor-card .mline { font-size: 13px; color: var(--text-muted); line-height: 1.5; }
.back-link { color: var(--text-muted); font-size: 12.5px; margin-bottom: 16px; display: inline-block; }
.back-link:hover { color: var(--text); }

.dev-banner { background: var(--surface-2); border-bottom: 1px solid var(--border); padding: 6px 18px; font-size: 11px; color: var(--text-faint); text-align: center; }

.chat-shell { display: grid; grid-template-columns: 240px 1fr; height: calc(100vh - 220px); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.chat-list { border-right: 1px solid var(--border); overflow-y: auto; padding: 8px; }
.chat-list-item { display: flex; gap: 10px; padding: 10px; border-radius: 8px; align-items: center; }
.chat-list-item:hover, .chat-list-item.active { background: var(--surface-2); }
.cl-name { font-size: 13px; font-weight: 500; }
.cl-msg { font-size: 11.5px; color: var(--text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
.chat-main { display: flex; flex-direction: column; min-width: 0; }
.chat-head { padding: 14px 18px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 10px; }
.chn { font-weight: 600; font-size: 13.5px; }
.chat-msgs { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.msg { max-width: 72%; display: flex; gap: 9px; }
.msg.me { align-self: flex-end; flex-direction: row-reverse; }
.msg .bubble { background: var(--surface-2); border: 1px solid var(--border); padding: 10px 13px; border-radius: 12px; font-size: 13px; line-height: 1.5; }
.msg.me .bubble { background: var(--primary-soft); border-color: transparent; }
.chat-input { padding: 14px; border-top: 1px solid var(--border); display: flex; gap: 10px; }
.chat-input input { flex: 1; background: var(--surface-2); border: 1px solid var(--border); border-radius: 20px; padding: 10px 16px; color: var(--text); outline: none; font-size: 13px; }
.chat-input button { background: var(--accent); color: #fff; width: 38px; height: 38px; border-radius: 50%; border: none; cursor: pointer; }
.rail-item .count { margin-left: auto; font-size: 10.5px; background: var(--surface-3); color: var(--text-muted); padding: 1px 6px; border-radius: 20px; }

.chat-shell-3col { display: grid; grid-template-columns: 240px 1fr 220px; gap: 12px; height: calc(100vh - 220px); }
.chat-shell-3col .chat-list, .chat-shell-3col .chat-main { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.chat-shell-3col .chat-list { overflow-y: auto; padding: 8px; }
.event-stream { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; overflow-y: auto; }
.event-stream-item { display: flex; align-items: flex-start; gap: 4px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.event-stream-item:last-of-type { border-bottom: none; }
.event-stream-type { font-size: 11px; font-weight: 600; color: var(--accent); font-family: monospace; }
.event-stream-time { font-size: 9.5px; color: var(--text-faint); margin-top: 2px; }
.env-btn { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border); font-size: 13px; font-weight: 500; text-decoration: none; color: var(--text); }
.env-btn:hover { border-color: var(--primary); }
.env-btn .e-tag { margin-left: auto; font-size: 10px; color: var(--text-faint); font-family: monospace; }

/* ============================================================
   ATMOSPHERE SYSTEM 1 — Depth Layers
   Background grid + oversized faded typography + HUD framing.
   ============================================================ */
body {
  position: relative;
  background-image:
    linear-gradient(rgba(224,0,154,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(224,0,154,0.035) 1px, transparent 1px);
  background-size: 42px 42px;
  background-attachment: fixed;
}
body::before {
  content: '';
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background: radial-gradient(ellipse at 20% 0%, rgba(224,0,154,0.05), transparent 55%),
              radial-gradient(ellipse at 80% 100%, rgba(47,128,237,0.05), transparent 55%);
}
.dev-banner, .topbar, .body-row { position: relative; z-index: 1; }

.hud-frame { border: 1px solid var(--border); position: relative; }
.hud-frame::before, .hud-frame::after {
  content: ''; position: absolute; width: 10px; height: 10px; border-color: var(--accent); opacity: .6;
}
.hud-frame::before { top: -1px; left: -1px; border-top: 2px solid; border-left: 2px solid; }
.hud-frame::after { bottom: -1px; right: -1px; border-bottom: 2px solid; border-right: 2px solid; }

.bg-giant-type {
  position: absolute; top: -10px; left: 0; font-size: 220px; font-weight: 800; line-height: 1;
  color: rgba(224,0,154,0.045); pointer-events: none; user-select: none; z-index: 0;
  white-space: nowrap; letter-spacing: -4px;
}
.hero-relative { position: relative; overflow: hidden; }
.hero-content { position: relative; z-index: 1; }

/* ============================================================
   ATMOSPHERE SYSTEM 2 — Motion Language
   ============================================================ */
.brand .dot { animation: pulse-ring 3.4s ease-in-out infinite; }
@keyframes pulse-ring { 0%,100% { box-shadow: 0 0 0 3px var(--success-soft); } 50% { box-shadow: 0 0 0 7px transparent; } }

.notif-icon { position: relative; }
.notif-icon .ripple { position: absolute; inset: -6px; border-radius: 50%; border: 1.5px solid var(--accent); opacity: 0; }
.notif-icon.has-unread .ripple { animation: notif-ripple 2.2s ease-out infinite; }
@keyframes notif-ripple { 0% { opacity: .7; transform: scale(.6); } 100% { opacity: 0; transform: scale(1.5); } }

.search-wrap { position: relative; overflow: visible; border-radius: 8px; }
.search-wrap input { transition: box-shadow .25s ease, border-color .25s ease, background .25s ease; }
.search-wrap input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft), 0 0 24px rgba(224,0,154,0.15); background: rgba(26,36,51,0.95); }

.presence-dot { display: inline-block; border-radius: 50%; }
.presence-dot.breathing { animation: breathe 2.8s ease-in-out infinite; }
@keyframes breathe { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .55; transform: scale(.85); } }

.ticket-row, .activity-item { animation: rowIn .3s ease both; }
@keyframes rowIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

.live-tick { position: relative; padding-left: 14px; }
.live-tick::before {
  content: ''; position: absolute; left: 0; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%;
  background: var(--success); animation: breathe 2.2s ease-in-out infinite;
}

/* ============================================================
   ATMOSPHERE SYSTEM 3 — Boot / Wake Sequence
   ============================================================ */
.boot-screen {
  min-height: 100vh; display: flex; align-items: center; justify-content: center; flex-direction: column;
  background: var(--bg); position: relative; overflow: hidden;
}
.boot-screen::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(180deg, rgba(224,0,154,0.03) 0px, transparent 2px, transparent 4px);
  animation: scanlines 8s linear infinite;
}
@keyframes scanlines { from { background-position: 0 0; } to { background-position: 0 200px; } }
.boot-log { font-family: monospace; font-size: 13px; color: var(--text-muted); text-align: left; max-width: 460px; position: relative; z-index: 1; }
.boot-log .line { opacity: 0; animation: bootLineIn .3s ease forwards; margin-bottom: 6px; }
.boot-log .line.ok { color: var(--success); }
.boot-log .brand-line { font-size: 22px; font-weight: 700; color: var(--text); margin-bottom: 18px; letter-spacing: 1px; }
.boot-log .greeting { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border); color: var(--text); font-size: 15px; }
@keyframes bootLineIn { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; transform: translateX(0); } }
.boot-continue { margin-top: 26px; opacity: 0; animation: bootLineIn .3s ease forwards; }
.boot-continue a { color: var(--accent); font-size: 12.5px; text-decoration: none; border: 1px solid var(--border); padding: 8px 16px; border-radius: 20px; }
.boot-continue a:hover { border-color: var(--accent); }

/* ============================================================
   ATMOSPHERE — Workstation Bezel (sidebar as instrument panel)
   ============================================================ */
.rail.bezel { display: flex; flex-direction: column; }
.bezel-block { margin-top: 22px; padding-top: 14px; border-top: 1px dashed var(--border); }
.bezel-title { font-size: 9.5px; letter-spacing: 1.5px; color: var(--text-faint); font-family: monospace; margin-bottom: 8px; }
.bezel-row { display: flex; flex-direction: column; gap: 1px; font-size: 10.5px; color: var(--text-muted); padding: 4px 0; font-family: monospace; }
.bezel-row > span:first-child { color: var(--text-faint); font-size: 9px; letter-spacing: .5px; }
.bezel-row .bezel-ok { color: var(--success); font-weight: 600; }
.bezel-row .mono { color: var(--text); font-family: monospace; }
.bezel-sys-row { display: flex; align-items: center; font-size: 10.5px; color: var(--text-muted); padding: 3px 0; font-family: monospace; }

/* ============================================================
   ATMOSPHERE — Continuous Instrument Panel (Mission Control v2)
   Replaces isolated .card boxes with one bordered surface, internal
   dividers instead of separate backgrounds, and dramatic type scale.
   ============================================================ */
.instrument-panel { position: relative; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); overflow: hidden; margin-bottom: 22px; }
.panel-bg-type {
  position: absolute; top: 8px; left: 20px; font-size: 46px; font-weight: 800; letter-spacing: 1px;
  color: rgba(224,0,154,0.05); pointer-events: none; user-select: none; white-space: nowrap; z-index: 0;
}
.panel-zone { position: relative; z-index: 1; padding: 22px 26px; }
.panel-zone-divider { border-left: 1px dashed var(--border); }
.panel-divider { height: 1px; background: repeating-linear-gradient(90deg, var(--border) 0, var(--border) 6px, transparent 6px, transparent 12px); }
.panel-columns { display: grid; grid-template-columns: 1.4fr 1fr; }

.kpi-row-flat { display: grid; grid-template-columns: repeat(4, 1fr); position: relative; z-index: 1; }
.kpi-row-flat > div { padding: 16px 26px; border-left: 1px dashed var(--border); }
.kpi-row-flat > div:first-child { border-left: none; }

.timeline-row { display: flex; gap: 14px; font-size: 12px; color: var(--text-muted); padding: 7px 0; border-bottom: 1px solid var(--border); animation: rowIn .3s ease both; }
.timeline-row:last-child { border-bottom: none; }
.timeline-time { color: var(--text-faint); min-width: 74px; flex-shrink: 0; }
.timeline-row-new { animation: timelineNewIn .5s ease both; background: var(--accent-soft); border-radius: 4px; padding-left: 6px; margin-left: -6px; }
@keyframes timelineNewIn { from { opacity: 0; transform: translateY(-8px); background: var(--accent-soft); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 980px) {
  .panel-columns { grid-template-columns: 1fr; }
  .kpi-row-flat { grid-template-columns: repeat(2, 1fr); }
}

/* Typography scale utilities — micro/giant, for depth beyond the
   16/18/20px uniformity the earlier atmosphere pass still had. */
.type-micro { font-size: 9px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--text-faint); font-family: monospace; }
.type-giant { font-size: 56px; font-weight: 800; line-height: 1; letter-spacing: -1px; }

.briefing {
  background: linear-gradient(120deg, rgba(224,0,154,0.12), rgba(47,128,237,0.08));
  border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 26px; margin-bottom: 22px;
}
.briefing-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; padding: 16px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); margin-bottom: 14px; font-size: 14px; }
.briefing-mission { font-size: 13.5px; color: var(--text-muted); line-height: 1.6; }

/* ============================================================
   FOUNDATION v2.0 — Enterprise Completion
   ============================================================ */

/* ---- Theme variants (Settings → Theme) ---- */
:root[data-theme="light"], html[data-theme="light"] {
  --bg: #F4F6FB; --surface: #FFFFFF; --surface-2: #EEF1F8; --surface-3: #E3E8F2;
  --border: #D8DEEA; --text: #1B2436; --text-muted: #5B6579; --text-faint: #8891A3;
}
html[data-theme="light"] body::before { opacity: .5; }
html[data-theme="light"] .bg-giant-type, html[data-theme="light"] .panel-bg-type { color: rgba(224,0,154,0.06); }

/* ---- Accessibility (Settings → Accessibility) ---- */
html[data-contrast="high"] { --border: #6B7690; --text-muted: #C3CADA; --text-faint: #9AA4BC; }
html[data-contrast="high"] .card, html[data-contrast="high"] .instrument-panel, html[data-contrast="high"] .hud-frame { border-width: 2px; }

html[data-font-scale="large"] { font-size: 18px; }
html[data-font-scale="large"] .type-micro { font-size: 10.5px; }

html[data-reduced-motion="true"] *, html[data-reduced-motion="true"] *::before, html[data-reduced-motion="true"] *::after {
  animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important;
}

/* ---- Form utilities (Settings, Onboarding, Portfolio highlight form) ---- */
.form-row { margin-bottom: 14px; display: flex; flex-direction: column; gap: 6px; }
.form-row label { font-size: 12px; color: var(--text-muted); font-weight: 500; }
.field-hint { font-size: 11px; color: var(--text-faint); font-weight: 400; }
.text-input {
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
  padding: 9px 12px; border-radius: 8px; font-size: 13px; outline: none; font-family: inherit; width: 100%;
}
.text-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea.text-input { resize: vertical; }
.radio-row { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; }
.radio-row label { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.toggle-row { display: flex; align-items: center; gap: 10px; font-size: 13px; padding: 8px 0; cursor: pointer; border-bottom: 1px solid var(--border); }
.toggle-row:last-of-type { border-bottom: none; }
.btn-primary {
  background: var(--accent); color: #fff; border: none; padding: 10px 20px; border-radius: 8px;
  font-size: 13px; font-weight: 600; cursor: pointer;
}
.btn-primary:hover { filter: brightness(1.08); }

/* ---- Onboarding ---- */
.onboarding-shell { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 40px 20px; }
.onboarding-card { max-width: 520px; width: 100%; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 34px 36px; }
.onboarding-step { border-top: 1px dashed var(--border); padding-top: 18px; margin-top: 18px; }
.onboarding-step:first-of-type { border-top: none; padding-top: 0; margin-top: 0; }
.onboarding-step-label { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--accent); font-weight: 700; margin-bottom: 14px; }
.onboarding-actions { display: flex; align-items: center; gap: 16px; margin-top: 26px; }
.skip-link { font-size: 12px; color: var(--text-faint); }
.skip-link:hover { color: var(--text-muted); }

/* ---- First Day Experience (Foundation v2.1) — extends Onboarding's shell,
   not a second styling system: same variables, same card/shell classes. ---- */
.first-day-card { max-width: 640px; }
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; margin-bottom: 8px; }
.tour-list { display: grid; gap: 14px; margin-bottom: 24px; }
.option-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 8px; }
.decision-option {
  display: flex; align-items: flex-start; gap: 10px; background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px 14px; cursor: pointer;
}
.decision-option input { margin-top: 3px; }
.action-checklist { list-style: none; padding: 0; margin: 0 0 8px; display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: var(--text-muted); }

/* ---- Settings ---- */
.settings-saved-banner { background: var(--success-soft); color: var(--success); border-radius: 8px; padding: 10px 14px; font-size: 13px; margin-bottom: 16px; }
.settings-layout { display: grid; grid-template-columns: 200px 1fr; gap: 20px; }
.settings-nav { display: flex; flex-direction: column; gap: 2px; }
.settings-panel { padding: 24px; }
.shortcuts-table { width: 100%; border-collapse: collapse; font-size: 12.5px; margin-top: 10px; }
.shortcuts-table td { padding: 8px 10px; border-bottom: 1px solid var(--border); }
kbd { background: var(--surface-3); border: 1px solid var(--border); border-radius: 4px; padding: 2px 6px; font-family: monospace; font-size: 11px; }

/* ---- Directory Profile ---- */
.contact-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-bottom: 20px; font-size: 13px; }
.skill-chip { background: var(--surface-2); border: 1px solid var(--border); border-radius: 20px; padding: 4px 12px; font-size: 11.5px; color: var(--text-muted); }
.presence-badge { position: absolute; bottom: -1px; right: -1px; width: 11px; height: 11px; border-radius: 50%; border: 2px solid var(--surface); }

/* ---- CypherChat ---- */
.chat-search-input { margin-bottom: 4px; font-size: 12.5px; padding: 7px 10px; }
.chat-presence-dot { position: absolute; bottom: -1px; right: -1px; width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--surface); }
.chat-unread-badge { background: var(--accent); color: #fff; font-weight: 700; }
.pin-btn { background: none; border: none; cursor: pointer; font-size: 15px; padding: 4px; opacity: .8; }
.pin-btn:hover { opacity: 1; }
.attachment-chip { display: flex; flex-direction: column; gap: 2px; margin-top: 8px; padding: 8px 10px; background: rgba(0,0,0,0.15); border-radius: 6px; font-size: 11.5px; }
.attachment-meta { font-size: 10px; color: var(--text-faint); }
.msg-time { font-size: 9.5px; color: var(--text-faint); margin-top: 3px; padding: 0 2px; }
.msg.me .msg-time { text-align: right; }
.chat-attachment-input { flex: 0 0 160px !important; font-size: 11.5px !important; }
.typing-bubble { display: flex; gap: 4px; align-items: center; padding: 12px 14px !important; }
.typing-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--text-faint); animation: typingBounce 1.2s ease-in-out infinite; }
.typing-dot:nth-child(2) { animation-delay: .15s; }
.typing-dot:nth-child(3) { animation-delay: .3s; }
@keyframes typingBounce { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-3px); opacity: 1; } }
.seen-receipt { align-self: flex-end; font-size: 10px; color: var(--text-faint); margin-top: -6px; }
.inline-code { background: var(--surface-3); border-radius: 4px; padding: 1px 5px; font-family: monospace; font-size: 12px; }

/* ---- Cypherpedia / Markdown-lite ---- */
.article-body { font-size: 14px; line-height: 1.8; color: var(--text); }
.article-body .md-heading { margin: 20px 0 10px; font-weight: 600; color: var(--text); }
.article-body .md-list { margin: 0 0 14px 20px; }
.article-body .md-list li { margin-bottom: 6px; font-size: 13.5px; color: var(--text-muted); }
.article-body .md-paragraph { margin-bottom: 14px; }

/* ---- Notifications ---- */
.notif-checkbox { margin-right: 2px; }
.pill.priority-urgent { background: var(--critical-soft); color: var(--critical); }
.pill.priority-high { background: var(--warning-soft); color: var(--warning); }
.pill.priority-normal { background: var(--primary-soft); color: var(--primary); }
.pill.priority-low { background: var(--surface-3); color: var(--text-faint); }
.category-tag { font-size: 10px; color: var(--text-faint); text-transform: uppercase; letter-spacing: .4px; }

/* ---- Shared empty/tip states ---- */
.empty-state { padding: 36px 10px; text-align: center; color: var(--text-faint); font-size: 13px; }
.empty-state-icon { font-size: 28px; margin-bottom: 10px; opacity: .7; }
.tip-callout { background: var(--primary-soft); border: 1px solid rgba(47,128,237,.25); border-radius: 8px; padding: 10px 14px; font-size: 12.5px; color: var(--text-muted); margin-bottom: 16px; line-height: 1.5; }

/* ---- Portfolio ---- */
.highlight-form { margin-top: 12px; }

/* ---- Responsive (Part 12) ---- */
@media (max-width: 900px) {
  .settings-layout { grid-template-columns: 1fr; }
  .settings-nav { flex-direction: row; flex-wrap: wrap; }
  .modal-grid { grid-template-columns: 1fr; }
  .modal-side { border-left: none; border-top: 1px solid var(--border); }
  .chat-shell-3col { grid-template-columns: 1fr; height: auto; }
  .chat-shell-3col .chat-list, .chat-shell-3col .chat-main, .event-stream { height: 420px; }
}
@media (max-width: 768px) {
  .body-row { flex-direction: column; }
  .rail { width: 100%; border-right: none; border-bottom: 1px solid var(--border); flex-direction: row; flex-wrap: wrap; gap: 4px; padding: 10px; }
  .rail .bezel-block { flex-basis: 100%; }
  .workspace { padding: 18px 16px; }
  .contact-grid, .briefing-grid { grid-template-columns: 1fr 1fr; }
  div[style*="grid-template-columns: 1.3fr 1fr"] { grid-template-columns: 1fr !important; }
}

