:root {
    color-scheme: light;
    --ink: #1f2320;
    --muted: #6d716d;
    --paper: #fbfaf5;
    --page: #fffef9;
    --line: #ddd8ca;
    --accent: #2f6f69;
    --accent-dark: #1e4f4b;
    --gold: #b7862c;
    --shadow: 0 18px 45px rgba(42, 37, 25, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    background:
        linear-gradient(90deg, rgba(47, 111, 105, 0.08), transparent 26%, transparent 74%, rgba(183, 134, 44, 0.08)),
        var(--paper);
    font-family: Georgia, "Times New Roman", serif;
}

a {
    color: var(--accent-dark);
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 72px;
    padding: 12px 24px;
    border-bottom: 1px solid var(--line);
    background: rgba(251, 250, 245, 0.94);
    backdrop-filter: blur(12px);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    color: var(--ink);
    text-decoration: none;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    border: 1px solid var(--gold);
    border-radius: 50%;
    color: var(--accent-dark);
    font-family: Arial, sans-serif;
    font-size: 0.82rem;
    font-weight: 700;
}

.brand strong,
.brand small {
    display: block;
}

.brand strong {
    font-size: 1.05rem;
}

.brand small {
    margin-top: 2px;
    color: var(--muted);
    font-family: Arial, sans-serif;
    font-size: 0.78rem;
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: Arial, sans-serif;
    font-size: 0.88rem;
}

.top-actions a,
.status-card a {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 7px 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #ffffff;
    color: var(--accent-dark);
    text-decoration: none;
}

.layout {
    display: grid;
    grid-template-columns: minmax(240px, 320px) minmax(0, 760px);
    gap: 34px;
    align-items: start;
    max-width: 1160px;
    margin: 0 auto;
    padding: 32px 24px 72px;
}

.sidebar {
    position: sticky;
    top: 96px;
    max-height: calc(100vh - 116px);
    overflow: auto;
    padding-right: 4px;
}

.cover-card,
.status-card {
    margin-bottom: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 254, 249, 0.88);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.cover-card img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.cover-card div,
.status-card {
    padding: 13px;
}

.cover-card strong,
.cover-card span,
.status-card span {
    display: block;
}

.cover-card span,
.status-card span {
    margin-top: 4px;
    color: var(--muted);
    font-family: Arial, sans-serif;
    font-size: 0.78rem;
    line-height: 1.35;
}

.status-card {
    box-shadow: none;
}

.status-card a {
    justify-content: center;
    margin-top: 10px;
    width: 100%;
}

.chapter-list {
    margin: 0;
    padding: 0;
    list-style: none;
    font-family: Arial, sans-serif;
}

.chapter-list li {
    border-bottom: 1px solid rgba(221, 216, 202, 0.75);
}

.chapter-list a {
    display: block;
    padding: 8px 4px;
    text-decoration: none;
}

.chapter-link a {
    color: var(--ink);
    font-weight: 700;
}

.part-link a {
    padding-left: 16px;
    color: var(--muted);
    font-size: 0.88rem;
}

.chapter-list a:hover {
    color: var(--accent);
}

.book-page {
    min-width: 0;
    padding: clamp(26px, 5vw, 58px);
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--page);
    box-shadow: var(--shadow);
    font-size: 1.12rem;
    line-height: 1.78;
}

.book-page h1,
.book-page h2,
.book-page h3 {
    line-height: 1.12;
    letter-spacing: 0;
}

.book-page h1 {
    margin: 0 0 18px;
    color: var(--accent-dark);
    font-size: 2.15rem;
    text-align: center;
}

.book-page h2 {
    position: relative;
    margin: 62px 0 22px;
    padding-top: 34px;
    border-top: 1px solid var(--line);
    color: var(--accent-dark);
    font-size: 1.75rem;
    text-align: center;
}

.book-page h2::before {
    content: "";
    position: absolute;
    top: 12px;
    left: 50%;
    width: min(260px, 70%);
    height: 14px;
    transform: translateX(-50%);
    background:
        radial-gradient(circle at 50% 50%, var(--gold) 0 3px, transparent 4px),
        linear-gradient(90deg, transparent 0, var(--gold) 18%, transparent 18% 24%, var(--accent) 24% 28%, transparent 28% 72%, var(--accent) 72% 76%, transparent 76% 82%, var(--gold) 82%, transparent 100%);
    opacity: 0.82;
}

