/* ============================================================
   Bert – Session Hijacking Template Styles
   Pixel-perfect port of session-hijacking.html
   All rules scoped under .bert-page-session-hijacking

   FIXES APPLIED:
   1. All headings use clamp() for mobile responsiveness
   2. Nav buttons: &#9664;/&#9654; + font-variant-emoji:text
   3. ALL 9 defense cards present
   4. WALKTHROUGH MOBILE FIX (primary fix this module):
      - .sh-pgrid stacks to 1-col below 768px
      - .sh-pl border collapses correctly
      - terminal body: white-space:pre-wrap + word-break:break-word
      - HTTP block: overflow-x:auto on small screens
      - Tab labels: smaller on narrow screens, tabs scroll horizontally
      - Panel min-height removed on mobile
      - Controls: flex-wrap + centered on mobile
      - All code/terminal content: max-width:100% + overflow-x:auto
   ============================================================ */

.bert-page-session-hijacking,
.bert-page-session-hijacking *,
.bert-page-session-hijacking *::before,
.bert-page-session-hijacking *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── CSS Custom Properties ── */
.bert-page-session-hijacking {
  --sh-bg: #020c1a;
  --sh-surface: #041020;
  --sh-card: #051428;
  --sh-card2: #071a34;
  --sh-border: #0a2040;
  --sh-border2: #0e2e5a;
  --sh-blue: #0af;
  --sh-blue2: #0088ff;
  --sh-blue3: #66ccff;
  --sh-neon: #00f0ff;
  --sh-pulse: #00d4ff;
  --sh-orange: #ff7f00;
  --sh-red: #ff3366;
  --sh-green: #00e676;
  --sh-yellow: #ffe066;
  --sh-violet: #b388ff;
  --sh-text: #e0f0ff;
  --sh-text-mid: #6a9ec8;
  --sh-text-dim: #1a3a5c;
  --sh-mono: 'JetBrains Mono', monospace;
  --sh-display: 'Chakra Petch', sans-serif;
  --sh-body: 'Nunito Sans', sans-serif;

  background: var(--sh-bg);
  color: var(--sh-text);
  font-family: var(--sh-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

/* ── Ocean radial glow ── */
.sh-wrap {
  position: relative;
}

.sh-wrap::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(ellipse at 20% 20%, rgba(0, 170, 255, .06) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(0, 240, 255, .04) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* ── Scanline sweep ── */
.sh-wrap::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--sh-neon), transparent);
  opacity: .4;
  animation: sh-scan 6s linear infinite;
  pointer-events: none;
  z-index: 999;
}

@keyframes sh-scan {
  from {
    top: 0;
  }

  to {
    top: 100vh;
  }
}

/* ── Progress bar ── */
#sh-prog {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, var(--sh-blue2), var(--sh-neon), var(--sh-blue3));
  box-shadow: 0 0 16px var(--sh-neon), 0 0 32px rgba(0, 240, 255, .3);
  transition: width .4s cubic-bezier(.4, 0, .2, 1);
  z-index: 1000;
}

/* ── Container ── */
.sh-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 28px;
  position: relative;
  z-index: 1;
}

/* ══════════════════════════════════════
   PACKET TICKER
══════════════════════════════════════ */
.sh-packet-ticker {
  background: var(--sh-surface);
  border-bottom: 1px solid var(--sh-border);
  padding: 8px 0;
  overflow: hidden;
  font-family: var(--sh-mono);
  font-size: 10px;
  color: var(--sh-text-dim);
  position: relative;
}

.sh-packet-ticker::before,
.sh-packet-ticker::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 60px;
  z-index: 2;
}

.sh-packet-ticker::before {
  left: 0;
  background: linear-gradient(90deg, var(--sh-surface), transparent);
}

.sh-packet-ticker::after {
  right: 0;
  background: linear-gradient(-90deg, var(--sh-surface), transparent);
}

.sh-ticker-inner {
  display: flex;
  gap: 36px;
  white-space: nowrap;
  animation: sh-ticker 28s linear infinite;
}

