/* JB Marks — Workgroup landing page shared styles.
   Accent colors are driven per-workgroup via CSS variables set by render.js. */

:root {
  --wg-color: #1B5E20;
  --wg-color-dark: #0E3D15;
  --ink: #1a1f26;
  --muted: #5b6672;
  --line: #e7ebf0;
  --bg: #f4f6f9;
  --card: #ffffff;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

.container { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* ── Top bar ─────────────────────────────────────────────── */
.topbar {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 20px;
  background: #fff; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 10;
}
.topbar img { height: 34px; width: auto; border-radius: 6px; }
.topbar .brand { font-weight: 800; letter-spacing: .5px; }
.topbar .brand small { display: block; font-weight: 600; font-size: 11px; color: var(--muted); letter-spacing: 1px; }
.topbar .home-link { margin-left: auto; font-weight: 600; color: var(--wg-color); font-size: 14px; }
.topbar-min { justify-content: flex-end; }

/* ── Hero: pre-designed banner image ─────────────────────── */
.hero-banner { display: block; line-height: 0; background: #fff; }
.hero-banner img { width: 100%; height: auto; display: block; }

/* Stat strip shown below a banner image, on the workgroup color */
.stats-bar {
  background: linear-gradient(135deg, var(--wg-color), var(--wg-color-dark));
  color: #fff; padding: 22px 0;
}
.stats-bar .stats { margin-top: 0; }

/* ── Hero: gradient + text (used when no bannerImage) ────── */
.hero {
  background: linear-gradient(135deg, var(--wg-color), var(--wg-color-dark));
  color: #fff; padding: 56px 0 44px;
}
.hero-logo {
  display: inline-flex; align-items: center; justify-content: center;
  background: #fff; border-radius: 14px; padding: 10px 16px; margin-bottom: 20px;
  box-shadow: 0 6px 20px rgba(0,0,0,.18);
}
.hero-logo img { height: 52px; width: auto; display: block; }
.hero .eyebrow {
  display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase; opacity: .85; margin-bottom: 12px;
  border: 1px solid rgba(255,255,255,.35); padding: 4px 10px; border-radius: 999px;
}
.hero h1 { font-size: 40px; font-weight: 800; line-height: 1.1; margin-bottom: 12px; }
.hero p { font-size: 18px; max-width: 640px; opacity: .92; }

/* ── Stat strip ──────────────────────────────────────────── */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 32px; }
.stat {
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18);
  border-radius: 14px; padding: 16px; text-align: center;
}
.stat .v { font-size: 26px; font-weight: 800; }
.stat .l { font-size: 12px; opacity: .85; margin-top: 2px; }

/* ── Sections ────────────────────────────────────────────── */
section { padding: 40px 0; }
.section-title { font-size: 22px; font-weight: 800; margin-bottom: 20px; }
.section-title .sub { display:block; font-size: 14px; font-weight: 500; color: var(--muted); margin-top: 4px; }
.lead { font-size: 17px; color: var(--muted); max-width: 720px; }

/* ── Cards grid ──────────────────────────────────────────── */
.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 18px; box-shadow: 0 1px 2px rgba(16,24,40,.04);
}

/* project card */
.project .top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.project h3 { font-size: 15px; font-weight: 700; }
.badge { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.badge.ontrack { background: #e6f4ea; color: #1B7A3E; }
.badge.atrisk { background: #fdecea; color: #c62828; }
.badge.planning { background: #eef1f6; color: #445; }
.bar { height: 8px; background: #eef1f6; border-radius: 999px; overflow: hidden; margin: 8px 0; }
.bar > span { display: block; height: 100%; border-radius: 999px; background: var(--wg-color); }
.project .meta { font-size: 12px; color: var(--muted); display: flex; justify-content: space-between; }

/* team card */
.member { display: flex; align-items: center; gap: 12px; }
.avatar {
  width: 44px; height: 44px; border-radius: 50%; flex: none;
  background: var(--wg-color); color: #fff; font-weight: 700;
  display: flex; align-items: center; justify-content: center; font-size: 15px;
}
.member .n { font-weight: 600; font-size: 14px; }
.member .r { font-size: 12px; color: var(--muted); }

/* link tiles */
.linktile { display: flex; align-items: center; gap: 12px; font-weight: 600; font-size: 14px; }
.linktile .ic {
  width: 40px; height: 40px; border-radius: 12px; flex: none;
  background: color-mix(in srgb, var(--wg-color) 12%, #fff);
  display: flex; align-items: center; justify-content: center; font-size: 18px;
}
.linktile:hover { color: var(--wg-color); }

/* documents browser */
.doclist { display: flex; flex-direction: column; gap: 8px; }
.docrow {
  display: flex; align-items: center; gap: 12px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 16px; cursor: pointer; color: var(--ink);
}
.docrow:hover { border-color: var(--wg-color); background: color-mix(in srgb, var(--wg-color) 4%, #fff); }
.docrow .ic { font-size: 20px; flex: none; }
.docrow .nm { font-weight: 600; font-size: 14px; flex: 1; word-break: break-word; }
.docrow .go { font-size: 12px; font-weight: 700; color: var(--wg-color); white-space: nowrap; }
#docs-crumbs a { color: var(--wg-color); }
#docs-crumbs a:hover { text-decoration: underline; }

/* announcements */
.ann { border-left: 3px solid var(--wg-color); padding: 4px 0 4px 14px; margin-bottom: 16px; }
.ann .d { font-size: 12px; color: var(--muted); }
.ann .t { font-weight: 700; font-size: 15px; margin: 2px 0; }
.ann .b { font-size: 14px; color: var(--muted); }

/* contact / CTA */
.cta {
  background: linear-gradient(135deg, var(--wg-color), var(--wg-color-dark));
  color: #fff; border-radius: 20px; padding: 28px; display: flex;
  align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
}
.cta h3 { font-size: 20px; font-weight: 800; }
.cta p { opacity: .9; font-size: 14px; }
.btn {
  background: #fff; color: var(--wg-color); font-weight: 700; font-size: 14px;
  padding: 12px 22px; border-radius: 12px; border: 0; cursor: pointer; white-space: nowrap;
}

footer { padding: 30px 0; text-align: center; color: var(--muted); font-size: 13px; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 820px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .grid.cols-3, .grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
  .hero h1 { font-size: 30px; }
}
@media (max-width: 520px) {
  .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}

/* ── Workgroup portal additions ──────────────────────────── */
.muted { color: var(--muted); font-weight: 500; }
.linktile.disabled { opacity: .6; cursor: default; }
.linktile.disabled:hover { color: inherit; }
.btn-link { color: var(--wg-color); font-weight: 700; }
.btn-link:hover { text-decoration: underline; }
.linktile small { display: block; margin-top: 2px; }
