:root {
    --bg: #fafaf7;
    --bg-alt: #f2f1ec;
    --bg-card: #fff;
    --text: #1a1a1a;
    --text-secondary: #555;
    --text-muted: #888;
    --accent: #1e3a5f;
    --accent-hover: #15304f;
    --border: #e4e3de;
    --radius: 8px;
    --font: 'Manrope', system-ui, -apple-system, sans-serif;
    --nav-h: 64px;
    --max-w: 1080px;
}

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

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    font-size: 16px;
    line-height: 1.65;
}

::selection { background: rgba(30, 58, 95, 0.15); }

a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input { font-family: inherit; font-size: inherit; }
ul { list-style: none; }

.container {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 24px;
}

/* --- Nav --- */

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-h);
    z-index: 100;
    background: rgba(250, 250, 247, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 16px;
    color: var(--text);
}

.logo-mark { color: var(--accent); flex-shrink: 0; }

.nav-right {
    display: flex;
    align-items: center;
    gap: 28px;
}

.nav-link {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color 0.15s;
}

.nav-link:hover { color: var(--text); }

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 6px;
}

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text);
    border-radius: 1px;
    transition: all 0.2s;
}

/* --- Buttons --- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    border-radius: var(--radius);
    padding: 10px 20px;
    transition: all 0.15s ease;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
}

.btn-primary:hover { background: var(--accent-hover); }

.btn-lg { padding: 14px 28px; font-size: 15px; }
.btn-full { width: 100%; }
.btn-nav { padding: 8px 18px; }

/* --- Hero --- */

.hero {
    padding: calc(var(--nav-h) + 80px) 0 80px;
}

.hero-layout {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 64px;
    align-items: center;
}

.hero h1 {
    font-size: clamp(32px, 4.5vw, 52px);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: var(--text);
    margin-bottom: 20px;
}

.hero-sub {
    font-size: 17px;
    line-height: 1.65;
    color: var(--text-secondary);
    max-width: 440px;
    margin-bottom: 32px;
}

.hero-cta {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.hero-note {
    font-size: 13px;
    color: var(--text-muted);
}

/* Hero features preview */

.hero-features-preview {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.preview-item {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 20px;
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.preview-icon {
    font-size: 18px;
    flex-shrink: 0;
    width: 24px;
    text-align: center;
}

/* --- Features --- */

/* --- Value Strip --- */

.value-strip {
    padding: 48px 0;
    border-top: 1px solid var(--border);
    background: var(--bg-alt);
}

.value-strip-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 32px;
    align-items: center;
}

.value-item {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-secondary);
}

.value-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.value-divider {
    width: 1px;
    height: 48px;
    background: var(--border);
}

/* --- Section Title --- */

.section-title {
    font-size: clamp(24px, 3vw, 32px);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 40px;
}

.features {
    padding: 80px 0;
    border-top: 1px solid var(--border);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 48px;
}

.features-grid--six {
    gap: 40px 48px;
}

.feature h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}

.feature p {
    font-size: 15px;
    line-height: 1.65;
    color: var(--text-secondary);
}

