:root {
    color-scheme: light;
    --royal-purple: #4B2E83;
    --cosmic-violet: #7A3FFF;
    --electric-blue: #2D9CFF;
    --heavenly-pink: #FF6FD8;
    --divine-gold: #D4AF37;
    --bg: #f7f4ff;
    --surface: #ffffff;
    --surface-2: #f1ecff;
    --ink: #1c1630;
    --muted: #665f7c;
    --line: #ded6f4;
    --accent: var(--royal-purple);
    --accent-2: var(--divine-gold);
    --danger: #9f2f2f;
    --shadow: 0 22px 60px rgba(75, 46, 131, 0.12);
    --reader-size: 18px;
}

body.theme-soft {
    --bg: #fbf6ff;
    --surface: #ffffff;
    --surface-2: #f5edff;
    --ink: #231835;
    --muted: #6f6384;
    --line: #e6d8f7;
    --accent: var(--royal-purple);
    --accent-2: var(--heavenly-pink);
    --shadow: 0 22px 60px rgba(122, 63, 255, 0.1);
}

body.theme-sky {
    --bg: #f2f9ff;
    --surface: #ffffff;
    --surface-2: #eaf5ff;
    --ink: #152235;
    --muted: #5e6e83;
    --line: #d3e8fb;
    --accent: #225c9f;
    --accent-2: var(--electric-blue);
    --shadow: 0 22px 60px rgba(45, 156, 255, 0.13);
}

body.theme-gold {
    --bg: #fffaf0;
    --surface: #ffffff;
    --surface-2: #fff4d6;
    --ink: #241f14;
    --muted: #716344;
    --line: #ead9a7;
    --accent: var(--royal-purple);
    --accent-2: var(--divine-gold);
    --shadow: 0 22px 60px rgba(212, 175, 55, 0.13);
}

body.theme-rose {
    --bg: #fff5fb;
    --surface: #ffffff;
    --surface-2: #ffeaf7;
    --ink: #2b1730;
    --muted: #745d78;
    --line: #f2d2ea;
    --accent: var(--royal-purple);
    --accent-2: var(--heavenly-pink);
    --shadow: 0 22px 60px rgba(255, 111, 216, 0.12);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        linear-gradient(135deg, rgba(75, 46, 131, 0.14), rgba(45, 156, 255, 0.08) 38%, rgba(255, 111, 216, 0.08) 72%, transparent),
        linear-gradient(180deg, rgba(255, 255, 255, 0.78), transparent 360px),
        var(--bg);
    color: var(--ink);
    font-family: Arial, Helvetica, sans-serif;
}

a {
    color: inherit;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 18px;
    align-items: center;
    padding: 16px 28px;
    background: color-mix(in srgb, var(--surface), transparent 8%);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(16px);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 0;
    overflow: visible;
    background: transparent;
    border: 0;
}

.brand-mark img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.08);
}

.brand small {
    display: block;
    color: var(--muted);
    font-size: 0.78rem;
}

.nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.nav a,
.settings-link,
.button {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 15px;
    border: 1px solid transparent;
    border-radius: 7px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.92rem;
}

.nav a {
    color: var(--muted);
}

.nav a.active,
.nav a:hover,
.settings-link:hover {
    color: var(--ink);
    background: color-mix(in srgb, var(--cosmic-violet), white 86%);
}

.settings-link {
    color: var(--muted);
}

.account-nav {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: end;
    gap: 10px;
}

.account-nav a,
.account-nav button {
    min-height: 36px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--surface);
    color: var(--muted);
    cursor: pointer;
    font: inherit;
    font-weight: 700;
    text-decoration: none;
}

.account-nav form {
    margin: 0;
}

.account-menu {
    position: relative;
}

.account-nav .settings-trigger {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    cursor: pointer;
    overflow: visible;
}

.account-nav .settings-trigger img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.08);
}

.settings-popover {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 50;
    width: min(340px, calc(100vw - 24px));
    display: none;
    gap: 16px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.94)),
        var(--surface);
    box-shadow: var(--shadow);
}

.account-menu:hover .settings-popover,
.settings-popover.open {
    display: grid;
}

.settings-popover-head {
    display: grid;
    gap: 4px;
}

.settings-popover-head strong {
    color: var(--ink);
    font-size: 1rem;
}

.settings-popover-head span {
    color: var(--muted);
    line-height: 1.45;
}

.mini-settings-form {
    display: grid;
    gap: 14px;
}

