@font-face {
    font-family: "Space Grotesk";
    src: url("../fonts/space-grotesk-latin.woff2") format("woff2");
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
}

@font-face {
    font-family: "IBM Plex Mono";
    src: url("../fonts/ibm-plex-mono-400-latin.woff2") format("woff2");
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: "IBM Plex Mono";
    src: url("../fonts/ibm-plex-mono-600-latin.woff2") format("woff2");
    font-style: normal;
    font-weight: 600;
    font-display: swap;
}

:root {
    --bg: #070d1a;
    --bg-mid: #0e1730;
    --bg-accent: #14274a;
    --ink: #eaf0ff;
    --muted: #a2b2d8;
    --accent: #39d4ff;
    --accent-strong: #43f2cf;
    --surface: #121f3c;
    --surface-soft: #192a4f;
    --line: #324a76;
    --danger: #ff7aa7;
    --ok-bg: #124133;
    --ok-ink: #d4fff0;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    font-family: "Space Grotesk", "Segoe UI", sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at 80% -10%, rgba(57, 212, 255, 0.2) 0%, transparent 45%),
        radial-gradient(circle at 15% 20%, rgba(67, 242, 207, 0.13) 0%, transparent 35%),
        linear-gradient(165deg, var(--bg-accent) 0%, var(--bg-mid) 52%, var(--bg) 100%);
}

