/* ============================================================
   CYBERSECURITY & CONSULTING PAGE
   Scoped to .cy-* — inherits design tokens from index.css
   ============================================================ */

/* ---------- HERO ---------- */
.cy-hero {
  position: relative;
  min-height: calc(100svh - 76px);
  display: flex;
  align-items: center;
  padding: 80px 0 90px;
  overflow: hidden;
  isolation: isolate;
  background: var(--ink);
}

.cy-hero__mesh {
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
}

.cy-hero__blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.45;
  animation: cyBlobDrift 16s ease-in-out infinite alternate;
}

.cy-hero__blob--a {
  width: 560px;
  height: 560px;
  top: -14%;
  right: -8%;
  background: radial-gradient(circle, rgba(94, 234, 212, 0.22), transparent 70%);
}

.cy-hero__blob--b {
  width: 480px;
  height: 480px;
  bottom: -12%;
  left: -10%;
  background: radial-gradient(circle, rgba(58, 158, 146, 0.16), transparent 70%);
  animation-delay: -6s;
}

.cy-hero__blob--c {
  width: 340px;
  height: 340px;
  top: 40%;
  left: 45%;
  background: radial-gradient(circle, rgba(242, 169, 59, 0.08), transparent 70%);
  animation-delay: -11s;
}

@keyframes cyBlobDrift {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(32px, -28px) scale(1.08); }
  100% { transform: translate(-18px, 22px) scale(0.96); }
}

.cy-hero__grid {
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  opacity: 0.18;
  background-image:
    linear-gradient(to right, var(--line-soft) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line-soft) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 50% 45%, black, transparent 72%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 45%, black, transparent 72%);
}

.cy-hero__canvas {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.55;
}

.cy-hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 64px;
  align-items: center;
}

.cy-hero__tag {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--signal);
  margin-bottom: 22px;
}

.cy-hero__tag-line {
  width: 32px;
  height: 1px;
  background: var(--signal);
  flex-shrink: 0;
}

.cy-hero__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.4rem, 4.8vw, 4rem);
  line-height: 1.06;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}

.cy-hero__title .accent { color: var(--signal); }

.cy-hero__lede {
  font-size: 1.08rem;
  color: var(--paper-dim);
  max-width: 520px;
  line-height: 1.7;
  margin-bottom: 32px;
}

.cy-hero__ctas {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.cy-hero__ctas .btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.cy-hero__trust {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--paper-dim);
}

.cy-hero__trust span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.cy-hero__trust svg { color: var(--signal); flex-shrink: 0; }

/* ---------- Threat console ---------- */
.cy-hero__console {
  position: relative;
  opacity: 0;
  transform: scale(0.94);
}

.cy-console {
  background: rgba(15, 20, 28, 0.85);
  border: 1px solid rgba(94, 234, 212, 0.22);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 40px 100px -40px rgba(0, 0, 0, 0.85), 0 0 80px rgba(94, 234, 212, 0.06);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  /* Fixed outer height — the panel NEVER changes size as content streams */
  height: 560px;
}

.cy-console__bar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 16px;
  background: var(--panel-2);
  border-bottom: 1px solid var(--line-soft);
}

.cy-console__bar > span:not([class]) {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--line);
}
.cy-console__bar > span:nth-child(1) { background: #FF6159; }
.cy-console__bar > span:nth-child(2) { background: #FEBC2E; }
.cy-console__bar > span:nth-child(3) { background: #28C840; }

.cy-console__title {
  margin-left: 10px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--paper-dim);
  letter-spacing: 0.04em;
  flex: 1;
}

.cy-console__live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  color: #86EFAC;
}

.cy-console__live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #86EFAC;
  box-shadow: 0 0 10px rgba(134, 239, 172, 0.7);
  animation: cyPulse 1.6s ease-in-out infinite;
}

