/*
 * Kreova's guides (kreova.app/guides/..., TODO 63). A guide loads the
 * homepage's styles.css and the landing pages' landing.css first and reuses
 * their header, composer, pricing row, FAQ and footer; this file adds only
 * the reading layout: a light hero, a contents box, numbered steps, figures
 * with captions, the example prompt, the roles table and the callouts.
 * No motion beyond the homepage's .reveal fade, which app.js skips under
 * reduced motion.
 */

.guide-hero {
  padding: calc(var(--header-height) + 64px) 0 40px;
  background:
    radial-gradient(circle at 85% 0%, rgba(36, 111, 242, 0.1), transparent 42%),
    linear-gradient(180deg, #f6f9ff 0%, #ffffff 100%);
}

.guide-narrow {
  width: min(calc(100% - 48px), 780px);
  margin: 0 auto;
}

.guide-wide {
  width: min(calc(100% - 48px), 1080px);
  margin: 0 auto;
}

.guide-title {
  margin: 0 0 20px;
  font-size: clamp(2.3rem, 4.4vw, 3.6rem);
  font-weight: 650;
  letter-spacing: -0.045em;
  line-height: 1.06;
}

.guide-lead {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.62;
}

.guide-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 0 0 30px;
  color: var(--muted-2);
  font-size: 14px;
}

.guide-meta i {
  margin-right: 6px;
  color: var(--blue);
}

.guide-cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 22px;
}

/* Contents ---------------------------------------------------------------- */
.guide-toc {
  margin: 8px 0 0;
  padding: 24px 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-blue);
}

.guide-toc h2 {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.guide-toc ol {
  margin: 0;
  padding-left: 22px;
  columns: 2;
  column-gap: 36px;
}

.guide-toc li {
  margin: 0 0 8px;
  break-inside: avoid;
}

.guide-toc a {
  color: var(--ink);
  font-weight: 560;
  text-decoration: none;
}

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

/* The article ------------------------------------------------------------- */
.guide-body {
  padding: 40px 0 40px;
}

.guide-step {
  padding: 48px 0 8px;
}

.guide-step-head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
}

.guide-step-number {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-top: 2px;
  border-radius: 12px;
  color: #fff;
  background: var(--blue);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0;
}

.guide-step h2,
.guide-section h2 {
  margin: 0;
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  font-weight: 640;
  letter-spacing: -0.035em;
  line-height: 1.15;
}

.guide-section {
  padding: 48px 0 8px;
}

.guide-section h2 {
  margin-bottom: 18px;
}

.guide-step h3,
.guide-section h3 {
  margin: 30px 0 10px;
  font-size: 20px;
  font-weight: 650;
}

.guide-step p,
.guide-section p,
.guide-step li,
.guide-section li {
  color: #2b3a55;
  font-size: 17px;
  line-height: 1.72;
}

.guide-step ul,
.guide-section ul,
.guide-step ol,
.guide-section ol {
  margin: 0 0 18px;
  padding-left: 24px;
}

.guide-step li,
.guide-section li {
  margin-bottom: 8px;
}

.guide-step strong,
.guide-section strong {
  color: var(--ink);
}

.guide-step a:not(.button),
.guide-section a:not(.button) {
  color: var(--blue);
  font-weight: 560;
}

/* Callouts ---------------------------------------------------------------- */
.guide-callout {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin: 24px 0;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  border-radius: var(--radius-sm);
  background: var(--paper-blue);
}

.guide-callout > i {
  flex: none;
  margin-top: 5px;
  color: var(--blue);
}

.guide-callout p {
  margin: 0;
  font-size: 16px;
}

.guide-callout.is-example {
  border-left-color: var(--green);
  background: #f2fbf6;
}

.guide-callout.is-example > i {
  color: var(--green);
}

/* Figures ----------------------------------------------------------------- */
.guide-figure {
  margin: 30px 0 34px;
}

.guide-figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--night);
  box-shadow: var(--shadow-md);
}

.guide-figure figcaption {
  margin-top: 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.guide-figure-pair {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 0.75fr);
  align-items: start;
  gap: 24px;
  margin: 30px 0 34px;
}

.guide-figure-pair .guide-figure {
  margin: 0;
}

/* Two pictures of equal weight, such as the same record seen by two roles. */
.guide-figure-pair.is-even {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.guide-sample-badge {
  display: inline-block;
  margin-right: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  color: #0e6b43;
  background: #dcf5e8;
  font-size: 12px;
  font-weight: 700;
}

/* Roles table ------------------------------------------------------------- */
.guide-table-wrap {
  margin: 22px 0 26px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.guide-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 15.5px;
}

.guide-table th,
.guide-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  line-height: 1.55;
}

