:root {
    --page-max-width: 860px;
    --ius-navy: #10183a;
    --ius-primary: #283593;
    --ius-secondary: #3d4f7a;
    --ius-cream: #f8f4ee;
    --ius-bg: #f5f5f5;
    --ius-text: #263238;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100svh;
    font-family: "Inter", sans-serif;
    background: var(--ius-bg);
    color: var(--ius-text);
}

[x-cloak] {
    display: none !important;
}

/* ── Top navigation ─────────────────────────────────── */

.topnav {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--ius-navy);
    border-bottom: 1px solid rgb(255 255 255 / 8%);
    padding: 0.75rem 1.25rem;
}

.topnav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: var(--page-max-width);
    margin: 0 auto;
}

.topnav-brand {
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #fff;
}

.topnav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.topnav-auth {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Language switcher */

.lang-switcher {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.lang-btn {
    background: transparent;
    border: none;
    color: rgb(255 255 255 / 55%);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    padding: 0.25rem 0.4rem;
    cursor: pointer;
    border-radius: 0.25rem;
    transition: color 0.15s, background 0.15s;
    font-family: inherit;
}

.lang-btn:hover {
    color: rgb(255 255 255 / 85%);
    background: rgb(255 255 255 / 8%);
}

.lang-btn--active {
    color: #fff;
    background: rgb(255 255 255 / 15%);
}

.lang-sep {
    color: rgb(255 255 255 / 25%);
    font-size: 0.75rem;
}

.nav-btn {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
}

/* User dropdown */

.nav-user {
    position: relative;
}

.avatar-btn {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--ius-primary), #5c6bc0);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 600;
    border: 2px solid rgb(255 255 255 / 20%);
    transition: border-color 0.15s;
}

.avatar-btn:hover .avatar {
    border-color: rgb(255 255 255 / 40%);
}

.avatar-img {
    object-fit: cover;
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: #fff;
    border-radius: 0.75rem;
    box-shadow: 0 10px 40px rgb(0 0 0 / 15%);
    padding: 0.75rem;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.user-dropdown .ghost-button {
    width: 100%;
    background: rgb(0 0 0 / 4%);
    color: var(--ius-text);
    border: 1px solid rgb(0 0 0 / 10%);
}

.user-dropdown .ghost-button:hover:enabled {
    background: rgb(0 0 0 / 8%);
}

.account-section .ghost-button,
.account-profile .ghost-button,
.account-row .ghost-button,
.mcp-url-row .ghost-button {
    background: rgb(0 0 0 / 4%);
    color: var(--ius-text);
    border: 1px solid rgb(0 0 0 / 10%);
}

.account-section .ghost-button:hover:enabled,
.account-profile .ghost-button:hover:enabled,
.account-row .ghost-button:hover:enabled,
.mcp-url-row .ghost-button:hover:enabled {
    background: rgb(0 0 0 / 8%);
}

.user-info {
    padding: 0.5rem;
    border-bottom: 1px solid rgb(0 0 0 / 8%);
    margin-bottom: 0.25rem;
}

.user-name {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--ius-text);
}

.user-email {
    display: block;
    font-size: 0.8rem;
    color: rgb(38 50 56 / 60%);
    margin-top: 0.15rem;
}

/* ── Layout utilities ───────────────────────────────── */

.container {
    max-width: var(--page-max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.surface {
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 4px 20px rgb(0 0 0 / 6%);
    padding: 2rem;
}

.section-heading {
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 700;
    color: var(--ius-navy);
    margin: 0 0 3rem;
    text-align: center;
    letter-spacing: -0.02em;
}

.section-heading--light {
    color: #fff;
}

/* ── Hero ───────────────────────────────────────────── */

.hero {
    background: var(--ius-navy);
    padding: 5rem 1.5rem 5.5rem;
    text-align: center;
}

.hero-inner {
    max-width: var(--page-max-width);
    margin: 0 auto;
}

.hero-brand {
    margin: 0 0 0.75rem;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgb(255 255 255 / 60%);
}

.hero h1 {
    margin: 0 0 0.5rem;
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.03em;
    color: #fff;
}

.hero-subhead {
    margin: 0 0 1.5rem;
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    font-weight: 600;
    color: rgb(255 255 255 / 70%);
    letter-spacing: -0.01em;
}

.hero-body {
    margin: 0 auto 2.75rem;
    max-width: 620px;
    font-size: 1.05rem;
    line-height: 1.65;
    color: rgb(255 255 255 / 72%);
}

.hero-cta {
    display: flex;
    justify-content: center;
}

.hero-cta-row {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    flex-wrap: wrap;
    justify-content: center;
}

/* ── Hero USP Grid ─────────────────────────────────── */

.hero-usp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 4rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.usp-item {
    text-align: center;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.usp-icon {
    width: 48px;
    height: 48px;
    background: rgb(255 255 255 / 8%);
    border: 1px solid rgb(255 255 255 / 15%);
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    margin-bottom: 1.25rem;
}

.usp-item h3 {
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
}

.usp-item p {
    color: rgb(255 255 255 / 70%);
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
}

/* ── Stats strip ────────────────────────────────────── */

.stats-strip {
    background: var(--ius-secondary);
    padding: 2.5rem 1.5rem;
}

.stats-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 3rem;
    text-align: center;
}

.stat-number {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.02em;
    line-height: 1;
}

.stat-label {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgb(255 255 255 / 72%);
}

.stat-divider {
    width: 1px;
    height: 2.5rem;
    background: rgb(255 255 255 / 28%);
    flex-shrink: 0;
}

/* ── How it works ───────────────────────────────────── */

.how-it-works {
    background: var(--ius-cream);
    padding: 5rem 1.5rem;
}

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

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.step-number {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: var(--ius-primary);
    color: #fff;
    font-size: 1.25rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    box-shadow: 0 4px 12px rgb(40 53 147 / 25%);
}

.step-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--ius-navy);
    margin: 0 0 0.5rem;
}

.step-body {
    font-size: 0.95rem;
    line-height: 1.6;
    color: rgb(38 50 56 / 75%);
    margin: 0;
}

/* ── Data sources ───────────────────────────────────── */

.sources-section {
    background: #fff;
    padding: 5rem 1.5rem;
}

.sources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.source-card {
    background: #fff;
    border: 1px solid rgb(0 0 0 / 8%);
    border-radius: 1rem;
    padding: 1.5rem;
    transition: transform 0.15s, box-shadow 0.15s;
}

.source-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--ius-navy);
    margin: 0 0 0.5rem;
}

