/* ============================================================================
   Čonce — vizualne smernice, applied to the Klavirska ustvarjalnica archive.

   Palette, logo behaviour and type stack follow the brand guidelines:
   the logo appears only in black, white or a palette colour; the house
   silhouette doubles as the photo mask; headings are chunky and warm,
   body copy is Inter.
   ========================================================================= */

/* ---------------------------------------------------------------- tokens */

:root {
  /* Palette — exactly the seven brand colours */
  --indigo:  #0A0A78;
  --cyan:    #2AD8FF;
  --ice:     #DCF5FF;
  --mint:    #4ADCC2;
  --yellow:  #FFD760;
  --orange:  #FF6A00;
  --magenta: #C00A56;
  --black:   #000000;
  --white:   #FFFFFF;

  /* Roles */
  --ink: var(--indigo);
  --body: #16163a;
  --muted: #5a5a86;
  --page: var(--white);
  --surface: var(--white);
  --rule: #d8d8ec;
  --rule-strong: var(--indigo);

  /* Type — Olivita and Retail Variable are licensed faces; the closest
     widely available stand-ins are used, per "uporabi čim bolj podobnega".
     Drop real webfonts in and change only these three lines. */
  --font-display: "Baloo 2", "Olivita", system-ui, sans-serif;
  --font-head: "Archivo", "Retail Variable", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;

  --maxw: 1140px;
  --gap: 20px;
  --radius: 14px;
  --radius-sm: 10px;

  /* The house: roof peak at 50%, eaves at 26% */
  --house: polygon(50% 0%, 100% 26%, 100% 100%, 0% 100%, 0% 26%);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--page);
  color: var(--body);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { font-family: var(--font-head); color: var(--ink); line-height: 1.15; margin: 0; }

a { color: inherit; text-decoration: none; }
a.link { color: var(--magenta); text-decoration: underline; text-underline-offset: 2px; overflow-wrap: anywhere; }
a.link:hover { color: var(--orange); }

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

button { font: inherit; color: inherit; }

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

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--indigo); color: var(--white); padding: 12px 18px; font-weight: 700;
}
.skip:focus { left: 8px; top: 8px; }

/* ----------------------------------------------------------------- house */

.house { clip-path: var(--house); }

.logo {
  width: 42px; height: 42px; flex: none;
  display: block;
}
.logo .roofed { clip-path: var(--house); }

/* --------------------------------------------------------------- top bar */

