/* ===== Hitta din hundras — gemensam stilmall ===== */
:root {
  --bg: #fdfaf5;
  --bg-card: #ffffff;
  --text: #2b2620;
  --text-soft: #6b6156;
  --accent: #c98a2b;
  --accent-dark: #a06a1a;
  --accent-soft: #f7ecd9;
  --green: #4a7c59;
  --amber: #c98a2b;
  --red: #b05548;
  --border: #eadfce;
  --shadow: 0 2px 12px rgba(80, 60, 20, 0.08);
  --radius: 14px;
  --maxw: 1080px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
}

img { max-width: 100%; display: block; }

a { color: var(--accent-dark); }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ---- Header ---- */
header.site {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}
header.site .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
}
.logo {
  font-size: 1.25rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.logo span.paw { font-size: 1.4rem; }
nav.main a {
  text-decoration: none;
  color: var(--text-soft);
  margin-left: 22px;
  font-weight: 600;
  font-size: 0.95rem;
}
nav.main a:hover { color: var(--accent-dark); }

/* ---- Hero ---- */
.hero {
  position: relative;
  overflow: hidden;
}
.hero img.bg {
  width: 100%;
  height: 440px;
  object-fit: cover;
}
.hero .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20,14,4,0.15) 0%, rgba(20,14,4,0.65) 100%);
  display: flex;
  align-items: flex-end;
}
.hero .overlay .wrap { padding-bottom: 42px; width: 100%; }
.hero h1 {
  color: #fff;
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.15;
  text-shadow: 0 2px 12px rgba(0,0,0,0.4);
}
.hero p.sub {
  color: #f3e9d8;
  font-size: 1.15rem;
  max-width: 640px;
  margin-top: 10px;
  text-shadow: 0 1px 8px rgba(0,0,0,0.5);
}
.hero .cta {
  display: inline-block;
  margin-top: 18px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  padding: 12px 26px;
  border-radius: 999px;
  box-shadow: var(--shadow);
}
.hero .cta:hover { background: var(--accent-dark); }

/* ---- Sections ---- */
section.block { padding: 56px 0; }
section.block.alt { background: var(--accent-soft); }
h2.section {
  font-size: 1.7rem;
  margin-bottom: 8px;
}
p.section-intro { color: var(--text-soft); max-width: 700px; margin-bottom: 28px; }

/* ---- Fakta-grid ---- */
.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
}
.fact {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}
.fact .label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-soft);
  font-weight: 700;
}
.fact .value { font-size: 1.05rem; font-weight: 700; margin-top: 2px; }
.fact .note { font-size: 0.85rem; color: var(--text-soft); }

/* ---- Betygsstaplar (egenskaper) ---- */
.traits { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px 36px; }
.trait .head { display: flex; justify-content: space-between; font-weight: 600; font-size: 0.95rem; }
.trait .head .lvl { color: var(--text-soft); font-weight: 500; font-size: 0.85rem; }
.trait .bar {
  height: 10px;
  background: #eee4d2;
  border-radius: 999px;
  margin-top: 6px;
  overflow: hidden;
}
.trait .bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #e0a94e, var(--accent-dark));
  border-radius: 999px;
}

/* ---- Tvåspalt text + bild ---- */
.split {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 36px;
  align-items: center;
  margin-top: 30px;
}
.split.rev { grid-template-columns: 1fr 1.15fr; }
.split figure {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  position: relative;
}
.split figure img { width: 100%; height: 320px; object-fit: cover; }
.split h3 { font-size: 1.25rem; margin-bottom: 8px; }
.split p + p { margin-top: 12px; }
@media (max-width: 760px) {
  .split, .split.rev { grid-template-columns: 1fr; }
}

/* ---- Bildtext/attribution ---- */
figcaption.credit, .credit {
  font-size: 0.72rem;
  color: var(--text-soft);
  padding: 4px 8px;
}
figure .credit {
  position: absolute;
  bottom: 0;
  right: 0;
  background: rgba(255,255,255,0.82);
  border-top-left-radius: 8px;
}
.credit a { color: var(--text-soft); }

/* ---- Plus/minus-listor ---- */
.pmgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 20px; }
@media (max-width: 700px) { .pmgrid { grid-template-columns: 1fr; } }
.pmcard {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}
.pmcard h3 { font-size: 1.1rem; margin-bottom: 12px; }
.pmcard ul { list-style: none; }
.pmcard li {
  padding: 7px 0 7px 30px;
  position: relative;
  font-size: 0.96rem;
}
.pmcard li::before {
  position: absolute;
  left: 0;
  top: 7px;
  font-weight: 700;
}
.pmcard.plus li::before { content: "✓"; color: var(--green); }
.pmcard.minus li::before { content: "✗"; color: var(--red); }

