:root {
    color-scheme: light;
    --ink: #142e3f;
    --navy: #102b43;
    --navy-deep: #0b2238;
    --green: #1c5c49;
    --green-deep: #174939;
    --mint: #d3e5aa;
    --paper: #faf8f2;
    --white: #fffefa;
    --line: #d8ded8;
    --muted: #52636a;
    --wash: #edf2eb;
    --serif: Georgia, 'Times New Roman', serif;
    --sans: 'Segoe UI', system-ui, sans-serif;
    --radius: 13px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 1.5rem; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1rem/1.55 var(--sans); }
[hidden] { display: none !important; }
img, video { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; }
button { color: inherit; }
a { color: var(--green-deep); text-underline-offset: .18em; }
a:hover { color: var(--green); }
:focus-visible { outline: 3px solid #32755c; outline-offset: 3px; }
h1, h2, h3 { margin: 0; font-family: var(--serif); line-height: 1.12; font-weight: 500; overflow-wrap: anywhere; }
h1 { font-size: clamp(2.35rem, 5.2vw, 4.45rem); letter-spacing: -.035em; }
h2 { font-size: clamp(1.9rem, 4vw, 3rem); letter-spacing: -.035em; }
h3 { font-size: 1.45rem; }
p { margin: 0; }
p + p { margin-top: .75rem; }
ul { padding-left: 1.25rem; }
small { font-size: .875rem; }
.wrap { width: min(100% - 3rem, 1160px); margin-inline: auto; }
.section { padding-block: clamp(2.25rem, 5vw, 4.25rem); }
.compact { max-width: 850px; }
.section.compact + .section.compact { padding-top: 0; }
.muted, time { color: var(--muted); }
.prose { white-space: pre-wrap; overflow-wrap: anywhere; }
.sr-only, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { position: fixed; z-index: 2; padding: .75rem; background: var(--white); border-radius: .5rem; top: .5rem; left: .5rem; }
.eyebrow { display: flex; align-items: center; gap: .6rem; font-size: .83rem; font-weight: 730; letter-spacing: .13em; text-transform: uppercase; color: var(--green-deep); margin-bottom: .65rem; }
.eyebrow::before { content: ""; width: 1.35rem; height: 1px; background: currentColor; flex-shrink: 0; }

.topbar { border-bottom: 1px solid var(--line); background: var(--white); }
.header { display: grid; grid-template-columns: 1fr auto 1fr; gap: 1.4rem; align-items: center; min-height: 76px; }
.brand { display: inline-flex; align-items: center; gap: .65rem; width: fit-content; text-decoration: none; color: var(--navy); }
.brand img { border-radius: 50%; flex: none; }
.brand span { display: grid; }
.brand strong { font: 500 1.63rem/1.02 var(--serif); letter-spacing: -.045em; }
.brand small { font-size: .69rem; color: var(--muted); letter-spacing: .045em; }
.header nav, .session-links { display: flex; align-items: center; gap: clamp(.75rem, 2vw, 1.7rem); }
.header nav a, .session-links > a:not(.button), .plain { font-size: .92rem; font-weight: 620; text-decoration: none; color: var(--ink); }
.header nav a { padding-block: 1.65rem; white-space: nowrap; }
.header nav a[aria-current="page"] { color: var(--green-deep); box-shadow: inset 0 -2px var(--green); }
.header nav a:hover, .session-links > a:hover, .plain:hover { text-decoration: underline; }
.session-links { justify-content: end; gap: .85rem; }
.session-links .button { min-height: 2.55rem; padding: .5rem .8rem; white-space: nowrap; }
.header form { margin: 0; }
.plain { border: none; background: none; padding: .65rem .25rem; cursor: pointer; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 2.8rem; border: 1px solid transparent; border-radius: .48rem; padding: .55rem 1rem; font: 650 .92rem/1.25 var(--sans); text-align: center; text-decoration: none; white-space: normal; cursor: pointer; transition: background-color .15s ease, border-color .15s ease; }
.button.primary { color: #fff; background: var(--green); border-color: var(--green); }
.button.primary:hover { background: var(--green-deep); border-color: var(--green-deep); }
.button.subtle { color: var(--green-deep); border-color: #c9d6cd; background: var(--white); }
.button.subtle:hover { background: #edf2eb; border-color: #a3bcac; }
.button.light { background: var(--mint); color: var(--navy-deep); border-color: var(--mint); }
.button.light:hover { background: #e1efc6; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem .85rem; }
.actions > a:not(.button), .back-link { font-weight: 650; }
.inline-form { margin: 0; }
.flash { margin-top: 1.2rem; border: 1px solid #bdd1bf; background: #eaf3e8; padding: .9rem 1rem; border-radius: .5rem; color: #1b4738; }
.flash.error { background: #f8ede9; color: #812d22; border-color: #e0b5ae; }
.flash.info { background: #edf2f8; color: var(--navy); border-color: #bcd0e2; }

.hero { background: var(--navy); color: var(--white); }
.hero-layout { display: grid; grid-template-columns: 1fr .94fr; align-items: center; gap: clamp(2rem, 6vw, 6rem); padding-block: clamp(2.75rem, 5vw, 4.5rem); }
.hero-content { min-width: 0; }
.hero .eyebrow, .community-band .eyebrow, .auth-intro .eyebrow { color: var(--mint); }
.hero h1 { max-width: 11ch; font-size: clamp(3.05rem, 5.8vw, 5.25rem); line-height: .99; }
.hero h1 em { color: var(--mint); font-weight: 400; }
.hero-content > p:not(.eyebrow) { max-width: 43ch; margin-top: 1.1rem; color: #d8e3eb; font-size: clamp(1rem, 1.5vw, 1.13rem); }
.hero-search { display: flex; gap: .5rem; align-items: center; max-width: 29rem; margin-top: 1.5rem; background: var(--white); padding: .34rem .34rem .34rem .9rem; border-radius: .55rem; }
.hero-search input { padding: .45rem .15rem; border: 0; background: none; width: 100%; min-width: 0; }
.hero-search input:focus-visible { outline-offset: 0; }
.search-icon { display: inline-block; position: relative; flex: none; width: .8rem; height: .8rem; margin-right: .3rem; border: 1.75px solid var(--muted); border-radius: 50%; }
.search-icon::after { content: ""; position: absolute; height: 1.75px; width: .33rem; transform: rotate(45deg); left: .57rem; top: .62rem; background: var(--muted); }
.hero-art { padding: .52rem; border: 1px solid #51677a; border-radius: 1rem; }
.hero-art img { width: 100%; height: auto; aspect-ratio: 1132 / 905; object-fit: cover; border-radius: .52rem; background: #e2dfd4; }
.hero :focus-visible, .community-band :focus-visible, .footer :focus-visible { outline-color: var(--mint); }
.hero-search :focus-visible { outline-color: var(--green); }
.page-head { background: var(--wash); border-bottom: 1px solid var(--line); }
.page-head .wrap { padding-block: clamp(2.5rem, 6vw, 4.65rem); }
.page-head p:not(.eyebrow) { max-width: 64ch; margin-top: .75rem; color: var(--muted); }
.page-head .button, .page-head .pill { margin-top: 1.1rem; }
.page-head .back-link { display: block; margin-bottom: 1.05rem; width: fit-content; }
.page-head h1 + a { display: inline-block; margin-top: .9rem; }
.section-title { display: flex; justify-content: space-between; align-items: end; flex-wrap: wrap; gap: .8rem 1rem; margin-bottom: 1.4rem; }
.sub-section { margin-top: 3.25rem; }

.book-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.3rem; }
.book-card { min-width: 0; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.card-cover-link { display: block; }
.card-cover-link:focus-visible { outline-offset: -4px; }
.cover-frame { display: grid; place-items: center; min-width: 0; padding: 1.55rem .75rem; background: radial-gradient(ellipse at 50% 15%, #ffffff5c, transparent 70%), var(--mat); }
.cover-forest { --mat: #e1e9dd; --cover: #193c35; --art: #96bc93; --cover-ink: #eef2d8; }
.cover-wine { --mat: #eddfd7; --cover: #643032; --art: #d5a582; --cover-ink: #fae8ca; }
.cover-ocean { --mat: #dce7eb; --cover: #1b4263; --art: #92baca; --cover-ink: #edf0dc; }
.cover-ochre { --mat: #eee6d2; --cover: #744621; --art: #e8b773; --cover-ink: #fff1cf; }
.cover-violet { --mat: #e8e0ea; --cover: #4b3e61; --art: #d6bee4; --cover-ink: #f5ebdb; }
.cover-slate { --mat: #e1e8e6; --cover: #304e51; --art: #a1c0bc; --cover-ink: #ecf1df; }
.book-cover { position: relative; display: flex; align-items: center; flex-direction: column; justify-content: flex-start; width: min(100%, 142px); aspect-ratio: 2 / 3; padding: .95rem .63rem .65rem .8rem; overflow: hidden; border: 1px solid #152b3280; border-radius: .22rem .38rem .38rem .22rem; background: linear-gradient(90deg, #1116, transparent 8%, transparent 93%, #1114), var(--cover); color: var(--cover-ink); text-align: center; box-shadow: 4px 7px 13px #18252b3a; transition: transform .2s ease; }
.card-cover-link:hover .book-cover { transform: translateY(-3px); }
.book-cover::before { position: absolute; content: ""; inset: .34rem; border: 1px solid var(--art); opacity: .46; border-radius: .15rem; pointer-events: none; }
.cover-author, .cover-mark { z-index: 1; font-size: .52rem; letter-spacing: .095em; text-transform: uppercase; font-weight: 680; line-height: 1.25; overflow-wrap: anywhere; }
.cover-title { z-index: 1; display: -webkit-box; overflow: hidden; -webkit-line-clamp: 5; -webkit-box-orient: vertical; font: 1.12rem/1.02 var(--serif); margin: .54rem 0 .42rem; overflow-wrap: anywhere; }
.cover-art { width: 3rem; height: 2.6rem; min-height: 1rem; margin: auto 0; color: var(--art); border: 1px solid currentColor; border-radius: 50% 50% 26% 26%; position: relative; opacity: .75; }
.cover-art::after, .cover-art::before { content: ""; position: absolute; inset: .22rem; border: 1px solid currentColor; border-radius: inherit; transform: rotate(24deg); }
.cover-art::after { transform: rotate(-24deg); }
.cover-mark { margin-top: .45rem; }
.cover-wine .cover-art { border-radius: 55% 0 55% 0; }
.cover-ocean .cover-art { border-radius: 50%; }
.cover-ochre .cover-art { border-radius: 50% 0; }
.cover-violet .cover-art { border-radius: 0 50%; }
.cover-slate .cover-art { border-radius: 10%; }
.book-card-content { padding: 1.15rem 1.2rem 1.25rem; }
.metadata { display: flex; gap: .35rem; flex-wrap: wrap; margin-bottom: .65rem; }
.metadata span, .pill { display: inline-block; background: #eaf1ea; color: var(--green-deep); padding: .17rem .58rem; border-radius: 20px; font-size: .8rem; font-weight: 620; overflow-wrap: anywhere; }
.book-card h3 a, .topic-card h3 a, .club-card h3 a { color: inherit; text-decoration: none; }
.book-card h3 a:hover, .topic-card h3 a:hover, .club-card h3 a:hover { text-decoration: underline; }
.book-card-content > p.muted { font-size: .94rem; margin-top: .4rem; }
.video-link { display: inline-flex; align-items: center; gap: .45rem; margin-top: .9rem; font-size: .87rem; font-weight: 650; }
.video-link span { font-size: .73rem; }
.community-band { padding-block: 3rem; background: var(--green-deep); color: var(--white); }
.community-home { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.community-home p:not(.eyebrow) { color: #e0ede6; margin-top: .75rem; max-width: 47ch; }
.community-home .button { margin-top: 1.05rem; }
.recent { margin: 0; padding: 0; list-style: none; align-self: center; }
.recent li { padding: .85rem .15rem; border-bottom: 1px solid #62907e; }
.recent li a, .recent li small { display: block; color: var(--white); overflow-wrap: anywhere; }
.recent li small { color: #daeadc; }

.panel { padding: clamp(1rem, 2.4vw, 1.65rem); border: 1px solid var(--line); background: var(--white); border-radius: var(--radius); min-width: 0; }
.panel + .panel { margin-top: .8rem; }
.panel > h2, .panel > h3 { margin-bottom: .65rem; }
.panel > p + .button, .panel > p + .inline-form { margin-top: .75rem; }
.stack { display: grid; gap: 1rem; }
.stack > .button { justify-self: start; }
label { display: grid; gap: .35rem; font-weight: 620; font-size: .94rem; min-width: 0; }
input:not([type="checkbox"]):not([type="hidden"]), select, textarea { min-height: 2.8rem; border: 1px solid #bdccc5; border-radius: .4rem; background: var(--white); color: var(--ink); padding: .55rem .7rem; width: 100%; min-width: 0; font-size: 1rem; font-weight: 400; }
.hero-search input[type="search"] { border: 0; }
textarea { resize: vertical; }
input[readonly] { background: var(--wash) !important; }
fieldset { min-width: 0; border: 1px solid var(--line); border-radius: .5rem; padding: .75rem; }
legend { font-weight: 700; }
.checkbox-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; margin-top: .7rem; }
.check { display: flex; align-items: center; gap: .55rem; }
.check input { height: 1.1rem; width: 1.1rem; accent-color: var(--green); flex: none; margin: 0; }
.filter-box { display: grid; gap: .85rem; margin-bottom: 2rem; }
.filter-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem; }
.pagination { display: flex; gap: .8rem; align-items: center; justify-content: center; margin-top: 1.5rem; }
.empty { padding: .9rem 1rem; background: var(--wash); border-radius: .5rem; color: var(--muted); margin-bottom: .9rem; }
.breadcrumb { display: flex; align-items: baseline; gap: .5rem; padding-block: 1.3rem; font-size: .91rem; overflow-wrap: anywhere; }
.detail-head { display: grid; grid-template-columns: minmax(12rem, .65fr) 1.35fr; align-items: center; gap: clamp(1.4rem, 5vw, 4.7rem); padding-bottom: 2.1rem; }
.cover-full { border-radius: var(--radius); padding: clamp(1.5rem, 4vw, 3rem); }
.cover-full .book-cover { width: min(100%, 195px); padding: 1.35rem .95rem .9rem 1.1rem; }
.cover-full .cover-author, .cover-full .cover-mark { font-size: .66rem; }
.cover-full .cover-title { font-size: 1.5rem; margin-block: .9rem .55rem; }
.cover-full .cover-art { height: 3.1rem; width: 3.45rem; }
.detail-info h1 { font-size: clamp(2.5rem, 5vw, 4.3rem); margin-bottom: .4rem; }
.book-byline { font-size: 1.12rem; font-weight: 650; color: var(--green-deep); margin-bottom: .8rem; }
.detail-info p { max-width: 65ch; overflow-wrap: anywhere; }
.detail-info .actions { margin-top: 1rem; }
.reading-form { display: flex; align-items: end; gap: .65rem; margin-top: .85rem; }
.reading-form select { min-width: 9.4rem; }
.detail-nav { border-block: 1px solid var(--line); }
.detail-nav nav { display: flex; flex-wrap: wrap; gap: .35rem 1.3rem; }
.detail-nav a { padding: .55rem .1rem; color: var(--ink); font-weight: 650; font-size: .9rem; }
.video-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem; }
.video-grid .video-panel { padding: 0; overflow: hidden; margin: 0; }
.video-grid .video-panel:only-child { grid-column: 1 / -1; max-width: 850px; width: 100%; margin-inline: auto; }
.video-panel video { width: 100%; aspect-ratio: 16 / 9; background: var(--navy); }
.youtube-preview { display: grid; position: relative; place-items: center; aspect-ratio: 16 / 9; overflow: hidden; background: var(--navy); }
.youtube-preview img, .youtube-preview iframe { position: absolute; inset: 0; width: 100%; height: 100%; }
.youtube-preview img { object-fit: cover; opacity: .7; }
.youtube-preview iframe { border: 0; }
.youtube-preview .button { position: relative; }
.video-open-link { padding: .55rem 1rem; background: var(--wash); }
.shopping-links { margin-top: 1rem; }
.video-panel > .narration { margin: .85rem .85rem 0; }
.original-analysis { padding: .7rem .85rem 0; }
.original-analysis > summary { margin-bottom: .5rem; }
.media-remove { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.media-remove[open] p { margin: .5rem 0; }
.button.danger { background: #f9eeeb; color: #832f25; border-color: #deb5ac; }
.button.danger:hover { background: #f1ded9; }
.video-content { padding: clamp(1rem, 2.4vw, 1.65rem); }
.video-content > * + * { margin-top: .8rem; }
summary { cursor: pointer; color: var(--green-deep); font-weight: 650; }
details > .stack, details > .prose, details > .button { margin-top: .8rem; }
.post p { margin-top: .45rem; }
.post + form, .post + h2 { margin-top: 1.25rem; }
.post-header { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: .3rem .75rem; overflow-wrap: anywhere; }
.post-header span, .post-header time { font-size: .91rem; }
.reply { border-left: 2px solid #b9d0c2; padding-left: .85rem; margin: .85rem 0 .75rem .25rem; }
.post details { margin-top: .8rem; }
.community-layout { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 1.5rem 2rem; }
.community-filter { display: flex; align-items: end; flex-wrap: wrap; gap: .65rem; margin-bottom: 1rem; }
.community-filter label { flex: 1 1 9.5rem; }
.topic-list { display: grid; gap: .7rem; margin-block: .9rem 1.25rem; }
.topic-list .panel { margin: 0; }
.topic-card h3, .club-card h3 { margin-bottom: .45rem; }
.club-card .prose { margin-bottom: .65rem; }
.auth-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); max-width: 912px; min-height: 64vh; align-items: stretch; gap: 1rem; }
.auth-intro { background: var(--navy); border-radius: var(--radius); padding: clamp(1.4rem, 4vw, 3rem); color: var(--white); }
.auth-intro h2 { max-width: 10ch; }
.auth-intro p:not(.eyebrow) { margin-top: 1rem; color: #d8e3eb; max-width: 35ch; }
.auth-intro img { margin-top: 1.1rem; border-radius: 50%; }
.auth-panel { padding: clamp(1.4rem, 4vw, 2.6rem); align-self: center; }
.auth-panel h1 { font-size: clamp(2rem, 4vw, 2.9rem); margin-bottom: 1rem; }
.auth-panel p { margin-top: 1rem; }
.rows { list-style: none; padding-block: .25rem; margin: 0; }
.rows li { display: flex; justify-content: space-between; align-items: center; gap: .6rem 1rem; padding: .75rem .1rem; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.rows li:last-child { border-bottom: 0; }
.rows li small { display: block; color: var(--muted); }
.rows .metadata { margin: 0; }
.footer { background: var(--navy-deep); color: var(--white); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; padding-block: 1.45rem; gap: 1rem; flex-wrap: wrap; }
.footer-inner > div { display: flex; gap: .75rem 1.25rem; flex-wrap: wrap; }
.footer a, .footer .plain { color: var(--white); }
.footer .brand small { color: #d1dedf; }
.footer .plain { padding: 0; }

@media (max-width: 850px) {
    .header { grid-template-columns: 1fr auto; gap: .2rem 1rem; padding-top: .7rem; }
    .header nav { grid-row: 2; grid-column: 1 / -1; justify-content: center; }
    .header nav a { padding-block: .6rem; }
    .hero-layout { grid-template-columns: 1fr .8fr; gap: 1.5rem; }
    .book-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .community-layout { grid-template-columns: 1fr; }
}
@media (max-width: 570px) {
    .wrap { width: calc(100% - 2rem); }
    .hero-layout, .detail-head, .community-home, .auth-layout, .video-grid { grid-template-columns: minmax(0, 1fr); }
    .hero-layout { padding-block: 2.2rem; }
    .hero h1 { max-width: 11.2ch; font-size: clamp(2.6rem, 12vw, 3.9rem); }
    .hero-art { max-width: 350px; }
    .hero-art img { aspect-ratio: 1.42; object-position: 50% 50%; }
    .session-links { gap: .52rem; }
    .session-links .button { min-height: 2.4rem; padding-inline: .52rem; font-size: .83rem; }
    .session-links .plain, .session-links > a:not(.button) { font-size: .83rem; }
    .brand { gap: .42rem; }
    .brand img { height: 31px; width: 31px; }
    .brand strong { font-size: 1.37rem; }
    .brand small { font-size: .64rem; }
    .header nav { justify-content: space-between; gap: .35rem; }
    .header nav a { font-size: .82rem; }
    .book-grid { gap: .65rem; }
    .book-card-content { padding: .7rem; }
    .book-card h3 { font-size: 1.15rem; }
    .book-card-content > p.muted { font-size: .85rem; }
    .cover-frame { padding: .82rem .6rem; }
    .book-cover { max-width: 111px; padding: .68rem .44rem .48rem .53rem; }
    .cover-title { font-size: .94rem; }
    .cover-author, .cover-mark { font-size: .45rem; }
    .cover-art { width: 2rem; height: 1.8rem; }
    .cover-full .book-cover { max-width: none; width: min(100%, 145px); }
    .cover-full .cover-title { font-size: 1.13rem; margin-block: .6rem; }
    .cover-full .cover-art { width: 2.5rem; height: 2.2rem; }
    .detail-head .cover-full { padding: 1.2rem; }
    .auth-intro { display: none; }
    .form-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 360px) {
    .wrap { width: calc(100% - 1.4rem); }
    .header .brand img { display: none; }
    .header .session-links { gap: .35rem; }
    .header nav a { font-size: .77rem; }
    .checkbox-grid { grid-template-columns: 1fr; }
    .rows li { align-items: start; flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition-duration: .01ms !important; }
}
