/* ============================================================
   ARTICLE CONTENT STYLES
   ============================================================ */

/* ── Base Content Typography ────────────────────────────────── */

/* Paragraphs in main content */
main p {
  margin: 1.2em 0;
  line-height: 1.7;
  color: var(--text);
}

/* Headings in main content */
main h2 {
  margin: 1.5em 0 0.75em 0;
  font-size: 1.6em;
  font-weight: 600;
  line-height: 1.2;
  color: var(--text);
}

main h3 {
  margin: 1.25em 0 0.6em 0;
  font-size: 1.3em;
  font-weight: 600;
  line-height: 1.25;
  color: var(--text);
}

main h4 {
  margin: 1em 0 0.5em 0;
  font-size: 1.1em;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
}

main h5 {
  margin: 0.9em 0 0.4em 0;
  font-size: 1.05em;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
}

/* Lists in main content */
main ul,
main ol {
  margin: 1em 0;
  padding-left: 1.5em;
  line-height: 1.8;
  color: var(--text);
}

main li {
  margin: 0.9em 0;
  color: var(--text);
}

/* Nested lists */
main ul ul,
main ol ol,
main ul ol,
main ol ul {
  margin: 0.8em 0;
  padding-left: 1.5em;
}

main ul ul li,
main ol ol li,
main ul ol li,
main ol ul li {
  margin: 0.7em 0;
}

/* Sections and semantic containers */
main section {
  margin: 2.5em 0;
}

/* Blockquotes */
main blockquote {
  margin: 1.5em 0;
  padding: 1em 1.5em;
  border-left: 3px solid var(--accent2);
  background: rgba(77,240,255,0.03);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-mid);
  font-style: italic;
  line-height: 1.7;
}

/* Code blocks */
main pre {
  margin: 1.5em 0;
  padding: 1em;
  background: rgba(22,27,38,0.7);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow-x: auto;
  line-height: 1.5;
}

main code {
  font-family: var(--mono);
  font-size: 0.95em;
  color: var(--accent3);
}

/* Horizontal rules */
main hr {
  margin: 2em 0;
  border: none;
  border-top: 1px solid var(--border);
}

/* ── Component Content ──────────────────────────────────────── */

/* Quick Answer / Executive Summary */
.quick-answer {
  background: rgba(16,20,28,0.6);
  border-left: 2px solid var(--accent);
  padding: 20px 24px;
  margin: 24px 0;
  border-radius: var(--radius-sm);
  font-size: 14px;
  line-height: 1.7;
  box-shadow: var(--shadow-sm);
}

.quick-answer p {
  margin: 0;
  color: var(--text);
}

/* Metadata / Timestamps */
.updated,
.metadata,
.meta {
  color: var(--text-dim);
  font-size: 12px;
  font-family: var(--mono);
  letter-spacing: 0.02em;
}

/* Table of Contents */
nav.toc {
  background: rgba(16,20,28,0.6);
  border: 1px solid rgba(42,53,80,0.5);
  border-left: 3px solid var(--accent);
  padding: 16px 20px;
  margin: 32px 0;
  border-radius: var(--radius-sm);
  font-size: 13px;
  line-height: 1.6;
  box-shadow: var(--shadow-sm);
}

nav.toc h2 {
  margin: 0 0 16px 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

nav.toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

nav.toc li {
  margin: 8px 0;
  padding: 0;
}

nav.toc a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

nav.toc a:hover {
  text-decoration: underline;
  color: var(--accent2);
}

/* Numbered TOC variant (posts using <ol> for TOC) */
nav.toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: item;
}
nav.toc ol li {
  display: block;
  margin: 8px 0;
}
nav.toc ol li::before {
  content: counter(item) ". ";
  counter-increment: item;
  color: var(--accent);
  font-weight: 600;
  margin-right: 0.3em;
}

/* FAQ Sections */
.faq-item {
  margin: 20px 0;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.faq-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}

.faq-question {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  margin-bottom: 10px;
  cursor: pointer;
  transition: color 0.2s ease;
}

.faq-question:hover {
  color: var(--accent);
}

.faq-answer {
  color: var(--text-mid);
  font-size: 13px;
  line-height: 1.7;
  margin: 0;
}