.source-card-body {
    font-size: 0.9rem;
    line-height: 1.55;
    color: rgb(38 50 56 / 70%);
    margin: 0;
}

.source-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.source-icon {
    width: 44px;
    height: 44px;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.source-icon--fedlex {
    background: #fee2e2;
    color: #991b1b;
}

.source-icon--court {
    background: #f3e8ff;
    color: #6b21a8;
}

.source-icon--cantonal {
    background: #ccfbf1;
    color: #115e59;
}

.source-icon--citation {
    background: #ffedd5;
    color: #9a3412;
}

.source-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    text-transform: uppercase;
}

.source-badge--official {
    background: #e8f5e9;
    color: #2e7d32;
}

.source-badge--fedlex {
    background: #e8eaf6;
    color: var(--ius-primary);
}

/* ── Pricing ────────────────────────────────────────── */

.pricing-section {
    background: var(--ius-cream);
    padding: 5rem 1.5rem;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    max-width: 720px;
    margin: 0 auto;
}

.pricing-card {
    background: #fff;
    border-radius: 1rem;
    padding: 1.75rem;
    border: 1px solid rgb(0 0 0 / 8%);
    display: flex;
    flex-direction: column;
}

.pricing-card--featured {
    border-color: var(--ius-primary);
    box-shadow: 0 8px 32px rgb(40 53 147 / 12%);
}

.pricing-card-name {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgb(38 50 56 / 55%);
    margin: 0 0 0.35rem;
}

.pricing-card-tagline {
    font-size: 0.95rem;
    font-weight: 500;
    color: rgb(38 50 56 / 75%);
    margin: 0 0 1.25rem;
}

.pricing-card-price {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--ius-navy);
    letter-spacing: -0.02em;
    margin: 0 0 0.15rem;
}

