/* Layout and components. Colors come from brand/theme.css. */
:root { font-family: var(--brand-font); color: var(--text-strong); background: var(--page-background); font-synthesis: none; }
* { box-sizing: border-box; }
body { margin: 0; min-height: 100svh; display: grid; place-items: center; grid-template-columns: minmax(0, 1fr); padding: 28px 18px; background: var(--page-background); }
main { width: min(100%, 560px); min-width: 0; justify-self: center; }
p, h1, .brand-text { overflow-wrap: anywhere; }
.brand-text { min-width: 0; }

.brand { display: flex; align-items: center; gap: 13px; margin: 0 8px 22px; color: var(--brand-secondary); font-weight: 800; font-size: 17px; letter-spacing: 1.5px; }
.logo { height: 44px; width: auto; max-width: 140px; object-fit: contain; border-right: 1px solid var(--border); padding-right: 14px; }
.brand.logo-only .logo { border-right: 0; padding-right: 0; height: 60px; max-width: min(320px, 100%); }
.brand-text { display: flex; flex-direction: column; text-transform: uppercase; }
.brand-text small { font-size: 9px; letter-spacing: 1.8px; }

.card { background: var(--card-background); border-top: 7px solid var(--brand-primary); border-radius: 5px; padding: 34px 34px 28px; box-shadow: 0 10px 30px rgb(0 0 0 / .05); }
.eyebrow { font-size: 11px; letter-spacing: 2px; font-weight: bold; color: var(--text-muted); }
h1 { font-size: 31px; line-height: 1.14; letter-spacing: -.7px; margin: 23px 0 13px; }
p { color: var(--text-body); line-height: 1.6; font-size: 16px; margin: 0 0 24px; }

.spinner { width: 34px; height: 34px; border: 3px solid var(--border); border-top-color: var(--brand-secondary); border-radius: 50%; margin: 31px 0 0; animation: spin 1s linear infinite; }
.stopped { animation: none; border-color: var(--brand-accent); }

ol { list-style: none; margin: 28px 0; padding: 0; counter-reset: steps; }
li { display: flex; align-items: center; gap: 13px; counter-increment: steps; color: var(--text-muted); font-size: 14px; padding: 12px 0; }
li::before { content: counter(steps); display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--border); width: 27px; height: 27px; font-size: 12px; flex-shrink: 0; }
li.done { color: var(--brand-accent); }
li.done::before { content: '✓'; border-color: var(--brand-accent); }
li.active { font-weight: bold; color: var(--brand-primary); }
li.active::before { background: var(--brand-primary); color: #fff; border-color: var(--brand-primary); }

.button { display: block; text-align: center; background: var(--brand-primary); color: #fff; padding: 14px 18px; border-radius: 4px; text-decoration: none; border: 1px solid var(--brand-primary); font: inherit; font-size: 16px; font-weight: bold; width: 100%; cursor: pointer; margin: 14px 0; }
.button.ghost, .secondary-button { background: transparent; color: var(--brand-primary); }
.button.danger { color: var(--brand-danger); border-color: var(--brand-danger); }
.link { display: block; color: var(--brand-secondary); margin: 16px 0; text-align: center; }
.note { border-top: 1px solid var(--border); padding-top: 23px; margin: 26px 0 0; font-size: 12px; line-height: 1.8; color: var(--text-muted); }
.small { font-size: 12px; color: var(--text-muted); margin: 8px 0 0; }


footer { font-size: 11px; color: var(--text-muted); margin: 20px 8px; display: flex; justify-content: space-between; gap: 12px; }
footer span:last-child { color: var(--brand-secondary); }
[hidden] { display: none !important; }

/* PDF view: nothing but the browser's own PDF viewer, edge to edge. */
body.viewing { display: block; padding: 0; overflow: hidden; background: #525659; }
body.viewing .brand, body.viewing footer { display: none; }
body.viewing main { width: 100%; max-width: none; }
.viewer { position: fixed; inset: 0; }
#pdf-frame { display: block; width: 100%; height: 100%; border: 0; background: #525659; }
.share-fab { position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom));
  padding: 12px 18px; border-radius: 999px; border: 0; background: var(--brand-primary); color: #fff;
  font: inherit; font-size: 15px; font-weight: bold; box-shadow: 0 4px 14px rgb(0 0 0 / .3); cursor: pointer; }

@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 440px) {
  .card { padding: 28px 22px; } h1 { font-size: 28px; } body { padding: 20px 14px; } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }
