/* ====== Security page — full restyle ======
   Spec-driven. Dark mode only. Inter + JetBrains Mono. */

.sec-nav-center {
  display: flex;
  align-items: center;
  justify-content: center !important;
  position: relative;
}
.sec-back-nav {
  position: absolute;
  left: 32px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--t2);
  letter-spacing: -0.005em;
  transition: color 0.15s ease;
}
.sec-back-nav:hover { color: var(--t1); }
.sec-back-nav .arr {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}
.sec-back-nav:hover .arr { transform: translateX(-3px); }

@media (max-width: 560px) {
  .sec-back-nav {
    position: static;
    transform: none;
    margin-right: auto;
  }
  .sec-back-nav span:last-child { display: none; }
}

:root {
  --sec-blue: #3B82F6;
  --sec-purple: #8B5CF6;
  --sec-amber: #F59E0B;
  --sec-codebg: #0A0B0F;
  --sec-comment: #52576B;
}

/* Constrain wrap for spec (1200px max) */
.sec-wrap {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}
.sec-section {
  padding: 80px 0;
  position: relative;
}
.sec-section.alt {
  background: #111318;
}
.sec-section.gradient {
  background: linear-gradient(135deg, #0A1F1A 0%, #0A0B0F 100%);
  border-top: 1px solid rgba(16,185,129,0.2);
}

.sec-label {
  display: inline-block;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--emerald);
}

.sec-h2 {
  font-family: var(--sans);
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
  color: var(--t1);
  margin: 16px 0 0;
}
.sec-h2 .b { color: var(--t2); }

.sec-sub {
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 400;
  color: var(--t2);
  line-height: 1.55;
  margin-top: 16px;
  max-width: 580px;
  text-wrap: pretty;
}

/* ===== HERO ===== */
.sec-hero {
  padding: 160px 0 80px;
  position: relative;
  overflow: hidden;
}
.sec-hero::before {
  content: "";
  position: absolute;
  top: -10%; left: 50%;
  transform: translateX(-50%);
  width: 1200px; height: 700px;
  background: radial-gradient(ellipse at center, rgba(16,185,129,0.14), transparent 60%);
  pointer-events: none;
  z-index: 0;
  filter: blur(20px);
}
.sec-hero > * { position: relative; z-index: 1; }

.sec-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(16,185,129,0.10);
  border: 1px solid rgba(16,185,129,0.25);
  color: var(--emerald);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.01em;
}
.sec-pill::before {
  content: "";
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 8px rgba(16,185,129,0.4);
}

.sec-h1 {
  margin: 24px 0 0;
  font-family: var(--sans);
  font-size: clamp(38px, 5.2vw, 64px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.05;
  color: var(--t1);
  text-wrap: balance;
}
.sec-h1 .b { color: var(--t2); display: block; }

.sec-hero .sub {
  margin-top: 28px;
  font-size: 18px;
  line-height: 1.55;
  color: var(--t2);
  max-width: 580px;
  text-wrap: pretty;
}

.sec-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 48px 64px;
  margin-top: 56px;
}
.sec-stat .n {
  font-family: var(--sans);
  font-size: 36px;
  font-weight: 700;
  color: var(--emerald);
  letter-spacing: -0.02em;
  line-height: 1;
}
.sec-stat .l {
  margin-top: 8px;
  font-size: 14px;
  color: var(--t2);
  letter-spacing: -0.005em;
}

/* Back link top of page */
.sec-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--t2);
  letter-spacing: -0.005em;
  transition: color 0.15s ease;
  margin-bottom: 36px;
}
.sec-back:hover { color: var(--t1); }
.sec-back .arr { transition: transform 0.2s ease; display: inline-flex; }
.sec-back:hover .arr { transform: translateX(-3px); }

/* ===== THREAT MODEL ===== */
.threat-cols {
  margin-top: 56px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}
@media (max-width: 880px) { .threat-cols { grid-template-columns: 1fr; gap: 40px; } }

.threat-col h3 {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  margin: 0 0 20px;
}
.threat-col.in h3 { color: var(--emerald); }
.threat-col.out h3 { color: var(--t2); }

.threat-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.threat-card {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 14px;
  align-items: start;
  padding: 16px 20px;
  background: var(--s2);
  border-radius: 12px;
  border-left: 3px solid var(--emerald);
  transition: transform 0.15s ease, background 0.15s ease;
}
.threat-card.out { border-left-color: var(--sec-amber); }
.threat-card:hover { background: #22252F; }

.threat-card .ic {
  width: 22px; height: 22px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}
.threat-card.in .ic { background: rgba(16,185,129,0.12); color: var(--emerald); }
.threat-card.out .ic { background: rgba(245,158,11,0.12); color: var(--sec-amber); }

.threat-card h4 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--t1);
}
.threat-card p {
  margin: 6px 0 0;
  font-size: 14px;
  color: var(--t2);
  line-height: 1.55;
  text-wrap: pretty;
}

