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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #f5f5f5;
    color: #1a1a1a;
    font-size: 15px;
    line-height: 1.5;
}

a { color: #2563eb; text-decoration: none; }
a:hover { text-decoration: underline; }

/* --- Auth pages --- */

.auth-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.auth-logo {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #f97316;
    text-decoration: none;
    margin-bottom: 2rem;
}

.auth-card {
    background: #161b27;
    border: 1px solid #1e2d40;
    border-radius: 10px;
    padding: 2.25rem;
    width: 100%;
    max-width: 380px;
}

.auth-card h1 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #f1f5f9;
    margin-bottom: 1.5rem;
}

.auth-card label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #94a3b8;
    margin-bottom: 0.35rem;
    margin-top: 1rem;
}

.auth-card label:first-of-type { margin-top: 0; }

.auth-card input[type="email"],
.auth-card input[type="password"] {
    width: 100%;
    padding: 0.55rem 0.75rem;
    background: #0d1117;
    border: 1px solid #2d3748;
    border-radius: 6px;
    color: #e2e8f0;
    font-size: 0.9375rem;
    outline: none;
    transition: border-color 0.15s;
}

.auth-card input::placeholder { color: #4a5568; }
.auth-card input:focus { border-color: #f97316; }

.auth-card button[type="submit"] {
    margin-top: 1.5rem;
    width: 100%;
    padding: 0.625rem;
    background: #f97316;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.auth-card button[type="submit"]:hover { background: #ea6c0a; }
.auth-card button[type="submit"]:disabled { background: #7c3a0a; color: #9a6040; cursor: not-allowed; }

.auth-foot {
    margin-top: 1.25rem;
    font-size: 0.8125rem;
    color: #64748b;
    text-align: center;
}

.auth-foot a { color: #f97316; text-decoration: none; }
.auth-foot a:hover { color: #fb923c; }

.error {
    background: #2d1515;
    border: 1px solid #7f1d1d;
    color: #fca5a5;
    border-radius: 6px;
    padding: 0.6rem 0.75rem;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.hidden { display: none !important; }

/* --- Dashboard --- */

.dash-header {
    background: #fff;
    border-bottom: 1px solid #e5e5e5;
    padding: 0 2rem;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dash-logo {
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: -0.02em;
}

.dash-user {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.875rem;
    color: #555;
}

.dash-user button {
    padding: 0.35rem 0.85rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    font-size: 0.875rem;
    transition: background 0.15s;
}

.dash-user button:hover { background: #f5f5f5; }

.dash-main {
    max-width: 860px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

.card {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 1.75rem;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.card-header h2 {
    font-size: 1rem;
    font-weight: 600;
}

.card-header button {
    padding: 0.4rem 0.9rem;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s;
}

.card-header button:hover { background: #1d4ed8; }

/* New key form */

.new-key-form {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.new-key-form input {
    flex: 1;
    min-width: 160px;
    padding: 0.45rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.875rem;
    outline: none;
}

.new-key-form input:focus { border-color: #2563eb; }

.key-preview {
    font-size: 0.8125rem;
    color: #555;
    background: #f8f9fa;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    margin-bottom: 1rem;
}

.new-key-form button {
    padding: 0.45rem 0.9rem;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    background: #2563eb;
    color: #fff;
    transition: background 0.15s;
}

.new-key-form button:hover { background: #1d4ed8; }
.new-key-form button:disabled { background: #93b4f5; cursor: not-allowed; }
.new-key-form .btn-secondary { background: #f5f5f5; color: #333; border: 1px solid #d1d5db; }
.new-key-form .btn-secondary:hover { background: #ebebeb; }

/* Key created banner */

.key-created {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 1.25rem;
}

.key-created p {
    font-size: 0.875rem;
    color: #15803d;
    margin-bottom: 0.5rem;
}

.key-display {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.key-display code {
    font-family: "SFMono-Regular", Consolas, monospace;
    font-size: 0.8125rem;
    word-break: break-all;
    flex: 1;
}

/* Table */

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

thead th {
    text-align: left;
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid #e5e5e5;
    font-weight: 500;
    color: #555;
    font-size: 0.8125rem;
}

tbody td {
    padding: 0.65rem 0.75rem;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}

tbody tr:last-child td { border-bottom: none; }

.key-cell {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.key-cell code {
    font-family: "SFMono-Regular", Consolas, monospace;
    color: #555;
}

.copy-btn {
    padding: 0.25rem 0.6rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    background: #fff;
    font-size: 0.8125rem;
    cursor: pointer;
    transition: background 0.1s;
    white-space: nowrap;
}

.copy-btn:hover { background: #f5f5f5; }

.delete-btn {
    padding: 0.25rem 0.6rem;
    border: 1px solid #fecaca;
    border-radius: 4px;
    background: #fff;
    color: #b91c1c;
    font-size: 0.8125rem;
    cursor: pointer;
    transition: background 0.1s;
}

.delete-btn:hover { background: #fef2f2; }
.delete-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.empty-msg {
    color: #888;
    font-size: 0.875rem;
    padding: 0.5rem 0;
    margin-bottom: 1.5rem;
}

.key-onboarding {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    flex-wrap: wrap;
}

.onboarding-option {
    flex: 1;
    min-width: 220px;
}

.onboarding-option h3 {
    font-size: 0.9375rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.onboarding-option p {
    font-size: 0.875rem;
    color: #666;
    line-height: 1.5;
}

.onboarding-divider {
    font-size: 0.875rem;
    color: #aaa;
    padding-top: 2.5rem;
    flex-shrink: 0;
}

/* Subscribe form (first key + billing) */

.subscribe-form {
    max-width: 480px;
}

.subscribe-choice {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.25rem;
}

.choice-opt {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
    cursor: pointer;
}

.subscribe-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #555;
    margin-bottom: 0.35rem;
}

.subscribe-form input[type="text"] {
    width: 100%;
    padding: 0.55rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.9375rem;
    outline: none;
    transition: border-color 0.15s;
}

.subscribe-form input[type="text"]:focus { border-color: #2563eb; }

.subscribe-divider {
    border-top: 1px solid #f0f0f0;
    margin: 1.5rem 0;
}

.subscribe-price {
    font-size: 0.875rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1rem;
}

#subscribe-btn {
    margin-top: 1.25rem;
    padding: 0.6rem 1.5rem;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
    width: 100%;
}

#subscribe-btn:hover { background: #1d4ed8; }
#subscribe-btn:disabled { background: #93b4f5; cursor: not-allowed; }

/* --- Billing section --- */

.billing-info {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-bottom: 1.5rem;
}

.billing-row {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    font-size: 0.9rem;
}

.billing-label {
    width: 120px;
    flex-shrink: 0;
    color: #888;
    font-size: 0.8125rem;
}

.billing-breakdown {
    color: #aaa;
    font-size: 0.8125rem;
    margin-left: 0.35rem;
}

.billing-status {
    font-weight: 600;
    font-size: 0.8125rem;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
}

.billing-status--trialing  { background: #eff6ff; color: #1d4ed8; }
.billing-status--active    { background: #f0fdf4; color: #15803d; }
.billing-status--past_due  { background: #fef2f2; color: #b91c1c; }
.billing-status--canceled  { background: #f5f5f5; color: #888; }

.payment-form-wrap {
    border-top: 1px solid #f0f0f0;
    padding-top: 1.25rem;
}

.payment-form-hint {
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 1.25rem;
}

#save-card-btn {
    margin-top: 1rem;
    padding: 0.55rem 1.25rem;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s;
}

#save-card-btn:hover { background: #1d4ed8; }
#save-card-btn:disabled { background: #93b4f5; cursor: not-allowed; }

/* --- Landing page --- */

.lander-body {
    background: #0d1117;
    color: #e2e8f0;
}

/* Topbar */

.topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(13, 17, 23, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #1e2d40;
}

.topbar-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.topbar-logo {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #f97316;
    flex-shrink: 0;
}

.topbar-nav {
    display: flex;
    gap: 2rem;
}

.topbar-nav a {
    font-size: 0.875rem;
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.15s;
}

.topbar-nav a:hover { color: #e2e8f0; text-decoration: none; }

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.topbar-login {
    font-size: 0.875rem;
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.15s;
}

.topbar-login:hover { color: #e2e8f0; text-decoration: none; }

.topbar-signup {
    padding: 0.4rem 1rem;
    background: #f97316;
    color: #fff;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s;
}

.topbar-signup:hover { background: #ea6c0a; text-decoration: none; }

/* Hero */

.hero {
    text-align: center;
    padding: 7rem 2rem 5rem;
    max-width: 760px;
    margin: 0 auto;
}

.hero-eyebrow {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #f97316;
    margin-bottom: 1.25rem;
}

.hero-headline {
    font-size: clamp(2.6rem, 6vw, 4rem);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.03em;
    color: #f1f5f9;
    margin-bottom: 1.25rem;
}

.hero-sub {
    font-size: 1.0625rem;
    color: #94a3b8;
    line-height: 1.75;
    margin-bottom: 2.5rem;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}

.hero-sub em {
    color: #e2e8f0;
    font-style: italic;
}

.hero-try {
    font-size: 0.875rem;
    color: #64748b;
    margin-bottom: 0.75rem;
}

.hero-signup-nudge {
    margin-top: 1rem;
    font-size: 0.875rem;
    color: #64748b;
}

.hero-signup-nudge a { color: #f97316; text-decoration: none; }
.hero-signup-nudge a:hover { color: #fb923c; }

/* Install box */

.install-box {
    display: inline-flex;
    align-items: center;
    background: #161b27;
    border: 1px solid #2d3748;
    border-radius: 8px;
    overflow: hidden;
    max-width: 100%;
}

.install-box code {
    font-family: "SFMono-Regular", Consolas, monospace;
    font-size: 0.9rem;
    color: #94a3b8;
    padding: 0.75rem 1.25rem;
    white-space: nowrap;
    overflow-x: auto;
}

.install-copy {
    padding: 0.75rem 1.1rem;
    background: #1e2d40;
    border: none;
    border-left: 1px solid #2d3748;
    color: #94a3b8;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
    flex-shrink: 0;
}

.install-copy:hover { background: #2d3f57; color: #e2e8f0; }

/* Shared section styles */

.lander-section {
    border-top: 1px solid #1e2d40;
    padding: 5rem 2rem;
}

.lander-section-inner {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.section-eyebrow {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #f97316;
    margin-bottom: 0.75rem;
}

.section-headline {
    font-size: clamp(1.6rem, 3.5vw, 2.25rem);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.025em;
    color: #f1f5f9;
    margin-bottom: 3rem;
}

/* How it works */

.steps {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}

.step {
    flex: 1;
    min-width: 200px;
    max-width: 260px;
    text-align: center;
}

.step-num {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #1e2d40;
    border: 1px solid #2d3f57;
    color: #f97316;
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.step h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #f1f5f9;
    margin-bottom: 0.5rem;
}

.step p {
    font-size: 0.9rem;
    color: #64748b;
    line-height: 1.6;
}

/* Pricing */

.pricing-cards {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.pricing-card {
    flex: 1;
    min-width: 220px;
    max-width: 300px;
    background: #161b27;
    border: 1px solid #1e2d40;
    border-radius: 10px;
    padding: 2rem;
    text-align: left;
    position: relative;
}

.pricing-card-featured {
    border-color: #f97316;
}

.pricing-badge {
    position: absolute;
    top: -1px;
    right: 1.25rem;
    background: #f97316;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.2rem 0.6rem;
    border-radius: 0 0 6px 6px;
}

.pricing-card h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #94a3b8;
    margin-bottom: 0.75rem;
}

.pricing-price {
    font-size: 2.5rem;
    font-weight: 800;
    color: #f1f5f9;
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
}

.pricing-price span {
    font-size: 1rem;
    font-weight: 400;
    color: #64748b;
}

.pricing-card ul {
    list-style: none;
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.pricing-card ul li {
    font-size: 0.875rem;
    color: #94a3b8;
    padding-left: 1.1rem;
    position: relative;
}

.pricing-card ul li::before {
    content: "–";
    position: absolute;
    left: 0;
    color: #f97316;
}

.pricing-btn {
    display: block;
    text-align: center;
    padding: 0.6rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    background: #f97316;
    color: #fff;
    transition: background 0.15s;
}

.pricing-btn:hover { background: #ea6c0a; text-decoration: none; }

.pricing-btn-outline {
    background: transparent;
    border: 1px solid #2d3748;
    color: #94a3b8;
}

.pricing-btn-outline:hover { background: #1e2d40; color: #e2e8f0; }

/* Footer */

.lander-footer {
    border-top: 1px solid #1e2d40;
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1100px;
    margin: 0 auto;
    font-size: 0.8125rem;
    color: #4a5568;
}

@media (max-width: 700px) {
    .topbar-nav { display: none; }
    .hero { padding: 4rem 1.25rem 3rem; }
    .hero-headline { font-size: 2.4rem; }
    .install-box code { font-size: 0.75rem; }
}
