:root {
    --cream: #f6efe4;
    --paper: #fffaf3;
    --ink: #1f1a16;
    --muted: #5e534b;
    --line: #e4d6c6;
    --terracotta: #c45c26;
    --terracotta-dark: #9d4318;
    --sage: #3f6b5a;
    --gold: #d9a441;
}

html {
    scroll-behavior: smooth;
    height: 100%;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: "Source Sans 3", system-ui, sans-serif;
    color: var(--ink);
    background: var(--cream);
    line-height: 1.65;
}

#main {
    flex: 1 0 auto;
}

h1, h2, h3, .navbar-brand strong, .display-font {
    font-family: Fraunces, Georgia, serif;
    letter-spacing: -0.02em;
}

.site-header {
    background: rgba(255, 250, 243, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 20;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    color: var(--ink);
    text-decoration: none;
}

.navbar-brand strong { display: block; font-size: 1.15rem; }
.navbar-brand small { display: block; color: var(--muted); font-size: 0.75rem; letter-spacing: 0.04em; text-transform: uppercase; }

.brand-mark {
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 999px;
    background: var(--terracotta);
    color: #fff;
    display: grid;
    place-items: center;
    font-family: Fraunces, serif;
    font-weight: 700;
}

.navbar-nav .nav-link {
    color: var(--muted);
    font-weight: 600;
    padding: 0.4rem 0.7rem;
}

.navbar-nav .nav-link.active,
.navbar-nav .nav-link:hover { color: var(--ink); }

.btn-terracotta {
    --bs-btn-bg: var(--terracotta);
    --bs-btn-border-color: var(--terracotta);
    --bs-btn-color: #fff;
    --bs-btn-hover-bg: var(--terracotta-dark);
    --bs-btn-hover-border-color: var(--terracotta-dark);
    --bs-btn-hover-color: #fff;
}

.hero {
    padding: 4.5rem 0 3.5rem;
    background:
        radial-gradient(circle at 90% 10%, rgba(196, 92, 38, 0.16), transparent 40%),
        radial-gradient(circle at 10% 80%, rgba(63, 107, 90, 0.14), transparent 35%),
        var(--cream);
}

.hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); max-width: 14ch; }
.hero .lead { max-width: 38rem; color: var(--muted); }

.hero-card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 1.5rem;
    padding: 1.5rem;
    box-shadow: 0 20px 50px rgba(31, 26, 22, 0.08);
}

.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 1rem; padding: 1rem 1.1rem; }
.stat strong { display: block; font-family: Fraunces, serif; font-size: 1.5rem; }
.stat span { color: var(--muted); font-size: 0.9rem; }

.section { padding: 4rem 0; }
.section-alt { background: var(--paper); }

.specialty {
    height: 100%;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 1.1rem;
    padding: 1.25rem;
}

.specialty i { color: var(--terracotta); font-size: 1.4rem; }

.quote {
    background: #fff;
    border-left: 4px solid var(--gold);
    border-radius: 0 1rem 1rem 0;
    padding: 1.25rem 1.4rem;
    height: 100%;
}

.quote footer { color: var(--muted); font-size: 0.9rem; margin-top: 0.75rem; }

.page-intro { padding: 3rem 0 1rem; }

.auth-shell {
    min-height: 70vh;
    display: grid;
    place-items: center;
    padding: 3rem 1rem;
}

.auth-card {
    width: min(28rem, 100%);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 1.4rem;
    padding: 2rem;
    box-shadow: 0 16px 40px rgba(31, 26, 22, 0.07);
}

.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: 100%;
    background: #fff;
    border: 1px solid var(--line);
    color: var(--ink);
    font-weight: 600;
}

.app-tile {
    display: block;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 1.1rem;
    padding: 1.3rem;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.app-tile:hover { border-color: var(--terracotta); color: inherit; }

.site-footer {
    background: #231d19;
    color: #efe6da;
    padding: 3rem 0 1.5rem;
    margin-top: auto;
    flex-shrink: 0;
}

.site-footer a { color: #f3d7c2; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.copyright { margin-top: 2rem; color: #b7aa9c; font-size: 0.85rem; }

.table thead th { font-weight: 600; }

.vocab-nav { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.vocab-ipa {
    font-family: "Source Sans 3", ui-sans-serif, sans-serif;
    font-size: 1.35rem;
    letter-spacing: 0.02em;
}
.vocab-pronounce .vocab-play i { font-size: 1.15rem; }
.vocab-images {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.75rem;
}
.vocab-images a {
    display: block;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 0.8rem;
    border: 1px solid var(--line);
    background: #fff;
}
.vocab-images img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

