/* Duty of Care — Daily Safety Message
   Industrial-safety look: dark slate + safety orange, mobile-first */

:root {
  --bg: #0f1419;
  --bg-elevated: #1a222c;
  --bg-card: #232d3a;
  --border: #2e3a4a;
  --text: #e8eef4;
  --text-muted: #9aabbc;
  --accent: #ff6b1a;
  --accent-dim: #c44f0f;
  --accent-soft: rgba(255, 107, 26, 0.15);
  --success: #3dd68c;
  --radius: 10px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
  --font: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --max: 720px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  background-image:
    linear-gradient(180deg, #141b24 0%, var(--bg) 40%),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 39px,
      rgba(255, 107, 26, 0.03) 39px,
      rgba(255, 107, 26, 0.03) 40px
    );
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover,
a:focus-visible {
  text-decoration: underline;
  outline: none;
}

.wrap {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
  padding-block: 1.5rem 3rem;
}

/* —— Masthead —— */
.masthead {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.25rem 1.35rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  border-left: 4px solid var(--accent);
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
}

.brand-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1rem;
}

.brand {
  margin: 0;
  font-size: clamp(1.35rem, 4vw, 1.75rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text);
}

.brand span {
  color: var(--accent);
}

.tagline {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: center;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.nav {
  display: flex;
  gap: 1rem;
  font-size: 0.9rem;
}

.nav a {
  color: var(--text-muted);
}

.nav a:hover {
  color: var(--accent);
}

/* —— Sections —— */
.section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem 1.25rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

.section h2 {
  margin: 0 0 0.75rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section h2::before {
  content: "";
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  background: var(--accent);
  border-radius: 2px;
  flex-shrink: 0;
}

.section h3 {
  margin: 0 0 0.5rem;
  font-size: 1.2rem;
  font-weight: 650;
  line-height: 1.3;
  color: var(--text);
}

.section p {
  margin: 0;
  color: var(--text);
}

.section p + p {
  margin-top: 0.65rem;
}

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

/* Focus title block */
#brief-title {
  margin-bottom: 0.65rem;
}

/* Lists */
.numbered,
.check-list,
.watch-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.numbered li,
.check-list li {
  position: relative;
  padding: 0.65rem 0.75rem 0.65rem 2.6rem;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

.numbered li:last-child,
.check-list li:last-child {
  border-bottom: none;
}

.numbered li::before {
  position: absolute;
  left: 0.5rem;
  top: 0.6rem;
  width: 1.5rem;
  height: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--accent);
  color: #0f1419;
  font-size: 0.8rem;
  font-weight: 800;
  content: attr(data-n);
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0.65rem;
  top: 0.85rem;
  width: 1.05rem;
  height: 1.05rem;
  border: 2px solid var(--accent);
  border-radius: 3px;
  background: transparent;
}

/* Regulator watch cards */
.watch-list li {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
}

.watch-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.watch-list li:first-child {
  padding-top: 0;
}

.watch-title {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  font-weight: 650;
}

.watch-source {
  margin-top: 0.4rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--mono);
}

