/*
Theme Name: Let's Write a Short Story!
Theme URI: https://letswriteashortstory.com/
Author: Story Cartel
Author URI: https://storycartel.com/
Description: letswriteashortstory.com, from theme/starter. Mockup A, "the printed page": the site reads like the inside of the book, and the book comes first.
Version: 0.1.4
Requires at least: 6.5
Requires PHP: 8.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: lwass
*/

/* ==========================================================================
   1. Tokens
   One color scheme (no dark toggle): cream paper with a faint grain, EB
   Garamond set like a printed page, Jost for labels and buttons. The cover's
   orange is the one accent; its comma is the ornament.
   ========================================================================== */

:root {
	--paper: #fbf7ec;
	--paper-deep: #f3ead3;
	--page: #fffdf6;
	--ink: #2d2118;
	--ink-soft: #6b5a4a;
	--cover: #d9802f;
	--cover-deep: #b8621c;
	--cover-text: #9a4f12; /* the orange dark enough for small text on paper */
	--cream: #fbf6dd;
	--band: #f2c47f; /* the cover's light band: the workbook */
	--serif: "EB Garamond", Georgia, "Times New Roman", serif;
	--label: "Jost", system-ui, -apple-system, "Segoe UI", sans-serif;
	--radius: 0.35rem;
	--shadow-card: 0 1.2rem 2.4rem -1.4rem rgba(60, 35, 10, 0.4), 0 0 0 1px rgba(60, 35, 10, 0.07);
	color-scheme: light;
}

/* ==========================================================================
   2. Base
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
	margin: 0;
	background-color: var(--paper);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.35 0 0 0 0 0.25 0 0 0 0 0.12 0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
	color: var(--ink);
	font: 400 1.2rem/1.65 var(--serif);
	overflow-x: hidden;
}

img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-underline-offset: 0.18em; }
a:hover { color: var(--cover-deep); }
:focus-visible { outline: 3px solid var(--cover); outline-offset: 2px; }

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; line-height: 1.12; margin: 0 0 1rem; text-wrap: balance; color: var(--ink); }
h1 { font-size: clamp(2.4rem, 1.6rem + 3vw, 3.8rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.9rem, 1.3rem + 2.2vw, 2.9rem); }
h3 { font-size: 1.4rem; }
h4 { font-size: 1.2rem; }
p { margin: 0 0 1rem; }

.wrap { width: min(100% - 2rem, 72rem); margin-inline: auto; }
.measure { max-width: 40rem; margin-inline: auto; }

.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 100; background: var(--ink); color: var(--paper); padding: 0.6rem 1rem; border-radius: var(--radius); font: 600 0.95rem var(--label); }
.skip-link:focus { top: 1rem; color: var(--paper); }

.label { font: 600 0.78rem/1.3 var(--label); letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-soft); margin: 0 0 0.75rem; }

/* ==========================================================================
   3. Buttons
   ========================================================================== */

