/* ============================================
   PAWS INTRANET
   Educational simulation for Certificate II in Animal Care (ACM20121)
   ============================================ */

:root {
  /* Brand — warm teal */
  --brand: #0d9488;
  --brand-600: #0f766e;
  --brand-700: #115e59;
  --brand-800: #0f4a45;
  --brand-50: #f0fdfa;
  --brand-100: #ccfbf1;

  /* Accent — warm coral */
  --accent: #fb7185;
  --accent-600: #be123c;
  --accent-50: #fff1f2;

  /* Status */
  --ok: #16a34a;
  --warn: #f59e0b;
  --danger: #dc2626;
  --info: #0284c7;

  /* Neutrals — tuned to meet WCAG AA (4.5:1) as body text on white/canvas/pastel surfaces */
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #54627a;
  --muted-2: #4a5972;
  --line: #e2e8f0;
  --line-2: #cbd5e1;
  --canvas: #f6f7fb;
  --surface: #ffffff;
  --surface-2: #f9fafc;

  /* Shape */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-xl: 24px;

  /* Shadows */
  --sh-1: 0 1px 2px rgb(15 23 42 / .06);
  --sh-2: 0 4px 12px -4px rgb(15 23 42 / .08), 0 2px 4px -2px rgb(15 23 42 / .04);
  --sh-3: 0 14px 40px -12px rgb(15 23 42 / .15), 0 4px 8px -4px rgb(15 23 42 / .06);

  --nav-w: 280px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: 'Inter Tight', system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body { min-height: 100vh; }

a { color: var(--brand-700); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible,
[tabindex]:focus-visible, svg[role="button"]:focus-visible {
  outline: 2px solid var(--brand-700);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Skip link — hidden until keyboard-focused */
.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  background: var(--ink);
  color: white;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  z-index: 3000;
  transition: top .15s ease;
}
.skip-link:focus {
  top: 12px;
  outline: 2px solid white;
  outline-offset: 2px;
}

/* Visually hidden but available to assistive tech (text alternatives for diagrams) */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* Display type */
h1, h2, h3, h4 {
  font-family: 'Bricolage Grotesque', sans-serif;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0;
}

h1 { font-size: clamp(1.75rem, 3vw, 2.4rem); font-weight: 700; line-height: 1.1; }
h2 { font-size: 1.4rem; font-weight: 700; }
h3 { font-size: 1.1rem; font-weight: 600; }

p { color: var(--ink-2); margin: 0 0 1em; }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 10px; border: 2px solid var(--canvas); }
::-webkit-scrollbar-thumb:hover { background: var(--muted-2); }

/* ============================================
   LAYOUT
   ============================================ */
.app { display: flex; min-height: 100vh; }

/* Sidebar */
aside.sidebar {
  width: var(--nav-w);
  background: linear-gradient(180deg, var(--brand-700) 0%, var(--brand-800) 100%);
  color: white;
  padding: 26px 18px;
  position: fixed;
  inset: 0 auto 0 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: transform .35s cubic-bezier(.4,0,.2,1);
  overflow-y: auto;
}

/* Decorative pattern overlay on sidebar */
aside.sidebar::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 15% 90%, rgba(255,255,255,.08) 0%, transparent 30%),
    radial-gradient(circle at 85% 10%, rgba(255,255,255,.06) 0%, transparent 40%);
  pointer-events: none;
}

.brand-block {
  position: relative;
  padding: 10px 8px 26px;
  margin-bottom: 14px;
  border-bottom: 1px solid rgba(255,255,255,.12);
}

.brand-logo-inline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}
.brand-logo-inline img { width: 190px; height: 67px; flex-shrink: 0; }

.brand-tag {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-align: center;
  margin-top: 10px;
  color: rgba(255,255,255,.85);
}

nav.main-nav {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
}

.nav-section-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255,255,255,.85);
  padding: 16px 14px 8px;
}

