/* JACC Design Prototype — layout & components */

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font-body);
  font-size: calc(15px * var(--density));
  line-height: 1.45;
  color: var(--ink);
  background: var(--bg);
  background-image: var(--pattern);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

body.gallery-mode {
  background: var(--ja-immersive-blue-black);
  background-image: radial-gradient(ellipse at 10% 0%, color-mix(in srgb, var(--ja-enterprise-aqua) 28%, transparent), transparent 45%),
                    radial-gradient(ellipse at 90% 100%, color-mix(in srgb, var(--ja-leadership-lime) 18%, transparent), transparent 40%);
  color: #f2f2f7;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  letter-spacing: var(--letter-display);
  line-height: 1.15;
  margin: 0 0 .4em;
  font-weight: 700;
}
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ── Theme review chrome ── */
.theme-bar {
  position: sticky;
  top: 0;
  z-index: 200;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: var(--shell-bg);
  backdrop-filter: var(--shell-blur);
  -webkit-backdrop-filter: var(--shell-blur);
  border-bottom: 1px solid var(--line);
}
.theme-bar .tb-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-family: var(--font-display);
  margin-right: auto;
}
.theme-bar .tb-mark {
  width: 28px; height: 28px; border-radius: 8px;
  background: linear-gradient(135deg, var(--ja-enterprise-aqua), var(--ja-boundless-blue));
  display: grid; place-items: center; color: #fff; font-size: 11px; font-weight: 800;
}
.theme-bar .tb-meta { font-size: 12px; color: var(--ink-2); font-weight: 500; }
.theme-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.theme-chip {
  min-height: 36px;
  padding: 0 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 650;
  transition: transform .15s ease, background .15s ease;
}
.theme-chip:hover { transform: translateY(-1px); }
.theme-chip.is-active {
  background: var(--primary);
  color: var(--on-primary);
  border-color: transparent;
}
.theme-chip .dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  margin-right: 6px; vertical-align: middle;
}
.tb-actions { display: flex; gap: 6px; align-items: center; }
.lang-switch {
  display: inline-flex;
  gap: 2px;
  padding: 2px;
  border-radius: 999px;
  background: var(--sunken);
  border: 1px solid var(--line);
}
.lang-btn {
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  color: var(--ink-2);
}
.lang-btn.is-on {
  background: var(--primary);
  color: var(--on-primary);
}
.tb-link {
  min-height: 36px; padding: 0 12px; border-radius: var(--radius-pill);
  border: 1px solid var(--line); background: var(--surface-2);
  font-size: 12.5px; font-weight: 650; display: inline-flex; align-items: center;
}

/* ── Gallery landing ── */
.gallery {
  max-width: 1180px;
  margin: 0 auto;
  padding: 48px 20px 80px;
}
.gallery-hero {
  text-align: center;
  margin-bottom: 48px;
  animation: rise .7s cubic-bezier(.2,.8,.2,1) both;
}
.gallery-hero .eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 999px;
  background: color-mix(in srgb, var(--ja-enterprise-aqua) 20%, transparent);
  color: var(--ja-enterprise-aqua); font-size: 13px; font-weight: 700;
  margin-bottom: 18px;
}
.gallery-hero h1 {
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-family: "Outfit", system-ui, sans-serif;
  letter-spacing: -.03em;
  color: #fff;
  margin-bottom: 12px;
}
.gallery-hero h1 em {
  font-style: normal;
  background: linear-gradient(90deg, var(--ja-enterprise-aqua), var(--ja-leadership-lime), var(--ja-empowered-yellow));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.gallery-hero p {
  max-width: 560px; margin: 0 auto 28px;
  color: #aeaeb2; font-size: 1.1rem;
}
.gallery-cta {
  display: inline-flex; gap: 10px; flex-wrap: wrap; justify-content: center;
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.theme-card {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.08);
  background: #1c1c1e;
  cursor: pointer;
  transition: transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .25s ease;
  text-align: left;
  animation: rise .7s cubic-bezier(.2,.8,.2,1) both;
}
.theme-card:nth-child(2) { animation-delay: .06s; }
.theme-card:nth-child(3) { animation-delay: .12s; }
.theme-card:nth-child(4) { animation-delay: .18s; }
.theme-card:nth-child(5) { animation-delay: .24s; }
.theme-card:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 24px 60px rgba(0,0,0,.4);
}
.theme-card .preview {
  height: 140px;
  padding: 16px;
  display: grid;
  gap: 8px;
  align-content: end;
}
.theme-card .preview .bar {
  height: 10px; border-radius: 6px; width: 70%;
  background: color-mix(in srgb, currentColor 30%, transparent);
}
.theme-card .preview .chips { display: flex; gap: 6px; }
.theme-card .preview .chip {
  height: 22px; width: 48px; border-radius: 999px;
  background: color-mix(in srgb, currentColor 45%, transparent);
}
.theme-card .body { padding: 18px 20px 22px; }
.theme-card .body h3 { color: #fff; font-size: 1.25rem; margin-bottom: 4px; }
.theme-card .body p { color: #aeaeb2; font-size: .9rem; margin: 0 0 14px; }
.theme-card .swatches { display: flex; gap: 6px; margin-bottom: 14px; }
.theme-card .swatch {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.15);
}
.theme-card .go {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--ja-enterprise-aqua); font-weight: 700; font-size: .9rem;
}