.pricing-card-period {
    font-size: 0.85rem;
    color: rgb(38 50 56 / 55%);
    margin: 0 0 1.5rem;
}

.check-list {
    list-style: none;
    margin: 0 0 1.75rem;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.check-list li {
    position: relative;
    padding-left: 1.5rem;
    font-size: 0.95rem;
    color: rgb(38 50 56 / 80%);
}

.check-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.35rem;
    width: 0.9rem;
    height: 0.9rem;
    background: currentColor;
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='currentColor' stroke-width='3' d='M5 12l5 5L20 7'/%3E%3C/svg%3E");
    mask-size: contain;
    mask-repeat: no-repeat;
    color: var(--ius-primary);
}

.pricing-card-cta {
    margin-top: auto;
}

/* ── FAQ ────────────────────────────────────────────── */

.faq-section {
    background: #fff;
    padding: 5rem 1.5rem;
}

.faq-list {
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
}

.faq-item {
    border-bottom: 1px solid rgb(0 0 0 / 8%);
    transition: background-color 0.2s, box-shadow 0.2s;
}

.faq-item:has([aria-expanded="true"]) {
    background-color: rgb(40 53 147 / 2%);
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-trigger {
    width: 100%;
    background: none;
    border: none;
    padding: 1.5rem 0.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--ius-navy);
}

.faq-trigger:hover {
    color: var(--ius-primary);
}

.faq-content {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.25s ease;
}

.faq-content.open {
    grid-template-rows: 1fr;
}

.faq-panel {
    overflow: hidden;
}

.faq-panel p, .faq-content {
    padding: 0 0.5rem 1.5rem;
    margin: 0;
    color: rgb(38 50 56 / 75%);
    line-height: 1.7;
    font-size: 1rem;
}

.faq-icon {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
    color: rgb(38 50 56 / 25%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), color 0.2s;
}

.faq-item:hover .faq-icon {
    color: var(--ius-primary);
}

.faq-trigger[aria-expanded="true"] .faq-icon {
    color: var(--ius-primary);
}

.faq-icon.rotate {
    transform: rotate(180deg);
}

.flex-1 {
    flex: 1;
}

/* ── Setup CTA pulse animation ──────────────────────── */

@keyframes setup-pulse {
    0%, 100% { box-shadow: 0 4px 16px rgb(40 53 147 / 30%), 0 0 0 0 rgb(40 53 147 / 0%); }
    50%       { box-shadow: 0 4px 16px rgb(40 53 147 / 50%), 0 0 0 10px rgb(40 53 147 / 0%); }
}

.cta-button--pulse {
    animation: setup-pulse 2.4s ease-in-out infinite;
}

.cta-button--pulse:hover {
    animation: none;
}

/* ── Footer ─────────────────────────────────────────── */

.site-footer {
    background: var(--ius-navy);
    color: rgb(255 255 255 / 55%);
    font-size: 0.85rem;
    text-align: center;
    padding: 2rem 1.5rem;
}

/* ── Buttons ────────────────────────────────────────── */