/* ---------- Tab strip ---------- */
.cy-console__tabs {
  flex: 0 0 auto;
  display: flex;
  align-items: stretch;
  background: #0d131c;
  border-bottom: 1px solid var(--line-soft);
  overflow-x: auto;
  scrollbar-width: none;
}
.cy-console__tabs::-webkit-scrollbar { display: none; }

.cy-console__tab {
  appearance: none;
  background: transparent;
  border: 0;
  border-right: 1px solid var(--line-soft);
  padding: 8px 14px 7px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  color: var(--paper-dim);
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: color 0.2s ease, background 0.2s ease;
  position: relative;
}

.cy-console__tab:hover { color: var(--paper); }

.cy-console__tab.is-active {
  color: var(--paper);
  background: #070b10;
}

.cy-console__tab.is-active::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 1px;
  background: var(--signal);
  box-shadow: 0 0 10px rgba(94, 234, 212, 0.6);
}

.cy-console__tab-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #3A4454;
  flex-shrink: 0;
}
.cy-console__tab.is-active .cy-console__tab-dot {
  background: var(--signal);
  box-shadow: 0 0 8px rgba(94, 234, 212, 0.7);
}
.cy-console__tab[data-tab="wireshark"].is-active .cy-console__tab-dot { background: #7DD3FC; box-shadow: 0 0 8px rgba(125, 211, 252, 0.7); }
.cy-console__tab[data-tab="exploit"].is-active   .cy-console__tab-dot { background: #FF6159; box-shadow: 0 0 8px rgba(255, 97, 89, 0.7); }
.cy-console__tab[data-tab="htop"].is-active      .cy-console__tab-dot { background: #86EFAC; box-shadow: 0 0 8px rgba(134, 239, 172, 0.7); }

/* ---------- Console body: fixed height, internal scroll ---------- */
.cy-console__body {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;             /* critical for flex shrink + overflow */
  overflow: hidden;
  background: #070b10;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  line-height: 1.65;
}

.cy-console__pane {
  position: absolute;
  inset: 0;
  padding: 14px 18px 18px;
  overflow-y: auto;
  overflow-x: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}
.cy-console__pane::-webkit-scrollbar { width: 6px; }
.cy-console__pane::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 3px;
}

.cy-console__pane.is-active {
  opacity: 1;
  pointer-events: auto;
}

.cy-console__pane-inner {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.cy-console__pane-inner--top {
  justify-content: flex-start;
}

/* ---------- Line grammar ---------- */
.cy-line {
  display: flex;
  align-items: baseline;
  gap: 8px;
  animation: cyLineIn 0.28s ease both;
  white-space: pre-wrap;
  word-break: break-word;
}

.cy-line__time { color: #3D4759; flex-shrink: 0; }

.cy-line__tag { font-weight: 600; flex-shrink: 0; }
.cy-line__tag--ok    { color: #86EFAC; }
.cy-line__tag--warn  { color: var(--amber); }
.cy-line__tag--alert { color: #FF6159; }
.cy-line__tag--info  { color: var(--signal); }

.cy-line__msg { color: var(--paper); }
.cy-line__msg b { color: var(--signal); font-weight: 600; }
.cy-line__msg em { color: var(--amber); font-style: normal; }
.cy-line__msg i  { color: #7DD3FC; font-style: normal; }
.cy-line__msg u  { color: #FF6159; text-decoration: none; }

/* Shell prompt line */
.cy-prompt {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
  color: var(--paper);
}
.cy-prompt__user   { color: var(--amber); font-weight: 600; }
.cy-prompt__at     { color: #3D4759; }
.cy-prompt__host   { color: #7DD3FC; font-weight: 600; }
.cy-prompt__path   { color: var(--signal); }
.cy-prompt__sigil  { color: var(--paper); margin: 0 4px; }

.cy-cmd { color: var(--paper); }

.cy-caret {
  display: inline-block;
  width: 8px;
  height: 1em;
  background: var(--signal);
  vertical-align: -0.15em;
  animation: cyCaret 1s steps(1) infinite;
  margin-left: 2px;
}

/* ---------- Wireshark pane ---------- */
.cy-wireshark__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 8px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--paper-dim);
  font-size: 0.68rem;
  letter-spacing: 0.05em;
}

.cy-wireshark__head b { color: var(--paper); font-weight: 500; }
.cy-wireshark__iface { color: var(--signal); }

.cy-wireshark__row {
  display: grid;
  grid-template-columns: 44px 74px 1fr 1fr 52px;
  gap: 10px;
  padding: 2px 0;
  font-size: 0.7rem;
  color: var(--paper-dim);
  white-space: nowrap;
  overflow: hidden;
  animation: cyLineIn 0.28s ease both;
}

.cy-wireshark__row > span:nth-child(1) { color: #3D4759; }
.cy-wireshark__row > span:nth-child(2) { color: #7DD3FC; }
.cy-wireshark__row > span:nth-child(3) { color: var(--paper); }
.cy-wireshark__row > span:nth-child(4) { color: var(--paper-dim); }
.cy-wireshark__row > span:nth-child(5) { color: var(--signal); text-align: right; }

.cy-wireshark__row.is-alert > span:nth-child(2) { color: #FF6159; }
.cy-wireshark__row.is-alert > span:nth-child(3) { color: #FF6159; }
.cy-wireshark__row.is-alert > span:nth-child(4) { color: #FF6159; }

.cy-wireshark__row--header {
  color: #3D4759;
  border-bottom: 1px dashed var(--line-soft);
  padding-bottom: 4px;
  margin-bottom: 4px;
}
.cy-wireshark__row--header > span { color: #3D4759 !important; }

/* ---------- Exploit pane ---------- */
.cy-exploit__banner {
  color: #FF6159;
  font-weight: 700;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
  white-space: pre;
  font-size: 0.58rem;
  line-height: 1.1;
  text-shadow: 0 0 12px rgba(255, 97, 89, 0.4);
}

.cy-exploit__progress {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.cy-exploit__bar {
  flex: 1;
  height: 8px;
  background: #0d131c;
  border: 1px solid var(--line-soft);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}

.cy-exploit__bar-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #FF6159, var(--amber));
  box-shadow: 0 0 12px rgba(255, 97, 89, 0.5);
  transition: width 0.15s linear;
}

.cy-exploit__pct {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--amber);
  min-width: 44px;
  text-align: right;
}

.cy-exploit__block {
  padding: 8px 10px;
  margin: 6px 0;
  background: rgba(255, 97, 89, 0.06);
  border-left: 2px solid #FF6159;
  color: var(--paper);
  font-size: 0.72rem;
}

.cy-exploit__ok    { color: #86EFAC; }
.cy-exploit__dim   { color: #7A8698; }
.cy-exploit__cmd   { color: var(--signal); }
.cy-exploit__warn  { color: var(--amber); }
.cy-exploit__alert { color: #FF6159; }

/* ---------- htop pane ---------- */
.cy-htop__meters {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 0.7rem;
}
.cy-htop__meter {
  display: grid;
  grid-template-columns: 92px 1fr 52px;
  gap: 10px;
  align-items: center;
  color: var(--paper-dim);
}
.cy-htop__meter-label { color: var(--signal); }
.cy-htop__meter-bar {
  height: 8px;
  background: #0d131c;
  border: 1px solid var(--line-soft);
  border-radius: 2px;
  overflow: hidden;
}
.cy-htop__meter-bar > i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #86EFAC, var(--signal));
  transition: width 0.6s ease;
}
.cy-htop__meter-pct { text-align: right; color: var(--paper); }

.cy-htop__row {
  display: grid;
  grid-template-columns: 52px 1fr 64px 52px 52px 64px;
  gap: 10px;
  padding: 2px 0;
  font-size: 0.7rem;
  color: var(--paper-dim);
  animation: cyLineIn 0.28s ease both;
  white-space: nowrap;
}
.cy-htop__row > span:nth-child(1) { color: var(--signal); }
.cy-htop__row > span:nth-child(2) { color: var(--paper); overflow: hidden; text-overflow: ellipsis; }
.cy-htop__row > span:nth-child(3),
.cy-htop__row > span:nth-child(4),
.cy-htop__row > span:nth-child(5),
.cy-htop__row > span:nth-child(6) { text-align: right; color: var(--paper-dim); }

.cy-htop__row--header > span { color: #3D4759 !important; }
.cy-htop__row--header {
  border-bottom: 1px dashed var(--line-soft);
  padding-bottom: 4px;
  margin-bottom: 4px;
}

.cy-htop__bar {
  display: inline-block;
  width: 34px;
  height: 6px;
  background: #0d131c;
  border: 1px solid var(--line-soft);
  border-radius: 1px;
  overflow: hidden;
  vertical-align: middle;
  margin-left: 4px;
}
.cy-htop__bar > i {
  display: block;
  height: 100%;
  background: #86EFAC;
}

/* ---------- Footer ---------- */
.cy-console__footer {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 16px;
  background: var(--panel-2);
  border-top: 1px solid var(--line-soft);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.06em;
  color: var(--paper-dim);
}
.cy-console__footer b,
.cy-console__footer strong { color: var(--paper); font-weight: 500; }

.cy-console__pulse {
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 8px var(--signal);
  animation: cyPulse 1.4s ease-in-out infinite;
}

/* .cy-console is an always-dark terminal mockup (background is a hardcoded
   dark literal a few rules up) — re-pin tokens so its descendants (tabs,
   exploit pane, htop pane, footer) stay legible regardless of theme. */
[data-theme="light"] .cy-console {
  --panel: #151B25;
  --panel-2: #1B2330;
  --line: #2A3342;
  --line-soft: #1E2530;
  --paper: #E9EDF2;
  --paper-dim: #9CA7B5;
  --signal: #5EEAD4;
  --signal-dim: #3A9E92;
  --amber: #F2A93B;
}

@keyframes cyLineIn {
  from { opacity: 0; transform: translateX(-8px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes cyCaret { 50% { opacity: 0; } }
@keyframes cyPulse {
  0%, 100% { opacity: 0.4; transform: scale(0.8); }
  50%      { opacity: 1;   transform: scale(1.15); }
}

/* ---------- Threat-intel strip ---------- */
.cy-strip {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  background: var(--ink-2);
  padding: 14px 0;
  overflow: hidden;
}

.cy-strip__inner {
  display: flex;
  align-items: center;
  gap: 24px;
}

.cy-strip__label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--signal);
  flex-shrink: 0;
  padding-right: 20px;
  border-right: 1px solid var(--line-soft);
}

.cy-strip__track {
  display: flex;
  gap: 44px;
  width: max-content;
  animation: cyStripScroll 48s linear infinite;
}

.cy-strip__track span {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  color: var(--paper-dim);
  white-space: nowrap;
}

.cy-strip__track span b { color: var(--signal); font-weight: 600; }
.cy-strip__track span em { color: var(--amber); font-style: normal; font-weight: 600; }
.cy-strip__track span i  { color: #FF6159; font-style: normal; font-weight: 600; }

@keyframes cyStripScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ---------- Section block ---------- */
.cy-block {
  position: relative;
  z-index: 1;
  padding: 104px 0;
}

.cy-head {
  max-width: 680px;
  margin-bottom: 56px;
}

.cy-head--center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.cy-head--center .cy-head__tag { justify-content: center; }

.cy-head__tag {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--signal);
  margin-bottom: 14px;
}

.cy-head__tag-line {
  width: 32px;
  height: 1px;
  background: var(--signal);
  flex-shrink: 0;
}

.cy-head h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  line-height: 1.18;
  margin-bottom: 16px;
}

.cy-head h2 .accent { color: var(--signal); }

.cy-head p {
  color: var(--paper-dim);
  font-size: 1.02rem;
  line-height: 1.65;
}

/* ---------- Capabilities ---------- */
.cy-cap__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.cy-cap {
  position: relative;
  padding: 32px 28px 28px;
  background: linear-gradient(135deg, rgba(94, 234, 212, 0.05) 0%, rgba(21, 27, 37, 0.5) 100%);
  border: 1px solid rgba(94, 234, 212, 0.14);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
              border-color 0.35s ease,
              box-shadow 0.35s ease;
}

.cy-cap:hover {
  transform: translateY(-6px);
  border-color: rgba(94, 234, 212, 0.36);
  box-shadow: 0 20px 60px -20px rgba(94, 234, 212, 0.18);
}

.cy-cap__index {
  position: absolute;
  top: 22px;
  right: 24px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: var(--line);
}

.cy-cap__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(94, 234, 212, 0.08);
  border: 1px solid rgba(94, 234, 212, 0.2);
  margin-bottom: 20px;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
              border-color 0.3s ease;
}

.cy-cap:hover .cy-cap__icon {
  transform: scale(1.06);
  border-color: rgba(94, 234, 212, 0.45);
}

.cy-cap__icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: var(--signal);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cy-cap h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.18rem;
  color: var(--paper);
  margin-bottom: 10px;
}

.cy-cap p {
  font-size: 0.94rem;
  line-height: 1.65;
  color: var(--paper-dim);
  margin-bottom: 18px;
}

.cy-cap__list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 16px;
  border-top: 1px solid rgba(94, 234, 212, 0.12);
  list-style: none;
  margin: 0;
}

.cy-cap__list li {
  position: relative;
  padding-left: 18px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  color: var(--paper-dim);
}

.cy-cap__list li::before {
  content: '›';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--signal);
  font-weight: 700;
}

/* ---------- Kill chain ---------- */
.cy-killchain {
  background: var(--ink-2);
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

.cy-killchain__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  overflow: hidden;
}

.cy-stage {
  position: relative;
  padding: 32px 26px 28px;
  background: var(--panel);
  opacity: 0.35;
  transition: opacity 0.6s ease, background 0.4s ease;
}

.cy-stage.is-active {
  opacity: 1;
  background: linear-gradient(135deg, rgba(94, 234, 212, 0.06), var(--panel));
}

.cy-stage__num {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--paper-dim);
  margin-bottom: 14px;
}

.cy-stage.is-active .cy-stage__num { color: var(--signal); }

.cy-stage__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line-soft);
}

.cy-stage__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--paper);
}

.cy-stage__tag {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--signal);
  padding: 3px 8px;
  border: 1px solid rgba(94, 234, 212, 0.25);
  border-radius: 100px;
  flex-shrink: 0;
}

.cy-stage p {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--paper-dim);
  margin-bottom: 18px;
}

.cy-stage__controls {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cy-stage__controls span {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.03em;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--paper-dim);
  background: var(--ink-2);
}

.cy-stage.is-active .cy-stage__controls span {
  border-color: rgba(94, 234, 212, 0.3);
  color: var(--signal);
}

/* ---------- Engagements ---------- */
.cy-eng__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.cy-eng {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 34px 30px 30px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
              border-color 0.3s ease,
              box-shadow 0.3s ease;
}

.cy-eng:hover {
  transform: translateY(-6px);
  border-color: rgba(94, 234, 212, 0.3);
  box-shadow: 0 20px 60px -20px rgba(94, 234, 212, 0.14);
}

.cy-eng--featured {
  border-color: rgba(94, 234, 212, 0.5);
  background: linear-gradient(135deg, rgba(94, 234, 212, 0.07), var(--panel));
}

.cy-eng__badge {
  position: absolute;
  top: -11px;
  right: 22px;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 100px;
  background: var(--signal);
  color: var(--ink);
  font-weight: 700;
}

.cy-eng__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.cy-eng__tag {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.3rem;
  color: var(--paper);
}

.cy-eng__price {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--signal);
}

.cy-eng__desc {
  font-size: 0.94rem;
  line-height: 1.65;
  color: var(--paper-dim);
  margin-bottom: 22px;
  min-height: 3em;
}

.cy-eng__list {
  list-style: none;
  margin: 0 0 28px;
  padding: 20px 0 0;
  border-top: 1px solid var(--line-soft);
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-grow: 1;
}

.cy-eng__list li {
  position: relative;
  padding-left: 22px;
  font-size: 0.88rem;
  color: var(--paper-dim);
  line-height: 1.5;
}

.cy-eng__list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 10px;
  height: 5px;
  border-left: 1.5px solid var(--signal);
  border-bottom: 1.5px solid var(--signal);
  transform: rotate(-45deg);
}

.cy-eng__cta {
  width: 100%;
  justify-content: center;
}

/* ---------- Methodology rail ---------- */
.cy-methodology {
  background: var(--ink-2);
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

.cy-method__track {
  position: relative;
  padding: 24px 0 0;
}

.cy-method__rail {
  position: absolute;
  left: 22px;
  top: 34px;
  bottom: 34px;
  width: 2px;
  background: var(--line-soft);
  border-radius: 2px;
}

.cy-method__rail-fill {
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 0%;
  background: linear-gradient(180deg, var(--signal), var(--signal-dim));
  border-radius: 2px;
  box-shadow: 0 0 20px rgba(94, 234, 212, 0.35);
}

.cy-method__steps {
  display: flex;
  flex-direction: column;
}

.cy-method__step {
  display: grid;
  grid-template-columns: 68px 1fr;
  gap: 26px;
  padding: 26px 0;
  opacity: 0.3;
  transition: opacity 0.5s ease;
}

.cy-method__step.is-active { opacity: 1; }

.cy-method__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--panel);
  border: 2px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--paper-dim);
  transition: border-color 0.4s ease, color 0.4s ease, box-shadow 0.4s ease;
}

.cy-method__step.is-active .cy-method__num {
  border-color: var(--signal);
  color: var(--signal);
  box-shadow: 0 0 26px rgba(94, 234, 212, 0.18);
}

.cy-method__body h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.18rem;
  color: var(--paper);
  margin-bottom: 6px;
}

