/* ==========================================================================
   АТЕЉЕ — школа ликовне културе
   Заједнички стил
   ========================================================================== */

@font-face {
  font-family: "Caveat";
  src: url("../fonts/caveat-cyrillic.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Caveat";
  src: url("../fonts/caveat-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0100-02AF, U+2000-206F, U+20AC, U+2122;
}

:root {
  --paper: #f8f3e5;
  --paper-hi: #fffdf6;
  --ink: #22262e;
  --muted: #5f6573;
  --line: #ddd6c3;

  --red: #d4452f;
  --orange: #e07f2f;
  --yellow: #e6ac1c;
  --green: #3d9469;
  --teal: #2b8f8a;
  --blue: #2f6fb5;
  --purple: #7a58a6;
  --pink: #d5669a;

  --grid: rgba(47, 111, 181, 0.12);

  --font-body: "Segoe UI", system-ui, -apple-system, "Noto Sans", Arial, sans-serif;
  --font-head: Georgia, "Times New Roman", "Noto Serif", serif;
  --font-hand: "Caveat", "Segoe Print", cursive;

  --radius: 14px;
  --shadow-card: 0 2px 0 rgba(34, 38, 46, 0.05);
  --shadow-pop: 0 10px 26px rgba(34, 38, 46, 0.1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}
[id] {
  scroll-margin-top: 110px;
}

body {
  margin: 0;
  overflow-x: clip;
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.62;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.045'/%3E%3C/svg%3E"),
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 160px 160px, 26px 26px, 26px 26px;
}

img,
svg {
  max-width: 100%;
}

/* ---------- Скролбар у стилу свеске ---------- */
html {
  scrollbar-width: thin;
  scrollbar-color: var(--blue) var(--paper);
}
::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}
::-webkit-scrollbar-track {
  background: var(--paper);
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--blue), var(--teal));
  border-radius: 8px;
  border: 3px solid var(--paper);
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--ink), var(--blue));
}
::-webkit-scrollbar-corner {
  background: var(--paper);
}

a {
  color: var(--blue);
  text-underline-offset: 3px;
}
a:hover {
  color: var(--red);
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-head);
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 1em;
}

hr {
  border: 0;
  border-top: 1.5px dashed var(--line);
  margin: 36px 0;
}

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Помоћне класе ---------- */

.wrap {
  width: min(1140px, 100% - 40px);
  margin-inline: auto;
}

.section {
  padding: 56px 0;
}
.section--tight {
  padding: 36px 0;
}

.kicker {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 10px;
}

.hand {
  font-family: var(--font-hand);
  font-weight: 600;
  line-height: 1.1;
}

.lead {
  font-size: 1.12rem;
  color: var(--muted);
  max-width: 64ch;
}

.muted {
  color: var(--muted);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 10px 0;
}
.skip:focus {
  left: 0;
  color: #fff;
}

mark,
.hl {
  background: linear-gradient(transparent 58%, rgba(230, 172, 28, 0.55) 58%);
  color: inherit;
  padding: 0 2px;
}

.red-pen {
  font-family: var(--font-hand);
  color: var(--red);
  font-size: 1.3em;
  font-weight: 600;
}

.ico {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

/* ---------- Заглавље ---------- */

.site-head {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(248, 243, 229, 0.94);
  backdrop-filter: blur(7px);
  border-bottom: 1.5px solid var(--line);
}

.head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  text-decoration: none;
  color: var(--ink);
}
.brand:hover {
  color: var(--ink);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 2px solid var(--ink);
  border-radius: 12px;
  background: var(--paper-hi);
  box-shadow: 3px 3px 0 rgba(34, 38, 46, 0.9);
  transform: rotate(-3deg);
  flex: none;
}
.brand-mark .ico {
  width: 26px;
  height: 26px;
  stroke-width: 1.8;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}
.brand-name {
  font-family: var(--font-hand);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.brand-tag {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 4px;
}

.head-note {
  font-family: var(--font-hand);
  font-size: 1.3rem;
  color: var(--muted);
  transform: rotate(-1deg);
  white-space: nowrap;
}
.head-note b {
  color: var(--red);
  font-weight: 600;
}

.site-nav {
  border-top: 1.5px dashed var(--line);
  background: rgba(255, 253, 246, 0.5);
}
.site-nav .wrap {
  display: flex;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}
.site-nav .wrap::-webkit-scrollbar {
  display: none;
}
.site-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 11px 13px 12px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: 9px 9px 0 0;
  border-bottom: 4px solid transparent;
  white-space: nowrap;
}
.site-nav a::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c, var(--blue));
  opacity: 0.5;
  transition: opacity 0.15s;
}
.site-nav a:hover {
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink);
}
.site-nav a[aria-current="page"] {
  background: var(--paper-hi);
  border-bottom-color: var(--c, var(--blue));
}
.site-nav a[aria-current="page"]::before {
  opacity: 1;
}

/* ---------- Подножје ---------- */

