:root {
  --ink: #18395f;
  --orange: #39aa98;
  --green: #62cfb9;
  --blue-soft: #f1f9fc;
  --cream: #f5fbfd;
  --line: #d7e9ee;
  --text: #253b54;
  --muted: #62758a;
  --shadow: 0 12px 30px rgba(24,57,95,.10);
  --radius: 22px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background: #fff;
  line-height: 1.55;
}
a { color: inherit; }
.container { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }

.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  min-height: 76px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.brand {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none; font-weight: 800; letter-spacing: .06em;
}
.brand img { width: 58px; height: 58px; object-fit: contain; border-radius: 14px; }
.brand span { color: var(--ink); font-size: 1.04rem; }
.nav { display: flex; gap: 20px; align-items: center; }
.nav a { text-decoration: none; color: var(--muted); font-weight: 700; }
.nav a:hover { color: var(--ink); }

.hero {
  padding: 72px 0 56px;
  background:
    radial-gradient(circle at 80% 20%, rgba(242,138,46,.16), transparent 24%),
    radial-gradient(circle at 15% 25%, rgba(85,168,90,.14), transparent 27%),
    linear-gradient(180deg, #fff, var(--cream));
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.25fr .75fr;
  gap: 52px;
  align-items: center;
}
.eyebrow {
  color: var(--orange);
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-size: .82rem;
}
h1 {
  color: var(--ink);
  font-size: clamp(2.6rem, 6vw, 5.3rem);
  line-height: .98;
  margin: 12px 0 20px;
}
.hero p { max-width: 680px; font-size: 1.18rem; color: #435361; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 20px; border-radius: 999px;
  text-decoration: none; font-weight: 800;
}
.button.primary { background: var(--ink); color: #fff; }
.button.secondary { border: 2px solid var(--ink); color: var(--ink); background: #fff; }
.hero-card {
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: 28px;
  padding: 24px;
  transform: rotate(1.5deg);
}
.hero-card img { width: 100%; display: block; border-radius: 20px; }
.hero-card small { display: block; color: var(--muted); margin-top: 12px; }

.section { padding: 64px 0; }
.section.alt { background: var(--blue-soft); }
.section-head {
  display: flex; align-items: end; justify-content: space-between; gap: 20px;
  margin-bottom: 28px;
}
.section h2 { color: var(--ink); font-size: clamp(1.8rem, 4vw, 3rem); margin: 0; }
.section-head p { max-width: 560px; color: var(--muted); margin: 0; }

.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 8px 22px rgba(22,56,95,.06);
}
.card .icon { font-size: 2rem; }
.card h3 { color: var(--ink); margin: 14px 0 8px; }
.card p { color: var(--muted); margin: 0; }

.material-card {
  display: grid; grid-template-columns: .75fr 1.25fr; gap: 30px;
  background: #fff; border: 1px solid var(--line);
  border-radius: 28px; padding: 28px; box-shadow: var(--shadow);
}
.material-card img { width: 100%; display: block; border-radius: 18px; border: 1px solid var(--line); }
.meta { color: var(--orange); font-weight: 800; letter-spacing: .04em; }
.material-card h3 { color: var(--ink); font-size: 2rem; margin: 8px 0 10px; }
.material-card p { color: var(--muted); }

.site-footer {
  padding: 36px 0;
  border-top: 1px solid var(--line);
  background: #fff;
}
.footer-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand img { width: 54px; height: 54px; object-fit: contain; border-radius: 12px; }
.footer-note { color: var(--muted); font-size: .92rem; }

.material-page { padding: 52px 0 70px; }
.breadcrumbs { color: var(--muted); font-size: .94rem; margin-bottom: 18px; }
.breadcrumbs a { color: var(--ink); }
.material-layout {
  display: grid; grid-template-columns: 1fr .85fr; gap: 42px; align-items: start;
}
.material-preview {
  background: #fff; border: 1px solid var(--line); border-radius: 24px;
  padding: 18px; box-shadow: var(--shadow);
}
.material-preview img { width: 100%; display: block; border-radius: 16px; }
.info-panel {
  background: var(--cream); border: 1px solid #f2e5cf; border-radius: 24px; padding: 28px;
}
.info-panel h1 { font-size: clamp(2rem, 4vw, 3.3rem); line-height: 1.05; }
.info-list { padding-left: 18px; }
.source-box {
  margin-top: 24px; padding-top: 20px; border-top: 1px solid #ead9bd;
}
.url-sample {
  font-family: monospace; background: #fff; border: 1px dashed var(--line);
  padding: 10px 12px; border-radius: 10px; overflow-wrap: anywhere;
}

@media (max-width: 860px) {
  .nav { display: none; }
  .hero-grid, .material-card, .material-layout { grid-template-columns: 1fr; }
  .hero-card { max-width: 460px; }
  .cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .container { width: min(100% - 22px, 1120px); }
  .hero { padding-top: 44px; }
  .cards { grid-template-columns: 1fr; }
  .section-head, .footer-inner { align-items: flex-start; flex-direction: column; }
  .brand span { font-size: .92rem; }
}
.latest-badge {
  display: inline-flex;
  margin-bottom: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--orange);
  color: #fff;
  font-weight: 800;
  font-size: .78rem;
  letter-spacing: .08em;
}
.latest-material { margin-bottom: 46px; }
.date-line {
  display: inline-flex;
  margin: 8px 0 6px;
  padding: 7px 11px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--muted);
  font-weight: 700;
  font-size: .9rem;
}
.all-materials-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin: 8px 0 22px;
}
.all-materials-head h2 { font-size: clamp(1.6rem, 3vw, 2.35rem); }
.all-materials-head p { margin: 0; color: var(--muted); }
.material-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}
.material-tile {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 8px 22px rgba(22,56,95,.06);
}
.material-tile img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top center;
  display: block;
  border-bottom: 1px solid var(--line);
}
.material-tile-body { padding: 22px; }
.material-tile h3 { color: var(--ink); font-size: 1.45rem; margin: 7px 0 8px; }
.material-tile p { color: var(--muted); margin: 0 0 15px; }
.text-link { color: var(--ink); font-weight: 800; text-decoration: none; }
.text-link:hover { text-decoration: underline; }

@media (max-width: 700px) {
  .material-grid { grid-template-columns: 1fr; }
  .all-materials-head { align-items: flex-start; flex-direction: column; }
}