.cy-method__body p {
  font-size: 0.96rem;
  line-height: 1.65;
  color: var(--paper-dim);
  max-width: 640px;
}

/* ---------- Trust slots ---------- */
.cy-trust__grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
}

.cy-trust__slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 26px 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-align: center;
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.cy-trust__slot:hover {
  border-color: rgba(94, 234, 212, 0.3);
  transform: translateY(-3px);
}

.cy-trust__slot span {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--paper);
}

.cy-trust__slot small {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--paper-dim);
  opacity: 0.6;
}

/* ---------- CTA ---------- */
.cy-cta {
  position: relative;
  z-index: 1;
  padding: 100px 0;
}

.cy-cta__card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  padding: 56px 48px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.cy-cta__tag {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--signal);
  margin-bottom: 16px;
}

.cy-cta__tag-line {
  width: 32px;
  height: 1px;
  background: var(--signal);
  flex-shrink: 0;
}

.cy-cta__content h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.6rem, 2.8vw, 2.2rem);
  line-height: 1.15;
  margin-bottom: 16px;
}

.cy-cta__content h2 .accent { color: var(--signal); }

.cy-cta__content p {
  color: var(--paper-dim);
  font-size: 1rem;
  line-height: 1.65;
  margin-bottom: 30px;
  max-width: 500px;
}

