:root {
    --bg: #f5f7fb;
    --surface: #ffffff;
    --surface-soft: #eef2f7;
    --text: #172033;
    --muted: #657085;
    --line: #dce2eb;
    --accent: #203c7a;
    --accent-strong: #162e61;
    --danger: #a12d36;
    --shadow: 0 18px 50px rgba(23, 32, 51, 0.08);
}

* { box-sizing: border-box; }
html { font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--text); background: var(--bg); }
body { margin: 0; min-height: 100vh; background: linear-gradient(180deg, #fbfcfe 0%, var(--bg) 55%); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input { font: inherit; }
.shell { width: min(1120px, calc(100% - 40px)); margin: 0 auto; }

.site-header { position: sticky; top: 0; z-index: 20; border-bottom: 1px solid rgba(220, 226, 235, 0.9); background: rgba(251, 252, 254, 0.92); backdrop-filter: blur(16px); }
.header-inner { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { color: var(--text); font-weight: 800; letter-spacing: 0.12em; }
.brand:hover { text-decoration: none; }
.nav { display: flex; align-items: center; gap: 18px; }
.nav > a:not(.button) { color: var(--text); font-weight: 600; font-size: 0.94rem; }
.inline-form { display: inline; margin: 0; }

.button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 0 18px; border-radius: 10px; border: 1px solid transparent; font-weight: 700; cursor: pointer; transition: transform 120ms ease, background 120ms ease, border-color 120ms ease; }
.button:hover { text-decoration: none; transform: translateY(-1px); }
.button-primary { color: #fff; background: var(--accent); border-color: var(--accent); }
.button-primary:hover { background: var(--accent-strong); }
.button-secondary { color: var(--text); background: var(--surface); border-color: var(--line); }
.button-ghost { color: var(--text); background: transparent; border-color: var(--line); }
.button-large { min-height: 50px; padding: 0 22px; }
.button-full { width: 100%; min-height: 48px; }

.hero { padding: 92px 0 76px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr); gap: 56px; align-items: center; }
.eyebrow, .card-kicker { margin: 0 0 14px; color: var(--accent); font-size: 0.78rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.hero h1, .auth-card h1, .dashboard-heading h1 { margin: 0; letter-spacing: -0.035em; line-height: 1.02; }
.hero h1 { max-width: 800px; font-size: clamp(2.7rem, 6vw, 5.4rem); }
.hero-lead { max-width: 720px; margin: 28px 0 0; color: var(--muted); font-size: 1.16rem; line-height: 1.75; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.trust-card, .panel, .auth-card, .principle-card { border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); }
.trust-card { padding: 28px; border-radius: 22px; }
.trust-flow { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.trust-flow li { display: flex; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.trust-flow li:last-child { border-bottom: 0; }
.trust-flow span { color: var(--muted); font-size: 0.78rem; font-weight: 800; }
.trust-flow strong { font-size: 0.96rem; }

.principles { padding: 24px 0 92px; }
.principle-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.principle-card { padding: 26px; border-radius: 18px; box-shadow: none; }
.principle-card h2, .panel h2 { margin: 0 0 12px; font-size: 1.2rem; }
.principle-card p, .panel p { margin: 0; color: var(--muted); line-height: 1.65; }

.auth-section { min-height: calc(100vh - 150px); display: grid; place-items: center; padding: 64px 20px; }
.auth-card { width: min(520px, 100%); padding: 36px; border-radius: 22px; }
.auth-card h1 { font-size: 2.2rem; }
.auth-intro { margin: 16px 0 28px; color: var(--muted); line-height: 1.65; }
.auth-form { display: grid; gap: 20px; }
.field { display: grid; gap: 8px; }
.field label { font-size: 0.92rem; font-weight: 700; }
.field input { width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid #c9d2df; border-radius: 9px; background: #fff; color: var(--text); outline: none; }
.field input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(32, 60, 122, 0.12); }
.field-hint { margin: 0; color: var(--muted); font-size: 0.82rem; line-height: 1.45; }
.form-error { color: var(--danger); font-size: 0.86rem; }
.form-error ul { margin: 4px 0 0; padding-left: 18px; }
.form-error-summary { padding: 12px 14px; border: 1px solid #efc7cb; border-radius: 9px; background: #fff4f5; }
.auth-switch { margin: 24px 0 0; color: var(--muted); text-align: center; }

.dashboard-section { padding: 64px 0 96px; }
.dashboard-heading { display: flex; justify-content: space-between; align-items: end; margin-bottom: 30px; }
.dashboard-heading h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
.dashboard-subtitle { margin: 10px 0 0; color: var(--muted); }
.dashboard-grid { display: grid; grid-template-columns: 1.35fr 0.65fr; gap: 20px; }
.panel { padding: 28px; border-radius: 18px; box-shadow: none; }
.panel-muted { background: var(--surface-soft); }
.workspace-list { display: grid; gap: 10px; margin-top: 22px; }
.workspace-row { display: flex; justify-content: space-between; gap: 20px; align-items: center; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.workspace-row div { display: grid; gap: 4px; }
.workspace-row span { color: var(--muted); font-size: 0.86rem; }
.status-pill { display: inline-flex; padding: 6px 10px; border-radius: 999px; background: #e8eefb; color: var(--accent) !important; font-weight: 800; font-size: 0.72rem !important; text-transform: uppercase; letter-spacing: 0.06em; }
.boundary-note { display: grid; gap: 6px; margin-top: 24px; padding: 16px; border-radius: 12px; background: #fff; border: 1px solid var(--line); }
.boundary-note span, .empty-state { color: var(--muted); line-height: 1.55; }

.site-footer { border-top: 1px solid var(--line); background: #fbfcfe; }
.footer-inner { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 18px; color: var(--muted); font-size: 0.86rem; }

@media (max-width: 820px) {
    .hero { padding-top: 64px; }
    .hero-grid, .dashboard-grid, .principle-grid { grid-template-columns: 1fr; }
    .hero-grid { gap: 34px; }
    .nav { gap: 10px; }
    .nav > a:not(.button) { display: none; }
    .auth-card { padding: 28px 22px; }
    .dashboard-heading { align-items: start; }
}

@media (max-width: 520px) {
    .shell { width: min(100% - 28px, 1120px); }
    .header-inner { min-height: 64px; }
    .hero h1 { font-size: 2.55rem; }
    .hero-actions { display: grid; }
    .button-large { width: 100%; }
    .footer-inner { flex-direction: column; align-items: flex-start; justify-content: center; padding: 18px 0; }
}
