/* =========================================================
   Public site
   ========================================================= */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(247, 242, 231, .86);
    border-bottom: 1px solid rgba(207, 197, 177, .55);
    backdrop-filter: blur(14px);
    transition: box-shadow .25s, background .25s;
}

.site-header.is-scrolled {
    background: rgba(247, 242, 231, .96);
    box-shadow: 0 8px 24px -20px rgba(23, 40, 37, .4);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    min-height: 78px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex: 0 0 auto;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 11px;
    color: var(--teal);
    background: linear-gradient(145deg, #eef2e9, #e2eadf);
    border: 1px solid #d6e0d5;
}

.brand-mark svg {
    width: 34px;
    height: 34px;
}

.brand-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.brand-copy strong {
    font-family: var(--serif);
    font-size: 22px;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: .01em;
    color: var(--ink);
}

.brand-copy small {
    margin-top: 3px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .12em;
    color: var(--muted);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 26px;
    font-size: 13px;
    font-weight: 500;
    color: var(--ink-3);
}

.site-nav > a:not(.nav-admin) {
    position: relative;
    padding: 6px 0;
    transition: color .2s;
}

.site-nav > a:not(.nav-admin)::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1.5px;
    background: var(--rust);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .25s var(--ease);
}

.site-nav > a:not(.nav-admin):hover,
.site-nav > a.is-active {
    color: var(--ink);
}

.site-nav > a.is-active::after,
.site-nav > a:not(.nav-admin):hover::after {
    transform: scaleX(1);
}

.api-state {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 9px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--line);
    font-size: 10px;
    font-weight: 600;
    color: var(--muted);
    background: rgba(255, 253, 248, .6);
}

.api-state.is-online {
    color: var(--success);
    border-color: #cfe5d6;
    background: var(--success-bg);
}

.api-state.is-offline {
    color: var(--danger);
    border-color: #ecd0ca;
    background: var(--danger-bg);
}

.nav-admin {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 13px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-pill);
    color: var(--teal);
    font-size: 12px;
    transition: border-color .2s, background .2s;
}

.nav-admin:hover {
    border-color: var(--teal);
    background: var(--sage-2);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--paper);
    color: var(--ink);
    place-items: center;
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    overflow: hidden;
    padding: 38px 0 64px;
    border-bottom: 1px solid var(--line);
    background:
        radial-gradient(ellipse at 73% 6%, rgba(47, 119, 106, .11), transparent 40%),
        radial-gradient(ellipse at 8% 78%, rgba(192, 154, 86, .13), transparent 36%),
        linear-gradient(180deg, #f8f3e9 0%, #f5eee0 100%);
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: .5;
    background-image:
        linear-gradient(rgba(18, 63, 59, .035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(18, 63, 59, .035) 1px, transparent 1px);
    background-size: 46px 46px;
    mask-image: linear-gradient(to bottom, black, transparent 75%);
}

.hero-grid {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(360px, .92fr);
    gap: 44px;
    align-items: center;
}

.hero-copy {
    max-width: 690px;
}

.hero-title {
    font-size: clamp(42px, 5.1vw, 68px);
    font-weight: 700;
    font-synthesis: weight;
    line-height: 1.3;
    letter-spacing: -.045em;
    margin-bottom: 22px;
}

.hero-title em {
    position: relative;
    font-style: normal;
    color: var(--rust);
    white-space: nowrap;
}

.hero-title em::after {
    content: "";
    position: absolute;
    left: 0;
    right: 2%;
    bottom: 5px;
    height: 8px;
    z-index: -1;
    background: rgba(192, 154, 86, .22);
    border-radius: 5px;
    transform: skewX(-8deg);
}

.hero-lead {
    max-width: 540px;
    margin-bottom: 24px;
    font-size: 15.5px;
    line-height: 1.75;
    color: var(--ink-3);
}

.notice-strip {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin-bottom: 18px;
    padding: 10px 13px;
    border: 1px dashed #d9c9a8;
    border-radius: 9px;
    background: rgba(255, 251, 239, .7);
    color: #7a5b25;
    font-size: 13px;
}

/* ISBN search form */
.isbn-form {
    max-width: 690px;
    scroll-margin-top: 96px;
}

.isbn-input-shell {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px;
    border: 1px solid var(--line-strong);
    border-radius: 16px;
    background: var(--paper);
    box-shadow: 0 18px 40px -26px rgba(18, 63, 59, .5), inset 0 1px 0 #fff;
    transition: border-color .2s, box-shadow .2s;
}

.isbn-input-shell:focus-within {
    border-color: var(--teal-3);
    box-shadow: 0 0 0 4px rgba(47, 119, 106, .10), 0 22px 45px -28px rgba(18, 63, 59, .45);
}

.isbn-prefix {
    display: grid;
    place-items: center;
    width: 44px;
    height: 48px;
    color: var(--teal-2);
    flex: 0 0 auto;
}

.isbn-input-shell input {
    flex: 1;
    min-width: 0;
    height: 54px;
    padding: 0 4px;
    border: 0;
    outline: 0;
    background: transparent;
    font-family: var(--mono);
    font-size: 15px;
    letter-spacing: .01em;
    color: var(--ink);
}

.isbn-input-shell input::placeholder {
    font-family: var(--sans);
    font-size: 14px;
    color: #9a9f95;
}

.isbn-submit {
    min-height: 52px;
    padding-inline: 22px;
    border-radius: 11px;
    flex: 0 0 auto;
}

.btn-loading {
    display: none;
    align-items: center;
    gap: 7px;
}

.btn.is-loading .btn-label,
.btn.is-loading .btn-arrow {
    display: none;
}

.btn.is-loading .btn-loading {
    display: inline-flex;
}

.isbn-form-foot {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-top: 10px;
    padding: 0 4px;
}

.form-hint {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.6;
}

.isbn-form-foot .text-link {
    flex: 0 0 auto;
    font-size: 12px;
    margin-top: 1px;
}

.isbn-form--hero .isbn-form-foot .text-link {
    display: none;
}

.search-feedback {
    margin-top: 12px;
    padding: 11px 14px;
    border: 1px solid #ecd0ca;
    border-radius: 9px;
    background: var(--danger-bg);
    color: #84362a;
    font-size: 13px;
}

.search-feedback.is-info {
    border-color: #cfe0e7;
    background: var(--info-bg);
    color: var(--info);
}

.search-feedback[hidden] {
    display: none;
}

.hero-proof {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 34px;
    color: var(--ink-3);
    font-size: 11.5px;
}

.hero-proof span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.hero-proof .icon {
    color: var(--teal-3);
}

.hero-stats {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.hero-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.hero-stat strong {
    font-family: var(--serif);
    font-size: 24px;
    line-height: 1.1;
    color: var(--ink);
}

.hero-stat > span:last-child {
    font-size: 10.5px;
    color: var(--muted);
}

.hero-live {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    padding: 5px 10px;
    border: 1px solid #cfe5d6;
    border-radius: var(--radius-pill);
    background: var(--success-bg);
    color: var(--success);
    font-size: 10.5px;
    font-weight: 600;
}

.hero-live .dot {
    width: 6px;
    height: 6px;
}

.stat-divider {
    width: 1px;
    align-self: stretch;
    min-height: 34px;
    background: var(--line);
}

/* Hero visual */
.hero-visual {
    position: relative;
    min-height: 470px;
    display: grid;
    place-items: center;
}

.library-scene {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    opacity: .2;
    pointer-events: none;
}



.visual-ring {
    position: absolute;
    width: 430px;
    height: 430px;
    border: 1px solid rgba(18, 63, 59, .13);
    border-radius: 50%;
    z-index: 0;
}

.visual-ring::before,
.visual-ring::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(18, 63, 59, .08);
}

.visual-ring::before { inset: 28px; }
.visual-ring::after { inset: 62px; }

.visual-books {
    position: absolute;
    right: 8%;
    bottom: 8%;
    width: 300px;
    height: 240px;
    z-index: 0;
}

.visual-book {
    position: absolute;
    display: block;
    border-radius: 4px 9px 9px 4px;
    box-shadow: 0 18px 30px -20px rgba(23, 40, 37, .55);
}

.visual-book--1 {
    width: 185px;
    height: 38px;
    right: 6px;
    bottom: 26px;
    background: #c7a36a;
    transform: rotate(-7deg);
}

.visual-book--2 {
    width: 165px;
    height: 32px;
    right: 32px;
    bottom: 62px;
    background: #81543d;
    transform: rotate(4deg);
}

.visual-book--3 {
    width: 210px;
    height: 42px;
    right: -4px;
    bottom: 4px;
    background: #2f5f55;
    transform: rotate(-2deg);
}

.catalog-card {
    position: relative;
    z-index: 2;
    width: min(350px, 88%);
    padding: 30px 28px 22px;
    border: 1px solid #d9cfb9;
    border-radius: 5px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .72), transparent 45%),
        #fbf5e7;
    box-shadow: 0 35px 70px -32px rgba(23, 40, 37, .55), 0 2px 0 rgba(255, 255, 255, .6) inset;
    transform: rotate(-3deg);
    transition: transform .5s var(--ease);
}