.cta-button,
.ghost-button {
    font-family: inherit;
    font-weight: 600;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s, opacity 0.15s, background 0.2s;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.cta-button {
    background: linear-gradient(135deg, var(--ius-primary) 0%, #1a237e 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgb(40 53 147 / 30%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.75rem 1.5rem;
}

.cta-button:hover:enabled {
    transform: scale(1.02);
    box-shadow: 0 8px 24px rgb(40 53 147 / 40%);
    background: linear-gradient(135deg, #303f9f 0%, var(--ius-primary) 100%);
}

.cta-button--lg {
    font-size: 1.1rem;
    padding: 1rem 2.5rem;
}

.pricing-card-cta .cta-button {
    padding: 1rem;
    font-size: 1.05rem;
}

.cta-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.cta-button--lg {
    font-size: 1rem;
    padding: 0.875rem 2rem;
}

.cta-button--full {
    width: 100%;
}

.ghost-button {
    background: rgb(255 255 255 / 10%);
    color: #fff;
    border: 1px solid rgb(255 255 255 / 20%);
}

.ghost-button:hover:enabled {
    background: rgb(255 255 255 / 18%);
}

.ghost-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.ghost-button--light {
    background: rgb(0 0 0 / 4%);
    color: var(--ius-text);
    border-color: rgb(0 0 0 / 10%);
}

.ghost-button--light:hover:enabled {
    background: rgb(0 0 0 / 8%);
}

.ghost-button--lg {
    font-size: 1rem;
    padding: 0.875rem 1.75rem;
}

.ghost-button--full {
    width: 100%;
}

/* ── Account page ───────────────────────────────────── */

.account-main {
    padding: 2rem 1.5rem 4rem;
}

.account-container {
    max-width: 680px;
    margin: 0 auto;
}

.account-profile {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.account-profile-header {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.account-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--ius-primary), #5c6bc0);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    flex-shrink: 0;
}

.avatar-lg {
    width: 64px;
    height: 64px;
    font-size: 1.5rem;
}

.account-identity {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.account-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--ius-navy);
}

.account-email {
    font-size: 0.9rem;
    color: rgb(38 50 56 / 60%);
}

.account-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.account-field {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.account-field-label {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgb(38 50 56 / 55%);
}

.account-input {
    width: 100%;
    border: 1px solid rgb(0 0 0 / 10%);
    border-radius: 0.8rem;
    padding: 0.9rem 1rem;
    font: inherit;
    color: var(--ius-text);
    background: rgb(248 249 251);
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.account-input:focus {
    outline: none;
    border-color: rgb(40 53 147 / 35%);
    box-shadow: 0 0 0 4px rgb(40 53 147 / 10%);
    background: #fff;
}

.account-form-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.account-form-note {
    font-size: 0.9rem;
    color: #2e7d32;
    margin: 0;
}

.account-section {
    background: #fff;
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 12px rgb(0 0 0 / 6%);
}

.account-section-title {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgb(38 50 56 / 55%);
    margin: 0 0 1.25rem;
}

.account-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid rgb(0 0 0 / 6%);
}

.account-row:first-of-type {
    padding-top: 0;
}

.account-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.account-row--stacked {
    flex-direction: column;
    align-items: stretch;
}

.account-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--ius-navy);
}

.account-value {
    font-size: 0.9rem;
    color: rgb(38 50 56 / 70%);
}

.account-mcp-url {
    display: block;
    background: rgb(40 53 147 / 5%);
    border: 1px solid rgb(40 53 147 / 15%);
    border-radius: 0.9rem;
    padding: 0.95rem 1rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    overflow-x: auto;
    white-space: nowrap;
}

.mcp-url-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: stretch;
    gap: 0.75rem;
    flex: 1;
    min-width: 0;
}

.account-action-btn {
    min-width: 9.5rem;
    padding: 0.8rem 1rem;
    border-radius: 0.9rem;
    font-size: 0.92rem;
    font-weight: 600;
}

.account-action-btn--compact {
    min-width: auto;
    padding-inline: 1rem;
    white-space: nowrap;
}

.account-action-btn--subtle {
    background: transparent;
    border-color: rgb(0 0 0 / 8%);
}

.passkey-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.passkey-help {
    font-size: 0.85rem;
    color: rgb(38 50 56 / 65%);
    margin: 0.5rem 0 0;
    line-height: 1.5;
}

.passkey-note {
    font-size: 0.8rem;
    color: rgb(38 50 56 / 55%);
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgb(0 0 0 / 6%);
}

.passkey-dialog {
    max-width: 400px;
}

.badge {
    display: inline-flex;
    align-items: center;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    text-transform: uppercase;
}

.badge--active {
    background: #e8f5e9;
    color: #2e7d32;
}

.badge--trial {
    background: #fff3e0;
    color: #e65100;
}

.badge--none {
    background: #eceff1;
    color: #546e7a;
}

/* ── Plan card ──────────────────────────────────────── */

.plan-card {
    border-radius: 0.75rem;
    padding: 1.35rem;
    margin-bottom: 1.25rem;
}

.plan-card--trial {
    background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
    border: 1px solid #ffe082;
}

