/* ==========================================================================
   IGTAP Guide — "night foundry" theme
   Deep night-blue industrial backdrop, reward-orange accents, afford-green
   highlights. Square corners, hard 2px edges, offset pixel shadows.
   ========================================================================== */

:root {
  --bg: #0b1622;
  --bg-2: #0e1c2b;
  --panel: #122334;
  --panel-2: #172c41;
  --panel-3: #1d3550;
  --ink: #04090f;
  --line: #22394f;
  --line-2: #33536e;
  --text: #dce8f2;
  --muted: #8ba6bd;
  --orange: #ff9d45;
  --orange-2: #ffb066;
  --green: #56e39f;
  --cyan: #59c8f0;
  --gold: #ffcf5c;
  --shadow: 5px 6px 0 rgba(2, 7, 12, .85);
  --shadow-sm: 3px 3px 0 rgba(2, 7, 12, .85);
  --font-display: 'Silkscreen', 'Courier New', monospace;
  --font-body: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background-color: var(--bg);
  background-image: radial-gradient(rgba(89, 130, 176, .13) 1px, transparent 1.5px);
  background-size: 26px 26px;
  font-size: 16px;
}
img { max-width: 100%; height: auto; display: block; }
p { line-height: 1.78; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
}
::selection { background: var(--orange); color: var(--ink); }

.wrap { width: min(1160px, calc(100% - 48px)); margin-inline: auto; }

.skip {
  position: absolute; top: -120px; left: 10px; padding: 10px;
  background: var(--panel-2); border: 2px solid var(--orange); z-index: 999;
  color: var(--text);
}
.skip:focus { top: 10px; }

/* ------------------------------------------------------------------ type */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  margin: 0;
  line-height: 1.22;
  letter-spacing: 0;
}
h1 { font-size: clamp(28px, 4.6vw, 54px); }
h2 { font-size: clamp(19px, 2.5vw, 30px); }
h3 { font-size: clamp(16px, 1.8vw, 20px); }
strong { font-weight: 700; }
em { font-style: normal; }

/* --------------------------------------------------------------- ribbon */
.top-ribbon {
  background: var(--ink);
  color: #c7d7e6;
  font-family: var(--font-display);
  font-size: 9.5px;
  letter-spacing: 1.2px;
}
.ribbon-in {
  display: flex; justify-content: space-between; gap: 18px;
  padding: 9px 0; flex-wrap: wrap;
}
.ping {
  display: inline-block; width: 8px; height: 8px;
  background: var(--green); margin-right: 8px;
  box-shadow: 0 0 0 2px rgba(86, 227, 159, .25);
}

/* --------------------------------------------------------------- header */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(11, 22, 34, .96);
  border-bottom: 2px solid var(--line-2);
  backdrop-filter: blur(4px);
}
.bar {
  min-height: 80px;
  display: flex; align-items: center; gap: 26px;
}
.brand { display: flex; align-items: center; gap: 12px; line-height: 1; min-width: 0; }
.brand img {
  width: 44px; height: 44px;
  border: 2px solid var(--line-2); border-radius: 0;
  box-shadow: var(--shadow-sm);
  background: var(--panel);
}
.brand-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.brand-text strong {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(14px, 1.5vw, 17px);
  color: var(--text);
  white-space: nowrap;
}
.brand-text strong em { color: var(--orange); }
.brand-text small {
  font-size: 9.5px; letter-spacing: .3px; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 330px;
}