.cy-cta__actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.cy-cta__actions .btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.cy-cta__note {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--paper-dim);
}

.cy-cta__visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.cy-cta__code {
  width: 100%;
  padding: 30px 34px;
  background: var(--ink);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 0.86rem;
  line-height: 2.05;
  position: relative;
}

.cy-cta__code-comment {
  display: block;
  color: var(--paper-dim);
  opacity: 0.5;
  margin-bottom: 6px;
}

.cy-cta__code-line { display: block; }

.cy-cta__code-keyword { color: var(--signal); }
.cy-cta__code-op      { color: var(--paper-dim); }
.cy-cta__code-str     { color: var(--amber); }

.cy-cta__code-cursor {
  display: inline-block;
  width: 8px;
  height: 1.1em;
  background: var(--signal);
  vertical-align: -0.15em;
  animation: cyCaret 1s steps(1) infinite;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .cy-hero__inner {
    grid-template-columns: 1fr;
    gap: 44px;
  }
  .cy-hero__console { order: -1; max-width: 620px; margin: 0 auto; width: 100%; }
  .cy-cap__grid      { grid-template-columns: repeat(2, 1fr); }
  .cy-killchain__grid{ grid-template-columns: repeat(2, 1fr); }
  .cy-eng__grid      { grid-template-columns: 1fr; max-width: 560px; margin: 0 auto; }
  .cy-trust__grid    { grid-template-columns: repeat(3, 1fr); }
  .cy-cta__card      { grid-template-columns: 1fr; padding: 40px 32px; }
  .cy-cta__visual    { order: -1; }
  .cy-console        { height: 520px; }
}

