/* =============================================================================
   blog.css — Article / guide page styles for mytaskslistsandschedules.com
   Layered on top of style.css. Reuses the same design tokens defined in
   style.css :root (--primary #6C8AC1, --radius 18px, Inter font, soft
   blue-tinted shadows). Mobile-first, no horizontal overflow.

   Scope: guide pages at /guides/<slug>/index.html. The shared navbar, footer,
   store badges and language picker come from style.css; this file only adds the
   long-form article layout classes listed in the build contract:
     .guide-wrap .guide-breadcrumb .guide-hero .guide-meta .guide-toc
     .guide-body .guide-table .guide-cta .guide-faq .guide-faq-item
     .guide-related
   ============================================================================= */

/* ── Article container ──────────────────────────────────────────────────────
   Caps reading width for comfortable line length on tablet / desktop. The
   Scaffold-equivalent (body/footer) stays full-bleed; only this wrapper is
   constrained — no other width caps needed (per build contract).            */
.guide-wrap {
  max-width: 760px;
  margin: 0 auto;
  /* Top padding clears the fixed .nav-header; generous side gutters on mobile. */
  padding: 120px 22px 80px;
}

@media (min-width: 700px) {
  .guide-wrap {
    padding: 140px 28px 96px;
  }
}

/* ── Breadcrumb ─────────────────────────────────────────────────────────── */
.guide-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-sec);
  margin-bottom: 22px;
}
.guide-breadcrumb a {
  color: var(--text-sec);
  text-decoration: none;
  transition: color 0.2s;
}
.guide-breadcrumb a:hover {
  color: var(--primary);
}
.guide-breadcrumb .sep {
  opacity: 0.5;
  user-select: none;
}
.guide-breadcrumb [aria-current="page"] {
  color: var(--text);
  font-weight: 600;
}

/* ── Hero / title block ─────────────────────────────────────────────────── */
.guide-hero {
  margin-bottom: 30px;
}
.guide-hero .section-label {
  /* reuse homepage pill label look */
  display: inline-block;
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  margin-bottom: 14px;
  background: var(--primary-light);
  padding: 5px 14px;
  border-radius: 100px;
}
.guide-hero h1 {
  font-size: clamp(30px, 5vw, 46px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -1.4px;
  color: var(--text);
  margin-bottom: 16px;
  overflow-wrap: break-word;
  word-break: break-word;
}
.guide-hero .guide-lede {
  font-size: clamp(17px, 2.2vw, 20px);
  line-height: 1.7;
  color: var(--text-sec);
  overflow-wrap: break-word;
}

/* ── Meta row (author / date / read time) ───────────────────────────────── */
.guide-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  font-size: 13px;
  color: var(--text-sec);
  margin-bottom: 36px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.guide-meta .guide-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.guide-meta strong {
  color: var(--text);
  font-weight: 600;
}

/* ── Table of contents ──────────────────────────────────────────────────── */
.guide-toc {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin: 0 0 40px;
}
.guide-toc-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-sec);
  margin-bottom: 12px;
}
.guide-toc ol,
.guide-toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: toc;
}
.guide-toc li {
  margin: 0;
}
.guide-toc li + li {
  margin-top: 8px;
}
.guide-toc a {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  color: var(--primary-dark);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.5;
  transition: color 0.2s;
}
.guide-toc a::before {
  counter-increment: toc;
  content: counter(toc);
  flex-shrink: 0;
  min-width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-light);
  border-radius: 7px;
}
.guide-toc a:hover {
  color: var(--primary);
  text-decoration: underline;
}

/* ── Article body typography ────────────────────────────────────────────── */
.guide-body {
  font-size: 17px;
  line-height: 1.8;
  color: var(--text);
}
.guide-body > * + * {
  margin-top: 1.15em;
}

.guide-body h2 {
  font-size: clamp(24px, 3.4vw, 32px);
  font-weight: 800;
  letter-spacing: -0.8px;
  line-height: 1.2;
  color: var(--text);
  margin-top: 2em;
  margin-bottom: 0.2em;
  scroll-margin-top: 90px; /* anchor offset under fixed navbar */
  overflow-wrap: break-word;
}
.guide-body h3 {
  font-size: clamp(19px, 2.6vw, 23px);
  font-weight: 700;
  letter-spacing: -0.4px;
  line-height: 1.3;
  color: var(--text);
  margin-top: 1.6em;
  margin-bottom: 0.1em;
  scroll-margin-top: 90px;
  overflow-wrap: break-word;
}

.guide-body p {
  overflow-wrap: break-word;
  word-break: break-word;
}

.guide-body a {
  color: var(--primary-dark);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
  transition: color 0.2s;
}
.guide-body a:hover {
  color: var(--primary);
}

.guide-body strong {
  font-weight: 700;
  color: var(--text);
}