/* Semantic details/summary (preferred FAQ markup) */
details {
  margin: 20px 0;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

details:last-child {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}

summary {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
  padding: 8px 0;
  transition: color 0.2s ease;
  user-select: none;
}

summary:hover {
  color: var(--accent);
}

details[open] summary {
  color: var(--accent);
  margin-bottom: 12px;
}

details p {
  color: var(--text-mid);
  font-size: 13px;
  line-height: 1.7;
  margin: 12px 0 0 0;
}

/* Conclusion Sections */
.conclusion {
  background: rgba(0, 255, 136, 0.04);
  border-left: 2px solid var(--accent3);
  padding: 20px 24px;
  margin: 24px 0;
  border-radius: var(--radius-sm);
  font-size: 13px;
  line-height: 1.7;
  box-shadow: var(--shadow-sm);
}

.conclusion p {
  margin: 0;
  color: var(--text-mid);
}

/* Decision Frameworks / Comparison Boxes */
.decision-framework,
.decision-box,
.decision-table {
  background: rgba(22,27,38,0.6);
  border: 1px solid rgba(42,53,80,0.5);
  border-left: 2px solid var(--accent2);
  padding: 20px 24px;
  margin: 20px 0;
  border-radius: var(--radius-sm);
  font-size: 13px;
  line-height: 1.7;
  box-shadow: var(--shadow-sm);
}

.decision-framework h3,
.decision-box h3,
.decision-table h3 {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 14px;
  color: var(--text);
}

/* Callout / Highlight Boxes */
.callout {
  background: rgba(0, 212, 255, 0.05);
  border-left: 2px solid var(--accent);
  padding: 16px 20px;
  margin: 16px 0;
  border-radius: var(--radius-sm);
  font-size: 13px;
  line-height: 1.6;
}

.callout p {
  margin: 0;
  color: var(--text);
}

/* Note / Warning Boxes */
.note {
  background: rgba(245, 158, 11, 0.04);
  border-left: 2px solid var(--warn);
  padding: 16px 20px;
  margin: 16px 0;
  border-radius: var(--radius-sm);
  font-size: 13px;
  line-height: 1.6;
}

.note p {
  margin: 0;
  color: var(--text-mid);
}

/* Muted / Reduced Opacity Text */
.muted {
  opacity: 0.7;
  color: var(--text-mid);
}

/* Responsive Table Scrolling */
.table-scroll {
  overflow-x: auto;
  margin: 20px -24px;
  padding: 0 24px;
  -webkit-overflow-scrolling: touch;
}

.table-scroll table {
  min-width: 100%;
}

/* Related / Cluster Links Section */
.cluster-related {
  background: rgba(16,20,28,0.6);
  border: 1px solid var(--border);
  padding: 20px 24px;
  margin: 24px 0;
  border-radius: var(--radius-sm);
  font-size: 13px;
}

.cluster-related h3 {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 14px;
  color: var(--text);
}

.cluster-related ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.cluster-related li {
  margin: 8px 0;
  padding: 0;
}

.cluster-related a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

.cluster-related a:hover {
  text-decoration: underline;
  color: var(--accent2);
}

/* ============================================================
   CALCULATOR COMPONENTS (Reusable)
   ============================================================ */

.calculator-card {
  margin: 24px 0;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
}

.calculator-card h2 {
  margin-top: 0;
  margin-bottom: 20px;
  font-size: 20px;
  color: var(--text);
}

/* Fieldset styling for grouped calculator inputs */
.calculator-card fieldset {
  background: rgba(16,20,28,0.6);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.2em;
  margin: 1em 0;
  color: var(--text);
}

.calculator-card fieldset legend {
  color: var(--text);
  font-weight: 600;
  padding: 0 0.5em;
}

.calculator-card form div {
  margin: 1em 0;
  display: flex;
  flex-direction: column;
}

.calculator-card label {
  color: var(--text-mid);
  font-size: 14px;
  margin-bottom: 0.4em;
  font-weight: 500;
}

.calculator-card input,
.calculator-card select {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.6em 0.8em;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  transition: border-color var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}

.calculator-card input:focus,
.calculator-card select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

.calculator-card button {
  background: var(--gradient-accent);
  color: #000;
  border: none;
  padding: 0.8em 1.5em;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
  margin-top: 1em;
  font-size: 14px;
  transition: all var(--duration) var(--ease);
  box-shadow: 0 2px 8px rgba(0,212,255,0.15);
}

.calculator-card button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0,212,255,0.25);
}

.calculator-card button:active {
  transform: translateY(0) scale(0.97);
}

/* Definition list results styling (PoE calculator pattern) */
.calculator-card #results {
  background: var(--surface);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-sm);
  padding: 1.5em;
  color: var(--text);
  margin-top: 2em;
}

.calculator-card #results h3 {
  margin-top: 0;
  color: var(--text);
}

.calculator-card #results dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.5em 1.5em;
  margin: 1em 0;
}

.calculator-card #results dt {
  color: var(--text-mid);
  font-size: 14px;
  font-weight: 500;
}

.calculator-card #results dd {
  color: var(--text);
  font-weight: 600;
  margin: 0;
  font-size: 15px;
}

.calculator-card #results #recommendedWatts,
.calculator-card #results #suggestedTier,
.calculator-card #requiredTBW {
  font-size: 16px;
  font-weight: 700;
  color: var(--accent);
}