.site-foot {
  margin-top: 72px;
  border-top: 2px solid var(--ink);
  background: var(--paper-hi);
  padding: 40px 0 28px;
}
.foot-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 34px;
}
.foot-brand .brand-name {
  font-size: 1.95rem;
}
.foot-brand p {
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 36ch;
  margin-top: 8px;
}
.foot-title {
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 12px;
}
.foot-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 7px;
}
.foot-list a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.94rem;
}
.foot-list a:hover {
  color: var(--red);
  text-decoration: underline wavy;
}
.foot-school {
  margin-left: auto;
  text-align: right;
  font-size: 0.9em;
  letter-spacing: 0.04em;
  opacity: 0.45;
}

.foot-bottom {
  margin-top: 30px;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--muted);
}

/* ---------- Думића ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 20px;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: var(--paper-hi);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.97rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform 0.12s, box-shadow 0.12s, background 0.15s;
}
.btn:hover {
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 var(--ink);
  color: var(--ink);
}
.btn:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--ink);
}
.btn .ico {
  width: 19px;
  height: 19px;
}
.btn--red {
  background: var(--red);
  color: #fff;
}
.btn--red:hover {
  color: #fff;
}
.btn--sm {
  padding: 8px 14px;
  font-size: 0.88rem;
  box-shadow: 2px 2px 0 var(--ink);
}
.btn--ghost {
  background: transparent;
  border-style: dashed;
  box-shadow: none;
}
.btn--ghost:hover {
  box-shadow: none;
  transform: none;
  background: rgba(255, 255, 255, 0.6);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--paper-hi);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}
.chip::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--c, var(--green));
}
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

/* ---------- Насловна (hero) ---------- */

.hero {
  padding: 58px 0 30px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  gap: 52px;
  align-items: center;
}
.hero h1 {
  font-size: clamp(2.35rem, 5vw, 3.85rem);
  line-height: 1.04;
  margin-bottom: 20px;
}
.hero h1 em {
  font-style: normal;
  text-decoration: underline wavy var(--red) 3px;
  text-underline-offset: 9px;
  text-decoration-skip-ink: none;
}
.hero .lead {
  font-size: 1.13rem;
}

.hero-art {
  position: relative;
}
.paper-card {
  position: relative;
  background: var(--paper-hi);
  border: 1.5px solid var(--line);
  border-radius: 16px;
  padding: 24px 24px 18px;
  box-shadow: 7px 8px 0 rgba(34, 38, 46, 0.06), var(--shadow-pop);
  transform: rotate(-1.3deg);
}
.paper-card::before {
  content: "";
  position: absolute;
  top: -13px;
  left: 50%;
  width: 112px;
  height: 26px;
  transform: translateX(-50%) rotate(-2deg);
  background: repeating-linear-gradient(
    90deg,
    rgba(230, 172, 28, 0.42) 0 8px,
    rgba(230, 172, 28, 0.28) 8px 16px
  );
  border: 1px solid rgba(200, 150, 30, 0.35);
}
.hero-art svg.doodle {
  width: 100%;
  height: auto;
  display: block;
}
.art-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  font-family: var(--font-hand);
  font-size: 1.25rem;
  color: var(--muted);
}
.art-caption b {
  color: var(--red);
  font-weight: 600;
}
.swatch-row {
  display: flex;
  gap: 7px;
  margin-top: 4px;
}
.swatch-row span {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  border: 1.5px solid rgba(34, 38, 46, 0.25);
  background: var(--s);
  transform: rotate(-4deg);
}
.swatch-row span:nth-child(even) {
  transform: rotate(4deg);
}

/* ---------- Картице модула ---------- */

.sec-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}
.sec-head h2 {
  font-size: clamp(1.7rem, 3.2vw, 2.35rem);
  margin: 0;
}
.sec-head p {
  margin: 6px 0 0;
  color: var(--muted);
  max-width: 58ch;
}

.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 22px 20px 18px;
  background: var(--paper-hi);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  text-decoration: none;
  box-shadow: var(--shadow-card);
  transition: transform 0.16s, box-shadow 0.16s, border-color 0.16s;
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 5px;
  background: var(--c, var(--blue));
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-pop);
  border-color: var(--c, var(--blue));
  color: var(--ink);
}
.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
}
.card-ico {
  width: 42px;
  height: 42px;
  color: var(--c, var(--blue));
}
.card-ico .ico {
  width: 100%;
  height: 100%;
  stroke-width: 1.35;
}
.card-no {
  font-family: var(--font-hand);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--c, var(--blue));
}
.card h3 {
  font-size: 1.18rem;
  margin: 4px 0 0;
}
.card p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--muted);
}
.card .go {
  margin-top: auto;
  padding-top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--c, var(--blue));
}
.card .go .ico {
  width: 16px;
  height: 16px;
  transition: transform 0.15s;
}
.card:hover .go .ico {
  transform: translateX(3px);
}

/* ---------- Напомене, цитати ---------- */

