/* ============================================================
   HTO Consulting — Design System
   css/style.css
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500&display=swap');

/* ── Variables ──────────────────────────────────────────── */
:root {
  --bg-primary:    #0a0a0a;
  --bg-secondary:  #111111;
  --bg-card:       #161616;
  --border:        #222222;
  --border-subtle: rgba(255, 255, 255, 0.06);

  --green:         #6aa84f;
  --green-light:   #93c47d;
  --green-pale:    #d9ead3;
  --green-08:      rgba(106, 168, 79, 0.08);
  --green-12:      rgba(106, 168, 79, 0.12);
  --green-25:      rgba(106, 168, 79, 0.25);

  --warning:       #ffb400;
  --warning-06:    rgba(255, 180, 0, 0.06);
  --warning-20:    rgba(255, 180, 0, 0.20);

  --text-primary:   #e8e8e8;
  --text-secondary: #999999;
  --text-muted:     #666666;

  --font-sans: 'Montserrat', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Consolas, monospace;

  --radius:     8px;
  --radius-lg:  12px;
  --max-width:  860px;
  --nav-height: 64px;
}

/* ── Reset & Base ───────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
}

/* ── Layout ─────────────────────────────────────────────── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.page-body {
  padding-top: calc(var(--nav-height) + 48px);
  padding-bottom: 80px;
}

section {
  margin-bottom: 4rem;
}

hr.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 4rem 0;
}

/* ── Navigation ─────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-height);
  background-color: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo img,
.nav-logo svg {
  height: 28px;
  width: auto;
  display: block;
}

.nav-back {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  text-decoration: none;
  text-transform: uppercase;
  transition: color 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-back::before {
  content: '←';
  font-size: 1rem;
  transition: transform 0.2s ease;
}

.nav-back:hover {
  color: var(--green-light);
}

.nav-back:hover::before {
  transform: translateX(-3px);
}

/* ── Page Header ────────────────────────────────────────── */
.page-header {
  padding: 40px 0 32px;
}

.page-header .badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 4px 10px;
  border-radius: 4px;
  line-height: 1.4;
}

.badge-solid {
  background-color: var(--green);
  color: #fff;
}

.badge-outline {
  background-color: transparent;
  border: 1px solid var(--green);
  color: var(--green-light);
}

.badge-dark {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.page-header h1 {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.15;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.page-header .subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 620px;
  line-height: 1.6;
}

/* ── Section Labels ─────────────────────────────────────── */
.section-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--green-light);
  margin-bottom: 20px;
}

.section-label::before {
  content: '';
  display: block;
  width: 8px;
  height: 8px;
  background-color: var(--green);
  border-radius: 1px;
  flex-shrink: 0;
}

/* ── Stats Row (index) ──────────────────────────────────── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background-color: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 4rem;
}

.stat-item {
  background-color: var(--bg-card);
  padding: 28px 24px;
  text-align: center;
  border-top: 2px solid var(--green);
}

.stat-number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--green);
  line-height: 1;
  margin-bottom: 6px;
}

.stat-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-secondary);
}

/* ── KPI Grid ───────────────────────────────────────────── */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.kpi-card {
  background-color: var(--bg-card);
  border: 1px solid rgba(106, 168, 79, 0.2);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.kpi-card:hover {
  border-color: rgba(106, 168, 79, 0.5);
  box-shadow: 0 0 16px rgba(106, 168, 79, 0.07);
}

.kpi-number {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--green);
  line-height: 1;
  margin-bottom: 8px;
  text-shadow: 0 0 24px rgba(106, 168, 79, 0.45);
}

.kpi-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-secondary);
}

/* ── Cards ──────────────────────────────────────────────── */
.card {
  background-color: var(--bg-card);
  border: 1px solid rgba(106, 168, 79, 0.15);
  border-radius: var(--radius);
  padding: 20px 24px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  border-color: rgba(106, 168, 79, 0.4);
  box-shadow: 0 0 16px rgba(106, 168, 79, 0.06);
}