.plan-card--pro {
    background: linear-gradient(135deg, #e8eaf6 0%, #c5cae9 100%);
    border: 1px solid #9fa8da;
}

.plan-card--expired {
    background: #eceff1;
    border: 1px solid #cfd8dc;
}

.plan-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.plan-card-name-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.plan-card-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--ius-navy);
}

.plan-card-until {
    font-size: 0.85rem;
    color: rgb(38 50 56 / 65%);
}

.plan-progress-labels {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.6rem;
}

.plan-progress-value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--ius-navy);
}

.plan-progress-caption {
    font-size: 0.8rem;
    color: rgb(38 50 56 / 55%);
}

.plan-progress-wrap {
    background: rgb(255 255 255 / 55%);
    border-radius: 999px;
    height: 10px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.plan-progress-bar {
    height: 100%;
    border-radius: 999px;
}

.plan-progress-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 0.3s ease;
}

.plan-card--trial .plan-progress-fill {
    background: #ffa000;
}

.plan-card--pro .plan-progress-fill {
    background: var(--ius-primary);
}

.plan-upgrade {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.plan-upgrade-note {
    font-size: 0.8rem;
    color: rgb(38 50 56 / 60%);
    text-align: center;
}

.upgrade-main {
    background:
        radial-gradient(circle at top right, rgb(230 81 0 / 10%), transparent 32%),
        linear-gradient(180deg, #fffdf8 0%, #f8fafc 100%);
    min-height: calc(100vh - 72px);
    padding: 2.5rem 1.5rem 4rem;
}

.upgrade-container {
    display: grid;
    gap: 1.5rem;
}

.upgrade-hero {
    display: block;
    padding: 1.6rem;
    border: 1px solid rgb(40 53 147 / 12%);
    box-shadow: 0 18px 40px rgb(15 23 42 / 8%);
}

.upgrade-hero-copy {
    display: grid;
    gap: 0.9rem;
    align-content: start;
}

.upgrade-eyebrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    padding: 0.3rem 0.6rem;
    border-radius: 999px;
    background: #e8eaf6;
    color: var(--ius-primary);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.upgrade-title {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.05;
    letter-spacing: -0.03em;
    color: var(--ius-navy);
}

.upgrade-intro {
    margin: 0;
    max-width: 62ch;
    font-size: 1rem;
    line-height: 1.7;
    color: rgb(38 50 56 / 78%);
}

.upgrade-status {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--ius-primary);
}

.upgrade-action-note {
    font-size: 0.85rem;
    line-height: 1.6;
    color: rgb(38 50 56 / 68%);
}

.upgrade-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.85fr);
    gap: 1.5rem;
    align-items: start;
}

.upgrade-story,
.upgrade-pricing {
    height: 100%;
}

.upgrade-story {
    padding: 1.5rem;
    border: 1px solid rgb(0 0 0 / 6%);
}

.upgrade-pricing {
    justify-content: space-between;
}

.upgrade-billing-toggle {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
    padding: 0.35rem;
    margin-bottom: 1.25rem;
    border-radius: 1rem;
    background: rgb(15 23 42 / 4%);
    border: 1px solid rgb(15 23 42 / 8%);
}

.upgrade-billing-option {
    display: grid;
    gap: 0.2rem;
    padding: 0.9rem 1rem;
    border: 0;
    border-radius: 0.8rem;
    background: transparent;
    color: rgb(38 50 56 / 72%);
    text-align: left;
    cursor: pointer;
    transition:
        background-color 160ms ease,
        color 160ms ease,
        box-shadow 160ms ease,
        transform 160ms ease;
}

.upgrade-billing-option:hover {
    color: var(--ius-navy);
    transform: translateY(-1px);
}

.upgrade-billing-option--active {
    background: #fff;
    color: var(--ius-navy);
    box-shadow: 0 12px 24px rgb(15 23 42 / 10%);
}

.upgrade-billing-option-label {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.upgrade-billing-option-price {
    font-size: 1rem;
    font-weight: 700;
}

.upgrade-pricing-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.upgrade-savings-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    background: rgb(230 81 0 / 12%);
    color: #d9480f;
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
}

