:root {
    --red: #b4232c;
    --red-deep: #8e1b22;
    --red-soft: #f8e6e7;
    --navy: #102033;
    --navy-mid: #1b334d;
    --ink: #1c2430;
    --muted: #5c6774;
    --gold: #c4a056;
    --cream: #f4efe6;
    --paper: #fffdf9;
    --line: rgba(16, 32, 51, 0.08);
    --shadow: 0 18px 50px rgba(16, 32, 51, 0.08);
    --shadow-soft: 0 8px 24px rgba(16, 32, 51, 0.05);
    --radius: 1.35rem;
    --font-display: "Fraunces", "Noto Serif Bengali", Georgia, serif;
    --font-body: "Plus Jakarta Sans", "Noto Sans Bengali", sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    min-height: 100dvh;
    font-family: var(--font-body);
    background:
        radial-gradient(900px 480px at 8% -10%, rgba(180, 35, 44, 0.08), transparent 50%),
        radial-gradient(800px 420px at 100% 0%, rgba(196, 160, 86, 0.14), transparent 46%),
        var(--cream);
    color: var(--ink);
    line-height: 1.65;
}

body.locale-bn {
    font-family: "Noto Sans Bengali", var(--font-body);
}

h1, h2, h3, h4, .display-font,
.navbar-brand,
.hero-title {
    font-family: var(--font-display);
    letter-spacing: -0.03em;
    line-height: 1.15;
}

body.locale-bn h1,
body.locale-bn h2,
body.locale-bn h3,
body.locale-bn .navbar-brand,
body.locale-bn .hero-title {
    font-family: "Noto Serif Bengali", var(--font-display);
}

a {
    color: var(--red);
    text-underline-offset: 0.18em;
}

a:hover {
    color: var(--red-deep);
}

.page-shell {
    --page-width: min(1120px, calc(100% - 2rem));
    width: var(--page-width);
    margin: 0 auto;
    padding: 2.2rem 0 3.5rem;
    flex: 1 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 30;
    flex-shrink: 0;
    width: 100%;
    padding: 0.85rem 0;
    background: rgba(255, 253, 249, 0.92);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--line);
}

.navbar-brand {
    font-size: 1.15rem;
    font-weight: 650;
    color: var(--navy) !important;
}

