/* ARK Foundry — shared styles for /guides pages */

/* ── GUIDE HERO ── */
.guide-hero {
  padding: 140px 48px 52px;
  max-width: 800px;
  margin: 0 auto;
}
.guide-label {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700; font-size: 0.7rem;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--coral);
  margin-bottom: 14px;
}
.guide-title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: clamp(2rem, 4vw, 2.8rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
  color: var(--dark);
  margin-bottom: 22px;
}
.guide-intro {
  font-size: 1.08rem;
  line-height: 1.65;
  color: var(--muted);
  max-width: 600px;
}

/* ── GUIDE BODY ── */
.guide-body {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 48px 96px;
}

/* ── HOW TO USE ── */
.how-to-use {
  background: var(--off);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-bottom: 48px;
  border-left: 3px solid var(--teal);
}
.how-to-use h3 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700; font-size: 0.72rem;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 10px;
}
.how-to-use p {
  font-size: 0.92rem;
  line-height: 1.6;
  color: #4A3F52;
  margin: 0;
}

/* ── SECTION LABEL ── */
.section-label {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700; font-size: 0.68rem;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(12,9,13,0.08);
}

/* ── DIMENSION CARD ── */
.dimension {
  border: 1px solid rgba(12,9,13,0.10);
  border-radius: var(--radius);
  margin-bottom: 20px;
  overflow: hidden;
  page-break-inside: avoid;
}
.dimension-header {
  padding: 18px 24px 14px;
  background: var(--off);
  border-bottom: 1px solid rgba(12,9,13,0.08);
  display: flex;
  align-items: flex-start;
  gap: 16px;
}
.dimension-num {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800; font-size: 1.4rem;
  color: rgba(12,9,13,0.12);
  line-height: 1;
  min-width: 28px;
  padding-top: 2px;
}
.dimension-info {}
.dimension-name {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700; font-size: 1rem;
  color: var(--dark);
  margin-bottom: 5px;
  letter-spacing: -0.01em;
}
.dimension-desc {
  font-size: 0.87rem;
  line-height: 1.45;
  color: var(--muted);
  margin: 0;
}

/* ── SCORE TABLE ── */
.score-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.score-table thead tr {
  background: white;
}
.score-table th {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600; font-size: 0.65rem;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted);
  padding: 10px 14px 9px;
  text-align: left;
  border-bottom: 1px solid rgba(12,9,13,0.08);
}
.score-table th.score-col {
  text-align: center;
  width: 60px;
}
.score-table td {
  padding: 13px 14px;
  vertical-align: top;
  border-bottom: 1px solid rgba(12,9,13,0.06);
  color: #2A1F32;
  line-height: 1.45;
}
.score-table tr:last-child td {
  border-bottom: none;
}
.score-table td.score-col {
  text-align: center;
  vertical-align: middle;
}
.criterion-text {
  font-size: 0.88rem;
  margin-bottom: 3px;
}
.criterion-sub {
  font-size: 0.77rem;
  color: var(--muted);
}
.score-box {
  width: 32px; height: 32px;
  border: 1.5px solid rgba(12,9,13,0.18);
  border-radius: 6px;
  display: inline-block;
  vertical-align: middle;
}
.score-legend {
  display: flex; gap: 0;
  font-size: 0.72rem;
  color: var(--muted);
  font-family: 'Montserrat', sans-serif;
  font-weight: 500;
  padding: 10px 14px;
  background: white;
  border-top: 1px solid rgba(12,9,13,0.06);
  flex-wrap: wrap;
  gap: 16px;
}
.score-legend span { white-space: nowrap; }
.dimension-total {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px;
  background: var(--off);
  border-top: 1px solid rgba(12,9,13,0.08);
}
.dimension-total-label {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700; font-size: 0.72rem;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--muted);
}
.dimension-total-box {
  display: flex; align-items: center; gap: 8px;
}
.dimension-total-slash {
  font-size: 0.85rem; color: var(--muted);
}
.total-score-box {
  width: 44px; height: 36px;
  border: 2px solid rgba(12,9,13,0.18);
  border-radius: 8px;
  background: white;
}
.total-max {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700; font-size: 0.9rem;
  color: rgba(12,9,13,0.35);
}