.card-highlight {
  background: linear-gradient(to right, rgba(106, 168, 79, 0.05) 0%, transparent 65%);
  border: 1px solid var(--border);
  border-left: 3px solid var(--green);
  border-radius: var(--radius);
  padding: 20px 24px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.card-highlight:hover {
  background: linear-gradient(to right, rgba(106, 168, 79, 0.09) 0%, transparent 65%);
  border-color: var(--green-25);
  border-left-color: var(--green);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.card-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.card-body {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.card-value {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--green);
  margin-bottom: 4px;
}

/* ── Info / Warning Boxes ───────────────────────────────── */
.info-box,
.warning-box {
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-top: 16px;
}

.info-box {
  background-color: var(--green-08);
  border: 1px solid var(--green-25);
}

.warning-box {
  background-color: var(--warning-06);
  border: 1px solid var(--warning-20);
}

.box-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 8px;
}

.info-box .box-label {
  color: var(--green-light);
}

.warning-box .box-label {
  color: var(--warning);
}

.info-box p,
.warning-box p {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

.info-box strong,
.warning-box strong {
  color: var(--text-primary);
}

/* ── Tables ─────────────────────────────────────────────── */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

thead tr th {
  background-color: var(--green-12);
  color: var(--green-light);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 12px 16px;
  text-align: left;
  white-space: nowrap;
}

tbody tr {
  border-top: 1px solid var(--border-subtle);
  transition: background-color 0.2s ease;
}

tbody tr:nth-child(even) {
  background-color: rgba(255, 255, 255, 0.015);
}

tbody tr:hover {
  background-color: var(--green-08);
}

tbody td {
  padding: 12px 16px;
  color: var(--text-primary);
  vertical-align: middle;
}

tbody td.muted {
  color: var(--text-secondary);
}

tbody td.green {
  color: var(--green-light);
  font-weight: 600;
}

/* ── Numbered Steps ─────────────────────────────────────── */
.steps {
  counter-reset: step-counter;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.step {
  counter-increment: step-counter;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.step::before {
  content: counter(step-counter);
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  background-color: var(--green-12);
  border: 1px solid var(--green-25);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--green);
  margin-top: 2px;
}

.step-content {
  flex: 1;
}

.step-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.step-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ── Checklists ─────────────────────────────────────────── */
.checklist {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.checklist li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.checklist li::before {
  content: '';
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--green);
  margin-top: 7px;
}

/* ── SOP List Items ─────────────────────────────────────── */
.sop-category {
  margin-bottom: 2.5rem;
}

.sop-category-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-secondary);
  margin-bottom: 10px;
  padding: 6px 0 10px;
  border-bottom: 1px solid rgba(106, 168, 79, 0.15);
  display: flex;
  align-items: center;
  gap: 8px;
}

.sop-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sop-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background-color: var(--bg-card);
  border: 1px solid rgba(106, 168, 79, 0.2);
  border-radius: var(--radius);
  text-decoration: none;
  transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
}

.sop-item:not(.disabled):hover {
  border-color: rgba(106, 168, 79, 0.55);
  background-color: var(--green-08);
  box-shadow: 0 0 20px rgba(106, 168, 79, 0.08);
}

.sop-item.disabled {
  opacity: 0.35;
  cursor: default;
  pointer-events: none;
}

.sop-item-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sop-item-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

.sop-item-desc {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.sop-item-arrow {
  font-size: 1rem;
  color: var(--green);
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.sop-item:not(.disabled):hover .sop-item-arrow {
  opacity: 1;
  transform: translateX(0);
}

/* ── Code Blocks ────────────────────────────────────────── */
pre {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.84rem;
  line-height: 1.7;
  color: var(--green-light);
}

code {
  font-family: var(--font-mono);
}

p code,
li code,
td code {
  background-color: var(--green-08);
  border: 1px solid var(--green-25);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 0.82em;
  color: var(--green-light);
}

/* ── Footer ─────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  margin-top: 4rem;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer-copy {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.footer-link {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  letter-spacing: 0.06em;
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: var(--green-light);
}

/* ── Typography Helpers ─────────────────────────────────── */
h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
  line-height: 1.3;
}

h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
}

p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 12px;
}

p:last-child {
  margin-bottom: 0;
}

strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* ── Utility ────────────────────────────────────────────── */
.mt-4  { margin-top: 1rem; }
.mt-8  { margin-top: 2rem; }
.mb-4  { margin-bottom: 1rem; }
.mb-8  { margin-bottom: 2rem; }
.green-text { color: var(--green-light); }

/* ── Section Nav (sticky anchor bar) ───────────────────── */
.section-nav {
  position: sticky;
  top: var(--nav-height);
  z-index: 90;
  background: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
}

.section-nav::-webkit-scrollbar { display: none; }

.section-nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  gap: 0;
  white-space: nowrap;
}