.note {
  position: relative;
  background: #fff8c9;
  border: 1.5px solid #e6d27a;
  border-radius: 10px;
  padding: 16px 18px;
  font-size: 0.95rem;
  box-shadow: 2px 3px 0 rgba(34, 38, 46, 0.06);
  transform: rotate(-0.5deg);
  margin: 24px 0;
}
.note::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  border-width: 0 18px 18px 0;
  border-style: solid;
  border-color: transparent rgba(34, 38, 46, 0.08) transparent transparent;
}
.note strong {
  color: var(--ink);
}

.tip,
.warn {
  padding: 14px 18px;
  border-radius: 0 10px 10px 0;
  margin: 22px 0;
  font-size: 0.95rem;
}
.tip {
  border-left: 4px solid var(--green);
  background: rgba(61, 148, 105, 0.08);
}
.warn {
  border-left: 4px solid var(--red);
  background: rgba(212, 69, 47, 0.07);
}

.quote {
  position: relative;
  margin: 40px 0;
  padding: 26px 30px 22px 58px;
  background: var(--paper-hi);
  border: 1.5px solid var(--line);
  border-radius: 14px;
}
.quote::before {
  content: "„";
  position: absolute;
  left: 16px;
  top: 2px;
  font-family: var(--font-head);
  font-size: 4rem;
  line-height: 1;
  color: var(--red);
}
.quote p {
  font-family: var(--font-head);
  font-size: 1.22rem;
  line-height: 1.5;
  margin-bottom: 8px;
}
.quote cite {
  font-style: normal;
  font-size: 0.88rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

/* ---------- Наслов странице / лист ---------- */

.page-head {
  padding: 44px 0 10px;
  border-bottom: 1.5px dashed var(--line);
  margin-bottom: 8px;
}
.page-head h1 {
  font-size: clamp(2rem, 4.4vw, 3.1rem);
  margin-bottom: 12px;
  max-width: 22ch;
}
.page-head .lead {
  max-width: 66ch;
}
.ws-line {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  margin: 26px 0 6px;
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  flex-wrap: wrap;
}
.ws-line span {
  font-weight: 700;
}
.ws-line i {
  flex: 1 1 120px;
  min-width: 100px;
  border-bottom: 1.5px dashed var(--line);
  height: 20px;
}
.ws-line .ws-small {
  flex: 0 0 90px;
  min-width: 70px;
}

/* ---------- Лекције ---------- */

.lesson {
  display: grid;
  grid-template-columns: 114px 1fr;
  gap: 30px;
  padding: 42px 0;
  border-top: 1.5px dashed var(--line);
}
.lesson:first-of-type {
  border-top: 0;
}
.lesson-no {
  font-family: var(--font-hand);
  font-size: 3.3rem;
  font-weight: 700;
  line-height: 0.85;
  color: var(--c, var(--blue));
}
.lesson-no small {
  display: block;
  font-family: var(--font-body);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 10px;
  font-weight: 700;
}
.lesson h2 {
  font-size: clamp(1.5rem, 2.8vw, 2rem);
  margin-bottom: 12px;
}
.lesson-body {
  max-width: 72ch;
}
.lesson-body p {
  margin: 12px 0;
}
.lesson-body ul {
  margin: 14px 0;
  padding-left: 1.15em;
}
.lesson-body li {
  margin: 7px 0;
}
.lesson-body li::marker {
  color: var(--c, var(--blue));
}
.lesson-body h3 {
  font-size: 1.1rem;
  margin: 22px 0 8px;
  font-family: var(--font-body);
  font-weight: 700;
}
.term-inline {
  font-weight: 700;
  color: var(--ink);
  border-bottom: 2px solid var(--c, var(--blue));
}

/* ---------- Слике / примери ---------- */

.figure {
  margin: 26px 0;
  padding: 14px;
  background: var(--paper-hi);
  border: 1.5px solid var(--line);
  border-radius: 14px;
}
.figure svg {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  background: #fff;
}
.figure figcaption {
  font-family: var(--font-hand);
  font-size: 1.15rem;
  color: var(--muted);
  padding-top: 8px;
}

/* ---------- Halftone портрет: лупа над тачкама ---------- */
.halftone .ht-frame {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: #fff;
  border: 1.5px solid var(--line);
  cursor: zoom-in;
}
.ht-img {
  display: block;
  width: 100%;
  height: auto;
  filter: invert(1);
}
.ht-lens {
  position: absolute;
  top: 0;
  left: 0;
  width: 148px;
  height: 148px;
  border-radius: 50%;
  border: 3px solid var(--ink);
  box-shadow: 0 8px 22px rgba(34, 38, 46, 0.28), 0 0 0 4px rgba(255, 253, 246, 0.7);
  background: #fff;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%);
  transition: opacity 0.16s ease;
  z-index: 3;
}
.ht-lens.on {
  opacity: 1;
}
.ht-lens-img {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background-color: #fff;
  background-repeat: no-repeat;
  filter: invert(1);
}
.ht-tag {
  position: absolute;
  left: 12px;
  bottom: 12px;
  font-family: var(--font-hand);
  font-size: 1.05rem;
  color: var(--ink);
  background: rgba(255, 253, 246, 0.92);
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 2px 12px;
  transform: rotate(-1.5deg);
  pointer-events: none;
}
.ht-zoom {
  position: absolute;
  right: 12px;
  top: 12px;
  font-family: var(--font-hand);
  font-size: 1rem;
  color: #fff;
  background: var(--red);
  border-radius: 999px;
  padding: 1px 10px;
  transform: rotate(2deg);
  pointer-events: none;
}
.ht-hint {
  display: block;
  margin-top: 4px;
  font-size: 0.98rem;
  color: var(--blue);
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
  align-items: start;
}

/* ---------- Вежбе (лаб) ---------- */

.lab {
  margin: 30px 0;
  background: var(--paper-hi);
  border: 2px solid var(--ink);
  border-radius: 16px;
  box-shadow: 6px 6px 0 rgba(34, 38, 46, 0.08);
  overflow: hidden;
}
.lab-head {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 18px;
  border-bottom: 1.5px dashed var(--line);
  background: linear-gradient(rgba(47, 111, 181, 0.05), rgba(47, 111, 181, 0));
}
.badge {
  font-family: var(--font-hand);
  font-size: 1.25rem;
  font-weight: 700;
  background: var(--red);
  color: #fff;
  padding: 0 11px 2px;
  border-radius: 7px;
  transform: rotate(-2deg);
}
.lab-title {
  font-weight: 700;
  font-size: 1rem;
}
.lab-hint {
  margin-left: auto;
  font-family: var(--font-hand);
  font-size: 1.2rem;
  color: var(--muted);
}
.lab-body {
  padding: 18px;
}
.lab-body > p:first-child {
  margin-top: 0;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 14px;
}
.controls .ctl-label {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
  margin-right: 2px;
}
.chip-btn {
  font-family: var(--font-body);
  font-size: 0.87rem;
  font-weight: 600;
  padding: 7px 13px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.chip-btn:hover {
  border-color: var(--ink);
}
.chip-btn[aria-pressed="true"],
.chip-btn.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

input[type="range"] {
  accent-color: var(--red);
  width: 160px;
  max-width: 100%;
  cursor: pointer;
}

.canvas-box {
  position: relative;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #fffdf8;
}
.canvas-box canvas {
  display: block;
  width: 100%;
  height: auto;
  touch-action: none;
}
.readout {
  font-family: var(--font-hand);
  font-size: 1.25rem;
  color: var(--muted);
  margin: 12px 0 0;
}
.readout b {
  color: var(--red);
  font-weight: 600;
}
.swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}
.swatches .sw {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}
.swatches .sw i {
  display: block;
  width: 64px;
  height: 46px;
  border-radius: 8px;
  border: 1.5px solid rgba(34, 38, 46, 0.18);
  background: var(--s);
}

/* сцена за композицију */
.scene {
  position: relative;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #f3ecda;
  aspect-ratio: 3 / 2;
}
.scene > svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.gline {
  position: absolute;
  background: rgba(212, 69, 47, 0.75);
  pointer-events: none;
  z-index: 2;
}
.gline.v {
  top: 0;
  bottom: 0;
  width: 1.5px;
}
.gline.h {
  left: 0;
  right: 0;
  height: 1.5px;
}
.gline.d {
  top: 50%;
  left: -20%;
  width: 140%;
  height: 1.5px;
  transform-origin: center;
}
.scene-tag {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 3;
  background: rgba(255, 253, 246, 0.92);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 2px 9px;
  font-family: var(--font-hand);
  font-size: 1.05rem;
  color: var(--muted);
}

/* баланс */
.balance-stage {
  position: relative;
  height: 330px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background-color: #fffdf8;
  background-image:
    linear-gradient(rgba(47, 111, 181, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(47, 111, 181, 0.08) 1px, transparent 1px);
  background-size: 22px 22px;
  cursor: crosshair;
  touch-action: manipulation;
}
.balance-stage .center-line {
  position: absolute;
  inset: 0 auto 0 50%;
  border-left: 1.5px dashed rgba(212, 69, 47, 0.45);
  pointer-events: none;
}
.shape {
  position: absolute;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.shape.circle {
  border-radius: 50%;
}
.shape.tri {
  width: 0 !important;
  height: 0 !important;
  border-left: 22px solid transparent;
  border-right: 22px solid transparent;
  border-bottom: 38px solid var(--c, var(--red));
  background: none !important;
}
.marker {
  position: absolute;
  width: 18px;
  height: 18px;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 5;
}
.marker::before,
.marker::after {
  content: "";
  position: absolute;
  background: var(--ink);
}
.marker::before {
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1.5px;
  transform: translateX(-50%);
}
.marker::after {
  top: 50%;
  left: 0;
  right: 0;
  height: 1.5px;
  transform: translateY(-50%);
}
.marker span {
  position: absolute;
  inset: 4px;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  background: rgba(255, 253, 246, 0.6);
}

/* ---------- Квиз ---------- */

.quiz {
  background: var(--paper-hi);
  border: 2px solid var(--ink);
  border-radius: 16px;
  padding: 22px;
  box-shadow: 6px 6px 0 rgba(34, 38, 46, 0.08);
  margin: 26px 0;
}
.q-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}
.q-score {
  font-family: var(--font-hand);
  font-size: 1.25rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--red);
}
.q-text {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 14px;
  font-family: var(--font-head);
}
.q-opts {
  display: grid;
  gap: 8px;
}
.q-opt {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  text-align: left;
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.95rem;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.q-opt:hover:not(:disabled) {
  border-color: var(--ink);
}
.q-opt .k {
  font-family: var(--font-hand);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--muted);
  line-height: 1.15;
}
.q-opt.is-right {
  background: #e7f5ec;
  border-color: var(--green);
}
.q-opt.is-wrong {
  background: #fdeae6;
  border-color: var(--red);
}
.q-opt:disabled {
  cursor: default;
  opacity: 0.95;
}
.q-feedback {
  display: none;
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(47, 111, 181, 0.07);
  border-left: 3px solid var(--blue);
  font-size: 0.92rem;
}
.q-feedback.show {
  display: block;
}
.q-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  gap: 12px;
  flex-wrap: wrap;
}
.q-done {
  font-family: var(--font-hand);
  font-size: 1.5rem;
  color: var(--green);
}