/* ===== CRYPTOGRAPHY ===== */
.crypto-row {
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 880px) { .crypto-row { grid-template-columns: 1fr; } }

.crypto-c {
  padding: 28px 24px;
  background: var(--s2);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.crypto-c .ic {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid currentColor;
}
.crypto-c.e .ic { background: rgba(16,185,129,0.10); color: var(--emerald); border-color: rgba(16,185,129,0.30); }
.crypto-c.b .ic { background: rgba(59,130,246,0.10); color: var(--sec-blue); border-color: rgba(59,130,246,0.30); }
.crypto-c.p .ic { background: rgba(139,92,246,0.10); color: var(--sec-purple); border-color: rgba(139,92,246,0.30); }

.crypto-c .l {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.crypto-c.e .l { color: var(--emerald); }
.crypto-c.b .l { color: var(--sec-blue); }
.crypto-c.p .l { color: var(--sec-purple); }

.crypto-c h3 {
  font-family: var(--sans);
  font-size: 22px;
  font-weight: 700;
  color: var(--t1);
  letter-spacing: -0.015em;
  margin: 0;
}

.crypto-code {
  background: var(--sec-codebg);
  border-radius: 8px;
  padding: 12px 16px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--emerald);
  line-height: 1.7;
  letter-spacing: 0;
  white-space: pre;
  overflow-x: auto;
}

.crypto-c p {
  margin: 0;
  font-size: 14px;
  color: var(--t2);
  line-height: 1.55;
  text-wrap: pretty;
}

.crypto-params {
  margin: 0;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--sec-comment);
  line-height: 1.6;
  letter-spacing: 0;
}

/* ===== FORMAT ===== */
.format-block {
  margin-top: 56px;
  background: #111318;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 16px;
  padding: 28px 32px;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.8;
  letter-spacing: 0;
  overflow-x: auto;
}
.format-block .c { color: var(--sec-comment); }
.format-block .b { color: var(--emerald); }
.format-block .v { color: var(--t1); }
.format-block .gap { display: block; height: 12px; }

.format-row {
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 12px;
  color: var(--t1);
}
.format-row .sz {
  color: var(--sec-comment);
}
.format-row .lb {
  color: var(--emerald);
}
.format-row .vl {
  color: var(--t1);
}
.format-row .vl .nb {
  color: var(--sec-comment);
}

.format-ctas {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.format-ctas .btn-solid {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 24px;
  height: 48px;
  border-radius: 12px;
  background: var(--emerald);
  color: #04130D;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.005em;
  transition: background 0.15s ease, transform 0.15s ease;
}
.format-ctas .btn-solid:hover { background: #16C893; transform: translateY(-1px); }
.format-ctas .btn-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 24px;
  height: 48px;
  border-radius: 12px;
  background: transparent;
  color: var(--t1);
  border: 1px solid var(--b2);
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.005em;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.format-ctas .btn-line:hover { border-color: var(--b3); background: rgba(255,255,255,0.04); }

/* ===== DECISIONS ===== */
.dec-list {
  margin-top: 56px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.dec-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 20px 24px;
  background: var(--s2);
  border-radius: 12px;
  transition: background 0.15s ease;
}
.dec-row:hover { background: #22252F; }
.dec-row .q {
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 500;
  color: var(--t1);
  letter-spacing: -0.01em;
}
.dec-row .a {
  margin-top: 6px;
  font-size: 14px;
  color: var(--t2);
  line-height: 1.55;
  max-width: 640px;
  text-wrap: pretty;
}
.dec-row .badge {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(16,185,129,0.10);
  border: 1px solid rgba(16,185,129,0.25);
  color: var(--emerald);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: -0.005em;
  white-space: nowrap;
}
@media (max-width: 720px) {
  .dec-row { flex-direction: column; align-items: flex-start; gap: 12px; }
  .dec-row .a { max-width: 100%; }
}

/* ===== DISCLOSURE ===== */
.disc-center {
  text-align: center;
}
.disc-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px; height: 64px;
  border-radius: 16px;
  background: rgba(16,185,129,0.10);
  border: 1px solid rgba(16,185,129,0.25);
  color: var(--emerald);
  margin: 0 auto;
}
.disc-h {
  margin: 28px 0 0;
  font-family: var(--sans);
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--t1);
  line-height: 1.15;
}
.disc-sub {
  margin: 20px auto 0;
  font-size: 16px;
  color: var(--t2);
  line-height: 1.55;
  max-width: 560px;
  text-wrap: pretty;
}

.disc-cards {
  margin: 48px auto 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 240px));
  gap: 12px;
  justify-content: center;
}
@media (max-width: 720px) { .disc-cards { grid-template-columns: 1fr; max-width: 320px; } }
.disc-card {
  padding: 20px 20px 18px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px;
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.disc-card .ic {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: rgba(16,185,129,0.10);
  border: 1px solid rgba(16,185,129,0.25);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--emerald);
  margin-bottom: 4px;
}
.disc-card .l {
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--t3);
}
.disc-card .v {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--t1);
  word-break: break-word;
}

