/* Emojie.se – calm, fast, accessible. No web fonts = faster load. */
:root {
  --bg: #F7F8FB;
  --surface: #FFFFFF;
  --ink: #17202B;
  --ink-soft: #46525F;
  --line: #D0D6E0;
  --sun: #FFC83D;      /* signature emoji-yellow */
  --sun-soft: #FFF3D1;
  --sun-bold: #F0B820;
  --link: #1D4ED8;
  --focus: #1D4ED8;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(23, 32, 43, .06), 0 8px 24px rgba(23, 32, 43, .05);
  --shadow-hard: 3px 3px 0 rgba(23, 32, 43, .12);
  font-size: 100%;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
}
body.noto .glyph, body.noto .glyph-sm, body.noto .big-glyph, body.noto .copy-cta {
  font-family: "Noto Color Emoji", system-ui, sans-serif;
}
.wrap { max-width: 68rem; margin: 0 auto; padding: 0 1rem; }
a { color: var(--link); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
kbd {
  border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px;
  padding: 0 .35em; font-size: .85em; background: var(--surface);
}

/* Accessibility */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}
.skip-link {
  position: absolute; left: 1rem; top: -3rem; z-index: 10;
  background: var(--ink); color: #fff; padding: .5rem 1rem;
  border-radius: 0 0 8px 8px; transition: top .15s;
}
.skip-link:focus { top: 0; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }

/* Header */
.site-header { background: var(--surface); border-bottom: 1.5px solid var(--line); box-shadow: var(--shadow-hard); }
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding-top: .8rem; padding-bottom: .8rem;
}
.logo {
  font-weight: 800; font-size: 1.5rem; letter-spacing: -.02em;
  color: var(--ink); text-decoration: none; display: inline-flex; align-items: baseline; gap: .05em;
}
.logo-dot { font-size: .9em; transform: translateY(.06em); }
.logo-tld { color: var(--ink-soft); font-weight: 600; font-size: .8em; }
.header-tools { display: flex; align-items: center; gap: .5rem; }
.platform-label { font-size: .85rem; color: var(--ink-soft); }
#platform {
  font: inherit; font-size: .9rem; padding: .35rem .5rem;
  border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink);
}
.cat-nav { border-top: 1px solid var(--line); overflow-x: auto; }
.cat-nav ul {
  display: flex; gap: .25rem; list-style: none; margin: 0; padding: .5rem 0;
  white-space: nowrap;
}
.cat-nav a {
  display: inline-block; padding: .35rem .7rem; border-radius: 8px;
  color: var(--ink); text-decoration: none; font-size: .92rem;
  border: 1.5px solid transparent;
}
.cat-nav a:hover { background: var(--sun-soft); border-color: var(--line); }
.cat-nav a[aria-current="page"] { background: var(--sun); font-weight: 600; border-color: var(--sun-bold); box-shadow: var(--shadow-hard); }

/* Hero */
.hero { background: linear-gradient(180deg, var(--surface), var(--bg)); padding: 2.5rem 0 1.5rem; border-bottom: 3px solid var(--sun); }
.hero-sub { padding-top: 1.5rem; }
h1 { font-size: clamp(1.7rem, 4vw, 2.5rem); letter-spacing: -.02em; line-height: 1.15; margin: 0 0 .5rem; }
.lead { color: var(--ink-soft); max-width: 46rem; margin: 0 0 1.25rem; }
.crumbs { font-size: .88rem; color: var(--ink-soft); margin-bottom: .75rem; }
.crumbs a { color: var(--ink-soft); }

/* Search – signature element */
.search-wrap { max-width: 34rem; }
#sok {
  width: 100%; font: inherit; font-size: 1.05rem;
  padding: .85rem 1.25rem; border-radius: 999px;
  border: 2px solid var(--ink); background: var(--surface);
  box-shadow: 4px 4px 0 var(--sun);
}
#sok:focus-visible { outline-offset: 4px; }
.sok-status { min-height: 1.4em; font-size: .9rem; color: var(--ink-soft); margin: .4rem 0 0; }