.settings-popover-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.settings-popover-links a,
.settings-popover-links button {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 10px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--surface-2);
    color: var(--royal-purple);
    cursor: pointer;
    font: inherit;
    font-weight: 800;
    text-align: center;
    text-decoration: none;
}

.popover-logout {
    margin: 0;
}

.settings-popover-links .popover-logout button {
    width: 100%;
}

.account-nudge {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 45;
    width: min(420px, calc(100vw - 44px));
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(75, 46, 131, 0.08), rgba(255, 111, 216, 0.08)),
        var(--surface);
    box-shadow: var(--shadow);
    transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease;
}

.account-nudge.dismissed {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px);
}

.account-nudge img {
    width: 82px;
    height: 82px;
    border-radius: 8px;
    object-fit: cover;
}

.account-nudge strong {
    display: block;
    margin-bottom: 5px;
    color: var(--ink);
    font-size: 1.05rem;
}

.account-nudge p {
    margin-bottom: 12px;
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.45;
}

.account-nudge div div {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.page-shell {
    width: min(1280px, calc(100% - 40px));
    margin: 0 auto;
    padding: 46px 0 84px;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.42fr);
    gap: 22px;
    align-items: stretch;
    padding: 18px 0 6px;
}

.community-hero {
    gap: 34px;
    align-items: start;
    padding: 28px 0 34px;
}

.community-hero h1 {
    max-width: 820px;
    margin-bottom: 22px;
    font-size: clamp(2.6rem, 4.7vw, 4.35rem);
    line-height: 1.08;
}

.community-hero .today-card {
    min-height: 310px;
}

.community-content {
    margin-top: 18px;
}

.home-hero {
    display: grid;
    grid-template-columns: minmax(0, 0.82fr) minmax(480px, 0.78fr);
    gap: 34px;
    align-items: start;
    padding: 28px 0 34px;
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--royal-purple);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    max-width: 900px;
    margin-bottom: 18px;
    font-size: clamp(2.45rem, 5.4vw, 4.8rem);
    line-height: 1.02;
}

h2 {
    margin-bottom: 18px;
    font-size: 1.24rem;
}

h3 {
    line-height: 1.35;
}

p {
    line-height: 1.65;
}

.lede {
    max-width: 760px;
    color: var(--muted);
    font-size: 1.18rem;
    line-height: 1.7;
}

.hero-actions,
.chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.button {
    cursor: pointer;
    background: var(--surface);
    border-color: var(--line);
    color: var(--ink);
}

.button.primary {
    background: linear-gradient(135deg, var(--royal-purple), var(--cosmic-violet));
    border-color: var(--royal-purple);
    color: #fff;
}

.button.danger {
    color: #fff;
    background: var(--danger);
    border-color: var(--danger);
}

.today-card,
.panel,
.metric-grid article {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.panel {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.9)),
        var(--surface);
}

.today-card {
    padding: 24px;
}

.home-card {
    display: grid;
    align-content: center;
    min-height: 260px;
}

.today-card span,
.plan-card span {
    color: var(--divine-gold);
    font-weight: 800;
    font-size: 0.82rem;
    text-transform: uppercase;
}

.today-card strong {
    display: block;
    margin: 14px 0 10px;
    font-size: clamp(1.65rem, 3vw, 2.25rem);
    line-height: 1.08;
}

.mini-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.mini-links a {
    padding: 10px 12px;
    border-radius: 7px;
    background: color-mix(in srgb, var(--divine-gold), white 82%);
    color: var(--royal-purple);
    text-decoration: none;
    font-weight: 800;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin: 18px 0 22px;
}

.quick-reader h2 {
    margin-bottom: 22px;
}

.quick-reader-grid,
.home-search {
    display: grid;
    gap: 16px;
}

.quick-reader-grid {
    grid-template-columns: 0.82fr 1.1fr 0.56fr 0.56fr;
    align-items: end;
}

.quick-reader-grid .button {
    grid-column: 1 / -1;
    min-height: 52px;
}

.quick-passages,
.version-grid {
    display: grid;
    gap: 14px;
    margin-top: 24px;
}

