/*
Theme Name: ClinSphere Books
Theme URI: https://books.clinspherejournals.com
Author: ClinSphere
Description: ClinSphere Decoded book library, author directory, and publication tracker.
Version: 1.3.0
Requires at least: 6.4
Requires PHP: 8.1
Text Domain: clinsphere-books
*/

:root {
  --navy: #07183f;
  --navy-2: #0c2a67;
  --blue: #0867ef;
  --blue-2: #1183ff;
  --cyan: #49d3ff;
  --ice: #e9f5ff;
  --paper: #f7fbff;
  --ink: #11203a;
  --muted: #64758f;
  --line: #dce7f3;
  --white: #fff;
  --green: #0c9b7b;
  --gold: #f2b84b;
  --radius: 22px;
  --shadow: 0 18px 55px rgba(7, 24, 63, .11);
  --wrap: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--blue); }
button, input, select, textarea { font: inherit; }
.wrap { width: min(var(--wrap), calc(100% - 44px)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

.topline { background: var(--navy); color: #d8e7ff; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
.topline .wrap { min-height: 34px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.topline-links { display: flex; gap: 20px; align-items: center; }
.topline a { color: #d8e7ff; }
.topline a:hover { color: var(--cyan); }

.site-header { position: sticky; z-index: 30; top: 0; background: rgba(255,255,255,.95); backdrop-filter: blur(15px); border-bottom: 1px solid rgba(220,231,243,.85); }
.masthead { min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 26px; }
.brand { display: flex; align-items: center; gap: 12px; min-width: 210px; }
.brand-mark { width: 54px; height: 54px; flex: 0 0 54px; overflow: hidden; border-radius: 15px; background: var(--navy); box-shadow: 0 7px 18px rgba(8,103,239,.2); }
.brand-mark img { width: 240%; height: 240%; max-width: none; object-fit: cover; transform: translate(-29%, -11%); }
.brand-wordmark { line-height: 1.08; }
.brand-wordmark strong { display: block; font-size: 19px; font-weight: 850; letter-spacing: .08em; color: var(--navy); }
.brand-wordmark span { display: block; margin-top: 5px; color: var(--blue); font-size: 9px; font-weight: 750; letter-spacing: .19em; text-transform: uppercase; }
.main-nav { display: flex; align-items: center; gap: 28px; color: #33435f; font-size: 14px; font-weight: 650; }
.main-nav a { transition: color .18s ease; }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.menu-toggle { display: none; border: 0; background: transparent; color: var(--navy); font-size: 24px; }

.button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 48px; padding: 0 20px; border: 1px solid transparent; border-radius: 13px; background: var(--blue); color: #fff; font-size: 14px; font-weight: 750; box-shadow: 0 8px 18px rgba(8,103,239,.2); transition: transform .18s ease, box-shadow .18s ease, background .18s ease; }
.button:hover { color: #fff; transform: translateY(-2px); background: #0059d6; box-shadow: 0 12px 22px rgba(8,103,239,.25); }
.button.ghost { background: transparent; border-color: #b7c8dc; color: var(--navy); box-shadow: none; }
.button.ghost:hover { background: #f1f7ff; color: var(--blue); }
.hero .button.ghost { border-color: rgba(255,255,255,.4); color: #fff; box-shadow: none; }
.hero .button.ghost:hover { background: rgba(255,255,255,.1); color: #fff; }
.button.light { background: #dff6ff; color: var(--navy); box-shadow: none; }
.button.light:hover { background: #fff; color: var(--navy); }
.text-link { display: inline-flex; align-items: center; gap: 8px; color: var(--blue); font-size: 14px; font-weight: 750; }

.hero { position: relative; overflow: hidden; padding: 72px 0 60px; color: white; background: radial-gradient(circle at 73% 16%, rgba(20,132,255,.42), transparent 26%), radial-gradient(circle at 82% 84%, rgba(24,195,255,.22), transparent 25%), linear-gradient(125deg, #07163b 0%, #0c2c6d 56%, #0746ad 100%); }
.hero::before { content: ""; position: absolute; inset: 0; opacity: .21; background-image: radial-gradient(rgba(130,198,255,.55) 1px, transparent 1px); background-size: 24px 24px; mask-image: linear-gradient(90deg, transparent, #000 60%, #000); pointer-events: none; }
.hero-grid { position: relative; display: grid; grid-template-columns: minmax(0,1.05fr) minmax(320px,.95fr); align-items: center; gap: 42px; }
.eyebrow { margin: 0 0 17px; color: #71dcff; font-size: 11px; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; }
.hero h1 { max-width: 680px; margin: 0; font-size: clamp(42px, 6vw, 72px); line-height: .99; letter-spacing: -.055em; font-weight: 800; }
.hero h1 em { color: #75dfff; font-style: normal; }
.hero-copy { max-width: 590px; margin: 23px 0 28px; color: #d7e7ff; font-size: 18px; line-height: 1.65; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-note { margin: 27px 0 0; color: #9db9df; font-size: 12px; }
.hero-visual { position: relative; display: grid; place-items: center; min-height: 390px; }
.hero-orbit { position: absolute; width: min(95%, 430px); aspect-ratio: 1; border: 1px solid rgba(109,215,255,.24); border-radius: 50%; box-shadow: 0 0 0 28px rgba(88,180,255,.04), 0 0 0 62px rgba(88,180,255,.03); }
.hero-logo-card { position: relative; width: min(72%, 335px); aspect-ratio: 1; overflow: hidden; border: 1px solid rgba(130,222,255,.46); border-radius: 27px; background: rgba(4,18,55,.44); box-shadow: 0 24px 65px rgba(0,0,0,.35); transform: rotate(2deg); }
.hero-logo-card img { width: 100%; height: 100%; object-fit: cover; }
.hero-float { position: absolute; z-index: 2; display: flex; align-items: center; gap: 10px; padding: 12px 15px; border: 1px solid rgba(188,229,255,.22); border-radius: 14px; background: rgba(5,27,75,.82); color: #e6f7ff; box-shadow: 0 12px 30px rgba(0,0,0,.22); font-size: 12px; font-weight: 700; backdrop-filter: blur(8px); }
.hero-float.top { top: 38px; right: 4px; }
.hero-float.bottom { bottom: 43px; left: 2px; }
.hero-float i { display: grid; width: 29px; height: 29px; place-items: center; border-radius: 9px; background: rgba(73,211,255,.16); color: var(--cyan); font-style: normal; }

.proof-strip { position: relative; z-index: 2; margin-top: -1px; background: #fff; border-bottom: 1px solid var(--line); }
.proof-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.proof-item { padding: 23px 25px; border-right: 1px solid var(--line); }
.proof-item:first-child { padding-left: 0; }
.proof-item:last-child { border-right: 0; }
.proof-item strong { display: block; color: var(--navy); font-size: 21px; letter-spacing: -.03em; }
.proof-item span { color: var(--muted); font-size: 12px; }

.section { padding: 84px 0; }
.section.soft { background: #eff7ff; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 25px; margin-bottom: 30px; }
.section-heading .eyebrow { color: var(--blue); margin-bottom: 8px; }
.section-heading h2 { margin: 0; color: var(--navy); font-size: clamp(30px, 4vw, 43px); line-height: 1.1; letter-spacing: -.045em; }
.section-heading p { max-width: 515px; margin: 11px 0 0; color: var(--muted); }
.section-intro { max-width: 650px; margin: 10px 0 0; color: var(--muted); }
.book-tools { display: flex; align-items: center; gap: 10px; margin-bottom: 24px; }
.book-search { width: min(100%, 330px); min-height: 46px; padding: 0 15px; border: 1px solid var(--line); border-radius: 12px; outline: 0; background: #fff; color: var(--ink); }
.book-search:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(8,103,239,.12); }
.filter-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-pill { min-height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: #42536f; cursor: pointer; font-size: 12px; font-weight: 750; }
.filter-pill.is-active, .filter-pill:hover { border-color: var(--navy); background: var(--navy); color: #fff; }
.book-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 20px; }
.book-empty { margin: 16px 0 0; padding: 16px 18px; border: 1px dashed #c7d6e8; border-radius: 12px; background: #f7fbff; color: var(--muted); font-size: 13px; }
.book-card { overflow: hidden; border: 1px solid #e0e9f4; border-radius: 19px; background: white; box-shadow: 0 9px 28px rgba(13,41,84,.06); transition: transform .2s ease, box-shadow .2s ease; }
.book-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.book-cover { position: relative; display: grid; min-height: 245px; place-items: center; overflow: hidden; background: #e8f1fb; }
.book-cover img { height: 245px; width: 100%; object-fit: contain; background: #edf4fb; }
.status-badge { position: absolute; top: 13px; left: 13px; padding: 6px 10px; border: 1px solid rgba(255,255,255,.64); border-radius: 999px; background: rgba(5,26,69,.88); color: white; font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; backdrop-filter: blur(8px); }
.book-card-body { padding: 20px; }
.book-kicker { margin: 0 0 7px; color: var(--blue); font-size: 10px; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.book-card h3 { margin: 0; color: var(--navy); font-size: 19px; line-height: 1.25; letter-spacing: -.025em; }
.book-card h3 a { color: inherit; }
.book-card h3 a:hover { color: var(--blue); }
.book-subtitle { min-height: 45px; margin: 9px 0 15px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.book-meta { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 17px; }
.meta-chip { padding: 5px 9px; border-radius: 7px; background: #eef6ff; color: #435b7e; font-size: 10px; font-weight: 700; }
.book-card-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 13px; border-top: 1px solid #edf1f7; }
.book-card-actions .button { min-height: 40px; padding: 0 13px; font-size: 12px; }
.book-isbn { color: #7d8da6; font-size: 10px; }

.tracker-layout { display: grid; grid-template-columns: .8fr 1.2fr; gap: 42px; align-items: start; }
.tracker-lead { position: sticky; top: 120px; }
.tracker-lead h2 { margin: 0; color: var(--navy); font-size: clamp(32px, 4vw, 46px); line-height: 1.03; letter-spacing: -.05em; }
.tracker-lead p { color: var(--muted); }
.tracker-flow { display: grid; gap: 12px; margin: 23px 0 28px; padding: 0; list-style: none; }
.tracker-flow li { display: flex; align-items: center; gap: 11px; color: #59708f; font-size: 13px; font-weight: 700; }
.tracker-dot { display: grid; width: 25px; height: 25px; flex: 0 0 25px; place-items: center; border: 1px solid #b9cce3; border-radius: 50%; background: #fff; color: #8ca1bb; font-size: 10px; }
.tracker-dot.complete { border-color: var(--blue); background: var(--blue); color: #fff; }
.pipeline-list { display: grid; gap: 14px; }
.pipeline-card { padding: 21px; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: 0 9px 26px rgba(13,41,84,.05); }
.pipeline-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.pipeline-top h3 { margin: 0; color: var(--navy); font-size: 19px; letter-spacing: -.025em; }
.pipeline-top p { margin: 7px 0 0; color: var(--muted); font-size: 13px; }
.pipeline-status { flex: 0 0 auto; padding: 7px 10px; border-radius: 999px; background: #e9f5ff; color: #0755c7; font-size: 10px; font-weight: 800; }
.pipeline-status.drafting { background: #fff5df; color: #9c6500; }
.pipeline-status.under_publication { background: #edf0ff; color: #5559bc; }
.pipeline-steps { display: grid; grid-template-columns: repeat(4,1fr); gap: 5px; margin-top: 18px; }
.pipeline-step { height: 5px; border-radius: 8px; background: #e3ebf5; }
.pipeline-step.done { background: linear-gradient(90deg, var(--blue), var(--cyan)); }
.pipeline-labels { display: grid; grid-template-columns: repeat(4,1fr); gap: 4px; margin-top: 7px; color: #97a6ba; font-size: 9px; }
.pipeline-labels span.active { color: var(--blue); font-weight: 800; }

.fee-section { position: relative; overflow: hidden; background: linear-gradient(135deg, #06163b, #0d3277); color: #fff; }
.fee-section::after { content: ""; position: absolute; right: -120px; bottom: -200px; width: 470px; height: 470px; border: 1px solid rgba(73,211,255,.25); border-radius: 50%; box-shadow: 0 0 0 36px rgba(73,211,255,.04),0 0 0 76px rgba(73,211,255,.03); }
.fee-grid { position: relative; z-index: 2; display: grid; grid-template-columns: .95fr 1.05fr; gap: 42px; align-items: center; }
.fee-main .eyebrow { color: var(--cyan); }
.fee-main h2 { max-width: 490px; margin: 0; font-size: clamp(33px, 4vw, 48px); line-height: 1.04; letter-spacing: -.05em; }
.fee-main p { max-width: 500px; color: #d2e2ff; }
.fee-price { display: flex; align-items: baseline; gap: 11px; margin: 24px 0 4px; }
.fee-price strong { color: var(--cyan); font-size: 55px; letter-spacing: -.06em; line-height: 1; }
.fee-price span { color: #d0dfff; font-size: 15px; font-weight: 700; }
.fee-includes { display: grid; grid-template-columns: repeat(2,1fr); gap: 12px; }
.fee-includes article { min-height: 106px; padding: 17px; border: 1px solid rgba(186,219,255,.18); border-radius: 15px; background: rgba(255,255,255,.07); }
.fee-includes article strong { display: block; margin-bottom: 5px; color: #fff; font-size: 14px; }
.fee-includes article span { color: #c5d7f4; font-size: 12px; }
.fee-footnote { position: relative; z-index: 2; margin: 22px 0 0; color: #a6c2e7; font-size: 11px; }

.authors-section { background: #fff; }
.author-layout { display: grid; grid-template-columns: 1fr; gap: 22px; align-items: stretch; }
.author-promo { display: flex; align-items: center; justify-content: space-between; gap: 30px; padding: 30px 33px; border-radius: var(--radius); background: linear-gradient(135deg,#ecf7ff,#f7fbff); }
.author-promo h2 { max-width: 430px; margin: 0; color: var(--navy); font-size: 38px; line-height: 1.04; letter-spacing: -.05em; }
.author-promo p { max-width: 460px; color: var(--muted); }
.author-count { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; margin-top: 0; color: var(--muted); font-size: 12px; }
.avatar-stack { display: flex; padding-left: 5px; }
.avatar-stack span { display: grid; width: 33px; height: 33px; margin-left: -5px; place-items: center; border: 2px solid #fff; border-radius: 50%; background: linear-gradient(135deg,#0b65e9,#4dcaff); color: #fff; font-size: 9px; font-weight: 800; }
.author-directory-card { padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: 0 9px 28px rgba(13,41,84,.045); }
.directory-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 19px; }
.directory-head h3 { margin: 0; color: var(--navy); font-size: 20px; }
.directory-search { display: flex; align-items: center; gap: 9px; max-width: 580px; margin: 0 0 8px; }
.directory-search input[type="search"] { min-width: 0; min-height: 43px; flex: 1; padding: 0 13px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); }
.directory-search input[type="search"]:focus { border-color: var(--blue); outline: 0; box-shadow: 0 0 0 3px rgba(8,103,239,.11); }
.directory-search .button { min-height: 43px; padding: 0 16px; }
.directory-clear { color: var(--blue); font-size: 12px; font-weight: 700; }
.directory-range { margin: 8px 0 13px; color: var(--muted); font-size: 11px; }
.directory-list { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); column-gap: 24px; }
.directory-row { display: grid; min-width: 0; grid-template-columns: 42px minmax(0,1fr); gap: 8px 12px; align-items: start; padding: 14px 0; border-top: 1px solid #edf2f8; }
.directory-avatar { display: grid; width: 42px; height: 42px; flex: 0 0 42px; place-items: center; border-radius: 13px; background: #eaf5ff; color: var(--blue); font-weight: 850; }
.directory-avatar img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.directory-details { min-width: 0; }
.directory-row strong { display: block; color: var(--navy); font-size: 13px; line-height: 1.35; }
.directory-row span { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; line-height: 1.45; overflow-wrap: anywhere; }
.directory-email { grid-column: 2; min-width: 0; color: var(--blue); font-size: 11px; overflow-wrap: anywhere; }
.directory-pagination { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-top: 17px; padding-top: 16px; border-top: 1px solid #edf2f8; }
.directory-page-summary { margin-right: auto; color: var(--muted); font-size: 11px; }
.directory-page { display: inline-flex; min-width: 34px; min-height: 34px; align-items: center; justify-content: center; padding: 0 9px; border: 1px solid var(--line); border-radius: 9px; color: var(--navy); font-size: 12px; font-weight: 700; text-decoration: none; }
.directory-page:hover, .directory-page.current { border-color: var(--blue); background: var(--blue); color: #fff; }
.directory-ellipsis { color: var(--muted); }
.author-note { margin: 14px 0 0; color: #8494aa; font-size: 10px; }

.signup-band { padding: 42px 0; background: #eaf5ff; }
.signup-card { display: flex; align-items: center; justify-content: space-between; gap: 25px; padding: 28px 32px; border: 1px solid #cce2f8; border-radius: 20px; background: #fff; box-shadow: 0 12px 34px rgba(7,24,63,.06); }
.signup-card h2 { margin: 0; color: var(--navy); font-size: 27px; letter-spacing: -.04em; }
.signup-card p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }

.site-footer { padding: 48px 0 24px; background: #061332; color: #c6d8f3; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 34px; padding-bottom: 34px; }
.footer-brand { display: flex; gap: 12px; align-items: center; margin-bottom: 15px; color: #fff; }
.footer-mark { display: block; width: 44px; height: 44px; flex: 0 0 44px; overflow: hidden; border-radius: 12px; background: var(--navy); }
.footer-mark img { width: 240%; height: 240%; max-width: none; object-fit: cover; transform: translate(-29%, -11%); }
.footer-brand strong { color: #fff; font-size: 15px; letter-spacing: .12em; }
.footer-brand p { max-width: 270px; color: #92a9ca; font-size: 12px; }
.footer-col h3 { margin: 0 0 12px; color: #76dcff; font-size: 11px; letter-spacing: .15em; text-transform: uppercase; }
.footer-col a { display: block; margin: 7px 0; color: #c6d8f3; font-size: 12px; }
.footer-col a:hover { color: var(--cyan); }
.footer-bottom { display: flex; justify-content: space-between; gap: 18px; padding-top: 18px; border-top: 1px solid rgba(199,220,255,.14); color: #8499b9; font-size: 10px; }

.content-page { min-height: 50vh; padding: 62px 0 82px; }
.content-page h1 { margin: 0 0 12px; color: var(--navy); font-size: clamp(34px,5vw,52px); letter-spacing: -.05em; }
.content-page .lead { max-width: 720px; color: var(--muted); font-size: 17px; }
.entry-content { max-width: 820px; color: #364967; }
.entry-content h2, .entry-content h3 { color: var(--navy); }
.single-book-layout { display: grid; grid-template-columns: minmax(250px,.72fr) minmax(0,1.28fr); align-items: start; gap: 44px; }
.single-book-cover { overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: #edf5ff; box-shadow: var(--shadow); }
.single-book-cover img { width: 100%; max-height: 570px; object-fit: contain; }
.single-book-details { padding: 22px; border: 1px solid var(--line); border-radius: 17px; background: #fff; }
.single-book-details dl { display: grid; grid-template-columns: 130px 1fr; gap: 9px 14px; margin: 0; font-size: 13px; }
.single-book-details dt { color: var(--muted); }
.single-book-details dd { margin: 0; color: var(--navy); font-weight: 700; overflow-wrap: anywhere; }
.section-heading h1, .content-page > .wrap > h1 { margin: 0; color: var(--navy); font-size: clamp(34px,5vw,52px); line-height: 1.08; letter-spacing: -.05em; }
.contact-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; max-width: 900px; margin-top: 28px; }
.contact-card { padding: 26px; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: 0 9px 28px rgba(13,41,84,.05); }
.contact-card h2 { margin: 12px 0 6px; color: var(--navy); font-size: 21px; }
.contact-card p { color: var(--muted); font-size: 13px; }
.contact-icon { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 13px; background: #eaf5ff; color: var(--blue); font-size: 20px; font-weight: 800; }

.form-card { max-width: 760px; margin: 28px auto; padding: 28px; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: var(--shadow); }
.form-card h2 { margin: 0 0 15px; color: var(--navy); font-size: 22px; }
.form-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 14px; }
.form-field { display: grid; gap: 6px; }
.form-field.full { grid-column: 1 / -1; }
.form-field label { color: #435672; font-size: 12px; font-weight: 750; }
.form-field input, .form-field select, .form-field textarea { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid #d0deed; border-radius: 10px; background: #fff; color: var(--ink); }
.form-field textarea { min-height: 110px; resize: vertical; }
.check-row { display: flex; align-items: flex-start; gap: 9px; margin: 11px 0; color: var(--muted); font-size: 12px; }
.check-row input { margin-top: 3px; }
.notice { margin: 15px 0; padding: 13px 15px; border-radius: 11px; background: #ecf7ff; color: #28527f; font-size: 13px; }
.notice.error { background: #fff0f0; color: #8e2a33; }
.portal-discount { display: inline-flex; margin: 10px 0; padding: 7px 11px; border-radius: 999px; background: #e6fff7; color: #06795f; font-size: 12px; font-weight: 800; }

@media (max-width: 900px) {
  .main-nav { gap: 17px; }
  .nav-actions .button.ghost { display: none; }
  .hero-grid { grid-template-columns: 1.1fr .9fr; gap: 20px; }
  .hero-visual { min-height: 340px; }
  .book-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .tracker-layout, .fee-grid { grid-template-columns: 1fr; }
  .tracker-lead { position: static; }
  .footer-grid { grid-template-columns: repeat(2,1fr); }
}
@media (min-width: 681px) and (max-width: 1000px) {
  .masthead { gap: 14px; }
  .brand { min-width: 0; }
  .menu-toggle { display: inline-flex; width: 42px; height: 42px; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 11px; background: #fff; cursor: pointer; }
  .main-nav { display: none; position: absolute; top: 82px; right: 22px; left: auto; width: min(360px, calc(100vw - 44px)); padding: 10px 18px; border: 1px solid var(--line); border-radius: 0 0 16px 16px; background: #fff; box-shadow: 0 16px 25px rgba(5,30,75,.1); flex-direction: column; align-items: stretch; gap: 0; }
  .main-nav.is-open { display: flex; }
  .main-nav a { padding: 12px 2px; border-bottom: 1px solid #edf2f8; white-space: nowrap; }
  .main-nav a:last-child { border-bottom: 0; }
}
@media (max-width: 680px) {
  .wrap { width: min(var(--wrap), calc(100% - 30px)); }
  .topline .wrap { justify-content: center; min-height: 31px; font-size: 9px; }
  .topline-links { display: none; }
  .masthead { min-height: 68px; gap: 12px; }
  .brand { min-width: auto; }
  .brand-mark { width: 43px; height: 43px; flex-basis: 43px; border-radius: 12px; }
  .brand-wordmark strong { font-size: 15px; }
  .brand-wordmark span { font-size: 7px; letter-spacing: .12em; }
  .menu-toggle { display: inline-block; }
  .main-nav { display: none; position: absolute; top: 68px; left: 0; right: 0; padding: 18px 22px 21px; border-bottom: 1px solid var(--line); background: #fff; box-shadow: 0 16px 25px rgba(5,30,75,.08); flex-direction: column; align-items: flex-start; gap: 15px; }
  .main-nav.is-open { display: flex; }
  .nav-actions .button { min-height: 40px; padding: 0 13px; font-size: 12px; }
  .hero { padding: 53px 0 42px; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: clamp(41px, 13vw, 61px); }
  .hero-copy { font-size: 15px; }
  .hero-visual { min-height: 280px; margin-top: 8px; }
  .hero-logo-card { width: 225px; border-radius: 20px; }
  .hero-float.top { top: 14px; right: 0; }
  .hero-float.bottom { bottom: 14px; left: 0; }
  .hero-orbit { width: 280px; }
  .proof-grid { grid-template-columns: repeat(2,1fr); }
  .proof-item { padding: 16px 13px; border-bottom: 1px solid var(--line); }
  .proof-item:nth-child(2) { border-right: 0; }
  .proof-item:nth-child(3), .proof-item:nth-child(4) { border-bottom: 0; }
  .proof-item:first-child { padding-left: 13px; }
  .proof-item strong { font-size: 18px; }
  .section { padding: 60px 0; }
  .section-heading { display: block; }
  .section-heading .text-link { margin-top: 15px; }
  .book-tools { flex-direction: column; align-items: stretch; }
  .book-search { width: 100%; }
  .book-grid { grid-template-columns: 1fr; gap: 14px; }
  .book-cover { min-height: 255px; }
  .book-cover img { height: 255px; }
  .book-subtitle { min-height: 0; }
  .pipeline-top { display: block; }
  .pipeline-status { display: inline-flex; margin-top: 10px; }
  .pipeline-labels { font-size: 8px; }
  .fee-grid { gap: 24px; }
  .fee-price strong { font-size: 47px; }
  .fee-includes { grid-template-columns: 1fr; }
  .author-layout { grid-template-columns: 1fr; }
  .author-promo { align-items: flex-start; flex-direction: column; padding: 25px; }
  .author-promo h2 { font-size: 32px; }
  .author-directory-card { padding: 20px; }
  .directory-list { grid-template-columns: 1fr; }
  .directory-head { align-items: flex-start; flex-direction: column; }
  .directory-search { flex-wrap: wrap; }
  .directory-search input[type="search"] { flex-basis: 100%; }
  .directory-page-summary { width: 100%; }
  .signup-card { align-items: flex-start; flex-direction: column; padding: 23px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 25px 18px; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; }
  .single-book-layout { grid-template-columns: 1fr; }
  .single-book-cover { max-width: 340px; margin-inline: auto; }
  .form-card { padding: 20px; }
  .form-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}