.gallery-features {
  margin-top: 64px;
  padding: 32px;
  border-radius: 28px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
}
.gallery-features h2 {
  font-family: "Outfit", system-ui, sans-serif;
  color: #fff; margin-bottom: 8px;
}
.gallery-features > p { color: #aeaeb2; }
.feat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-top: 20px;
}
.feat-item {
  padding: 16px;
  border-radius: 16px;
  background: rgba(0,0,0,.25);
  border: 1px solid rgba(255,255,255,.06);
}
.feat-item strong { display: block; color: #fff; margin-bottom: 4px; }
.feat-item span { color: #8e8e93; font-size: .85rem; }

/* ── App shell ── */
#app { min-height: 100dvh; display: flex; flex-direction: column; }

.app-header {
  position: sticky; top: 53px; z-index: 100;
  background: var(--shell-bg);
  backdrop-filter: var(--shell-blur);
  -webkit-backdrop-filter: var(--shell-blur);
  border-bottom: 1px solid var(--line);
}
.app-header .row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px var(--content-pad, 20px);
  max-width: var(--content-max, 1100px);
  margin: 0 auto;
  width: 100%;
}
.brandmark {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-display); font-weight: 800; font-size: 1.05rem;
  white-space: nowrap;
}
.brandmark .logo {
  width: 32px; height: 32px; border-radius: 10px;
  background: linear-gradient(145deg, var(--accent), var(--primary));
  display: grid; place-items: center; color: var(--on-primary); font-size: 11px;
}
.navpill {
  display: none; gap: 2px; padding: 4px; border-radius: var(--radius-pill);
  background: var(--nav-pill); margin-left: 8px;
}
.navpill a {
  padding: 8px 14px; border-radius: var(--radius-pill);
  font-size: 13.5px; font-weight: 600; color: var(--ink-2);
  transition: background .15s, color .15s;
}
.navpill a.is-active, .navpill a:hover {
  background: var(--surface); color: var(--ink); box-shadow: var(--shadow);
}
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.ui-icon,
.icon-btn svg,
.searchbar svg,
.bottom-nav a svg,
.brandmark svg {
  width: 20px;
  height: 20px;
  flex: none;
  display: block;
}
.icon-btn {
  width: 40px; height: 40px; border-radius: var(--radius-pill);
  display: grid; place-items: center; color: var(--ink-2);
  background: transparent; position: relative;
}
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn:hover { background: var(--sunken); color: var(--ink); }
.icon-btn .badge {
  position: absolute; top: 6px; right: 6px;
  min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 999px; background: var(--danger); color: #fff;
  font-size: 10px; font-weight: 700; display: grid; place-items: center;
}
.icon-btn .badge:empty,
.icon-btn .badge[hidden] { display: none; }
/* Avatar base lives in polish.css (photo-first, initials fallback) */
.avatar-link, .avatar-btn { display: inline-flex; line-height: 0; padding: 0; border-radius: 50%; }
.avatar-btn:hover { outline: 2px solid var(--accent); outline-offset: 2px; }
.user-menu { position: relative; }
.user-menu-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(280px, calc(100vw - 24px));
  padding: 8px 0;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-float);
  z-index: 420;
  display: none;
}
.user-menu-panel.is-open { display: block; animation: rise .18s ease both; }
.user-menu-panel a,
.user-menu-panel button {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 42px;
  padding: 0 16px;
  font-size: 14px;
  font-weight: 550;
  color: var(--ink);
  text-align: left;
  background: transparent;
}
.user-menu-panel a:hover,
.user-menu-panel button:hover { background: var(--sunken); }
.user-menu-panel .um-icon {
  width: 20px; height: 20px; flex: none; opacity: .75;
  display: grid; place-items: center;
}
.user-menu-panel .um-icon svg { width: 18px; height: 18px; }
.user-menu-panel .um-divider {
  height: 1px; margin: 6px 0; background: var(--line);
}
.user-menu-panel .um-head {
  padding: 10px 16px 8px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 4px;
}
.user-menu-panel .um-head strong { display: block; font-size: 14px; }
.user-menu-panel .um-head .tiny { margin-top: 2px; }
.user-menu-panel .um-lang {
  display: flex; gap: 6px; margin-left: auto;
}
.user-menu-panel .um-lang button {
  width: auto; min-height: 28px; padding: 0 8px;
  border-radius: 999px; font-size: 11px; font-weight: 700;
  border: 1px solid var(--line-strong);
}
.user-menu-panel .um-lang button.is-on {
  background: var(--primary); color: var(--on-primary); border-color: transparent;
}