.brand-mark {
    width: 2.15rem;
    height: 2.15rem;
    border-radius: 0.7rem;
    margin-right: 0.65rem;
    display: inline-grid;
    place-items: center;
    background: linear-gradient(160deg, var(--red) 0%, #7a1420 100%);
    box-shadow: 0 8px 16px rgba(180, 35, 44, 0.22);
    color: #fff;
}

.site-header .nav-link {
    color: var(--navy-mid);
    font-weight: 600;
    font-size: 0.94rem;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
}

.site-header .nav-link:hover,
.site-header .nav-link.active {
    color: var(--red);
    background: var(--red-soft);
}

.lang-switch {
    padding: 0.2rem;
    border-radius: 999px;
    background: #efe8db;
}

.lang-switch .btn {
    min-width: 3rem;
    border: 0;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 0.04em;
}

.lang-switch .btn.active {
    background: var(--navy);
    color: #fff;
}

.lang-switch .btn:not(.active) {
    background: transparent;
    color: var(--navy-mid);
}

.btn {
    border-radius: 999px;
    font-weight: 650;
    padding: 0.62rem 1.2rem;
}

.btn-canada {
    background: var(--red);
    border-color: var(--red);
    color: #fff;
    box-shadow: 0 10px 22px rgba(180, 35, 44, 0.2);
}

.btn-canada:hover,
.btn-canada:focus {
    background: var(--red-deep);
    border-color: var(--red-deep);
    color: #fff;
}

.btn-ghost {
    background: transparent;
    border: 1px solid rgba(16, 32, 51, 0.14);
    color: var(--navy);
}

.btn-ghost:hover {
    background: #fff;
    color: var(--navy);
    border-color: rgba(16, 32, 51, 0.28);
}

.btn-light-soft {
    background: #fff;
    color: var(--navy);
    border: 0;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: rgba(255, 253, 249, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.eyebrow-dark {
    background: var(--red-soft);
    border-color: transparent;
    color: var(--red);
}

.hero {
    position: relative;
    overflow: hidden;
    border-radius: 2rem;
    padding: 3.4rem 2.4rem;
    color: #fff;
    background:
        linear-gradient(125deg, rgba(16, 32, 51, 0.94) 12%, rgba(180, 35, 44, 0.72) 100%),
        url("https://images.unsplash.com/photo-1503614472-8c93d56e92ce?auto=format&fit=crop&w=1800&q=80") center/cover;
    box-shadow: var(--shadow);
}

.hero::after {
    content: "";
    position: absolute;
    inset: auto -40px -50px auto;
    width: 240px;
    height: 240px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.12), transparent 68%);
    pointer-events: none;
}

.hero-title {
    font-size: clamp(2.1rem, 5vw, 4rem);
    font-weight: 620;
    max-width: 14ch;
}

.hero .lead {
    max-width: 36rem;
    color: rgba(255, 255, 255, 0.86);
    font-size: 1.08rem;
}

.journey-card {
    background: rgba(255, 253, 249, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 1.25rem;
    padding: 1.1rem;
    backdrop-filter: blur(10px);
}

.journey-stop {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 1rem;
    padding: 0.9rem 1rem;
}

.journey-line {
    width: 2px;
    height: 1.4rem;
    margin: 0.25rem 0 0.25rem 1.15rem;
    background: linear-gradient(#fff, rgba(255, 255, 255, 0.2));
}

.stat-row,
.content-card,
.feature-card,
.guide-card,
.todo-item {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
}

.stat-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    overflow: hidden;
}

.stat-item {
    padding: 1.25rem 1.4rem;
    border-right: 1px solid var(--line);
}

.stat-item:last-child {
    border-right: 0;
}

.stat-item strong {
    display: block;
    font-family: var(--font-display);
    font-size: 1.7rem;
    color: var(--navy);
}

.section-kicker {
    color: var(--red);
    font-weight: 700;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.feature-card,
.guide-card {
    height: 100%;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.feature-card:hover,
.guide-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.feature-icon {
    width: 3.1rem;
    height: 3.1rem;
    border-radius: 1rem;
    display: inline-grid;
    place-items: center;
    background: var(--red-soft);
    color: var(--red);
    font-size: 1.25rem;
}

.feature-icon.soon {
    background: #f4ead0;
    color: #8a6b18;
}

.badge-soon {
    background: #f4ead0;
    color: #8a6b18;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.step-list {
    counter-reset: how;
    list-style: none;
    padding: 0;
    margin: 0;
}

.step-list li {
    position: relative;
    padding: 0 0 1.4rem 3.4rem;
}

.step-list li:last-child {
    padding-bottom: 0;
}

.step-list li::before {
    counter-increment: how;
    content: counter(how);
    position: absolute;
    left: 0;
    top: 0;
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 50%;
    background: var(--navy);
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.why-panel {
    background: var(--navy);
    color: rgba(255, 255, 253, 0.88);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
}

.why-panel h2 {
    color: #fff;
}

.cta-band {
    border-radius: 2rem;
    padding: 2.4rem;
    background:
        linear-gradient(135deg, var(--navy), var(--navy-mid));
    color: #fff;
}

.site-footer {
    position: relative;
    z-index: 25;
    flex-shrink: 0;
    width: 100%;
    margin-top: auto;
    background: var(--navy);
    color: rgba(255, 255, 255, 0.72);
    padding: 2.2rem 0 3.4rem;
}

.footer-inner {
    width: min(1120px, calc(100% - 2rem));
    margin: 0 auto;
}

.footer-brand {
    display: flex;
    align-items: center;
    margin-bottom: 0.7rem;
}

.footer-disclaimer {
    max-width: 46rem;
    margin: 0 0 0.65rem;
    overflow-wrap: anywhere;
}

.footer-phase {
    margin: 0;
    color: rgba(255, 255, 255, 0.45);
}

.sf-toolbar {
    position: fixed !important;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 99999;
}

.page-heading p {
    color: var(--muted);
    max-width: 42rem;
}

.progress-card {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.progress-ring {
    --p: 0;
    width: 7.2rem;
    height: 7.2rem;
    border-radius: 50%;
    background: conic-gradient(var(--red) calc(var(--p) * 1%), #efe6d8 0);
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.progress-ring span {
    width: 5.5rem;
    height: 5.5rem;
    border-radius: 50%;
    background: var(--paper);
    display: grid;
    place-items: center;
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 650;
}

.next-task {
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--line);
}

.next-task:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    background: #f3eee4;
    color: var(--navy);
    font-size: 0.82rem;
    font-weight: 600;
}

.guide-card .category {
    color: var(--red);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.guide-card h3 a,
.guide-card h2 a {
    color: var(--navy);
    text-decoration: none;
}

.guide-card h3 a:hover,
.guide-card h2 a:hover {
    color: var(--red);
}

.todo-item {
    border-left: 5px solid var(--gold);
    transition: transform 0.2s ease;
}

.todo-item.is-done {
    border-left-color: #2f8f5b;
    opacity: 0.78;
}

.todo-item.is-skipped {
    border-left-color: #8b93a0;
}

.status-pill {
    border-radius: 999px;
    padding: 0.35rem 0.7rem;
    font-size: 0.75rem;
    font-weight: 700;
}

.status-pending { background: #fff1d6; color: #8a5a00; }
.status-done { background: #ddf6e8; color: #1d6b40; }
.status-skipped { background: #eceff3; color: #4d5663; }

.choice-grid {
    display: grid;
    gap: 0.75rem;
}

.choice-card {
    margin: 0;
    cursor: pointer;
}

.choice-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.choice-card-body {
    display: block;
    padding: 0.95rem 1rem;
    border-radius: 1rem;
    border: 1px solid var(--line);
    background: #fff;
    font-weight: 600;
    transition: 0.18s ease;
}

.choice-card input:checked + .choice-card-body,
.choice-card:hover .choice-card-body {
    border-color: var(--red);
    background: var(--red-soft);
    color: var(--navy);
}

.quiz-lang {
    display: inline-block;
    min-width: 2.6rem;
    margin-right: 0.45rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--muted);
    font-family: "Plus Jakarta Sans", sans-serif;
}

.quiz-bn {
    font-family: "Noto Sans Bengali", var(--font-body);
}

.quiz-inline {
    display: inline-grid;
    gap: 0.2rem;
    vertical-align: top;
}

.choice-card-body .quiz-en,
.choice-card-body .quiz-bn {
    display: block;
}

.choice-card-body .quiz-bn {
    margin-top: 0.35rem;
    font-weight: 500;
    color: var(--navy-mid);
}

.step-bar {
    display: flex;
    gap: 0.45rem;
    margin-bottom: 1.4rem;
}

.step-bar i {
    height: 6px;
    flex: 1;
    border-radius: 99px;
    background: #e5dccb;
}

.step-bar i.done,
.step-bar i.active {
    background: var(--red);
}

.step-split {
    width: 8px;
    flex: 0 0 8px;
    height: 6px;
    border-radius: 99px;
    background: var(--navy);
    opacity: 0.35;
}

.result-weak {
    border-color: rgba(180, 35, 44, 0.18);
    box-shadow: 0 8px 24px rgba(180, 35, 44, 0.06);
}

.form-control,
.form-select {
    border-radius: 0.9rem;
    border-color: #ddd4c6;
    padding: 0.75rem 0.9rem;
    background: #fff;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--red);
    box-shadow: 0 0 0 0.2rem rgba(180, 35, 44, 0.12);
}

.form-label {
    font-weight: 650;
    color: var(--navy);
}

.auth-card {
    max-width: 480px;
    margin: 0 auto;
}

.article-shell {
    max-width: 760px;
    margin: 0 auto;
}

.article-body {
    font-size: 1.05rem;
    color: #2c3542;
}

.article-body p {
    margin-bottom: 1.05rem;
}

.alert {
    border: 0;
    border-radius: 1rem;
}

.content-card .table {
    --bs-table-bg: transparent;
}

.content-card .table th {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    border-color: var(--line);
}

#g1-timer {
    font-variant-numeric: tabular-nums;
}

.road-sign {
    display: inline-grid;
    place-items: center;
    width: 5.5rem;
    height: 5.5rem;
    flex-shrink: 0;
}

.road-sign svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 6px 12px rgba(16, 32, 51, 0.12));
}

.scene-icon {
    display: inline-grid;
    width: 4.5rem;
    height: 4.5rem;
    flex-shrink: 0;
}

.scene-icon svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 8px 18px rgba(16, 32, 51, 0.1));
}

.guide-card .scene-icon {
    margin-bottom: 0.85rem;
}

.life-points {
    list-style: none;
    padding: 0;
}

.life-points .quiz-pair {
    margin-bottom: 0;
}

.quiz-sign {
    width: 6.5rem;
}

.study-sign-card .category,
.study-rule-card .category,
.guide-card .category {
    color: var(--red);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.study-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    position: sticky;
    top: 4.6rem;
    z-index: 20;
    padding: 0.55rem 0;
    background: var(--cream);
}

.study-filters .chip {
    text-decoration: none;
}

.study-filters .chip.is-active,
.chip.is-active {
    background: var(--navy);
    color: #fff;
}

.study-remember {
    padding: 0.85rem 1rem;
    border-radius: 1rem;
    background: #f8efe0;
    border: 1px solid rgba(196, 160, 86, 0.28);
}

.study-remember strong {
    display: block;
    margin-bottom: 0.35rem;
    color: var(--navy);
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.phrase-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--red);
}

.phrase-they {
    padding: 0.85rem 1rem;
    border-radius: 1rem;
    background: #f6f1e8;
    border: 1px solid rgba(196, 160, 86, 0.22);
}

.phrase-card .quiz-pair.mb-2 {
    margin-bottom: 0.65rem !important;
}

.quiz-pair .quiz-en,
.quiz-pair .quiz-bn {
    line-height: 1.45;
}

.min-w-0 {
    min-width: 0;
}

.trust-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.25rem;
}

.trust-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.55rem;
    border-radius: 99px;
    font-size: 0.72rem;
    font-weight: 700;
    background: #efe8db;
    color: var(--navy);
}

.trust-badge.is-ok {
    background: #e5f4ea;
    color: #1d6b3a;
}

.trust-badge.is-star {
    background: #f8efe0;
    color: #8a5a12;
}

.trust-badge.is-warn {
    background: var(--red-soft);
    color: var(--red-deep);
}

.helper-row {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    text-decoration: none;
    color: inherit;
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--line);
}

.helper-row:last-of-type {
    border-bottom: 0;
}

.helper-avatar {
    display: grid;
    place-items: center;
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 50%;
    background: var(--navy);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
    overflow: hidden;
    line-height: 1;
}

.helper-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.helper-avatar.sm {
    width: 1.85rem;
    height: 1.85rem;
    font-size: 0.62rem;
}

.helper-avatar.lg {
    width: 4.4rem;
    height: 4.4rem;
    font-size: 1.15rem;
}

.photo-upload {
    display: flex;
    gap: 1rem;
    align-items: center;
}

details summary {
    cursor: pointer;
    color: var(--red);
    font-weight: 600;
}

@media (max-width: 767.98px) {
    .hero {
        padding: 2.2rem 1.3rem;
        border-radius: 1.4rem;
    }

    .stat-row {
        grid-template-columns: 1fr;
    }

    .stat-item {
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .todo-item .todo-actions {
        width: 100%;
    }
}