.topbar {
  position: sticky; top: 0; z-index: 30;
  background: var(--indigo);
  color: var(--white);
}
.topbar-inner { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

.brandrow { display: flex; align-items: center; gap: 14px; padding: 14px 0 12px; }
.brandrow .brandname {
  font-family: var(--font-display);
  font-weight: 800; font-size: 22px; letter-spacing: -.01em;
  color: var(--white); margin: 0; line-height: 1.1;
}
.brandrow .sub {
  font-family: var(--font-body); font-size: 12px; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: var(--cyan);
}

.searchwrap { margin-left: auto; position: relative; display: flex; align-items: center; }
.searchwrap input {
  font-family: var(--font-body); font-size: 14px;
  width: 210px; padding: 9px 14px 9px 36px;
  border: 2px solid rgba(255,255,255,.25); border-radius: 999px;
  background: rgba(255,255,255,.08); color: var(--white);
}
.searchwrap input::placeholder { color: rgba(255,255,255,.6); }
.searchwrap input:focus { background: var(--white); color: var(--indigo); border-color: var(--cyan); outline: none; }
.searchwrap input:focus::placeholder { color: var(--muted); }
.searchwrap svg { position: absolute; left: 12px; width: 16px; height: 16px; opacity: .7; pointer-events: none; }
.searchwrap input:focus + svg { opacity: 1; }

nav.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
nav.tabs::-webkit-scrollbar { display: none; }
nav.tabs a {
  font-family: var(--font-head); font-weight: 700; font-size: 14.5px;
  letter-spacing: .01em; white-space: nowrap;
  padding: 10px 14px; border-radius: 10px 10px 0 0;
  color: rgba(255,255,255,.72);
}
nav.tabs a:hover { color: var(--white); background: rgba(255,255,255,.1); }
nav.tabs a.active { color: var(--indigo); background: var(--white); }

/* --------------------------------------------------------------- layout */

.wrap {
  max-width: var(--maxw); margin: 0 auto; padding: 26px 20px 60px;
  display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 26px; align-items: start;
}
.wrap.single { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 900px) { .wrap { grid-template-columns: minmax(0, 1fr); } .side { order: -1; } }

.card {
  background: var(--surface);
  border: 2px solid var(--rule);
  border-radius: var(--radius);
}
.card + .card { margin-top: 14px; }
.pad { padding: 20px; }

.section-title {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(28px, 4vw, 40px); letter-spacing: -.02em;
  margin: 0 0 18px;
}
.eyebrow {
  font-family: var(--font-body); font-size: 12px; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase; color: var(--muted);
  margin-bottom: 6px;
}

/* -------------------------------------------------------------- sidebar */

.side .hero {
  border-radius: calc(var(--radius) - 2px) calc(var(--radius) - 2px) 0 0;
  overflow: hidden; background: var(--ice);
}
.side .hero img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.side h2 { font-family: var(--font-display); font-weight: 800; font-size: 21px; margin-bottom: 2px; }
.side .url { font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
.side .desc { margin-top: 12px; white-space: pre-wrap; }

.stats { display: flex; border-top: 2px solid var(--rule); }
.stats div { flex: 1; text-align: center; padding: 14px 6px; }
.stats div + div { border-left: 2px solid var(--rule); }
.stats b { display: block; font-family: var(--font-display); font-weight: 800; font-size: 22px; color: var(--ink); }
.stats span { font-size: 11.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }

.palette-strip { display: flex; height: 8px; border-radius: 0 0 calc(var(--radius) - 2px) calc(var(--radius) - 2px); overflow: hidden; }
.palette-strip i { flex: 1; }

/* --------------------------------------------------------------- chips */

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.chip {
  font-family: var(--font-head); font-weight: 700; font-size: 13.5px;
  padding: 8px 16px; border-radius: 999px; cursor: pointer;
  border: 2px solid var(--rule); background: var(--white); color: var(--muted);
  transition: transform .12s ease;
}
.chip:hover { color: var(--ink); border-color: var(--ink); }
.chip:active { transform: translateY(1px); }
.chip.active { background: var(--c, var(--indigo)); border-color: var(--c, var(--indigo)); color: var(--white); }
.chip.active.on-light { color: var(--indigo); }

/* --------------------------------------------------------------- posts */

.post {
  position: relative; display: block; width: 100%; text-align: left;
  background: var(--surface); border: 2px solid var(--rule); border-radius: var(--radius);
  padding: 20px 20px 20px 26px; margin-bottom: 14px; cursor: pointer;
  transition: border-color .14s ease, transform .14s ease;
  overflow: hidden;
}
.post::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 8px;
  background: var(--c, var(--indigo));
}
.post:hover { border-color: var(--c, var(--indigo)); transform: translateY(-2px); }

.byline { display: flex; align-items: center; gap: 11px; }
.avatar { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; flex: none; background: var(--ice); }
.avatar.sm { width: 30px; height: 30px; }
.avatar.fallback {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-head); font-weight: 700; font-size: 13px;
  color: var(--white); background: var(--indigo);
}
.who { font-weight: 700; font-size: 14.5px; color: var(--ink); font-family: var(--font-head); }
.meta { font-size: 12.5px; color: var(--muted); }

.tag {
  display: inline-block; font-family: var(--font-body);
  font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 999px;
  background: var(--c, var(--indigo)); color: var(--white);
}
.tag.on-light { color: var(--indigo); }

.post h3 { font-family: var(--font-display); font-weight: 800; font-size: 21px; margin: 14px 0 8px; letter-spacing: -.01em; }
.body { white-space: pre-wrap; overflow-wrap: anywhere; }
.body.clamp { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }

.counts { display: flex; gap: 18px; align-items: center; margin-top: 16px; font-size: 13.5px; font-weight: 600; color: var(--muted); }
.counts b { color: var(--ink); }

.shot { margin-top: 16px; border-radius: var(--radius-sm); border: 2px solid var(--rule); }

/* ------------------------------------------------------------ comments */

.comments { border-top: 2px solid var(--rule); padding: 20px; }
.comments h4 { font-family: var(--font-head); font-size: 14px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 18px; }
.comment { display: flex; gap: 11px; margin-bottom: 16px; }
.bubble { background: var(--ice); border-radius: 4px 14px 14px 14px; padding: 12px 15px; flex: 1; min-width: 0; }
.bubble .body { margin-top: 3px; }
.replies { margin-left: 41px; padding-left: 14px; border-left: 2px solid var(--rule); }

/* ----------------------------------------------------------- classroom */

.module { margin-bottom: 12px; overflow: hidden; }
.module > summary {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 20px; background: var(--c, var(--indigo)); color: var(--white);
  cursor: pointer; list-style: none; user-select: none;
}
.module > summary::-webkit-details-marker { display: none; }
.module > summary:hover { filter: brightness(1.06); }
.module > summary:focus-visible { outline-offset: -4px; }
.module > summary .n {
  font-family: var(--font-display); font-weight: 800; font-size: 20px;
  width: 38px; height: 38px; flex: none; display: grid; place-items: center;
  background: rgba(255,255,255,.2); border-radius: 10px;
}
.module > summary h3 { font-family: var(--font-display); font-weight: 800; font-size: 19px; color: inherit; }
.module > summary .cnt { margin-left: auto; font-size: 13px; font-weight: 600; opacity: .85; white-space: nowrap; }
.module > summary .chev { flex: none; transition: transform .18s ease; }
.module[open] > summary .chev { transform: rotate(180deg); }
.module:not([open]) { border-color: transparent; }
.module > summary.on-light, .module > summary.on-light h3 { color: var(--indigo); }
.module > summary.on-light .n { background: rgba(10,10,120,.14); }