/* Warm-up note */
.note {
  background: var(--bg-elevated);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 0.9rem 1.1rem;
  margin-bottom: 1rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.note strong {
  color: var(--accent);
}

/* Closing */
.closing {
  border-left: 4px solid var(--accent);
}

.closing p {
  font-size: 1.05rem;
}

/* Status / error */
.status {
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.status.error {
  background: rgba(220, 60, 60, 0.15);
  border: 1px solid rgba(220, 60, 60, 0.4);
  color: #ffb4b4;
}

.status.loading {
  background: var(--accent-soft);
  border: 1px solid rgba(255, 107, 26, 0.35);
  color: var(--accent);
}

[hidden] {
  display: none !important;
}

/* Footer */
.site-footer {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
}

.site-footer a {
  color: var(--text-muted);
}

/* Archive page */
.archive-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.archive-list li {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
}

.archive-list li:last-child {
  border-bottom: none;
}

.archive-list a {
  font-weight: 600;
  color: var(--text);
}

.archive-list a:hover {
  color: var(--accent);
}

.archive-date {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

@media (min-width: 640px) {
  .wrap {
    padding-block: 2rem 4rem;
  }

  .section {
    padding: 1.35rem 1.5rem;
  }
}

/* Stretch warm-up video */
.stretch-section .stretch-intro {
  margin-bottom: 0.85rem;
}

.video-wrap {
  position: relative;
  width: 100%;
  border-radius: calc(var(--radius) - 2px);
  overflow: hidden;
  background: #000;
  border: 1px solid var(--border);
}

.stretch-video {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(70vh, 480px);
  background: #000;
  vertical-align: middle;
}

/* Stretch CTA / primary button */
.stretch-cta-wrap,
.back-link-wrap {
  margin-top: 0.9rem;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.75rem 1.15rem;
  border-radius: var(--radius);
  background: var(--accent);
  color: #0f1419;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  border: none;
  box-shadow: 0 2px 10px rgba(255, 107, 26, 0.35);
  transition: background 0.15s ease, transform 0.1s ease;
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: #ff7f3a;
  color: #0f1419;
  text-decoration: none;
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.btn-link {
  display: inline-flex;
  align-items: center;
  font-weight: 650;
  font-size: 0.95rem;
  color: var(--accent);
}

.btn-link:hover,
.btn-link:focus-visible {
  text-decoration: underline;
}

@media (max-width: 480px) {
  .btn-primary {
    width: 100%;
    text-align: center;
  }
}

/* —— Landing: iPhone Home Screen–style app icons ——
   The rounded-square tile is the app icon: 60×60 CSS px.
   The industry name is a label underneath, not inside a big card.
   Columns are a fixed size so tiles never stretch to the viewport
   (SVG min-content used to blow these up to ~300px). */

.landing-intro {
  margin-bottom: 1rem;
}

.track-grid {
  display: grid;
  grid-template-columns: repeat(3, 5.5rem);
  justify-content: center;
  column-gap: 0.65rem;
  row-gap: 0.95rem;
  width: max-content;
  max-width: 100%;
  margin: 0 auto 1.5rem;
}

.track-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0.35rem;
  width: 100%;
  min-width: 0;
  max-width: 5.5rem;
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  text-decoration: none;
  color: var(--text);
  -webkit-tap-highlight-color: transparent;
}

.track-card:hover,
.track-card:focus-visible {
  text-decoration: none;
  outline: none;
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  transform: none;
}

/* 60×60 CSS px rounded-square — the app icon itself */
.track-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  min-width: 60px;
  min-height: 60px;
  max-width: 60px;
  max-height: 60px;
  flex: 0 0 60px;
  border-radius: 13px; /* ~22% of 60px, iOS rounded-square */
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  transition: transform 0.12s ease;
}

.track-card:hover .track-card-icon,
.track-card:focus-visible .track-card-icon {
  transform: scale(1.06);
}

.track-card:focus-visible .track-card-icon {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

.track-card-icon .track-icon-svg {
  display: block;
  width: 32px;
  height: 32px;
  min-width: 0;
  max-width: 32px;
  max-height: 32px;
  flex: 0 0 32px;
}

/* Filled pump-jack silhouette reads larger than the stroke glyphs */
.track-card--oil-gas .track-icon-svg {
  width: 40px;
  height: 40px;
  max-width: 40px;
  max-height: 40px;
  flex-basis: 40px;
}

.track-card-label {
  display: block;
  width: 100%;
  max-width: 5.5rem;
  margin: 0;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.15;
  text-align: center;
  color: var(--text);
  letter-spacing: 0.01em;
  overflow-wrap: normal;
  word-break: normal;
}

.track-card-desc { display: none; }
.track-card-title { display: contents; }
.track-card-pill,
.track-card-cta,
.track-bubble { display: contents; }

/* —— Per-track icon colors (tile is the 60px icon, not a page card) —— */

.track-card--construction .track-card-icon {
  background: linear-gradient(160deg, #3a2a1c 0%, #2a2218 100%);
  color: var(--accent);
  border: 1px solid rgba(255, 107, 26, 0.5);
}
.track-card--construction:hover .track-card-label,
.track-card--construction:focus-visible .track-card-label { color: var(--accent); }

.track-card--general .track-card-icon {
  background: linear-gradient(160deg, #16302e 0%, #142428 100%);
  color: #3db8a8;
  border: 1px solid rgba(61, 184, 168, 0.5);
}
.track-card--general:hover .track-card-label,
.track-card--general:focus-visible .track-card-label { color: #3db8a8; }

.track-card--maritime .track-card-icon {
  background: linear-gradient(160deg, #15283c 0%, #121e30 100%);
  color: #4a9eff;
  border: 1px solid rgba(74, 158, 255, 0.5);
}
.track-card--maritime:hover .track-card-label,
.track-card--maritime:focus-visible .track-card-label { color: #4a9eff; }

.track-card--agriculture .track-card-icon {
  background: linear-gradient(160deg, #1a3020 0%, #142418 100%);
  color: #6bcf5a;
  border: 1px solid rgba(107, 207, 90, 0.5);
}
.track-card--agriculture:hover .track-card-label,
.track-card--agriculture:focus-visible .track-card-label { color: #6bcf5a; }

.track-card--healthcare .track-card-icon {
  background: linear-gradient(160deg, #143038 0%, #12262c 100%);
  color: #5ec8d8;
  border: 1px solid rgba(94, 200, 216, 0.5);
}
.track-card--healthcare:hover .track-card-label,
.track-card--healthcare:focus-visible .track-card-label { color: #5ec8d8; }

.track-card--warehousing .track-card-icon {
  background: linear-gradient(160deg, #332818 0%, #282014 100%);
  color: #f0b429;
  border: 1px solid rgba(240, 180, 41, 0.5);
}
.track-card--warehousing:hover .track-card-label,
.track-card--warehousing:focus-visible .track-card-label { color: #f0b429; }

.track-card--oil-gas .track-card-icon {
  background: linear-gradient(160deg, #3a201c 0%, #2a1816 100%);
  color: #e85d4c;
  border: 1px solid rgba(232, 93, 76, 0.5);
}
.track-card--oil-gas:hover .track-card-label,
.track-card--oil-gas:focus-visible .track-card-label { color: #e85d4c; }

.track-card--utilities .track-card-icon {
  background: linear-gradient(160deg, #332c14 0%, #282410 100%);
  color: #ffd166;
  border: 1px solid rgba(255, 209, 102, 0.5);
}
.track-card--utilities:hover .track-card-label,
.track-card--utilities:focus-visible .track-card-label { color: #ffd166; }

.track-card--manufacturing .track-card-icon {
  background: linear-gradient(160deg, #261e40 0%, #1c1830 100%);
  color: #9b7bff;
  border: 1px solid rgba(155, 123, 255, 0.5);
}
.track-card--manufacturing:hover .track-card-label,
.track-card--manufacturing:focus-visible .track-card-label { color: #9b7bff; }

/* Track badge pills on brief page headers */
.badge-track {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  border: 1px solid transparent;
}
.badge-track--construction {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: rgba(255, 107, 26, 0.35);
}
.badge-track--general {
  background: rgba(61, 184, 168, 0.15);
  color: #3db8a8;
  border-color: rgba(61, 184, 168, 0.35);
}
.badge-track--maritime {
  background: rgba(74, 158, 255, 0.15);
  color: #4a9eff;
  border-color: rgba(74, 158, 255, 0.35);
}
.badge-track--agriculture {
  background: rgba(107, 207, 90, 0.15);
  color: #6bcf5a;
  border-color: rgba(107, 207, 90, 0.35);
}
.badge-track--healthcare {
  background: rgba(94, 200, 216, 0.15);
  color: #5ec8d8;
  border-color: rgba(94, 200, 216, 0.35);
}
.badge-track--warehousing {
  background: rgba(240, 180, 41, 0.15);
  color: #f0b429;
  border-color: rgba(240, 180, 41, 0.35);
}
.badge-track--oil-gas {
  background: rgba(232, 93, 76, 0.15);
  color: #e85d4c;
  border-color: rgba(232, 93, 76, 0.35);
}
.badge-track--utilities {
  background: rgba(255, 209, 102, 0.15);
  color: #ffd166;
  border-color: rgba(255, 209, 102, 0.35);
}
.badge-track--manufacturing {
  background: rgba(155, 123, 255, 0.15);
  color: #9b7bff;
  border-color: rgba(155, 123, 255, 0.35);
}
.badge-track-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

/* Wider landing for multi-track grid */
.wrap--wide {
  --max: 1080px;
}

/* Wider phones: 4 columns. Icon tiles stay 60×60. */
@media (min-width: 420px) {
  .track-grid {
    grid-template-columns: repeat(4, 5.5rem);
    column-gap: 0.55rem;
  }
}

/* Tablet */
@media (min-width: 760px) {
  .track-grid {
    grid-template-columns: repeat(5, 5.5rem);
    column-gap: 0.75rem;
    row-gap: 1.05rem;
  }
}

/* Desktop: one row of 60px icons */
@media (min-width: 1100px) {
  .track-grid {
    grid-template-columns: repeat(9, 5.5rem);
    column-gap: 0.55rem;
  }
}
