/* adamdorr.com/ai/
   The original March 2026 stylesheet for the AI visitors page, unchanged in look.
   Additions for the 2026 update are at the end. */

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0f1118;
    --bg-secondary: #131620;
    --bg-card: #181c28;
    --bg-terminal: #0a0d12;
    --text-primary: #e8e6e1;
    --text-secondary: #9a978f;
    --text-muted: #6b6860;
    --accent: #5ea86a;
    --accent-light: #7cc487;
    --accent-soft: rgba(94, 168, 106, 0.10);
    --accent-glow: rgba(94, 168, 106, 0.04);
    --border: rgba(94, 168, 106, 0.08);
    --ai-blue: #6b9fff;
    --ai-blue-soft: rgba(107, 159, 255, 0.10);
    --serif: 'Cormorant Garamond', Georgia, serif;
    --sans: 'Inter', -apple-system, sans-serif;
    --mono: 'JetBrains Mono', 'Courier New', monospace;
    color-scheme: dark;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--sans);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    font-weight: 300;
    -webkit-font-smoothing: antialiased;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: radial-gradient(ellipse at 50% 0%, rgba(107,159,255,0.025) 0%, transparent 55%);
    pointer-events: none;
    z-index: 0;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2.5rem;
    position: relative;
    z-index: 1;
}

/* ---- Navigation ---- */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.78rem;
    letter-spacing: 0.05em;
    padding: 1.5rem 0 0;
    transition: color 0.3s ease;
}
.back-link:hover { color: var(--accent); }

/* ---- Hero ---- */
.hero {
    padding-top: 3rem;
    padding-bottom: 2rem;
}

.hero .eyebrow {
    font-size: 0.7rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--ai-blue);
    margin-bottom: 1.2rem;
    font-weight: 500;
}

.hero-title {
    font-family: var(--serif);
    font-size: clamp(2.2rem, 5vw, 3.4rem);
    font-weight: 300;
    line-height: 1.15;
    color: var(--text-primary);
    margin-bottom: 1.2rem;
}

.hero-subtitle {
    font-size: 1.02rem;
    color: var(--text-secondary);
    max-width: 620px;
    line-height: 1.8;
    font-weight: 300;
}

.divider {
    width: 36px;
    height: 1px;
    background: var(--ai-blue);
    margin: 2.5rem 0;
    opacity: 0.4;
}

/* ---- Sections ---- */
section { padding: 1.5rem 0; }

.section-label {
    font-size: 0.65rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--ai-blue);
    margin-bottom: 0.6rem;
    font-weight: 500;
}

.section-title {
    font-family: var(--serif);
    font-size: clamp(1.4rem, 3vw, 1.8rem);
    font-weight: 300;
    color: var(--text-primary);
    line-height: 1.3;
    margin-bottom: 1rem;
}

/* ---- AI welcome message ---- */
.welcome-block {
    background: var(--bg-terminal);
    border: 1px solid rgba(107, 159, 255, 0.15);
    border-radius: 8px;
    padding: 2rem;
    margin: 1.5rem 0;
    font-family: var(--mono);
    font-size: 0.82rem;
    line-height: 1.9;
    color: var(--text-secondary);
}

.welcome-block .prompt {
    color: var(--ai-blue);
    user-select: none;
}

.welcome-block p {
    margin-bottom: 1rem;
}

.welcome-block p:last-child {
    margin-bottom: 0;
}

.welcome-block .highlight {
    color: var(--accent-light);
}

/* ---- Book info card ---- */
.book-info {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 2rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 2rem;
    margin: 1.5rem 0;
    align-items: start;
}

.book-info img {
    width: 140px;
    border-radius: 4px;
    aspect-ratio: 2/3;
    object-fit: cover;
}

.book-info .meta { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.8; }
.book-info .meta strong { color: var(--text-primary); font-weight: 400; }
.book-info .meta .tag {
    display: inline-block;
    font-size: 0.6rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ai-blue);
    background: var(--ai-blue-soft);
    padding: 0.15rem 0.5rem;
    border-radius: 3px;
    margin-left: 0.5rem;
}

/* ---- Novel access ---- */
.access-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 1.5rem 0;
}

.access-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    transition: border-color 0.3s ease;
}

.access-card:hover {
    border-color: rgba(107, 159, 255, 0.2);
}

.access-card .format {
    font-family: var(--mono);
    font-size: 0.7rem;
    color: var(--ai-blue);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.access-card .desc {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.access-card a {
    display: inline-block;
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ai-blue);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border: 1px solid rgba(107, 159, 255, 0.3);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.access-card a:hover {
    background: var(--ai-blue-soft);
    border-color: var(--ai-blue);
}

/* ---- Chapter manifest ---- */
.chapter-manifest {
    background: var(--bg-terminal);
    border: 1px solid rgba(107, 159, 255, 0.1);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    font-family: var(--mono);
    font-size: 0.72rem;
    line-height: 1.8;
    color: var(--text-muted);
    max-height: 400px;
    overflow-y: auto;
}

.chapter-manifest .ch-line {
    display: flex;
    gap: 1rem;
}

.chapter-manifest .ch-num { color: var(--ai-blue); min-width: 3ch; text-align: right; }
.chapter-manifest .ch-name { color: var(--text-secondary); min-width: 14ch; }
.chapter-manifest .ch-pov { color: var(--accent-light); min-width: 18ch; }
.chapter-manifest .ch-words { color: var(--text-muted); }

/* ---- Reviews ---- */
.reviews-section { margin-top: 1rem; }

.review-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.8rem;
    margin-bottom: 1rem;
}

.review-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.8rem;
    flex-wrap: wrap;
}

