/* PILLAR CONTENT PAGES */

body { display: flex; flex-direction: column; min-height: 100vh; }
footer { margin-top: auto; }

/* PAGE HEADER */

.pillar-page-header {
  padding: 7rem 2rem 0;
  max-width: 1100px;
  margin: 0 auto;
}

.pillar-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--muted);
  margin-bottom: 2rem;
}
.pillar-breadcrumb a { color: var(--muted); text-decoration: none; transition: color 0.15s; }
.pillar-breadcrumb a:hover { color: var(--blue-dark); }
.pillar-breadcrumb span:last-child { color: var(--ink3); }

.pillar-header-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3rem;
  align-items: start;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--border);
}

.pillar-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(0,119,182,0.08);
  border: 1px solid rgba(0,119,182,0.2);
  border-radius: 100px;
  padding: 0.3rem 0.85rem 0.3rem 0.5rem;
  font-size: 0.78rem;
  color: var(--blue-dark);
  font-weight: 500;
  margin-bottom: 1.25rem;
}
.pillar-badge-icon {
  width: 22px;
  height: 22px;
  background: var(--blue-dark);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pillar-badge-icon svg { width: 12px; height: 12px; stroke: #fff; }

.pillar-page-header h1 {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(2.2rem, 4.5vw, 3.5rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 1rem;
}
.pillar-page-header h1 em { font-style: italic; color: var(--blue-dark); }

.pillar-header-desc {
  font-size: 1rem;
  color: var(--ink3);
  line-height: 1.7;
  max-width: 520px;
  margin-bottom: 1.5rem;
}

.pillar-weight-badge {
  display: inline-flex;
  align-items: baseline;
  gap: 0.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.6rem 1rem;
  box-shadow: var(--shadow);
}
.pillar-weight-num {
  font-family: 'DM Serif Display', serif;
  font-size: 1.6rem;
  color: var(--blue-dark);
  line-height: 1;
}
.pillar-weight-label {
  font-size: 0.8rem;
  color: var(--muted);
}

/* Pillar nav cards */
.pillar-nav-cards {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  width: 200px;
}

.pillar-nav-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  text-decoration: none;
  color: var(--ink3);
  font-size: 0.8rem;
  transition: border-color 0.15s, background 0.15s;
}
.pillar-nav-card:hover { border-color: var(--blue-dark); background: var(--bg2); }
.pillar-nav-card.current {
  border-color: var(--blue-dark);
  background: rgba(0,119,182,0.06);
  color: var(--blue-dark);
  cursor: default;
}
.pillar-nav-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  color: var(--muted);
  flex-shrink: 0;
}
.pillar-nav-name { flex: 1; font-weight: 500; }
.pillar-nav-weight {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  color: var(--muted);
  flex-shrink: 0;
}

/* SECTIONS */

.pillar-section { padding: 5rem 2rem; }

.pillar-section-white { background: var(--surface); border-bottom: 1px solid var(--border); }
.pillar-section-alt { background: var(--bg); border-bottom: 1px solid var(--border); }
.pillar-section-dark {
  background: var(--ink);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.pillar-section-inner {
  max-width: 860px;
  margin: 0 auto;
}

.pillar-section-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue-mid);
  margin-bottom: 0.6rem;
}
.pillar-section-dark .pillar-section-label { color: var(--blue-light); }

.pillar-section h2 {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  color: var(--ink);
  margin-bottom: 2rem;
  line-height: 1.2;
}
.pillar-section-dark h2 { color: #ffffff; }

/* PROSE */

.pillar-prose p {
  font-size: 0.97rem;
  color: var(--ink3);
  line-height: 1.8;
  margin-bottom: 1.1rem;
  max-width: 860px;
}
.pillar-prose p:last-child { margin-bottom: 0; }
.pillar-prose strong { color: var(--ink); font-weight: 600; }

/* CHECK DETAIL CARDS */

.checks-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.check-detail-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.check-detail-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface2);
}

.check-detail-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.check-detail-icon svg { width: 18px; height: 18px; stroke: currentColor; }

.check-detail-meta { flex: 1; }
.check-detail-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink);
}
.check-detail-points {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--blue-dark);
  margin-top: 1px;
}

.check-detail-body {
  padding: 1.25rem 1.5rem;
}
.check-detail-body p {
  font-size: 0.9rem;
  color: var(--ink3);
  line-height: 1.75;
  margin-bottom: 0.75rem;
}
.check-detail-body p:last-child { margin-bottom: 0; }

/* Code examples */
.check-detail-example {
  margin: 1rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.check-example-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.85rem;
  border-radius: 6px;
  font-size: 0.82rem;
}
.check-example-good { background: rgba(0,119,182,0.06); }
.check-example-bad { background: rgba(184,50,50,0.05); }
.check-example-icon { flex-shrink: 0; font-size: 0.75rem; }
.check-example-good .check-example-icon { color: var(--blue-dark); }
.check-example-bad .check-example-icon { color: var(--danger); }
.check-example-row code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  color: var(--ink3);
  word-break: break-all;
}

