/* Content Maxer use cases: guide pages + hub. Load AFTER styles.css, on /use-cases/ pages only.
   Editorial layout: one text column, modest type, a real app image for every step.
   Uses the tokens from styles.css (:root). Documented in the design skill file under docs/. */

.post, .hub { --col: 680px; }
.post .wrap, .hub .wrap { width: min(100% - 40px, var(--col)); }

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

/* ---------- Article header ---------- */
.post-head { padding: 28px 0 0; }
.post-head h1 { font-size: clamp(28px, 4.2vw, 42px); letter-spacing: -0.025em; line-height: 1.14; }
.post-head .dek { margin: 14px 0 0; color: var(--text-2); font-size: clamp(17px, 1.6vw, 19px); line-height: 1.5; }
.byline { margin: 12px 0 0; color: var(--text-2); font-size: 13px; }

/* ---------- Figures ---------- */
.fig { margin: 20px 0 0; }
.fig img { width: 100%; }
.fig figcaption { margin-top: 10px; color: var(--text-2); font-size: 14px; line-height: 1.5; }
/* A cropped part of a screen */
.fig.crop img { max-width: 520px; border-radius: 14px; border: 1px solid var(--line-2); background: #000; }
/* A whole screen in a phone frame, or two side by side */
.fig.device .plate { display: flex; justify-content: center; gap: 16px; padding: 24px 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.fig.device .phone { --pw: 230px; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.14), inset 0 0 0 4px #050505; }
.fig.device.pair .phone { --pw: min(200px, calc((100vw - 96px) / 2)); }
/* App Store screenshots already contain the status bar and the Dynamic Island */
.phone.plain .screen::before { display: none; }
.post-head .fig { margin-top: 22px; }

/* ---------- Article body ---------- */
.post-body { padding: 8px 0 0; color: #d2d2d7; font-size: 17px; line-height: 1.65; }
.post-body h2 { margin: 56px 0 14px; font-size: clamp(23px, 2.6vw, 29px); letter-spacing: -0.02em; line-height: 1.2; color: var(--text); scroll-margin-top: 84px; }
.post-body h3 { margin: 30px 0 8px; font-size: 19px; letter-spacing: -0.015em; line-height: 1.3; color: var(--text); scroll-margin-top: 84px; }
.post-body p { margin: 0 0 14px; }
.post-body a { color: var(--accent); text-underline-offset: 3px; }
.post-body ul, .post-body ol { margin: 0 0 16px; padding-left: 22px; }
.post-body li { margin-bottom: 6px; }
.post-body .small { color: var(--text-2); font-size: 14px; line-height: 1.5; }

/* The short version: the steps as a linked list */
.summary-steps { margin: 0 0 16px; padding: 0 0 0 22px; }
.summary-steps a { color: var(--text); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.summary-steps a:hover { text-decoration-color: var(--accent); }
.get { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin: 22px 0 0; }
.get .small { flex: 1 1 220px; margin: 0; }

/* Steps: heading, a few lines, then the image */
.step { margin: 0; padding: 30px 0 34px; border-top: 1px solid var(--line); }
.step:last-of-type { padding-bottom: 0; }
.post-body .step h3 { margin: 0 0 8px; font-size: 21px; }
.step ol.sub { margin: 4px 0 14px; padding-left: 22px; }
.step .fig + p, .step .fig + ol { margin-top: 20px; }

/* Rights note and other asides */
.aside { margin: 18px 0; padding: 2px 0 2px 16px; border-left: 2px solid var(--accent); color: var(--text-2); font-size: 15px; line-height: 1.55; }
.aside p { margin: 0; }

/* Example calculation */
.calc { margin: 18px 0; padding: 20px 22px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--surface); }
.calc .label { margin: 0 0 12px; color: var(--text); font-size: 15px; font-weight: 600; }
.calc .sum { margin: 0 0 6px; color: var(--text); font-size: 18px; font-variant-numeric: tabular-nums; }
.calc .sum b { color: var(--accent); font-weight: 600; }
.calc .small { margin: 12px 0 0; }

/* Does / doesn't */
.yn { display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; margin: 0 0 16px; }
.post-body .yn h3 { margin-top: 12px; font-size: 17px; }
.yn ul { margin: 0; padding-left: 20px; font-size: 16px; }

/* FAQ inside an article */
.post-body .faq { margin: 0; }
.post-body .faq summary { padding: 18px 40px 18px 0; font-size: 17px; }
.post-body .faq .answer { padding: 0 0 18px; font-size: 16px; }
.post-body .faq .answer p { margin-bottom: 0; }

/* Related links and closing download block */
.related { margin: 0; padding: 0; list-style: none; }
.post-body .related li { margin: 0; padding: 14px 0; border-top: 1px solid var(--line); }
.related a { font-weight: 600; }
.related span { display: block; color: var(--text-2); font-size: 15px; }
.post-end { margin: 48px 0 0; padding: 24px 22px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.post-end h2 { margin: 0 0 6px; font-size: 21px; letter-spacing: -0.02em; line-height: 1.2; }
.post-end p { margin: 0 0 16px; color: var(--text-2); font-size: 15px; }

/* ---------- Hub ---------- */
.hub-head { padding: 28px 0 8px; }
.hub-head h1 { font-size: clamp(28px, 4.2vw, 42px); letter-spacing: -0.025em; line-height: 1.14; }
.hub-head p { margin: 12px 0 0; color: var(--text-2); font-size: clamp(17px, 1.6vw, 19px); line-height: 1.5; }
.entries { margin: 24px 0 0; padding: 0; list-style: none; }
.entry { position: relative; display: grid; grid-template-columns: 280px 1fr; gap: 24px; align-items: start; padding: 24px 0; border-top: 1px solid var(--line); }
.entry picture { display: block; }
.entry img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 12px; border: 1px solid var(--line-2); background: #000; }
.entry h2 { font-size: 21px; letter-spacing: -0.02em; line-height: 1.25; }
.entry h2 a { text-decoration: none; }
.entry h2 a::after { content: ""; position: absolute; inset: 0; }
.entry h2 a:hover { text-decoration: underline; text-underline-offset: 3px; }
.entry p { margin: 8px 0 0; color: var(--text-2); font-size: 16px; line-height: 1.5; }
.entry .date { margin-top: 10px; font-size: 13px; }

/* ---------- Responsive ---------- */
@media (max-width: 700px) {
  .post-head, .hub-head { padding-top: 18px; }
  .fig.device .plate { padding: 20px 12px; }
  .fig.device.pair .plate { gap: 12px; }
  .post-body h2 { margin-top: 44px; }
  .step { padding: 26px 0 30px; }
  .yn { grid-template-columns: 1fr; }
  .entry { grid-template-columns: 1fr; gap: 14px; }
}