/* ---- Forumröster ---- */
.voices { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; margin-top: 24px; }
.voice {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
  font-size: 0.95rem;
}
.voice .who {
  margin-top: 10px;
  font-size: 0.8rem;
  color: var(--text-soft);
  font-weight: 600;
}

/* ---- Myter ---- */
.myths { margin-top: 20px; display: grid; gap: 14px; }
.myth {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 22px;
  box-shadow: var(--shadow);
}
.myth .m { font-weight: 700; color: var(--red); }
.myth .s { font-weight: 700; color: var(--green); }

/* ---- Quiz ---- */
.quiz {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 30px;
  margin-top: 24px;
}
.q { margin-bottom: 26px; }
.q .qt { font-weight: 700; margin-bottom: 10px; }
.q .opts { display: flex; flex-wrap: wrap; gap: 10px; }
.q label {
  border: 2px solid var(--border);
  border-radius: 999px;
  padding: 8px 18px;
  cursor: pointer;
  font-size: 0.93rem;
  user-select: none;
  transition: all 0.15s;
  background: var(--bg);
}
.q label:hover { border-color: var(--accent); }
.q input { display: none; }
.q input:checked + span { font-weight: 700; }
.q label:has(input:checked) {
  background: var(--accent-soft);
  border-color: var(--accent);
}
.quiz button {
  background: var(--accent);
  border: none;
  color: #fff;
  font-size: 1.05rem;
  font-weight: 700;
  padding: 13px 34px;
  border-radius: 999px;
  cursor: pointer;
}
.quiz button:hover { background: var(--accent-dark); }
.quiz button:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---- Quizresultat ---- */
#result { margin-top: 28px; display: none; }
#result.show { display: block; animation: fadein 0.4s; }
@keyframes fadein { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; } }
.meter {
  height: 22px;
  border-radius: 999px;
  background: #eee4d2;
  overflow: hidden;
  margin: 14px 0 6px;
}
.meter i {
  display: block;
  height: 100%;
  border-radius: 999px;
  transition: width 0.8s ease;
  background: linear-gradient(90deg, #e0a94e, var(--accent-dark));
}
#result h3 { font-size: 1.35rem; }
#result .pct { font-weight: 800; font-size: 1.6rem; }
#result .verdict { font-size: 1.05rem; margin-top: 8px; }
#result ul.notes { margin: 14px 0 0 20px; }
#result ul.notes li { margin-bottom: 8px; font-size: 0.95rem; }
#result .good { color: var(--green); }
#result .warn { color: var(--red); }

/* ---- Raskort på startsidan ---- */
.breedgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; margin-top: 28px; }
.breedcard {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: var(--text);
  transition: transform 0.15s, box-shadow 0.15s;
  display: block;
  position: relative;
}
.breedcard:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(80,60,20,0.15); }
.breedcard img { height: 210px; width: 100%; object-fit: cover; object-position: center 28%; }
.breedcard .body { padding: 18px 20px 22px; }
.breedcard h3 { font-size: 1.2rem; }
.breedcard p { font-size: 0.92rem; color: var(--text-soft); margin-top: 6px; }
.breedcard .tags { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--accent-soft);
  color: var(--accent-dark);
  border-radius: 999px;
  padding: 3px 10px;
}
.breedcard.soon {
  opacity: 0.65;
  pointer-events: none;
}
.breedcard.soon .body::after {
  content: "Kommer snart";
  display: inline-block;
  margin-top: 12px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-soft);
}

/* ---- Matchare (startsidan) ---- */
section.block.alt2 { background: var(--accent-soft); }
.matcher {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 24px 26px;
}
.matcher .mtop {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--border);
}
.matcher .mcount {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-soft);
}
.matcher .mcount.some { color: var(--accent-dark); }
.matcher #matchreset {
  background: none;
  border: 2px solid var(--border);
  color: var(--text-soft);
  font-weight: 700;
  font-size: 0.85rem;
  font-family: inherit;
  padding: 7px 18px;
  border-radius: 999px;
  cursor: pointer;
}
.matcher #matchreset:hover { border-color: var(--accent); color: var(--accent-dark); }
.matcher .mgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 20px 28px;
}
.mq { border: none; min-width: 0; }
.mq legend {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  padding: 0;
}
.mq legend .hint { font-weight: 500; color: var(--text-soft); }
.mq.done legend::after { content: " ✓"; color: var(--green); font-weight: 800; }
.mq .opts { display: flex; flex-wrap: wrap; gap: 8px; }
.mq .pill {
  border: 2px solid var(--border);
  border-radius: 999px;
  padding: 7px 15px;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-soft);
  background: var(--bg);
  user-select: none;
  transition: all 0.15s;
}
.mq .pill:hover { border-color: var(--accent); color: var(--text); }
.mq .pill input { display: none; }
.mq .pill:has(input:checked) {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.match-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  font-size: 0.95rem;
  font-weight: 800;
  padding: 6px 14px;
  border-radius: 999px;
  color: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}
