/* ============================================================
   OFISocial Design System — tokens, primitives, components
   ============================================================ */
:root {
  --font: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: Fraunces, Georgia, "Times New Roman", serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --bg: #f3f5f9;            /* app canvas */
  --surface: #ffffff;       /* cards */
  --surface-2: #f7f8fb;     /* inset / inputs */
  --surface-3: #eef0f5;     /* hover */
  --border: #e4e7ee;
  --border-strong: #cfd4de;
  --text: #0f172a;
  --text-2: #475569;
  --text-3: #5f6b85;
  --text-inv: #ffffff;

  --brand: #6b0000;         /* OFI maroon (logo) */
  --brand-600: #4e0000;
  --brand-50: #fbeeee;
  --brand-100: #f3d4d4;
  --ofi: #1d9bf0;           /* verified blue tick */
  --ofi-600: #1a8cd8;
  --ofi-50: #e8f5fe;
  --ofi-100: #cce9fc;
  --teacher: #7c3aed;
  --teacher-50: #f5f3ff;
  --alumni: #b45309;
  --alumni-50: #fffbeb;
  --danger: #dc2626;
  --danger-50: #fef2f2;
  --warn: #b45309;
  --warn-50: #fffbeb;
  --success: #15803d;
  --info: #0284c7;

  --r-sm: 8px; --r: 12px; --r-lg: 16px; --r-xl: 22px; --r-full: 999px;
  --sh-sm: 0 1px 2px rgba(15,23,42,.05);
  --sh: 0 1px 3px rgba(15,23,42,.06), 0 4px 14px rgba(15,23,42,.05);
  --sh-lg: 0 10px 30px rgba(15,23,42,.14), 0 2px 8px rgba(15,23,42,.08);
  --sh-ring: 0 0 0 3px rgba(107,0,0,.55);

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px; --s6: 24px; --s8: 32px; --s10: 40px;
  --nav-h: 60px; --tab-h: 58px; --sidebar-w: 248px; --rail-w: 300px; --content-w: 640px;
  --ease: cubic-bezier(.2,.8,.2,1);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0f17; --surface: #121826; --surface-2: #0f1420; --surface-3: #1a2233; --border: #1f2937; --border-strong: #334155;
    --text: #e5e9f0; --text-2: #a7b1c2; --text-3: #98a3b8; --brand: #c0392b; --brand-600: #a93226; --brand-50: #2a0d0d; --brand-100: #3d1414; --ofi-50: #0b2a40; --ofi-100: #0f3d5c;
    --teacher-50: #2e1065; --alumni-50: #3b2206; --danger-50: #3b0a0a; --warn-50: #3b2206;
    --sh: 0 1px 3px rgba(0,0,0,.4), 0 4px 14px rgba(0,0,0,.3); --sh-lg: 0 10px 30px rgba(0,0,0,.6);
  }
}
:root[data-theme="dark"] {
  --bg: #0b0f17; --surface: #121826; --surface-2: #0f1420; --surface-3: #1a2233; --border: #1f2937; --border-strong: #334155;
  --text: #e5e9f0; --text-2: #a7b1c2; --text-3: #98a3b8; --brand: #c0392b; --brand-600: #a93226; --brand-50: #2a0d0d; --brand-100: #3d1414; --ofi-50: #0b2a40; --ofi-100: #0f3d5c;
  --teacher-50: #2e1065; --alumni-50: #3b2206; --danger-50: #3b0a0a; --warn-50: #3b2206;
  --sh: 0 1px 3px rgba(0,0,0,.4), 0 4px 14px rgba(0,0,0,.3); --sh-lg: 0 10px 30px rgba(0,0,0,.6);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
h1, h2, .auth-card h1, .profile-name { font-family: var(--font-display); font-weight: 700; letter-spacing: -.01em; } .profile-name .role-pill, .profile-name .chip { font-family: var(--font); }
body { margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.5; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
img, video { max-width: 100%; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; letter-spacing: -.01em; }
h1 { font-size: 26px; font-weight: 800; } h2 { font-size: 20px; font-weight: 700; } h3 { font-size: 16px; font-weight: 700; } h4 { font-size: 14px; font-weight: 700; }
p { margin: 0; }
:focus-visible { outline: none; box-shadow: var(--sh-ring); border-radius: var(--r-sm); }
::selection { background: var(--brand-100); }
.muted { color: var(--text-2); } .subtle { color: var(--text-3); } .small { font-size: 13px; } .tiny { font-size: 12px; } .bold { font-weight: 700; } .semi { font-weight: 600; }
.mono { font-family: var(--mono); }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.row { display: flex; align-items: center; gap: var(--s2); } .col { display: flex; flex-direction: column; gap: var(--s2); }
.between { justify-content: space-between; } .wrap { flex-wrap: wrap; } .grow { flex: 1; min-width: 0; } .center { justify-content: center; }
.gap1 { gap: var(--s1); } .gap3 { gap: var(--s3); } .gap4 { gap: var(--s4); } .gap6 { gap: var(--s6); }
.mt1 { margin-top: var(--s1); } .mt2 { margin-top: var(--s2); } .mt3 { margin-top: var(--s3); } .mt4 { margin-top: var(--s4); } .mt6 { margin-top: var(--s6); } .mb2 { margin-bottom: var(--s2); } .mb3 { margin-bottom: var(--s3); } .mb4 { margin-bottom: var(--s4); }
.hide-mobile { } .show-mobile { display: none !important; }
.srOnly { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.pre { white-space: pre-wrap; word-break: break-word; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: var(--r-sm); border: 1px solid transparent; background: var(--surface-3); color: var(--text); font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap; transition: background .15s, transform .05s, box-shadow .15s; user-select: none; text-decoration: none !important; }
.btn:hover { background: var(--border); } .btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; transform: none; }
.btn.primary { background: var(--brand); color: #fff; } .btn.primary:hover { background: var(--brand-600); }
.btn.ofi { background: #0b6fb8; color: #fff; } .btn.ofi:hover { background: #0b5e9a; }
.btn.danger { background: var(--danger); color: #fff; } .btn.danger:hover { background: #b91c1c; }
.btn.outline { background: transparent; border-color: var(--border-strong); } .btn.outline:hover { background: var(--surface-3); }
.btn.ghost { background: transparent; } .btn.ghost:hover { background: var(--surface-3); }
.btn.subtle { background: var(--brand-50); color: var(--brand); } .btn.subtle:hover { background: var(--brand-100); }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 7px; } .btn.xs { height: 28px; padding: 0 10px; font-size: 12px; border-radius: 6px; }
.btn.lg { height: 46px; padding: 0 22px; font-size: 15px; border-radius: 10px; } .btn.block { width: 100%; }
.btn.icon { width: 38px; padding: 0; border-radius: var(--r-full); } .btn.icon.sm { width: 32px; } .btn.icon.xs { width: 28px; }
.btn svg { width: 18px; height: 18px; flex: none; } .btn.sm svg { width: 16px; height: 16px; } .btn.xs svg { width: 14px; height: 14px; }

/* ---------- Inputs ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.hint { font-size: 12px; color: var(--text-3); } .error-text { font-size: 12px; color: var(--danger); font-weight: 500; }
.input, .textarea, .select { width: 100%; height: 42px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font: inherit; font-size: 15px; transition: border-color .15s, box-shadow .15s, background .15s; }
.input:focus, .textarea:focus, .select:focus { outline: none; border-color: var(--brand); box-shadow: var(--sh-ring); background: var(--surface); }
.input.invalid, .textarea.invalid { border-color: var(--danger); }
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.textarea { height: auto; min-height: 96px; padding: 12px 14px; resize: vertical; line-height: 1.5; }
.select { appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a94a6' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }
.input-wrap { position: relative; } .input-wrap svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--text-3); pointer-events: none; } .input-wrap .input { padding-left: 38px; }
.checkbox { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; } .checkbox input { width: 24px; height: 24px; margin: 0; accent-color: var(--brand); flex: none; }
.switch { position: relative; width: 42px; height: 24px; border-radius: 999px; background: var(--border-strong); border: 0; cursor: pointer; transition: background .15s; flex: none; padding: 0; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .15s var(--ease); box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch[aria-checked="true"] { background: var(--brand); } .switch[aria-checked="true"]::after { transform: translateX(18px); }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--border); } .switch-row:last-child { border-bottom: 0; }
.switch-row .t { font-weight: 600; font-size: 14px; } .switch-row .d { font-size: 13px; color: var(--text-2); margin-top: 2px; }
.chip-input { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); min-height: 44px; }
.chip-input input { flex: 1; min-width: 120px; border: 0; background: transparent; font: inherit; color: var(--text); outline: none; padding: 4px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 999px; background: var(--brand-50); color: var(--brand); font-size: 13px; font-weight: 600; }
.chip.neutral { background: var(--surface-3); color: var(--text-2); } .chip.ofi { background: var(--ofi-50); color: #0b5e9a; } .chip.sm { height: 24px; font-size: 12px; padding: 0 8px; }
.chip button { border: 0; background: transparent; padding: 0; display: flex; cursor: pointer; color: inherit; opacity: .7; } .chip button:hover { opacity: 1; }

/* ---------- Cards & surfaces ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--sh-sm); }
.card.pad { padding: var(--s5); } .card.pad-sm { padding: var(--s4); }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--border); }
.card-h h3 { font-size: 15px; } .card-b { padding: 16px 20px; }
.divider { height: 1px; background: var(--border); margin: var(--s4) 0; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; transition: background .12s; color: inherit; text-decoration: none !important; }
.list-item:hover { background: var(--surface-3); }
.stat { padding: 14px 16px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); } .stat .v { font-size: 22px; font-weight: 800; letter-spacing: -.02em; } .stat .l { font-size: 12px; color: var(--text-3); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.grid { display: grid; gap: var(--s4); } .grid-2 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(4, 1fr); }
.auto-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--s4); }
.auto-grid-sm { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--s3); }

/* ---------- Avatars & verification ---------- */
.avatar { position: relative; flex: none; border-radius: 50%; background: linear-gradient(135deg, #f1dada, #d4a0a0); color: #4e0000; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; overflow: visible; }
.avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.avatar .initials { font-size: .4em; line-height: 1; }
.avatar.sq { border-radius: 12px; } .avatar.sq img { border-radius: 12px; }
.avatar .presence { position: absolute; right: 2%; bottom: 2%; width: 26%; height: 26%; min-width: 10px; min-height: 10px; border-radius: 50%; background: var(--success); border: 2px solid var(--surface); }
.avatar .ring { position: absolute; inset: -3px; border-radius: 50%; border: 2px solid var(--ofi); pointer-events: none; }
.vbadge { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: 50%; color: #fff; flex: none; vertical-align: middle; }
.vbadge svg { width: 10px; height: 10px; }
.vbadge { background: var(--ofi); } .vbadge svg { width: 11px; height: 11px; stroke-width: 3.5; }
.vbadge.lg { width: 22px; height: 22px; } .vbadge.lg svg { width: 14px; height: 14px; }
.role-pill { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; }
.role-pill.ofi { background: var(--ofi-50); color: #0b5e9a; } .role-pill.teacher { background: var(--teacher-50); color: var(--teacher); } .role-pill.alumni { background: var(--alumni-50); color: var(--alumni); } .role-pill.student { background: var(--brand-50); color: var(--brand); }
.name-line { display: flex; align-items: center; gap: 5px; font-weight: 700; color: var(--text); min-width: 0; max-width: 100%; } .name-line a { display: flex; align-items: center; gap: 5px; min-width: 0; } .name-line a { color: inherit; } .name-line .n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Badges (achievements) ---------- */
.badge-tile { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); }
.badge-tile.locked { opacity: .5; filter: grayscale(.6); }
.badge-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; color: #fff; flex: none; font-size: 20px; }
.badge-icon.brand { background: linear-gradient(135deg, #8a1a1a, #4e0000); } .badge-icon.violet { background: linear-gradient(135deg, #a78bfa, #6d28d9); } .badge-icon.amber { background: linear-gradient(135deg, #fbbf24, #b45309); }
.badge-icon.teal { background: linear-gradient(135deg, #2dd4bf, #0f766e); } .badge-icon.rose { background: linear-gradient(135deg, #fb7185, #be123c); } .badge-icon.green { background: linear-gradient(135deg, #34d399, #047857); }
.badge-icon.gold { background: linear-gradient(135deg, #fde68a, #d97706); } .badge-icon.blue { background: linear-gradient(135deg, #60a5fa, #1d4ed8); } .badge-icon.indigo { background: linear-gradient(135deg, #818cf8, #3730a3); }
.badge-icon.sm { width: 32px; height: 32px; border-radius: 9px; font-size: 15px; }
.tier { font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); } .tier.official { color: var(--ofi); } .tier.rare { color: var(--teacher); }

/* ---------- Layout ---------- */
.topnav { position: sticky; top: 0; z-index: 50; height: var(--nav-h); background: var(--surface); border-bottom: 1px solid var(--border); display: flex; align-items: center; }
.topnav-in { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 16px; display: flex; align-items: center; gap: 16px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; letter-spacing: -.02em; color: var(--text); text-decoration: none !important; }
.logo .mark { width: 36px; height: 36px; border-radius: 10px; background: linear-gradient(135deg, var(--brand), #3a0000); display: grid; place-items: center; color: #fff; font-size: 15px; font-weight: 900; box-shadow: 0 4px 12px rgba(107,0,0,.3); }
.logo .mark-img { width: 36px; height: 36px; object-fit: contain; display: block; } .logo .mark-img.on-dark { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .logo .mark-img.on-light { display: none; } :root:not([data-theme="light"]) .logo .mark-img.on-dark { display: block; } }
:root[data-theme="dark"] .logo .mark-img.on-light { display: none; } :root[data-theme="dark"] .logo .mark-img.on-dark { display: block; }
.acc { border-top: 1px solid var(--border); } .acc summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; font-weight: 600; } .acc summary::-webkit-details-marker { display: none; } .acc summary .chev { transition: transform .15s; color: var(--text-3); } .acc[open] summary .chev { transform: rotate(90deg); } .acc .acc-body { padding: 0 16px 16px; }
.logo .wordmark { font-family: var(--font-display); font-weight: 700; letter-spacing: 0; } .logo .wordmark small { font-family: var(--font); font-weight: 600; font-size: 11px; color: var(--text-3); display: block; line-height: 1; margin-top: 1px; letter-spacing: .06em; text-transform: uppercase; }
.logo .mark.ofi { background: linear-gradient(135deg, #8a1a1a, #3a0000); box-shadow: 0 4px 12px rgba(107,0,0,.3); }
.nav-search { flex: 1; max-width: 420px; }
.nav-links { display: flex; gap: 4px; margin-left: auto; }
.nav-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 12px; color: var(--text-2); transition: background .12s, color .12s; text-decoration: none !important; }
.nav-btn:hover { background: var(--surface-3); color: var(--text); } .nav-btn.active { background: var(--brand-50); color: var(--brand); } .nav-btn svg { width: 22px; height: 22px; }
.dot { position: absolute; top: 6px; right: 6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--surface); }
.shell { max-width: 1280px; margin: 0 auto; padding: 20px 16px 40px; display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr) var(--rail-w); gap: 24px; align-items: start; }
.shell.wide { grid-template-columns: var(--sidebar-w) minmax(0, 1fr); } .shell.full { grid-template-columns: minmax(0, 1fr); max-width: 1100px; } .shell.narrow { grid-template-columns: minmax(0, 1fr); max-width: 760px; }
.sidebar { position: sticky; top: calc(var(--nav-h) + 20px); display: flex; flex-direction: column; gap: 2px; }
.side-link { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--text-2); font-weight: 600; font-size: 14px; text-decoration: none !important; transition: background .12s, color .12s; }
.side-link:hover { background: var(--surface-3); color: var(--text); } .side-link.active { background: var(--surface); color: var(--brand); box-shadow: var(--sh-sm); border: 1px solid var(--border); }
.side-link svg { width: 20px; height: 20px; flex: none; } .side-link .count { margin-left: auto; font-size: 11px; font-weight: 700; background: var(--danger); color: #fff; padding: 1px 7px; border-radius: 999px; }
.side-sec { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); padding: 14px 12px 6px; }
.rail { position: sticky; top: calc(var(--nav-h) + 20px); display: flex; flex-direction: column; gap: 16px; }
.main { min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.page-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; } .page-h p { color: var(--text-2); margin-top: 4px; }
.tabbar { display: none; }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; } .tabs::-webkit-scrollbar { display: none; }
.tab { padding: 10px 14px; font-weight: 600; font-size: 14px; color: var(--text-2); border: 0; background: transparent; border-bottom: 2px solid transparent; cursor: pointer; white-space: nowrap; margin-bottom: -1px; display: inline-flex; align-items: center; gap: 6px; }
.tab:hover { color: var(--text); } .tab.active { color: var(--brand); border-bottom-color: var(--brand); }
.tab .count { font-size: 11px; background: var(--surface-3); padding: 1px 7px; border-radius: 999px; color: var(--text-2); }
.seg { display: inline-flex; background: var(--surface-3); padding: 3px; border-radius: 10px; gap: 2px; } .seg button { border: 0; background: transparent; padding: 6px 12px; border-radius: 8px; font-weight: 600; font-size: 13px; color: var(--text-2); cursor: pointer; } .seg button.active { background: var(--surface); color: var(--text); box-shadow: var(--sh-sm); }

/* ---------- Feed / posts ---------- */
.post { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--sh-sm); overflow: hidden; }
.post.official { border-color: var(--ofi-100); box-shadow: 0 0 0 1px var(--ofi-100), var(--sh-sm); }
.post.official .post-head { background: linear-gradient(90deg, var(--ofi-50), transparent); }
.post.pinned::before { content: "📌 Pinned by OFI"; display: block; padding: 6px 16px; background: var(--ofi-50); color: var(--ofi-600); font-size: 12px; font-weight: 700; letter-spacing: .02em; }
.post-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px 6px; }
.post-meta { font-size: 12px; color: var(--text-3); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.post-body { padding: 6px 16px 12px; white-space: pre-wrap; word-break: break-word; font-size: 15px; line-height: 1.55; }
.post-body .mention { color: var(--brand); font-weight: 600; }
.post-media { display: grid; gap: 2px; background: var(--border); } .post-media.n1 { grid-template-columns: 1fr; } .post-media.n2, .post-media.n4 { grid-template-columns: 1fr 1fr; } .post-media.n3 { grid-template-columns: 2fr 1fr; } .post-media.n3 > :first-child { grid-row: span 2; }
.post-media img, .post-media video { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4/3; cursor: zoom-in; background: #000; } .post-media.n1 img { aspect-ratio: auto; max-height: 560px; }
.post-stats { display: flex; justify-content: space-between; padding: 8px 16px; font-size: 13px; color: var(--text-2); border-top: 1px solid var(--border); }
.post-actions { display: flex; border-top: 1px solid var(--border); } .post-actions .btn { flex: 1; border-radius: 0; height: 42px; background: transparent; color: var(--text-2); font-weight: 600; } .post-actions .btn:hover { background: var(--surface-3); color: var(--text); } .post-actions .btn.on { color: var(--brand); }
.reactions-pop { position: absolute; bottom: 100%; left: 8px; display: flex; gap: 2px; padding: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; box-shadow: var(--sh-lg); z-index: 5; }
.reactions-pop button { border: 0; background: transparent; font-size: 24px; width: 40px; height: 40px; border-radius: 50%; cursor: pointer; transition: transform .12s; } .reactions-pop button:hover { transform: scale(1.3) translateY(-4px); background: var(--surface-3); }
.shared-post { margin: 0 16px 12px; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.composer { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--sh-sm); padding: 14px 16px; }
.composer textarea { width: 100%; border: 0; background: transparent; font: inherit; font-size: 16px; resize: none; min-height: 48px; color: var(--text); outline: none; padding: 8px 0; }
.composer-tools { display: flex; align-items: center; gap: 6px; border-top: 1px solid var(--border); padding-top: 10px; margin-top: 6px; flex-wrap: wrap; }
.composer-trigger { display: flex; align-items: center; gap: 12px; } .composer-trigger .fake { flex: 1; height: 44px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); display: flex; align-items: center; padding: 0 16px; color: var(--text-3); cursor: text; }
.upload-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; margin: 8px 0; }
.upload-tile { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--surface-3); } .upload-tile img, .upload-tile video { width: 100%; height: 100%; object-fit: cover; }
.upload-tile .rm { position: absolute; top: 4px; right: 4px; } .upload-tile .prog { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(0,0,0,.3); } .upload-tile .prog i { display: block; height: 100%; background: var(--brand); transition: width .2s; }
.upload-tile .status { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0,0,0,.45); color: #fff; font-size: 12px; font-weight: 700; }

/* ---------- Comments ---------- */
.comments { padding: 8px 16px 14px; display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--border); }
.comment { display: flex; gap: 10px; } .comment .bubble { background: var(--surface-2); border-radius: 14px; padding: 8px 12px; max-width: 100%; } .comment .bubble .n { font-weight: 700; font-size: 13px; display: flex; align-items: center; gap: 4px; }
.comment .acts { display: flex; gap: 10px; font-size: 12px; color: var(--text-3); padding: 2px 12px; } .comment .acts button { border: 0; background: transparent; padding: 0; font-weight: 600; color: var(--text-3); cursor: pointer; font-size: 12px; } .comment .acts button:hover, .comment .acts button.on { color: var(--brand); }
.replies { margin-left: 44px; display: flex; flex-direction: column; gap: 8px; }
.comment-form { display: flex; gap: 10px; align-items: flex-start; } .comment-form .input { height: 38px; border-radius: 999px; }

/* ---------- Profile ---------- */
.cover { height: 220px; border-radius: var(--r-lg) var(--r-lg) 0 0; background: linear-gradient(120deg, #2a0000, #6b0000 55%, #1a1a1f); background-size: cover; background-position: center; position: relative; }
.cover.sm { height: 160px; }
.profile-head { padding: 0 24px 20px; position: relative; }
.profile-head > .row > .avatar { margin-top: 18px; border: 4px solid var(--surface); box-shadow: var(--sh); box-sizing: content-box; } .profile-head > .row > .avatar .ring { inset: -7px; }
.profile-avatar { margin-top: -56px; border: 4px solid var(--surface); border-radius: 50%; width: 136px; height: 136px; box-shadow: var(--sh); }
.profile-name { font-size: 24px; font-weight: 800; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; letter-spacing: -.02em; }
.profile-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.info-row { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--text-2); } .info-row svg { width: 18px; height: 18px; flex: none; color: var(--text-3); margin-top: 2px; }
.skill-list { display: flex; flex-wrap: wrap; gap: 6px; }
.project-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; transition: transform .15s var(--ease), box-shadow .15s; color: inherit; text-decoration: none !important; display: block; }
.project-card:hover { transform: translateY(-2px); box-shadow: var(--sh); }
.project-card .cov { aspect-ratio: 16/10; background: linear-gradient(135deg, #1a1a1f, #6b0000); position: relative; } .project-card .cov img { width: 100%; height: 100%; object-fit: cover; }
.project-card .cov .tag { position: absolute; left: 10px; top: 10px; } .project-card .in { padding: 12px 14px; }
.tag { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 6px; background: rgba(0,0,0,.55); color: #fff; font-size: 11px; font-weight: 700; backdrop-filter: blur(4px); }
.tag.light { background: var(--surface-3); color: var(--text-2); } .tag.ofi { background: var(--ofi); } .tag.brand { background: var(--brand); }
.person-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; }
.user-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); } .user-row:last-child { border-bottom: 0; }

/* ---------- Chat ---------- */
.chat { display: grid; grid-template-columns: 340px minmax(0, 1fr); height: calc(100vh - var(--nav-h) - 40px); min-height: 520px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--sh-sm); }
.chat-list { border-right: 1px solid var(--border); display: flex; flex-direction: column; min-height: 0; }
.chat-list-h { padding: 14px 16px; border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 10px; }
.chat-list-items { overflow-y: auto; flex: 1; }
.conv { display: flex; gap: 12px; align-items: center; padding: 12px 16px; cursor: pointer; border-left: 3px solid transparent; transition: background .12s; color: inherit; text-decoration: none !important; }
.conv:hover { background: var(--surface-3); } .conv.active { background: var(--brand-50); border-left-color: var(--brand); }
.conv .t { font-weight: 700; font-size: 14px; display: flex; align-items: center; gap: 4px; } .conv .p { font-size: 13px; color: var(--text-2); } .conv.unread .p { color: var(--text); font-weight: 600; }
.conv .time { font-size: 11px; color: var(--text-3); } .conv .n { background: var(--brand); color: #fff; font-size: 11px; font-weight: 700; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; display: grid; place-items: center; }
.chat-pane { display: flex; flex-direction: column; min-height: 0; background: var(--surface-2); }
.chat-h { display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: var(--surface); border-bottom: 1px solid var(--border); min-height: 62px; }
.chat-h .status { font-size: 12px; color: var(--text-3); } .chat-h .status.on { color: var(--success); font-weight: 600; }
.chat-msgs { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 4px; }
.msg { display: flex; align-items: flex-end; gap: 8px; max-width: 78%; } .msg.mine { align-self: flex-end; flex-direction: row-reverse; }
.bubble { padding: 8px 12px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); font-size: 14.5px; line-height: 1.45; word-break: break-word; white-space: pre-wrap; position: relative; box-shadow: var(--sh-sm); }
.msg.mine .bubble { background: var(--brand); color: #fff; border-color: var(--brand); border-bottom-right-radius: 4px; } .msg:not(.mine) .bubble { border-bottom-left-radius: 4px; }
.bubble .sender { font-size: 12px; font-weight: 700; color: var(--brand); margin-bottom: 2px; }
.bubble .meta { display: flex; justify-content: flex-end; align-items: center; gap: 4px; font-size: 10.5px; opacity: .75; margin-top: 3px; } .bubble .meta svg { width: 14px; height: 14px; } .bubble .meta .read { color: #a5f3fc; }
.msg.mine .bubble .meta .read { color: #bfdbfe; }
.bubble .reply { border-left: 3px solid rgba(255,255,255,.6); background: rgba(0,0,0,.08); padding: 4px 8px; border-radius: 6px; font-size: 12.5px; margin-bottom: 6px; opacity: .9; } .msg:not(.mine) .bubble .reply { border-left-color: var(--brand); background: var(--surface-3); }
.bubble img.att { max-width: 320px; border-radius: 10px; margin-top: 4px; cursor: zoom-in; } .bubble video.att { max-width: 320px; border-radius: 10px; }
.bubble .file { display: flex; gap: 8px; align-items: center; padding: 6px 8px; background: rgba(0,0,0,.08); border-radius: 8px; }
.msg .btn.icon.xs { opacity: 0; transition: opacity .12s; } .msg:hover .btn.icon.xs { opacity: .7 !important; } @media (hover: none) { .msg .btn.icon.xs { opacity: .5; } }
.msg-sys { align-self: center; font-size: 12px; color: var(--text-3); background: var(--surface-3); padding: 4px 10px; border-radius: 999px; margin: 6px 0; }
.day-sep { align-self: center; font-size: 11px; font-weight: 700; color: var(--text-3); margin: 10px 0 4px; text-transform: uppercase; letter-spacing: .05em; }
.typing { font-size: 12px; color: var(--text-3); padding: 2px 16px; height: 20px; font-style: italic; }
.chat-composer { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px; background: var(--surface); border-top: 1px solid var(--border); }
.chat-composer textarea { flex: 1; min-width: 0; resize: none; border: 1px solid var(--border); background: var(--surface-2); border-radius: 20px; padding: 10px 14px; font: inherit; font-size: 15px; max-height: 140px; min-height: 42px; color: var(--text); outline: none; line-height: 1.4; }
.chat-composer textarea:focus { border-color: var(--brand); }
.reply-bar { display: flex; align-items: center; gap: 8px; padding: 6px 16px; background: var(--surface); border-top: 1px solid var(--border); font-size: 13px; } .reply-bar .q { flex: 1; border-left: 3px solid var(--brand); padding-left: 8px; color: var(--text-2); }
.chat-empty { flex: 1; display: grid; place-items: center; text-align: center; color: var(--text-3); padding: 40px; }

/* ---------- Notifications ---------- */
.notif { display: flex; gap: 12px; padding: 12px 16px; border-radius: 12px; cursor: pointer; align-items: flex-start; transition: background .12s; color: inherit; text-decoration: none !important; }
.notif:hover { background: var(--surface-3); } .notif.unread { background: var(--brand-50); } .notif .ic { position: absolute; right: -4px; bottom: -4px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 11px; border: 2px solid var(--surface); }
.notif .t { font-size: 14px; } .notif .t b { font-weight: 700; } .notif .b { font-size: 13px; color: var(--text-2); } .notif .time { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.notif .ud { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); margin-top: 8px; flex: none; }
.popover { position: absolute; top: calc(100% + 8px); right: 0; width: 380px; max-width: calc(100vw - 24px); background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--sh-lg); z-index: 60; overflow: hidden; }

/* ---------- Modals / dialogs / toasts ---------- */
.overlay { position: fixed; inset: 0; background: rgba(8,12,24,.55); backdrop-filter: blur(3px); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 16px; animation: fade .15s; }
.modal { background: var(--surface); border-radius: 18px; width: 100%; max-width: 560px; max-height: calc(100vh - 32px); display: flex; flex-direction: column; box-shadow: var(--sh-lg); animation: pop .18s var(--ease); border: 1px solid var(--border); }
.modal.sm { max-width: 440px; } .modal.lg { max-width: 760px; } .modal.xl { max-width: 980px; }
.modal-h { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); } .modal-h h3 { font-size: 17px; }
.modal-b { padding: 20px; overflow-y: auto; } .modal-f { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.dialog-icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 12px; } .dialog-icon.danger { background: var(--danger-50); color: var(--danger); } .dialog-icon.warn { background: var(--warn-50); color: var(--warn); } .dialog-icon.info { background: var(--brand-50); color: var(--brand); }
.toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 200; pointer-events: none; width: min(420px, calc(100vw - 32px)); }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; background: #0f172a; color: #fff; box-shadow: var(--sh-lg); font-size: 14px; font-weight: 500; animation: up .2s var(--ease); }
.toast.success { background: #065f46; } .toast.error { background: #991b1b; } .toast.info { background: #1e3a8a; } .toast svg { width: 18px; height: 18px; flex: none; }
.alert { display: flex; gap: 10px; padding: 12px 14px; border-radius: 12px; font-size: 14px; align-items: flex-start; } .alert svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.alert.error { background: var(--danger-50); color: var(--danger); } .alert.warn { background: var(--warn-50); color: #92400e; } .alert.info { background: var(--brand-50); color: var(--brand-600); } .alert.ofi { background: var(--ofi-50); color: #0b5e9a; } .alert.success { background: #ecfdf5; color: #065f46; }
.tooltip { position: relative; } .tooltip[data-tip]:hover::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); background: #0f172a; color: #fff; font-size: 12px; padding: 4px 8px; border-radius: 6px; white-space: nowrap; z-index: 20; pointer-events: none; }
.menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 200px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--sh-lg); padding: 6px; z-index: 40; animation: pop .12s var(--ease); }
.menu button, .menu a { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; background: transparent; border-radius: 8px; font-size: 14px; font-weight: 500; cursor: pointer; text-align: left; color: var(--text); text-decoration: none !important; }
.menu button:hover, .menu a:hover { background: var(--surface-3); } .menu button.danger { color: var(--danger); } .menu svg { width: 17px; height: 17px; color: var(--text-3); } .menu button.danger svg { color: var(--danger); }
.menu .sep { height: 1px; background: var(--border); margin: 4px 0; }

/* ---------- States ---------- */
.skeleton { background: linear-gradient(90deg, var(--surface-3) 25%, var(--border) 37%, var(--surface-3) 63%); background-size: 400% 100%; animation: shimmer 1.4s infinite; border-radius: 8px; }
.sk-line { height: 12px; margin: 6px 0; } .sk-circle { border-radius: 50%; }
.empty { text-align: center; padding: 40px 20px; color: var(--text-2); display: flex; flex-direction: column; align-items: center; gap: 8px; }
.empty .ic { width: 64px; height: 64px; border-radius: 20px; background: var(--surface-2); display: grid; place-items: center; color: var(--text-3); margin-bottom: 6px; } .empty .ic svg { width: 28px; height: 28px; }
.empty h3 { color: var(--text); } .empty p { max-width: 380px; font-size: 14px; }
.spinner { width: 20px; height: 20px; border: 2.5px solid var(--border-strong); border-top-color: var(--brand); border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; } .spinner.lg { width: 34px; height: 34px; border-width: 3px; }
.center-page { min-height: 60vh; display: grid; place-items: center; }
.progress { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; } .progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), #8b5cf6); border-radius: 999px; transition: width .4s var(--ease); }
.progress.ofi i { background: linear-gradient(90deg, var(--ofi), #34d399); }

/* ---------- Auth ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-art { background: radial-gradient(1100px 600px at 15% 15%, rgba(140,0,0,.55), transparent 70%), radial-gradient(700px 500px at 95% 95%, rgba(107,0,0,.35), transparent 70%), #0a0a0c; color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-art h1 { font-size: 54px; font-weight: 700; letter-spacing: -.02em; line-height: 1.02; max-width: 560px; font-family: var(--font-display); } .auth-art .greet { color: rgba(255,255,255,.55); font-size: 13px; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; margin-top: 28px; } .auth-art p { color: rgba(255,255,255,.72); max-width: 460px; font-size: 16px; margin-top: 14px; }
.auth-art .feat { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 32px; max-width: 560px; } .auth-art .feat div { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1); border-radius: 14px; padding: 14px; font-size: 13.5px; } .auth-art .feat b { display: block; font-size: 14px; margin-bottom: 2px; }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 32px 20px; background: var(--bg); }
.auth-card { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 16px; }

/* ---------- Timeline (journey) ---------- */
.timeline { position: relative; padding-left: 28px; } .timeline::before { content: ""; position: absolute; left: 9px; top: 6px; bottom: 6px; width: 2px; background: var(--border-strong); border-radius: 2px; }
.tl-item { position: relative; padding: 4px 0 22px; } .tl-item::before { content: ""; position: absolute; left: -24px; top: 8px; width: 12px; height: 12px; border-radius: 50%; background: var(--brand); border: 3px solid var(--surface); box-shadow: 0 0 0 2px var(--brand-100); }
.tl-item.ofi::before { background: var(--ofi); box-shadow: 0 0 0 2px var(--ofi-100); } .tl-item.gold::before { background: #d97706; box-shadow: 0 0 0 2px #fde68a; }
.tl-item .d { font-size: 12px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .04em; } .tl-item .t { font-weight: 700; margin-top: 2px; }

/* ---------- Memory cards ---------- */
.memory { position: relative; border-radius: 16px; overflow: hidden; aspect-ratio: 4/3; background: linear-gradient(135deg, #1a1a1f, #6b0000); color: #fff; display: flex; align-items: flex-end; box-shadow: var(--sh); }
.memory img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; } .memory .ov { position: relative; padding: 16px; background: linear-gradient(transparent, rgba(0,0,0,.75)); width: 100%; }
.memory .yrs { position: absolute; top: 12px; left: 12px; background: rgba(255,255,255,.18); backdrop-filter: blur(6px); padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.memory h3 { font-size: 17px; color: #fff; } .memory p { font-size: 13px; opacity: .85; }
.yb-cover { aspect-ratio: 3/4; border-radius: 14px; overflow: hidden; position: relative; background: linear-gradient(160deg, #0f0f12, #6b0000); color: #fff; display: flex; align-items: flex-end; padding: 16px; box-shadow: var(--sh); }
.yb-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .6; } .yb-cover > div { position: relative; }

/* ---------- Document viewer ---------- */
.doc-card { display: flex; gap: 14px; align-items: center; padding: 14px 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.doc-ic { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--ofi-50); color: var(--ofi-600); } .doc-ic svg { width: 24px; height: 24px; }
.doc-frame { width: 100%; height: 70vh; border: 1px solid var(--border); border-radius: 12px; background: #e5e7eb; }
.status-pill { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.status-pill.valid { background: var(--ofi-50); color: #0b5e9a; } .status-pill.revoked, .status-pill.suspended { background: var(--danger-50); color: var(--danger); } .status-pill.superseded, .status-pill.unavailable, .status-pill.pending { background: var(--warn-50); color: #92400e; } .status-pill.active { background: var(--ofi-50); color: #0b5e9a; } .status-pill.deactivated { background: var(--surface-3); color: var(--text-2); }
.totp-code { font-family: var(--mono); font-size: 28px; letter-spacing: .3em; text-align: center; }
.qr { background: #fff; padding: 12px; border-radius: 12px; display: inline-block; border: 1px solid var(--border); }

/* ---------- Public profile ---------- */
.pub { max-width: 920px; margin: 0 auto; padding: 24px 16px 60px; }
.pub-head { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.pub-sec { margin-top: 28px; } .pub-sec h2 { font-size: 15px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); margin-bottom: 12px; }
.verified-strip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: var(--ofi-50); color: var(--ofi-600); font-weight: 700; font-size: 13px; }
.cert-row { display: flex; gap: 12px; align-items: center; padding: 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }

/* ---------- Admin ---------- */
.admin-nav { display: flex; gap: 6px; flex-wrap: wrap; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; } .table th { text-align: left; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); padding: 10px 12px; border-bottom: 1px solid var(--border); }
.table td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; } .table tr:hover td { background: var(--surface-2); } .table-wrap { overflow-x: auto; }
.danger-zone { border: 1px solid #fecaca; border-radius: 14px; } .danger-zone .card-h { background: var(--danger-50); color: var(--danger); border-bottom-color: #fecaca; }
.code { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 12px; font-family: var(--mono); font-size: 12px; overflow: auto; max-height: 320px; white-space: pre; }
.kbd { font-family: var(--mono); font-size: 12px; background: var(--surface-3); padding: 2px 6px; border-radius: 5px; border: 1px solid var(--border-strong); }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.92); z-index: 150; display: grid; place-items: center; cursor: zoom-out; } .lightbox img { max-width: 96vw; max-height: 92vh; object-fit: contain; border-radius: 6px; }

@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: scale(.96) translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes up { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1180px) {
  .shell { grid-template-columns: var(--sidebar-w) minmax(0, 1fr); } .rail { display: none; }
}
@media (max-width: 900px) {
  .shell, .shell.wide { grid-template-columns: minmax(0, 1fr); padding: 14px 12px calc(var(--tab-h) + 20px); gap: 14px; } .sidebar { display: none; }
  .hide-mobile { display: none !important; } .show-mobile { display: flex !important; }
  .topnav-in { gap: 10px; } .nav-search { max-width: none; } .nav-links { display: none; }
  .tabbar { position: fixed; bottom: 0; left: 0; right: 0; height: calc(var(--tab-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: var(--surface); border-top: 1px solid var(--border); display: flex; z-index: 50; }
  .tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--text-3); font-size: 10.5px; font-weight: 600; position: relative; text-decoration: none !important; } .tabbar a.active { color: var(--brand); } .tabbar a svg { width: 23px; height: 23px; }
  .tabbar .dot { top: 6px; right: calc(50% - 20px); }
  .chat { grid-template-columns: 1fr; height: calc(100vh - var(--nav-h) - 28px - var(--tab-h)); border-radius: 12px; }
  .chat-list.hidden-m { display: none; } .chat-pane.hidden-m { display: none; }
  .cover { height: 150px; } .profile-head { padding: 0 16px 16px; } .profile-avatar { width: 104px; height: 104px; margin-top: -44px; } .profile-name { font-size: 20px; }
  .auth { grid-template-columns: 1fr; } .auth-art { padding: 28px 20px; min-height: 0; } .auth-art h1 { font-size: 28px; } .auth-art p { font-size: 14px; } .auth-art h1 { font-size: 34px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; } .modal-b { padding: 16px; } .post-media.n1 img { max-height: 420px; }
  .msg { max-width: 88%; } .bubble img.att { max-width: 240px; } .chat-composer { padding: 8px 8px; gap: 4px; } .chat-composer .btn.icon { width: 36px; height: 36px; }
  .page-h h1 { font-size: 22px; }
}
@media (max-width: 520px) { .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; } .auto-grid { grid-template-columns: 1fr 1fr; } .stat .v { font-size: 18px; } .card.pad { padding: 16px; } }
@media (max-width: 640px) { .about-grid { grid-template-columns: 1fr; } }
.share-row > :first-child { flex: 1 1 0; min-width: 0; } .share-select { width: 170px; flex: 0 0 170px; }
@media (max-width: 760px) { .details-grid { grid-template-columns: 1fr; } .share-select { width: 150px; flex-basis: 150px; } }
@media (max-width: 380px) { .auto-grid, .grid-2 { grid-template-columns: 1fr; } }

/* social links */
.social-row { display: flex; flex-wrap: wrap; gap: 8px; }
.social-btn { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); transition: all .15s var(--ease); }
.social-btn svg { width: 55%; height: 55%; } .social-btn:hover { background: var(--pc); border-color: var(--pc); color: #fff; transform: translateY(-1px); }
.batch-cover-thumb { width: 96px; height: 36px; border-radius: 6px; background: linear-gradient(120deg, #2a0000, #6b0000 55%, #1a1a1f); background-size: cover; background-position: center; flex: none; } .batch-cover-thumb.lg { width: 240px; height: 90px; border-radius: 10px; }
@media (max-width: 900px) { .admin-batches { grid-template-columns: 1fr !important; } }
.table td { white-space: nowrap; } .table td .tiny { white-space: nowrap; }

/* jobs & resume */
.work-chip { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 700; font-family: var(--font); }
.work-chip.looking { background: #e8f5fe; color: #0b63a8; } .work-chip.hiring { background: #e9f8ee; color: #137333; }
:root[data-theme="dark"] .work-chip.looking { background: #0b2a40; color: #7cc4f5; } :root[data-theme="dark"] .work-chip.hiring { background: #0d2e1a; color: #7fd79b; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .work-chip.looking { background: #0b2a40; color: #7cc4f5; } :root:not([data-theme="light"]) .work-chip.hiring { background: #0d2e1a; color: #7fd79b; } }
.job-ic { width: 44px; height: 44px; border-radius: 12px; background: var(--brand-50); color: var(--brand); display: grid; place-items: center; flex: none; } .job-ic svg { width: 20px; height: 20px; }
.clamp3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.resume-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; } .resume-row { border: 1px solid var(--border); border-radius: 12px; padding: 12px; background: var(--surface-2); }
@media (max-width: 1000px) { .resume-layout { grid-template-columns: 1fr; } } @media (max-width: 640px) { .resume-grid { grid-template-columns: 1fr !important; } }
.rail-fallback { display: none; } @media (max-width: 1180px) { .rail-fallback { display: block; } }

/* ---------- small-screen fixes (audit) ---------- */
.person-card { min-width: 0; } .person-card .row.gap1 { max-width: 100%; min-width: 0; } .person-card .truncate { display: block; max-width: 100%; }
.list-item > .grow, .user-row > .grow { min-width: 0; } .user-row .sub, .list-item .sub { white-space: normal; }
.tabs { flex-wrap: nowrap; -webkit-overflow-scrolling: touch; } .tab { flex: none; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
.card, .card-b, .card-h { min-width: 0; }
@media (max-width: 640px) {
  .auto-grid { grid-template-columns: 1fr 1fr; gap: 10px; } .auto-grid-sm { grid-template-columns: 1fr 1fr; gap: 8px; }
  .photos-row { flex-direction: column; align-items: stretch; } .photos-row > .col.center { align-items: center; }
  .page-h { flex-wrap: wrap; } .page-h > div:last-child { width: 100%; }
  .admin-batches .grid-2, .grid.grid-2:not(.resume-grid):not(.details-grid):not(.about-grid) { grid-template-columns: 1fr; }
  .stat { padding: 10px 12px; }
}
@media (max-width: 420px) { .auto-grid, .auto-grid-sm { grid-template-columns: 1fr 1fr; } .person-card { padding: 10px; } }
.textarea, .input, .select { max-width: 100%; } .user-row .sub { overflow-wrap: anywhere; }


/* ---- Accessibility (WCAG 2.2 AA): skip link, screen-reader-only text, minimum target sizes, visible focus ---- */
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 1000; background: var(--brand); color: #fff; padding: 10px 14px; border-radius: 10px; font-weight: 700; transition: top .15s; }
.skip-link:focus { top: 12px; outline: 3px solid #fff; box-shadow: 0 0 0 5px var(--brand); }
.card a.small, a.small, .page-h a, .card-h a { display: inline-flex; align-items: center; min-height: 24px; }
.name-line a, a.row.gap1 { min-height: 24px; }
.chip button, .chip-input .chip button { width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; margin: -4px -6px -4px 0; }
.table a { display: inline-block; min-height: 24px; line-height: 24px; }
.btn.sm { min-height: 32px; } .btn.icon.sm { width: 32px; height: 32px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } }
.card b > a, .card h3 > a, .card strong > a { display: inline-block; min-height: 24px; line-height: 24px; } a.small { min-width: 24px; justify-content: center; }
.auth-card a { display: inline-flex; align-items: center; min-height: 24px; }
.official-row { padding: 8px 0; border-top: 1px solid var(--border); align-items: center; } .official-rows > .official-row:first-child { border-top: 0; }

.cover-editable { cursor: ns-resize; touch-action: none; user-select: none; outline-offset: 2px; }
.cover-hint { position: absolute; left: 12px; bottom: 10px; background: rgba(0,0,0,.6); color: #fff; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; pointer-events: none; }


/* ---- Assessment environment (APP_MODE=assessment only) ---- */
.assess-bar { position: sticky; top: 0; z-index: 60; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 6px 16px; background: #b45309; color: #fff; font-size: 12.5px; font-weight: 600; letter-spacing: .01em; }
.assess-bar.danger { background: #b91c1c; }
.assess-bar a { color: #fff; text-decoration: underline; }
.assess-label { display: inline-flex; align-items: center; gap: 8px; }
.assess-timer { display: inline-flex; align-items: center; gap: 8px; font-variant-numeric: tabular-nums; }
.assess-timer strong { font-size: 14px; }
.assess-link { display: inline-flex; align-items: center; gap: 5px; margin-left: 8px; opacity: .95; }
body:has(.assess-bar) .topnav { top: 31px; }
@media (max-width: 720px) { .assess-bar { font-size: 11.5px; padding: 5px 12px; } .assess-label { flex: 1 1 100%; } body:has(.assess-bar) .topnav { top: 0; } }
.assess-stage { border: 1px solid var(--border); border-radius: var(--r-lg); padding: 14px 16px; background: var(--surface); }
.assess-stage + .assess-stage { margin-top: 10px; }
.assess-stage h3 { margin: 0 0 4px; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.assess-stage .min { font-size: 12px; color: var(--text-3); font-weight: 500; }
.assess-stage ol, .assess-stage ul { margin: 6px 0 8px 18px; font-size: 13.5px; }
.assess-stage li { margin: 2px 0; }
.finding-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); cursor: pointer; }
.finding-row:hover { border-color: var(--text-3); }
.finding-row .meta { font-size: 12px; color: var(--text-3); }
.finding-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 720px) { .finding-grid { grid-template-columns: 1fr; } }
.evidence-grid { display: flex; gap: 8px; flex-wrap: wrap; }
.evidence-grid a, .evidence-grid .ev { position: relative; width: 96px; height: 72px; border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; display: grid; place-items: center; background: var(--bg); font-size: 11px; }
.evidence-grid img { width: 100%; height: 100%; object-fit: cover; }
.evidence-grid .rm { position: absolute; top: 2px; right: 2px; }
.accounts-box { display: grid; gap: 8px; grid-template-columns: 1fr 1fr; }
@media (max-width: 720px) { .accounts-box { grid-template-columns: 1fr; } }
.accounts-box .acct { border: 1px dashed var(--border); border-radius: var(--r); padding: 10px 12px; font-size: 13px; }
.accounts-box code { user-select: all; font-size: 13px; background: var(--bg); padding: 1px 6px; border-radius: 4px; }
.score-grid { display: grid; grid-template-columns: 1fr 90px 70px; gap: 6px 10px; align-items: center; font-size: 13.5px; }
.planted-list li { margin: 6px 0; font-size: 13.5px; }
.review-pill { font-size: 11px; padding: 2px 8px; border-radius: 999px; background: var(--bg); border: 1px solid var(--border); font-weight: 600; }
.review-pill.confirmed { background: #dcfce7; color: #166534; border-color: #86efac; }
.review-pill.not_reproduced, .review-pill.rejected { background: #fee2e2; color: #991b1b; border-color: #fca5a5; }
.review-pill.duplicate, .review-pill.needs_info { background: #fef3c7; color: #92400e; border-color: #fcd34d; }

/* Planted problems (deliberate; only toggled in the assessment environment via me.assessment.planted) */
body.planted-hint-contrast :is(.hint, .tiny.subtle, .small.subtle):not(.assess-root *) { color: #c4c7cc; }
.composer-tools.kb-planted { position: fixed; left: 0; right: 0; bottom: 0; transform: translateY(100%); margin: 0; padding: 10px 16px; background: var(--surface); border-top: 1px solid var(--border); z-index: 5; }
@media (min-width: 721px) { .composer-tools.kb-planted { position: static; bottom: auto; transform: none; padding: 10px 0 0; border-top: 1px solid var(--border); } }
.kv { width: 100%; font-size: 13.5px; border-collapse: collapse; } .kv th { text-align: left; color: var(--text-3); font-weight: 500; padding: 4px 10px 4px 0; vertical-align: top; white-space: nowrap; width: 110px; } .kv td { padding: 4px 0; }
.stack { display: flex; flex-direction: column; } .stack.gap2 { gap: 8px; }
