/* ==========================================================================
   4NoteZ landing — clean SaaS refresh
   Nguyên tắc: nền trắng / xám-xanh rất nhạt xen kẽ; phân tách bằng spacing,
   border, card và typography. Gradient chỉ dùng nhẹ ở Hero và CTA.
   ========================================================================== */

:root {
    --landing-ink: #0f172a;
    --landing-text: #334155;
    --landing-muted: #64748b;
    --landing-subtle: #94a3b8;
    --landing-line: #e2e8f0;
    --landing-line-soft: #eef2f6;
    --landing-surface: #ffffff;
    --landing-surface-alt: #f8fafc;
    --landing-blue: #2563eb;
    --landing-blue-dark: #1d4ed8;
    --landing-blue-soft: #eff6ff;
    --landing-blue-line: #dbeafe;
    --landing-grid-line: rgba(15, 23, 42, .07);
    --landing-shadow-sm: 0 1px 2px rgba(15, 23, 42, .04);
    --landing-shadow-md: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px -12px rgba(15, 23, 42, .12);
    --landing-shadow-lg: 0 1px 3px rgba(15, 23, 42, .05), 0 24px 48px -24px rgba(15, 23, 42, .18);
    --landing-radius: 1rem;
}

html {
    scroll-behavior: smooth;
}

body {
    color: var(--landing-ink);
}

/* ---------- Hero ---------------------------------------------------------- */

.landing-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    border-bottom: 1px solid var(--landing-line-soft);
    /* Lớp gradient rất nhẹ tạo chiều sâu: sáng ở trên, ngả xanh cực nhạt ở dưới */
    background:
        radial-gradient(34rem 22rem at 12% 8%, rgba(59, 130, 246, .12), transparent 70%),
        radial-gradient(32rem 22rem at 88% 10%, rgba(168, 85, 247, .10), transparent 70%),
        radial-gradient(60rem 26rem at 50% -6rem, rgba(219, 234, 254, .7), transparent 70%),
        linear-gradient(180deg, #ffffff 0%, #fbfcff 40%, #f5f8fe 100%);
}