/* ---------- Табела ---------- */

.table-scroll {
  overflow-x: auto;
  margin: 22px 0;
}
.table {
  width: 100%;
  min-width: 480px;
  border-collapse: collapse;
  font-size: 0.93rem;
  background: var(--paper-hi);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.table th {
  text-align: left;
  padding: 10px 13px;
  background: rgba(47, 111, 181, 0.08);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 1.5px solid var(--line);
}
.table td {
  padding: 10px 13px;
  border-bottom: 1px dashed var(--line);
  vertical-align: top;
}
.table tr:last-child td {
  border-bottom: 0;
}

/* ---------- Задаци / чеклиста ---------- */

.tasks {
  counter-reset: task;
  list-style: none;
  padding: 0;
  margin: 20px 0;
  display: grid;
  gap: 10px;
}
.tasks li {
  counter-increment: task;
  position: relative;
  padding: 12px 16px 12px 48px;
  background: var(--paper-hi);
  border: 1.5px solid var(--line);
  border-radius: 10px;
  font-size: 0.95rem;
}
.tasks li::before {
  content: counter(task);
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--c, var(--blue));
  color: #fff;
  font-family: var(--font-hand);
  font-size: 1.05rem;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.checklist {
  list-style: none;
  padding: 0;
  margin: 18px 0;
  display: grid;
  gap: 8px;
}
.checklist label {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  padding: 11px 14px;
  background: var(--paper-hi);
  border: 1.5px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.94rem;
}
.checklist input {
  margin-top: 4px;
  width: 17px;
  height: 17px;
  accent-color: var(--green);
  flex: none;
}
.checklist input:checked + span {
  text-decoration: line-through;
  color: var(--muted);
}

/* ---------- Речник ---------- */

.search-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 22px 0 14px;
  flex-wrap: wrap;
}
.search-row input {
  flex: 1 1 260px;
  min-width: 200px;
  padding: 11px 15px;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: var(--paper-hi);
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
}
.search-row input::placeholder {
  color: #9a9c9f;
}
.alpha {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}
.alpha button {
  width: 31px;
  height: 31px;
  border-radius: 8px;
  border: 1.5px solid var(--line);
  background: var(--paper-hi);
  font-family: var(--font-hand);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
}
.alpha button:hover {
  border-color: var(--ink);
}
.alpha button.is-active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.terms {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.term {
  background: var(--paper-hi);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 0 16px;
  height: max-content;
}
.term[open] {
  border-color: var(--ink);
  box-shadow: 3px 3px 0 rgba(34, 38, 46, 0.07);
}
.term summary {
  list-style: none;
  cursor: pointer;
  padding: 13px 0;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}
.term summary::-webkit-details-marker {
  display: none;
}
.term summary::after {
  content: "+";
  margin-left: auto;
  font-family: var(--font-hand);
  font-size: 1.4rem;
  color: var(--red);
  line-height: 1;
}
.term[open] summary::after {
  content: "–";
}
.term summary .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--c, var(--blue));
  flex: none;
}
.term .def {
  padding: 0 0 14px;
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.6;
}
.term .def b {
  color: var(--ink);
}
.empty-note {
  font-family: var(--font-hand);
  font-size: 1.4rem;
  color: var(--muted);
  padding: 16px 0;
}