.disc-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 36px;
  padding: 16px 40px;
  background: var(--emerald);
  color: #0A0B0F;
  border-radius: 14px;
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.005em;
  box-shadow: 0 0 30px rgba(16,185,129,0.3);
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.disc-cta:hover { background: #16C893; transform: translateY(-1px); box-shadow: 0 0 40px rgba(16,185,129,0.45); }

.disc-note {
  margin: 28px auto 0;
  font-size: 13px;
  color: var(--sec-comment);
  line-height: 1.6;
  max-width: 540px;
}

/* ===== CHECKLIST ===== */
.chk-grid {
  margin-top: 56px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 56px;
}
@media (max-width: 720px) { .chk-grid { grid-template-columns: 1fr; gap: 14px; } }

.chk-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 15px;
  color: var(--t2);
  line-height: 1.5;
  letter-spacing: -0.005em;
}
.chk-item .ic {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: rgba(16,185,129,0.12);
  color: var(--emerald);
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

/* ===== VERIFICATION KIT ===== */
.vkit-block {
  margin-top: 56px;
  padding-top: 48px;
  border-top: 1px solid rgba(255,255,255,0.07);
}

.vkit-title {
  font-family: var(--sans);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--t1);
  margin: 16px 0 0;
}

.vkit-desc {
  margin-top: 20px;
  font-size: 16px;
  color: var(--t2);
  line-height: 1.6;
  max-width: 640px;
  text-wrap: pretty;
}

.vkit-grid {
  margin-top: 32px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  max-width: 640px;
}

.vkit-word {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--s1);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 10px;
}

.vkit-n {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--t3);
  letter-spacing: 0.02em;
  flex-shrink: 0;
  min-width: 18px;
}

.vkit-w {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 500;
  color: var(--emerald);
  letter-spacing: -0.005em;
}

@media (max-width: 480px) {
  .vkit-grid {
    grid-template-columns: repeat(2, 1fr);
    max-width: 100%;
  }
  .vkit-word { padding: 10px 12px; }
  .vkit-w { font-size: 13px; }
  .vkit-block .format-ctas { flex-direction: column; }
  .vkit-block .format-ctas .btn-solid { width: 100%; justify-content: center; }
}

/* ===== FOOTER NOTE ===== */
.sec-footnote {
  padding: 40px 0 56px;
  text-align: center;
  font-size: 13px;
  color: var(--sec-comment);
  line-height: 1.6;
}

/* ============================================================
   MOBILE — 480px and below
   ============================================================ */
@media (max-width: 480px) {
  .sec-wrap { padding: 0 16px; }

  .sec-hero { padding: 100px 0 56px; }

  /* Format block — stack label/value vertically, no horizontal overflow */
  .format-block {
    font-size: 12px;
    padding: 16px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .format-row {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    grid-template-areas:
      "sz lb"
      "vl vl";
    gap: 3px 8px;
    padding: 9px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
  }
  .format-row:last-child { border-bottom: none; }

  .format-row .sz {
    grid-area: sz;
    font-size: 10px;
    opacity: 0.55;
    white-space: nowrap;
    align-self: center;
  }
  .format-row .lb {
    grid-area: lb;
    align-self: center;
  }
  .format-row .vl {
    grid-area: vl;
    white-space: normal;
    word-break: break-word;
    font-size: 11px;
    line-height: 1.6;
  }
  .format-row .vl .nb {
    display: block;
    margin-top: 2px;
    font-size: 10px;
  }

  /* Crypto code blocks */
  .crypto-code { font-size: 12px; }

  /* Decisions */
  .dec-row { padding: 16px; }
}
