* {
    box-sizing: border-box;
}

:root {
    --font-display: "Space Grotesk", "Source Sans 3", sans-serif;
    --font-body: "Source Sans 3", sans-serif;
    --bg: #f7f5f2;
    --bg-alt: #fffaf5;
    --surface: #ffffff;
    --border: #e6e0d6;
    --text: #1b1b1b;
    --muted: #5c5c5c;
    --accent: #ff5a00;
    --accent-strong: #e64a00;
    --accent-soft: #ffe4d3;
    --accent-ghost: rgba(255, 90, 0, 0.12);
    --shadow: 0 18px 45px rgba(19, 18, 16, 0.08);
    --shadow-soft: 0 12px 30px rgba(19, 18, 16, 0.06);
    --radius-lg: 20px;
    --radius-md: 14px;
    --radius-sm: 10px;
}

body.app-body {
    font-family: var(--font-body);
    background:
        radial-gradient(1000px 520px at 15% -10%, rgba(255, 181, 138, 0.25), transparent 60%),
        radial-gradient(900px 500px at 90% 0%, rgba(255, 214, 186, 0.35), transparent 60%),
        linear-gradient(180deg, #f7f5f2 0%, #ffffff 50%, #f7f5f2 100%);
    color: var(--text);
    min-height: 100vh;
    padding-bottom: 80px;
    position: relative;
    overflow-x: hidden;
    line-height: 1.6;
}

body.app-body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image: radial-gradient(rgba(27, 27, 27, 0.05) 1px, transparent 1px);
    background-size: 24px 24px;
    opacity: 0.4;
    pointer-events: none;
    z-index: -2;
}

body.app-body::after {
    content: "";
    position: fixed;
    inset: 0;
    background: linear-gradient(120deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0));
    pointer-events: none;
    z-index: -1;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    color: var(--accent-strong);
}

h1,
h2,
h3,
h4,
h5 {
    font-family: var(--font-display);
    letter-spacing: -0.02em;
}

.navbar.app-nav {
    background: rgba(252, 249, 245, 0.9);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 24px rgba(19, 18, 16, 0.04);
}

.navbar .navbar-brand {
    color: var(--text);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
}

.brand-logo {
    height: 36px;
    width: auto;
    max-width: 36px;
    border-radius: 12px;
    object-fit: contain;
    flex: 0 0 auto;
}

.brand-text {
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.02em;
}

.navbar .nav-link,
.navbar .dropdown-toggle {
    color: var(--muted);
    font-weight: 600;
    font-size: 0.95rem;
}

.navbar .nav-link:hover,
.navbar .dropdown-toggle:hover {
    color: var(--text);
}

.navbar-toggler {
    border-color: var(--border);
}

.navbar-toggler-icon {
    filter: none;
}

.dropdown-menu {
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-soft);
    background: var(--surface);
}

.dropdown-item {
    color: var(--text);
}

.dropdown-item:hover,
.dropdown-item:focus {
    background: var(--accent-soft);
    color: var(--text);
}

.app-shell {
    padding: 2.5rem 1.5rem 4rem;
}

.hero-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.hero-card::after {
    content: "";
    position: absolute;
    top: -120px;
    right: -80px;
    width: 260px;
    height: 260px;
    background: radial-gradient(circle, rgba(255, 90, 0, 0.12), transparent 70%);
}

.hero-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 2rem;
    align-items: center;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.35em;
    font-size: 0.7rem;
    color: var(--accent);
    margin-bottom: 0.6rem;
    font-weight: 600;
}

.hero-title {
    font-size: clamp(2rem, 3.4vw, 3.2rem);
    margin-bottom: 0.8rem;
    line-height: 1.1;
}

.hero-subtitle {
    color: var(--muted);
    font-size: 1.05rem;
    margin-bottom: 0;
}

.hero-actions {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    margin-top: 1.4rem;
}

.pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent-strong);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 600;
}

.hero-pill {
    align-self: flex-start;
    gap: 0.45rem;
    padding: 0.48rem 1rem 0.48rem 0.78rem;
    border: 1px solid rgba(255, 90, 0, 0.35);
    background: linear-gradient(135deg, rgba(255, 90, 0, 0.16), rgba(255, 90, 0, 0.04));
    color: #b63b00;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    font-weight: 700;
    box-shadow: 0 8px 16px rgba(255, 90, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.hero-pill::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 4px rgba(255, 90, 0, 0.14);
}

.stat-card {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1rem 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    box-shadow: var(--shadow-soft);
}

.stat-label {
    color: var(--muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.stat-value {
    font-family: var(--font-display);
    font-size: 1.4rem;
}

.glass-card,
.card,
.content-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
}

.card-body {
    color: var(--text);
}

.section-title {
    font-family: var(--font-display);
    font-size: 1.4rem;
    margin-bottom: 0.6rem;
}

.section-subtitle {
    color: var(--muted);
    margin-bottom: 1.5rem;
    max-width: 680px;
}

.project-list .list-group-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text);
    margin-bottom: 0.9rem;
    padding: 1.1rem 1.3rem;
    box-shadow: var(--shadow-soft);
}