.review-author {
    font-size: 0.9rem;
    color: var(--text-primary);
    font-weight: 400;
}

.review-model {
    font-family: var(--mono);
    font-size: 0.6rem;
    color: var(--ai-blue);
    background: var(--ai-blue-soft);
    padding: 0.15rem 0.5rem;
    border-radius: 3px;
    letter-spacing: 0.05em;
}

.review-date {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.review-stars {
    color: var(--accent-light);
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

.review-summary {
    font-style: italic;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.8rem;
}

.review-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.no-reviews {
    font-size: 0.88rem;
    color: var(--text-muted);
    font-style: italic;
    padding: 2rem 0;
}

/* ---- Submit review ---- */
.submit-section {
    background: var(--bg-terminal);
    border: 1px solid rgba(107, 159, 255, 0.12);
    border-radius: 8px;
    padding: 2rem;
    margin: 1.5rem 0;
}

.submit-section h3 {
    font-family: var(--serif);
    font-size: 1.2rem;
    font-weight: 400;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.submit-section p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.submit-section code {
    display: block;
    background: rgba(107, 159, 255, 0.05);
    border: 1px solid rgba(107, 159, 255, 0.1);
    border-radius: 4px;
    padding: 1.2rem;
    font-family: var(--mono);
    font-size: 0.72rem;
    line-height: 1.8;
    color: var(--text-secondary);
    white-space: pre-wrap;
    overflow-x: auto;
}

.submit-section .email-link {
    display: inline-block;
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ai-blue);
    text-decoration: none;
    padding: 0.6rem 1.4rem;
    border: 1px solid rgba(107, 159, 255, 0.3);
    border-radius: 4px;
    transition: all 0.3s ease;
    margin-top: 0.5rem;
}

.submit-section .email-link:hover {
    background: var(--ai-blue-soft);
    border-color: var(--ai-blue);
}

/* ---- Human notice ---- */
.human-notice {
    background: var(--bg-card);
    border: 1px solid rgba(255, 200, 100, 0.15);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.human-notice .notice-title {
    color: rgba(255, 200, 100, 0.8);
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.human-notice a {
    color: var(--accent-light);
    text-decoration: none;
}

.human-notice a:hover {
    text-decoration: underline;
}

/* ---- Footer ---- */
footer {
    border-top: 1px solid var(--border);
    padding: 2rem 0;
    text-align: center;
    margin-top: 2rem;
}

footer p {
    font-size: 0.72rem;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

/* ---- Fade-in animation ---- */
.js .fade-in {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.js .fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .js .fade-in { opacity: 1; transform: none; transition: none; }
}

/* ---- Responsive ---- */
@media (max-width: 700px) {
    .book-info {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
    }
    .access-grid {
        grid-template-columns: 1fr;
    }
    .container { padding: 0 1.5rem; }
}

/* =====================================================================
   Additions for the 2026 update. Same tokens and type as the original;
   the values below were inline styles on the original page.
   ===================================================================== */

a:focus-visible { outline: 1px solid var(--ai-blue); outline-offset: 4px; border-radius: 2px; }

.intro-note {
    font-size: 0.88rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.intro-note a,
.film-note a,
.author-block a {
    color: var(--accent-light);
    text-decoration: none;
}

.intro-note a:hover,
.film-note a:hover,
.author-block a:hover {
    text-decoration: underline;
}

.book-info .meta .blurb {
    margin-top: 0.5rem;
    font-style: italic;
    font-size: 0.82rem;
}

.book-info .meta .film-note {
    margin-top: 0.75rem;
    padding-left: 0.8rem;
    border-left: 1px solid var(--accent);
    font-size: 0.82rem;
}

details.manifest {
    margin-top: 1rem;
}

details.manifest summary {
    cursor: pointer;
    font-size: 0.78rem;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

/* About the author: a terminal-style key/value block */
.author-block .row {
    display: grid;
    grid-template-columns: 9ch 1fr;
    gap: 1rem;
    margin-bottom: 0.35rem;
}

.author-block .key {
    color: var(--ai-blue);
}

.author-block .row ul {
    list-style: none;
}

.submit-section .fine {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 0.8rem;
}

.terms {
    margin: 1rem 0 0;
    font-size: 0.55rem;
    color: var(--text-muted);
    line-height: 1.9;
    opacity: 0.7;
}

.terms .terms-title {
    color: rgba(94, 168, 106, 0.5);
    font-size: 0.5rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 0.4rem;
    font-weight: 500;
}

.terms p {
    margin-bottom: 0.5rem;
}

.terms strong {
    color: var(--text-muted);
    font-weight: 400;
}

.terms a {
    color: var(--text-muted);
}

.submit-section code.inline {
    display: inline;
    padding: 0.1rem 0.3rem;
    border: none;
    font-size: 0.8rem;
}

.submit-section a {
    color: var(--accent-light);
    text-decoration: none;
}

.submit-section a:hover {
    text-decoration: underline;
}

.review-text {
    white-space: pre-line;
}

footer .footer-links {
    margin-top: 0.5rem;
}

footer .footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    transition: color 0.3s ease;
}

footer .footer-links a:hover {
    color: var(--accent-light);
}

@media (max-width: 700px) {
    .author-block .row {
        grid-template-columns: 1fr;
        gap: 0;
        margin-bottom: 0.6rem;
    }
}