.catalog-card:hover {
    transform: rotate(-1deg) translateY(-3px);
}

.catalog-card::before {
    content: "";
    position: absolute;
    inset: 9px;
    border: 1px solid rgba(18, 63, 59, .12);
    border-radius: 2px;
    pointer-events: none;
}

.catalog-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #ddd2bd;
}

.catalog-overline,
.catalog-number {
    font-family: var(--mono);
    font-size: 8px;
    letter-spacing: .16em;
    color: #8a7b62;
}

.catalog-number {
    letter-spacing: .04em;
}

.catalog-lines {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin: 18px 0 16px;
}

.catalog-lines span {
    display: block;
    height: 3px;
    background: #ded3be;
    border-radius: 3px;
}

.catalog-lines span:nth-child(1) { width: 100%; }
.catalog-lines span:nth-child(2) { width: 82%; }
.catalog-lines span:nth-child(3) { width: 48%; }

.catalog-title {
    font-family: var(--serif);
    font-size: 24px;
    line-height: 1.35;
    letter-spacing: -.02em;
    color: var(--teal);
    margin-bottom: 8px;
}

.catalog-author {
    font-size: 11px;
    color: #776c5b;
    margin-bottom: 22px;
}

.catalog-meta {
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    gap: 12px;
    padding: 14px 0;
    border-top: 1px solid #ddd2bd;
    border-bottom: 1px solid #ddd2bd;
}

.catalog-meta div {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.catalog-meta small {
    font-family: var(--mono);
    font-size: 7.5px;
    letter-spacing: .12em;
    color: #988a72;
}

.catalog-meta strong {
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 600;
    color: var(--teal);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.catalog-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
}

.catalog-code {
    font-family: var(--mono);
    font-size: 8px;
    letter-spacing: .1em;
    color: #998a70;
}

.catalog-stamp {
    padding: 3px 8px;
    border: 1px solid rgba(180, 95, 63, .55);
    border-radius: 3px;
    color: var(--rust);
    font-family: var(--serif);
    font-size: 10px;
    letter-spacing: .16em;
    transform: rotate(-4deg);
}

.floating-chip {
    position: absolute;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(255, 253, 248, .95);
    box-shadow: 0 16px 30px -20px rgba(23, 40, 37, .55);
    backdrop-filter: blur(6px);
}

.floating-chip small {
    display: block;
    font-family: var(--mono);
    font-size: 7px;
    letter-spacing: .1em;
    color: var(--muted);
}

.floating-chip strong {
    display: block;
    font-size: 11px;
    color: var(--ink);
}

.floating-chip--marc {
    top: 12%;
    right: 0;
    transform: rotate(2deg);
}

.floating-chip--cache {
    bottom: 9%;
    left: 0;
    transform: rotate(-2deg);
}

.chip-icon {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: var(--sage-2);
    color: var(--teal-2);
}

.pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #42a36d;
    box-shadow: 0 0 0 0 rgba(66, 163, 109, .5);
    animation: pulse 2.2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(66, 163, 109, .38); }
    70% { box-shadow: 0 0 0 9px rgba(66, 163, 109, 0); }
    100% { box-shadow: 0 0 0 0 rgba(66, 163, 109, 0); }
}