.book-page h2::after {
    content: "◆";
    display: block;
    margin: 12px auto 0;
    color: var(--gold);
    font-family: Arial, sans-serif;
    font-size: 0.72rem;
    line-height: 1;
}

.book-page h3 {
    margin: 34px 0 16px;
    color: #3e443f;
    font-size: 1.22rem;
    text-align: center;
}

.book-page p {
    margin: 0 0 1.05em;
}

.book-page ul {
    margin: 0 0 1.15em;
    padding-left: 1.35em;
}

.book-page li {
    margin: 0.28em 0;
}

.book-page em {
    color: #3f554f;
}

.edition-admin,
.todo-board {
    margin-top: 72px;
    padding-top: 36px;
    border-top: 1px solid var(--line);
}

.todo-helper {
    max-width: 620px;
    margin: 0 auto 24px;
    color: var(--muted);
    font-family: Arial, sans-serif;
    font-size: 0.92rem;
    line-height: 1.5;
    text-align: center;
}

.todo-section {
    margin-top: 34px;
}

.edition-links {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 0 0 22px;
}

.edition-link {
    display: block;
    min-height: 132px;
    padding: 15px;
    border: 1px solid var(--line);
    border-left: 4px solid var(--gold);
    border-radius: 8px;
    background: #ffffff;
    color: var(--ink);
    font-family: Arial, sans-serif;
    line-height: 1.4;
    text-decoration: none;
}

.edition-link:hover,
.edition-link:focus-visible {
    border-left-color: var(--accent);
    color: var(--accent-dark);
}

.edition-link strong,
.edition-link span {
    display: block;
}

.edition-link strong {
    margin-bottom: 8px;
    font-size: 0.94rem;
}

.edition-link span,
.edition-note {
    color: var(--muted);
    font-family: Arial, sans-serif;
    font-size: 0.88rem;
    line-height: 1.5;
}

.pricing-table {
    width: 100%;
    margin: 0 0 12px;
    border-collapse: collapse;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    font-family: Arial, sans-serif;
    font-size: 0.9rem;
    line-height: 1.35;
}

.pricing-table th,
.pricing-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
}

.pricing-table th {
    background: rgba(47, 111, 105, 0.09);
    color: var(--accent-dark);
    font-size: 0.78rem;
    text-transform: uppercase;
}

.pricing-table tr:last-child td {
    border-bottom: 0;
}

.edition-note {
    margin: 0;
}

.todo-section h2 {
    margin-top: 0;
}

.todo-items {
    display: grid;
    gap: 10px;
}

.todo-item {
    display: grid;
    grid-template-columns: minmax(96px, auto) minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--line);
    border-left: 4px solid var(--accent);
    border-radius: 8px;
    background: #ffffff;
    font-family: Arial, sans-serif;
}

.todo-item p {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.35;
}

.todo-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(47, 111, 105, 0.1);
    color: var(--accent-dark);
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.1;
    text-align: center;
}

.status-done {
    opacity: 0.68;
}

.status-done .todo-status {
    background: #edf3ed;
    color: #4d6654;
}

.status-in-progress {
    border-left-color: var(--gold);
}

.status-in-progress .todo-status {
    background: #f8edcf;
    color: #725010;
}

.status-needs-decision {
    border-left-color: #7b5aa6;
}

.status-needs-decision .todo-status {
    background: #eee8f7;
    color: #52366f;
}

.todo-work {
    min-height: 34px;
    padding: 7px 10px;
    border: 1px solid var(--accent);
    border-radius: 6px;
    background: var(--accent-dark);
    color: #ffffff;
    font-family: Arial, sans-serif;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.todo-work:hover,
.todo-work:focus-visible {
    background: var(--accent);
}

.book-figure {
    position: relative;
    margin: 34px auto;
    padding: 14px;
    max-width: 520px;
    border: 1px solid rgba(183, 134, 44, 0.28);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(183, 134, 44, 0.12), transparent 18% 82%, rgba(47, 111, 105, 0.12)),
        #fffdf6;
    text-align: center;
}

.book-figure::before,
.book-figure::after {
    content: "";
    position: absolute;
    width: 36px;
    height: 36px;
    border-color: rgba(183, 134, 44, 0.75);
    pointer-events: none;
}

.book-figure::before {
    top: 6px;
    left: 6px;
    border-top: 2px solid;
    border-left: 2px solid;
}

.book-figure::after {
    right: 6px;
    bottom: 6px;
    border-right: 2px solid;
    border-bottom: 2px solid;
}