.section-nav-link {
  display: inline-block;
  padding: 14px 16px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.section-nav-link:hover {
  color: var(--green-light);
  border-bottom-color: var(--green-25);
}

.section-nav-link.active {
  color: var(--green-light);
  border-bottom-color: var(--green);
}

/* ── Tier Badges (in tables) ────────────────────────────── */
.tier-base {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 2px 7px;
  border-radius: 3px;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.tier-performance {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 2px 7px;
  border-radius: 3px;
  background-color: transparent;
  border: 1px solid var(--green);
  color: var(--green-light);
}

.tier-accelerator {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 2px 7px;
  border-radius: 3px;
  background-color: var(--green);
  border: 1px solid var(--green);
  color: #fff;
}

/* ── Interactive Checklist ──────────────────────────────── */
.checklist-interactive {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.checklist-interactive li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 13px 16px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.checklist-interactive li:hover {
  background: rgba(106, 168, 79, 0.04);
  border-color: var(--border);
}

.checklist-interactive input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  min-width: 20px;
  border: 2px solid var(--green-25);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  margin-top: 2px;
  transition: all 0.2s ease;
  position: relative;
  flex-shrink: 0;
}

.checklist-interactive input[type="checkbox"]:hover {
  border-color: var(--green);
}

.checklist-interactive input[type="checkbox"]:checked {
  background: var(--green);
  border-color: var(--green);
}

.checklist-interactive input[type="checkbox"]:checked::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.checklist-interactive .check-content {
  flex: 1;
  transition: opacity 0.2s ease;
}

.checklist-interactive input[type="checkbox"]:checked + .check-content {
  opacity: 0.4;
  text-decoration: line-through;
  text-decoration-color: var(--green-25);
}

.checklist-interactive .check-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  display: block;
  margin-bottom: 2px;
}

.checklist-interactive .check-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ── Hero Stat Line (index) ─────────────────────────────── */
.hero-stat-line {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin-top: 2.5rem;
  margin-bottom: 12px;
  line-height: 1.2;
}

.hero-stat-line .hero-accent {
  background: linear-gradient(135deg, var(--green) 0%, var(--green-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Scroll Animations ──────────────────────────────────── */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Page Header Gradient ───────────────────────────────── */
.page-header {
  background: linear-gradient(135deg, rgba(106,168,79,0.09) 0%, rgba(106,168,79,0.02) 100%);
  border: 1px solid rgba(106,168,79,0.28);
  border-radius: var(--radius-lg);
  padding: 36px 32px 32px;
  margin-bottom: 0;
}

/* ── Summary Box ────────────────────────────────────────── */
.summary-box {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  font-size: 0.925rem;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 2.5rem;
}

/* ── Section Title (with ◆ icon) ────────────────────────── */
.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 20px;
  line-height: 1.3;
}

.section-title .icon {
  color: var(--green);
  font-size: 0.65rem;
  flex-shrink: 0;
}

/* ── Stats Grid (4-col) ─────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 2.5rem;
}

.stat-box {
  background: var(--bg-card);
  border: 1px solid rgba(106, 168, 79, 0.2);
  border-top: 2px solid var(--green);
  border-radius: var(--radius);
  padding: 18px 16px;
  text-align: center;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.stat-box:hover {
  border-color: rgba(106, 168, 79, 0.5);
  box-shadow: 0 0 16px rgba(106, 168, 79, 0.07);
}

.stat-value {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--green);
  line-height: 1;
  margin-bottom: 6px;
  text-shadow: 0 0 20px rgba(106, 168, 79, 0.4);
}

.stat-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
}

/* ── Hero Ring (SVG circular stat) ─────────────────────── */
.hero-ring-wrap {
  display: flex;
  align-items: center;
  gap: 28px;
  background: linear-gradient(135deg, rgba(106,168,79,0.05) 0%, rgba(106,168,79,0.01) 100%);
  border: 1px solid rgba(106,168,79,0.15);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  margin-bottom: 2rem;
}

.hero-ring {
  position: relative;
  width: 88px;
  height: 88px;
  flex-shrink: 0;
}

.hero-ring svg { width: 100%; height: 100%; }

.hero-ring-number {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--green);
  text-shadow: 0 0 18px rgba(106, 168, 79, 0.5);
  white-space: nowrap;
  line-height: 1;
}

.hero-ring-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.hero-ring-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ── Volume Callout (big number + text) ─────────────────── */
.volume-callout {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--green-08);
  border: 1px solid var(--green-25);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-top: 16px;
}

.volume-number {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--green);
  text-shadow: 0 0 24px rgba(106, 168, 79, 0.45);
  line-height: 1;
  white-space: nowrap;
}

