/* Stacked Reads: brand tokens from the brand system */
:root {
  --paper: #F6F4EF;
  --navy: #1B2A41;
  --green: #2F5D50;
  --green-dark: #244A40;
  --charcoal: #33373D;
  --brass: #B08D57;
  --muted: #61666D;
  --rule: #DDD8CD;
  --white: #FFFFFF;
  --error: #9A3B2F;
  --serif: 'Source Serif 4', Georgia, serif;
  --sans: 'Public Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --measure: 66ch;
  --radius: 6px;
  --gutter: clamp(16px, 4vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--charcoal);
  font: 400 1rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--green); text-underline-offset: 3px; }
a:hover { color: var(--green-dark); }
:focus-visible { outline: 3px solid var(--brass); outline-offset: 2px; border-radius: 2px; }

h1, h2, h3 { font-family: var(--serif); color: var(--navy); font-weight: 600; line-height: 1.15; margin: 0 0 .5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.25rem, 5.5vw, 3.6rem); font-weight: 600; }
h2 { font-size: clamp(1.6rem, 3vw, 2.15rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; max-width: var(--measure); }
.lead { font-size: 1.2rem; color: var(--charcoal); }
.small { font-size: .875rem; color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 var(--gutter); }

/* header */
.site-header { border-bottom: 1px solid var(--rule); background: var(--paper); }
.site-header .wrap { display: flex; align-items: center; gap: 24px; min-height: 72px; flex-wrap: wrap; }
.brand img { height: 30px; width: auto; }
.nav { display: flex; gap: 22px; margin-left: auto; flex-wrap: wrap; }
.nav a { color: var(--navy); text-decoration: none; font-weight: 500; font-size: .95rem; }
.nav a:hover, .nav a[aria-current="page"] { text-decoration: underline; }
.nav .phone { color: var(--green); font-variant-numeric: tabular-nums; }
@media (max-width: 720px) {
  .site-header .wrap { padding-top: 12px; padding-bottom: 12px; gap: 10px; }
  .nav { margin-left: 0; gap: 14px 18px; }
  .nav a { font-size: .9rem; }
}

/* sections */
section { padding: clamp(48px, 8vw, 88px) 0; }
section + section { border-top: 1px solid var(--rule); }
.hero { padding-top: clamp(40px, 7vw, 80px); }

/* buttons & fields */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 1rem/1 var(--sans); padding: 14px 22px; border-radius: var(--radius);
  border: 2px solid var(--green); background: var(--green); color: var(--white);
  cursor: pointer; text-decoration: none; min-height: 48px;
}
.btn:hover { background: var(--green-dark); border-color: var(--green-dark); color: var(--white); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn.secondary { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn.secondary:hover { background: var(--navy); color: var(--white); }
.btn.link { background: none; border: 0; color: var(--green); padding: 0; min-height: 0; text-decoration: underline; font-weight: 500; }

label { display: block; font-weight: 600; color: var(--navy); font-size: .95rem; margin-bottom: 6px; }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=number], select, textarea {
  width: 100%; font: 400 1rem/1.4 var(--sans); color: var(--charcoal);
  padding: 12px 14px; border: 1.5px solid #C9C3B6; border-radius: var(--radius); background: var(--white);
  min-height: 48px;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(47,93,80,.18); }
.field { margin-bottom: 16px; }
.hint { font-size: .85rem; color: var(--muted); margin-top: 4px; }
.error-msg { color: var(--error); font-weight: 600; }
.row { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; }
.row.three { grid-template-columns: 2fr 1fr 1fr; }
@media (max-width: 640px) { .row, .row.three { grid-template-columns: 1fr; } }

/* ---------- the quote tool ---------- */
.lookup { display: flex; gap: 10px; max-width: 720px; margin-top: 28px; }
.lookup input { font-size: 1.15rem; min-height: 58px; letter-spacing: .01em; }
.lookup .btn { min-height: 58px; padding: 0 26px; white-space: nowrap; }
@media (max-width: 560px) { .lookup { flex-direction: column; } }
.lookup-help { margin-top: 10px; font-size: .9rem; color: var(--muted); max-width: 720px; }
.notice { margin-top: 18px; padding: 12px 16px; border-left: 4px solid var(--brass); background: #FBF8F1; max-width: 720px; }

/* The stack: each book you can sell becomes a spine, offset like the logo's slabs */
.stack { list-style: none; margin: 32px 0 0; padding: 0; max-width: 820px; }
.spine {
  display: grid; grid-template-columns: 40px 1fr auto auto; align-items: center; gap: 14px;
  background: var(--navy); color: var(--white); border-radius: 3px;
  padding: 10px 14px 10px 10px; margin-bottom: 6px; min-height: 64px;
  margin-right: 7%;
  animation: settle .28s ease-out;
}
.spine:nth-child(2n) { background: var(--green); margin-left: 7%; margin-right: 0; }
.spine:nth-child(3n) { margin-left: 3%; margin-right: 3%; }
.spine img { width: 40px; height: 52px; object-fit: cover; background: rgba(255,255,255,.12); border-radius: 2px; }
.spine .t { min-width: 0; }
.spine .title { font-family: var(--serif); font-size: 1.05rem; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.spine .by { font-size: .8rem; opacity: .75; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spine .price { font: 600 1.25rem/1 var(--sans); font-variant-numeric: tabular-nums; }
.spine .remove { background: none; border: 0; color: rgba(255,255,255,.7); font-size: 1.4rem; line-height: 1; cursor: pointer; padding: 6px; border-radius: 4px; }
.spine .remove:hover { color: var(--white); background: rgba(255,255,255,.12); }
.spine.loading { background: #E9E5DC; color: var(--muted); animation: pulse 1.2s ease-in-out infinite; }
.spine.loading .price { font-size: .9rem; font-weight: 500; }
@keyframes settle { from { transform: translateY(-8px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes pulse { 50% { opacity: .6; } }
@media (prefers-reduced-motion: reduce) { .spine, .spine.loading { animation: none; } }
@media (max-width: 560px) {
  .spine, .spine:nth-child(2n), .spine:nth-child(3n) { margin-left: 0; margin-right: 0; grid-template-columns: 34px 1fr auto auto; gap: 10px; }
  .spine img { width: 34px; height: 46px; }
  .spine .title { font-size: .95rem; }
  .spine .price { font-size: 1.1rem; }
}

.stack-total {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  max-width: 820px; margin-top: 18px; padding-top: 16px; border-top: 2px solid var(--navy);
}
.stack-total .amount { font: 600 2.2rem/1 var(--serif); color: var(--navy); font-variant-numeric: tabular-nums; }
.stack-total .amount .ccy { color: var(--brass); }
.stack-total .meta { color: var(--muted); font-size: .95rem; }
.progress { height: 6px; background: #E6E1D6; border-radius: 3px; max-width: 820px; margin-top: 10px; overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--brass); width: 0; transition: width .3s; }

.passed { max-width: 820px; margin-top: 26px; }
.passed summary { cursor: pointer; color: var(--navy); font-weight: 600; }
.passed ul { list-style: none; padding: 0; margin: 10px 0 0; }
.passed li { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; border-bottom: 1px solid var(--rule); font-size: .95rem; }
.passed li .why { color: var(--muted); text-align: right; }

/* checkout */
.checkout { max-width: 720px; margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--rule); }
.choice { display: flex; gap: 12px; flex-wrap: wrap; }
.choice label { flex: 1 1 160px; display: flex; gap: 10px; align-items: center; padding: 14px; border: 1.5px solid #C9C3B6; border-radius: var(--radius); background: var(--white); cursor: pointer; font-weight: 500; }
.choice input { accent-color: var(--green); width: 18px; height: 18px; }
.choice label:has(input:checked) { border-color: var(--green); box-shadow: 0 0 0 3px rgba(47,93,80,.15); }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; color: var(--charcoal); }
.check input { margin-top: 4px; accent-color: var(--green); width: 18px; height: 18px; flex: none; }

/* steps (a real sequence, so numbered) */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: 28px; counter-reset: step; list-style: none; padding: 0; }
.steps li { counter-increment: step; }
.steps li::before { content: counter(step); display: block; font: 600 2.6rem/1 var(--serif); color: var(--brass); margin-bottom: 10px; }
.steps h3 { margin-bottom: .3em; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; gap: 22px; } }

/* two-up info */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } }
.facts { margin: 16px 0 20px; padding: 0; list-style: none; }
.facts li { padding: 10px 0; border-bottom: 1px solid var(--rule); display: grid; grid-template-columns: 110px 1fr; gap: 12px; }
.facts li b { color: var(--navy); font-weight: 600; }
.ok-no { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 12px 0 20px; }
.ok-no ul { margin: 0; padding-left: 1.1em; }
@media (max-width: 520px) { .ok-no { grid-template-columns: 1fr; } }

/* prose pages */
.prose { max-width: 70ch; }
.prose h2 { margin-top: 1.6em; font-size: 1.5rem; }
.prose h3 { margin-top: 1.4em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .4em; }
details.faq { border-bottom: 1px solid var(--rule); padding: 16px 0; max-width: 72ch; }
details.faq summary { cursor: pointer; font-family: var(--serif); font-size: 1.2rem; color: var(--navy); font-weight: 600; list-style: none; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: '+'; float: right; color: var(--green); font-family: var(--sans); }
details.faq[open] summary::after { content: '–'; }
details.faq p { margin-top: 10px; }

/* footer */
.site-footer { background: var(--navy); color: #D9DEE6; padding: 48px 0 40px; margin-top: 0; font-size: .95rem; }
.site-footer a { color: var(--white); }
.site-footer .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.site-footer img { height: 28px; width: auto; margin-bottom: 14px; }
.site-footer p { color: #C5CCD6; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 6px; }
@media (max-width: 760px) { .site-footer .cols { grid-template-columns: 1fr; } }

/* order page */
.status-line { display: flex; gap: 0; margin: 24px 0 28px; max-width: 820px; list-style: none; padding: 0; }
.status-line li { flex: 1; padding-top: 12px; border-top: 4px solid #DDD8CD; font-size: .9rem; color: var(--muted); }
.status-line li.done { border-color: var(--green); color: var(--navy); font-weight: 600; }
.status-line li.now { border-color: var(--brass); color: var(--navy); font-weight: 600; }
table.items { width: 100%; max-width: 820px; border-collapse: collapse; margin: 16px 0; }
table.items td, table.items th { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--rule); vertical-align: top; }
table.items td.r, table.items th.r { text-align: right; font-variant-numeric: tabular-nums; }
.slip { display: none; }
@media print {
  .site-header, .site-footer, .no-print { display: none !important; }
  body { background: #fff; }
  .slip { display: block; }
  .screen-only { display: none !important; }
}
.hidden { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