.match-badge.hi { background: var(--green); }
.match-badge.mid { background: var(--amber); }
.match-badge.lo { background: var(--red); }

ul.match-reasons {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}
ul.match-reasons li {
  font-size: 0.83rem;
  color: var(--red);
  padding: 3px 0 3px 20px;
  position: relative;
}
ul.match-reasons li::before {
  content: "!";
  position: absolute;
  left: 4px;
  font-weight: 800;
}

/* ---- Rasprofil-header (ras.html) — bilden visas obeskuren ---- */
.rashead {
  background: var(--accent-soft);
  border-bottom: 1px solid var(--border);
}
.rashead .wrap {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 44px;
  align-items: center;
  padding-top: 48px;
  padding-bottom: 48px;
}
.rashead h1 { font-size: clamp(2rem, 4vw, 2.8rem); line-height: 1.15; }
.rashead p.sub { color: var(--text-soft); font-size: 1.12rem; margin-top: 12px; }
.rashead .cta {
  display: inline-block;
  margin-top: 20px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  padding: 12px 26px;
  border-radius: 999px;
  box-shadow: var(--shadow);
}
.rashead .cta:hover { background: var(--accent-dark); }
.rashead figure {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--bg-card);
  margin: 0;
}
.rashead figure img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 520px;
  object-fit: contain;
}
@media (max-width: 760px) {
  .rashead .wrap { grid-template-columns: 1fr; gap: 24px; }
}

/* ---- Gissa rasen (spel) ---- */
.game {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
  max-width: 760px;
  margin: 0 auto;
}
.game-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-weight: 700;
  color: var(--text-soft);
  font-size: 0.95rem;
  margin-bottom: 16px;
}
.game-img {
  margin: 0 0 20px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--accent-soft);
}
.game-img img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 420px;
  object-fit: contain;
}
.game-opts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 600px) { .game-opts { grid-template-columns: 1fr; } }
.game-opts button {
  border: 2px solid var(--border);
  background: var(--bg);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 1rem;
  font-weight: 700;
  font-family: inherit;
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.15s, transform 0.1s;
}
.game-opts button:hover:not(:disabled) { border-color: var(--accent); transform: translateY(-1px); }
.game-opts button.right { border-color: var(--green); background: #e9f2ec; }
.game-opts button.wrong { border-color: var(--red); background: #f7e9e7; }
.game-opts button:disabled { cursor: default; opacity: 0.9; }
.game-feedback { margin-top: 16px; font-size: 1.02rem; min-height: 1.6em; }
.game-actions { margin-top: 14px; display: flex; gap: 14px; align-items: center; justify-content: center; flex-wrap: wrap; }
.game-actions button {
  background: var(--accent);
  border: none;
  color: #fff;
  font-size: 1.02rem;
  font-weight: 700;
  font-family: inherit;
  padding: 12px 30px;
  border-radius: 999px;
  cursor: pointer;
}
.game-actions button:hover { background: var(--accent-dark); }
.game-actions .ghost-btn {
  text-decoration: none;
  font-weight: 700;
  color: var(--accent-dark);
  padding: 12px 22px;
  border: 2px solid var(--border);
  border-radius: 999px;
}
.game-actions .ghost-btn:hover { border-color: var(--accent); }

/* ---- Rasgalleri: verktyg ---- */
.gridtools {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 20px;
}
.gridtools input[type="search"] {
  flex: 1;
  max-width: 380px;
  padding: 11px 16px;
  border: 2px solid var(--border);
  border-radius: 999px;
  background: var(--bg-card);
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--text);
}
.gridtools input[type="search"]:focus { outline: none; border-color: var(--accent); }
.gridtools .count { font-size: 0.85rem; color: var(--text-soft); font-weight: 600; white-space: nowrap; }

.tag.deep {
  background: var(--accent);
  color: #fff;
}
.tag.cross {
  background: var(--red);
  color: #fff;
}

/* ---- Källor ---- */
.sources { font-size: 0.85rem; color: var(--text-soft); }
.sources ul { margin: 10px 0 0 20px; }
.sources li { margin-bottom: 4px; }

/* ---- Footer ---- */
footer.site {
  border-top: 1px solid var(--border);
  padding: 30px 0 40px;
  color: var(--text-soft);
  font-size: 0.85rem;
  background: var(--bg-card);
}
footer.site .wrap { display: grid; gap: 6px; }
