:root {
  --paper:#f5f0e7; --panel:#fffdf8; --subtle:#eee9df; --ink:#1d2825; --muted:#66706c;
  --line:#d7d2c7; --accent:#c64e30; --accent-dark:#9f351f; --success:#1e6b55;
  --warning:#9a6816; --danger:#a8372c; --focus:#2079a8; --radius:.75rem;
  --shadow:0 10px 30px rgba(40,37,31,.07);
}
* { box-sizing:border-box; }
html { font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; color:var(--ink); background:var(--paper); }
body { min-width:0; min-height:100vh; margin:0; background:radial-gradient(circle at 82% 4%,rgba(242,207,112,.25),transparent 25rem),var(--paper); }
a { color:inherit; }
button,input { font:inherit; }
.site-header { min-height:72px; display:flex; align-items:center; justify-content:space-between; gap:2rem; padding:0 5vw; border-bottom:1px solid var(--line); background:rgba(245,240,231,.96); }
.brand { flex:0 0 auto; font-weight:800; letter-spacing:-.02em; text-decoration:none; }
.top-nav { display:flex; align-items:center; justify-content:flex-end; flex-wrap:wrap; gap:.25rem .55rem; margin-left:auto; }
.nav-link { min-height:44px; display:inline-flex; align-items:center; padding:.45rem .6rem; border:0; border-radius:.5rem; background:transparent; color:var(--muted); font-size:.84rem; font-weight:700; text-decoration:none; cursor:pointer; }
.nav-link:hover { background:var(--subtle); color:var(--ink); }
.nav-link.active { position:relative; color:var(--ink); font-weight:850; }
.nav-link.active::after { position:absolute; right:.55rem; bottom:3px; left:.55rem; height:3px; border-radius:99px; background:var(--accent); content:""; }
.nav-button { appearance:none; }
.language-menu { position:relative; }
.language-popover { position:absolute; z-index:20; top:calc(100% + .35rem); right:0; width:190px; padding:.45rem; border:1px solid var(--line); border-radius:.65rem; background:var(--panel); box-shadow:0 14px 34px rgba(40,37,31,.13); }
.language-popover[hidden] { display:none; }
.language-option { width:100%; min-height:40px; display:grid; grid-template-columns:20px 1fr; align-items:center; gap:.5rem; padding:.45rem .55rem; border:0; border-radius:.45rem; background:transparent; color:var(--ink); text-align:left; cursor:pointer; }
.language-option:hover { background:var(--subtle); }
.language-option.current { font-weight:800; }
.language-option .check { color:var(--accent-dark); font-weight:900; }
.logout { color:var(--danger); }
:where(a,button,input,select,summary):focus-visible { outline:3px solid var(--focus); outline-offset:3px; }
.page-shell { width:min(1180px,90vw); margin:0 auto; padding:4rem 0 5rem; }
.intro { margin-bottom:2rem; }
.hero-intro { display:grid; grid-template-columns:minmax(0,1fr) minmax(240px,320px); gap:clamp(2rem,5vw,4rem); align-items:end; margin-bottom:3rem; }
.hero-copy { min-width:0; }
.hero-intro h1 { max-width:820px; overflow-wrap:anywhere; font-size:clamp(2.7rem,5.8vw,5rem); }
.hero-intro .lede { max-width:680px; font-size:1.02rem; }
.flow { margin:0; padding:0; list-style:none; border-top:1px solid var(--ink); }
.flow li { display:grid; grid-template-columns:42px 1fr; gap:.7rem; padding:.82rem 0; border-bottom:1px solid var(--line); }
.flow b { color:var(--accent); font-size:.74rem; }
.flow span { font-weight:750; }
.eyebrow { margin:0 0 .65rem; color:var(--accent-dark); font-size:.72rem; font-weight:850; letter-spacing:.14em; }
h1,h2,h3,p { margin-top:0; }
h1 { margin-bottom:.5rem; font-family:Georgia,serif; font-size:clamp(2.5rem,6vw,4.5rem); line-height:1; letter-spacing:-.05em; font-weight:500; }
h2 { margin-bottom:1.2rem; font-family:Georgia,serif; font-size:2rem; letter-spacing:-.03em; font-weight:500; }
h3 { margin-bottom:.35rem; font-size:1.05rem; }
.lede { margin-bottom:0; color:var(--muted); line-height:1.6; }
.home-grid { display:grid; grid-template-columns:minmax(0,1.12fr) minmax(310px,.88fr); gap:1.25rem; align-items:start; margin-bottom:3rem; }
.panel { min-width:0; padding:clamp(1.4rem,3vw,2.2rem); border:1px solid var(--line); border-top:3px solid var(--accent); border-radius:var(--radius); background:var(--panel); box-shadow:var(--shadow); }.section-heading { display:flex; align-items:center; justify-content:space-between; gap:1rem; }
.section-heading h2 { margin-bottom:.5rem; }
.count { display:grid; place-items:center; min-width:34px; height:34px; padding:0 .6rem; border:1px solid var(--line); border-radius:99px; font-weight:800; }
.catalog-list,.delivery-list { border-top:1px solid var(--line); }
.catalog-row { min-width:0; display:flex; align-items:center; justify-content:space-between; gap:1rem; padding:1.15rem 0; border-bottom:1px solid var(--line); }
.catalog-summary { min-width:0; flex:1 1 auto; }
.catalog-summary h3 a { text-decoration:none; }
.catalog-summary h3 a:hover { text-decoration:underline; text-underline-offset:4px; }
.catalog-summary p { max-width:100%; margin-bottom:.5rem; overflow:hidden; color:var(--muted); font-size:.83rem; text-overflow:ellipsis; white-space:nowrap; }
.stack-form { display:grid; gap:1rem; }
.form-grid { display:grid; grid-template-columns:1fr 1fr; gap:.8rem; }
label { min-width:0; display:grid; gap:.4rem; font-size:.81rem; font-weight:800; }
label span { color:var(--muted); font-weight:500; }
input { width:100%; min-width:0; min-height:45px; padding:.68rem .78rem; border:1px solid #bdb8ad; border-radius:.5rem; background:#fffefa; color:#17201e; }
.field-note { margin:-.2rem 0 .2rem; color:var(--muted); font-size:.75rem; line-height:1.5; }
.button { min-height:44px; display:inline-flex; align-items:center; justify-content:center; padding:.65rem 1rem; border:1px solid var(--ink); border-radius:.5rem; background:transparent; color:var(--ink); cursor:pointer; font-size:.82rem; font-weight:800; transition:background-color .15s,border-color .15s,color .15s; }
.button:hover { background:var(--subtle); }
.button-primary { border-color:var(--accent); background:var(--accent); color:white; }
.button-primary:hover { background:var(--accent-dark); }
.button-quiet { border-color:transparent; color:var(--muted); }
.button-quiet:hover { border-color:var(--line); background:var(--panel); color:var(--ink); }
.badge { max-width:100%; display:inline-flex; align-items:center; gap:.4rem; padding:.32rem .62rem; border-radius:99px; background:var(--subtle); font-size:.72rem; font-weight:800; }
.badge::before { width:.48rem; height:.48rem; flex:0 0 auto; border-radius:50%; background:currentColor; content:""; }
.badge.success { color:var(--success); }
.badge.active { color:var(--accent-dark); }
.badge.warning { color:var(--warning); }
.delivery-history { margin:3rem 0; }
.delivery-row { min-width:0; display:grid; grid-template-columns:minmax(0,1fr) auto auto; align-items:center; gap:1rem; padding:1rem 0; border-bottom:1px solid var(--line); }
.delivery-state { display:inline-block; max-width:100%; margin:.15rem .2rem .15rem 0; padding:0; border:0; color:var(--muted); background:transparent; font-size:.68rem; font-weight:750; text-transform:uppercase; letter-spacing:.04em; overflow-wrap:anywhere; }
.book-title { min-width:0; overflow-wrap:anywhere; font-weight:750; text-decoration:none; }
.book-title:hover { text-decoration:underline; text-underline-offset:4px; }
.detail-link { color:var(--ink); font-size:.82rem; font-weight:700; text-decoration:none; }
.detail-link:hover { color:var(--ink); text-decoration:underline; text-underline-offset:4px; }
.connection-setup-callout { min-width:0; display:flex; align-items:center; justify-content:space-between; gap:1rem; margin-top:1.25rem; padding:.9rem 1rem; border-left:3px solid var(--accent); background:rgba(198,78,48,.06); }
.connection-setup-callout div { min-width:0; }
.connection-setup-callout strong,.connection-setup-callout p,.connection-setup-callout a { overflow-wrap:anywhere; }
.connection-setup-callout p { margin:.2rem 0 0; color:var(--muted); font-size:.78rem; line-height:1.5; }
.connection-setup-callout a { flex:0 0 auto; color:var(--ink); font-size:.82rem; font-weight:750; text-decoration:none; }
.connection-setup-callout a:hover { color:var(--accent-dark); text-decoration:underline; text-underline-offset:4px; }
.status-dot { width:11px; height:11px; border-radius:50%; background:#65c4a2; box-shadow:0 0 0 4px rgba(101,196,162,.13); }
footer { padding:1.25rem 5vw; border-top:1px solid var(--line); color:var(--muted); font-size:.75rem; }
@media (max-width:900px) {
  .site-header { align-items:flex-start; flex-direction:column; gap:.35rem; padding-top:.8rem; padding-bottom:.7rem; }
  .top-nav { width:100%; justify-content:flex-start; margin-left:0; }
  .page-shell { width:min(94vw,700px); padding-top:2.5rem; }
  .hero-intro { grid-template-columns:1fr; gap:1.5rem; }
  .flow { max-width:420px; }
  .language-popover { right:auto; left:0; }
  .home-grid { grid-template-columns:1fr; }
}
@media (max-width:540px) {
  .site-header { padding-right:3vw; padding-left:3vw; }
  .top-nav { gap:.15rem .2rem; }
  .nav-link { min-height:40px; padding:.4rem .45rem; font-size:.76rem; }
  .form-grid { grid-template-columns:1fr; }
  .catalog-row { align-items:stretch; flex-direction:column; }
  .catalog-row .button { align-self:flex-start; }
  .delivery-row { align-items:flex-start; grid-template-columns:1fr auto; }
  .detail-link { grid-column:1 / -1; min-height:40px; display:inline-flex; align-items:center; }
  .connection-setup-callout { align-items:flex-start; flex-direction:column; }
  .connection-setup-callout a { min-height:40px; display:inline-flex; align-items:center; }
}
@media (max-width:360px) {
  .brand { font-size:.94rem; }
  .nav-link { padding-right:.36rem; padding-left:.36rem; font-size:.72rem; }
}
@media (prefers-reduced-motion:reduce) {
  * { transition-duration:.01ms !important; }
}
/* Deliveries reference page */
.deliveries-page { padding-top:3.5rem; }
.deliveries-intro { max-width:760px; margin-bottom:2.5rem; }
.deliveries-intro h1 { margin-bottom:.65rem; }
.auto-refresh-note { margin:.75rem 0 0; color:var(--muted); font-size:.78rem; }
.deliveries-tools { display:grid; grid-template-columns:minmax(0,1fr) 230px auto; gap:1rem; align-items:end; margin-bottom:3rem; padding-bottom:1.4rem; border-bottom:1px solid var(--line); }
.deliveries-tools label { color:var(--muted); }
.deliveries-tools input,
.deliveries-tools select { width:100%; min-height:44px; padding:.66rem .76rem; border:1px solid #bdb8ad; border-radius:.5rem; background:#fffefa; color:var(--ink); font:inherit; }
.all-deliveries { margin-top:.5rem; }
.deliveries-heading { margin-bottom:.75rem; }
.deliveries-list { border-top:1px solid var(--line); }
.delivery-record { min-width:0; display:grid; grid-template-columns:minmax(0,1.5fr) minmax(180px,.72fr) minmax(150px,.75fr) auto; align-items:center; gap:1rem; padding:1.05rem 0; border-bottom:1px solid var(--line); }
.delivery-book { min-width:0; display:grid; gap:.28rem; }
.delivery-book > span { color:var(--muted); font-size:.74rem; }
.delivery-destination { min-width:0; overflow:hidden; color:var(--muted); font-size:.82rem; font-weight:500; text-overflow:ellipsis; white-space:nowrap; }
.pagination { display:flex; justify-content:flex-end; align-items:center; gap:.35rem; margin-top:1.5rem; }
.page-button,.page-current { min-width:40px; min-height:40px; display:inline-grid; place-items:center; padding:.4rem .65rem; border:0; border-radius:.45rem; background:transparent; color:var(--muted); font:inherit; font-size:.8rem; font-weight:750; }
.page-button { cursor:pointer; }
.page-button:hover { background:var(--subtle); color:var(--ink); }
.page-button:disabled { opacity:.45; cursor:default; }
.page-current { background:var(--ink); color:white; }
@media (max-width:820px) {
  .deliveries-tools { grid-template-columns:1fr; }
  .delivery-record { grid-template-columns:minmax(0,1fr) auto; align-items:start; }
  .delivery-destination { grid-column:1; }
  .delivery-state { grid-column:2; grid-row:1 / span 2; align-self:center; text-align:right; }
  .delivery-record .detail-link { grid-column:1 / -1; min-height:40px; display:inline-flex; align-items:center; }
}
@media (max-width:540px) {
  .deliveries-page { padding-top:2.5rem; }
  .deliveries-tools { margin-bottom:2.2rem; }
  .delivery-record { grid-template-columns:1fr; gap:.45rem; padding:1.15rem 0; }
  .delivery-destination,.delivery-state,.delivery-record .detail-link { grid-column:1; grid-row:auto; text-align:left; }
  .pagination { justify-content:flex-start; flex-wrap:wrap; }
}

/* Real application shell and approved brand asset. */
body { display:flex; flex-direction:column; }
.page-shell { flex:1 0 auto; }
.site-header { flex-wrap:wrap; }
.header-actions { min-width:0; margin-left:auto; }
.brand img { display:block; width:auto; max-width:min(316px,34vw); height:auto; max-height:59px; }
.logout-form { margin:0; }
select { width:100%; min-width:0; min-height:45px; padding:.68rem .78rem; border:1px solid #bdb8ad; border-radius:.5rem; background:#fffefa; color:#17201e; font:inherit; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.notices { display:grid; gap:.6rem; margin-bottom:1.4rem; }
.notice { min-width:0; display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:.75rem; padding:.65rem .75rem .65rem 1rem; border-left:4px solid var(--muted); border-radius:.35rem; background:var(--subtle); line-height:1.5; }
.notice-message { min-width:0; overflow-wrap:anywhere; }
.notice-dismiss { width:40px; height:40px; display:grid; place-items:center; padding:0; border:0; border-radius:.35rem; background:transparent; color:var(--muted); cursor:pointer; font:inherit; font-size:1.1rem; line-height:1; }
.notice-dismiss:hover { background:rgba(29,40,37,.07); color:var(--ink); }
.notice-success { border-color:var(--success); background:rgba(30,107,85,.08); }
.notice-info { border-color:var(--focus); background:rgba(32,121,168,.08); }
.notice-error { border-color:var(--danger); background:rgba(168,55,44,.08); }
.notice-warning { border-color:var(--warning); background:rgba(154,104,22,.08); }
.empty-state { padding:2.5rem 1rem; border:1px dashed var(--line); border-radius:.6rem; text-align:center; color:var(--muted); }
.empty-state p { margin-bottom:.25rem; color:var(--ink); font-family:Georgia,serif; font-size:1.35rem; }
.compact-empty { padding:1.4rem 1rem; }
.source-unavailable,.source-unavailable-note,.delivery-book small { display:block; margin-top:.25rem; color:var(--muted); font-size:.72rem; line-height:1.4; }
.book-title-static { min-width:0; overflow-wrap:anywhere; font-weight:750; }
.address-advisory,.setup-callout { margin:1rem 0 0; padding:.9rem 1rem; border-left:3px solid var(--warning); background:rgba(154,104,22,.06); }
.address-advisory p,.setup-callout p { margin:.3rem 0 0; color:var(--muted); font-size:.78rem; line-height:1.55; }
.connection-error { border-left-color:var(--danger); background:rgba(168,55,44,.06); }
.button-danger { border-color:var(--danger); color:var(--danger); }
.button-danger:hover { background:var(--danger); color:white; }

/* Approved delivery status composition. */
.status-page { max-width:980px; padding-top:3.2rem; }
.back-link { display:inline-flex; margin-bottom:2.2rem; color:var(--muted); font-size:.82rem; font-weight:700; text-decoration:none; }
.back-link:hover { color:var(--ink); text-decoration:underline; text-underline-offset:4px; }
.status-intro { margin-bottom:1.5rem; }
.status-intro h1 { max-width:820px; font-size:clamp(2.6rem,5.4vw,4.6rem); overflow-wrap:anywhere; }
.status-summary { margin:0 0 2.6rem; padding:1.5rem 1.6rem; border-left:4px solid var(--success); background:rgba(30,107,85,.06); }
.status-kicker { margin:0 0 .5rem; color:var(--success); font-size:.74rem; font-weight:850; letter-spacing:.1em; }
.status-explanation { max-width:760px; margin:0; color:var(--ink); line-height:1.6; }
.delivery-progress { display:grid; grid-template-columns:auto 1fr auto 1fr auto; align-items:center; gap:.9rem; margin:0 0 2rem; }
.progress-step { display:grid; grid-template-columns:30px 1fr; align-items:center; gap:.7rem; min-width:0; }
.progress-step > div { display:grid; gap:.2rem; }
.progress-step strong { font-size:.84rem; }
.progress-step span:not(.progress-mark) { color:var(--muted); font-size:.72rem; line-height:1.35; }
.progress-mark { width:30px; height:30px; display:grid; place-items:center; border:1px solid var(--line); border-radius:50%; font-size:.76rem; font-weight:900; }
.progress-step.complete .progress-mark { border-color:var(--success); background:var(--success); color:white; }
.progress-line { height:1px; min-width:28px; background:var(--line); }
.progress-line.complete { background:var(--success); }
.status-details { margin:2.6rem 0 1.8rem; }
.status-facts,.technical-facts { margin:0; border-top:1px solid var(--line); }
.status-facts > div,.technical-facts > div { display:grid; grid-template-columns:180px minmax(0,1fr); gap:1rem; padding:.9rem 0; border-bottom:1px solid var(--line); }
.status-facts dt,.technical-facts dt { color:var(--muted); font-size:.76rem; font-weight:750; }
.status-facts dd,.technical-facts dd { min-width:0; margin:0; overflow-wrap:anywhere; font-size:.84rem; }
.status-facts a { font-weight:750; text-decoration:none; }
.status-facts a:hover { text-decoration:underline; text-underline-offset:4px; }
.technical-details { margin:0 0 2.4rem; padding:1rem 0; border-top:1px solid var(--line); border-bottom:1px solid var(--line); }
.technical-details summary { cursor:pointer; color:var(--muted); font-size:.82rem; font-weight:750; }
.technical-details[open] summary { margin-bottom:1rem; color:var(--ink); }
.technical-facts > div { padding:.7rem 0; }
.technical-facts > div:last-child { border-bottom:0; }
.status-actions,.live-status-actions { display:flex; align-items:center; justify-content:space-between; gap:1rem; flex-wrap:wrap; }
.status-action-group { display:flex; align-items:center; gap:.75rem; flex-wrap:wrap; }
.status-action-group form { margin:0; }
.live-status-actions { margin-bottom:1.2rem; }
.status-failure { border-left-color:var(--danger); background:rgba(168,55,44,.06); }
.status-failure .status-kicker { color:var(--danger); }
.status-unknown { border-left-color:var(--warning); background:rgba(154,104,22,.07); }
.status-unknown .status-kicker { color:var(--warning); }
.status-active { border-left-color:var(--accent); background:rgba(198,78,48,.06); }
.status-active .status-kicker { color:var(--accent-dark); }
.progress-step.failed .progress-mark { border-color:var(--danger); background:var(--danger); color:white; }
.progress-step.unknown .progress-mark { border-color:var(--warning); background:var(--warning); color:white; }
.progress-step.pending { opacity:.62; }
.progress-line.uncertain { background:linear-gradient(90deg,var(--success),var(--warning)); }

/* Approved Connections hierarchy. */
.connections-page { max-width:980px; padding-top:3.5rem; }
.connections-intro { max-width:760px; margin-bottom:2rem; }
.connections-intro h1 { margin-bottom:.65rem; }
.connection-summary { display:grid; grid-template-columns:34px 1fr; gap:.9rem; align-items:start; margin-bottom:2.2rem; padding:1rem 0 1.15rem; border-bottom:1px solid var(--line); }
.connection-summary-mark { width:30px; height:30px; display:grid; place-items:center; border-radius:50%; background:var(--success); color:white; font-size:.78rem; font-weight:900; }
.connection-summary-title { margin:0 0 .25rem; font-size:.84rem; font-weight:850; }
.connection-summary p:last-child { margin:0; color:var(--muted); font-size:.82rem; line-height:1.5; overflow-wrap:anywhere; }
.destination-connection { margin-bottom:3rem; }
.connection-section-heading { margin-bottom:1rem; }
.connection-copy { max-width:720px; color:var(--muted); font-size:.84rem; line-height:1.6; }
.destination-connection-form { display:grid; gap:.45rem; margin-top:1.2rem; }
.destination-input-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:.7rem; }
.connection-note { margin:.7rem 0 0; }
.connection-methods { margin-bottom:3rem; }
.provider-panel { margin-bottom:1rem; border-top:3px solid var(--line); }
.provider-active { border-top-color:var(--success); }
.provider-topline { display:flex; align-items:flex-start; justify-content:space-between; gap:1rem; }
.provider-topline h3 { margin:0; font-family:Georgia,serif; font-size:1.55rem; font-weight:500; letter-spacing:-.02em; }
.connection-state { display:inline-flex; align-items:center; min-height:30px; padding:.25rem .62rem; border:1px solid var(--line); border-radius:99px; color:var(--muted); font-size:.7rem; font-weight:800; }
.connection-state.ready { border-color:rgba(30,107,85,.3); color:var(--success); background:rgba(30,107,85,.06); }
.provider-identity { display:grid; gap:.2rem; margin:1.2rem 0; padding:1rem 0; border-top:1px solid var(--line); border-bottom:1px solid var(--line); overflow-wrap:anywhere; }
.provider-identity span { color:var(--muted); font-size:.72rem; font-weight:750; }
.provider-actions { display:flex; align-items:center; justify-content:space-between; gap:1rem; }
.active-provider-note { display:inline-flex; align-items:center; gap:.55rem; color:var(--success); font-size:.78rem; font-weight:750; }
.provider-privacy { margin:1rem 0 0; }
.smtp-connection { padding:0; overflow:hidden; border-top:1px solid var(--line); }
.smtp-connection summary { display:flex; align-items:center; justify-content:space-between; gap:1rem; padding:1.25rem 1.4rem; cursor:pointer; list-style:none; }
.smtp-connection summary::-webkit-details-marker { display:none; }
.smtp-connection summary > span:first-child { display:grid; gap:.25rem; }
.smtp-connection summary b { font-size:.9rem; }
.smtp-connection summary small { color:var(--muted); font-size:.75rem; font-weight:500; }
.smtp-connection[open] summary { border-bottom:1px solid var(--line); }
.smtp-preview-body { display:grid; gap:1rem; padding:1.4rem; }
.smtp-actions { display:flex; justify-content:flex-end; gap:.7rem; flex-wrap:wrap; margin-top:.25rem; }
.kindle-help { padding-top:.5rem; border-top:1px solid var(--line); }
.kindle-help h2 { margin-bottom:1rem; }
.kindle-help-grid { display:grid; grid-template-columns:1fr 1fr; gap:1.5rem; }
.kindle-help-grid p { margin:0; color:var(--muted); font-size:.82rem; line-height:1.6; }
.kindle-help-grid b { color:var(--accent-dark); }

/* Remaining approved user-facing screens. */
.auth-preview-page,.catalog-login-page,.result-page,.error-page { max-width:760px; padding-top:3.5rem; }
.auth-preview-intro,.compact-intro { max-width:660px; margin-bottom:2rem; }
.auth-preview-intro h1,.compact-intro h1 { margin-bottom:.65rem; }
.auth-preview-card { max-width:620px; }
.auth-preview-form { display:grid; gap:.85rem; }
.auth-preview-submit { justify-self:start; margin-top:.25rem; }
.login-note { max-width:620px; margin-top:1.2rem; padding-top:1rem; border-top:1px solid var(--line); color:var(--muted); font-size:.78rem; line-height:1.55; }
.login-header-actions { margin-left:auto; display:flex; align-items:center; gap:.25rem; }
.context-links { display:flex; align-items:center; gap:1rem; flex-wrap:wrap; margin-bottom:1.5rem; }
.context-links a { min-width:0; max-width:100%; color:var(--muted); font-size:.8rem; font-weight:750; overflow-wrap:anywhere; text-decoration:none; }
.context-links a:hover { color:var(--ink); text-decoration:underline; text-underline-offset:4px; }
.catalog-page { padding-top:3rem; }
.catalog-head { display:grid; grid-template-columns:minmax(0,1fr) minmax(280px,390px); gap:2rem; align-items:end; margin-bottom:2.5rem; }
.catalog-head h1 { max-width:760px; font-size:clamp(2.6rem,5vw,4.5rem); overflow-wrap:anywhere; }
.catalog-search { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:.6rem; }
.category-section { margin-bottom:3rem; }
.category-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:.75rem; }
.category-card { min-height:92px; display:grid; align-content:space-between; gap:.7rem; padding:1rem; border:1px solid var(--line); border-radius:.65rem; background:var(--panel); text-decoration:none; }
.category-card:hover { border-color:#bcb6aa; box-shadow:var(--shadow); }
.category-card strong { font-size:.88rem; overflow-wrap:anywhere; }
.category-card span { color:var(--muted); font-size:.75rem; line-height:1.4; }
.book-grid-preview { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:1rem; }
.book-card-preview { min-width:0; display:grid; grid-template-columns:108px minmax(0,1fr); align-items:start; gap:1rem; padding:1rem; border:1px solid var(--line); border-radius:.7rem; background:var(--panel); }
.cover-wrap { overflow:hidden; background:var(--subtle); }
.cover-wrap img { width:100%; height:100%; display:block; object-fit:cover; }
.cover-preview { width:108px; aspect-ratio:2/3; align-self:start; border-radius:.35rem; }
.cover-preview img { object-fit:contain; }
.cover-placeholder-preview { width:100%; height:100%; display:grid; place-items:center; background:linear-gradient(145deg,#d9c8aa,#8f6f52); color:#fffdf8; font-family:Georgia,serif; font-size:2.4rem; }
.book-card-copy { min-width:0; display:flex; flex-direction:column; justify-content:space-between; gap:1rem; }
.book-card-copy h3 { margin:0 0 .2rem; font-family:Georgia,serif; font-size:1.25rem; font-weight:500; overflow-wrap:anywhere; }
.book-author,.book-description { margin:0; color:var(--muted); font-size:.76rem; line-height:1.45; overflow-wrap:anywhere; }
.book-description { margin-top:.55rem; display:-webkit-box; overflow:hidden; -webkit-line-clamp:3; -webkit-box-orient:vertical; }
.book-actions { display:grid; gap:.55rem; }
.format-line { display:flex; align-items:center; gap:.35rem; color:var(--muted); font-size:.73rem; }
.format-line strong { color:var(--ink); }
.book-actions .button { width:100%; }
.catalog-page-count { flex:0 0 auto; color:var(--muted); font-size:.78rem; font-weight:750; white-space:nowrap; }
.catalog-pagination-preview { display:flex; align-items:center; justify-content:space-between; gap:.75rem; margin-top:1.5rem; }
.catalog-page-control { min-height:44px; display:inline-flex; align-items:center; padding:.55rem .35rem; border:0; border-radius:0; background:transparent; color:var(--ink); font-size:.8rem; font-weight:750; text-decoration:none; }
.catalog-page-control:hover { color:var(--accent-dark); text-decoration:underline; text-underline-offset:4px; }
.catalog-page-control[aria-disabled="true"] { color:var(--muted); cursor:default; opacity:.55; }
.book-page { max-width:1040px; padding-top:3rem; }
.book-detail-grid { display:grid; grid-template-columns:260px minmax(0,1fr); gap:clamp(2rem,5vw,4rem); align-items:start; }
.book-cover-large { aspect-ratio:2/3; display:grid; place-items:center; border-radius:.55rem; background:linear-gradient(145deg,#baa889,#65513f); box-shadow:var(--shadow); color:white; font-family:Georgia,serif; font-size:5rem; }
.book-copy h1 { max-width:700px; font-size:clamp(2.7rem,5vw,4.6rem); overflow-wrap:anywhere; }
.book-detail-author { margin:.5rem 0 1.3rem; color:var(--muted); font-size:1rem; overflow-wrap:anywhere; }
.metadata-grid { display:flex; gap:1.4rem; flex-wrap:wrap; margin:0 0 1.4rem; padding:0 0 1rem; border-bottom:1px solid var(--line); }
.metadata-grid div { display:grid; gap:.15rem; }
.metadata-grid dt { color:var(--muted); font-size:.7rem; font-weight:800; text-transform:uppercase; letter-spacing:.08em; }
.metadata-grid dd { margin:0; font-size:.82rem; overflow-wrap:anywhere; }
.book-long-description { max-width:720px; color:#3c4743; line-height:1.7; overflow-wrap:anywhere; white-space:pre-line; }
.delivery-box { max-width:720px; margin-top:1.6rem; padding:1.2rem 1.3rem; border:1px solid var(--line); border-top:3px solid var(--accent); border-radius:.65rem; background:var(--panel); }
.delivery-box-title { margin:0 0 .8rem; font-size:.84rem; font-weight:850; }
.delivery-choice,.delivery-options { display:grid; gap:.55rem; margin:0 0 1rem; padding:0; border:0; }
.delivery-choice-option,.format-option { display:grid; grid-template-columns:auto minmax(0,1fr); gap:.2rem .65rem; align-items:start; padding:.65rem 0; border:0; border-bottom:1px solid var(--line); cursor:pointer; }
.delivery-choice-option:last-child,.format-option:last-child { border-bottom:0; }
.delivery-choice-option input,.format-option input { width:auto; min-height:0; margin-top:.15rem; accent-color:var(--accent); }
.delivery-choice-option strong,.format-option strong { display:block; color:var(--ink); font-size:.82rem; }
.delivery-choice-option span,.format-option-copy,.conversion-note,.unsupported-format { color:var(--muted); font-size:.73rem; line-height:1.4; }
.format-option-copy { min-width:0; overflow-wrap:anywhere; }
.format-option > .conversion-note { grid-column:2; }
.catalog-login-identity { margin:1rem 0; padding:.85rem 0; border-top:1px solid var(--line); border-bottom:1px solid var(--line); overflow-wrap:anywhere; }
.catalog-login-identity span { display:block; color:var(--muted); font-size:.72rem; font-weight:750; }
.catalog-login-identity strong { font-size:.88rem; }
.result-card,.error-card { max-width:680px; }
.result-mark { width:42px; height:42px; display:grid; place-items:center; margin-bottom:1rem; border-radius:50%; background:var(--success); color:white; font-weight:900; }
.result-mark.failure { background:var(--danger); }
.result-card h1,.error-card h1 { font-size:clamp(2.4rem,5vw,4rem); }
.result-actions,.error-actions-preview { display:flex; gap:.7rem; flex-wrap:wrap; margin-top:1.4rem; }
.result-context,.error-message { max-width:600px; color:var(--muted); line-height:1.6; }
.error-code { margin:0 0 .65rem; color:var(--accent-dark); font-size:.78rem; font-weight:900; letter-spacing:.12em; }

/* Approved change-password reference. */
.password-page { max-width:760px; padding-top:3.5rem; }
.password-intro { max-width:680px; margin-bottom:2rem; }
.password-intro h1 { margin-bottom:.65rem; }
.password-panel { max-width:680px; }
.password-form { display:grid; gap:.8rem; }
.password-field { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:.55rem; }
.password-field input { min-width:0; }
.password-toggle { min-height:45px; padding:.55rem .75rem; border:1px solid var(--line); border-radius:.5rem; background:transparent; color:var(--muted); font:inherit; font-size:.78rem; font-weight:750; cursor:pointer; }
.password-toggle:hover { background:var(--subtle); color:var(--ink); }
.password-rule { display:grid; gap:.25rem; margin:.2rem 0 .25rem; padding:.9rem 1rem; border-left:3px solid var(--accent); background:rgba(198,78,48,.05); }
.password-rule strong { font-size:.82rem; }
.password-rule span { color:var(--muted); font-size:.76rem; line-height:1.5; }
.password-submit { justify-self:start; margin-top:.35rem; }
.password-session-note { display:grid; grid-template-columns:34px 1fr; gap:.9rem; align-items:start; max-width:680px; margin-top:1.5rem; padding:1.1rem 0 0; border-top:1px solid var(--line); }
.password-session-mark { width:30px; height:30px; display:grid; place-items:center; border-radius:50%; background:var(--ink); color:white; font-size:.75rem; font-weight:900; }
.password-session-title { margin:0 0 .2rem; font-size:.82rem; font-weight:850; }
.password-session-note p:last-child { margin:0; color:var(--muted); font-size:.78rem; line-height:1.55; }

@media (max-width:900px) {
  .brand img { max-width:min(280px,72vw); }
  .catalog-head { grid-template-columns:1fr; align-items:start; }
  .catalog-search { max-width:560px; }
  .category-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .book-grid-preview { grid-template-columns:1fr; }
}
@media (max-width:820px) {
  .delivery-filter-submit { justify-self:start; }
}
@media (max-width:760px) {
  .delivery-progress { grid-template-columns:1fr; gap:.5rem; }
  .progress-line { width:1px; height:22px; margin-left:15px; }
  .status-facts > div,.technical-facts > div { grid-template-columns:1fr; gap:.25rem; }
  .status-actions { align-items:flex-start; flex-direction:column-reverse; }
}
@media (max-width:700px) {
  .destination-input-row { grid-template-columns:1fr; }
  .destination-input-row .button { justify-self:start; }
  .kindle-help-grid { grid-template-columns:1fr; gap:.8rem; }
  .provider-actions { align-items:flex-start; flex-direction:column; }
  .book-detail-grid { grid-template-columns:1fr; }
  .book-cover-large { width:min(240px,70vw); }
}
@media (max-width:540px) {
  .brand img { max-width:min(230px,86vw); max-height:50px; }
  .header-actions { width:100%; margin-left:0; }
  .auth-preview-page,.catalog-login-page,.result-page,.error-page,.catalog-page,.book-page,.password-page,.connections-page { padding-top:2.5rem; }
  .auth-preview-submit,.result-actions .button,.error-actions-preview .button,.status-actions .button { width:100%; }
  .catalog-search { grid-template-columns:1fr; }
  .catalog-search .button { justify-self:start; }
  .category-grid { grid-template-columns:1fr; }
  .book-card-preview { grid-template-columns:82px minmax(0,1fr); }
  .cover-preview { width:82px; }
  .catalog-page-control { min-width:0; max-width:48%; }
  .password-field { grid-template-columns:1fr; }
  .password-toggle { justify-self:start; }
  .password-submit,.destination-input-row .button,.smtp-actions .button { width:100%; }
  .provider-topline,.smtp-connection summary { align-items:flex-start; flex-direction:column; }
  .status-summary { padding:1.2rem; }
  .status-action-group { width:100%; }
  .status-action-group .button { width:100%; }
}
@media (max-width:360px) {
  .hero-intro h1 { font-size:clamp(2.25rem,12.5vw,2.55rem); }
}