.btn,
.wp-block-button__link {
	display: inline-flex; align-items: center; justify-content: center;
	min-height: 3.1rem; padding: 0.8rem 1.5rem;
	border-radius: var(--radius); border: 2px solid transparent;
	font: 600 1rem/1.2 var(--label); letter-spacing: 0.02em;
	text-decoration: none; cursor: pointer; text-align: center;
}
.btn--main, .wp-block-button__link { background: var(--cover-deep); color: #fff; }
.btn--main:hover, .wp-block-button__link:hover { background: var(--ink); color: #fff; }
.btn--line { border-color: currentColor; color: var(--ink); background: transparent; }
.btn--line:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.buy { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.buy__note { font: 400 0.9rem/1.4 var(--label); color: var(--ink-soft); margin: 0.9rem 0 0; }
.buy__shop { flex-basis: 100%; font: 400 0.95rem/1.4 var(--label); color: var(--ink-soft); margin: 0.15rem 0 0; }
.buy__shop a { color: var(--cover-deep); text-underline-offset: 0.2em; }
.last .buy__shop { text-align: center; }
.stars { color: var(--cover-deep); letter-spacing: 0.1em; }

/* ==========================================================================
   4. Header
   ========================================================================== */

.top { padding-block: 1.25rem; }
.top__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.top__name { font: 600 0.9rem var(--label); letter-spacing: 0.18em; text-transform: uppercase; text-decoration: none; }
.top__nav { display: flex; align-items: center; gap: 1.6rem; flex-wrap: wrap; font: 500 0.95rem var(--label); }
.top__nav ul { display: flex; flex-wrap: wrap; gap: 0.4rem 1.6rem; list-style: none; margin: 0; padding: 0; }
.top__nav ul a { text-decoration: none; }
.top__nav .current-menu-item > a, .top__nav .current_page_item > a { color: var(--cover-text); }
.top__btn { min-height: 2.6rem; padding: 0.5rem 1.1rem; font-size: 0.9rem; }
@media (min-width: 46.01em) { .top__menu { display: none !important; } }
.top__menu { font: 600 0.9rem var(--label); background: none; border: 2px solid var(--ink); border-radius: var(--radius); color: var(--ink); padding: 0.45rem 0.9rem; min-height: 2.6rem; cursor: pointer; }

/* ==========================================================================
   5. Hero: the book on the table
   ========================================================================== */

.hero { padding-block: clamp(1.5rem, 1rem + 3vw, 4rem) clamp(3rem, 2rem + 4vw, 6rem); }
.hero__inner { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: clamp(2.5rem, 1rem + 5vw, 6rem); align-items: center; }
.book { position: relative; justify-self: center; width: min(100%, 25rem); }
.book img { width: 100%; border-radius: 2px 6px 6px 2px; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.05), 0 1.8rem 2.5rem -1.2rem rgba(60,35,10,0.55), 0 0.4rem 0.8rem rgba(60,35,10,0.18); }
.book::after { content: ""; position: absolute; inset: 0 auto 0 0; width: 7%; border-radius: 2px 0 0 2px; background: linear-gradient(90deg, rgba(0,0,0,0.22), rgba(255,255,255,0.12) 55%, rgba(0,0,0,0)); pointer-events: none; }
.hero h1 { font-size: clamp(2.5rem, 1.5rem + 3.6vw, 4.3rem); line-height: 1.04; margin-bottom: 1.25rem; }
.hero .lede { font-size: 1.3rem; color: var(--ink-soft); max-width: 33rem; }
.rating { font: 500 0.95rem/1.45 var(--label); color: var(--ink-soft); margin: 0 0 1.1rem; }
.rating .stars { font-size: 1.05rem; margin-right: 0.35rem; }
/* A free thing's own page: the hero, with the workbook. */
.free-hero { padding-top: clamp(2.5rem, 1.5rem + 4vw, 5rem); }
.free-hero .book { width: min(100%, 22rem); }
.free-hero .lede p { margin: 0 0 1rem; }
.free-hero [data-hero-buttons] { margin-top: 1.75rem; }
.pull { margin: 1.75rem 0; padding-left: 1.25rem; border-left: 3px solid var(--cover); }
.pull p { font: italic 400 1.3rem/1.45 var(--serif); margin: 0 0 0.5rem; }
.pull cite, .lead-quote cite, .quotes cite { font: 500 0.9rem var(--label); font-style: normal; color: var(--ink-soft); }

/* ==========================================================================
   6. Sections, set like chapter openings, with the cover's comma
   ========================================================================== */

.chapter { padding-block: clamp(3.5rem, 2rem + 5vw, 7rem); }
.on-deep { background-color: var(--paper-deep); }
.chapter__head { text-align: center; margin-bottom: clamp(2rem, 1rem + 3vw, 3.5rem); }
.chapter__head .comma { display: block; height: 2.6rem; margin: 0 auto 1.1rem; overflow: visible; }
.chapter__head .comma::before { content: ","; display: block; font: 700 6rem/0 var(--serif); color: var(--cover); transform: translateY(-0.05em); }
/* Letter-spacing adds space after the last letter; pad the front to match, so centered labels sit centered. */
.chapter__head .label { padding-left: 0.16em; }
.chapter__head h2 { max-width: 34rem; margin-inline: auto; }

/* Contents: the book's chapters (and the five steps) set like a contents page. */
.contents { list-style: none; margin: 0 auto; padding: 0; max-width: 46rem; display: grid; gap: 2.25rem; }
.contents li { display: grid; grid-template-columns: 4.5rem 1fr; gap: 1.25rem; align-items: start; }
.contents .num { font: 400 3.2rem/0.9 var(--serif); color: var(--cover); text-align: right; }
.contents h3 { font-size: 1.6rem; margin-bottom: 0.35rem; }
.contents p { margin: 0 0 0.4rem; color: var(--ink-soft); }
.contents a { font: 500 0.95rem var(--label); color: var(--cover-text); }
.contents-note { text-align: center; margin-top: 2rem; }
.steps-after { margin-top: clamp(3rem, 2rem + 3vw, 4.5rem); }
.steps-after__head { text-align: center; font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); margin: 0 0 clamp(1.5rem, 1rem + 2vw, 2.5rem); }
.book-more { margin-top: 3rem; }

/* ==========================================================================
   7. Reader quotes, on the cover's orange (the back cover)
   ========================================================================== */

.back { background-color: var(--cover); color: var(--ink); }
.back .label, .back cite { color: var(--ink); }
.back .chapter__head .comma::before { color: var(--ink); }
.lead-quote { max-width: 46rem; margin: 0 auto 3.5rem; text-align: center; }
.lead-quote p { font: italic 500 clamp(1.55rem, 1.2rem + 1.4vw, 2.2rem)/1.35 var(--serif); margin-bottom: 1rem; }
.quotes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.5rem 3rem; max-width: 64rem; margin-inline: auto; }
.quotes blockquote { margin: 0; }
.quotes p { font-size: 1.15rem; line-height: 1.5; margin-bottom: 0.5rem; }
.quotes cite { font-weight: 600; display: block; line-height: 1.4; }
.quotes .joke p { font-style: italic; }
.quotes--all { display: block; columns: 3 17rem; column-gap: 3rem; }
.quotes--all blockquote { break-inside: avoid; margin: 0 0 2.25rem; }
.after-quotes { display: flex; flex-direction: column; align-items: center; text-align: center; margin-top: 3.5rem; }
.after-quotes .buy { justify-content: center; }
.back .btn--main { background: var(--ink); color: var(--cream); }
.back .btn--main:hover { background: #000; color: var(--cream); }
.back .btn--line { color: var(--ink); }
.back .btn--line:hover { color: var(--cover); background: var(--ink); }
.back .entry a, .more-link a { color: var(--ink); }
.more-link { margin: 1.25rem 0 0; font: 500 1rem var(--label); }
.back--page { padding-top: clamp(2.5rem, 2rem + 3vw, 4rem); }

/* ==========================================================================
   8. A page from the book
   ========================================================================== */

.book-page { background: var(--page); max-width: 40rem; margin-inline: auto; padding: clamp(2rem, 1rem + 4vw, 4rem) clamp(1.5rem, 1rem + 3vw, 3.5rem); box-shadow: 0 1.5rem 3rem -1.5rem rgba(60,35,10,0.35), 0 0 0 1px rgba(60,35,10,0.06); }
.book-page .running { font: 500 0.75rem var(--label); letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-soft); text-align: center; margin-bottom: 2rem; }
.book-page h3 { font-size: 1.9rem; text-align: center; margin-bottom: 1.5rem; }
.book-page p { text-align: justify; hyphens: auto; }
.book-page .dropcap::first-letter { float: left; font: 500 4.6rem/0.82 var(--serif); color: var(--cover-deep); padding: 0.35rem 0.6rem 0 0; }
.keep-reading { text-align: center; margin-top: 2rem; font: 500 1rem var(--label); }
.keep-reading a { color: var(--cover-text); }

