@import url('https://fonts.googleapis.com/css2?family=Exo+2:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,400&display=swap');

:root {
  --bg: #eeebe3;
  --surface: #ffffff;
  --surface-raised: #faf9f6;
  --border: #c8c4b8;
  --border-light: #dedad2;
  --text: #0f0f0f;
  --text-muted: #4a4a4a;
  --text-faint: #8a8680;
  --navy: #162540;
  --navy-mid: #1f3557;
  --navy-light: #e8ecf2;
  --navy-faint: #f0f3f7;
  --red-bg: #fdf0f0;
  --red-border: #c87070;
  --red-text: #5e1414;
  --green-bg: #edf5ed;
  --green-text: #1e4d1e;
  --amber-bg: #fdf5e6;
  --amber-text: #5a3800;
  --font: 'Eurostile', 'Exo 2', 'Helvetica Neue', Arial, sans-serif;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.05);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16.5px;
  line-height: 1.78;
  padding-bottom: 100px;
}

/* ── NAV ── */
nav {
  background: var(--navy);
  padding: 0 52px;
  display: flex;
  align-items: center;
  height: 56px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.25);
}
.nav-logo {
  font-size: 15px;
  font-weight: 900;
  color: #fff;
  text-decoration: none;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-right: 44px;
  white-space: nowrap;
  opacity: 0.95;
}
.nav-links {
  display: flex;
  height: 56px;
  gap: 0;
}
.nav-links a {
  display: flex;
  align-items: center;
  padding: 0 16px;
  color: rgba(255,255,255,0.48);
  text-decoration: none;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  border-bottom: 3px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.nav-links a:hover { color: rgba(255,255,255,0.8); }
.nav-links a.active { color: #fff; border-bottom-color: rgba(255,255,255,0.5); }

/* ── PAGE HEADER ── */
.page-header {
  background: var(--navy);
  padding: 60px 52px 52px;
  max-width: 100%;
  position: relative;
  overflow: hidden;
}
.page-header::after {
  content: '';
  position: absolute;
  right: -60px;
  top: -60px;
  width: 320px;
  height: 320px;
  border: 40px solid rgba(255,255,255,0.03);
  border-radius: 50%;
  pointer-events: none;
}
.page-header::before {
  content: '';
  position: absolute;
  right: 100px;
  bottom: -80px;
  width: 200px;
  height: 200px;
  border: 28px solid rgba(255,255,255,0.025);
  border-radius: 50%;
  pointer-events: none;
}
.page-header-inner {
  max-width: 980px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.page-header .label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  margin-bottom: 16px;
}
.page-header h1 {
  font-size: 40px;
  font-weight: 900;
  letter-spacing: -0.5px;
  line-height: 1.1;
  color: #ffffff;
  margin-bottom: 18px;
}
.page-header p {
  font-size: 15px;
  color: rgba(255,255,255,0.6);
  max-width: 580px;
  line-height: 1.8;
  font-weight: 400;
}

/* ── MAIN WRAPPER ── */
.main {
  max-width: 980px;
  margin: 0 auto;
  padding: 52px 52px 0;
}

/* ── BREADCRUMB ── */
.breadcrumb {
  background: var(--navy-mid);
  padding: 10px 52px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
  color: rgba(255,255,255,0.4);
}
.breadcrumb a { color: rgba(255,255,255,0.4); text-decoration: none; }
.breadcrumb a:hover { color: rgba(255,255,255,0.7); }
.breadcrumb span { margin: 0 7px; opacity: 0.4; }

/* ── SECTION ── */
.section { margin-bottom: 64px; }
.section-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 6px;
}
.section h2 {
  font-size: 26px;
  font-weight: 900;
  color: var(--navy);
  margin-bottom: 6px;
  letter-spacing: -0.3px;
}
.section-desc {
  font-size: 15px;
  color: var(--text-faint);
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-light);
  line-height: 1.7;
  max-width: 640px;
}

/* ── CALLOUTS ── */
.callout {
  padding: 18px 22px;
  margin-bottom: 24px;
  font-size: 15px;
  line-height: 1.7;
  border-radius: 2px;
}
.callout-info {
  background: var(--navy-faint);
  border-left: 3px solid var(--navy-mid);
  color: var(--text-muted);
}
.callout-info strong { color: var(--navy); }
.callout-warning {
  background: var(--red-bg);
  border-left: 3px solid var(--red-border);
  color: var(--red-text);
}
.callout-warning .callout-title {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  display: block;
  margin-bottom: 7px;
}

