:root {
  --bg: #e9edf1; --surface: #ffffff; --ink: #17212b; --muted: #5a6775; --line: #d3dae1;
  --accent: #0b6477; --accent-ink: #ffffff; --accent-soft: #d8ecf0;
  --good: #1c7448; --good-soft: #dcf1e5; --bad: #a3271f; --bad-soft: #fbe3e0;
  --ui: "Manrope", "Segoe UI", Roboto, Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #11161b; --surface: #1a2128; --ink: #e5eaef; --muted: #9ba8b5; --line: #2f3944;
    --accent: #5fc3d3; --accent-ink: #082a31; --accent-soft: #163a43;
    --good: #70cf9c; --good-soft: #173826; --bad: #f0958d; --bad-soft: #43201d; color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font-family: var(--ui); font-size: 15px; line-height: 1.5; min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--accent); }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }

.top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 12px 20px; }
.top .brand { font-weight: 700; font-size: 17px; letter-spacing: -0.01em; margin-right: auto; color: var(--ink); text-decoration: none; }
.top .brand span { color: var(--accent); }
.top .who { color: var(--muted); }
.top form { margin: 0; }

.btn { display: inline-block; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 7px 13px; font-weight: 600; text-decoration: none; color: var(--ink); }
.btn:hover { border-color: var(--accent); }
.btn.pri { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

main { flex: 1 1 auto; padding: 8px 20px 40px; }
.col { max-width: 760px; margin: 0 auto; }
.narrow { max-width: 420px; margin: 0 auto; }
footer { padding: 14px 20px; color: var(--muted); font-size: 12.5px; text-align: center; }

.notice { max-width: 760px; margin: 0 auto 16px; padding: 10px 14px; border-radius: 8px; background: var(--good-soft); color: var(--good); font-weight: 500; }
.notice.err { background: var(--bad-soft); color: var(--bad); }

/* title page */
.hero { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 36px 0 26px; text-align: center; }
.hero img { width: 112px; height: 112px; border-radius: 50%; display: block; }
.wordmark { margin: 0; font-size: 40px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; }
.wordmark span { color: var(--accent); }
.hero p { margin: 0; color: var(--muted); }
.projects { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.proj { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 18px 16px; min-height: 92px; display: flex; flex-direction: column; justify-content: space-between; gap: 10px; text-decoration: none; color: var(--ink); text-align: left; }
.proj:hover { border-color: var(--accent); }
.proj b { font-size: 17px; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.proj small { color: var(--muted); font-size: 12.5px; }
.proj.add { align-items: center; justify-content: center; border-style: dashed; background: none; color: var(--muted); }
.proj.add .plus { font-size: 30px; line-height: 1; color: var(--accent); }
.row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.row input { flex: 1 1 220px; min-width: 0; }

/* forms and cards */
input[type="text"], input[type="password"] { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; width: 100%; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 20px; margin-bottom: 16px; }
.card h2 { margin: 0 0 6px; font-size: 17px; }
.card > p { margin: 0 0 14px; color: var(--muted); }
h1 { font-size: 26px; letter-spacing: -0.02em; margin: 14px 0 16px; text-wrap: balance; }
.field { display: grid; gap: 4px; margin-bottom: 12px; }
.field label { font-weight: 600; font-size: 13.5px; }
.field small { color: var(--muted); }
.acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.state { display: inline-block; font-size: 13px; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--bg); color: var(--muted); }
.state.ok { background: var(--good-soft); color: var(--good); }
.error { background: var(--bad-soft); color: var(--bad); border-radius: 8px; padding: 9px 12px; margin: 0 0 14px; font-weight: 500; }
ul.users { list-style: none; margin: 0 0 14px; padding: 0; }
ul.users li { padding: 7px 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 10px; }
ul.users li span { color: var(--muted); }
details summary { cursor: pointer; font-weight: 600; color: var(--accent); margin-bottom: 12px; }
.center { text-align: center; }
.center img { width: 84px; height: 84px; border-radius: 50%; }

@media (max-width: 520px) {
  .wordmark { font-size: 32px; }
  main { padding-inline: 16px; }
  .top { padding-inline: 16px; }
}