@keyframes sh-ticker {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

.sh-tick-item {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.sh-ti-label {
  color: var(--sh-text-dim);
}

.sh-ti-get .sh-ti-val {
  color: var(--sh-green);
}

.sh-ti-post .sh-ti-val {
  color: var(--sh-blue3);
}

.sh-ti-steal .sh-ti-val {
  color: var(--sh-red);
}

.sh-ti-set .sh-ti-val {
  color: var(--sh-yellow);
}

/* ══════════════════════════════════════
   HEADER
══════════════════════════════════════ */
.sh-header {
  padding: 56px 0 44px;
  border-bottom: 1px solid var(--sh-border);
  position: relative;
  overflow: hidden;
}

/* Radar decor */
.sh-radar-decor {
  position: absolute;
  top: -40px;
  right: -40px;
  width: 280px;
  height: 280px;
  opacity: .08;
  border: 1px solid var(--sh-neon);
  border-radius: 50%;
  animation: sh-radar 8s linear infinite;
  pointer-events: none;
}

.sh-radar-decor::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 50%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--sh-neon));
  transform-origin: 0 50%;
  animation: sh-radar 8s linear infinite;
}

.sh-radar-decor::after {
  content: '';
  position: absolute;
  inset: 20px;
  border: 1px solid rgba(0, 240, 255, .4);
  border-radius: 50%;
}

@keyframes sh-radar {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.sh-eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--sh-mono);
  font-size: clamp(8px, 1.2vw, 10px);
  letter-spacing: .4em;
  color: var(--sh-blue);
  text-transform: uppercase;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.sh-ey-bracket {
  color: var(--sh-text-dim);
}

/* FIX 1: h1 clamp */
.sh-h1 {
  font-family: var(--sh-display);
  font-size: clamp(38px, 7.5vw, 90px);
  font-weight: 700;
  line-height: .92;
  letter-spacing: .03em;
  color: #fff;
}

.sh-h1-accent {
  display: block;
  color: var(--sh-neon);
  text-shadow: 0 0 40px rgba(0, 240, 255, .4), 0 0 80px rgba(0, 240, 255, .15);
}

.sh-h1-accent::after {
  content: '';
  display: block;
  height: 2px;
  margin-top: 8px;
  background: linear-gradient(90deg, var(--sh-neon), var(--sh-blue2), transparent);
  animation: sh-beam 3s ease-in-out infinite;
}

@keyframes sh-beam {

  0%,
  100% {
    opacity: .6;
    box-shadow: none;
  }

  50% {
    opacity: 1;
    box-shadow: 0 0 16px var(--sh-neon);
  }
}

.sh-h1-sub {
  display: block;
  font-size: clamp(12px, 2vw, 28px);
  font-weight: 400;
  letter-spacing: .08em;
  color: var(--sh-text-mid);
  margin-top: 12px;
  font-family: var(--sh-body);
}

.sh-h-desc {
  font-size: clamp(14px, 2vw, 17px);
  color: var(--sh-text-mid);
  max-width: 660px;
  margin-top: 22px;
  font-weight: 400;
  line-height: 1.8;
}

.sh-sesh-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
  padding: 6px 16px;
  background: rgba(0, 240, 255, .06);
  border: 1px solid rgba(0, 240, 255, .2);
  font-family: var(--sh-mono);
  font-size: clamp(8px, 1.2vw, 10px);
  color: var(--sh-neon);
  letter-spacing: .2em;
}

.sh-live {
  animation: sh-live 1s step-end infinite;
  flex-shrink: 0;
}

@keyframes sh-live {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

/* ── Stats ── */
.sh-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--sh-border);
  border: 1px solid var(--sh-border);
  margin-top: 40px;
}

.sh-s-cell {
  background: var(--sh-card);
  padding: 22px 18px;
  position: relative;
  overflow: hidden;
  transition: background .2s;
}

.sh-s-cell:hover {
  background: var(--sh-card2);
}

.sh-s-cell::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
}

.sh-s-cell:nth-child(1)::after {
  background: var(--sh-neon);
}

.sh-s-cell:nth-child(2)::after {
  background: var(--sh-orange);
}

.sh-s-cell:nth-child(3)::after {
  background: var(--sh-red);
}

.sh-s-cell:nth-child(4)::after {
  background: var(--sh-violet);
}

