:root {
    color-scheme: light;
    --ink: #17201d;
    --muted: #65716c;
    --paper: #f4f1e9;
    --surface: rgba(255, 255, 255, .82);
    --surface-solid: #fbfaf6;
    --line: rgba(23, 32, 29, .12);
    --accent: #d45235;
    --accent-dark: #a73a24;
    --sage: #5e796b;
    --shadow: 0 18px 50px rgba(43, 48, 39, .10);
    font-family: Inter, "Noto Sans SC", "Microsoft YaHei UI", "PingFang SC", system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    background:
        radial-gradient(circle at 8% 4%, rgba(212, 82, 53, .11), transparent 28rem),
        radial-gradient(circle at 92% 92%, rgba(94, 121, 107, .13), transparent 30rem),
        var(--paper);
    font-size: 15px;
    line-height: 1.5;
}
button, input, select, textarea { font: inherit; }
a { color: inherit; }
.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    border-bottom: 1px solid var(--line);
    background: rgba(244, 241, 233, .9);
    backdrop-filter: blur(16px);
}
.nav-shell {
    width: min(1120px, calc(100% - 32px));
    min-height: 64px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 28px;
}
.brand { font-size: 17px; font-weight: 760; text-decoration: none; letter-spacing: -.02em; }
.nav-links { display: flex; gap: 8px; flex: 1; }
.nav-links a {
    padding: 8px 12px;
    border-radius: 10px;
    color: var(--muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}
.nav-links a:hover { color: var(--ink); background: rgba(255,255,255,.65); }
.logout-form { margin: 0; }
.button {
    border: 0;
    border-radius: 11px;
    padding: 10px 15px;
    font-weight: 680;
    cursor: pointer;
}
.button-primary { color: white; background: var(--accent); box-shadow: 0 8px 20px rgba(212,82,53,.20); }
.button-primary:hover { background: var(--accent-dark); }
.button-quiet { color: var(--muted); background: transparent; }
.page-shell { width: min(1120px, calc(100% - 32px)); margin: 0 auto; padding: 46px 0 72px; }
.eyebrow { color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .14em; }
.hero h1, .auth-intro h1 { margin: 12px 0; font-size: clamp(36px, 6vw, 68px); line-height: 1.03; font-weight: 760; letter-spacing: -.045em; }
.hero p, .auth-intro p { max-width: 650px; color: var(--muted); font-size: 17px; line-height: 1.7; }
.module-grid { margin-top: 36px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.module-card {
    min-height: 154px;
    padding: 22px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 17px;
    align-items: start;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--surface);
    box-shadow: var(--shadow);
    text-decoration: none;
    transition: transform .18s ease, border-color .18s ease;
}
a.module-card:hover { transform: translateY(-2px); border-color: rgba(212,82,53,.42); }
.module-card h2 { margin: 2px 0 8px; font-size: 22px; line-height: 1.15; font-weight: 740; letter-spacing: -.02em; }
.module-card p { margin: 0; color: var(--muted); line-height: 1.55; }
.module-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: #efe4d7; color: var(--accent); font-weight: 900; }
.module-card-note .module-icon { background: #dfe8df; color: var(--sage); }
.module-arrow { align-self: end; font-size: 24px; }
.module-card-muted { opacity: .66; box-shadow: none; }
.status-pill { padding: 5px 9px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 12px; }
.auth-page .site-header { display: none; }
.auth-page .page-shell { min-height: 100vh; display: grid; place-items: center; }
.auth-shell { width: min(1000px, 100%); display: grid; grid-template-columns: 1.2fr .8fr; gap: clamp(40px, 8vw, 100px); align-items: center; }
.auth-intro h1 { font-size: clamp(40px, 6vw, 72px); }
.auth-card { padding: 28px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); box-shadow: var(--shadow); display: grid; gap: 10px; }
.auth-card label { margin-top: 8px; font-size: 13px; font-weight: 750; }
.auth-card input {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 11px;
    padding: 12px 13px;
    background: rgba(255,255,255,.8);
    color: var(--ink);
}
.auth-card .button { margin-top: 12px; }
.form-hint, .validation-summary { color: var(--muted); font-size: 13px; line-height: 1.5; }
.validation-summary { color: #9d2f21; }
.validation-summary ul { margin: 0; padding-left: 18px; }
.module-card small { display:block; margin-top:8px; color:var(--muted); line-height:1.45; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
@media (max-width: 760px) {
    .nav-shell { gap: 14px; }
    .nav-links { overflow-x: auto; }
    .nav-links a { white-space: nowrap; }
    .module-grid, .auth-shell { grid-template-columns: 1fr; }
    .page-shell { padding-top: 30px; }
    .auth-intro p { font-size: 16px; }
    .logout-form .button { padding-inline: 8px; }
}