/* Moodle-style notification / messaging drawers */
.mdl-overlay {
  position: fixed; inset: 0; z-index: 430;
  background: rgba(34, 64, 77, .35);
  opacity: 0; pointer-events: none;
  transition: opacity .22s ease;
}
.mdl-overlay.is-open { opacity: 1; pointer-events: auto; }
.mdl-drawer {
  position: fixed;
  top: 0; right: 0;
  width: min(400px, 100vw);
  height: 100dvh;
  z-index: 440;
  background: var(--surface);
  color: var(--ink);
  border-left: 1px solid var(--line);
  box-shadow: -16px 0 48px rgba(34, 64, 77, .18);
  display: flex;
  flex-direction: column;
  transform: translateX(105%);
  transition: transform .28s cubic-bezier(.2,.8,.2,1);
}
.mdl-drawer.is-open { transform: none; }
.mdl-drawer header {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  flex: none;
}
.mdl-drawer header h2 {
  margin: 0; flex: 1; font-size: 1.05rem;
}
.mdl-drawer .mdl-body {
  flex: 1; overflow: auto; padding: 8px 0 24px;
}
.mdl-drawer .mdl-foot {
  flex: none; padding: 12px 16px;
  border-top: 1px solid var(--line);
  display: grid; gap: 8px;
}
.mdl-note {
  margin: 0 16px 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--sunken);
  font-size: 12.5px;
  color: var(--ink-2);
}
.mdl-item {
  display: flex; gap: 12px; align-items: flex-start;
  width: 100%; padding: 12px 16px;
  text-align: left; background: transparent; color: inherit;
  border: 0; border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.mdl-item:hover { background: var(--sunken); }
.mdl-item.is-unread { background: color-mix(in srgb, var(--accent) 12%, var(--surface)); }
.mdl-item .mdl-meta { flex: 1; min-width: 0; }
.mdl-item .mdl-meta strong { display: block; font-size: 13.5px; }
.mdl-item .mdl-meta p {
  margin: 4px 0 0; font-size: 13px; color: var(--ink-2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mdl-item .mdl-time { font-size: 11px; color: var(--ink-3); flex: none; }
.mdl-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--danger); flex: none; margin-top: 6px;
}
.mdl-dot.is-read { background: transparent; }
.mdl-thread-head {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 16px 12px; border-bottom: 1px solid var(--line);
}
.mdl-bubbles {
  display: flex; flex-direction: column; gap: 8px;
  padding: 14px 16px; min-height: 200px;
}
.mdl-compose {
  display: flex; gap: 8px; padding: 12px 16px;
  border-top: 1px solid var(--line); margin-top: auto;
}
.mdl-compose input {
  flex: 1; min-height: 42px; padding: 0 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line-strong);
  background: var(--sunken);
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-weight: 650; font-size: 14.5px;
  letter-spacing: 0;
  text-decoration: none;
  transition: transform .15s, background .15s, box-shadow .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-accent { background: var(--accent); color: var(--on-accent); }
.btn-secondary {
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line-strong);
}
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--sunken); color: var(--ink); }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: 13px; }
.btn-block { width: 100%; }