/* Square grid mờ ở nửa dưới, fade lên trên và ra hai mép */
.landing-hero::before {
    position: absolute;
    z-index: -1;
    right: 0;
    bottom: 0;
    left: 0;
    height: 72%;
    background-image:
        linear-gradient(var(--landing-grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--landing-grid-line) 1px, transparent 1px);
    background-position: center bottom;
    background-size: 48px 48px;
    content: "";
    pointer-events: none;
    -webkit-mask-image:
        linear-gradient(to bottom, transparent 0%, #000 45%, #000 100%),
        linear-gradient(to right, transparent 0%, #000 18%, #000 82%, transparent 100%);
    -webkit-mask-composite: source-in;
    mask-image:
        linear-gradient(to bottom, transparent 0%, #000 45%, #000 100%),
        linear-gradient(to right, transparent 0%, #000 18%, #000 82%, transparent 100%);
    mask-composite: intersect;
}

/* Menu chọn ngôn ngữ trong header thả xuống vượt ra ngoài hero:
   không cắt (overflow visible) và đặt hero nổi trên các section phía sau. */
._lp .landing-hero,
._lp .landing-public-hero {
    z-index: 20;
    overflow: visible;
}

/* Glow cũ không còn dùng */
.landing-hero__glow,
.landing-cta__glow,
.landing-public-hero__glow {
    display: none !important;
}

/* ---------- Header -------------------------------------------------------- */

.landing-header {
    position: relative;
    z-index: 30;
    border-bottom: 1px solid var(--landing-line-soft);
    background: rgba(255, 255, 255, .9);
}

.landing-header__inner {
    display: flex;
    max-width: 80rem;
    min-height: 4.25rem;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    margin: 0 auto;
    padding: .75rem 1rem;
}

.landing-logo {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    gap: .6rem;
    color: var(--landing-ink);
    font-size: 1.3rem;
    font-weight: 900;
    letter-spacing: -.035em;
}

.landing-logo:hover {
    color: var(--landing-ink);
}

.landing-logo img,
.landing-logo__mark {
    width: 2rem;
    height: 2rem;
    border-radius: .6rem;
    object-fit: contain;
}

.landing-logo__mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--landing-blue);
    color: #fff;
}

.landing-logo__accent {
    color: var(--landing-blue);
}

.landing-nav-list {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.landing-nav-link {
    color: var(--landing-muted);
    font-size: .9rem;
    font-weight: 700;
    transition: color .15s ease;
}

.landing-nav-link:hover,
.landing-nav-link:focus-visible {
    color: var(--landing-ink);
}

.landing-header__actions {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.landing-language-button,
.landing-theme-button,
.landing-menu-button {
    display: inline-flex;
    min-height: 2.4rem;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    border: 1px solid var(--landing-line);
    border-radius: .65rem;
    background: #fff;
    color: var(--landing-text);
    font-size: .8rem;
    font-weight: 800;
    transition: border-color .15s, color .15s, background .15s;
}

.landing-language-button {
    padding: 0 .75rem;
}

.landing-language-button:hover,
.landing-theme-button:hover,
.landing-menu-button:hover {
    border-color: #cbd5e1;
    background: var(--landing-surface-alt);
    color: var(--landing-ink);
}

.landing-theme-button,
.landing-menu-button {
    width: 2.4rem;
}

.landing-theme-button__sun {
    display: none;
}

html.dark .landing-theme-button__moon {
    display: none;
}

html.dark .landing-theme-button__sun {
    display: inline-block;
}

.landing-mobile-primary {
    min-height: 2.4rem;
    padding-right: .8rem;
    padding-left: .8rem;
    font-size: .78rem;
    white-space: nowrap;
}

.landing-auth-link {
    display: inline-flex;
    min-height: 2.4rem;
    align-items: center;
    justify-content: center;
    border-radius: .65rem;
    padding: 0 1rem;
    font-size: .86rem;
    font-weight: 800;
    transition: background .15s, border-color .15s, color .15s;
}

.landing-auth-link--quiet {
    border: 1px solid transparent;
    background: transparent;
    color: var(--landing-text);
}

.landing-auth-link--primary {
    border: 1px solid var(--landing-blue);
    background: var(--landing-blue);
    color: #fff;
    box-shadow: var(--landing-shadow-sm);
}

.landing-auth-link--quiet:hover {
    background: var(--landing-surface-alt);
    color: var(--landing-ink);
}

.landing-auth-link--primary:hover {
    border-color: var(--landing-blue-dark);
    background: var(--landing-blue-dark);
    color: #fff;
}

.landing-language-menu {
    min-width: 15rem;
    overflow: hidden;
    border: 1px solid var(--landing-line);
    border-radius: .85rem;
    background: #fff;
    box-shadow: var(--landing-shadow-lg);
}

/* Menu ngôn ngữ: class Tailwind (px-4, py-2.5, w-5…) không có trong file CSS build sẵn của landing */
.landing-language-menu .lang-menu-grid {
    gap: .15rem .25rem;
    padding: .5rem;
}

.landing-language-menu .lang-menu-grid a {
    display: flex;
    align-items: center;
    gap: .6rem;
    border-radius: .55rem;
    padding: .5rem .75rem;
    color: var(--landing-text);
    font-size: .88rem;
    line-height: 1.3;
    transition: background .15s, color .15s;
}

.landing-language-menu .lang-menu-grid a:hover,
.landing-language-menu .lang-menu-grid a.bg-blue-50 {
    background: var(--landing-blue-soft);
    color: var(--landing-blue-dark);
}

.landing-language-menu .lang-menu-grid a.bg-blue-50 {
    font-weight: 700;
}

.landing-language-menu .lang-menu-grid img {
    width: 1.25rem;
    height: .95rem;
    flex-shrink: 0;
    margin: 0;
    border-radius: .2rem;
    object-fit: cover;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, .08);
}

/* ---------- Hero content -------------------------------------------------- */

.landing-hero__intro {
    position: relative;
    z-index: 2;
    max-width: 52rem;
    margin: 0 auto;
    padding: 5.5rem 1rem 3rem;
    text-align: center;
}

.landing-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--landing-line);
    border-radius: 999px;
    background: #fff;
    padding: .4rem .85rem .4rem .7rem;
    color: var(--landing-text);
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .02em;
    box-shadow: var(--landing-shadow-sm);
}

.landing-hero__eyebrow::before {
    width: .45rem;
    height: .45rem;
    border-radius: 999px;
    background: var(--landing-blue);
    content: "";
}

.landing-hero__title {
    max-width: 48rem;
    margin: 0 auto;
    color: var(--landing-ink);
    font-size: clamp(2.3rem, 5vw, 4rem);
    font-weight: 900;
    letter-spacing: -.045em;
    line-height: 1.06;
}

.landing-hero__title-accent {
    color: var(--landing-blue);
}

.landing-hero__description {
    max-width: 40rem;
    margin: 1.4rem auto 0;
    color: var(--landing-muted);
    font-size: 1.125rem;
    line-height: 1.7;
}

.landing-hero__trust {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .6rem;
    margin: 2rem 0 0;
    padding: 0;
    list-style: none;
}

.landing-hero__trust li {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    border: 1px solid var(--landing-line);
    border-radius: 999px;
    background: #fff;
    padding: .4rem .85rem;
    color: var(--landing-text);
    font-size: .82rem;
    font-weight: 700;
}

.landing-hero__trust i {
    color: var(--landing-blue);
}

/* ---------- Hero: hiệu ứng màu nhẹ ------------------------------------- */

/* Phần nhấn của tiêu đề: gradient xanh → cyan → tím, trôi chậm */
.landing-hero__title-accent {
    background: linear-gradient(100deg, #2563eb 0%, #0ea5e9 30%, #7c3aed 60%, #2563eb 100%);
    background-size: 220% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    animation: landing-accent-flow 7s ease-in-out infinite;
}

html.dark .landing-hero__title-accent {
    background-image: linear-gradient(100deg, #60a5fa 0%, #22d3ee 30%, #a78bfa 60%, #60a5fa 100%);
}

@keyframes landing-accent-flow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Chấm xanh ở eyebrow: nhịp sáng lan toả */
.landing-hero__eyebrow::before {
    box-shadow: 0 0 0 0 rgba(37, 99, 235, .45);
    animation: landing-dot-pulse 2.2s ease-out infinite;
}

@keyframes landing-dot-pulse {
    0% { box-shadow: 0 0 0 0 rgba(37, 99, 235, .45); }
    70% { box-shadow: 0 0 0 .45rem rgba(37, 99, 235, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); }
}

/* Mỗi lợi ích một màu nhấn riêng */
.landing-hero__trust li:nth-child(1) i { color: #f59e0b; }
.landing-hero__trust li:nth-child(2) i { color: #10b981; }
.landing-hero__trust li:nth-child(3) i { color: #8b5cf6; }

.landing-hero__trust li {
    transition: border-color .2s, transform .2s, box-shadow .2s;
}

.landing-hero__trust li:hover {
    border-color: #cbd5e1;
    box-shadow: var(--landing-shadow-sm);
    transform: translateY(-1px);
}

@media (prefers-reduced-motion: reduce) {
    .landing-hero__title-accent,
    .landing-hero__eyebrow::before {
        animation: none;
    }
}

/* Mobile: gradient tụ giữa, ngay sau khối chữ hero */
@media (max-width: 991.98px) {
    .landing-hero {
        background:
            radial-gradient(16rem 12rem at 30% 15rem, rgba(59, 130, 246, .16), transparent 72%),
            radial-gradient(16rem 12rem at 70% 17rem, rgba(168, 85, 247, .13), transparent 72%),
            radial-gradient(26rem 18rem at 50% 16rem, rgba(14, 165, 233, .08), transparent 72%),
            linear-gradient(180deg, #ffffff 0%, #fbfcff 40%, #f5f8fe 100%);
    }

    html.dark body .landing-hero {
        background:
            radial-gradient(16rem 12rem at 30% 15rem, rgba(37, 99, 235, .22), transparent 72%),
            radial-gradient(16rem 12rem at 70% 17rem, rgba(139, 92, 246, .18), transparent 72%),
            radial-gradient(26rem 18rem at 50% 16rem, rgba(6, 182, 212, .10), transparent 72%),
            linear-gradient(180deg, #0a1220 0%, #0a1220 40%, #0c1524 100%);
    }
}

/* ---------- Sections ------------------------------------------------------ */

.landing-section {
    position: relative;
    padding: 6.5rem 1rem;
}

.landing-section__inner {
    position: relative;
    max-width: 72rem;
    margin: 0 auto;
}

.landing-section__header {
    max-width: 42rem;
    margin: 0 auto 3.5rem;
    text-align: center;
}

.landing-section__eyebrow,
.landing-cta__eyebrow {
    display: inline-block;
    margin-bottom: .85rem;
    color: var(--landing-blue);
    font-size: .78rem;
    font-weight: 900;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.landing-section__title {
    margin: 0;
    color: var(--landing-ink);
    font-size: clamp(1.9rem, 3.6vw, 2.75rem);
    font-weight: 900;
    letter-spacing: -.035em;
    line-height: 1.12;
}

.landing-section__description {
    margin: 1rem auto 0;
    color: var(--landing-muted);
    font-size: 1.05rem;
    line-height: 1.7;
}

/* Features — nền trắng, lưới card có border */
.landing-features {
    background: var(--landing-surface);
}

.landing-feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
}

.landing-feature-card {
    position: relative;
    border: 1px solid var(--landing-line);
    border-radius: var(--landing-radius);
    background: #fff;
    padding: 1.75rem;
    text-align: left;
    transition: border-color .2s, box-shadow .2s;
}

.landing-feature-card:hover {
    border-color: #cbd5e1;
    box-shadow: var(--landing-shadow-md);
}

.landing-feature-card__icon {
    display: inline-flex;
    width: 2.75rem;
    height: 2.75rem;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    border: 1px solid var(--landing-blue-line);
    border-radius: .75rem;
    background: var(--landing-blue-soft);
    color: var(--landing-blue);
    font-size: 1.1rem;
}

.landing-feature-card h3 {
    margin: 0;
    color: var(--landing-ink);
    font-size: 1.06rem;
    font-weight: 800;
    letter-spacing: -.01em;
}

.landing-feature-card p {
    margin: .55rem 0 0;
    color: var(--landing-muted);
    font-size: .93rem;
    line-height: 1.65;
}

/* FAQ — nền xám-xanh rất nhạt để xen kẽ với Features */
.landing-faq {
    border-top: 1px solid var(--landing-line-soft);
    border-bottom: 1px solid var(--landing-line-soft);
    background: var(--landing-surface-alt);
}

.landing-faq__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 1.25rem;
    text-align: left;
}

.landing-faq__column {
    overflow: hidden;
    border: 1px solid var(--landing-line);
    border-radius: var(--landing-radius);
    background: #fff;
    box-shadow: var(--landing-shadow-sm);
}

.landing-faq__column > div + div {
    border-top: 1px solid var(--landing-line-soft);
}

.landing-faq__question {
    min-height: 4.25rem;
    align-items: center !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: #fff;
    padding: 1.1rem 1.25rem !important;
    color: var(--landing-ink) !important;
    font-size: .95rem;
    font-weight: 800 !important;
    line-height: 1.45;
    text-align: left;
    transition: background .15s, color .15s;
}

.landing-faq__question:hover {
    background: var(--landing-surface-alt) !important;
}

.landing-faq__question[aria-expanded="true"] {
    background: #fff !important;
    color: var(--landing-blue-dark) !important;
}

.landing-faq__question:focus-visible {
    outline: 2px solid #93c5fd;
    outline-offset: -2px;
}

.landing-faq__question span {
    align-items: center !important;
}

.landing-faq__question span i {
    color: var(--landing-subtle);
}

.landing-faq__question[aria-expanded="true"] span i {
    color: var(--landing-blue);
}

.landing-faq__question > i {
    flex-shrink: 0;
    color: var(--landing-subtle);
    font-size: .78rem;
}

.landing-faq__answer {
    border: 0 !important;
    background: #fff;
    padding: 0 1.25rem 1.25rem 2.95rem !important;
}

.landing-faq__answer p {
    margin: 0;
    color: var(--landing-muted) !important;
    font-size: .92rem;
    line-height: 1.75;
}

/* CTA — section nhấn mạnh: gradient xanh nhạt, chuyển sắc mềm */
.landing-cta {
    position: relative;
    isolation: isolate;
    max-width: 72rem;
    overflow: hidden;
    margin: 6.5rem auto;
    border: 1px solid var(--landing-blue-line);
    border-radius: 1.5rem;
    background:
        radial-gradient(40rem 18rem at 50% 0%, rgba(255, 255, 255, .9), transparent 70%),
        linear-gradient(135deg, #eff6ff 0%, #f5f8ff 50%, #eef2ff 100%);
}

.landing-cta::before {
    content: none;
}

.landing-cta__content {
    max-width: 44rem;
    margin: 0 auto;
    padding: 4.5rem 2rem;
    text-align: center;
}

.landing-cta h2 {
    margin: 0;
    color: var(--landing-ink);
    font-size: clamp(1.9rem, 3.6vw, 2.75rem);
    font-weight: 900;
    letter-spacing: -.035em;
    line-height: 1.12;
}

.landing-cta__content > p {
    max-width: 36rem;
    margin: 1rem auto 0;
    color: var(--landing-muted);
    font-size: 1.05rem;
    line-height: 1.7;
}

.landing-cta__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .75rem;
    margin-top: 2rem;
}

.landing-cta__button {
    display: inline-flex;
    min-height: 3rem;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    border-radius: .75rem;
    padding: 0 1.35rem;
    font-size: .92rem;
    font-weight: 800;
    transition: border-color .15s, background .15s, color .15s;
}

.landing-cta__button--primary {
    border: 1px solid var(--landing-blue);
    background: var(--landing-blue);
    color: #fff;
    box-shadow: var(--landing-shadow-sm);
}

.landing-cta__button--primary:hover {
    border-color: var(--landing-blue-dark);
    background: var(--landing-blue-dark);
    color: #fff;
}

.landing-cta__button--secondary {
    border: 1px solid var(--landing-line);
    background: #fff;
    color: var(--landing-text);
}

.landing-cta__button--secondary:hover {
    border-color: #cbd5e1;
    color: var(--landing-ink);
}

.landing-cta__note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    margin-top: 1.25rem;
    color: var(--landing-muted);
    font-size: .8rem;
    font-weight: 700;
}

.landing-cta__note i {
    color: var(--landing-blue);
}

/* ---------- Create-note card (ghi đè nhẹ style inline trong partial) ---- */

._lp .nz-card {
    border-color: var(--landing-line);
    background: #fff;
    box-shadow: var(--landing-shadow-lg);
    backdrop-filter: none;
}

._lp .nz-card::before {
    content: none;
}

._lp .nz-head {
    border-bottom-color: var(--landing-line-soft);
}

._lp .nz-head-icon {
    border-color: var(--landing-blue-line);
    background: var(--landing-blue-soft);
    box-shadow: none;
}

._lp .nz-aside {
    border-color: var(--landing-line);
    background: var(--landing-surface-alt);
}

._lp .nz-seg {
    background: #eef2f6;
}

._lp .nz-submit {
    background: var(--landing-blue);
    box-shadow: var(--landing-shadow-sm);
}

._lp .nz-submit:hover {
    background: var(--landing-blue-dark);
    box-shadow: var(--landing-shadow-sm);
    filter: none;
}

/* ---------- Public pages (Terms, Privacy, Report…) ------------------------ */

.landing-public-page {
    min-height: 100vh;
    background: #fff;
}

.landing-public-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    border-bottom: 1px solid var(--landing-line-soft);
    background: linear-gradient(180deg, #ffffff 0%, #f7f9fc 100%);
}

.landing-public-hero::before {
    position: absolute;
    z-index: -1;
    right: 0;
    bottom: 0;
    left: 0;
    height: 70%;
    background-image:
        linear-gradient(var(--landing-grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--landing-grid-line) 1px, transparent 1px);
    background-position: center bottom;
    background-size: 48px 48px;
    content: "";
    pointer-events: none;
    -webkit-mask-image:
        linear-gradient(to bottom, transparent 0%, #000 60%),
        linear-gradient(to right, transparent 0%, #000 20%, #000 80%, transparent 100%);
    -webkit-mask-composite: source-in;
    mask-image:
        linear-gradient(to bottom, transparent 0%, #000 60%),
        linear-gradient(to right, transparent 0%, #000 20%, #000 80%, transparent 100%);
    mask-composite: intersect;
}

.landing-public-hero__inner {
    max-width: 54rem;
    margin: 0 auto;
    padding: 4.5rem 1.5rem 5rem;
    text-align: center;
}

.landing-public-back {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    margin-bottom: 2rem;
    color: var(--landing-muted);
    font-size: .875rem;
    font-weight: 800;
    transition: color .15s ease;
}

.landing-public-back:hover,
.landing-public-back:focus-visible {
    color: var(--landing-blue);
}

.landing-public-hero__icon {
    display: flex;
    width: 3.5rem;
    height: 3.5rem;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    border: 1px solid var(--landing-blue-line);
    border-radius: 1rem;
    background: var(--landing-blue-soft);
    color: var(--landing-blue);
    font-size: 1.4rem;
}

.landing-public-hero__eyebrow {
    margin: 0 0 .65rem;
    color: var(--landing-blue);
    font-size: .78rem;
    font-weight: 900;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.landing-public-hero h1 {
    max-width: 46rem;
    margin: 0 auto;
    color: var(--landing-ink);
    font-size: clamp(2.1rem, 5vw, 3.4rem);
    font-weight: 900;
    letter-spacing: -.04em;
    line-height: 1.08;
}

.landing-public-hero__summary {
    max-width: 42rem;
    margin: 1.15rem auto 0;
    color: var(--landing-muted);
    font-size: 1.08rem;
    line-height: 1.75;
}

.landing-public-content {
    max-width: 58rem;
    margin: 0 auto;
    padding: 4rem 1.5rem 5rem;
}

.landing-public-prose {
    border: 1px solid var(--landing-line);
    border-radius: 1.25rem;
    padding: clamp(1.5rem, 5vw, 3.5rem);
    background: #fff;
    box-shadow: var(--landing-shadow-md);
    color: #475569;
    font-size: 1rem;
    line-height: 1.8;
}

.landing-public-prose h2 {
    margin: 2.5rem 0 .8rem;
    color: var(--landing-ink);
    font-size: 1.35rem;
    font-weight: 900;
    letter-spacing: -.025em;
    line-height: 1.35;
}

.landing-public-prose h2:first-child {
    margin-top: 0;
}

.landing-public-prose p {
    margin: 0 0 1rem;
}

.landing-public-prose ul,
.landing-public-prose ol {
    display: grid;
    gap: .7rem;
    margin: 1rem 0 1.35rem;
    padding-left: 1.35rem;
}

.landing-public-prose ul {
    list-style: disc;
}

.landing-public-prose ol {
    list-style: decimal;
}

.landing-public-prose li {
    padding-left: .25rem;
}

.landing-public-prose li::marker {
    color: var(--landing-blue);
    font-weight: 800;
}

.landing-public-prose strong {
    color: #1e293b;
}

.landing-public-prose a {
    color: var(--landing-blue-dark);
    font-weight: 750;
    text-decoration: underline;
    text-decoration-color: #bfdbfe;
    text-underline-offset: .2em;
}

.landing-public-prose .landing-report-action {
    margin: 1.5rem 0 0;
}

.landing-public-prose .landing-report-action a {
    display: inline-flex;
    min-height: 3rem;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    border-radius: .75rem;
    padding: .65rem 1.15rem;
    background: var(--landing-blue);
    color: #fff;
    text-decoration: none;
    transition: background .15s ease;
}

.landing-public-prose .landing-report-action a:hover,
.landing-public-prose .landing-report-action a:focus-visible {
    background: var(--landing-blue-dark);
}

/* ---------- Note view (/{alias}) ----------------------------------------- */

/* Trang note: chỉ giữ header, nền xám nhạt để card nội dung nổi bật */
.landing-note-page {
    background: var(--landing-surface-alt);
}

.landing-public-hero--bar {
    border-bottom: 0;
    background: transparent;
}

.landing-public-hero--bar::before {
    content: none;
}

.landing-public-hero--bar .landing-header {
    background: #fff;
}

.landing-note-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem 1.5rem;
    margin-bottom: 1rem;
    border: 1px solid var(--landing-line);
    border-radius: 1.25rem;
    background: #fff;
    padding: 1.25rem clamp(1.25rem, 3vw, 1.75rem);
    box-shadow: var(--landing-shadow-sm);
}

.landing-note-head__info {
    min-width: 0;
    flex: 1 1 20rem;
}

.landing-note-head h1 {
    margin: 0;
    color: var(--landing-ink);
    font-size: clamp(1.3rem, 2.6vw, 1.6rem);
    font-weight: 900;
    letter-spacing: -.025em;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.landing-note-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem 1.25rem;
    margin: .7rem 0 0;
    padding: 0;
    color: var(--landing-muted);
    font-size: .84rem;
    list-style: none;
}

.landing-note-meta li {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
}

.landing-note-meta i {
    color: var(--landing-subtle);
}

.landing-note-meta b {
    color: var(--landing-text);
    font-weight: 700;
}

.landing-note {
    max-width: 64rem;
    margin: 0 auto;
    padding: 2.5rem 1.5rem 4.5rem;
}

.landing-note-card {
    overflow: hidden;
    border: 1px solid var(--landing-line);
    border-radius: 1.25rem;
    background: #fff;
    box-shadow: var(--landing-shadow-md);
}

.landing-note-content {
    min-height: 18rem;
    padding: clamp(1.25rem, 4vw, 2.25rem);
    color: var(--landing-text);
}

.landing-note-content .mainCnt {
    font-size: 1rem;
    line-height: 1.75;
    word-break: break-word;
    overflow-wrap: anywhere;
}

/* Note dạng HTML (từ trình soạn thảo) */
.landing-note-content .landing-note-html {
    white-space: normal;
    word-break: normal;
}

.landing-note-html > :first-child { margin-top: 0; }
.landing-note-html > :last-child { margin-bottom: 0; }

.landing-note-html p,
.landing-note-html ul,
.landing-note-html ol,
.landing-note-html blockquote,
.landing-note-html pre,
.landing-note-html table,
.landing-note-html figure {
    margin: 0 0 1rem;
}

.landing-note-html h1,
.landing-note-html h2,
.landing-note-html h3,
.landing-note-html h4,
.landing-note-html h5,
.landing-note-html h6 {
    margin: 1.5rem 0 .6rem;
    color: var(--landing-ink);
    font-weight: 800;
    line-height: 1.3;
}

.landing-note-html h1 { font-size: 1.75rem; }
.landing-note-html h2 { font-size: 1.45rem; }
.landing-note-html h3 { font-size: 1.2rem; }
.landing-note-html h4,
.landing-note-html h5,
.landing-note-html h6 { font-size: 1.05rem; }

.landing-note-html ul { padding-left: 1.4rem; list-style: disc; }
.landing-note-html ol { padding-left: 1.4rem; list-style: decimal; }
.landing-note-html li + li { margin-top: .25rem; }

.landing-note-html blockquote {
    border-left: 3px solid var(--landing-blue-line);
    padding: .25rem 0 .25rem 1rem;
    color: var(--landing-muted);
}

.landing-note-html code,
.landing-note-html kbd {
    border-radius: .35rem;
    background: var(--landing-surface-alt);
    padding: .1rem .35rem;
    font-size: .9em;
}

.landing-note-html pre {
    overflow-x: auto;
    border: 1px solid var(--landing-line);
    border-radius: .75rem;
    background: var(--landing-surface-alt);
    padding: 1rem;
    white-space: pre;
}

.landing-note-html pre code {
    background: none;
    padding: 0;
}

.landing-note-html img {
    max-width: 100%;
    height: auto;
    border-radius: .5rem;
}

.landing-note-html hr {
    margin: 1.5rem 0;
    border: 0;
    border-top: 1px solid var(--landing-line);
}

.landing-note-html table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    border-collapse: collapse;
}

.landing-note-html th,
.landing-note-html td {
    border: 1px solid var(--landing-line);
    padding: .45rem .7rem;
    text-align: left;
}

.landing-note-html th {
    background: var(--landing-surface-alt);
    font-weight: 700;
}

.landing-note-content .mainCnt a {
    color: var(--landing-blue-dark);
    text-decoration: underline;
    text-decoration-color: #bfdbfe;
    text-underline-offset: .2em;
}

.landing-note-actions {
    display: flex;
    flex-wrap: wrap;
    flex-shrink: 0;
    align-items: center;
    gap: .5rem;
}

.landing-note-button {
    display: inline-flex;
    min-height: 2.5rem;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    border: 1px solid var(--landing-line);
    border-radius: .65rem;
    background: #fff;
    padding: 0 .95rem;
    color: var(--landing-text);
    font-size: .86rem;
    font-weight: 800;
    cursor: pointer;
    transition: border-color .15s, background .15s, color .15s;
}

.landing-note-button:hover {
    border-color: #cbd5e1;
    color: var(--landing-ink);
}

.landing-note-button:focus-visible {
    outline: 2px solid #93c5fd;
    outline-offset: 2px;
}

.landing-note-button--primary {
    border-color: var(--landing-blue);
    background: var(--landing-blue);
    color: #fff;
}

.landing-note-button--primary:hover {
    border-color: var(--landing-blue-dark);
    background: var(--landing-blue-dark);
    color: #fff;
}

.landing-note-button--success {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #15803d;
    cursor: default;
}

.copy_cnt:not(.is-copied) .landing-note-button--success,
.copy_note_link:not(.is-copied) .landing-note-button--success,
.copy_cnt.is-copied > button,
.copy_note_link.is-copied > button {
    display: none;
}

.copy_cnt.is-copied .landing-note-button--success.hidden,
.copy_note_link.is-copied .landing-note-button--success.hidden {
    display: inline-flex;
}

.landing-note-button--sm {
    min-height: 2.15rem;
    border-radius: .55rem;
    padding: 0 .75rem;
    font-size: .8rem;
}

/* Thanh thao tác nội dung — nằm cuối card nội dung */
.landing-note-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .75rem;
    border-top: 1px solid var(--landing-line-soft);
    background: var(--landing-surface-alt);
    padding: .6rem clamp(1rem, 3vw, 1.5rem);
}

.landing-note-toolbar__actions {
    display: flex;
    align-items: center;
    gap: .4rem;
}

.landing-note-state {
    max-width: 26rem;
    margin: 0 auto;
    padding: 3.5rem 1.5rem;
    text-align: center;
}

.landing-note-state__icon {
    display: inline-flex;
    width: 3rem;
    height: 3rem;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    border: 1px solid var(--landing-blue-line);
    border-radius: .85rem;
    background: var(--landing-blue-soft);
    color: var(--landing-blue);
    font-size: 1.15rem;
}

.landing-note-state h2 {
    margin: 0;
    color: var(--landing-ink);
    font-size: 1.35rem;
    font-weight: 900;
    letter-spacing: -.02em;
}

.landing-note-state > p {
    margin: .5rem 0 0;
    color: var(--landing-muted);
    font-size: .93rem;
    line-height: 1.6;
}

.landing-note-state--danger .landing-note-state__icon {
    border-color: #fecaca;
    background: #fef2f2;
    color: #dc2626;
}

.landing-note-state--danger h2 {
    color: #b91c1c;
}

.landing-note-unlock {
    display: grid;
    gap: .5rem;
    margin-top: 1.75rem;
    text-align: left;
}

.landing-note-unlock label {
    color: var(--landing-text);
    font-size: .82rem;
    font-weight: 700;
}

.landing-note-unlock__field {
    position: relative;
}

.landing-note-unlock__field input {
    width: 100%;
    min-height: 3rem;
    border: 1px solid var(--landing-line);
    border-radius: .75rem;
    background: var(--landing-surface-alt);
    padding: .7rem 3rem .7rem .9rem;
    color: var(--landing-ink);
    font-size: 1rem;
    transition: border-color .15s, box-shadow .15s, background .15s;
}

.landing-note-unlock__field input:focus {
    border-color: #3b82f6;
    outline: none;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, .15);
}

.landing-note-unlock__field input[aria-invalid="true"] {
    border-color: #f87171;
}

.landing-note-unlock__field button {
    position: absolute;
    top: 50%;
    right: .5rem;
    display: inline-flex;
    width: 2.25rem;
    height: 2.25rem;
    align-items: center;
    justify-content: center;
    border-radius: .5rem;
    color: var(--landing-muted);
    transform: translateY(-50%);
}

.landing-note-unlock__field button:hover {
    color: var(--landing-ink);
}

.landing-note-unlock__error {
    margin: 0;
    color: #dc2626;
    font-size: .82rem;
    font-weight: 600;
}

.landing-note-unlock .landing-note-button {
    min-height: 3rem;
    margin-top: .5rem;
    font-size: .95rem;
}

.landing-note-alert {
    margin-bottom: 1rem;
    border: 1px solid #fecaca;
    border-radius: .85rem;
    background: #fef2f2;
    padding: .9rem 1.1rem;
    color: #b91c1c;
    font-size: .9rem;
}

.landing-note-alert p {
    margin: 0;
}

.note-ad-slot {
    width: 100%;
    margin: 0 auto 1rem;
    overflow: hidden;
    text-align: center;
}

.landing-note-card + .note-ad-slot {
    margin: 1rem auto 0;
}

.note-ad-slot img,
.note-ad-slot iframe {
    max-width: 100%;
}

.note-ad-slot--content {
    margin: 0;
    border-bottom: 1px solid var(--landing-line-soft);
    padding: 1rem 1.25rem;
}

html.dark .landing-note-card,
html.dark .landing-note-head,
html.dark .landing-note-button:not(.landing-note-button--primary):not(.landing-note-button--success) {
    background: #0e1829;
}

html.dark .landing-note-page {
    background: #0a1220;
}

html.dark .landing-public-hero--bar .landing-header {
    background: rgba(10, 18, 32, .9);
}

html.dark .landing-note-toolbar {
    background: #0b1424;
}

html.dark .landing-note-content .mainCnt a {
    color: #93c5fd;
    text-decoration-color: #31547a;
}

html.dark .landing-note-button--primary {
    border-color: #2563eb;
    background: #2563eb;
}

html.dark .landing-note-button--success {
    border-color: #14532d;
    background: #052e16;
    color: #86efac;
}

html.dark .landing-note-unlock__field input {
    background: #0a1220;
}

html.dark .landing-note-state--danger .landing-note-state__icon,
html.dark .landing-note-alert {
    border-color: #7f1d1d;
    background: #2a0f12;
    color: #fca5a5;
}

html.dark .landing-note-state--danger h2 {
    color: #fca5a5;
}

@media (max-width: 560px) {
    .landing-note {
        padding: 1.5rem 1rem 4rem;
    }

    .landing-note-actions {
        width: 100%;
    }

    .landing-note-actions > * {
        flex: 1 1 0;
    }

    .landing-note-actions .landing-note-button {
        width: 100%;
        padding: 0 .6rem;
    }
}

/* ---------- Note comments ----------------------------------------------- */

.landing-comments {
    margin-top: 1rem;
    border: 1px solid var(--landing-line);
    border-radius: 1.25rem;
    background: #fff;
    padding: clamp(1.25rem, 3vw, 1.75rem);
    box-shadow: var(--landing-shadow-sm);
}

.landing-comments__head {
    display: flex;
    align-items: center;
    gap: .6rem;
    margin-bottom: 1.1rem;
}

.landing-comments__head h2 {
    margin: 0;
    color: var(--landing-ink);
    font-size: 1.15rem;
    font-weight: 900;
    letter-spacing: -.02em;
}

.landing-comments__count {
    display: inline-flex;
    min-width: 1.6rem;
    height: 1.6rem;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--landing-blue-soft);
    padding: 0 .5rem;
    color: var(--landing-blue);
    font-size: .78rem;
    font-weight: 800;
}

.landing-comments__status {
    display: flex;
    align-items: center;
    gap: .45rem;
    margin: 0 0 1rem;
    border: 1px solid #bbf7d0;
    border-radius: .75rem;
    background: #f0fdf4;
    padding: .65rem .9rem;
    color: #15803d;
    font-size: .88rem;
    font-weight: 700;
}

.landing-comments__empty {
    margin: 1.25rem 0 0;
    border-top: 1px solid var(--landing-line-soft);
    padding-top: 1.25rem;
    color: var(--landing-muted);
    font-size: .9rem;
    text-align: center;
}

/* Form */
.landing-comment-form {
    display: grid;
    grid-template-columns: minmax(0, 14rem) minmax(0, 1fr);
    gap: .85rem 1rem;
}

.landing-comment-form.is-reply {
    grid-template-columns: 1fr;
    margin-top: .75rem;
    border: 1px solid var(--landing-line);
    border-radius: .9rem;
    background: var(--landing-surface-alt);
    padding: 1rem;
}

.landing-comment-form__trap {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.landing-comment-form__replying {
    display: flex;
    grid-column: 1 / -1;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    color: var(--landing-muted);
    font-size: .85rem;
}

.landing-comment-form__replying[hidden] {
    display: none;
}

.landing-comment-form__replying b {
    color: var(--landing-ink);
}

.landing-comment-form__replying button {
    color: var(--landing-muted);
    font-size: .82rem;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: .2em;
}

.landing-comment-form__replying button:hover {
    color: var(--landing-ink);
}

.landing-comment-form__field {
    display: grid;
    align-content: start;
    gap: .35rem;
}

.landing-comment-form__field label {
    color: var(--landing-text);
    font-size: .8rem;
    font-weight: 700;
}

.landing-comment-form__field small {
    color: var(--landing-muted);
    font-size: .75rem;
    line-height: 1.4;
}

.landing-comment-form__field input,
.landing-comment-form__field textarea {
    width: 100%;
    border: 1px solid var(--landing-line);
    border-radius: .7rem;
    background: var(--landing-surface-alt);
    padding: .65rem .8rem;
    color: var(--landing-ink);
    font-size: .95rem;
    line-height: 1.5;
    transition: border-color .15s, box-shadow .15s, background .15s;
}

.landing-comment-form__field textarea {
    min-height: 2.9rem;
    resize: vertical;
}

.landing-comment-form__field input:focus,
.landing-comment-form__field textarea:focus {
    border-color: #3b82f6;
    outline: none;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, .15);
}

.landing-comment-form__field input[readonly] {
    color: var(--landing-muted);
    cursor: default;
}

.landing-comment-form__field [aria-invalid="true"] {
    border-color: #f87171;
}

.landing-comment-form__error {
    margin: 0;
    color: #dc2626;
    font-size: .8rem;
    font-weight: 600;
}

.landing-comment-form__foot {
    display: flex;
    grid-column: 1 / -1;
    justify-content: flex-end;
}

/* Danh sách */
.landing-comment-list,
.landing-comment-replies {
    margin: 0;
    padding: 0;
    list-style: none;
}

.landing-comment-list {
    margin-top: 1.5rem;
    border-top: 1px solid var(--landing-line-soft);
}

.landing-comment-thread {
    border-bottom: 1px solid var(--landing-line-soft);
    padding: 1.1rem 0;
}

.landing-comment-thread:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.landing-comment-replies {
    display: grid;
    gap: 1rem;
    margin: 1rem 0 0 1.1rem;
    border-left: 2px solid var(--landing-line-soft);
    padding-left: 1.1rem;
}

.landing-comment-thread__slot {
    margin-left: 2.9rem;
}

.landing-comment {
    display: flex;
    gap: .75rem;
    scroll-margin-top: 1.5rem;
}

.landing-comment:target .landing-comment__body {
    border-radius: .6rem;
    background: var(--landing-blue-soft);
    box-shadow: 0 0 0 .4rem var(--landing-blue-soft);
}

.landing-comment__avatar {
    display: inline-flex;
    width: 2.15rem;
    height: 2.15rem;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--landing-blue-line);
    border-radius: 999px;
    background: var(--landing-blue-soft);
    color: var(--landing-blue);
    font-size: .85rem;
    font-weight: 900;
}

.landing-comment__body {
    min-width: 0;
    flex: 1;
}

.landing-comment__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .25rem .5rem;
    font-size: .86rem;
}

.landing-comment__meta b {
    color: var(--landing-ink);
    font-weight: 800;
    overflow-wrap: anywhere;
}

.landing-comment__meta time {
    color: var(--landing-subtle);
    font-size: .78rem;
}

.landing-comment__badge {
    border-radius: 999px;
    background: var(--landing-blue);
    padding: .08rem .45rem;
    color: #fff;
    font-size: .68rem;
    font-weight: 800;
}

.landing-comment__content {
    margin: .3rem 0 0;
    color: var(--landing-text);
    font-size: .93rem;
    line-height: 1.65;
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.landing-comment__actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: .35rem;
}

.landing-comment__actions form {
    margin: 0;
}

.landing-comment__actions button {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    color: var(--landing-muted);
    font-size: .8rem;
    font-weight: 700;
}

.landing-comment__actions button:hover {
    color: var(--landing-blue);
}

.landing-comment__actions button.is-danger:hover {
    color: #dc2626;
}

html.dark .landing-comments {
    background: #0e1829;
}

html.dark .landing-comment-form.is-reply {
    background: #0b1424;
}

html.dark .landing-comment-form__field input,
html.dark .landing-comment-form__field textarea {
    background: #0a1220;
}

html.dark .landing-comments__status {
    border-color: #14532d;
    background: #052e16;
    color: #86efac;
}

@media (max-width: 640px) {
    .landing-comment-form {
        grid-template-columns: 1fr;
    }

    .landing-comment-thread__slot {
        margin-left: 0;
    }

    .landing-comment-replies {
        margin-left: .5rem;
        padding-left: .85rem;
    }

    .landing-comment-form__foot .landing-note-button {
        width: 100%;
    }
}

/* ---------- Footer — nền trắng, 4 cột, border-top nhẹ -------------------- */

.landing-footer {
    border-top: 1px solid var(--landing-line);
    background: #fff;
}

.landing-footer__inner {
    max-width: 80rem;
    margin: 0 auto;
    padding: 4rem 1rem 2rem;
}

.landing-footer__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
    gap: 3rem;
}

.landing-footer__brand p {
    max-width: 22rem;
    margin: 1rem 0 0;
    color: var(--landing-muted);
    font-size: .92rem;
    line-height: 1.7;
}

.landing-footer__title {
    margin: .35rem 0 1rem;
    color: var(--landing-ink);
    font-size: .85rem;
    font-weight: 800;
}

.landing-footer__links {
    display: grid;
    gap: .7rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.landing-footer__links a {
    color: var(--landing-muted);
    font-size: .9rem;
    font-weight: 600;
    transition: color .15s;
}

.landing-footer__links a:hover,
.landing-footer__links a:focus-visible {
    color: var(--landing-ink);
}

.landing-footer__bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    margin-top: 3.5rem;
    border-top: 1px solid var(--landing-line-soft);
    padding-top: 1.5rem;
    color: var(--landing-subtle);
    font-size: .84rem;
}

.landing-footer__copyright a {
    color: var(--landing-text);
    font-weight: 800;
}

.landing-footer__socials {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-top: 1.25rem;
}

.landing-footer__socials a {
    display: inline-flex;
    width: 2.25rem;
    height: 2.25rem;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--landing-line);
    border-radius: .6rem;
    background: #fff;
    color: var(--landing-muted);
    transition: border-color .15s, color .15s;
}

.landing-footer__socials a:hover {
    border-color: #cbd5e1;
    color: var(--landing-ink);
}

/* ---------- Back to top ------------------------------------------------- */

.landing-back-to-top {
    position: fixed;
    z-index: 40;
    right: 1.25rem;
    bottom: 1.25rem;
    display: inline-flex;
    width: 2.75rem;
    height: 2.75rem;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--landing-line);
    border-radius: 999px;
    background: #fff;
    color: var(--landing-text);
    box-shadow: var(--landing-shadow-md);
    opacity: 0;
    pointer-events: none;
    transform: translateY(.5rem);
    transition: opacity .2s, transform .2s, border-color .15s, color .15s;
}

.landing-back-to-top.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: none;
}