@media (max-width: 768px) {
  .cy-hero { padding: 40px 0 60px; min-height: auto; }
  .cy-hero__title { font-size: clamp(1.8rem, 4vw, 2.6rem); }
  .cy-hero__lede { font-size: 0.95rem; }
  .cy-hero__ctas { display: grid; grid-template-columns: 1fr; gap: 10px; }
  .cy-hero__ctas .btn { width: 100%; justify-content: center; }
  .cy-hero__trust { font-size: 0.68rem; gap: 10px; }
  .cy-console { height: 460px; }
  .cy-console__body { font-size: 0.72rem; }
  .cy-console__pane { padding: 10px 12px 14px; }
  .cy-console__tabs { font-size: 0.62rem; }
  .cy-console__tab  { padding: 6px 10px 5px; font-size: 0.62rem; }

  .cy-block { padding: 72px 0; }
  .cy-cap__grid { grid-template-columns: 1fr; }
  .cy-killchain__grid { grid-template-columns: 1fr; }
  .cy-stage { opacity: 1; }

  .cy-method__step { grid-template-columns: 52px 1fr; gap: 20px; padding: 20px 0; }
  .cy-method__num { width: 38px; height: 38px; font-size: 0.72rem; }
  .cy-method__rail { left: 18px; }

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

  .cy-cta__card { padding: 32px 24px; }
  .cy-cta__actions { flex-direction: column; }
  .cy-cta__actions .btn { width: 100%; justify-content: center; }
  .cy-cta__code { font-size: 0.72rem; padding: 22px 20px; }

  .cy-wireshark__row { grid-template-columns: 36px 60px 1fr 52px; }
  .cy-wireshark__row > span:nth-child(4) { display: none; }
  .cy-htop__row { grid-template-columns: 44px 1fr 48px 44px; }
  .cy-htop__row > span:nth-child(5),
  .cy-htop__row > span:nth-child(6) { display: none; }
}