.subnav {
  display: flex; gap: 4px;
  padding: 0 var(--content-pad, 20px) 10px;
  max-width: var(--content-max, 1100px);
  margin: 0 auto;
  width: 100%;
  overflow-x: auto;
}
.subnav a {
  padding: 6px 12px; border-radius: var(--radius-pill);
  font-size: 13px; font-weight: 600; color: var(--ink-2); white-space: nowrap;
}
.subnav a.is-active { background: var(--surface-2); color: var(--ink); }

/* Bottom nav (mobile) */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 150;
  display: flex; justify-content: space-around;
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
  background: var(--shell-bg);
  backdrop-filter: var(--shell-blur);
  border-top: 1px solid var(--line);
}
.bottom-nav a {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 6px; font-size: 11px; font-weight: 650; color: var(--ink-3);
  border-radius: var(--radius-md);
}
.bottom-nav a.is-active { color: var(--primary); }
.bottom-nav a svg { width: 22px; height: 22px; flex: none; }
.bottom-nav .create {
  width: 48px; height: 48px; margin-top: -22px;
  border-radius: 50%; background: var(--primary); color: var(--on-primary);
  display: grid; place-items: center; box-shadow: var(--shadow-float);
  flex: none;
}

main.viewport {
  flex: 1;
  width: min(var(--content-max, 1100px), 100%);
  margin: 0 auto;
  padding: 20px var(--content-pad, 16px) 100px;
  box-sizing: border-box;
}

/* Detail screens: readable column on constrained themes; full-width themes override */
.detail-page {
  width: 100%;
  max-width: 720px;
  margin-inline: auto;
}
.detail-card { width: 100%; }

/* Cards & surfaces */
.card {
  background: var(--surface);
  border: var(--card-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 18px;
}
.card-flush { padding: 0; overflow: hidden; }
.card + .card { margin-top: 12px; }

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 26px; padding: 0 10px;
  border-radius: var(--radius-pill);
  font-size: 12px; font-weight: 700;
  background: var(--sunken); color: var(--ink-2);
}
.pill-accent { background: color-mix(in srgb, var(--accent) 28%, transparent); color: var(--ink); }
.pill-success { background: color-mix(in srgb, var(--success-fill) 30%, transparent); color: var(--success); }
.pill-danger { background: color-mix(in srgb, var(--danger) 20%, transparent); color: var(--danger); }
.pill-match {
  background: color-mix(in srgb, var(--ja-enterprise-aqua) 25%, transparent);
  color: var(--ja-immersive-blue-black);
}
.grid-2 { display: grid; gap: 14px; grid-template-columns: 1fr; }
.grid-3 { display: grid; gap: 14px; grid-template-columns: 1fr; }
.grid-4 { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; align-items: center; gap: 10px; }
.row.between { justify-content: space-between; }
.gap-sm { gap: 6px; }
.muted { color: var(--ink-2); }
.tiny { font-size: 12.5px; color: var(--ink-3); }
.section-title {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin: 8px 0 14px;
}
.section-title h1,
.section-title h2 { font-size: 1.25rem; margin: 0; font-family: var(--font-display); }
.section-title h1 { font-size: 1.55rem; font-weight: 800; letter-spacing: var(--letter-display, -0.02em); }
.section-title a:not(.btn) { font-size: 13px; font-weight: 650; color: var(--ink-2); }
.section-title a.btn,
.section-title .btn {
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 650;
  letter-spacing: 0;
  flex-shrink: 0;
}
.section-title a.btn-primary,
.section-title .btn-primary {
  color: var(--on-primary);
}

/* Forms */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 13px; font-weight: 650; color: var(--ink-2); }
.field input, .field select, .field textarea {
  min-height: 44px; padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
}
.field textarea { min-height: 100px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--accent); outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent);
}
.searchbar {
  display: flex; align-items: center; gap: 10px;
  padding: 0 14px; min-height: 48px;
  border-radius: var(--radius-pill);
  background: var(--surface);
  border: var(--card-border);
  box-shadow: var(--shadow);
  color: var(--ink-3);
  overflow: hidden;
}
.searchbar svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  color: var(--ink-3);
}
.searchbar input {
  flex: 1; min-width: 0; border: 0; background: transparent; outline: none; min-height: 44px;
  color: var(--ink);
}
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0; }
.filter-chip {
  min-height: 34px; padding: 0 14px; border-radius: var(--radius-pill);
  border: 1px solid var(--line); background: var(--surface);
  font-size: 13px; font-weight: 600; color: var(--ink-2);
}
.filter-chip.is-active {
  background: var(--primary); color: var(--on-primary); border-color: transparent;
}