.project-name {
    font-weight: 600;
    font-size: 1.05rem;
}

.project-meta {
    color: var(--muted);
    font-size: 0.85rem;
}

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

.step-card {
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.step-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 40px rgba(19, 18, 16, 0.12);
}

.step-card[data-state="done"] {
    border-color: rgba(46, 125, 50, 0.3);
}

.step-card[data-state="active"] {
    border-color: rgba(255, 90, 0, 0.45);
    box-shadow: 0 0 0 1px rgba(255, 90, 0, 0.2), var(--shadow-soft);
}

.step-card[data-state="locked"] {
    background: #f2efe9;
    opacity: 0.85;
}

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

.step-number {
    font-family: var(--font-display);
    font-size: 1.1rem;
    color: var(--accent);
}

.step-text {
    color: var(--muted);
    margin-bottom: 1rem;
}

.step-action {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.btn {
    border-radius: 999px;
    font-weight: 600;
    letter-spacing: 0.01em;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
    background: var(--accent);
    border-color: var(--accent);
    color: #ffffff;
    box-shadow: 0 12px 24px rgba(255, 90, 0, 0.25);
}

.btn-primary:hover {
    background: var(--accent-strong);
    border-color: var(--accent-strong);
    transform: translateY(-1px);
}

.btn-outline-primary {
    border-color: rgba(255, 90, 0, 0.6);
    color: var(--accent);
}

.btn-outline-primary:hover {
    background: var(--accent-soft);
    color: var(--accent-strong);
}

.btn-outline-secondary {
    border-color: var(--border);
    color: var(--text);
    background: #ffffff;
}

.btn-outline-secondary:hover {
    background: var(--accent-soft);
    color: var(--accent-strong);
}

.btn-secondary {
    background: #1b1b1b;
    border-color: #1b1b1b;
    color: #ffffff;
}

.badge {
    border-radius: 999px;
    padding: 0.35rem 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.6rem;
    font-weight: 600;
}

.badge.bg-success {
    background: rgba(46, 125, 50, 0.15) !important;
    color: #2e7d32;
    border: 1px solid rgba(46, 125, 50, 0.4);
}

.badge.bg-secondary {
    background: rgba(120, 120, 120, 0.15) !important;
    color: #606060;
    border: 1px solid rgba(120, 120, 120, 0.35);
}

.badge.bg-warning {
    background: rgba(255, 179, 71, 0.2) !important;
    color: #a75b00;
    border: 1px solid rgba(255, 179, 71, 0.45);
}

.alert {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
}

.form-control,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"],
input[type="number"],
input[type="search"],
textarea,
select {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: var(--radius-md);
    padding: 0.75rem 0.9rem;
    width: 100%;
}

textarea.form-control {
    min-height: 140px;
}

.form-control:focus,
input:focus,
textarea:focus,
select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(255, 90, 0, 0.18);
}

label {
    color: var(--muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.75rem;
}

.errorlist {
    list-style: none;
    margin: 0.35rem 0 0;
    padding: 0;
    color: #b00020;
    font-size: 0.85rem;
    font-weight: 600;
}

input[type="checkbox"],
input[type="radio"] {
    accent-color: var(--accent);
}

.auth-shell {
    max-width: 720px;
}

.auth-card {
    padding: 2.5rem;
}

.site-footer {
    color: var(--muted);
    border-top: 1px solid var(--border);
    background: rgba(252, 249, 245, 0.92);
    padding: 2.5rem 0 1.5rem;
}

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

.footer-brand p {
    margin-bottom: 0;
}

.footer-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-links a {
    display: inline-flex;
    align-items: center;
    color: var(--muted);
    font-weight: 600;
}

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

.social-link {
    width: 38px;
    height: 38px;
    border: 1px solid var(--border);
    border-radius: 50%;
    background-color: var(--surface);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
    overflow: hidden;
    flex: 0 0 auto;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.social-link img {
    width: 16px !important;
    height: 16px !important;
    max-width: 16px !important;
    max-height: 16px !important;
    object-fit: contain;
    display: block;
}

.social-link:hover {
    transform: translateY(-1px);
    border-color: rgba(255, 90, 0, 0.45);
    background-color: var(--accent-soft);
}

.footer-bottom {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.85rem;
}

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

.text-muted {
    color: var(--muted) !important;
}

.landing-hero {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 3rem;
    align-items: center;
    margin-top: 1rem;
}

.hero-content {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--muted);
    max-width: 520px;
}

.hero-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow);
}

.panel-eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.25em;
    font-size: 0.7rem;
    color: var(--muted);
    margin-bottom: 0.6rem;
}

.panel-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
    display: grid;
    gap: 0.7rem;
}

.panel-list li {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--text);
    font-weight: 600;
}

.panel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
}

.feature-section {
    margin-top: 4rem;
}

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

.feature-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.6rem;
    box-shadow: var(--shadow-soft);
}