/* ---------- Радионица ---------- */

.studio {
  display: grid;
  grid-template-columns: 1fr 236px;
  gap: 18px;
  align-items: start;
}
.studio-canvas {
  position: relative;
  border: 2px solid var(--ink);
  border-radius: 14px;
  overflow: hidden;
  background-color: #fffdf8;
  background-image:
    linear-gradient(rgba(47, 111, 181, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(47, 111, 181, 0.07) 1px, transparent 1px);
  background-size: 24px 24px;
  aspect-ratio: 16 / 10;
  cursor: crosshair;
  touch-action: none;
}
.studio-canvas canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.studio-tools {
  display: grid;
  gap: 14px;
  background: var(--paper-hi);
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 16px;
}
.tool-title {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 8px;
}
.tool-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tool-btn {
  border: 1.5px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  border-radius: 9px;
  padding: 7px 10px;
  font-family: var(--font-body);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.tool-btn .ico {
  width: 17px;
  height: 17px;
}
.tool-btn:hover {
  border-color: var(--ink);
}
.tool-btn.is-active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.palette {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
}
.palette button {
  height: 32px;
  border-radius: 8px;
  border: 2px solid rgba(34, 38, 46, 0.2);
  background: var(--s);
  cursor: pointer;
  position: relative;
}
.palette button.is-active {
  border-color: var(--ink);
  box-shadow: 0 0 0 2px var(--paper-hi) inset;
}
.palette button.is-active::after {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1.5px solid #fff;
  background: rgba(0, 0, 0, 0.35);
  transform: translate(-50%, -50%);
}
/* ---------- Именоване боје (падајући мени) ---------- */
.color-picker {
  position: relative;
  margin-top: 10px;
}
.cp-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 11px;
  background: var(--paper);
  color: var(--ink);
  border: 1.5px solid var(--line);
  border-radius: 11px;
  cursor: pointer;
  font-family: var(--font-body);
  text-align: left;
  box-shadow: 2px 3px 0 rgba(34, 38, 46, 0.06);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.cp-trigger:hover {
  border-color: var(--ink);
}
.cp-trigger:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}
.color-picker.open .cp-trigger {
  border-color: var(--ink);
  box-shadow: 3px 4px 0 rgba(34, 38, 46, 0.1);
}
.cp-swatch {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  flex: none;
  background: var(--s, #22262e);
  border: 2px solid rgba(34, 38, 46, 0.28);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.45), 0 1px 2px rgba(34, 38, 46, 0.2);
}
.cp-label {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  line-height: 1.15;
}
.cp-name {
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: 1.25rem;
}
.cp-sub {
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.cp-caret {
  width: 18px;
  height: 18px;
  flex: none;
  color: var(--muted);
  transition: transform 0.25s ease;
}
.color-picker.open .cp-caret {
  transform: rotate(180deg);
}
.cp-panel {
  position: absolute;
  z-index: 60;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  max-height: 330px;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--paper-hi);
  border: 1.5px solid var(--ink);
  border-radius: 14px;
  box-shadow: 6px 8px 0 rgba(34, 38, 46, 0.08), var(--shadow-pop);
  padding: 8px;
  scrollbar-width: thin;
  scrollbar-color: var(--blue) var(--paper);
}
.cp-panel::-webkit-scrollbar {
  width: 10px;
}
.cp-panel::-webkit-scrollbar-track {
  background: var(--paper);
  border-radius: 8px;
}
.cp-panel::-webkit-scrollbar-thumb {
  background: var(--blue);
  border-radius: 8px;
  border: 2px solid var(--paper-hi);
}
.cp-panel::-webkit-scrollbar-thumb:hover {
  background: var(--ink);
}
.cp-group + .cp-group {
  margin-top: 6px;
  border-top: 1px dashed var(--line);
  padding-top: 6px;
}
.cp-group-title {
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--muted);
  padding: 4px 8px 6px;
}
.cp-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 7px 8px;
  border: 0;
  background: transparent;
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-body);
  color: var(--ink);
}
.cp-opt:hover {
  background: rgba(47, 111, 181, 0.09);
}
.cp-opt:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: -2px;
}
.cp-opt[aria-selected="true"] {
  background: rgba(47, 111, 181, 0.14);
}
.cp-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  flex: none;
  background: var(--s);
  border: 2px solid rgba(34, 38, 46, 0.25);
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.4);
}
.cp-opt-text {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  line-height: 1.2;
}
.cp-opt-name {
  font-weight: 700;
  font-size: 0.92rem;
}
.cp-opt-desc {
  font-size: 0.76rem;
  color: var(--muted);
}
.cp-check {
  width: 16px;
  height: 16px;
  flex: none;
  color: var(--green);
  opacity: 0;
}
.cp-opt[aria-selected="true"] .cp-check {
  opacity: 1;
}
.paint-info {
  margin-top: 10px;
}
.prompt-box {
  background: #fff8c9;
  border: 1.5px solid #e6d27a;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 0.92rem;
  min-height: 76px;
}
.prompt-box .hand {
  display: block;
  font-size: 1.3rem;
  color: var(--red);
  margin-bottom: 3px;
}
.studio-foot {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}