.quick-passages {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.quick-passages a,
.version-grid a {
    display: grid;
    gap: 7px;
    padding: 17px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: linear-gradient(180deg, #ffffff, var(--surface-2));
    text-decoration: none;
}

.quick-passages span,
.version-grid strong {
    color: var(--royal-purple);
    font-weight: 800;
}

.quick-passages strong,
.version-grid span {
    line-height: 1.25;
}

.version-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.home-tool-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(390px, 0.58fr);
    gap: 24px;
    margin-bottom: 24px;
}

.faq-section {
    margin-bottom: 24px;
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.faq-grid article {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: linear-gradient(180deg, #ffffff, var(--surface-2));
}

.faq-grid h3 {
    margin-bottom: 8px;
    font-size: 1rem;
    line-height: 1.3;
}

.compact-chip-row {
    margin-top: 14px;
}

.metric-grid article {
    padding: 16px 18px;
}

.metric-grid strong {
    display: block;
    font-size: 2rem;
}

.metric-grid span,
.muted,
.empty-state {
    color: var(--muted);
}

.empty-state {
    display: grid;
    gap: 5px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-2);
}

.empty-state strong {
    color: var(--ink);
}

.content-grid,
.reader-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.45fr);
    gap: 24px;
    align-items: start;
}

.study-side {
    position: sticky;
    top: 94px;
    align-self: start;
    max-height: calc(100vh - 116px);
    overflow: auto;
}

.content-grid {
    margin-bottom: 30px;
}

.study-grid {
    margin-bottom: 24px;
}

.study-panel {
    display: grid;
    gap: 18px;
}

.study-panel + .study-panel {
    margin-top: 24px;
}

.study-side {
    display: grid;
    gap: 16px;
}

.study-panel h2 {
    margin: 0;
    line-height: 1.25;
}

.study-panel form {
    display: grid;
    gap: 16px;
}

.saved-edit-form {
    display: grid;
    gap: 14px;
}

.readonly-passage {
    display: grid;
    gap: 8px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #fff;
}

.readonly-passage p {
    margin: 0;
}

.saved-detail {
    display: grid;
    gap: 14px;
}

.saved-detail summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    cursor: pointer;
    list-style: none;
}

.saved-detail summary::-webkit-details-marker {
    display: none;
}

.saved-detail summary span {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.saved-detail summary strong,
.saved-detail summary small {
    overflow-wrap: anywhere;
}

.saved-detail summary b {
    flex: 0 0 auto;
    color: var(--royal-purple);
    font-size: 0.86rem;
}

.saved-detail[open] summary {
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line);
}

.saved-detail[open] summary b {
    color: var(--muted);
}

.item-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 10px;
}

.study-panel form.item-actions {
    display: flex;
}

.item-actions label {
    min-width: 160px;
}

.item-actions small {
    margin-left: auto;
}

.study-panel .saved-list {
    gap: 16px;
}

.study-panel .saved-list article {
    display: grid;
    gap: 8px;
}

.study-panel .saved-list p,
.study-panel .saved-list small {
    margin: 0;
}

.verse-note-list {
    display: grid;
    gap: 12px;
    padding-top: 2px;
}

.verse-note-list h3 {
    margin: 0;
    font-size: 0.96rem;
    line-height: 1.25;
}

.home-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.48fr);
    gap: 24px;
}

.home-wide {
    grid-column: 1 / -1;
}

.feature-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.feature-list a {
    min-height: 130px;
    display: grid;
    align-content: space-between;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: linear-gradient(180deg, #ffffff, var(--surface-2));
    text-decoration: none;
}

.feature-list span {
    color: var(--royal-purple);
    font-weight: 800;
    font-size: 0.9rem;
}

.feature-list strong {
    font-size: 1.12rem;
    line-height: 1.22;
}

.refined-list li {
    min-height: 55px;
    align-items: center;
}

.panel {
    padding: 30px;
}

.location-media {
    margin-bottom: 18px;
}

.city-media-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 0.45fr);
    gap: 18px;
    margin-bottom: 18px;
    align-items: stretch;
}

.city-media-row .location-media {
    margin-bottom: 0;
}

.city-media-row-single {
    grid-template-columns: 1fr;
}

.state-location-media .location-image-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.city-hub-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(240px, 0.78fr) minmax(240px, 0.78fr);
    gap: 18px;
    align-items: start;
    margin-bottom: 18px;
}

.city-hub-grid .panel {
    padding: 24px;
}

.city-wide {
    grid-column: span 2;
}

.city-hub-grid .weather-card {
    min-height: 260px;
}

.city-hub-grid .compact-links {
    max-height: 390px;
}

.city-network-panel {
    margin-top: 0;
}

.location-image-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.location-image-grid figure {
    margin: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-2);
}

.location-image-grid img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.location-image-grid figcaption {
    padding: 10px 12px;
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 700;
}

.weather-card {
    display: grid;
    gap: 8px;
    min-height: 350px;
    align-content: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 24px;
    background: var(--surface-2);
}