.nav { margin-left: auto; display: flex; align-items: center; gap: 20px; }
.nav ul { display: flex; gap: 22px; list-style: none; margin: 0; padding: 0; }
.nav li { position: relative; }
.nav li > a {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 9.5px; letter-spacing: 1px; text-transform: uppercase;
  padding: 8px 0; white-space: nowrap; color: var(--text);
}
.nav li > a:hover { color: var(--orange); }
.nav li > a .caret {
  display: inline-block; margin-left: 7px;
  font-size: 9px; line-height: 1; font-style: normal;
  color: var(--orange);
  transition: transform .16s;
}
.nav .has-kids:hover > a .caret,
.nav .has-kids:focus-within > a .caret { transform: rotate(180deg); }
.nav li.active > a {
  color: var(--orange);
  box-shadow: inset 0 -3px 0 var(--orange);
}
.nav .kids {
  position: absolute; top: calc(100% + 4px); left: -12px;
  min-width: 230px; display: none;
  list-style: none; margin: 0; padding: 8px;
  background: var(--panel); border: 2px solid var(--ink); border-radius: 0;
  box-shadow: var(--shadow); z-index: 60;
}
.nav .has-kids:hover .kids,
.nav .has-kids:focus-within .kids { display: block; }
.nav .kids li a {
  display: block; padding: 9px 11px;
  font-family: var(--font-body);
  font-size: 12.5px; font-weight: 600; letter-spacing: .2px; text-transform: none;
  color: var(--text);
}
.nav .kids li a:hover { background: var(--orange); color: var(--ink); }
.cta {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--orange); border: 2px solid var(--ink); border-radius: 0;
  box-shadow: var(--shadow-sm);
  padding: 11px 16px; color: var(--ink);
  font-family: var(--font-display);
  font-size: 9.5px; letter-spacing: .6px; text-transform: uppercase;
  transition: transform .16s, box-shadow .16s;
}
.cta:hover { transform: translate(-1px, -2px); box-shadow: 5px 5px 0 rgba(2, 7, 12, .85); }

/* ----------------------------------------------------------------- hero */
.hero {
  position: relative;
  background: var(--hero) center 38% / cover no-repeat var(--bg-2);
  border-bottom: 2px solid var(--ink);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(90deg,
    rgba(4, 9, 15, .82) 0%,
    rgba(4, 9, 15, .60) 42%,
    rgba(4, 9, 15, .24) 70%,
    rgba(4, 9, 15, .06) 100%);
}
.hero-in {
  position: relative; z-index: 2;
  padding: 76px 0 66px;
  max-width: 1160px;
}
.hero-copy { max-width: 640px; color: var(--text); }
.eyebrow {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display);
  font-size: 9.5px; letter-spacing: 1.6px; text-transform: uppercase;
  color: var(--orange);
  margin: 0 0 18px;
}
.asterisk {
  display: inline-grid; place-items: center;
  width: 26px; height: 26px; flex: 0 0 26px;
  background: var(--orange); color: var(--ink);
  border: 2px solid var(--ink);
  font-size: 11px; font-style: normal;
  transform: rotate(-6deg);
  box-shadow: 2px 2px 0 rgba(2, 7, 12, .75);
}
.hero h1 { color: #f2f8fd; margin: 0 0 8px; }
.h1-sub {
  display: block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: clamp(13px, 1.7vw, 18px);
  letter-spacing: .4px;
  color: #b9cee1;
  margin-top: 14px;
}
.lead {
  font-size: clamp(15px, 1.6vw, 17.5px);
  line-height: 1.7; color: #d3e2ef; margin: 10px 0 8px; font-weight: 400;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.hero-proof {
  margin-top: 30px;
  font-family: var(--font-mono);
  font-size: 10.5px; letter-spacing: .6px;
  color: #9db4c9;
}
.hero-proof strong { color: var(--orange); letter-spacing: .8px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 15px 20px; border-radius: 0;
  border: 2px solid var(--ink);
  background: var(--orange); color: var(--ink);
  font-family: var(--font-display);
  font-size: 10px; letter-spacing: .8px; text-transform: uppercase;
  box-shadow: 4px 4px 0 rgba(2, 7, 12, .9);
  transition: transform .16s, box-shadow .16s;
  cursor: pointer;
}
.btn:hover { transform: translate(-1px, -2px); box-shadow: 6px 6px 0 rgba(2, 7, 12, .9); }
.btn.ghost { background: var(--panel-3); color: var(--text); }

.sticker {
  position: absolute; z-index: 3;
  font-family: var(--font-display);
  border: 3px solid var(--ink);
  box-shadow: 4px 5px 0 rgba(2, 7, 12, .85);
}
.sticker-a {
  top: 50px; right: 30px;
  width: 118px; height: 118px;
  background: var(--gold); color: var(--ink);
  display: grid; place-items: center; text-align: center;
  font-size: 15px; line-height: 1.5;
  transform: rotate(8deg);
}

/* ----------------------------------------------------------------- strip */
.strip {
  background: var(--orange);
  border-bottom: 2px solid var(--ink);
  color: var(--ink);
}
.strip-in {
  display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  padding: 13px 0;
  font-family: var(--font-display);
  font-size: 9.5px; letter-spacing: 1.2px; text-transform: uppercase;
}

/* ------------------------------------------------------------ home body */
.home-body { padding-bottom: 80px; }
.section-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 18px; margin: 64px 0 24px;
}
.overline {
  font-family: var(--font-display);
  font-size: 9.5px; letter-spacing: 1.6px; text-transform: uppercase;
  color: var(--green); margin: 0 0 10px;
}
.section-head h2::before {
  content: "";
  display: inline-block;
  width: 11px; height: 11px;
  background: var(--orange);
  margin-right: 12px;
  box-shadow: 2px 2px 0 rgba(2, 7, 12, .6);
}
.count-pill {
  display: inline-block;
  background: var(--panel-3); border: 2px solid var(--line-2); border-radius: 0;
  box-shadow: var(--shadow-sm); padding: 9px 14px;
  font-family: var(--font-display);
  font-size: 9px; letter-spacing: 1px; text-transform: uppercase;
  transform: rotate(2deg); white-space: nowrap; margin-bottom: 10px;
  color: var(--text);
}

