:root {
  --bg: #f4f6f3;
  --panel: #fff;
  --text: #17211d;
  --muted: #66716c;
  --line: #d7ded9;
  --accent: #1e684f;
  --danger: #8a2f2f;
  --max: 1120px;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }
.auth-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth-card, .dialog-card, .panel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.auth-card { width: min(440px, 100%); padding: 32px; }
h1, h2 { margin: 0 0 12px; line-height: 1.1; }
.eyebrow { margin: 0 0 10px; text-transform: uppercase; letter-spacing: .12em; font-size: 12px; font-weight: 700; color: var(--accent); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
form label { display: grid; gap: 6px; margin: 16px 0; font-weight: 600; }
input, textarea { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 12px; background: #fff; color: var(--text); }
textarea { resize: vertical; }
button { border: 0; border-radius: 8px; padding: 10px 14px; background: var(--text); color: #fff; font-weight: 650; }
button.quiet { background: transparent; color: var(--text); border: 1px solid var(--line); }
.message { color: var(--muted); font-size: 14px; }
.message.error { color: var(--danger); }
.app-header { position: sticky; top: 0; z-index: 10; display: grid; grid-template-columns: auto 1fr auto; gap: 24px; align-items: center; padding: 14px 24px; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); }
.brand { font-weight: 800; text-decoration: none; white-space: nowrap; }
nav { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; }
nav a { text-decoration: none; font-size: 14px; }
nav a[aria-current="page"] { color: var(--accent); font-weight: 700; }
.header-actions { display: flex; gap: 8px; }
.page-shell { max-width: var(--max); margin: 0 auto; padding: 48px 24px 120px; }
.panel { padding: 28px; }
.route-placeholder { max-width: 760px; }
.route-placeholder h1 { font-size: clamp(32px, 5vw, 56px); }
.route-meta { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.notice-floater { position: fixed; right: 24px; bottom: 24px; background: var(--text); box-shadow: 0 10px 30px rgba(0,0,0,.12); }
dialog { border: 0; padding: 0; background: transparent; width: min(720px, calc(100% - 32px)); }
dialog::backdrop { background: rgba(10,18,15,.38); }
.dialog-card { padding: 26px; }
.dialog-head { display: flex; align-items: start; justify-content: space-between; gap: 16px; }
.dialog-actions { display: flex; justify-content: space-between; gap: 16px; align-items: center; margin-top: 16px; }
.search-form { display: grid; grid-template-columns: 1fr auto; gap: 10px; margin: 18px 0 0; }
.search-results { display: grid; gap: 10px; margin-top: 20px; max-height: 52vh; overflow: auto; }
.search-result { border: 1px solid var(--line); border-radius: 9px; padding: 14px; background: #fff; }
.search-type { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--accent); }
.search-result h3 { margin: 5px 0 4px; font-size: 16px; }
.search-result p { margin: 0; color: var(--muted); font-size: 14px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (max-width: 900px) {
  .app-header { grid-template-columns: 1fr auto; }
  .app-header nav { grid-column: 1 / -1; justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 2px; }
  .header-actions { justify-content: flex-end; }
}
@media (max-width: 560px) {
  .app-header { padding: 12px 16px; gap: 10px; }
  .page-shell { padding: 32px 16px 110px; }
  .header-actions #sign-out { display: none; }
  .dialog-actions { align-items: stretch; flex-direction: column; }
  .search-form { grid-template-columns: 1fr; }
}