@media (max-width: 480px) {
  .cy-console { height: 400px; }
  .cy-console__body { font-size: 0.66rem; }
  .cy-console__footer { flex-wrap: wrap; gap: 6px; font-size: 0.54rem; }
  .cy-strip__label { display: none; }
  .cy-cta__code { font-size: 0.64rem; }
  .cy-exploit__banner { font-size: 0.44rem; }
}

@media (prefers-reduced-motion: reduce) {
  .cy-hero__blob,
  .cy-console__live-dot,
  .cy-console__pulse,
  .cy-strip__track,
  .cy-cta__code-cursor {
    animation: none !important;
  }
  .cy-strip__track { transform: none; }
}

/* ============================================================
   MOBILE OVERFLOW CONTAINMENT — appended
   ============================================================ */

/* 1. Contain the entire hero so nothing leaks horizontally */
.cy-hero,
.cy-hero__inner,
.cy-hero__console,
.cy-console {
  max-width: 100%;
  min-width: 0;
}

.cy-hero__inner { overflow-x: clip; }

/* 2. The console itself must never exceed its parent */
.cy-console {
  width: 100%;
  overflow: hidden; /* already set, but be explicit for mobile */
}

/* 3. Tab strip: shrink text, allow horizontal scroll internally */
.cy-console__tabs {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  flex-wrap: nowrap;
}