/* ---------- Sections ---------- */
.section {
    padding: 86px 0;
}

.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 34px;
}

.section-head .eyebrow {
    margin-bottom: 10px;
}

.section-head h2 {
    font-size: clamp(30px, 3.4vw, 42px);
    letter-spacing: -.035em;
}

.section-head--center {
    justify-content: center;
    text-align: center;
}

.section-head--center .eyebrow {
    justify-content: center;
}

.section-sub {
    margin-top: 10px;
    color: var(--muted);
    font-size: 15px;
}

.section-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding-bottom: 5px;
    border-bottom: 1px solid var(--line-strong);
    font-size: 12.5px;
    font-weight: 600;
    color: var(--teal-2);
    white-space: nowrap;
}

.section-link:hover {
    color: var(--rust);
    border-color: var(--rust);
}

/* ---------- Book cards ---------- */
.book-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.book-card {
    display: grid;
    grid-template-columns: 128px minmax(0, 1fr);
    min-height: 184px;
    overflow: hidden;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: transform .3s var(--ease), box-shadow .3s, border-color .3s;
}

.book-card:hover {
    transform: translateY(-4px);
    border-color: #d3c8b3;
    box-shadow: var(--shadow-md);
}

.book-card-cover {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 15px 13px;
    overflow: hidden;
    background: var(--cover-bg, var(--teal));
    color: var(--cover-ink, #f7f1e3);
    border-right: 1px solid rgba(0, 0, 0, .08);
}

.book-card-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(135deg, rgba(255, 255, 255, .15), transparent 42%);
}

.book-card-cover .cover-rule {
    width: 24px;
    height: 2px;
    margin-bottom: 2px;
    background: var(--cover-accent, var(--gold));
}

.cover-kicker {
    font-family: var(--mono);
    font-size: 6.5px;
    letter-spacing: .12em;
    opacity: .7;
    line-height: 1.5;
}

.cover-title {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-top: 4px;
    font-family: var(--serif);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
}

.cover-publisher {
    margin-top: auto;
    font-size: 9px;
    opacity: .78;
    line-height: 1.4;
}

.cover-year {
    font-family: var(--mono);
    font-size: 8px;
    opacity: .6;
}

.book-card-body {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 15px 16px 12px;
}

.book-card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 7px;
}

.book-card-title {
    font-family: var(--serif);
    font-size: 17px;
    line-height: 1.4;
    letter-spacing: -.01em;
}

