/* Scrabble dictionary search page - styles.
 *
 * Extracted from index.html's old inline <style> block, and switched onto the shared,
 * project-wide design tokens (shared/web/styles/tokens.css) as part of the single-PWA work
 * (plans/project-wide-pwa.md, decision 4) - this page's old blue/neutral palette is retired in
 * favor of the green/cream one the rest of the project now shares. Written directly against the
 * shared tokens' own names (--text, --text-muted, --surface, ...) rather than through a local
 * alias layer: unlike scrabble-game/web/css/base.css (three files' worth of prior --fg/--card
 * usage to preserve), this page is small enough that rewriting its own few rules directly was
 * cheaper and less error-prone than adding an indirection layer just to keep old names alive.
 */
@import url("/shared/styles/tokens.css");

* { box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  max-width: 640px;
  margin: 0 auto;
  padding: 1.5rem 1rem 4rem;
}
h1 { font-size: 1.3rem; margin-bottom: 0.25rem; }
.sub { color: var(--text-muted); margin-top: 0; margin-bottom: 1.5rem; font-size: 0.9rem; }
.sub a { color: var(--accent); }
/* flex-wrap: the language picker (added for multi-language support,
   2026-08-25) is a third item on this row, sized to its longest option's
   text ("Norwegian Bokmål") - on a narrow phone that plus the input and
   button no longer fit on one line. Wrapping, rather than shrinking
   everything to illegibility, matches this project's existing mobile-first
   idiom (scrabble-game's own #actions bar wraps for the same reason). */
form { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.5rem; }
input[type="text"] {
  flex: 1 1 auto;
  min-width: 8rem;
  font-size: 1.1rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  text-transform: uppercase;
}
#lang {
  flex: 1 1 auto;
  min-width: 0;
  font: inherit;
  font-size: 0.95rem;
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
}
button {
  font-size: 1rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: var(--accent);
  color: var(--accent-contrast);
  cursor: pointer;
}
.status { color: var(--text-muted); margin-bottom: 1rem; }
.lexeme {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 8px;
  padding: 0.9rem 1rem;
  margin-bottom: 1rem;
}
.lexeme h2 { margin: 0 0 0.15rem; font-size: 1.15rem; }
.pos {
  display: inline-block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--accent);
  margin-bottom: 0.4rem;
}
.definition { margin: 0.4rem 0; }
.definition.missing { color: var(--text-muted); font-style: italic; }
.source { margin: 0; font-size: 0.75rem; color: var(--text-muted); }
.forms { margin-top: 0.6rem; }
.forms summary { cursor: pointer; color: var(--text-muted); font-size: 0.9rem; }
.form-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.15rem 0;
  font-size: 0.9rem;
  border-bottom: 1px dashed var(--border);
}
.form-row .w { font-weight: 600; }
.form-row .tags { color: var(--text-muted); text-align: right; }
.this-word .w { color: var(--accent); }
