
:root {
  --yellow: #f4c300;
  --blue: #0d47a1;
  --red: #c62828;
  --ink: #132238;
  --muted: #5f6f82;
  --card: #ffffff;
  --line: #e6ebf2;
  --shadow: 0 16px 40px rgba(15, 35, 70, 0.08);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, Arial, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(244,195,0,0.16), transparent 28%),
    radial-gradient(circle at top right, rgba(13,71,161,0.12), transparent 24%),
    linear-gradient(180deg, #fffef9 0%, #f7f9fc 100%);
}
a { color: inherit; text-decoration: none; }
.wrap { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.hero { padding: 72px 0 40px; }
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 32px; align-items: center; }
.pill { display: inline-block; padding: 8px 14px; border-radius: 999px; background: rgba(13,71,161,0.1); color: var(--blue); font-weight: 700; margin-bottom: 12px; }
h1 { margin: 0 0 14px; font-size: clamp(2.6rem, 5vw, 4.4rem); line-height: 0.96; }
.lead { margin: 0; max-width: 62ch; font-size: 1.06rem; line-height: 1.72; color: var(--muted); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.button { padding: 13px 18px; border-radius: 14px; font-weight: 700; box-shadow: var(--shadow); }
.button.primary { background: linear-gradient(135deg, var(--yellow), #ffd84f); }
.button.secondary { background: white; border: 1px solid var(--line); }
.hero-stats { display: flex; gap: 14px; margin-top: 20px; flex-wrap: wrap; }
.hero-stats div { background: rgba(255,255,255,0.82); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; min-width: 130px; box-shadow: var(--shadow); }
.hero-stats strong { display: block; font-size: 1.2rem; }
.hero-stats span { color: var(--muted); font-size: 0.92rem; }
.flag-card { position: relative; height: 320px; border-radius: 32px; overflow: hidden; border: 1px solid rgba(19,34,56,0.08); background: linear-gradient(180deg, #e8c33d 0 34%, #264ea8 34% 67%, #c1392f 67% 100%); box-shadow: 0 28px 70px rgba(13,32,74,0.18); }
.band { display: none; }
.flag-card::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 18% 14%, rgba(255,255,255,0.28), transparent 26%), radial-gradient(circle at 82% 82%, rgba(255,255,255,0.08), transparent 22%); pointer-events: none; }
.flag-card::after { content: ""; position: absolute; top: -8%; right: -6%; width: 42%; height: 132%; transform: rotate(12deg); background: linear-gradient(180deg, rgba(255,255,255,0.20), rgba(255,255,255,0.03)); pointer-events: none; }
.stars { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); display: flex; flex-wrap: nowrap; align-items: center; justify-content: center; gap: 14px; width: auto; white-space: nowrap; line-height: 1; text-shadow: 0 2px 10px rgba(255,255,255,0.18); }
.stars span { display: inline-block; font-size: 1.18rem; }
.section-title { text-align: center; margin: 12px auto 28px; max-width: 72ch; }
.section-title.compact { margin-bottom: 18px; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.78rem; font-weight: 800; color: var(--red); }
.section-title h2, .about-box h2 { margin: 10px 0 12px; font-size: clamp(1.9rem, 3vw, 2.8rem); }
.section-title p, .about-box p { margin: 0; color: var(--muted); line-height: 1.7; }
.dictionary-tools { display: grid; gap: 18px; margin-bottom: 26px; }
.search-box { background: rgba(255,255,255,0.88); border: 1px solid var(--line); border-radius: 22px; padding: 18px; box-shadow: var(--shadow); }
.search-box label { display: block; font-weight: 700; margin-bottom: 10px; }
.search-box input { width: 100%; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); font: inherit; }
.alphabet-bar { position: sticky; top: 12px; z-index: 5; display: flex; flex-wrap: wrap; gap: 10px; padding: 14px; border-radius: 18px; background: rgba(255,255,255,0.9); border: 1px solid var(--line); box-shadow: var(--shadow); backdrop-filter: blur(10px); }
.alpha-link { min-width: 42px; height: 42px; padding: 0 10px; display: inline-flex; gap: 6px; align-items: center; justify-content: center; border-radius: 12px; background: #f2f5fa; color: #8a96a8; font-weight: 800; font-size: 0.94rem; }
.alpha-link span { font-size: 0.72rem; opacity: 0.75; }
.alpha-link.has-items { background: rgba(13,71,161,0.08); color: var(--blue); }
.dictionary-sections { display: grid; gap: 22px; padding-bottom: 22px; }
.letter-section { background: rgba(255,255,255,0.76); border: 1px solid var(--line); border-radius: 26px; padding: 22px; box-shadow: var(--shadow); scroll-margin-top: 84px; }
.letter-heading { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.letter-heading h2 { margin: 0; font-size: 1.8rem; }
.letter-heading p { margin: 4px 0 0; color: var(--muted); }
.letter-badge { width: 46px; height: 46px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--yellow), #ffe48c); font-weight: 800; }
.entries-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.entry-card { background: white; border: 1px solid var(--line); border-radius: 18px; padding: 18px; scroll-margin-top: 96px; }
.entry-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 8px; }
.entry-card h3 { margin: 0; font-size: 1.05rem; }
.entry-anchor { flex: 0 0 auto; width: 32px; height: 32px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: rgba(13,71,161,0.08); color: var(--blue); font-weight: 800; }
.entry-meaning { margin: 0 0 8px; color: var(--ink); line-height: 1.6; }
.entry-example { margin: 0; color: var(--muted); line-height: 1.6; }
.empty-letter { margin: 0; color: var(--muted); }
.about { padding: 18px 0 64px; }
.about-box { background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(255,255,255,0.96)); border: 1px solid var(--line); border-radius: 26px; padding: 28px; box-shadow: var(--shadow); }
.footer { border-top: 1px solid rgba(19,34,56,0.08); background: rgba(255,255,255,0.72); }
.footer-inner { display: flex; justify-content: space-between; gap: 18px; padding: 20px 0; color: var(--muted); font-size: 0.96rem; }
@media (max-width: 920px) { .hero-grid, .entries-grid { grid-template-columns: 1fr; } .flag-card { height: 240px; } }
@media (max-width: 640px) { .hero { padding-top: 48px; } .alphabet-bar { gap: 8px; } .alpha-link { min-width: 36px; height: 36px; padding: 0 8px; } .footer-inner { flex-direction: column; align-items: flex-start; } }


.entry-card.is-target {
  border-color: rgba(13,71,161,0.35);
  box-shadow: 0 0 0 4px rgba(13,71,161,0.08), 0 18px 36px rgba(13,32,74,0.10);
  transform: translateY(-1px);
}
.entry-anchor {
  transition: transform 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}
.entry-anchor:hover {
  transform: translateY(-1px);
  background: rgba(13,71,161,0.14);
}
.entry-anchor.copied {
  background: rgba(32, 153, 82, 0.14);
  color: #1f7a45;
}


.entry-card:target,
.entry-card.is-target {
  border-color: rgba(13,71,161,0.55);
  background: linear-gradient(180deg, rgba(13,71,161,0.08), rgba(255,255,255,1));
  box-shadow: 0 0 0 5px rgba(13,71,161,0.14), 0 18px 36px rgba(13,32,74,0.12);
}
.entry-card:target .entry-anchor,
.entry-card.is-target .entry-anchor {
  background: rgba(13,71,161,0.20);
  color: var(--blue);
}


.entry-anchor {
  font-size: 0.98rem;
  line-height: 1;
}


.inline-ref {
  color: var(--blue);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 2px;
}
.inline-ref:hover {
  color: #0a3a84;
}


.loading-state {
  color: var(--muted);
  font-size: 1rem;
}
.about-box code {
  background: rgba(13,71,161,0.08);
  padding: 2px 8px;
  border-radius: 8px;
  color: var(--blue);
}


.legal-page {
  padding: 42px 0 64px;
}
.legal-back {
  display: inline-block;
  margin-bottom: 18px;
  color: var(--blue);
  font-weight: 700;
}
.legal-card {
  background: rgba(255,255,255,0.92);
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 28px;
  box-shadow: var(--shadow);
}
.legal-card h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1;
  margin: 8px 0 18px;
}
.legal-card h2 {
  margin: 26px 0 10px;
  font-size: 1.15rem;
}
.legal-card p {
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.75;
}
.footer-links {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.footer-links a {
  color: var(--blue);
  font-weight: 700;
}