.book-card-title a {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.book-card-title a:hover {
    color: var(--teal-2);
}

.book-card-subtitle {
    margin-top: 4px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.book-card-author {
    margin-top: 9px;
    color: var(--ink-3);
    font-size: 11.5px;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.book-card-meta {
    color: var(--muted);
    font-size: 10.5px;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.book-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid #eee8dc;
}

.isbn-label {
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: -.02em;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-arrow {
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--sage-2);
    color: var(--teal-2);
    transition: background .2s, color .2s, transform .2s;
}

.book-card:hover .card-arrow {
    background: var(--teal);
    color: var(--cream);
    transform: translateX(1px);
}

/* Cover tones */
.cover-tone-0 { --cover-bg: #1b514b; --cover-ink: #f8f1df; --cover-accent: #d2ac66; }
.cover-tone-1 { --cover-bg: #e6d6ba; --cover-ink: #43372a; --cover-accent: #a85b3c; }
.cover-tone-2 { --cover-bg: #8e4d37; --cover-ink: #fbf1e1; --cover-accent: #e7c78e; }
.cover-tone-3 { --cover-bg: #2f4358; --cover-ink: #f1ebdf; --cover-accent: #b9a173; }
.cover-tone-4 { --cover-bg: #dce5d8; --cover-ink: #294039; --cover-accent: #8d5a3f; }
.cover-tone-5 { --cover-bg: #5d6049; --cover-ink: #f7f0dd; --cover-accent: #d8ba85; }

.collection-cta {
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 184px;
    padding: 26px 28px;
    border: 1px dashed #cfc1a7;
    border-radius: var(--radius);
    background:
        radial-gradient(circle at 100% 0%, rgba(192, 154, 86, .12), transparent 45%),
        rgba(255, 253, 248, .42);
    transition: border-color .25s, background .25s, transform .3s var(--ease);
}

.collection-cta:hover {
    transform: translateY(-3px);
    border-color: var(--teal-3);
    background: rgba(255, 253, 248, .72);
}

.collection-cta--wide {
    grid-column: span 2;
}

.collection-cta-icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--sage-2);
    color: var(--teal-2);
}

.collection-cta-copy {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.collection-cta-copy small {
    font-family: var(--mono);
    font-size: 8px;
    letter-spacing: .13em;
    color: var(--rust);
}

.collection-cta-copy strong {
    font-family: var(--serif);
    font-size: 19px;
    font-weight: 600;
    line-height: 1.4;
}

.collection-cta-copy > span {
    color: var(--muted);
    font-size: 11.5px;
}

.collection-cta-arrow {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    margin-left: auto;
    border-radius: 50%;
    background: var(--teal);
    color: var(--cream);
}

/* ---------- Workflow ---------- */
.workflow-section {
    background: #efe8da;
    border-top: 1px solid #e2d8c5;
    border-bottom: 1px solid #e2d8c5;
}

.step-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    border-top: 1px solid #d7c9b1;
    margin-top: 56px;
}

.step-card {
    position: relative;
    padding: 34px 34px 8px 0;
    border-right: 1px solid #d7c9b1;
}

.step-card:not(:first-child) {
    padding-left: 34px;
}

.step-card:last-child {
    border-right: 0;
    padding-right: 0;
}

.step-marker {
    display: flex;
    align-items: flex-end;
    gap: 9px;
    width: 100%;
    margin-bottom: 24px;
}

.step-marker::after {
    content: "";
    flex: 1;
    height: 1px;
    margin: 0 2px 10px 3px;
    background: linear-gradient(90deg, #c4b296, transparent);
}

.step-number {
    font-family: var(--serif);
    font-size: clamp(46px, 4.6vw, 64px);
    font-weight: 600;
    line-height: .82;
    letter-spacing: -.07em;
    color: var(--rust);
    font-variant-numeric: lining-nums;
    text-shadow: 0 10px 22px rgba(180, 95, 63, .12);
    transition: color .25s var(--ease);
}

.step-card:hover .step-number {
    color: var(--teal);
}

.step-caption {
    margin-bottom: 4px;
    padding: 2px 6px;
    border: 1px solid #c8b99f;
    border-radius: var(--radius-pill);
    font-family: var(--mono);
    font-size: 7px;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: .16em;
    color: var(--muted);
}

.step-icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    margin-bottom: 20px;
    border: 1px solid #d3c4aa;
    border-radius: 50%;
    color: var(--teal-2);
    background: rgba(255, 253, 248, .5);
}

.step-card h3 {
    font-size: 22px;
    margin-bottom: 9px;
}

.step-card p {
    max-width: 300px;
    color: var(--ink-3);
    font-size: 13.5px;
    line-height: 1.75;
}

/* ---------- CTA ---------- */
.cta-section {
    padding-top: 0;
}

.cta-panel {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    overflow: hidden;
    padding: 54px 58px;
    border-radius: var(--radius-lg);
    background:
        radial-gradient(circle at 85% 0%, rgba(192, 154, 86, .24), transparent 44%),
        radial-gradient(circle at 8% 110%, rgba(47, 119, 106, .4), transparent 45%),
        var(--teal);
    color: var(--cream);
    box-shadow: var(--shadow-lg);
}

.cta-panel::after {
    content: "MARC";
    position: absolute;
    right: -10px;
    bottom: -42px;
    font-family: var(--serif);
    font-size: 180px;
    font-weight: 700;
    line-height: 1;
    color: rgba(255, 255, 255, .035);
    pointer-events: none;
}

.cta-copy {
    position: relative;
    z-index: 1;
    max-width: 560px;
}

.cta-copy h2 {
    color: var(--cream);
    font-size: clamp(30px, 3.4vw, 44px);
    margin-bottom: 10px;
}

.cta-copy p:last-child {
    color: rgba(247, 242, 231, .68);
    font-size: 14px;
}

.cta-actions {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    flex: 0 0 auto;
}

/* ---------- Page hero (results/about) ---------- */
.page-hero {
    position: relative;
    padding: 44px 0 50px;
    border-bottom: 1px solid var(--line);
    background:
        radial-gradient(ellipse at 80% 0%, rgba(47, 119, 106, .09), transparent 42%),
        #f6f0e4;
}

.page-hero--results {
    padding-bottom: 38px;
}

.page-hero-inner {
    position: relative;
}

.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 22px;
    font-size: 11.5px;
    color: var(--muted);
}

.breadcrumb a:hover {
    color: var(--rust);
}

.breadcrumb .mono {
    font-size: 10px;
}

.page-hero-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 26px;
}

.page-hero h1 {
    font-size: clamp(31px, 3.7vw, 48px);
    letter-spacing: -.04em;
}

.page-hero h1 em {
    font-style: normal;
    color: var(--rust);
}

.page-lead {
    max-width: 660px;
    margin-top: 14px;
    color: var(--ink-3);
    font-size: 15px;
    line-height: 1.8;
}

.page-hero .isbn-form {
    max-width: 760px;
}

.normalized-badge {
    flex: 0 0 auto;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: rgba(255, 253, 248, .65);
    text-align: right;
}

.normalized-badge small {
    display: block;
    font-size: 9px;
    letter-spacing: .08em;
    color: var(--muted);
}

.normalized-badge strong {
    display: block;
    margin-top: 2px;
    font-family: var(--mono);
    font-size: 12px;
    color: var(--teal);
}

/* ---------- Results ---------- */
.result-section {
    padding-top: 42px;
}

.result-error {
    display: flex;
    gap: 26px;
    max-width: 900px;
    margin: 0 auto;
    padding: 38px;
    border: 1px solid #e4cfc5;
    border-radius: var(--radius-lg);
    background:
        radial-gradient(circle at 100% 0%, rgba(180, 95, 63, .07), transparent 40%),
        var(--paper);
    box-shadow: var(--shadow-sm);
}

.result-error-icon {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: #f8ebe5;
    color: var(--rust);
}

.result-error-body h2 {
    margin: 10px 0 8px;
    font-size: 27px;
}

.result-error-body > p {
    color: var(--ink-3);
    font-size: 14px;
    line-height: 1.75;
}

.result-error-body .muted {
    margin-top: 6px;
    font-size: 13px;
}

.result-error-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 20px;
}

.error-code {
    margin-top: 16px;
    font-family: var(--mono);
    font-size: 10px;
    color: var(--muted-2);
}

.result-summary {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    padding-bottom: 22px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--line);
}

.result-count {
    font-family: var(--serif);
    font-size: 24px;
    color: var(--ink);
}

.result-count strong {
    font-size: 36px;
    color: var(--rust);
    margin-right: 3px;
}

.result-summary .muted {
    margin-top: 3px;
    font-size: 12px;
}

.result-summary-badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.result-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.result-list--single {
    grid-template-columns: minmax(0, 760px);
    justify-content: center;
}

.result-list .book-card {
    min-height: 200px;
    grid-template-columns: 138px minmax(0, 1fr);
}

.result-list .book-card-title {
    font-size: 18px;
}

.inline-notice {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 10px 13px;
    border: 1px solid #cfe0e7;
    border-radius: 9px;
    background: var(--info-bg);
    color: var(--info);
    font-size: 13px;
}

.result-footnote {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 30px;
    padding-top: 17px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 11.5px;
}

.result-footnote span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* ---------- Detail ---------- */
.detail-hero {
    padding: 38px 0 55px;
    border-bottom: 1px solid var(--line);
    background:
        radial-gradient(ellipse at 82% 5%, rgba(47, 119, 106, .10), transparent 37%),
        radial-gradient(ellipse at 4% 100%, rgba(192, 154, 86, .13), transparent 35%),
        #f7f1e5;
}

.detail-grid {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 52px;
    align-items: center;
    margin-top: 6px;
}

.detail-cover-wrap {
    min-width: 0;
}

.detail-cover {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    aspect-ratio: 2 / 2.9;
    padding: 28px 24px 22px;
    overflow: hidden;
    border-radius: 4px 11px 11px 4px;
    background: var(--cover-bg);
    color: var(--cover-ink);
    box-shadow: 0 30px 55px -30px rgba(23, 40, 37, .6), inset 0 0 0 1px rgba(255, 255, 255, .1);
}

.detail-cover::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 12px;
    width: 1px;
    background: rgba(255, 255, 255, .17);
}

.detail-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(145deg, rgba(255, 255, 255, .15), transparent 45%);
}

.detail-cover .cover-rule {
    width: 34px;
    height: 2px;
    margin-bottom: 12px;
    background: var(--cover-accent);
}

.detail-cover .cover-kicker {
    font-size: 7px;
    letter-spacing: .12em;
    opacity: .68;
}

.detail-cover .cover-title {
    -webkit-line-clamp: 6;
    margin-top: 18px;
    font-size: clamp(20px, 2vw, 27px);
    line-height: 1.4;
}

.detail-cover .cover-publisher {
    font-size: 11px;
}

.detail-cover .cover-year {
    font-size: 9px;
}

.cover-caption {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 13px;
    color: var(--muted);
    font-size: 10px;
}

.cover-caption span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.detail-main {
    min-width: 0;
}

.detail-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 15px;
}