/* Lists */
.guide-body ul,
.guide-body ol {
  padding-left: 1.4em;
}
.guide-body li {
  margin-top: 0.5em;
  line-height: 1.75;
  overflow-wrap: break-word;
}
.guide-body li::marker {
  color: var(--primary);
}
.guide-body ul ul,
.guide-body ul ol,
.guide-body ol ul,
.guide-body ol ol {
  margin-top: 0.4em;
}

/* Inline code */
.guide-body code {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    monospace;
  font-size: 0.88em;
  background: var(--primary-light);
  color: var(--primary-dark);
  padding: 0.12em 0.4em;
  border-radius: 6px;
}

/* Horizontal rule between sections */
.guide-body hr {
  border: 0;
  height: 1px;
  background: var(--border);
  margin: 2.4em 0;
}

/* Images / figures inside articles */
.guide-body img {
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}
.guide-body figure {
  margin: 1.6em 0;
}
.guide-body figcaption {
  margin-top: 10px;
  font-size: 13px;
  color: var(--text-sec);
  text-align: center;
}

/* ── Blockquote ─────────────────────────────────────────────────────────── */
.guide-body blockquote {
  margin: 1.6em 0;
  padding: 18px 24px;
  border-left: 4px solid var(--primary);
  background: var(--primary-light);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text);
  font-size: 17px;
  line-height: 1.7;
  font-style: italic;
}
.guide-body blockquote p {
  margin: 0;
}
.guide-body blockquote p + p {
  margin-top: 0.8em;
}
.guide-body blockquote cite {
  display: block;
  margin-top: 10px;
  font-size: 13px;
  font-style: normal;
  font-weight: 600;
  color: var(--text-sec);
}

/* ── Tables ─────────────────────────────────────────────────────────────────
   Wrap each table in <div class="guide-table-wrap"> for horizontal scroll on
   narrow screens. The table itself uses .guide-table.                         */
.guide-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.8em 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.guide-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  background: var(--bg);
  /* keep columns readable; horizontal scroll kicks in below this */
  min-width: 480px;
}
.guide-table thead th {
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  text-align: left;
  padding: 13px 16px;
  font-size: 14px;
  letter-spacing: 0.2px;
  white-space: nowrap;
}
.guide-table th:first-child {
  border-top-left-radius: var(--radius);
}
.guide-table th:last-child {
  border-top-right-radius: var(--radius);
}
.guide-table td {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  vertical-align: top;
  line-height: 1.6;
  color: var(--text);
}
.guide-table tbody tr:nth-child(even) td {
  background: var(--bg-alt);
}
.guide-table tbody tr:hover td {
  background: var(--primary-light);
}
/* Optional first-column label emphasis */
.guide-table tbody th[scope="row"] {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  text-align: left;
  font-weight: 600;
  color: var(--text);
  background: var(--bg-alt);
  white-space: nowrap;
}

/* ── Download CTA block ─────────────────────────────────────────────────────
   Prominent centered card with both store badges. Mirrors the homepage hero
   gradient so it reads as the same brand.                                     */
.guide-cta {
  margin: 3em 0;
  text-align: center;
  padding: 40px 28px;
  border-radius: var(--radius);
  color: #fff;
  background: linear-gradient(
    145deg,
    #2c4570 0%,
    #4e6a9a 38%,
    #6c8ac1 68%,
    #8ba3cf 100%
  );
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}
.guide-cta h2,
.guide-cta h3 {
  color: #fff;
  font-weight: 800;
  letter-spacing: -0.6px;
  line-height: 1.2;
  font-size: clamp(22px, 3.4vw, 30px);
  margin: 0 0 10px;
}
.guide-cta p {
  color: rgba(255, 255, 255, 0.82);
  font-size: 16px;
  line-height: 1.7;
  max-width: 460px;
  margin: 0 auto 26px;
}
.guide-cta-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  align-items: center;
}
/* Badges (.gplay-badge / .appstore-badge) inherit their look from style.css;
   we only ensure they don't stretch oddly here. */
.guide-cta-badges .gplay-badge,
.guide-cta-badges .appstore-badge {
  flex: 0 0 auto;
}
.guide-cta-note {
  display: block;
  margin-top: 18px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.65);
}

/* ── FAQ ─────────────────────────────────────────────────────────────────────
   Works as plain blocks, or as <details>/<summary> for an accordion. Both
   styled.                                                                      */
