/* Pacelings blog. Builds on site.css and its tokens: one Ember block per page (the head of the overview, the call to
   action under a post), everything else calm on ground and surface. Topics differ by shape, never by color. */

/* Topic label: mark + word */
.topic { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.mark { flex: none; color: var(--accent); overflow: visible; }
.mark .m-fill { fill: var(--block); stroke: var(--text); stroke-width: 1.2; }

/* Covers drawn from the post's own data */
.cover-art { display: block; width: 100%; height: auto; overflow: visible; }
.cover-art .c-line { fill: none; stroke: var(--text); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.cover-art .c-dot { fill: var(--ground); stroke: var(--text); stroke-width: 2.5; }
.cover-art .c-pip { fill: var(--block); stroke: var(--text); stroke-width: 2.5; }
.cover-art .c-run { fill: var(--text); stroke: var(--text); stroke-width: 2; }
.cover-art .c-walk { fill: none; stroke: var(--text); stroke-width: 2; }
.cover-art .c-label { font: 600 19px var(--body); fill: var(--muted); }
.cover-art .c-week { font-family: var(--display); font-weight: 900; font-size: 24px; text-transform: uppercase; fill: var(--text); }
.cover-art .c-big { font-family: var(--display); font-weight: 900; font-size: 38px; text-transform: uppercase; fill: var(--text); }

/* Overview: the Ember head, the newest post hangs over its lower edge like the phone on the home page */
.blog .blog-hero { margin-bottom: 0; padding-bottom: 150px; }
.blog-hero h1 { max-width: 14ch; }
.blog-hero .hero-lede { max-width: 34em; }
.blog-hero .hero-lede { margin-bottom: 0; }
.blog-latest { margin-top: -96px; }

.post-card { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line);
  border-radius: 24px; overflow: hidden; min-width: 0; }
.post-cover { background: var(--ground); border-bottom: 1px solid var(--line); padding: 26px 28px 22px; }
.post-text { display: flex; flex-direction: column; gap: 12px; padding: 24px 28px 26px; flex: 1; }
.post-card h2, .post-card h3 { font-family: var(--display); font-weight: 900; text-transform: uppercase; line-height: .98; margin: 0;
  font-size: clamp(30px, 3.2vw, 38px); text-wrap: balance; overflow-wrap: break-word; hyphens: auto; }
.post-card h2 a, .post-card h3 a { color: var(--text); text-decoration: none; }
/* The whole card is the link, the title stays the one element screen readers announce */
.post-card h2 a::after, .post-card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.post-card a:focus-visible { outline: none; }
.post-card:has(a:focus-visible) { outline: 3px solid var(--accent); outline-offset: 3px; }
.post-card p { margin: 0; color: var(--text-2); }
.post-meta { margin-top: auto !important; padding-top: 6px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  font-size: 14px; color: var(--muted) !important; }
.post-go { font-weight: 750; color: var(--accent); }
@media (prefers-reduced-motion: no-preference) {
  .post-card { transition: transform .25s ease, box-shadow .25s ease; }
  .post-card:hover { transform: translateY(-3px); box-shadow: 0 22px 40px -24px rgba(15, 26, 22, .45); }
}

.post-card.featured { display: grid; grid-template-columns: 1.05fr 1fr; box-shadow: 0 30px 60px -30px rgba(15, 26, 22, .5); }
.post-card.featured .post-cover { display: grid; align-items: center; border-bottom: 0; border-right: 1px solid var(--line); padding: 40px; }
.post-card.featured .post-text { padding: 40px 44px 38px; gap: 16px; justify-content: center; }
.post-card.featured h2 { font-size: clamp(38px, 4.6vw, 58px); }
.post-card.featured p { font-size: 18px; }

.post-list { padding-block: 72px 24px; }
.list-title { font-size: clamp(32px, 4vw, 44px); margin-bottom: 26px; }
.post-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.blog .post-list + .final, .post-list:last-child { padding-bottom: 96px; }

/* A post */
.post-head { padding-block: 52px 8px; }
.crumbs { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 15px; margin-bottom: 22px; }
.crumbs > a { color: var(--text); font-weight: 650; }
.crumbs > span[aria-hidden] { color: var(--muted); }
.post-head h1 { font-size: clamp(46px, 6.4vw, 78px); overflow-wrap: break-word; hyphens: auto; }
.post-lede { font-size: 22px; line-height: 1.5; color: var(--text-2); margin: 22px 0 0; }
.byline { display: flex; align-items: center; gap: 14px; margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--line); }
.byline img { border-radius: 11px; flex: none; }
.byline p { margin: 0; display: flex; flex-direction: column; gap: 2px; font-size: 16px; }
.byline-meta { color: var(--muted); font-size: 15px; }