.landing-back-to-top:hover {
    border-color: #cbd5e1;
    color: var(--landing-blue);
}

.landing-back-to-top:focus-visible {
    outline: 2px solid #93c5fd;
    outline-offset: 2px;
}

html.dark .landing-back-to-top {
    background: #0e1829;
}

[dir="rtl"] .landing-back-to-top {
    right: auto;
    left: 1.25rem;
}

.landing-footer__made {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .25rem .35rem;
    margin: 0;
    color: var(--landing-muted);
    font-size: .84rem;
    font-weight: 600;
}

.landing-footer__made strong {
    color: var(--landing-text);
    font-weight: 800;
}

.landing-footer__author {
    display: inline-flex;
    align-items: center;
    border-radius: .35rem;
}

.landing-footer__author img {
    display: block;
    width: auto;
    height: 1.4rem;
}

.landing-footer__author {
    transition: opacity .15s, transform .15s;
}

.landing-footer__author:hover {
    opacity: .85;
    transform: translateY(-1px);
}

.landing-footer__author:focus-visible {
    outline: 2px solid #93c5fd;
    outline-offset: 2px;
}

/* Chữ "K" của logo màu xanh đậm: đặt trên nền sáng ở giao diện tối để vẫn đọc được */
html.dark .landing-footer__author {
    background: #f8fafc;
    padding: .15rem .35rem;
}