.calculator-card #results #notes {
  background: var(--surface2);
  border-left: 3px solid var(--border-bright);
  padding: 1em;
  margin-top: 1.5em;
  border-radius: var(--radius-sm);
}

.calculator-card #results #notes h4 {
  margin-top: 0;
  color: var(--text);
  font-size: 15px;
}

.calculator-card #results #notes ul {
  margin: 0.5em 0 0 0;
  padding-left: 1.5em;
  color: var(--text-mid);
  font-size: 13px;
  line-height: 1.6;
}

.calculator-card #results #notes li {
  margin: 0.4em 0;
}

/* Alternative div-based results styling (SSD estimator pattern) */
.calculator-helper {
  margin: 1em 0;
  padding: 1em;
  background: var(--surface2);
  border-left: 3px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-mid);
}

.calculator-helper p {
  margin: 0 0 0.8em 0;
}

.calculator-helper p:last-child {
  margin-bottom: 0;
}

.calculator-form {
  display: flex;
  flex-direction: column;
  gap: 1em;
}

.calculator-field {
  display: flex;
  flex-direction: column;
}

.calculator-label {
  color: var(--text-mid);
  font-size: 14px;
  margin-bottom: 0.4em;
  font-weight: 500;
}

.calculator-input {
  padding: 0.6em 0.8em;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  transition: border-color var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}

.calculator-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

.calculator-button {
  padding: 0.8em 1.5em;
  background: var(--gradient-accent);
  color: #000;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
  font-size: 14px;
  margin-top: 1em;
  transition: all var(--duration) var(--ease);
  box-shadow: 0 2px 8px rgba(0,212,255,0.15);
}

.calculator-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0,212,255,0.25);
}

.calculator-button:active {
  transform: translateY(0) scale(0.97);
}

.calculator-validation {
  margin-top: 1em;
  padding: 0.8em 1em;
  background: rgba(239, 68, 68, 0.1);
  border-left: 3px solid #ef4444;
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: #ff6b6b;
  display: none;
}

.calculator-validation.show {
  display: block;
}

.calculator-results {
  display: none;
  margin-top: 1.5em;
  padding: 1.5em;
  background: rgba(16,20,28,0.7);
  border: 1px solid rgba(42,53,80,0.5);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
}

.calculator-results.show {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5em;
}

.calculator-metric-label {
  color: var(--text-mid);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5em;
  font-weight: 600;
}

.calculator-metric-value {
  color: var(--text);
  font-weight: 600;
  font-size: 15px;
}

.calculator-metric-value-accent {
  color: var(--accent);
  font-weight: 700;
  font-size: 16px;
}

/* ============================================================
   ARTICLE LINK STYLING
   ============================================================ */

/* Links in article content */
main a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

main a:hover {
  text-decoration: underline;
  color: var(--accent2);
}

/* Exception: Links in tables should be subtle until hovered */
main table a {
  color: var(--text-mid);
}

main table a:hover {
  color: var(--accent);
}

/* ============================================================
   HOMEPAGE TOOL CARDS
   ============================================================ */

.tool-card-top {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 8px;
}

.tool-tag {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 10px;
  white-space: nowrap;
  border-radius: 999px;
  font-weight: 600;
}

.tool-tag-quick {
  color: var(--accent3);
  background: rgba(0, 255, 136, 0.1);
  border: 1px solid rgba(0, 255, 136, 0.3);
}

.tool-tag-final {
  color: var(--accent2);
  background: rgba(77, 240, 255, 0.1);
  border: 1px solid rgba(77, 240, 255, 0.3);
}

/* Card styling for Final/Anchor card (Full Deployment Planner) */
.tool-card-anchor {
  border-top: 2px solid var(--accent2);
  background: rgba(77, 240, 255, 0.02);
}

.tool-card-anchor:hover {
  background: rgba(77, 240, 255, 0.08);
}

.tool-card-anchor .tool-title {
  color: var(--accent2);
}

.tool-card-anchor:hover .tool-title {
  color: var(--accent2);
}

/* Tools grid and view all link */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.tool-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.3;
}

.tool-desc {
  font-size: 13px;
  color: var(--text-mid);
  line-height: 1.6;
  margin-bottom: 12px;
  flex: 1;
}

.tool-link {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: color 0.2s ease;
}

.tool-card:hover .tool-link {
  opacity: 0.7;
}