.sh-sl {
  font-family: var(--sh-mono);
  font-size: 9px;
  letter-spacing: .3em;
  color: var(--sh-text-dim);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.sh-sv {
  font-family: var(--sh-display);
  font-size: clamp(20px, 3vw, 30px);
  font-weight: 700;
  margin-bottom: 4px;
}

.sh-s-cell:nth-child(1) .sh-sv {
  color: var(--sh-neon);
}

.sh-s-cell:nth-child(2) .sh-sv {
  color: var(--sh-orange);
}

.sh-s-cell:nth-child(3) .sh-sv {
  color: var(--sh-red);
}

.sh-s-cell:nth-child(4) .sh-sv {
  color: var(--sh-violet);
}

.sh-sd {
  font-size: 12px;
  color: var(--sh-text-mid);
  font-weight: 400;
  line-height: 1.5;
}

/* ══════════════════════════════════════
   SECTION HEADERS
══════════════════════════════════════ */
.sh-sec {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-top: 52px;
  margin-bottom: 26px;
  flex-wrap: nowrap;
}

.sh-sn {
  font-family: var(--sh-mono);
  font-size: 10px;
  color: var(--sh-neon);
  opacity: .5;
  flex-shrink: 0;
}

.sh-st {
  font-family: var(--sh-display);
  font-size: clamp(12px, 2vw, 18px);
  font-weight: 700;
  letter-spacing: .12em;
  color: #fff;
  text-transform: uppercase;
  white-space: nowrap;
}

.sh-sr {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--sh-border) 0%, transparent 100%);
  min-width: 20px;
}

/* ══════════════════════════════════════
   COOKIE ANATOMY
══════════════════════════════════════ */
.sh-cookie-anatomy {
  background: var(--sh-card);
  border: 1px solid var(--sh-border);
  padding: 32px;
  margin-bottom: 52px;
  position: relative;
  overflow: hidden;
}

.sh-cookie-anatomy::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--sh-border), var(--sh-neon), var(--sh-border));
}

.sh-ca-label {
  font-family: var(--sh-mono);
  font-size: 9px;
  letter-spacing: .3em;
  color: var(--sh-text-dim);
  text-transform: uppercase;
  margin-bottom: 20px;
}

.sh-cookie-bar {
  background: var(--sh-surface);
  border: 1px solid var(--sh-border);
  padding: 14px 18px;
  margin-bottom: 20px;
  font-family: var(--sh-mono);
  font-size: clamp(10px, 1.4vw, 13px);
  color: var(--sh-text);
  word-break: break-all;
  line-height: 2;
  position: relative;
  overflow-x: auto;
}

.sh-cookie-bar::before {
  content: 'Set-Cookie:';
  font-size: 10px;
  letter-spacing: .1em;
  color: var(--sh-text-dim);
  display: block;
  margin-bottom: 6px;
}

.sh-ck-name {
  color: var(--sh-neon);
}

.sh-ck-val {
  color: var(--sh-blue3);
  word-break: break-all;
}

.sh-ck-secure {
  color: var(--sh-green);
}

.sh-ck-flag {
  color: var(--sh-yellow);
}

.sh-ck-expire {
  color: var(--sh-text-mid);
}

.sh-ck-path {
  color: var(--sh-violet);
}

.sh-ca-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 16px;
}

.sh-ca-item {
  padding: 12px 14px;
  background: var(--sh-surface);
  border: 1px solid var(--sh-border);
  border-top: 2px solid;
}

.sh-ca-item:nth-child(1) {
  border-top-color: var(--sh-neon);
}

.sh-ca-item:nth-child(2) {
  border-top-color: var(--sh-yellow);
}

.sh-ca-item:nth-child(3) {
  border-top-color: var(--sh-red);
}

.sh-ca-item:nth-child(4) {
  border-top-color: var(--sh-green);
}

.sh-ca-item:nth-child(5) {
  border-top-color: var(--sh-violet);
}

.sh-ca-item:nth-child(6) {
  border-top-color: var(--sh-orange);
}

.sh-ca-i-label {
  font-family: var(--sh-mono);
  font-size: 10px;
  letter-spacing: .1em;
  margin-bottom: 6px;
}

.sh-ca-item:nth-child(1) .sh-ca-i-label {
  color: var(--sh-neon);
}