.feature-card h3 {
    margin-bottom: 0.6rem;
}

.cta-section {
    margin-top: 4rem;
}

.cta-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2.4rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
    box-shadow: var(--shadow);
}

.step-page {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.step-header {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.step-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.8rem;
    box-shadow: var(--shadow-soft);
}

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

.resource-card {
    display: flex;
    align-items: flex-start;
    gap: 0.9rem;
    padding: 1rem 1.1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--bg-alt);
    color: var(--text);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.resource-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
    color: var(--text);
}

.resource-content {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.resource-content strong {
    display: block;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.resource-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: var(--accent-ghost);
    color: var(--accent-strong);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
    overflow: hidden;
}

.resource-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.resource-meta {
    color: var(--muted);
    font-size: 0.9rem;
    overflow-wrap: anywhere;
}

.resource-card .badge {
    display: inline-block;
    margin-top: 0.35rem;
}

.checklist {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.6rem;
}

.checklist li {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    color: var(--text);
}

.checkmark {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid var(--accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    color: var(--accent);
}

.complete-card {
    background: var(--surface);
    border: 1px dashed rgba(255, 90, 0, 0.35);
    border-radius: var(--radius-lg);
    padding: 1.6rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 600;
    color: var(--text);
}

.idea-form {
    display: grid;
    gap: 1.2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.form-hint {
    color: var(--muted);
    font-size: 0.9rem;
    margin: 0;
}

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

.analysis-card {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.2rem 1.4rem;
    box-shadow: var(--shadow-soft);
}

.analysis-card p {
    margin-bottom: 0.8rem;
}

.analysis-meta {
    color: var(--muted);
    font-size: 0.85rem;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.summary-item {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0.9rem 1rem;
}

.summary-label {
    color: var(--muted);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.summary-value {
    color: var(--text);
    font-weight: 600;
}

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

.match-card {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    position: relative;
    overflow: hidden;
}

.match-card.top-fit-card {
    border-color: rgba(214, 172, 52, 0.45);
    box-shadow: 0 14px 30px rgba(214, 172, 52, 0.16), var(--shadow-soft);
}

.match-card.top-fit-card::before {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 2px;
    background: conic-gradient(
        from 0deg,
        rgba(255, 221, 117, 0) 0deg 250deg,
        rgba(255, 221, 117, 0.38) 285deg,
        #ffd56d 315deg,
        rgba(255, 221, 117, 0.38) 345deg,
        rgba(255, 221, 117, 0) 360deg
    );
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    mask-composite: exclude;
    animation: top-fit-border-spin 2.8s linear infinite;
    pointer-events: none;
}

.match-card.top-fit-card .badge.bg-success {
    background: rgba(214, 172, 52, 0.18) !important;
    color: #8b6710;
    border-color: rgba(214, 172, 52, 0.5);
}

@keyframes top-fit-border-spin {
    to {
        transform: rotate(1turn);
    }
}

.match-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
}

.match-top h4 {
    margin: 0;
    font-size: 1.05rem;
}

.score-pill {
    font-size: 0.64rem;
}

.compact-checklist {
    gap: 0.45rem;
}

.compact-checklist li {
    font-size: 0.92rem;
}

.portfolio-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.logo-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    align-items: center;
}

.logo-tile {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 72px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}

.logo-tile img {
    height: 36px;
    width: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.75;
    transition: filter 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}

.logo-tile:hover img {
    filter: none;
    opacity: 1;
    transform: translateY(-1px);
}

.legal-page h1 {
    margin-bottom: 1rem;
}

.legal-page p,
.legal-page h2 {
    color: var(--muted);
}

.legal-page h2 {
    margin-top: 1.4rem;
    color: var(--text);
}

.updated {
    color: var(--muted);
    font-weight: 600;
}

.reveal {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.cursor-dot,
.cursor-ring {
    position: fixed;
    left: 0;
    top: 0;
    pointer-events: none;
    opacity: 0;
    z-index: 9999;
    transition: opacity 0.2s ease;
}

body.cursor-enabled .cursor-dot,
body.cursor-enabled .cursor-ring {
    opacity: 1;
}

.cursor-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    transform: translate(-50%, -50%);
}

.cursor-ring {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid rgba(255, 90, 0, 0.4);
    transform: translate(-50%, -50%);
    transition: width 0.2s ease, height 0.2s ease, border-radius 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

body.cursor-hover .cursor-ring {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border-color: var(--accent);
    background: rgba(255, 90, 0, 0.12);
}

body.cursor-hover .cursor-dot {
    background: var(--accent-strong);
}

@media (max-width: 768px) {
    .hero-card {
        padding: 2rem 1.5rem;
    }

    .auth-card {
        padding: 2rem 1.5rem;
    }

    .landing-hero {
        gap: 2rem;
    }
}

@media (pointer: coarse) {
    .cursor-dot,
    .cursor-ring {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
    }

    .match-card.top-fit-card::before {
        animation: none;
    }
}
