/* ===========================================================
   INTENTOS — shared site styles (marketing, account, legal)
   Built on the theme variables defined in theme.css
   =========================================================== */

.site-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--t-bg-gradient);
    color: var(--t-text);
}

.site-main { flex: 1 0 auto; }

/* ---------- Top navigation ---------- */
.site-nav {
    position: sticky;
    top: 0;
    z-index: 40;
    width: 100%;
    backdrop-filter: saturate(140%) blur(14px);
    background: color-mix(in srgb, var(--t-bg) 78%, transparent);
    border-bottom: 1px solid color-mix(in srgb, var(--t-border) 60%, transparent);
}

.site-nav-link {
    color: var(--t-text-muted);
    transition: color 0.15s ease;
    position: relative;
    padding-bottom: 2px;
}
.site-nav-link:hover { color: var(--t-text); }
.site-nav-link.is-active { color: var(--t-text); font-weight: 600; }
.site-nav-link.is-active::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: -6px;
    height: 2px;
    border-radius: 2px;
    background: var(--t-accent);
}

/* ---------- Sections / layout ---------- */
.section { padding: 5rem 1.5rem; }
.section-sm { padding: 3.5rem 1.5rem; }
.container { max-width: 72rem; margin: 0 auto; }
.container-narrow { max-width: 46rem; margin: 0 auto; }
.container-tight { max-width: 34rem; margin: 0 auto; }

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--t-text-muted);
    padding: 0.35rem 0.85rem;
    border: 1px solid var(--t-border);
    border-radius: 999px;
    background: var(--t-surface);
}

.h-display {
    font-size: clamp(2.2rem, 5vw, 3.6rem);
    line-height: 1.05;
    font-weight: 700;
    letter-spacing: -0.03em;
}
.h-section {
    font-size: clamp(1.7rem, 3.2vw, 2.4rem);
    line-height: 1.12;
    font-weight: 700;
    letter-spacing: -0.02em;
}
.lead {
    font-size: clamp(1rem, 1.4vw, 1.18rem);
    line-height: 1.6;
    color: var(--t-text-muted);
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1.6rem;
    border-radius: 1rem;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: transform 0.12s ease, box-shadow 0.15s ease, background 0.15s ease, opacity 0.15s ease;
    text-decoration: none;
    white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--t-accent); color: var(--t-accent-text); }
.btn-primary:hover { background: var(--t-accent-hover); }
.btn-ghost { background: var(--t-surface); color: var(--t-text); border-color: var(--t-border); }
.btn-ghost:hover { background: var(--t-surface-2); }
.btn-lg { padding: 1rem 2rem; font-size: 1.02rem; border-radius: 1.15rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }

/* ---------- Cards / grids ---------- */
.grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
    gap: 1.25rem;
}
.feature-card {
    background: var(--t-surface);
    border: 1px solid var(--t-border);
    border-radius: 1.5rem;
    padding: 1.75rem;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--t-shadow); }
.feature-ico {
    width: 3rem; height: 3rem;
    border-radius: 1rem;
    display: flex; align-items: center; justify-content: center;
    background: var(--t-surface-3);
    color: var(--t-text);
    margin-bottom: 1.1rem;
}
.feature-ico svg { width: 1.5rem; height: 1.5rem; }
.feature-card h3 { font-size: 1.15rem; font-weight: 600; margin-bottom: 0.5rem; }
.feature-card p { color: var(--t-text-muted); line-height: 1.55; font-size: 0.95rem; }

/* ---------- Hero ---------- */
.hero {
    padding: clamp(3.5rem, 8vw, 7rem) 1.5rem 3.5rem;
    text-align: center;
}
.hero .lead { max-width: 40rem; margin: 1.25rem auto 0; }
.hero-actions { display: flex; gap: 0.85rem; justify-content: center; flex-wrap: wrap; margin-top: 2rem; }
.hero-note { margin-top: 1rem; font-size: 0.85rem; color: var(--t-text-muted); }

.logo-strip {
    display: flex; flex-wrap: wrap; gap: 2rem 3rem;
    align-items: center; justify-content: center;
    opacity: 0.7;
    margin-top: 3rem;
    font-weight: 600; letter-spacing: -0.02em;
    color: var(--t-text-muted);
}