.guide-faq {
  margin: 2.6em 0 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.guide-faq-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

/* Accordion form: <details class="guide-faq-item"><summary>…</summary>…</details> */
details.guide-faq-item > summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 22px;
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
details.guide-faq-item > summary::-webkit-details-marker {
  display: none;
}
details.guide-faq-item > summary::after {
  content: "+";
  flex-shrink: 0;
  font-size: 22px;
  font-weight: 400;
  line-height: 1;
  color: var(--primary);
  transition: transform 0.25s ease;
}
details.guide-faq-item[open] > summary::after {
  transform: rotate(45deg);
}
details.guide-faq-item > summary:hover {
  color: var(--primary);
}
details.guide-faq-item > *:not(summary) {
  padding: 0 22px 20px;
  margin: 0;
  color: var(--text-sec);
  font-size: 16px;
  line-height: 1.75;
}

/* Simple (non-accordion) form: heading + paragraph inside .guide-faq-item */
.guide-faq-item > h3 {
  margin: 0;
  padding: 18px 22px 6px;
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
}
.guide-faq-item > p {
  margin: 0;
  padding: 0 22px 20px;
  color: var(--text-sec);
  font-size: 16px;
  line-height: 1.75;
}

/* ── Related guides card grid ───────────────────────────────────────────── */
.guide-related {
  margin: 3.4em 0 0;
  padding-top: 2.4em;
  border-top: 1px solid var(--border);
}
.guide-related-title {
  font-size: clamp(20px, 3vw, 26px);
  font-weight: 800;
  letter-spacing: -0.6px;
  color: var(--text);
  margin-bottom: 22px;
}
.guide-related-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 560px) {
  .guide-related-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
.guide-related-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 22px 24px;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.guide-related-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}
.guide-related-card .guide-related-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.9px;
  text-transform: uppercase;
  color: var(--primary);
}
.guide-related-card h3 {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.3px;
  color: var(--text);
  margin: 0;
}
.guide-related-card p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-sec);
  margin: 0;
}
.guide-related-card .guide-related-arrow {
  margin-top: auto;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
}

/* ── Copy-friendly plain template block ─────────────────────────────────────
   For pages that present a copy-paste template (planner, checklist, daily plan
   etc.). Monospace + pre-wrap so users can select the whole block and paste it
   into My Tasks, Notes or any plain-text field with formatting preserved. Pair
   with .tpl-plain-label above it for a quiet "Copy this template" caption.    */
.tpl-plain {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  margin: 1.4em 0;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    monospace;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text);
  white-space: pre-wrap;
  overflow-wrap: break-word;
  word-break: break-word;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  tab-size: 2;
  box-shadow: var(--shadow-sm);
}
.tpl-plain-label {
  display: block;
  margin: 1.4em 0 -0.6em;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-sec);
}

/* ── Planner / grid template helper ─────────────────────────────────────────
   Optional convenience for laying out planner cards (time blocks, day columns)
   when a full data table (.guide-table) would be overkill. Falls back to a
   single column on narrow screens. Reuse .guide-table for tabular data.       */
.tpl-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin: 1.6em 0;
}
@media (min-width: 560px) {
  .tpl-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 760px) {
  .tpl-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.tpl-grid > * {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
}
.tpl-grid > * > :first-child {
  margin-top: 0;
}
.tpl-grid > * > :last-child {
  margin-bottom: 0;
}

/* ── Print stylesheet ───────────────────────────────────────────────────────
   When a user prints or saves a template page to PDF, strip the chrome (nav,
   footer, CTAs, related links, sticky bar) and let the article fill the page
   in plain black-on-white. Tables and copy blocks keep visible borders so the
   template stays legible on paper.                                            */
@media print {
  .nav-header,
  .footer,
  .guide-cta,
  .guide-related,
  .sticky-mobile-cta {
    display: none !important;
  }

  .guide-wrap {
    max-width: none;
    width: 100%;
    margin: 0;
    padding: 0;
  }

  body {
    color: #000;
    background: #fff;
  }

  .guide-body,
  .guide-body h2,
  .guide-body h3,
  .guide-body p,
  .guide-body li,
  .guide-hero h1,
  .guide-hero .guide-lede {
    color: #000;
  }

  /* Tables: print with visible borders on every cell, no scroll container. */
  .guide-table-wrap {
    overflow: visible;
    border: 0;
    box-shadow: none;
    margin: 0.8em 0;
  }
  .guide-table {
    min-width: 0;
    width: 100%;
    background: #fff;
    border: 1px solid #000;
  }
  .guide-table thead th {
    background: #fff;
    color: #000;
    border: 1px solid #000;
  }
  .guide-table td,
  .guide-table tbody th[scope="row"] {
    background: #fff !important;
    color: #000;
    border: 1px solid #000;
  }

  /* Copy block prints as a bordered, plain box. */
  .tpl-plain {
    background: #fff;
    color: #000;
    border: 1px solid #000;
    box-shadow: none;
    overflow: visible;
  }
  .tpl-plain-label {
    color: #000;
  }

  /* Planner grid prints with visible cell borders. */
  .tpl-grid > * {
    background: #fff;
    color: #000;
    border: 1px solid #000;
  }

  /* Avoid orphaned headings / split rows across page breaks. */
  .guide-body h2,
  .guide-body h3 {
    page-break-after: avoid;
    break-after: avoid;
  }
  .guide-table tr,
  .tpl-plain,
  .tpl-grid > * {
    page-break-inside: avoid;
    break-inside: avoid;
  }
}