body.is-404 {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body.is-404 .main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

body.is-404 .main-content .page-404 {
    flex: 1;
    display: flex;
    flex-direction: column;
}

body.is-ru-articles {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body.is-ru-articles .main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

body.is-ru-articles .article-directory {
    flex: 1;
}

body.is-articles {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body.is-articles .main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

body.is-articles .article-directory {
    flex: 1;
}

body.is-legal {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body.is-legal .main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

body.is-ru-home {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body.is-ru-home .main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

body.is-ru-home .article-directory {
    flex: 1;
}

html {
    scroll-behavior: smooth;
}

.shell {
    width: min(1120px, 92vw);
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(12px);
    background: rgba(8, 14, 28, 0.82);
    border-bottom: 1px solid var(--line);
}

.read-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    z-index: 40;
    background: rgba(17, 32, 60, 0.5);
    pointer-events: none;
}

.read-progress-bar {
    display: block;
    width: 100%;
    height: 100%;
    transform-origin: left center;
    transform: scaleX(0);
    background: linear-gradient(90deg, #39d4ff, #43f2cf);
}

.nav-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    gap: 1rem;
}

.brand {
    font-weight: 700;
    letter-spacing: 0.04em;
    text-decoration: none;
    color: var(--ink);
}

nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

nav a {
    color: var(--accent-strong);
    text-decoration: none;
    font-weight: 600;
}

.main-content {
    padding: 2rem 0 4.5rem;
}

.main-content > section + section {
    margin-top: 1.15rem;
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
    margin-bottom: 0.8rem;
    color: var(--muted);
    font-size: 0.88rem;
}

.breadcrumbs a {
    color: #9fdcff;
    text-decoration: none;
}

.hero,
.flow-hero {
    background: linear-gradient(140deg, rgba(27, 45, 81, 0.95) 0%, rgba(19, 33, 62, 0.97) 64%, rgba(16, 27, 50, 0.97) 100%);
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: clamp(1.25rem, 3vw, 2.3rem);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.35);
}

.eyebrow {
    margin: 0;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.09em;
    font-size: 0.76rem;
    font-weight: 700;
}

.hero h1,
.flow-hero h1 {
    margin: 0.65rem 0 0.95rem;
    max-width: 22ch;
    font-size: clamp(1.95rem, 4.5vw, 3.35rem);
    line-height: 1.08;
}

.lead {
    margin: 0;
    color: var(--muted);
    max-width: 72ch;
    line-height: 1.68;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin-top: 1.35rem;
}

.hero-metrics {
    margin-top: 1.4rem;
    display: grid;
    gap: 0.85rem;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.hero-metrics article {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(21, 36, 66, 0.85);
    padding: 0.92rem;
}

.hero-metrics span {
    display: block;
    font-size: 1.24rem;
    font-weight: 700;
}

.grid-3,
.step-grid,
.stats-grid,
.plan-cards,
.preview-grid {
    display: grid;
    gap: 0.85rem;
}

.grid-3 {
    margin-top: 1.2rem;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.step-grid {
    margin-top: 1.2rem;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.stats-grid {
    margin: 0.8rem 0;
    grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
}

.plan-cards {
    margin-top: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.preview-grid {
    margin-top: 0.7rem;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.seo-section,
.panel,
.card,
.step-card,
.stats-grid article {
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface);
}

.seo-section {
    margin-top: 1.2rem;
    padding: 1.3rem;
    background: var(--surface-soft);
}

.seo-section ul {
    margin: 0;
    padding-left: 1.1rem;
    line-height: 1.6;
}

.panel {
    padding: clamp(1rem, 2vw, 1.35rem);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    margin-top: 1rem;
}

.panel h2 {
    margin-top: 0;
}

.card,
.step-card,
.stats-grid article {
    padding: 0.95rem;
}

.step-card h2 {
    margin: 0.2rem 0 0.45rem;
    font-size: 1rem;
}

.step-card p,
.muted {
    color: var(--muted);
}

.step-number {
    margin: 0;
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
}

.featured {
    border: 1px solid var(--accent);
    box-shadow: inset 0 0 0 1px rgba(57, 212, 255, 0.45);
}

.form-grid {
    display: grid;
    gap: 0.58rem;
}

.form-grid label {
    margin-top: 0.4rem;
    font-weight: 600;
}

.form-grid input,
.form-grid select,
.form-grid textarea {
    width: 100%;
    border: 1px solid #395686;
    background: #0e1932;
    border-radius: 10px;
    padding: 0.72rem 0.8rem;
    font: inherit;
    color: var(--ink);
}

.form-grid textarea {
    resize: vertical;
}

.form-grid input:focus,
.form-grid select:focus,
.form-grid textarea:focus {
    outline: 2px solid rgba(57, 212, 255, 0.25);
    border-color: var(--accent);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
    font-size: 0.92rem;
    line-height: 1.2;
    border-radius: 10px;
    border: 1px solid transparent;
    padding: 0.64rem 1.1rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: transform 120ms ease, box-shadow 120ms ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: linear-gradient(120deg, #1598c1, #1ab39b);
    color: #ffffff;
    border-color: #53d7d0;
    box-shadow: 0 8px 20px rgba(57, 212, 255, 0.28);
}

.btn-primary:hover {
    box-shadow: 0 10px 22px rgba(67, 242, 207, 0.35);
}

.cta-banner .btn-primary {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    color: #f3ffff;
    border-color: rgba(158, 245, 255, 0.9);
    background: linear-gradient(118deg, #0f3552 0%, #117076 54%, #145487 100%);
    text-shadow: 0 0 8px rgba(67, 242, 207, 0.55);
    box-shadow:
        0 0 0 1px rgba(57, 212, 255, 0.32) inset,
        0 0 14px rgba(57, 212, 255, 0.38),
        0 0 26px rgba(67, 242, 207, 0.28);
    background-size: 200% 100%;
    animation: cta-neon-pulse 2.8s ease-in-out infinite, cta-neon-bg-shift 4.6s ease-in-out infinite;
}

.cta-banner .btn-primary::after {
    content: "";
    position: absolute;
    top: 0;
    left: -42%;
    width: 34%;
    height: 100%;
    border-radius: inherit;
    pointer-events: none;
    z-index: 1;
    background: linear-gradient(100deg, transparent 8%, rgba(255, 255, 255, 0.5) 52%, transparent 92%);
    opacity: 0.38;
    transform: skewX(-20deg);
    animation: cta-neon-sheen 3.1s linear infinite;
}

.cta-banner .btn-primary:hover,
.cta-banner .btn-primary:focus-visible {
    animation-play-state: paused;
    box-shadow:
        0 0 0 1px rgba(57, 212, 255, 0.45) inset,
        0 0 18px rgba(57, 212, 255, 0.5),
        0 0 34px rgba(67, 242, 207, 0.42);
}

.btn-ghost {
    background: transparent;
    border-color: var(--accent);
    color: var(--accent);
}

.validation {
    color: var(--danger);
    font-size: 0.9rem;
}

.flash {
    border-radius: 12px;
    padding: 0.72rem 0.95rem;
    margin-bottom: 0.95rem;
    font-weight: 600;
}

.flash-ok {
    background: var(--ok-bg);
    color: var(--ok-ink);
    border: 1px solid #2b846b;
}

.flash-bad {
    background: #42192f;
    color: #ffd1e3;
    border: 1px solid #7f365a;
}

.hint-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0.6rem 0 1rem;
}

.hint-chip {
    border: 1px solid #37639f;
    background: #10274a;
    color: #9edaff;
    border-radius: 999px;
    padding: 0.38rem 0.8rem;
    font: inherit;
    cursor: pointer;
}

.preview-grid img {
    width: 100%;
    border-radius: 12px;
    border: 1px solid var(--line);
    min-height: 150px;
    object-fit: cover;
}

.prototype-actions {
    margin: 0.6rem 0 0.75rem;
}

.prototype-frame {
    width: 100%;
    min-height: 620px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 45;
    background: rgba(1, 6, 14, 0.68);
    display: grid;
    place-items: center;
    padding: 1rem;
}

.modal-overlay[hidden] {
    display: none !important;
}

.modal-card {
    width: min(560px, 96vw);
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #102142;
    box-shadow: 0 22px 42px rgba(0, 0, 0, 0.48);
    padding: 1rem 1.05rem;
}

.modal-card h3 {
    margin: 0.4rem 0 0.55rem;
}

.modal-card p {
    margin: 0.45rem 0;
}

.modal-actions {
    margin-top: 0.8rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.code-plan {
    font-family: "IBM Plex Mono", monospace;
    white-space: pre-wrap;
    background: #0a1428;
    color: #f4f8ff;
    border-radius: 12px;
    padding: 0.9rem;
    font-size: 0.85rem;
    line-height: 1.45;
    overflow-x: auto;
}

.plan-list {
    margin: 0.4rem 0 0;
    padding-left: 1.2rem;
    line-height: 1.7;
}

.stats-grid h3,
.stats-grid p {
    margin: 0;
}

.stats-grid p {
    margin-top: 0.3rem;
    font-weight: 600;
}

.inline-form {
    display: flex;
    gap: 0.6rem;
    align-items: center;
    margin: 0.8rem 0;
    flex-wrap: wrap;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    border-bottom: 1px solid var(--line);
    text-align: left;
    padding: 0.55rem;
}

.mono {
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.82rem;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.2rem 0.58rem;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-preview-ready {
    background: #1e365f;
    color: #a9d4ff;
    border: 1px solid #3f72b4;
}

.status-generated {
    background: #164537;
    color: #b7ffe8;
    border: 1px solid #2c8d72;
}

.status-balance-added {
    background: #4c3c14;
    color: #ffe8a6;
    border: 1px solid #a8842e;
}

.shell.main-content.workspace-main {
    width: min(1120px, 92vw);
    min-height: calc(100vh - 120px);
}

.workspace-shell {
    display: grid;
    gap: 1rem;
}

.workspace-auth-shell {
    min-height: 220px;
    display: grid;
    align-content: center;
}

.workspace-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem;
}

.workspace-header h1 {
    margin: 0.45rem 0 0.5rem;
}

.workspace-header-actions {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.workspace-user-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.35rem;
}

.workspace-user-meta .meta-chip {
    font-size: 0.9rem;
}

.meta-chip {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--line);
    background: rgba(18, 31, 60, 0.88);
    border-radius: 999px;
    color: var(--muted);
    font-size: 0.82rem;
    padding: 0.28rem 0.65rem;
}

.meta-chip-copy {
    font: inherit;
    cursor: pointer;
}

.meta-role-chip {
    text-transform: none;
    letter-spacing: normal;
}

.workspace-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.workspace-kpi {
    margin-top: 0;
}

.workspace-kpi p {
    margin: 0;
}

.workspace-kpi h3 {
    margin: 0.45rem 0 0;
    font-size: 1.36rem;
}

.role-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 0.22rem 0.55rem;
    border: 1px solid transparent;
}

.role-admin {
    color: #ffd79d;
    border-color: #aa7d2d;
    background: #4f3713;
}

.role-user {
    color: #a7e9ff;
    border-color: #3e73b6;
    background: #17365a;
}

.workspace-projects {
    margin-top: 0;
    padding: 1.1rem 1.2rem;
}

.workspace-projects-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 0.7rem;
}

.workspace-projects-head h2 {
    margin: 0;
}

.workspace-table-wrap {
    overflow: auto;
}

.workspace-table-wrap .table {
    min-width: 840px;
}

.workspace-table-wrap .table th,
.workspace-table-wrap .table td {
    font-size: 0.92rem;
}

.workspace-table-wrap .table th {
    white-space: nowrap;
}

.workspace-table-wrap .status-pill {
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    text-transform: none;
    padding: 0.12rem 0.42rem;
}

.workspace-row-actions {
    display: inline-flex;
    gap: 0.45rem;
    align-items: center;
}

.workspace-row-actions .btn {
    font-size: 0.8rem;
    padding: 0.4rem 0.7rem;
}

.workspace-row-actions form {
    margin: 0;
}

.workspace-create-project-btn {
    font-size: 0.84rem;
    padding: 0.48rem 0.82rem;
}

.workspace-empty {
    border: 1px dashed #3c5f96;
    border-radius: 14px;
    background: #122349;
    padding: 1rem;
}

.workspace-empty h3 {
    margin: 0;
}

.workspace-empty .btn {
    margin-top: 0.4rem;
}

.result-list {
    margin: 0 0 1rem;
    padding-left: 1.1rem;
}

.site-footer {
    border-top: 1px solid var(--line);
    padding: 1.1rem 0;
    color: var(--muted);
}

.footer-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.92rem;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
}

.footer-links a {
    color: var(--muted);
    text-decoration: none;
}

.footer-links a:hover {
    color: var(--accent-strong);
}

@media (max-width: 760px) {
    .nav-wrap {
        align-items: flex-start;
        flex-direction: column;
    }

    nav {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .main-content {
        padding-top: 1.4rem;
    }

    .main-content > section + section {
        margin-top: 0.9rem;
    }

    .workspace-header {
        flex-direction: column;
        align-items: stretch;
        padding: 1rem;
    }

    .workspace-header-actions {
        justify-content: flex-start;
    }

    .workspace-projects-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .footer-inner {
        align-items: flex-start;
        flex-direction: column;
    }
}

@keyframes fade-up {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Single-page long-read extensions aligned with LandingPlatform style */
.page {
    padding: clamp(1rem, 2.2vw, 2rem) 0 2.5rem;
}

.hero {
    min-height: min(34vh, 320px);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.error-hero {
    position: relative;
    overflow: hidden;
}

.error-hero::after {
    content: "";
    position: absolute;
    right: -70px;
    top: -70px;
    width: 210px;
    height: 210px;
    border-radius: 999px;
    background: radial-gradient(circle at center, rgba(67, 242, 207, 0.24), rgba(57, 212, 255, 0.02) 72%);
    pointer-events: none;
}

.error-code {
    margin: 0;
    font-family: "IBM Plex Mono", monospace;
    font-size: clamp(2.4rem, 7vw, 4rem);
    line-height: 1;
    letter-spacing: 0.06em;
    color: rgba(67, 242, 207, 0.86);
    text-shadow: 0 0 28px rgba(67, 242, 207, 0.22);
}

.error-intents {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.error-intents a {
    border: 1px solid #386090;
    background: rgba(12, 24, 45, 0.8);
    color: #bce8ff;
    text-decoration: none;
    border-radius: 999px;
    padding: 0.34rem 0.75rem;
    font-size: 0.82rem;
    font-weight: 600;
    transition: border-color 140ms ease, transform 120ms ease;
}

.error-intents a:hover {
    border-color: #5fc1ff;
    transform: translateY(-1px);
}

.error-recovery {
    margin-top: 1rem;
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.error-recovery-card {
    border: 1px solid var(--line);
    border-radius: 16px;
    background: linear-gradient(150deg, rgba(23, 39, 72, 0.95), rgba(15, 28, 54, 0.95));
    padding: 1rem;
}

.error-recovery-card h2 {
    margin: 0 0 0.35rem;
    font-size: 1.05rem;
}

.error-recovery-card p {
    margin: 0 0 0.8rem;
    color: var(--muted);
}

.reader-nav {
    margin-top: 0.8rem;
    display: flex;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.reader-nav a {
    border: 1px solid var(--line);
    background: rgba(18, 31, 60, 0.88);
    color: #cde1ff;
    text-decoration: none;
    border-radius: 999px;
    font-size: 0.83rem;
    font-weight: 600;
    padding: 0.32rem 0.72rem;
    transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

.reader-nav a.active {
    border-color: rgba(67, 242, 207, 0.75);
    color: #e9fffa;
    background: linear-gradient(120deg, rgba(17, 79, 92, 0.78), rgba(24, 69, 109, 0.84));
    box-shadow: 0 0 0 1px rgba(67, 242, 207, 0.28) inset;
}

.meta {
    margin-top: 1rem;
    display: grid;
    gap: 0.45rem;
    color: var(--muted);
    font-size: 0.95rem;
}

.cta-banner {
    margin-top: 1rem;
    border: 1px solid var(--line);
    border-radius: 18px;
    background:
        radial-gradient(circle at 85% 8%, rgba(57, 212, 255, 0.24) 0%, transparent 40%),
        linear-gradient(135deg, rgba(24, 43, 79, 0.96), rgba(17, 32, 60, 0.98));
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.32);
    padding: clamp(1rem, 2.3vw, 1.4rem);
    display: grid;
    gap: 1rem;
    grid-template-columns: 1.45fr 1fr;
    align-items: center;
}

.cta-banner h2 {
    margin: 0.3rem 0 0.55rem;
    line-height: 1.2;
}

.cta-actions {
    display: grid;
    gap: 0.6rem;
}

.article {
    margin-top: 1rem;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3);
    padding: clamp(1rem, 2.2vw, 1.55rem);
}

.article h2 {
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.article h2[id] {
    scroll-margin-top: 4.5rem;
}

.article h2[id]:target {
    animation: section-focus 3.5s ease-out;
}

.article p,
.article li {
    color: #dce7ff;
    line-height: 1.76;
}

.article p {
    margin: 0.45rem 0 0.95rem;
    max-width: none;
}

.article a {
    color: #8fe7ff;
    text-decoration-color: rgba(143, 231, 255, 0.55);
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
    transition: color 140ms ease, text-decoration-color 140ms ease;
}

.article a:hover {
    color: #d0f8ff;
    text-decoration-color: rgba(208, 248, 255, 0.95);
}

.article ul,
.article ol {
    margin: 0.5rem 0 1rem;
    padding-left: 1.2rem;
}

.cover {
    margin: 0.35rem 0 1rem;
}

.cover img {
    width: 100%;
    height: auto;
    border-radius: 14px;
    border: 1px solid var(--line);
    display: block;
}

.cover figcaption {
    margin-top: 0.45rem;
    color: var(--muted);
    font-size: 0.9rem;
}

.article-intro {
    font-size: 1.08rem;
    color: #e8f2ff;
}

.takeaways {
    border: 1px solid #3f72b4;
    background: rgba(16, 35, 66, 0.86);
    border-radius: 14px;
    padding: 0.8rem 0.95rem;
    margin: 0.9rem 0 1.1rem;
}

.takeaways h2 {
    margin: 0 0 0.35rem;
}

.takeaways ul {
    margin: 0;
}

.inline-figure {
    margin: 1.1rem 0 1.3rem;
}

.inline-figure img {
    width: 100%;
    height: auto;
    border-radius: 14px;
    border: 1px solid var(--line);
    display: block;
}

.inline-figure figcaption {
    margin-top: 0.45rem;
    color: var(--muted);
    font-size: 0.9rem;
}

.policy {
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3);
    padding: clamp(1rem, 2.2vw, 1.55rem);
}

.policy-page {
    flex: 1;
}

.policy-page h1 {
    margin: 0.3rem 0 0.6rem;
}

.policy-page h2 {
    margin: 1rem 0 0.45rem;
    font-size: 1.05rem;
}

.policy-page p,
.policy-page li {
    color: var(--muted);
    line-height: 1.7;
}

.policy-page ul {
    margin: 0.35rem 0 0.35rem 1rem;
}

.policy-meta {
    margin: 0 0 0.35rem;
    color: #9fdcff;
    font-size: 0.88rem;
}

.related-posts {
    margin-top: 1rem;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: linear-gradient(145deg, rgba(23, 39, 72, 0.96), rgba(18, 31, 60, 0.95));
    padding: clamp(1rem, 2.2vw, 1.45rem);
}

.related-head h2 {
    margin: 0.3rem 0 0.7rem;
}

.related-grid {
    display: grid;
    gap: 0.7rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.related-card {
    border: 1px solid var(--line);
    background: rgba(10, 22, 43, 0.72);
    border-radius: 14px;
    text-decoration: none;
    color: var(--ink);
    padding: 0.9rem;
    transition: transform 120ms ease, border-color 120ms ease;
}

.related-card:hover {
    transform: translateY(-2px);
    border-color: #4da8ff;
}

.related-card h3 {
    margin: 0.2rem 0 0.35rem;
    line-height: 1.25;
}

.related-card p {
    margin: 0;
    color: var(--muted);
}

.related-meta {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #87cbff !important;
    font-weight: 700;
}

.article-trust {
    margin-top: 1rem;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 1rem 1.1rem;
    background: linear-gradient(135deg, rgba(18, 33, 63, 0.95), rgba(14, 26, 50, 0.98));
}

.article-trust h2 {
    margin: 0 0 0.55rem;
    font-size: 1.02rem;
}

.article-trust p {
    margin: 0.25rem 0;
    color: #d4e4ff;
}

.article-trust p strong {
    color: #ebfffb;
}

.article-directory {
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3);
    padding: clamp(1rem, 2.2vw, 1.55rem);
}

.article-directory h1 {
    margin: 0.4rem 0 0.75rem;
}

.directory-search-label {
    display: block;
    margin: 1rem 0 0.45rem;
    color: #d8e7ff;
    font-weight: 600;
}

.directory-search {
    width: 100%;
    border-radius: 10px;
    border: 1px solid #3f679b;
    background: #0d1f3d;
    color: #ecf4ff;
    padding: 0.65rem 0.8rem;
    font: inherit;
}

.directory-search:focus {
    outline: 2px solid rgba(57, 212, 255, 0.26);
    border-color: var(--accent);
}

.directory-search-status {
    min-height: 1.2em;
    margin: 0.55rem 0 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.directory-grid {
    margin-top: 0.85rem;
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.directory-card {
    border: 1px solid var(--line);
    background: rgba(12, 24, 45, 0.75);
    border-radius: 14px;
    text-decoration: none;
    color: var(--ink);
    padding: 0.95rem;
    transition: transform 120ms ease, border-color 120ms ease;
}

.directory-card:hover {
    transform: translateY(-2px);
    border-color: #53b8ff;
}

.directory-card h2 {
    margin: 0.2rem 0 0.45rem;
    font-size: 1.05rem;
    line-height: 1.3;
}

.directory-card p {
    margin: 0;
    color: var(--muted);
}

.directory-card[hidden] {
    display: none;
}

.back-top {
    margin-top: 0.85rem;
    display: inline-flex;
    color: var(--accent);
    text-decoration: none;
    font-weight: 700;
}

.to-top-fab {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 35;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    border: 1px solid #4f86c9;
    background: rgba(12, 26, 50, 0.9);
    color: #d7eeff;
    text-decoration: none;
    display: grid;
    place-items: center;
    font-size: 1.2rem;
    font-weight: 700;
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity 140ms ease, transform 140ms ease, visibility 140ms ease;
}

body.show-to-top .to-top-fab {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.faq-block {
    margin-top: 1.2rem;
    border-top: 1px solid var(--line);
    padding-top: 0.9rem;
}

.faq-block details {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(15, 30, 57, 0.85);
    padding: 0.72rem 0.82rem;
    margin-top: 0.55rem;
}

.faq-block summary {
    cursor: pointer;
    font-weight: 700;
}

.faq-block details p {
    margin: 0.55rem 0 0;
}

@keyframes section-focus {
    0% {
        color: #8ae7ff;
        text-shadow: 0 0 0 rgba(138, 231, 255, 0);
    }

    40% {
        color: #b9f1ff;
        text-shadow: 0 0 16px rgba(67, 242, 207, 0.45);
    }

    100% {
        color: var(--ink);
        text-shadow: 0 0 0 rgba(67, 242, 207, 0);
    }
}

@keyframes cta-neon-pulse {
    0%,
    100% {
        box-shadow:
            0 0 0 1px rgba(57, 212, 255, 0.32) inset,
            0 0 14px rgba(57, 212, 255, 0.38),
            0 0 26px rgba(67, 242, 207, 0.28);
    }

    50% {
        box-shadow:
            0 0 0 1px rgba(57, 212, 255, 0.4) inset,
            0 0 20px rgba(57, 212, 255, 0.48),
            0 0 38px rgba(67, 242, 207, 0.45);
    }
}

@keyframes cta-neon-bg-shift {
    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

@keyframes cta-neon-sheen {
    0% {
        left: -45%;
        opacity: 0;
    }

    15% {
        opacity: 0.34;
    }

    55% {
        opacity: 0.3;
    }

    100% {
        left: 118%;
        opacity: 0;
    }
}

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

    .article h2[id]:target {
        animation: none;
    }

    .cta-banner .btn-primary {
        animation: none;
    }

    .cta-banner .btn-primary::after {
        animation: none;
    }
}

@media (max-width: 800px) {
    .hero {
        min-height: auto;
    }

    .cta-banner {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .article h2[id] {
        scroll-margin-top: 6.2rem;
    }
}

