:root {
    --bg: #f4f7fb;
    --surface: #ffffff;
    --surface-strong: #d9e4f5;
    --text: #11203a;
    --muted: #5e708d;
    --border: rgba(17, 32, 58, 0.1);
    --primary: #163f77;
    --primary-strong: #0d2e5c;
    --secondary: #0f7b78;
    --accent: #f5b335;
    --danger: #b94a48;
    --radius-xl: 28px;
    --radius-lg: 20px;
    --shadow: 0 24px 60px rgba(17, 32, 58, 0.1);
}

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

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Manrope", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(15, 123, 120, 0.08), transparent 32%),
        radial-gradient(circle at top right, rgba(22, 63, 119, 0.12), transparent 28%),
        linear-gradient(180deg, #f8fbff 0%, var(--bg) 100%);
}

.page-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
}

.container {
    width: min(1180px, calc(100% - 48px));
    margin: 0 auto;
}

.page-content {
    flex: 1;
    padding-top: 28px;
    padding-bottom: 64px;
}

.site-footer {
    position: relative;
    overflow: hidden;
    color: #e8eef8;
    background:
        radial-gradient(circle at 12% 0%, rgba(15, 123, 120, 0.26), transparent 34%),
        linear-gradient(135deg, #0b1d36 0%, #102b50 100%);
}

.site-footer::before {
    position: absolute;
    inset: 0;
    border-top: 3px solid var(--secondary);
    content: "";
    pointer-events: none;
}

.site-footer__main {
    display: grid;
    grid-template-columns: minmax(260px, 1.35fr) minmax(420px, 1fr);
    gap: clamp(48px, 8vw, 110px);
    padding-top: 56px;
    padding-bottom: 48px;
}

.site-footer__intro {
    max-width: 430px;
}

.site-footer__brand {
    width: fit-content;
    color: #ffffff;
    font-size: 1.05rem;
}

.site-footer__brand .brand__mark {
    color: #ffffff;
    background: linear-gradient(135deg, #168f8b, #1d4ed8);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

.site-footer__intro > p {
    max-width: 390px;
    margin: 20px 0;
    color: #b7c6da;
    font-size: 0.95rem;
    line-height: 1.75;
}

.site-footer__status {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: #d9e7f7;
    font-size: 0.82rem;
    font-weight: 700;
}

.site-footer__status-dot {
    width: 9px;
    height: 9px;
    border: 2px solid rgba(78, 221, 155, 0.28);
    border-radius: 50%;
    background: #4edd9b;
    box-shadow: 0 0 0 4px rgba(78, 221, 155, 0.12);
}

.site-footer__nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(110px, 1fr));
    gap: 36px;
}

.site-footer__group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 13px;
}

.site-footer__group h2 {
    margin: 0 0 5px;
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.site-footer__group a {
    color: #b7c6da;
    font-size: 0.88rem;
    line-height: 1.45;
    transition: color 160ms ease, transform 160ms ease;
}

.site-footer__group a:hover,
.site-footer__group a:focus-visible,
.site-footer__status:hover,
.site-footer__status:focus-visible {
    color: #ffffff;
}

.site-footer__group a:hover,
.site-footer__group a:focus-visible {
    transform: translateX(3px);
}

.site-footer__bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.11);
    padding: 22px 0 28px;
    color: #8fa4bf;
    font-size: 0.78rem;
}

.site-footer__bottom p {
    margin: 0;
}

.legal-page {
    max-width: 880px;
    margin: 0 auto;
}

.legal-page h1 {
    margin: 8px 0;
    font-family: "Fraunces", serif;
    font-size: clamp(2.2rem, 5vw, 3.3rem);
}

.legal-page h2 {
    margin: 30px 0 8px;
    font-family: "Fraunces", serif;
}

.legal-page p,
.legal-page li {
    line-height: 1.75;
}

