/* Five Letter Solver — production stylesheet */

:root {
  --ink: #1b1a2e;
  --ink-soft: #58567a;
  --paper: #fbf7f2;
  --card: #ffffff;
  --line: #f0e4d3;
  --accent-c: #e08a1e;
  --accent-dark: #b3690f;
  --accent-tint: #fdf0dd;
  --gray-tile: #787c7e;
  --yellow-tile: #c9b458;
  --green-tile: #6aaa64;
  --shadow: 0 1px 2px rgba(27, 26, 46, 0.05), 0 8px 24px -12px rgba(27, 26, 46, 0.16);
  --radius: 14px;
  --radius-sm: 9px;
  --font-display: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }
body {
  margin: 0; font-family: var(--font-body); color: var(--ink); background: var(--paper);
  -webkit-font-smoothing: antialiased; line-height: 1.55;
}
h1, h2, h3 { font-family: var(--font-display); color: var(--ink); margin: 0 0 0.5em; line-height: 1.15; }
p { margin: 0 0 1em; color: var(--ink-soft); }
a { color: var(--accent-dark); }
:focus-visible { outline: 3px solid var(--accent-c); outline-offset: 2px; }
.container { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

.site-header { background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.header-inner { display: flex; align-items: center; padding: 14px 20px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 9px; background: var(--accent-c);
  color: #fff; font-family: var(--font-display); font-weight: 800; font-size: 17px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 18px; color: var(--ink); }
.accent { color: var(--accent-dark); }

.hero { padding: 40px 0 24px; text-align: center; }
.hero-inner { max-width: 720px; margin: 0 auto; }
.hero-title { font-size: clamp(28px, 5vw, 42px); font-weight: 800; letter-spacing: -0.01em; }
.hero-sub { font-size: 17px; max-width: 560px; margin: 0 auto 28px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.form-card { max-width: 560px; margin: 0 auto; }

.letter-boxes { display: flex; justify-content: center; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.letter-box { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.letter-box-input {
  width: 52px; height: 52px; text-align: center; font-family: var(--font-mono); font-size: 24px;
  font-weight: 700; text-transform: uppercase; border: 2px solid var(--line); border-radius: 10px;
  background: var(--paper); color: var(--ink);
}
.letter-box-input:focus { border-color: var(--accent-c); outline: none; }
.letter-box.state-gray .letter-box-input { background: var(--gray-tile); border-color: var(--gray-tile); color: #fff; }
.letter-box.state-yellow .letter-box-input { background: var(--yellow-tile); border-color: var(--yellow-tile); color: #fff; }
.letter-box.state-green .letter-box-input { background: var(--green-tile); border-color: var(--green-tile); color: #fff; }
.letter-box-cycle {
  font-size: 11px; font-weight: 700; padding: 4px 8px; border-radius: 999px; border: 1.5px solid var(--line);
  background: var(--paper); color: var(--ink-soft); cursor: pointer; min-width: 60px;
}
.letter-box-cycle:disabled { opacity: 0.4; cursor: default; }
.letter-box.state-gray .letter-box-cycle { background: var(--gray-tile); border-color: var(--gray-tile); color: #fff; }
.letter-box.state-yellow .letter-box-cycle { background: var(--yellow-tile); border-color: var(--yellow-tile); color: #fff; }
.letter-box.state-green .letter-box-cycle { background: var(--green-tile); border-color: var(--green-tile); color: #fff; }

.btn-row { display: flex; gap: 10px; margin-top: 6px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-display); font-weight: 700; font-size: 15px;
  padding: 12px 20px; border-radius: var(--radius-sm); border: none; cursor: pointer;
}
.btn-primary { background: var(--accent-c); color: #fff; flex: 1 1 auto; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-secondary { background: var(--accent-tint); color: var(--accent-dark); }
.btn-icon { width: 17px; height: 17px; }

.status { text-align: center; font-size: 14px; color: var(--ink-soft); min-height: 20px; margin: 10px 0; }

.keyboard { max-width: 480px; margin: 16px auto; }
.key-row { display: flex; justify-content: center; gap: 5px; margin-bottom: 6px; }
.key {
  display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 38px;
  border-radius: 6px; background: var(--line); color: var(--ink); font-size: 13px; font-weight: 700;
}
.key-gray { background: var(--gray-tile); color: #fff; }
.key-yellow { background: var(--yellow-tile); color: #fff; }
.key-green { background: var(--green-tile); color: #fff; }

.results { margin-top: 8px; max-width: 700px; margin-left: auto; margin-right: auto; }
.results-summary { text-align: center; margin: 18px 0 14px; }
.results-summary h2 { font-size: 20px; margin: 0; }
.empty { text-align: center; padding: 30px 0; color: var(--ink-soft); }
.empty .big { font-size: 18px; font-weight: 700; color: var(--ink); }
.word-wrap { text-align: center; line-height: 2.4; }
.word-chip {
  display: inline-block; margin: 4px; font-family: var(--font-mono); font-size: 13.5px; font-weight: 600;
  color: var(--accent-dark); background: var(--accent-tint); padding: 5px 10px; border-radius: 7px;
  text-decoration: none;
}
.word-chip:hover { background: var(--accent-c); color: #fff; }
.chart-note { color: var(--ink-soft); font-size: 13px; }

.seo { padding: 34px 0; }
.seo-heading { font-size: clamp(22px, 3.6vw, 28px); text-align: center; margin-bottom: 22px; }
.seo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.seo-card h3 { font-size: 16px; }
.seo-card p { font-size: 14.5px; margin-bottom: 0.7em; }
.seo-card strong { color: var(--ink); }

.site-footer { border-top: 1px solid var(--line); padding: 24px 0 40px; margin-top: 20px; }
.site-footer p { text-align: center; font-size: 13px; color: var(--ink-soft); margin: 0; }
.site-footer a { color: var(--ink-soft); text-decoration: underline; }

@media (max-width: 480px) {
  .letter-box-input { width: 44px; height: 44px; font-size: 20px; }
  .header-inner { padding: 12px 16px; }
  .hero { padding: 28px 0 18px; }
}