/* ==========================================================================
   9. Try it now: the prompt card and the magazines
   ========================================================================== */

.try { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 1rem + 3vw, 4rem); align-items: start; }
.prompt { background: var(--page); box-shadow: var(--shadow-card); border-top: 6px solid var(--cover); padding: clamp(1.5rem, 1rem + 2vw, 2.25rem); }
.prompt__label { font: 600 0.78rem var(--label); letter-spacing: 0.16em; text-transform: uppercase; color: var(--cover-text); margin: 0 0 1rem; }
.prompt__text { font: 500 clamp(1.35rem, 1.1rem + 1vw, 1.75rem)/1.35 var(--serif); margin: 0 0 1rem; min-height: 4.2em; }
.prompt__how { font-style: italic; color: var(--ink-soft); }
.prompt__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin-top: 1.25rem; }
.prompt__actions .btn { min-height: 2.8rem; }
.prompt__count { font: 400 0.85rem var(--label); color: var(--ink-soft); }
.mags h3 { font: 600 0.82rem/1.3 var(--label); letter-spacing: 0.16em; text-transform: uppercase; color: var(--cover-text); margin: 0 0 0.6rem; }
.mags__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.75rem 2rem; }
.mags ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.3rem; }
.mags li a { text-decoration: none; }
.mags li a:hover { text-decoration: underline; }
.mags .mine, .mag-list .mine > a { font-weight: 600; }
.mags small, .mag-list small { font: 500 0.78rem/1.4 var(--label); color: var(--ink-soft); display: block; }
.mags__all { margin-top: 1.75rem; font: 500 1rem var(--label); }
.mags__all a { color: var(--cover-text); }