.site-header {
    backdrop-filter: blur(18px);
    background: rgba(248, 251, 255, 0.84);
    border-bottom: 1px solid rgba(17, 32, 58, 0.06);
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 12px 0;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.brand__mark {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    color: white;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    box-shadow: 0 12px 22px rgba(22, 63, 119, 0.26);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.button,
button,
input[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    border: 0;
    border-radius: 16px;
    padding: 0 18px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.button:hover,
button:hover,
input[type="submit"]:hover {
    transform: translateY(-1px);
}

.button:disabled,
button:disabled,
input[type="submit"]:disabled {
    cursor: not-allowed;
    opacity: 0.55;
    transform: none;
    box-shadow: none;
}

.button--primary,
button[type="submit"],
input[type="submit"] {
    color: white;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    box-shadow: 0 12px 26px rgba(22, 63, 119, 0.24);
}

.button--ghost {
    color: var(--text);
    background: rgba(17, 32, 58, 0.04);
}

.button--success {
    color: #146c45;
    background: rgba(27, 145, 90, 0.12);
    box-shadow: none;
}

.button--secondary {
    color: var(--primary-strong);
    background: rgba(15, 123, 120, 0.1);
}

.hero {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 28px;
    align-items: stretch;
    padding: 20px 0 32px;
}

.hero--landing {
    padding-top: 8px;
}

.card,
.panel,
.metric,
.hero-card,
.form-card,
.table-card {
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
}

.hero-copy {
    padding: 40px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 999px;
    padding: 8px 14px;
    background: rgba(15, 123, 120, 0.1);
    color: var(--secondary);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.hero h1,
.section-title {
    margin: 18px 0 16px;
    font-family: "Fraunces", serif;
    font-size: clamp(2.6rem, 5vw, 4.8rem);
    line-height: 0.96;
    letter-spacing: -0.04em;
}

.section-title {
    font-size: clamp(2rem, 3vw, 3rem);
}

.lede {
    max-width: 60ch;
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.7;
}

.hero-actions,
.stack-inline {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 26px;
}

.hero-proof {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 18px;
}

.hero-proof__item {
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(17, 32, 58, 0.05);
    border: 1px solid rgba(17, 32, 58, 0.08);
    color: var(--primary-strong);
    font-size: 0.86rem;
    font-weight: 700;
}

.hero-card {
    position: relative;
    overflow: hidden;
    padding: 32px;
    background:
        linear-gradient(155deg, rgba(22, 63, 119, 0.96), rgba(9, 36, 69, 0.96)),
        radial-gradient(circle at top right, rgba(245, 179, 53, 0.28), transparent 24%);
    color: white;
}

.hero-card__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 26px;
}

.metric {
    padding: 22px;
    min-width: 0;
}

.metric strong {
    display: block;
    font-size: clamp(1.45rem, 2.3vw, 2rem);
    font-weight: 800;
    line-height: 1.08;
    overflow-wrap: anywhere;
}

.metric span,
.muted {
    color: var(--muted);
}

.hero-card .metric {
    background: rgba(255, 255, 255, 0.08);
    color: white;
    border-color: rgba(255, 255, 255, 0.14);
    box-shadow: none;
}

.hero-card .metric span {
    color: rgba(255, 255, 255, 0.72);
}

.metric-value {
    display: block;
}

.metric strong small {
    display: block;
    margin-top: 6px;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.section-grid,
.dashboard-grid,
.two-column,
.three-column {
    display: grid;
    gap: 20px;
}

.section-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 26px 0 44px;
}

.dashboard-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 28px;
}

.two-column {
    grid-template-columns: 2fr 1fr;
}

.three-column {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.panel,
.form-card,
.table-card {
    padding: 28px;
}

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

.table-scroll {
    overflow-x: auto;
    padding-bottom: 4px;
}

.table-scroll table {
    min-width: 520px;
}

.table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.table-actions form {
    margin: 0;
}

.copy-feedback {
    margin-top: 8px;
    min-height: 1.2em;
}

.invite-history {
    border-top: 1px solid rgba(17, 32, 58, 0.08);
    padding-top: 18px;
}

.invite-history summary {
    cursor: pointer;
    color: var(--primary-strong);
    font-weight: 700;
}

.invite-history__panel {
    border: 1px solid rgba(17, 32, 58, 0.08);
    border-radius: 18px;
    overflow: hidden;
}

.table-card th,
.table-card td {
    padding: 14px 12px;
    border-bottom: 1px solid rgba(17, 32, 58, 0.08);
    text-align: left;
    vertical-align: top;
    font-size: 0.95rem;
}

.table-card th {
    color: var(--muted);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.grid-list {
    display: grid;
    gap: 18px;
}

.progress-meter {
    margin-top: 16px;
    height: 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    overflow: hidden;
}

.progress-meter__fill {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #f5b335, #2fd0b6);
}

.recommendation-card {
    padding: 22px;
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, rgba(22, 63, 119, 0.06), rgba(15, 123, 120, 0.08));
    border: 1px solid rgba(22, 63, 119, 0.08);
}

.empty-state {
    display: grid;
    gap: 18px;
}

.empty-state__actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.empty-state__checklist {
    display: grid;
    gap: 10px;
    padding-left: 0;
    margin: 0;
    list-style: none;
}

.empty-state__checklist li {
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(244, 247, 251, 0.82);
    border: 1px solid rgba(17, 32, 58, 0.08);
}

.list-item {
    border: 1px solid rgba(17, 32, 58, 0.08);
    border-radius: var(--radius-lg);
    padding: 18px;
    background: rgba(244, 247, 251, 0.7);
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.workspace-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 7px 12px;
    background: rgba(22, 63, 119, 0.08);
    color: var(--primary-strong);
    font-size: 0.82rem;
    font-weight: 800;
    max-width: min(100%, 240px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.workspace-chip--wrap {
    display: inline-block;
    max-width: 100%;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    overflow-wrap: anywhere;
}

.badge--missing { background: rgba(185, 74, 72, 0.12); color: var(--danger); }
.badge--in_progress { background: rgba(245, 179, 53, 0.16); color: #9c6700; }
.badge--ready { background: rgba(15, 123, 120, 0.12); color: var(--secondary); }
.badge--needs_update { background: rgba(22, 63, 119, 0.12); color: var(--primary); }
.badge--draft { background: rgba(17, 32, 58, 0.08); color: var(--muted); }
.badge--reviewed { background: rgba(15, 123, 120, 0.12); color: var(--secondary); }
.badge--active,
.badge--trialing { background: rgba(15, 123, 120, 0.12); color: var(--secondary); }
.badge--past_due,
.badge--inactive { background: rgba(245, 179, 53, 0.16); color: #9c6700; }

.flash-stack {
    display: grid;
    gap: 10px;
    margin-top: 16px;
}

.flash {
    border-radius: 18px;
    padding: 14px 18px;
    background: rgba(15, 123, 120, 0.12);
    border: 1px solid rgba(15, 123, 120, 0.18);
}

.flash--error {
    background: rgba(185, 74, 72, 0.12);
    border-color: rgba(185, 74, 72, 0.18);
}

.flash--warning {
    background: rgba(245, 179, 53, 0.16);
    border-color: rgba(245, 179, 53, 0.22);
}

.field {
    margin-bottom: 18px;
}

.field label {
    display: block;
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
}

.field input:not([type="checkbox"]):not([type="radio"]),
.field select,
.field textarea,
.form-card input:not([type="checkbox"]):not([type="radio"]),
.form-card select,
.form-card textarea {
    width: 100%;
    margin-top: 8px;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.96);
    color: var(--text);
    font: inherit;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.field input:not([type="checkbox"]):not([type="radio"]):focus,
.field select:focus,
.field textarea:focus,
.form-card input:not([type="checkbox"]):not([type="radio"]):focus,
.form-card select:focus,
.form-card textarea:focus {
    outline: none;
    border-color: rgba(15, 123, 120, 0.38);
    box-shadow: 0 0 0 4px rgba(15, 123, 120, 0.08);
}

.field input[readonly],
.field textarea[readonly],
.form-card input[readonly],
.form-card textarea[readonly] {
    background: rgba(244, 247, 251, 0.92);
    color: var(--muted);
}

.field-help,
.helptext,
ul.errorlist {
    margin: 8px 0 0;
    font-size: 0.86rem;
    color: var(--muted);
    list-style: none;
    padding: 0;
}

.copy-input {
    width: 100%;
    margin-top: 8px;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 14px 16px;
    background: rgba(244, 247, 251, 0.9);
    color: var(--text);
    font: inherit;
}

.field-error-message,
.form-error-summary {
    margin-top: 8px;
    color: var(--danger);
    font-size: 0.86rem;
    font-weight: 600;
}

.form-error-summary {
    margin-bottom: 16px;
    border: 1px solid rgba(185, 74, 72, 0.18);
    border-radius: 18px;
    padding: 12px 14px;
    background: rgba(185, 74, 72, 0.08);
}

.input-invalid {
    border-color: rgba(185, 74, 72, 0.5) !important;
    box-shadow: 0 0 0 4px rgba(185, 74, 72, 0.08) !important;
}

.field-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 24px;
}

.kpi-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.kpi {
    padding: 22px;
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(236, 242, 250, 0.96));
    border: 1px solid rgba(17, 32, 58, 0.08);
}

.kpi strong {
    display: block;
    font-size: 2rem;
    margin-top: 10px;
}

.pricing-card {
    padding: 28px;
    display: grid;
    gap: 18px;
}

.pricing-summary,
.pricing-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.pricing-summary .workspace-chip {
    max-width: 100%;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    overflow-wrap: anywhere;
}

.pricing-card__actions form {
    margin: 0;
}

.pricing-card__actions .button,
.pricing-card__actions form,
.pricing-card__actions form button {
    width: 100%;
}

.pricing-card__price {
    font-size: 2.4rem;
    font-weight: 800;
}

.stack-list {
    display: grid;
    gap: 10px;
    padding-left: 0;
    list-style: none;
}

.stack-list li::before {
    content: "•";
    margin-right: 10px;
    color: var(--secondary);
    font-weight: 800;
}

.question-block {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(17, 32, 58, 0.08);
}

.small {
    font-size: 0.9rem;
}

.auth-layout {
    align-items: start;
}

.auth-panel,
.auth-form-card {
    min-width: 0;
}

.auth-panel h1,
.auth-form-card h2 {
    overflow-wrap: anywhere;
}

.auth-panel .hero-proof__item,
.auth-panel strong,
.auth-form-card strong,
.flash {
    overflow-wrap: anywhere;
}

.auth-state {
    display: grid;
    gap: 14px;
}

.auth-form-card .form-actions {
    align-items: center;
}

@media (max-width: 960px) {
    .hero,
    .two-column,
    .section-grid,
    .dashboard-grid,
    .three-column,
    .kpi-row,
    .field-grid {
        grid-template-columns: 1fr;
    }

    .nav-links {
        justify-content: flex-end;
    }

    .site-header__inner {
        align-items: flex-start;
        flex-direction: column;
    }

    .site-footer__main {
        grid-template-columns: 1fr;
        gap: 42px;
    }

    .site-footer__intro {
        max-width: 540px;
    }

    .container {
        width: min(100% - 24px, 1180px);
    }
}

@media (max-width: 640px) {
    .site-footer__main {
        gap: 36px;
        padding-top: 44px;
        padding-bottom: 36px;
    }

    .site-footer__nav {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .site-footer__group {
        gap: 10px;
    }

    .site-footer__bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .hero-copy,
    .hero-card,
    .panel,
    .form-card,
    .table-card,
    .pricing-card {
        padding: 22px;
    }

    .hero h1,
    .section-title {
        line-height: 1;
    }

    .hero-card__grid {
        grid-template-columns: 1fr;
    }

    .hero {
        padding-top: 14px;
    }

    .hero--landing {
        padding-top: 6px;
    }

    .auth-panel h1,
    .auth-form-card h2 {
        font-size: 2rem !important;
    }

    .pricing-summary,
    .auth-form-card .form-actions,
    .auth-state .form-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .pricing-summary .workspace-chip {
        max-width: 100%;
    }

    .auth-form-card .form-actions .button,
    .auth-form-card .form-actions button,
    .auth-state .form-actions .button,
    .auth-state .form-actions button {
        width: 100%;
    }

    .table-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .table-actions .button,
    .table-actions form,
    .table-actions form button {
        width: 100%;
    }

    .table-scroll table {
        min-width: 460px;
    }

    .copy-feedback {
        min-height: 0;
    }
}