.upgrade-price-detail {
    margin: -0.5rem 0 0.9rem;
    color: rgb(38 50 56 / 68%);
    font-size: 0.88rem;
}

.upgrade-check-list {
    margin-bottom: 1.5rem;
}

.upgrade-story-block + .upgrade-story-block {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgb(38 50 56 / 10%);
}

.upgrade-block-title {
    margin: 0 0 0.5rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--ius-navy);
}

.upgrade-block-copy {
    margin: 0;
    line-height: 1.7;
    color: rgb(38 50 56 / 76%);
}

.upgrade-story-cta {
    margin-top: 1.5rem;
    padding: 1rem;
    display: grid;
    gap: 0.85rem;
    border-radius: 0.9rem;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid rgb(38 50 56 / 8%);
}

.upgrade-back-link {
    justify-self: start;
}

.upgrade-disabled-note {
    margin: 0.75rem 0 0;
    font-size: 0.85rem;
    line-height: 1.5;
    color: rgb(38 50 56 / 68%);
    text-align: center;
}

.cta-button--disabled,
.cta-button:disabled {
    cursor: not-allowed;
    opacity: 0.72;
    filter: saturate(0.75);
}

.upgrade-dialog {
    text-align: left;
}

.upgrade-dialog .dialog-actions {
    justify-content: flex-start;
}

/* ── Trial offer (no plan state) ────────────────────── */

.plan-trial-offer {
    background: linear-gradient(
        135deg,
        rgb(40 53 147 / 8%) 0%,
        rgb(230 81 0 / 8%) 100%
    );
    border: 1px solid rgb(40 53 147 / 14%);
    border-radius: 1rem;
    padding: 1.4rem;
    text-align: left;
}

.plan-trial-offer-text {
    margin-bottom: 1rem;
}

.plan-trial-headline {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--ius-navy);
    display: block;
    margin: 0 0 0.35rem;
}

.plan-trial-sub {
    display: block;
    font-size: 0.85rem;
    color: rgb(38 50 56 / 60%);
    margin: 0 0 1rem;
}

.plan-trial-list {
    margin: 0;
    padding-left: 1.1rem;
    display: grid;
    gap: 0.35rem;
    color: rgb(38 50 56 / 75%);
    font-size: 0.9rem;
}

.plan-error {
    background: #ffebee;
    border: 1px solid #ffcdd2;
    border-radius: 0.5rem;
    padding: 1rem;
    color: #c62828;
    font-size: 0.9rem;
}

.cta-button--full {
    width: 100%;
}

/* ── Dialog ─────────────────────────────────────────── */

