:root {
    --bg: #f6f7fb;
    --panel: #ffffff;
    --ink: #182033;
    --muted: #637089;
    --line: #dfe4ef;
    --brand: #245f73;
    --brand-dark: #164151;
    --accent: #b58a2b;
    --danger: #bd2e3a;
    --success: #0b7a59;
    --shadow: 0 18px 48px rgba(24, 32, 51, 0.11);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: Arial, Helvetica, sans-serif;
    letter-spacing: 0;
}

a {
    color: inherit;
}

.auth-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background:
        linear-gradient(rgba(17, 41, 50, 0.75), rgba(17, 41, 50, 0.75)),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='900' height='700' viewBox='0 0 900 700'%3E%3Crect width='900' height='700' fill='%23245f73'/%3E%3Ccircle cx='180' cy='150' r='90' fill='%23b58a2b' opacity='.35'/%3E%3Ccircle cx='710' cy='490' r='130' fill='%23ffffff' opacity='.1'/%3E%3Cpath d='M0 560 C180 480 290 640 470 560 C630 488 710 520 900 450 L900 700 L0 700Z' fill='%23164151'/%3E%3C/svg%3E");
    background-size: cover;
}

.auth-shell {
    width: min(440px, calc(100vw - 32px));
}

.auth-shell.wide {
    width: min(820px, calc(100vw - 32px));
}

.auth-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 28px;
}

.brand-mark {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--brand);
    color: white;
    font-weight: 700;
}

h1 {
    margin: 14px 0 8px;
    font-size: 28px;
}

.muted,
.hero-band p,
.tool-header p,
.module-card small {
    color: var(--muted);
}

.stack-form {
    display: grid;
    gap: 16px;
    margin-top: 22px;
}

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

label {
    display: grid;
    gap: 7px;
    color: var(--muted);
    font-size: 14px;
}

input {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 12px 13px;
    color: var(--ink);
    font: inherit;
}

input:focus {
    outline: 2px solid rgba(36, 95, 115, 0.22);
    border-color: var(--brand);
}

.primary-btn,
.ghost-btn {
    border: 0;
    border-radius: 6px;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
}

.primary-btn {
    padding: 13px 18px;
    background: var(--brand);
    color: white;
}

.primary-btn:hover {
    background: var(--brand-dark);
}

.ghost-btn {
    padding: 10px 12px;
    border: 1px solid var(--line);
    background: white;
    color: var(--brand);
}

.notice,
.alert {
    margin-top: 16px;
    padding: 12px 14px;
    border-radius: 6px;
}

.notice {
    background: #eef8f4;
    color: var(--success);
}

.alert {
    background: #fff1f2;
    color: var(--danger);
}

.topbar {
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 0 28px;
    background: var(--panel);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 5;
}

.topbar div,
.topbar nav {
    display: flex;
    align-items: center;
    gap: 14px;
}

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

.topbar a {
    color: var(--brand);
    text-decoration: none;
    font-weight: 700;
}

.page-shell {
    width: min(1180px, calc(100vw - 32px));
    margin: 0 auto;
    padding: 28px 0 48px;
}

.hero-band,
.tool-header {
    margin-bottom: 24px;
}

.eyebrow {
    margin: 0 0 6px;
    color: var(--accent);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

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

.module-card {
    min-height: 150px;
    display: grid;
    align-content: start;
    gap: 12px;
    padding: 20px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(24, 32, 51, 0.06);
    text-decoration: none;
}

.module-card:hover {
    border-color: var(--brand);
}

.module-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #e8f1f4;
    color: var(--brand);
}

.tool-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 380px);
    align-items: end;
    gap: 24px;
}

.search-box {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px;
}

.audio-list {
    display: grid;
    gap: 12px;
}

.audio-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
    gap: 18px;
    align-items: center;
    padding: 16px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.audio-copy {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
}

.audio-number {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--brand);
    color: white;
    font-weight: 700;
}

.audio-copy p {
    margin: 0;
    line-height: 1.45;
}

.audio-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
}

audio {
    width: 100%;
    min-width: 0;
}

[hidden] {
    display: none !important;
}

@media (max-width: 760px) {
    .form-grid,
    .tool-header,
    .audio-item {
        grid-template-columns: 1fr;
    }

    .topbar {
        align-items: flex-start;
        flex-direction: column;
        padding: 14px 16px;
    }
}

