:root {
    color-scheme: dark;
    --tech-bg: #0a1225;
    --tech-panel: #101b2d;
    --tech-border: #2d3e5c;
    --tech-text: #edf3fc;
    --tech-muted: #a6b5cb;
    --tech-cyan: #70e8f5;
    --bs-body-bg: var(--tech-bg);
    --bs-body-color: var(--tech-text);
    --bs-border-color: var(--tech-border);
    --bs-secondary-color: var(--tech-muted);
}

body.app-shell {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    color: var(--tech-text);
    background: linear-gradient(90deg, #0a1225c0, #0a122520), url("../images/starry-sky.svg") right top / min(100%, 90rem) auto no-repeat, radial-gradient(ellipse at 85% 10%, #254e912b, transparent 55%), var(--tech-bg);
    font-family: "Segoe UI", system-ui, sans-serif;
    line-height: 1.65;
}

.app-shell > .container { flex: 1; }
.app-main { padding: 1.25rem 0 4rem; }
.app-shell h1, .app-shell h2, .app-shell h3 { color: #f1f6ff; letter-spacing: -.035em; line-height: 1.2; }
.app-shell h1 { font-size: clamp(2.4rem, 6vw, 4rem); font-weight: 700; }
.app-shell h2 { font-size: clamp(1.45rem, 3vw, 2rem); font-weight: 650; }
.app-shell h3 { font-size: 1.35rem; }
.app-shell a { color: var(--tech-cyan); text-underline-offset: .25em; }
.app-shell a:hover { color: #b0f5fc; }
.app-shell :focus-visible { outline: 2px solid var(--tech-cyan); outline-offset: 4px; }
.app-shell ::selection { background: #355c75; color: #fff; }
.tech-header { margin-bottom: 0; }
.tech-eyebrow { color: var(--tech-cyan); font: 500 .73rem/1.6 ui-monospace, Consolas, monospace; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 1rem; }
.tech-lead { color: var(--tech-muted); font-size: 1.08rem; max-width: 55ch; }
.tech-gradient { background: linear-gradient(100deg, #70e8f5, #b6a6ff); background-clip: text; -webkit-background-clip: text; color: transparent; }
.tech-heading-dot { color: var(--tech-cyan); }
.tech-dot { display: inline-block; width: .4rem; height: .4rem; margin: 0 .5rem .1rem 0; border-radius: 50%; background: var(--tech-cyan); box-shadow: 0 0 12px #70e8f570; }
.tech-hero { display: grid; grid-template-columns: 1.4fr 1fr; align-items: center; gap: 2rem; padding: clamp(2rem, 6vw, 5rem) 0; }
.tech-hero h1 { font-size: clamp(2.6rem, 5.5vw, 4.8rem); line-height: 1.08; margin-bottom: 1.5rem; }
.tech-hero .tech-lead { margin-bottom: 1.75rem; }
.tech-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.app-shell .btn { border-radius: .65rem; padding: .65rem 1rem; font-weight: 600; transition: background .2s ease, border-color .2s ease, box-shadow .2s ease; }
.app-shell .btn-primary, .app-shell .bible-chat-send { color: #07131f; background: #70e8f5; border: 1px solid #70e8f5; }
.app-shell .btn-primary:hover, .app-shell .bible-chat-send:hover { color: #07131f; background: #a0f2fa; border-color: #a0f2fa; box-shadow: 0 0 24px #70e8f525; }
.app-shell .btn-outline-secondary { color: #d3dff0; background: #ffffff03; border-color: #425671; }
.app-shell .btn-outline-secondary:hover { color: #fff; background: #1e3049; border-color: #70e8f5; }
.app-shell .btn-sm { padding: .4rem .75rem; font-size: .8rem; }
.tech-orbit { position: relative; width: min(100%, 20rem); aspect-ratio: 1; justify-self: center; display: grid; place-items: center; background: radial-gradient(circle, #38dcf018, transparent 65%); }
.tech-orbit::before, .tech-orbit::after, .tech-orbit-ring { content: ""; position: absolute; inset: 10%; border: 1px solid #70e8f530; border-radius: 50%; }
.tech-orbit::before { inset: 0; border-style: dashed; border-color: #8c7bff35; }
.tech-orbit::after { inset: 22%; border-color: #8c7bff55; }
.tech-orbit-ring { border-top-color: #70e8f5; border-right-color: #8c7bff; animation: tech-orbit-spin 28s linear infinite; }
.tech-orbit-core { display: grid; place-content: center; grid-auto-flow: column; width: 6rem; height: 6rem; border: 1px solid #70e8f570; border-radius: 1.5rem; background: linear-gradient(140deg, #163a50, #23223f); color: #eefbff; font: 700 2.5rem ui-monospace, monospace; box-shadow: 0 0 50px #38dcf018; transform: rotate(-8deg); }
.tech-orbit-core span { color: var(--tech-cyan); }
.tech-orbit-label { position: absolute; bottom: 4%; padding: .3rem .7rem; background: var(--tech-bg); color: #a6b5cb; font: .65rem ui-monospace, monospace; letter-spacing: .18em; }
@keyframes tech-orbit-spin { to { transform: rotate(360deg); } }
.tech-section { padding: 1rem 0 2rem; }
.tech-section-heading { display: flex; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: 1.5rem; }
.tech-section-heading .tech-eyebrow { margin-bottom: .4rem; }
.tech-section-heading h2 { margin: 0; }
.tech-section-caption { color: var(--tech-muted); font-size: .85rem; }
.tech-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.1rem; }
.app-shell .tech-feature-card { display: flex; flex-direction: column; padding: 1.6rem; border: 1px solid var(--tech-border); border-radius: 1rem; background: linear-gradient(140deg, #132137, #0e1727); text-decoration: none; color: var(--tech-text); transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.app-shell .tech-feature-card:hover, .app-shell .product-card:hover { transform: translateY(-5px); border-color: #70e8f580; box-shadow: 0 12px 35px #0003; }
.tech-card-top { display: flex; justify-content: space-between; align-items: center; color: #9eafc7; }
.tech-card-number { font: .65rem ui-monospace, monospace; letter-spacing: .08em; }
.tech-card-symbol, .tech-empty-symbol { display: grid; place-items: center; width: 3rem; height: 3rem; margin: 1.75rem 0 1.25rem; border: 1px solid #70e8f530; border-radius: .8rem; background: #70e8f508; color: var(--tech-cyan); font-size: 1.8rem; }
.tech-feature-card p { color: var(--tech-muted); font-size: .93rem; margin-bottom: 1.5rem; }
.tech-card-link { display: flex; justify-content: space-between; gap: 1rem; margin-top: auto; padding-top: 1rem; border-top: 1px solid var(--tech-border); color: var(--tech-cyan); font-size: .8rem; font-weight: 600; }
.tech-page-heading { padding: 2.5rem 0 1.5rem; }
.tech-page-heading .tech-eyebrow { margin-bottom: .75rem; }
.tech-page-heading h1 { margin-bottom: 1rem; }
.tech-panel { padding: clamp(1.5rem, 4vw, 3rem); border: 1px solid var(--tech-border); border-radius: 1rem; background: linear-gradient(130deg, #132137, #0e1727); }
.tech-empty { text-align: center; padding-block: clamp(2.5rem, 6vw, 5rem); }
.tech-empty-symbol { margin: 0 auto 1.5rem; width: 4rem; height: 4rem; font-size: 2.4rem; }
.tech-empty p:not(.tech-eyebrow), .tech-prose p:not(.tech-eyebrow) { color: var(--tech-muted); }
.tech-empty .btn { margin-top: 1rem; }
.tech-prose { max-width: 55rem; }
.app-shell .app-footer { position: static; margin-top: auto; width: 100%; line-height: 1.6; white-space: normal; padding: 1.4rem 0; border-top: 1px solid var(--tech-border); background: #0b1120; color: var(--tech-muted); font-size: .8rem; }
.app-footer span { margin: 0 .75rem; color: #53657e; }
.app-footer a { text-decoration: none; }
.app-shell .form-control, .app-shell .form-select { color: var(--tech-text); background-color: #0b1423; border-color: #425671; border-radius: .6rem; }
.app-shell .form-control::placeholder, .app-shell .form-select::placeholder { color: #94a6bf; }
.app-shell .form-control:focus, .app-shell .form-select:focus { border-color: var(--tech-cyan); box-shadow: 0 0 0 .2rem #70e8f51c; }
.app-shell .form-control:disabled, .app-shell .form-select:disabled { color: #94a6bf; background-color: #152034; opacity: 1; }
.app-shell .form-text, .app-shell .text-muted { color: var(--tech-muted) !important; }
.app-shell .table { --bs-table-bg: #101b2d; --bs-table-color: var(--tech-text); --bs-table-border-color: var(--tech-border); --bs-table-striped-bg: #162238; --bs-table-striped-color: var(--tech-text); --bs-table-hover-bg: #20334c; --bs-table-hover-color: #fff; }
.app-shell .text-danger { color: #ff9ca8 !important; }
.app-shell code { color: #b9acff; }
.app-shell .list-group-item { background: #101b2d; border-color: var(--tech-border); color: var(--tech-text); }
.app-shell .list-group-item-action:hover, .app-shell .list-group-item-action:focus { background: #20334c; color: #fff; }
.app-shell .list-group-item.active { color: #07131f; background: #70e8f5; border-color: #70e8f5; }
/* Specificity keeps the reader consistent when bible.css loads within the view. */
.app-shell .bible-reader { max-width: 65rem; color: var(--tech-text); }
.app-shell .bible-intro { text-align: left; padding-top: 1.5rem; }
.app-shell .bible-eyebrow { color: var(--tech-cyan); font-family: ui-monospace, Consolas, monospace; }
.app-shell .bible-intro h1, .app-shell .bible-chat h2 { font-family: inherit; font-weight: 650; }
.app-shell .bible-intro h1 { font-size: clamp(2.4rem, 6vw, 4rem); }
.app-shell .bible-navigation, .app-shell .bible-chat, .app-shell .bible-reading { background: #101b2d; border-color: var(--tech-border); border-radius: 1rem; box-shadow: none; }
.app-shell .bible-reading { background: #0e192a; }
.app-shell .bible-reading h2, .app-shell .bible-chat-context { border-color: var(--tech-border); }
.app-shell .bible-verses li::marker { color: var(--tech-cyan); }
.app-shell .bible-verses ::selection { background: #355c75; color: #fff; }
.app-shell .bible-chat-badge { color: #a0f2fa; background: #70e8f510; border: 1px solid #70e8f530; }
.app-shell .bible-chat-header p, .app-shell .bible-chat-context, .app-shell .bible-chat-help { color: var(--tech-muted); }
.app-shell .bible-chat-message-guide { background: #1b2a40; }
.app-shell .bible-chat-message-user { background: #193b49; }
.app-shell .bible-chat-author { color: var(--tech-cyan); }
.app-shell .bible-chat-message-error { color: #ffdfbb; background: #38291d; border-color: #8a6743; }
.app-shell .bible-chat-suggestions .btn { color: #d3dff0; border-color: #425671; background: transparent; }
.app-shell .bible-chat-suggestions .btn:hover { color: #fff; background: #20334c; border-color: var(--tech-cyan); }
@media (max-width: 991.98px) {
    .tech-card-grid { gap: .75rem; }
    .app-shell .tech-feature-card { padding: 1.2rem; }
}
@media (max-width: 767.98px) {
    .tech-hero { grid-template-columns: 1fr; padding-top: 2rem; }
    .tech-orbit { display: none; }
    .tech-card-grid { grid-template-columns: 1fr; }
    .tech-card-symbol { margin-top: 1rem; }
    .tech-section-heading { align-items: start; flex-direction: column; gap: .5rem; }
    .tech-page-heading { padding-top: 1.5rem; }
    .tech-section-caption { font-size: .8rem; }
    .app-shell .bible-chat-form { flex-wrap: wrap; }
    .app-shell .bible-chat-form input { flex: 1 1 12rem; }
}
@media (prefers-reduced-motion: reduce) {
    .tech-orbit-ring { animation: none; }
    .app-shell .tech-feature-card, .app-shell .product-card, .app-shell .btn { transition: none; }
    .app-shell .tech-feature-card:hover, .app-shell .product-card:hover { transform: none; }
}

/* A restrained starry-night accent over the existing technology theme. */
:root { --star-gold: #e8cb85; }
.tech-gradient { background-image: linear-gradient(105deg, #8cdeef 10%, #a5bce9 60%, #e8cb85); }
.tech-dot { background: var(--star-gold); box-shadow: 0 0 0 4px #e8cb850b, 0 0 15px #e8cb8550; }
.tech-heading-dot { color: var(--star-gold); }
.tech-header::after { background: linear-gradient(90deg, transparent, #638ab5, #e8cb8580, #638ab5, transparent); }
.tech-link::after { background: linear-gradient(90deg, #70d6ed, #e8cb85); }
.tech-nav .tech-link.active { border-color: #e8cb8538; background: linear-gradient(120deg, #4777b820, #e8cb850a); }
.tech-link.active .tech-link-number { color: var(--star-gold); }
.tech-orbit { background: radial-gradient(ellipse, #446bb52b, transparent 66%); }
.tech-orbit::before { inset: 1% 3% 9% 0; border-style: solid; border-color: #6d94c735; border-radius: 46% 54% 56% 44%; transform: rotate(-24deg); box-shadow: 0 0 0 6px #638dc306, 0 0 0 14px #638dc30b; }
.tech-orbit-ring { inset: 12% 7% 16% 10%; border-color: #729dd34a; border-top-color: #e8cb8590; border-right-color: #7194c580; border-radius: 44% 56% 48% 52%; }
.tech-orbit::after { inset: 25% 22% 28% 20%; border-color: #9cbbdc45; border-radius: 54% 46% 52% 48%; box-shadow: 0 0 0 5px #e8cb8505; transform: rotate(24deg); }
.tech-orbit-core { border-color: #e8cb8555; background: linear-gradient(140deg, #1c3b66, #1a2545); box-shadow: 0 0 45px #7d9dcc15; }
.tech-orbit-core span { color: var(--star-gold); }
.tech-orbit-label { color: #d4c9a7; background: #0a1225e6; }
.app-shell .tech-feature-card, .tech-panel { background: linear-gradient(140deg, #17294af2, #101b30f7); }
.app-shell .tech-feature-card:hover, .app-shell .product-card:hover { border-color: #e8cb8565; box-shadow: 0 12px 35px #0003, 0 0 25px #e8cb8506; }
.tech-card-symbol, .tech-empty-symbol { border-color: #e8cb8530; color: var(--star-gold); background: linear-gradient(135deg, #668dc311, #e8cb8508); }
.app-shell .bible-reading { background: linear-gradient(150deg, #15233a, #101c30); }
.app-shell .bible-verses li::marker { color: var(--star-gold); }
@media (max-width: 767.98px) {
    body.app-shell { background-size: auto, 60rem auto, auto, auto; background-position: center, 50% 0, center, center; }
}

/* Authentication shares the night-sky palette and stays usable on small screens. */
.auth-panel { width: 100%; max-width: 32rem; margin: clamp(1rem, 5vw, 4rem) auto; }
.app-shell .auth-panel h1 { font-size: clamp(2rem, 5vw, 2.8rem); }
.auth-panel .tech-lead { font-size: .95rem; }
.auth-form { display: grid; gap: 1.25rem; margin-top: 1.75rem; }
.auth-form .form-label { font-size: .9rem; font-weight: 600; }
.auth-form .text-danger { display: block; font-size: .85rem; margin-top: .35rem; }
.auth-form .validation-summary-valid { display: none; }
.auth-form .validation-summary-errors ul { margin: 0; padding-left: 1.2rem; }
.auth-form .form-control { min-height: 2.9rem; }
.auth-form .input-validation-error { border-color: #ff9ca8; }
.auth-help { margin: 1.5rem 0 0; color: var(--tech-muted); font-size: .8rem; }
.auth-back { display: inline-block; margin-top: 1.5rem; font-size: .85rem; text-decoration: none; }
.tech-account { display: flex; align-items: center; gap: .75rem; margin-left: 1rem; padding-left: 1rem; border-left: 1px solid var(--tech-border); }
.tech-account form { margin: 0; }
.tech-account .btn { white-space: nowrap; }
.tech-account-name { display: inline-block; max-width: 9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--tech-muted); font-size: .8rem; }
@media (max-width: 991.98px) {
    .tech-menu { padding-top: .85rem; border-top: 1px solid #ffffff15; }
    .tech-nav .tech-link { padding: .85rem 1rem; }
    .tech-account { margin: .75rem 0 0; padding: 1rem 0 .25rem; border-left: 0; border-top: 1px solid var(--tech-border); flex-wrap: wrap; }
}

/* Product catalogue. */
.product-grid { column-count: 3; column-gap: 1.25rem; }
.product-card { display: inline-flex; flex-direction: column; width: 100%; margin-bottom: 1.25rem; break-inside: avoid; overflow: hidden; padding: 0; transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.product-content { display: flex; flex-direction: column; flex: 1; padding: 1.5rem; overflow-wrap: anywhere; }
.product-content h3 { margin-bottom: .75rem; font-size: 1.4rem; }
.product-subtitle { color: #d3dff0; font-weight: 500; }
.product-description { color: var(--tech-muted); font-size: .9rem; white-space: pre-line; }
@media (max-width: 1199.98px) { .product-grid { column-count: 2; } }
@media (max-width: 767.98px) { .product-grid { column-count: 1; } }