.volume-text {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ── Flow Diagram ───────────────────────────────────────── */
.flow-diagram {
  display: flex;
  align-items: stretch;
  gap: 6px;
  margin: 20px 0;
  flex-wrap: wrap;
}

.flow-node {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  text-align: center;
  flex: 1;
  min-width: 110px;
  transition: border-color 0.2s ease;
}

.flow-node:hover { border-color: var(--green-25); }

.flow-icon {
  font-size: 1.4rem;
  margin-bottom: 8px;
  display: block;
}

.flow-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--green-light);
  margin-bottom: 4px;
}

.flow-desc {
  font-size: 0.76rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.flow-arrow {
  display: flex;
  align-items: center;
  color: var(--green-25);
  font-size: 1.1rem;
  flex-shrink: 0;
  padding-bottom: 4px;
}

/* ── Content Type Cards ─────────────────────────────────── */
.type-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 2rem;
}

.type-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.type-card:hover {
  border-color: var(--green-25);
  background: linear-gradient(135deg, rgba(106,168,79,0.04) 0%, transparent 60%);
}

.type-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.type-badge-pill {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 3px 8px;
  border-radius: 3px;
  white-space: nowrap;
}

.type-card-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
}

.type-card-body {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ── Step Blocks (numbered sections) ───────────────────── */
.step-blocks {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.step-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px 20px 20px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  transition: border-color 0.2s ease;
}

.step-block:hover { border-color: var(--green-25); }

.step-block-num {
  width: 28px;
  height: 28px;
  min-width: 28px;
  background: var(--green-12);
  border: 1px solid var(--green-25);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--green);
  margin-top: 2px;
}

.step-block-content { flex: 1; }

.step-block-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.step-block-meta {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--green);
  margin-bottom: 8px;
}

.step-block-body {
  font-size: 0.845rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ── Nav Logo Override ──────────────────────────────────── */
.nav-logo img { height: 36px !important; width: auto; }

/* ── Coming Soon Badge ──────────────────────────────────── */
.badge-coming-soon {
  display: inline-flex;
  align-items: center;
  font-size: 0.58rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 2px 7px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  color: var(--text-muted);
  margin-left: 6px;
  vertical-align: middle;
  white-space: nowrap;
}

/* ── Tags ───────────────────────────────────────────────── */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tags span {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  color: var(--text-muted);
  text-transform: lowercase;
  letter-spacing: 0.04em;
}

/* ── Bottom Nav (between SOPs) ──────────────────────────── */
.nav-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0 0;
  border-top: 1px solid var(--border);
  margin-top: 3rem;
  gap: 16px;
}

.nav-bottom-link {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  letter-spacing: 0.06em;
  transition: color 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-bottom-link:hover { color: var(--green-light); }

.nav-bottom-link.next { flex-direction: row-reverse; }

/* ── Definition of Done callout ─────────────────────────── */
.done-callout {
  background: linear-gradient(135deg, rgba(106,168,79,0.07) 0%, rgba(106,168,79,0.02) 100%);
  border: 1px solid var(--green-25);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
}

.done-callout-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--green-light);
  margin-bottom: 10px;
}

.done-callout p {
  font-size: 0.925rem;
  color: var(--text-primary);
  font-style: italic;
  line-height: 1.65;
  margin: 0;
}

/* ── Page body variant (with section nav) ───────────────── */
.page-body-sop {
  padding-top: 32px;
  padding-bottom: 80px;
}

/* ── Gold / Training Theme ──────────────────────────────── */
body.theme-training {
  --green:       #D4A843;
  --green-light: #E8C76A;
  --green-pale:  #FFF3D1;
  --green-08:    rgba(212, 168, 67, 0.08);
  --green-12:    rgba(212, 168, 67, 0.12);
  --green-25:    rgba(212, 168, 67, 0.25);
}

/* ── Landing Cards (index.html) ─────────────────────────── */
.landing-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 3rem 0 2rem;
}

.landing-card {
  background: var(--bg-card);
  border: 1px solid rgba(106, 168, 79, 0.2);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  cursor: pointer;
}

.landing-card:hover {
  border-color: rgba(106, 168, 79, 0.55);
  background: linear-gradient(135deg, rgba(106,168,79,0.06) 0%, transparent 70%);
  box-shadow: 0 0 32px rgba(106, 168, 79, 0.1);
  transform: translateY(-2px);
}

