/* Astra presentation shell. Current wizard.js DOM/hooks are authoritative.
   Production palette, photo and geometry reused; no state logic in this file. */
:root {
  --bg: #0a0e14; --surface: #131c2f; --surface-2: #1a253d;
  --text: #e2e8f0; --text-muted: #94a3b8; --border: rgba(148,163,184,.2);
  --accent: #38bdf8; --green: #86efac; --amber: #fbbf24;
  --font-body: system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
  --font-mono: ui-monospace,"SFMono-Regular",Consolas,monospace;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: var(--font-body); line-height: normal; }
button,input { font: inherit; }
button,a,input { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { opacity: .45; cursor: not-allowed; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
[hidden] { display: none !important; }
@media screen {
  body { height: 100dvh; overflow: hidden; display: flex; flex-direction: column; color: var(--text); color-scheme: dark;
    background: linear-gradient(180deg,rgba(10,14,20,.35),rgba(10,14,20,.45) 60%,rgba(10,14,20,.55)),url('https://xlx159.whiskey7.site/assets/images/hero.jpg') center/cover fixed; }
  .site-header { position: sticky; top: 0; z-index: 50; line-height: normal; background: linear-gradient(180deg,rgba(10,14,20,.92),rgba(10,14,20,.78)); border-bottom: 1px solid var(--border); backdrop-filter: blur(12px); }
  .container { width: 100%; max-width: 1320px; margin-inline: auto; padding-inline: 20px; }
  .header-row { padding-top: 12px; padding-bottom: 12px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
  .brand { display: flex; align-items: center; gap: 10px; min-width: 0; color: var(--text); }
  .brand:hover { text-decoration: none; }
  .brand img { border-radius: 50%; background: rgba(56,189,248,.12); padding: 2px; }
  .brand-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
  .brand-text strong { font-size: 1.05rem; line-height: 1.15; letter-spacing: -.01em; }
  .brand-text small { color: var(--text-muted); font-size: .72rem; line-height: 1.1; letter-spacing: .04em; }
  .brand-badge { display: inline-block; margin-left: 5px; padding: 2px 8px; font-size: .68rem; vertical-align: middle; border-radius: 999px; color: var(--accent); border: 1px solid rgba(56,189,248,.35); background: rgba(56,189,248,.15); }
  .site-nav { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
  .site-nav a,.site-nav button { display: inline-flex; align-items: center; min-height: 38px; padding: 7px 12px; border: 0; border-radius: 7px; font-weight: 600; color: var(--text); background: transparent; white-space: nowrap; }
  .site-nav a:hover,.site-nav button:hover { text-decoration: none; background: rgba(56,189,248,.08); }
  .site-nav a[aria-current] { color: var(--accent); background: rgba(56,189,248,.15); }
  .site-nav button { background: var(--accent); color: #061018; border-radius: 999px; box-shadow: inset 0 0 0 1px #bae6fd; }
  .nav-status-dot { display: inline-block; width: 8px; height: 8px; margin-left: 6px; border-radius: 50%; background: currentColor; }
  .site-nav a[data-nav-status-state="online"] { color: #22c55e; animation: navPulse 2.4s ease-in-out infinite; }
  .site-nav a[data-nav-status-state="offline"] { color: #ef4444; animation: navPulse 1.6s ease-in-out infinite; }
  .site-nav a[data-nav-status-state="stale"] { color: #f59e0b; }
  .skip-link { position: absolute; left: 16px; top: -100px; padding: 8px 14px; background: var(--accent); color: #061018; z-index: 100; }
  .skip-link:focus { top: 8px; }
  .app-shell { width: 100%; max-width: 1320px; margin: 0 auto; padding: 0 20px; flex: 1; min-height: 0; display: flex; }
  .cockpit { width: 100%; min-height: 0; display: flex; flex: 1; flex-direction: column; gap: 0; }
  .pane-head { display: flex; align-items: flex-start; justify-content: space-between; column-gap: 14px; row-gap: 2px; padding: .7rem 1.15rem .65rem; border: 1px solid var(--border); border-radius: 14px; background: rgba(15,23,42,.68); backdrop-filter: blur(14px) saturate(140%); }
  .hero-copy { min-width: 0; }
  .hero-actions { flex: 0 0 auto; }
  .pane-head h1 { margin: 0; font-size: clamp(1.5rem,2.8vw,2rem); line-height: 1.1; letter-spacing: -.02em; font-weight: 700; }
  .pane-head h1 span { color: var(--accent); }
  .lede { margin: 4px 0 0; max-width: 60ch; font-size: .9rem; line-height: 1.35; color: var(--text-muted); }
  .donate-btn { display: inline-flex; gap: 7px; align-items: center; min-height: 38px; padding: 9px 16px; border: 1px solid #e5b431; border-radius: 8px; color: #003087; background: #FFC439; font-size: .92rem; line-height: normal; font-weight: 700; box-shadow: 0 2px 8px #ffc43959; }
  .donate-btn:hover { text-decoration: none; background: #ffd15f; }
  .pp-mark { display: inline-grid; place-items: center; width: 25px; height: 25px; background: white; border-radius: 50%; font-size: 13px; font-style: italic; }
  .contact-modal { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 20px; }
  .contact-modal-backdrop { position: absolute; inset: 0; background: rgba(2,6,12,.78); }
  .contact-modal-panel { position: relative; width: min(620px,100%); max-height: 92dvh; overflow: auto; padding: 22px; border: 1px solid var(--border); border-radius: 14px; background: #101827; box-shadow: 0 24px 80px #000a; }
  .contact-modal-panel header { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
  .contact-modal-panel h2 { margin: 0; }
  .contact-modal-panel header button { border: 0; background: transparent; color: var(--text); font-size: 2rem; }
  .contact-modal-panel form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .contact-modal-panel label { display: grid; gap: 5px; font-size: .85rem; color: var(--text-muted); }
  .contact-modal-panel label:nth-child(n+3) { grid-column: 1 / -1; }
  .contact-modal-panel input,.contact-modal-panel select,.contact-modal-panel textarea { width: 100%; padding: 9px 11px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); }
  .wizard-grid { display: grid; grid-template-columns: minmax(0,1fr) 282px; gap: 16px; min-height: 0; padding: 20px; flex: 1; border: 1px solid var(--border); border-radius: 14px; background: rgba(15,23,42,.68); backdrop-filter: blur(14px) saturate(140%); }
  .wizard-pane { position: relative; display: flex; flex-direction: column; overflow: hidden; min-width: 0; min-height: 0; border: 1px solid var(--border); border-radius: 14px; background: rgba(10,14,20,.65); }
  .assistant-head { flex: 0 0 auto; min-height: 58px; padding: 12px 16px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--border); background: rgba(10,14,20,.6); padding-right: 120px; }
  .assistant-head strong { font-size: 1rem; }
  .ready-indicator { display: inline-flex; align-items: center; gap: 6px; color: var(--green); font-size: .82rem; white-space: nowrap; }
  .status-dot { height: 7px; width: 7px; border-radius: 50%; background: #22c55e; display: inline-block; }
  .status-dot.ready { animation: statusPulse 2.4s ease-in-out infinite; }
  .status-dot.checking { animation: statusPulse 1.4s ease-in-out infinite; }
  .assistant-status { font-size: .73rem; color: var(--text-muted); }
  .transcript { flex: 1; min-height: 0; padding: 16px; display: flex; flex-direction: column; gap: 9px; overflow-y: auto; overscroll-behavior-y: contain; scrollbar-gutter: stable; }
  .msg { flex: 0 0 auto; max-width: 92%; padding: 10px 14px; border-radius: 14px; font-size: 1rem; line-height: 1.5; overflow-wrap: anywhere; }
  .msg.assistant { align-self: flex-start; background: var(--surface); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
  .msg.user { align-self: flex-end; background: var(--accent); color: #061018; border-bottom-right-radius: 4px; }
  .msg.system { align-self: flex-start; font-size: .85rem; color: var(--text-muted); border: 1px dashed var(--border); }
  .msg.registered-success { color: var(--green); background: #123022; border-color: #22c55e66; }
  .msg.registered-success::before { content: '✓ '; font-weight: 700; }
  .msg.registration-warning { color: var(--amber); background: #302715; border-color: #fbbf244d; }
  .msg.registration-warning::before { content: '⚠ '; }
  .msg.registration-unknown { color: #cbd5e1; background: #1b2433; border-color: #94a3b855; }
  .typing-dots { display: inline-flex; align-items: center; gap: 4px; padding: 3px 0; }
  .typing-dots span { width: 5px; height: 5px; background: var(--text-muted); border-radius: 50%; animation: typingBounce 1.4s infinite; }
  .typing-dots span:nth-child(2) { animation-delay: .15s; }
  .typing-dots span:nth-child(3) { animation-delay: .3s; }
  .response-zone { flex: 0 0 auto; background: rgba(10,14,20,.95); border-top: 1px solid var(--border); padding: 12px 16px; }
  .composer-row { display: flex; align-items: center; gap: 8px; }
  .composer-row label { font-size: .9rem; white-space: nowrap; }
  .composer-row input { flex: 1; min-width: 0; min-height: 43px; padding: 9px 12px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); color: var(--text); font-size: .95rem; }
  input::placeholder { color: var(--text-muted); }
  .composer-results { display: flex; flex-wrap: wrap; gap: 8px; max-height: min(180px,24dvh); overflow-y: auto; margin-top: 10px; overscroll-behavior-y: contain; padding-bottom: 2px; }
  .assistant-shell { display: flex; flex-direction: column; min-height: 0; }
  .composer-results:empty { display: none; }
  .composer-results:not(:empty)::before { content: 'Suggestions:'; flex: 0 0 100%; font-size: .78rem; color: var(--text-muted); }
  .composer-result-item { display: inline-flex; flex-direction: column; justify-content: center; gap: 2px; max-width: 100%; padding: 8px 14px; border: 1px solid #38bdf84d; border-radius: 12px; background: var(--surface); cursor: pointer; font-size: .9rem; overflow-wrap: anywhere; }
  .composer-result-item:hover { border-color: var(--accent); background: #183148; }
  .item-id { color: var(--text-muted); font-size: .65rem; font-family: var(--font-mono); }
  .sr-type { display: inline-block; border-radius: 999px; padding: 1px 5px; margin-left: 4px; font-size: .62rem; text-transform: uppercase; border: 1px solid currentColor; }
  .badge-info { color: #7dd3fc; } .badge-warn { color: var(--amber); } .badge-ok { color: var(--green); }
  .action-area:empty { display: none; }
  .choice-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
  .choice-btn,.btn,.report-btn { border: 1px solid #38bdf84d; background: #13283a; color: var(--text); padding: 9px 15px; min-height: 42px; border-radius: 9px; font-size: .88rem; font-weight: 600; }
  .choice-btn { border-radius: 999px; }
  .choice-btn:hover,.btn:hover,.report-btn:hover { background: #1a3c54; border-color: var(--accent); }
  .btn-primary { background: var(--accent); border-color: var(--accent); color: #061018; }
  .btn-primary:hover { background: #7dd3fc; }
  .response-zone:has(.action-area:not(:empty)) .composer-row { display: none; }
  .response-zone:has(.action-area:not(:empty)) .composer-results:empty { margin: 0; }
  .bottom-action-bar { flex: 0 0 auto; display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 16px; background: #0c1722; border-top: 1px solid #38bdf84d; }
  /* Use Qwen's wired static buttons, not the duplicate unbound report markup. */
  .report-bottom-bar { display: none; }
  .wizard-pane:not(:has(.report)) .bottom-action-bar { position: absolute; top: 10px; right: 10px; padding: 0; border: 0; background: transparent; }
  .wizard-pane:not(:has(.report)) #barPrint,.wizard-pane:not(:has(.report)) #barPdf { display: none; }
  .wizard-pane:not(:has(.report)) #barRestart { border: 0; background: transparent; color: var(--text-muted); font-size: .7rem; }
  .wizard-pane:has(.report) .response-zone { display: none; }
  .rail-pane { min-height: 0; display: flex; flex-direction: column; gap: 16px; overflow-y: auto; scrollbar-gutter: stable; }
  .rail-card { flex: 0 0 auto; padding: 20px; border-radius: 14px; border: 1px solid var(--border); background: rgba(10,14,20,.65); }
  .rail-card h2 { margin: 0 0 12px; color: var(--text-muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; }
  .step-chips { display: flex; flex-direction: column; gap: 6px; }
  .progress-step { display: flex; align-items: center; gap: 12px; padding: 5px 8px; min-height: 44px; font-size: .9rem; color: var(--text-muted); }
  .step-num { flex: 0 0 28px; height: 28px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 50%; font-size: .78rem; background: var(--surface-2); }
  .progress-step.active { color: var(--text); }
  .progress-step.active .step-num { background: var(--accent); border-color: var(--accent); color: #061018; box-shadow: 0 0 10px #38bdf870; }
  .progress-step.done { color: var(--text); }
  .progress-step.done .step-num { color: transparent; background: #123022; border-color: #22c55e66; position: relative; }
  .progress-step.done .step-num::after { content: '✓'; color: var(--green); position: absolute; }
  .progress-step.blocked { color: var(--amber); }
  .rail-body { margin: 0; color: var(--text-muted); font-size: .9rem; }
  .support-help { margin-top: 12px; width: 100%; }
  .report-count { margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--border); color: var(--accent); font-size: .82rem; font-weight: 700; text-align: right; }
  .preview-note { margin: 0; padding: 0 8px 8px; font-size: .7rem; color: var(--text-muted); }
  .report { flex: 0 0 auto; min-width: 0; padding: 18px 18px 28px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); overflow-wrap: anywhere; }
  .report > *:last-child { margin-bottom: 8px; }
  .report-title { font-size: 1.1rem; font-weight: 700; margin: 12px 0; }
  .report-status-banner { padding: 8px 12px; border-left: 3px solid #22c55e; border-radius: 6px; background: #123022; color: var(--green); font-size: .85rem; font-weight: 700; }
  .report-recap-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: .9rem; }
  .report-recap-table td { padding: 7px 8px; border-bottom: 1px solid var(--border); }
  .recap-label { width: 28%; color: var(--text-muted); font-size: .73rem; text-transform: uppercase; font-weight: 600; }
  .report-section { margin: 20px 0; }
  .report-section h3 { color: var(--accent); font-size: .83rem; text-transform: uppercase; letter-spacing: .06em; border-bottom: 1px solid var(--border); padding-bottom: 8px; }
  .report-section p,.report-section li { font-size: .95rem; line-height: 1.65; }
  .report-section ol,.report-section ul { padding-left: 24px; }
  .report-section li { margin: 6px 0; }
  .report-warnings-list { color: var(--amber); }
  .report-link-commands { font-family: var(--font-mono); }
  .transcript,.rail-pane,.composer-results { scrollbar-width: thin; scrollbar-color: #64748b #101722; }
  .print-report { display: none; }
}
@keyframes statusPulse { 0%,100% { opacity: 1; box-shadow: 0 0 0 0 #22c55e30; } 50% { opacity: .55; box-shadow: 0 0 0 3px #22c55e10; } }
@keyframes navPulse { 0%,100% { opacity: 1; filter: drop-shadow(0 0 2px currentColor); } 50% { opacity: .55; filter: drop-shadow(0 0 8px currentColor); } }
@keyframes typingBounce { 0%,60%,100% { transform: translateY(0); opacity: .45; } 30% { transform: translateY(-3px); opacity: 1; } }
@media screen and (max-width: 1250px) {
  .wizard-grid { grid-template-columns: minmax(0,1fr) 240px; }
}
@media screen and (max-width: 900px) {
  body { height: auto; min-height: 100dvh; overflow: auto; display: block; background-attachment: scroll; }
  .app-shell { display: block; padding-bottom: 48px; }
  .wizard-grid { grid-template-columns: 1fr; }
  .wizard-pane { height: 600px; }
  .rail-pane { display: grid; grid-template-columns: 1fr 1fr; overflow: visible; scrollbar-gutter: auto; }
  .preview-note { grid-column: 1 / -1; }
  .site-nav a { font-size: 1rem; padding: 8px 14.4px; }
  .site-nav button { display: block; min-height: 35px; padding: 8px 17.6px; font-size: .83333rem; }
  .pane-head { flex-wrap: wrap; }
}
@media screen and (max-width: 540px) {
  .header-row,.app-shell { padding-left: 20px; padding-right: 20px; }
  .brand-text strong { font-size: .94rem; }
  .brand-text small { font-size: .64rem; }
  .cockpit { gap: 0; }
  .pane-head { padding: .7rem 1.15rem .65rem; }
  .pane-head h1 { font-size: 1.5rem; }

  .assistant-head { padding-left: 12px; padding-right: 95px; gap: 8px; }
  .assistant-head strong { font-size: .9rem; }
  .ready-indicator { font-size: .76rem; }
  .transcript,.response-zone { padding: 12px; }
  .msg { font-size: .92rem; max-width: 96%; }
  .composer-row label { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; }
  .rail-pane { grid-template-columns: 1fr; }
  .report { padding: 12px; }
  .recap-label { width: 42%; }
  .bottom-action-bar { padding: 10px; gap: 6px; }
  .bottom-action-bar .btn { padding: 8px; font-size: .7rem; min-height: 40px; flex: 1; }
  .hero-actions,.donate-btn { width: 100%; justify-content: center; }
  .contact-modal-panel form { grid-template-columns: 1fr; }
  .contact-modal-panel label { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) { *,*::before,*::after { animation: none !important; scroll-behavior: auto !important; } }
/* Clean dedicated print model; screen transcript and action controls never print. */
@media print {
  @page { size: letter; margin: .5in .6in; }
  body { display: block; color: #222; background: white !important; min-height: 0; height: auto; overflow: visible; font: 10pt/1.5 var(--font-body); }
  body > :not(#printReport) { display: none !important; }
  #printReport, #printReport[hidden] { display: block !important; }
  #printReport h1 { font-size: 20pt; margin: 0 0 4pt; }
  #printReport h2 { font-size: 12pt; margin: 16pt 0 6pt; border-bottom: 1px solid #ccd2d9; padding-bottom: 4pt; break-after: avoid; }
  #printReport p { margin: 6pt 0; orphans: 3; widows: 3; }
  #printReport table { border-collapse: collapse; width: 100%; table-layout: fixed; margin: 12pt 0; }
  #printReport td { padding: 5pt 7pt; border-bottom: 1px solid #ddd; overflow-wrap: anywhere; }
  #printReport .recap-label { width: 28%; font-weight: 600; color: #485466; }
  #printReport .print-subtitle { color: #596575; }
  #printReport .print-status { padding: 7pt 10pt; margin-top: 10pt; background: #eff7f1; border-left: 3pt solid #2e7d32; font-weight: 700; }
  #printReport ol,#printReport ul { padding-left: 22pt; }
  #printReport li { margin: 5pt 0; break-inside: avoid; }
  #printReport tr { break-inside: avoid; }
  #printReport .print-link-commands { font-family: var(--font-mono); }
  #printReport .print-footer { border-top: 1px solid #ddd; margin-top: 16pt; padding-top: 8pt; font-size: 8pt; color: #667; }
  /* Keep explicit selectors here: the screen chrome must never leak into a guide. */
  .site-header, .site-masthead, nav, .app-shell, .report-area, .wizard-pane, .transcript, .composer-card, .bottom-action-bar,
  .report-bottom-bar, .action-area, button { display: none !important; }
  .print-report, #printReport, #printReport[hidden] { display: block !important; }
  #printReport button { display: none !important; }
}