/* Stats */
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.stat {
  padding: 16px; border-radius: var(--radius-md);
  background: var(--surface-2); border: var(--card-border);
}
.stat .n {
  font-family: var(--font-display); font-size: 1.75rem; font-weight: 800;
  letter-spacing: var(--letter-display); color: var(--ink);
}
.stat .l { font-size: 12.5px; color: var(--ink-2); font-weight: 600; }

/* Job / event cards */
.media-card {
  display: grid; gap: 0;
  background: var(--surface);
  border: var(--card-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
  cursor: pointer;
}
.media-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-float); }
.media-card .media {
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, var(--ja-boundless-blue), var(--ja-enterprise-aqua));
  position: relative;
}
.media-card .media img { width: 100%; height: 100%; object-fit: cover; }
.media-card .body { padding: 14px 16px 16px; }
.media-card h3 { font-size: 1.05rem; margin-bottom: 4px; }
.list-card {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 14px; background: var(--surface);
  border: var(--card-border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); cursor: pointer;
  transition: transform .15s ease;
}
/* Author display:flex beats UA [hidden] — force hide when filtered out */
.list-card[hidden],
.stack[hidden],
.careers-grid[hidden],
.card[hidden],
[data-careers-board] [hidden] {
  display: none !important;
}
.list-card:hover { transform: translateY(-2px); }
.job-teaser-media { display: none; }
/* Spaces cover: list thumb by default; Horizon promotes to full image card */
.space-teaser-media {
  display: block;
  position: relative;
  flex: 0 0 72px;
  width: 72px;
  height: 72px;
  border-radius: var(--radius-md);
  background: var(--sunken) center/cover no-repeat;
  overflow: hidden;
}
.space-teaser-scrim { display: none; }
.space-kind { display: none; }
.space-unread {
  position: absolute;
  top: 4px;
  right: 4px;
  z-index: 1;
  font-size: 10px;
  padding: 2px 6px;
}
/* Default careers results stay a vertical stack; themes may promote .careers-grid */
.careers-grid.stack { display: flex; flex-direction: column; gap: 12px; }
.filter-chip.is-active {
  outline: 2px solid color-mix(in srgb, var(--accent) 55%, transparent);
  outline-offset: 1px;
}
.list-card .thumb {
  width: 56px; height: 56px; border-radius: var(--radius-md); flex: none;
  background: linear-gradient(135deg, var(--ja-startup-jade), var(--ja-transforming-teal));
  display: grid; place-items: center; color: #fff; font-weight: 800;
}
.list-card .thumb.img { overflow: hidden; padding: 0; background: var(--sunken); }
.list-card .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover-band {
  width: 100%;
  background-color: var(--primary);
  background-size: cover;
  background-position: center;
}
.media-card .media {
  background-color: var(--primary);
}
.list-card .meta { flex: 1; min-width: 0; }
.list-card h3 { font-size: 1rem; margin-bottom: 2px; }
.match-ring {
  width: 48px; height: 48px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: conic-gradient(var(--ja-enterprise-aqua) calc(var(--m) * 1%), var(--sunken) 0);
  font-size: 11px; font-weight: 800;
}
.match-ring span {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--surface); display: grid; place-items: center;
}

