:root {
    --bg: #f7f8fa;
    --panel: #ffffff;
    --panel-2: #fafbfc;
    --border: #e4e7eb;
    --border-strong: #d1d5db;
    --text: #1f2937;
    --text-soft: #4b5563;
    --muted: #6b7280;
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --accent-soft: #eff6ff;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

.page {
    max-width: 720px;
    margin: 0 auto;
    padding: 40px 24px 60px;
}

.brand {
    margin-bottom: 28px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border);
}
.brand h1 {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    letter-spacing: -0.01em;
}
.brand .tag {
    font-size: 13px;
    color: var(--muted);
    margin-top: 2px;
    display: block;
}

nav.top {
    display: flex;
    gap: 2px;
    margin-bottom: 24px;
}
nav.top a {
    color: var(--text-soft);
    text-decoration: none;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 6px;
    transition: background 0.15s, color 0.15s;
}
nav.top a:hover {
    background: var(--panel);
    color: var(--text);
}

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

h1, h2, h3 {
    margin: 0 0 12px;
    font-weight: 600;
    letter-spacing: -0.01em;
}
h1 { font-size: 20px; }
h2 {
    font-size: 13px;
    color: var(--muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 24px;
    margin-bottom: 10px;
}

hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 20px 0;
}

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

p { margin: 6px 0; color: var(--text-soft); }

label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-soft);
    margin-bottom: 6px;
}

input[type="text"], input[type="password"], input:not([type]), textarea {
    width: 100%;
    background: var(--panel);
    border: 1px solid var(--border-strong);
    border-radius: 6px;
    color: var(--text);
    font-family: inherit;
    font-size: 14px;
    padding: 9px 12px;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus, textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
input::placeholder, textarea::placeholder {
    color: var(--muted);
}
textarea {
    resize: vertical;
    min-height: 90px;
    font-family: inherit;
}

button {
    background: var(--accent);
    border: 1px solid var(--accent);
    color: #fff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 18px;
    border-radius: 6px;
    cursor: pointer;
}
button:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
}

.field { margin-bottom: 14px; }
.actions { margin-top: 16px; }

.flash {
    list-style: none;
    padding: 0;
    margin: 0 0 20px;
}
.flash li {
    background: var(--accent-soft);
    border: 1px solid #bfdbfe;
    color: #1e3a8a;
    font-size: 13px;
    padding: 10px 14px;
    border-radius: 6px;
    margin-bottom: 6px;
}

.note {
    background: var(--panel-2);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 14px 16px;
    margin: 8px 0;
}
.note strong {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}
.note p {
    margin: 0;
    color: var(--text-soft);
    font-size: 13px;
    white-space: pre-wrap;
}

.result {
    background: var(--panel-2);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 12px 14px;
    margin: 8px 0;
    font-size: 14px;
}
.result .author {
    color: var(--muted);
    font-size: 12px;
    margin-bottom: 4px;
}

.muted {
    color: var(--muted);
    font-size: 13px;
    text-align: center;
    padding: 20px 0;
}

.auth-wrap {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.auth-card {
    max-width: 380px;
    width: 100%;
}
.auth-card h1 {
    font-size: 18px;
    margin-bottom: 4px;
}
.auth-card .sub {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 20px;
}

.footnote {
    font-size: 13px;
    color: var(--muted);
    text-align: center;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.search-row {
    display: flex;
    gap: 8px;
}
.search-row input { flex: 1; }

.lead {
    color: var(--text-soft);
    font-size: 13px;
    margin: 0 0 16px;
}
