/* Guides (index and article). Loads after base.css and page.css. */

/* Header on guide pages: wordmark and a Guides link; the one App Store link sits in How Swipe Roll helps */
.site-head .head-link {
  display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 12px; border-radius: 999px;
  color: var(--text); text-decoration: none; font-weight: 600;
}
.site-head .head-link[aria-current] { color: var(--sky-text); }
.site-head .head-link:hover { color: #fff; background: rgba(63, 175, 243, .18); }

/* Breadcrumb */
.crumbs { margin: 0 0 12px; font-size: 0.875rem; color: var(--text-3); }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 8px; }
.crumbs li + li::before { content: "/"; margin-right: 8px; color: var(--text-3); }
.crumbs a { color: var(--text-2); }

/* Index: guide cards */
.text .guide-list { list-style: none; margin: 24px 0 12px; padding: 0; display: grid; gap: 12px; }
.guide-card {
  display: block; position: relative;
  background: var(--card); border: 1px solid var(--edge); border-radius: var(--radius);
  padding: 18px var(--gutter);
}
.guide-card h2 { margin: 0 0 6px; font-size: 1.15rem; line-height: 1.3; }
.guide-card h2 a { color: var(--text); text-decoration: none; }
.guide-card h2 a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.guide-card h2 a:focus-visible { outline: none; }
.guide-card:has(a:focus-visible) { outline: 3px solid var(--sky); outline-offset: 3px; }
.guide-card:hover { border-color: rgba(63, 175, 243, 0.4); }
.guide-card p { margin: 0; color: var(--text-2); }
.guide-card .meta { margin-top: 10px; font-size: 0.875rem; color: var(--text-3); }
.text .empty { color: var(--text-2); }

/* Article */
.guide .date { font-size: 0.875rem; }
.guide .answer-box {
  background: var(--card); border: 1px solid var(--edge); border-radius: var(--radius);
  padding: 18px var(--gutter) 6px; margin: 20px 0 8px;
}
.guide .answer-box h2 { margin: 0 0 6px; font-size: 0.875rem; font-weight: 650; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.06em; }
.guide .answer-box p { font-size: 1.1rem; }

/* Steps: numbered, one screenshot each */
.steps { list-style: none; counter-reset: step; padding: 0 !important; margin: 16px 0 12px; }
.steps > li { counter-increment: step; position: relative; padding-left: 44px; margin: 0 0 28px; }
.steps > li::before {
  content: counter(step); position: absolute; left: 0; top: 0;
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--control); border: 1px solid var(--edge);
  font-weight: 700; font-size: 0.9rem; color: var(--sky-text);
}
.steps h3 { margin: 2px 0 6px; font-size: 1.05rem; line-height: 1.35; }
.path { font-weight: 600; color: var(--text); }
.steps figure { margin: 12px 0 0; }
.steps figure img, .shot-ph {
  display: block; width: min(100%, 280px); height: auto;
  border-radius: var(--radius-s); border: 1px solid var(--edge);
}
.shot-ph {
  aspect-ratio: 9 / 19.5; background: var(--control);
  display: grid; place-items: center; color: var(--text-3); font-size: 0.875rem;
}
.steps figcaption { margin-top: 8px; font-size: 0.875rem; color: var(--text-3); }

/* Common mistakes */
.mistakes { list-style: none; padding: 0 !important; }
.mistakes li { position: relative; padding-left: 28px; }
.mistakes li::before {
  content: ""; position: absolute; left: 4px; top: 0.55em;
  width: 10px; height: 10px; border-radius: 50%; background: var(--marked);
}

/* How Swipe Roll helps */
.app-block { display: grid; grid-template-columns: auto 1fr; gap: 0 14px; align-items: start; }
.app-block { align-items: center; }
.app-block img { width: 48px; height: 48px; border-radius: 12px; }
.app-block h2 { margin: 0 !important; }
.app-block > p, .app-block > div { grid-column: 1 / -1; margin-top: 12px; }

/* Related */
.related { list-style: none; padding: 0 !important; margin: 8px 0 0; display: grid; gap: 8px; }
.related a {
  display: flex; align-items: center; min-height: var(--tap);
  background: var(--card); border: 1px solid var(--edge); border-radius: var(--radius-s);
  padding: 10px var(--gutter); color: var(--text); text-decoration: none; font-weight: 600;
}
.related a:hover { color: var(--sky-text); }

/* Steps whose titles are section headings (h2), for real guides */
.steps .step-title { margin: 2px 0 8px; font-size: 1.2rem; line-height: 1.35; }
.steps > li { padding-top: 1px; }
.steps > li::before { top: 2px; }
.steps ol, .steps ul { padding-left: 1.3rem; }

