
.nqs{--nqs-ink:#263d49;--nqs-muted:#62717b;--nqs-line:#dce4e7;--nqs-paper:#fffdf8;--nqs-accent:#986b45;max-width:1024px;margin:0 auto;color:var(--nqs-ink);font-family:"Noto Sans Bengali",Inter,system-ui,sans-serif}
.nqs *{box-sizing:border-box}.nqs [hidden]{display:none!important}.nqs-toolbar{display:flex;align-items:center;gap:10px;justify-content:space-between;padding:10px 2px 12px}.nqs-tabs{display:flex;gap:5px;flex-wrap:wrap;min-width:0}.nqs button,.nqs select,.nqs input,.nqs textarea{font:inherit}.nqs-tab,.nqs-mine,.nqs-button,.nqs-chip,.nqs-link{cursor:pointer;min-height:44px;border:1px solid transparent;border-radius:11px;padding:9px 13px;background:transparent;color:var(--nqs-ink);font-size:14px;line-height:1.5;text-decoration:none}.nqs-tab[aria-selected="true"]{background:#f3e8dc;border-color:#e7d4bf;color:#654829;font-weight:600}.nqs-tab:hover,.nqs-mine:hover,.nqs-link:hover{background:#edf2f2}.nqs-mine{white-space:nowrap;color:#365d6e;border-color:var(--nqs-line);font-size:13px}.nqs button:focus-visible,.nqs input:focus-visible,.nqs select:focus-visible,.nqs textarea:focus-visible,.nqs summary:focus-visible,.nqs a:focus-visible{outline:2px solid #426f7c;outline-offset:3px}.nqs-notice{font-size:13px;line-height:1.7;margin:0 8px;color:var(--nqs-muted)}.nqs-notice:empty{display:none}.nqs-panel{padding:clamp(18px,3vw,32px);border:1px solid var(--nqs-line);border-radius:22px;background:var(--nqs-paper);margin:0 0 20px}.nqs-title{margin:0 0 8px;font-family:"Noto Serif Bengali",serif;font-size:clamp(24px,3.5vw,31px);font-weight:600;line-height:1.5;color:var(--nqs-ink)}.nqs-lead{margin:0 0 20px;color:var(--nqs-muted);font-size:15px;line-height:1.9;max-width:740px}.nqs-form{display:flex;align-items:end;flex-wrap:wrap;gap:12px;margin:18px 0}.nqs-field{display:flex;flex-direction:column;gap:7px;font-size:13px;color:var(--nqs-muted);min-width:100px}.nqs-field:has(select[data-nqs-chapters]){flex:1;min-width:210px}.nqs-field select,.nqs-field input,.nqs textarea{min-height:46px;max-width:100%;padding:10px 12px;border:1px solid #d8e1e4;border-radius:10px;background:#fff;color:var(--nqs-ink)}.nqs-field input[type="number"]{width:100px}.nqs-field input[type="search"]{width:100%}.nqs-button{background:#2e505d;color:#fff;border-color:#2e505d}.nqs-secondary{background:#f0f5f4;color:var(--nqs-ink);border-color:var(--nqs-line)}.nqs-small{font-size:13px;line-height:1.85;color:var(--nqs-muted)}.nqs-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.nqs-link{color:#365d6e;text-decoration:underline;text-underline-offset:4px;padding:7px 9px}.nqs-chip{background:#f3f6f5;border-color:var(--nqs-line)}.nqs-source-status{font-size:14px;color:var(--nqs-muted);line-height:1.8;margin:20px 0}.nqs-source-body{font-size:17px;line-height:2.05;overflow-wrap:anywhere;max-width:780px}.nqs-source-body p{margin:0 0 1em}.nqs-source-body [lang="ar"],.nqs-word-ar{font-family:QuranAmiri,serif;font-size:29px;line-height:1.9}.nqs-source-body h1,.nqs-source-body h2,.nqs-source-body h3{font-size:1.15em;line-height:1.7}.nqs-source-body table{max-width:100%;display:block;overflow-x:auto}.nqs-source-foot{border-top:1px solid var(--nqs-line);margin-top:24px;padding-top:14px;font-size:12px;line-height:1.8;color:var(--nqs-muted)}.nqs-source-foot p{margin:5px 0}.nqs-source-foot a{color:#365d6e;text-underline-offset:3px}.nqs-source-foot .nqs-button{margin-top:12px}.nqs-attribution{font-family:Inter,system-ui,sans-serif;font-size:11px}.nqs-words{list-style:none;padding:0!important;display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:10px;margin:0!important}.nqs-words li{padding:14px 12px;background:#f1f6f4;border:1px solid #dce5e0;border-radius:13px;display:flex;flex-direction:column;text-align:center;gap:9px}.nqs-word-meaning{font-size:14px;line-height:1.7}.nqs-word-meaning p{margin:0}.nqs-topics{display:grid;gap:10px;margin-top:18px}.nqs-topic{border:1px solid var(--nqs-line);border-radius:13px;padding:0 16px;background:#fff}.nqs-topic summary{min-height:56px;padding:14px 0;font-weight:600;cursor:pointer;line-height:1.8}.nqs-topic-row{padding:12px 0;border-top:1px solid #e9eeee;display:flex;align-items:center;justify-content:space-between;gap:12px}.nqs-topic-row p{margin:0;font-size:14px;line-height:1.85}.nqs-topic-row .nqs-actions{flex-shrink:0}.nqs-topic .nqs-small{margin-top:0}.nqs-steps{padding-left:24px;margin:24px 0 16px}.nqs-steps li{padding-left:4px;margin:10px 0;font-size:15px;line-height:1.9}.nqs-dialog{width:min(680px,calc(100vw - 24px));max-height:85dvh;overflow-y:auto;padding:22px;border:1px solid var(--nqs-line);border-radius:20px;background:var(--nqs-paper);color:var(--nqs-ink);font-family:inherit}.nqs-dialog:not([open]){display:none}.nqs-dialog::backdrop{background:rgba(23,42,50,.4)}.nqs-dialog-head{display:flex;align-items:center;justify-content:space-between;gap:16px}.nqs-dialog-head h2{font-size:24px;margin:0}.nqs-dialog-head button{font-size:13px}.nqs-dialog h3{margin:22px 0 12px;font-size:18px}.nqs-progress{padding:14px 0 5px;font-size:15px;line-height:1.9;font-weight:600}.nqs-saved-card{margin-top:12px;padding:13px;border:1px solid var(--nqs-line);border-radius:12px;background:#fff}.nqs-saved-card textarea{width:100%;resize:vertical;font-size:14px;line-height:1.85;margin:8px 0}.nqs-storage-warning{padding:12px;background:#fff2df;color:#785323;font-size:13px;line-height:1.8}.nqs-verse-tafsir{font-size:12px!important}
@media(max-width:720px){.nqs-toolbar{align-items:flex-start;flex-direction:column;gap:5px}.nqs-tabs{width:100%;display:grid;grid-template-columns:1fr 1fr;gap:5px}.nqs-tab{font-size:13px;padding:9px 8px;text-align:center}.nqs-mine{align-self:flex-end;min-height:38px;padding:5px 10px;border:0}.nqs-panel{padding:19px 15px;border-radius:17px}.nqs-form{gap:10px}.nqs-form .nqs-field:first-child{flex-basis:calc(100% - 115px);min-width:0}.nqs-form .nqs-button{flex:1}.nqs-topic{padding:0 12px}.nqs-topic-row{align-items:flex-start;flex-direction:column;gap:2px}.nqs-topic-row .nqs-actions{align-self:flex-end}.nqs-dialog{padding:17px}.nqs-source-body{font-size:16px}.nqs-word-ar{font-size:28px}}
@media(prefers-reduced-motion:no-preference){.nqs-tab,.nqs-button,.nqs-mine{transition:background-color .16s ease,border-color .16s ease}}

/* Scoped action surfaces; original controls, labels and listeners stay in place. */
@layer nahwa-faith-workspace {
  #nfh-workspace #nahwa-quran-study {
    --nqa-ink: #244b47;
    --nqa-muted: #62716d;
    --nqa-line: #dedfd4;
    --nqa-bronze: #a67d50;
  }
  #nfh-workspace #nahwa-quran-study :is(.nqs-button, .nqs-link, .nqs-chip) {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    min-height: 48px !important;
    min-width: 0 !important;
    max-width: 100% !important;
    padding: 11px 18px !important;
    border: 1px solid #315b54 !important;
    border-radius: 14px !important;
    background: linear-gradient(150deg, #315b54, #244b47) !important;
    color: #fffdf6 !important;
    font: 500 15px/1.65 'Hind Siliguri', 'Noto Sans Bengali', sans-serif !important;
    text-decoration: none !important;
    text-shadow: none !important;
    letter-spacing: normal !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    cursor: pointer !important;
    box-shadow: inset 0 1px 0 #ffffff20, 0 5px 12px -8px #244b4766 !important;
    -webkit-tap-highlight-color: transparent !important;
  }
  #nfh-workspace #nahwa-quran-study :is(.nqs-secondary, .nqs-link, .nqs-chip) {
    background: linear-gradient(150deg, #fffefb, #f5f2e9) !important;
    color: var(--nqa-ink) !important;
    border-color: var(--nqa-line) !important;
    box-shadow: inset 0 1px 0 #fff, 0 3px 10px -8px #51432d4d !important;
  }
  #nfh-workspace #nahwa-quran-study .nqs-actions { gap: 10px !important; }
  #nfh-workspace #nahwa-quran-study .nqs-toolbar button.nqs-mine {
    border-color: #d9d2bf !important;
    background: #f8f1e4 !important;
    color: #725d3d !important;
    box-shadow: inset 0 1px 0 #fff9 !important;
  }
  #nfh-workspace #nahwa-quran-study .nqs-form {
    gap: 12px !important;
    margin-block: 22px 16px !important;
  }
  #nfh-workspace #nahwa-quran-study .nqs-field :is(select, input) {
    min-height: 50px !important;
    max-width: 100% !important;
    padding: 11px 14px !important;
    border: 1px solid #d8ded6 !important;
    border-radius: 13px !important;
    background-color: #fffefb !important;
    color: var(--nqa-ink) !important;
    font: 400 15px/1.65 'Hind Siliguri', 'Noto Sans Bengali', sans-serif !important;
    box-shadow: inset 0 1px 3px #254b4705 !important;
  }
  #nfh-workspace #nahwa-quran-study .nqs-form > .nqs-button { min-height: 50px !important; }
  #nfh-workspace #nahwa-quran-study [data-nqs-action='practice']::after,
  #nfh-workspace #nahwa-quran-study [data-nqs-action='practice-quick']::after {
    content: '';
    flex: 0 0 15px;
    width: 15px;
    height: 15px;
    margin-inline-start: auto;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' d='M5 12h14m-6-6 6 6-6 6'/%3E%3C/svg%3E") center/contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' d='M5 12h14m-6-6 6 6-6 6'/%3E%3C/svg%3E") center/contain no-repeat;
  }
  #nfh-workspace #nahwa-quran-study [data-nqs-action='practice'] { gap: 20px !important; }
  #nfh-workspace #nahwa-quran-study .nqs-actions:has(> [data-nqs-action='practice-quick']) {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 10px !important;
    margin-block: 20px 8px !important;
  }
  #nfh-workspace #nahwa-quran-study button[data-nqs-action='practice-quick'] {
    justify-content: space-between !important;
    min-height: 62px !important;
    padding: 14px 16px !important;
    border-color: #e1dacb !important;
    text-align: start !important;
  }
  #nfh-workspace #nahwa-quran-study .nqs-dialog {
    padding: clamp(20px, 3vw, 28px) !important;
    border: 1px solid #e2ddce !important;
    border-radius: 24px !important;
    background: linear-gradient(150deg, #fffefa, #faf8f1) !important;
    color: #294b47 !important;
    box-shadow: 0 36px 100px -30px #152c3559, 0 0 0 6px #ffffff1a !important;
  }
  #nfh-workspace #nahwa-quran-study .nqs-dialog::backdrop { background: #263b456b; }
  #nfh-workspace #nahwa-quran-study .nqs-dialog-head {
    align-items: center !important;
    gap: 14px !important;
    padding-bottom: 16px !important;
    margin-bottom: 14px !important;
    border-bottom: 1px solid #e7e3d8 !important;
  }
  #nfh-workspace #nahwa-quran-study .nqs-dialog-head h2 {
    margin: 0 !important;
    color: #294b47 !important;
    font: 600 clamp(24px, 3vw, 29px)/1.5 'Hind Siliguri', sans-serif !important;
  }
  #nfh-workspace #nahwa-quran-study .nqs-dialog-head button[data-nqs-action='close-mine'] {
    flex-shrink: 0 !important;
    min-height: 44px !important;
    padding: 8px 14px !important;
    border-radius: 999px !important;
    border-color: #e0e2d9 !important;
    background: #f0f2ec !important;
    color: #53665e !important;
    font-size: 13px !important;
    box-shadow: none !important;
  }
  #nfh-workspace #nahwa-quran-study .nqs-dialog > div:not(.nqs-dialog-head) > button[data-nqs-action='navigate'] {
    min-height: 54px !important;
    margin: 8px 8px 12px 0 !important;
    padding-inline: 18px !important;
    border-radius: 15px !important;
  }
  #nfh-workspace #nahwa-quran-study .nqs-dialog > div:not(.nqs-dialog-head) > button[data-nqs-action='navigate'] ~ button[data-nqs-action='navigate'] {
    border-color: #ddd5c5 !important;
    background: #f2ede2 !important;
    color: #705b3f !important;
    box-shadow: inset 0 1px 0 #fff9 !important;
  }
  #nfh-workspace #nahwa-quran-study .nqs-progress {
    margin: 10px 0 12px !important;
    padding: 14px 16px !important;
    border: 1px solid #e0e5db !important;
    border-inline-start: 3px solid #ad8c5e !important;
    border-radius: 12px !important;
    background: #f1f4ed !important;
    color: #35564c !important;
    font: 500 15px/1.9 'Hind Siliguri', sans-serif !important;
  }
  #nfh-workspace #nahwa-quran-study .nqs-dialog .nqs-small {
    color: var(--nqa-muted) !important;
    font: 400 14px/1.9 'Hind Siliguri', sans-serif !important;
    margin-block: 10px 18px !important;
  }
  #nfh-workspace #nahwa-quran-study .nqs-field:has([data-nqs-goal]) {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 164px !important;
    align-items: center !important;
    gap: 12px !important;
    margin: 18px 0 14px !important;
    color: #586c61 !important;
    font-size: 14px !important;
  }
  #nfh-workspace #nahwa-quran-study [data-nqs-action='export'] {
    min-height: 44px !important;
    border-color: #e3dac8 !important;
    background: #f8f2e6 !important;
    color: #76603f !important;
    font-size: 14px !important;
  }
  #nfh-workspace #nahwa-quran-study .nqs-dialog h3 {
    padding-top: 19px !important;
    margin: 22px 0 10px !important;
    border-top: 1px solid #e7e3d8 !important;
    color: #294b47 !important;
    font: 600 19px/1.7 'Hind Siliguri', sans-serif !important;
  }
  #nfh-workspace #nahwa-quran-study .nqs-saved-card {
    border-color: #e1e4da !important;
    padding: 16px !important;
    background: #fffefb !important;
    border-radius: 16px !important;
  }
  #nfh-workspace #nahwa-quran-study button[data-nqs-action='remove'] {
    min-height: 44px !important;
    padding: 8px 12px !important;
    border-color: #eadfd8 !important;
    color: #93614b !important;
    background: #fcf4ef !important;
    font-size: 13px !important;
  }
  #nfh-workspace #nahwa-quran-study :is(button, select, input, textarea):focus-visible {
    outline: 3px solid #426f65 !important;
    outline-offset: 3px !important;
  }
  #nfh-workspace #nahwa-quran-study button:disabled {
    opacity: .5 !important;
    cursor: not-allowed !important;
    transform: none !important;
    box-shadow: none !important;
  }
  #nfh-workspace #nahwa-quran-study [hidden][hidden] { display: none !important; }
  @media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
    #nfh-workspace #nahwa-quran-study :is(.nqs-button, .nqs-link, .nqs-chip) {
      transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease, border-color 180ms ease !important;
    }
    #nfh-workspace #nahwa-quran-study :is(.nqs-button, .nqs-link, .nqs-chip):not(:disabled):hover {
      transform: translateY(-2px) !important;
      border-color: #a5b5a0 !important;
      box-shadow: inset 0 1px 0 #ffffff30, 0 9px 18px -12px #244b4780 !important;
    }
  }
  #nfh-workspace #nahwa-quran-study :is(.nqs-button, .nqs-link, .nqs-chip):not(:disabled):active {
    transform: translateY(0) !important;
    box-shadow: inset 0 2px 5px #244b471c !important;
  }
  @media (max-width: 640px) {
    #nfh-workspace #nahwa-quran-study .nqs-actions:has(> [data-nqs-action='practice-quick']) { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
    #nfh-workspace #nahwa-quran-study .nqs-dialog > div:not(.nqs-dialog-head) > button[data-nqs-action='navigate'] {
      width: calc(50% - 5px) !important;
      margin-inline-end: 5px !important;
      padding-inline: 10px !important;
      font-size: 14px !important;
    }
    #nfh-workspace #nahwa-quran-study .nqs-form > .nqs-button { flex-basis: 100% !important; }
  }
  @media (max-width: 380px) {
    #nfh-workspace #nahwa-quran-study .nqs-field:has([data-nqs-goal]) { grid-template-columns: minmax(0, 1fr) !important; gap: 7px !important; }
    #nfh-workspace #nahwa-quran-study .nqs-dialog-head { gap: 8px !important; }
    #nfh-workspace #nahwa-quran-study button[data-nqs-action='practice-quick'] { padding-inline: 12px !important; font-size: 14px !important; }
  }
  @media (prefers-reduced-motion: reduce), (prefers-reduced-data: reduce) {
    #nfh-workspace #nahwa-quran-study :is(.nqs-button, .nqs-link, .nqs-chip) { transition: none !important; transform: none !important; }
  }
  html:is(.still, .sunlit-motion-paused, .creative-static, .nd-sunlit-paused, .nd-sunlit-still) #nfh-workspace #nahwa-quran-study button,
  body:is(.still, .sunlit-motion-paused, .creative-static, .nd-sunlit-paused, .nd-sunlit-still) #nfh-workspace #nahwa-quran-study button,
  html:is([data-motion='off'], [data-motion='still'], [data-still='true'], [data-home-still='true']) #nfh-workspace #nahwa-quran-study button,
  body:is([data-motion='off'], [data-motion='still'], [data-still='true'], [data-home-still='true']) #nfh-workspace #nahwa-quran-study button,
  body:has(#motion-toggle[aria-pressed='true']) #nfh-workspace #nahwa-quran-study button {
    transition: none !important;
    transform: none !important;
  }
  @media print {
    #nfh-workspace #nahwa-quran-study :is(.nqs-dialog, .nqs-button, .nqs-link, .nqs-chip) { box-shadow: none !important; transform: none !important; }
  }
}