.post-body { font-size: 19px; line-height: 1.7; padding-bottom: 24px; }
.post-body p, .post-body li { color: var(--text-2); }
.post-body p { margin: 18px 0 0; overflow-wrap: break-word; hyphens: auto; }
.post-body section { margin-top: 56px; }
.post-body section h2 { font-size: clamp(32px, 4vw, 40px); margin-bottom: 4px; }
.post-body b { color: var(--text); }
.post-body section ul, .in-short ul { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 12px; }
.post-body section ul li, .in-short li { position: relative; padding-left: 30px; }
.post-body section ul li::before, .in-short li::before { content: ""; position: absolute; left: 0; top: .62em; width: 16px; height: 10px; border-radius: 5px; background: var(--block); }
.post-body .small { font-size: 15px; color: var(--muted); margin-top: 10px; }

.in-short { margin-top: 36px; padding: 26px 30px 28px; background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius); }
.in-short h2, .toc h2 { font: 750 13px/1.2 var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin: 0; }
.in-short ul { margin-top: 16px; }
.in-short li { color: var(--text); font-size: 18px; line-height: 1.55; }

.toc { margin-top: 32px; }
.toc ol { list-style: none; counter-reset: toc; padding: 0; margin: 12px 0 0; border-top: 1px solid var(--line); }
.toc li { counter-increment: toc; border-bottom: 1px solid var(--line); }
.toc a { display: flex; gap: 16px; align-items: baseline; padding: 10px 0; min-height: 44px; color: var(--text); text-decoration: none; font-size: 17px; font-weight: 600; }
.toc a::before { content: counter(toc, decimal-leading-zero); font-family: var(--display); font-weight: 900; font-size: 20px; color: var(--muted); min-width: 1.6em; }
.toc a:hover { color: var(--accent); }

.table-wrap { overflow-x: auto; margin-top: 20px; }
.post-body table { width: 100%; border-collapse: collapse; font-size: 17px; }
.post-body th { text-align: left; font-size: 13px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 0 0 10px; border-bottom: 2px solid var(--text); }
.post-body td { padding: 11px 0; border-bottom: 1px solid var(--line); color: var(--text-2); }
.post-body td:last-child, .post-body th:last-child { text-align: right; font-variant-numeric: tabular-nums; padding-left: 16px; }
.post-body td:first-child { color: var(--text); font-weight: 600; }
.post-body table.stations tbody tr:first-child td, .post-body table.stations tbody tr:last-child td { font-weight: 800; }

.post-figure { display: flex; justify-content: center; align-items: flex-start; gap: 22px; margin: 36px 0 8px; }
.post-figure .pair-item:nth-child(2) { margin-top: 56px; }
.post-figure .phone { width: min(250px, 42vw); padding: 8px; border-radius: 44px; }
.post-figure .phone img { border-radius: 36px; }
.post-figure .watch { width: min(220px, 40vw); padding: 17px; border-radius: 66px; }
.post-figure .watch img { border-radius: 48px; }
.post-figure .card { width: min(260px, 42vw); transform: rotate(2deg); }
.post-figure .cap { font-size: 14px; max-width: 26ch; }
.post-figure .pair-item:only-child .phone { width: min(280px, 70vw); }

.author { display: flex; gap: 18px; align-items: flex-start; margin-top: 64px; padding: 24px 26px; border: 1.5px solid var(--line); border-radius: var(--radius); }
.author img { width: 56px; height: 56px; border-radius: 14px; flex: none; }
.author b { font-size: 17px; color: var(--text); }
.author p { margin: 4px 0 0; font-size: 16px; line-height: 1.55; }

.post-cta { padding-block: 40px 24px; }
.post-cta + .post-list { padding-top: 56px; }

