/*
  Shared look for the two landing pages:
    erp.hearnindustrial.services    (docs/Deployment/ops-portal-home)
    portal.hearnindustrial.com      (docs/Deployment/portal-home)
  Scripts/Publish-LandingPages.ps1 copies this file, logo.png, and favicon.ico next to each page.
  Colours match the apps: cal-poly-green #12522F and sea-green #4C956C (Web/tailwind.config.js).
*/
:root {
  --green: #12522F;
  --green-soft: #e8f2ec;
  --sea: #4C956C;
  --page: #f5f6f4;
  --card: #fff;
  --line: #e3e6e2;
  --text: #1f2937;
  --muted: #5b6470;
  --legacy-bg: #fef3c7;
  --legacy-fg: #92400e;
  --legacy-line: #f3d98b;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, sans-serif;
  background: var(--page);
  color: var(--text);
  line-height: 1.45;
}

/* White bar so the green and black logo reads; the green rule underneath carries the brand colour. */
header {
  background: #fff;
  border-bottom: 4px solid var(--green);
}
.bar {
  max-width: 44rem;
  margin: 0 auto;
  padding: 0.85rem 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.bar img {
  height: 3rem;
  width: auto;
  display: block;
}
.product {
  padding-left: 1rem;
  border-left: 1px solid var(--line);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--green);
}

main {
  max-width: 44rem;
  margin: 2.5rem auto 3rem;
  padding: 0 1rem;
}
h1 {
  font-size: 1.6rem;
  font-weight: 600;
  margin: 0 0 0.35rem;
}
.intro {
  margin: 0 0 1.5rem;
  color: var(--muted);
}

.cards {
  display: grid;
  gap: 0.85rem;
}
.city {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  padding: 1rem 1.15rem 1.15rem;
}
.city h2 {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 0.7rem;
  color: var(--green);
}
.city h2 small {
  font-weight: 400;
  font-size: 0.85rem;
  color: var(--muted);
  margin-left: 0.4rem;
}

/* One button per operation at the site. */
.ops {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(11.5rem, 100%), 1fr));
  gap: 0.6rem;
}
a.op {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  background: var(--green-soft);
  color: var(--green);
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
}
a.op:hover,
a.op:focus-visible {
  border-color: var(--green);
  background: #dcebe2;
  outline: none;
}
.op-name {
  font-weight: 600;
}
.op-detail {
  display: block;
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--muted);
}
.code {
  flex: none;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--muted);
}
a.op.legacy {
  background: var(--legacy-bg);
  border-color: var(--legacy-line);
  border-style: dashed;
  color: var(--legacy-fg);
}
a.op.legacy:hover,
a.op.legacy:focus-visible {
  border-color: var(--legacy-fg);
  background: #fdecb0;
}
a.op.legacy .op-detail,
a.op.legacy .code {
  color: var(--legacy-fg);
}

/* Status dot: a hollow ring until checked, then green or grey. Same size in every state, so nothing moves. */
.dot {
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  margin-right: 0.35rem;
  vertical-align: 0.1em;
  border: 1.5px solid #b8bfbb;
  background: transparent;
  box-sizing: border-box;
}
.dot[data-state="up"] { background: #16a34a; border-color: #16a34a; }
.dot[data-state="down"] { background: #9ca3af; border-color: #9ca3af; }

.legend,
.help {
  margin: 1.25rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}
.legend .dot { margin-left: 0.75rem; }
.legend .dot:first-child { margin-left: 0; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@media (max-width: 30rem) {
  .bar img { height: 2.4rem; }
  .product { font-size: 0.95rem; padding-left: 0.75rem; }
  main { margin-top: 1.5rem; }
  h1 { font-size: 1.35rem; }
}
