/*
 * DocForge — Guide Stylesheet
 * Scope: /guides/*.html
 * Design system: forge-black + forge-amber on white content ground
 * ---------------------------------------------------------------- */

/* ── Reset & base ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui,
               'Helvetica Neue', Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  color: #2d2d45;
  background: #fff;
  -webkit-font-smoothing: antialiased;
}

/* ── Site header ──────────────────────────────────────────────── */
.site-header {
  background: #0e0e1a;
  padding: 0.875rem 2rem;
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 2px solid #d4891a;
}

.logo {
  color: #fff;
  text-decoration: none;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.logo::before {
  content: '◆ ';
  color: #d4891a;
}

/* ── Guide layout ─────────────────────────────────────────────── */
.guide-main {
  max-width: 760px;
  margin: 0 auto;
  padding: 3rem 2rem 5rem;
}

/* ── Typography ───────────────────────────────────────────────── */
h1 {
  font-size: clamp(1.65rem, 4vw, 2.1rem);
  font-weight: 800;
  line-height: 1.2;
  color: #0e0e1a;
  margin: 0 0 1.25rem;
  letter-spacing: -0.025em;
}

.guide-intro {
  font-size: 1.075rem;
  color: #3e3e5a;
  line-height: 1.72;
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #e4e4ee;
}

h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0e0e1a;
  margin: 2.75rem 0 0.75rem;
  letter-spacing: -0.015em;
  padding-top: 0.25rem;
}

/* First h2 after the intro needs less top space */
.guide-intro + h2,
.guide-intro + * + h2 {
  margin-top: 1.5rem;
}

h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #0e0e1a;
  margin: 1.75rem 0 0.5rem;
}

p {
  margin: 0 0 1rem;
}

ul, ol {
  margin: 0.5rem 0 1.25rem 1.35rem;
  padding: 0;
}

li {
  margin-bottom: 0.55rem;
  line-height: 1.65;
}

strong {
  color: #0e0e1a;
  font-weight: 700;
}

/* ── Tables ───────────────────────────────────────────────────── */
.guide-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0 2rem;
  font-size: 0.875rem;
  line-height: 1.45;
}

.guide-table caption {
  text-align: left;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #8888a4;
  padding-bottom: 0.5rem;
}

.guide-table thead tr {
  background: #0e0e1a;
}

.guide-table th {
  padding: 0.6rem 0.9rem;
  text-align: left;
  color: #fff;
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.guide-table th:first-child { border-radius: 4px 0 0 0; }
.guide-table th:last-child  { border-radius: 0 4px 0 0; }

.guide-table td {
  padding: 0.575rem 0.9rem;
  border-bottom: 1px solid #e8e8f2;
  vertical-align: top;
  color: #2d2d45;
}

.guide-table tbody tr:nth-child(even) td {
  background: #f5f5fa;
}

.guide-table tbody tr:last-child td {
  border-bottom: 2px solid #0e0e1a;
}

/* ── Inline CTA — the signature element ──────────────────────── */
/*
 * Placed at moments of peak complexity in the content.
 * "Annealed amber" — warm metal cooling: signals the brand, not an ad.
 * The ◆ prefix makes it unmistakably part of the DocForge system.
 */
.cta-inline {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.75rem 0;
  padding: 0.95rem 1.25rem;
  background: #fdf6e6;
  border-left: 4px solid #d4891a;
  border-radius: 0 6px 6px 0;
  text-decoration: none;
}

.cta-inline::before {
  content: '◆';
  color: #d4891a;
  font-size: 0.8rem;
  flex-shrink: 0;
  margin-top: 0.05em;
}

.cta-inline p {
  margin: 0;
  font-size: 0.925rem;
  color: #3a2e00;
  line-height: 1.5;
}

.btn-inline {
  color: #b8720e;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.12s, color 0.12s;
}

.btn-inline:hover {
  color: #8c5500;
  border-bottom-color: #8c5500;
}

/* ── Disclaimer ───────────────────────────────────────────────── */
.disclaimer-box {
  margin: 2.5rem 0 1.5rem;
  padding: 1.1rem 1.375rem;
  background: #f5f5fa;
  border-radius: 6px;
  font-size: 0.845rem;
  color: #55556a;
  line-height: 1.6;
  border-left: 3px solid #d0d0e0;
}

.disclaimer-box strong {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.825rem;
  color: #2d2d45;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ── Bottom CTA block ─────────────────────────────────────────── */
.cta-block {
  margin: 3rem 0 0;
  padding: 2.5rem 2.25rem;
  background: #0e0e1a;
  border-radius: 10px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Forge-amber top accent line */
.cta-block::before {
  content: '';
  display: block;
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: #d4891a;
}

.cta-block h2 {
  color: #fff;
  font-size: 1.35rem;
  margin: 0 0 0.75rem;
  padding-top: 0;
  letter-spacing: -0.015em;
}

.cta-block p {
  color: #a0a0c0;
  font-size: 0.925rem;
  max-width: 480px;
  margin: 0 auto 1.75rem;
  line-height: 1.6;
}

.btn-primary {
  display: inline-block;
  background: #d4891a;
  color: #fff;
  font-weight: 700;
  font-size: 0.975rem;
  padding: 0.875rem 2.25rem;
  border-radius: 6px;
  text-decoration: none;
  letter-spacing: -0.01em;
  transition: background 0.15s, transform 0.1s;
}

.btn-primary:hover {
  background: #b8720e;
  color: #fff;
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
}

/* ── Footer ───────────────────────────────────────────────────── */
.site-footer {
  background: #0e0e1a;
  color: #6868848;
  text-align: center;
  padding: 1.5rem 2rem;
  font-size: 0.78rem;
  margin-top: 4rem;
  color: #686884;
}

/* ── Sample letter (pre block) ────────────────────────────────── */
.sample-letter {
  background: #f8f8fd;
  border: 1px solid #dcdcec;
  border-left: 3px solid #d4891a;
  border-radius: 0 6px 6px 0;
  padding: 1.5rem 1.75rem;
  margin: 1.25rem 0 1.75rem;
  overflow-x: auto;
}

.sample-letter pre {
  font-family: 'SF Mono', 'Fira Code', 'Fira Mono', 'Consolas',
               'Courier New', Courier, monospace;
  font-size: 0.795rem;
  line-height: 1.65;
  color: #2d2d45;
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
}

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 640px) {
  .site-header { padding: 0.875rem 1.25rem; }

  .guide-main { padding: 2rem 1.25rem 3.5rem; }

  h1 { font-size: 1.55rem; }
  h2 { font-size: 1.125rem; margin-top: 2rem; }

  .guide-table { font-size: 0.78rem; display: block; overflow-x: auto; }
  .guide-table th,
  .guide-table td { padding: 0.5rem 0.625rem; }

  .cta-inline { padding: 0.8rem 1rem; }
  .cta-inline p { font-size: 0.875rem; }

  .cta-block { padding: 1.75rem 1.25rem 2rem; border-radius: 8px; }
  .cta-block h2 { font-size: 1.15rem; }

  .sample-letter { padding: 1rem 1.1rem; }
  .sample-letter pre { font-size: 0.72rem; }
}

@media (prefers-reduced-motion: reduce) {
  .btn-primary { transition: none; }
  .btn-inline  { transition: none; }
}