@media (max-width: 860px) {
  .blog .blog-hero { padding-bottom: 120px; }
  .blog-latest { margin-top: -80px; }
  .post-card.featured { grid-template-columns: 1fr; }
  .post-card.featured .post-cover { border-right: 0; border-bottom: 1px solid var(--line); padding: 26px 24px 20px; }
  .post-card.featured .post-text { padding: 26px 24px 28px; }
  .post-grid { grid-template-columns: 1fr; }
  .post-cover { padding: 22px 20px 18px; }
  .post-text { padding: 22px 22px 24px; }
}
@media (max-width: 480px) {
  .post-lede { font-size: 20px; }
  .post-body { font-size: 18px; }
  .in-short { padding: 22px 20px 24px; }
  .post-figure { gap: 12px; }
  .post-figure .pair-item:nth-child(2) { margin-top: 36px; }
  .post-figure .phone { padding: 6px; border-radius: 30px; }
  .post-figure .phone img { border-radius: 24px; }
  .post-figure .watch { padding: 11px; border-radius: 44px; }
  .post-figure .watch img { border-radius: 33px; }
  .author { flex-direction: column; }
}

/* Round 2 of the jury */
/* One card alone in a list: as wide as the page, cover beside the text like the featured one */
.post-grid.single { grid-template-columns: 1fr; }
.post-grid.single .post-card { display: grid; grid-template-columns: 1fr 1fr; }
.post-grid.single .post-cover { display: grid; align-items: center; border-bottom: 0; border-right: 1px solid var(--line); padding: 34px; }
.post-grid.single .post-text { justify-content: center; padding: 34px 36px; }
/* A drawing inside a post (the run/walk ladder) */
.post-chart { margin: 28px 0 8px; padding: 26px 26px 18px; background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius); }
/* Words stay whole in links and in the short summary, tables keep their first column on one line */
.post-body a, .in-short li, .post-card h2, .post-card h3 { hyphens: manual; }
.post-body p { hyphenate-limit-chars: 10 4 4; }
.post-body td:first-child { white-space: nowrap; }
/* Breadcrumb link with a full tap target */
.crumbs > a { display: inline-flex; align-items: center; min-height: 44px; padding-inline: 4px; margin-inline: -4px; }
.topic .mark { width: 26px; height: 26px; }
/* The app icon on the Ember block reads as an icon, not as a cropped Pip */
.post-cta .final-row img { box-shadow: 0 0 0 1.5px var(--on-block); }
@media (max-width: 860px) {
  .post-grid.single .post-card { grid-template-columns: 1fr; }
  .post-grid.single .post-cover { border-right: 0; border-bottom: 1px solid var(--line); padding: 22px 20px 18px; }
  .post-grid.single .post-text { padding: 22px 22px 24px; }
  .post-cta .final-row img { width: 96px; height: 96px; border-radius: 22px; }
}
@media (max-width: 480px) { .post-chart { padding: 16px 12px 10px; } }
.post-body details.numbers { margin-top: 14px; border-bottom: 0; padding-block: 0; }
.post-body details.numbers summary { font-size: 16px; color: var(--text-2); min-height: 44px; align-items: center; justify-content: flex-start; gap: 10px; }
.post-figure .card img { border-radius: 8px; width: 100%; height: auto; }
.post-body details.numbers summary::after { content: "\203A"; font-family: var(--body); font-weight: 600; font-size: 22px; color: var(--muted); transition: transform .2s ease; }
.post-body details.numbers[open] summary::after { content: "\203A"; transform: rotate(90deg); }
@media (prefers-reduced-motion: reduce) { .post-body details.numbers summary::after { transition: none; } }
.cover-art .c-small { font-size: 17px; }
.cover-art .c-day { font-size: 21px; fill: var(--text); }
.cover-art .c-caption { font-size: 19px; }
.post-figure .card { width: min(360px, 86vw); }
.post-figure .pair-item:only-child .card { transform: rotate(-1.5deg); }
.post-chart { max-width: 600px; margin-inline: auto; }
.avatar { border-radius: 50% !important; object-fit: cover; background: var(--line); }
/* Light app screens on a dark page: a touch dimmer, so they don't outshine the text */
@media (prefers-color-scheme: dark) { .post-figure .card img, .post-figure .phone img { filter: brightness(.86); } }
.post-grid.single .post-cover, .post-card.featured .post-cover { display: grid; align-items: center; }

/* Comparison tables: room between the columns, numbers never wrap, no start/finish emphasis */
.post-body table.compare td + td, .post-body table.compare th + th { padding-left: 14px; white-space: nowrap; text-align: right; font-variant-numeric: tabular-nums; }
.post-figure .pair-item:only-child .cap { max-width: 34ch; }
.post-body table.compare td:first-child { white-space: normal; }
@media (max-width: 380px) { .post-body table.compare td + td, .post-body table.compare th + th { padding-left: 10px; } }
@media (max-width: 400px) { .post-figure .pair-item:only-child .card { width: 100%; transform: none; } }