.sh-ca-item:nth-child(2) .sh-ca-i-label {
  color: var(--sh-yellow);
}

.sh-ca-item:nth-child(3) .sh-ca-i-label {
  color: var(--sh-red);
}

.sh-ca-item:nth-child(4) .sh-ca-i-label {
  color: var(--sh-green);
}

.sh-ca-item:nth-child(5) .sh-ca-i-label {
  color: var(--sh-violet);
}

.sh-ca-item:nth-child(6) .sh-ca-i-label {
  color: var(--sh-orange);
}

.sh-ca-i-desc {
  font-size: 12px;
  color: var(--sh-text-mid);
  line-height: 1.6;
  font-weight: 400;
}

/* ══════════════════════════════════════
   ATTACK VECTOR GRID (left 2px border)
══════════════════════════════════════ */
.sh-vector-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  background: var(--sh-border);
  border: 1px solid var(--sh-border);
  margin-bottom: 52px;
}

.sh-vc {
  background: var(--sh-card);
  padding: 24px 20px;
  position: relative;
  overflow: hidden;
  transition: background .2s;
}

.sh-vc:hover {
  background: var(--sh-card2);
}

.sh-vc::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 2px;
}

.sh-vc:nth-child(1)::after {
  background: var(--sh-red);
}

.sh-vc:nth-child(2)::after {
  background: var(--sh-orange);
}

.sh-vc:nth-child(3)::after {
  background: var(--sh-yellow);
}

.sh-vc:nth-child(4)::after {
  background: var(--sh-neon);
}

.sh-vc:nth-child(5)::after {
  background: var(--sh-violet);
}

.sh-vc:nth-child(6)::after {
  background: var(--sh-blue3);
}

.sh-vc-ico {
  font-size: 28px;
  margin-bottom: 12px;
  display: block;
}

.sh-vc-name {
  font-family: var(--sh-display);
  font-size: clamp(12px, 1.8vw, 14px);
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 6px;
}

.sh-vc-mitre {
  font-family: var(--sh-mono);
  font-size: 9px;
  letter-spacing: .12em;
  color: var(--sh-text-dim);
  margin-bottom: 10px;
}

.sh-vc-desc {
  font-size: 13px;
  color: var(--sh-text-mid);
  line-height: 1.65;
  font-weight: 400;
}

/* ══════════════════════════════════════
   ATTACK FLOW DIAGRAM
══════════════════════════════════════ */
.sh-diag {
  background: var(--sh-card);
  border: 1px solid var(--sh-border);
  padding: 36px 20px 28px;
  position: relative;
  overflow: hidden;
  margin-bottom: 0;
}

.sh-diag::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(0, 240, 255, .05) 0%, transparent 55%);
}

/* ══════════════════════════════════════
   WALKTHROUGH TABS
   KEY FIX: overflow-x:auto + scrollbar
══════════════════════════════════════ */
.sh-tabs {
  display: flex;
  background: var(--sh-border);
  border: 1px solid var(--sh-border);
  gap: 1px;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--sh-neon) var(--sh-surface);
  -webkit-overflow-scrolling: touch;
}

.sh-tab {
  flex: 1;
  min-width: 80px;
  background: var(--sh-surface);
  border: none;
  cursor: pointer;
  padding: 14px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  position: relative;
  transition: background .2s;
  color: inherit;
  flex-shrink: 0;
  /* KEY: prevent tabs from shrinking and colliding */
}

.sh-tab::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  transform: scaleX(0);
  transition: transform .25s;
}

.sh-tab.active {
  background: var(--sh-card2);
}

.sh-tab.active::after {
  transform: scaleX(1);
  background: var(--sh-neon);
  box-shadow: 0 0 10px var(--sh-neon);
}

.sh-tab.done::after {
  transform: scaleX(1);
  background: var(--sh-green);
}

.sh-ti {
  font-size: 17px;
  filter: grayscale(1);
  opacity: .35;
  transition: all .2s;
}

.sh-tab.active .sh-ti,
.sh-tab.done .sh-ti {
  filter: none;
  opacity: 1;
}

.sh-tn {
  font-family: var(--sh-mono);
  font-size: 9px;
  color: var(--sh-text-dim);
  letter-spacing: .12em;
}