.feature p a {
    color: var(--accent);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.feature p a:hover {
    color: var(--accent-hover);
}

/* --- CRA Section (landing page) --- */

.cra-section {
    padding: 80px 0;
    border-top: 1px solid var(--border);
}

.cra-section-title {
    font-size: clamp(24px, 3vw, 32px);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}

.cra-section-sub {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.cra-section-link {
    color: var(--accent);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.cra-section-link:hover {
    color: var(--accent-hover);
}

/* --- Deadline --- */

.deadline {
    padding: 48px 0;
    background: var(--bg-alt);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.deadline-text {
    font-size: 15px;
    color: var(--text-secondary);
    text-align: center;
    max-width: 640px;
    margin: 0 auto;
}

.deadline-text strong {
    color: var(--text);
    font-weight: 600;
}

/* --- Pricing --- */

.pricing {
    padding: 100px 0;
}

.pricing-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: start;
}

.pricing-text h2 {
    font-size: clamp(26px, 3.5vw, 40px);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
}

.pricing-text p {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.65;
    max-width: 380px;
}

.pricing-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 36px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.pricing-trial {
    display: inline-block;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--accent);
    margin-bottom: 16px;
}

.pricing-price {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 4px;
}

.pricing-amount {
    font-size: 44px;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1;
}

.pricing-period {
    font-size: 15px;
    color: var(--text-muted);
}

.pricing-annual {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 28px;
}

.pricing-save {
    font-size: 12px;
    font-weight: 600;
    color: var(--accent);
    background: rgba(30, 58, 95, 0.07);
    padding: 2px 8px;
    border-radius: 4px;
    margin-left: 4px;
}

.pricing-list {
    margin-bottom: 28px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pricing-list li {
    font-size: 14px;
    color: var(--text-secondary);
    padding-left: 20px;
    position: relative;
}

.pricing-list li::before {
    content: '—';
    position: absolute;
    left: 0;
    color: var(--text-muted);
}

.pricing-fine {
    display: block;
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 12px;
}

/* --- Footer --- */

.footer {
    padding: 32px 0;
    border-top: 1px solid var(--border);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 24px;
}

.logo--small .logo-text { font-size: 14px; }

.footer-copy {
    font-size: 13px;
    color: var(--text-muted);
}

.footer-right {
    display: flex;
    gap: 24px;
}

.footer-right a {
    font-size: 13px;
    color: var(--text-muted);
    transition: color 0.15s;
}

.footer-right a:hover { color: var(--text); }

/* --- Overlay / Signup --- */

.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    padding: 20px;
}

.overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.signup {
    width: 100%;
    max-width: 400px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 36px;
    position: relative;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.1);
    transform: translateY(8px);
    transition: transform 0.2s ease;
}

.overlay.open .signup { transform: translateY(0); }

.signup-close {
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 22px;
    color: var(--text-muted);
    line-height: 1;
    padding: 2px 6px;
    border-radius: 4px;
}

.signup-close:hover { color: var(--text); }

.signup h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 4px;
}

.signup > p {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.signup label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--text);
}

.signup input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    margin-bottom: 16px;
    background: var(--bg);
    color: var(--text);
    outline: none;
    transition: border-color 0.15s;
}

.signup input:focus {
    border-color: var(--accent);
}

.signup input::placeholder { color: #bbb; }

.subdomain-input {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg);
    transition: border-color 0.15s;
}

.subdomain-input:focus-within {
    border-color: var(--accent);
}

.subdomain-input input {
    border: none;
    background: none;
    margin-bottom: 0;
    border-radius: 6px 0 0 6px;
    flex: 1;
    min-width: 0;
}

.subdomain-input input:focus {
    border-color: transparent;
}

.subdomain-suffix {
    padding: 10px 12px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--bg-alt);
    border-left: 1px solid var(--border);
    border-radius: 0 6px 6px 0;
    white-space: nowrap;
    user-select: none;
}

.subdomain-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin: -8px 0 16px;
    min-height: 18px;
}

.subdomain-hint.error {
    color: #c0392b;
}

.signup form .btn { margin-top: 4px; }

.signup-success {
    display: none;
    text-align: center;
    padding: 20px 0;
}

.signup-success p {
    font-size: 15px;
    color: var(--text-secondary);
}

.signup.done form { display: none; }
.signup.done .signup-success { display: block; }
.signup.done > p { display: none; }
.signup.done h3::after { content: ' ✓'; }

/* --- Toast --- */

.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 12px 20px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    z-index: 300;
    transform: translateY(80px);
    transition: transform 0.3s ease;
    background: #c0392b;
    color: #fff;
}

