/* ============================================================
   Khan SAT-1600 · Раздел «Национальный сертификат» (v159)
   Author: Xudoyorxon Bunyodov / Худоёрхон Бунёдов
   ============================================================ */
.nc {
  --n-g: #1B5E20; --n-gold: #C9A227; --n-red: #C62828; --n-ink: #1a1a1a;
  --n-sans: "Segoe UI", Roboto, Arial, system-ui, sans-serif;
  max-width: 1280px; margin: 0 auto; padding: 2px 0 48px; font-family: var(--n-sans);
}
.nc *, .nc *::before, .nc *::after { box-sizing: border-box; }

/* шапка страницы */
.nc-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.nc-top h1 { margin: 0; font-size: 23px; }
.nc-back { color: var(--n-g); font-weight: 600; text-decoration: none; }
html[data-theme="dark"] .nc-back { color: #A5D6A7; }
.nc-badge { background: #eef5ee; color: var(--n-g); border-radius: 10px; padding: 3px 11px; font-size: 12.5px; font-weight: 700; }

/* обзор */
.nc-hero { background: #fff; color: var(--n-ink); border: 1.5px solid #dfe6df; border-radius: 20px; padding: 24px 28px; margin-bottom: 16px; }
.nc-kicker { color: var(--n-g); font-weight: 700; font-size: 13.5px; letter-spacing: .3px; }
.nc-hero h1 { font-size: 27px; margin: 5px 0 10px; }
.nc-hero p { color: #3c463d; line-height: 1.6; margin: 0 0 14px; font-size: 15px; max-width: 880px; }
.nc-stats { display: flex; gap: 10px; flex-wrap: wrap; }
.nc-stats span { display: flex; flex-direction: column; background: #f2f7f2; border-radius: 12px; padding: 8px 14px; font-size: 12.5px; color: #4a574c; }
.nc-stats b { font-size: 19px; color: var(--n-g); }

.nc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 13px; margin-bottom: 14px; }
.nc-card { background: #fff; color: var(--n-ink); border: 1.5px solid #dfe6df; border-radius: 16px; padding: 15px 17px; transition: border-color .15s, transform .15s; }
.nc-card:hover { border-color: var(--n-g); transform: translateY(-2px); }
.nc-card-h { display: flex; align-items: baseline; gap: 9px; margin-bottom: 6px; }
.nc-card-h b { font-size: 15.5px; line-height: 1.35; }
.nc-num { flex: none; width: 28px; height: 28px; border-radius: 9px; background: #eef5ee; color: var(--n-g); font-weight: 800; font-size: 14px; display: grid; place-items: center; }
.nc-card-m { font-size: 13px; color: #5b675c; margin-bottom: 9px; }
.nc-card-a { display: flex; gap: 8px; margin-top: 11px; }

.nc-bar { height: 7px; border-radius: 4px; background: #e7ece7; overflow: hidden; }
.nc-bar i { display: block; height: 100%; background: var(--n-g); }
.nc-bar-w { flex: 1; min-width: 120px; }

/* кнопки */
.nc-btn { border: 1.5px solid #cfd8cf; background: #fff; color: var(--n-ink) !important; border-radius: 10px; padding: 7px 14px; font: 600 13px var(--n-sans); cursor: pointer; text-decoration: none; display: inline-block; }
.nc-btn:hover { border-color: var(--n-g); background: #f2f7f2; }
.nc-btn[disabled] { opacity: .45; cursor: default; }
.nc-btn-p { background: var(--n-g); border-color: var(--n-g); color: #fff !important; }
.nc-chip { border: 1.5px solid #cfd8cf; background: #fff; color: var(--n-ink); border-radius: 20px; padding: 6px 14px; font: 600 12.5px var(--n-sans); cursor: pointer; }
.nc-chip.on { border-color: var(--n-g); background: #eef5ee; color: var(--n-g); }
.nc-sp { flex: 1; }

.nc-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.nc-count { font-size: 12.5px; color: #5b675c; }

/* сетка заданий */
.nc-cells { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 11px; }
.nc-cell { position: relative; display: block; background: #fff; border: 1.5px solid #dfe6df; border-radius: 13px; padding: 26px 10px 10px; text-decoration: none; overflow: hidden; }
.nc-cell:hover { border-color: var(--n-g); }
.nc-cell img { width: 100%; height: 118px; object-fit: cover; object-position: top left; border-radius: 8px; background: #fbfcfb; }
.nc-cell-n { position: absolute; top: 7px; left: 10px; font: 700 12px var(--n-sans); color: var(--n-g); }
.nc-cell-m { position: absolute; top: 6px; right: 9px; font: 700 12px var(--n-sans); border-radius: 8px; padding: 2px 7px; }
.nc-cell.ok { border-color: #a8d5aa; }
.nc-cell.ok .nc-cell-m { background: #eaf6ea; color: #1f5c22; }
.nc-cell.bad { border-color: #eabab6; }
.nc-cell.bad .nc-cell-m { background: #fdeceb; color: #b3261e; }

/* решение */
.nc-run { background: #fff; color: var(--n-ink); border: 1.5px solid #dfe6df; border-radius: 18px; padding: 16px 18px 18px; }
.nc-runbar { display: flex; align-items: center; gap: 12px; font-size: 12.5px; color: #5b675c; margin-bottom: 12px; }
.nc-runstat { white-space: nowrap; }
.nc-shot { text-align: center; background: #fbfcfb; border: 1px solid #eef1ee; border-radius: 12px; padding: 10px; }
.nc-shot img { max-width: 100%; cursor: zoom-in; }
.nc-text { margin: 12px auto 0; max-width: 820px; background: #f7faf7; border: 1.5px solid #e2e8e2; border-radius: 12px; padding: 10px 14px; }
.nc-text summary { cursor: pointer; font-weight: 600; font-size: 13.5px; color: var(--n-g); }
.nc-text p { margin: 8px 0 0; font-size: 14px; line-height: 1.6; color: #27352a; }
.nc-small, .nc-note { font-size: 12px; color: #7b877c; }

.nc-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 9px; margin-top: 14px; }
.nc-opt { display: flex; align-items: center; gap: 10px; border: 1.5px solid #cfd8cf; background: #fff; border-radius: 12px; padding: 11px 14px; font: 15px var(--n-sans); color: var(--n-ink); cursor: pointer; text-align: left; }
.nc-opt:hover:not([disabled]) { border-color: var(--n-g); background: #f6faf6; }
.nc-opt-l { flex: none; width: 26px; height: 26px; border-radius: 8px; background: #eef1ee; color: #46524a; font-weight: 800; font-size: 13px; display: grid; place-items: center; }
.nc-opt-v { font-weight: 600; }
.nc-opt.right { border-color: #1f5c22; background: #eaf6ea; }
.nc-opt.right .nc-opt-l { background: #1f5c22; color: #fff; }
.nc-opt.wrong { border-color: #b3261e; background: #fdeceb; }
.nc-opt.wrong .nc-opt-l { background: #b3261e; color: #fff; }

.nc-fb { min-height: 26px; margin-top: 12px; }
.nc-msg { background: #f4f7f4; border-radius: 10px; padding: 9px 14px; font-size: 14px; color: #3c463d; }
.nc-msg.ok { background: #f1f8f1; color: #1f5c22; font-weight: 600; }
.nc-msg.bad { background: #fdf3f2; color: #b3261e; font-weight: 600; }
.nc-nav { display: flex; gap: 8px; align-items: center; margin-top: 14px; flex-wrap: wrap; }
.nc-src { margin-top: 12px; font-size: 12px; color: #8a958c; }

.nc-note-box { background: #f4f7f4; border-radius: 12px; padding: 12px 16px; font-size: 13.5px; line-height: 1.6; color: #3c463d; }
.nc-empty { background: #fff; border: 1.5px solid #dfe6df; border-radius: 14px; padding: 22px; text-align: center; color: #5b675c; font-size: 14.5px; }
.topnav a.nc-navlink { font-weight: 700; }

html[data-theme="dark"] .nc .nc-card,
html[data-theme="dark"] .nc .nc-hero,
html[data-theme="dark"] .nc .nc-run,
html[data-theme="dark"] .nc .nc-cell,
html[data-theme="dark"] .nc .nc-empty { background: #fff; color: var(--n-ink); }

@media (max-width: 720px) {
  .nc-hero { padding: 18px 16px; }
  .nc-hero h1 { font-size: 22px; }
  .nc-cells { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .nc-cell img { height: 92px; }
}

/* v159: разделы книги, язык, блоки 33–35, открытый ответ */
.nc-sec { font-size: 17px; margin: 22px 0 10px; color: var(--n-g); letter-spacing: .2px; }
html[data-theme="dark"] .nc-sec { color: #A5D6A7; }
.nc-top-hero { margin-bottom: 4px; }
.nc-lang { display: inline-flex; gap: 6px; }
.nc-lang .nc-chip { padding: 4px 11px; }
.nc-tag { background: #f2f7f2; color: #3c5a3e; border-radius: 7px; padding: 1px 7px; font-size: 12px; white-space: nowrap; }
.nc-hint { margin: 12px auto 0; max-width: 820px; font-size: 13.5px; color: #4a574c; line-height: 1.55; }
.nc-cells-wide { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.nc-cells-wide .nc-cell img { height: 150px; }
.nc-part { background: #fff6e0; color: #8a6200; }

.nc-match { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.nc-mrow { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; border: 1.5px solid #e2e8e2; border-radius: 12px; padding: 8px 12px; }
.nc-mq { font-weight: 800; font-size: 16px; color: var(--n-g); min-width: 34px; }
.nc-opts6 { display: grid; grid-template-columns: repeat(6, minmax(44px, 1fr)); gap: 7px; margin: 0; flex: 1; min-width: 260px; }
.nc-opts6 .nc-opt { justify-content: center; padding: 8px 6px; }
.nc-mfb { min-width: 56px; font-weight: 700; font-size: 14px; }
.nc-good { color: #1f5c22; }
.nc-badmark { color: #b3261e; }

.nc-open { margin-top: 12px; }
.nc-ans { margin-top: 12px; background: #f7faf7; border: 1.5px solid #e2e8e2; border-radius: 12px; padding: 10px 12px; text-align: center; }
.nc-ans-h { font-size: 13px; color: #4a574c; margin-bottom: 8px; text-align: left; }
.nc-ans img { max-width: 100%; background: #fff; border-radius: 6px; }
.nc-self { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; font-size: 14px; }
.nc-self span { margin-right: 4px; color: #3c463d; }
.nc-ok { border-color: #a8d5aa; }
.nc-ok:hover { background: #eaf6ea; }
.nc-no { border-color: #eabab6; }
.nc-no:hover { background: #fdeceb; }

@media (max-width: 720px) {
  .nc-cells-wide { grid-template-columns: 1fr; }
  .nc-opts6 { grid-template-columns: repeat(3, 1fr); min-width: 0; }
  .nc-mrow { padding: 8px; }
}