.tools-view-all {
  display: inline-block;
  font-size: 14px;
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.tools-view-all:hover {
  color: var(--accent2);
}

/* ============================================================
   HOMEPAGE SECTIONS (home redesign)
   ============================================================ */

/* Featured Example Section */
.example-section {
  padding: 3rem 0 2rem 0;
}

.example-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  padding: 2rem;
  background: rgba(16,20,28,0.5);
  border: 1px solid rgba(42,53,80,0.5);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

.example-left {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.example-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
}

.example-headline {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
}

.example-context {
  margin: 0;
  font-size: 14px;
  color: var(--text-mid);
  line-height: 1.65;
}

.example-left .btn-primary {
  align-self: flex-start;
  margin-top: 0.5rem;
}

.example-right {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.example-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.example-metric {
  padding: 1.25rem;
  background: rgba(16,20,28,0.7);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: all var(--duration) var(--ease);
}

.example-metric:hover {
  border-color: rgba(0,212,255,0.2);
  box-shadow: var(--shadow-glow-accent);
}

.example-metric-label {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

.example-metric-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.2;
}

.example-specs {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.6;
  padding: 0 0 0.5rem 0;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}

/* Tablet: Single column */
@media (max-width: 960px) {
  .example-card {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .example-headline {
    font-size: 20px;
  }

  .example-metrics {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile: Stack and reduce spacing */
@media (max-width: 640px) {
  .example-card {
    padding: 1.5rem;
    gap: 1.5rem;
  }

  .example-headline {
    font-size: 18px;
  }

  .example-context {
    font-size: 13px;
  }

  .example-metrics {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .example-metric {
    padding: 1rem;
  }

  .example-metric-value {
    font-size: 16px;
  }

  .example-specs {
    font-size: 11px;
  }
}

/* Final CTA Section */
.final-cta-section {
  padding: 3rem 0 2rem 0;
}

.final-cta-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3rem;
  align-items: center;
}

.final-cta-content h2 {
  margin-top: 0;
  font-size: 1.8rem;
  margin-bottom: 0.75rem;
}

.final-cta-content p {
  font-size: 0.95rem;
  color: var(--text-mid);
  line-height: 1.7;
}

.final-cta-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  justify-content: flex-start;
}

.final-cta-buttons a {
  display: inline-block;
  white-space: nowrap;
}

/* ============================================================
   RESPONSIVE ADJUSTMENTS
   ============================================================ */

@media (max-width: 900px) {
  .final-cta-inner {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .final-cta-buttons {
    flex-direction: row;
    justify-content: flex-start;
  }

  .example-spec-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .quick-answer {
    padding: 16px 20px;
    margin: 20px 0;
  }

  nav.toc {
    padding: 16px 20px;
    margin: 24px 0;
  }

  nav.toc h2 {
    font-size: 14px;
  }

  .conclusion,
  .decision-framework,
  .decision-box,
  .decision-table,
  .callout,
  .note,
  .cluster-related {
    padding: 16px 20px;
    margin: 16px 0;
  }

  .calculator-card fieldset {
    padding: 1em;
    margin: 0.8em 0;
  }

  .calculator-card #results {
    padding: 1.2em;
  }

  .calculator-helper {
    margin: 0.8em 0;
    padding: 0.8em;
    font-size: 12px;
  }

  .calculator-results {
    grid-template-columns: 1fr;
    padding: 1.2em;
  }

  .calculator-card #results dl {
    gap: 0.4em 1em;
  }

  .table-scroll {
    margin-left: -20px;
    margin-right: -20px;
    padding-left: 20px;
    padding-right: 20px;
  }

  .example-note {
    padding: 12px 16px;
    font-size: 12px;
    margin-bottom: 1.2rem;
  }

  .final-cta-content h2 {
    font-size: 1.5rem;
  }

  .final-cta-content p {
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .quick-answer,
  nav.toc,
  .conclusion,
  .decision-framework,
  .decision-box,
  .decision-table,
  .callout,
  .note,
  .cluster-related {
    padding: 12px 16px;
    margin: 12px 0;
  }

  nav.toc h2 {
    font-size: 13px;
    margin-bottom: 12px;
  }

  nav.toc a {
    display: block;
    padding: 4px 0;
  }

  .calculator-card fieldset {
    padding: 0.8em;
    margin: 0.6em 0;
  }

  .calculator-card #results {
    padding: 1em;
  }

  .calculator-helper {
    margin: 0.6em 0;
    padding: 0.6em;
    font-size: 11px;
  }

  .calculator-results {
    grid-template-columns: 1fr;
    padding: 1em;
    gap: 1em;
  }

  .calculator-card #results dl {
    gap: 0.3em 0.8em;
    margin: 0.8em 0;
  }

  .calculator-metric-label {
    font-size: 11px;
  }

  .calculator-metric-value {
    font-size: 14px;
  }

  .calculator-metric-value-accent {
    font-size: 15px;
  }

  .example-note {
    padding: 12px 16px;
    font-size: 12px;
  }

  .final-cta-inner {
    gap: 1rem;
  }

  .final-cta-content h2 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
  }

  .final-cta-content p {
    font-size: 0.85rem;
  }

  .final-cta-buttons {
    flex-direction: column;
  }
}
