:root {
  --bg: #f5f7f3;
  --surface: #ffffff;
  --text: #192f2c;
  --muted: #52655f;
  --border: #d4dfd6;
  --accent: #17624e;
  --accent-soft: #eaf3eb;
  --focus: #985300;
  font-family: system-ui, 'Segoe UI', sans-serif;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121a18;
    --surface: #1b2624;
    --text: #e3ece8;
    --muted: #a3b5ae;
    --border: #33443f;
    --accent: #7fd1b0;
    --accent-soft: #22332e;
    --focus: #f0b35a;
  }
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 280px; background: var(--bg); }
a { color: var(--accent); text-underline-offset: 0.2em; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 16px;
  border-bottom: 1px solid var(--border);
}
.brand { display: inline-flex; align-items: center; min-height: 44px; font-weight: 750; text-decoration: none; color: var(--text); }
.account { display: flex; align-items: center; gap: 0.75rem; min-width: 0; }
.user { color: var(--muted); overflow-wrap: anywhere; }

.button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.5rem 1rem;
  border: 1px solid var(--accent);
  border-radius: 0.6rem;
  font-weight: 650;
  text-decoration: none;
  background: var(--surface);
}
.button:hover { background: var(--accent-soft); }

main { max-width: 60rem; margin: 0 auto; padding: 1.5rem 16px 3rem; }
h1 { font-size: clamp(1.8rem, 6vw, 2.5rem); margin: 0.5rem 0; }
.intro { color: var(--muted); }

.tiles {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr));
}
.tile a {
  display: block;
  height: 100%;
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: 0.9rem;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
}
.tile a:hover { border-color: var(--accent); background: var(--accent-soft); }
.tile h2 { margin: 0 0 0.4rem; font-size: 1.2rem; color: var(--accent); }
.tile p { margin: 0; color: var(--muted); }