.landing-card.gold {
  border-color: rgba(212, 168, 67, 0.2);
}

.landing-card.gold:hover {
  border-color: rgba(212, 168, 67, 0.55);
  background: linear-gradient(135deg, rgba(212,168,67,0.06) 0%, transparent 70%);
  box-shadow: 0 0 32px rgba(212, 168, 67, 0.1);
}

.landing-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  background: var(--green-12);
  border: 1px solid var(--green-25);
  flex-shrink: 0;
}

.landing-card.gold .landing-card-icon {
  background: rgba(212, 168, 67, 0.12);
  border-color: rgba(212, 168, 67, 0.25);
}

.landing-card-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 3px 9px;
  border-radius: 4px;
  background: var(--green);
  color: #fff;
  width: fit-content;
}

.landing-card.gold .landing-card-badge {
  background: #D4A843;
  color: #0a0a0a;
}

.landing-card-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.landing-card-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.65;
  flex: 1;
}

.landing-card-cta {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--green);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: gap 0.2s ease;
}

.landing-card.gold .landing-card-cta {
  color: #D4A843;
}

.landing-card:hover .landing-card-cta {
  gap: 10px;
}

.landing-footer-note {
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  padding: 20px 0 0;
  border-top: 1px solid var(--border);
}

/* ── Login Page ─────────────────────────────────────────── */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: var(--bg-card);
  border: 1px solid rgba(106, 168, 79, 0.25);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  text-align: center;
}

.login-logo {
  display: block;
  height: 32px;
  width: auto;
  margin: 0 auto 28px;
}

.login-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.login-subtitle {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 28px;
  line-height: 1.5;
}

.login-field {
  position: relative;
  margin-bottom: 16px;
  text-align: left;
}

.login-field input {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 13px 16px;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s ease;
  -webkit-font-smoothing: antialiased;
}

.login-field input:focus {
  border-color: rgba(106, 168, 79, 0.5);
}

.login-field input::placeholder {
  color: var(--text-muted);
}

.login-btn {
  width: 100%;
  background: var(--green);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 13px;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: background 0.2s ease, box-shadow 0.2s ease;
  -webkit-font-smoothing: antialiased;
}

.login-btn:hover {
  background: var(--green-light);
  box-shadow: 0 0 20px rgba(106, 168, 79, 0.3);
}

.login-error {
  font-size: 0.8rem;
  color: #ff5555;
  margin-top: 12px;
  display: none;
}

.login-error.visible {
  display: block;
}

/* ── Breadcrumbs ─────────────────────────────────────────── */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.breadcrumbs a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.breadcrumbs a:hover { color: var(--green-light); }

.breadcrumbs .sep {
  color: var(--text-muted);
  font-size: 0.65rem;
}

.breadcrumbs .current {
  color: var(--green-light);
}

body.theme-training .breadcrumbs .current,
body.theme-training .breadcrumbs a:hover {
  color: #E8C76A;
}

/* ── Category Section (empty state) ────────────────────── */
.category-empty {
  padding: 28px 20px;
  background: var(--bg-card);
  border: 1px dashed rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.82rem;
}

/* ── Responsive — Mobile (max 640px) ───────────────────── */
@media (max-width: 640px) {
  .page-header h1 {
    font-size: 1.75rem;
  }

  .stats-row {
    grid-template-columns: 1fr;
  }

  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .table-wrap {
    font-size: 0.8rem;
  }

  thead tr th,
  tbody td {
    padding: 10px 12px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .type-grid {
    grid-template-columns: 1fr;
  }

  .flow-diagram {
    flex-direction: column;
  }

  .flow-arrow {
    transform: rotate(90deg);
    justify-content: center;
  }

  .hero-ring-wrap {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .volume-callout {
    flex-direction: column;
    gap: 8px;
  }

  .nav-bottom {
    flex-direction: column;
    gap: 12px;
  }

  .section-nav-link {
    padding: 12px 12px;
    font-size: 0.66rem;
  }
}

/* ── Subcategories ──────────────────────────────────────────── */
.sop-subcategory {
  margin-top: 1.25rem;
  padding-left: 1rem;
  border-left: 2px solid var(--border);
}

.sop-subcategory + .sop-subcategory {
  margin-top: 1.5rem;
}

.sop-subcategory-title {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}
