/* Public author theme adapter. Values come from the author's saved palette. */
.author-themed main { overflow-wrap: anywhere; }
.author-themed main :is(.book-card, .post-card, .recommendation-card) {
    background: var(--author-section-bg);
    color: var(--author-text-color);
    border-color: var(--author-border-color);
}
.author-themed main :is(.text-gray-800, .text-gray-900) { color: var(--author-heading-color); }
.author-themed main :is(.text-gray-500, .text-gray-600) { color: var(--author-secondary-text-color); }
.author-themed main :is(.text-indigo-600, .text-indigo-800) { color: var(--author-link-color); }
.author-themed main :is(.border-gray-200, .border-gray-300) { border-color: var(--author-border-color); }
.author-themed main :is(.book-card, .post-card) h2 a,
.author-themed main :is(.book-card, .post-card) h3 a { color: var(--author-heading-color); }
.author-themed main :is(.book-card, .post-card) a:hover { color: var(--author-link-color); }
.author-themed .author-page-header .logo-link { color: var(--author-link-color); }
.author-themed .author-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 12rem), 1fr));
    gap: var(--wf-space-lg);
}
.author-themed .split-pane { min-width: 0; }
.author-themed .split-pane-left .author-display-name { color: white; }
.author-themed .split-content-overlay { max-width: 100%; }
.author-themed .slideout-toggle { position: static; min-height: var(--wf-control-touch); }
.author-themed .slideout-main-content { padding-top: var(--wf-space-lg); }
.author-themed .slideout-sidebar[hidden], .author-themed .slideout-overlay[hidden] { display: none; }
.author-themed .slideout-sidebar { width: min(24rem, 90vw); max-width: 90vw; }
.author-themed .close-sidebar-btn { min-width: var(--wf-control-touch); min-height: var(--wf-control-touch); }
.author-themed .slideout-sidebar .author-display-name { font-size: 1.5rem; }
.author-themed .slideout-sidebar .content-section { padding: var(--wf-space-md); }
.author-themed .carousel-viewport { overflow: hidden; }
.author-themed .carousel-wrapper { align-items: start; }
.author-themed .carousel-slide { min-width: 0; }
.author-themed .carousel-slide[aria-hidden=true] { visibility: hidden; }
.author-themed .carousel-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--wf-space-sm); margin-bottom: var(--wf-space-md); }
.author-themed .carousel-controls button {
    background: var(--author-primary-color); color: var(--author-on-primary);
    min-height: var(--wf-control-touch); padding: var(--wf-space-sm) var(--wf-space-md);
    border-radius: var(--wf-radius-control);
}
.author-themed .carousel-dot { width: var(--wf-control-touch); height: var(--wf-control-touch); background: transparent; }
.author-themed .carousel-dot::after { content: ''; display: block; width: .625rem; height: .625rem; margin: auto; border-radius: 50%; background: var(--author-border-color); }
.author-themed .carousel-dot.active { background: transparent; }
.author-themed .carousel-dot.active::after { background: var(--author-link-color); }
.author-themed :is(button, a, input, textarea):focus-visible { outline: var(--wf-control-focus-width) solid var(--author-link-color); outline-offset: 3px; }
.author-themed > footer { background: var(--author-section-bg); color: var(--author-text-color); border-top: 1px solid var(--author-border-color); }
.author-themed > footer a { color: var(--author-link-color); }
.author-themed > footer .text-gray-500 { color: var(--author-secondary-text-color); }
@media (prefers-reduced-motion: reduce) {
    .author-themed .carousel-wrapper, .author-themed .slideout-sidebar, .author-themed .tab-content { transition: none; animation: none; }
}
/* Typography utilities must inherit the selected public palette, including dark mode. */
.author-themed .prose {
    color: var(--author-text-color);
    --tw-prose-body: var(--author-text-color);
    --tw-prose-headings: var(--author-heading-color);
    --tw-prose-links: var(--author-link-color);
    --tw-prose-bold: var(--author-heading-color);
    --tw-prose-quotes: var(--author-secondary-text-color);
    --tw-prose-counters: var(--author-secondary-text-color);
    --tw-prose-bullets: var(--author-secondary-text-color);
    --tw-prose-quote-borders: var(--author-border-color);
    --tw-prose-code: var(--author-text-color);
    --tw-prose-th-borders: var(--author-border-color);
    --tw-prose-td-borders: var(--author-border-color);
}
@media (min-width: 769px) {
    .author-themed .split-pane-left { position: sticky; top: 0; align-self: start; min-height: calc(100dvh - 4rem); height: calc(100dvh - 4rem); }
}
