:root { color: #243b53; background: #f3f0e8; font-family: "IBM Plex Sans", "Segoe UI", sans-serif; line-height: 1.55; }
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
button, a { font: inherit; }
.page-shell { display: grid; grid-template-columns: minmax(230px, 28vw) 1fr; min-height: 100vh; }
.rail { background: #102a43; color: #fffdf8; display: flex; flex-direction: column; min-height: 100vh; padding: 34px clamp(24px, 5vw, 72px); }
.brand { align-items: center; color: inherit; display: flex; font-family: Georgia, serif; font-size: 1.05rem; gap: 12px; line-height: 1.05; position: relative; text-decoration: none; width: max-content; }
.reader-arrow { height: 40px; left: calc(100% + 8px); overflow: visible; pointer-events: none; position: absolute; top: -2px; width: 60px; }
.brand:hover .reader-arrow, .brand:focus-visible .reader-arrow { filter: brightness(1.08) saturate(1.15); }
.brand-mark { align-items: center; border: 1px solid #f0b429; color: #f0b429; display: inline-flex; font-family: "IBM Plex Sans", sans-serif; font-size: .72rem; font-weight: 700; height: 34px; justify-content: center; letter-spacing: .08em; width: 34px; }
.rail-copy { margin: clamp(80px, 20vh, 190px) 0 auto; max-width: 250px; }
.rail h1 { font-family: Georgia, serif; font-size: clamp(2.3rem, 5vw, 4.5rem); font-weight: 400; line-height: .95; margin: 12px 0 24px; }
.rail-copy p:not(.kicker) { color: #bcccdc; }
.github-link { align-items: center; color: #d9e2ec; display: inline-flex; gap: 8px; margin-top: 16px; text-decoration: none; }
.github-link:hover, .github-link:focus-visible { color: #f0b429; }
.github-icon { height: 20px; width: 20px; }
.github-resources { color: #bcccdc; display: grid; font-size: .75rem; gap: 3px; line-height: 1.35; margin-top: 14px; overflow-wrap: anywhere; }
.github-resources a { color: #d9e2ec; }
.github-resources a:hover, .github-resources a:focus-visible { color: #f0b429; }
.kicker { color: #1f7a8c; font-size: .7rem; font-weight: 700; letter-spacing: .16em; margin: 0; }
.rail .kicker { color: #f0b429; }
.rail-links { bottom: 34px; display: flex; flex-direction: column; gap: 18px; left: clamp(24px, 5vw, 72px); position: fixed; z-index: 4; }
.back-link { color: #d9e2ec; text-decoration: none; }
.back-link:hover, .back-link:focus-visible { color: #f0b429; }
.content { background: #fffdf8; padding: 34px clamp(24px, 6vw, 92px) 80px; }
.topbar { align-items: flex-start; border-bottom: 1px solid #d9e2ec; display: flex; gap: 20px; justify-content: space-between; padding-bottom: 28px; }
.topbar h2 { font-family: Georgia, serif; font-size: clamp(2rem, 4vw, 3.5rem); font-weight: 400; line-height: 1.05; margin: 10px 0 0; max-width: 650px; }
.topbar-tagline { color: #627d98; font-size: .92rem; margin: 14px 0 0; }
button { border: 0; cursor: pointer; }
.login-button { background: #f0b429; color: #102a43; font-weight: 700; padding: 12px 16px; white-space: nowrap; }
.session-panel { align-items: center; background: #f3f0e8; display: flex; gap: 10px; margin: 28px 0 50px; padding: 13px 16px; }
.session-panel.active { background: #e3f8f2; }
.session-dot { background: #b44b3e; border-radius: 50%; height: 9px; width: 9px; }
.session-panel.active .session-dot { background: #147d64; }
.generator-panel { background: #f3f0e8; border-left: 3px solid #f0b429; margin: -24px 0 42px; padding: 22px; }
.generator-panel h3 { font-family: Georgia, serif; font-size: 1.7rem; font-weight: 400; margin: 6px 0 10px; }
.generator-actions { align-items: center; display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.generator-actions input { border: 1px solid #bcccdc; color: #243b53; flex: 1 1 240px; min-width: 180px; padding: 11px 12px; }
.purchase-button { background: #2f5d50; color: #fffdf8; font-weight: 700; padding: 10px 14px; }
.generator-panel a { color: #102a43; display: inline-block; font-weight: 700; margin-top: 18px; }
.catalog-intro { align-items: end; display: grid; gap: 30px; grid-template-columns: minmax(180px, 1fr) minmax(220px, 1fr); margin-bottom: 24px; }
.catalog-intro h3 { font-family: Georgia, serif; font-size: 2rem; font-weight: 400; margin: 8px 0 0; }
.catalog-intro > p { color: #627d98; margin: 0; }
.catalog { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.generator-download-section { border-top: 1px solid #d9e2ec; margin-top: 54px; padding-top: 34px; }
.generator-intro { margin-bottom: 24px; }
.generator-intro h3 { color: #2f5d50; }
.course-card { border-top: 3px solid #1f7a8c; background: #f3f0e8; min-height: 210px; padding: 22px; }
.course-card h4 { font-family: Georgia, serif; font-size: 1.35rem; font-weight: 400; margin: 0 0 6px; }
.course-card p { color: #486581; }
.course-meta { color: #1f7a8c !important; font-size: .82rem; }
.download-link { background: transparent; color: #102a43; font-weight: 700; padding: 0; text-align: left; }
.download-link:disabled { color: #627d98; cursor: not-allowed; }
.catalog-placeholder { border: 1px dashed #bcccdc; color: #627d98; padding: 40px 20px; text-align: center; }
.error-block { border-color: #d64545; color: #b44b3e; }
.login-modal { align-items: center; background: rgba(16, 42, 67, .62); display: flex; inset: 0; justify-content: center; padding: 20px; position: fixed; z-index: 5; }
.login-modal[hidden] { display: none; }
.login-dialog { background: #fffdf8; max-width: 390px; padding: 34px; position: relative; text-align: center; width: 100%; }
.login-dialog h2 { font-family: Georgia, serif; font-size: 2rem; font-weight: 400; margin: 8px 0; }
.login-close { background: transparent; color: #627d98; font-size: 1.5rem; padding: 2px 8px; position: absolute; right: 12px; top: 10px; }
.login-qrcode { background: white; border: 1px solid #d9e2ec; display: block; height: 280px; margin: 20px auto; object-fit: contain; width: 280px; }
.login-status { min-height: 44px; }
.login-status.error { color: #b44b3e; }
.login-debug { background: #f0f4f8; color: #334e68; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .72rem; line-height: 1.4; margin: 8px 0; overflow-wrap: anywhere; padding: 8px; text-align: left; }
.secondary-button { background: #d9eaf7; color: #102a43; font-weight: 700; padding: 10px 14px; }
.login-hint { color: #627d98; font-size: .88rem; }
.payment-dialog { max-width: 430px; }
.payment-product { align-items: baseline; border-bottom: 1px solid #d9e2ec; display: flex; justify-content: space-between; margin: 18px 0; padding-bottom: 12px; }
.payment-product strong { color: #2f5d50; font-size: 1.35rem; }
.payment-fallback { background: #f3f0e8; color: #486581; font-size: .88rem; padding: 14px; text-align: left; }
.payment-fallback p { margin: 0 0 10px; }
.payment-fallback code { background: #fffdf8; color: #102a43; display: block; overflow-wrap: anywhere; padding: 8px; }
.payment-ticket-label { margin-top: 12px !important; }
.payment-debug-ticket { background: #fff4d6; border: 1px solid #d9b44a; color: #6b4f00; font-size: .82rem; margin-top: 12px; padding: 10px; text-align: left; }
.payment-debug-ticket code { display: block; margin-top: 6px; overflow-wrap: anywhere; user-select: all; }
.toast { background: #102a43; bottom: 20px; color: #fffdf8; display: none; left: 50%; padding: 12px 16px; position: fixed; transform: translateX(-50%); z-index: 8; }
.toast.show { display: block; }
@media (max-width: 760px) { .page-shell { display: block; } .rail { min-height: auto; padding: 24px; } .rail-copy { margin: 60px 0 20px; } .rail-links { background: #102a43; bottom: 0; gap: 12px; left: 0; padding: 12px 24px; right: 0; } .topbar, .catalog-intro { display: block; } .login-button, .purchase-button, .secondary-button { margin-top: 22px; width: 100%; } .catalog-intro > p { margin-top: 16px; } }