nav.main-nav button {
  background: transparent;
  border: none;
  color: rgba(255,255,255,.82);
  font: 500 14.5px/1 'Inter Tight', sans-serif;
  cursor: pointer;
  padding: 12px 14px;
  border-radius: 10px;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all .2s ease;
  position: relative;
}

nav.main-nav button i { font-size: 19px; flex-shrink: 0; }

nav.main-nav button:hover {
  color: white;
  background: rgba(255,255,255,.08);
}

nav.main-nav button.active {
  color: white;
  background: rgba(255,255,255,.16);
  font-weight: 600;
}

nav.main-nav button.active::before {
  content: '';
  position: absolute;
  left: -18px;
  top: 8px; bottom: 8px;
  width: 4px;
  background: var(--accent);
  border-radius: 0 4px 4px 0;
}

nav.main-nav button:focus-visible {
  outline: 2px solid white;
  outline-offset: -2px;
}

.sidebar-footer {
  position: relative;
  padding: 14px;
  margin-top: 12px;
  border-top: 1px solid rgba(255,255,255,.12);
  font-size: 12px;
  color: rgba(255,255,255,.85);
  line-height: 1.45;
}

.sidebar-footer strong { color: rgba(255,255,255,.85); font-weight: 600; }

/* Mobile header */
.mobile-bar {
  display: none;
  background: var(--brand-700);
  color: white;
  padding: 12px 16px;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: var(--sh-2);
}

.mobile-logo-inline { display: flex; align-items: center; gap: 10px; }
.mobile-logo-inline img { width: 113px; height: 40px; }

.menu-btn {
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.18);
  color: white;
  width: 38px; height: 38px;
  border-radius: 9px;
  font-size: 22px;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.scrim {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,.55);
  backdrop-filter: blur(3px);
  z-index: 99;
}
.scrim.show { display: block; }

/* Main */
main {
  flex: 1;
  margin-left: var(--nav-w);
  padding: 0;
  min-width: 0;
}

.page-inner {
  max-width: 1240px;
  padding: 36px 44px 80px;
  margin: 0 auto;
}

/* Top app strip — date + simulation notice */
.app-strip {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 12px 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 13px;
  color: var(--muted);
}

.app-strip .left { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

.strip-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.strip-item i { font-size: 14px; color: var(--muted-2); }

.live-dot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  color: var(--ink-2);
}
.live-dot::before {
  content: '';
  width: 7px; height: 7px;
  background: var(--ok);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgb(22 163 74 / .18);
  animation: pulse 2.2s infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgb(22 163 74 / .18); }
  50% { box-shadow: 0 0 0 6px rgb(22 163 74 / 0); }
}

.sim-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: var(--accent-600);
  background: var(--accent-50);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  letter-spacing: .03em;
}

/* Section animation */
.tab { display: none; animation: fade .45s ease both; }
.tab.active { display: block; }
@keyframes fade {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================
   HOME / DASHBOARD
   ============================================ */
.hero {
  position: relative;
  background:
    radial-gradient(1100px 400px at 90% -10%, rgba(251,113,133,.12), transparent 50%),
    radial-gradient(900px 500px at -10% 110%, rgba(13,148,136,.16), transparent 55%),
    linear-gradient(135deg, var(--brand-700) 0%, var(--brand-800) 100%);
  color: white;
  border-radius: var(--r-xl);
  padding: 44px 48px;
  margin-bottom: 30px;
  overflow: hidden;
  box-shadow: var(--sh-3);
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}

.hero-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: rgba(255,255,255,.9);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  z-index: 2;
}

.hero-eyebrow::before {
  content: '';
  width: 24px; height: 1.5px;
  background: var(--accent);
}

.hero h1 {
  color: white;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  max-width: 780px;
  margin-bottom: 18px;
  position: relative; z-index: 2;
}

.hero h1 .accent { color: var(--accent); font-style: italic; font-weight: 700; }

.hero p {
  color: rgba(255,255,255,.85);
  font-size: 1.05rem;
  max-width: 620px;
  margin-bottom: 28px;
  position: relative; z-index: 2;
}