.sh-tl {
  font-family: var(--sh-body);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--sh-text-dim);
  text-align: center;
}

.sh-tab.active .sh-tn,
.sh-tab.active .sh-tl {
  color: var(--sh-neon);
}

.sh-tab.done .sh-tn,
.sh-tab.done .sh-tl {
  color: var(--sh-green);
}

/* ── Panels ── */
.sh-panel {
  display: none;
  border: 1px solid var(--sh-border);
  border-top: none;
  background: var(--sh-card);
  animation: sh-panelIn .3s ease;
}

.sh-panel.active {
  display: block;
}

@keyframes sh-panelIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* KEY FIX: pgrid responsive - min-height only on desktop */
.sh-pgrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 420px;
}

.sh-pl {
  padding: 36px 32px;
  border-right: 1px solid var(--sh-border);
  /* KEY FIX: prevent content from overflowing panel on mobile */
  min-width: 0;
  overflow: hidden;
}

.sh-pr {
  padding: 36px 32px;
  background: var(--sh-surface);
  display: flex;
  flex-direction: column;
  justify-content: center;
  /* KEY FIX */
  min-width: 0;
  overflow: hidden;
}

.sh-p-phase {
  font-family: var(--sh-mono);
  font-size: 9px;
  letter-spacing: .35em;
  color: var(--sh-neon);
  text-transform: uppercase;
  margin-bottom: 10px;
}

.sh-p-title {
  font-family: var(--sh-display);
  font-size: clamp(18px, 3.5vw, 30px);
  font-weight: 700;
  letter-spacing: .04em;
  line-height: 1.0;
  color: #fff;
  margin-bottom: 16px;
  /* KEY FIX: prevent overflow on mobile */
  word-break: break-word;
}

.sh-ctx-box {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 16px;
  margin-bottom: 20px;
  background: rgba(0, 240, 255, .04);
  border-left: 3px solid var(--sh-neon);
  flex-wrap: nowrap;
}

.sh-cx-ico {
  font-size: 22px;
  flex-shrink: 0;
}

.sh-cx-lbl {
  font-family: var(--sh-mono);
  font-size: 9px;
  letter-spacing: .2em;
  color: var(--sh-text-dim);
  margin-bottom: 3px;
}

.sh-cx-val {
  font-family: var(--sh-display);
  font-size: clamp(10px, 1.5vw, 13px);
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--sh-text);
  word-break: break-word;
}

.sh-p-body {
  font-size: clamp(13px, 1.8vw, 15px);
  color: var(--sh-text-mid);
  line-height: 1.8;
  font-weight: 400;
  margin-bottom: 20px;
}

.sh-p-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.sh-p-list li {
  display: flex;
  gap: 10px;
  font-size: 14px;
  color: var(--sh-text-mid);
  line-height: 1.5;
}

.sh-p-list li::before {
  content: '▶';
  color: var(--sh-neon);
  flex-shrink: 0;
  margin-top: 2px;
  font-size: 9px;
  font-variant-emoji: text;
  -webkit-font-variant-emoji: text;
}

/* ── Terminal - KEY FIX: proper mobile overflow ── */
.sh-term {
  background: #010d1a;
  border: 1px solid var(--sh-border);
  border-radius: 3px;
  overflow: hidden;
  font-family: var(--sh-mono);
  font-size: clamp(10px, 1.4vw, 12.5px);
  /* KEY FIX */
  width: 100%;
  max-width: 100%;
}

.sh-tbar {
  background: #02111f;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid var(--sh-border);
}