.cy-console__tab {
  flex: 0 0 auto;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 4. Console body: kill any inherited min-width */
.cy-console__body,
.cy-console__pane,
.cy-console__pane-inner {
  max-width: 100%;
  min-width: 0;
}

/* 5. Line rows: allow wrapping instead of pushing width */
.cy-line {
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.cy-line__msg { min-width: 0; }

.cy-prompt { flex-wrap: wrap; }

/* 6. Wireshark rows: reduce columns, drop optional ones */
@media (max-width: 768px) {
  .cy-wireshark__row {
    grid-template-columns: 34px 56px minmax(0, 1fr) 44px;
    gap: 6px;
    font-size: 0.62rem;
  }
  .cy-wireshark__row > span:nth-child(4) { display: none; }

  .cy-wireshark__head {
    font-size: 0.6rem;
    gap: 8px;
    flex-wrap: wrap;
  }
}

@media (max-width: 480px) {
  .cy-wireshark__row {
    grid-template-columns: 28px 48px minmax(0, 1fr) 36px;
    gap: 4px;
    font-size: 0.58rem;
  }
  .cy-wireshark__row > span:nth-child(5) { display: none; }
}

/* 7. htop rows: reduce columns, drop the least important ones */
@media (max-width: 768px) {
  .cy-htop__row {
    grid-template-columns: 40px minmax(0, 1fr) 44px 40px;
    gap: 6px;
    font-size: 0.62rem;
  }
  .cy-htop__row > span:nth-child(5),
  .cy-htop__row > span:nth-child(6) { display: none; }

  .cy-htop__meter {
    grid-template-columns: 72px minmax(0, 1fr) 40px;
    gap: 6px;
    font-size: 0.6rem;
  }
}

@media (max-width: 480px) {
  .cy-htop__row {
    grid-template-columns: 34px minmax(0, 1fr) 40px;
    gap: 4px;
    font-size: 0.58rem;
  }
  .cy-htop__row > span:nth-child(4) { display: none; }

  .cy-htop__meter {
    grid-template-columns: 60px minmax(0, 1fr) 36px;
    gap: 4px;
    font-size: 0.56rem;
  }
}

/* 8. Exploit banner: prevent 5-column ASCII art from pushing width */
.cy-exploit__banner {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: pre;
  font-size: 0.42rem;
  line-height: 1;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.cy-exploit__banner::-webkit-scrollbar { display: none; }

/* 9. Exploit progress row: keep bar from forcing width */
.cy-exploit__progress {
  max-width: 100%;
  min-width: 0;
}
.cy-exploit__bar { min-width: 0; }

/* 10. Console footer: allow wrap and shrink */
.cy-console__footer {
  flex-wrap: wrap;
  max-width: 100%;
  overflow: hidden;
}

.cy-console__footer > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 11. iOS Safari bonus: kill the horizontal scroll on the whole page */
html,
body {
  overflow-x: hidden;
}

/* 12. Also prevent long unbroken strings anywhere in the console from
   forcing width (e.g. IPv6 addresses, long CVE strings) */
.cy-console__body * {
  max-width: 100%;
  overflow-wrap: anywhere;
}