.toast.show { transform: translateY(0); }
.toast--success { background: #27ae60; }
.toast--info { background: #2980b9; }

/* --- Status Banner --- */

.status-banner {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    z-index: 99;
    text-align: center;
    padding: 16px 24px;
}

.status-banner p {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
}

.status-banner .btn {
    margin-top: 10px;
    font-size: 13px;
    padding: 8px 20px;
}

.status-banner--success {
    background: #d5f5e3;
    color: #1a6b37;
    border-bottom: 1px solid #a9e4c0;
}

.status-banner--warning {
    background: #fef9e7;
    color: #7d6608;
    border-bottom: 1px solid #f9e79f;
}

.status-banner--error {
    background: #fdedec;
    color: #922b21;
    border-bottom: 1px solid #f5b7b1;
}

body.has-banner .hero {
    padding-top: calc(var(--nav-h) + 80px + 64px);
}

/* --- Mobile --- */

@media (max-width: 768px) {
    .hero-layout { grid-template-columns: 1fr; gap: 40px; }
    .hero { padding: calc(var(--nav-h) + 48px) 0 48px; }
    .hero h1 { font-size: 32px; }
    .hero-visual { order: -1; }

    .features-grid { grid-template-columns: 1fr; gap: 32px; }

    .pricing-layout { grid-template-columns: 1fr; gap: 32px; }

    .nav-right { display: none; }
    .nav-toggle { display: flex; }

    .nav-right.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: var(--nav-h);
        left: 0;
        right: 0;
        background: var(--bg);
        border-bottom: 1px solid var(--border);
        padding: 20px 24px;
        gap: 16px;
    }

    .nav-right.open .btn-nav { width: 100%; }

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

@media (max-width: 480px) {
    .hero-cta { flex-direction: column; align-items: flex-start; }
    .pricing-card { padding: 28px; }
}

/* --- Article / Prose --- */

.article {
    padding: calc(var(--nav-h) + 64px) 0 80px;
}

.article-container {
    max-width: 720px;
}

.article-header {
    margin-bottom: 48px;
}

.article-header h1 {
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.025em;
    margin-bottom: 16px;
}

.article-lead {
    font-size: 17px;
    line-height: 1.7;
    color: var(--text-secondary);
}

.article h2 {
    font-size: 22px;
    font-weight: 700;
    margin-top: 48px;
    margin-bottom: 16px;
    letter-spacing: -0.01em;
}

.article h3 {
    font-size: 17px;
    font-weight: 700;
    margin-top: 32px;
    margin-bottom: 8px;
}

.article p {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.article ul, .article ol {
    margin-bottom: 16px;
    padding-left: 20px;
}

.article li {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.article strong {
    color: var(--text);
    font-weight: 600;
}

/* --- Quick Check --- */

.quick-check {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    margin: 32px 0;
}

.quick-check h2 {
    margin-top: 0;
}

.check-list {
    list-style: none;
    padding: 0;
    margin: 16px 0;
}

.check-list li {
    position: relative;
    padding-left: 28px;
    margin-bottom: 10px;
}

.check-list li::before {
    content: '?';
    position: absolute;
    left: 0;
    font-weight: 700;
    color: var(--accent);
    font-size: 14px;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(30, 58, 95, 0.08);
    border-radius: 50%;
    top: 2px;
}

.check-note {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 0;
}

/* --- Timeline --- */

.timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 24px 0 16px;
    position: relative;
    padding-left: 24px;
    border-left: 2px solid var(--border);
}

.timeline-item {
    position: relative;
    padding: 0 0 28px 20px;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -29px;
    top: 4px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--border);
    border: 2px solid var(--bg);
}

.timeline-item--past::before {
    background: var(--text-muted);
}

.timeline-item--next::before {
    background: var(--accent);
    box-shadow: 0 0 0 4px rgba(30, 58, 95, 0.12);
}

.timeline-date {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.timeline-item--next .timeline-date {
    color: var(--accent);
}

.timeline-label {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}

.timeline-item p {
    margin-bottom: 0;
}

/* --- CRA Mapping --- */

.cra-map {
    margin: 24px 0 32px;
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.cra-map-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: var(--border);
}

.cra-map-req, .cra-map-sol {
    padding: 20px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
    background: var(--bg-card);
}

.cra-map-req {
    background: var(--bg-alt);
    font-weight: 500;
    color: var(--text);
}

.cra-map-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 6px;
}

/* --- Article CTA --- */

.article-cta {
    text-align: center;
    margin: 48px 0 16px;
    padding: 40px 24px;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.article-cta p {
    color: var(--text-muted);
    margin-bottom: 16px;
    font-size: 15px;
}

/* --- FAQ --- */

.faq {
    margin-top: 48px;
    border-top: 1px solid var(--border);
    padding-top: 48px;
}

.faq-item {
    border-bottom: 1px solid var(--border);
    padding: 16px 0;
}

.faq-item summary {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
    content: '+';
    font-size: 18px;
    font-weight: 400;
    color: var(--text-muted);
    flex-shrink: 0;
    transition: transform 0.15s;
}

.faq-item[open] summary::after {
    content: '\2212';
}

.faq-item p {
    margin-top: 12px;
    margin-bottom: 4px;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* --- Nav active --- */

.nav-link--active {
    color: var(--text);
    font-weight: 600;
}

/* --- Mobile additions --- */

@media (max-width: 768px) {
    .cra-map-row { grid-template-columns: 1fr; }
    .article { padding: calc(var(--nav-h) + 40px) 0 48px; }
    .article-header h1 { font-size: 28px; }
    .quick-check { padding: 24px; }
    .value-strip-inner { grid-template-columns: 1fr; gap: 24px; }
    .value-divider { width: 100%; height: 1px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    html { scroll-behavior: auto; }
}