.hero-cta {
  display: flex; gap: 12px; flex-wrap: wrap;
  position: relative; z-index: 2;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14.5px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all .2s ease;
  text-decoration: none;
  font-family: 'Inter Tight', sans-serif;
}

.btn-primary {
  background: white;
  color: var(--brand-700);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--sh-2); text-decoration: none; }

.btn-ghost {
  background: rgba(255,255,255,.08);
  color: white;
  border-color: rgba(255,255,255,.22);
}
.btn-ghost:hover { background: rgba(255,255,255,.15); text-decoration: none; }

/* Stats row */
.stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
  margin-bottom: 36px;
}

.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 22px;
  position: relative;
  overflow: hidden;
  transition: all .25s ease;
}

.stat:hover { transform: translateY(-3px); box-shadow: var(--sh-2); border-color: var(--line-2); }

.stat-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: grid; place-items: center;
  font-size: 19px;
  margin-bottom: 14px;
}

.stat-icon.b { background: var(--brand-50); color: var(--brand); }
.stat-icon.a { background: var(--accent-50); color: var(--accent-600); }
.stat-icon.g { background: #dcfce7; color: var(--ok); }
.stat-icon.r { background: #fee2e2; color: var(--danger); }
.stat-icon.v { background: #e0f2fe; color: #0369a1; }

.stat-value {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 4px;
}
.stat-label { font-size: 13px; color: var(--muted); font-weight: 500; }

/* Two-column dashboard */
.dash-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 22px;
  margin-bottom: 36px;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 26px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.panel-head h2 { font-size: 1.15rem; display: inline-flex; align-items: center; gap: 10px; }
.panel-h-icon { font-size: 22px; color: var(--brand); }

.panel-head .more { font-size: 13px; color: var(--brand-700); font-weight: 500; cursor: pointer; text-decoration: underline; }

/* Quick links grid */
.quick-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.quick {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: all .2s ease;
  text-align: left;
  width: 100%;
  font: inherit;
  color: var(--ink);
}

.quick:hover, .quick:focus-visible {
  border-color: var(--brand);
  background: var(--brand-50);
  transform: translateX(2px);
}

.quick i { color: var(--brand); font-size: 22px; }
.quick-text { display: flex; flex-direction: column; gap: 2px; }
.quick-text strong { font-weight: 600; font-size: 14px; }
.quick-text span { font-size: 12px; color: var(--muted); }

/* Announcements / news feed */
.notice {
  display: flex;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.notice:last-child { border-bottom: none; padding-bottom: 0; }
.notice:first-child { padding-top: 0; }

.notice-icon {
  flex-shrink: 0;
  width: 36px; height: 36px;
  border-radius: 9px;
  display: grid; place-items: center;
  font-size: 17px;
}
.notice-icon.safety { background: #fee2e2; color: var(--danger); }
.notice-icon.team   { background: var(--brand-50); color: var(--brand); }
.notice-icon.event  { background: var(--accent-50); color: var(--accent-600); }
.notice-icon.info   { background: #e0f2fe; color: var(--info); }

.notice h3 { font-family: 'Inter', sans-serif; font-size: 14px; font-weight: 700; margin-bottom: 3px; }
.notice p { font-family: 'Inter', sans-serif; font-size: 13px; color: var(--muted); margin: 0; }
.notice time { font-size: 11.5px; color: var(--muted-2); font-family: 'JetBrains Mono', monospace; }

/* ============================================
   PAGE HEADERS
   ============================================ */
.page-head {
  margin-bottom: 28px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.page-head .left { max-width: 720px; }

.crumb {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
  display: flex; align-items: center; gap: 8px;
}
.crumb span { color: var(--brand-700); }

.page-head p { font-size: 15.5px; color: var(--ink-2); margin-bottom: 0; margin-top: 10px; }

.page-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  padding: 6px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-2);
  font-weight: 500;
}
.meta-chip i { color: var(--brand); }

/* ============================================
   SEARCH + CARDS
   ============================================ */
.search-wrap {
  position: relative;
  max-width: 480px;
  margin-bottom: 24px;
}
.search-wrap i {
  position: absolute;
  left: 16px; top: 50%; transform: translateY(-50%);
  color: var(--muted-2);
  font-size: 18px;
}
.search-input {
  width: 100%;
  padding: 12px 16px 12px 44px;
  font: 500 14.5px 'Inter Tight', sans-serif;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 11px;
  transition: all .2s ease;
}
.search-input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgb(13 148 136 / .12);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 18px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  transition: all .25s ease;
}

.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: transparent;
  transition: background .25s ease;
}

.card:hover, .card:focus-within {
  transform: translateY(-4px);
  box-shadow: var(--sh-3);
  border-color: var(--line-2);
}
.card:hover::before, .card:focus-within::before { background: var(--brand); }

.card-tags {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-bottom: 14px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.tag.pdf { background: #fef2f2; color: #b91c1c; }
.tag.doc { background: #eff6ff; color: #2563eb; }
.tag.xls { background: #ecfdf5; color: #047857; }
.tag.role { background: var(--brand-50); color: var(--brand-700); }
.tag.cat  { background: #f1f5f9; color: var(--ink-2); }

.card h3 { font-size: 1.05rem; margin-bottom: 8px; line-height: 1.3; }
.card p { font-size: 13.5px; color: var(--muted); line-height: 1.55; margin-bottom: 20px; flex: 1; }

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.btn-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--brand-700);
  background: var(--brand-50);
  border: 1px solid transparent;
  padding: 9px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: all .2s ease;
  text-decoration: none;
}
.btn-link:hover, .btn-link:focus-visible {
  background: var(--brand-700);
  color: white;
  text-decoration: none;
  transform: translateX(2px);
}

.file-meta {
  font-size: 11.5px;
  color: var(--muted-2);
  font-family: 'JetBrains Mono', monospace;
}

/* ============================================
   SITE PLAN PAGE
   ============================================ */
.site-plan-wrap {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 24px;
  margin-bottom: 24px;
  position: relative;
}

.site-plan-wrap svg.site-plan,
.site-plan-wrap .site-plan-img {
  width: 100%;
  height: auto;
  display: block;
  cursor: zoom-in;
  border-radius: var(--r-md);
}

/* Zoom hint shown over the diagram */
.zoom-hint {
  position: absolute;
  top: 14px;
  right: 18px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  background: rgba(15, 23, 42, .82);
  color: white;
  font-size: 12px;
  font-weight: 500;
  border-radius: 999px;
  pointer-events: none;
  backdrop-filter: blur(4px);
  letter-spacing: .01em;
}
.zoom-hint i { font-size: 14px; }

.legend-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px dashed var(--line);
}

.legend-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px;
  border-radius: var(--r-md);
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.legend-swatch {
  width: 28px; height: 28px;
  border-radius: 6px;
  flex-shrink: 0;
  border: 1.5px dashed transparent;
}
.legend-swatch.ped { background: #c5f5c8; border-color: #4ade80; }
.legend-swatch.fork { background: #ffd9c2; border-color: #c2410c; }
.legend-swatch.shared { background: #fff2c0; border-color: #d97706; }
.legend-swatch.staff { background: #f1f5f9; border-color: #94a3b8; }

.legend-item strong { font-size: 14px; display: flex; align-items: center; gap: 7px; margin-bottom: 2px; }
.legend-item strong i { font-size: 16px; color: var(--brand); }
.legend-item span { font-size: 12.5px; color: var(--muted); line-height: 1.5; }

/* Site plan SVG label styles */
.plan-label { font-family: 'Inter Tight', sans-serif; font-weight: 600; font-size: 15px; fill: var(--ink); text-anchor: middle; }
.plan-sub   { font-family: 'Inter Tight', sans-serif; font-weight: 500; font-size: 11px; fill: var(--muted); text-anchor: middle; }
.plan-title { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; font-size: 18px; fill: var(--ink); }
.plan-compass { font-family: 'JetBrains Mono', monospace; font-weight: 600; font-size: 13px; fill: var(--muted); text-anchor: middle; }
.door-glyph path { fill: none; stroke: #334155; stroke-width: 1.6; }

/* ============================================
   ORG CHART
   ============================================ */
.org-wrap {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 28px;
  margin-bottom: 24px;
  position: relative;
}

.org-wrap svg.org-chart {
  width: 100%;
  height: auto;
  display: block;
  cursor: zoom-in;
}

.org-wrap .org-chart-img {
  width: 100%;
  height: auto;
  display: block;
  cursor: zoom-in;
  border-radius: var(--r-md);
}

.org-text { font-family: 'Inter Tight', sans-serif; fill: white; text-anchor: middle; }
.org-role { font-size: 17px; font-weight: 700; }
.org-sub { font-size: 12px; font-weight: 500; fill: rgba(255,255,255,.85); }
.org-name { font-size: 15px; font-weight: 500; fill: rgba(255,255,255,.96); }
.org-divider { stroke: rgba(255,255,255,.35); stroke-width: 1; }
.org-line { stroke: var(--line-2); stroke-width: 2; fill: none; }
.org-line-dotted { stroke: var(--line-2); stroke-width: 2; fill: none; stroke-dasharray: 6 5; opacity: .85; }
.chart-note { font-size: 12.5px; color: var(--muted); margin: 10px 0 0; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.chart-note .swatch-line { display: inline-flex; align-items: center; gap: 6px; }
.chart-note svg { flex-shrink: 0; }

/* ============================================
   ZOOM MODAL — full-screen lightbox for diagrams
   ============================================ */
.zoom-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .92);
  backdrop-filter: blur(8px);
  z-index: 2000;
  padding: 4vh 4vw;
  overflow: auto;
  cursor: zoom-out;
}
.zoom-modal.open { display: flex; flex-direction: column; align-items: center; justify-content: center; }

.zoom-modal-inner {
  width: 100%;
  max-width: 1500px;
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: 28px;
  box-shadow: var(--sh-3);
  position: relative;
  cursor: default;
}

.zoom-modal-inner svg { width: 100%; height: auto; display: block; }

.zoom-close {
  position: absolute;
  top: 14px; right: 14px;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--ink);
  color: white;
  border: none;
  font-size: 22px;
  cursor: pointer;
  display: grid;
  place-items: center;
  z-index: 1;
  transition: transform .15s ease;
}
.zoom-close:hover { transform: scale(1.08); }

/* Team filter pills (for team page) */
.dept-pills {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 24px;
}
.dept-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
  cursor: pointer;
  transition: all .2s ease;
}
.dept-pill:hover { border-color: var(--brand-700); color: var(--brand-700); }
.dept-pill .dot { width: 8px; height: 8px; border-radius: 50%; }
.dept-pill i { font-size: 14px; }

/* Info callouts */
.callout {
  display: flex;
  gap: 14px;
  padding: 16px 20px;
  background: var(--brand-50);
  border: 1px solid var(--brand-100);
  border-left: 4px solid var(--brand);
  border-radius: var(--r-md);
  margin: 20px 0;
}
.callout.warn { background: #fffbeb; border-color: #fde68a; border-left-color: #f59e0b; }
.callout i { color: var(--brand); font-size: 22px; flex-shrink: 0; }
.callout.warn i { color: #b45309; }
.callout strong { display: block; margin-bottom: 2px; font-size: 14.5px; }
.callout p { margin: 0; font-size: 13.5px; color: var(--ink-2); }

/* ============================================
   PAGE FOOTER / DISCLAIMER
   ============================================ */
.page-footer {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  max-width: 920px;
}

.page-footer .disc-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-bottom: 8px;
}
.page-footer .disc-label i { font-size: 14px; color: var(--brand); }

.page-footer p { margin: 0; font-size: 12px; color: var(--muted); }

.page-footer-meta {
  margin-top: 14px;
  font-size: 11px;
  color: var(--muted-2);
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: .02em;
}

/* ============================================
   RESOURCE TOOLBAR & VIEWS
   ============================================ */
.resource-toolbar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.resource-toolbar .search-wrap {
  flex: 1;
  min-width: 200px;
  margin-bottom: 0;
}

.toolbar-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.view-toggle {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 9px;
  overflow: hidden;
  background: var(--surface);
}

.view-btn {
  background: transparent;
  border: none;
  padding: 8px 11px;
  font-size: 17px;
  color: var(--muted);
  cursor: pointer;
  transition: all .15s ease;
  display: grid;
  place-items: center;
  border-right: 1px solid var(--line);
}
.view-btn:last-child { border-right: none; }
.view-btn:hover { color: var(--ink-2); background: var(--surface-2); }
.view-btn.active { color: var(--brand); background: var(--brand-50); }

.sort-select, .filter-select {
  font: 500 13.5px 'Inter Tight', sans-serif;
  color: var(--ink-2);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 8px 28px 8px 12px;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2364748b' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  transition: border-color .2s ease;
}
.sort-select:focus, .filter-select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgb(13 148 136 / .1);
}

/* Resource container — replaces card-grid for resource pages */
.resource-container { min-height: 120px; }

/* Alpha section headers */
.alpha-section {
  margin-bottom: 28px;
}
.alpha-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--brand);
}
.alpha-letter {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--brand);
  line-height: 1;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  background: var(--brand-50);
  border-radius: 10px;
}
.alpha-count {
  font-size: 12.5px;
  color: var(--muted);
  font-weight: 500;
}

/* Grid view (within alpha sections or standalone) */
.res-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 16px;
}

/* List view */
.res-list .card {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  border-radius: var(--r-md);
}
.res-list .card h3 { font-size: 0.95rem; flex: 1; margin-bottom: 0; }
.res-list .card .card-tags { margin-bottom: 0; }
.res-list .card .card-foot { margin-top: 0; }
.res-list .card::before { display: none; }
.res-list .card:hover { transform: translateY(-2px); }

/* Search result highlight */
.no-results {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
}
.no-results i { font-size: 36px; display: block; margin-bottom: 12px; color: var(--line-2); }
.no-results strong { display: block; margin-bottom: 4px; color: var(--ink-2); }

@media (max-width: 700px) {
  .resource-toolbar { flex-direction: column; align-items: stretch; }
  .toolbar-controls { justify-content: space-between; }
  .res-list .card { flex-direction: column; align-items: flex-start; }
}

/* ============================================
   RESOURCE GRID STATES (loading, empty, error)
   ============================================ */
.grid-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 24px;
  color: var(--muted);
}

.grid-state i { font-size: 40px; display: block; margin-bottom: 14px; color: var(--line-2); }
.grid-state .state-title { font-weight: 600; font-size: 15px; color: var(--ink-2); margin-bottom: 4px; }
.grid-state p { font-size: 13.5px; margin: 0; }

.grid-state.loading i { animation: spin 1.2s linear infinite; color: var(--brand); }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

.grid-state.error i { color: var(--danger); }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1100px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .dash-grid { grid-template-columns: 1fr; }
}

@media (max-width: 880px) {
  .mobile-bar { display: flex; }
  aside.sidebar {
    transform: translateX(-100%);
    padding-top: 78px;
  }
  aside.sidebar.open { transform: translateX(0); box-shadow: var(--sh-3); }
  /* Hide the large sidebar logo on mobile — the mobile-bar already shows it */
  aside.sidebar .brand-block { display: none; }
  /* Hide the top "Workspace" section label on mobile to keep the menu compact */
  aside.sidebar .nav-section-label:first-of-type { margin-top: 0; padding-top: 0; }
  main { margin-left: 0; }
  .page-inner { padding: 22px; }
  .app-strip { padding: 10px 22px; }
  .hero { padding: 30px 26px; border-radius: var(--r-lg); }
  .quick-grid { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .stat { padding: 16px; }
  .stat-value { font-size: 1.4rem; }
}
