/* GMCK UI layer: glass surfaces, light 3D, accessibility modes, roster app.
   Everything is prefixed g- / r- so it cannot collide with the compiled Tailwind file. */

:root {
  --g-primary: #3d63dd;
  --g-primary-dark: #1e3a8a;
  --g-navy: #0b1646;
  --g-ink: #111827;
  --g-muted: #4b5563;
  --g-line: rgba(30, 58, 138, .14);
  --g-ok: #0f766e;
  --g-ok-bg: #ccfbf1;
  --g-warn: #92400e;
  --g-warn-bg: #fef3c7;
  --g-danger: #b91c1c;
  --g-danger-bg: #fee2e2;
  --g-radius: 18px;
}

/* ---------- accessibility chrome ---------- */
.g-skip {
  position: absolute; left: 8px; top: -60px; z-index: 100000;
  background: #fff; color: #1e3a8a; padding: 10px 16px; border-radius: 8px;
  font-weight: 700; box-shadow: 0 4px 20px rgba(0,0,0,.25);
}
.g-skip:focus { top: 8px; }

.g-a11y {
  background: var(--g-navy); color: #fff; font-size: .8125rem;
  padding: 6px 16px; display: flex; flex-wrap: wrap; gap: 6px 14px;
  align-items: center; justify-content: flex-end;
}
.g-a11y a { color: #fff; text-decoration: underline; }
.g-a11y button {
  background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.4);
  border-radius: 6px; padding: 2px 9px; font-weight: 700; cursor: pointer; min-width: 34px;
}
.g-a11y button:hover, .g-a11y button[aria-pressed="true"] { background: #fff; color: var(--g-navy); }

:focus-visible { outline: 3px solid #f59e0b; outline-offset: 2px; }

html[data-font="1"] { font-size: 112.5%; }
html[data-font="2"] { font-size: 125%; }

html[data-contrast="high"] body { background: #fff; color: #000; }
html[data-contrast="high"] a { text-decoration: underline; }
html[data-contrast="high"] .g-glass,
html[data-contrast="high"] .r-card,
html[data-contrast="high"] .r-tile { background: #fff !important; backdrop-filter: none !important; border: 2px solid #000 !important; box-shadow: none !important; color: #000 !important; }
html[data-contrast="high"] .g-hero { background: #000 !important; }
html[data-contrast="high"] .g-hero * { color: #fff !important; }
html[data-contrast="high"] .r-chip-ok { background: #fff; color: #000; border: 2px solid #000; }

/* ---------- hero with layered glass + light 3D ---------- */
.g-hero {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(900px 400px at 85% -10%, rgba(125,160,255,.55), transparent 60%),
    radial-gradient(700px 380px at 5% 110%, rgba(20,184,166,.35), transparent 60%),
    linear-gradient(135deg, #0b1646 0%, #1e3a8a 55%, #3d63dd 100%);
  perspective: 1100px;
}
.g-hero::after { /* subtle grid for depth */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .18;
  background-image: linear-gradient(rgba(255,255,255,.35) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.35) 1px, transparent 1px);
  background-size: 44px 44px; transform: rotateX(62deg) translateY(120px) scale(1.6); transform-origin: 50% 100%;
}
.g-orb {
  position: absolute; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle at 30% 28%, rgba(255,255,255,.55), rgba(255,255,255,.08) 55%, rgba(255,255,255,.02));
  border: 1px solid rgba(255,255,255,.35); backdrop-filter: blur(3px);
  box-shadow: inset -14px -18px 36px rgba(11,22,70,.35), 0 24px 60px rgba(0,0,0,.25);
  animation: g-float 9s ease-in-out infinite;
}
.g-orb.o1 { width: 170px; height: 170px; right: 7%; top: 14%; }
.g-orb.o2 { width: 90px; height: 90px; right: 24%; bottom: 10%; animation-delay: -3s; }
.g-orb.o3 { width: 54px; height: 54px; right: 40%; top: 10%; animation-delay: -6s; }
@media (max-width: 700px) { .g-orb.o3 { display: none; } .g-orb.o1 { width: 110px; height: 110px; } }
@keyframes g-float { 0%,100% { transform: translate3d(0,0,0) rotate(0); } 50% { transform: translate3d(0,-18px,40px) rotate(8deg); } }

.g-hero-inner { position: relative; z-index: 2; }
.g-eyebrow { letter-spacing: .12em; text-transform: uppercase; font-size: .78rem; font-weight: 700; opacity: .9; }

/* ---------- glass surfaces ---------- */
.g-glass {
  background: rgba(255,255,255,.80);
  -webkit-backdrop-filter: blur(16px) saturate(150%); backdrop-filter: blur(16px) saturate(150%);
  border: 1px solid rgba(255,255,255,.7);
  box-shadow: 0 10px 30px rgba(15,27,77,.10), inset 0 1px 0 rgba(255,255,255,.8);
  border-radius: var(--g-radius);
}
.g-glass-dark {
  background: rgba(255,255,255,.14);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,.35);
  border-radius: var(--g-radius);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .g-glass { background: #fff; }
  .g-glass-dark { background: rgba(11,22,70,.75); }
}

.g-tilt { transform-style: preserve-3d; transition: transform .18s ease-out, box-shadow .18s; will-change: transform; }
.g-tilt:hover { box-shadow: 0 18px 40px rgba(15,27,77,.18); }

@media (prefers-reduced-motion: reduce) {
  .g-orb { animation: none; }
  .g-tilt { transition: none; transform: none !important; }
}

/* ---------- generic content pages ---------- */
.g-prose { max-width: 820px; margin: 0 auto; line-height: 1.7; color: var(--g-ink); }
.g-prose h2 { font-size: 1.35rem; font-weight: 800; color: var(--g-primary-dark); margin: 2rem 0 .6rem; }
.g-prose h3 { font-size: 1.1rem; font-weight: 700; margin: 1.4rem 0 .4rem; }
.g-prose p, .g-prose li { color: #1f2937; }
.g-prose ul { list-style: disc; padding-left: 1.4rem; margin: .5rem 0 1rem; }
.g-prose a { color: var(--g-primary-dark); text-decoration: underline; }
.g-card-pad { padding: 1.4rem 1.6rem; }
.g-toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 1.5rem; }
.g-toc a { padding: 6px 12px; border-radius: 999px; background: #eef2ff; color: var(--g-primary-dark); font-weight: 600; font-size: .9rem; text-decoration: none; }
.g-sitemap-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.g-sitemap-grid ul { list-style: none; padding: 0; margin: 0; }
.g-sitemap-grid li { margin: 6px 0; }
.g-sitemap-grid h3 { margin-top: 0; }
.g-callout { border-left: 5px solid var(--g-primary); background: #eef2ff; padding: 14px 18px; border-radius: 10px; }
.g-callout.warn { border-color: #d97706; background: var(--g-warn-bg); }
.g-helpline { display: inline-flex; flex-direction: column; padding: 14px 22px; border-radius: 14px; background: var(--g-danger-bg); color: var(--g-danger); font-weight: 800; font-size: 1.6rem; text-decoration: none !important; }
.g-helpline small { font-size: .8rem; font-weight: 600; color: #7f1d1d; }

.g-footer-links { display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: center; margin-bottom: 10px; }
.g-footer-links a { color: #c7d2fe; text-decoration: underline; }

/* ---------- roster app ---------- */
.r-wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.r-datebar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; padding: 14px 18px; }
.r-datebar h2 { margin: 0; font-size: 1.4rem; font-weight: 800; color: #fff; }
.r-datebar .r-sub { font-size: .9rem; opacity: .92; color: #fff; }
.r-btn {
  border: 1px solid var(--g-line); background: #fff; color: var(--g-primary-dark);
  border-radius: 10px; padding: 8px 14px; font-weight: 700; cursor: pointer; font-size: .9rem;
}
.r-btn:hover { background: #eef2ff; }
.r-btn[disabled] { opacity: .45; cursor: not-allowed; }
.r-btn.primary { background: var(--g-primary); color: #fff; border-color: var(--g-primary); }
.r-btn.primary:hover { background: #2f4fc0; }
.r-btn[aria-pressed="true"] { background: var(--g-primary-dark); color: #fff; }

.r-emerg {
  display: flex; flex-wrap: wrap; gap: 14px; align-items: center; padding: 16px 20px;
  border-radius: var(--g-radius); background: linear-gradient(120deg, #fff1f2, #ffe4e6);
  border: 1px solid #fecdd3; color: #7f1d1d;
}
.r-emerg strong { font-size: 1.05rem; }
.r-emerg-people { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }

.r-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin: 18px 0; }
.r-tile { padding: 16px 18px; }
.r-tile b { display: block; font-size: 2rem; line-height: 1.1; color: var(--g-primary-dark); }
.r-tile span { color: var(--g-muted); font-size: .9rem; font-weight: 600; }

.r-controls { padding: 14px 16px; display: grid; gap: 12px; }
.r-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.r-fields { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; }
@media (max-width: 720px) { .r-fields { grid-template-columns: 1fr; } }
.r-input {
  width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid #9ca3af;
  background: #fff; color: #111827; font-size: .95rem;
}
.r-meta-line { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; font-size: .9rem; color: var(--g-muted); }

.r-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px; margin: 16px 0 28px; align-items: start; }
.r-grid > .r-empty { grid-column: 1 / -1; }
.r-card { padding: 16px 18px 12px; }
.r-card-head { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; margin-bottom: 6px; }
.r-card h3 { margin: 0; font-size: 1.08rem; font-weight: 800; color: var(--g-primary-dark); line-height: 1.25; }
.r-card.emergency h3 { color: var(--g-danger); }
.r-block { border-top: 1px dashed var(--g-line); padding: 10px 0; }
.r-block:first-of-type { border-top: 0; }
.r-line { color: var(--g-muted); font-size: .86rem; margin: 2px 0; }
.r-line b { color: #1f2937; }
.r-people { list-style: none; padding: 0; margin: 6px 0 0; display: flex; flex-direction: column; gap: 6px; }
.r-person { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: .93rem; color: #111827; }
.r-person small { color: var(--g-muted); display: block; font-size: .78rem; }
.r-call {
  display: inline-flex; align-items: center; gap: 5px; white-space: nowrap;
  background: var(--g-primary); color: #fff !important; text-decoration: none !important;
  border-radius: 999px; padding: 4px 11px; font-weight: 700; font-size: .82rem;
}
.r-call:hover { background: #2f4fc0; }
.r-tag { font-size: .72rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--g-muted); margin-top: 8px; }

.r-chip { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .74rem; font-weight: 800; white-space: nowrap; }
.r-chip-ok { background: var(--g-ok-bg); color: var(--g-ok); }
.r-chip-closed { background: #e5e7eb; color: #374151; }
.r-chip-warn { background: var(--g-warn-bg); color: var(--g-warn); }
.r-pulse::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #0f766e; margin-right: 6px; animation: r-pulse 1.6s infinite; }
@keyframes r-pulse { 0% { box-shadow: 0 0 0 0 rgba(15,118,110,.5); } 100% { box-shadow: 0 0 0 9px rgba(15,118,110,0); } }
@media (prefers-reduced-motion: reduce) { .r-pulse::before { animation: none; } }

.r-history { padding: 16px 18px; margin-bottom: 30px; }
.r-history h2 { margin: 0 0 8px; font-size: 1.1rem; font-weight: 800; color: var(--g-primary-dark); }
.r-month { margin: 12px 0 4px; font-weight: 800; color: var(--g-primary-dark); }
.r-days { display: flex; flex-wrap: wrap; gap: 8px; }
.r-day { min-width: 62px; text-align: center; padding: 6px 8px; border-radius: 12px; border: 1px solid var(--g-line); background: #fff; cursor: pointer; font-weight: 700; color: var(--g-primary-dark); line-height: 1.15; }
.r-day small { display: block; font-weight: 600; color: var(--g-muted); font-size: .7rem; }
.r-day[aria-current="date"] { background: var(--g-primary-dark); color: #fff; border-color: var(--g-primary-dark); }
.r-day[aria-current="date"] small { color: #c7d2fe; }
.r-empty { text-align: center; padding: 40px 16px; color: var(--g-muted); }

/* ---------- print: roster only ---------- */
@media print {
  .g-a11y, header, footer, .r-controls, .r-history, .g-orb, .r-nav-actions, .g-skip, [data-scroll-top] { display: none !important; }
  .g-hero { background: #fff !important; color: #000 !important; }
  .g-hero * { color: #000 !important; }
  .g-glass, .r-card, .r-tile { box-shadow: none !important; background: #fff !important; border: 1px solid #999 !important; backdrop-filter: none !important; }
  .r-grid { display: block; }
  .r-card { break-inside: avoid; margin-bottom: 10px; }
  .r-call { background: none !important; color: #000 !important; padding: 0; }
}

/* ---------- YTO placeholder, tables ---------- */
.g-yto { display:inline-block; padding:1px 10px; border-radius:999px; background:#fef3c7; color:#92400e; font-weight:800; font-size:.8rem; letter-spacing:.06em; border:1px solid #fcd34d; }
.g-table-wrap { overflow-x:auto; margin:1rem 0; }
.g-table { width:100%; border-collapse:separate; border-spacing:0; border:1px solid var(--g-line); border-radius:12px; overflow:hidden; background:#fff; }
.g-table th { background:#eef2ff; color:var(--g-primary-dark); text-align:left; padding:10px 14px; font-weight:800; }
.g-table td { padding:10px 14px; border-top:1px solid var(--g-line); vertical-align:top; }
.g-footer-links { display:flex; flex-wrap:wrap; justify-content:center; gap:6px 18px; margin-bottom:8px; }
.g-footer-links a { color:#c7d2fe; text-decoration:underline; }

/* ---------- home page: glass quick-service tiles + 3D ---------- */
.g-quick { position:relative; z-index:5; margin-top:0; padding:18px 0 10px; }
.g-quick-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(170px,1fr)); gap:14px; perspective:1000px; }
.g-qtile { display:flex; flex-direction:column; gap:6px; padding:18px; text-decoration:none; color:var(--g-ink); }
.g-qtile i { font-size:1.7rem; color:var(--g-primary); }
.g-qtile b { font-size:1.02rem; color:var(--g-primary-dark); }
.g-qtile span { font-size:.86rem; color:var(--g-muted); }
.g-qtile:hover { transform: translateY(-4px) rotateX(4deg); }
.g-live { display:flex; flex-wrap:wrap; gap:10px 18px; align-items:center; justify-content:space-between; padding:14px 20px; margin-bottom:14px; }
.g-live .dot { display:inline-block; width:10px; height:10px; border-radius:50%; background:#16a34a; box-shadow:0 0 0 0 rgba(22,163,74,.6); animation:g-pulse 1.8s infinite; margin-right:8px; }
@keyframes g-pulse { 70%{box-shadow:0 0 0 10px rgba(22,163,74,0)} 100%{box-shadow:0 0 0 0 rgba(22,163,74,0)} }
.g-live a.call { background:var(--g-primary); color:#fff; padding:6px 14px; border-radius:999px; font-weight:700; text-decoration:none; }
#home .g-orb { z-index:0; }
#home figure img { box-shadow:0 30px 60px rgba(0,0,0,.35); transform:perspective(1200px) rotateX(4deg); transition:transform .4s; }
#home figure:hover img { transform:perspective(1200px) rotateX(0); }
.section-area .rounded-lg, #departments .shadow-card { transition: transform .2s, box-shadow .2s; }
@media (prefers-reduced-motion: reduce){ .g-live .dot{animation:none} .g-qtile:hover{transform:none} #home figure img{transform:none} }
section#home.g-hero { background-color:#1e3a8a !important; background-image:
  radial-gradient(900px 400px at 85% -10%, rgba(125,160,255,.55), transparent 60%),
  radial-gradient(700px 380px at 5% 110%, rgba(20,184,166,.35), transparent 60%),
  linear-gradient(135deg,#0b1646 0%,#1e3a8a 55%,#3d63dd 100%) !important; }
body > header.ic-navbar.absolute { top:var(--a11y-h,36px); }
section#home.g-hero .container { position:relative; z-index:2; }
section#home.g-hero .g-orb.o1 { width:120px; height:120px; right:3%; top:30%; }

/* ---------- brand wordmark ---------- */
.g-brand { display:flex; align-items:center; gap:12px; padding:10px 0; text-decoration:none; color:#fff; max-width:100%; }
.g-brand img { height:46px; width:auto; flex:none; }
.g-brand-text { display:flex; flex-direction:column; line-height:1.15; }
.g-brand-text b { font-size:1.02rem; font-weight:800; letter-spacing:.01em; }
.g-brand-text small { font-size:.78rem; font-weight:600; opacity:.9; margin-top:2px; }
.ic-navbar.sticky .g-brand, .ic-navbar-fixed .g-brand { color:#1e3a8a; }
@media (max-width: 480px) { .g-brand-text b { font-size:.88rem; } .g-brand-text small { font-size:.7rem; } .g-brand img { height:40px; } }
html[data-contrast="high"] .g-brand { color:#000 !important; }

/* ---------- footer ---------- */
.g-footer { background:#0b1646; color:#dbe4ff; font-size:.95rem; line-height:1.6; }
.g-footer-inner { max-width:1180px; margin:0 auto; padding:48px 24px 0; }
.g-fgrid { display:grid; grid-template-columns:1.5fr 1fr 1fr 1fr; gap:36px 40px; }
.g-footer h2 { color:#fff; font-size:1rem; font-weight:800; margin:0 0 14px; letter-spacing:.02em; }
.g-footer address { font-style:normal; margin:0 0 12px; }
.g-footer p { margin:0 0 8px; }
.g-footer ul { list-style:none; margin:0; padding:0; }
.g-footer li { margin:0 0 9px; }
.g-footer a { color:#dbe4ff; text-decoration:none; }
.g-footer a:hover, .g-footer a:focus-visible { color:#fff; text-decoration:underline; }
.g-fbar { margin-top:36px; padding:20px 0 26px; border-top:1px solid rgba(255,255,255,.18); display:flex; flex-wrap:wrap; gap:8px 24px; justify-content:space-between; font-size:.88rem; color:#b9c6f0; }
.g-fbar p { margin:0; }
.g-fbar a { color:#fff; text-decoration:underline; }
#last-updated:not(:empty)::before { content:" \00b7  "; }
@media (max-width: 900px) { .g-fgrid { grid-template-columns:1fr 1fr; } .g-fabout { grid-column:1 / -1; } }
@media (max-width: 560px) { .g-footer-inner { padding:36px 20px 0; } .g-fgrid { grid-template-columns:1fr; gap:28px; } .g-fbar { flex-direction:column; } }
html[data-contrast="high"] .g-footer { background:#000; }

/* ---------- roster: official prescribed table format ---------- */
.rt-out { margin: 16px 0 28px; }
.rt-card { background:#fff; border:1px solid #1e3a8a; border-radius:6px; overflow:hidden; box-shadow:0 10px 30px rgba(15,27,77,.10); }
.rt-daybar { display:flex; justify-content:space-between; gap:12px; flex-wrap:wrap; padding:12px 20px; background:#f8fafc; color:#0b1646; font-size:1rem; }
.rt-daybar b { color:#00298a; }
.rt-scroll { overflow-x:auto; -webkit-overflow-scrolling:touch; }
.rt { width:100%; min-width:1180px; border-collapse:collapse; font-size:.92rem; color:#111827; }
.rt-sr { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); }
.rt thead th { background:#00298a; color:#fff; text-align:center; font-weight:800; padding:12px 10px; border:1px solid rgba(255,255,255,.18); vertical-align:middle; }
.rt thead .rt-grp { font-size:1rem; }
.rt thead .rt-sub th { background:#0a3a8f; font-size:.82rem; padding:10px 8px; }
.rt thead .rt-grp2 { background:#001a5e; }
.rt thead .rt-sno { width:56px; }
.rt tbody td, .rt tbody th { padding:12px 10px; border:1px solid #e3e8f4; vertical-align:middle; background:#fff; text-align:left; font-weight:400; }
.rt tbody tr:nth-child(even) td, .rt tbody tr:nth-child(even) th { background:#f6f8fd; }
.rt tbody tr:hover td, .rt tbody tr:hover th { background:#eaf0ff; }
.rt .rt-c { text-align:center; }
.rt .rt-sno { font-weight:800; }
.rt .rt-dept { font-weight:800; color:#0b1646; min-width:140px; }
.rt .rt-room { font-weight:800; }
.rt-pill { display:inline-block; padding:4px 10px; border:1px solid #9db4ff; background:#eaf0ff; color:#1e3a8a; border-radius:6px; font-weight:700; font-size:.84rem; white-space:nowrap; }
.rt-name { line-height:1.5; }
.rt-duty { display:flex; flex-wrap:wrap; align-items:center; gap:4px 8px; line-height:1.5; margin:2px 0; }
.rt-duty b { color:#0b1646; }
.rt-ico { font-size:1rem; }
.rt-dutycell { min-width:200px; }
.rt tr.rt-open td, .rt tr.rt-open th { box-shadow:inset 0 0 0 9999px rgba(20,184,166,.07); }
.rt tr.rt-open th { border-left:4px solid #0f766e; }
.rt-live { display:block; margin-top:4px; font-size:.7rem; font-weight:800; color:#0f766e; letter-spacing:.04em; text-transform:uppercase; }
html[data-contrast="high"] .rt thead th { background:#000; }
html[data-contrast="high"] .rt-card, html[data-contrast="high"] .rt td, html[data-contrast="high"] .rt tbody th { border-color:#000; }
@media print {
  @page { size: A4 landscape; margin: 10mm; }
  .rt { min-width:0; font-size:9pt; } .rt-scroll { overflow:visible; } .rt thead th { background:#00298a !important; color:#fff !important; -webkit-print-color-adjust:exact; print-color-adjust:exact; }
  .rt tr { break-inside:avoid; } .rt-card { box-shadow:none; }
}
.ic-navbar-container > div:first-child { flex:0 1 auto; min-width:0; }
.g-brand-text b, .g-brand-text small { white-space:nowrap; }
@media (max-width: 400px) { .g-brand-text b { white-space:normal; } }

/* ---------- roster: compact department cards (Karur-style, denser) ---------- */
.kc-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(330px,1fr)); gap:12px; margin:12px 0 22px; align-items:start; }
.kc-grid > .r-empty { grid-column:1/-1; }
.kc { background:#fff; border:1px solid #dbe3f5; border-radius:12px; overflow:hidden; box-shadow:0 2px 8px rgba(15,27,77,.06); }
.kc.is-open { border-color:#5eead4; box-shadow:0 0 0 2px rgba(20,184,166,.18); }
.kc-wide { grid-column:1/-1; }
.kc-head { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:9px 12px; background:#eef3ff; border-bottom:1px solid #dbe3f5; }
.kc.emerg .kc-head { background:#fee2e2; border-bottom-color:#fecaca; }
.kc-title { display:flex; align-items:center; gap:9px; min-width:0; }
.kc-ico { flex:none; width:32px; height:32px; border-radius:9px; background:#1e3a8a; color:#fff; display:grid; place-items:center; font-size:1rem; }
.kc.emerg .kc-ico { background:#b91c1c; }
.kc-head h3 { margin:0; font-size:1rem; font-weight:800; color:#0b1646; line-height:1.2; }
.kc.emerg .kc-head h3 { color:#991b1b; }
.kc-sub { margin-top:2px; font-size:.78rem; color:#4b5563; line-height:1.3; }
.kc-sub .lni, .kc-m .lni { margin-right:4px; color:#3d63dd; font-size:.82em; }
.kc-time { flex:none; display:inline-flex; align-items:center; gap:5px; padding:4px 9px; border-radius:999px; background:#0b1646; color:#fff; font-size:.76rem; font-weight:700; white-space:nowrap; }
.kc-time.sm { background:#eaf0ff; color:#1e3a8a; border:1px solid #9db4ff; min-width:118px; justify-content:center; }
.kc-meta { display:flex; flex-wrap:wrap; gap:4px 14px; padding:6px 12px; font-size:.8rem; color:#374151; border-bottom:1px solid #eef1f8; }
.kc-docs { list-style:none; margin:0; padding:0; }
.kc-doc { display:flex; align-items:center; gap:9px; padding:7px 12px; border-top:1px solid #f0f3fa; }
.kc-doc:first-child { border-top:0; }
.kc-doc.is-on { background:#f0fdfa; }
.kc-av { flex:none; width:28px; height:28px; border-radius:50%; background:#e0e7ff; color:#1e3a8a; display:grid; place-items:center; font-size:.85rem; }
.kc-dn { flex:1; min-width:0; line-height:1.25; }
.kc-dn b { display:block; font-size:.92rem; color:#111827; }
.kc-dn small { font-size:.74rem; color:#6b7280; text-transform:uppercase; letter-spacing:.03em; font-weight:600; }
.kc-da { display:flex; flex-wrap:wrap; align-items:center; justify-content:flex-end; gap:5px; }
.kc-call { display:inline-flex; align-items:center; gap:4px; padding:3px 9px; border-radius:999px; background:#3d63dd; color:#fff !important; font-size:.76rem; font-weight:700; text-decoration:none; white-space:nowrap; }
.kc-call .lni { font-size:.8em; }
.kc-chip { display:inline-flex; align-items:center; gap:5px; padding:3px 9px; border-radius:999px; font-size:.72rem; font-weight:800; white-space:nowrap; }
.kc-chip.on { background:#ccfbf1; color:#0f766e; }
.kc-chip.off { background:#eceff4; color:#4b5563; }
.kc-dot { width:7px; height:7px; border-radius:50%; background:#16a34a; animation:g-pulse 1.8s infinite; }
.kc-none { margin:0; padding:9px 12px; font-size:.82rem; color:#6b7280; font-style:italic; }
.kc-shifts .kc-doc { padding:6px 12px; }
@media (min-width:900px){ .kc-shifts { display:grid; grid-template-columns:1fr 1fr; } .kc-shifts .kc-doc:nth-child(2) { border-top:0; } .kc-shifts .kc-doc:nth-child(even) { border-left:1px solid #f0f3fa; } }
@media (max-width:420px){ .kc-grid { grid-template-columns:1fr; } .kc-head { flex-wrap:wrap; } }
html[data-contrast="high"] .kc { border:2px solid #000; box-shadow:none; }
html[data-contrast="high"] .kc-head, html[data-contrast="high"] .kc.emerg .kc-head { background:#fff; border-bottom:2px solid #000; }
@media (prefers-reduced-motion: reduce){ .kc-dot{animation:none} }
@media print { .kc-grid { display:block; } .kc { break-inside:avoid; margin-bottom:8px; box-shadow:none; } }

/* ---------- roster: tighten the top area (no big gaps) ---------- */
.g-hero .r-datebar { padding:10px 14px; }
.g-hero .r-datebar h2 { font-size:1.25rem; margin:0; }
.g-hero h1#page-title { font-size:1.6rem !important; margin:2px 0 8px !important; }
.g-hero .r-wrap.g-hero-inner { padding-top:18px !important; padding-bottom:18px !important; }
.r-emerg { padding:8px 14px; margin:10px 0 8px; gap:6px 14px; }
.r-emerg .r-line { display:inline; margin-left:8px; font-size:.8rem; }
.r-tiles { display:flex; flex-wrap:wrap; gap:8px; margin:8px 0; }
.r-tile { padding:6px 14px; display:flex; align-items:baseline; gap:8px; flex:1 1 150px; }
.r-tile b { font-size:1.3rem; }
.r-tile span { font-size:.8rem; }
.r-controls { padding:10px 14px; gap:8px; }
.r-controls .r-tabs { margin:0; }
.r-meta-line { display:flex; flex-wrap:wrap; justify-content:space-between; gap:4px 12px; font-size:.78rem; margin:0; }
.r-meta-line span + span { color:#6b7280; }
.r-fields { margin:0; }
.r-controls { display:flex; flex-wrap:wrap; align-items:center; gap:8px 18px; }
.r-controls .r-fields, .r-controls .r-meta-line { flex:1 1 100%; }
.r-controls .r-tabs .r-btn { padding:5px 12px; font-size:.85rem; }

/* roster cards: pack tightly (masonry via CSS columns) so short cards leave no empty gaps */
.kc-grid { display:block; column-width:330px; column-gap:12px; }
.kc-grid > .kc { break-inside:avoid; -webkit-column-break-inside:avoid; page-break-inside:avoid; margin:0 0 12px; display:block; width:100%; }
.kc-grid > .kc-wide { column-span:all; }
.kc-grid > .r-empty { column-span:all; }
@media print { .kc-grid { column-width:auto; column-count:2; } }

/* ---------- desktop nav: one line, no wrapping, no collision with the brand ---------- */
@media (min-width:1024px){
  .ic-navbar-container > div:first-child { flex:0 0 auto; }
  #navbarMenu > ul { flex-wrap:nowrap; justify-content:flex-end; }
  #navbarMenu a { white-space:nowrap; font-size:.9rem; padding-left:9px !important; padding-right:9px !important; margin-left:0 !important; margin-right:0 !important; }
  .ic-navbar-collapse { padding-left:12px !important; padding-right:0 !important; }
}
@media (min-width:1024px) and (max-width:1279px){
  #navbarMenu a { font-size:.8rem; padding-left:6px !important; padding-right:6px !important; }
  .g-brand-text small { display:none; }
  .g-brand-text b { font-size:.85rem; }
  .g-brand img { height:38px; }
}

/* sticky header: solid so page content never shows through the marquee/nav */
.ic-navbar.sticky { background-color:#fff !important; --tw-bg-opacity:1; }
.ic-navbar.sticky .container { padding-bottom:4px; }
@media (min-width:1024px){
  #navbarMenu button { white-space:nowrap; font-size:.9rem; font-weight:500; padding:24px 9px !important; margin:0 !important; }
}

/* roster cards: long names / odd data must wrap, never run under the call button */
.kc-doc { flex-wrap:wrap; }
.kc-dn { flex:1 1 150px; min-width:0; overflow-wrap:anywhere; }
.kc-da { flex:0 1 auto; margin-left:auto; }
.kc-meta .kc-m { overflow-wrap:anywhere; min-width:0; }
.kc-head h3, .kc-sub { overflow-wrap:anywhere; }
.kc-time { max-width:100%; white-space:normal; }
@media (max-width:420px){ .kc-da { flex-basis:100%; justify-content:flex-start; padding-left:37px; } }
@media (max-width:600px){ .r-emerg .r-line { display:block; margin-left:0; } }
.g-live > span:first-child { display:flex; flex-wrap:wrap; align-items:center; gap:4px 10px; min-width:0; }
.g-live #g-live-doc { flex:1 1 100%; }
@media (min-width:700px){ .g-live #g-live-doc { flex:0 1 auto; } }
@media (max-width:420px){ .g-brand-text small { white-space:normal; } }
/* mobile/tablet header: nav is a dropdown, so the brand may use the whole row (minus the menu button) */
@media (max-width:1023px){
  .ic-navbar-container > div:last-child { flex:0 0 0; width:0 !important; padding:0 !important; }
  .ic-navbar-container > div:first-child { flex:1 1 auto; max-width:calc(100% - 64px); }
  .g-brand-text small { white-space:nowrap; }
}
@media (max-width:360px){ .g-brand-text small { white-space:normal; } }
@media (max-width:640px){ .g-orb { display:none !important; } }