.sh-td {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.sh-td-r {
  background: #ff5f57;
}

.sh-td-y {
  background: #ffbd2e;
}

.sh-td-g {
  background: #28ca41;
}

.sh-ttl {
  margin-left: 8px;
  font-size: 10px;
  color: var(--sh-text-dim);
  letter-spacing: .1em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* KEY FIX: terminal body wrapping on mobile */
.sh-tbody {
  padding: 16px 18px;
  line-height: 2.1;
  overflow-x: auto;
  /* KEY FIX: wrap long lines instead of horizontal scroll on mobile */
  white-space: pre-wrap;
  word-break: break-word;
  max-width: 100%;
}

/* Terminal syntax */
.sh-pr {
  color: var(--sh-neon);
}

.sh-cm {
  color: var(--sh-text);
}

.sh-out {
  color: var(--sh-text-mid);
}

.sh-hl {
  color: var(--sh-neon);
}

.sh-hl2 {
  color: var(--sh-blue3);
}

.sh-ok {
  color: var(--sh-green);
}

.sh-er {
  color: var(--sh-red);
}

.sh-or {
  color: var(--sh-orange);
}

.sh-bl {
  color: var(--sh-blue);
}

.sh-sp {
  color: var(--sh-text-dim);
}

.sh-yl {
  color: var(--sh-yellow);
}

.sh-vi {
  color: var(--sh-violet);
}

/* ── HTTP block - KEY FIX: mobile overflow ── */
.sh-http-block {
  background: #010d1a;
  border: 1px solid var(--sh-border);
  border-radius: 3px;
  font-family: var(--sh-mono);
  font-size: clamp(10px, 1.4vw, 12px);
  overflow: hidden;
  /* KEY FIX */
  width: 100%;
  max-width: 100%;
}

.sh-http-bar {
  background: #02111f;
  padding: 7px 14px;
  border-bottom: 1px solid var(--sh-border);
  font-size: 9px;
  letter-spacing: .15em;
  color: var(--sh-text-dim);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.sh-http-method {
  color: var(--sh-green);
  font-weight: 700;
}

/* KEY FIX: http-body wrapping */
.sh-http-body {
  padding: 14px 18px;
  line-height: 2;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.sh-h-key {
  color: var(--sh-text-dim);
}

.sh-h-val {
  color: var(--sh-blue3);
}

.sh-h-crit {
  color: var(--sh-red);
}

.sh-h-ok {
  color: var(--sh-green);
}

.sh-h-warn {
  color: var(--sh-yellow);
}

.sh-h-url {
  color: var(--sh-neon);
}

/* ── Controls - FIX: entities + font-variant-emoji + wrap ── */
.sh-ctrl {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 28px;
  background: var(--sh-surface);
  border: 1px solid var(--sh-border);
  border-top: none;
  flex-wrap: wrap;
  gap: 12px;
}

.sh-cbtn {
  font-family: var(--sh-mono);
  font-size: 11px;
  letter-spacing: .12em;
  padding: 10px 22px;
  border: 1px solid;
  background: transparent;
  cursor: pointer;
  transition: all .2s;
  text-transform: uppercase;
  /* FIX: no colored emoji arrows */
  font-variant-emoji: text;
  -webkit-font-variant-emoji: text;
}

.sh-cbtn-p {
  border-color: var(--sh-border);
  color: var(--sh-text-dim);
}

.sh-cbtn-p:hover:not(:disabled) {
  border-color: var(--sh-text-mid);
  color: var(--sh-text);
}

.sh-cbtn-p:disabled {
  opacity: .25;
  cursor: default;
}

.sh-cbtn-n {
  border-color: var(--sh-neon);
  color: var(--sh-neon);
}

.sh-cbtn-n:hover:not(:disabled) {
  background: var(--sh-neon);
  color: var(--sh-bg);
  box-shadow: 0 0 20px rgba(0, 240, 255, .4);
}

.sh-cbtn-n:disabled {
  opacity: .25;
  cursor: default;
}

.sh-c-ind {
  font-family: var(--sh-mono);
  font-size: 11px;
  color: var(--sh-text-dim);
  letter-spacing: .1em;
}

.sh-c-ind em {
  color: var(--sh-neon);
  font-style: normal;
}

/* ══════════════════════════════════════
   DETECTION GRID
══════════════════════════════════════ */
.sh-detect-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  background: var(--sh-border);
  border: 1px solid var(--sh-border);
  margin-bottom: 52px;
}

.sh-detect-l {
  background: var(--sh-card);
  padding: 32px 28px;
  min-width: 0;
}

.sh-detect-r {
  background: var(--sh-surface);
  padding: 32px 28px;
  min-width: 0;
}

.sh-detect-title {
  font-family: var(--sh-display);
  font-size: clamp(14px, 2.2vw, 18px);
  font-weight: 700;
  letter-spacing: .07em;
  color: #fff;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.sh-detect-sub {
  font-size: 13px;
  color: var(--sh-text-mid);
  margin-bottom: 20px;
}

.sh-log-stream {
  background: #010d1a;
  border: 1px solid var(--sh-border);
  font-family: var(--sh-mono);
  font-size: 11px;
  line-height: 2;
  max-height: 280px;
  overflow-y: auto;
  padding: 12px 16px;
  scrollbar-width: thin;
  scrollbar-color: var(--sh-border2) var(--sh-bg);
}

.sh-log-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.sh-log-ts {
  color: var(--sh-text-dim);
  flex-shrink: 0;
  font-size: 10px;
}

.sh-log-ok {
  color: var(--sh-green);
  word-break: break-word;
}

.sh-log-warn {
  color: var(--sh-yellow);
  word-break: break-word;
}

.sh-log-crit {
  color: var(--sh-red);
  word-break: break-word;
}

.sh-log-info {
  color: var(--sh-blue3);
  word-break: break-word;
}

/* Signal table */
.sh-sig-table-wrap {
  overflow-x: auto;
  max-width: 100%;
}

.sh-sig-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 400px;
}

.sh-sig-table th {
  font-family: var(--sh-mono);
  font-size: 9px;
  letter-spacing: .2em;
  color: var(--sh-text-dim);
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--sh-border);
  text-transform: uppercase;
}

.sh-sig-table td {
  font-size: 13px;
  color: var(--sh-text-mid);
  padding: 10px 12px;
  border-bottom: 1px solid var(--sh-border);
  vertical-align: top;
  line-height: 1.5;
}

.sh-sig-table tr:last-child td {
  border-bottom: none;
}

.sh-sig-table tr:hover td {
  background: rgba(0, 240, 255, .02);
}

.sh-sig-src {
  font-family: var(--sh-mono);
  font-size: 11px;
  color: var(--sh-text-dim);
}

.sh-sig-sev {
  font-family: var(--sh-mono);
  font-size: 9px;
  letter-spacing: .1em;
  padding: 2px 7px;
  border: 1px solid;
  white-space: nowrap;
}

.sh-ss-h {
  color: var(--sh-red);
  border-color: var(--sh-red);
}

.sh-ss-m {
  color: var(--sh-orange);
  border-color: var(--sh-orange);
}

.sh-ss-l {
  color: var(--sh-yellow);
  border-color: var(--sh-yellow);
}

/* ══════════════════════════════════════
   DEFENSE CARDS - ALL 9, 3-col grid
   Right 2px border (unique to this design)
══════════════════════════════════════ */
.sh-def-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  background: var(--sh-border);
  border: 1px solid var(--sh-border);
  margin-bottom: 52px;
}

