:root {
  --bg: #f6f0e7;
  --paper: #fffaf4;
  --wine: #6f2337;
  --wine-soft: #8d3e54;
  --green: #365a49;
  --gold: #b08a4b;
  --ink: #2d2926;
  --muted: #716861;
  --line: #d9cdbf;
  --danger: #9b2c3c;
  --shadow: 0 10px 28px rgba(55, 42, 32, .07);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
.topbar {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  min-height: 72px; padding: 12px max(20px, calc((100vw - 1160px) / 2));
  background: rgba(246, 240, 231, .96); border-bottom: 1px solid rgba(111, 35, 55, .15);
  backdrop-filter: blur(12px);
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--wine); font: 700 21px/1.2 Georgia, "Times New Roman", serif; }
.brand-mark { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--wine); border-radius: 50%; font-size: 14px; }
.nav { display: flex; align-items: center; gap: 8px; }
.nav-link { min-height: 44px; padding: 9px 14px; border: 0; border-radius: 999px; background: transparent; color: var(--ink); font-size: 14px; }
.nav-link:hover, .nav-link.active { background: #efe5dc; color: var(--wine); font-weight: 700; }
main { width: min(1160px, calc(100% - 40px)); min-height: calc(100vh - 150px); margin: 0 auto; padding: 42px 0 72px; }
.hero-panel { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); min-height: 430px; overflow: hidden; margin-bottom: 42px; border: 1px solid var(--line); border-radius: 28px; background: linear-gradient(145deg, #efe5d8, #fbf6ef); box-shadow: var(--shadow); }
.hero-copy { display: flex; min-width: 0; flex-direction: column; justify-content: center; padding: clamp(30px, 4.2vw, 54px); }
.hero-copy h1 { margin-bottom: 16px; font-size: clamp(38px, 4.1vw, 48px); line-height: 1.08; }
.hero-copy .intro-copy { max-width: 480px; font-size: 17px; line-height: 1.6; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.hero-actions .button { min-height: 48px; padding-inline: 20px; }
.nav-cta { flex: 0 0 auto; white-space: nowrap; }
.profile-menu-button { display: grid; width: 44px; height: 44px; flex: 0 0 44px; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: var(--paper); color: var(--wine); }
.profile-menu-button:hover, .profile-menu-button:focus-visible { background: #efe5dc; }
.profile-dialog { width: min(500px, calc(100vw - 32px)); max-width: none; max-height: min(90vh, 760px); margin: auto; padding: 24px; overflow: auto; border: 1px solid var(--line); border-radius: 22px; background: var(--paper); color: var(--ink); box-shadow: 0 24px 70px rgba(33, 27, 23, .24); }
.profile-dialog[open] { display: grid; gap: 18px; }
.profile-dialog::backdrop { background: rgba(33, 27, 23, .44); backdrop-filter: blur(3px); }
.profile-dialog-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.profile-dialog-header h2 { font-size: 26px; }
.profile-dialog-header .eyebrow { margin-bottom: 4px; }
.profile-edit-form { display: grid; gap: 10px; }
.profile-edit-form label { margin-top: 4px; font-size: 14px; font-weight: 700; }
.profile-edit-form input { width: 100%; }
.profile-edit-form input[readonly] { background: #f3ece4; color: var(--muted); }
.profile-dialog-footer { display: flex; justify-content: flex-end; padding-top: 14px; border-top: 1px solid var(--line); }
.checkout-view { display: grid; gap: 24px; }
.checkout-heading { align-items: center; margin-top: 0; }
.checkout-layout { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); align-items: start; gap: 20px; }
.checkout-summary, .checkout-preview-card { min-width: 0; padding: clamp(22px, 3vw, 32px); border: 1px solid var(--line); border-radius: 20px; background: var(--paper); box-shadow: var(--shadow); }
.checkout-summary { background: linear-gradient(145deg, #efe5d8, #fbf6ef); }
.checkout-summary h2 { margin: 8px 0 12px; font-size: 29px; overflow-wrap: anywhere; }
.checkout-summary > .muted { line-height: 1.7; }
.checkout-summary-row { display: flex; justify-content: space-between; gap: 16px; padding: 15px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.checkout-summary-row strong { text-align: right; }
.checkout-total { margin-top: 10px; border-bottom: 0; color: var(--wine); font-size: 17px; }
.checkout-preview-card h2 { font-size: 27px; }
.checkout-preview-card form { display: grid; gap: 10px; margin: 20px 0; }
.checkout-preview-card label { display: grid; gap: 7px; font-size: 14px; font-weight: 700; }
.checkout-preview-card input:disabled, .checkout-preview-card select:disabled { background: #f3ece4; color: var(--muted); opacity: 1; }
.checkout-preview-card button:disabled { cursor: not-allowed; opacity: .65; }
.hero-visual { position: relative; min-height: 430px; overflow: hidden; background: #5b4335; }
.hero-visual::after { position: absolute; inset: 0; content: ""; background: linear-gradient(180deg, rgba(27, 22, 18, .04) 35%, rgba(27, 22, 18, .42) 100%); pointer-events: none; }
.hero-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.hero-note { position: absolute; z-index: 1; right: 20px; bottom: 20px; left: 20px; padding: 18px 20px; border: 1px solid rgba(255, 250, 244, .72); border-radius: 18px; background: rgba(255, 250, 244, .94); box-shadow: 0 12px 28px rgba(27, 22, 18, .18); backdrop-filter: blur(8px); }
.hero-note h2 { margin: 10px 0 6px; font-size: 24px; }
.hero-note p { margin: 0; }
.eyebrow { margin: 0 0 7px; color: var(--wine); font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.about-section { display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); align-items: start; gap: clamp(28px, 5vw, 64px); margin-top: 12px; padding: 28px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.about-heading h1, .about-heading h2 { max-width: 640px; font-size: clamp(30px, 3.2vw, 40px); line-height: 1.18; }
.about-content { min-width: 0; }
.about-lead { margin: 0; color: var(--ink); font-size: 19px; line-height: 1.65; }
.about-highlights { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 22px; }
.about-highlight { min-width: 0; padding-top: 12px; border-top: 2px solid var(--gold); }
.about-highlight p { margin: 5px 0 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.about-link { margin-top: 20px; }
.how-it-works-section .section-heading { margin-top: 0; }
.how-it-works-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.how-card { display: flex; min-height: 190px; flex-direction: column; align-items: flex-start; gap: 10px; padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: var(--paper); box-shadow: var(--shadow); }
.step-number { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 50%; background: #efe5dc; color: var(--wine); font-size: 12px; font-weight: 800; }
.how-card h3 { margin: 2px 0 0; color: var(--wine); font-size: 22px; }
.how-card p { margin: 0; line-height: 1.6; }
h1, h2, h3 { font-family: Georgia, "Times New Roman", serif; line-height: 1.15; }
h1 { margin: 0 0 14px; color: var(--wine); font-size: clamp(34px, 5vw, 54px); }
h2 { margin: 0; color: var(--wine); font-size: 30px; }
.intro-copy { max-width: 620px; margin: 0; color: var(--muted); font-size: 18px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin: 40px 0 18px; }
.section-heading .muted { margin: 8px 0 0; }
.muted { color: var(--muted); font-size: 14px; }
.cycle-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.journey-section { display: grid; gap: 12px; margin-top: 24px; }
.journey-section > h3 { margin: 0; font-size: 20px; }
.journey-section > .muted { margin: 0; }
.public-feature { margin-top: 34px; scroll-margin-top: 92px; }
.book-feature-card { display: grid; grid-template-columns: minmax(220px, .72fr) minmax(0, 1.28fr); align-items: center; gap: clamp(22px, 4vw, 42px); padding: 24px; border: 1px solid var(--line); border-radius: 22px; background: var(--paper); box-shadow: var(--shadow); }
.book-cover-art { display: flex; min-height: 280px; flex-direction: column; justify-content: space-between; gap: 18px; padding: 24px; overflow: hidden; border: 1px solid rgba(255,255,255,.18); border-radius: 16px; background: radial-gradient(circle at 85% 15%, rgba(176,138,75,.35), transparent 34%), linear-gradient(145deg, #7d3448, #401d2a 78%); color: #fffaf4; box-shadow: inset 7px 0 rgba(255,255,255,.1), 0 10px 22px rgba(55,42,32,.12); }
.book-cover-caption { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.book-cover-title { max-width: 320px; font: 700 clamp(25px, 3vw, 34px)/1.12 Georgia, "Times New Roman", serif; overflow-wrap: anywhere; }
.book-cover-author { font-size: 14px; }
.book-feature-copy h3 { margin: 8px 0; color: var(--wine); font-size: 30px; }
.book-feature-copy .book-author { margin: 0 0 14px; color: var(--muted); font-size: 16px; }
.book-feature-copy .muted { max-width: 650px; line-height: 1.7; }
.book-feature-copy .button { margin-top: 10px; }
.affiliate-note { display: block; margin-top: 10px; color: var(--muted); font-size: 12px; }
.cycle-card, .access-card, .editor-card, .cycle-row { border: 1px solid var(--line); border-radius: 20px; background: var(--paper); box-shadow: var(--shadow); }
.cycle-card { display: flex; min-height: 220px; flex-direction: column; padding: 22px; }
.cycle-card h3 { margin: 12px 0 6px; font-size: 23px; }
.cycle-card p { margin: 6px 0 14px; }
.cycle-card .price { margin-top: auto; color: var(--wine); font-size: 18px; font-weight: 750; }
.badge { width: fit-content; padding: 5px 10px; border-radius: 999px; background: #eee0e4; color: var(--wine); font-size: 12px; font-weight: 750; }
.notice { margin: 16px 0; padding: 14px 16px; border-left: 4px solid var(--green); border-radius: 10px; background: #edf1eb; color: var(--ink); font-size: 14px; }
.notice.error, .form-message.error { border-color: var(--danger); color: var(--danger); }
.access-card { display: grid; grid-template-columns: minmax(180px, .7fr) minmax(320px, 1.3fr); gap: 24px; padding: 22px; }
.auth-forms { display: grid; gap: 16px; }
.access-form { display: grid; max-width: 520px; gap: 10px; }
.auth-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
[hidden] { display: none !important; }
.access-copy h2, .editor-card h2 { font-size: 25px; }
.access-copy p { margin-bottom: 0; }
.access-form label, .form-grid label, .content-block label { display: grid; gap: 7px; font-size: 14px; font-weight: 700; }
.inline-form { display: flex; gap: 10px; margin-top: 7px; }
input, textarea, select { width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid #b9aa9b; border-radius: 10px; background: white; color: var(--ink); font-size: 15px; }
textarea { min-height: 112px; resize: vertical; }
input:focus, textarea:focus, button:focus-visible { outline: 3px solid rgba(83, 103, 125, .42); outline-offset: 2px; }
.button { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; gap: 8px; padding: 9px 15px; border: 1px solid transparent; border-radius: 999px; font-size: 14px; font-weight: 700; }
.button.primary { background: var(--wine); color: white; }
.button.primary:hover { background: #581b2b; }
.button.secondary { border-color: var(--wine); background: transparent; color: var(--wine); }
.button.secondary:hover { background: #efe5dc; }
.button.ghost { border-color: var(--line); background: transparent; color: var(--ink); }
.button.ghost:hover { background: #f3ece4; }
.button.danger { border-color: #d7a4aa; background: #fff4f3; color: var(--danger); }
.form-message { margin: 10px 0 0; font-size: 14px; }
.admin-panel { margin-top: 30px; }
.admin-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.admin-tab { min-height: 44px; padding: 9px 15px; border: 1px solid transparent; border-radius: 999px; background: transparent; color: var(--ink); font-size: 14px; font-weight: 700; }
.admin-tab:hover, .admin-tab.active { border-color: var(--line); background: #efe5dc; color: var(--wine); }
.admin-dashboard-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.admin-dashboard-card { display: flex; min-width: 0; min-height: 210px; flex-direction: column; align-items: flex-start; padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: var(--paper); box-shadow: var(--shadow); }
.admin-dashboard-card h2 { font-size: 24px; }
.admin-dashboard-card .muted { margin: 10px 0 18px; line-height: 1.6; }
.admin-dashboard-card .button { margin-top: auto; }
.admin-tab-panel { display: grid; gap: 16px; }
.list-heading { margin-top: 0; }
.list-heading h2 { font-size: 27px; }
.cycle-list { display: grid; gap: 12px; }
.cycle-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 18px; padding: 17px 20px; }
.cycle-row h3 { margin: 0 0 5px; font-size: 21px; }
.cycle-row p { margin: 3px 0; }
.row-meta { color: var(--muted); font-size: 13px; }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.editor-card { margin-top: 24px; padding: 24px; }
.editor-card .section-heading { align-items: center; margin: 0 0 20px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid .wide { grid-column: 1 / -1; }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.content-manager { display: grid; gap: 18px; }
.content-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.content-block { display: grid; align-content: start; gap: 12px; padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: #fffdf9; }
.content-block h3 { margin: 0; color: var(--wine); font-size: 23px; }
.event-manager { grid-column: 1 / -1; }
.content-block h4 { margin: 3px 0 0; font: 700 18px/1.3 Georgia, "Times New Roman", serif; color: var(--wine); }
.time-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.session-list { display: grid; gap: 9px; }
.session-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.session-row strong { display: block; font-size: 15px; }
.session-row span { color: var(--muted); font-size: 13px; }
.session-row .button { min-height: 40px; padding: 7px 11px; }
.session-actions { display: flex; gap: 7px; }
.publish-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 4px; }
.publish-actions .muted { max-width: 660px; margin: 0; }
.empty-state { grid-column: 1 / -1; padding: 24px; border: 1px dashed var(--line); border-radius: 18px; color: var(--muted); text-align: center; }
.cycle-card > .button { align-self: flex-start; margin-top: 12px; }
.enrollment-section { scroll-margin-top: 90px; }
.consent-choice { display: flex !important; grid-template-columns: auto 1fr; align-items: flex-start; gap: 12px !important; }
.consent-choice input { width: 20px; min-width: 20px; min-height: 20px; margin: 1px 0 0; padding: 0; }
.admin-data-panel { display: grid; gap: 12px; }
.admin-data-panel .section-heading { margin: 0; }
.table-scroll { width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: white; }
.data-table { width: 100%; min-width: 760px; border-collapse: collapse; font-size: 14px; }
.data-table th, .data-table td { padding: 11px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.data-table th { background: #f3ece4; color: var(--wine); font-size: 13px; }
.data-table td { overflow-wrap: anywhere; }
.data-table tr:last-child td { border-bottom: 0; }
.pagination { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.pagination .button { min-height: 42px; }
select:focus { outline: 3px solid rgba(83, 103, 125, .42); outline-offset: 2px; }
footer { display: flex; justify-content: space-between; gap: 20px; padding: 22px max(20px, calc((100vw - 1160px) / 2)); border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
@media (max-width: 900px) {
  .hero-panel { grid-template-columns: 1fr; }
  .hero-copy { padding: clamp(28px, 6vw, 48px); }
  .hero-visual { min-height: 360px; }
  .about-section { grid-template-columns: 1fr; gap: 20px; }
  .about-heading h1, .about-heading h2 { max-width: 640px; }
  .checkout-layout { grid-template-columns: 1fr; }
  .how-it-works-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .book-feature-card { grid-template-columns: minmax(180px, .8fr) minmax(0, 1.2fr); }
}
@media (max-width: 760px) {
  .topbar { align-items: flex-start; flex-direction: column; gap: 8px; padding: 12px 18px; }
  .nav { width: 100%; flex-wrap: wrap; overflow: visible; }
  .nav-link { white-space: nowrap; }
  .nav-cta { margin-left: auto; }
  main { width: min(100% - 28px, 640px); padding-top: 24px; }
  .hero-panel { margin-bottom: 34px; border-radius: 22px; }
  .hero-copy { padding: 30px 24px; }
  .hero-copy h1 { font-size: clamp(36px, 8.5vw, 44px); }
  .hero-visual { min-height: 330px; }
  .hero-note { right: 16px; bottom: 16px; left: 16px; padding: 17px; }
  .about-section { padding: 22px 0; }
  .book-feature-card { grid-template-columns: 1fr; }
  .book-cover-art { min-height: 245px; }
  .enrollment-section { scroll-margin-top: 180px; }
  .cycle-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .access-card { grid-template-columns: 1fr; gap: 12px; }
  .content-grid { grid-template-columns: 1fr; }
  .publish-actions { align-items: flex-start; flex-direction: column; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .list-heading { align-items: stretch; }
  .list-heading .button { align-self: flex-start; }
  footer { flex-direction: column; gap: 4px; }
}
@media (max-width: 520px) {
  .brand { font-size: 19px; }
  .hero-copy { padding: 26px 21px; }
  .hero-copy h1 { font-size: 36px; }
  .hero-copy .intro-copy { font-size: 16px; }
  .hero-actions { flex-direction: column; margin-top: 22px; }
  .hero-actions .button { width: 100%; }
  .hero-visual { min-height: 310px; }
  .admin-dashboard-grid { grid-template-columns: 1fr; }
  .about-section { gap: 18px; }
  .about-lead { font-size: 17px; }
  .about-highlights { grid-template-columns: 1fr; gap: 12px; margin-top: 18px; }
  .about-highlight { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 10px; align-items: start; }
  .about-highlight p { margin: 0; }
  .how-it-works-grid { grid-template-columns: 1fr; }
  .how-card { display: grid; min-height: 0; grid-template-columns: 36px minmax(0, 1fr); grid-template-rows: auto auto; align-items: start; column-gap: 12px; row-gap: 4px; padding: 15px; }
  .step-number { grid-row: 1 / 3; }
  .how-card h3, .how-card p { grid-column: 2; }
  .hero-note { right: 12px; bottom: 12px; left: 12px; padding: 15px; }
  .hero-note h2 { font-size: 22px; }
  .book-feature-card { padding: 14px; }
  .book-cover-art { min-height: 225px; padding: 20px; }
  .book-feature-copy h3 { font-size: 26px; }
  .cycle-grid { grid-template-columns: 1fr; }
  .cycle-card { min-height: 180px; }
  .cycle-row { grid-template-columns: 1fr; }
  .session-row { grid-template-columns: 1fr; }
  .session-actions { width: 100%; }
  .session-actions .button { flex: 1; }
  .row-actions { width: 100%; }
  .row-actions .button { flex: 1; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .wide { grid-column: auto; }
  .inline-form { flex-wrap: wrap; }
  .inline-form input { flex-basis: 100%; }
  .inline-form .button { flex: 1; }
  h2 { font-size: 26px; }
}
