/* Mahnı pilləkəni (/learn/pilleken) and the certificate check (/cert/<code>), owner 2026-11-11 task 11.
   Builds on proto.css + home.css; colours from the theme; the certificate uses its own paper and gold. */
.ld { max-width: 760px; padding-top: 12px; padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
.ld .crumb, .ld-crumb { display: block; width: fit-content; margin-bottom: 10px; padding: 0; border: 0; background: none; font: inherit; font-size: 0.85rem; font-weight: 700; color: var(--muted); text-decoration: none; cursor: pointer; }
.ld h1 { font-size: 1.6rem; margin-top: 4px; }
.ld .lead { margin-top: 4px; color: var(--ink-2); }
.ld-lbl { margin: 16px 0 6px; font-size: 0.68rem; font-weight: 900; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.ld-hero { display: grid; gap: 2px; width: 100%; margin-top: 12px; padding: 13px 15px; border: 0; border-radius: 16px; background: linear-gradient(135deg, var(--ink-bg), color-mix(in srgb, var(--teal) 65%, var(--ink-bg))); color: #fff; text-align: left; font: inherit; cursor: pointer; }
.ld-hero b { font-size: 1.05rem; } .ld-hero small { font-weight: 700; opacity: 0.88; font-size: 0.78rem; }
.ld-bar { display: block; height: 8px; border-radius: 9px; background: rgba(255, 255, 255, 0.22); margin-top: 8px; overflow: hidden; }
.ld-bar i { display: block; height: 100%; width: 0; border-radius: 9px; background: var(--gold); transition: width 0.4s; }
.ld-path { list-style: none; margin: 14px 0 0; padding: 0; position: relative; }
.ld-path::before { content: ''; position: absolute; left: 24px; top: 24px; bottom: 24px; width: 3px; background: repeating-linear-gradient(var(--line) 0 6px, transparent 6px 11px); }
.ld-lv { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; position: relative; }
.ld-n { flex: none; width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; font-size: 1.1rem; color: #fff; background: var(--line); border: 3px solid var(--paper); box-shadow: 0 0 0 2px var(--line); z-index: 1; }
.ld-lv.done .ld-n { background: var(--ok); box-shadow: 0 0 0 2px var(--ok); }
.ld-lv.now .ld-n { background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 30%, transparent); }
.ld-tx { flex: 1; min-width: 0; display: grid; gap: 1px; padding: 10px 12px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); color: var(--ink); text-align: left; font: inherit; cursor: pointer; }
.ld-lv.now .ld-tx { border: 2px solid var(--accent); }
.ld-lv.lock { opacity: 0.6; }
.ld-tx b { font-size: 0.9rem; } .ld-tx small { font-size: 0.74rem; font-weight: 700; color: var(--muted); }
.ld-md { flex: none; font-size: 0.68rem; font-weight: 900; padding: 3px 8px; border-radius: 7px; }
.ld-md.bronze { background: #f1dcc6; color: #8a4b14; } .ld-md.silver { background: #e3e6ec; color: #4a5263; } .ld-md.gold { background: #f6e7b0; color: #7a5a00; }
.ld-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.ld-badges.center { justify-content: center; margin-top: 14px; }
.ld-badge { padding: 6px 10px; border-radius: 99px; background: var(--card); border: 1px solid var(--line); font-size: 0.74rem; font-weight: 800; }
.ld-placecard { display: grid; gap: 2px; width: 100%; margin-top: 14px; padding: 12px 14px; border: 1px dashed var(--line); text-align: left; font: inherit; color: var(--ink); cursor: pointer; }
.ld-placecard b { font-size: 0.9rem; } .ld-placecard span { font-size: 0.8rem; font-weight: 700; color: var(--muted); }
.ld-free { margin: 10px 0 0; padding: 9px 12px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-ink); font-size: 0.84rem; font-weight: 800; }
.ld-note, .ld-rules { margin: 10px 0 0; font-size: 0.8rem; font-weight: 700; color: var(--muted); line-height: 1.45; }
/* a level */
.ld-top { display: flex; align-items: center; gap: 10px; }
.ld .icon-btn { width: 42px; height: 42px; flex: none; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); cursor: pointer; }
.ld-name { flex: 1; min-width: 0; display: grid; }
.ld-name b { font-size: 1.1rem; } .ld-name span { color: var(--muted); font-weight: 800; font-size: 0.8rem; }
.ld-prog { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.ld-prog .ld-bar { flex: 1; margin: 0; background: var(--paper-2); }
.ld-prog small { flex: none; font-size: 0.76rem; font-weight: 900; color: var(--muted); }
.ld-list { display: grid; gap: 7px; }
.ld-song { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 13px; background: var(--card); color: var(--ink); text-decoration: none; font: inherit; text-align: left; }
.ld-song:hover { border-color: var(--accent); }
.ld-song.ok { border-color: color-mix(in srgb, var(--ok) 55%, var(--line)); }
.ld-ic { flex: none; width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; font-weight: 900; color: #fff; background: var(--teal); }
.ld-song.final { border: 2px solid var(--gold); background: color-mix(in srgb, var(--gold) 9%, var(--card)); }
.ld-song.final .ld-ic { background: var(--gold); }
.ld-song.pick { border-style: dashed; }
.ld-stx { flex: 1; min-width: 0; display: grid; }
.ld-stx b { font-size: 0.86rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ld-stx small { font-size: 0.72rem; font-weight: 700; color: var(--muted); }
.ld-st { flex: none; color: var(--gold); font-size: 1rem; letter-spacing: 1px; }
.ld-pickrow, .ld-place { display: flex; gap: 6px; align-items: stretch; }
.ld-pickrow .ld-song, .ld-place .ld-song { flex: 1; min-width: 0; }
.ld-tog { flex: none; min-width: 78px; padding: 0 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--ink-2); font: inherit; font-weight: 800; font-size: 0.78rem; cursor: pointer; }
.ld-tog.on { background: var(--ink-bg); border-color: var(--ink-bg); color: #fff; }
.ld-tog:disabled { opacity: 0.5; cursor: default; }
.ld-rec { margin-top: 8px; }
.ld-checks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.ld-chk { display: grid; justify-items: center; gap: 2px; padding: 10px 6px; border-radius: 13px; background: var(--card); border: 1px solid var(--line); color: var(--ink); text-decoration: none; text-align: center; }
.ld-chk b { font-size: 1.05rem; } .ld-chk span { font-size: 0.78rem; font-weight: 900; } .ld-chk small { font-size: 0.66rem; font-weight: 700; color: var(--muted); line-height: 1.3; }
.ld-chk.ok { border-color: var(--ok); } .ld-chk.ok b { color: var(--ok); }
.ld-passgo { margin-top: 16px; }
/* passed */
.ld-cel { text-align: center; }
.ld-medal { width: 78px; height: 78px; margin: 8px auto 0; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle, #e8c766, #b8913a); color: #fff; font-size: 2.3rem; animation: ld-pop 0.6s; }
@keyframes ld-pop { 0% { transform: scale(0.3); } 70% { transform: scale(1.12); } 100% { transform: scale(1); } }
.ld-cel .ld-medal { margin: 8px auto 0; color: #fff; }
.ld-cel h1 { margin-top: 8px; } .ld-cel p { margin: 4px 0; font-weight: 700; color: var(--ink-2); }
.ld-mini { display: block; width: min(330px, 92%); aspect-ratio: 1.414; margin: 16px auto 4px; padding: 0; border: 0; border-radius: 6px; background: #fffdf6; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.14); position: relative; transform: rotate(-2deg); cursor: pointer; font: inherit; color: #1f2440; }
.ld-mini::before { content: ''; position: absolute; inset: 8px; border: 2px solid #b8913a; border-radius: 3px; }
.ld-mini::after { content: ''; position: absolute; inset: 12px; border: 1px solid #d9c08a; }
.ld-mini.silver::before { border-color: #8d96a8; } .ld-mini.silver::after { border-color: #c4cad5; }
.ld-mini.bronze::before { border-color: #a5672b; } .ld-mini.bronze::after { border-color: #dcb48a; }
.ld-mini-in { position: absolute; inset: 0; display: grid; place-content: center; gap: 4px; padding: 24px; }
.ld-mini-h { font-size: 0.62rem; letter-spacing: 0.25em; color: #8a6a1e; font-weight: 900; }
.ld-mini b { font-family: Georgia, serif; font-size: 1.35rem; }
.ld-mini small { font-size: 0.66rem; font-weight: 700; color: #555; }
.ld-namefield { display: grid; gap: 4px; margin: 14px 0 0; text-align: left; font-size: 0.76rem; font-weight: 900; color: var(--muted); }
.ld-namefield input { min-height: 44px; padding: 0 12px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); font: inherit; font-weight: 800; }
.ld-msg { margin: 10px 0 0; padding: 9px 11px; border-radius: 12px; background: color-mix(in srgb, var(--gold) 18%, var(--card)); font-size: 0.82rem; font-weight: 700; text-align: left; }
.ld-cel .btn { margin-top: 10px; }
.ld-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
/* the certificate sheet: 297 × 210 mm, drawn at 1123 × 794 px and scaled to fit the screen */
.ld-sheetwrap { width: 100%; overflow: hidden; }
.ld-sheet { --g: #b8913a; --g2: #d9c08a; width: 1123px; height: 794px; transform-origin: 0 0; background: #fffdf6; position: relative; color: #1f2440; font-family: system-ui, sans-serif; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.16); }
.ld-sheet.silver { --g: #7d879b; --g2: #c4cad5; } .ld-sheet.bronze { --g: #a5672b; --g2: #dcb48a; }
.ld-sheet .f1 { position: absolute; inset: 22px; border: 4px solid var(--g); }
.ld-sheet .f2 { position: absolute; inset: 34px; border: 1.5px solid var(--g2); }
.ld-sheet .c { position: absolute; width: 60px; height: 60px; border: 4px solid var(--g); border-radius: 50%; background: #fffdf6; }
.ld-sheet .c1 { left: 6px; top: 6px; } .ld-sheet .c2 { right: 6px; top: 6px; } .ld-sheet .c3 { left: 6px; bottom: 6px; } .ld-sheet .c4 { right: 6px; bottom: 6px; }
.ld-sheet .staff { position: absolute; left: 90px; right: 90px; top: 72px; height: 30px; background: repeating-linear-gradient(var(--g2) 0 1.5px, transparent 1.5px 7.2px); opacity: 0.7; }
.ld-sheet .body { position: absolute; inset: 118px 90px 60px; text-align: center; }
.ld-sheet .brand { font-weight: 900; letter-spacing: 0.34em; font-size: 15px; color: var(--g); }
.ld-sheet .h { font-family: Georgia, 'Times New Roman', serif; font-size: 58px; letter-spacing: 0.12em; margin: 8px 0 4px; font-weight: 700; }
.ld-sheet .lead2 { font-size: 18px; color: #555; font-weight: 600; }
.ld-sheet .nm { font-family: Georgia, serif; font-style: italic; font-size: 56px; margin: 12px auto 4px; border-bottom: 2px solid var(--g2); display: inline-block; padding: 0 50px 4px; min-width: 300px; }
.ld-sheet .what { font-size: 20px; font-weight: 700; margin-top: 10px; }
.ld-sheet .what em { font-style: normal; color: var(--g); }
.ld-sheet .songs { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 18px; margin: 16px auto 0; max-width: 860px; font-size: 15px; font-weight: 700; color: #444; }
.ld-sheet .songs i { font-style: normal; color: #c9a227; }
.ld-sheet .foot { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; align-items: flex-end; text-align: left; }
.ld-sheet .sig { width: 280px; font-size: 14px; font-weight: 700; color: #555; display: grid; }
.ld-sheet .sig b { font-family: 'Brush Script MT', 'Segoe Script', cursive; font-size: 30px; font-weight: 400; color: #1f2440; border-bottom: 1.5px solid #999; padding-bottom: 2px; margin-bottom: 4px; min-height: 40px; }
.ld-sheet .seal { width: 140px; height: 140px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--g) 55%, #fff), var(--g)); display: grid; place-items: center; color: #fff; text-align: center; box-shadow: 0 0 0 5px #fffdf6, 0 0 0 8px var(--g); }
.ld-sheet .seal span { display: grid; } .ld-sheet .seal b { font-size: 46px; line-height: 1; } .ld-sheet .seal i { font-style: normal; font-weight: 900; font-size: 13px; letter-spacing: 0.08em; }
.ld-sheet .qr { width: 280px; display: flex; gap: 10px; align-items: center; justify-content: flex-end; font-size: 12px; font-weight: 700; color: #555; text-align: right; }
.ld-sheet .qr[hidden] { display: flex; visibility: hidden; }
.ld-sheet .qr #cs-qr-t { white-space: pre-line; }
.ld-sheet .qr svg { width: 92px; height: 92px; display: block; }
@media print {
  @page { size: A4 landscape; margin: 0; }
  body.ld-printing > *:not(main) { display: none !important; }
  body.ld-printing main > section:not(#ld-cert), body.ld-printing #ld-cert > :not(.ld-sheetwrap) { display: none !important; }
  body.ld-printing main { padding: 0 !important; margin: 0 !important; max-width: none !important; }
  body.ld-printing .ld-sheetwrap { overflow: visible; height: auto !important; }
  body.ld-printing .ld-sheet { transform: none !important; box-shadow: none; width: 297mm; height: 210mm; }
}
/* the check page */
.ldv { max-width: 560px; padding-top: 24px; padding-bottom: 48px; text-align: center; }
.ldv-card { margin-top: 14px; padding: 22px 18px; border-radius: 18px; background: #fffdf6; border: 2px solid #d9c08a; }
.ldv-card .ok { font-weight: 900; color: var(--ok); font-size: 1.05rem; }
.ldv-card .who { font-family: Georgia, serif; font-size: 1.5rem; margin: 10px 0 4px; }
.ldv-card p { margin: 4px 0; font-weight: 700; color: var(--ink-2); }
.ldv .cta { display: block; margin-top: 18px; padding: 14px; border-radius: 16px; background: var(--accent-soft); color: var(--accent-ink); font-weight: 900; text-decoration: none; }

.ld-konsert { display: block; margin-top: 14px; padding: 12px 14px; border-radius: 14px; background: linear-gradient(135deg, #5b1a2a, #9c2f45); color: #fff; font-weight: 900; text-decoration: none; }