.detail-title {
    max-width: 900px;
    font-size: clamp(32px, 4vw, 50px);
    line-height: 1.22;
    letter-spacing: -.04em;
}

.detail-subtitle {
    margin-top: 9px;
    color: var(--ink-3);
    font-size: 17px;
    line-height: 1.55;
}

.detail-author {
    margin-top: 18px;
    color: var(--teal-2);
    font-size: 16px;
    font-weight: 500;
}

.detail-imprint {
    margin-top: 4px;
    color: var(--muted);
    font-size: 13px;
}

.detail-isbn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 24px;
    padding: 7px 8px 7px 13px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: rgba(255, 253, 248, .7);
}

.detail-isbn > span {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .1em;
    color: var(--muted);
}

.detail-isbn strong {
    font-family: var(--mono);
    font-size: 13px;
    color: var(--ink);
}

.copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 28px;
    padding: 0 8px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--paper);
    color: var(--muted);
    font-size: 10px;
}

.copy-btn:hover {
    border-color: var(--teal-3);
    color: var(--teal);
}

.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 24px;
}

.marc-actions {
    display: flex;
    flex: 0 1 auto;
    flex-wrap: wrap;
    gap: 9px;
}

.marc-actions .btn {
    flex: 0 0 auto;
    padding-inline: 20px;
}

#marc {
    scroll-margin-top: 96px;
}

.detail-download-note {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 12px;
    color: var(--muted);
    font-size: 11px;
}

.detail-body {
    padding-top: 44px;
}

.detail-body-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 304px;
    gap: 28px;
    align-items: start;
}

.detail-content {
    display: flex;
    flex-direction: column;
    gap: 22px;
    min-width: 0;
}

.record-card {
    padding: 28px 30px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--paper);
    box-shadow: var(--shadow-sm);
}

.record-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 17px;
    margin-bottom: 22px;
    border-bottom: 1px solid var(--line);
}

.record-card-head h2 {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 21px;
}

.record-card-head h2 .icon {
    color: var(--teal-3);
}

.record-head-note {
    font-family: var(--mono);
    font-size: 8.5px;
    letter-spacing: .1em;
    color: var(--muted-2);
    white-space: nowrap;
}

.meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    border-top: 1px solid #eee8dc;
    border-left: 1px solid #eee8dc;
}

.meta-grid > div {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 12px;
    padding: 12px 14px;
    border-right: 1px solid #eee8dc;
    border-bottom: 1px solid #eee8dc;
    font-size: 13px;
}

.meta-grid > div.span-2 {
    grid-column: span 2;
}

.meta-grid dt {
    color: var(--muted);
    font-size: 11.5px;
}

.meta-grid dd {
    color: var(--ink-2);
    line-height: 1.6;
}

.subject-block,
.summary-block {
    margin-top: 24px;
}

.subject-block h3,
.summary-block h3 {
    margin-bottom: 10px;
    font-family: var(--sans);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--muted);
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag {
    padding: 4px 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
    background: #faf7ef;
    color: var(--ink-3);
    font-size: 11px;
}

.summary-block p {
    color: var(--ink-3);
    font-size: 13.5px;
    line-height: 1.85;
}

/* MARC */
.marc-details {
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
}

.marc-details summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    cursor: pointer;
    list-style: none;
    background: #f9f6ee;
    transition: background .2s;
}

.marc-details summary::-webkit-details-marker {
    display: none;
}

.marc-details summary:hover {
    background: #f4efe3;
}

