:root {
  color-scheme: light dark;
  --bg: #faf7f2;
  --surface: #ffffff;
  --text: #2a2622;
  --muted: #6b635a;
  --line: #e7e0d6;
  --accent: #b5473a;
  --accent-soft: #f6e6e2;
  --focus: #1f5fbf;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1b1917;
    --surface: #252220;
    --text: #efe9e1;
    --muted: #a99f94;
    --line: #3a3531;
    --accent: #e0796b;
    --accent-soft: #3a2724;
    --focus: #8ab4ff;
  }
}

:root[data-theme="dark"] {
  --bg: #1b1917;
  --surface: #252220;
  --text: #efe9e1;
  --muted: #a99f94;
  --line: #3a3531;
  --accent: #e0796b;
  --accent-soft: #3a2724;
  --focus: #8ab4ff;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}

.page {
  max-width: 42rem;
  margin: 0 auto;
  padding: 4rem 1rem 3rem;
}

.masthead { margin-bottom: 3rem; }

.mark { margin: 0 0 1rem; line-height: 0; }
.mark svg { fill: var(--accent); }

h1 {
  margin: 0;
  font-size: clamp(2rem, 6vw, 2.75rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.tagline {
  margin: 0.5rem 0 0;
  color: var(--muted);
  font-size: 1.15rem;
}

h2 {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tools {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.tool {
  display: grid;
  gap: 0.25rem;
  padding: 1.1rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.tool:hover { border-color: var(--accent); background: var(--accent-soft); }
.tool:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

.tool-name { font-weight: 650; font-size: 1.1rem; }
.tool-text { color: var(--muted); }
.tool-host { color: var(--accent); font-size: 0.9rem; overflow-wrap: anywhere; }

.footer {
  margin-top: 4rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

.footer p { margin: 0; }

.notfound a { color: var(--accent); }

@media (prefers-reduced-motion: reduce) {
  .tool { transition: none; }
}
