/* Website presentation choices; content is supplied by the shared catalog. */
body { --portrait-width: 210px; --heading-font: "Segoe UI", sans-serif; --body-font: Georgia, serif; font-family: var(--body-font); }
body.fonts-editorial { --heading-font: Georgia, "Times New Roman", serif; --body-font: "Segoe UI", sans-serif; }
body.fonts-modern { --heading-font: "Segoe UI", Arial, sans-serif; --body-font: "Segoe UI", Arial, sans-serif; }
h1, h2, h3, h4, h5, .navbar-brand, .btn { font-family: var(--heading-font); }
.btn-primary, .btn-primary:hover, .btn-primary:focus, .btn-primary:active {
    color: var(--author-on-accent); background-color: var(--author-accent); border-color: var(--author-accent);
}
.btn-primary:hover { text-decoration: underline; }
/* Public website colors. The editor below has its own fixed neutral palette. */
body { background:var(--author-background,#f4f6f8); }
a:hover { color:var(--author-link); }
.site-header { background:var(--author-header-background,#121b25); }
.site-header .navbar-brand, .site-header .nav-link, .site-header .nav-link:hover, .site-header .nav-link:focus { color:var(--author-header-links,#f4f6f8) !important; }
.site-header .navbar-toggler { color:var(--author-header-links); border-color:currentColor; }
.site-header .navbar-toggler-icon { background-image:none; }
.site-header .navbar-toggler-icon::before { content:'☰'; font:1.5rem sans-serif; color:var(--author-header-links); }
.site-footer { background:var(--author-footer-background,#121b25); color:var(--author-footer-text,#f4f6f8); }
.site-footer a, .site-footer a:hover { color:var(--author-footer-links,#f4f6f8); }
.card, .card-body { color:var(--author-text); }
.soft-panel, .hero-panel { background:var(--author-surface); }
.site-main .text-muted { color:var(--author-text-soft) !important; }
.site-main .btn-outline-dark { color:var(--author-text); border-color:var(--author-text); }
.site-main .btn-outline-dark:hover, .site-main .btn-outline-dark:focus { color:var(--author-on-accent); background:var(--author-accent); border-color:var(--author-accent); }
.book-cover-wrap, .series-stack { background:var(--author-surface-soft); }


.author-portrait, .bio-image-col .author-portrait { width: var(--portrait-width); max-width: 100%; height: auto; max-height: 420px; object-fit: contain; border-radius: 8px; }
.portrait-square .author-portrait, .portrait-circle .author-portrait { aspect-ratio: 1; object-fit: cover; }
.portrait-circle .author-portrait { border-radius: 50%; }
.portrait-hidden .author-portrait, .portrait-hidden .bio-image-col { display: none; }
.bio-layout { grid-template-columns: minmax(0, var(--portrait-width)) minmax(0, 1fr); }
.portrait-hidden .bio-layout { grid-template-columns: 1fr; }
.author-home { padding-top: 2rem; padding-bottom: 4rem; }
.home-masthead { display: flex; justify-content: space-between; align-items: center; gap: 3rem; padding: 2rem 0 3rem; border-bottom: 1px solid var(--author-border); margin-bottom: 2.5rem; }
.home-masthead > div { max-width: 48rem; min-width: 0; }
.home-masthead .author-portrait { flex-shrink: 0; }
.eyebrow { font: 600 .78rem var(--body-font); text-transform: uppercase; letter-spacing: .14em; color: var(--author-text-soft); }
.home-section { margin-bottom: 3rem; min-width: 0; }
.home-books-empty { padding-block:1rem 2rem; }
.home-books-empty h2 { font-size:1.6rem; }
.home-books-empty p { color:var(--author-text-soft); margin-bottom:0; }
.home-book-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
.home-book-grid.sparse-book-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 55rem; margin: auto; }
.home-book-grid.single-book-grid { grid-template-columns: minmax(0, 1fr); max-width: 55rem; margin: auto; }
.home-book-grid .book-card { display: flex; flex-direction: column; }
.home-book-grid .home-book-cover-link { padding: 1.5rem; display: flex; justify-content: center; background: var(--author-surface-soft); }
.home-book-grid .home-book-cover { width:220px; max-width:100%; height:auto; aspect-ratio:5 / 8; object-fit:contain; }
.home-book-grid.single-book-grid .book-card { flex-direction: row; align-items: center; }
.home-book-grid.single-book-grid .home-book-cover-link { flex: 0 0 40%; }
.home-book-grid .book-intro { margin: 1rem 0; overflow-wrap: anywhere; }
.home-book-grid .card-body { min-width: 0; }
.home-series-grid, .home-news-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 1.5rem; }
.series-feature, .news-feature, .home-bio, .home-signup { padding: 1.75rem; }
.series-covers { display: flex; gap: .7rem; margin-bottom: 1.5rem; align-items: end; }
.series-covers img { width: 28%; max-height: 180px; object-fit: contain; }
.news-feature time { display: block; font-size: .85rem; color: var(--author-text-soft); margin-bottom: .75rem; }
.news-feature h3 { font-size: 1.3rem; }
.home-signup { max-width: 48rem; margin-inline: auto; }
/* Spotlight: centered author heading, portrait, and a focused book feature. */
.author-home.template-spotlight { max-width:59rem; padding-inline:1rem; }
.template-spotlight .home-masthead { display:grid; grid-template-columns:minmax(0,1fr) 7.25rem; align-items:start; text-align:center; gap:.6rem 1.5rem; border-bottom:2px solid var(--author-border); margin:0 0 2rem; padding:0 0 1.6rem; }
.template-spotlight .home-masthead > div { display:contents; }
.template-spotlight .home-masthead .eyebrow { display:none; }
.template-spotlight .home-masthead .hero-title { grid-column:1 / -1; grid-row:1; padding-inline:8.75rem; font-size:clamp(2.4rem,4.6vw,4rem); font-weight:700; margin:0; line-height:1.15; }
.template-spotlight .home-masthead .hero-subheadline { grid-column:1 / -1; grid-row:2; padding-inline:7.5rem; max-width:none; font-size:1.3rem; margin:0; color:var(--author-text); }
.template-spotlight .home-masthead .d-flex { grid-column:1 / -1; justify-content:center; margin-top:1rem; gap:1rem !important; }
.template-spotlight .home-masthead .btn, .template-spotlight .template-opening .btn { font-size:1.1rem; padding:.5rem 1.25rem; }
.template-spotlight .home-masthead .author-portrait { grid-column:2; grid-row:1 / span 2; width:7.25rem; max-height:8rem; justify-self:end; align-self:center; }
.portrait-hidden .template-spotlight .home-masthead { grid-template-columns:minmax(0,1fr); }
.portrait-hidden .template-spotlight .home-masthead .hero-title, .portrait-hidden .template-spotlight .home-masthead .hero-subheadline { padding-inline:0; }
.template-spotlight .template-opening .home-books { padding-bottom:2rem; margin-bottom:0; border-bottom:2px solid var(--author-border); }
.template-spotlight .template-opening .home-book-grid { grid-template-columns:1fr; max-width:none; margin:0; }
.template-spotlight .template-opening .home-book-grid .book-card { display:grid; grid-template-columns:minmax(0,19rem) minmax(0,1fr); align-items:start; border:0; box-shadow:none; background:transparent; gap:2.75rem; }
.template-spotlight .template-opening .home-book-grid .home-book-cover-link { padding:0; background:transparent; align-self:start; border-radius:.65rem; overflow:hidden; box-shadow:0 .35rem .85rem #17253226; }
.template-spotlight .template-opening .home-book-cover { width:100%; height:auto; max-height:none; }
.template-spotlight .template-opening .card-body { padding:1.5rem 0 0; }
.template-spotlight .template-opening .meta-line { font-size:1.05rem; margin-bottom:.7rem; }
.template-spotlight .template-opening .card-body h3 { font-size:clamp(2rem,3.5vw,3rem); font-weight:700; margin-bottom:1.1rem; }
.template-spotlight .template-opening .book-intro, .template-spotlight .template-opening .lead-soft { font-size:1.1rem; line-height:1.55; color:var(--author-text); }
.template-spotlight .additional-home-sections .home-bio { padding:2rem 0; border:0; background:transparent; box-shadow:none; }
.template-spotlight .home-bio .eyebrow { color:var(--author-text); }
.template-spotlight .home-bio h2 { font-size:clamp(1.8rem,3vw,2.5rem); font-weight:700; }
.template-spotlight .home-bio .lead-soft { color:var(--author-text); font-size:1.15rem; line-height:1.6; }
/* Introduction uses an editorial two-column composition. */
.author-home.template-introduction { max-width:60rem; }
.template-introduction .home-masthead { display:grid; grid-template-columns:minmax(0,max-content) 10rem; justify-content:center; gap:2rem; padding:1rem 0 2rem; margin-bottom:2rem; }
.template-introduction .home-masthead .author-portrait { width:10rem; max-height:13rem; }
.portrait-hidden .template-introduction .home-masthead { grid-template-columns:minmax(0,1fr); }
.template-introduction .home-sections { display:grid; grid-template-columns:minmax(0,1.25fr) minmax(0,1fr); gap:0 2rem; align-items:start; }
.template-introduction .home-section { grid-column: 1 / -1; }
.template-introduction .home-bio { grid-column: 1; background: transparent; box-shadow: none; border-left: 3px solid var(--author-accent); }
.template-introduction .home-bio .author-bio-long, .template-introduction .home-bio .author-bio-short { font-size:1.05rem; line-height:1.65; }
.template-introduction .home-bio + .home-books { grid-column: 2; }
.template-introduction .home-bio + .home-books .home-book-grid { grid-template-columns: 1fr; }
.template-introduction .home-bio + .home-books .book-card { flex-direction: column; }
.template-introduction .home-bio + .home-books .home-book-cover-link { width: 100%; }
.template-introduction .hero-title { font-size:clamp(2.6rem,4.5vw,4rem); }
.template-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.template-choice { padding: 1.2rem; border: 2px solid var(--author-border); background: white; border-radius: .5rem; cursor: pointer; }
.template-choice:has(input:checked) { border-color: var(--author-link); }
.template-choice strong, .template-choice span { display: block; margin-top: .5rem; }
.template-choice span { font-size: .9rem; }
.template-sample { display: block; width: 100%; height: auto; margin-top: .75rem; border: 1px solid var(--author-border); border-radius: .3rem; }
.template-defaults { display:block; margin-top:1rem; color:var(--author-text-soft); line-height:1.5; }
.brand-asset-preview { display:block; max-width:220px; max-height:100px; margin-top:1rem; object-fit:contain; }
.favicon-preview { width:40px; height:40px; }
.newsletter-embed { width:100%; min-height:450px; border:0; background:white; }
.drag-handle { cursor:grab; touch-action:none; padding:.3rem .6rem; }
.editor-order li.dragging { opacity:.6; border-color:var(--author-link); }
.editor-order li > label { flex:1; align-self:center; }
.navigation-order { max-width:none; }
.navigation-order li { flex-wrap:wrap; align-items:center; }
.navigation-fields { flex:1; min-width:min(100%,280px); display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:.75rem; }
.editor-order li[hidden] { display:none; }
/* Keep administrative controls legible regardless of the author's chosen colors. */
.site-admin {
    --author-text:#1f2933; --author-text-soft:#52606d; --author-link:#1759a2;
    --author-accent:#1759a2; --author-on-accent:#ffffff; --author-border:#ccd4dd;
    --author-surface:#ffffff; --author-surface-soft:#f4f6f8;
    color:#1f2933; background:#ffffff; font-family:"Segoe UI",Arial,sans-serif; border-radius:.5rem;
}
.site-admin h1, .site-admin h2, .site-admin h3, .site-admin legend, .site-admin .btn { font-family:"Segoe UI",Arial,sans-serif; }
.site-admin-header { display:flex; flex-wrap:wrap; align-items:flex-start; gap:1.5rem; }
.author-site-selector { width:13.2rem; max-width:100%; flex-shrink:0; }
.publication-control { padding-top:2.1rem; flex:1; min-width:0; }
.publication-address-row { display:flex; flex-wrap:wrap; align-items:flex-start; gap:.75rem 1.25rem; }
.publication-address-row .form-switch { flex-shrink:0; }
.website-address { min-width:0; overflow-wrap:anywhere; display:flex; flex-wrap:wrap; align-items:center; gap:.5rem 1rem; }
.domain-settings-form { max-width:38rem; }
.site-admin #font-pair { width:38rem; max-width:100%; }
.site-admin .portrait-control { width:12rem; max-width:100%; }
.site-admin #panel-branding input[type=file] { width:30rem; max-width:100%; }
.site-admin #panel-signup select { width:28rem; max-width:100%; }
.site-admin #panel-contact input { width:32rem; max-width:100%; }
.site-admin #panel-home input.form-control, .site-admin #panel-home textarea.form-control { width:38rem; max-width:100%; }
.site-admin #settings-panels > .tab-pane > h2:first-child,
.site-admin .settings-panel-heading,
.site-admin #panel-design > fieldset > h2,
.site-admin #books-manager h2 {
    font-family:"Segoe UI",Arial,sans-serif; font-size:1.5rem; font-weight:500; line-height:1.2; margin-top:0 !important; margin-bottom:1rem !important;
}
.theme-choices { display:flex; flex-wrap:wrap; gap:.75rem; }
.site-admin .theme-choice, .site-admin .theme-choice:hover, .site-admin .theme-choice:focus, .site-admin .theme-choice:active {
    color:#172b4d !important; background:#ffffff !important; border:2px solid #64748b !important; font-weight:600;
}
.theme-swatches { display:flex; margin-bottom:.4rem; }
.theme-swatches span { width:1.7rem; height:1.2rem; border:1px solid #64748b; }
.appearance-colors { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:1rem; max-width:65rem; }
.color-control { display:flex; gap:.5rem; align-items:center; }
.color-control > input:not([type=color]) { width:8rem; }
.site-admin #save-site, .site-admin #save-site:hover, .site-admin #save-site:focus, .site-admin #save-site:active {
    background:#1759a2 !important; border-color:#1759a2 !important; color:#ffffff !important;
}
.site-admin .btn:focus-visible { outline:3px solid #172b4d; outline-offset:3px; }
@media(max-width:575px) { .publication-control { padding-top:0; } }
.managed-book-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,360px),1fr)); gap:1rem; }
.managed-book-cover { width:110px; max-height:165px; object-fit:contain; }
.ebook-cover { display:block; aspect-ratio:5 / 8; object-fit:contain; background:var(--author-surface-soft,#eef2f5); }
.single-book-grid .home-book-cover.ebook-cover { height:auto; max-height:none; }
.book-detail-cover { width:100%; max-width:25rem; height:auto; }
.managed-book-cover.ebook-cover { width:110px; height:auto; max-height:none; }
.series-stack { height:270px; }
.series-stack-item { height:auto; aspect-ratio:5 / 8; }
.series-stack-item img.ebook-cover { width:100%; height:auto; }
.series-covers img.ebook-cover { width:min(28%,112.5px); height:auto; max-height:none; aspect-ratio:5 / 8; }
.site-header .navbar-dark .navbar-toggler-icon { filter:none; }
#settings-tabs .nav-link { color: var(--author-text); }
#settings-tabs .nav-link.active { font-weight: 600; border-top: 3px solid var(--author-link); }
.editor-order { list-style: none; padding: 0; max-width: 55rem; }
.editor-order li { display: flex; justify-content: space-between; gap: 1rem; padding: .7rem 1rem; margin-block: .4rem; border: 1px solid var(--author-border); border-radius: .3rem; background: white; }
.order-actions { display: flex; gap: .5rem; }
.order-actions button { border: 1px solid #8a949e; background: white; border-radius: .2rem; min-width: 2.3rem; min-height: 2.3rem; }
.site-preview-frame { display: block; border: 1px solid #aab1b7; width: 100%; max-width: 100%; height: 850px; margin: auto; background: white; }
.preview-notice { padding: .75rem; text-align: center; background: #fff0c2; color: #352400; }
:focus-visible { outline: 3px solid #2465a8; outline-offset: 3px; }
.author-home, .author-home h1, .author-home h2, .author-home h3 { overflow-wrap: anywhere; }
@media (max-width: 767px) {
    .template-spotlight .home-masthead { grid-template-columns:minmax(0,1fr) 5rem; gap:.75rem 1rem; text-align:left; }
    .template-spotlight .home-masthead .hero-title { grid-column:1; grid-row:1; padding:0; font-size:2.25rem; }
    .template-spotlight .home-masthead .hero-subheadline { grid-column:1 / -1; grid-row:2; padding:0; font-size:1.1rem; }
    .template-spotlight .home-masthead .author-portrait { grid-column:2; grid-row:1; width:5rem; max-height:6rem; }
    .template-spotlight .home-masthead .d-flex { justify-content:flex-start; margin-top:.5rem; gap:.6rem !important; }
    .template-spotlight .home-masthead .btn { font-size:1rem; padding:.45rem .75rem; }
    .template-spotlight .template-opening .home-book-grid .book-card { grid-template-columns:minmax(0,1fr); gap:1.5rem; }
    .template-spotlight .template-opening .home-book-grid .home-book-cover-link { width:min(100%,19rem); margin-inline:auto; }
    .template-spotlight .template-opening .card-body { padding:0; }
    .bio-layout { grid-template-columns: 1fr; }
    .home-masthead { flex-direction: column-reverse; gap: 1.5rem; padding-top: 0; align-items: start; }
    .home-book-grid, .home-book-grid.sparse-book-grid { grid-template-columns: 1fr; }
    .home-book-grid.single-book-grid .book-card, .template-spotlight .home-book-grid .book-card { flex-direction: column; gap: 0; }
    .home-book-grid.single-book-grid .home-book-cover-link, .template-spotlight .home-book-cover-link { width: 100%; }
    .template-introduction .home-sections { display: block; }
    .template-introduction .home-masthead { grid-template-columns:minmax(0,1fr) 5rem; gap:1rem; }
    .template-introduction .home-masthead .author-portrait { width:5rem; max-height:7rem; }
    .template-introduction .hero-title { font-size:2.25rem; }
    .template-choices { grid-template-columns: 1fr; }
    .section-heading { flex-wrap: wrap; }
}