.weather-card strong {
    font-size: clamp(2.4rem, 7vw, 4rem);
    line-height: 1;
}

.weather-card span {
    color: var(--cosmic-violet);
    font-size: 1.05rem;
    font-weight: 800;
}

.weather-card small {
    color: var(--muted);
}

.zip-coverage {
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
}

.zip-coverage h3 {
    margin-bottom: 12px;
    font-size: 1rem;
}

.zip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.zip-list span {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: color-mix(in srgb, var(--divine-gold), white 84%);
    color: var(--royal-purple);
    font-weight: 800;
}

.notice {
    margin-bottom: 18px;
    padding: 13px 15px;
    border: 1px solid var(--line);
    border-left: 4px solid var(--electric-blue);
    border-radius: 8px;
    background: var(--surface);
    color: var(--ink);
}

.auth-wrap {
    display: grid;
    place-items: start center;
    padding-top: 28px;
}

.auth-card {
    width: min(520px, 100%);
}

.auth-card h1 {
    font-size: clamp(2rem, 5vw, 3.25rem);
}

.auth-card form {
    display: grid;
    gap: 14px;
}

.auth-links {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin: 18px 0 0;
}

.auth-links a {
    color: var(--cosmic-violet);
    font-weight: 800;
}

.page-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
}

.page-heading h1 {
    margin-bottom: 0;
    font-size: clamp(2rem, 5vw, 4rem);
}

.toolbar,
.search-box {
    display: flex;
    align-items: end;
    gap: 12px;
}

label {
    display: grid;
    gap: 9px;
    color: var(--muted);
    font-weight: 700;
    font-size: 0.84rem;
}

input,
select,
textarea {
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--surface);
    color: var(--ink);
    font: inherit;
}

textarea {
    resize: vertical;
    line-height: 1.5;
}

.scripture {
    padding: 28px;
}

.reader-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    margin-bottom: 18px;
}

.reader-actions strong {
    display: block;
    margin-top: 4px;
    font-size: 1.2rem;
}

.reader-actions small {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-weight: 700;
}

.verse {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: start;
    margin: 0 -12px;
    padding: 16px 12px;
    border-bottom: 1px solid var(--line);
    border-radius: 8px;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: var(--reader-size);
    line-height: 1.75;
    cursor: pointer;
    scroll-margin-top: 140px;
    transition: background-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.verse-text {
    min-width: 0;
}

.verse:hover,
.verse:focus-visible {
    background: color-mix(in srgb, var(--cosmic-violet), white 92%);
}

.verse:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--electric-blue), white 25%);
    outline-offset: 2px;
}

.verse:last-child {
    border-bottom: 0;
}

.verse-target {
    background: color-mix(in srgb, var(--divine-gold), white 84%);
    box-shadow: inset 4px 0 0 var(--divine-gold);
}

.verse sup {
    color: var(--cosmic-violet);
    font-family: Arial, Helvetica, sans-serif;
    font-weight: 800;
}

.inline-action {
    justify-self: end;
    margin-left: 0;
    margin-top: 3px;
    padding: 5px 8px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface-2);
    color: var(--ink);
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 800;
}

.stack-list,
.result-list,
.saved-list {
    display: grid;
    gap: 14px;
}

.stack-list a,
.result-list article,
.result-list .result-card,
.saved-list article {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--surface-2);
    text-decoration: none;
}

.result-list .result-card {
    display: grid;
    gap: 8px;
    color: var(--ink);
    cursor: pointer;
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.result-list .result-card:hover,
.result-list .result-card:focus-visible {
    border-color: color-mix(in srgb, var(--cosmic-violet), white 35%);
    box-shadow: 0 16px 38px rgba(75, 46, 131, 0.14);
    transform: translateY(-1px);
    outline: none;
}

.result-list .result-card p {
    margin: 0;
}

.section-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 28px 0 16px;
}

.section-header h3 {
    margin: 0;
    font-size: 1.06rem;
}

.section-header a {
    color: var(--royal-purple);
    font-weight: 800;
    text-decoration: none;
}

.city-sample-list {
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.stack-list span {
    display: block;
    margin-top: 7px;
    color: var(--muted);
    line-height: 1.45;
}

.compact-links {
    max-height: 560px;
    overflow: auto;
    padding-right: 8px;
}

.task-list {
    display: grid;
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.task-list li {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 17px 0;
    border-bottom: 1px solid var(--line);
}

.task-list li:last-child {
    border-bottom: 0;
}

.task-list b,
.status {
    white-space: nowrap;
    color: var(--royal-purple);
}

.chip-row a {
    padding: 11px 14px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--electric-blue), white 86%);
    text-decoration: none;
    font-weight: 800;
}

