/* Guides Index Page */
.guides-page {
  padding: var(--sp-8) 0;
}

.guides-header {
  margin-bottom: var(--sp-8);
}

.guides-header h1 {
  font-family: 'Fraunces', serif;
  font-size: 28px;
  font-weight: 400;
  color: var(--stone);
  margin-bottom: var(--sp-4);
}

.guides-intro {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-2);
  max-width: 600px;
}

/* Featured Card */
.featured-section {
  margin-bottom: var(--sp-8);
}

.featured-card {
  display: block;
  background: var(--pool-deep);
  background-image:
    linear-gradient(var(--tile-color-dark) 1px, transparent 1px),
    linear-gradient(90deg, var(--tile-color-dark) 1px, transparent 1px);
  background-size: var(--tile-size-hero) var(--tile-size-hero);
  border-radius: var(--r-lg);
  padding: var(--sp-6);
  text-decoration: none;
  color: var(--white);
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.featured-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(4, 62, 72, 0.2);
  text-decoration: none;
  color: var(--white);
}

.featured-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(255,255,255,0.15);
  padding: 4px 10px;
  border-radius: var(--r-pill);
  margin-bottom: var(--sp-3);
}

.featured-title {
  font-family: 'Fraunces', serif;
  font-size: 22px;
  font-weight: 400;
  color: var(--white);
  margin-bottom: var(--sp-3);
  line-height: 1.3;
}

.featured-desc {
  font-size: 14px;
  line-height: 1.6;
  opacity: 0.85;
  margin-bottom: var(--sp-3);
}

.featured-meta {
  font-size: 12px;
  opacity: 0.7;
}

/* Phase Sections */
.phase-section {
  margin-bottom: var(--sp-8);
}

.phase-heading {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: var(--sp-4);
  padding-bottom: var(--sp-3);
  border-bottom: 1px solid var(--border);
}

.phase-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.phase-1, .phase-dot.phase-1 { background: var(--phase-1); }
.phase-2, .phase-dot.phase-2 { background: var(--phase-2); }
.phase-3, .phase-dot.phase-3 { background: var(--phase-3); }
.phase-4, .phase-dot.phase-4 { background: var(--phase-4); }

/* Guide Cards */
.guide-cards {
  display: grid;
  gap: var(--sp-4);
}

.guide-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: var(--sp-5);
  text-decoration: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}

.guide-card:hover {
  border-color: var(--teal-border);
  box-shadow: 0 0 0 3px rgba(11,123,138,.06);
  text-decoration: none;
}

.guide-card-phase {
  position: absolute;
  top: var(--sp-5);
  right: var(--sp-5);
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.guide-card-title {
  font-family: 'Fraunces', serif;
  font-size: 17px;
  font-weight: 400;
  color: var(--stone);
  margin-bottom: var(--sp-2);
  padding-right: var(--sp-5);
  line-height: 1.4;
}

.guide-card-desc {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.5;
  margin-bottom: var(--sp-3);
}

.guide-card-meta {
  font-size: 12px;
  color: var(--text-3);
}

/* Article Page */
.article-page {
  padding: var(--sp-6) 0 var(--sp-8);
}

.article-breadcrumb {
  margin-bottom: var(--sp-4);
}

.breadcrumb-link {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  text-decoration: none;
  transition: color 0.2s ease;
}

.breadcrumb-link:hover {
  color: var(--pool);
  text-decoration: none;
}

.article-header {
  margin-bottom: var(--sp-6);
}

.article-phase-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  margin-bottom: var(--sp-3);
  color: var(--white);
}

.article-phase-tag.phase-1 { background: var(--phase-1); }
.article-phase-tag.phase-2 { background: var(--phase-2); }
.article-phase-tag.phase-3 { background: var(--phase-3); }
.article-phase-tag.phase-4 { background: var(--phase-4); }

.article-header h1 {
  font-family: 'Fraunces', serif;
  font-size: 26px;
  font-weight: 400;
  color: var(--stone);
  line-height: 1.3;
  margin-bottom: var(--sp-3);
}

.article-meta {
  font-size: 13px;
  color: var(--text-3);
  margin-bottom: var(--sp-4);
}

