/* style.css — refreshed readability & link design
   Dark/light aware, accessibility improved
*/

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans:wght@400;600;700&display=swap');

/* Light/Dark via prefers-color-scheme and [data-theme] override */

:root{
  --bg: #0e1015;
  --panel: #151923;
  --ink: #f0f2f7;
  --muted: #9aa3b2;
  --accent: #6ee7d1;
  --accent-2: #9b8cff;
  --bad: #ff6b6b;
  --good: #67d77e;
  --medium: #d4b849;
  --grid-gap: clamp(14px, 2.5vw, 22px);
  --radius: 14px;
}

@media (prefers-color-scheme: light){
  :root{
    --bg: #f6f7fb;
    --panel: #ffffff;
    --ink: #0c1220;
    --muted: #5d6678;
    --accent: #0f766e;
    --accent-2: #4b3dd8;
    --bad: #d14242;
    --good: #1e8641;
    --medium: #b7950b;
  }
}

html[data-theme="dark"]{
  --bg: #0e1015;
  --panel: #151923;
  --ink: #f0f2f7;
  --muted: #9aa3b2;
  --accent: #6ee7d1;
  --accent-2: #9b8cff;
}
html[data-theme="light"]{
  --bg: #f6f7fb;
  --panel: #ffffff;
  --ink: #0c1220;
  --muted: #5d6678;
  --accent: #0f766e;
  --accent-2: #4b3dd8;
}

*{box-sizing:border-box}
html, body{height:100%}
body{
  margin:0;
  font-family: "Noto Sans", Verdana, Geneva, sans-serif;
  font-weight: 400;
  color:var(--ink);
  background: var(--bg);
  line-height:1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap{
  max-width: 1100px;
  margin: 0 auto;
  padding: clamp(18px,2.5vw,28px);
}

header{
  display:block;
  margin-bottom: clamp(18px,3.5vw,36px);
}

h1{
  margin:0 0 .3rem;
  font-size: clamp(26px, 3.2vw, 40px);
  letter-spacing:.2px;
}

.tagline{
  color:var(--muted);
  max-width: 70ch;
  font-size: clamp(14px, 1.5vw, 16px);
  font-weight: 400;
}

.toolbar{
  display:flex;
  gap:10px;
  align-items:center;
  justify-content: flex-end;
  margin-top: 10px;
}

.lang-switcher a {
  margin: 0 5px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
}

.lang-switcher a.active {
  color: var(--ink);
}

.pill{
  border:1px solid color-mix(in oklab, var(--panel), var(--ink) 20%);
  background: color-mix(in oklab, var(--panel), var(--ink) 5%);
  padding:10px 14px;
  border-radius:999px;
  color:var(--muted);
  font-weight:600;
  font-size:12px;
  letter-spacing:.4px;
  text-transform:uppercase;
  display:inline-flex;
  gap:10px;
  align-items:center;
}

.theme-toggle{
  display:inline-flex; gap:8px; align-items:center;
  font-size: 13px; color: var(--muted);
  border:1px solid color-mix(in oklab, var(--panel), var(--ink) 20%);
  background: color-mix(in oklab, var(--panel), var(--ink) 5%);
  padding: 6px 10px; border-radius: 10px;
  cursor: pointer; user-select:none;
}

.panel{
  background: color-mix(in oklab, var(--panel), black 0%);
  border:1px solid color-mix(in oklab, var(--panel), var(--ink) 20%);
  border-radius: var(--radius);
  padding: clamp(16px, 2.3vw, 22px);
  box-shadow: 0 10px 30px color-mix(in oklab, black, var(--panel) 70%);
  margin-bottom: var(--grid-gap);
}

h2,h3,h4{margin:.3rem 0 .8rem}
h2{font-size: clamp(18px, 2.2vw, 22px)}
h3{font-size: clamp(16px, 1.9vw, 18px); color: var(--muted)}
h4{font-size: 15px; color: var(--ink)}

p{
  margin:.4rem 0 1rem;
  font-weight: 400;
  max-width: 70ch;
}

ul{margin:.4rem 0 .8rem 1.1rem}
.note{color:var(--muted); font-size:14px}

/* Hyperlinks */
a {
  color: var(--accent-2);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in oklab, var(--accent-2), var(--ink) 40%);
  transition: color 0.2s ease, border-color 0.2s ease;
}

a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

a:visited {
  color: color-mix(in oklab, var(--accent-2), var(--muted) 40%);
}

/* Chips & Scales */
.chips-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  margin-top: 4px;
}
.chip-slot {
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  min-height: 1em;
}

.scale{
  margin-top:1rem;
  display:grid;
  grid-template-columns: auto 1fr auto;
  align-items:center;
  gap:8px;
}
.scale-label{font-size:12px; color:var(--muted)}
.bar{
  position:relative;
  height:10px;
  background: linear-gradient(90deg, var(--good), var(--medium), var(--bad));
  border-radius:999px;
  opacity:.9;
}
.ticks{display:flex; justify-content:space-between; margin-top:6px}
.tick{ width:2px; height:8px; background:color-mix(in oklab, var(--panel), var(--ink) 25%); border-radius:2px }

.caption{font-size:13px; color:var(--muted); margin-top:.3rem; margin-bottom:.8rem}

/* Image grid */
.thumbs{
  display:grid;
  grid-template-columns: repeat(7, 1fr);
  gap:8px;
  margin-top:10px
}
.thumb{
  aspect-ratio:1;
  border-radius:10px;
  border:1px dashed color-mix(in oklab, var(--panel), var(--ink) 20%);
  background: repeating-linear-gradient(45deg, color-mix(in oklab, var(--panel), var(--ink) 2%) 0 10px, color-mix(in oklab, var(--panel), var(--ink) 5%) 10px 20px);
  display:grid; place-items:center; color:var(--muted); font-size:12px;
  overflow: hidden;
}
.thumb img{
  width:100%; height:100%; object-fit:cover; display:block;
}

/* Footer */
footer{margin-top:32px; color:var(--muted); font-size:12px}
footer a,
footer a:hover,
footer a:visited,
footer a:link,
footer a:active {
  color: var(--muted);
  text-decoration: none;
}

footer .brand {
  font-family: 'Raleway', sans-serif;
  font-weight: 500;
  font-size: 2em;
  color: var(--ink);
  letter-spacing: .5px;
}

footer .brand b {
  font-weight: 700;
}

/* Accessibility skip link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--accent);
  color: white;
  padding: 8px 12px;
  border-radius: 0 0 6px 6px;
  z-index: 100;
  transition: top 0.2s;
}
.skip-link:focus {
  top: 0;
}