.plan-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.plan-reading-list {
    display: grid;
    gap: 10px;
    margin: 0;
    padding-left: 20px;
}

.plan-reading-list li {
    padding: 8px 0;
}

.plan-reading-list a {
    display: grid;
    gap: 3px;
    text-decoration: none;
}

.plan-reading-list span,
.next-reading span {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 800;
}

.plan-reading-list strong,
.next-reading a {
    color: var(--royal-purple);
    font-weight: 800;
}

.compact-plan-list {
    padding-left: 0;
    list-style: none;
}

.compact-plan-list li {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    border-top: 1px solid var(--line);
}

.compact-plan-list li.is-complete {
    opacity: 0.72;
}

.compact-plan-list li.is-complete strong {
    text-decoration: line-through;
}

.plan-progress {
    height: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: var(--surface-2);
    border: 1px solid var(--line);
}

.plan-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(135deg, var(--royal-purple), var(--electric-blue));
}

.next-reading {
    display: grid;
    gap: 4px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: color-mix(in srgb, var(--divine-gold), white 86%);
}

.toast {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 40;
    max-width: min(340px, calc(100% - 36px));
    padding: 13px 15px;
    border-radius: 7px;
    background: var(--ink);
    color: var(--surface);
    box-shadow: var(--shadow);
}

.legal-copy {
    display: grid;
    gap: 18px;
}

.legal-copy h2 {
    margin-bottom: 8px;
}

.legal-copy ul {
    margin: 0;
    padding-left: 20px;
    line-height: 1.7;
}

.site-footer {
    width: min(1280px, calc(100% - 40px));
    display: grid;
    grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1.28fr);
    gap: 34px;
    align-items: start;
    margin: 0 auto;
    padding: 34px 0 42px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.9rem;
}

.footer-brand {
    display: grid;
    gap: 16px;
}

.footer-brand p {
    max-width: 420px;
    margin: 0;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
}

.footer-links div {
    display: grid;
    align-content: start;
    gap: 10px;
}

.footer-links h2 {
    margin: 0 0 4px;
    color: var(--ink);
    font-size: 0.92rem;
}

.site-footer a,
.site-footer span {
    color: var(--muted);
    font-weight: 700;
    text-decoration: none;
    line-height: 1.4;
}

.site-footer a:hover {
    color: var(--ink);
}

@media (max-width: 860px) {
    .topbar,
    .hero,
    .home-hero,
    .home-tool-grid,
    .home-grid,
    .content-grid,
    .city-media-row,
    .city-hub-grid,
    .reader-layout,
    .page-heading,
    .reader-actions,
    .toolbar,
    .search-box {
        grid-template-columns: 1fr;
    }

    .topbar {
        display: grid;
    }

    .account-nav {
        justify-content: start;
        flex-wrap: wrap;
    }

    .settings-popover {
        right: auto;
        left: 0;
    }

    .nav {
        justify-content: start;
        overflow-x: auto;
    }

    .page-heading,
    .reader-actions,
    .toolbar,
    .search-box {
        display: grid;
        align-items: stretch;
    }

    .study-side {
        position: static;
        max-height: none;
        overflow: visible;
    }

    .metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .feature-list {
        grid-template-columns: 1fr;
    }

    .quick-reader-grid {
        grid-template-columns: 1fr;
    }

    .quick-passages {
        grid-template-columns: 1fr;
    }

    .plan-grid {
        grid-template-columns: 1fr;
    }

    .faq-grid {
        grid-template-columns: 1fr;
    }

    .home-wide {
        grid-column: auto;
    }

    .location-image-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .city-wide {
        grid-column: auto;
    }

    .site-footer,
    .footer-links {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .page-shell {
        width: min(100% - 22px, 1180px);
        padding-top: 22px;
    }

    .topbar {
        padding: 12px;
    }

    .metric-grid {
        grid-template-columns: 1fr;
    }

    .location-image-grid {
        grid-template-columns: 1fr;
    }

    .panel,
    .scripture {
        padding: 17px;
    }

    .account-nudge {
        right: 11px;
        bottom: 11px;
        width: calc(100vw - 22px);
        grid-template-columns: 64px minmax(0, 1fr);
        padding: 13px;
    }

    .account-nudge img {
        width: 64px;
        height: 64px;
    }
}