.landing-footer__heart {
    color: #ef4444;
    animation: landing-heartbeat 1.6s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
    .landing-footer__heart { animation: none; }
}

@keyframes landing-heartbeat {
    0%, 100% { transform: scale(1); }
    15% { transform: scale(1.2); }
    30% { transform: scale(1); }
}

/* ==========================================================================
   Dark mode — dùng cùng class `dark` và localStorage với member area.
   ========================================================================== */

html.dark {
    color-scheme: dark;
    --landing-ink: #f1f5f9;
    --landing-text: #cbd5e1;
    --landing-muted: #94a3b8;
    --landing-subtle: #64748b;
    --landing-line: #1f2d40;
    --landing-line-soft: #18243a;
    --landing-surface: #0a1220;
    --landing-surface-alt: #0d1627;
    --landing-blue: #60a5fa;
    --landing-blue-dark: #3b82f6;
    --landing-blue-soft: #13223a;
    --landing-blue-line: #1e3656;
    --landing-grid-line: rgba(148, 163, 184, .07);
    --landing-shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
    --landing-shadow-md: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 28px -14px rgba(0, 0, 0, .7);
    --landing-shadow-lg: 0 1px 3px rgba(0, 0, 0, .35), 0 28px 56px -28px rgba(0, 0, 0, .85);
}

