/* Rescue Pub Files. Calm paper tones, a deep teal and a warm marigold. */
@font-face { font-family: 'Fraunces'; font-style: normal; font-weight: 300 800; font-display: swap; src: url(/site-fonts/fraunces-latin-soft-normal.woff2) format('woff2'); }
@font-face { font-family: 'Figtree'; font-style: normal; font-weight: 300 900; font-display: swap; src: url(/site-fonts/figtree-latin-wght-normal.woff2) format('woff2'); }
@font-face { font-family: 'Figtree'; font-style: italic; font-weight: 300 900; font-display: swap; src: url(/site-fonts/figtree-latin-wght-italic.woff2) format('woff2'); }
@font-face { font-family: 'Fraunces'; font-style: italic; font-weight: 300 800; font-display: swap; src: url(/site-fonts/fraunces-latin-soft-italic.woff2) format('woff2'); }

:root {
  --paper: #f6f0e4;
  --paper-2: #efe6d4;
  --card: #fffdf8;
  --ink: #1e2b33;
  --ink-2: #3c4a52;
  --muted: #5f6b70;
  --line: #e2d8c4;
  --line-2: #d3c6ac;
  --teal: #1f5f5b;
  --teal-2: #174a47;
  --teal-soft: #d9e8e3;
  --gold: #f0a93b;
  --gold-soft: #fbe9c6;
  --rose: #a8432f;
  --rose-soft: #f8e3dc;
  --radius: 16px;
  --shadow: 0 1px 0 rgba(90, 70, 30, .05), 0 10px 30px -12px rgba(90, 70, 30, .22);
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; color: var(--ink); font: 17.5px/1.62 var(--sans); background: var(--paper);
  background-image: radial-gradient(rgba(140, 115, 70, .07) 1px, transparent 1px);
  background-size: 22px 22px;
}
img, svg { max-width: 100%; }
a { color: var(--teal); text-underline-offset: 3px; }
a:hover { color: var(--teal-2); }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; letter-spacing: -.01em; font-variation-settings: 'SOFT' 100, 'WONK' 0; margin: 0 0 .5em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 560; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--card); padding: 8px 14px; border-radius: 8px; z-index: 50; }
.skip:focus { left: 12px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 6px; }