/* ==========================================================================
   10. The free workbook (Free Things: a button, then the form in a popup)
   ========================================================================== */

.workbook { background-color: var(--band); padding-block: clamp(3rem, 2rem + 4vw, 5.5rem); }
.workbook .wrap { display: grid; grid-template-columns: 11rem 1fr; gap: clamp(1.5rem, 1rem + 3vw, 3.5rem); align-items: center; max-width: 58rem; }
.workbook img { box-shadow: 0 1rem 1.6rem -0.8rem rgba(60,35,10,0.5); }
.workbook .label { color: #6b3f12; }
.workbook h2 { font-size: clamp(1.7rem, 1.2rem + 1.8vw, 2.4rem); }
.signup__note { font: 400 0.85rem/1.45 var(--label); color: #5b3a17; margin-top: 0.75rem; }

.joes-ft { margin-top: 1.25rem; }
.joes-ft__cta p { margin: 0; }
.joes-ft__open,
.joes-ft-form button[type="submit"] {
	display: inline-flex; align-items: center; justify-content: center;
	min-height: 3.1rem; padding: 0.8rem 1.6rem; border: 0; border-radius: var(--radius);
	background: var(--ink); color: var(--cream); font: 600 1rem/1.2 var(--label); letter-spacing: 0.02em; cursor: pointer;
}
.joes-ft__open:hover, .joes-ft-form button[type="submit"]:hover { background: #000; }
.joes-ft-form button[type="submit"] { width: 100%; background: var(--cover-deep); color: #fff; }
.joes-ft-form button[type="submit"]:hover { background: var(--ink); }
.joes-ft-form button[disabled] { opacity: 0.7; cursor: progress; }

.modal { border: 0; padding: 0; background: transparent; color: inherit; position: fixed; inset: 0; margin: auto; width: calc(100% - 2rem); max-width: 30rem; max-height: calc(100% - 2rem); overflow: auto; }
dialog:not([open]) { display: none !important; }
.modal::backdrop { background: rgba(45, 33, 24, 0.6); }
.modal__panel { position: relative; background: var(--paper); border-top: 6px solid var(--cover); border-radius: var(--radius); padding: 2rem 1.5rem 1.5rem; box-shadow: 0 18px 50px rgba(45, 33, 24, 0.3); }
.joes-ft__close { position: absolute; top: 0.75rem; right: 0.75rem; display: flex; background: none; border: 0; padding: 0.4rem; cursor: pointer; color: var(--ink-soft); line-height: 0; }
.joes-ft__close:hover { color: var(--ink); }
.joes-ft__title { font-size: 1.9rem; margin: 0 0 0.4rem; }
.joes-ft__text { color: var(--ink-soft); margin: 0 0 1.25rem; }
.joes-ft__dialog:not(:modal) { position: static; width: auto; max-width: 32rem; margin: 0; overflow: visible; }
.joes-ft[data-state="sent"] .joes-ft__text { display: none; }
.joes-ft-form { display: flex; flex-direction: column; gap: 0.75rem; }
.joes-ft-form__fields { display: grid; gap: 0.75rem; }
.joes-ft-form__field { display: flex; flex-direction: column; gap: 0.3rem; margin: 0; font: 500 0.95rem var(--label); }
.joes-ft-form__optional { font-weight: 400; color: var(--ink-soft); }
.joes-ft-form input[type="text"], .joes-ft-form input[type="email"] { min-height: 3rem; padding: 0.65rem 0.9rem; font: 400 1rem var(--label); border: 2px solid var(--ink); border-radius: var(--radius); background: #fff; color: var(--ink); width: 100%; }
.joes-ft-form input[aria-invalid="true"] { border-color: #a3341c; outline: 1px solid #a3341c; }
.joes-ft-form__actions { margin: 0.25rem 0 0; }
.joes-ft-form__small, .joes-ft-form__status { font: 400 0.85rem/1.45 var(--label); color: var(--ink-soft); margin: 0; }
.joes-ft-form__status:empty { display: none; }
.joes-ft-form__status[data-state="sent"] { color: var(--ink); font-weight: 600; font-size: 1rem; }
.joes-ft-form__status[data-state]:not([data-state="sent"]) { color: #a3341c; }
.joes-ft-form[data-state="sent"] .joes-ft-form__fields,
.joes-ft-form[data-state="sent"] .joes-ft-form__actions,
.joes-ft-form[data-state="sent"] .joes-ft-form__check,
.joes-ft-form[data-state="sent"] .joes-ft-form__small { display: none; }

/* ==========================================================================
   11. A note from Joe, and the last ask
   ========================================================================== */

.joe { width: min(100% - 2rem, 40rem); margin-inline: auto; }
.joe p { font-size: 1.25rem; }
.joe p.label { font-size: 0.78rem; }
.joe .sig { font: italic 500 1.6rem var(--serif); color: var(--cover-text); margin-top: 0.5rem; }
.last { text-align: center; padding-block: clamp(1rem, 1rem + 2vw, 3rem) clamp(4rem, 3rem + 4vw, 7rem); }
.last .book { width: 11rem; margin: 0 auto 2rem; }
.last h2 { max-width: 30rem; margin-inline: auto; }
.last .buy { justify-content: center; }

/* ==========================================================================
   12. Footer
   ========================================================================== */

.foot { background-color: var(--ink); color: #e9dfcc; padding-block: 3rem; font: 400 0.95rem/1.6 var(--label); }
.foot__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.5rem 3rem; }
.foot a { color: #f7e6c4; text-decoration: none; }
.foot a:hover { color: #fff; text-decoration: underline; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; }
.foot__legal { flex-basis: 100%; margin: 1rem 0 0; color: #cdbfa6; font-size: 0.85rem; }
body.has-buybar .foot { padding-bottom: 3rem; }

/* The phone's buy bar: appears once the hero's buttons have scrolled away. */
.buybar { display: none; }

/* ==========================================================================
   13. Pages, posts and the block editor's content
   ========================================================================== */

.page-header { padding-block: clamp(2rem, 1.5rem + 3vw, 4rem) clamp(1.5rem, 1rem + 2vw, 2.5rem); text-align: center; }
.page-header h1 { max-width: 46rem; margin-inline: auto; }
.page-header .lede { font-size: 1.3rem; color: var(--ink-soft); }
.band { padding-block: 0 clamp(3.5rem, 2rem + 5vw, 6rem); }
.eyebrow { font: 600 0.78rem/1.3 var(--label); letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-soft); margin: 0 0 0.9rem; }
.eyebrow a { text-decoration: none; color: var(--cover-text); }
.entry-meta { font: 400 0.9rem var(--label); color: var(--ink-soft); }

.entry { max-width: 40rem; margin-inline: auto; }
.entry > * + * { margin-top: 0; }
.entry h2 { font-size: clamp(1.7rem, 1.3rem + 1.4vw, 2.3rem); margin-top: 2.5rem; }
.entry h3 { font-size: 1.5rem; margin-top: 2rem; }
.entry ul, .entry ol { padding-left: 1.4rem; margin: 0 0 1.25rem; }
.entry li { margin-bottom: 0.4rem; }
.entry a { color: var(--cover-text); }
.entry a:hover { color: var(--ink); }
.entry blockquote, .share-quote { margin: 2rem 0; padding-left: 1.25rem; border-left: 3px solid var(--cover); font-style: italic; font-size: 1.3rem; }
.entry blockquote p:last-child { margin-bottom: 0; }
.entry img { border-radius: 2px; }
.entry .alignright { float: right; margin: 0.3rem 0 1rem 1.5rem; max-width: 45%; }
.entry .alignleft { float: left; margin: 0.3rem 1.5rem 1rem 0; max-width: 45%; }
.entry .aligncenter { margin-inline: auto; }
.entry figure { margin: 2rem 0; }
.entry figcaption, .wp-caption-text { font: 400 0.85rem var(--label); color: var(--ink-soft); margin-top: 0.5rem; }
.entry .wp-caption { max-width: 100%; }
.entry hr { border: 0; text-align: center; margin: 2.5rem 0; }
.entry hr::before { content: ", , ,"; color: var(--cover); font-size: 1.6rem; letter-spacing: 0.4em; }
.entry::after { content: ""; display: table; clear: both; }

/* A post */
.post-header { width: min(100% - 2rem, 46rem); margin-inline: auto; text-align: center; padding-block: clamp(2rem, 1.5rem + 3vw, 4rem) 2rem; }
.post-header h1 { font-size: clamp(2.2rem, 1.5rem + 2.6vw, 3.4rem); }
.post-photo { width: min(100% - 2rem, 52rem); margin: 0 auto 2.5rem; }
.post-photo img { width: 100%; border-radius: 2px; }
.post-body { width: min(100% - 2rem, 40rem); padding-bottom: 3rem; }
.post-after { width: min(100% - 2rem, 40rem); margin-inline: auto; padding-block: 3rem; }
.post-nav .nav-links { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.post-nav a { text-decoration: none; display: block; }
.post-nav .nav-next { text-align: right; }
.post-nav__label { display: block; font: 600 0.75rem var(--label); letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-soft); }
.post-nav__title { font-size: 1.2rem; }

/* The blog: posts apart, with space and type weight between them (no rules). */
.post-list { list-style: none; margin: 0 auto; padding: 0; max-width: 52rem; display: grid; gap: 3rem; }
.post-card { display: grid; gap: 0.4rem; }
.post-card--image { grid-template-columns: 16rem 1fr; gap: 1.75rem; align-items: start; }
.post-card__image img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 2px; }
.post-card__date { font: 500 0.85rem var(--label); color: var(--ink-soft); margin: 0 0 0.3rem; }
.post-card__title { font-size: 1.7rem; margin: 0 0 0.5rem; }
.post-card__title a { text-decoration: none; }
.post-card__excerpt { color: var(--ink-soft); margin: 0; }
.pagination, .nav-links { font: 500 1rem var(--label); }
.pagination { margin-top: 3rem; text-align: center; }
.pagination .page-numbers { display: inline-block; padding: 0.4rem 0.7rem; text-decoration: none; }
.pagination .current { color: var(--cover-text); font-weight: 600; }

/* Comments */
.comments { margin-top: 3rem; }
.comment-list { list-style: none; padding: 0; margin: 0 0 2rem; }
.comment-list li { margin: 0 0 1.75rem; min-width: 0; overflow-wrap: anywhere; }
.comment-list .children { list-style: none; padding-left: 1.5rem; margin: 1.5rem 0 0; }
.comment-body { min-width: 0; }
.comment-meta { display: flex; flex-wrap: wrap; gap: 0.2rem 0.75rem; align-items: baseline; }
.comment-meta, .comment-metadata { font: 400 0.85rem var(--label); color: var(--ink-soft); }
.comment-author { font: 600 1rem var(--label); }
.comment-author .avatar { display: none; }
.comment-form label { display: block; font: 500 0.9rem var(--label); margin-bottom: 0.25rem; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea, .search-form input[type="search"] {
	width: 100%; padding: 0.65rem 0.9rem; font: 400 1rem var(--label); border: 2px solid var(--ink); border-radius: var(--radius); background: #fff; color: var(--ink);
}
.comment-form .submit, .search-form button, .search-submit { min-height: 3rem; padding: 0.7rem 1.4rem; border: 0; border-radius: var(--radius); background: var(--cover-deep); color: #fff; font: 600 1rem var(--label); cursor: pointer; }
.search-form { display: flex; gap: 0.5rem; max-width: 30rem; margin-top: 1.5rem; }

/* ==========================================================================
   14. The literary magazines page
   ========================================================================== */

.checked { font: 500 0.95rem var(--label); color: var(--ink-soft); }
.jump { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem; margin: 2.5rem 0 1rem; }
.jump a { font: 500 0.95rem var(--label); text-decoration: none; padding: 0.45rem 1rem; border: 2px solid var(--ink); border-radius: 999px; }
.jump a:hover { background: var(--ink); color: var(--paper); }
.mag-group { max-width: 52rem; margin: clamp(3rem, 2rem + 3vw, 4.5rem) auto 0; scroll-margin-top: 1.5rem; }
.mag-group h2 { text-align: center; }
.mag-group__intro { text-align: center; color: var(--ink-soft); max-width: 36rem; margin: 0 auto 2rem; }
.mag-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem 2.5rem; }
.mag-list li { background: var(--page); box-shadow: var(--shadow-card); border-left: 4px solid var(--cover); padding: 0.9rem 1.1rem; border-radius: 2px; }
.mag-list a { font-size: 1.25rem; font-weight: 500; text-decoration: none; }
.mag-list a:hover { text-decoration: underline; }
.proposed { display: inline-block; margin-left: 0.4rem; font: 600 0.7rem/1.3 var(--label); background: #fff3b0; color: #5a4600; padding: 0.1rem 0.4rem; border-radius: 0.25rem; vertical-align: middle; }

/* ==========================================================================
   15. Phone, designed for the thumb (mockup A's phone layout): headline and
   stars first, the book large but not the whole screen, one quote, two
   full-width buttons, then the buy bar follows you down the page.
   ========================================================================== */

@media (max-width: 46em) {
	body { font-size: 1.125rem; }

	.top { padding-block: 0.9rem; }
	.top__name { font-size: 0.74rem; letter-spacing: 0.12em; }
	.has-menu-toggle .top__nav { display: none; flex-basis: 100%; flex-direction: column; align-items: stretch; gap: 1rem; padding: 1rem 0 0.5rem; }
	.has-menu-toggle.is-menu-open .top__nav { display: flex; }
	.has-menu-toggle .top__nav ul { flex-direction: column; gap: 0.2rem; font-size: 1.1rem; }
	.has-menu-toggle .top__nav ul a { display: block; padding: 0.55rem 0; }
	.top__btn { align-self: flex-start; }

	.hero { padding-top: 0.5rem; }
	.hero__inner { grid-template-columns: 1fr; gap: 0; }
	.hero__text { display: contents; }
	.hero .label { order: 1; text-align: center; margin-top: 0.5rem; }
	.hero h1 { order: 2; text-align: center; font-size: 2.35rem; margin-bottom: 0.75rem; }
	.hero .rating { order: 3; text-align: center; margin-bottom: 1.5rem; }
	.hero .book { order: 4; width: 62%; margin-bottom: 1.75rem; }
	.hero .lede { order: 5; text-align: center; font-size: 1.15rem; }
	.hero .pull { order: 6; margin: 0.5rem 0 1.5rem; }
	.hero [data-hero-buttons] { order: 7; }
	.hero .buy .btn { flex: 1 1 100%; }
	.hero .buy__note { order: 8; text-align: center; }
	.free-hero .book { order: 3; width: 52%; }

	.contents li { grid-template-columns: 2.75rem 1fr; gap: 0.9rem; }
	.contents .num { font-size: 2.3rem; }
	.contents h3 { font-size: 1.35rem; }
	.quotes { grid-template-columns: 1fr; gap: 2rem; }
	.after-quotes .buy .btn, .last .buy .btn { flex: 1 1 100%; }
	.book-page p { text-align: left; hyphens: manual; }
	.try { grid-template-columns: 1fr; }
	.prompt__actions .btn { flex: 1 1 100%; }
	.mags__grid { grid-template-columns: 1fr 1fr; gap: 1.5rem 1rem; }

	.workbook .wrap { grid-template-columns: 1fr; text-align: center; }
	.workbook img { width: 8.5rem; margin-inline: auto; }
	.joes-ft__cta p, .joes-ft__open { width: 100%; }

	.post-card--image { grid-template-columns: 1fr; gap: 1rem; }
	.mag-list { grid-template-columns: 1fr; }
	.entry .alignright, .entry .alignleft { float: none; margin: 1.5rem auto; max-width: 100%; }
	.post-nav .nav-links { grid-template-columns: 1fr; }
	.post-nav .nav-next { text-align: left; }

	.buybar { display: flex; position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; gap: 0.6rem; align-items: center; padding: 0.6rem 1rem calc(0.6rem + env(safe-area-inset-bottom)); background: var(--ink); color: var(--paper); transform: translateY(110%); transition: transform 0.25s ease; box-shadow: 0 -0.4rem 1.2rem rgba(0,0,0,0.18); }
	.buybar.is-on { transform: none; }
	.buybar img { width: 2.4rem; border-radius: 2px; }
	.buybar span { flex: 1; font: 600 0.85rem/1.25 var(--label); }
	.buybar .btn { min-height: 2.6rem; padding: 0.5rem 1rem; font-size: 0.9rem; }
	body.has-buybar .foot { padding-bottom: 6rem; }
}
