/* ==========================================================================
   MAP page (software.html) — page-specific layout only.
   Shared components (.hero, .split, .screen, .app-grid, .card, .pill,
   .ticks, .cta-banner, .chequer ...) are styled in css/styles.css.
   ========================================================================== */

/* In-page anchors (the pricing page links to #factory, #hr ...) land below
   the sticky header rather than under it. */
main [id] {
  scroll-margin-top: calc(var(--header-h, 72px) + 1rem);
}

/* ---------------- Hero ---------------- */

.map-mark {
  display: block;
  width: auto;
  height: 76px;
  margin-bottom: 1.5rem;
}

/* theme-init.js always sets html[data-theme]; dark is the default. */
.map-mark--light { display: none; }
:root[data-theme="light"] .map-mark--dark { display: none; }
:root[data-theme="light"] .map-mark--light { display: block; }

.map-hero h1 {
  max-width: 20ch;
}

@media (max-width: 480px) {
  .map-mark { height: 60px; }
}

/* ---------------- Overview: app tiles as in-page links ---------------- */

#overview .app-tile {
  position: relative;
}

#overview .app-tile h3 a {
  color: inherit;
  text-decoration: none;
}

#overview .app-tile h3 a::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

#overview .app-tile:hover h3 a {
  color: var(--accent);
}

#overview .app-tile:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

#overview .app-tile h3 a:focus-visible {
  outline: none;
}

.jump-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.25rem;
  margin-top: 2rem;
  font-size: 0.95rem;
}

.jump-label {
  color: var(--text-muted);
}

.jump-links a {
  font-weight: 600;
}

/* ---------------- Journey ---------------- */

.journey {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: journey;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

@media (max-width: 900px) {
  .journey { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .journey { grid-template-columns: minmax(0, 1fr); }
}

.journey li {
  counter-increment: journey;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
  padding: 1.1rem 1rem 1.2rem;
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius);
  background: var(--surface);
}

.journey li::before {
  content: counter(journey, decimal-leading-zero);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.journey strong {
  color: var(--text);
  font-size: 1rem;
  line-height: 1.3;
}

.journey span {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* ---------------- App sections ---------------- */

.app-section .split-text .ticks {
  margin-bottom: 0;
}

/* Factory: the sign-off stages as a row of pills joined by arrows. */
.signoff-chain {
  list-style: none;
  margin: 0 0 0.5rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.signoff-chain li {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.signoff-chain li + li::before {
  content: "";
  width: 0.9rem;
  height: 2px;
  background: var(--border);
  flex-shrink: 0;
}

.signoff-note {
  font-size: 0.875rem;
  margin-bottom: 1.25rem;
}

/* Cards for the smaller apps */
.app-cards .card {
  display: flex;
  flex-direction: column;
}

.app-cards .card .ticks,
#deployment .card .ticks {
  margin: 1rem 0 0;
  font-size: 0.95rem;
}

/* ---------------- Admin ---------------- */

.admin-block {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 2rem 3.5rem;
  align-items: start;
}

.admin-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin-bottom: 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--accent);
}

.admin-intro p:last-child {
  margin-bottom: 0;
}

.admin-list {
  margin: 0;
}

@media (max-width: 900px) {
  .admin-block { grid-template-columns: minmax(0, 1fr); }
}

/* ---------------- Built with the people who use it ---------------- */

.principles {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

.principles li {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 1.1rem 1.25rem;
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--surface);
}

.principles strong {
  color: var(--text);
  line-height: 1.35;
}

.principles span {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ---------------- The technical bit ---------------- */

.card .tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 1rem;
}

/* ---------------- Inline code ---------------- */

#integrations code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  padding: 0.1em 0.35em;
  border-radius: var(--radius-sm, 4px);
  background: var(--surface-2);
  color: var(--text);
}
