@import url('https://fonts.googleapis.com/css2?family=Source+Serif+4:ital,opsz,wght@0,8..60,300;0,8..60,400;0,8..60,600;0,8..60,700;0,8..60,800&family=IBM+Plex+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  --navy: #1B2A4A;
  --red: #C4552D;
  --bg: #FAFAF7;
  --white: #FFFFFF;
  --text: #1B2A4A;
  --muted: #5A6475;
  --light: #999;
  --border: #E0DDD6;
  --hover-bg: #F5F3EE;
  --green: #2D6B3F;
  --green-bg: #E8F5EC;
  --amber: #8A6914;
  --amber-bg: #FFF6DC;
  --blue: #1B5BA4;
  --blue-bg: #E4F0FF;
  --serif: 'Source Serif 4', Georgia, serif;
  --sans: 'IBM Plex Sans', sans-serif;
  --mono: 'IBM Plex Mono', monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { background: var(--bg); color: var(--text); font-family: var(--serif); line-height: 1.6; }
a { color: inherit; }

/* NAV */
.nav { display: flex; align-items: center; justify-content: space-between; padding: 18px 48px; background: var(--bg); border-bottom: 2px solid var(--navy); position: sticky; top: 0; z-index: 100; }
.logo { font-family: var(--serif); font-size: 22px; font-weight: 800; color: var(--navy); text-decoration: none; letter-spacing: -0.5px; }
.logo span { color: var(--red); }
.nav-links { display: flex; gap: 28px; font-family: var(--sans); }
.nav-links a { color: var(--navy); text-decoration: none; font-size: 14px; font-weight: 500; opacity: 0.6; transition: opacity 0.2s; }
.nav-links a:hover { opacity: 1; }

/* LAYOUT */
.wrap { max-width: 820px; margin: 0 auto; padding: 0 40px; }
.wrap-wide { max-width: 960px; margin: 0 auto; padding: 0 40px; }
.breadcrumb { padding: 16px 0; font-family: var(--sans); font-size: 13px; color: var(--light); }
.breadcrumb a { color: var(--red); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

/* HERO */
.hero { padding: 8px 0 40px; border-bottom: 1px solid var(--border); }
.hero h1 { font-family: var(--serif); font-size: 40px; font-weight: 800; line-height: 1.1; color: var(--navy); letter-spacing: -1.5px; margin-bottom: 14px; }
.hero-sub { font-family: var(--sans); font-size: 16px; color: var(--muted); line-height: 1.65; max-width: 640px; }
.hero-badge { display: inline-flex; align-items: center; gap: 6px; font-family: var(--sans); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 1.5px; padding: 5px 12px; margin-bottom: 16px; }
.badge-green { color: var(--green); background: var(--green-bg); }
.badge-amber { color: var(--amber); background: var(--amber-bg); }

/* STATS BAR */
.stats-bar { display: grid; grid-template-columns: repeat(4, 1fr); border: 2px solid var(--navy); margin: 40px 0; }
.stat-item { padding: 20px 16px; text-align: center; border-right: 1px solid var(--border); background: var(--white); }
.stat-item:last-child { border-right: none; }
.stat-label { font-family: var(--sans); font-size: 11px; text-transform: uppercase; letter-spacing: 1.2px; color: var(--light); font-weight: 600; margin-bottom: 6px; }
.stat-val { font-family: var(--serif); font-size: 22px; font-weight: 700; color: var(--navy); }

/* SECTIONS */
.section { margin-bottom: 48px; }
.section-head { border-bottom: 2px solid var(--navy); padding-bottom: 8px; margin-bottom: 20px; display: flex; align-items: baseline; justify-content: space-between; }
.section-title { font-family: var(--serif); font-size: 24px; font-weight: 700; color: var(--navy); letter-spacing: -0.5px; }
.section-num { font-family: var(--mono); font-size: 13px; color: #CCC; font-weight: 500; }

/* TABLE */
.data-table { width: 100%; border-collapse: collapse; border: 2px solid var(--navy); font-family: var(--sans); }
.data-table th { text-align: left; padding: 12px 16px; background: var(--navy); color: var(--bg); font-size: 11px; text-transform: uppercase; letter-spacing: 1px; font-weight: 600; }
.data-table td { padding: 14px 16px; border-bottom: 1px solid var(--border); font-size: 14px; color: var(--navy); background: var(--white); }
.data-table tr:last-child td { border-bottom: none; }
.data-table .label { color: var(--muted); font-weight: 500; width: 200px; }
.data-table .val { font-weight: 600; }
.data-table tbody tr.clickable { cursor: pointer; transition: background 0.15s; }
.data-table tbody tr.clickable:hover td { background: var(--hover-bg); }

/* CALLOUT */
.callout { border: 2px solid var(--navy); padding: 20px 24px; background: #FFFDF5; margin: 20px 0; font-family: var(--sans); font-size: 14px; color: var(--muted); line-height: 1.6; }
.callout strong { color: var(--navy); }

/* STEPS */
.steps { border: 2px solid var(--navy); background: var(--white); }
.step { display: flex; gap: 20px; padding: 20px 24px; border-bottom: 1px solid var(--border); align-items: flex-start; }
.step:last-child { border-bottom: none; }
.step-num { font-family: var(--serif); font-size: 28px; font-weight: 300; color: #DDD; line-height: 1; min-width: 32px; }
.step-title { font-family: var(--serif); font-size: 16px; font-weight: 700; color: var(--navy); margin-bottom: 4px; }
.step-desc { font-family: var(--sans); font-size: 14px; color: var(--muted); line-height: 1.55; }

/* SALARY */
.salary-grid { display: grid; grid-template-columns: repeat(3, 1fr); border: 2px solid var(--navy); }
.salary-item { padding: 20px 16px; text-align: center; border-right: 1px solid var(--border); background: var(--white); }
.salary-item:last-child { border-right: none; }
.salary-item.highlight { background: var(--navy); }
.salary-label { font-family: var(--sans); font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--light); font-weight: 600; margin-bottom: 4px; }
.salary-item.highlight .salary-label { color: rgba(255,255,255,0.5); }
.salary-val { font-family: var(--serif); font-size: 26px; font-weight: 700; color: var(--navy); }
.salary-item.highlight .salary-val { color: var(--white); }

/* BADGES */
.badge { font-family: var(--sans); font-size: 12px; font-weight: 600; padding: 3px 10px; display: inline-block; }
.badge-required { color: var(--green); background: var(--green-bg); }
.badge-not-required { color: var(--amber); background: var(--amber-bg); }
.badge-reciprocity { color: var(--blue); background: var(--blue-bg); }

/* RECIP TAGS */
.recip-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.recip-tag { font-family: var(--sans); font-size: 13px; padding: 6px 14px; border: 1px solid var(--border); background: var(--white); color: var(--navy); font-weight: 500; text-decoration: none; transition: all 0.2s; }
.recip-tag:hover { border-color: var(--red); color: var(--red); }

/* LINKS LIST */
.link-list { border: 2px solid var(--navy); background: var(--white); }
.link-item { display: flex; justify-content: space-between; align-items: center; padding: 14px 20px; border-bottom: 1px solid var(--border); font-family: var(--sans); text-decoration: none; transition: background 0.2s; }
.link-item:last-child { border-bottom: none; }
.link-item:hover { background: var(--hover-bg); }
.link-label { font-size: 14px; color: var(--navy); font-weight: 600; }
.link-arrow { font-size: 14px; color: var(--red); }

/* CTA */
.cta-box { border: 2px solid var(--red); padding: 32px; text-align: center; margin: 48px 0; background: #FFFBF8; }
.cta-box h3 { font-family: var(--serif); font-size: 22px; font-weight: 700; color: var(--navy); margin-bottom: 8px; }
.cta-box p { font-family: var(--sans); color: var(--muted); font-size: 14px; margin-bottom: 20px; }
.cta-btn { display: inline-flex; padding: 12px 28px; background: var(--red); color: var(--white); border: none; font-family: var(--sans); font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none; transition: background 0.2s; }
.cta-btn:hover { background: #A8442A; }

/* RELATED */
.related-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.related-link { font-family: var(--sans); font-size: 14px; color: var(--navy); text-decoration: none; padding: 14px 18px; border: 1px solid var(--border); background: var(--white); font-weight: 500; transition: all 0.2s; display: block; }
.related-link:hover { border-color: var(--red); color: var(--red); }

/* PROSE */
.prose { font-family: var(--serif); font-size: 16px; color: #3A3A3A; line-height: 1.7; margin-bottom: 20px; }
.prose strong { color: var(--navy); }

/* TOC */
.toc { border: 2px solid var(--navy); padding: 24px 28px; margin-bottom: 48px; background: var(--white); }
.toc-title { font-family: var(--sans); font-size: 12px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--light); font-weight: 600; margin-bottom: 12px; }
.toc-list { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 24px; }
.toc-list a { font-family: var(--sans); font-size: 14px; color: var(--navy); text-decoration: none; font-weight: 500; padding: 4px 0; display: block; transition: color 0.2s; }
.toc-list a:hover { color: var(--red); }

/* DISCLAIMER / FOOTER */
.disclaimer { font-family: var(--sans); font-size: 12px; color: #AAA; line-height: 1.6; padding: 24px 0 48px; border-top: 1px solid var(--border); margin-top: 48px; }
.disclaimer a { color: var(--red); }
.footer { border-top: 2px solid var(--navy); padding: 28px 0; display: flex; justify-content: space-between; align-items: center; font-family: var(--sans); }
.footer-left { font-size: 13px; color: var(--light); }
.footer-links { display: flex; gap: 24px; }
.footer-links a { font-size: 13px; color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--navy); }

/* SEARCH (homepage) */
.search-box { display: flex; max-width: 640px; margin: 0 auto; border: 2px solid var(--navy); overflow: hidden; background: var(--white); }
.search-select { flex: 1; padding: 16px 18px; border: none; background: transparent; font-family: var(--sans); font-size: 14px; color: var(--navy); appearance: none; cursor: pointer; outline: none; }
.search-divider { width: 2px; background: var(--navy); }
.search-btn { padding: 16px 28px; background: var(--navy); color: var(--bg); border: none; font-family: var(--sans); font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap; }

/* CHIPS */
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-items: center; margin-top: 18px; }
.chip-label { font-family: var(--sans); font-size: 12px; color: var(--light); text-transform: uppercase; letter-spacing: 1px; font-weight: 600; }
.chip { font-family: var(--sans); font-size: 13px; color: var(--muted); border: 1px solid #DDD; background: var(--white); padding: 5px 12px; text-decoration: none; transition: all 0.2s; }
.chip:hover { border-color: var(--red); color: var(--red); }

/* HOW IT WORKS */
.how-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-top: 36px; border: 2px solid var(--navy); }
.how-card { padding: 36px 28px; background: var(--white); border-right: 1px solid var(--border); }
.how-card:last-child { border-right: none; }
.how-num { font-family: var(--serif); font-size: 56px; font-weight: 300; color: var(--border); line-height: 1; margin-bottom: 16px; }
.how-title { font-family: var(--serif); font-size: 18px; font-weight: 700; color: var(--navy); margin-bottom: 8px; }
.how-desc { font-family: var(--sans); font-size: 14px; color: var(--muted); line-height: 1.6; }

/* TRADE CARDS */
.trades-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border: 2px solid var(--navy); }
.trade-card { padding: 28px 22px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--white); text-decoration: none; transition: background 0.2s; display: block; }
.trade-card:nth-child(4n) { border-right: none; }
.trade-card:hover { background: var(--hover-bg); }
.trade-icon { font-size: 24px; margin-bottom: 12px; display: block; }
.trade-name { font-family: var(--serif); font-size: 16px; font-weight: 600; color: var(--navy); margin-bottom: 4px; }
.trade-meta { font-family: var(--sans); font-size: 12px; color: var(--light); }

/* MONO */
.mono { font-family: var(--mono); font-size: 13px; }

/* RESPONSIVE */
@media (max-width: 768px) {
  .nav { padding: 16px 20px; }
  .nav-links { display: none; }
  .wrap, .wrap-wide { padding: 0 20px; }
  .hero h1 { font-size: 30px; }
  .stats-bar { grid-template-columns: repeat(2, 1fr); }
  .stat-item:nth-child(2n) { border-right: none; }
  .stat-item:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
  .salary-grid { grid-template-columns: 1fr; }
  .salary-item { border-right: none; border-bottom: 1px solid var(--border); }
  .salary-item:last-child { border-bottom: none; }
  .toc-list { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr; }
  .how-grid { grid-template-columns: 1fr; }
  .how-card { border-right: none; border-bottom: 1px solid var(--border); }
  .how-card:last-child { border-bottom: none; }
  .trades-grid { grid-template-columns: repeat(2, 1fr); }
  .trade-card:nth-child(2n) { border-right: none; }
  .search-box { flex-direction: column; }
  .search-divider { width: 100%; height: 2px; }
  .data-table .label { width: 140px; }
  .footer { flex-direction: column; gap: 12px; text-align: center; }
}