/* header */
.site-top { background: rgba(246, 240, 228, .9); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; backdrop-filter: blur(8px); }
.site-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 66px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-family: var(--serif); font-size: 1.32rem; font-weight: 640; letter-spacing: -.01em; }
.brand svg { width: 36px; height: 36px; flex: none; }
.site-nav { display: flex; gap: 22px; flex-wrap: wrap; }
.site-nav a { color: var(--ink-2); text-decoration: none; font-size: .96rem; }
.site-nav a:hover { color: var(--teal); text-decoration: underline; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 700 1rem/1.2 var(--sans); padding: 12px 20px; border-radius: 999px; border: 1.5px solid var(--line-2); background: var(--card); color: var(--ink); cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s, transform .1s; }
.btn:hover { border-color: var(--teal); color: var(--teal-2); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--teal); border-color: var(--teal); color: #fffaf0; }
.btn.primary:hover { background: var(--teal-2); color: #fff; }
.btn.quiet { background: transparent; }
.btn.small { padding: 7px 14px; font-size: .9rem; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn .tag { font-size: .78rem; font-weight: 700; background: var(--gold-soft); color: #7a4b07; padding: 2px 8px; border-radius: 999px; }
.round { width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid var(--line-2); background: var(--card); color: var(--ink); font-size: 1.3rem; line-height: 1; cursor: pointer; display: inline-grid; place-items: center; }
.round:hover { border-color: var(--teal); color: var(--teal); }
.round svg { width: 18px; height: 18px; }
.round[aria-pressed="true"] { background: var(--teal-soft); border-color: var(--teal); }

/* hero */
.hero { padding: 56px 0 48px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.eyebrow { display: inline-block; font-size: .85rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--teal); background: var(--teal-soft); padding: 5px 12px; border-radius: 999px; margin-bottom: 18px; }
.lede { font-size: 1.18rem; color: var(--ink-2); }
.assure { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 8px; }
.assure li { display: flex; align-items: center; gap: 10px; color: var(--ink-2); }
.assure .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px var(--gold-soft); flex: none; }
.hero-tool { position: relative; }
.stack-art { display: block; width: 78%; margin: -20px auto -96px; position: relative; z-index: 0; }
.hero-guide { padding: 40px 0 36px; }
.hero-guide h1 { font-size: clamp(2rem, 4.2vw, 3rem); }

/* the drop tray */
.tray { position: relative; z-index: 1; }
.tray-card { background: var(--card); border-radius: 22px; padding: 30px 28px 24px; text-align: center; box-shadow: var(--shadow); border: 2px dashed var(--line-2); transition: border-color .2s, background .2s; }
.tray.drag .tray-card, .tray-card:hover { border-color: var(--teal); }
.tray.drag .tray-card { background: #f4faf7; }
.tray-icon { width: 46px; height: 46px; color: var(--teal); background: var(--teal-soft); border-radius: 50%; padding: 9px; }
.tray-title { font-size: 1.45rem; margin: 10px 0 4px; }
.tray-sub { color: var(--muted); margin-bottom: 18px; }
.tray-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.engine { margin-top: 18px; }
.meter { height: 6px; background: var(--paper-2); border-radius: 99px; overflow: hidden; max-width: 320px; margin: 0 auto 8px; }
.meter span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--teal), #3f8f87); border-radius: 99px; transition: width .2s; }
.engine.ready .meter span { background: var(--teal); }
.engine-text { font-size: .9rem; color: var(--muted); margin: 0; }
.engine.ready .engine-text::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #3f9b6e; margin-right: 7px; vertical-align: 1px; }

#drop-veil { position: fixed; inset: 0; z-index: 60; background: rgba(31, 95, 91, .88); display: grid; place-items: center; color: #fffaf0; }
#drop-veil div { display: grid; gap: 6px; text-align: center; border: 3px dashed rgba(255, 250, 240, .7); border-radius: 26px; padding: 48px 64px; }
#drop-veil strong { font: 600 2rem var(--serif); }
#drop-veil[hidden] { display: none; }

/* the desk: file list + viewer */
.desk { padding: 8px 0 56px; scroll-margin-top: 80px; }
.desk[hidden] { display: none; }
.desk-grid { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 24px; align-items: start; }
.files, .viewer { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.files { padding: 18px; position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow: auto; }
.files-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; }
.files-head h2 { font-size: 1.2rem; margin: 0; }
.file-list, .skipped { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.file-list button { width: 100%; text-align: left; background: transparent; border: 1px solid transparent; border-radius: 10px; padding: 9px 10px; cursor: pointer; font: inherit; color: inherit; display: grid; grid-template-columns: 22px 1fr; gap: 2px 8px; }
.file-list button:hover { background: var(--paper); }
.file-list button[aria-current="true"] { background: var(--teal-soft); border-color: #b8d3cc; }
.file-list .fname { font-weight: 700; font-size: .95rem; overflow-wrap: anywhere; }
.file-list .fstate { grid-column: 2; font-size: .82rem; color: var(--muted); }
.file-list .ficon { width: 20px; height: 20px; margin-top: 2px; border-radius: 50%; display: grid; place-items: center; font-size: .75rem; font-weight: 700; }
.ficon.ok { background: #d7ece1; color: #23704a; }
.ficon.bad { background: var(--rose-soft); color: var(--rose); }
.ficon.wait { background: var(--paper-2); color: var(--muted); }
.ficon.wait::after { content: ''; width: 10px; height: 10px; border: 2px solid var(--muted); border-top-color: transparent; border-radius: 50%; animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.skipped { margin-top: 12px; font-size: .85rem; color: var(--muted); }
.skipped li { padding: 6px 10px; background: var(--paper); border-radius: 8px; }
.batch-box { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.batch-title { font-weight: 700; margin-bottom: 6px; }
.small-note { font-size: .86rem; color: var(--muted); margin: 0; }

.viewer { padding: 22px 24px 24px; min-width: 0; }
.doc-name { font-size: 1.5rem; margin: 0 0 2px; overflow-wrap: anywhere; }
.doc-meta { color: var(--muted); font-size: .95rem; margin: 0 0 14px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; }
.tool-status { min-height: 1.4em; font-size: .92rem; color: var(--teal-2); margin: 4px 0 10px; }
.tool-status.bad { color: var(--rose); }
.notice { background: var(--rose-soft); color: #5e2417; border-radius: 12px; padding: 14px 16px; margin: 0 0 14px; }
.notice strong { display: block; margin-bottom: 2px; }
.notice.bad { text-align: left; }
.warnings { list-style: none; margin: 0 0 14px; padding: 12px 16px; background: var(--gold-soft); border-radius: 12px; font-size: .94rem; color: #5c3d0b; }
.text-panel { border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin: 6px 0 16px; background: var(--paper); }
.text-panel-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.text-panel h3 { margin: 0; font-size: 1.05rem; }
.text-panel textarea { width: 100%; font: .92rem/1.5 ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace; border: 1px solid var(--line-2); border-radius: 8px; padding: 10px; background: var(--card); color: var(--ink); resize: vertical; }

.pages { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 18px; margin-top: 8px; }
.thumbs { display: grid; gap: 12px; align-content: start; max-height: 78vh; overflow: auto; padding: 4px 6px 4px 2px; }
.thumb { border: 0; background: none; padding: 0; cursor: pointer; text-align: center; font: .8rem var(--sans); color: var(--muted); }
.thumb .sheet { display: block; background: #fff; border-radius: 3px; box-shadow: 0 1px 4px rgba(60, 45, 20, .25); outline: 2px solid transparent; outline-offset: 3px; overflow: hidden; }
.thumb .sheet svg { display: block; width: 100%; height: auto; }
.thumb[aria-selected="true"] .sheet { outline-color: var(--teal); }
.thumb[aria-selected="true"] { color: var(--teal-2); font-weight: 700; }
.page-stage { background: #e9e1d0; border-radius: 12px; padding: 22px; min-width: 0; background-image: linear-gradient(45deg, rgba(255,255,255,.18) 25%, transparent 25%, transparent 75%, rgba(255,255,255,.18) 75%), linear-gradient(45deg, rgba(255,255,255,.18) 25%, transparent 25%, transparent 75%, rgba(255,255,255,.18) 75%); background-size: 24px 24px; background-position: 0 0, 12px 12px; }
.page-view { overflow: auto; max-height: 78vh; display: grid; justify-items: center; }
.page-view .sheet { background: #fff; box-shadow: 0 2px 14px rgba(60, 45, 20, .3); width: 100%; max-width: 760px; }
.page-view.zoomed .sheet { max-width: none; width: 180%; }
.page-view .sheet svg { display: block; width: 100%; height: auto; }
.page-nav { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 14px; color: var(--ink-2); font-size: .95rem; }
.empty-pages { color: var(--muted); padding: 40px 0; text-align: center; }
svg text { font-kerning: none; }

/* bands */
.band { padding: 64px 0; }
.band.warm { background: var(--paper-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { margin-bottom: 26px; }
.sub { color: var(--muted); font-size: 1.05rem; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; counter-reset: none; }
.steps li { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.step-n { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--gold-soft); color: #7a4b07; font: 600 1.15rem var(--serif); margin-bottom: 12px; }
.steps p { color: var(--ink-2); margin: 0; }
.why-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 44px; align-items: start; }
.fidelity { background: var(--card); border-radius: var(--radius); padding: 24px 26px; border: 1px solid var(--line); box-shadow: var(--shadow); }
.ticks { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 10px; }
.ticks li { padding-left: 30px; position: relative; }
.ticks li::before { content: ''; position: absolute; left: 0; top: 4px; width: 18px; height: 18px; border-radius: 50%; background: var(--teal-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M5 9.4l2.6 2.6L13 6.6' fill='none' stroke='%231f5f5b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/18px no-repeat; }
.ticks.soft li::before { background: var(--gold-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M6 9h6' fill='none' stroke='%237a4b07' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center/18px no-repeat; }
.unlock-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 40px; align-items: center; }
.kicker { font-size: .85rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: #8a5a10; margin-bottom: 8px; }
.unlock-box { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 28px; text-align: center; box-shadow: var(--shadow); }
.price-tag { font: 600 2.6rem var(--serif); margin: 0 0 6px; color: var(--teal-2); }
.price-tag span { font: 400 1rem var(--sans); color: var(--muted); }
.soon { display: inline-block; font-weight: 700; color: #7a4b07; background: var(--gold-soft); padding: 4px 14px; border-radius: 999px; }
.faq { display: grid; gap: 10px; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 4px 18px; }
.faq summary { cursor: pointer; font-weight: 700; padding: 12px 0; }
.faq details p { color: var(--ink-2); }
.guide-cards { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.guide-cards a { display: grid; gap: 6px; height: 100%; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; text-decoration: none; color: var(--ink); transition: border-color .15s, transform .15s; }
.guide-cards a:hover { border-color: var(--teal); transform: translateY(-2px); }
.guide-cards strong { font-family: var(--serif); font-size: 1.15rem; font-weight: 600; color: var(--teal-2); }
.guide-cards span { font-size: .93rem; color: var(--muted); }

/* articles */
.article-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; align-items: start; }
.prose h2 { font-size: 1.55rem; margin-top: 1.6em; }
.prose h2:first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .45em; }
.prose code { font-size: .9em; background: var(--paper-2); padding: 1px 6px; border-radius: 5px; }
.aside { position: sticky; top: 90px; }
.aside h2 { font-size: 1.15rem; }
.aside .guide-cards { grid-template-columns: 1fr; }
.aside-note { margin-top: 12px; }
.page-head { padding: 54px 0 30px; border-bottom: 1px solid var(--line); }
.page-head p { color: var(--ink-2); font-size: 1.1rem; }

/* footer */
.site-foot { background: #18322f; color: #d8e4df; padding: 52px 0 40px; margin-top: 0; }
.site-foot a { color: #f3e6c8; }
.site-foot .brand { color: #fffaf0; }
.foot-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) 1fr 1fr; gap: 36px; }
.site-foot h2 { font-size: 1rem; font-family: var(--sans); font-weight: 700; color: #fffaf0; margin-bottom: 10px; }
.site-foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: .95rem; }
.foot-about p { font-size: .93rem; margin-top: 12px; }
.disclaimer, .foot-note { color: #a9bfb8; font-size: .85rem !important; }
.ad-slot { margin: 24px auto; }

#print-root { display: none; }

@media (max-width: 960px) {
  .hero-grid, .why-grid, .unlock-grid, .article-grid { grid-template-columns: 1fr; }
  .stack-art { width: 62%; margin: 0 auto -70px; }
  .desk-grid { grid-template-columns: 1fr; }
  .files { position: static; max-height: none; }
  .aside { position: static; }
  .steps { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-about { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .site-head { flex-direction: column; align-items: flex-start; gap: 6px; padding-top: 10px; padding-bottom: 10px; }
  .site-top { position: static; }
  .site-nav { gap: 4px 11px; font-size: .82rem; }
  .eyebrow { font-size: .72rem; border-radius: 12px; letter-spacing: .03em; }
  .hero { padding: 32px 0 30px; }
  .stack-art { display: none; }
  .tray-card { padding: 24px 18px 20px; }
  .tray-actions .btn { width: 100%; }
  .viewer { padding: 16px; }
  .pages { grid-template-columns: 1fr; }
  .thumbs { grid-auto-flow: column; grid-auto-columns: 78px; overflow-x: auto; max-height: none; padding-bottom: 8px; }
  .page-stage { padding: 10px; }
  .actions .btn { flex: 1 1 calc(50% - 8px); padding: 11px 12px; }
  .band { padding: 44px 0; }
  .foot-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }

@media print {
  body { background: #fff; }
  body > *:not(main) { display: none !important; }
  main > *:not(.desk) { display: none !important; }
  .desk { padding: 0; }
  .desk > .wrap { display: none !important; }
  #print-root { display: block !important; }
  .print-page { page-break-after: always; break-after: page; margin: 0; }
  .print-page:last-child { page-break-after: auto; break-after: auto; }
  .print-page svg { display: block; width: 100%; height: auto; }
}