.marc-details summary span:first-child {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.marc-details summary strong {
    font-size: 12.5px;
    color: var(--ink);
}

.marc-details summary small {
    font-family: var(--mono);
    font-size: 8.5px;
    letter-spacing: .02em;
    color: var(--muted);
}

.details-chevron {
    display: grid;
    place-items: center;
    transition: transform .2s;
}

.marc-details[open] .details-chevron {
    transform: rotate(90deg);
}

.marc-table-wrap {
    overflow-x: auto;
    max-height: 460px;
    overflow-y: auto;
    border-top: 1px solid var(--line);
}

.marc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12.5px;
}

.marc-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 10px 12px;
    text-align: left;
    font-family: var(--sans);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    white-space: nowrap;
    color: var(--muted);
    background: #f4efe4;
    border-bottom: 1px solid var(--line);
}

.marc-table th:nth-child(3) {
    width: 76px;
}

.marc-table td {
    padding: 9px 12px;
    border-bottom: 1px solid #f0ebdf;
    vertical-align: top;
}

.marc-table tbody tr:hover {
    background: #fcfaf5;
}

.marc-tag {
    width: 54px;
    font-family: var(--mono);
    font-weight: 600;
    color: var(--teal-2);
}

.marc-label {
    width: 128px;
    color: var(--muted);
    font-size: 12px;
}

.marc-ind {
    width: 76px;
    min-width: 76px;
    font-family: var(--mono);
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    color: var(--muted-2);
    white-space: nowrap;
}

.marc-value {
    color: var(--ink-2);
    line-height: 1.75;
    word-break: break-word;
}

.sf-code {
    display: inline-block;
    margin: 0 4px 0 0;
    padding: 0 3px;
    border-radius: 3px;
    background: var(--sage-2);
    color: var(--teal-3);
    font-family: var(--mono);
    font-size: 9px;
    vertical-align: 1px;
}

.marc-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 16px;
    padding-top: 13px;
    border-top: 1px solid #eee8dc;
    color: var(--muted);
    font-size: 10.5px;
}

.marc-card-foot span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* Aside */
.detail-aside {
    display: flex;
    flex-direction: column;
    gap: 18px;
    position: sticky;
    top: 100px;
}

.side-card {
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--paper);
    box-shadow: var(--shadow-sm);
}

.side-title {
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--line);
    font-size: 17px;
}

.side-list {
    display: flex;
    flex-direction: column;
}

.side-list > div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
    padding: 6px 0;
    font-size: 11.5px;
}

.side-list dt {
    color: var(--muted);
    flex: 0 0 auto;
}

.side-list dd {
    text-align: right;
    color: var(--ink-2);
    min-width: 0;
    word-break: break-word;
}

.side-status {
    margin-top: 14px;
    padding-top: 13px;
    border-top: 1px solid var(--line);
}

.status-line {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 11px;
    font-weight: 600;
    color: var(--ink-3);
}

.side-status small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 10px;
}

.side-card--tip {
    background:
        radial-gradient(circle at 100% 0%, rgba(192, 154, 86, .16), transparent 50%),
        #fbf5e8;
    border-color: #e6d8bd;
}

.side-tip-icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    margin-bottom: 12px;
    border-radius: 9px;
    background: rgba(192, 154, 86, .16);
    color: #8f6c2c;
}

.side-card--tip h2,
.side-card--tip h3 {
    font-size: 18px;
    margin-bottom: 7px;
}

.side-card--tip p {
    color: #6e624c;
    font-size: 12px;
    line-height: 1.7;
    margin-bottom: 12px;
}

.related-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.related-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 6px;
    margin: 0 -6px;
    border-radius: 8px;
    transition: background .15s;
}

.related-item:hover {
    background: #f8f4ea;
}

.related-cover {
    width: 27px;
    height: 38px;
    flex: 0 0 auto;
    border-radius: 2px 4px 4px 2px;
    background: var(--cover-bg);
    box-shadow: 0 4px 8px -5px rgba(0, 0, 0, .35);
}

.related-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.related-copy strong {
    font-family: var(--serif);
    font-size: 12px;
    line-height: 1.4;
    color: var(--ink-2);
}

.related-copy small {
    color: var(--muted);
    font-size: 9.5px;
}

/* ---------- About ---------- */
.about-stats {
    display: flex;
    gap: 46px;
    margin-top: 30px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
}

.about-stats div {
    display: flex;
    flex-direction: column;
}

.about-stats strong {
    font-family: var(--serif);
    font-size: 28px;
    line-height: 1.2;
}

.about-stats span {
    color: var(--muted);
    font-size: 10.5px;
}

.about-section {
    padding-top: 48px;
}

.about-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 28px;
    align-items: start;
}

.about-main {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.prose-card {
    position: relative;
    padding: 30px 32px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--paper);
    box-shadow: var(--shadow-sm);
}

.prose-index {
    position: absolute;
    top: 26px;
    right: 28px;
    font-family: var(--mono);
    font-size: 10px;
    color: var(--rust);
}

.prose-card h2 {
    padding-bottom: 14px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--line);
    font-size: 25px;
}

.prose-card p {
    color: var(--ink-3);
    font-size: 13.5px;
    line-height: 1.85;
    margin-bottom: 12px;
}

.prose-card p:last-child {
    margin-bottom: 0;
}

.prose-card code {
    padding: 1px 5px;
    border-radius: 4px;
    background: var(--sage-2);
    color: var(--teal-2);
    font-family: var(--mono);
    font-size: .88em;
}

.code-example {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin: 18px 0;
}

.code-example > div {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 13px 15px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: #faf7ef;
}

.code-example span {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .08em;
    color: var(--muted);
}

.code-example code {
    background: transparent;
    padding: 0;
    font-size: 13px;
    color: var(--teal);
}

.marc-field-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    margin: 18px 0;
    border: 1px solid var(--line);
    background: var(--line);
    border-radius: 9px;
    overflow: hidden;
}

.marc-field-grid div {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 11px 12px;
    background: #fbf8f1;
}