/* ---------- Разно ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  counter-reset: step;
}
.step {
  position: relative;
  background: var(--paper-hi);
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 22px 20px;
}
.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  top: -16px;
  left: 18px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--c, var(--blue));
  color: #fff;
  font-family: var(--font-hand);
  font-size: 1.25rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  border: 2px solid var(--paper-hi);
}
.step h3 {
  margin: 10px 0 6px;
  font-size: 1.05rem;
  font-family: var(--font-body);
  font-weight: 700;
}
.step p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--muted);
}

.big-cta {
  margin-top: 44px;
  background: var(--ink);
  color: var(--paper-hi);
  border-radius: 18px;
  padding: 34px 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
  flex-wrap: wrap;
  position: relative;
  overflow: hidden;
}
.big-cta::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 26px 26px;
  pointer-events: none;
}
.big-cta h2 {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  margin: 0 0 4px;
  color: var(--paper-hi);
}
.big-cta p {
  margin: 0;
  color: rgba(255, 253, 246, 0.7);
  font-size: 0.96rem;
}
.big-cta .btn {
  position: relative;
  z-index: 1;
  flex: none;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

/* ---------- Адаптивно ---------- */

@media (max-width: 1040px) {
  .cards {
    grid-template-columns: repeat(2, 1fr);
  }
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .hero-art {
    max-width: 460px;
  }
  .studio {
    grid-template-columns: 1fr;
  }
  .studio-tools {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
  .foot-grid {
    grid-template-columns: 1fr 1fr;
  }
  .foot-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 900px) {
  .head-note {
    display: none;
  }
  .terms {
    grid-template-columns: 1fr;
  }
  .steps {
    grid-template-columns: 1fr;
    gap: 26px;
  }
  .studio-tools {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  body {
    font-size: 16px;
  }
  .site-head {
    position: static;
  }
  .head-row {
    padding: 10px 0;
  }
  .brand-mark {
    width: 40px;
    height: 40px;
  }
  .brand-name {
    font-size: 1.3rem;
  }
  .brand-tag {
    font-size: 0.64rem;
  }
  .lesson {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 32px 0;
  }
  .lesson-no {
    font-size: 2.5rem;
    display: flex;
    align-items: baseline;
    gap: 10px;
  }
  .lesson-no small {
    margin-top: 0;
  }
  .grid-2 {
    grid-template-columns: 1fr;
  }
  .section {
    padding: 42px 0;
  }
  .hero {
    padding: 36px 0 18px;
  }
  .balance-stage {
    height: 260px;
  }
  .big-cta {
    padding: 26px 22px;
  }
  .page-head {
    padding: 30px 0 6px;
  }
  .q-opt {
    font-size: 0.92rem;
  }
}

@media (max-width: 560px) {
  .wrap {
    width: calc(100% - 28px);
  }
  .cards {
    grid-template-columns: 1fr;
  }
  .lab-body {
    padding: 14px;
  }
  .lab-head {
    padding: 10px 14px;
  }
  .lab-hint {
    margin-left: 0;
    width: 100%;
    font-size: 1.05rem;
  }
  .hero h1 {
    font-size: 2.25rem;
  }
  .foot-grid {
    grid-template-columns: 1fr;
    gap: 26px;
  }
  .cta-row .btn {
    flex: 1 1 100%;
  }
  .swatches .sw i {
    width: 52px;
    height: 40px;
  }
  .search-row input {
    flex: 1 1 100%;
  }
  .ws-line i {
    flex: 1 1 80px;
  }
}

/* ---------- Додатне вежбе ---------- */

.color-lab {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 26px;
  align-items: center;
}
#color-wheel {
  width: 250px;
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  cursor: crosshair;
  touch-action: none;
}

.panel-board {
  max-width: 400px;
  margin: 0 auto;
}
.panel-board svg {
  display: block;
  width: 100%;
  height: auto;
  background: #f3ecda;
  border: 1.5px solid var(--line);
  border-radius: 12px;
}

.reading-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 16px 0;
}
.reading-strip[data-dir="rtl"] {
  direction: rtl;
}
.rpanel {
  position: relative;
  aspect-ratio: 4 / 5;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: #fffdf8;
  display: grid;
  place-items: center;
}
.rpanel b {
  font-family: var(--font-hand);
  font-size: 2.5rem;
  color: var(--red);
  line-height: 1;
}
.rpanel span {
  position: absolute;
  bottom: 5px;
  left: 8px;
  font-size: 0.62rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}
