/*
  Certificates (the wall, a certificate's page and the certificate itself, on screen and in print), My learning and
  the notebook (LD2-E).
  Loaded after pages.css on those pages (Looks/LearnStyles.cs). Split out of pages.css by LD2-0.
*/

/* ---------- Diplomas ---------- */
/* The diplomas page: a band with the world's sky, then every diploma standing on its own small shelf. */
.ln-main > .ln-page-head--wall { position: relative; max-width: none; padding: 26px 20px 44px !important; text-align: center; display: grid; justify-items: center; color: #fff; overflow: hidden; isolation: isolate; background: var(--w-deep); }
.ln-wall-art { position: absolute !important; inset: 0; z-index: -2; }
.ln-page-head--wall::after { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(70% 90% at 50% 40%, color-mix(in srgb, var(--w-deep) 80%, transparent), color-mix(in srgb, var(--w-deep) 35%, transparent)); }
.ln-page-head--wall .ln-kicker { color: var(--w-glow); }
.ln-page-head--wall .ln-kicker::before { display: none; }
/* On these dark heads the kicker stays light in every look: the teens' bright cyan (the light look's darker cyan is for
   light cards), and a warm cream for children (their pink is faint on the blue). */
.ln--teen :is(.ln-page-head--wall, .ln-me2-head) .ln-kicker { color: #67e8f9; }
.ln--kid :is(.ln-page-head--wall, .ln-me2-head) .ln-kicker { color: #fff3c4; }
.ln-page-head--wall .ln-page-title { color: #fff; }
.ln-page-head--wall .ln-page-sub { color: rgba(255, 255, 255, .85); }
.ln-page-head--wall .ln-world-stats--ink { color: rgba(255, 255, 255, .8); }
.ln-page-head--wall .ln-world-stats--ink b { color: #fff; }
.ln-main > .ln-diploma-grid--wall { position: relative; z-index: 1; margin-top: -40px; padding: 24px 24px 10px; gap: 30px 22px; border-radius: 28px; background: radial-gradient(100% 60% at 50% 0%, color-mix(in srgb, var(--w-glow) 18%, transparent), transparent 70%), var(--ln-card); box-shadow: var(--ln-shadow-lift); max-width: calc(var(--ln-max) - 40px); }
.ln-diploma-grid--wall .ln-dip-paper { margin-bottom: 14px; box-shadow: 0 18px 0 -6px #8a6236, 0 26px 18px -14px rgba(0, 0, 0, .5), inset 0 0 0 6px #fffdf6, inset 0 0 0 7.5px var(--w-accent), inset 0 0 0 10px #fffdf6, inset 0 0 0 11px color-mix(in srgb, var(--w-deep) 60%, transparent); }
.ln-diploma-grid--wall .ln-diploma-card.is-earned .ln-dip-paper { box-shadow: 0 18px 0 -6px #8a6236, 0 0 40px -6px var(--ln-gold), inset 0 0 0 6px #fffdf6, inset 0 0 0 7.5px var(--ln-gold), inset 0 0 0 10px #fffdf6, inset 0 0 0 11px var(--ln-gold); }
.ln-diploma-grid--wall .ln-dip-state { justify-content: center; }
.ln-diploma-head { position: relative; color: #fff; background: var(--w-pattern), radial-gradient(circle at 80% 30%, color-mix(in srgb, var(--w-accent) 45%, transparent), transparent 55%), var(--w-deep); overflow: hidden; }
.ln-main > .ln-diploma-head { max-width: none; padding: 0; }
.ln-diploma-head-in { max-width: var(--ln-max); margin: 0 auto; padding: 44px 20px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 460px); gap: 40px; align-items: center; }
.ln-diploma-preview { perspective: 900px; }
.ln-cert--mini { transform: rotateY(-10deg) rotateX(4deg) rotate(-1deg); box-shadow: 0 40px 70px -30px rgba(0, 0, 0, .7); }
.ln-needs { display: grid; gap: 10px; }
.ln-needs li { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 16px; background: var(--ln-card); box-shadow: var(--ln-shadow); }
.ln-needs li > a, .ln-needs li > span:not(.ln-need-mark) { flex: 1; display: flex; flex-direction: column; }
.ln-needs small { font-size: 13px; color: var(--ln-muted); }
.ln-need-mark { width: 30px; height: 30px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 900; box-shadow: inset 0 0 0 2px var(--ln-line-2); color: var(--w-ink); }
.ln-needs .is-done .ln-need-mark { background: var(--ln-good); color: #fff; box-shadow: none; }
.ln-needs .is-coming { opacity: .6; box-shadow: inset 0 0 0 1.5px var(--ln-line-2); background: transparent; }
.ln-need-exam { background: linear-gradient(135deg, var(--w-deep), color-mix(in srgb, var(--w-deep) 70%, var(--w-accent))) !important; color: #fff; }
.ln-need-exam small { color: rgba(255, 255, 255, .75); }
.ln-need-exam .ln-need-mark { box-shadow: inset 0 0 0 2px var(--w-glow); color: var(--w-glow); }

/* ---------- Certificate (screen and print) ---------- */
.ln-cert { position: relative; aspect-ratio: 1.414; container-type: inline-size; border-radius: 6px; overflow: hidden; color: #1f2430; background: linear-gradient(160deg, #fffdf6, #f5ecd8); box-shadow: inset 0 0 0 1.4cqi #fffdf6, inset 0 0 0 1.6cqi var(--w-deep), inset 0 0 0 2.4cqi #fffdf6, inset 0 0 0 2.55cqi var(--w-accent); }
.ln-cert-pattern { position: absolute; inset: 0; background: var(--w-pattern); opacity: .35; }
.ln-cert-pattern::after { content: ""; position: absolute; left: 50%; top: 52%; width: 44cqi; height: 44cqi; transform: translate(-50%, -50%); border-radius: 50%; background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--w-accent) 14%, transparent) 0 7.5deg, transparent 7.5deg 15deg); mask: radial-gradient(circle, transparent 30%, #000 31%, #000 70%, transparent 71%); }
.ln-cert-corner { position: absolute; width: 6cqi; height: 6cqi; fill: var(--w-accent); filter: drop-shadow(0 0 0 2px #fffdf6); }
.ln-cert-corner--tl { left: 0; top: 0; transform: translate(-1cqi, -1cqi); }
.ln-cert-corner--tr { right: 0; top: 0; transform: translate(1cqi, -1cqi); }
.ln-cert-corner--bl { left: 0; bottom: 0; transform: translate(-1cqi, 1cqi); }
.ln-cert-corner--br { right: 0; bottom: 0; transform: translate(1cqi, 1cqi); }
.ln-cert-body, .ln-cert--mini { position: relative; height: 100%; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 6.5cqi 8cqi 4cqi; }
.ln-cert-kicker { font-size: 1.35cqi; font-weight: 800; letter-spacing: .3em; color: var(--w-deep); }
.ln-cert-kind { margin-top: 2.6cqi; font-size: 1.8cqi; font-weight: 800; letter-spacing: .26em; text-transform: uppercase; color: var(--w-ink); }
.ln-cert-title { margin-top: .8cqi; font-family: var(--ln-display); font-weight: 600; font-size: 4.2cqi; line-height: 1.1; color: #1f2430; max-width: 70cqi; }
.ln-cert-lead { margin-top: 3cqi; font-size: 1.7cqi; color: #6b6f7d; }
.ln-cert-name { margin-top: .6cqi; font-family: var(--ln-display); font-weight: 600; font-style: italic; font-size: 5.4cqi; line-height: 1.1; color: var(--w-deep); }
.ln-cert-line { width: 40cqi; height: 2px; margin-top: 1.2cqi; background: linear-gradient(90deg, transparent, var(--w-accent), transparent); }
.ln-cert-text { margin-top: 1.8cqi; font-size: 1.75cqi; max-width: 70cqi; color: #2c3140; }
.ln-cert-paths { margin-top: 1cqi; font-size: 1.35cqi; color: #6b6f7d; max-width: 76cqi; }
.ln-cert-foot { margin-top: auto; width: 100%; display: flex; align-items: flex-end; justify-content: space-between; gap: 2cqi; text-align: start; }
.ln-cert-foot > div { display: flex; flex-direction: column; font-size: 1.35cqi; color: #6b6f7d; }
.ln-cert-foot small { font-weight: 800; letter-spacing: .14em; text-transform: uppercase; font-size: 1.1cqi; }
.ln-cert-foot b { font-family: var(--ln-display); font-size: 2.3cqi; color: #1f2430; }
.ln-cert-check { margin-inline-start: auto; text-align: end; align-items: flex-end; }
.ln-cert-qr { width: 10cqi; height: 10cqi; color: #1f2430; flex: none; }
.ln-cert-qr svg { width: 100%; height: 100%; }
.ln-cert--mini .ln-cert-qr { background: repeating-linear-gradient(90deg, #1f2430 0 3px, transparent 3px 6px), repeating-linear-gradient(0deg, #1f2430 0 3px, transparent 3px 6px); background-blend-mode: multiply; opacity: .7; width: 8cqi; height: 8cqi; }
.ln-cert-note { margin-top: 1.4cqi; font-size: 1.15cqi; color: #8b8f9b; letter-spacing: .04em; }
.ln-cert-page { padding-top: 26px !important; display: grid; gap: 16px; }
.ln-cert-tools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ln-cert-tools-gap { flex: 1; }

/* The certificate's seal (LD2-E): pressed between the date and the number, in gold (a neon badge for teens, sunshine for kids). */
.ln-cert-foot { position: relative; }
.ln-cert-seal { position: absolute; left: 50%; bottom: calc(100% + .6cqi); width: 11cqi; transform: translateX(-50%); }
.ln-cert-full[hidden] { display: none; }
.ln-cert-seal .ln-wseal { width: 100%; height: auto; display: block; filter: drop-shadow(0 .5cqi .8cqi rgba(80, 56, 10, .35)); }
.ln-cert-frame { position: relative; border-radius: 8px; box-shadow: var(--ln-shadow-lift); }
/* The certificate's words, readable on any screen: what it is, to whom, when, and how to check it. */
.ln-cert-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin: 0; border-radius: 18px; overflow: hidden; background: var(--ln-line); box-shadow: inset 0 0 0 1px var(--ln-line); }
.ln-cert-facts > div { padding: 14px 16px; background: var(--ln-card); display: grid; gap: 4px; align-content: start; }
.ln-cert-facts dt { font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--w-ink); }
.ln-cert-facts dd { margin: 0; font-size: 15px; line-height: 1.4; color: var(--ln-ink); }
.ln-cert-verify { grid-column: 1 / -1; }
.ln-cert-verify dd { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; font-size: 14px; color: var(--ln-muted); }
.ln-cert-verify dd b { color: var(--ln-ink); font-weight: 700; overflow-wrap: anywhere; }
.ln-cert-verify .ln-btn { margin-inline-start: auto; }

/* ---------- The seal (shared by the certificate and My learning's wall) ---------- */
.ln-wseal-edge { fill: var(--ln-gold); }
.ln-wseal-light { stop-color: #fff6d8; }
.ln-wseal-deep { stop-color: var(--ln-gold); }
.ln-wseal-ring { fill: none; stroke: rgba(255, 255, 255, .8); stroke-width: 2; stroke-dasharray: 3 4; }
.ln-wseal-ribbon { fill: var(--w-deep); stroke: color-mix(in srgb, var(--ln-gold) 70%, transparent); stroke-width: 1.5; }
.ln-wseal-check { fill: none; stroke: #fff; stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; }
.ln-wseal-glyph { fill: #fff; }
.ln--teen .ln-wseal-edge { fill: #8b5cf6; }
.ln--teen .ln-wseal-light { stop-color: #67e8f9; }
.ln--teen .ln-wseal-deep { stop-color: #7c3aed; }
.ln--teen .ln-wseal-ribbon { fill: #12081f; stroke: #22d3ee; }
.ln--kid .ln-wseal-edge { fill: #ffb020; }
.ln--kid .ln-wseal-light { stop-color: #fff3a6; }
.ln--kid .ln-wseal-deep { stop-color: #ff9f0a; }
.ln--kid .ln-wseal-ribbon { fill: #ff6fa5; stroke: #fff; }

/* ---------- My learning (LD2-E): calm and personal ---------- */
/* Three type sizes (--me-xl the greeting, --me-m the headings, --me-s the rest), the world's colours plus one accent,
   one motion at a time; above the fold the head, the plan and Review, the rest below. */
.ln-me2 { --td-xl: clamp(28px, 3.3vw, 40px); --td-m: 18px; --td-s: 13.5px; }
.ln-me2 { --me-xl: clamp(28px, 3.3vw, 40px); --me-m: 18px; --me-s: 13.5px; }
.ln-main > .ln-me2 { max-width: none; padding: 0; }
.ln-me2-head { position: relative; isolation: isolate; overflow: hidden; color: #fff; background: var(--w-deep); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 28px 40px; align-items: center; padding: 24px max(20px, (100% - var(--ln-max)) / 2 + 20px) 84px; }
.ln-me2-art { position: absolute !important; inset: 0; z-index: -2; }
.ln-me2-head::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, color-mix(in srgb, var(--w-deep) 92%, transparent), color-mix(in srgb, var(--w-deep) 55%, transparent) 60%, color-mix(in srgb, var(--w-deep) 30%, transparent)); }
[dir="rtl"] .ln-me2-head::after { transform: scaleX(-1); }
.ln-me2-hello { display: grid; gap: 8px; justify-items: start; min-width: 0; max-width: 60ch; }
.ln-me2-head .ln-kicker { color: var(--w-glow); }
.ln-me2-h1 { font-family: var(--ln-display); font-weight: 600; font-size: var(--me-xl); line-height: 1.05; letter-spacing: -.015em; text-wrap: balance; text-shadow: 0 2px 24px rgba(0, 0, 0, .25); }
.ln-me2-line { font-size: var(--me-s); line-height: 1.5; color: rgba(255, 255, 255, .88); }
.ln-me2-line b { color: #fff; font-weight: 700; }
.ln-me2-kick { font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--w-glow); margin-inline-end: 6px; }
.ln-me2-go { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 18px; margin-top: 8px; }
.ln .ln-me2-quiet { color: #fff; font-weight: 700; font-size: var(--me-s); text-decoration: underline; text-decoration-color: color-mix(in srgb, #fff 40%, transparent); text-underline-offset: 4px; }
.ln-me2-today { display: flex; align-items: center; gap: 20px; padding: 16px 20px; border-radius: 22px; background: color-mix(in srgb, var(--w-deep) 55%, rgba(8, 10, 18, .4)); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.ln-me2-today-in { display: grid; gap: 10px; }
.ln-me2-week { font-size: var(--me-s); color: rgba(255, 255, 255, .82); }
.ln-me2-week b { color: #fff; }

/* The cards: one grid under the head, lifted a little into it. */
.ln-me2-grid { position: relative; z-index: 1; max-width: var(--ln-max); margin: -60px auto 0; padding: 0 20px; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.ln-me2-card, .ln-me2-grid > .ln-dash-videos { grid-column: span 6; min-width: 0; padding: 18px 20px; border-radius: 22px; background: var(--ln-card); box-shadow: var(--ln-z1, var(--ln-shadow)); display: grid; gap: 12px; align-content: start; }
.ln-me2-plan, .ln-me2-mastery { grid-column: span 7; }
.ln-me2-review, .ln-me2-deeds { grid-column: span 5; }
.ln-me2-certs, .ln-me2-settings, .ln-me2-grid > .ln-dash-videos { grid-column: 1 / -1; }
.ln-me2-top { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; }
.ln-me2-h, .ln-dash-videos .ln-dash-title { font-family: var(--ln-display); font-weight: 600; font-size: var(--me-m); line-height: 1.2; margin: 0; }
.ln-me2-h3 { font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--w-ink); margin-top: 4px; }
.ln-me2-sub { font-size: var(--me-s); color: var(--ln-muted); }
.ln .ln-me2-link { font-size: var(--me-s); font-weight: 700; color: var(--w-ink); }
.ln-me2-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.ln-me2-empty { font-size: var(--me-s); line-height: 1.55; color: var(--ln-muted); }
.ln-me2-big { font-size: var(--me-s); color: var(--ln-muted); }
.ln-me2-big b { font-family: var(--ln-display); font-weight: 600; font-size: var(--me-m); color: var(--ln-ink); margin-inline-end: 4px; }
.ln .ln-me2-btn { justify-self: start; min-height: 40px; padding: 8px 14px; font-size: var(--me-s); }

/* The plan: its paths as stations on one line, the one you are on lit. */
.ln-me2-route { display: grid; gap: 0; counter-reset: stop; }
.ln-me2-route li { position: relative; display: grid; grid-template-columns: 22px minmax(0, 1fr); column-gap: 12px; padding-bottom: 12px; }
.ln-me2-route li:not(:last-child)::before { content: ""; position: absolute; inset-inline-start: 10px; top: 20px; bottom: -2px; width: 2px; border-radius: 2px; background: var(--ln-line-2); }
.ln-me2-route li.is-done:not(:last-child)::before { background: var(--w-accent); }
.ln-me2-stop { grid-row: span 2; width: 22px; height: 22px; border-radius: 50%; background: var(--ln-card); box-shadow: inset 0 0 0 2px var(--ln-line-2); }
.ln-me2-route .is-done .ln-me2-stop { background: var(--w-accent); box-shadow: none; }
.ln-me2-route .is-done .ln-me2-stop::after { content: "✓"; display: grid; place-items: center; height: 100%; color: #fff; font-size: 12px; font-weight: 900; }
.ln-me2-route .is-here .ln-me2-stop { background: var(--w-glow); box-shadow: 0 0 0 4px color-mix(in srgb, var(--w-glow) 30%, transparent), inset 0 0 0 2px var(--w-accent); }
.ln-me2-route a, .ln-me2-route b, .ln-me2-route li > span:not(.ln-me2-stop) { font-weight: 700; font-size: 15px; line-height: 1.3; color: var(--ln-ink); }
.ln-me2-route a:hover { color: var(--w-ink); }
.ln-me2-route small { font-size: 12.5px; color: var(--ln-muted); }
.ln-me2-route .is-here small { color: var(--w-ink); font-weight: 700; }
.ln-me2-rows { display: grid; gap: 4px; }
.ln .ln-me2-row { display: flex; align-items: center; gap: 12px; padding: 6px 8px; margin-inline: -8px; border-radius: 12px; }
.ln-me2-row:hover { background: color-mix(in srgb, var(--w-accent) 9%, transparent); }
.ln-me2-row b { display: block; font-size: 14px; line-height: 1.25; }
.ln-me2-row small { display: block; font-size: 12.5px; color: var(--ln-muted); }
.ln-me2-row .ln-ring { width: 38px; height: 38px; flex: none; }
.ln-me2-row .ln-ring b { display: inline; font-size: 10px; }
.ln-me2-row .ln-ring small { display: inline; font-size: 7.5px; }

/* Review: what is due, and where every card rests (new, sabqi, manzil) as one quiet bar. */
.ln-me2-ladder { display: flex; height: 10px; border-radius: 6px; overflow: hidden; background: var(--ln-line); }
.ln-me2-ladder span { flex: var(--n) 1 0; min-width: 0; }
.ln-me2-ladder .is-sabaq, .ln-me2-key .is-sabaq { background: color-mix(in srgb, var(--w-accent) 35%, var(--ln-card)); }
.ln-me2-ladder .is-sabqi, .ln-me2-key .is-sabqi { background: var(--w-accent); }
.ln-me2-ladder .is-manzil, .ln-me2-key .is-manzil { background: var(--w-deep); }
html[data-theme="dark"] .ln-me2-ladder .is-manzil, html[data-theme="dark"] .ln-me2-key .is-manzil, .ln--teen .ln-me2-key .is-manzil, .ln--teen .ln-me2-ladder .is-manzil { background: var(--w-glow); }
.ln-me2-key { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; font-size: 12px; color: var(--ln-muted); }
.ln-me2-key i { width: 10px; height: 10px; border-radius: 3px; margin-inline-start: 6px; }
.ln-me2-key i:first-child { margin-inline-start: 0; }

/* Mastery: each path a line of its stations, each course's quiet mark (_Mastery) on it. */
.ln-me2-paths { display: grid; gap: 14px; }
.ln-me2-path { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; align-items: baseline; }
.ln .ln-me2-path-title { font-weight: 700; font-size: 15px; color: var(--ln-ink); }
.ln-me2-path-title:hover { color: var(--w-ink); }
.ln-me2-line-stations { grid-column: 1 / -1; position: relative; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; padding: 4px 0; }
.ln-me2-line-stations li { position: relative; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: var(--ln-muted); background: color-mix(in srgb, var(--w-accent) 7%, var(--ln-card)); }
.ln-me2-line-stations li a { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; color: inherit; }
.ln-me2-line-stations li.is-here { box-shadow: 0 0 0 2px var(--w-accent); color: var(--w-ink); }
.ln-me2-line-stations li.is-optional { opacity: .55; }
.ln-me2-line-stations li.is-coming { background: transparent; outline: 1.5px dashed var(--ln-line-2); outline-offset: -2px; }
.ln-me2-coming { width: 8px; height: 8px; border-radius: 50%; background: var(--ln-line-2); }
.ln-me2-opt { grid-column: 1 / -1; font-size: 12.5px; color: var(--ln-muted); }

/* Deeds: this week's "Try it today", done or not yet. */
.ln-me2-deedlist { display: grid; gap: 8px; }
.ln-me2-deedlist li { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 10px; align-items: start; }
.ln-me2-tick { width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; font-size: 13px; font-weight: 900; color: #fff; box-shadow: inset 0 0 0 2px var(--ln-line-2); }
.ln-me2-deedlist .is-done .ln-me2-tick { background: var(--ln-good); box-shadow: none; }
.ln-me2-deedlist b { display: block; font-size: 14px; font-weight: 600; line-height: 1.4; }
.ln-me2-deedlist small { display: block; font-size: 12.5px; color: var(--ln-muted); }

/* The notebook: the learner's own words, set like a page of a book. */
.ln-me2-notelist { display: grid; gap: 14px; }
.ln-me2-notelist li { display: grid; gap: 6px; padding-inline-start: 14px; border-inline-start: 3px solid color-mix(in srgb, var(--w-accent) 55%, transparent); }
.ln-me2-prompt { font-size: 12.5px; color: var(--ln-muted); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ln-me2-note-text { font-family: var(--ln-display); font-size: 16px; line-height: 1.5; color: var(--ln-ink); white-space: pre-line; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.ln-me2-notelist small { font-size: 12.5px; color: var(--ln-muted); }
.ln-me2-notelist small a { color: var(--w-ink); font-weight: 700; margin-inline-end: 4px; }

/* What was kept: duas and Names in their Arabic from storage, words with their meaning. */
.ln-me2-keptlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 10px; }
.ln-me2-keptlist li { position: relative; display: grid; gap: 4px; align-content: start; padding: 12px 14px; border-radius: 16px; background: color-mix(in srgb, var(--w-accent) 6%, var(--ln-card)); box-shadow: inset 0 0 0 1px var(--ln-line); }
.ln-me2-keptlist small { font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--w-ink); }
.ln-me2-keptlist b { font-size: 14.5px; font-weight: 700; line-height: 1.3; }
.ln-me2-ar { font-family: var(--ln-arabic, "Amiri Quran", "Noto Naskh Arabic", serif); font-size: 21px; line-height: 1.7; color: var(--ln-ink); text-align: start; }
.ln-me2-kept-dua .ln-me2-ar { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ln-me2-mean { font-size: 13px; line-height: 1.45; color: var(--ln-muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ln-me2-ref { font-size: 12px; color: var(--ln-muted); font-style: italic; }

/* The certificates: a wall of framed seals. */
.ln-me2-wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 16px; }
.ln-me2-frame { display: grid; gap: 8px; }
.ln .ln-me2-frame-in { display: grid; justify-items: center; text-align: center; gap: 4px; padding: 18px 14px 16px; border-radius: 10px; color: #2a2418; background: radial-gradient(90% 70% at 50% 20%, #fffdf6, #f3ead6); box-shadow: var(--ln-shadow-lift), inset 0 0 0 5px #fffdf6, inset 0 0 0 6.5px var(--ln-gold), inset 0 0 0 9px #fffdf6, inset 0 0 0 10px var(--w-accent); transition: transform .3s var(--ln-ease); }
.ln-me2-frame-in:hover { transform: translateY(-3px); }
.ln-me2-frame-in .ln-wseal { width: 74px; height: auto; margin-bottom: 4px; filter: drop-shadow(0 6px 8px rgba(80, 56, 10, .3)); }
.ln-me2-frame-in small { font-size: 10.5px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: color-mix(in srgb, var(--w-deep) 80%, #000); }
.ln-me2-frame-in b { font-family: var(--ln-display); font-weight: 600; font-size: 16px; line-height: 1.2; color: #1f2430; }
.ln-me2-frame-in > span { font-size: 11.5px; color: #5d6170; }
.ln .ln-me2-frame-pdf { justify-self: center; font-size: 12.5px; font-weight: 700; color: var(--w-ink); }
.ln-me2-frame-pdf:hover { text-decoration: underline; text-underline-offset: 3px; }
.ln-me2-frame.is-full .ln-me2-frame-in { box-shadow: var(--ln-shadow-lift), 0 0 34px -10px var(--ln-gold), inset 0 0 0 5px #fffdf6, inset 0 0 0 6.5px var(--ln-gold), inset 0 0 0 9px #fffdf6, inset 0 0 0 10px var(--ln-gold); }

/* Settings. */
.ln-me2-setlist { display: grid; }
.ln-me2-setlist li { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 20px; padding: 12px 0; border-top: 1px solid var(--ln-line); }
.ln-me2-setlist li:first-child { border-top: 0; padding-top: 0; }
.ln-me2-setlist li > span { display: grid; gap: 2px; min-width: 0; flex: 1 1 260px; }
.ln-me2-setlist b { font-size: 14.5px; }
.ln-me2-setlist small { font-size: 12.5px; color: var(--ln-muted); }
.ln-seg-choice { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 14px; background: var(--ln-card-2); box-shadow: inset 0 0 0 1px var(--ln-line); }
.ln-seg-choice label { position: relative; }
.ln-seg-choice input { position: absolute; opacity: 0; }
.ln-seg-choice span { display: block; padding: 9px 16px; border-radius: 10px; font-weight: 700; font-size: 14px; cursor: pointer; }
.ln-seg-choice input:checked + span { background: var(--ln-ink); color: var(--ln-paper); }
.ln-seg-choice input:focus-visible + span { outline: 3px solid var(--w-accent); }

/* A visitor: the page as it will be, greyed. */
.ln-me2-sample { pointer-events: none; user-select: none; filter: grayscale(.85); opacity: .55; }
.ln-me2-sample .ln-me2-card { grid-column: span 6; }
.ln-me2-sample .ln-mring-track { stroke: var(--ln-line-2); }
.ln-me2-sample .ln-mring-v small, .ln-me2-sample .ln-lamp-say { color: var(--ln-muted); }
.ln-me2-sample .ln-lamp-say b { color: var(--ln-ink); }
.ln-me2-sample .ln-lamp-row li { background: var(--ln-line); }
.ln-me2-sample .ln-lamp-row li.lit { background: linear-gradient(#fff2c6, var(--w-glow) 45%, var(--w-accent)); }

/* A child: big and friendly; the sticker book and the grown-ups' corner are LD2-G's pages. */
.ln-me2-stars { font-size: var(--me-m); color: #fff; }
.ln-me2-stars span { color: var(--w-glow); }
.ln-me2-stars b { font-family: var(--ln-display); font-size: var(--me-xl); }
.ln-me2-kid-doors { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 16px; }
.ln .ln-me2-door { display: flex; align-items: center; gap: 16px; min-height: 84px; padding: 16px 20px; border-radius: 28px; background: var(--ln-card); box-shadow: 0 4px 0 color-mix(in srgb, var(--w-deep) 30%, transparent), var(--ln-shadow); font-size: 20px; color: var(--ln-ink); }
.ln-me2-door:active { transform: translateY(3px); box-shadow: 0 1px 0 color-mix(in srgb, var(--w-deep) 30%, transparent); }
.ln-me2-door-ico { width: 52px; height: 52px; border-radius: 18px; display: grid; place-items: center; font-size: 26px; color: #fff; background: var(--w-accent); }
.ln-me2-door-ico svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ln-me2--kid :is(.ln-me2-certs, .ln-me2-worlds) { grid-column: 1 / -1; }

/* The notebook page. */
.ln-main > .ln-me2--notebook { max-width: none; padding: 0; }
.ln-nb { max-width: 860px; margin: 0 auto; padding: 26px 20px 40px; display: grid; gap: 22px; }
.ln-nb-head { display: grid; gap: 8px; justify-items: start; }
.ln-nb-head .ln-me2-h1 { color: var(--ln-ink); text-shadow: none; }
.ln-nb-head .ln-me2-line { color: var(--ln-muted); max-width: 62ch; }
.ln-nb-head .ln-kicker { color: var(--w-ink); }
.ln-nb-bring { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 16px; padding: 12px 16px; border-radius: 16px; background: color-mix(in srgb, var(--w-accent) 10%, var(--ln-card)); box-shadow: inset 0 0 0 1px var(--ln-line); font-size: var(--me-s); }
.ln-nb-bring[hidden] { display: none; }
.ln-nb-course { display: grid; gap: 12px; padding: 18px 20px; border-radius: 22px; background: var(--ln-card); box-shadow: var(--ln-z1, var(--ln-shadow)); }
.ln-nb-notes { display: grid; gap: 18px; }
.ln-nb-note { display: grid; gap: 6px; padding-inline-start: 14px; border-inline-start: 3px solid color-mix(in srgb, var(--w-accent) 55%, transparent); }
.ln-nb-where { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12.5px; color: var(--ln-muted); }
.ln-nb-where a { color: var(--w-ink); font-weight: 700; }
.ln-nb-text { font-family: var(--ln-display); font-size: 17px; line-height: 1.6; color: var(--ln-ink); white-space: pre-line; overflow-wrap: anywhere; }
.ln-nb-remove { position: absolute; top: 6px; inset-inline-end: 6px; width: 32px; height: 32px; border-radius: 50%; border: 0; background: transparent; color: var(--ln-muted); font-size: 18px; cursor: pointer; }
.ln-nb-remove:hover, .ln-nb-remove:focus-visible { background: var(--ln-card-2); color: var(--ln-ink); }
.ln-nb-empty { padding: 18px 20px; border-radius: 22px; background: var(--ln-card); }

/* Teens: bold, sticker-flat; kids: chunky and round. */
.ln--teen :is(.ln-me2-h1, .ln-me2-h, .ln-me2-big b, .ln-me2-stars b) { font-family: var(--ln-sans); font-weight: 800; letter-spacing: -.025em; }
.ln--teen :is(.ln-me2-card, .ln-nb-course) { border-radius: 14px; box-shadow: 5px 5px 0 color-mix(in srgb, var(--w-accent) 70%, transparent), inset 0 0 0 2px var(--ln-line-2); }
.ln--teen .ln-me2-today { border-radius: 14px; }
.ln--teen :is(.ln-me2-note-text, .ln-nb-text) { font-family: var(--ln-sans); }
.ln--kid :is(.ln-me2-card, .ln-nb-course) { border-radius: 32px; }
.ln--kid .ln-me2-h1 { font-family: var(--ln-kids, var(--ln-display)); font-weight: 900; }

/* Less motion: nothing lifts. */
@media (prefers-reduced-motion: reduce) {
  .ln-me2-frame-in, .ln-me2-frame-in:hover, .ln-me2-door:active { transition: none; transform: none; }
}

/* ---------- Narrow screens ---------- */
@media (max-width: 1100px) {
  .ln-me2-plan, .ln-me2-review, .ln-me2-mastery, .ln-me2-deeds { grid-column: span 6; }
}
@media (max-width: 960px) {
  .ln-diploma-head-in { grid-template-columns: 1fr; }
  .ln-me2-head { grid-template-columns: minmax(0, 1fr); padding-bottom: 84px; }
  .ln-me2-card, .ln-me2-plan, .ln-me2-review, .ln-me2-mastery, .ln-me2-deeds, .ln-me2-sample .ln-me2-card { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  /* A phone: the certificate fits the width; "Full size" shows it as printed, scrolled sideways. */
  .ln-cert-frame.is-full { overflow-x: auto; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }
  .ln-cert-frame.is-full .ln-cert { width: 980px; max-width: none; }
  .ln-cert-tools .ln-cert-tools-gap { flex-basis: 100%; height: 0; }
}
@media (max-width: 620px) {
  .ln-me2-head { padding: 24px 14px 76px; gap: 18px; }
  .ln-me2-today { padding: 12px 14px; gap: 14px; width: 100%; }
  .ln-me2-today .ln-mring { width: 84px; height: 84px; }
  .ln-me2-today .ln-mring-v b { font-size: 28px; }
  .ln-me2-today .ln-mring-v small { font-size: 10.5px; }
  .ln-cert-facts { grid-template-columns: minmax(0, 1fr); }
  /* What was kept: a shelf to swipe along, so the page stays short. */
  .ln-me2-keptlist:not(.ln-nb-words) { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 78%; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; padding-bottom: 6px; }
  .ln-me2-keptlist:not(.ln-nb-words) li { scroll-snap-align: start; }
  .ln-me2-today-in { flex: 1; min-width: 0; }
  .ln-me2-today .ln-lamp { max-width: none; }
  .ln-me2-today .ln-lamp-row { grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 3px; }
  .ln-me2-grid { padding-inline: 14px; gap: 12px; margin-top: -52px; }
  .ln-me2-card, .ln-me2-grid > .ln-dash-videos { padding: 16px; border-radius: 18px; }
  .ln-me2-wall { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .ln-me2-frame-in .ln-wseal { width: 56px; }
  .ln-nb { padding-inline: 14px; }
  .ln-nb-course { padding: 16px; }
}

/* ---------- Print: the certificate alone, A4 landscape ---------- */
@media print {
  @page { size: A4 landscape; margin: 0; }
  body * { visibility: hidden !important; }
  .ln-cert, .ln-cert * { visibility: visible !important; }
  .ln-cert { position: fixed; inset: 0; width: 297mm; height: 210mm; aspect-ratio: auto; border-radius: 0; box-shadow: inset 0 0 0 4mm #fffdf6, inset 0 0 0 4.6mm var(--w-deep), inset 0 0 0 7mm #fffdf6, inset 0 0 0 7.4mm var(--w-accent) !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