/* ---------- Steps ---------- */
.step-list { display: grid; gap: 1.5rem; counter-reset: step; }
.step {
    display: flex; gap: 1.25rem; align-items: flex-start;
    background: var(--t-surface); border: 1px solid var(--t-border);
    border-radius: 1.25rem; padding: 1.5rem;
}
.step-num {
    flex-shrink: 0;
    width: 2.5rem; height: 2.5rem; border-radius: 0.85rem;
    background: var(--t-accent); color: var(--t-accent-text);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700;
}
.step h3 { font-weight: 600; font-size: 1.1rem; margin-bottom: 0.35rem; }
.step p { color: var(--t-text-muted); line-height: 1.55; }

/* ---------- CTA band ---------- */
.cta-band {
    background: var(--t-accent);
    color: var(--t-accent-text);
    border-radius: 2rem;
    padding: clamp(2.5rem, 5vw, 4rem);
    text-align: center;
}
.cta-band h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 700; letter-spacing: -0.02em; }
.cta-band p { opacity: 0.85; margin-top: 0.75rem; }
.cta-band .btn-ghost { background: var(--t-accent-text); color: var(--t-accent); border-color: transparent; }

/* ---------- Forms ---------- */
.form-field { margin-bottom: 1.1rem; }
.form-field label {
    display: block;
    font-size: 0.85rem; font-weight: 600;
    margin-bottom: 0.45rem;
}
.input {
    width: 100%;
    padding: 0.8rem 1rem;
    border-radius: 0.9rem;
    border: 1px solid var(--t-border);
    background: var(--t-surface);
    color: var(--t-text);
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.input:focus {
    border-color: color-mix(in srgb, var(--t-accent) 60%, var(--t-border));
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--t-accent) 18%, transparent);
}
textarea.input { resize: vertical; min-height: 7rem; }
.input.is-invalid { border-color: #ef4444; box-shadow: 0 0 0 3px rgba(239,68,68,0.15); }
.field-error { color: #ef4444; font-size: 0.8rem; margin-top: 0.35rem; min-height: 1rem; }
.field-hint { color: var(--t-text-muted); font-size: 0.8rem; margin-top: 0.35rem; }

.input-group { position: relative; }
.input-group .input { padding-right: 3rem; }
.input-affix {
    position: absolute; right: 0.5rem; top: 50%; transform: translateY(-50%);
    background: none; border: none; cursor: pointer; color: var(--t-text-muted);
    width: 2.25rem; height: 2.25rem; display: flex; align-items: center; justify-content: center;
    border-radius: 0.6rem;
}
.input-affix:hover { color: var(--t-text); background: var(--t-surface-2); }

/* ---------- Auth ---------- */
.auth-wrap {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr;
    background: var(--t-bg-gradient);
    color: var(--t-text);
}
@media (min-width: 900px) {
    .auth-wrap { grid-template-columns: 1.1fr 1fr; }
}
.auth-aside {
    display: none;
    padding: 3rem;
    background: var(--t-accent);
    color: var(--t-accent-text);
    flex-direction: column;
    justify-content: space-between;
}
@media (min-width: 900px) { .auth-aside { display: flex; } }
.auth-aside h2 { font-size: 2rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; color: var(--t-accent-text); }
.auth-aside .quote { font-size: 1.1rem; line-height: 1.6; opacity: 0.92; color: var(--t-accent-text); }
.auth-aside .badge-row { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.auth-aside .badge {
    background: color-mix(in srgb, var(--t-accent-text) 16%, transparent);
    color: var(--t-accent-text);
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
}

.auth-panel {
    display: flex;
    flex-direction: column;
    padding: 2rem 1.5rem;
    color: var(--t-text);
    background: var(--t-surface);
}
@media (min-width: 900px) {
    .auth-panel { background: var(--t-bg); }
}

.auth-card { width: 100%; max-width: 22.5rem; margin: auto; }
.auth-card h1 {
    font-size: 1.375rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--t-text);
    margin-bottom: 1.25rem;
}
.auth-card .sub {
    color: var(--t-text-muted);
    font-size: 0.875rem;
    margin-top: 0.35rem;
    margin-bottom: 1.5rem;
    line-height: 1.45;
}
.auth-card .form-field { margin-bottom: 0.9rem; }
.auth-card .form-field label {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--t-text-muted);
    margin-bottom: 0.35rem;
}
.auth-card .input {
    border-radius: 0.5rem;
    padding: 0.65rem 0.85rem;
    font-size: 0.875rem;
}
.auth-card .field-hint {
    font-size: 0.72rem;
    margin-top: 0.35rem;
    color: var(--t-text-muted);
    opacity: 0.85;
}
.auth-card .field-error { font-size: 0.75rem; }
.auth-alt {
    text-align: center;
    margin-top: 1.25rem;
    color: var(--t-text-muted);
    font-size: 0.8125rem;
}
.auth-alt a { color: var(--t-text-muted); font-weight: 500; text-decoration: underline; text-underline-offset: 2px; }
.auth-alt a:hover { color: var(--t-text); }
.auth-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}
@media (min-width: 900px) {
    .auth-top { justify-content: flex-end; }
}
.auth-mobile-logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.04em;
    color: var(--t-text);
    text-decoration: none;
}
@media (min-width: 900px) {
    .auth-mobile-logo { display: none; }
}
.demo-hint {
    margin-top: 1.25rem; padding: 0.85rem 1rem;
    border: 1px dashed var(--t-border); border-radius: 0.9rem;
    font-size: 0.82rem; color: var(--t-text-muted);
}
/* OAuth — Cursor-style (icon fixed 18px; Tailwind must not stretch svg) */
.auth-oauth-stack { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 1.25rem; }
.auth-oauth-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 2.75rem;
    padding: 0.6rem 2.75rem;
    border-radius: 0.5rem;
    border: 1px solid var(--t-border);
    background: color-mix(in srgb, var(--t-surface-2) 70%, transparent);
    color: var(--t-text);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.auth-oauth-btn:hover { background: var(--t-surface-2); border-color: color-mix(in srgb, var(--t-text) 12%, var(--t-border)); }