/* Tables: scroll sideways inside their box on small phones, never the page */
.table-wrap {
  overflow-x: auto; margin: 12px 0 16px;
  background: var(--card); border: 1px solid var(--edge); border-radius: var(--radius-s);
}
.table-wrap table { width: 100%; min-width: 30rem; border-collapse: collapse; font-size: 0.95rem; }
.table-wrap th, .table-wrap td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--edge); }
.table-wrap tr:last-child th, .table-wrap tr:last-child td { border-bottom: 0; }
.table-wrap thead th { color: var(--text-3); font-size: 0.8rem; font-weight: 650; text-transform: uppercase; letter-spacing: 0.04em; }
.table-wrap tbody th { font-weight: 650; }
.table-wrap td { color: var(--text-2); }

/* A caution line: amber glyph, words stay in text colour */
.text .warn { position: relative; padding-left: 28px; }
.text .warn::before {
  content: "!"; position: absolute; left: 0; top: 0.1em;
  width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center;
  background: var(--pending); color: var(--page); font-weight: 800; font-size: 0.75rem;
}

.app-block ul { padding-left: 1.1rem; }

/* Phones: each table row becomes a small stacked block, no sideways scroll */
@media (max-width: 36rem) {
  .table-wrap { overflow: visible; }
  .table-wrap table { min-width: 0; }
  .table-wrap thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .table-wrap tr { display: block; padding: 12px var(--gutter); border-bottom: 1px solid var(--edge); }
  .table-wrap tr:last-child { border-bottom: 0; }
  .table-wrap th, .table-wrap td { display: block; padding: 0; border: 0; }
  .table-wrap tbody th { margin-bottom: 4px; }
  .table-wrap td + td { margin-top: 4px; color: var(--text); }
  .table-wrap td[data-label]::before { content: attr(data-label) " "; color: var(--text-3); }
  .table-wrap td:first-of-type[data-label]::before { content: none; }
}
/* The one App Store link in a guide (inside How Swipe Roll helps) */
.app-block .app-link { font-weight: 600; color: var(--sky-text); }

/* Guide 02 (19 Nov 2026): a screenshot outside the steps, the checklist links, and the sources list */
.guide > figure { margin: 16px 0 8px; }
.guide > figure img { display: block; width: min(100%, 280px); height: auto; border-radius: var(--radius-s); border: 1px solid var(--edge); }
.guide > figure figcaption { margin-top: 8px; font-size: 0.875rem; color: var(--text-3); }
.guide .answer-box ol { margin: 4px 0 14px; }
.guide .answer-box li { margin: 4px 0; }
.guide .sources { font-size: 0.875rem; color: var(--text-2); }
.guide .sources li { margin: 8px 0; }

/* Guide standard (SEO, 22 Nov 2026): contents, "In short", caution boxes, diagrams, screenshot rows, FAQ */
.guide .toc { background: var(--card); border: 1px solid var(--edge); border-radius: var(--radius-s); padding: 14px var(--gutter) 6px; margin: 16px 0 20px; }
.guide .toc h2 { margin: 0 0 6px; font-size: 0.875rem; font-weight: 650; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.06em; }
.guide .toc ol { margin: 0 0 10px; }
.guide .toc li { margin: 2px 0; }
.guide .toc a { display: inline-block; padding: 6px 0; color: var(--text); text-decoration: none; }
.guide .toc a:hover { color: var(--sky-text); }
.guide .in-short { background: var(--control); border-radius: var(--radius-s); padding: 12px var(--gutter); margin: 16px 0 24px; }
.guide .in-short strong { color: var(--sky-text); }
.guide .caution { position: relative; background: var(--card); border: 1px solid rgba(251, 191, 36, .35); border-radius: var(--radius-s); padding: 14px var(--gutter) 14px 46px; margin: 16px 0; }
.guide .caution::before {
  content: "!"; position: absolute; left: 16px; top: 17px;
  width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center;
  background: var(--pending); color: var(--page); font-weight: 800; font-size: 0.75rem;
}
.guide .caution p { margin: 0; }
.guide figure.diagram { margin: 16px 0 20px; }
.guide figure.diagram svg { display: block; width: 100%; height: auto; border-radius: var(--radius-s); border: 1px solid var(--edge); }
.guide figure figcaption { margin-top: 8px; font-size: 0.875rem; color: var(--text-3); }
.guide figure.shots { margin: 16px 0 20px; }
.guide .shots-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; align-items: start; }
.guide .shots-row img { display: block; width: 100%; height: auto; border-radius: var(--radius-s); border: 1px solid var(--edge); }
@media (max-width: 479px) { .guide .shots-row { grid-template-columns: 1fr 1fr; } }
.guide .faq h3 { margin: 18px 0 4px; font-size: 1.05rem; }
.guide .faq p { margin: 0 0 8px; }
/* Diagrams with a phone version (marketing, 22 Nov 2026): the tall one under 600 px, the wide one above; display:none keeps the hidden one out of screen readers */
.guide figure.diagram .dg-phone { display: none; }
@media (max-width: 599px) {
  .guide figure.diagram .dg-wide { display: none; }
  .guide figure.diagram .dg-phone { display: block; max-width: 420px; margin: 0 auto; }
}