.meta-sep {
  margin: 0 var(--sp-2);
}

/* Length Selector */
.length-selector {
  display: inline-flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  overflow: hidden;
}

.length-selector .seg-btn {
  background: var(--surface);
  border: none;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  font-family: 'DM Sans', sans-serif;
  color: var(--text-3);
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.length-selector .seg-btn:not(:last-child) {
  border-right: 1px solid var(--border);
}

.length-selector .seg-btn:hover {
  background: var(--surface-2);
  color: var(--text);
}

.length-selector .seg-btn.active {
  background: var(--pool);
  color: var(--white);
}

/* Article Body */
.article-body {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-6);
  margin-bottom: var(--sp-6);
}

.content-section h2 {
  font-family: 'Fraunces', serif;
  font-size: 20px;
  font-weight: 400;
  color: var(--stone);
  margin-top: var(--sp-6);
  margin-bottom: var(--sp-3);
}

.content-section h2:first-child {
  margin-top: 0;
}

.content-section h3 {
  font-family: 'Fraunces', serif;
  font-size: 17px;
  font-weight: 400;
  color: var(--stone);
  margin-top: var(--sp-5);
  margin-bottom: var(--sp-2);
}

.content-section h4 {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-top: var(--sp-4);
  margin-bottom: var(--sp-2);
}

.content-section p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
  margin-bottom: var(--sp-4);
}

.content-section ul,
.content-section ol {
  margin-bottom: var(--sp-4);
  padding-left: var(--sp-5);
}

.content-section li {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
  margin-bottom: var(--sp-2);
}

.content-section strong {
  font-weight: 600;
  color: var(--text);
}

.content-section blockquote {
  border-left: 3px solid var(--pool);
  padding-left: var(--sp-4);
  margin: var(--sp-5) 0;
  font-family: 'Fraunces', serif;
  font-size: 16px;
  font-style: italic;
  color: var(--stone);
}

.content-section table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--sp-5) 0;
  font-size: 14px;
}

.content-section th,
.content-section td {
  text-align: left;
  padding: var(--sp-3);
  border-bottom: 1px solid var(--border);
}

.content-section th {
  font-weight: 600;
  color: var(--text-2);
  background: var(--surface-2);
}

.content-section a {
  color: var(--pool);
}

.content-section a:hover {
  color: var(--pool-mid);
}

/* Calculator CTA */
.calculator-cta {
  border: 1px solid var(--teal-border);
  border-left: 3px solid var(--pool);
  border-radius: var(--r);
  padding: var(--sp-5);
  margin-bottom: var(--sp-6);
  background: var(--surface);
}

.cta-eyebrow {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--pool-deep);
  margin-bottom: var(--sp-2);
}

.cta-description {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  margin-bottom: var(--sp-4);
}

.calculator-cta .btn-primary {
  display: inline-block;
}

/* Back to Tool */
.back-to-tool {
  margin-bottom: var(--sp-8);
}

/* Fallback calculator link (when no scenario CTA) */
.calculator-inline-cta {
  margin-bottom: var(--sp-5);
  padding: var(--sp-4) var(--sp-5);
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--surface);
}

.calc-inline-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--pool);
}

.calc-inline-link:hover {
  color: var(--pool-deep);
  text-decoration: underline;
}

.back-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
}

.back-link:hover {
  color: var(--pool);
}

/* Related Articles */
.related-articles {
  border-top: 1px solid var(--border);
  padding-top: var(--sp-6);
}

.related-title {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: var(--sp-4);
}

.related-articles .guide-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--sp-4);
}

/* Responsive */
@media (max-width: 640px) {
  .article-header h1 {
    font-size: 22px;
  }
  
  .length-selector {
    display: flex;
    width: 100%;
  }
  
  .length-selector .seg-btn {
    flex: 1;
    padding: 10px 8px;
    font-size: 12px;
  }
  
  .article-body {
    padding: var(--sp-4);
  }
  
  .guide-cards {
    grid-template-columns: 1fr;
  }
  
  .featured-title {
    font-size: 18px;
  }
}