.reading-strip .rpanel:nth-child(1) { background: #fdf1ea; }
.reading-strip .rpanel:nth-child(2) { background: #eef5fb; }
.reading-strip .rpanel:nth-child(3) { background: #f0f7f1; }
.reading-strip .rpanel:nth-child(4) { background: #f7f0fb; }

.expr-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 20px 0;
}
.expr {
  background: #fffdf8;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 10px 8px 6px;
  text-align: center;
}
.expr svg {
  width: 100%;
  height: auto;
  display: block;
}
.expr span {
  display: block;
  font-family: var(--font-hand);
  font-size: 1.2rem;
  color: var(--muted);
  margin-top: 2px;
}

.logo-board {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background-color: #fffdf8;
  background-image:
    linear-gradient(rgba(47, 111, 181, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(47, 111, 181, 0.08) 1px, transparent 1px);
  background-size: 24px 24px;
  overflow: hidden;
  padding: 16px;
  transition: background-color 0.2s;
}
.logo-board svg {
  width: min(330px, 100%);
  height: auto;
}
.logo-board [data-layer="neg"] {
  display: none;
}
.logo-board[data-neg="on"] {
  background-color: #22262e;
  background-image: none;
}
.logo-board[data-neg="on"] [data-layer="normal"] {
  display: none;
}
.logo-board[data-neg="on"] [data-layer="neg"] {
  display: block;
}
.logo-board [data-guides] {
  opacity: 0;
  transition: opacity 0.2s;
}
.logo-board[data-guides="on"] [data-guides] {
  opacity: 1;
}

.types {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 24px 0;
}
.type {
  background: var(--paper-hi);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 16px 18px;
}
.type h3 {
  font-family: var(--font-body);
  font-size: 0.98rem;
  font-weight: 700;
  margin: 0 0 4px;
}
.type p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}
.type .tag-mini {
  font-family: var(--font-hand);
  font-size: 1.15rem;
  color: var(--red);
}

.compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 22px 0;
}
.compare > div {
  background: var(--paper-hi);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 16px 18px;
}
.compare h3 {
  font-family: var(--font-body);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.compare ul {
  margin: 0;
  padding-left: 1.1em;
  font-size: 0.93rem;
}
.compare li {
  margin: 6px 0;
}

@media (max-width: 900px) {
  .types {
    grid-template-columns: 1fr 1fr;
  }
  .color-lab {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .expr-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 620px) {
  .types,
  .compare {
    grid-template-columns: 1fr;
  }
  .reading-strip {
    grid-template-columns: 1fr 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html:not(.motion-on) *,
  html:not(.motion-on) *::before,
  html:not(.motion-on) *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Градиво по разредима ---------- */

.grade-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 26px 0 22px;
}
.grade-tab {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 12px;
  border: 1.5px solid var(--line);
  background: var(--paper-hi);
  cursor: pointer;
  color: var(--ink);
  box-shadow: var(--shadow-card);
}
.grade-tab .gt-no {
  font-family: var(--font-hand);
  font-size: 1.9rem;
  font-weight: 700;
  line-height: 1;
  color: var(--c, var(--blue));
}
.grade-tab .gt-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
}
.grade-tab[aria-selected="true"] {
  background: var(--c, var(--blue));
  border-color: var(--c, var(--blue));
}
.grade-tab[aria-selected="true"] .gt-no,
.grade-tab[aria-selected="true"] .gt-label {
  color: #fff;
}
.grade-panel {
  margin-top: 8px;
}
body.js-tabs .grade-panel {
  display: none;
}
body.js-tabs .grade-panel.is-active {
  display: block;
}
.g-head {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  flex-wrap: wrap;
  padding: 20px 22px;
  background: var(--paper-hi);
  border: 1.5px solid var(--line);
  border-left: 6px solid var(--c, var(--blue));
  border-radius: var(--radius);
  margin-bottom: 20px;
}
.g-no {
  font-family: var(--font-hand);
  font-size: 4rem;
  font-weight: 700;
  line-height: 0.9;
  color: var(--c, var(--blue));
}
.g-head-text {
  flex: 1 1 260px;
}
.g-head-text h2 {
  margin: 0 0 6px;
  font-size: 1.5rem;
}
.g-head-text p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}
.g-progress {
  flex: 0 0 180px;
  min-width: 160px;
}
.domain-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.domain {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px 18px 14px;
  background: var(--paper-hi);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.domain::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 5px;
  background: var(--c, var(--blue));
}
.domain-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}
.domain-ico {
  width: 30px;
  height: 30px;
  color: var(--c, var(--blue));
  flex: 0 0 auto;
}
.domain-ico .ico {
  width: 100%;
  height: 100%;
  stroke-width: 1.5;
}
.domain h3 {
  margin: 0;
  font-size: 1.12rem;
}
.topic-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
}
.topic-list li {
  margin: 2px 0;
}
.domain-foot {
  margin-top: auto;
  padding-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px dashed var(--line);
}
.domain .go {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--c, var(--blue));
  text-decoration: none;
}
.domain .go .ico {
  width: 15px;
  height: 15px;
}
.done-check {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.82rem;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}
.done-check input {
  width: 17px;
  height: 17px;
  accent-color: var(--c, var(--green));
  cursor: pointer;
}
.done-check input:checked + span {
  color: var(--ink);
  font-weight: 600;
}
.art-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 22px 0 6px;
}
.art-title {
  font-size: 1.3rem;
  color: var(--ink);
  margin-right: 6px;
}
.art-chip {
  font-size: 0.85rem;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(47, 111, 181, 0.08);
  border: 1.5px solid var(--line);
  color: var(--ink);
}

@media (max-width: 900px) {
  .domain-grid {
    grid-template-columns: 1fr;
  }
  .g-progress {
    flex: 1 1 100%;
  }
}
@media (max-width: 560px) {
  .grade-tab {
    padding: 8px 16px;
  }
  .grade-tab .gt-no {
    font-size: 1.6rem;
  }
  .g-no {
    font-size: 3.2rem;
  }
}