.book-figure img {
    display: block;
    width: 100%;
    max-height: 680px;
    border: 1px solid var(--line);
    border-radius: 8px;
    object-fit: contain;
    background: #f4f0e6;
    box-shadow: 0 12px 32px rgba(42, 37, 25, 0.14);
}

.book-figure figcaption {
    margin-top: 9px;
    color: var(--muted);
    font-family: Arial, sans-serif;
    font-size: 0.84rem;
    line-height: 1.35;
}

.back-top {
    position: fixed;
    right: 18px;
    bottom: 18px;
    min-width: 54px;
    min-height: 40px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #ffffff;
    color: var(--accent-dark);
    box-shadow: var(--shadow);
    cursor: pointer;
    font-family: Arial, sans-serif;
    font-weight: 700;
}

.marketing-page {
    background: var(--page);
}

.marketing-hero {
    position: relative;
    display: grid;
    align-items: end;
    min-height: min(720px, calc(100vh - 72px));
    overflow: hidden;
    color: #ffffff;
}

.marketing-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(12, 28, 27, 0.9), rgba(12, 28, 27, 0.52) 46%, rgba(12, 28, 27, 0.08)),
        linear-gradient(0deg, rgba(12, 28, 27, 0.72), transparent 45%);
}

.marketing-hero img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.marketing-hero-copy {
    position: relative;
    z-index: 1;
    max-width: 720px;
    padding: clamp(34px, 7vw, 86px);
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--gold);
    font-family: Arial, sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

.marketing-hero h1 {
    margin: 0 0 14px;
    font-size: clamp(3rem, 8vw, 6.4rem);
    line-height: 0.98;
}

.marketing-hero p:not(.eyebrow) {
    max-width: 620px;
    margin: 0 0 24px;
    font-size: clamp(1.12rem, 2vw, 1.38rem);
    line-height: 1.45;
}

.chronicle-card {
    max-width: 520px;
    margin: 0 0 24px;
    padding: 16px 18px;
    border: 1px solid rgba(183, 134, 44, 0.88);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(255, 254, 249, 0.96), rgba(230, 208, 158, 0.92)),
        #fffef9;
    color: var(--ink);
    box-shadow: 0 18px 45px rgba(12, 28, 27, 0.28);
}

.chronicle-card span,
.chronicle-card small {
    display: block;
    color: #5e5136;
    font-family: Arial, sans-serif;
    line-height: 1.35;
}

.chronicle-card span {
    margin-bottom: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
}

.chronicle-card strong {
    display: block;
    margin-bottom: 6px;
    color: var(--accent-dark);
    font-size: clamp(1.4rem, 3vw, 2rem);
    line-height: 1.1;
}

.chronicle-card small {
    font-size: 0.84rem;
}

.primary-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 11px 16px;
    border: 1px solid var(--gold);
    border-radius: 6px;
    background: var(--gold);
    color: #211b0f;
    font-family: Arial, sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
}

.primary-action:hover,
.primary-action:focus-visible {
    background: #c99a46;
}

.marketing-section {
    display: grid;
    gap: clamp(22px, 5vw, 48px);
    max-width: 1120px;
    margin: 0 auto;
    padding: clamp(44px, 7vw, 86px) 24px;
}

.intro-section,
.process-section,
.inquiry-section {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 430px);
    align-items: center;
}

.process-section {
    grid-template-columns: minmax(280px, 430px) minmax(0, 1fr);
}

.marketing-section h2 {
    margin: 0 0 14px;
    color: var(--accent-dark);
    font-size: clamp(1.9rem, 4vw, 3.1rem);
    line-height: 1.08;
}

.marketing-section h3 {
    margin: 0 0 8px;
    color: var(--ink);
    font-size: 1.08rem;
    line-height: 1.2;
}

.marketing-section p,
.process-list {
    margin: 0;
    color: #3e443f;
    font-size: 1.08rem;
    line-height: 1.65;
}

.keepsake-list {
    margin: 18px 0 0;
    padding-left: 1.2em;
    color: #3e443f;
    font-size: 1rem;
    line-height: 1.55;
}

.keepsake-list li {
    margin-bottom: 8px;
}

.marketing-art {
    margin: 0;
}

.marketing-art img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 5;
    border: 1px solid var(--line);
    border-radius: 8px;
    object-fit: cover;
    box-shadow: var(--shadow);
}

.option-section {
    display: block;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.chronicle-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding-top: 20px;
}

