/* ── Subnet Calculator page-specific (V2) ── */

/* ─── Hero: trust items ─────────────────────────────────────────────────── */

.v2-subnet-trust {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 32px;
}

.v2-subnet-trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--v2-gray);
}

/* ─── Hero: calculator form card ────────────────────────────────────────── */

.v2-subnet-calc-card {
  background: var(--v2-white);
  border-radius: var(--v2-radius-md);
  padding: 32px;
  box-shadow: 0 4px 24px rgba(13,27,61,0.10);
  border: 1.5px solid var(--v2-border);
  width: 100%;
  max-width: 460px;
}

.v2-subnet-calc-card__title {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 4px;
  color: var(--v2-navy);
}

.v2-subnet-calc-card__subtitle {
  font-size: 14px;
  color: var(--v2-gray);
  margin: 0 0 20px;
}

.v2-subnet-calc-card__hint {
  font-size: 13px;
  color: var(--v2-gray);
  margin: 8px 0 0;
}

.v2-subnet-example-link {
  background: none;
  border: none;
  padding: 0;
  font-size: 13px;
  color: var(--v2-blue);
  cursor: pointer;
  font-family: var(--v2-font-mono);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.v2-subnet-example-link:hover { color: var(--v2-blue-hover); }

/* ─── Hero: error state ─────────────────────────────────────────────────── */

.v2-subnet-error {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--v2-radius-sm);
  font-size: 14px;
  margin-top: 16px;
  background: var(--v2-error-bg);
  color: var(--v2-error);
  border: 1px solid var(--v2-error-border);
}

/* ─── Hero: result card ─────────────────────────────────────────────────── */

.v2-subnet-result-card {
  background: var(--v2-soft-bg);
  border: 1.5px solid var(--v2-border);
  border-radius: var(--v2-radius-sm);
  overflow: hidden;
  margin-top: 20px;
}

.v2-subnet-result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--v2-white);
  border-bottom: 1px solid var(--v2-border);
}

.v2-subnet-result-cidr {
  font-family: var(--v2-font-mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--v2-navy);
}

.v2-subnet-result-chip {
  font-size: 12px;
  font-weight: 600;
  color: var(--v2-success);
  background: var(--v2-success-bg);
  border: 1px solid var(--v2-success-border);
  padding: 2px 10px;
  border-radius: 99px;
}

.v2-subnet-range-bar {
  display: flex;
  height: 36px;
  font-size: 12px;
  font-weight: 600;
  overflow: hidden;
}

.v2-subnet-bar-reserved {
  background: var(--v2-gray);
  color: var(--v2-white);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.v2-subnet-bar-left  { border-right: 1px solid rgba(255,255,255,0.3); }
.v2-subnet-bar-right { border-left:  1px solid rgba(255,255,255,0.3); }

.v2-subnet-bar-hosts {
  flex: 1;
  background: var(--v2-success);
  color: var(--v2-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  overflow: hidden;
}

.v2-subnet-bar-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 8px;
}

.v2-subnet-field-grid { padding: 12px 16px; }

.v2-subnet-field-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--v2-border);
  gap: 12px;
}

.v2-subnet-field-row:last-child { border-bottom: none; }

.v2-subnet-field-label {
  font-size: 13px;
  color: var(--v2-gray);
  white-space: nowrap;
}

.v2-subnet-field-value {
  font-family: var(--v2-font-mono);
  font-size: 13px;
  color: var(--v2-navy);
  background: none;
  text-align: right;
  word-break: break-all;
}

/* ─── Cheat Sheet ───────────────────────────────────────────────────────── */

.v2-subnet-cheat-section {
  background: var(--v2-white);
  padding: 80px 0;
  border-top: 1px solid var(--v2-border);
}

.v2-subnet-cheat-header {
  text-align: center;
  margin-bottom: 40px;
}

.v2-subnet-cheat-title {
  font-size: 32px;
  font-weight: 700;
  margin: 0 0 12px;
  color: var(--v2-navy);
}

.v2-subnet-cheat-highlight { color: var(--v2-blue); }

.v2-subnet-cheat-subtitle {
  font-size: 16px;
  color: var(--v2-gray);
  margin: 0 auto;
  max-width: 600px;
}

.v2-subnet-cheat-table-wrapper {
  overflow-x: auto;
  border-radius: var(--v2-radius-sm);
  border: 1.5px solid var(--v2-border);
  box-shadow: 0 1px 6px rgba(13,27,61,0.05);
}

.v2-subnet-cheat-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 700px;
}

.v2-subnet-cheat-table thead { background: var(--v2-soft-bg); }

.v2-subnet-cheat-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--v2-gray);
  border-bottom: 1.5px solid var(--v2-border);
  white-space: nowrap;
}