.game-feature-section { background: linear-gradient(180deg, #fff, #fffaf2); }
.game-badge { background: #7b45b5; }
.game-feature-card { display:grid; grid-template-columns:.9fr 1.1fr; gap:34px; align-items:center; background:#fff; border:1px solid var(--line); border-radius:28px; padding:30px; box-shadow:var(--shadow); overflow:hidden; }
.game-visual { min-height:380px; position:relative; border-radius:24px; background:linear-gradient(145deg,#dff1ff,#fff1d3); overflow:hidden; }
.game-visual:before { content:""; position:absolute; width:180px; height:180px; border-radius:50%; background:rgba(123,69,181,.18); right:-55px; top:-60px; }
.mini-card { position:absolute; width:150px; aspect-ratio:4/5; border-radius:22px; display:flex; align-items:center; justify-content:center; box-shadow:0 16px 28px rgba(22,56,95,.19); border:3px solid #fff; font-weight:900; color:var(--ink); font-size:1.5rem; }
.mini-card.back { left:10%; top:18%; background:linear-gradient(145deg,#16385f,#2282d0); transform:rotate(-8deg); }
.mini-card.back img { width:70%; border-radius:18px; object-fit:contain; }
.mini-card.picture { left:37%; top:29%; background:#fff; transform:rotate(4deg); }
.mini-card.picture img { width:90%; height:90%; object-fit:contain; }
.mini-card.word { right:8%; top:18%; background:#fffaf2; transform:rotate(9deg); }
.game-copy h3 { color:var(--ink); font-size:clamp(2rem,4vw,3.2rem); line-height:1.05; margin:8px 0 12px; }
.game-copy p { color:var(--muted); font-size:1.08rem; }
.feature-list { padding-left:20px; color:var(--text); }
.feature-list li { margin:6px 0; }
@media(max-width:860px){.game-feature-card{grid-template-columns:1fr}.game-visual{min-height:320px}.mini-card{width:125px}}
@media(max-width:480px){.game-feature-card{padding:17px}.game-visual{min-height:270px}.mini-card{width:102px;border-radius:16px;font-size:1.1rem}}

/* Version 4: visible UUS!!! block and material-game connection */
.nav-new { color: #e93f58 !important; }
.new-section {
  padding: 28px 0 34px;
  background: linear-gradient(135deg, #fff4d8 0%, #f1f8ff 52%, #f6efff 100%);
  border-bottom: 1px solid var(--line);
}
.new-feature-card {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  align-items: center;
  gap: 32px;
  background: rgba(255,255,255,.94);
  border: 1px solid rgba(22,56,95,.12);
  border-radius: 30px;
  padding: 30px;
  box-shadow: 0 16px 42px rgba(22,56,95,.13);
  overflow: hidden;
}
.new-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  margin-bottom: 12px;
  border-radius: 999px;
  background: #ef4056;
  color: #fff;
  font-weight: 900;
  font-size: 1.05rem;
  letter-spacing: .08em;
  box-shadow: 0 7px 0 #c92f43;
  transform: rotate(-2deg);
}
.new-copy h1 {
  font-size: clamp(2.35rem, 5.4vw, 4.7rem);
  margin: 8px 0 14px;
  line-height: .98;
}
.new-copy > p { max-width: 650px; font-size: 1.12rem; color: #435361; }
.new-note { font-size: .92rem !important; color: var(--muted) !important; margin: 16px 0 0; }
.new-visual { min-height: 330px; }
.new-visual .spark { position: absolute; font-size: 2rem; font-weight: 900; }
.new-visual .s1 { color: #ef4056; top: 8%; left: 8%; transform: rotate(-12deg); }
.new-visual .s2 { color: #55a85a; right: 8%; bottom: 11%; }
.new-visual .s3 { color: #ffbe21; right: 12%; top: 8%; }
.hero { padding-top: 58px; }
.hero-title {
  color: var(--ink);
  font-size: clamp(2.5rem, 5.8vw, 5rem);
  line-height: .98;
  margin: 12px 0 20px;
}
.game-catalog-section { background: linear-gradient(180deg, #fff, #fffaf2); }
.game-catalog-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 24px;
  box-shadow: var(--shadow);
}
.game-catalog-icon {
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  border-radius: 22px;
  background: linear-gradient(145deg,#dff1ff,#fff1d3);
  font-size: 3rem;
}
.game-catalog-card h3 { color: var(--ink); margin: 5px 0; font-size: 1.65rem; }
.game-catalog-card p { color: var(--muted); margin: 0; }
.game-catalog-actions { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.featured-tile { position: relative; }
.tile-badge {
  position: absolute;
  z-index: 2;
  right: 14px;
  top: 14px;
  padding: 7px 11px;
  border-radius: 999px;
  background: #7b45b5;
  color: #fff;
  font-weight: 900;
  font-size: .78rem;
  letter-spacing: .04em;
  box-shadow: 0 7px 16px rgba(60,34,95,.24);
}
.tile-actions { display: flex; gap: 18px; flex-wrap: wrap; }
.purple-link { color: #6f3dac; }
.material-new-note {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 20px 0;
  padding: 13px 15px;
  border-radius: 16px;
  background: #fff;
  border: 2px solid #ef4056;
}
.material-new-note strong { color: #ef4056; white-space: nowrap; }
.related-game {
  margin-top: 44px;
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  gap: 34px;
  align-items: center;
  padding: 30px;
  border-radius: 28px;
  background: linear-gradient(145deg,#eef8ff,#fff6dc);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.related-game-visual {
  position: relative;
  min-height: 320px;
  border-radius: 22px;
  overflow: hidden;
  background: rgba(255,255,255,.68);
}
.related-game-copy h2 { color: var(--ink); font-size: clamp(2rem,4vw,3.2rem); line-height: 1.04; margin: 8px 0 12px; }
.related-game-copy p { color: var(--muted); font-size: 1.05rem; }
.small-label { font-size: .88rem; padding: 6px 12px; box-shadow: 0 5px 0 #c92f43; }
.related-game-visual .mini-card { width: 128px; }
.related-game-visual .mini-card.back { left: 7%; top: 18%; }
.related-game-visual .mini-card.picture { left: 36%; top: 31%; }
.related-game-visual .mini-card.word { right: 6%; top: 18%; }
@media (max-width: 860px) {
  .new-feature-card, .related-game { grid-template-columns: 1fr; }
  .new-visual { min-height: 290px; }
  .game-catalog-card { grid-template-columns: auto 1fr; }
  .game-catalog-actions { grid-column: 1 / -1; flex-direction: row; justify-content: flex-start; }
}
@media (max-width: 560px) {
  .new-section { padding-top: 16px; }
  .new-feature-card { padding: 18px; border-radius: 23px; }
  .new-copy h1 { font-size: 2.55rem; }
  .new-visual { min-height: 245px; }
  .new-visual .mini-card { width: 92px; }
  .game-catalog-card { grid-template-columns: 1fr; }
  .game-catalog-icon { width: 72px; height: 72px; }
  .game-catalog-actions { grid-column: auto; align-items: flex-start; }
  .material-new-note { align-items: flex-start; flex-direction: column; }
  .related-game { padding: 18px; }
  .related-game-visual { min-height: 245px; }
  .related-game-visual .mini-card { width: 92px; }
}


/* Version 5: Lõika! Kosmoserada */
.new-material-visual {
  min-height: 360px;
  display: grid;
  place-items: center;
  padding: 18px;
  border-radius: 24px;
  background: linear-gradient(145deg, #eaf6ff, #fff5dc);
  overflow: hidden;
}
.new-material-visual img {
  width: min(100%, 285px);
  max-height: 410px;
  object-fit: contain;
  display: block;
  border-radius: 16px;
  box-shadow: 0 18px 34px rgba(22,56,95,.20);
  transform: rotate(1.2deg);
}
.cutting-tile img {
  aspect-ratio: 16 / 10;
  object-fit: contain;
  object-position: center 12%;
  background: #fff;
}
.new-material-badge { background: #ef4056; }
.game-set-badge { background: #7b45b5; }
.cutting-page-preview img { object-fit: contain; }
@media (max-width: 560px) {
  .new-material-visual { min-height: 300px; }
  .new-material-visual img { width: min(100%, 235px); max-height: 330px; }
}


/* Version 6: hele sinine ja mündiroheline visuaalsüsteem */
body {
  background: #f9fcfd;
}
.site-header {
  background: rgba(249,252,253,.94);
  border-bottom-color: #dcecef;
}
.nav a:hover,
.text-link:hover { color: #238f91; }
.nav-new { color: #ff7c55 !important; }

.button {
  min-height: 50px;
  padding-inline: 22px;
  box-shadow: 0 7px 18px rgba(24,57,95,.08);
}
.button.primary {
  background: #62cfb9;
  color: var(--ink);
}
.button.primary:hover { background: #52c4ad; }
.button.secondary {
  border: 0;
  background: #70b9df;
  color: #fff;
}
.button.secondary:hover { background: #5ca9d2; }

.new-section {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 18%, rgba(112,185,223,.17), transparent 24%),
    radial-gradient(circle at 88% 12%, rgba(98,207,185,.18), transparent 25%),
    linear-gradient(135deg, #f8fcfd 0%, #eaf8f6 55%, #edf7fc 100%);
}
.new-section::before {
  content: "%";
  position: absolute;
  left: 4%;
  bottom: 4%;
  color: rgba(112,185,223,.14);
  font-size: 5rem;
  font-weight: 800;
  transform: rotate(-12deg);
}
.new-feature-card {
  position: relative;
  border-color: #d9eaee;
  background: rgba(255,255,255,.96);
  box-shadow: 0 18px 44px rgba(24,57,95,.11);
}
.new-label {
  background: #ff825d;
  box-shadow: 0 7px 0 #e76d4d;
}
.new-material-visual {
  background: linear-gradient(145deg, #edf9fc, #e5f8f3);
}

.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 82% 18%, rgba(98,207,185,.20), transparent 25%),
    radial-gradient(circle at 14% 24%, rgba(112,185,223,.16), transparent 28%),
    linear-gradient(180deg, #fbfeff, #eff9fb);
}
.hero::before,
.hero::after {
  position: absolute;
  z-index: 0;
  color: rgba(112,185,223,.13);
  font-weight: 800;
  pointer-events: none;
}
.hero::before { content: "+"; left: 7%; top: 18%; font-size: 4.8rem; }
.hero::after { content: "×"; right: 7%; bottom: 13%; font-size: 4.2rem; }
.hero .container { position: relative; z-index: 1; }
.eyebrow { color: #2d9d91; }
.hero-card {
  border-color: #d7e9ee;
  box-shadow: 0 18px 40px rgba(24,57,95,.10);
}

.topics-section { background: #fff; }
.topic-cards { align-items: stretch; }
.topic-card {
  position: relative;
  min-height: 220px;
  text-decoration: none;
  border-color: #d8e9ee;
  background: linear-gradient(155deg, #fff, #f6fbfc);
}
.topic-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.topic-card-top h3 { margin-right: auto; }
.topic-link {
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.topic-link:hover {
  transform: translateY(-4px);
  border-color: #9ddbd4;
  box-shadow: 0 15px 30px rgba(24,57,95,.10);
}
.topic-arrow {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 50%;
  background: #62cfb9;
  color: var(--ink);
  font-weight: 900;
  font-size: 1.1rem;
}
.topic-coming {
  background: #f8fbfc;
}
.coming-badge {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 999px;
  background: #e4f1f5;
  color: #688094;
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .07em;
}

.game-catalog-section {
  background: linear-gradient(180deg, #f8fcfd, #edf9f7);
}
.game-badge { background: #70b9df; }
.game-catalog-card,
.material-tile {
  border-color: #d7e9ee;
  box-shadow: 0 12px 28px rgba(24,57,95,.08);
}
.game-catalog-icon {
  background: linear-gradient(145deg, #e4f5fb, #ddf6ef);
}

.section.alt {
  background:
    radial-gradient(circle at 90% 10%, rgba(98,207,185,.13), transparent 22%),
    #f1f9fc;
}
.compact-head { margin-bottom: 24px; }
.new-material-badge { background: #ff825d; }
.tile-badge { box-shadow: 0 7px 16px rgba(24,57,95,.18); }
.meta { color: #2d9d91; }

.info-panel {
  background: #eef9f7;
  border-color: #d3ece7;
}
.source-box { border-top-color: #cce5e2; }
.date-line { background: #fff; }
.related-game {
  background: linear-gradient(145deg,#edf8fc,#e9f8f4);
}
.material-new-note {
  border-color: #ff825d;
}
.material-new-note strong { color: #ef704d; }
.small-label { box-shadow: 0 5px 0 #e76d4d; }

@media (max-width: 560px) {
  .topic-card { min-height: auto; }
  .new-section::before { font-size: 3.3rem; }
}

.empty-topic-page { padding: 64px 0 90px; min-height: 70vh; }
.empty-topic-card {
  display: grid;
  grid-template-columns: 150px 1fr;
  align-items: center;
  gap: 30px;
  max-width: 820px;
  margin: 0 auto;
  padding: 42px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: linear-gradient(145deg, #fff, #eaf8f5);
  box-shadow: var(--shadow);
}
.empty-topic-card h1 { font-size: clamp(2.4rem, 6vw, 4.5rem); margin-bottom: 12px; }
.empty-topic-card p { color: var(--muted); font-size: 1.15rem; }
.empty-topic-icon {
  display: grid;
  place-items: center;
  width: 140px;
  height: 140px;
  border-radius: 32px;
  background: linear-gradient(145deg, #e4f5fb, #ddf6ef);
  font-size: 4.5rem;
}
@media (max-width: 620px) {
  .empty-topic-card { grid-template-columns: 1fr; padding: 26px; }
  .empty-topic-icon { width: 100px; height: 100px; border-radius: 24px; font-size: 3.2rem; }
}

/* Version 7: UUS + uusim mäng esimesel ekraanil, erksamad aktsendid */
:root {
  --violet: #7b45b5;
  --magenta: #c63586;
  --orange-bright: #ff6a2a;
  --orange-soft: #ff9a43;
  --teal-deep: #239d96;
}

.showcase-section {
  padding: 30px 0 38px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 6% 8%, rgba(255,106,42,.13), transparent 22%),
    radial-gradient(circle at 93% 16%, rgba(123,69,181,.15), transparent 23%),
    linear-gradient(135deg, #f8fcfd 0%, #eaf8f5 48%, #eef7fc 100%);
  border-bottom: 1px solid var(--line);
}
.showcase-section::before,
.showcase-section::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.showcase-section::before {
  width: 150px;
  height: 150px;
  left: -74px;
  bottom: -65px;
  background: rgba(198,53,134,.10);
}
.showcase-section::after {
  width: 120px;
  height: 120px;
  right: -45px;
  bottom: 18%;
  background: rgba(255,154,67,.12);
}
.showcase-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  align-items: stretch;
}
.showcase-card {
  min-width: 0;
  display: grid;
  grid-template-rows: auto 245px;
  overflow: hidden;
  border-radius: 30px;
  border: 1px solid #d9eaee;
  background: rgba(255,255,255,.97);
  box-shadow: 0 18px 44px rgba(24,57,95,.11);
}
.showcase-copy {
  padding: 28px 28px 20px;
}
.showcase-copy h1,
.showcase-copy h2 {
  color: var(--ink);
  font-size: clamp(2rem, 3.6vw, 3.45rem);
  line-height: 1.01;
  margin: 8px 0 12px;
}
.showcase-copy > p {
  margin: 0;
  color: #455b70;
  font-size: 1.05rem;
}
.showcase-copy .actions {
  margin-top: 20px;
}
.showcase-copy .button {
  min-height: 46px;
  padding-inline: 18px;
}

.material-showcase {
  border-top: 6px solid var(--orange-bright);
}
.material-showcase .new-label {
  background: var(--orange-bright);
  box-shadow: 0 6px 0 #dd521f;
}
.material-primary {
  background: var(--orange-bright);
  color: #fff;
}
.material-primary:hover { background: #ee5d20; }
.material-secondary {
  background: #fff;
  color: var(--violet);
  border: 2px solid var(--violet);
  box-shadow: none;
}
.material-secondary:hover { background: #f7effc; }
.material-showcase-visual {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 17% 30%, rgba(255,106,42,.18), transparent 23%),
    radial-gradient(circle at 82% 22%, rgba(198,53,134,.14), transparent 24%),
    linear-gradient(145deg, #eaf7fb, #e5f8f2);
}
.material-showcase-visual img {
  position: relative;
  z-index: 2;
  width: min(57%, 240px);
  max-height: 222px;
  object-fit: contain;
  border-radius: 14px;
  box-shadow: 0 16px 30px rgba(24,57,95,.19);
  transform: rotate(-1.2deg);
}
.accent-dot {
  position: absolute;
  display: block;
  border-radius: 50%;
}
.accent-dot-one {
  width: 58px;
  height: 58px;
  left: 10%;
  bottom: 15%;
  background: var(--orange-soft);
}
.accent-dot-two {
  width: 42px;
  height: 42px;
  right: 12%;
  top: 15%;
  background: var(--magenta);
}

.game-showcase {
  border-top: 6px solid var(--violet);
}
.game-showcase .game-badge {
  background: var(--violet);
}
.game-meta { color: var(--magenta); }
.game-primary {
  background: var(--violet);
  color: #fff;
}
.game-primary:hover { background: #68379e; }
.game-secondary {
  background: var(--magenta);
  color: #fff;
}
.game-secondary:hover { background: #ad2f76; }
.game-showcase-visual {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 30%, rgba(47,169,162,.21), transparent 26%),
    radial-gradient(circle at 84% 22%, rgba(255,106,42,.18), transparent 23%),
    linear-gradient(145deg, #e6f7f4, #f7effc);
}
.game-showcase-visual::before {
  content: "";
  position: absolute;
  width: 150px;
  height: 150px;
  right: -36px;
  bottom: -55px;
  border-radius: 50%;
  background: rgba(123,69,181,.14);
}
.game-card {
  position: absolute;
  width: 118px;
  aspect-ratio: 4 / 5;
  display: grid;
  place-items: center;
  border-radius: 20px;
  border: 3px solid #fff;
  box-shadow: 0 15px 28px rgba(24,57,95,.18);
  overflow: hidden;
}
.game-card img {
  width: 82%;
  height: 82%;
  object-fit: contain;
}
.game-card-blue {
  left: 13%;
  top: 17%;
  transform: rotate(-9deg);
  background: linear-gradient(145deg, #18395f, #3b83c5);
}
.game-card-white {
  left: 39%;
  top: 28%;
  transform: rotate(4deg);
  background: #fff;
}
.game-card-word {
  right: 10%;
  top: 14%;
  transform: rotate(9deg);
  background: #fff7ef;
  color: var(--ink);
  font-weight: 900;
  letter-spacing: .04em;
  font-size: 1.08rem;
}
.game-spark {
  position: absolute;
  font-weight: 900;
  line-height: 1;
}
.spark-one {
  color: var(--orange-bright);
  left: 7%;
  bottom: 12%;
  font-size: 2rem;
  transform: rotate(-12deg);
}
.spark-two {
  color: var(--magenta);
  right: 8%;
  top: 9%;
  font-size: 2.2rem;
}

.hero {
  padding: 58px 0 52px;
  background:
    radial-gradient(circle at 83% 18%, rgba(98,207,185,.19), transparent 25%),
    radial-gradient(circle at 15% 24%, rgba(123,69,181,.09), transparent 28%),
    linear-gradient(180deg, #fbfeff, #eff9fb);
}
.hero::before { color: rgba(255,106,42,.16); }
.hero::after { color: rgba(123,69,181,.13); }
.eyebrow { color: var(--magenta); }
.hero .button.primary { background: var(--teal-deep); color: #fff; }
.hero .button.secondary { background: var(--violet); color: #fff; }

.topic-card {
  overflow: hidden;
}
.topic-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
  border-radius: 22px 0 0 22px;
}
.topic-estonian::before { background: var(--teal-deep); }
.topic-history::before { background: var(--orange-bright); }
.topic-nature::before { background: #5ab84d; }
.topic-games::before { background: var(--violet); }
.topic-games .topic-arrow { background: var(--violet); color: #fff; }
.topic-estonian .topic-arrow { background: var(--teal-deep); color: #fff; }
.topic-card .icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: #f2f8fa;
}
.topic-history .icon { background: #fff2ea; }
.topic-nature .icon { background: #edf8ea; }
.topic-games .icon { background: #f4ecfb; }
.coming-badge {
  background: #f4ecfb;
  color: var(--violet);
}

@media (max-width: 900px) {
  .showcase-grid { grid-template-columns: 1fr; }
  .showcase-card { grid-template-columns: 1fr 1fr; grid-template-rows: auto; }
  .material-showcase-visual,
  .game-showcase-visual { min-height: 300px; }
}

@media (max-width: 620px) {
  .showcase-section { padding: 16px 0 26px; }
  .showcase-grid { gap: 16px; }
  .showcase-card {
    grid-template-columns: 1fr;
    grid-template-rows: auto 230px;
    border-radius: 23px;
  }
  .showcase-copy { padding: 20px 18px 18px; }
  .showcase-copy h1,
  .showcase-copy h2 { font-size: 2.25rem; }
  .showcase-copy > p { font-size: 1rem; }
  .material-showcase-visual,
  .game-showcase-visual { min-height: 230px; }
  .material-showcase-visual img { width: min(57%, 210px); max-height: 205px; }
  .game-card { width: 96px; border-radius: 16px; }
  .game-card-blue { left: 10%; }
  .game-card-white { left: 36%; }
  .game-card-word { right: 7%; font-size: .9rem; }
  .hero { padding-top: 44px; }
}

/* Version 8: refined visual system and clearer hierarchy */
:root {
  --ink: #17395f;
  --text: #2d435b;
  --muted: #667b8f;
  --teal: #2aa79e;
  --teal-soft: #daf4ef;
  --orange-bright: #f26a2e;
  --orange-soft: #ffad62;
  --violet: #7047ad;
  --violet-soft: #eee7f8;
  --magenta: #c83c86; /* tiny decorative accent only */
  --line: #d8e8ed;
}

body {
  font-family: "Segoe UI", "Aptos", Arial, sans-serif;
  letter-spacing: -.006em;
}

button, input, textarea, select { font: inherit; }

h1, h2, h3,
.brand span,
.new-label,
.latest-badge {
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
}

.brand span,
.nav a,
.eyebrow,
.new-label,
.latest-badge,
.meta,
.button,
.secondary-action,
.coming-badge {
  letter-spacing: .025em;
}

.site-header { box-shadow: 0 5px 18px rgba(23,57,95,.035); }
.nav a { transition: color .18s ease; }
.nav-new { color: var(--orange-bright) !important; }

.showcase-section {
  background:
    radial-gradient(circle at 7% 8%, rgba(242,106,46,.12), transparent 22%),
    radial-gradient(circle at 93% 13%, rgba(112,71,173,.13), transparent 23%),
    linear-gradient(135deg, #fbfefe 0%, #eaf8f5 50%, #eef7fb 100%);
}
.showcase-section::before { background: rgba(200,60,134,.065); }
.showcase-section::after { background: rgba(242,106,46,.09); }

.showcase-card {
  border-color: #d9e8ec;
  box-shadow: 0 16px 38px rgba(23,57,95,.095);
}
.showcase-copy h1,
.showcase-copy h2 {
  letter-spacing: -.035em;
  font-weight: 900;
}
.showcase-copy > p { line-height: 1.55; }

.new-label {
  background: var(--orange-bright);
  box-shadow: none;
  transform: none;
  padding: 7px 13px;
  font-size: .9rem;
}
.material-showcase { border-top-color: var(--orange-bright); }
.material-primary {
  background: var(--orange-bright);
  color: #fff;
  box-shadow: 0 7px 16px rgba(242,106,46,.2);
}
.material-primary:hover { background: #dc5920; }
.game-showcase { border-top-color: var(--violet); }
.game-showcase .game-badge { background: var(--violet); }
.game-meta { color: var(--violet); }
.game-primary {
  background: var(--violet);
  color: #fff;
  box-shadow: 0 7px 16px rgba(112,71,173,.18);
}
.game-primary:hover { background: #5f3998; }

.actions { align-items: center; }
.secondary-action {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 0 5px;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
  border-bottom: 2px solid rgba(23,57,95,.22);
  transition: color .18s ease, border-color .18s ease;
}
.secondary-action:hover {
  color: var(--orange-bright);
  border-color: var(--orange-bright);
}
.game-link:hover {
  color: var(--violet);
  border-color: var(--violet);
}

.material-showcase-visual {
  background:
    radial-gradient(circle at 17% 30%, rgba(242,106,46,.15), transparent 23%),
    radial-gradient(circle at 82% 22%, rgba(200,60,134,.085), transparent 24%),
    linear-gradient(145deg, #edf8fb, #e7f7f2);
}
.accent-dot-one { background: var(--orange-soft); }
.accent-dot-two { width: 30px; height: 30px; background: var(--magenta); opacity: .78; }
.game-showcase-visual {
  background:
    radial-gradient(circle at 18% 30%, rgba(42,167,158,.18), transparent 26%),
    radial-gradient(circle at 84% 22%, rgba(242,106,46,.12), transparent 23%),
    linear-gradient(145deg, #e9f7f4, #f2edf9);
}
.spark-two { color: var(--magenta); opacity: .75; }

/* Compact brand statement: no second full hero */
.math-prototype-strip {
  padding: 0 0 24px;
}

.math-prototype-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 26px;
  border: 1px solid rgba(23,54,95,.13);
  border-radius: 24px;
  background: linear-gradient(110deg,#e8fbf8,#eef3ff 58%,#f6edff);
  box-shadow: 0 12px 28px rgba(23,54,95,.09);
}

.math-prototype-inner span {
  color: #7355b7;
  font-size: .74rem;
  font-weight: 900;
  letter-spacing: .1em;
}

.math-prototype-inner h2 {
  margin: 5px 0 3px;
  color: #17365f;
  font-size: clamp(1.45rem,3vw,2.15rem);
}

.math-prototype-inner p {
  margin: 0;
  color: #66778a;
}

.math-prototype-button {
  flex: 0 0 auto;
  background: #17365f;
  color: #fff;
}
.math-prototype-actions {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: auto auto;
  gap: 8px;
  align-items: center;
}
.math-share-button {
  gap: 7px;
  border: 1px solid #d8d1f1;
  background: #fff;
  color: #7355b7;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}
.math-share-button:hover { background: #f6f2ff; }
.math-share-button:focus-visible { outline: 4px solid #ffd34d; outline-offset: 3px; }
.math-share-button svg {
  width: 19px;
  height: 19px;
  fill: currentColor;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}
.math-share-button svg path { fill: none; }
.math-share-status {
  grid-column: 1 / -1;
  min-height: 18px;
  color: #23857d!important;
  font-size: .72rem!important;
  letter-spacing: .02em!important;
  text-align: center;
}

.intro-strip {
  padding: 30px 0;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.intro-inner {
  display: grid;
  grid-template-columns: 1fr 112px;
  align-items: center;
  gap: 28px;
  padding: 26px 32px;
  border-radius: 26px;
  background:
    radial-gradient(circle at 85% 20%, rgba(42,167,158,.15), transparent 26%),
    linear-gradient(135deg, #f8fcfd, #edf8f6);
  border: 1px solid #dcecef;
}
.intro-copy h2 {
  margin: 5px 0 4px;
  color: var(--ink);
  font-size: clamp(1.65rem, 3.5vw, 2.45rem);
  line-height: 1.08;
  letter-spacing: -.03em;
}
.intro-copy p { margin: 0; color: var(--muted); font-size: 1.03rem; }
.intro-mascot {
  width: 112px;
  height: 112px;
  object-fit: contain;
  border-radius: 24px;
  transform: rotate(1.5deg);
  box-shadow: 0 12px 24px rgba(23,57,95,.10);
}
.eyebrow { color: var(--teal); font-size: .76rem; }

.topics-section { padding-top: 54px; }
.section-head h2 { letter-spacing: -.025em; font-weight: 900; }
.topic-card {
  min-height: 210px;
  padding: 22px;
  box-shadow: 0 7px 20px rgba(23,57,95,.052);
}
.topic-card .icon {
  width: 50px;
  height: 50px;
  padding: 10px;
}
.topic-card .icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.topic-estonian .icon { color: var(--teal); background: #e9f8f5; }
.topic-history .icon { color: var(--orange-bright); background: #fff0e8; }
.topic-nature .icon { color: #4eaa46; background: #edf7eb; }
.topic-games .icon { color: var(--violet); background: var(--violet-soft); }
.topic-card h3 { font-weight: 900; letter-spacing: -.02em; }
.topic-arrow { box-shadow: none; }
.coming-badge { background: #eef2f5; color: #718293; }

.site-footer { background: #fbfdfd; }

@media (max-width: 900px) {
  .showcase-card { grid-template-columns: minmax(0, 1fr) 42%; }
  .intro-inner { grid-template-columns: 1fr 96px; }
  .intro-mascot { width: 96px; height: 96px; }
}

/* Both the latest material and game remain visible on a typical phone screen */
@media (max-width: 620px) {
  .showcase-section { padding: 12px 0 18px; }
  .math-prototype-strip { padding: 0 0 16px; }
  .math-prototype-inner { align-items: flex-start; flex-direction: column; gap: 14px; padding: 19px; border-radius: 20px; }
  .math-prototype-actions { width: 100%; grid-template-columns: minmax(0,1fr) auto; }
  .math-prototype-button { width: 100%; text-align: center; }
  .showcase-grid { gap: 12px; }
  .showcase-card {
    grid-template-columns: minmax(0, 1fr) 112px;
    grid-template-rows: 1fr;
    min-height: 188px;
    border-radius: 20px;
  }
  .showcase-copy { padding: 15px 13px 14px 15px; }
  .showcase-copy h1,
  .showcase-copy h2 { font-size: 1.58rem; margin: 5px 0 7px; }
  .showcase-copy > p {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    font-size: .87rem;
    line-height: 1.38;
  }
  .showcase-copy .meta { font-size: .68rem; line-height: 1.25; }
  .showcase-copy .actions { margin-top: 10px; gap: 9px; }
  .showcase-copy .button {
    min-height: 38px;
    padding: 0 12px;
    font-size: .8rem;
  }
  .secondary-action {
    min-height: 36px;
    font-size: .77rem;
  }
  .new-label,
  .latest-badge {
    margin-bottom: 4px;
    padding: 5px 8px;
    font-size: .66rem;
  }
  .material-showcase-visual,
  .game-showcase-visual { min-height: 100%; }
  .material-showcase-visual img {
    width: 82px;
    max-height: 150px;
    border-radius: 9px;
  }
  .accent-dot-one { width: 28px; height: 28px; left: 7%; }
  .accent-dot-two { width: 18px; height: 18px; right: 8%; }
  .game-card { width: 52px; border-width: 2px; border-radius: 10px; }
  .game-card-blue { left: 7%; top: 17%; }
  .game-card-white { left: 29%; top: 35%; }
  .game-card-word { right: 5%; top: 15%; font-size: .49rem; }
  .spark-one { font-size: 1rem; }
  .spark-two { font-size: 1.15rem; }
  .intro-strip { padding: 18px 0; }
  .intro-inner {
    grid-template-columns: 1fr 72px;
    gap: 16px;
    padding: 18px;
    border-radius: 20px;
  }
  .intro-copy h2 { font-size: 1.43rem; }
  .intro-copy p { font-size: .89rem; }
  .intro-mascot { width: 72px; height: 72px; border-radius: 17px; }
  .topics-section { padding-top: 42px; }
  .topic-card { min-height: auto; }
}

@media (max-width: 390px) {
  .showcase-card { grid-template-columns: minmax(0, 1fr) 98px; }
  .showcase-copy h1,
  .showcase-copy h2 { font-size: 1.43rem; }
  .showcase-copy > p { -webkit-line-clamp: 1; }
  .showcase-copy .actions { gap: 7px; }
  .showcase-copy .button { padding-inline: 10px; }
  .secondary-action { font-size: .72rem; }
}


/* Materials catalog */
.nav-current { color: var(--ink) !important; }
.catalog-hero {
  padding: 54px 0 40px;
  background:
    radial-gradient(circle at 84% 20%, rgba(123,69,181,.13), transparent 25%),
    radial-gradient(circle at 14% 18%, rgba(57,170,152,.16), transparent 28%),
    linear-gradient(180deg, #fff, var(--cream));
  border-bottom: 1px solid var(--line);
}
.catalog-hero-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 36px;
}
.catalog-hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.8rem);
  margin: 8px 0 14px;
}
.catalog-hero p {
  max-width: 650px;
  margin: 0;
  color: var(--muted);
  font-size: 1.12rem;
}
.catalog-hero img {
  width: 150px;
  height: 150px;
  object-fit: cover;
  border-radius: 32px;
  box-shadow: var(--shadow);
}
.catalog-section { background: #fff; }
.catalog-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.catalog-tile { transition: transform .18s ease, box-shadow .18s ease; }
.catalog-tile:hover { transform: translateY(-4px); box-shadow: 0 16px 34px rgba(24,57,95,.12); }
.catalog-image-link { display: block; }
.catalog-tile .meta { font-size: .78rem; }
@media (max-width: 860px) {
  .catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .catalog-hero { padding: 38px 0 30px; }
  .catalog-hero-inner { grid-template-columns: 1fr; }
  .catalog-hero img { width: 100px; height: 100px; }
  .catalog-grid { grid-template-columns: 1fr; }
}


/* Version 10: clear material categories */
.topic-cards-six {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.topic-planning .icon {
  color: #147f9b;
  background: #e7f5fa;
}
.topic-skills .icon {
  color: var(--orange-bright);
  background: #fff0e8;
}
.topic-planning { border-top: 4px solid #35a8c4; }
.topic-skills { border-top: 4px solid var(--orange-bright); }
.topic-planning:hover { border-color: #35a8c4; }
.topic-skills:hover { border-color: var(--orange-bright); }

.category-overview-section {
  padding-bottom: 48px;
  background: #fff;
}
.category-nav {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}
.category-nav-card {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  align-items: center;
  gap: 15px;
  min-height: 118px;
  padding: 20px;
  color: var(--ink);
  text-decoration: none;
  background: #fff;
  border: 1px solid var(--line);
  border-top: 4px solid var(--teal);
  border-radius: 22px;
  box-shadow: 0 8px 22px rgba(23,57,95,.06);
  transition: transform .18s ease, box-shadow .18s ease;
}
.category-nav-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 30px rgba(23,57,95,.11);
}
.category-nav-card strong {
  display: block;
  font-size: 1.04rem;
  line-height: 1.2;
}
.category-nav-card small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  line-height: 1.35;
}
.category-nav-icon,
.category-title-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  padding: 12px;
  color: var(--teal);
  background: #e9f8f5;
  border-radius: 17px;
}
.category-nav-icon svg,
.category-title-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.category-nav-arrow {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #edf7f5;
  font-weight: 900;
}
.category-planning { border-top-color: #35a8c4; }
.category-planning .category-nav-icon {
  color: #147f9b;
  background: #e7f5fa;
}
.category-planning .category-nav-arrow { background: #e7f5fa; }
.category-skills { border-top-color: var(--orange-bright); }
.category-skills .category-nav-icon {
  color: var(--orange-bright);
  background: #fff0e8;
}
.category-skills .category-nav-arrow { background: #fff0e8; }
.category-more { border-top-color: var(--violet); }
.category-more .category-nav-icon {
  color: var(--violet);
  background: var(--violet-soft);
}
.category-more .category-nav-arrow { background: var(--violet-soft); }
.subject-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.category-math { border-top-color: var(--violet); }
.category-math .category-nav-icon {
  color: var(--violet);
  background: var(--violet-soft);
}
.category-math .category-nav-arrow { background: var(--violet-soft); }

.material-category-section {
  padding: 58px 0 66px;
  scroll-margin-top: 90px;
  border-top: 1px solid var(--line);
}
.category-language-section { background: #f8fcfb; }
.category-planning-section { background: #f4fafc; }
.category-skills-section { background: #fff9f5; }
.category-more-section { background: #faf8ff; }
.material-category-head {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  margin-bottom: 26px;
}
.material-category-head .category-title-icon {
  width: 68px;
  height: 68px;
  padding: 15px;
}
.material-category-head h2 {
  margin: 3px 0 4px;
  color: var(--ink);
  font-size: clamp(1.8rem, 4vw, 2.75rem);
  line-height: 1.08;
  letter-spacing: -.025em;
}
.material-category-head p {
  margin: 0;
  color: var(--muted);
}
.category-planning-section .category-title-icon {
  color: #147f9b;
  background: #dff2f7;
}
.category-skills-section .category-title-icon {
  color: var(--orange-bright);
  background: #ffe9dc;
}
.category-more-section .category-title-icon {
  color: var(--violet);
  background: var(--violet-soft);
}
.category-planning-section .eyebrow,
.planning-meta { color: #147f9b; }
.category-skills-section .eyebrow,
.skills-meta { color: var(--orange-bright); }
.category-more-section .eyebrow,
.more-meta { color: var(--violet); }
.category-material-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.category-material-grid .catalog-tile {
  max-width: 355px;
}

@media (max-width: 900px) {
  .topic-cards-six,
  .category-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .subject-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .category-material-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* v110: consistent navigation, trustworthy footer and accessible accents. */
:root { --orange-bright: #b44812; }
.nav a:first-child { color: #a92f64; }
.nav a.nav-current { color: var(--ink); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.new-label,
.latest-badge { background: #b44812; color: #fff; }
.category-skills-section .eyebrow,
.skills-meta { color: #a94314; }
.button.secondary { background: #70b9df; color: #17365f; }
.button.secondary:hover { background: #62acd2; color: #122f54; }
.footer-note a { color: var(--ink); font-weight: 750; text-decoration: none; }
.footer-note a:hover { text-decoration: underline; }
a:focus-visible,
button:focus-visible { outline: 3px solid #6549a6; outline-offset: 4px; }

@media (max-width: 860px) {
  .header-inner { gap: 10px; padding-left: 12px; padding-right: 12px; }
  .brand { min-width: 0; gap: 7px; }
  .brand img { width: 46px; height: 46px; flex: 0 0 46px; }
  .brand span { font-size: .8rem; white-space: nowrap; }
  .nav { display: flex; flex: 0 0 auto; gap: 9px; font-size: .72rem; white-space: nowrap; }
  .nav a { padding: 7px 0; }
}

@media (max-width: 390px) {
  .header-inner { padding-left: 9px; padding-right: 9px; }
  .brand img { width: 42px; height: 42px; flex-basis: 42px; }
  .brand span { display: none; }
  .nav { gap: 7px; font-size: .68rem; }
}
@media (max-width: 620px) {
  .topic-cards-six,
  .category-nav,
  .subject-nav,
  .category-material-grid { grid-template-columns: 1fr; }
  .category-nav-card { min-height: 102px; padding: 17px; }
  .material-category-section { padding: 44px 0 52px; }
  .material-category-head { grid-template-columns: 54px minmax(0, 1fr); gap: 14px; }
  .material-category-head .category-title-icon { width: 54px; height: 54px; padding: 12px; }
  .category-material-grid .catalog-tile { max-width: none; }
}

/* v103: one consistent EDUKASS wordmark across the whole site. */
.brand .brand-name b,
.footer-brand .brand-name b{
  color:#44bcb2;
  text-shadow:0 1px 0 var(--ink);
}
.brand .brand-name,
.footer-brand .brand-name{
  color:var(--ink);
}

/* v113: the complete EDUKASS lockup stays visible in every site header. */
.site-header .brand{
  flex-direction:column;
  justify-content:center;
  align-items:center;
  gap:0;
  line-height:1;
}
.site-header .brand img{
  width:54px;
  height:54px;
  flex:0 0 54px;
}
.site-header .brand .brand-name{
  display:block;
  margin-top:-2px;
  font-size:.78rem;
  line-height:1;
  white-space:nowrap;
}
@media (max-width:860px){
  .site-header .brand img{
    width:44px;
    height:44px;
    flex-basis:44px;
  }
  .site-header .brand .brand-name{
    display:block;
    font-size:.7rem;
  }
}
@media (max-width:390px){
  .site-header .brand .brand-name{display:block}
}

/* Metsloomad integration preview. The image URL comes from the material catalog. */
.metsloomad-page {
  background: linear-gradient(180deg, #f7fcf5 0, #fff 56%);
}
.metsloomad-layout {
  align-items: stretch;
}
.metsloomad-preview-panel {
  display: flex;
  min-height: 100%;
  padding: 14px;
  background: #fff;
}
.metsloomad-preview-art {
  position: relative;
  display: flex;
  flex: 1;
  min-height: 480px;
  padding: 30px;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  border-radius: 18px;
  color: #17365f;
  background-color: #eef8e8;
  background-image:
    var(--material-preview, none),
    radial-gradient(circle at 18% 24%, rgba(112, 217, 207, .65) 0 12%, transparent 12.5%),
    radial-gradient(circle at 78% 34%, rgba(255, 214, 92, .68) 0 14%, transparent 14.5%),
    linear-gradient(145deg, #e4f4dc, #f8f7df 54%, #dceff0);
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain, cover, cover, cover;
}
.metsloomad-info-panel {
  display: flex;
  padding: 34px;
  flex-direction: column;
  justify-content: center;
  border-color: #d9ead3;
  background: #f5fbf1;
}
.metsloomad-info-panel h1 {
  margin-bottom: 16px;
}
.metsloomad-info-panel > p {
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
}
.metsloomad-meta {
  color: #427a35;
}
.metsloomad-actions {
  display: grid;
  gap: 12px;
  margin-top: 30px;
}
.metsloomad-actions .button {
  width: 100%;
  min-height: 54px;
  padding: 10px 18px;
  text-align: center;
}
.metsloomad-print-button {
  border: 2px solid #427a35;
  color: #244d2c;
  background: #fff;
}
.metsloomad-print-button:hover {
  background: #edf7e9;
}
.home-new-card.home-new-metsloomad {
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
}
.home-new-card-visual.home-metsloomad-visual {
  padding: 16px;
  background: linear-gradient(145deg, #e7f4df, #edf8f6);
}
.home-metsloomad-visual .metsloomad-preview-art {
  width: 100%;
  min-height: 300px;
}
.metsloomad-catalog-art {
  min-height: 0;
  aspect-ratio: 16 / 10;
  padding: 20px;
  border-radius: 0;
  border-bottom: 1px solid var(--line);
}
@media (max-width: 860px) {
  .metsloomad-preview-art { min-height: 390px; }
  .home-new-card.home-new-metsloomad { grid-template-columns: 1fr; }
  .home-metsloomad-visual .metsloomad-preview-art { min-height: 290px; }
  .metsloomad-catalog-art { min-height: 0; }
}
@media (max-width: 520px) {
  .metsloomad-page { padding-top: 34px; }
  .metsloomad-preview-panel { padding: 10px; }
  .metsloomad-preview-art {
    min-height: 290px;
    padding: 20px;
  }
  .metsloomad-info-panel { padding: 24px 20px; }
  .metsloomad-actions { margin-top: 24px; }
  .metsloomad-actions .button {
    min-height: 52px;
    font-size: .88rem;
  }
  .home-metsloomad-visual .metsloomad-preview-art { min-height: 240px; }
  .metsloomad-catalog-art { min-height: 0; }
}