.sh-def-card {
  background: var(--sh-card);
  padding: 24px 20px;
  transition: background .2s;
  position: relative;
  overflow: hidden;
}

.sh-def-card:hover {
  background: var(--sh-card2);
}

.sh-def-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 2px;
  background: var(--sh-green);
  opacity: .25;
  transition: opacity .2s;
}

.sh-def-card:hover::before {
  opacity: .8;
}

.sh-def-ico {
  font-size: 24px;
  margin-bottom: 12px;
}

.sh-def-title {
  font-family: var(--sh-display);
  font-size: clamp(11px, 1.5vw, 13px);
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--sh-green);
  margin-bottom: 8px;
}

.sh-def-desc {
  font-size: 13px;
  color: var(--sh-text-mid);
  line-height: 1.65;
  font-weight: 400;
}

.sh-def-code {
  margin-top: 10px;
  padding: 8px 12px;
  background: var(--sh-surface);
  border: 1px solid var(--sh-border);
  font-family: var(--sh-mono);
  font-size: 10px;
  color: var(--sh-neon);
  line-height: 1.8;
  word-break: break-word;
}

/* ══════════════════════════════════════
   FOOTER
══════════════════════════════════════ */
.sh-footer {
  border-top: 1px solid var(--sh-border);
  padding: 24px 0;
  text-align: center;
  font-family: var(--sh-mono);
  font-size: 10px;
  color: var(--sh-text-dim);
  letter-spacing: .15em;
  position: relative;
  z-index: 1;
}