.v2-subnet-cheat-table td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--v2-border);
  color: var(--v2-navy);
  vertical-align: middle;
}

.v2-subnet-cheat-table td:nth-child(1),
.v2-subnet-cheat-table td:nth-child(2),
.v2-subnet-cheat-table td:nth-child(3) {
  font-family: var(--v2-font-mono);
  font-size: 13px;
}

.v2-subnet-cheat-table td:nth-child(4),
.v2-subnet-cheat-table td:nth-child(5) {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.v2-subnet-cheat-table td:last-child { color: var(--v2-gray); font-size: 13px; }
.v2-subnet-cheat-table tbody tr:nth-child(even) { background: var(--v2-soft-bg); }
.v2-subnet-cheat-table tbody tr:hover { background: var(--v2-blue-light); }
.v2-subnet-cheat-table tbody tr:last-child td { border-bottom: none; }

.v2-subnet-cheat-note {
  margin: 20px 0 0;
  font-size: 13px;
  color: var(--v2-gray);
}

.v2-subnet-cheat-note a { color: var(--v2-blue); text-decoration: none; }
.v2-subnet-cheat-note a:hover { text-decoration: underline; }

/* ─── How It Works ──────────────────────────────────────────────────────── */

.v2-subnet-how-section {
  background: var(--v2-soft-bg);
  padding: 80px 0;
  border-top: 1px solid var(--v2-border);
}

.v2-subnet-how-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.v2-subnet-how-title {
  font-size: 32px;
  font-weight: 700;
  margin: 0 0 36px;
  color: var(--v2-navy);
}

.v2-subnet-how-block { margin-bottom: 28px; }

.v2-subnet-how-h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--v2-navy);
  margin: 0 0 8px;
}

.v2-subnet-how-block p {
  font-size: 15px;
  line-height: 1.65;
  color: var(--v2-gray);
  margin: 0;
}

.v2-subnet-how-block p code,
.v2-subnet-how-block em {
  font-family: var(--v2-font-mono);
  font-size: 13px;
  background: var(--v2-blue-light);
  color: var(--v2-blue-hover);
  padding: 1px 5px;
  border-radius: 4px;
  font-style: normal;
}

.v2-subnet-how-card {
  background: var(--v2-white);
  border-radius: var(--v2-radius-md);
  padding: 28px;
  box-shadow: 0 2px 12px rgba(13,27,61,0.08);
  border: 1.5px solid var(--v2-border);
  position: sticky;
  top: 80px;
}

.v2-subnet-how-card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--v2-blue);
  margin-bottom: 20px;
  font-family: var(--v2-font-mono);
}

.v2-subnet-how-card-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--v2-border);
  gap: 12px;
}

.v2-subnet-how-card-row:last-of-type { border-bottom: none; }

.v2-subnet-how-card-label { font-size: 13px; color: var(--v2-gray); }

.v2-subnet-how-card-value {
  font-family: var(--v2-font-mono);
  font-size: 13px;
  color: var(--v2-navy);
  background: none;
}

.v2-subnet-how-card-highlight {
  color: var(--v2-success);
  font-weight: 700;
}

.v2-subnet-how-card-binary {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--v2-border);
}

.v2-subnet-how-card-binary-label {
  font-size: 12px;
  color: var(--v2-gray);
  margin-bottom: 6px;
}

.v2-subnet-how-card-binary-value {
  font-family: var(--v2-font-mono);
  font-size: 12px;
  color: var(--v2-navy);
  background: none;
  word-break: break-all;
}

.v2-subnet-how-bar {
  display: flex;
  height: 30px;
  margin-top: 16px;
  border-radius: var(--v2-radius-sm);
  overflow: hidden;
  font-size: 11px;
  font-weight: 700;
}

.v2-subnet-how-bar-reserved {
  width: 28px;
  background: var(--v2-gray);
  color: var(--v2-white);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.v2-subnet-how-bar-left  { border-radius: var(--v2-radius-sm) 0 0 var(--v2-radius-sm); }
.v2-subnet-how-bar-right { border-radius: 0 var(--v2-radius-sm) var(--v2-radius-sm) 0; }

.v2-subnet-how-bar-hosts {
  flex: 1;
  background: var(--v2-success);
  color: var(--v2-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
}

/* ─── Responsive ────────────────────────────────────────────────────────── */

@media (max-width: 900px) {
  .v2-subnet-how-grid { grid-template-columns: 1fr; gap: 40px; }
  .v2-subnet-how-card { position: static; }
}

@media (max-width: 600px) {
  .v2-subnet-cheat-section,
  .v2-subnet-how-section { padding: 48px 0; }

  .v2-subnet-cheat-title,
  .v2-subnet-how-title { font-size: 26px; }

  .v2-subnet-calc-card { padding: 24px 16px; }
}
