/* Blog-specific styles. Loaded after styles.css on /blog/* pages. */

.blog-body {
  background: var(--bg);
}

.blog-main {
  max-width: 760px;
  margin: 0 auto;
  padding: 96px var(--gutter) 64px;
}

.blog-article {
  color: var(--text);
}

.blog-crumbs {
  font-size: 14px;
  color: var(--text-faint);
  margin: 0 0 16px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.blog-crumbs a {
  color: var(--text-dim);
}

.blog-crumbs a:hover {
  color: var(--primary-light);
}

.blog-title {
  font-size: clamp(28px, 5vw, 44px);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 0 0 14px;
  color: var(--text);
}

.blog-meta {
  font-size: 14px;
  color: var(--text-faint);
  margin: 0 0 36px;
}

.blog-meta span {
  margin: 0 6px;
}

.blog-lede {
  font-size: 18px;
  line-height: 1.65;
  color: var(--text);
  margin: 0 0 20px;
}

.blog-article p {
  font-size: 17px;
  line-height: 1.7;
  margin: 0 0 18px;
  color: var(--text);
}

.blog-article h2 {
  font-size: clamp(22px, 3vw, 28px);
  line-height: 1.25;
  font-weight: 700;
  margin: 44px 0 16px;
  color: var(--text);
}

.blog-article h3 {
  font-size: 20px;
  font-weight: 700;
  margin: 32px 0 12px;
  color: var(--text);
}

.blog-article ul,
.blog-article ol {
  margin: 0 0 22px;
  padding-left: 22px;
  color: var(--text);
}

.blog-article li {
  font-size: 17px;
  line-height: 1.7;
  margin: 0 0 10px;
}

.blog-article strong {
  color: var(--text);
  font-weight: 600;
}

.blog-article em {
  color: var(--text);
}

.blog-article a {
  color: var(--primary-light);
  text-decoration: underline;
  text-decoration-color: rgba(107, 165, 231, 0.4);
  text-underline-offset: 3px;
}

.blog-article a:hover {
  color: #9bc4f0;
  text-decoration-color: #9bc4f0;
}

/* Inline calculator mount */

.calc-mount {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  margin: 28px 0 36px;
}

@media (min-width: 600px) {
  .calc-mount {
    padding: 26px 28px;
  }
}

.calc-fallback {
  margin: 0;
  color: var(--text-dim);
}

.calc-form {
  display: block;
}

.calc-intro {
  font-size: 13px;
  color: var(--text-faint);
  margin: 0 0 14px;
  letter-spacing: 0.01em;
}

.calc-questions {
  display: block;
}

/* Progressive reveal: hidden questions collapse with a fade. */
.calc-q {
  border: 0;
  margin: 0;
  padding: 0;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateY(6px);
  pointer-events: none;
  transition:
    max-height 380ms cubic-bezier(0.2, 0.8, 0.2, 1),
    opacity 280ms cubic-bezier(0.2, 0.8, 0.2, 1) 60ms,
    transform 320ms cubic-bezier(0.2, 0.8, 0.2, 1) 40ms,
    margin-top 280ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.calc-q.is-visible {
  max-height: 600px;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.calc-q.is-visible:not(:first-child) {
  margin-top: 18px;
}

@media (prefers-reduced-motion: reduce) {
  .calc-q {
    transition: none;
    transform: none;
  }
}

.calc-q-label {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 4px;
  padding: 0;
  line-height: 1.4;
}

.calc-q-help {
  font-size: 12px;
  color: var(--text-faint);
  margin: 0 0 8px;
  line-height: 1.45;
}

.calc-q-select {
  display: block;
  width: 100%;
  max-width: 280px;
  padding: 9px 12px;
  border-radius: var(--radius-md);
  background: var(--bg-elev);
  color: var(--text);
  border: 1px solid var(--border);
  font: inherit;
  font-size: 14px;
  transition: border-color 140ms var(--ease), box-shadow 140ms var(--ease);
}

.calc-q-select:hover {
  border-color: var(--primary-dark);
}

.calc-q-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(74, 144, 217, 0.18);
}

.calc-q-radios {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.calc-q-radio {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-elev);
  cursor: pointer;
  font-size: 14px;
  line-height: 1.4;
  color: var(--text);
  transition:
    border-color 140ms var(--ease),
    background 140ms var(--ease),
    transform 140ms var(--ease);
  position: relative;
}

.calc-q-radio:hover {
  border-color: var(--primary-dark);
  background: rgba(74, 144, 217, 0.04);
}

.calc-q-radio:active {
  transform: scale(0.99);
}

.calc-q-radio input[type='radio'] {
  margin: 0;
  accent-color: var(--primary);
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  cursor: pointer;
}

.calc-q-radio-label {
  flex: 1;
}

.calc-q-radio:has(input:checked) {
  border-color: var(--primary);
  background: rgba(74, 144, 217, 0.10);
  animation: calcRadioCheck 240ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes calcRadioCheck {
  0% { transform: scale(1); }
  45% { transform: scale(1.012); }
  100% { transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .calc-q-radio:has(input:checked) {
    animation: none;
  }
}

/* Result block */

.calc-result-mount:empty {
  display: none;
}

.calc-result {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  animation: calcResultIn 480ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes calcResultIn {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .calc-result {
    animation: none;
  }
}

.calc-result-head {
  margin-bottom: 4px;
}

.calc-result-eyebrow {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 0 0 4px;
}

.calc-result-headline {
  font-size: clamp(22px, 4vw, 28px);
  font-weight: 800;
  margin: 0 0 12px;
  color: var(--text);
  letter-spacing: -0.01em;
  line-height: 1.15;
}

.calc-result-body {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  margin: 0 0 12px;
}

.calc-result-how {
  margin-top: 14px;
  padding: 14px 16px;
  background: var(--bg-elev);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-soft);
  animation: calcResultIn 520ms cubic-bezier(0.2, 0.8, 0.2, 1) 80ms backwards;
}

.calc-result-how .calc-result-body {
  font-size: 14px;
  margin-bottom: 10px;
}

.calc-result-how .calc-result-body:last-child {
  margin-bottom: 0;
}

.calc-result-h {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 0 0 6px;
  font-weight: 600;
}

.calc-result-cta {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(74, 144, 217, 0.08), rgba(74, 144, 217, 0.02));
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
  animation: calcResultIn 560ms cubic-bezier(0.2, 0.8, 0.2, 1) 160ms backwards;
}

@media (min-width: 520px) {
  .calc-result-cta {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
  }
}

.calc-result-cta-lede {
  font-size: 14px;
  color: var(--text);
  margin: 0;
  line-height: 1.5;
  flex: 1;
}

.calc-result-cta-btn {
  display: inline-block;
  padding: 9px 18px;
  border-radius: var(--radius-md);
  background: var(--primary);
  color: #fff !important;
  font-weight: 600;
  text-decoration: none !important;
  font-size: 14px;
  white-space: nowrap;
  transition:
    background 140ms var(--ease),
    transform 140ms var(--ease),
    box-shadow 140ms var(--ease);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.calc-result-cta-btn:hover {
  background: var(--primary-light);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(74, 144, 217, 0.25);
}

.calc-result-cta-btn:active {
  transform: translateY(0);
}

.calc-result-reset {
  margin-top: 14px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-faint);
  padding: 6px 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  letter-spacing: 0.02em;
  transition:
    border-color 140ms var(--ease),
    color 140ms var(--ease),
    background 140ms var(--ease);
}

.calc-result-reset:hover {
  color: var(--text);
  border-color: var(--text-faint);
  background: rgba(255, 255, 255, 0.02);
}

/* RIR-style range-input rows. Three sliders + live numeric output, no
   per-step reveal: every input matters together. Re-uses .calc-q frame so
   visual rhythm matches the deload calculator. */

.calc-rir-row {
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}

.calc-rir-field-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.calc-rir-controls {
  display: flex;
  align-items: center;
  gap: 18px;
}

.calc-rir-range {
  flex: 1;
  appearance: none;
  height: 4px;
  border-radius: 2px;
  background: var(--surface-strong, rgba(255, 255, 255, 0.08));
  outline: none;
  cursor: pointer;
}

.calc-rir-range::-webkit-slider-thumb {
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid var(--bg);
  cursor: pointer;
  transition: transform 120ms var(--ease);
}

.calc-rir-range:active::-webkit-slider-thumb {
  transform: scale(1.1);
}

.calc-rir-range::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid var(--bg);
  cursor: pointer;
}

.calc-rir-number {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 22px;
  color: var(--text);
  min-width: 2.5ch;
  text-align: right;
}

/* CTA aside */

.blog-cta {
  margin: 48px 0 24px;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-align: center;
}

.blog-cta h3 {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 10px;
  color: var(--text);
}

.blog-cta p {
  font-size: 16px;
  color: var(--text-dim);
  margin: 0 0 18px;
  line-height: 1.55;
}

.blog-cta-btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  background: var(--primary);
  color: #fff !important;
  font-weight: 600;
  text-decoration: none !important;
  font-size: 16px;
  transition: background 120ms var(--ease), transform 120ms var(--ease);
}

.blog-cta-btn:hover {
  background: var(--primary-light);
  transform: translateY(-1px);
}

.blog-end {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  color: var(--text-faint);
  font-size: 14px;
}

.blog-end-tag {
  margin: 0 0 6px;
}

.blog-end-links {
  margin: 0;
}

.blog-end-links a {
  color: var(--text-dim);
}

/* Blog index */

.blog-index-head {
  margin-bottom: 36px;
}

.blog-index-title {
  font-size: clamp(28px, 5vw, 40px);
  margin: 0 0 8px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.blog-index-sub {
  color: var(--text-dim);
  font-size: 17px;
  margin: 0;
  line-height: 1.55;
}

.blog-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.blog-list li {
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  transition: border-color 120ms var(--ease);
}

.blog-list li:hover {
  border-color: var(--primary-dark);
}

.blog-list a {
  color: var(--text);
  text-decoration: none;
  display: block;
}

.blog-list h2 {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--text);
}

.blog-list p {
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-dim);
  margin: 0 0 6px;
}

.blog-list time {
  font-size: 13px;
  color: var(--text-faint);
}