/* ----------------------------------------------------------------- cards */
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}
.card {
  display: flex; flex-direction: column;
  background: var(--panel);
  border: 2px solid var(--line-2); border-radius: 0;
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform .18s, box-shadow .18s, border-color .18s;
}
.card:hover { transform: translateY(-4px); box-shadow: 7px 9px 0 rgba(2, 7, 12, .85); border-color: var(--orange); }
.thumb {
  position: relative; display: block;
  border-bottom: 2px solid var(--line-2);
  background: var(--panel-2);
}
.thumb img {
  aspect-ratio: 16 / 9; width: 100%; object-fit: cover;
  transition: transform .3s;
}
.card:hover .thumb img { transform: scale(1.04); }
.thumb-pill {
  position: absolute; top: 12px; left: 12px;
  background: var(--orange); color: var(--ink);
  border: 2px solid var(--ink); border-radius: 0;
  padding: 6px 10px;
  font-family: var(--font-display);
  font-size: 8.5px; letter-spacing: 1.1px; text-transform: uppercase;
  transform: rotate(-1.5deg);
  box-shadow: 2px 2px 0 rgba(2, 7, 12, .8);
}
.card:nth-child(3n+2) .thumb-pill { background: var(--green); }
.card:nth-child(3n+3) .thumb-pill { background: var(--cyan); }
.card:nth-child(3n+2) .thumb-pill, .card:nth-child(3n+3) .thumb-pill { color: var(--ink); }
.card-body { display: flex; flex-direction: column; flex: 1; padding: 18px 20px 16px; }
.card-body h3 { line-height: 1.3; margin-bottom: 9px; font-size: clamp(15px, 1.6vw, 18px); }
.card-body h3 a { text-decoration: none; }
.card-body p { margin: 0 0 16px; font-size: 13.5px; line-height: 1.6; color: var(--muted); flex: 1; font-family: var(--font-body); }
.card-foot {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  border-top: 1px dashed var(--line-2); padding-top: 12px;
}
.go { font-family: var(--font-display); font-size: 9px; letter-spacing: 1px; text-transform: uppercase; color: var(--orange); }
.stamp { font-family: var(--font-mono); font-size: 10px; color: var(--muted); letter-spacing: .3px; }

/* --------------------------------------------------------------- article */
.crumb {
  padding: 22px 0 0;
  font-family: var(--font-mono);
  font-size: 10.5px; letter-spacing: .8px; text-transform: uppercase;
  color: var(--muted);
  display: flex; gap: 9px; align-items: center;
}
.crumb a:hover { color: var(--orange); }
.crumb strong { color: var(--text); }