/* Grid */
h2 { font-size: 1.25rem; letter-spacing: -.01em; margin: 2rem 0 .75rem; border-left: 4px solid var(--sun); padding-left: .6rem; }
.cat-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.cat-link { font-size: .9rem; white-space: nowrap; }
.grid { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .5rem; }
.grid-compact { grid-template-columns: repeat(auto-fill, minmax(3.4rem, 1fr)); }
.grid-named { grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr)); }
.copy {
  width: 100%; font: inherit; cursor: pointer;
  background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius);
  padding: .5rem .25rem; display: flex; flex-direction: column; align-items: center; gap: .3rem;
  transition: transform .08s ease, box-shadow .08s ease, border-color .08s ease, background .08s ease;
}
.copy:hover { border-color: var(--ink); background: var(--sun-soft); box-shadow: var(--shadow-hard); transform: translateY(-2px); }
.copy:active { transform: scale(.94); }
.copy.copied { background: var(--sun); border-color: var(--ink); box-shadow: var(--shadow-hard); }
.glyph { font-size: 1.8rem; line-height: 1.2; }
.glyph-sm { font-size: 1.2rem; }
.glyph-name { font-size: .78rem; color: var(--ink-soft); line-height: 1.25; text-align: center; }
li[hidden] { display: none; }

/* Meaning/definition pages */
.meaning { padding: 2rem 0 1rem; max-width: 46rem; }
.big-glyph { font-size: 1.2em; margin-right: .15em; }
.copy-cta {
  flex-direction: row; width: auto; display: inline-flex; gap: .5rem;
  font-size: 1.05rem; font-weight: 600; padding: .6rem 1.2rem;
  background: var(--sun); border-color: var(--sun);
}
.copy-cta:hover { background: #ffd86b; }
.examples { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1rem 1rem 2.25rem; }
.examples li { margin: .25rem 0; }
.related, .meaning-list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.related a, .meaning-list a {
  display: inline-block; background: var(--surface); border: 1px solid var(--line);
  border-radius: 999px; padding: .4rem .9rem; text-decoration: none; color: var(--ink);
}
.related a:hover, .meaning-list a:hover { border-color: var(--sun); background: var(--sun-soft); }

/* SEO text & footer */
.seo-text { max-width: 46rem; color: var(--ink-soft); padding-bottom: 1rem; }
.seo-text h2 { color: var(--ink); }
.site-footer {
  border-top: 4px solid var(--sun); background: var(--surface);
  margin-top: 3rem; padding: 1.5rem 0 2rem; font-size: .9rem; color: var(--ink-soft);
}
.footer-cats { line-height: 2; }

/* Toast (copy confirmation) */
.toast {
  position: fixed; left: 50%; bottom: 1.25rem; transform: translate(-50%, .5rem);
  background: var(--ink); color: #fff; padding: .6rem 1.1rem; border-radius: 10px;
  font-size: .95rem; opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s;
  box-shadow: 4px 4px 0 var(--sun);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}
@media (max-width: 40rem) {
  .glyph { font-size: 1.6rem; }
  .header-inner { flex-wrap: wrap; }
}

/* --- Annonser (T8/D2) --- */
.ad-slot {
  min-height: 100px; background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--radius); display: flex; align-items: center;
  justify-content: center; margin: 1.5rem auto; max-width: 46rem;
}
.ad-slot[hidden] { display: none; }
.ad-placeholder { color: var(--ink-soft); font-size: .8rem; }

/* --- Cookiebanner (T8/D5) --- */
.cookie-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  background: var(--surface); border-top: 2px solid var(--ink);
  padding: .75rem 1rem; display: flex; gap: 1rem; align-items: center;
  justify-content: center; flex-wrap: wrap; font-size: .92rem;
}
.cookie-banner p { margin: 0; }
.cookie-banner button {
  font: inherit; font-weight: 600; cursor: pointer;
  background: var(--sun); border: 1.5px solid var(--ink);
  border-radius: 999px; padding: .4rem 1.1rem;
}

/* --- /e/-sidor --- */
.e-link { text-decoration: none; }