.auth-oauth-btn:active { opacity: 0.92; }
.auth-oauth-btn__icon {
    position: absolute;
    left: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    display: block;
    flex: none;
    pointer-events: none;
}
.auth-oauth-btn__icon,
.auth-oauth-btn svg {
    width: 18px !important;
    height: 18px !important;
    max-width: 18px !important;
    max-height: 18px !important;
}
.auth-oauth-btn__label { pointer-events: none; }

.auth-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 2.75rem;
    margin-top: 0.35rem;
    padding: 0.6rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid var(--t-border);
    background: color-mix(in srgb, var(--t-surface-2) 70%, transparent);
    color: var(--t-text);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease;
}
.auth-submit:hover { background: var(--t-surface-2); }
.auth-submit[disabled] { opacity: 0.5; cursor: not-allowed; }

.auth-legal {
    margin-top: 2rem;
    text-align: center;
    font-size: 0.6875rem;
    line-height: 1.55;
    color: var(--t-text-muted);
    opacity: 0.72;
}
.auth-legal a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
    font-weight: 400;
}
.auth-legal a:hover { color: var(--t-text); opacity: 1; }

.auth-mode-link {
    display: block;
    width: 100%;
    margin-top: 0.65rem;
    padding: 0;
    border: none;
    background: none;
    color: var(--t-text-muted);
    font-size: 0.75rem;
    text-align: center;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.auth-mode-link:hover { color: var(--t-text); }

.auth-remember-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    margin: 0.15rem 0 0.85rem;
    color: var(--t-text-muted);
}
.auth-remember-row label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    margin: 0;
    color: var(--t-text-muted);
    font-size: 0.75rem;
    font-weight: 400;
}
.auth-remember-row a {
    color: var(--t-text-muted);
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.auth-remember-row a:hover { color: var(--t-text); }

.btn-code-send {
    display: inline-block;
    margin-top: 0.4rem;
    padding: 0;
    border: none;
    background: none;
    color: var(--t-text-muted);
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.btn-code-send:hover { color: var(--t-text); }
.btn-code-send[disabled] { opacity: 0.45; cursor: not-allowed; }

/* ---------- Footer ---------- */
.site-foot {
    border-top: 1px solid var(--t-border);
    background: var(--t-surface);
    padding: 3.5rem 1.5rem 2rem;
    margin-top: auto;
}
.site-foot-inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
}
@media (min-width: 760px) {
    .site-foot-inner { grid-template-columns: 1.4fr 2fr; }
}
.site-foot-brand p { margin-top: 0.85rem; max-width: 22rem; line-height: 1.55; font-size: 0.92rem; }
.site-foot-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
@media (max-width: 520px) { .site-foot-cols { grid-template-columns: repeat(2, 1fr); } }
.site-foot-col h4 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--t-text-muted); margin-bottom: 0.9rem; }
.site-foot-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.6rem; }
.site-foot-col a { color: var(--t-text); font-size: 0.9rem; opacity: 0.85; text-decoration: none; }
.site-foot-col a:hover { opacity: 1; text-decoration: underline; }
.site-foot-bottom {
    margin-top: 2.5rem; padding-top: 1.5rem;
    border-top: 1px solid var(--t-border);
    display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem;
    font-size: 0.82rem;
}