/* ══════════════════════════════════════
   RESPONSIVE - TABLET (≤ 1024px)
══════════════════════════════════════ */
@media (max-width: 1024px) {
  .sh-vector-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

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

/* ══════════════════════════════════════
   RESPONSIVE - MOBILE (≤ 768px)
   PRIMARY WALKTHROUGH FIX
══════════════════════════════════════ */
@media (max-width: 768px) {
  .sh-container {
    padding: 0 16px;
  }

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

  /* VECTOR + DEFENSE */
  .sh-vector-grid {
    grid-template-columns: 1fr;
  }

  .sh-def-grid {
    grid-template-columns: 1fr;
  }

  .sh-ca-grid {
    grid-template-columns: 1fr;
  }

  /* DETECTION */
  .sh-detect-grid {
    grid-template-columns: 1fr;
  }

  /* WALKTHROUGH - MAIN FIX */
  .sh-pgrid {
    grid-template-columns: 1fr;
    min-height: unset;
    /* Remove min-height - let content determine height */
  }

  .sh-pl {
    border-right: none;
    border-bottom: 1px solid var(--sh-border);
    padding: 24px 16px;
    /* Reduce padding on mobile */
  }

  .sh-pr {
    padding: 24px 16px;
    justify-content: flex-start;
  }

  /* Terminals: prevent horizontal overflow on mobile */
  .sh-tbody {
    font-size: 10px;
    padding: 12px 12px;
    overflow-x: auto;
    /* Keep pre-wrap so long lines wrap naturally */
    white-space: pre-wrap;
    word-break: break-word;
  }

  /* HTTP block on mobile */
  .sh-http-body {
    font-size: 10px;
    padding: 10px 12px;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-word;
  }

  /* Tab bar: allow horizontal scroll but keep tabs readable */
  .sh-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .sh-tab {
    min-width: 70px;
    padding: 12px 6px;
  }

  .sh-tl {
    font-size: 9px;
    letter-spacing: .04em;
  }

  .sh-ti {
    font-size: 15px;
  }

  /* Control buttons: center and wrap on small screens */
  .sh-ctrl {
    padding: 12px 16px;
    justify-content: center;
  }

  .sh-cbtn {
    padding: 8px 14px;
    font-size: 10px;
  }

  /* Section headers: allow wrap */
  .sh-sec {
    flex-wrap: wrap;
    gap: 8px;
  }

  .sh-sr {
    min-width: 100%;
  }

  /* SVG diagram: horizontal scroll */
  .sh-diag {
    overflow-x: auto;
  }

  .sh-diag svg {
    min-width: 640px;
  }

  /* Cookie bar: allow horizontal scroll */
  .sh-cookie-anatomy {
    padding: 20px 16px;
  }

  .sh-cookie-bar {
    font-size: 10px;
  }

  /* Detection grid: stack + tighter padding */
  .sh-detect-l,
  .sh-detect-r {
    padding: 24px 20px;
  }

  /* Log stream: let long lines wrap */
  .sh-log-row {
    flex-wrap: wrap;
  }

  .sh-log-ts {
    min-width: unset;
  }
}

/* ══════════════════════════════════════
   RESPONSIVE - SMALL MOBILE (≤ 480px)
══════════════════════════════════════ */
@media (max-width: 480px) {
  .sh-stats {
    grid-template-columns: 1fr;
  }

  .sh-tab {
    min-width: 60px;
    padding: 10px 4px;
  }

  .sh-tl {
    display: none;
  }

  /* Hide tab label text, keep icon + num */
  .sh-tbody {
    font-size: 9.5px;
  }

  .sh-http-body {
    font-size: 9.5px;
  }
}

/* ══════════════════════════════════════
   THEME RESET
══════════════════════════════════════ */
.bert-page-session-hijacking #page,
.bert-page-session-hijacking #masthead,
.bert-page-session-hijacking .site-header,
.bert-page-session-hijacking .site-footer,
.bert-page-session-hijacking .entry-header,
.bert-page-session-hijacking .entry-content>*:not(.sh-wrap) {
  display: none !important;
}

.bert-page-session-hijacking body {
  background: var(--sh-bg) !important;
  margin: 0 !important;
  padding: 0 !important;
}