/* ==========================================================================
   Cyb3rWitch3r — details.html specific styles
   ========================================================================== */

.page-hero {
  padding: calc(var(--nav-h) + 72px) 0 56px;
  position: relative;
}

.page-hero h1 {
  font-size: clamp(1.9rem, 1.2rem + 2.6vw, 3rem);
  margin: 18px 0 18px;
  max-width: 860px;
}

.page-hero .lead { max-width: 760px; }

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--text-3);
  margin-bottom: 28px;
}

.breadcrumb a { color: var(--text-2); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb svg { width: 14px; height: 14px; }

/* Pillars */
.pillar {
  padding: 30px;
  border-radius: var(--radius);
  background: linear-gradient(165deg, rgba(20, 29, 47, 0.7), rgba(11, 16, 27, 0.7));
  border: 1px solid var(--line);
  transition: transform var(--t-med), border-color var(--t-med);
}

.pillar:hover { transform: translateY(-5px); border-color: rgba(34, 224, 255, 0.35); }

.pillar__index {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 14px;
}

.pillar h3 { font-size: 1.14rem; margin-bottom: 14px; }

.pillar ul { list-style: none; display: grid; gap: 10px; }

.pillar li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.9rem;
  color: var(--text-2);
}

.pillar li::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  margin-top: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
}

/* Comparison matrix */
.matrix-wrap::-webkit-scrollbar { height: 8px; }
.matrix-wrap::-webkit-scrollbar-thumb { background: #1e293b; border-radius: 99px; }

.matrix-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.015);
}