.marc-field-grid code {
    padding: 0;
    background: transparent;
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 600;
    color: var(--rust);
}

.marc-field-grid span {
    font-size: 10.5px;
    color: var(--muted);
}

.flow-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 18px;
}

.flow-list li {
    display: flex;
    gap: 14px;
    padding: 13px 0;
    border-bottom: 1px solid #f0ebdf;
}

.flow-list li:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.flow-list li > span {
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--teal);
    color: var(--cream);
    font-family: var(--mono);
    font-size: 10px;
}

.flow-list strong {
    display: block;
    font-size: 13.5px;
    margin-bottom: 2px;
}

.flow-list p {
    margin: 0;
    font-size: 12px;
    line-height: 1.7;
}

.about-aside {
    display: flex;
    flex-direction: column;
    gap: 18px;
    position: sticky;
    top: 100px;
}

.side-card--status {
    background:
        radial-gradient(circle at 100% 0%, rgba(47, 119, 106, .1), transparent 55%),
        var(--paper);
}

.side-card--status h3 {
    margin: 14px 0 7px;
    font-size: 19px;
}

.side-card--status p {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.7;
}

.side-card h3 {
    font-size: 18px;
    margin-bottom: 12px;
}

.side-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid #f0ebdf;
    color: var(--ink-3);
    font-size: 12px;
}

.side-link:last-child {
    border-bottom: 0;
}

.side-link:hover {
    color: var(--rust);
}

.side-link .icon {
    color: var(--teal-3);
}

/* ---------- Error page ---------- */
.error-page {
    padding: 76px 0 96px;
}

.error-inner {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 20px;
    align-items: center;
    max-width: 900px;
}

.error-code-big {
    font-family: var(--serif);
    font-size: clamp(110px, 17vw, 210px);
    font-weight: 700;
    line-height: .85;
    letter-spacing: -.07em;
    color: rgba(18, 63, 59, .12);
    user-select: none;
}

.error-content h1 {
    font-size: clamp(32px, 4vw, 46px);
    margin-bottom: 12px;
}

.error-message {
    max-width: 550px;
    color: var(--ink-3);
    font-size: 15px;
    line-height: 1.8;
}

.error-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 24px;
}

.error-help {
    margin-top: 22px;
    color: var(--muted);
    font-size: 11.5px;
}

/* ---------- Footer ---------- */
.site-footer {
    margin-top: 0;
    padding: 60px 0 0;
    background: #142724;
    color: rgba(247, 242, 231, .72);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr .7fr .9fr;
    gap: 60px;
    padding-bottom: 44px;
}

.brand--footer {
    color: var(--cream);
}

.brand--footer .brand-mark {
    background: rgba(247, 242, 231, .07);
    border-color: rgba(247, 242, 231, .12);
    color: #d9c69d;
}

.brand--footer .brand-copy strong {
    color: var(--cream);
}

.brand--footer .brand-copy small {
    color: rgba(247, 242, 231, .4);
}

.footer-brand p {
    max-width: 380px;
    margin-top: 18px;
    color: rgba(247, 242, 231, .48);
    font-size: 12.5px;
    line-height: 1.8;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 6px;
}

.footer-col h3 {
    margin-bottom: 8px;
    color: rgba(247, 242, 231, .35);
    font-family: var(--sans);
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.footer-col a,
.footer-col p {
    color: rgba(247, 242, 231, .65);
    font-size: 12.5px;
}

.footer-col a:hover {
    color: var(--gold);
}

.footer-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    font-size: 10.5px;
    color: rgba(247, 242, 231, .5);
}

.footer-status .dot.is-online {
    background: #6cbf8a;
}

.footer-status .dot.is-offline {
    background: #d08a70;
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    padding: 18px 0;
    border-top: 1px solid rgba(247, 242, 231, .09);
    color: rgba(247, 242, 231, .3);
    font-size: 10.5px;
}

.footer-mono {
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: .08em;
}

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
    .book-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hero-grid {
        gap: 24px;
    }

    .hero-visual {
        min-height: 440px;
    }

    .catalog-card {
        width: 320px;
    }

    .floating-chip--marc {
        right: -2%;
    }
}