/* ── SCORE BANDS ── */
.score-bands {
  display: flex; gap: 0;
  border-radius: var(--radius);
  overflow: hidden;
  margin: 32px 0;
  border: 1px solid rgba(12,9,13,0.08);
  page-break-inside: avoid;
}
.band {
  flex: 1;
  padding: 18px 16px;
}
.band + .band {
  border-left: 1px solid rgba(12,9,13,0.08);
}
.band-green { background: rgba(39,174,96,0.08); }
.band-yellow { background: rgba(249,194,46,0.10); }
.band-orange { background: rgba(241,89,70,0.08); }
.band-red { background: rgba(224,26,79,0.08); }
.band-range {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800; font-size: 1.3rem;
  letter-spacing: -0.02em;
  display: block;
  margin-bottom: 3px;
}
.band-green .band-range { color: #27ae60; }
.band-yellow .band-range { color: #c9920a; }
.band-orange .band-range { color: #d45f00; }
.band-red .band-range { color: var(--crimson); }
.band-label {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700; font-size: 0.68rem;
  letter-spacing: 0.1em; text-transform: uppercase;
  display: block;
  margin-bottom: 8px;
}
.band-green .band-label { color: #27ae60; }
.band-yellow .band-label { color: #c9920a; }
.band-orange .band-label { color: #d45f00; }
.band-red .band-label { color: var(--crimson); }
.band-desc {
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--muted);
}

/* ── QUESTION GROUPS (diagnostic) ── */
.question-group {
  margin-bottom: 36px;
  page-break-inside: avoid;
}
.question-group-title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700; font-size: 0.68rem;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 0;
  padding: 11px 0;
  border-bottom: 2px solid rgba(83,179,203,0.25);
  display: flex;
  align-items: center;
  gap: 10px;
}
.question-group-title .group-icon {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--teal);
  flex-shrink: 0;
}
.question {
  display: flex;
  gap: 16px;
  padding: 15px 0;
  border-bottom: 1px solid rgba(12,9,13,0.06);
  align-items: flex-start;
}
.question:last-child { border-bottom: none; }
.question-num {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700; font-size: 0.75rem;
  color: rgba(12,9,13,0.22);
  min-width: 22px;
  padding-top: 3px;
}
.question-body { flex: 1; }
.question-text {
  font-size: 0.93rem;
  line-height: 1.5;
  color: var(--dark);
  margin-bottom: 6px;
}
.question-context {
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--muted);
}
.question-answer {
  display: flex;
  gap: 6px;
  min-width: 100px;
  justify-content: flex-end;
  padding-top: 2px;
}
.yn-box {
  width: 38px; height: 30px;
  border: 1.5px solid rgba(12,9,13,0.14);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700; font-size: 0.68rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
}
.yn-box:hover { border-color: rgba(12,9,13,0.3); }
.yn-box.yes { background: rgba(224,26,79,0.08); border-color: var(--crimson); color: var(--crimson); }
.yn-box.no { background: rgba(39,174,96,0.08); border-color: #27ae60; color: #27ae60; }

/* ── SCORE DISPLAY (diagnostic) ── */
.score-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 28px;
  background: var(--off);
  border-radius: var(--radius);
  margin: 32px 0;
  page-break-inside: avoid;
}
.score-display-number {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800; font-size: 3.5rem;
  letter-spacing: -0.04em;
  color: var(--dark);
  line-height: 1;
}
.score-display-label {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700; font-size: 0.72rem;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.score-display-verdict {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800; font-size: 1.1rem;
  color: var(--dark);
}

/* ── NEXT STEPS (diagnostic) ── */
.next-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 24px 0;
}
.next-step {
  display: flex;
  gap: 16px;
  padding: 18px 20px;
  border-radius: var(--radius);
  border: 1px solid rgba(12,9,13,0.08);
  align-items: flex-start;
  page-break-inside: avoid;
}
.next-step-range {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800; font-size: 1.1rem;
  letter-spacing: -0.02em;
  min-width: 44px;
  padding-top: 2px;
}
.step-green { color: #27ae60; }
.step-yellow { color: #c9920a; }
.step-orange { color: #d45f00; }
.step-red { color: var(--crimson); }
.next-step-body {}
.next-step-title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700; font-size: 0.9rem;
  color: var(--dark);
  margin-bottom: 5px;
}
.next-step-desc {
  font-size: 0.87rem;
  line-height: 1.55;
  color: #4A3F52;
}

/* ── FRAMEWORK CARDS (build vs buy) ── */
.framework-cards {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 40px;
}
.framework-card {
  border: 1px solid rgba(12,9,13,0.10);
  border-radius: var(--radius);
  padding: 24px 28px;
  page-break-inside: avoid;
}
.framework-card-tag {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700; font-size: 0.65rem;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--coral);
  margin-bottom: 8px;
}
.framework-card-q {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700; font-size: 1.02rem;
  color: var(--dark);
  letter-spacing: -0.01em;
  margin-bottom: 12px;
  line-height: 1.3;
}
.framework-card-body {
  font-size: 0.9rem;
  line-height: 1.62;
  color: #4A3F52;
}
.framework-card-body p { margin-bottom: 0.7em; }
.framework-card-body p:last-child { margin-bottom: 0; }
.framework-card-body ul {
  list-style: none;
  margin: 0.6em 0;
  padding: 0;
}
.framework-card-body li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 0.5em;
  font-size: 0.88rem;
}
.framework-card-body li::before {
  content: "→";
  position: absolute; left: 0;
  color: var(--coral); font-weight: 700;
  font-size: 0.82rem;
}

/* ── TCO TABLE ── */
.tco-table {
  width: 100%;
  border-collapse: collapse;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(12,9,13,0.10);
  font-size: 0.88rem;
  margin-bottom: 32px;
  page-break-inside: avoid;
}
.tco-table th {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700; font-size: 0.68rem;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 12px 16px;
  text-align: left;
}
.tco-table th:first-child { background: var(--dark); color: rgba(255,255,255,0.75); }
.tco-table th:not(:first-child) { background: var(--off); color: var(--muted); }
.tco-table td {
  padding: 13px 16px;
  border-bottom: 1px solid rgba(12,9,13,0.07);
  color: #2A1F32;
  line-height: 1.45;
  vertical-align: top;
}
.tco-table tr:last-child td { border-bottom: none; }
.tco-table tr:nth-child(even) td { background: rgba(247,245,248,0.5); }
.tco-col-label {
  font-weight: 600;
  color: var(--dark);
}
.tco-flag {
  color: var(--coral);
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 0.78rem;
}

/* ── DECISION MATRIX ── */
.decision-table {
  width: 100%;
  border-collapse: collapse;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(12,9,13,0.10);
  font-size: 0.88rem;
  margin-bottom: 32px;
  page-break-inside: avoid;
}
.decision-table th {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700; font-size: 0.68rem;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 12px 16px;
  background: var(--dark); color: rgba(255,255,255,0.7);
  text-align: left;
}
.decision-table td {
  padding: 13px 16px;
  border-bottom: 1px solid rgba(12,9,13,0.07);
  color: #2A1F32;
  line-height: 1.45;
  vertical-align: top;
}
.decision-table tr:last-child td { border-bottom: none; }
.decision-table tr:nth-child(even) td { background: rgba(247,245,248,0.5); }
.verdict { font-family: 'Montserrat', sans-serif; font-weight: 800; font-size: 0.82rem; letter-spacing: 0.04em; }
.verdict-build { color: #27ae60; }
.verdict-buy { color: #2980b9; }
.verdict-partner { color: #8e44ad; }
.verdict-avoid { color: var(--crimson); }
.verdict-layer { color: #2d7d5a; }

/* ── PULLQUOTE ── */
.pullquote {
  border-left: 3px solid var(--coral);
  padding: 16px 24px;
  margin: 32px 0;
  background: rgba(241,89,70,0.04);
  border-radius: 0 var(--radius) var(--radius) 0;
  page-break-inside: avoid;
}
.pullquote p {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.02rem;
  line-height: 1.6;
  color: var(--dark);
  font-style: italic;
  margin: 0;
}
.pullquote cite {
  display: block;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600; font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-top: 10px;
  font-style: normal;
}

/* ── GUIDE FOOTER CTA ── */
.guide-cta {
  background: var(--dark);
  border-radius: var(--radius-lg);
  padding: 36px 40px;
  margin-top: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
.guide-cta-text {}
.guide-cta h3 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800; font-size: 1.25rem;
  color: var(--white);
  margin-bottom: 8px;
  letter-spacing: -0.015em;
}
.guide-cta p {
  font-size: 0.9rem;
  line-height: 1.55;
  color: rgba(255,255,255,0.55);
  margin: 0;
}
.cta-button {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--coral);
  color: var(--white);
  font-family: 'Montserrat', sans-serif;
  font-weight: 700; font-size: 0.88rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  padding: 13px 26px;
  border-radius: 100px;
  white-space: nowrap;
  transition: background 0.2s, gap 0.2s;
}
.cta-button:hover { background: var(--crimson); gap: 12px; }

/* ── ATTRIBUTION ── */
.guide-attribution {
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--muted);
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid rgba(12,9,13,0.08);
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .guide-hero { padding: 120px 20px 44px; }
  .guide-body { padding: 0 20px 64px; }
  .score-bands { flex-direction: column; }
  .band + .band { border-left: none; border-top: 1px solid rgba(12,9,13,0.08); }
  .guide-cta { flex-direction: column; padding: 28px 24px; }
  .framework-card { padding: 20px 20px; }
  .question-answer { min-width: auto; }
  .score-table th.score-col,
  .score-table td.score-col { width: 48px; }
}

/* ── GATE ── */
.gate-wrapper { position: relative; }
.gate-gated {
  max-height: 200px;
  overflow: hidden;
  position: relative;
  filter: blur(3px);
  opacity: 0.4;
  pointer-events: none;
  user-select: none;
}
.gate-gated::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, rgba(255,255,255,0.9) 55%, #fff 100%);
}
.gate-wrapper.unlocked .gate-gated {
  max-height: none;
  overflow: visible;
  filter: none;
  opacity: 1;
  pointer-events: auto;
  user-select: auto;
}
.gate-wrapper.unlocked .gate-gated::after { display: none; }
.gate-wrapper.unlocked .gate-card { display: none; }
.gate-card {
  position: relative;
  z-index: 10;
  margin: 8px 0 32px;
}
.gate-card-inner {
  background: var(--dark);
  border-radius: var(--radius-lg);
  padding: 36px 40px;
  text-align: center;
}
.gate-eyebrow {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700; font-size: 0.68rem;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 12px;
}
.gate-title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800; font-size: 1.4rem;
  color: var(--white);
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}
.gate-desc {
  font-size: 0.92rem;
  color: rgba(255,255,255,0.5);
  margin-bottom: 24px;
  line-height: 1.55;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}
.gate-input-row {
  display: flex;
  gap: 10px;
  max-width: 460px;
  margin: 0 auto 12px;
}
.gate-input {
  flex: 1;
  padding: 12px 20px;
  border-radius: 100px;
  border: 1.5px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.08);
  color: var(--white);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}
.gate-input::placeholder { color: rgba(255,255,255,0.3); }
.gate-input:focus { border-color: var(--teal); }
.gate-submit {
  padding: 12px 24px;
  border-radius: 100px;
  background: var(--coral);
  color: var(--white);
  font-family: 'Montserrat', sans-serif;
  font-weight: 700; font-size: 0.88rem;
  border: none; cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
}
.gate-submit:hover { background: var(--crimson); }
.gate-fine {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.25);
  margin: 0;
}
@media (max-width: 768px) {
  .gate-card-inner { padding: 28px 20px; }
  .gate-input-row { flex-direction: column; }
  .gate-title { font-size: 1.2rem; }
}

/* ── PRINT ── */
@media print {
  nav, footer, .back-link, .guide-cta, .nav-toggle { display: none !important; }
  body { background: white; }
  .guide-hero { padding: 28px 0 24px; }
  .guide-body { padding: 0 0 40px; }
  .guide-title { font-size: 22pt; }
  .guide-intro { font-size: 10pt; }
  .how-to-use, .dimension, .question-group, .framework-card,
  .score-bands, .next-step, .tco-table, .decision-table, .pullquote { page-break-inside: avoid; }
  h2, h3, .section-label, .dimension-header, .question-group-title { page-break-after: avoid; }
  .score-display { page-break-inside: avoid; }
  a[href]::after { content: none !important; }
  .guide-attribution { page-break-inside: avoid; }
  /* Always show full content when printing */
  .gate-card { display: none !important; }
  .gate-gated {
    max-height: none !important; overflow: visible !important;
    filter: none !important; opacity: 1 !important;
    pointer-events: auto !important; user-select: auto !important;
  }
  .gate-gated::after { display: none !important; }
}
