/* ============================================
   SECURITY RESEARCH — WRITEUP PAGE STYLES
   ============================================ */

:root {
  --sec-dark: #0A0F0D;
  --sec-green: #22C55E;
  --sec-green-light: #4ADE80;
}

/* ── HERO BANNER ─────────────────────────── */
.sec-hero {
  min-height: 56vh;
  display: flex;
  align-items: center;
  padding: 100px 5% 60px;
  background:
    radial-gradient(ellipse 60% 70% at 85% 30%, rgba(34,197,94,0.14) 0%, transparent 65%),
    linear-gradient(135deg, #0A0F0D 0%, #10151a 55%, #0d1a12 100%);
  border-bottom: 1px solid rgba(34,197,94,0.25);
}

.sec-hero__inner { max-width: 760px; }
.sec-hero .back-link { color: rgba(255,255,255,0.55); }
.sec-hero .back-link:hover { color: var(--sec-green-light); }

.sec-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(34,197,94,0.14);
  color: var(--sec-green-light);
  border: 1px solid rgba(34,197,94,0.35);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}

.sec-hero__title {
  font-size: clamp(2rem, 6vw, 3.25rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
  margin-bottom: 0.4rem;
  letter-spacing: -0.5px;
}

.sec-hero__sub {
  font-size: clamp(0.95rem, 2vw, 1.15rem);
  color: var(--sec-green-light);
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.sec-hero__summary {
  font-size: 0.97rem;
  color: rgba(255,255,255,0.62);
  max-width: 620px;
  line-height: 1.75;
  margin-bottom: 1.75rem;
}

.sec-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 2rem;
}

.sec-hero__meta span {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
}

.sec-hero__meta i { color: var(--sec-green); margin-right: 0.35rem; }

.sec-hero__cta { display: flex; gap: 1rem; flex-wrap: wrap; }

.btn--green {
  background: var(--sec-green);
  color: #051006;
  border: 1.5px solid var(--sec-green);
}
.btn--green:hover { background: var(--sec-green-light); }

.btn--green-outline {
  background: transparent;
  color: var(--sec-green-light);
  border: 1.5px solid rgba(34,197,94,0.45);
}
.btn--green-outline:hover { background: rgba(34,197,94,0.12); border-color: var(--sec-green); }

/* ── SECTIONS ────────────────────────────── */
.sec-section { padding: 60px 5%; background: var(--white); }
.sec-section--alt { background: var(--grey-subtle); }
.sec-container { max-width: 780px; margin: 0 auto; }

.sec-section__title {
  font-size: clamp(1.3rem, 2.6vw, 1.65rem);
  font-weight: 800;
  color: var(--black);
  margin-bottom: 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.sec-section__title i { color: var(--sec-green); font-size: 1.1rem; }

.sec-section p {
  color: var(--grey-dark);
  line-height: 1.8;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.sec-section ol, .sec-section ul {
  margin: 0 0 1rem 1.25rem;
  color: var(--grey-dark);
  line-height: 1.8;
  font-size: 0.95rem;
}
.sec-section li { margin-bottom: 0.5rem; }

/* ── META GRID (tools/environment) ──────── */
.sec-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.sec-meta-item {
  background: var(--white);
  border: 1.5px solid var(--grey-light);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
}
.sec-meta-item__label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 1px; color: var(--grey); font-weight: 700; margin-bottom: 0.3rem; }
.sec-meta-item__value { font-size: 0.9rem; color: var(--black); font-weight: 600; }
[data-theme="dark"] .sec-meta-item { background: #1e293b; }

/* ── DATA TABLE ──────────────────────────── */
.sec-table-wrap { overflow-x: auto; margin-bottom: 1.25rem; border-radius: var(--radius); border: 1.5px solid var(--grey-light); }
.sec-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.sec-table th, .sec-table td {
  padding: 0.55rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--grey-light);
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
}
.sec-table th {
  background: var(--grey-subtle);
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--grey);
  font-weight: 700;
}
.sec-table tr:last-child td { border-bottom: none; }
.sec-table td:last-child { color: var(--sec-green); font-weight: 700; }
[data-theme="dark"] .sec-table th { background: var(--grey-bg); }

/* ── CODE BLOCK ──────────────────────────── */
.sec-code {
  background: var(--sec-dark);
  border: 1px solid rgba(34,197,94,0.25);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  margin-bottom: 1.25rem;
}
.sec-code__label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--sec-green-light);
  margin-bottom: 0.75rem;
  font-weight: 700;
}
.sec-code pre {
  margin: 0;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 0.82rem;
  line-height: 1.6;
  color: #d1fae5;
  white-space: pre;
}
.sec-code--terminal pre { color: var(--sec-green-light); }
.sec-code--terminal .sec-code__prompt { color: rgba(255,255,255,0.4); }

/* ── FINDING CALLOUT ─────────────────────── */
.sec-finding {
  border-left: 4px solid var(--sec-green);
  background: var(--grey-subtle);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
  color: var(--grey-dark);
  line-height: 1.75;
}
[data-theme="dark"] .sec-finding { background: #1e293b; }
.sec-finding strong { color: var(--black); }

/* ── SCOPE DISCLAIMER ────────────────────── */
.sec-disclaimer {
  border: 1.5px dashed rgba(34,197,94,0.4);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--grey-dark);
  background: var(--grey-subtle);
}
.sec-disclaimer strong { color: var(--black); }
[data-theme="dark"] .sec-disclaimer { background: #1e293b; }

/* ── NOTES LIST ──────────────────────────── */
.sec-notes li strong { color: var(--black); }

/* ── CTA ─────────────────────────────────── */
.sec-cta { padding: 60px 5%; background: var(--sec-dark); color: #fff; text-align: center; }
.sec-cta h2 { font-size: 1.5rem; font-weight: 800; margin-bottom: 0.6rem; }
.sec-cta p { color: rgba(255,255,255,0.5); font-size: 0.92rem; margin-bottom: 1.5rem; }

/* ── RESPONSIVE ──────────────────────────── */
@media (max-width: 640px) {
  .sec-meta-grid { grid-template-columns: 1fr; }
}