.guide-table th {
  color: var(--muted);
  background: var(--paper-blue);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.guide-table tr:last-child td {
  border-bottom: 0;
}

.guide-table td:first-child {
  color: var(--ink);
  font-weight: 650;
  white-space: nowrap;
}

/* The example prompt ------------------------------------------------------ */
.guide-prompt {
  margin: 24px 0 14px;
  padding: 26px 28px 10px;
  border: 1px solid #1f2d47;
  border-radius: var(--radius);
  color: #dbe5f7;
  background: var(--night);
  box-shadow: var(--shadow-md);
}

.guide-prompt-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px !important;
  color: #7fb0ff !important;
  font-size: 12px !important;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.guide-prompt p,
.guide-prompt li {
  color: #dbe5f7;
  font-size: 15.5px;
  line-height: 1.65;
}

.guide-prompt h3 {
  margin: 18px 0 6px;
  color: #ffffff;
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: 0;
}

.guide-prompt ul {
  margin: 0 0 12px;
  padding-left: 20px;
}

.guide-prompt li {
  margin-bottom: 4px;
}

.guide-prompt-note {
  margin-top: 0 !important;
  color: var(--muted) !important;
  font-size: 14px !important;
}

/* Follow-up requests, as they were typed ---------------------------------- */
.guide-chat {
  margin: 22px 0 26px;
  padding: 0;
  list-style: none;
}

.guide-chat li {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
  margin: 0 0 14px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.guide-chat q {
  color: var(--ink);
  font-weight: 600;
  quotes: "\201C" "\201D";
}

.guide-chat small {
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.55;
}

/* Checklist --------------------------------------------------------------- */
.guide-checklist {
  padding-left: 0 !important;
  list-style: none;
}

.guide-checklist li {
  position: relative;
  padding-left: 32px;
}

.guide-checklist li::before {
  content: "\2713";
  position: absolute;
  top: 1px;
  left: 0;
  display: inline-grid;
  place-items: center;
  width: 21px;
  height: 21px;
  border-radius: 6px;
  color: #fff;
  background: var(--green);
  font-size: 13px;
  font-weight: 800;
}

/* Pricing row inside the article ------------------------------------------ */
.guide-section .lp-price-grid {
  margin: 22px 0 16px;
}

.guide-section .lp-price-grid p {
  font-size: 14.5px;
  line-height: 1.6;
}

/* Related pages ----------------------------------------------------------- */
.guide-related {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 22px 0 0;
}

.guide-related a {
  display: block;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink) !important;
  background: #fff;
  text-decoration: none;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.guide-related a:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
}

.guide-related b {
  display: block;
  margin-bottom: 4px;
  font-size: 16.5px;
}

.guide-related span {
  color: var(--muted);
  font-size: 14.5px;
  font-weight: 400;
  line-height: 1.5;
}

/* The real-app section on a niche landing page (/cleaning) ----------------- */
.lp-app-section {
  padding: 96px 0 72px;
  background: linear-gradient(180deg, #ffffff 0%, var(--paper-blue) 100%);
}

.lp-app-section .lp-app-title {
  margin: 0 0 18px;
  font-size: clamp(2rem, 3.6vw, 2.9rem);
  font-weight: 640;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.lp-app-section h3 {
  margin: 34px 0 10px;
  font-size: 21px;
  font-weight: 650;
}

.lp-app-section p,
.lp-app-section li {
  color: #2b3a55;
  font-size: 17px;
  line-height: 1.72;
}

.lp-app-section ul {
  margin: 0 0 12px;
  padding-left: 22px;
}

.lp-app-section .guide-prompt p,
.lp-app-section .guide-prompt li {
  color: #dbe5f7;
  font-size: 15.5px;
  line-height: 1.65;
}

.lp-price-note {
  max-width: 760px;
  margin: 14px auto 0;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.6;
  text-align: center;
}

@media (max-width: 860px) {
  .guide-figure-pair {
    grid-template-columns: minmax(0, 1fr);
  }

  .guide-figure-pair .guide-figure:last-child {
    max-width: 380px;
  }

  .guide-figure-pair.is-even .guide-figure:last-child {
    max-width: none;
  }
}

@media (max-width: 640px) {
  .guide-hero {
    padding-top: calc(var(--header-height) + 36px);
  }

  .guide-narrow,
  .guide-wide {
    width: calc(100% - 32px);
  }

  .guide-lead {
    font-size: 17px;
  }

  .guide-toc {
    padding: 20px 20px;
  }

  .guide-toc ol {
    columns: 1;
  }

  .guide-step,
  .guide-section {
    padding-top: 36px;
  }

  .guide-step-number {
    width: 38px;
    height: 38px;
    font-size: 16px;
  }

  .guide-step p,
  .guide-section p,
  .guide-step li,
  .guide-section li {
    font-size: 16px;
  }

  .guide-prompt {
    padding: 20px 18px 6px;
  }

  .guide-related {
    grid-template-columns: minmax(0, 1fr);
  }
}