.matrix {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.matrix th,
.matrix td {
  padding: 18px 20px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

.matrix thead th {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  background: rgba(255, 255, 255, 0.02);
  position: sticky;
  top: 0;
}

.matrix tbody tr:last-child td { border-bottom: none; }

.matrix .col-best {
  background: rgba(34, 224, 255, 0.05);
  border-left: 1px solid rgba(34, 224, 255, 0.25);
  border-right: 1px solid rgba(34, 224, 255, 0.25);
}

.matrix thead .col-best { color: var(--accent); }

.matrix .row-label {
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

.matrix .bad { color: #ffa8b6; }
.matrix .good { color: #9fe9c9; }
.matrix .verdict { margin-top: 8px; font-size: 0.82rem; color: var(--text-3); }

/* Calculator */
.calc {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
  align-items: start;
}

.calc__panel {
  padding: 32px;
  border-radius: var(--radius-lg);
  background: linear-gradient(165deg, rgba(20, 29, 47, 0.75), rgba(11, 16, 27, 0.75));
  border: 1px solid var(--line);
}

.calc__group { margin-bottom: 26px; }
.calc__group:last-child { margin-bottom: 0; }

.calc__group > label,
.calc__label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 12px;
}

.seg {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.seg button {
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-2);
  font-size: 0.88rem;
  transition: all var(--t-fast);
}

.seg button:hover { border-color: rgba(34, 224, 255, 0.4); color: var(--text); }

.seg button.is-active {
  color: #04121a;
  background: linear-gradient(120deg, var(--accent), #7fe9ff);
  border-color: transparent;
  font-weight: 600;
}

.calc__range {
  display: flex;
  align-items: center;
  gap: 16px;
}

.calc__range input[type="range"] {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--accent), rgba(34, 224, 255, 0.15));
  outline: none;
}

.calc__range input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #06121a;
  border: 2px solid var(--accent);
  box-shadow: 0 0 14px var(--accent-glow);
  cursor: pointer;
}

.calc__range output {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--accent);
  min-width: 46px;
  text-align: right;
}

.toggles { display: grid; gap: 10px; }

.toggle {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  transition: border-color var(--t-fast), background var(--t-fast);
}

.toggle:hover { border-color: rgba(34, 224, 255, 0.35); }

.toggle input { display: none; }

.toggle__box {
  width: 22px;
  height: 22px;
  flex: none;
  border-radius: 7px;
  border: 1.5px solid var(--line-strong);
  display: grid;
  place-items: center;
  color: transparent;
  transition: all var(--t-fast);
}

.toggle input:checked + .toggle__box {
  background: var(--accent);
  border-color: var(--accent);
  color: #04121a;
}

.toggle__box svg { width: 14px; height: 14px; }

.toggle__text { font-size: 0.9rem; color: var(--text-2); }
.toggle__text b { color: var(--text); }
.toggle__text small { display: block; color: var(--text-3); font-size: 0.78rem; }

/* Result */
.calc__result {
  position: sticky;
  top: calc(var(--nav-h) + 24px);
  padding: 32px;
  border-radius: var(--radius-lg);
  background: linear-gradient(165deg, rgba(20, 29, 47, 0.9), rgba(9, 13, 22, 0.95));
  border: 1px solid rgba(34, 224, 255, 0.3);
  box-shadow: 0 40px 90px -50px var(--accent-glow);
}

.calc__total {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2.7rem;
  line-height: 1;
  margin: 12px 0 6px;
  background: linear-gradient(120deg, #fff, var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.calc__cap {
  font-size: 0.82rem;
  color: var(--text-3);
  margin-bottom: 22px;
}

.calc__breakdown {
  list-style: none;
  display: grid;
  gap: 10px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 22px;
}

.calc__breakdown li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.88rem;
  color: var(--text-2);
}

.calc__breakdown li span:last-child {
  font-family: var(--font-mono);
  color: var(--text);
  white-space: nowrap;
}

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

@media (max-width: 1024px) {
  .calc { grid-template-columns: 1fr; }
  .calc__result { position: static; }
  .formats { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .page-hero { padding-top: calc(var(--nav-h) + 48px); }
  .calc__panel, .calc__result { padding: 24px; }
}

/* ==========================================================================
   LIGHT THEME — details page
   ========================================================================== */
html[data-theme="light"] .pillar {
  background: linear-gradient(165deg, #ffffff, #f6f9fd);
  box-shadow: 0 14px 34px -28px rgba(15, 30, 60, 0.35);
}

html[data-theme="light"] .matrix-wrap { background: #ffffff; }

html[data-theme="light"] .matrix thead th {
  background: #f1f5fb;
  color: var(--text-3);
}

html[data-theme="light"] .matrix .col-best {
  background: rgba(8, 145, 178, 0.06);
  border-color: rgba(8, 145, 178, 0.3);
}

html[data-theme="light"] .matrix .bad { color: #b3123a; }
html[data-theme="light"] .matrix .good { color: #0a6b4a; }

html[data-theme="light"] .calc__panel {
  background: linear-gradient(165deg, #ffffff, #f6f9fd);
  box-shadow: 0 18px 40px -32px rgba(15, 30, 60, 0.35);
}

html[data-theme="light"] .calc__result {
  background: linear-gradient(165deg, #ffffff, #eef3fa);
  border-color: rgba(8, 145, 178, 0.35);
  box-shadow: 0 34px 70px -46px rgba(8, 145, 178, 0.6);
}

html[data-theme="light"] .calc__total {
  background: linear-gradient(120deg, #0d1526, #0891b2);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

html[data-theme="light"] .seg button {
  background: #ffffff;
  border-color: var(--line-strong);
}

html[data-theme="light"] .seg button:hover { border-color: rgba(8, 145, 178, 0.45); color: var(--text); }

html[data-theme="light"] .seg button.is-active {
  color: #ffffff;
  background: linear-gradient(120deg, #0891b2, #12a7c8);
  border-color: transparent;
}

html[data-theme="light"] .toggle { background: #ffffff; }
html[data-theme="light"] .toggle:hover { border-color: rgba(8, 145, 178, 0.4); background: rgba(8, 145, 178, 0.05); }
html[data-theme="light"] .toggle__box { border-color: var(--line-strong); }
html[data-theme="light"] .toggle input:checked + .toggle__box { color: #ffffff; border-color: var(--accent); background: var(--accent); }

html[data-theme="light"] .calc__range input[type="range"] {
  background: linear-gradient(90deg, #0891b2, rgba(8, 145, 178, 0.18));
}

html[data-theme="light"] .calc__range input[type="range"]::-webkit-slider-thumb {
  background: #ffffff;
  border-color: var(--accent);
}