/* ── STEPS ── */
.steps { list-style: none; }
.step {
  display: flex;
  gap: 22px;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-top: none;
  padding: 22px 26px;
  transition: background 0.15s;
}
.step:hover { background: var(--surface-raised); }
.steps .step:first-child { border-top: 1px solid var(--border-light); }
.step-num {
  font-size: 11px;
  font-weight: 900;
  color: var(--navy);
  min-width: 24px;
  padding-top: 3px;
  letter-spacing: 0.5px;
  opacity: 0.5;
}
.step-body h4 {
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 6px;
  letter-spacing: -0.1px;
}
.step-body p { font-size: 15px; color: var(--text-muted); line-height: 1.75; }
.tags { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text-faint);
  font-size: 10px;
  font-family: monospace;
  padding: 2px 8px;
  letter-spacing: 0.3px;
  border-radius: 2px;
}

/* ── FLOW ── */
.flow {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  row-gap: 10px;
  padding: 20px 24px;
  background: var(--surface);
  border: 1px solid var(--border-light);
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}
.flow-node {
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 8px 14px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  border-radius: 2px;
  text-transform: uppercase;
}
.flow-node.primary {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}
.flow-arrow { color: var(--border); padding: 0 8px; font-size: 14px; }

/* ── GRID ── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.grid-4 { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 16px; margin-bottom: 16px; }
@media (max-width: 720px)  { .grid-2,.grid-3,.grid-4 { grid-template-columns: 1fr; } }
@media (max-width: 900px)  { .grid-3,.grid-4 { grid-template-columns: 1fr 1fr; } }

/* ── CARDS ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  padding: 22px 24px;
  box-shadow: var(--shadow-sm);
}
.card h3 {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: 10px;
  opacity: 0.8;
}
.card p { font-size: 15px; color: var(--text-muted); line-height: 1.75; }

/* ── NAV CARDS (overview page) ── */
.nav-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border-light);
  padding: 28px 28px 24px;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, border-color 0.2s, transform 0.15s;
  position: relative;
}
.nav-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border);
  transform: translateY(-1px);
}
.nav-card .nc-num {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 10px;
}
.nav-card h3 {
  font-size: 18px;
  font-weight: 900;
  color: var(--navy);
  margin-bottom: 10px;
  letter-spacing: -0.2px;
}
.nav-card p { font-size: 14.5px; color: var(--text-muted); line-height: 1.7; }
.nav-card .nc-arrow {
  display: inline-block;
  margin-top: 18px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--navy);
  opacity: 0.5;
}
.nav-card:hover .nc-arrow { opacity: 0.9; }

/* ── RULES LIST ── */
.rules-list { list-style: none; }
.rule-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 13px 22px;
  border-bottom: 1px solid var(--border-light);
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.7;
  background: var(--surface);
  border-left: 1px solid var(--border-light);
  border-right: 1px solid var(--border-light);
}
.rules-list .rule-row:first-child { border-top: 1px solid var(--border-light); }
.rules-list .rule-row:last-child  { border-bottom: 1px solid var(--border-light); }
.rule-row .dash { color: var(--navy); font-weight: 900; min-width: 10px; opacity: 0.35; }
.rule-row.danger {
  background: var(--red-bg);
  color: var(--red-text);
  border-color: #e8b0b0;
}
.rule-row.danger .dash { color: var(--red-text); opacity: 0.6; }

/* ── PILLS ── */
.pill {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 2px;
}
.pill-green  { background: var(--green-bg);  color: var(--green-text); }
.pill-amber  { background: var(--amber-bg);  color: var(--amber-text); }

/* ── TABLE ── */
.table-wrap {
  border: 1px solid var(--border-light);
  overflow-x: auto;
  box-shadow: var(--shadow-sm);
}
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th {
  background: var(--navy);
  color: rgba(255,255,255,0.6);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  padding: 11px 18px;
  text-align: left;
  border-bottom: none;
}
td {
  padding: 13px 18px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-muted);
  vertical-align: top;
  line-height: 1.65;
}
td strong { color: var(--text); font-weight: 700; }
td code {
  font-size: 11px;
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 2px 7px;
  color: var(--navy);
  font-family: monospace;
  border-radius: 2px;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--surface-raised); }

/* ── DIVIDER ── */
hr {
  border: none;
  border-top: 1px solid var(--border-light);
  margin: 56px 0;
}

/* ── PAGE NAV (bottom prev/next) ── */
.page-nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 72px;
  padding-top: 32px;
  border-top: 1px solid var(--border-light);
}
.page-nav a {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 18px 22px;
  background: var(--surface);
  border: 1px solid var(--border-light);
  text-decoration: none;
  min-width: 180px;
  max-width: 280px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, border-color 0.2s;
}
.page-nav a:hover { box-shadow: var(--shadow-md); border-color: var(--border); }
.page-nav a.next { text-align: right; margin-left: auto; }
.page-nav .pn-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-faint);
}
.page-nav .pn-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
}