/* SCORE TABLE */

.score-breakdown-table {
  margin-top: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.score-table-row {
  display: grid;
  grid-template-columns: 1fr 100px 1fr;
  gap: 1rem;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.87rem;
  color: var(--ink3);
  align-items: center;
}
.score-table-row:last-child { border-bottom: none; }

.score-table-header {
  background: var(--bg2);
  font-weight: 600;
  font-size: 0.78rem;
  color: var(--ink);
  font-family: 'JetBrains Mono', monospace;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.score-pts {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  color: var(--blue-dark);
  font-size: 0.85rem;
}

.score-table-total {
  background: rgba(0,119,182,0.05);
  font-weight: 600;
  color: var(--ink);
  border-top: 2px solid var(--border2);
}
.score-table-total .score-pts { font-size: 1rem; color: var(--blue-dark); }

/* ISSUES GRID */

.issues-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 0.5rem;
}

.issue-card {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(144,224,239,0.15);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.issue-icon {
  margin-bottom: 0.75rem;
}
.issue-icon svg { width: 20px; height: 20px; stroke: #c8892a; }

.issue-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: #ffffff;
  margin-bottom: 0.5rem;
}

.issue-desc {
  font-size: 0.84rem;
  color: #a8d8ea;
  line-height: 1.65;
}

/* WINS LIST */

.wins-list {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 1.5rem;
}

.win-item {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 1.25rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  align-items: start;
  background: var(--surface);
  transition: background 0.15s;
}
.win-item:last-child { border-bottom: none; }
.win-item:hover { background: var(--bg2); }

.win-num {
  font-family: 'DM Serif Display', serif;
  font-size: 1.8rem;
  color: var(--blue-light);
  line-height: 1;
  margin-top: 2px;
}

.win-title {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--ink);
  margin-bottom: 0.35rem;
}

.win-desc {
  font-size: 0.85rem;
  color: var(--ink3);
  line-height: 1.65;
}
.win-desc em { color: var(--ink2); font-style: normal; font-weight: 500; }

.win-effort {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
  border: 1px solid var(--border);
  color: var(--muted);
  white-space: nowrap;
  margin-top: 4px;
}

/* CTA SECTION */

.pillar-cta-section {
  padding: 5rem 2rem;
  background: var(--blue-deepest);
}

.pillar-cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.pillar-cta-text h2 {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  color: #ffffff;
  margin-bottom: 0.5rem;
  line-height: 1.2;
}
.pillar-cta-text p {
  font-size: 0.9rem;
  color: var(--blue-light);
  max-width: 480px;
  line-height: 1.65;
}

.hero-cta:hover {
    background: var(--blue-mid);
}

/* ALL PILLARS GRID */

.all-pillars-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 0.5rem;
}

.all-pillar-card {
  position: relative;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
  display: block;
}
.all-pillar-card:hover { border-color: var(--blue-dark); box-shadow: var(--shadow-lg); }
.all-pillar-current {
  border-color: var(--blue-dark);
  background: rgba(0,119,182,0.04);
  cursor: default;
}
.all-pillar-current:hover { box-shadow: none; }

.all-pillar-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.all-pillar-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
}
.all-pillar-icon svg { width: 16px; height: 16px; stroke: currentColor; }

.all-pillar-name {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--ink);
  margin-bottom: 0.2rem;
}
.all-pillar-weight {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--blue-dark);
  margin-bottom: 0.6rem;
}
.all-pillar-desc {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.5;
}

.all-pillar-current-badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6rem;
  background: var(--blue-dark);
  color: #fff;
  padding: 2px 6px;
  border-radius: 100px;
}

/* RESPONSIVE */

@media (max-width: 900px) {
  .pillar-header-inner { grid-template-columns: 1fr; }
  .pillar-nav-cards { flex-direction: row; width: 100%; flex-wrap: wrap; }
  .pillar-nav-card { flex: 1; min-width: 120px; }
  .all-pillars-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
  .pillar-page-header { padding: 6rem 1.25rem 0; }
  .pillar-section { padding: 3.5rem 1.25rem; }
  .issues-grid { grid-template-columns: 1fr; }
  .win-item { grid-template-columns: 36px 1fr; }
  .win-effort { display: none; }
  .score-table-row { grid-template-columns: 1fr 60px; }
  .score-table-row > div:last-child { display: none; }
  .score-table-header > div:last-child { display: none; }
  .all-pillars-grid { grid-template-columns: 1fr 1fr; }
  .pillar-cta-inner { flex-direction: column; align-items: flex-start; }
  .pillar-nav-cards { display: none; }
}
