/* Brand values mirror the shared design tokens (egr-central-header). Change them there first. */
:root {
  --egr-red: #c8102e;
  --egr-red-dark: #a00d25;
  --ink: #1a1a1a;
  --ink-soft: #6e6e6e;
  --surface: #ffffff;
  --surface-alt: #f2f2f2;
  --border: #dcdcdc;
  --header-bg: #1a1a1a;
  --radius: 8px;
  --max-width: 1120px;
  font-family: Poppins, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  line-height: 1.55;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--surface);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

a { color: var(--egr-red-dark); }

:focus-visible { outline: 3px solid var(--egr-red); outline-offset: 2px; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 16px;
}

/* Header */
.site-header { background: var(--header-bg); color: #fff; }
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; }
.brand-logo { height: 36px; width: auto; display: block; }
.brand-name { font-weight: 600; font-size: 1.15rem; letter-spacing: 0.02em; }
.header-nav { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.header-nav a { color: #fff; text-decoration: none; }
.user-name { color: #c9ccd1; font-size: 0.9rem; }
.env-banner {
  background: #f2c94c;
  color: var(--ink);
  text-align: center;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 4px 16px;
}

/* Buttons */
.button {
  display: inline-block;
  padding: 8px 18px;
  border-radius: var(--radius);
  background: var(--egr-red);
  color: #fff !important;
  text-decoration: none;
  font-weight: 600;
  border: 2px solid var(--egr-red);
}
.button:hover { background: var(--egr-red-dark); border-color: var(--egr-red-dark); }
.button-ghost { background: transparent; color: inherit !important; border-color: currentColor; }
.button-ghost:hover { background: rgba(127, 127, 127, 0.15); border-color: currentColor; }

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--header-bg) 0%, #2b2f35 100%);
  color: #fff;
  padding: 72px 0 80px;
  border-bottom: 6px solid var(--egr-red);
}
.hero h1 { font-size: clamp(2rem, 5vw, 3rem); margin: 0 0 16px; }
.lede { max-width: 640px; font-size: 1.1rem; color: #d7dade; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--egr-red);
  margin: 0 0 8px;
}

/* Sections */
.section { padding: 48px 16px; }
.muted { color: var(--ink-soft); }

.divisions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  padding-top: 48px;
}
.division {
  background: var(--surface-alt);
  border-radius: var(--radius);
  padding: 24px;
  border-top: 4px solid var(--egr-red);
}
.division h2 { margin-top: 0; font-size: 1.2rem; }

/* Systems */
.domain-section { margin-top: 32px; }
.domain-section > :first-child { margin-bottom: 0; }
.system-grid {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.system-grid > li { display: flex; flex-direction: column; gap: 6px; }
.system-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.system-card:hover { border-color: var(--egr-red); box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08); }
.system-name { font-weight: 600; }
.system-desc { color: var(--ink-soft); font-size: 0.92rem; }
.badge {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  background: var(--surface-alt);
  color: var(--ink-soft);
  padding: 2px 8px;
  border-radius: 999px;
}

/* Launchpad views and pin controls */
.view-tabs { display: flex; gap: 8px; margin-top: 24px; border-bottom: 1px solid var(--border); }
.view-tabs a {
  padding: 8px 14px;
  margin-bottom: -1px;
  border-bottom: 3px solid transparent;
  color: var(--ink-soft);
  font-weight: 600;
  text-decoration: none;
}
.view-tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--egr-red); }
.tile-actions { display: flex; gap: 16px; flex-wrap: wrap; padding: 0 4px; }
.tile-action { margin: 0; }
.link-button {
  background: none;
  border: 0;
  padding: 2px 0;
  font: inherit;
  font-size: 0.85rem;
  color: var(--egr-red-dark);
  text-decoration: underline;
  cursor: pointer;
}
.notice {
  margin-top: 24px;
  padding: 12px 16px;
  background: var(--surface-alt);
  border-left: 4px solid #f2c94c;
  border-radius: var(--radius);
}

.error { text-align: center; padding-top: 96px; padding-bottom: 96px; }

/* Footer */
.site-footer { background: var(--header-bg); color: #c9ccd1; font-size: 0.9rem; }
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 20px 16px;
}
.site-footer nav { display: flex; gap: 16px; }
.site-footer a { color: #c9ccd1; }
.denied-actions { justify-content: center; }