.dialog-root {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.dialog-overlay {
    position: absolute;
    inset: 0;
    background: rgb(0 0 0 / 45%);
    backdrop-filter: blur(2px);
}

.dialog-wrap {
    position: relative;
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 20px 60px rgb(0 0 0 / 2%);
    max-width: 480px;
    width: 100%;
    padding: 1.5rem;
}

.dialog-panel {
    text-align: center;
}

.dialog-panel h3 {
    margin: 0 0 0.5rem;
    font-size: 1.25rem;
    color: var(--ius-navy);
}

.dialog-panel p {
    margin: 0 0 1.25rem;
    color: rgb(38 50 56 / 75%);
    font-size: 0.95rem;
}

.dialog-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

/* ── Legal pages ────────────────────────────────────── */

.legal {
    max-width: 680px;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
    line-height: 1.7;
}

/* ── Responsive ─────────────────────────────────────── */

@media (max-width: 680px) {
    .steps {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .sources-grid {
        grid-template-columns: 1fr;
    }

    .pricing-grid {
        grid-template-columns: 1fr;
    }

    .stat-item {
        padding: 0.5rem 1.5rem;
    }

    .stat-divider {
        display: none;
    }

    .stats-row {
        gap: 1rem;
    }

    .account-main {
        padding: 1.5rem 1rem 3rem;
    }

    .account-profile,
    .account-section {
        padding: 1.25rem;
    }

    .account-profile-header,
    .account-row {
        flex-direction: column;
        gap: 0.5rem;
    }

    .account-form-grid {
        grid-template-columns: 1fr;
    }

    .account-form-actions,
    .plan-card-header,
    .plan-progress-labels {
        flex-direction: column;
        align-items: flex-start;
    }

    .upgrade-main {
        padding: 1.5rem 1rem 3rem;
    }

    .upgrade-grid {
        grid-template-columns: 1fr;
    }

    .upgrade-pricing-head {
        align-items: flex-start;
        flex-direction: column;
    }

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

@media (max-width: 480px) {
    .hero {
        padding: 3rem 1.25rem 4rem;
    }

    .hero-cta-row {
        flex-direction: column;
        width: 100%;
    }

    .hero-cta-row .cta-button--lg,
    .hero-cta-row .ghost-button--lg {
        width: 100%;
    }

    .how-it-works,
    .sources-section,
    .pricing-section,
    .faq-section {
        padding: 3rem 1.25rem;
    }

    .upgrade-billing-toggle {
        grid-template-columns: 1fr;
    }
}

/* ── Setup page ────────────────────────────────────── */

.setup-main,
.prompts-main {
    padding: 1.5rem 0 3rem;
}

.setup-container,
.prompts-container {
    display: grid;
    gap: 1.5rem;
}

.setup-intro,
.prompts-intro {
    margin: 0;
    color: rgb(38 50 56 / 70%);
    font-size: 0.95rem;
    line-height: 1.6;
}

.setup-url-bar {
    background: var(--ius-navy);
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.setup-url-label {
    color: rgb(255 255 255 / 60%);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.setup-url-value {
    color: #fff;
    font-family: "Inter", monospace;
    font-size: 0.95rem;
    word-break: break-all;
    flex: 1;
}

.setup-tabs {
    display: flex;
    gap: 0.5rem;
    border-bottom: 2px solid rgb(0 0 0 / 8%);
    margin-bottom: 1.5rem;
}

.setup-tab {
    background: none;
    border: none;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    color: rgb(38 50 56 / 55%);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition:
        color 0.15s,
        border-color 0.15s;
    font-family: inherit;
}

.setup-tab:hover {
    color: var(--ius-primary);
}

.setup-tab--active {
    color: var(--ius-primary);
    border-bottom-color: var(--ius-primary);
}

.setup-steps {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.setup-step {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.setup-step-num {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: var(--ius-primary);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.setup-step-body {
    flex: 1;
}

.setup-step-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--ius-navy);
    margin: 0 0 0.35rem;
}

.setup-step-desc {
    font-size: 0.9rem;
    color: rgb(38 50 56 / 70%);
    margin: 0 0 0.75rem;
    line-height: 1.5;
}

.setup-code-wrap {
    position: relative;
}

.setup-code {
    background: #263238;
    color: #aed581;
    font-family: "Inter", monospace;
    font-size: 0.85rem;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    display: block;
    word-break: break-all;
    line-height: 1.5;
}

.setup-copy-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgb(255 255 255 / 10%);
    border: none;
    color: #fff;
    padding: 0.35rem 0.75rem;
    border-radius: 0.35rem;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 0.15s;
    font-family: inherit;
}

.setup-copy-btn:hover {
    background: rgb(255 255 255 / 20%);
}

.setup-login-hint {
    background: rgb(40 53 147 / 5%);
    border: 1px dashed rgb(40 53 147 / 20%);
    border-radius: 0.5rem;
    padding: 1rem;
    text-align: center;
    color: rgb(38 50 56 / 70%);
    font-size: 0.9rem;
}

.setup-video-wrap {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgb(40 53 147 / 12%);
}

.setup-video-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--ius-navy);
    margin-bottom: 0.75rem;
}

.setup-video {
    width: 100%;
    border-radius: 8px;
    display: block;
}

.comparison-card {
    border: 1px solid rgb(0 0 0 / 8%);
    border-radius: 0.75rem;
    overflow: hidden;
    margin-top: 1.5rem;
}

.comparison-side {
    padding: 1.25rem;
}

.comparison-side--bad {
    background: rgb(198 40 40 / 4%);
    border-bottom: 1px solid rgb(0 0 0 / 6%);
}

.comparison-side--good {
    background: rgb(27 94 32 / 4%);
}

.comparison-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.comparison-client {
    font-weight: 600;
    font-size: 0.85rem;
}

.comparison-side--bad .comparison-client {
    color: #c62828;
}
.comparison-side--good .comparison-client {
    color: #1b5e20;
}

.comparison-label {
    font-size: 0.72rem;
    color: rgb(38 50 56 / 55%);
    margin-bottom: 0.35rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.comparison-side--bad .comparison-label {
    color: #c62828;
}
.comparison-side--good .comparison-label {
    color: #1b5e20;
}

.comparison-prompt {
    background: #263238;
    color: #aed581;
    font-family: "Inter", monospace;
    font-size: 0.85rem;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.comparison-text {
    font-size: 0.9rem;
    line-height: 1.6;
    color: rgb(38 50 56 / 80%);
}

.comparison-side--bad .comparison-text {
    color: #c62828;
}

.prompt-categories {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.prompt-category-title {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgb(38 50 56 / 55%);
    margin: 0 0 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgb(0 0 0 / 8%);
}

.prompt-cards {
    display: grid;
    gap: 0.75rem;
}

.prompt-card {
    background: rgb(40 53 147 / 4%);
    border: 1px solid rgb(40 53 147 / 12%);
    border-radius: 0.5rem;
    padding: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.prompt-text {
    flex: 1;
    font-size: 0.9rem;
    line-height: 1.6;
    color: rgb(38 50 56 / 85%);
    font-family: "Inter", sans-serif;
}

.prompt-copy-btn {
    background: var(--ius-primary);
    color: #fff;
    border: none;
    padding: 0.5rem 0.75rem;
    border-radius: 0.4rem;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
    font-family: inherit;
    flex-shrink: 0;
}

.prompt-copy-btn:hover {
    background: #1a237e;
}

@media (max-width: 600px) {
    .comparison-card {
        margin-top: 1rem;
    }

    .comparison-side--bad {
        border-bottom: none;
        border-top: 2px solid rgb(0 0 0 / 6%);
    }

    .setup-tabs {
        gap: 0;
    }

    .setup-tab {
        padding: 0.75rem 0.5rem;
        font-size: 0.85rem;
    }
}

/* ── AI Logos ───────────────────────────────────────── */

.step-logos {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.ai-logo {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.ai-logo--chatgpt {
    background: #10a37f;
    color: #fff;
}

.ai-logo--claude {
    background: #cc785c;
    color: #fff;
}

.ai-logo--cursor {
    background: #1e1e1e;
    color: #fff;
}

/* ── Hero Description ───────────────────────────────── */

.hero-description {
    margin-top: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-description p {
    font-size: 1rem;
    line-height: 1.7;
    color: rgb(255 255 255 / 65%);
    margin: 0;
}

.hero-demo-action {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
}

.hero-demo-button {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding-inline: 1.35rem;
    border-color: rgb(255 255 255 / 22%);
    background: rgb(255 255 255 / 8%);
    box-shadow: 0 14px 34px rgb(0 0 0 / 18%);
}

.hero-demo-button:hover {
    background: rgb(255 255 255 / 12%);
    border-color: rgb(255 255 255 / 30%);
}

.hero-demo-button__icon {
    flex: 0 0 auto;
}

.video-modal {
    width: min(1000px, calc(100% - 2rem));
    max-width: 1000px;
    padding: 0;
    border: 0;
    background: transparent;
}

.video-modal::backdrop {
    background: rgb(8 12 34 / 72%);
    backdrop-filter: blur(10px);
}

.video-modal__dialog {
    width: 100%;
    max-height: calc(100vh - 3rem);
    overflow: auto;
    border: 1px solid rgb(255 255 255 / 12%);
    border-radius: 1rem;
    background: #11183b;
    box-shadow: 0 32px 80px rgb(0 0 0 / 38%);
}

.video-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1rem 0.75rem;
}

.video-modal__title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
}

.video-modal__close {
    border: 0;
    background: rgb(255 255 255 / 8%);
    color: #fff;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 999px;
    cursor: pointer;
    font-size: 1rem;
}

.video-modal__video {
    width: 100%;
    display: block;
    background: #000;
    border-radius: 0 0 1rem 1rem;
}