@media (max-width: 960px) {
    .container {
        width: min(100% - 40px, 760px);
    }

    .site-nav {
        gap: 18px;
    }

    .api-state {
        display: none;
    }

    .hero {
        padding: 36px 0 64px;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .hero-copy {
        max-width: none;
    }

    .hero-visual {
        min-height: 400px;
        order: 2;
    }

    .visual-ring {
        width: 360px;
        height: 360px;
    }

    .detail-grid {
        grid-template-columns: 210px minmax(0, 1fr);
        gap: 32px;
    }

    .detail-body-grid {
        grid-template-columns: 1fr;
    }

    .detail-aside {
        position: static;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .about-aside {
        position: static;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .about-aside .side-card--status {
        grid-column: span 2;
    }

    .footer-grid {
        grid-template-columns: 1.4fr .8fr;
        gap: 34px;
    }

    .footer-col:last-child {
        grid-column: span 2;
        padding-top: 12px;
        border-top: 1px solid rgba(247, 242, 231, .08);
    }

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

    .cta-panel {
        flex-direction: column;
        align-items: flex-start;
        padding: 42px 40px;
    }
}

@media (max-width: 760px) {
    .container {
        width: calc(100% - 32px);
    }

    .library-scene {
        opacity: .2;
    }

    .header-inner {
        min-height: 66px;
        gap: 12px;
    }

    .brand-mark {
        width: 36px;
        height: 36px;
    }

    .brand-mark svg {
        width: 30px;
        height: 30px;
    }

    .brand-copy strong {
        font-size: 18px;
    }

    .brand-copy small {
        font-size: 9.5px;
        letter-spacing: .1em;
    }

    .nav-toggle {
        display: grid;
    }

    .site-nav {
        position: absolute;
        left: 16px;
        right: 16px;
        top: calc(100% + 8px);
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        padding: 10px;
        border: 1px solid var(--line);
        border-radius: 12px;
        background: var(--paper);
        box-shadow: var(--shadow-md);
    }

    .site-nav.is-open {
        display: flex;
    }

    .site-nav > a:not(.nav-admin) {
        padding: 10px 12px;
        border-radius: 7px;
    }

    .site-nav > a.is-active {
        background: var(--sage-2);
    }

    .site-nav > a:not(.nav-admin)::after {
        display: none;
    }

    .nav-admin {
        margin-top: 4px;
        justify-content: center;
        padding: 10px 12px;
    }

    .hero {
        padding: 38px 0 48px;
    }

    .hero-title {
        font-family: var(--sans);
        font-size: clamp(34px, 9.6vw, 48px);
        font-weight: 800;
        font-synthesis: weight;
        letter-spacing: -.035em;
    }

    .hero-title em {
        font-family: inherit;
        font-weight: inherit;
    }

    h1,
    h2 {
        font-weight: 700;
    }

    .hero-title em {
        font-size: .9em;
        white-space: normal;
    }

    .collection-cta--wide {
        grid-column: auto;
    }

    .hero-lead {
        font-size: 14.5px;
    }

    .isbn-input-shell {
        flex-wrap: wrap;
        padding: 8px;
    }

    .isbn-prefix {
        width: 36px;
    }

    .isbn-input-shell input {
        width: calc(100% - 44px);
        flex: 1 1 calc(100% - 44px);
        height: 46px;
    }

    .isbn-submit {
        width: 100%;
        flex: 1 1 100%;
        margin-top: 2px;
    }

    .isbn-form-foot {
        flex-direction: column;
        gap: 8px;
    }

    .hero-proof {
        gap: 10px 14px;
        font-size: 10.5px;
    }

    .hero-stats {
        gap: 18px;
    }

    .hero-stat strong {
        font-size: 23px;
    }

    .hero-visual {
        min-height: 340px;
    }

    .catalog-card {
        width: 280px;
        padding: 20px;
    }

    .catalog-title {
        font-size: 19px;
    }

    .floating-chip {
        transform: scale(.9);
    }

    .floating-chip--marc {
        top: 4%;
    }

    .floating-chip--cache {
        bottom: 2%;
    }

    .section {
        padding: 58px 0;
    }

    .section-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .section-head--center {
        align-items: center;
    }

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

    .step-grid {
        grid-template-columns: 1fr;
        margin-top: 34px;
        border-top: 0;
    }

    .step-card,
    .step-card:not(:first-child) {
        padding: 25px 0;
        border-right: 0;
        border-top: 1px solid #d7c9b1;
    }

    .step-marker {
        margin-bottom: 18px;
    }

    .step-number {
        font-size: 48px;
    }

    .cta-panel {
        padding: 32px 24px;
    }

    .cta-actions {
        width: 100%;
    }

    .cta-actions .btn {
        flex: 1 1 auto;
    }

    .page-hero {
        padding: 30px 0 34px;
    }

    .page-hero-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .normalized-badge {
        text-align: left;
    }

    .result-error {
        flex-direction: column;
        padding: 26px;
        gap: 16px;
    }

    .result-summary {
        flex-direction: column;
        align-items: flex-start;
    }

    .result-list .book-card {
        grid-template-columns: 120px minmax(0, 1fr);
    }

    .detail-hero {
        padding: 26px 0 38px;
    }

    .detail-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .detail-cover-wrap {
        display: grid;
        grid-template-columns: 160px minmax(0, 1fr);
        gap: 18px;
        align-items: end;
    }

    .detail-cover {
        max-width: 160px;
    }

    .cover-caption {
        flex-direction: column;
        gap: 4px;
    }

    .detail-title {
        font-size: clamp(28px, 8vw, 38px);
    }

    .detail-actions .btn {
        flex: 1 1 auto;
    }

    .detail-actions .marc-actions .btn {
        flex: 0 0 auto;
    }

    .record-card {
        padding: 22px 18px;
    }

    .record-card-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }

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

    .meta-grid > div.span-2 {
        grid-column: auto;
    }

    .marc-label,
    .marc-ind {
        display: none;
    }

    .marc-table th:nth-child(2),
    .marc-table th:nth-child(3) {
        display: none;
    }

    .detail-aside,
    .about-aside {
        grid-template-columns: 1fr;
    }

    .about-aside .side-card--status {
        grid-column: auto;
    }

    .about-stats {
        gap: 26px;
    }

    .prose-card {
        padding: 24px 20px;
    }

    .marc-field-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .code-example {
        grid-template-columns: 1fr;
    }

    .error-page {
        padding: 46px 0 70px;
    }

    .error-inner {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .error-code-big {
        font-size: 110px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .footer-col:last-child {
        grid-column: auto;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .hero-stats {
        flex-wrap: wrap;
        row-gap: 14px;
    }

    .stat-divider {
        display: none;
    }

    .hero-stat {
        min-width: 28%;
    }

    .hero-live {
        justify-content: center;
        width: 100%;
        margin-left: 0;
    }

    .hero-visual {
        min-height: 310px;
    }

    .catalog-card {
        width: 250px;
        padding: 18px;
    }

    .catalog-title {
        font-size: 17px;
    }

    .catalog-meta {
        grid-template-columns: 1fr;
    }

    .floating-chip--marc {
        top: 0;
        right: 4px;
        transform: scale(.8);
        transform-origin: top right;
    }

    .floating-chip--cache {
        bottom: 0;
        left: 4px;
        transform: scale(.8);
        transform-origin: bottom left;
    }

    .visual-ring {
        width: 300px;
        height: 300px;
    }

    .book-card {
        grid-template-columns: 112px minmax(0, 1fr);
    }

    .detail-cover-wrap {
        grid-template-columns: 130px minmax(0, 1fr);
    }

    .detail-cover {
        padding: 18px;
    }

    .detail-cover .cover-title {
        font-size: 16px;
    }
}
