/* Nota (topic note) pages: /nota/, /nota/jawi/abjad/, /nota/bahasa-melayu/suku-kata-kv/.
   Ported from the approved canvas designs (Main / SukuKata / Hub). Paper ground,
   one green accent, orange only for the buy button. Flat fills, 1px soft borders,
   no shadows. The only motion is press feedback (none here); nothing animates in.
   Phone layout = max-width 700px, the same breakpoint the designs use.
   Header and footer are the site's own (landing/_layout.html, _dv_footer.html). */

.nota {
  --nota-accent: #2448D8;
  --nota-ink: #202126;
  --nota-text: #3D3A33;
  --nota-muted: #6B6556;
  --nota-line: #E6DAC3;
  --nota-sand: #EDE3CF;
  --nota-sage: #E3E9FB;
  --nota-rust: #B4461A;
  --nota-head: "Plus Jakarta Sans", system-ui, sans-serif;
  font-family: "Lexend", system-ui, sans-serif;
  font-size: 16px;
  line-height: normal;
  color: var(--nota-ink);
  max-width: 880px;
  margin: 0 auto;
  padding: 8px 24px 64px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.nota--hub { max-width: 1040px; padding: 16px 24px 72px; gap: 28px; }

.nota h1, .nota h2, .nota p { margin: 0; }
.nota h2 { color: inherit; }
.nota button { font-family: inherit; }
.nota [hidden] { display: none !important; }
.nota-jw { font-family: "Amiri", serif; font-weight: 700; line-height: 1; unicode-bidi: isolate; }
.nota-vh {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.nota-printonly { display: none; }

html:has(.nota) { scroll-behavior: auto; }

/* Page chrome: paper ground, no world backdrop (the shared header is dvh.css) */
body:has(.nota) { background: #F7F1E5; }
body:has(.nota) .world-bg,
body:has(.nota) .world-veil { display: none; }

/* Keyboard focus */
.nota a:focus-visible, .nota button:focus-visible,
.nota-crumbs a:focus-visible {
  outline: 2px solid var(--nota-accent, #2448D8); outline-offset: 2px;
}

/* Breadcrumb */
.nota-crumbs { margin: -8px 0 -12px; }
.nota-crumbs ol { display: flex; flex-wrap: wrap; align-items: center; list-style: none; margin: 0; padding: 0; }
.nota-crumbs li { display: inline-flex; align-items: center; min-height: 44px; font-size: 13px; color: #5A564C; }
.nota-crumbs li + li::before {
  content: ""; width: 5px; height: 5px; margin: 0 12px 0 4px; flex: none;
  border-top: 1.5px solid #8A826F; border-right: 1.5px solid #8A826F; transform: rotate(45deg);
}
.nota-crumbs a { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; justify-content: center; color: #2448D8; text-decoration: none; }
.nota-crumbs li:first-child a { justify-content: flex-start; }
.nota-crumbs a:hover { text-decoration: underline; color: #1B38B0; }

/* Hero */
.nota-hero { display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.nota-hero-copy { display: flex; flex-direction: column; gap: 14px; flex: 1 1 0; min-width: 0; }
.nota-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.nota-chip { padding: 5px 12px; border-radius: 999px; background: var(--nota-sand); font-size: 13px; font-weight: 500; }
.nota-h1 {
  font-family: var(--nota-head); font-weight: 800; font-size: 52px; line-height: 1.04;
  letter-spacing: -0.02em; color: var(--nota-accent);
}
.nota-lead { font-size: 18px; line-height: 1.55; color: var(--nota-text); max-width: 560px; }
.nota-hero-art {
  width: 220px; height: 170px; flex: 0 0 auto; border-radius: 20px; background: var(--nota-sage);
  display: flex; align-items: center; justify-content: center; gap: 14px;
  font-size: 64px; color: var(--nota-accent); direction: rtl;
}
.nota-hero-art--latin {
  gap: 10px; font-family: var(--nota-head); font-weight: 800; font-size: 40px; direction: ltr;
}
.nota-hero-art--latin .nota-plus { color: #9FB3F0; }

/* Tabs (shown by nota.js only; without JS the note is simply the page) */
.nota-tabs {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; padding: 4px;
  border-radius: 14px; background: var(--nota-sand); max-width: 420px;
}
.nota-tab {
  min-height: 44px; border-radius: 11px; border: 0; background: transparent; color: #5A564C;
  font-size: 15px; font-weight: 600; cursor: pointer;
}
.nota-tab[aria-selected="true"] { background: #FFFFFF; color: var(--nota-ink); }

/* Note card */
.nota-card { background: #FFFFFF; border: 1px solid var(--nota-line); border-radius: 22px; overflow: hidden; }
.nota-banner { background: var(--nota-accent); color: #FFFFFF; padding: 26px 32px; display: flex; flex-direction: column; gap: 8px; }
.nota-overline { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: #D3DCF8; }
.nota-banner-title { font-family: var(--nota-head); font-weight: 800; font-size: 26px; line-height: 1.25; }
.nota-banner-kp { font-size: 15px; color: #DCE3FA; }
.nota-banner-kp b { color: #FFFFFF; font-weight: 700; }
.nota-banner-kp a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.nota-banner-kp a:hover { text-decoration-thickness: 2px; }
.nota-body { padding: 28px 32px; display: flex; flex-direction: column; gap: 36px; }

.nota-sec { display: flex; flex-direction: column; gap: 14px; }
.nota-sec-head { display: flex; align-items: center; gap: 12px; }
.nota-num {
  width: 30px; height: 30px; flex: none; border-radius: 9px; background: #FDEBDD; color: var(--nota-rust);
  display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px;
}
.nota-kicker { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--nota-rust); }
.nota-h2 { margin: 2px 0 0; font-family: var(--nota-head); font-weight: 700; font-size: 20px; line-height: normal; }
.nota-p { font-size: 15px; line-height: 1.55; color: var(--nota-text); }
.nota-hint { font-size: 13px; color: #5A564C; }

/* 35 letters */
.nota-grid35 { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.nota-tile {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px;
  min-height: 44px; padding: 10px 4px 8px; border-radius: 14px; background: #FFFFFF;
  border: 1px solid var(--nota-line); color: var(--nota-ink); cursor: default;
}
.nota-js .nota-tile, .nota-js .nota-cell, .nota-js .nota-opt { cursor: pointer; }
.nota-tile:hover, .nota-opt:hover:not([aria-disabled="true"]), .nota-cell:hover { border-color: #B9A57E; }
.nota-tile.is-on, .nota-cell.is-on {
  background: var(--nota-sage); border-color: var(--nota-accent); box-shadow: inset 0 0 0 1px var(--nota-accent);
}
.nota-tile-no { position: absolute; top: 6px; right: 8px; font-size: 11px; line-height: normal; color: var(--nota-muted); }
.nota-tile-added { position: absolute; top: 9px; left: 9px; width: 7px; height: 7px; border-radius: 50%; background: #C94E1F; }
.nota-tile-g { font-size: 44px; color: var(--nota-ink); padding: 6px 0 10px; }
.nota-tile-name { font-size: 14px; font-weight: 600; color: var(--nota-ink); }
.nota-tile-sound { font-size: 12px; color: var(--nota-muted); }

.nota-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; font-size: 13px; color: #5A564C; }
.nota-legend--foot { gap: 6px 16px; color: var(--nota-muted); border-top: 1px solid #EFE6D4; padding-top: 14px; }
.nota-legend .nota-jw { font-size: 18px; }
.nota-legend-item { display: inline-flex; align-items: center; gap: 6px; }
.nota-legend-dot { width: 7px; height: 7px; border-radius: 50%; background: #C94E1F; display: inline-block; flex: none; }

.nota-picked { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 14px; background: var(--nota-sage); }
.nota-picked-ic {
  width: 40px; height: 40px; flex: none; border-radius: 50%; background: var(--nota-accent);
  display: inline-flex; align-items: center; justify-content: center;
}
.nota-picked-text { font-size: 15px; }
.nota-picked-g { font-size: 24px; margin: 0 6px; }

/* Shape families */
.nota-fam { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.nota-fam-card { border: 1px solid var(--nota-line); border-radius: 16px; padding: 12px; display: flex; gap: 6px; justify-content: center; }
.nota-fam-item { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.nota-fam-g { font-size: 40px; padding: 4px 0 10px; }
.nota-fam-name { font-size: 13px; font-weight: 600; }
.nota-fam-dots { font-size: 11px; color: var(--nota-muted); text-align: center; }

/* Six Malay letters */
.nota-six { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.nota-six-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 16px; background: #FBF7EE; border: 1px solid var(--nota-line); }
.nota-six-g { font-size: 46px; color: var(--nota-ink); min-width: 44px; text-align: center; padding: 6px 0 8px; }
.nota-six-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.nota-six-name { font-weight: 700; font-size: 16px; }
.nota-six-sound { font-weight: 500; color: var(--nota-muted); font-size: 13px; }
.nota-six-shape { font-size: 13px; line-height: 1.5; color: var(--nota-text); }
.nota-six-base { font-size: 20px; display: inline-block; vertical-align: middle; padding-bottom: 6px; }

/* Tiers */
.nota-tiers { display: flex; flex-direction: column; gap: 8px; }
.nota-tier { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 14px; border: 1px solid var(--nota-line); }
.nota-tier-label { min-width: 150px; font-size: 14px; font-weight: 600; }
.nota-tier-label span { font-weight: 400; color: var(--nota-muted); }
.nota-tier-g { flex: 1 1 280px; font-size: 30px; letter-spacing: 0.18em; color: var(--nota-ink); text-align: right; padding-top: 4px; direction: rtl; }

/* Cuba dengar (quiz) */
.nota-quiz { padding: 28px 32px; display: flex; flex-direction: column; gap: 22px; }
.nota-quiz-in { display: flex; flex-direction: column; gap: 22px; }
.nota-quiz-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.nota-quiz-count { font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--nota-rust); }
.nota-quiz-bars { display: flex; gap: 6px; }
.nota-quiz-bar { width: 28px; height: 6px; border-radius: 3px; display: inline-block; background: var(--nota-line); }
.nota-quiz-bar.is-done { background: var(--nota-accent); }
.nota-quiz-stage { display: flex; flex-direction: column; align-items: center; gap: 22px; padding: 8px 0; }
.nota-speak {
  width: 88px; height: 88px; border-radius: 50%; border: 0; background: var(--nota-accent);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.nota-quiz-ask { text-align: center; display: flex; flex-direction: column; gap: 4px; }
.nota-quiz-ask-t { font-family: var(--nota-head); font-weight: 700; font-size: 22px; }
.nota-quiz-ask-s { font-size: 14px; color: var(--nota-muted); }
.nota-opts { display: grid; grid-template-columns: repeat(var(--qcols, 3), minmax(0, 1fr)); gap: 12px; width: 100%; max-width: 460px; }
.nota-opt {
  height: var(--qtall, 112px); border-radius: 18px; background: #FFFFFF; border: 1px solid var(--nota-line);
  display: flex; align-items: center; justify-content: center; color: var(--nota-ink); cursor: pointer;
}
.nota-opt[aria-disabled="true"] { cursor: default; }
.nota-opt-g { font-size: 60px; padding: 10px 0 12px; }
.nota-opt.is-right { background: #E4F5E3; border-color: #2F7D42; box-shadow: inset 0 0 0 1px #2F7D42; }
.nota-opt.is-wrong { background: #FBE4E2; border-color: #B23A32; box-shadow: inset 0 0 0 1px #B23A32; }
.nota-quiz-fb { display: flex; flex-direction: column; align-items: center; gap: 12px; min-height: 0; }
.nota-quiz-fb-t { font-size: 16px; font-weight: 600; text-align: center; }
.nota-quiz-fb-t.is-right { color: #2F7D42; }
.nota-quiz-fb-t.is-wrong { color: #B23A32; }
.nota-next {
  min-height: 48px; padding: 0 26px; border-radius: 14px; border: 0; background: var(--nota-ink); color: #FFFFFF;
  font-family: var(--nota-head); font-weight: 700; font-size: 16px; cursor: pointer;
}
.nota-quiz-done { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 12px 0; text-align: center; }
.nota-quiz-score { font-family: var(--nota-head); font-weight: 800; font-size: 30px; }
.nota-quiz-done p { font-size: 15px; color: var(--nota-text); max-width: 440px; }
.nota-again {
  min-height: 48px; padding: 0 22px; border-radius: 14px; border: 1px solid #CDBB97; background: #FFFFFF;
  color: var(--nota-ink); font-weight: 600; font-size: 15px; cursor: pointer;
}

/* Actions, free-game CTA, buy box */
.nota-actions { display: flex; gap: 12px; }
.nota-action {
  flex: 1 1 0; min-height: 50px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 14px; border: 1px solid #DCCDAF; background: #FFFFFF; color: var(--nota-ink);
  text-decoration: none; font-weight: 600; font-size: 15px; cursor: pointer;
}
.nota-action:hover { border-color: #B9A57E; }
.nota-cta {
  min-height: 56px; display: flex; align-items: center; justify-content: center; gap: 10px; border-radius: 16px;
  background: var(--nota-accent); color: #FFFFFF; text-decoration: none; text-align: center; padding: 0 18px;
  font-family: var(--nota-head); font-weight: 700; font-size: 17px;
}
.nota-cta:hover { background: #1B38B0; color: #FFFFFF; }
.nota-ic { flex: none; }

.nota-buy { background: var(--nota-ink); color: #FFFFFF; border-radius: 22px; padding: 30px 32px; display: flex; flex-direction: column; gap: 14px; }
.nota-buy h2 { font-family: var(--nota-head); font-weight: 800; font-size: 24px; line-height: normal; }
.nota-buy p { font-size: 15px; line-height: 1.6; color: #D9D6CC; max-width: 600px; }
.nota-btn {
  align-self: flex-start; min-height: 50px; display: inline-flex; align-items: center; gap: 8px; padding: 0 24px;
  border-radius: 14px; background: #F46A36; color: var(--nota-ink); text-decoration: none;
  font-family: var(--nota-head); font-weight: 700; font-size: 16px;
}
.nota-btn:hover { background: #E5582A; color: var(--nota-ink); }

/* Other notes */
.nota-related { display: flex; flex-direction: column; gap: 10px; padding-top: 6px; }
.nota-related-label { font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--nota-muted); }
.nota-related-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.nota-related-card {
  padding: 14px 16px; border-radius: 14px; border: 1px solid var(--nota-line); background: #FFFFFF;
  color: var(--nota-ink); text-decoration: none; display: flex; flex-direction: column; gap: 2px; min-height: 44px;
}
.nota-related-card:hover { border-color: #B9A57E; color: var(--nota-ink); }
.nota-related-card small { font-size: 12px; color: var(--nota-muted); }
.nota-related-card span { font-weight: 600; }

/* Suku kata KV */
.nota-syl-scroll { overflow-x: auto; }
.nota-syl { display: grid; grid-template-columns: 56px repeat(5, minmax(56px, 1fr)); gap: 6px; min-width: 360px; }
.nota-syl-v { text-align: center; font-weight: 700; font-size: 16px; color: var(--nota-rust); padding: 6px 0; }
.nota-syl-c { display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 16px; color: var(--nota-accent); }
.nota-cell {
  min-height: 48px; border-radius: 12px; background: #FFFFFF; border: 1px solid var(--nota-line);
  font-size: 18px; font-weight: 600; color: var(--nota-ink); cursor: default;
}
.nota-words { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.nota-word {
  border: 1px solid var(--nota-line); border-radius: 16px; padding: 14px 10px; display: flex;
  flex-direction: column; align-items: center; gap: 6px; background: #FBF7EE;
}
.nota-word-parts { font-size: 14px; color: var(--nota-muted); }
.nota-word-w { font-family: var(--nota-head); font-weight: 800; font-size: 24px; }

/* Hub */
.nota-hub-head { display: flex; flex-direction: column; gap: 12px; max-width: 680px; }
.nota-hub-head .nota-lead { max-width: none; }
.nota-subj { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.nota-subj-card { background: #FFFFFF; border: 1px solid var(--nota-line); border-radius: 20px; overflow: hidden; display: flex; flex-direction: column; }
.nota-subj-head { display: flex; align-items: center; gap: 12px; padding: 18px 20px 12px; }
.nota-subj-head h2 { font-family: var(--nota-head); font-weight: 800; font-size: 20px; line-height: normal; }
.nota-mark {
  width: 36px; height: 36px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 15px;
}
.nota-mark--latin { font-family: var(--nota-head); }
.nota-mark--jawi { font-family: "Amiri", serif; font-size: 24px; padding-bottom: 4px; }
.nota-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px;
  border-top: 1px solid #F0E8D8; text-decoration: none; color: var(--nota-ink); min-height: 44px;
}
.nota-row:hover { background: #FBF7EE; color: var(--nota-ink); }
.nota-row-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.nota-row-title { font-weight: 600; font-size: 16px; }
.nota-row-what { font-size: 13px; color: var(--nota-muted); }
.nota-hub-cta {
  background: var(--nota-ink); color: #FFFFFF; border-radius: 22px; padding: 28px 30px; display: flex;
  flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px;
}
.nota-hub-cta-copy { display: flex; flex-direction: column; gap: 6px; max-width: 560px; }
.nota-hub-cta h2 { font-family: var(--nota-head); font-weight: 800; font-size: 22px; line-height: normal; }
.nota-hub-cta p { font-size: 15px; line-height: 1.6; color: #D9D6CC; }
.nota-hub-cta .nota-btn { align-self: auto; }

/* h2 inside the dark boxes (the layout's global h2 colour is dark) */
.nota-buy h2, .nota-hub-cta h2 { color: #FFFFFF; }

/* Phone */
@media (max-width: 700px) {
  .nota-hero { flex-direction: column-reverse; align-items: flex-start; }
  .nota-hero--keep { flex-direction: row; align-items: center; }
  .nota-hero-art { width: 100%; height: 140px; }
  .nota-hero-art--hide { display: none; }
  .nota-h1 { font-size: 38px; }
  .nota-banner, .nota-body { padding: 20px 16px; }
  .nota-quiz { padding: 20px 16px; }
  .nota-fam, .nota-six { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* families of 3-4 letters take the full row; 2-letter ones pair up around them */
  .nota-fam { grid-auto-flow: dense; }
  .nota-fam-card:has(> :nth-child(3)) { grid-column: 1 / -1; }
  .nota-six-card { flex-direction: column; text-align: center; padding: 14px 10px; gap: 6px; }
  .nota-six-txt { align-items: center; }
  .nota-tier-g { font-size: 26px; letter-spacing: 0.08em; line-height: 1.6; }
  .nota-grid35 { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
  .nota-tile { padding: 16px 1px 6px; }
  .nota-tile-g { font-size: 34px; padding-top: 4px; padding-bottom: 8px; }
  .nota-tile-name { font-size: clamp(11px, 3.3vw, 13px); }
  .nota-tile-sound { display: none; }
  .nota-actions { flex-direction: column; }
  .nota-buy { padding: 24px 20px; }
  .nota-words { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nota-subj { grid-template-columns: minmax(0, 1fr); }
  /* the 40-syllable table fits a phone without sideways scrolling */
  .nota-syl { grid-template-columns: 36px repeat(5, minmax(0, 1fr)); gap: 4px; min-width: 0; }
  .nota-cell { font-size: 17px; }
  .nota-hub-cta { padding: 24px 20px; }
}
@media (max-width: 360px) {
  .nota, .nota--hub { padding-left: 16px; padding-right: 16px; }
}

/* ---- generic blocks (nota/_blocks.html) ---- */
.nota-contents { display: contents; }
.nota-v { display: inline-block; }
.nota-v-l { font-family: var(--nota-head); font-weight: 800; line-height: 1; color: var(--nota-ink); font-size: 36px; }
.nota-v-nw { white-space: nowrap; }
.nota-v-i { display: block; object-fit: contain; }
.nota-v-svg { display: inline-flex; line-height: 0; }
.nota-v-t { font-weight: 600; font-size: 16px; }
.nota-hero-art--glyphs { font-family: "Amiri", serif; font-weight: 700; font-size: 64px; line-height: 1; }
.nota-hero-art--img, .nota-hero-art--html { direction: ltr; gap: 10px; }
.nota-hero-art--html > span { display: inline-flex; line-height: 0; }
.nota-hero-art--latin { font-size: 40px; }

.nota-tiles { display: grid; grid-template-columns: repeat(var(--cols, 5), minmax(0, 1fr)); gap: 8px; }
.nota-tile .nota-jw.nota-v { padding: 4px 0 10px; }
.nota-tile .nota-v-l { padding: 2px 0; }
.nota-tile--sm { padding: 8px 2px 6px; }
.nota-tile--sm .nota-tile-name { font-size: 12px; }
.nota-tile--row, .nota-tile--cell { width: 100%; }
.nota-tile--row { border-color: transparent; background: transparent; flex-direction: row; justify-content: flex-start; gap: 10px; padding: 4px 6px; }
.nota-tile--cell { padding: 8px 2px 6px; }
.nota-tile.is-static { cursor: default; }
.nota-tile.is-static:hover { border-color: var(--nota-line); }
.nota-tile-sub { font-size: 12px; color: var(--nota-muted); text-align: center; line-height: 1.3; }
.nota-tile-name { text-align: center; }

.nota-group { display: flex; flex-direction: column; gap: 8px; }
.nota-group-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.nota-gcards { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; }
.nota-gcard { display: flex; gap: 6px; padding: 8px; border: 1px solid var(--nota-line); border-radius: 16px; background: #FBF7EE; justify-content: center; }
.nota-gcard .nota-tile { flex: 0 1 76px; min-width: 0; background: #FFFFFF; }
.nota-group-label { font-size: 14px; font-weight: 600; }
.nota-group-note { font-size: 12px; color: var(--nota-muted); }

.nota-fam2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; }
.nota-fam2-card { border: 1px solid var(--nota-line); border-radius: 16px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.nota-fam2-base { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--nota-muted); }
.nota-fam2-base .nota-jw { padding: 2px 0 10px; color: var(--nota-ink); }
.nota-fam2-items .nota-jw { padding: 4px 0 12px; }
.nota-fam2-items { display: flex; gap: 6px; justify-content: center; }

.nota-steps-title { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.nota-mini {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--nota-line); background: #FFFFFF;
  color: var(--nota-accent); display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.nota-steps { list-style: none; margin: 0; padding: 0; display: flex; gap: 0; }
.nota-step { position: relative; flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 0 6px; }
.nota-step + .nota-step::before {
  content: ""; position: absolute; left: -5px; top: 26px; width: 9px; height: 9px;
  border-top: 2px solid #8A826F; border-right: 2px solid #8A826F; transform: rotate(45deg);
}
.nota-step-vis {
  min-width: 64px; min-height: 64px; padding: 6px; border-radius: 16px; background: #FFFFFF; border: 1px solid var(--nota-line);
  display: inline-flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 600;
}
.nota-step.is-end .nota-step-vis { background: var(--nota-sage); border-color: var(--nota-accent); }
.nota-step-vis .nota-jw { padding: 2px 0 8px; }
.nota-step-txt { display: flex; flex-direction: column; gap: 2px; }
.nota-step-title { font-size: 14px; font-weight: 600; }
.nota-step-sub { font-size: 12px; color: var(--nota-muted); }

.nota-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.nota-lrow {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; width: 100%; padding: 10px 14px;
  border: 1px solid var(--nota-line); border-radius: 16px; background: #FFFFFF; color: var(--nota-ink);
  text-align: left; cursor: default;
}
.nota-js button.nota-lrow { cursor: pointer; }
button.nota-lrow:hover { border-color: #B9A57E; }
.nota-lrow.is-on { background: var(--nota-sage); border-color: var(--nota-accent); box-shadow: inset 0 0 0 1px var(--nota-accent); }
.nota-lrow-lead { flex: none; min-width: 44px; display: inline-flex; align-items: center; justify-content: center; }
.nota-lrow-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 90px; }
.nota-lrow-title { font-weight: 600; font-size: 16px; }
.nota-lrow-sub { font-size: 13px; color: var(--nota-muted); }
.nota-lrow-arrow { flex: none; }
.nota-lrow-trail { display: inline-flex; align-items: center; gap: 6px; flex: none; }
.nota-lrow-trail.is-many { flex: 1 1 220px; flex-wrap: wrap; justify-content: flex-end; }
.nota-lrow-trail .nota-lrow-sub { margin-left: 4px; }

.nota-tbl-scroll { overflow-x: auto; }
.nota-tbl { width: 100%; border-collapse: separate; border-spacing: 0 6px; }
.nota-tbl th, .nota-tbl td { text-align: center; padding: 2px 3px; vertical-align: middle; }
.nota-tbl thead th { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--nota-muted); padding-bottom: 2px; }
.nota-tbl tbody th { width: 28%; text-align: left; font-weight: 400; }
.nota-tbl td .nota-jw { padding: 4px 0 10px; display: inline-block; }
.nota-tbl--big td .nota-jw { padding-top: 8px; }
.nota-tbl:not(.nota-tbl--matrix) tbody td, .nota-tbl:not(.nota-tbl--matrix) tbody th { border-top: 1px solid #F0E8D8; }
.nota-tbl:not(.nota-tbl--matrix) tbody tr:first-child td, .nota-tbl:not(.nota-tbl--matrix) tbody tr:first-child th { border-top: 0; }
.nota-tbl--matrix tbody th { width: 64px; }
.nota-tbl--matrix thead th { text-transform: none; letter-spacing: 0; font-size: 14px; }

.nota-shapes { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 10px; }
.nota-shape {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 10px; border-radius: 16px;
  border: 1px solid var(--nota-line); background: #FFFFFF; color: var(--nota-ink); text-align: center; cursor: default;
}
.nota-js button.nota-shape { cursor: pointer; }
button.nota-shape:hover { border-color: #B9A57E; }
.nota-shape.is-on { background: var(--nota-sage); border-color: var(--nota-accent); box-shadow: inset 0 0 0 1px var(--nota-accent); }
.nota-shape-name { font-weight: 700; font-size: 16px; }
.nota-shape-sub { font-size: 13px; color: var(--nota-muted); }

.nota-bins { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.nota-bin { border: 1px solid var(--nota-line); border-radius: 16px; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.nota-bin-label { font-size: 14px; font-weight: 600; }
.nota-bin-items { display: flex; flex-wrap: wrap; gap: 8px; }

.nota-eq { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.nota-eqrow {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; width: 100%; padding: 8px 14px;
  border: 1px solid var(--nota-line); border-radius: 16px; background: #FFFFFF; color: var(--nota-ink); text-align: left; cursor: default;
}
.nota-js .nota-eqrow { cursor: pointer; }
.nota-eqrow:hover { border-color: #B9A57E; }
.nota-eqrow.is-on { background: var(--nota-sage); border-color: var(--nota-accent); box-shadow: inset 0 0 0 1px var(--nota-accent); }
.nota-eq-parts { display: inline-flex; align-items: center; gap: 10px; }
.nota-eq-op { font-size: 20px; color: var(--nota-muted); font-weight: 600; }
.nota-eq-res { display: inline-flex; align-items: center; gap: 10px; }
.nota-eq-res .nota-jw, .nota-eq-parts .nota-jw { padding: 4px 0 10px; }
.nota-eq-rumi { font-weight: 700; font-size: 18px; }
.nota-eq-cap { flex: 1 1 140px; font-size: 13px; color: var(--nota-muted); text-align: right; }

.nota-words2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.nota-word2 {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 8px; border-radius: 16px;
  border: 1px solid var(--nota-line); background: #FBF7EE; color: var(--nota-ink); cursor: default;
}
.nota-js .nota-word2 { cursor: pointer; }
.nota-word2:hover { border-color: #B9A57E; }
.nota-word2.is-on { background: var(--nota-sage); border-color: var(--nota-accent); box-shadow: inset 0 0 0 1px var(--nota-accent); }
.nota-word2-j { font-size: 34px; padding: 2px 0 8px; }
.nota-word2-r { font-family: var(--nota-head); font-weight: 800; font-size: 18px; }
.nota-word2-p { font-size: 13px; color: var(--nota-muted); }

.nota-quiz-prompt { display: flex; justify-content: center; }
.nota-related-all small { color: var(--nota-accent); }

@media (max-width: 700px) {
  .nota-tiles { grid-template-columns: repeat(var(--cols-m, 4), minmax(0, 1fr)); }
  .nota-fam2 { grid-template-columns: minmax(0, 1fr); }
  .nota-steps { flex-direction: column; gap: 14px; }
  .nota-step { flex-direction: row; text-align: left; gap: 12px; padding: 0; align-items: center; }
  .nota-step + .nota-step::before { left: 26px; top: -11px; transform: rotate(135deg); }
  .nota-step-vis { flex: none; }
  .nota-bins { grid-template-columns: minmax(0, 1fr); }
  .nota-eq-cap { text-align: left; flex-basis: 100%; }
  .nota-lrow-trail.is-many { justify-content: flex-start; flex-basis: 100%; }
  .nota-shapes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nota-tbl tbody th { width: auto; }
  .nota-tbl--big td .nota-jw { font-size: 34px !important; }
}

/* Print: the note without the site chrome; the Abjad Jawi page prints just its chart */
@media print {
  @page { margin: 14mm; }
  body:has(.nota) { background: #FFFFFF; }
  .dvh-strip, .dvh, .dvf, .site-header, .dv-footer, .nota-crumbs, .nota-tabs, .nota-actions, .nota-cta, .nota-buy, .nota-related,
  .nota-picked, .nota-panel-cuba, .nota-mini { display: none !important; }
  .nota .nota-panel-nota[hidden] { display: block !important; }
  .nota { max-width: none; padding: 0; gap: 12px; }
  .nota-card { border: 0; border-radius: 0; }
  .nota-body { padding: 0; gap: 18px; }
  .nota-banner { background: none; color: #000; padding: 0 0 8px; }
  .nota-banner-title, .nota-overline, .nota-banner-kp, .nota-banner-kp b { color: #000; }
  .nota-sec, .nota-tile, .nota-lrow, .nota-fam2-card, .nota-shape { break-inside: avoid; }
  .nota-h1 { color: #000; }
  .nota-tile-sound { display: block !important; }
  .nota-printonly { display: block; font-size: 12px; color: #444; }
  .nota-chart .nota-hero-art, .nota-chart .nota-lead, .nota-chart .nota-chips, .nota-chart .nota-banner,
  .nota-chart .nota-sec--screen, .nota-chart .nota-legend--foot, .nota-chart .nota-hint { display: none !important; }
  .nota-chart .nota-hero { display: block; }
  .nota-chart .nota-h1 { font-size: 30px; }
}