/* ---------- Pricing ---------- */
.billing-toggle {
    display: inline-flex; align-items: center; gap: 0.75rem;
    background: var(--t-surface); border: 1px solid var(--t-border);
    border-radius: 999px; padding: 0.35rem;
    margin: 1.5rem auto 0;
    max-width: 100%;
    flex-wrap: nowrap;
}
.billing-toggle button {
    border: none; background: none; cursor: pointer;
    padding: 0.5rem 1.1rem; border-radius: 999px;
    font-size: 0.88rem; font-weight: 600; color: var(--t-text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    white-space: nowrap;
    flex-shrink: 0;
}
.billing-toggle button.active { background: var(--t-accent); color: var(--t-accent-text); }
.save-badge {
    font-size: 0.65rem;
    background: #10b981;
    color: #fff;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    margin-left: 0;
    white-space: nowrap;
    flex-shrink: 0;
    line-height: 1.2;
}
@media (max-width: 400px) {
    .billing-toggle { padding: 0.3rem; gap: 0.35rem; }
    .billing-toggle button { padding: 0.45rem 0.75rem; font-size: 0.8rem; }
    .save-badge { font-size: 0.6rem; padding: 0.12rem 0.35rem; }
}

.price-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 1.5rem; align-items: stretch; }
.price-card {
    background: var(--t-surface); border: 1px solid var(--t-border);
    border-radius: 1.75rem; padding: 2rem; display: flex; flex-direction: column;
}
.price-card.featured {
    border-color: var(--t-accent);
    box-shadow: 0 0 0 1px var(--t-accent), var(--t-shadow);
    position: relative;
}
.price-card.featured::before {
    content: attr(data-badge);
    position: absolute; top: -0.8rem; left: 50%; transform: translateX(-50%);
    background: var(--t-accent); color: var(--t-accent-text);
    font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em;
    padding: 0.3rem 0.9rem; border-radius: 999px; text-transform: uppercase;
}
.price-name { font-weight: 700; font-size: 1.2rem; }
.price-amt { font-size: 2.6rem; font-weight: 700; letter-spacing: -0.02em; margin: 0.75rem 0 0.25rem; }
.price-amt span { font-size: 1rem; font-weight: 500; color: var(--t-text-muted); }
.price-desc { color: var(--t-text-muted); font-size: 0.9rem; min-height: 2.6rem; }
.price-features { list-style: none; padding: 0; margin: 1.5rem 0; display: grid; gap: 0.7rem; flex: 1; }
.price-features li { display: flex; gap: 0.6rem; align-items: flex-start; font-size: 0.9rem; }
.price-features li svg { width: 1.1rem; height: 1.1rem; flex-shrink: 0; color: #10b981; margin-top: 0.1rem; }

/* ---------- FAQ / accordion ---------- */
.faq-item { border-bottom: 1px solid var(--t-border); }
.faq-q {
    width: 100%; text-align: left; background: none; border: none; cursor: pointer;
    padding: 1.25rem 0; font-size: 1.02rem; font-weight: 600; color: var(--t-text);
    display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
.faq-q .chev { transition: transform 0.2s ease; flex-shrink: 0; }
.faq-item.open .faq-q .chev { transform: rotate(180deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.25s ease; }
.faq-a-inner { padding: 0 0 1.25rem; color: var(--t-text-muted); line-height: 1.6; }

/* ---------- Account shell (settings/billing/help) ---------- */
.account-grid {
    display: grid; grid-template-columns: 1fr; gap: 1.75rem;
    max-width: 68rem; margin: 0 auto; padding: 2.5rem 1.5rem;
}
@media (min-width: 860px) { .account-grid { grid-template-columns: 15rem 1fr; } }
.account-nav { display: flex; flex-direction: column; gap: 0.25rem; align-self: start; position: sticky; top: 6rem; }
.account-nav a {
    display: flex; align-items: center; gap: 0.7rem;
    padding: 0.7rem 1rem; border-radius: 0.9rem;
    color: var(--t-text-muted); font-weight: 500; font-size: 0.92rem; text-decoration: none;
}
.account-nav a:hover { background: var(--t-surface-2); color: var(--t-text); }
.account-nav a.is-active { background: var(--t-surface); color: var(--t-text); font-weight: 600; box-shadow: var(--t-shadow); }
.account-nav a svg { width: 1.1rem; height: 1.1rem; }

.panel {
    background: var(--t-surface); border: 1px solid var(--t-border);
    border-radius: 1.5rem; padding: 1.75rem; margin-bottom: 1.5rem;
}
.panel h2 { font-size: 1.2rem; font-weight: 700; }
.panel .panel-sub { color: var(--t-text-muted); font-size: 0.9rem; margin-top: 0.25rem; margin-bottom: 1.5rem; }
.panel-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 0.9rem 0; border-top: 1px solid var(--t-border); }
.panel-row:first-of-type { border-top: none; }
.panel-danger { border-color: color-mix(in srgb, #ef4444 40%, var(--t-border)); }
.panel-danger h2 { color: #ef4444; }

.avatar-lg {
    width: 4.5rem; height: 4.5rem; border-radius: 1.25rem;
    display: flex; align-items: center; justify-content: center;
    background: var(--t-accent); color: var(--t-accent-text);
    font-size: 1.6rem; font-weight: 700;
}

/* ---------- Billing ---------- */
.invoice-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.invoice-table th { text-align: left; color: var(--t-text-muted); font-weight: 600; padding: 0.6rem 0.5rem; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; }
.invoice-table td { padding: 0.85rem 0.5rem; border-top: 1px solid var(--t-border); }
.pill { display: inline-block; padding: 0.2rem 0.65rem; border-radius: 999px; font-size: 0.75rem; font-weight: 600; }
.pill-paid { background: #d1fae5; color: #065f46; }
.pill-free { background: var(--t-surface-3); color: var(--t-text-muted); }
.pay-card {
    display: flex; align-items: center; gap: 1rem;
    border: 1px solid var(--t-border); border-radius: 1rem; padding: 1rem 1.25rem;
}
.pay-card .brand { font-weight: 700; letter-spacing: 0.05em; }

/* ---------- Legal ---------- */
.legal { max-width: 48rem; margin: 0 auto; padding: 3rem 1.5rem 4rem; }
.legal h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); font-weight: 700; letter-spacing: -0.02em; }
.legal .updated { color: var(--t-text-muted); font-size: 0.9rem; margin-top: 0.5rem; margin-bottom: 2.5rem; }
.legal h2 { font-size: 1.3rem; font-weight: 700; margin: 2.25rem 0 0.75rem; }
.legal h3 { font-size: 1.05rem; font-weight: 600; margin: 1.5rem 0 0.5rem; }
.legal p, .legal li { color: var(--t-text-muted); line-height: 1.7; }
.legal ul { padding-left: 1.25rem; margin: 0.5rem 0 1rem; display: grid; gap: 0.4rem; }
.legal a { color: var(--t-text); text-decoration: underline; }
.legal .toc { background: var(--t-surface); border: 1px solid var(--t-border); border-radius: 1rem; padding: 1.25rem 1.5rem; margin-bottom: 2rem; }
.legal .toc ul { list-style: none; padding: 0; }
.legal .toc a { text-decoration: none; }

/* ---------- Toasts ---------- */
.toast-host {
    position: fixed; left: 50%; bottom: 1.5rem; transform: translateX(-50%);
    z-index: 9999; display: flex; flex-direction: column; gap: 0.6rem; align-items: center;
    pointer-events: none; width: max-content; max-width: 92vw;
}
.toast {
    display: flex; align-items: center; gap: 0.7rem;
    background: var(--t-surface); color: var(--t-text);
    border: 1px solid var(--t-border); box-shadow: var(--t-shadow);
    border-radius: 1rem; padding: 0.8rem 1.1rem; font-size: 0.9rem; font-weight: 500;
    opacity: 0; transform: translateY(12px); transition: opacity 0.25s ease, transform 0.25s ease;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast-icon {
    width: 1.4rem; height: 1.4rem; border-radius: 50%; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.8rem; font-weight: 700; color: #fff;
}
.toast--success .toast-icon { background: #10b981; }
.toast--error .toast-icon { background: #ef4444; }
.toast--warn .toast-icon { background: #f59e0b; }
.toast--info .toast-icon { background: var(--t-accent); color: var(--t-accent-text); }

/* ---------- Modal ---------- */
html.is-scroll-locked,
body.is-scroll-locked {
    overflow: hidden !important;
}

body.is-scroll-locked {
    position: fixed;
    width: 100%;
    left: 0;
    right: 0;
}

.site-modal-overlay {
    position: fixed; inset: 0; z-index: 9998;
    background: rgba(0,0,0,0.45);
    display: flex; align-items: center; justify-content: center;
    padding: 1.5rem; opacity: 0; transition: opacity 0.2s ease;
    overflow-y: auto;
    overscroll-behavior: contain;
}
.site-modal-overlay.show { opacity: 1; }
.site-modal {
    width: 100%; max-width: 26rem; border-radius: 1.5rem; padding: 1.75rem;
    transform: scale(0.95); transition: transform 0.2s ease;
}
.site-modal-overlay.show .site-modal { transform: scale(1); }
.site-modal-title { font-size: 1.2rem; font-weight: 700; }
.site-modal-body { color: var(--t-text-muted); line-height: 1.6; margin-top: 0.6rem; }
.site-modal-actions { display: flex; justify-content: flex-end; gap: 0.6rem; margin-top: 1.5rem; }
.site-modal-btn {
    padding: 0.6rem 1.2rem; border-radius: 0.85rem; font-weight: 600; font-size: 0.9rem;
    border: 1px solid var(--t-border); background: var(--t-surface); color: var(--t-text); cursor: pointer;
}
.site-modal-btn.is-primary { border-color: transparent; }
.site-modal-btn.is-danger { background: #ef4444; color: #fff; border-color: transparent; }

/* ---------- Cookie consent ---------- */
.cookie-bar {
    position: fixed;
    left: 1rem;
    bottom: 1rem;
    z-index: 9990;
    width: min(21rem, calc(100% - 2rem));
    margin: 0;
    transform: translateY(1rem);
    padding: 1rem 1.1rem;
    display: block;
    border-radius: 1.25rem;
    border: 1px solid color-mix(in srgb, var(--t-border) 80%, transparent);
    background: color-mix(in srgb, var(--t-surface) 96%, transparent);
    backdrop-filter: saturate(150%) blur(16px);
    box-shadow: var(--t-shadow);
    opacity: 0;
    transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.33, 0.86, 0.45, 1);
}

.cookie-bar.show {
    opacity: 1;
    transform: translateY(0);
}

.cookie-bar-inner {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.cookie-title {
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.3;
}

.cookie-desc {
    font-size: 0.78rem;
    line-height: 1.45;
    color: var(--t-text-muted);
    margin: 0.35rem 0 0;
}

.cookie-desc a {
    color: var(--t-text);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid color-mix(in srgb, var(--t-text) 35%, transparent);
}

.cookie-desc a:hover { opacity: 0.75; }

.cookie-actions {
    display: flex;
    gap: 0.45rem;
}

.cookie-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    padding: 0.55rem 0.75rem;
    border-radius: 0.8rem;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    border: none;
    font-family: inherit;
    transition: background 0.15s ease, transform 0.12s ease;
}

.cookie-btn:active { transform: scale(0.97); }

.cookie-btn--ghost {
    background: var(--t-surface-2);
    color: var(--t-text);
    border: 1px solid var(--t-border);
}

.cookie-btn--ghost:hover { background: var(--t-dropdown-hover); }

.cookie-btn--primary {
    background: var(--t-accent);
    color: var(--t-accent-text);
}

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

/* Cookie settings modal */
.cookie-settings-overlay {
    position: fixed;
    inset: 0;
    z-index: 9995;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 1.25rem;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: color-mix(in srgb, var(--t-bg) 55%, transparent);
    backdrop-filter: blur(6px);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.cookie-settings-overlay.show { opacity: 1; }

.cookie-settings {
    width: min(28rem, 100%);
    max-height: none;
    margin: auto;
    flex-shrink: 0;
    overflow: visible;
    overscroll-behavior: contain;
    border-radius: 1.35rem;
    border: 1px solid var(--t-border);
    background: var(--t-surface);
    box-shadow: var(--t-shadow);
    padding: 1.35rem 1.35rem 1.15rem;
    transform: scale(0.96) translateY(8px);
    transition: transform 0.25s cubic-bezier(0.33, 0.86, 0.45, 1);
}

.cookie-settings-overlay.show .cookie-settings {
    transform: scale(1) translateY(0);
}

.cookie-settings-title {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.cookie-settings-desc {
    margin-top: 0.45rem;
    font-size: 0.82rem;
    line-height: 1.5;
    color: var(--t-text-muted);
}

.cookie-settings-list {
    margin: 1.1rem 0 0;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.cookie-settings-item {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
    padding: 0.85rem 0.9rem;
    border-radius: 1rem;
    border: 1px solid var(--t-border);
    background: var(--t-surface-2);
}

.cookie-settings-item-text { flex: 1; min-width: 0; }

.cookie-settings-item-text h4 {
    font-size: 0.88rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.cookie-settings-item-text p {
    font-size: 0.76rem;
    line-height: 1.45;
    color: var(--t-text-muted);
    margin: 0;
}

.cookie-settings-badge {
    flex-shrink: 0;
    font-size: 0.68rem;
    font-weight: 600;
    padding: 0.28rem 0.55rem;
    border-radius: 999px;
    background: var(--t-surface-3);
    color: var(--t-text-muted);
    white-space: nowrap;
}

.cookie-toggle {
    position: relative;
    flex-shrink: 0;
    width: 2.5rem;
    height: 1.45rem;
    margin-top: 0.1rem;
}

.cookie-toggle input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-toggle-track {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 999px;
    background: var(--t-border);
    cursor: pointer;
    transition: background 0.2s ease;
}

.cookie-toggle-track::after {
    content: '';
    position: absolute;
    top: 0.15rem;
    left: 0.15rem;
    width: 1.15rem;
    height: 1.15rem;
    border-radius: 50%;
    background: var(--t-surface);
    box-shadow: 0 1px 3px rgb(0 0 0 / 0.2);
    transition: transform 0.2s ease;
}

.cookie-toggle input:checked + .cookie-toggle-track {
    background: var(--t-accent);
}

.cookie-toggle input:checked + .cookie-toggle-track::after {
    transform: translateX(1.05rem);
    background: var(--t-accent-text);
}

.cookie-toggle input:disabled + .cookie-toggle-track {
    opacity: 0.55;
    cursor: not-allowed;
}

.cookie-settings-policy {
    display: inline-block;
    margin-top: 0.85rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--t-text);
    text-decoration: none;
    border-bottom: 1px solid color-mix(in srgb, var(--t-text) 30%, transparent);
}

.cookie-settings-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 1.1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--t-border);
}

.cookie-settings-actions .cookie-btn { flex: 1 1 auto; min-width: 7rem; }

@media (max-width: 540px) {
    .cookie-bar {
        left: 0.75rem;
        bottom: 0.75rem;
        width: calc(100% - 1.5rem);
    }

    .cookie-settings-actions { flex-direction: column; }
    .cookie-settings-actions .cookie-btn { width: 100%; }
}

/* ---------- Misc helpers ---------- */
.themed-accent { background: var(--t-accent); color: var(--t-accent-text); }
.muted { color: var(--t-text-muted); }
.center { text-align: center; }
.mt-1 { margin-top: 0.5rem; } .mt-2 { margin-top: 1rem; } .mt-4 { margin-top: 2rem; }
.stack-lg > * + * { margin-top: 1.25rem; }