.article-frame {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  gap: 46px;
  padding: 26px 0 88px;
}
.article-frame.no-side { grid-template-columns: minmax(0, 1fr); }
.no-side article { max-width: 820px; }

.side { border-right: 2px solid var(--line); padding-right: 22px; }
.side-in { position: sticky; top: 110px; }
.side-title {
  font-family: var(--font-display);
  font-size: 9px; letter-spacing: 1.8px; text-transform: uppercase;
  color: var(--green); margin: 0 0 4px;
}
.side ol {
  list-style: none; margin: 10px 0 18px; padding: 6px 0 16px;
  border-bottom: 1px dashed var(--line-2);
}
.side li a {
  display: block; padding: 8px 0;
  font-size: 12.5px; font-weight: 600; line-height: 1.45; color: var(--muted);
}
.side li a:hover { color: var(--orange); }
.side-cta {
  display: block; background: var(--panel-3); border: 2px solid var(--line-2);
  box-shadow: var(--shadow-sm); padding: 13px 14px;
  font-family: var(--font-display);
  font-size: 9.5px; letter-spacing: .8px; text-transform: uppercase;
  color: var(--text);
}
.side-cta:hover { border-color: var(--orange); color: var(--orange); }
.side-cta span { float: right; }

article { max-width: 800px; min-width: 0; }
article h1 { margin: 6px 0 22px; }
article h2 { margin: 46px 0 14px; scroll-margin-top: 120px; font-size: clamp(17px, 2vw, 24px); }
article h2::before {
  content: "";
  display: inline-block;
  width: 10px; height: 10px;
  background: var(--orange);
  margin-right: 11px;
  box-shadow: 2px 2px 0 rgba(2, 7, 12, .6);
}
article h3 { margin: 30px 0 10px; font-family: var(--font-body); font-weight: 700; font-size: clamp(16px, 1.8vw, 19px); }
article p { font-size: 15.5px; line-height: 1.85; color: #c6d6e4; margin: 0 0 17px; }
article a {
  color: var(--orange-2); text-decoration: underline; text-underline-offset: 3px;
  text-decoration-thickness: 2px;
}
article a:hover { color: var(--gold); }
article ul, article ol { padding-left: 24px; margin: 0 0 18px; }
article li { margin: 8px 0; line-height: 1.75; color: #c6d6e4; }
article li::marker { color: var(--orange); }
article blockquote {
  margin: 22px 0; padding: 8px 18px;
  border-left: 8px solid var(--orange);
  background: var(--panel-2);
  color: #b9cbdc;
}
article img {
  border: 2px solid var(--line-2); border-radius: 0;
  box-shadow: var(--shadow-sm);
  margin: 24px auto; cursor: zoom-in;
  background: var(--panel-2);
}
article code {
  font-family: var(--font-mono);
  font-size: .9em;
  background: var(--panel-2);
  border: 1px solid var(--line);
  padding: 1px 6px;
  color: var(--gold);
}

.answer-box {
  background: var(--panel-2);
  border: 2px solid var(--line-2); border-radius: 0;
  box-shadow: 6px 6px 0 var(--orange);
  padding: 18px 21px 16px;
  margin: 4px 0 30px;
}
.answer-kicker {
  font-family: var(--font-display);
  font-size: 9px; letter-spacing: 1.8px; text-transform: uppercase;
  color: var(--green); margin: 0 0 8px;
}
.answer-box p { margin: 0; font-weight: 600; font-size: 15.5px; }

.article-end { margin-top: 46px; }
.next-btn {
  display: inline-block;
  background: var(--orange); border: 2px solid var(--ink); border-radius: 0;
  box-shadow: var(--shadow-sm); padding: 13px 18px; color: var(--ink);
  font-family: var(--font-display);
  font-size: 9.5px; letter-spacing: 1px; text-transform: uppercase;
}
.next-btn:hover { transform: translate(-1px, -2px); }

/* ---------------------------------------------------------------- tables */
.tbl-wrap { overflow-x: auto; margin: 24px 0 28px; }
.tbl-wrap table {
  width: 100%; min-width: 480px;
  border: 2px solid var(--line-2); border-radius: 0;
  border-collapse: separate; border-spacing: 0; overflow: hidden;
  background: var(--panel);
  box-shadow: var(--shadow-sm);
  font-size: 13.5px;
}
.tbl-wrap th {
  background: var(--ink); color: var(--orange);
  text-align: left; padding: 11px 13px;
  font-family: var(--font-display);
  font-size: 9px; letter-spacing: 1.2px; text-transform: uppercase;
}
.tbl-wrap td {
  padding: 11px 13px; border-top: 1px solid var(--line);
  color: #c6d6e4; vertical-align: top; line-height: 1.6;
}
.tbl-wrap td strong { color: var(--text); }
.tbl-wrap tbody tr:nth-child(even) td { background: var(--panel-2); }

/* -------------------------------------------------------------- callouts */
.callout {
  border: 2px solid var(--line-2);
  border-left: 10px solid var(--orange);
  background: var(--panel-2); border-radius: 0;
  box-shadow: 4px 4px 0 rgba(2, 7, 12, .8);
  padding: 16px 19px; margin: 24px 0;
}
.callout p { margin: 0; font-size: 14.5px; }
.callout p + p { margin-top: 10px; }

/* ---------------------------------------------------------------- footer */
.foot {
  background: var(--ink); color: var(--text);
  padding: 48px 0 22px;
  margin-top: 20px;
  border-top: 2px solid var(--line-2);
}
.footer-brand {
  font-family: var(--font-display);
  font-size: clamp(20px, 2.6vw, 28px);
  margin: 0 0 6px; color: var(--text);
}
.footer-brand em { color: var(--orange); }
.footer-sub {
  font-size: 12px; color: var(--green); margin: 0 0 16px;
  font-family: var(--font-mono);
}
.disclaimer { max-width: 760px; font-size: 12px; line-height: 1.7; color: #9db4c9; margin: 0 0 20px; }
.foot-links {
  display: flex; flex-wrap: wrap; gap: 10px 24px;
  font-family: var(--font-display);
  font-size: 9.5px; letter-spacing: .8px; text-transform: uppercase;
  border-top: 1px solid var(--line); padding-top: 18px; margin: 26px 0 14px;
}
.foot-links a:hover { color: var(--orange); }
.muted { font-family: var(--font-mono); font-size: 10.5px; color: #7b91a6; margin: 0; }

/* ---------------------------------------------------------------- zoom */
main img.open { width: min(1100px, 92vw); max-width: none !important; position: relative; z-index: 5; }

/* ----------------------------------------------------------- responsive */
@media (max-width: 1080px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .article-frame { grid-template-columns: 200px minmax(0, 1fr); gap: 30px; }
  .sticker-a { right: 10px; width: 104px; height: 104px; font-size: 13px; }
}
@media (max-width: 820px) {
  .bar { flex-wrap: wrap; padding: 10px 0; gap: 8px 18px; }
  .nav { margin-left: 0; width: 100%; flex-wrap: wrap; gap: 6px 16px; }
  .nav ul { flex-wrap: wrap; gap: 4px 16px; }
  .nav .kids { left: 0; }
  .cta { padding: 9px 13px; }
  .hero-in { padding: 52px 0 46px; }
  .hero::before {
    background: linear-gradient(180deg,
      rgba(4, 9, 15, .80) 0%,
      rgba(4, 9, 15, .62) 55%,
      rgba(4, 9, 15, .50) 100%);
  }
  .sticker-a { top: 20px; right: 14px; width: 88px; height: 88px; font-size: 12px; }
  .article-frame { grid-template-columns: minmax(0, 1fr); }
  .side { border-right: 0; border-bottom: 1px dashed var(--line-2); padding: 0 0 18px; }
  .side-in { position: static; }
  .side ol { margin-bottom: 8px; }
}
@media (max-width: 560px) {
  .wrap { width: calc(100% - 32px); }
  .grid { grid-template-columns: minmax(0, 1fr); }
  .section-head { align-items: flex-start; flex-direction: column; gap: 8px; }
  .ribbon-in { justify-content: center; text-align: center; }
  .ribbon-alt { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *:before, *:after { transition: none !important; }
}