.modtools { display: flex; gap: 16px; margin: -6px 0 16px; }
.linkbtn {
  background: none; border: 0; padding: 0; cursor: pointer;
  font-family: var(--font-head); font-weight: 700; font-size: 13.5px; color: var(--muted);
}
.linkbtn:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

.lesson {
  display: flex; gap: 15px; align-items: center; width: 100%; text-align: left;
  padding: 13px 20px; border-top: 2px solid var(--rule); background: var(--white); cursor: pointer;
}
.lesson:first-of-type { border-top: 0; }
.lesson:hover { background: var(--ice); }
.lesson .thumb { width: 104px; aspect-ratio: 16/9; object-fit: cover; border-radius: 8px; flex: none; background: var(--ice); }
.lesson > span { min-width: 0; }
.lesson .t { display: block; font-family: var(--font-head); font-weight: 700; font-size: 15px; color: var(--ink); }
.lesson .d { display: block; font-size: 12.5px; color: var(--muted); margin-top: 3px; }

.video { position: relative; padding-top: 56.25%; background: var(--black); border-radius: var(--radius-sm); overflow: hidden; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.resources { margin-top: 26px; }
.resources h4 { font-family: var(--font-head); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.resources a {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 15px; border: 2px solid var(--rule); border-radius: var(--radius-sm);
  margin-bottom: 9px; font-weight: 600; color: var(--ink);
}
.resources a:hover { border-color: var(--magenta); color: var(--magenta); }
.resources .rl { flex: 1; min-width: 0; }
.resources .rk {
  font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); border: 1.5px solid var(--rule); border-radius: 999px; padding: 2px 8px;
}
.resources a:hover .rk { border-color: currentColor; color: inherit; }
.resources a[aria-disabled] { opacity: .55; cursor: default; }
.resources a[aria-disabled]:hover { border-color: var(--rule); color: var(--ink); }

.lessonnav { display: flex; gap: 12px; margin-top: 30px; }
.lessonnav a {
  flex: 1; padding: 14px 18px; border: 2px solid var(--rule); border-radius: var(--radius-sm);
  font-family: var(--font-head); font-weight: 700; color: var(--ink);
}
.lessonnav a:hover { border-color: var(--ink); background: var(--ice); }
.lessonnav a .l { display: block; font-family: var(--font-body); font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 3px; }
.lessonnav a.next { text-align: right; }

/* ------------------------------------------------------------- members */

.members { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.member { display: flex; gap: 13px; padding: 18px; align-items: flex-start; }
.member .n { font-family: var(--font-head); font-weight: 700; font-size: 15px; color: var(--ink); }
.member .b { font-size: 13.5px; color: var(--muted); white-space: pre-wrap; margin-top: 5px; }
.badge {
  display: inline-block; font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  padding: 2px 8px; border-radius: 999px; background: var(--orange); color: var(--white); margin-left: 7px;
  vertical-align: 2px;
}

/* -------------------------------------------------------- leaderboards */

.lbcard { overflow: hidden; margin-bottom: 16px; }
.lbcard > header { padding: 15px 20px; background: var(--c, var(--indigo)); color: var(--white); }
.lbcard > header h3 { font-family: var(--font-display); font-weight: 800; font-size: 18px; color: inherit; }
.lbcard > header.on-light, .lbcard > header.on-light h3 { color: var(--indigo); }
.lbrow { display: flex; align-items: center; gap: 13px; padding: 12px 20px; border-top: 2px solid var(--rule); }
.lbrow:first-of-type { border-top: 0; }
.rank {
  font-family: var(--font-display); font-weight: 800; font-size: 17px;
  width: 32px; height: 32px; flex: none; display: grid; place-items: center;
  border-radius: 8px; background: var(--ice); color: var(--indigo);
}
.rank.top { background: var(--yellow); }
.pts { margin-left: auto; font-family: var(--font-head); font-weight: 700; color: var(--ink); }

.levels { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.level { padding: 14px 16px; border: 2px solid var(--rule); border-radius: var(--radius-sm); }
.level b { font-family: var(--font-display); font-weight: 800; font-size: 17px; color: var(--ink); display: block; }
.level .bar { height: 7px; border-radius: 999px; background: var(--ice); margin-top: 9px; overflow: hidden; }
.level .bar i { display: block; height: 100%; background: var(--cyan); }
.level .pct { font-size: 12.5px; color: var(--muted); margin-top: 6px; }

/* -------------------------------------------------------------- events */

.event { display: flex; gap: 18px; padding: 20px; border-top: 2px solid var(--rule); }
.event:first-of-type { border-top: 0; }
.datechip {
  width: 68px; flex: none; text-align: center; padding: 10px 0 12px;
  background: var(--c, var(--magenta)); color: var(--white); border-radius: var(--radius-sm);
  align-self: flex-start;
}
.datechip .d { font-family: var(--font-display); font-weight: 800; font-size: 26px; line-height: 1; }
.datechip .m { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; margin-top: 3px; }
.event h3 { font-family: var(--font-display); font-weight: 800; font-size: 19px; margin-bottom: 5px; }

/* --------------------------------------------------------------- about */

.about-hero {
  position: relative; border-radius: var(--radius); overflow: hidden;
  background: var(--indigo); color: var(--white); padding: 48px 36px;
}
.about-hero h2 {
  position: relative; z-index: 1;
  font-family: var(--font-display); font-weight: 800; color: var(--white);
  font-size: clamp(32px, 6vw, 56px); letter-spacing: -.025em; margin-bottom: 14px;
  max-width: 15ch;
}
.about-hero .lead {
  position: relative; z-index: 1;
  font-size: 18px; white-space: pre-wrap; max-width: 54ch; color: rgba(255,255,255,.92);
}
.about-hero .houses { position: absolute; right: 26px; top: 22px; display: flex; gap: 12px; opacity: .26; pointer-events: none; }
.about-hero .houses i { width: 78px; height: 78px; display: block; clip-path: var(--house); }
.about-hero .houses i:nth-child(2) { transform: translateY(16px) rotate(-8deg); }
.about-hero .houses i:nth-child(3) { transform: translateY(-6px) rotate(7deg); }
@media (max-width: 680px) { .about-hero .houses { display: none; } }

.factgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 14px; margin-top: 16px; }
.fact { padding: 18px; border: 2px solid var(--rule); border-radius: var(--radius-sm); }
.fact b { display: block; font-family: var(--font-display); font-weight: 800; font-size: 30px; color: var(--ink); line-height: 1; }
.fact span { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }

/* -------------------------------------------------------------- misc */

.back {
  display: inline-flex; align-items: center; gap: 7px; margin-bottom: 16px;
  font-family: var(--font-head); font-weight: 700; font-size: 14px; color: var(--muted); cursor: pointer;
}
.back:hover { color: var(--ink); }

.empty { padding: 50px 24px; text-align: center; color: var(--muted); }
.empty .h { font-family: var(--font-display); font-weight: 800; font-size: 22px; color: var(--ink); margin-bottom: 8px; }

.foot { border-top: 2px solid var(--rule); margin-top: 36px; }
.foot .inner { max-width: var(--maxw); margin: 0 auto; padding: 26px 20px 50px; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.foot small { font-size: 12.5px; color: var(--muted); }

.notice { max-width: 620px; margin: 70px auto; text-align: center; padding: 0 20px; }
.notice .logo { width: 76px; height: 76px; margin: 0 auto 26px; }
.notice h2 { font-family: var(--font-display); font-weight: 800; font-size: 30px; margin-bottom: 14px; }
.notice p { color: var(--muted); }
.notice code { background: var(--ice); padding: 2px 7px; border-radius: 5px; font-size: .92em; color: var(--indigo); }

mark { background: var(--yellow); color: var(--black); border-radius: 3px; padding: 0 2px; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

@media (max-width: 560px) {
  .brandrow { flex-wrap: wrap; }
  .searchwrap { width: 100%; margin-left: 0; }
  .searchwrap input { width: 100%; }
  .lesson .thumb { width: 74px; }
  .about-hero { padding: 34px 22px; }
}

/* ---------------------------------------------- lesson prose (TipTap) */

.prose { margin-top: 24px; }
.prose > :first-child { margin-top: 0; }
.prose p { margin: 0 0 14px; }
.prose h2, .prose h3, .prose h4 {
  font-family: var(--font-display); font-weight: 800; color: var(--ink);
  margin: 26px 0 10px; line-height: 1.2;
}
.prose h2 { font-size: 22px; }
.prose h3 { font-size: 18px; }
.prose h4 { font-size: 16px; }
.prose ul, .prose ol { margin: 0 0 14px; padding-left: 24px; }
.prose li { margin-bottom: 7px; }
.prose li > p { margin: 0; }
.prose hr { border: 0; border-top: 2px solid var(--rule); margin: 24px 0; }
.prose blockquote {
  margin: 0 0 14px; padding: 2px 0 2px 16px;
  border-left: 4px solid var(--cyan); color: var(--muted);
}
.prose code { background: var(--ice); padding: 1px 6px; border-radius: 5px; font-size: .92em; }
.prose pre { background: var(--ice); padding: 14px; border-radius: 10px; overflow: auto; }
.prose strong { font-weight: 700; color: var(--ink); }

.ts {
  display: inline-block; font-variant-numeric: tabular-nums;
  background: var(--yellow); color: var(--black);
  padding: 0 6px; border-radius: 5px; font-weight: 700; font-size: .92em;
}

/* ------------------------------------------------------ action bar */

.actions { display: flex; gap: 10px; align-items: center; margin-top: 16px; }
.act {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 13px; border: 2px solid var(--rule); border-radius: 999px;
  font-size: 13.5px; color: var(--muted); cursor: default;
}
.act b { color: var(--ink); font-weight: 700; }

.skoollink { margin: 16px 0 0; text-align: right; font-size: 13.5px; }

/* ------------------------------------------------------------ polls */

.poll { margin-top: 18px; border: 2px solid var(--rule); border-radius: var(--radius-sm); padding: 16px; }
.pollrow + .pollrow { margin-top: 14px; }
.polltop { display: flex; gap: 12px; justify-content: space-between; font-weight: 600; }
.polltop b { color: var(--ink); font-variant-numeric: tabular-nums; }
.pollbar { height: 9px; border-radius: 999px; background: var(--ice); margin: 7px 0 4px; overflow: hidden; }
.pollbar i { display: block; height: 100%; background: var(--cyan); }
.pollfoot { margin-top: 14px; padding-top: 12px; border-top: 2px solid var(--rule); }
.pollhint { margin-top: 12px; font-size: 13px; font-weight: 600; color: var(--muted); }

/* ------------------------------------------------- levels and ranks */

.ava { position: relative; display: block; flex: none; line-height: 0; align-self: flex-start; }
.ava.sm { display: inline-block; vertical-align: middle; }
.lvl {
  position: absolute; right: -4px; bottom: -4px;
  min-width: 19px; height: 19px; padding: 0 4px;
  display: grid; place-items: center;
  background: var(--indigo); color: var(--white);
  border: 2px solid var(--white); border-radius: 999px;
  font-family: var(--font-head); font-weight: 800; font-size: 10.5px;
  font-variant-numeric: tabular-nums;
}
/* distinct from .rank on the leaderboard, which is a 32px tile */
.badge.place { background: var(--indigo); }
.dim { color: var(--muted); font-weight: 400; }
.pts small { font-weight: 500; color: var(--muted); font-size: 11.5px; }

/* --------------------------------------------------- read-only note */

.readonly {
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--ice); border: 2px solid #bfe6f7; border-radius: var(--radius-sm);
  padding: 12px 15px; margin-bottom: 18px; font-size: 13.5px; color: #0e3f56;
}
.readonly b { color: var(--indigo); }

/* ------------------------------------------------------------ about/SEO */

.about-hero h1 {
  position: relative; z-index: 1;
  font-family: var(--font-display); font-weight: 800; color: var(--white);
  font-size: clamp(32px, 6vw, 56px); letter-spacing: -.025em;
  margin: 0 0 8px; max-width: 15ch; line-height: 1.08;
}
.about-hero .tagline {
  position: relative; z-index: 1;
  margin: 0 0 16px; font-family: var(--font-head); font-weight: 700;
  font-size: clamp(15px, 2.3vw, 19px); color: var(--cyan);
}
.intro h2 {
  font-family: var(--font-display); font-weight: 800; font-size: 22px; margin-bottom: 10px;
}
.intro p { margin: 0 0 12px; }
.intro p:last-child { margin-bottom: 0; }


/* ------------------------------------------------------- members list */

.mlist { overflow: hidden; }
.mrow {
  display: grid; align-items: center; gap: 14px;
  grid-template-columns: 34px minmax(0, 1fr) auto 128px;
  padding: 10px 18px; border-top: 2px solid var(--rule);
}
.mrow:first-child { border-top: 0; }
.mrow:hover { background: var(--ice); }
.mname { font-family: var(--font-head); font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mstat { font-size: 13.5px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.mstat b { color: var(--ink); }
.mjoin { font-size: 12.5px; color: var(--muted); text-align: right; white-space: nowrap; }
.mrow .lvl { right: -5px; bottom: -5px; min-width: 17px; height: 17px; font-size: 9.5px; }
@media (max-width: 600px) {
  .mrow { grid-template-columns: 34px minmax(0, 1fr) auto; padding: 10px 14px; }
  .mjoin { display: none; }
}

/* ============================================================ accounts */

/* ------------------------------------------------------------- buttons */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-head); font-weight: 700; font-size: 14.5px; line-height: 1.2;
  padding: 10px 18px; border-radius: 999px; cursor: pointer; white-space: nowrap;
  border: 2px solid var(--indigo); background: var(--indigo); color: var(--white);
  transition: background .12s ease, border-color .12s ease, transform .12s ease;
}
.btn:hover { background: var(--magenta); border-color: var(--magenta); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .6; cursor: default; transform: none; }
.btn.ghost { background: transparent; color: var(--indigo); }
.btn.ghost:hover { background: var(--ice); border-color: var(--indigo); }
.btn.sm { font-size: 13px; padding: 6px 13px; }
.btn.wide { width: 100%; }
.btn.done { background: var(--mint); border-color: var(--mint); color: var(--indigo); }
.btn.done:hover { background: #3cc9b0; border-color: #3cc9b0; }

.linkbtn.danger:hover, .linkbtn.armed { color: var(--magenta); }
.linkbtn.armed { text-decoration: underline; text-underline-offset: 3px; }
.linkbtn:disabled { opacity: .5; cursor: default; }

/* ------------------------------------------------------- top bar account */

.account { display: flex; align-items: center; gap: 8px; flex: none; }
.topbar .btn { padding: 7px 14px; font-size: 13.5px; background: var(--white); border-color: var(--white); color: var(--indigo); }
.topbar .btn:hover { background: var(--cyan); border-color: var(--cyan); }
.topbar .btn.ghost { background: transparent; color: var(--white); border-color: rgba(255,255,255,.45); }
.topbar .btn.ghost:hover { border-color: var(--white); background: rgba(255,255,255,.1); }

.mechip {
  display: flex; align-items: center; gap: 8px; max-width: 190px;
  padding: 3px 13px 3px 3px; border-radius: 999px;
  background: rgba(255,255,255,.12); color: var(--white);
  font-family: var(--font-head); font-weight: 700; font-size: 14px;
}
.mechip:hover { background: rgba(255,255,255,.22); }
.mechip span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mechip .avatar { width: 30px; height: 30px; }
.mechip .avatar.fallback { background: var(--cyan); color: var(--indigo); }

.iconbtn {
  position: relative; display: grid; place-items: center; width: 36px; height: 36px; flex: none;
  border-radius: 50%; color: var(--white); background: rgba(255,255,255,.12);
}
.iconbtn:hover { background: rgba(255,255,255,.22); }
.dot {
  position: absolute; top: -4px; right: -4px; min-width: 19px; height: 19px; padding: 0 5px;
  display: grid; place-items: center; border-radius: 999px; border: 2px solid var(--indigo);
  background: var(--orange); color: var(--white); font-size: 11px; font-weight: 800; line-height: 1;
}
.dot[hidden] { display: none; }

@media (max-width: 560px) {
  .account { margin-left: auto; }
  .searchwrap { order: 3; }
  .mechip { padding-right: 3px; }
  .mechip span { display: none; }
}

/* --------------------------------------------------------------- forms */

.field { margin-bottom: 14px; }
.field label { display: block; font-family: var(--font-head); font-weight: 700; font-size: 13.5px; color: var(--ink); margin-bottom: 6px; }
.field .hint { font-size: 12.5px; color: var(--muted); margin-top: 5px; }

input[type="text"], input[type="email"], input[type="password"], textarea, select {
  width: 100%; font: inherit; font-size: 15px; line-height: 1.45; color: var(--body);
  background: var(--white); border: 2px solid var(--rule); border-radius: var(--radius-sm);
  padding: 10px 13px; transition: border-color .12s ease, box-shadow .12s ease;
}
textarea { resize: vertical; min-height: 64px; }
select { cursor: pointer; }
input[type="text"]:focus, input[type="email"]:focus, input[type="password"]:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--indigo); box-shadow: 0 0 0 3px rgba(42, 216, 255, .4);
}

.formrow { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 4px; }
.formrow.center { justify-content: center; }
.formmsg { margin: 10px 0 0; font-size: 14px; }
.formmsg:empty { display: none; }
.formmsg.err { color: var(--magenta); font-weight: 600; }
.formmsg.ok { color: #0b6b58; font-weight: 600; }
form.narrow { max-width: 420px; }
.pfgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
@media (max-width: 560px) { .pfgrid { grid-template-columns: 1fr; } }

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.center { text-align: center; }
.small { font-size: 14px; }
.lead { color: var(--muted); margin: 0 0 18px; }
.lead.muted { max-width: 62ch; }
.cardtitle { font-family: var(--font-display); font-weight: 800; font-size: 20px; margin-bottom: 14px; }

/* ---------------------------------------------------------- sign-in pages */

.authwrap { max-width: 440px; margin: 6px auto 0; }
.authcard { padding: 30px 28px 24px; }
.authcard .logo { width: 52px; height: 52px; margin-bottom: 16px; }
.authcard h2 { font-family: var(--font-display); font-weight: 800; font-size: 30px; letter-spacing: -.01em; margin-bottom: 10px; }
.authcard .lead { margin-bottom: 20px; }
.authcard form > .center { margin: 16px 0 0; }
.authfoot { text-align: center; margin-top: 16px; font-size: 14.5px; color: var(--muted); }

/* ------------------------------------------------------- members only */

.gate { text-align: center; padding: 44px 26px; }
.gate.inline { margin-top: 16px; padding: 32px 22px; }
.gate .ico {
  width: 54px; height: 54px; border-radius: 50%; margin: 0 auto 14px;
  display: grid; place-items: center; background: var(--ice); color: var(--indigo);
}
.gate .ico svg { width: 24px; height: 24px; }
.gate h2 { font-family: var(--font-display); font-weight: 800; font-size: 27px; margin-bottom: 10px; }
.gate p { color: var(--muted); max-width: 48ch; margin: 0 auto 18px; }
.gate form { text-align: left; margin: 0 auto; }
.gate .signout { margin: 20px auto 0; font-size: 13.5px; }
.claim { margin: 18px auto 0; max-width: 420px; text-align: left; }
.claim summary { cursor: pointer; text-align: center; font-family: var(--font-head); font-weight: 700; font-size: 13.5px; color: var(--muted); }
.claim summary:hover { color: var(--ink); }
.claim form { margin-top: 14px; }

.cta { display: flex; gap: 18px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-top: 16px; border-color: var(--indigo); }
.cta h2 { font-family: var(--font-display); font-weight: 800; font-size: 22px; margin-bottom: 4px; }
.cta p { margin: 0; color: var(--muted); max-width: 52ch; }

/* --------------------------------------------------------------- toast */

.toast {
  position: fixed; left: 50%; bottom: 22px; z-index: 60;
  transform: translate(-50%, 24px); opacity: 0; pointer-events: none;
  max-width: calc(100% - 32px); text-align: center;
  background: var(--indigo); color: var(--white);
  padding: 12px 20px; border-radius: 999px; font-weight: 600; font-size: 14.5px;
  box-shadow: 0 12px 30px rgba(10, 10, 120, .28);
  transition: opacity .18s ease, transform .18s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { background: var(--magenta); }

/* ------------------------------------------------- likes and post tools */

button.act { background: var(--white); cursor: pointer; font-family: var(--font-body); }
button.act:hover:not(:disabled) { border-color: var(--indigo); color: var(--indigo); }
button.act.on { background: var(--indigo); border-color: var(--indigo); color: var(--white); }
button.act.on b { color: var(--white); }
button.act:disabled { cursor: default; }
.act.sm { padding: 3px 10px; font-size: 12.5px; gap: 5px; }
.act.sm svg { width: 14px; height: 14px; }

.byline .tags { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.tools { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 14px; padding-top: 12px; border-top: 2px solid var(--rule); }

.composer-open {
  display: flex; align-items: center; gap: 12px; width: 100%; margin-bottom: 16px;
  padding: 12px 16px; cursor: text; text-align: left; color: var(--muted); font-size: 15px;
}
.composer-open:hover { border-color: var(--indigo); }
.composer { margin-bottom: 16px; }

.cmain { flex: 1; min-width: 0; }
.ctools { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 7px 0 0 4px; }
.ctools .linkbtn { font-size: 12.5px; }
.cform { display: flex; gap: 11px; margin-top: 12px; }
.comments > .cform { margin-top: 20px; padding-top: 18px; border-top: 2px solid var(--rule); }
.cform textarea, .cedit textarea { font-size: 14.5px; }
.cform .formrow, .cedit .formrow { margin-top: 8px; }
.cedit { margin-top: 6px; }

/* --------------------------------------------------------------- polls */

.pollopt {
  display: block; width: 100%; text-align: left; margin-top: 8px; padding: 11px 14px;
  border: 2px solid var(--rule); border-radius: var(--radius-sm); background: var(--white);
  cursor: pointer; font-weight: 600; color: var(--ink);
}
.pollopt:hover { border-color: var(--indigo); background: var(--ice); }
.pollopt:disabled { opacity: .6; cursor: default; }
.pollrow.mine .pollbar i { background: var(--mint); }
.minetag { display: inline-flex; align-items: center; gap: 3px; margin-left: 6px; font-size: 12px; font-weight: 700; color: #0b6b58; vertical-align: 1px; }

/* ------------------------------------------------------------ progress */

.progress { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: -4px 0 18px; font-size: 13.5px; font-weight: 600; color: var(--muted); }
.pbar { flex: 1; max-width: 320px; min-width: 120px; height: 9px; border-radius: 999px; background: var(--ice); overflow: hidden; }
.pbar i { display: block; height: 100%; background: var(--mint); border-radius: inherit; transition: width .3s ease; }

.lesson .ok, .lesson .lock { margin-left: auto; flex: none; }
.lesson .ok { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--mint); color: var(--indigo); }
.lesson .lock { color: var(--muted); opacity: .7; }
.lesson.nothumb { padding-top: 12px; padding-bottom: 12px; }
.lessonbar { display: flex; justify-content: flex-end; margin-top: 14px; }

/* ------------------------------------------------- my level, members */

.mylevel { display: flex; gap: 16px; align-items: center; margin-bottom: 16px; }
.mylevel > div { flex: 1; min-width: 0; }
.mylevel b { display: block; font-family: var(--font-display); font-weight: 800; font-size: 19px; color: var(--ink); }
.mylevel .pbar { max-width: none; margin: 8px 0 5px; }
.mylevel.compact { margin-bottom: 14px; padding: 16px; }
.mylevel.compact b { font-size: 17px; }
.avatar.lg { width: 84px; height: 84px; font-size: 28px; }
.mylevel .ava .lvl { right: -2px; bottom: -2px; }

.titlerow { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.mrow.me, .lbrow.me { background: var(--ice); }
.badge.you { background: var(--mint); color: var(--indigo); }
.mloc { margin-left: 8px; font-family: var(--font-body); font-weight: 400; font-size: 12.5px; color: var(--muted); }

/* ------------------------------------------------------------- profile */

.pfhead { display: flex; align-items: center; gap: 18px; margin-bottom: 20px; }
.pfname { display: block; font-family: var(--font-display); font-weight: 800; font-size: 22px; color: var(--ink); line-height: 1.2; }
.pfhead .meta { margin: 2px 0 10px; }
.filebtn { position: relative; }
.signoutcard { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.signoutcard b { font-family: var(--font-head); color: var(--ink); }

/* --------------------------------------------------------------- admin */

.ahead { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 26px 0 10px; }
.ahead:first-child { margin-top: 0; }
.ahead h3 { font-family: var(--font-display); font-weight: 800; font-size: 21px; }
.arow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 16px; align-items: center; padding: 14px 18px; border-top: 2px solid var(--rule); }
.arow:first-child { border-top: 0; }
.aname { min-width: 0; }
.aname b { display: block; font-family: var(--font-head); color: var(--ink); }
.aname .meta { overflow-wrap: anywhere; }
.aacts { display: flex; gap: 8px; align-items: center; }
.alink { grid-column: 1 / -1; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.alink select { width: auto; max-width: 280px; padding: 6px 10px; font-size: 14px; }
@media (max-width: 560px) { .arow { grid-template-columns: 1fr; } }

.cta + .modtools { margin-top: 16px; }

/* On a phone the account sits beside the name, so the sticky bar stays short;
   "Pridruži se" is offered on the page itself. */
@media (max-width: 560px) {
  .brandrow { gap: 10px; }
  .brandrow .logo { width: 36px; height: 36px; }
  .brandrow .brandname { font-size: 18px; }
  .brandrow .sub { display: none; }
  .account .btn:not(.ghost) { display: none; }
}

/* ====================================================== public pages */

.intro + .intro { margin-top: 16px; }
.intro h2 { margin-bottom: 12px; }
.intro ul.ticks { list-style: none; margin: 0; padding: 0; }
.intro ul.ticks li { position: relative; padding-left: 26px; margin-bottom: 8px; }
.intro ul.ticks li::before {
  content: ""; position: absolute; left: 2px; top: .42em; width: 12px; height: 12px;
  background: var(--mint); clip-path: var(--house);
}

.outline { margin: 0; padding: 0; list-style: none; counter-reset: part; }
.outline li {
  counter-increment: part; display: flex; align-items: baseline; gap: 12px;
  padding: 9px 0; border-top: 2px solid var(--rule);
}
.outline li:first-child { border-top: 0; }
.outline li::before {
  content: counter(part); flex: none; width: 28px; text-align: right;
  font-family: var(--font-display); font-weight: 800; color: var(--muted);
}
.outline b { font-family: var(--font-head); color: var(--ink); }
.outline .meta { margin-left: auto; white-space: nowrap; }

.faq h3 { font-family: var(--font-head); font-size: 16.5px; margin: 18px 0 6px; }
.faq h2 + h3 { margin-top: 4px; }
.faq p { color: var(--body); }

.syl { margin-top: 14px; }
.syl h2 { display: flex; align-items: center; gap: 12px; font-family: var(--font-display); font-weight: 800; font-size: 20px; }
.syl h2 .n {
  flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px;
  background: var(--indigo); color: var(--white); font-size: 17px;
}
.syl > .meta { margin: 4px 0 10px 46px; }
.syl ol { margin: 0 0 0 46px; padding: 0; list-style: none; }
.syl ol li { display: flex; gap: 12px; padding: 7px 0; border-top: 2px solid var(--rule); }
.syl ol li:first-child { border-top: 0; }
.syl ol li .meta { margin-left: auto; white-space: nowrap; }
@media (max-width: 560px) {
  .syl > .meta, .syl ol { margin-left: 0; }
}