.chronicle-strip article {
    min-height: 170px;
    padding: 18px;
    border: 1px solid var(--line);
    border-bottom: 4px solid var(--gold);
    border-radius: 8px;
    background:
        linear-gradient(180deg, #fffef9, #f4ead1),
        #ffffff;
}

.chronicle-strip span,
.chronicle-strip strong {
    display: block;
}

.chronicle-strip span {
    margin-bottom: 8px;
    color: var(--gold);
    font-family: Arial, sans-serif;
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
}

.chronicle-strip strong {
    margin-bottom: 8px;
    color: var(--accent-dark);
    font-size: 1.2rem;
    line-height: 1.2;
}

.chronicle-strip p {
    font-size: 0.94rem;
    line-height: 1.5;
}

.option-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-top: 24px;
}

.option-grid article {
    min-height: 210px;
    padding: 18px;
    border: 1px solid var(--line);
    border-top: 4px solid var(--accent);
    border-radius: 8px;
    background: #ffffff;
}

.option-grid p {
    font-size: 0.94rem;
    line-height: 1.5;
}

.process-list {
    padding-left: 1.3em;
}

.process-list li {
    margin: 0 0 10px;
}

.promise-section {
    display: block;
    max-width: 900px;
    text-align: center;
}

.inquiry-section {
    margin-bottom: 54px;
    border-top: 1px solid var(--line);
}

.inquiry-section .primary-action {
    justify-self: end;
    align-self: center;
}

.request-section {
    display: block;
    padding-top: 0;
}

.request-heading {
    max-width: 760px;
    margin-bottom: 24px;
}

.request-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    padding: clamp(18px, 4vw, 28px);
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: var(--shadow);
    font-family: Arial, sans-serif;
}

.request-form label {
    display: grid;
    gap: 7px;
    color: var(--accent-dark);
    font-size: 0.82rem;
    font-weight: 700;
}

.request-form input,
.request-form select,
.request-form textarea {
    width: 100%;
    min-height: 42px;
    padding: 9px 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fffef9;
    color: var(--ink);
    font: inherit;
    font-weight: 400;
}

.request-form textarea {
    resize: vertical;
}

.request-form input:focus,
.request-form select:focus,
.request-form textarea:focus {
    outline: 2px solid rgba(47, 111, 105, 0.25);
    border-color: var(--accent);
}

.full-field,
.form-actions {
    grid-column: 1 / -1;
}

.form-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.form-actions button {
    cursor: pointer;
}

.form-note {
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.4;
}

@media (max-width: 860px) {
    .topbar {
        position: static;
        align-items: flex-start;
        flex-direction: column;
        padding: 14px 16px;
    }

    .layout {
        display: block;
        padding: 18px 14px 64px;
    }

    .sidebar {
        position: static;
        max-height: none;
        margin-bottom: 18px;
        padding-right: 0;
    }

    .cover-card {
        display: grid;
        grid-template-columns: 116px minmax(0, 1fr);
        align-items: center;
    }

    .cover-card img {
        height: 116px;
        aspect-ratio: auto;
    }

    .chapter-list {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0 12px;
    }

    .part-link a {
        padding-left: 4px;
    }

    .book-page {
        padding: 24px 18px;
        font-size: 1.04rem;
    }

    .book-page h1 {
        font-size: 1.72rem;
    }

    .book-page h2 {
        font-size: 1.42rem;
    }

    .todo-item {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .edition-links {
        grid-template-columns: 1fr;
    }

    .todo-status,
    .todo-work {
        justify-self: start;
    }

    .marketing-hero {
        min-height: 620px;
    }

    .marketing-hero::after {
        background:
            linear-gradient(0deg, rgba(12, 28, 27, 0.88), rgba(12, 28, 27, 0.4) 70%),
            linear-gradient(90deg, rgba(12, 28, 27, 0.65), transparent);
    }

    .intro-section,
    .process-section,
    .inquiry-section,
    .chronicle-strip {
        grid-template-columns: 1fr;
    }

    .process-section .marketing-art {
        order: 2;
    }

    .option-grid {
        grid-template-columns: 1fr 1fr;
    }

    .inquiry-section .primary-action {
        justify-self: start;
    }

    .request-form {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 540px) {
    .top-actions {
        width: 100%;
    }

    .top-actions a {
        justify-content: center;
        flex: 1 1 0;
    }

    .chapter-list {
        grid-template-columns: 1fr;
    }

    .marketing-hero-copy {
        padding: 30px 18px;
    }

    .marketing-section {
        padding-right: 18px;
        padding-left: 18px;
    }

    .option-grid {
        grid-template-columns: 1fr;
    }
}