html.dark body {
    background: var(--landing-surface) !important;
    color: var(--landing-ink);
}

html.dark .landing-hero {
    background:
        radial-gradient(34rem 22rem at 12% 8%, rgba(37, 99, 235, .16), transparent 70%),
        radial-gradient(32rem 22rem at 88% 10%, rgba(139, 92, 246, .13), transparent 70%),
        radial-gradient(60rem 26rem at 50% -6rem, rgba(37, 99, 235, .16), transparent 70%),
        linear-gradient(180deg, #0a1220 0%, #0a1220 40%, #0c1524 100%);
}

html.dark .landing-public-hero {
    background: linear-gradient(180deg, #0a1220 0%, #0c1524 100%);
}

html.dark .landing-public-page,
html.dark .landing-footer,
html.dark .landing-feature-card,
html.dark .landing-faq__column,
html.dark .landing-faq__question,
html.dark .landing-faq__answer,
html.dark .landing-public-prose {
    background: var(--landing-surface);
}

html.dark .landing-feature-card,
html.dark .landing-faq__column,
html.dark .landing-public-prose {
    background: #0e1829;
}

html.dark .landing-faq__question,
html.dark .landing-faq__answer,
html.dark .landing-faq__question[aria-expanded="true"] {
    background: #0e1829 !important;
}

html.dark .landing-faq__question:hover {
    background: #122036 !important;
}

html.dark .landing-faq__question[aria-expanded="true"] {
    color: #93c5fd !important;
}

html.dark .landing-header {
    background: rgba(10, 18, 32, .9);
}

html.dark .landing-language-button,
html.dark .landing-theme-button,
html.dark .landing-menu-button,
html.dark .landing-hero__eyebrow,
html.dark .landing-hero__trust li,
html.dark .landing-cta__button--secondary,
html.dark .landing-footer__socials a {
    background: #0e1829;
}

html.dark .landing-language-button:hover,
html.dark .landing-theme-button:hover,
html.dark .landing-menu-button:hover,
html.dark .landing-auth-link--quiet:hover {
    border-color: #2b3f5a;
    background: #122036;
    color: var(--landing-ink);
}

html.dark .landing-cta__button--secondary:hover,
html.dark .landing-footer__socials a:hover,
html.dark .landing-feature-card:hover {
    border-color: #2b3f5a;
}

html.dark .landing-auth-link--primary,
html.dark .landing-cta__button--primary,
html.dark .landing-public-prose .landing-report-action a {
    border-color: #2563eb;
    background: #2563eb;
    color: #fff;
}

html.dark .landing-auth-link--primary:hover,
html.dark .landing-cta__button--primary:hover {
    border-color: #1d4ed8;
    background: #1d4ed8;
}

html.dark .landing-language-menu,
html.dark .landing-mobile-nav {
    border-color: var(--landing-line);
    background: #0e1829;
    box-shadow: var(--landing-shadow-lg);
}

html.dark .landing-language-menu a {
    color: #cbd5e1 !important;
}

html.dark .landing-language-menu a:hover,
html.dark .landing-language-menu a.bg-blue-50 {
    background: #13223a !important;
    color: #93c5fd !important;
}

html.dark .landing-mobile-nav .landing-nav-link:hover {
    background: #122036;
}

html.dark .landing-mobile-languages {
    border-top-color: var(--landing-line);
}

html.dark .landing-mobile-languages a {
    border-color: var(--landing-line);
    color: #aebbc9;
}

html.dark .landing-mobile-languages a.is-active {
    border-color: #2b4a70;
    background: #13223a;
    color: #93c5fd;
}

html.dark .landing-cta {
    border-color: #1e3656;
    background:
        radial-gradient(40rem 18rem at 50% 0%, rgba(59, 130, 246, .12), transparent 70%),
        linear-gradient(135deg, #0f1c31 0%, #0e1829 50%, #121a33 100%);
}

html.dark .landing-public-prose {
    color: #a5b3c5;
}

html.dark .landing-public-prose strong {
    color: #f1f5f9;
}

html.dark .landing-public-prose a {
    color: #93c5fd;
    text-decoration-color: #31547a;
}

/* Create-note card (dark) */
html.dark ._lp .nz-card {
    border-color: var(--landing-line);
    background: #0e1829;
}

html.dark .nz-head {
    border-bottom-color: var(--landing-line-soft);
}

html.dark .nz-head-icon {
    color: #7db4ff;
}

html.dark .nz-title {
    color: #f1f5f9;
}

html.dark .nz-desc,
html.dark .nz-label {
    color: #9aa9bc;
}

html.dark .nz-input,
html.dark .nz-textarea {
    border-color: #26374e;
    background: #0a1220;
    color: #e5edf8;
}

html.dark .nz-input:focus,
html.dark .nz-textarea:focus {
    border-color: #60a5fa;
    background: #0c1626;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, .18);
}

html.dark ._lp .nz-aside {
    border-color: var(--landing-line);
    background: #0b1424;
}

html.dark .nz-aside-title {
    color: #8fa1b7;
}

html.dark ._lp .nz-seg {
    background: #16233a;
}

html.dark .nz-seg span {
    color: #9aa9bc;
}

html.dark .nz-seg input:checked + span {
    background: #22344d;
    color: #93c5fd;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .35);
}

html.dark ._lp .nz-submit {
    background: #2563eb;
}

html.dark ._lp .nz-submit:hover {
    background: #1d4ed8;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (min-width: 1024px) {
    .landing-header__inner,
    .landing-footer__inner {
        padding-right: 5rem;
        padding-left: 5rem;
    }
}

@media (min-width: 768px) {
    .landing-menu-button {
        display: none;
    }
}

@media (max-width: 900px) {
    .landing-feature-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .landing-faq__grid {
        grid-template-columns: 1fr;
    }

    .landing-cta {
        margin-right: 1rem;
        margin-left: 1rem;
    }

    .landing-footer__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 2.5rem 2rem;
    }

    .landing-footer__brand {
        grid-column: 1 / -1;
    }
}

@media (max-width: 767px) {
    .landing-header__inner {
        flex-wrap: wrap;
        gap: .75rem;
    }

    .landing-mobile-nav {
        width: 100%;
        border: 1px solid var(--landing-line);
        border-radius: .85rem;
        background: #fff;
        padding: .75rem;
        box-shadow: var(--landing-shadow-md);
    }

    .landing-mobile-nav .landing-nav-list {
        align-items: stretch;
        gap: .15rem;
    }

    .landing-mobile-nav .landing-nav-link {
        display: block;
        border-radius: .6rem;
        padding: .7rem .75rem;
    }

    .landing-mobile-nav .landing-nav-link:hover {
        background: var(--landing-surface-alt);
    }

    .landing-mobile-languages {
        display: flex;
        flex-wrap: wrap;
        gap: .45rem;
        max-height: 8.5rem;
        margin-top: .6rem;
        border-top: 1px solid var(--landing-line-soft);
        padding: .75rem .75rem 0;
        overflow-y: auto;
    }

    .landing-mobile-languages a {
        display: inline-flex;
        align-items: center;
        gap: .35rem;
        border: 1px solid var(--landing-line);
        border-radius: 999px;
        padding: .35rem .55rem;
        color: #475569;
        font-size: .75rem;
        font-weight: 700;
    }

    .landing-mobile-languages a.is-active {
        border-color: #bfdbfe;
        background: var(--landing-blue-soft);
        color: var(--landing-blue-dark);
    }

    .landing-mobile-auth {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: .5rem;
        margin-top: .75rem;
        padding: 0 .75rem .2rem;
    }

    .landing-mobile-auth .landing-auth-link--quiet {
        border-color: var(--landing-line);
    }

    .landing-hero__intro {
        padding-top: 3.5rem;
        padding-bottom: 2.25rem;
    }

    .landing-hero__description {
        font-size: 1rem;
        line-height: 1.65;
    }

    .landing-hero::before {
        background-size: 36px 36px;
    }
}

@media (max-width: 560px) {
    .landing-hero__title {
        font-size: 2.3rem;
    }

    .landing-hero__trust {
        gap: .45rem;
    }

    .landing-section {
        padding-top: 4.5rem;
        padding-bottom: 4.5rem;
    }

    .landing-section__header {
        margin-bottom: 2.5rem;
    }

    .landing-section__description {
        font-size: .96rem;
        line-height: 1.65;
    }

    .landing-feature-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .landing-feature-card {
        padding: 1.4rem;
    }

    .landing-faq__question {
        padding: 1rem !important;
    }

    .landing-faq__answer {
        padding: 0 1rem 1.1rem 2.7rem !important;
    }

    .landing-cta {
        margin-top: 4.5rem;
        margin-bottom: 4.5rem;
        border-radius: 1.25rem;
    }

    .landing-cta__content {
        padding: 3.25rem 1.25rem;
    }

    .landing-cta__actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .landing-cta__button {
        width: 100%;
    }

    .landing-public-hero__inner {
        padding: 3rem 1.25rem 3.5rem;
    }

    .landing-public-hero h1 {
        font-size: 2.25rem;
    }

    .landing-public-hero__summary {
        font-size: 1rem;
        line-height: 1.65;
    }

    .landing-public-content {
        padding: 2rem 1rem 4rem;
    }

    .landing-public-prose {
        border-radius: 1rem;
        padding: 1.35rem;
    }

    .landing-public-prose h2 {
        margin-top: 2rem;
        font-size: 1.2rem;
    }

    .landing-public-prose .landing-report-action a {
        width: 100%;
    }

    .landing-footer__inner {
        padding-top: 3.25rem;
    }

    .landing-footer__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 2rem 1.5rem;
    }

    .landing-footer__bottom {
        align-items: flex-start;
        flex-direction: column;
        margin-top: 2.5rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}
