/* Red Leaf — Resources page styles (canonical, V3 Field Guide) */

/* Sections */
.res-section {
  max-width: 920px;
  margin: 0 auto;
  padding: 56px 0;
  border-top: 1px solid var(--line);
}
.res-section:first-of-type { border-top: 0; }
.res-section-head {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 20px;
  align-items: start;
  margin-bottom: 32px;
}
.res-section-num {
  font-family: var(--display);
  font-size: 13px; font-weight: 800;
  color: var(--red); letter-spacing: 0.06em;
  padding-top: 10px;
  border-top: 2px solid var(--red);
}
.res-section-h {
  font-family: var(--display);
  font-size: clamp(28px, 3.2vw, 40px);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.05;
  color: var(--ink);
}
.res-section-sub {
  margin-top: 8px;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink-3);
}

/* 01 Answers — accordion */
.res-answers-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}
.res-answer { border-bottom: 1px solid var(--line); }
.res-answer summary {
  display: grid;
  grid-template-columns: 140px 1fr 32px;
  gap: 16px;
  align-items: baseline;
  padding: 22px 0;
  cursor: pointer;
  list-style: none;
  transition: opacity 0.15s;
}
.res-answer summary::-webkit-details-marker { display: none; }
.res-answer summary:hover { opacity: 0.7; }
.res-answer-cat {
  font-family: var(--display);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
  color: var(--red);
}
.res-answer-q {
  font-family: var(--display);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.3;
  color: var(--ink);
  text-wrap: balance;
}
.res-answer-toggle {
  font-family: var(--display);
  font-size: 24px;
  font-weight: 600;
  color: var(--ink-3);
  text-align: right;
  transition: transform 0.2s;
}
.res-answer[open] .res-answer-toggle {
  transform: rotate(45deg);
  color: var(--red);
}
.res-answer-a {
  grid-column: 2;
  padding: 0 0 24px 156px;
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-2);
  text-wrap: pretty;
}

/* 02 Tools — stack of live calculators */
.res-tools-stack {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.res-tool-block {
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}
.res-tool-header {
  padding: 28px 32px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.res-tool-num {
  font-family: var(--display);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 700;
  color: var(--red);
}
.res-tool-title {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--ink);
  margin-top: 6px;
}
.res-tool-desc {
  margin-top: 8px;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-3);
}

/* Calc shell */
.res-calc {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}
.res-calc-inputs {
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  border-right: 1px solid var(--line);
}
.res-calc-inputs label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-family: var(--body);
}
.res-calc-inputs label span {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  letter-spacing: 0;
}
.res-calc-input {
  display: flex;
  align-items: center;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  transition: border-color 0.15s;
}
.res-calc-input:focus-within { border-color: var(--red); }
.res-calc-input .prefix,
.res-calc-input .suffix {
  font-family: var(--display);
  font-weight: 700;
  color: var(--ink-3);
  font-size: 15px;
}
.res-calc-input input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 12px 8px;
  font-family: var(--display);
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.015em;
  outline: none;
  width: 100%;
  min-width: 0;
}
.res-calc-input input[type="number"]::-webkit-outer-spin-button,
.res-calc-input input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.res-calc-slider {
  width: 100%;
  accent-color: var(--red);
}

.res-calc-output {
  padding: 28px 32px;
  background: white;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.res-calc-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--line);
}
.res-calc-row:last-of-type { border-bottom: 0; }
.res-calc-row span {
  font-size: 14px;
  color: var(--ink-3);
}
.res-calc-row strong {
  font-family: var(--display);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.res-calc-row strong.accent { color: var(--red); }
.res-calc-bigprice strong { font-size: 24px; }

.res-calc-verdict {
  margin-top: 8px;
  padding: 14px 16px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.5;
  font-weight: 500;
}
.tone-neutral { background: var(--paper); color: var(--ink-2); }
.tone-green { background: #e6f4ec; color: #0e5a2e; }
.tone-amber { background: #fbf2dd; color: #76520a; }
.tone-red { background: #fdebec; color: #8e1418; }

/* 03 Downloads */
.res-downloads {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}
.res-download {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: center;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  transition: opacity 0.15s;
}
.res-download:hover { opacity: 0.7; }
.res-download-text h3 {
  font-family: var(--display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin-bottom: 4px;
}
.res-download-text p {
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--ink-3);
}
.res-download-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--display);
}
.res-download-meta .meta {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
  color: var(--ink-3);
}
.res-download-meta .hf-arrow {
  font-size: 18px;
  color: var(--red);
  font-weight: 700;
}

/* 04 Articles */
.res-articles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.res-article {
  display: block;
  padding: 28px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, transform 0.15s;
}
.res-article:hover {
  border-color: var(--ink-3);
  transform: translateY(-2px);
}
.res-article h3 {
  font-family: var(--display);
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--ink);
  margin-bottom: 10px;
  text-wrap: balance;
}
.res-article p {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-3);
  margin-bottom: 14px;
}
.res-article-time {
  font-family: var(--display);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
  color: var(--red);
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1024px) {
  .res-section-head { grid-template-columns: 1fr; gap: 12px; }
  .res-answer summary { grid-template-columns: 1fr 32px; }
  .res-answer summary > :first-child { display: none; }
  /* Reset answer padding now that the 140px cat column is gone */
  .res-answer-a { grid-column: 1 / -1; padding: 0 0 24px 0; }
  .res-download { grid-template-columns: 1fr; gap: 16px; }
  .res-articles { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .res-calc { grid-template-columns: 1fr; }
  .res-calc-inputs { border-right: 0; border-bottom: 1px solid var(--line); }
}