/* Hero bands */
.hero {
  position: relative; overflow: hidden;
  border-radius: var(--radius-xl);
  padding: clamp(28px, 5vw, 48px);
  background: var(--hero-bg);
  color: var(--hero-fg);
  margin-bottom: 20px;
  box-shadow: var(--shadow-float);
}
.hero .eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 12px; border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--hero-fg) 12%, transparent);
  font-size: 12.5px; font-weight: 700; margin-bottom: 12px;
}
.hero .eyebrow i {
  width: 8px; height: 8px; border-radius: 50%; background: var(--hero-accent);
}
.hero h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); color: inherit; max-width: 16ch; }
.hero p { color: color-mix(in srgb, var(--hero-fg) 80%, transparent); max-width: 42ch; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.hero .btn-primary {
  background: var(--hero-accent); color: var(--on-accent);
}
.hero .btn-secondary {
  background: transparent; color: var(--hero-fg);
  border-color: color-mix(in srgb, var(--hero-fg) 40%, transparent);
}

/* Auth layout */
.auth-wrap {
  display: grid; gap: 24px; align-items: center;
  min-height: calc(100dvh - 140px);
}
.auth-panel {
  max-width: 420px; width: 100%; margin: 0 auto;
  padding: 28px; border-radius: var(--radius-xl);
  background: var(--surface); border: var(--card-border); box-shadow: var(--shadow-float);
}
.auth-panel h1 { font-size: 1.6rem; }
.code-inputs { display: flex; gap: 8px; justify-content: center; margin: 20px 0; }
.code-inputs input {
  width: 48px; height: 56px; text-align: center; font-size: 1.4rem; font-weight: 700;
  border-radius: var(--radius-md); border: 1px solid var(--line-strong); background: var(--sunken);
}

/* Onboarding steps */
.steps { display: flex; gap: 6px; margin-bottom: 24px; }
.steps span {
  flex: 1; height: 4px; border-radius: 999px; background: var(--sunken);
}
.steps span.is-done, .steps span.is-on { background: var(--primary); }
.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice {
  padding: 16px; border-radius: var(--radius-md);
  border: 2px solid var(--line); background: var(--surface);
  text-align: left; font-weight: 650;
  transition: border-color .15s, background .15s;
}
.choice.is-on, .choice:hover {
  border-color: var(--primary); background: color-mix(in srgb, var(--accent) 15%, var(--surface));
}

/* Messages */
.msg-layout { display: grid; gap: 12px; min-height: 60vh; }
.msg-list .item {
  display: flex; gap: 12px; padding: 12px; border-radius: var(--radius-md);
  cursor: pointer;
}
.msg-list .item:hover, .msg-list .item.is-active { background: var(--sunken); }
.msg-thread {
  display: flex; flex-direction: column; gap: 10px;
  padding: 16px; border-radius: var(--radius-lg);
  background: var(--surface); border: var(--card-border); min-height: 360px;
}
.bubble {
  max-width: 80%; padding: 10px 14px; border-radius: 16px;
  background: var(--sunken); font-size: 14.5px;
}
.bubble.me {
  align-self: flex-end; background: var(--primary); color: var(--on-primary);
  border-bottom-right-radius: 4px;
}
.bubble.them { border-bottom-left-radius: 4px; }

/* Tables / admin */
.table-wrap { overflow-x: auto; border-radius: var(--radius-lg); border: var(--card-border); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); }
th { font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); }
tr:hover td { background: var(--sunken); }

/* Progress / KPI bars */
.bar-track {
  height: 8px; border-radius: 999px; background: var(--sunken); overflow: hidden;
}
.bar-fill {
  height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

/* Toast */
.toast {
  position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%) translateY(20px);
  padding: 12px 18px; border-radius: var(--radius-pill);
  background: var(--ink); color: var(--bg); font-weight: 650; font-size: 14px;
  opacity: 0; pointer-events: none; transition: .25s cubic-bezier(.2,.8,.2,1); z-index: 300;
  box-shadow: var(--shadow-float); white-space: nowrap;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Screen enter animation */
.screen-enter { animation: rise .45s cubic-bezier(.2,.8,.2,1) both; }

@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

/* Empty / role switcher */
.role-switch {
  display: flex; gap: 4px; padding: 4px; border-radius: var(--radius-pill);
  background: var(--sunken); margin-bottom: 16px; overflow-x: auto;
}
.role-switch button {
  flex: 1; min-height: 36px; padding: 0 12px; border-radius: var(--radius-pill);
  font-size: 12.5px; font-weight: 650; color: var(--ink-2); white-space: nowrap;
}
.role-switch button.is-on {
  background: var(--surface); color: var(--ink); box-shadow: var(--shadow);
}

.split {
  display: grid; gap: 16px;
}

@media (min-width: 768px) {
  .navpill { display: flex; }
  .bottom-nav { display: none; }
  main.viewport { padding: 28px var(--content-pad, 24px) 48px; }
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
  .stat-grid { grid-template-columns: repeat(4, 1fr); }
  .auth-wrap { grid-template-columns: 1.1fr .9fr; }
  .msg-layout { grid-template-columns: 280px 1fr; }
  .split { grid-template-columns: 1fr 320px; }
  .app-header { top: 53px; }
}

@media (max-width: 767px) {
  .navpill, .subnav { display: none; }
  .hide-mobile { display: none !important; }
}
