/* l/list.css — the shared-list page.
   Tokens follow the legal pages: self-contained, no build step, no imports. */

:root {
  --bg: #fbf9f4;
  --surface: #ffffff;
  --surface-2: #f2efe7;
  --divider: #e6e1d4;
  --text: #16211f;
  --muted: #5c6763;
  --primary: #00615d;
  --primary-ink: #ffffff;
  --coral: #f0466e;
  --display: "Chillax", "Avenir Next", "Helvetica Neue", sans-serif;
  --body: "General Sans", "Avenir Next", "Helvetica Neue", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1614;
    --surface: #17211f;
    --surface-2: #1d2927;
    --divider: #253230;
    --text: #eef2f0;
    --muted: #98a5a1;
    --primary: #4fc3b4;
    --primary-ink: #06201d;
    --coral: #ff7b98;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  padding: 0 1.5rem 5rem;
}

.wrap { max-width: 34rem; margin: 0 auto; }

header { padding: 2.5rem 0 1.75rem; }
.back { font-size: 0.9rem; color: var(--primary); text-decoration: none; font-weight: 600; }
.back:hover { text-decoration: underline; }

h1 {
  font-family: var(--display);
  font-size: clamp(1.75rem, 1.2rem + 2.5vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-top: 1.25rem;
  overflow-wrap: anywhere;
}

.count { color: var(--muted); font-size: 0.95rem; margin-top: 0.35rem; }

.words {
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: 0.9rem;
  margin: 1.5rem 0;
  overflow: hidden;
}
.words li {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--divider);
  overflow-wrap: anywhere;
}
.words li:last-child { border-bottom: none; }
.words li::before {
  content: counter(n) ".";
  counter-increment: n;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  margin-right: 0.6rem;
  font-size: 0.85rem;
}
.words { counter-reset: n; }

.actions { display: flex; flex-direction: column; gap: 0.7rem; margin: 1.75rem 0; }

.btn {
  display: block;
  width: 100%;
  padding: 0.85rem 1.25rem;
  border-radius: 999px;
  border: 1px solid var(--primary);
  background: var(--primary);
  color: var(--primary-ink);
  font: inherit;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { filter: brightness(1.08); }
.btn--ghost { background: transparent; color: var(--primary); }

.note { color: var(--muted); font-size: 0.9rem; margin-top: 1.25rem; }
.note strong { color: var(--text); }

.qr {
  background: #fff;
  border: 1px solid var(--divider);
  border-radius: 0.9rem;
  padding: 1rem;
  margin: 1.5rem auto;
  width: fit-content;
  line-height: 0;
}
.qr svg { width: min(17rem, 70vw); height: auto; }

.link {
  font-family: var(--mono);
  font-size: 0.8rem;
  background: var(--surface-2);
  border-radius: 0.7rem;
  padding: 0.75rem 0.9rem;
  overflow-wrap: anywhere;
  color: var(--muted);
  margin: 1rem 0;
}

label { display: block; font-weight: 600; font-size: 0.95rem; margin-bottom: 0.35rem; }
input[type="text"], textarea {
  width: 100%;
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: 0.7rem;
  padding: 0.7rem 0.85rem;
  margin-bottom: 1.1rem;
}
textarea { min-height: 10rem; resize: vertical; line-height: 1.5; }
input:focus-visible, textarea:focus-visible, .btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.problem {
  background: var(--surface);
  border: 1px solid var(--divider);
  border-left: 3px solid var(--coral);
  border-radius: 0.7rem;
  padding: 1rem 1.1rem;
  margin: 1.5rem 0;
}

footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--divider);
  color: var(--muted);
  font-size: 0.88rem;
}
footer a { color: var(--primary); }

[hidden] { display: none !important; }
