/* e-Katib — production styles (framework-free, eval-free) */

* { box-sizing: border-box; }
html, body { margin: 0; }
/* Səhifə HEÇ VAXT ekrandan enli olmasın: hər hansı daşan element (qraf, kataloq…)
   mobil brauzeri bütün səhifəni kiçiltməyə məcbur edir → nav/mətn balaca görünür.
   `clip` (hidden yox) — scroll konteyneri yaratmır, position: sticky sınmır. */
html, body { overflow-x: clip; }
body {
  background: #efe9dd;
  color: #26231c;
  font-family: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
  min-height: 100vh; display: flex; flex-direction: column;   /* footer həmişə aşağıda */
}
*:focus-visible { outline: 2px solid #2d5a3d; outline-offset: 2px; border-radius: 3px; }
a { color: #2d5a3d; } a:hover { color: #234a31; }

[hidden] { display: none !important; }

@keyframes ek-spin { to { transform: rotate(360deg); } }
@keyframes ek-seal { 0%,100% { transform: scale(1); } 50% { transform: scale(1.055); } }
@keyframes ek-write { 0% { width: 6%; } 45% { width: 94%; } 100% { width: 6%; } }
@keyframes ek-up { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition: none !important; }
}

.page {
  flex: 1 0 auto;   /* məzmun böyüsə də footer aşağıda qalır */
  /* Boş yan sahələr "təhlükəsizlik kağızı" hissi versin: çox solğun diaqonal
     saplar (hüquqi motiv) + mərkəzi işıqlandıran, kənarları bir az dərinləşdirən
     radial vinyet → mərkəzdəki qutu kağız üstündə sənəd kimi görünür. */
  background:
    repeating-linear-gradient(45deg, rgba(45,90,61,.02) 0 1px, transparent 1px 15px),
    radial-gradient(1100px 640px at 50% 34%, #f6f1e7 0%, #efe9dd 58%, #e8e1d1 100%);
  padding: 0 0 40px;   /* yuxarı 0 → masthead ekranın ən üstünə yapışır; yan 0 → bandlar kənara çatır */
}
/* Məzmun sütunu başlıqla (masthead) eyni kənarlara qədər uzanır. */
.container { max-width: 1200px; margin: 0 auto; padding: 0 28px; }

/* Masthead — service bar-a bitişik, fərqli (açıq sage) tonlu tam-enli band.
   Logo sol kənara, hesab düymələri sağ kənara "çəkilir" (geniş inner). */
.masthead { background: #f5eddc; border-bottom: 1px solid #e7dcc4; }
/* Rail-lər kənarlara (space-between), mərkəz ortada. */
/* Mərkəzi məzmun sütunu — yan rail-lar çıxarıldı; fokuslu tək sütun, ortalanmış.
   Ancillary məlumat (sosial, əlaqə, digər xidmətlər) tam-enli footer-ə köçdü;
   məhsul imkanları + təhlükəsizlik Haqqımızda səhifəsindədir. */
.wrap {
  width: 100%; max-width: 100%; min-width: 0; margin: 0 auto;
  display: flex; flex-direction: column; gap: 22px;
}
/* Tablet zolağı: header düymələri yalnız ikona (mətn ≥640px gizli) → eni məzmuna daralt. */
@media (min-width: 640px) and (max-width: 1160px) {
  .hdr .hdr-act, .hdr .user-btn { width: auto; }
}

/* ── Header ── */
.hdr {
  display: flex; align-items: center; gap: 10px;
  max-width: 1200px; margin: 0 auto; padding: 14px 28px;   /* geniş inner → logo/düymələr kənarlara yaxın */
}
.brand { display: flex; align-items: center; gap: 15px; cursor: pointer; border-radius: 10px; }
.brand:focus-visible { outline: 2px solid #2d5a3d; outline-offset: 3px; }
.seal {
  width: 62px; height: 62px; border-radius: 50%;
  border: 2px solid #2d5a3d;
  display: flex; align-items: center; justify-content: center;
  color: #2d5a3d; font-weight: 700;
  font-family: 'IBM Plex Serif', Georgia, serif; font-size: 18px; letter-spacing: .3px;
  background: #e8efe8; flex: 0 0 auto; box-shadow: inset 0 0 0 3px #faf7f0;
}
.wordmark {
  font-family: 'IBM Plex Serif', Georgia, serif;
  font-size: 50px; font-weight: 600; letter-spacing: -.01em; line-height: 1;
  white-space: nowrap;   /* logo heç vaxt söz-ortası qırılmasın (tablet zolağında "e-Kati/b" buqu) */
}
.wm-ai { position: relative; display: inline-block; }
.wm-ai .g { color: #2d5a3d; }
/* em-əsaslı: wordmark böyüyəndə swoosh proporsional qalır, a→i düzgün oturur */
.swoosh { position: absolute; left: 0; bottom: -.32em; width: 100%; height: .40em; overflow: visible; }
/* Swoosh (a → i): real nisbətli viewBox (dartılma yoxdur), ox ucu əyrinin son toxunanına simmetrikdir
   (ekatib-mobile scripts/splash/wordmark.py --web). Səhifə açılanda çəkilir, sonra hər 30 s-dən bir yenidən. */
.swoosh path { fill: none; stroke: #2d5a3d; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.swoosh .sw-curve { stroke-dasharray: 1; animation: sw-draw 30s ease-in-out infinite; }
.swoosh .sw-head { animation: sw-head 30s ease-in-out infinite; }
@keyframes sw-draw { 0% { stroke-dashoffset: 1; } 4%, 100% { stroke-dashoffset: 0; } }
@keyframes sw-head { 0%, 3.4% { opacity: 0; } 4.4%, 100% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .swoosh .sw-curve, .swoosh .sw-head { animation: none; } }
.tagline { margin-top: 17px; }
/* Böyük söz-aralıqları əvəzinə bərabər hərf-aralığı ilə logo eninə yaxın,
   dolğun görünüş (yeke boşluqlar yox) */
.tagline-main {
  font-size: 11px;
  font-weight: 500;
  color: #4a4335;
  line-height: 1.25;
  letter-spacing: 0.19em;
  margin-bottom: 2px;
  white-space: nowrap;
}
.tagline-sub { color: #6b6455; font-size: 15px; line-height: 1.35; }

/* Bacarıq / məlumat kartları (kənar rail-lərdə) */
.cap {
  background: #faf7f0; border: 1px solid #e6ded0; border-radius: 14px;
  padding: 16px 18px; display: flex; flex-direction: column; gap: 8px;
}
.cap-icon { color: #2d5a3d; }
.cap-title { font-family: 'IBM Plex Serif', Georgia, serif; font-weight: 600; font-size: 16px; color: #2d5a3d; }
.cap-desc { color: #6b6455; font-size: 13.5px; line-height: 1.55; }
/* Sosial profillər qutusu */
.social-links { display: flex; flex-direction: column; gap: 3px; margin-top: 2px; }
.social-link {
  display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 9px;
  color: #4a4335; text-decoration: none; font-size: 14px; font-weight: 500;
  transition: background .15s, color .15s;
}
.social-link:hover { background: #efe9dd; color: #2d5a3d; }
.social-ic { color: #2d5a3d; flex: 0 0 auto; }

/* ── Cards ── */
/* Çərçivəsiz: working sahə nav ilə footer arasında bütöv (kağız) səth kimi
   görünür; kart sərhədi/kölgəsi yoxdur, məzmun birbaşa parşomen üstündədir.
   Yan padding 0 → başlıq/nav/footer ilə eyni kənardan başlayır (28px container). */
.card {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 10px 0;
  display: flex; flex-direction: column; gap: 16px;
  box-shadow: none;
}
.lbl { font-weight: 600; font-size: 15px; }
textarea#facts {
  width: 100%; resize: vertical; min-height: 130px;
  padding: 15px 16px; border: 1px solid #d3ccbb; border-radius: 10px;
  background: #fffdf7; font-family: inherit; font-size: 15px; line-height: 1.6; color: #26231c;
}
.hint { color: #6b6455; font-size: 13.5px; line-height: 1.5; margin-top: -4px; }

/* ── Buttons ── */
/* Xəbərçi düymə üslubu ilə eyniləşib: yastı (parıltı kölgəsiz), nisbətən kvadrat künc (9px). */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: inherit; font-weight: 600; cursor: pointer;
  border-radius: 9px; border: none;
}
.btn:disabled { cursor: default; }
.btn-sm { padding: 9px 14px; font-size: 13.5px; font-weight: 500; border-radius: 9px; }
.btn-primary {
  background: #2d5a3d; color: #fff; padding: 13px 24px; font-size: 15px;
}
.btn-primary.btn-sm { padding: 10px 18px; font-size: 14px; font-weight: 600; box-shadow: none; }
.btn-primary:hover { background: #234a31; }
.btn-ghost { background: #fff; border: 1px solid #d3ccbb; color: #26231c; }
.btn-ghost:hover { background: #f2ede2; }
.btn-ghost-warn {
  background: transparent; border: 1px solid #cbb8a0; color: #8a5a2a;
  padding: 10px 22px; font-size: 14px; font-weight: 500; border-radius: 9px;
}
.btn-ghost-warn:hover { background: #f3ece2; }
.btn-download {
  background: #2d5a3d; color: #fff; border: 1px solid #2d5a3d; font-weight: 600;
}
.btn-download:hover:not(:disabled) { background: #234a31; border-color: #234a31; }
.btn-download:disabled { background: #8ba491; border-color: #8ba491; opacity: .75; }
.btn-link {
  background: transparent; border: none; color: #2d5a3d;
  font-size: 14px; font-weight: 600; cursor: pointer; font-family: inherit; padding: 6px 0;
}
.btn-link:hover { color: #234a31; }

/* ── Chips ── */
.chips-block { display: flex; flex-direction: column; gap: 10px; border-top: 1px solid #e6dfce; padding-top: 16px; }
.chips-title { font-size: 12px; color: #8b8474; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.chips { display: block; }
/* ── Şablon seçici: axtarış + Kataloq/Qraf (kartoteka) ── */
.picker { gap: 12px; }
.picker-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.picker-views {
  display: inline-flex; padding: 3px; gap: 2px;
  background: #ece6d8; border: 1px solid #ddd5c2; border-radius: 10px;
}
.pv-btn {
  font: inherit; font-size: 12.5px; font-weight: 600; color: #6b6556;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border: 0; border-radius: 7px; background: transparent; cursor: pointer;
  transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}
.pv-btn:hover { color: #2d5a3d; }
.pv-btn.is-on { background: #fffdf7; color: #2d5a3d; box-shadow: 0 1px 2px rgba(38,35,28,.12), 0 0 0 1px #d3ccbb; }

.picker-search { position: relative; display: flex; align-items: center; }
.picker-search-ico { position: absolute; left: 13px; color: #8b8474; pointer-events: none; }
#picker-q {
  width: 100%; font: inherit; font-size: 15px; color: #26231c;
  padding: 12px 120px 12px 40px; border-radius: 11px;
  border: 1px solid #d8d0bc; background: #fffdf7;
  transition: border-color .15s ease, box-shadow .15s ease;
}
#picker-q::placeholder { color: #a39b88; }
#picker-q:focus { outline: none; border-color: #2d5a3d; box-shadow: 0 0 0 3px rgba(45,90,61,.14); }
#picker-q::-webkit-search-cancel-button { cursor: pointer; }
.picker-count {
  position: absolute; right: 44px; font-size: 12px; color: #8b8474;
  font-variant-numeric: tabular-nums; pointer-events: none;
}
.picker-kbd {
  position: absolute; right: 12px; min-width: 22px; text-align: center;
  font: 600 12px/1 'IBM Plex Sans', sans-serif; color: #6b6556;
  padding: 4px 6px; border: 1px solid #d3ccbb; border-bottom-width: 2px; border-radius: 6px;
  background: #f5f0e5; pointer-events: none;
}
#picker-q:focus ~ .picker-kbd, #picker-q:not(:placeholder-shown) ~ .picker-kbd,
#picker-q:not(:placeholder-shown) ~ .picker-count { display: none; }

/* Sürətli seçim: faktlara görə təklif + son istifadə */
.picker-quick { display: flex; flex-direction: column; gap: 8px; }
.pq-row { display: flex; align-items: center; gap: 10px; min-width: 0; animation: ek-up .2s ease both; }
.pq-k {
  flex: none; width: 104px; font-size: 10.5px; font-weight: 700; letter-spacing: .07em;
  text-transform: uppercase; color: #8b8474;
}
.pq-sugg .pq-k { color: #9a7a14; }
.pq-chips { display: flex; gap: 6px; min-width: 0; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.pq-chips::-webkit-scrollbar { display: none; }
.pq-chip {
  flex: none; display: inline-flex; align-items: baseline; gap: 7px; max-width: 340px;
  font: inherit; cursor: pointer; padding: 6px 12px; border-radius: 999px;
  border: 1px solid #ddd5c2; background: #fffdf7; color: #26231c;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
.pq-chip:hover { border-color: #2d5a3d; background: #f6f9f4; transform: translateY(-1px); }
.pq-chip-t { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pq-chip-f { flex: none; font-size: 10.5px; font-weight: 600; color: #8b8474; text-transform: uppercase; letter-spacing: .05em; }
.pq-chip.is-s { border-color: #e2cf8f; background: linear-gradient(#fffaf0, #fdf5e1); }
.pq-chip.is-s::before { content: "✦"; font-size: 11px; color: #c9a227; }
.pq-chip.is-s:hover { border-color: #c9a227; }
.pq-chip.is-sel { border-color: #2d5a3d; background: #e8efe8; }
.pq-chip.is-sel .pq-chip-t { font-weight: 600; color: #1f3d2a; }

/* Kataloq/qrafda təklif vurğusu */
.cat-item.is-sugg { border-color: #e2cf8f; background: #fffaf0; box-shadow: inset 3px 0 0 #c9a227; }
.cat-item.is-sugg .cat-no { color: #c9a227; }
.cat-form.has-sugg:not(.has-sel) .cat-form-name::after {
  content: "✦"; margin-left: 6px; font-size: 10px; color: #c9a227; vertical-align: middle;
}
.doctree-node.is-sugg .doctree-circle { stroke: #c9a227; stroke-width: 2.4; fill: #fdf3d6; }
.doctree-node.is-sugg .doctree-leaf-label { fill: #7a5f0e; font-weight: 600; }

/* Seçilmiş şablon zolağı */
.picker-sel {
  display: flex; align-items: center; gap: 10px; min-width: 0;
  padding: 8px 8px 8px 14px; border-radius: 10px;
  background: #e8efe8; border: 1px solid #c5d6c9; border-left: 3px solid #2d5a3d;
  animation: ek-up .2s ease both;
}
.picker-sel-k {
  flex: none; font-size: 10.5px; font-weight: 700; letter-spacing: .07em;
  text-transform: uppercase; color: #4a7a59;
}
#picker-sel-name {
  flex: 1; min-width: 0; font-family: 'IBM Plex Serif', Georgia, serif; font-weight: 600;
  font-size: 14.5px; color: #1f3d2a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.picker-sel-x {
  flex: none; width: 28px; height: 28px; border-radius: 7px; border: 0; cursor: pointer;
  background: transparent; color: #4a7a59; font-size: 13px;
}
.picker-sel-x:hover { background: #d5e3d7; color: #1f3d2a; }

/* Axtarış nəticələri */
.picker-results {
  max-height: 440px; overflow: auto; padding: 6px;
  border: 1px solid #e6dfce; border-radius: 14px; background: #fbf8f1;
}
.pr-head {
  display: flex; justify-content: space-between; gap: 10px; padding: 4px 10px 8px;
  font-size: 11.5px; font-weight: 600; color: #8b8474; font-variant-numeric: tabular-nums;
}
.pr-tip { font-weight: 500; color: #a39b88; }
.pr-item {
  display: flex; flex-direction: column; gap: 3px; padding: 10px 12px;
  border-radius: 9px; cursor: pointer; border: 1px solid transparent;
}
.pr-item.is-active { background: #fffdf7; border-color: #d8d0bc; box-shadow: 0 1px 3px rgba(38,35,28,.08); }
.pr-item.is-active .pr-title { color: #1f3d2a; }
.pr-title { font-family: 'IBM Plex Serif', Georgia, serif; font-size: 15px; color: #26231c; line-height: 1.35; }
.pr-title mark {
  color: inherit; font-weight: 600; padding: 0 1px; border-radius: 2px;
  background: linear-gradient(transparent 58%, rgba(201,162,39,.38) 58%);
}
.pr-crumb { font-size: 11.5px; color: #8b8474; letter-spacing: .01em; }
.pr-item.is-sel .pr-crumb::after { content: " · seçilib"; color: #2d5a3d; font-weight: 600; }
.pr-empty { display: flex; flex-direction: column; gap: 6px; padding: 18px 14px 20px; font-size: 13.5px; color: #6b6556; }
.pr-empty b { font-family: 'IBM Plex Serif', Georgia, serif; font-size: 15px; color: #26231c; }

/* Kataloq — solda forma siyirmələri, sağda nömrələnmiş kartlar */
.catalog {
  /* Hündürlük həddi SÜTUNLARDADIR (konteynerdə yox): grid sətri məzmuna görə böyüyür,
     konteyner max-height-i onu kəsib scroll-suz qoyurdu → aşağı şablonlar əlçatmaz idi. */
  display: grid; grid-template-columns: 210px 1fr; min-height: 340px; align-items: start;
  border: 1px solid #e6dfce; border-radius: 16px; overflow: hidden; background: #fbf8f1;
}
.cat-rail {
  display: flex; flex-direction: column; gap: 2px; padding: 12px 0 12px 10px; overflow: auto;
  align-self: stretch; max-height: 560px;
  background:
    repeating-linear-gradient(0deg, rgba(45,90,61,.025) 0 1px, transparent 1px 22px),
    #f1ebdd;
  border-right: 1px solid #e3dbc8;
}
.cat-domain {
  font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: #8b8474; padding: 12px 12px 6px 6px;
}
.cat-domain:first-child { padding-top: 2px; }
.cat-form {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font: inherit; text-align: left; cursor: pointer;
  padding: 9px 12px 9px 12px; margin-right: -1px;
  border: 1px solid transparent; border-right: 0; border-radius: 9px 0 0 9px;
  background: transparent; color: #4a4536;
  transition: background .15s ease, color .15s ease;
}
.cat-form:hover { background: rgba(255,253,247,.6); color: #2d5a3d; }
.cat-form-name { font-family: 'IBM Plex Serif', Georgia, serif; font-size: 15px; }
.cat-form-n {
  font-size: 11.5px; font-weight: 600; font-variant-numeric: tabular-nums; color: #8b8474;
  min-width: 24px; text-align: center; padding: 2px 6px; border-radius: 999px; background: #e7e0cf;
}
.cat-form.is-on {
  background: #fbf8f1; color: #1f3d2a; border-color: #e3dbc8;
  box-shadow: -2px 1px 4px rgba(38,35,28,.05);
}
.cat-form.is-on::before {
  content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px;
  border-radius: 0 3px 3px 0; background: #2d5a3d;
}
.cat-form.is-on .cat-form-name { font-weight: 600; }
.cat-form.is-on .cat-form-n { background: #2d5a3d; color: #fff; }
.cat-form.has-sel .cat-form-name::after {
  content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 7px;
  border-radius: 50%; background: #c9a227; vertical-align: middle;
}

.cat-body { overflow: auto; max-height: 560px; padding: 18px 22px 22px; }
.cat-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 12px;
  padding-bottom: 12px; margin-bottom: 6px; border-bottom: 1px solid #e6dfce;
}
.cat-title {
  margin: 0; font-family: 'IBM Plex Serif', Georgia, serif; font-weight: 600;
  font-size: 24px; letter-spacing: -.01em; color: #1f3d2a; line-height: 1.15;
}
.cat-meta { margin-top: 4px; font-size: 12px; color: #8b8474; font-variant-numeric: tabular-nums; }
.cat-add {
  flex: none; font: inherit; font-size: 12px; font-weight: 600; color: #2d5a3d; cursor: pointer;
  padding: 6px 11px; border-radius: 9px; border: 1px dashed #9cbca6; background: transparent;
  transition: background .15s ease, border-color .15s ease;
}
.cat-add:hover { background: #e8efe8; border-color: #2d5a3d; border-style: solid; }
.cat-group { margin-top: 14px; }
.cat-group-h {
  display: flex; align-items: center; gap: 8px; margin: 0 0 8px;
  font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: #6b6556;
}
.cat-group-h::after { content: ""; flex: 1; height: 1px; background: #e6dfce; }
.cat-group-n { font-variant-numeric: tabular-nums; color: #a39b88; font-weight: 600; }
.cat-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 6px; }
.cat-item {
  display: flex; align-items: baseline; gap: 10px; text-align: left; cursor: pointer;
  font: inherit; padding: 9px 12px; border-radius: 9px;
  border: 1px solid #ece5d4; background: #fffdf7; color: #26231c;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
  animation: ek-up .26s ease both; animation-delay: calc(var(--i, 0) * 14ms);
}
.cat-item:hover { border-color: #9cbca6; background: #f6f9f4; transform: translateY(-1px); }
.cat-no {
  flex: none; font-size: 11px; font-weight: 600; color: #b3ab97;
  font-variant-numeric: tabular-nums; letter-spacing: .02em;
}
.cat-item-t { font-size: 14px; line-height: 1.38; }
.cat-item.is-sel { background: #2d5a3d; border-color: #2d5a3d; color: #fff; }
.cat-item.is-sel .cat-no { color: #a9c6b2; }
.cat-item.is-sel .cat-item-t::after { content: " ✓"; font-weight: 700; }

/* Qrafda seçilmiş leaf */
.doctree-node.is-sel .doctree-circle { fill: #2d5a3d; stroke: #2d5a3d; stroke-dasharray: none; }
.doctree-node.is-sel .doctree-label > span { color: #faf7f0 !important; font-weight: 600; }

@media (max-width: 680px) {
  .dt-hint { display: none; }
  .chips::after { content: "İki barmaqla miqyası dəyişin"; }
  #picker-q { font-size: 16px; padding-right: 16px; }
  .picker-count, .picker-kbd { display: none; }
  .pr-tip { display: none; }
  .pq-row { flex-direction: column; align-items: stretch; gap: 4px; }
  .pq-k { width: auto; }
  .pq-chip { max-width: 260px; }
  /* Sətirlər: forma zolağı məzmuna görə (auto), qalan hündürlük şablonlara (1fr).
     Əks halda şablon az olanda (məs. Təqdimat — 1) min-height artığı zolağa da
     paylanırdı → zolaq uzanır, 999px radiuslu düymələr dairəyə çevrilib daşırdı. */
  .catalog { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .cat-rail {
    flex-direction: row; align-items: center; align-self: start; gap: 6px; padding: 10px;
    overflow-x: auto; overflow-y: hidden;
    border-right: 0; border-bottom: 1px solid #e3dbc8; scrollbar-width: none; max-height: none;
  }
  .cat-rail::-webkit-scrollbar { display: none; }
  .cat-domain { display: none; }
  .cat-form { flex: none; border-radius: 999px; border: 1px solid #ddd5c2; margin: 0; padding: 6px 10px 6px 14px; }
  .cat-form.is-on { border-color: #2d5a3d; box-shadow: none; }
  .cat-form.is-on::before { display: none; }
  .cat-form-name { font-size: 14px; white-space: nowrap; }
  .cat-body { padding: 14px; max-height: 60vh; }
  .cat-title { font-size: 20px; }
  .cat-list { grid-template-columns: 1fr; }
}

/* ── Sənəd növləri radial şəbəkəsi (Sənədçi) ── */
/* "Sıfırla" barı — qrafın üstündə, sağa düzlənmiş */
.chips { position: relative; }
.doctree-toolbar { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.doctree-toolbar .doctree-reset { margin-left: auto; }
.dt-zoom {
  display: inline-flex; align-items: stretch; border: 1px solid #cfc7b3; border-radius: 9px;
  background: #faf7f0; overflow: hidden;
}
.dt-zbtn, .dt-zval, .dt-fit {
  font: inherit; font-size: 12px; font-weight: 600; color: #2d5a3d; cursor: pointer;
  background: transparent; border: 0; transition: background .15s ease, opacity .15s ease;
}
.dt-zbtn { width: 30px; font-size: 16px; line-height: 1; padding: 4px 0; }
.dt-zval {
  min-width: 52px; padding: 5px 6px; font-variant-numeric: tabular-nums; color: #4a4536;
  border-left: 1px solid #e3dbc8; border-right: 1px solid #e3dbc8;
}
.dt-zbtn:hover:not(:disabled), .dt-zval:hover { background: #e8efe8; }
.dt-zbtn:disabled { opacity: .35; cursor: default; }
.dt-fit {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px;
  border: 1px solid #cfc7b3; border-radius: 9px; background: #faf7f0;
}
.dt-fit:hover { background: #e8efe8; border-color: #2d5a3d; }
.dt-hint { font-size: 11.5px; color: #a39b88; }
/* Adi təkər ipucu — qrafın üzərində qısa müddət görünür */
.chips::after {
  content: "Miqyas üçün Ctrl + təkər istifadə edin";
  position: absolute; left: 50%; top: 54%; transform: translate(-50%, -50%);
  padding: 9px 16px; border-radius: 10px; pointer-events: none;
  background: rgba(31,61,42,.86); color: #faf7f0; font-size: 13px; font-weight: 500;
  opacity: 0; transition: opacity .2s ease;
}
.chips.show-hint::after { opacity: 1; }
.doctree-reset {
  font: inherit; font-size: 12px; font-weight: 600; color: #2d5a3d;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 11px; border: 1px solid #cfc7b3; border-radius: 9px;
  background: #faf7f0; cursor: pointer;
  transition: background .15s ease, border-color .15s ease, opacity .15s ease;
}
.doctree-reset:hover { background: #e8efe8; border-color: #2d5a3d; }
.doctree-reset:disabled { opacity: .45; cursor: default; }
.doctree {
  width: 100%; height: min(560px, 72vh); overflow: auto; display: flex; cursor: grab;
  padding: 4px; border-radius: 16px;
  background:
    radial-gradient(circle at 50% 46%, #f3f0e4 0%, #efeadc 42%, #eae3d1 100%);
  border: 1px solid #e6dfce;
}
.doctree.is-panning { cursor: grabbing; user-select: none; }
/* flex + margin:auto: kiçik qraf mərkəzdə, böyük qraf tam scroll-lanır (kəsilmir) */
.doctree-svg { display: block; flex: none; margin: auto; overflow: visible; }
.doctree-leaf-label {
  font-family: 'IBM Plex Sans', sans-serif; font-size: 11px; fill: #4a4536;
  pointer-events: all; transition: fill .15s ease;
}
.doctree-node.is-leaf:hover .doctree-leaf-label { fill: #1f3d2a; font-weight: 600; }
.doctree-node.is-leaf:focus-visible .doctree-leaf-label { fill: #1f3d2a; font-weight: 600; text-decoration: underline; }
.doctree-node.is-sel .doctree-leaf-label { fill: #1f3d2a; font-weight: 700; }
/* Spok-lar (web xətləri) — mərkəzdən çıxanlar bir az daha qabarıq. */
.doctree-edge { fill: none; stroke: #bdd0c1; stroke-width: 1.4; stroke-linecap: round; }
.doctree-edge-root { stroke: #9cbca6; stroke-width: 1.8; }

/* Mərkəzi hub */
.doctree-hub-ring { fill: none; stroke: #c7d8ca; stroke-width: 1.4; opacity: .7; }
.doctree-hub-core {
  fill: #2d5a3d; stroke: #244c33; stroke-width: 1.5;
  filter: drop-shadow(0 2px 4px rgba(36,76,51,.28));
}
.doctree-hub-label > span { color: #f3efe4 !important; font-weight: 700; }

/* Form node "+" rozetkası — bu formaya sənəd nümunəsi töhfəsi */
.doctree-add { cursor: pointer; }
.doctree-add-bg {
  fill: #2d5a3d; stroke: #faf7f0; stroke-width: 1.5;
  filter: drop-shadow(0 1px 2px rgba(36,76,51,.3)); transition: fill .15s ease;
}
.doctree-add:hover .doctree-add-bg { fill: #244c33; }
.doctree-add-plus {
  fill: #faf7f0; font-weight: 700; font-family: inherit;
  pointer-events: none; -webkit-user-select: none; user-select: none;
}
.doctree-add:focus { outline: none; }
.doctree-add:focus-visible .doctree-add-bg { stroke: #2d5a3d; stroke-width: 2.6; }

/* Sənəd nümunəsi töhfəsi forması (modal) */
.contrib-form { display: flex; flex-direction: column; gap: 12px; }
.contrib-note {
  display: flex; align-items: center; gap: 8px;
  font-size: 12.5px; font-weight: 600; color: #2d5a3d;
  background: #eef3ee; border: 1px solid #d8e5d9; border-radius: 8px; padding: 9px 12px;
}
.contrib-note svg { flex: none; }
.contrib-target {
  font-size: 13px; font-weight: 600; color: #2d5a3d;
  background: #eef3ee; border: 1px solid #d8e5d9; border-radius: 8px; padding: 8px 12px;
}
.contrib-field { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: #5b5547; }
.contrib-field input, .contrib-field textarea {
  font: inherit; padding: 9px 11px; border: 1px solid #cfc7b3; border-radius: 9px;
  background: #fcfaf4; color: #2a2721; resize: vertical;
}
.contrib-field textarea { min-height: 160px; line-height: 1.5; }
.contrib-field input:focus, .contrib-field textarea:focus {
  outline: none; border-color: #2d5a3d; box-shadow: 0 0 0 3px rgba(45,90,61,.12);
}
.contrib-form .field-ok { font-size: 13px; font-weight: 600; }

/* Öz-nümunə seçimi modalı (phase="choice") — iki böyük seçim kartı */
.mode-opts { display: flex; flex-direction: column; gap: 10px; padding: 4px 0 2px; }
.mode-opt {
  display: flex; flex-direction: column; gap: 4px; text-align: left;
  font: inherit; cursor: pointer; padding: 13px 15px;
  background: #fcfaf4; border: 1px solid #cfc7b3; border-radius: 9px;
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}
.mode-opt:hover, .mode-opt:focus-visible {
  outline: none; border-color: #2d5a3d; background: #f4f7f4;
  box-shadow: 0 0 0 3px rgba(45,90,61,.12);
}
.mode-opt-title { font-size: 14.5px; font-weight: 700; color: #2d5a3d; }
.mode-opt-desc { font-size: 12.5px; line-height: 1.5; color: #5b5547; }

/* Node-lar — dərinliyə görə ölçü JS-dən; burada rəng/animasiya */
/* grab kursoru + touch-action:none → mausla/toxunuşla sürükləmə (yer dəyişmə) */
.doctree-node { cursor: grab; touch-action: none; animation: ek-fade .22s ease both; }
.doctree-node:active { cursor: grabbing; }
/* Sürükləmə zamanı giriş animasiyası və hover-miqyas söndürülür (titrəmə olmasın) */
.doctree.is-dragging .doctree-node { animation: none; }
.doctree.is-dragging .doctree-circle { transition: none; }
.doctree-circle {
  fill: #fcfaf4; stroke: #2d5a3d; stroke-width: 1.6;
  transition: fill .16s ease, stroke .16s ease, transform .16s ease;
  transform-box: fill-box; transform-origin: center;
  filter: drop-shadow(0 1px 2px rgba(45,90,61,.12));
}
/* Dərinlik rəng pilləsi: domain tünd-dolu çərçivə, form orta, leaf solğun/kəsik */
.doctree-node.d0 .doctree-circle { stroke-width: 2; }
.doctree-node.d1 .doctree-circle { stroke: #4a7a59; }
.doctree-node.d2 .doctree-circle { stroke: #7ba488; stroke-width: 1.6; fill: #fffdf7; }
.doctree-node:hover .doctree-circle { fill: #e8efe8; transform: scale(1.06); }
.doctree-node.is-open .doctree-circle {
  fill: #2d5a3d; stroke: #244c33;
  filter: drop-shadow(0 2px 5px rgba(36,76,51,.3));
}
.doctree-node.is-leaf:hover .doctree-circle { fill: #2d5a3d; stroke: #2d5a3d; stroke-dasharray: none; }
/* Fokus halqası (outline yox — kəsilməsin) */
.doctree-node:focus { outline: none; }
.doctree-node:focus-visible .doctree-circle {
  stroke: #2d5a3d; stroke-width: 2.4;
  filter: drop-shadow(0 0 0 3px rgba(45,90,61,.16));
}
/* Ad node-un içində — şrift ölçüsü JS-dən, 3 sətrə qədər, artığı "…" */
.doctree-label {
  width: 100%; height: 100%; box-sizing: border-box;
  display: flex; align-items: center; justify-content: center; text-align: center;
  padding: 0 1px; overflow: hidden;
  pointer-events: none; -webkit-user-select: none; user-select: none;
}
.doctree-label > span {
  font-family: inherit; font-size: 8.5px; line-height: 1.12; color: #3f5c47; font-weight: 500;
  word-break: break-word; hyphens: auto;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.doctree-node.is-open .doctree-label > span { color: #faf7f0; font-weight: 600; }
.doctree-node:not(.is-open):hover .doctree-label > span { color: #2d5a3d; }
@keyframes ek-fade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .doctree-node { animation: none; } }

/* ── Processing ── */
.proc { animation: ek-up .4s ease both; gap: 18px; }
/* Əl-yazı səhnəsi — qələm sətir boyunca yazır, sonra pozan pozub yenidən yazır.
   Bloknot kağızı: sol qırmızı haşiyə + solğun üfüqi sətirlər; mətn italik serif. */
.write-paper {
  position: relative; border-radius: 12px; border: 1px solid #e2dccc;
  background-color: #fbf7ec; padding: 18px 22px; min-height: 92px; overflow: hidden;
  background-image:
    linear-gradient(90deg, transparent 40px, rgba(178,60,30,.18) 40px, rgba(178,60,30,.18) 41px, transparent 41px),
    repeating-linear-gradient(180deg, transparent 0 33px, rgba(45,90,61,.09) 33px 34px);
  box-shadow: inset 0 1px 0 #fffdf7;
}
.write-line {
  font-family: 'IBM Plex Serif', Georgia, serif; font-style: italic;
  font-size: 17px; line-height: 34px; color: #26231c;
  padding-left: 52px; min-height: 34px; word-break: break-word;
}
.write-text { letter-spacing: .1px; }
.write-caret {
  display: inline-block; width: 2px; height: 19px; margin: 0 1px; vertical-align: -3px;
  background: #2d5a3d; border-radius: 1px; animation: ek-caret 1.05s steps(1) infinite;
}
@keyframes ek-caret { 0%, 50% { opacity: 1; } 50.01%, 100% { opacity: 0; } }
.write-tool {
  display: inline-block; width: 34px; height: 34px; margin-left: -6px;
  vertical-align: -0.9em; pointer-events: none; will-change: transform;
}
.write-tool.writing { animation: ek-penwrite .34s ease-in-out infinite; transform-origin: 20% 80%; }
.write-tool.erasing { animation: ek-erase .16s ease-in-out infinite; transform-origin: 50% 80%; }
@keyframes ek-penwrite { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-2px) rotate(-3deg); } }
@keyframes ek-erase { 0% { transform: translateX(-1px); } 50% { transform: translateX(2px); } 100% { transform: translateX(-1px); } }
.proc-title { font-family: 'IBM Plex Serif', Georgia, serif; font-size: 19px; font-weight: 600; }
.proc-sub { color: #6b6455; font-size: 14px; margin-top: 4px; }
/* Proqres indikatoru (sənəd hazırlanır) */
.proc-progress { display: flex; flex-direction: column; gap: 9px; }
.pp-head { display: flex; justify-content: space-between; align-items: baseline; }
.pp-label { font-size: 15px; font-weight: 600; color: #2d5a3d; }
.pp-pct { font-size: 13px; font-weight: 600; color: #6b7d6b; font-variant-numeric: tabular-nums; }
.pp-track {
  height: 10px; border-radius: 999px;
  background: #e6dfce; overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0,0,0,.08);
}
.pp-fill {
  height: 100%; width: 0; border-radius: 999px;
  background: linear-gradient(90deg, #4a8560, #2d5a3d);
  transition: width .45s ease;
}
.proc-stop { display: flex; justify-content: center; margin-top: 2px; }

/* ── Result ── */
.result { display: flex; flex-direction: column; gap: 15px; animation: ek-up .45s ease both; }
.complete-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px; justify-content: space-between;
  background: #f3ecd9; border: 1px solid #e3d3a8; border-radius: 12px; padding: 14px 18px;
}
.cr-text { font-size: 15px; color: #5a4a20; font-weight: 500; }
.result-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; justify-content: space-between; }
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px; border-radius: 999px; font-size: 13px; font-weight: 600;
}
.badge .dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; }
.badge.template { background: #e8efe8; color: #2d5a3d; border: 1px solid #cbdccb; }
.badge.template .dot { background: #2d5a3d; }
.badge.ai { background: #f5ecd6; color: #8a5a12; border: 1px solid #e3d3a8; }
.badge.ai .dot { background: #b0810f; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.paper {
  background: #fffdf7; border: 1px solid #e4ddcb; border-radius: 6px;
  box-shadow: 0 1px 0 #efe7d6, 0 14px 34px -20px rgba(0,0,0,.28);
  padding: 44px 48px; max-height: 560px; overflow: auto;
}
.doc {
  white-space: pre-wrap; font-family: 'IBM Plex Serif', Georgia, serif;
  font-size: 16px; line-height: 1.85; color: #26231c; min-height: 200px; word-break: break-word;
}
.doc-edit { outline: none; caret-color: #2d5a3d; background: #fffbf0; border-radius: 4px; }
.blank { background: #f4ead0; color: #9a6a15; border-radius: 3px; padding: 0 3px; font-style: italic; }

/* ── Struktur sənəd formatı (server doc_format HTML-i; .docx export ilə eyni) ── */
.doc.doc-formatted { white-space: normal; }
.doc-fmt { white-space: normal; }
.doc-fmt .doc-h { text-align: center; font-weight: 700; }
.doc-fmt .doc-sub { text-align: center; }
.doc-fmt .doc-reg { text-align: right; }
.doc-fmt .doc-addr { margin-left: 66.667%; text-align: left; }
.doc-fmt .doc-pagebreak { border-top: 1px dashed #c9c2b0; margin: 28px 0; break-before: page; page-break-before: always; }
.doc-fmt .doc-p { text-align: justify; text-indent: 1.25cm; }
/* İki-sütunlu sətir: sol abzasdan, sağ kənara kip — .docx sağ tab stop ekvivalenti. */
.doc-fmt .doc-row { display: flex; justify-content: space-between; gap: 1.5em; align-items: baseline; }
.doc-fmt .doc-row-l { padding-left: 1.25cm; white-space: nowrap; }
.doc-fmt .doc-row-r { white-space: nowrap; text-align: right; }
/* Boş sətir → şaquli aralıq (docx-dəki boş abzasa uyğun). */
.doc-fmt .doc-blank { height: 0.9em; }

/* ── Error ── */
.error-card {
  background: #faf7f0; border: 1px solid #e0c9b8; border-radius: 12px;
  padding: 24px; display: flex; flex-direction: column; gap: 12px; animation: ek-up .4s ease both;
}
.err-title { font-family: 'IBM Plex Serif', Georgia, serif; font-weight: 600; font-size: 17px; color: #8a3a1a; }
.err-body { color: #5c5346; font-size: 14.5px; line-height: 1.6; }

/* ── Footer ── */
.ftr { text-align: center; color: #8b8474; font-size: 13px; border-top: 1px solid #ddd5c4; padding-top: 18px; margin-top: 4px; }

/* ── Alt xidmət paneli (Məxfiçi / Təhlilçi / Məqaləçi / Araşdırmaçı / Haqqımızda) ── */
/* Tam-enli yaşıl nav bandı (footer ilə simmetrik). Band ekran kənarlarına
   uzanır; linklər isə .nav-inner ilə mərkəzi sütunda saxlanılır. */
.service-bar {
  background: #2d5a3d;
  color: #fff;
  border-bottom: 3px solid #234a31;   /* footer-in border-top-una simmetrik */
  margin: 0 0 24px;                    /* masthead-a bitişik (yuxarı boşluq yox) */
  padding: 8px 0;
}
/* Eni və yan kənarı başlıq/qutu/footer ilə eyni (1200 / 28px); space-between →
   ilk ad sol kənarda, son ad sağ kənarda, digər blokların başlama/bitmə xətti ilə. */
.nav-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 28px;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 6px 14px;
}
/* İlk/son linkin daxili padding-ini əvəzlə → MƏTN kənarı 28px xəttinə (logo/footer)
   dəqiq düşsün, sadəcə düymə qutusu yox. */
.nav-inner .service-link:first-child { margin-left: -14px; }
.nav-inner .service-link:last-child { margin-right: -14px; }
.service-bar .service-link {
  background: transparent;
  border: none;
  color: inherit;
  font-family: inherit;
  font-size: 16.5px;
  font-weight: 600;
  cursor: pointer;
  padding: 5px 14px;
  border-radius: 8px;
  transition: background .15s;
  white-space: nowrap;
  text-decoration: none;   /* Xəbərçi anchor-dır (link) → alt-xətt olmasın */
}
.service-bar .service-link:hover { background: rgba(255,255,255,.12); }
.service-bar .service-link:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
/* Aktiv tab: krem həb, yaşıl mətn (bar rənginin tərsi). */
.service-bar .service-link.active,
.service-bar .service-link.active:hover { background: #faf7f0; color: #2d5a3d; }

/* ── Tab panelləri (bölmə məzmunu naviqasiyanın altında açılır) ── */
.tab-panel { display: flex; flex-direction: column; gap: 22px; animation: ek-up .28s ease both; }

/* ── Xidmət darvazası: anon istifadəçi qapalı xidmətə baxır (panel görünür,
   iş sahəsi pərdə + "Daxil ol" CTA ilə örtülür) ── */
.tab-panel.gate-active { position: relative; }
.gate-curtain {
  position: absolute; inset: 0; z-index: 6;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  background: rgba(239, 233, 221, .62);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  border-radius: 12px; animation: ek-up .2s ease both;
}
.gate-cta {
  max-width: 420px; text-align: center;
  background: #faf7f0; border: 1px solid #d3ccbb; border-radius: 14px;
  padding: 30px 30px 26px; box-shadow: 0 10px 34px rgba(45, 90, 61, .16);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.gate-lock { color: #2d5a3d; }
.gate-cta-title { font-family: 'IBM Plex Serif', Georgia, serif; font-size: 21px; font-weight: 600; color: #2c2a24; }
.gate-cta-sub { font-size: 14px; line-height: 1.55; color: #6b6455; margin-bottom: 6px; }
.gate-cta .btn-primary { width: 100%; max-width: 260px; }

/* Header: anon "Daxil ol / Qeydiyyat" düyməsi (hdr-actions gizli olanda sağa) */
.hdr-login {
  margin-left: auto; flex: 0 0 auto; white-space: nowrap;
  /* Xəbərçi bloqundakı .hdr-cta ilə eyni ölçü (masthead düyməsi eyniləşir,
     mobildə də: hər ikisi 14px/9px 16px/9px radius). */
  padding: 9px 16px; font-size: 14px; border-radius: 9px; box-shadow: none; line-height: 1.6;
}

/* ── Ortaq fakt-giriş qutusu (createFactBox) ── */
.fb-input {
  width: 100%; box-sizing: border-box; resize: vertical; min-height: 130px;
  padding: 15px 16px; border: 1px solid #d3ccbb; border-radius: 10px;
  background: #fffdf7; font-family: inherit; font-size: 15px; line-height: 1.6; color: #26231c;
}
.fb-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
/* Göndərmə qısayolu ipucu (Ctrl/⌘ + Enter) — düymənin solunda, sakit. */
.fb-kbd { font-size: 13px; color: #6b6455; }
/* Canlı simvol sayğacı — həddə yaxınlaşanda görünür; həddi aşanda qırmızı. */
.fb-count { margin-top: 4px; text-align: right; font-size: 13px; color: #6b6455; font-variant-numeric: tabular-nums; }
.fb-count.over { color: #b5502e; font-weight: 600; }

/* ── Vahid giriş sırası: Əlavə et · Kamera · Mikrofon ──
   Mətn sahəsinin altında «kargüzarlıq alət zolağı»: üç eyni ölçülü düymə, sağda sakit ipucu;
   seçilən fayllar kağız yarlıqları (çip) kimi düzülür; sürükləmədə bütün qutu kəsik-xətt çərçivəyə alınır. */
.fb-ingest { display: flex; flex-direction: column; gap: 8px; margin-top: -2px; }
.fb-ingest-btns { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ig-btn { gap: 7px; padding: 8px 13px; font-weight: 500; }
.ig-btn svg { flex: 0 0 auto; color: #2d5a3d; }
.ig-btn:disabled { opacity: .55; }
/* Mikrofon yazılır: qırmızı çərçivə + nəbz; «Dayandır · 0:12» etiketi */
.ig-btn.is-rec { color: #8a1f1f; border-color: #d99a9a; background: #fdf1f1; font-variant-numeric: tabular-nums; }
.ig-btn.is-rec svg { color: #c0392b; animation: ek-rec-pulse 1.1s ease-in-out infinite; }
.ig-btn.is-rec:hover { background: #fbe6e6; }
@keyframes ek-rec-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.fb-ingest-hint { font-size: 12.5px; color: #8a836f; line-height: 1.4; margin-left: 2px; }
.fb-ingest-cam {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 9px 12px; border: 1px solid #c5d6c9; border-radius: 10px; background: #e8efe8;
  font-size: 13.5px; color: #1f3d2a; animation: ek-up .18s ease both;
}
.fb-ingest-cam .ig-cam-txt { font-weight: 600; }
.fb-ingest-cam .ig-cam-x { margin-left: auto; font-weight: 500; color: #6b6455; }
.fb-ingest-chips { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; animation: ek-up .18s ease both; }
.fb-chip {
  display: inline-flex; align-items: center; gap: 7px; max-width: 100%;
  padding: 4px 10px 4px 4px; border-radius: 8px; background: #fffdf7; border: 1px solid #e4ddcb;
  box-shadow: 0 1px 0 #efe7d6; font-size: 12.5px; color: #26231c;
}
.fb-chip img { width: 28px; height: 28px; object-fit: cover; border-radius: 5px; border: 1px solid #e4ddcb; background: #fff; }
.fb-chip-name { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.fb-chip-size { color: #8a836f; font-variant-numeric: tabular-nums; }
.fb-chip-x { font-size: 12.5px; font-weight: 500; color: #8a836f; padding: 4px 6px; }
.fb-chip-x:hover { color: #8a3a1a; }
.fb-ingest-status { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: #4a4335; }
.fb-ingest.is-busy .fb-ingest-hint { visibility: hidden; }
.card.is-drop, .imp-stage.is-drop { outline: 2px dashed #2d5a3d; outline-offset: -6px; background: #f3f6f1; }
.card.is-drop .fb-input, .imp-stage.is-drop textarea { border-color: #2d5a3d; }
/* Qutu-içi tanıtım cümləsi (xidmətin şəxsiyyəti) — serif lead */
.fb-intro {
  font-family: 'IBM Plex Serif', Georgia, serif; font-size: 17.5px; line-height: 1.5;
  font-weight: 500; color: #2d5a3d;
}
/* Bölmə başlığı/hero (Xəbərçi lenti üçün) */
.panel-intro {
  font-family: 'IBM Plex Serif', Georgia, serif; font-size: 22px; line-height: 1.4;
  font-weight: 600; color: #2d5a3d; text-align: center; max-width: 640px;
  margin: 2px auto 2px;
}
/* Xəbərçi — boş lent vəziyyəti */
.feed-empty { align-items: center; text-align: center; gap: 8px; padding: 48px 24px; }
.feed-empty svg { color: #2d5a3d; opacity: .85; margin-bottom: 4px; }
.feed-empty-title { font-family: 'IBM Plex Serif', Georgia, serif; font-size: 18px; font-weight: 600; color: #26231c; }
.feed-empty-sub { color: #6b6455; font-size: 14px; line-height: 1.55; max-width: 44ch; }

/* ── Panel ── */
.overlay {
  position: fixed; inset: 0; background: rgba(30,26,18,.46);
  display: flex; z-index: 60; align-items: center; justify-content: center; padding: 20px;
}
.panel {
  background: #faf7f0; display: flex; flex-direction: column; gap: 16px;
  padding: 24px; box-shadow: 0 26px 74px -26px rgba(0,0,0,.55);
  width: 100%; max-width: 520px; max-height: 86vh; border-radius: 14px; margin: auto;
}
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.panel-title { font-family: 'IBM Plex Serif', Georgia, serif; font-size: 21px; font-weight: 600; }
.panel-sub { color: #6b6455; font-size: 14px; margin-top: 4px; }
.panel-x { background: transparent; border: none; color: #6b6455; font-size: 20px; cursor: pointer; line-height: 1; padding: 4px; flex: 0 0 auto; font-family: inherit; }
.panel-count { font-size: 13px; color: #2d5a3d; font-weight: 600; background: #e8efe8; padding: 6px 12px; border-radius: 999px; align-self: flex-start; }
/* padding: fokus halqasına (outline offset+en) hər tərəfdən yer ver ki, overflow:auto
   onu kəsməsin və halqa panelin sərhədini aşmasın. */
.fields { display: flex; flex-direction: column; gap: 14px; max-height: 46vh; overflow: auto; padding: 5px 7px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 14px; color: #4a4335; font-weight: 500; line-height: 1.4; }
.field input {
  width: 100%; padding: 11px 13px; border: 1px solid #d3ccbb; border-radius: 9px;
  background: #fffdf7; font-family: inherit; font-size: 14.5px; color: #26231c;
}
.field textarea.field-ta {
  width: 100%; padding: 11px 13px; border: 1px solid #d3ccbb; border-radius: 9px;
  background: #fffdf7; font-family: inherit; font-size: 14.5px; color: #26231c;
  line-height: 1.5; resize: vertical; min-height: 120px;
}
.field > select {
  width: 100%; padding: 10px 12px; border: 1px solid #d3ccbb; border-radius: 9px;
  background: #fffdf7; font-family: inherit; font-size: 14.5px; color: #26231c;
}
.field-long .fb-ingest { margin-top: 2px; }
/* panel input-larında halqanı sıx saxla — kənar/panel sərhədini aşmasın */
.field input:focus-visible { outline-offset: 1px; }
/* law_search namizəd çipləri (suggest-only) */
.field-suggest { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 2px; }
.field-suggest-cap { font-size: 11.5px; color: #8b8474; font-weight: 600; }
.field-suggest .chip { font: inherit; font-size: 12.5px; line-height: 1.35; text-align: left; white-space: normal; max-width: 100%; padding: 5px 10px; border: 1px solid #d3ccbb; border-radius: 9px; background: #fbf8f1; color: #2b2a26; cursor: pointer; }
.field-suggest .chip:hover { border-color: #2d5a3d; color: #2d5a3d; }
.field-suggest-src { font-size: 11.5px; color: #2d5a3d; }
.field-suggest-meta { font-size: 11.5px; color: #8b8474; }
.field-suggest-note { flex-basis: 100%; font-size: 11.5px; color: #8b8474; }
/* law_search ALT-BƏND təklifi (Yol A, suggest-only) */
.field-subclause { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 4px; }
.subclause-cap { font-size: 11.5px; color: #8b8474; font-weight: 600; }
.subclause-present { color: #2d5a3d; border-color: #cbdccb; }         /* faktda VAR — yaşıl ailə, klikləniləbilən */
.subclause-present:hover { background: #e8efe8; border-color: #cbdccb; color: #2d5a3d; }
.subclause-missing {                                                  /* ÇATIŞIR — sarı, məlumat üçün */
  background: #fbf6e3; border-color: #e6dba8; color: #8b7a3a; cursor: default; opacity: 1;
}
.subclause-missing:hover { background: #fbf6e3; border-color: #e6dba8; color: #8b7a3a; }
.panel-actions { display: flex; gap: 10px; justify-content: flex-end; border-top: 1px solid #e4ddcb; padding-top: 16px; }

@media (max-width: 639px) {
  .paper { padding: 26px 22px; }
  .overlay { align-items: flex-end; justify-content: center; padding: 0; }
  .panel { max-width: 560px; border-radius: 18px 18px 0 0; padding: 20px; }
  .fields { max-height: 42vh; }
}

/* ── Header əməliyyat düymələri (Şablonlarım / Sənədlərim / Məxfiçi) ──
   Enlər əvvəlki 185px-in yarısı qədər (92px); mətn vizual olaraq gizlədilir,
   ancaq ekran oxuyucular və title atributu ilə əlçatandır. */
.hdr-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; flex: 0 0 auto; align-self: center; }
/* Xəbərçi-dəki "Xəbərçi idarəetməsi" (yaşıl kontur) üslubu — ölçülər saxlanılır. */
.hdr-act {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  background: transparent; border: 1px solid #2d5a3d; border-radius: 9px;
  padding: 6px 10px; cursor: pointer; font-family: inherit; color: #2d5a3d;
  font-size: 14px; font-weight: 600; min-height: 44px;
  width: 92px;   /* əvvəlki 185px-in yarısı */
  position: relative;
}
.hdr-act:hover { background: #e8efe8; border-color: #234a31; color: #234a31; }
.hdr-act svg { flex: 0 0 auto; color: #2d5a3d; }
.hdr-act span {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Masaüstü: düymələrin adları görünür (əvvəl yalnız ikona idi; mobildə onsuz da görünürdü).
   Hamısı EYNİ enlikdə (ən uzun ad — «Nümunələrim» — sığır). Admin + 5 düymə ≥1120px-də bir sətrə sığır;
   daha dar ekranda (640–1119) yalnız ikona (bərabər 92px), mətn title ilə. */
@media (min-width: 1120px) {
  .hdr .hdr-act { width: 148px; padding: 6px 10px; gap: 8px; }
  .hdr-act span {
    position: static; width: auto; height: auto; margin: 0; padding: 0;
    overflow: visible; clip: auto; white-space: nowrap;
  }
}

/* ── Header user menu ── */
.hdr-user { margin-left: 0; position: relative; flex: 0 0 auto; align-self: center; }
.user-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  background: transparent; border: 1px solid #2d5a3d; border-radius: 9px;
  padding: 6px 8px 6px 6px; cursor: pointer; font-family: inherit; color: #2d5a3d;
  width: 92px;   /* digər header düymələri ilə eyni en */
}
.user-btn:hover { background: #e8efe8; border-color: #234a31; }
.user-btn .user-name {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.user-avatar {
  width: 30px; height: 30px; border-radius: 50%; flex: 0 0 auto;
  background: #2d5a3d; color: #fff; display: flex; align-items: center; justify-content: center;
  font-family: 'IBM Plex Serif', Georgia, serif; font-weight: 600; font-size: 14px; text-transform: uppercase;
}
.user-name { font-size: 14px; font-weight: 600; flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-caret { color: #6b6455; flex: 0 0 auto; }
.user-menu {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 50;
  background: #faf7f0; border: 1px solid #ddd5c4; border-radius: 12px;
  padding: 6px; min-width: 232px; display: flex; flex-direction: column; gap: 2px;
  box-shadow: 0 18px 44px -20px rgba(0,0,0,.4); animation: ek-up .16s ease both;
}
.user-menu-item {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  background: transparent; border: none; border-radius: 8px; cursor: pointer;
  font-family: inherit; font-size: 14px; font-weight: 500; color: #26231c; padding: 10px 12px;
}
.user-menu-item svg { color: #6b6455; flex: 0 0 auto; }
.user-menu-item:hover { background: #e8efe8; color: #2d5a3d; }
.user-menu-item:hover svg { color: #2d5a3d; }
.user-menu-item.danger { color: #8a3a1a; }
.user-menu-item.danger svg { color: #b3623c; }
.user-menu-item.danger:hover { background: #fdf1ee; color: #8a3a1a; }
.user-menu-item.danger:hover svg { color: #8a3a1a; }

/* ── Account panel ── */
.acct-panel { max-width: 560px; gap: 18px; }
.acct-tabs { display: flex; gap: 4px; background: #f2ede2; border: 1px solid #e2dccc; border-radius: 11px; padding: 4px; }
.acct-tab {
  flex: 1; padding: 9px 6px; border: none; border-radius: 8px; cursor: pointer;
  font-family: inherit; font-size: 13px; font-weight: 600; color: #6b6455; background: transparent;
  line-height: 1.2;
}
.acct-tab:hover { color: #2d5a3d; }
.acct-tab.active { background: #faf7f0; color: #2d5a3d; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
/* Yan padding: overflow:auto fokus halqasını KƏSMƏSİN (input tam-enlidir →
   halqa/çərçivə konteynerin kənarına dəyməsin). */
.acct-body { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 4px 8px; }
.acct-sec { display: flex; flex-direction: column; gap: 15px; }
/* Hesab panelində fokus login stili (uzanmayan daxili halqa) — outline kənara
   çıxıb kəsilmir; sahə/çərçivə panel sərhədini aşmır. */
.acct-panel .field input:focus,
.acct-panel .field input:focus-visible {
  outline: none; border-color: #2d5a3d; box-shadow: 0 0 0 3px rgba(45,90,61,.14);
}
.acct-confirm { display: flex; flex-direction: column; gap: 15px; }
.acct-note { margin: 0; font-size: 13px; color: #6b6455; line-height: 1.5; }
.acct-actions { display: flex; justify-content: flex-end; border-top: 1px solid #e4ddcb; padding-top: 16px; margin-top: 2px; }
.btn-primary.btn-sm:disabled { background: #8ba491; box-shadow: none; }
.field .field-err { font-size: 13px; color: #8a3a1a; }
.field input[type="password"], .field input[type="text"] {
  width: 100%; padding: 11px 13px; border: 1px solid #d3ccbb; border-radius: 9px;
  background: #fffdf7; font-family: inherit; font-size: 14.5px; color: #26231c;
}

/* password strength */
.pw-meter { display: flex; align-items: center; gap: 10px; }
.pw-bars { display: flex; gap: 4px; flex: 1; }
.pw-bars span { flex: 1; height: 5px; border-radius: 5px; background: #ddd5c2; transition: background .2s; }
.pw-label { font-size: 12.5px; font-weight: 600; flex: 0 0 auto; }
.pw-hint { color: #6b6455; font-size: 12.5px; line-height: 1.4; }

/* ── Kod girişi (login səhifəsi ilə eyni dizayn: tək mərkəzi xana) ── */
.code-input {
  width: 100%; box-sizing: border-box; padding: 13px 14px; padding-left: .5em;
  text-align: center; letter-spacing: .5em; font-weight: 600; font-size: 18px;
  font-family: inherit; color: #26231c;
  background: #fffdf7; border: 1px solid #d3ccbb; border-radius: 10px; line-height: 1.4; outline: none;
}
.code-input::placeholder { color: #c3bba7; letter-spacing: .5em; }
.code-input:focus { border-color: #2d5a3d; box-shadow: 0 0 0 3px rgba(45,90,61,.14); }

/* ── MFA states ── */
.mfa { display: flex; flex-direction: column; gap: 16px; }
.mfa-status { display: flex; align-items: center; gap: 12px; }
.mfa-badge {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 999px;
  font-size: 13px; font-weight: 600;
}
.mfa-badge.on { background: #e8efe8; color: #2d5a3d; border: 1px solid #cbdccb; }
.mfa-badge.off { background: #f3ecd9; color: #8a5a12; border: 1px solid #e3d3a8; }
.mfa-badge .dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; background: currentColor; }
.mfa-desc { color: #6b6455; font-size: 13.5px; line-height: 1.55; }
.mfa-qr {
  align-self: center; background: #fff; border: 1px solid #e4ddcb; border-radius: 12px; padding: 14px;
  box-shadow: 0 8px 22px -16px rgba(0,0,0,.4); line-height: 0;
}
.mfa-qr svg, .mfa-qr img { width: 190px; height: 190px; display: block; }
.mfa-secret {
  display: flex; flex-direction: column; gap: 5px; align-items: center; text-align: center;
}
.mfa-secret-label { font-size: 12.5px; color: #6b6455; }
.mfa-secret-code {
  font-family: 'IBM Plex Mono', ui-monospace, Menlo, monospace; font-size: 14px; font-weight: 600;
  letter-spacing: .06em; color: #2d5a3d; background: #e8efe8; border: 1px solid #cbdccb;
  border-radius: 8px; padding: 8px 12px; word-break: break-all;
}
.mfa-step-title { font-family: 'IBM Plex Serif', Georgia, serif; font-size: 16px; font-weight: 600; }
.mfa-loading { color: #6b6455; font-size: 14px; padding: 8px 0; }

/* Ehtiyat (recovery) kodları */
.mfa-rc-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.mfa-rc-count { font-size: 13.5px; color: #6b6455; }
.mfa-rc-count.low { color: #8a5a12; font-weight: 600; }
.rc-warn {
  font-size: 13px; line-height: 1.55; color: #8a5a12;
  background: #f7efdc; border: 1px solid #e6d5a9; border-radius: 10px; padding: 12px 14px;
}
.rc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rc-code {
  font-family: 'IBM Plex Mono', ui-monospace, Menlo, monospace; font-size: 14px; font-weight: 600;
  letter-spacing: .04em; color: #2d5a3d; background: #f4f1e8; border: 1px solid #ddd5c2;
  border-radius: 8px; padding: 9px 12px; text-align: center; user-select: all;
}

/* Təhlükə zonası — hesab silmə */
.danger-zone {
  display: flex; flex-direction: column; gap: 14px;
  border: 1px solid #e3b7ab; background: #fbf1ee; border-radius: 12px; padding: 16px 18px;
}
.danger-title { font-family: 'IBM Plex Serif', Georgia, serif; font-size: 17px; font-weight: 600; color: #a3341a; }
.danger-desc { color: #8a5040; font-size: 13.5px; line-height: 1.55; }
.btn-danger { background: #b23c1e; color: #fff; border: none; }
.btn-danger:hover { background: #9c3319; }

/* ── Toasts ── */
.toast-host {
  position: fixed; top: 18px; left: 50%; transform: translateX(-50%);
  z-index: 90; display: flex; flex-direction: column; gap: 10px; align-items: center;
  pointer-events: none; width: max-content; max-width: 92vw;
}
.toast {
  display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 11px;
  font-size: 14px; font-weight: 500; box-shadow: 0 14px 34px -16px rgba(0,0,0,.45);
  animation: ek-up .22s ease both; background: #faf7f0; border: 1px solid #ddd5c4; color: #26231c;
}
.toast svg { flex: 0 0 auto; }
.toast.ok { background: #e8efe8; border-color: #cbdccb; color: #234a31; }
.toast.ok svg { color: #2d5a3d; }
.toast.err { background: #fdf1ee; border-color: #e0c9b8; color: #8a3a1a; }
.toast.err svg { color: #b3623c; }

@media (max-width: 639px) {
  .hdr { flex-wrap: wrap; }
  .hdr-user { align-self: center; }
  .user-name { max-width: 120px; }
  .mfa-qr svg, .mfa-qr img { width: 160px; height: 160px; }
}

/* ── "Sənədlərim" PIN modalı ── */
.pin-panel { max-width: 400px; }
.pin-field { margin-top: 4px; }
.pin-label { font-size: 12.5px; color: #6b6455; font-weight: 500; margin-bottom: 8px; }
.pin-panel .code-input { max-width: 220px; }

/* ── "Sənədlərim" siyahısı ── */
.docs-list { display: flex; flex-direction: column; gap: 8px; min-height: 60px; max-height: 60vh; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.docs-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 14px; background: #faf7f0; border: 1px solid #e6ded0; border-radius: 10px;
  cursor: pointer; text-align: left; font-family: inherit; width: 100%;
}
.docs-row:hover { background: #f2ede2; border-color: #cbdccb; }
.docs-row-title { font-size: 14px; font-weight: 600; color: #26231c; }
.docs-row-date { font-size: 12px; color: #8a836f; flex: 0 0 auto; }
.docs-empty { color: #8a836f; font-size: 13.5px; text-align: center; padding: 20px 0; }
.docs-detail-title { font-family: 'IBM Plex Serif', Georgia, serif; font-size: 17px; font-weight: 600; margin: 8px 0 10px; }
.docs-paper { max-height: 52vh; overflow: auto; }
.docs-detail .doc { white-space: pre-wrap; }
.docs-detail .doc.doc-formatted { white-space: normal; }   /* rəsmi format (doc_format HTML) */
.docs-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 12px; }
/* Sənədlərim (seyf) — ayrıca səhifə görünüşü (modal deyil). */
.docs-page-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.docs-page-ico { color: #2d5a3d; flex: 0 0 auto; }
.seyf-home { display: flex; align-items: center; gap: 14px; color: inherit; text-decoration: none; border-radius: 10px; min-width: 0; }
.seyf-home:hover .docs-page-title { color: #2d5a3d; }
.seyf-home:focus-visible { outline: 2px solid #2d5a3d; outline-offset: 4px; }
.docs-page-title { font-family: 'IBM Plex Serif', Georgia, serif; font-size: 22px; font-weight: 600; color: #26231c; line-height: 1.1; }
.docs-page-sub { font-size: 13.5px; color: #6b6455; margin-top: 3px; }
/* Səhifədə siyahı/paper səhifə ilə birlikdə axsın (modal-vari vh limiti yox). */
.docs-page .docs-list { max-height: none; overflow: visible; }
.docs-page .docs-paper { max-height: none; }
/* ── Seyf: işlər (qovluqlar) + tərəflər ── */
.seyf-sec-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 20px 0 10px; }
.seyf-sec-head:first-child { margin-top: 4px; }
.seyf-h { font-family: 'IBM Plex Serif', Georgia, serif; font-size: 16px; font-weight: 600; color: #2d5a3d; margin: 0; }
.new-case-form { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; align-items: center; }
.new-case-form input { flex: 1 1 200px; font-family: inherit; font-size: 14px; padding: 9px 12px; border: 1px solid #d3ccbb; border-radius: 9px; background: #fff; color: #26231c; }
.new-case-form input:focus-visible { outline: 2px solid #2d5a3d; outline-offset: 1px; }
.case-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.case-folder { display: flex; align-items: center; gap: 12px; text-align: left; cursor: pointer;
  background: #faf7f0; border: 1px solid #e0d8c6; border-radius: 12px; padding: 14px 16px; transition: border-color .15s, box-shadow .15s, transform .15s; }
.case-folder:hover { border-color: #b9cbb9; box-shadow: 0 6px 18px -12px rgba(45,90,61,.5); transform: translateY(-1px); }
.case-folder:focus-visible { outline: 2px solid #2d5a3d; outline-offset: 2px; }
.case-ico { color: #2d5a3d; flex: 0 0 auto; display: inline-flex; }
.case-folder-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.case-folder-title { font-size: 14.5px; font-weight: 600; color: #26231c; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.case-folder-meta { font-size: 12px; color: #8a836f; }
.case-detail-head { margin: 8px 0 4px; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.case-del { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.case-detail-title { font-family: 'IBM Plex Serif', Georgia, serif; font-size: 20px; font-weight: 600; color: #26231c; }
.case-detail-no { font-size: 13px; color: #8a836f; margin-top: 2px; }
.parties-list { display: flex; flex-direction: column; gap: 8px; }
.party-card { position: relative; background: #faf7f0; border: 1px solid #e0d8c6; border-radius: 11px; padding: 12px 14px; }
.party-role { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #2d5a3d; background: #e8efe8; border-radius: 999px; padding: 3px 10px; margin-bottom: 6px; }
.party-name { font-size: 14.5px; font-weight: 600; color: #26231c; }
.party-det { font-size: 13px; color: #6b6455; margin-top: 4px; line-height: 1.5; }
.party-edit { position: absolute; top: 12px; right: 14px; background: none; border: none; color: #2d5a3d; font: 600 13px inherit; cursor: pointer; padding: 2px 4px; }
.party-edit:hover { color: #234a31; text-decoration: underline; }

/* İşin faktları (davamlı yaddaş) + bölmə-başlıq düymə qrupu */
.seyf-head-acts { display: inline-flex; gap: 8px; }
.case-facts { width: 100%; font-family: inherit; font-size: 14px; line-height: 1.55;
  padding: 10px 12px; border: 1px solid #d3ccbb; border-radius: 9px; background: #fff;
  color: #26231c; resize: vertical; }
.case-facts:focus-visible { outline: 2px solid #2d5a3d; outline-offset: 1px; }
.case-facts::placeholder { color: #a39a86; }

/* Sənədçi: aktiv iş kontekst zolağı (Seyf «Bu iş üçün sənəd hazırla») */
.case-ctx { display: flex; align-items: center; gap: 9px; margin-bottom: 14px;
  padding: 9px 12px; background: #e8efe8; border: 1px solid #b9cbb9; border-radius: 9px;
  color: #2d5a3d; font-size: 13.5px; }
.case-ctx-text { flex: 1 1 auto; min-width: 0; }
.case-ctx-text b { font-weight: 700; }
.case-ctx-x { flex: 0 0 auto; background: none; border: none; cursor: pointer;
  color: #2d5a3d; font-size: 14px; line-height: 1; padding: 3px 6px; border-radius: 6px; }
.case-ctx-x:hover { background: #d8e4d8; }
.case-ctx-x:focus-visible { outline: 2px solid #2d5a3d; outline-offset: 1px; }

/* İşə idxal modalı (sənəddən tərəf + fakt çıxarışı) */
.imp-stage { display: flex; flex-direction: column; gap: 12px; min-height: 0; flex: 1 1 auto; overflow-y: auto; padding: 2px 4px; }
.imp-stage textarea { width: 100%; font-family: inherit; font-size: 14px; line-height: 1.55;
  padding: 10px 12px; border: 1px solid #d3ccbb; border-radius: 9px; background: #fff;
  color: #26231c; resize: vertical; }
.imp-stage textarea:focus-visible { outline: 2px solid #2d5a3d; outline-offset: 1px; }
.imp-progress { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: #4a4335; }
.imp-sec-h { font-family: 'IBM Plex Serif', Georgia, serif; font-size: 15px; font-weight: 600; color: #2d5a3d; }
.imp-hint { font-family: 'IBM Plex Sans', sans-serif; font-size: 12px; font-weight: 400; color: #6b6455; }
.imp-parties { display: flex; flex-direction: column; gap: 8px; max-height: 240px; overflow-y: auto; }
.imp-party { display: flex; align-items: flex-start; gap: 10px; cursor: pointer;
  background: #faf7f0; border: 1px solid #e0d8c6; border-radius: 9px; padding: 10px 12px; }
.imp-party input[type="checkbox"] { margin-top: 3px; accent-color: #2d5a3d; }
.imp-party-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.imp-party-head { font-size: 14px; font-weight: 600; color: #26231c; }
.imp-party-det { font-size: 12.5px; color: #6b6455; }
/* Panel max-height 86vh daxilində: sahələr sürüşür, düymələr aşağıda sabit qalır
   (əks halda 8 sahə pəncərədən aşağı daşırdı). */
.party-form { display: flex; flex-direction: column; gap: 12px; min-height: 0; flex: 1 1 auto; }
.party-form-fields { display: flex; flex-direction: column; gap: 12px; overflow-y: auto; min-height: 0; padding: 2px 4px; -webkit-overflow-scrolling: touch; }
.party-form label { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; font-weight: 600; color: #4a4335; }
.party-form input, .party-form textarea { font-family: inherit; font-size: 14px; font-weight: 400; padding: 9px 12px; border: 1px solid #d3ccbb; border-radius: 9px; background: #fff; color: #26231c; }
.party-form input:focus-visible, .party-form textarea:focus-visible { outline: 2px solid #2d5a3d; outline-offset: 1px; }
.party-form textarea { resize: vertical; line-height: 1.5; }
.party-form-actions { display: flex; align-items: center; gap: 8px; padding-top: 12px; border-top: 1px solid #e4ddcb; flex: 0 0 auto; }
.docs-detail-meta { display: flex; align-items: center; gap: 8px; margin: 4px 0 12px; }
.doc-case-label { font-size: 13px; color: #6b6455; }
.doc-case-select { font-family: inherit; font-size: 13.5px; padding: 6px 10px; border: 1px solid #d3ccbb; border-radius: 8px; background: #fff; color: #26231c; cursor: pointer; }
.doc-case-select:focus-visible { outline: 2px solid #2d5a3d; outline-offset: 1px; }
.docs-detail-foot { margin-top: 14px; padding-top: 14px; border-top: 1px solid #e4ddcb; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.doc-del-confirm { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.doc-del-q { font-size: 13.5px; color: #b23c1e; font-weight: 600; }
.case-del-opt { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: #4a4335; cursor: pointer; }
.case-del-opt input { accent-color: #b23c1e; cursor: pointer; }
@media (max-width: 560px) { .case-grid { grid-template-columns: 1fr; } }

/* ── Limitlərim (plan + istifadə) ── */
.field-ok { color: #2d5a3d !important; }
.limits-tabs { display: flex; gap: 4px; background: #f2ede2; border: 1px solid #e2dccc; border-radius: 11px; padding: 4px; flex-shrink: 0; }
.limits-tab {
  flex: 1 1 0; min-height: 40px; padding: 8px 12px; font: inherit; font-size: 14px; font-weight: 600; color: #6b6455;
  background: transparent; border: none; border-radius: 8px; cursor: pointer;
}
.limits-tab:hover { color: #2d5a3d; }
.limits-tab.active { background: #faf7f0; color: #2d5a3d; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.limits-pane { display: flex; flex-direction: column; gap: 16px; flex: 1 1 auto; min-height: 0; }
.limits-pane[hidden] { display: none; }
.plans-intro { margin: 0; font-size: 13px; color: #6b6455; }
.plans-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.plans-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 12.5px; color: #26231c; }
.plans-table th, .plans-table td { padding: 9px 6px; text-align: left; vertical-align: top; border-bottom: 1px solid #e6ded0; overflow-wrap: anywhere; }
.plans-table thead th { font-size: 13px; font-weight: 700; color: #2d5a3d; }
.plans-table tbody th { font-weight: 600; }
.plans-table .is-current { background: #eef4ee; }
.plans-current { display: block; margin-top: 2px; font-size: 11px; font-weight: 500; color: #4a6b53; }
.plans-limit { display: block; white-space: nowrap; }
.plans-limit + .plans-limit { color: #6b6455; }
.plans-price { font-weight: 700; }
@media (max-width: 560px) {
  .plans-table { font-size: 12px; }
  .plans-table th, .plans-table td { padding: 8px 4px; }
  .plans-table thead th:first-child { width: 32%; }
}
.limits-plan { display: flex; align-items: baseline; gap: 8px; }
.limits-plan-label { font-size: 13px; color: #6b6455; }
.limits-plan-name {
  font-size: 15px; font-weight: 700; color: #2d5a3d;
  background: #eef4ee; border: 1px solid #cbdccb; border-radius: 999px; padding: 3px 12px;
}
/* Panel 86vh-dir; 6 resurs × 2 zolaq sığmır → siyahı öz içində sürüşür (users-list kimi),
   plan başlığı və yüksəltmə forması isə görünən qalır. min-height:0 flex uşağının kiçilməsinə icazə verir. */
.limits-body { display: flex; flex-direction: column; gap: 18px; flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding-right: 4px; }
.limit-group { display: flex; flex-direction: column; gap: 10px; }
.limit-group-title { font-size: 13.5px; font-weight: 600; color: #26231c; }
.limit-row { display: flex; flex-direction: column; gap: 5px; }
.limit-row-head { display: flex; align-items: center; justify-content: space-between; }
.limit-win { font-size: 12.5px; color: #6b6455; }
.limit-val { font-size: 12.5px; font-weight: 600; color: #26231c; }
.limit-val.limit-unlimited { color: #2d5a3d; }
.limit-val.limit-full { color: #8a3a1a; }
.limit-track { height: 8px; background: #ece6d8; border-radius: 999px; overflow: hidden; }
.limit-fill { height: 100%; background: #4a7d5a; border-radius: 999px; transition: width .3s ease; }
.limit-fill.limit-fill-warn { background: #c9922e; }
.limit-fill.limit-fill-full { background: #b5502e; }
.limits-upgrade {
  margin-top: 4px; padding-top: 16px; border-top: 1px solid #e6ded0;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.limits-upgrade-text { font-size: 13px; color: #6b6455; flex: 1 1 100%; }
.limits-upgrade .ek-contact { flex: 1 1 100%; }

.user-plan-sel {
  font-family: inherit; font-size: 13px; color: #26231c;
  background: #fff; border: 1px solid #cbdccb; border-radius: 8px; padding: 7px 10px; cursor: pointer;
}
.user-plan-sel:disabled { opacity: .6; cursor: default; }
@media (max-width: 560px) {

  .user-plan-sel { width: 100%; }
}

/* Plan yüksəltmə müraciəti forması (Limitlərim) */
.limits-req-form {
  display: flex; flex-direction: column; gap: 6px;
  padding-top: 16px; border-top: 1px solid #e6ded0;
}
.limits-req-label { font-size: 12.5px; color: #6b6455; font-weight: 500; margin-top: 4px; }
.limits-req-msg {
  font-family: inherit; font-size: 13.5px; color: #26231c; resize: vertical;
  background: #fff; border: 1px solid #cbdccb; border-radius: 8px; padding: 8px 10px;
}
.limits-req-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }

/* Header düyməsindəki müraciət sayğacı (badge) */
.hdr-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px; margin-left: 6px;
  font-size: 11px; font-weight: 700; line-height: 1; color: #fff;
  background: #b5502e; border-radius: 999px;
}
/* ── Anonimləşdirmə ── */
/* #anon-text artıq ortaq .fb-input üslubunu işlədir (Sənədçi qutusu ilə eyni görünüş). */
.anon-result-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.anon-count { font-size: 13.5px; color: #6b6455; }
.anon-count strong { color: #26231c; }
.anon-out { white-space: pre-wrap; }
.anon-ent-title { font-size: 12.5px; font-weight: 600; color: #6b6455; margin: 14px 0 8px; text-transform: uppercase; letter-spacing: .04em; }
.anon-entities { display: flex; flex-direction: column; gap: 6px; max-height: 34vh; overflow-y: auto; }
.anon-ent-row {
  display: flex; align-items: baseline; gap: 10px;
  padding: 8px 12px; background: #faf7f0; border: 1px solid #e6ded0; border-radius: 8px;
}
.anon-tag { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 12.5px; font-weight: 600; color: #7a4a12; flex: 0 0 auto; }
.anon-forms { font-size: 13px; color: #26231c; flex: 1 1 auto; word-break: break-word; }
.anon-cnt { font-size: 12px; color: #8a836f; flex: 0 0 auto; }
.anon-ent-empty { color: #8a836f; font-size: 13.5px; text-align: center; padding: 16px 0; }

/* ── Haqqımızda ── */
.about-card { gap: 12px; }
.about-title { font-family: 'IBM Plex Serif', Georgia, serif; font-size: 21px; font-weight: 600; color: #2d5a3d; }
.about-lead { font-size: 15.5px; line-height: 1.6; color: #26231c; margin: 0; }
.about-p { font-size: 14.5px; line-height: 1.65; color: #4a4335; margin: 0; }
.about-contact { font-size: 14px; color: #6b6455; margin: 4px 0 0; }
/* Hüquqi sənədlər (İstifadə şərtləri / Məxfilik siyasəti) — Haqqımızda içində */
/* Admin-redaktə məzmunu (Haqqımızda): siniflər sanitize-də silinir → konteyner-əsaslı
   stil (bloq .art-body ilə eyni prinsip). Paraqraf məsafəsi + about-lead/about-p görünüşü. */
#about-body, #terms-body, #privacy-body { display: flex; flex-direction: column; gap: 12px; }
#about-body p, #terms-body p, #privacy-body p { font-size: 14.5px; line-height: 1.65; color: #4a4335; margin: 0; }
#about-body p:first-child { font-size: 15.5px; line-height: 1.6; color: #26231c; }
#about-body p strong, #terms-body p strong, #privacy-body p strong { color: #2d5a3d; font-weight: 600; }
#about-body ul, #terms-body ul, #privacy-body ul, #about-body ol, #terms-body ol, #privacy-body ol { margin: 0; padding-left: 22px; font-size: 14.5px; line-height: 1.65; color: #4a4335; }
.legal-note { font-size: 12.5px; color: #8a8271; font-style: italic; margin: -4px 0 2px; }
/* Hüquqi sənədlər akkordeon (<details>): başlıq bağlıdır, klikləyəndə açılır (JS-siz). */
.legal-doc > summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.legal-doc > summary::-webkit-details-marker { display: none; }
.legal-doc > summary::after { content: "⌄"; font-size: 20px; line-height: 1; color: #6b6455; transition: transform .2s; }
.legal-doc[open] > summary::after { transform: rotate(180deg); }
.legal-doc > summary:hover { color: #234a31; }
/* Haqqımızda xüsusiyyət grid-i (məhsul imkanları + təhlükəsizlik) */
.about-features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.about-features .cap {
  background: #faf7f0; border: 1px solid #e6ded0;
  transition: transform .18s ease, box-shadow .18s ease;
}
.about-features .cap:hover { transform: translateY(-3px); box-shadow: 0 14px 26px -18px rgba(0,0,0,.4); }
@media (max-width: 700px) { .about-features { grid-template-columns: 1fr; } }

/* ── Tam-enli sayt footer-i (yaşıl band — yuxarı nav ilə simmetrik) ── */
.site-footer { flex-shrink: 0; background: #2d5a3d; color: #eaf1ea; border-top: 3px solid #234a31; }
.foot-inner {
  max-width: 1200px; margin: 0 auto; padding: 44px 28px 30px;   /* container ilə eyni en/yan → başlıq+qutu+footer eyni kənarda */
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr 1.25fr; gap: 32px;
}
@media (max-width: 1024px) {
  .foot-inner { grid-template-columns: repeat(4, 1fr); gap: 28px 24px; }
  .foot-inner > .foot-brand { grid-column: 1 / -1; }
}
.foot-seal {
  width: 44px; height: 44px; border-radius: 50%; border: 2px solid rgba(255,255,255,.5);
  display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,.06);
  font-family: 'IBM Plex Serif', Georgia, serif; font-weight: 700; font-size: 15px; color: #fff;
  margin-bottom: 12px;
}
.foot-word { font-family: 'IBM Plex Serif', Georgia, serif; font-size: 22px; font-weight: 600; color: #fff; margin-bottom: 4px; }
.foot-tag { font-size: 11px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: rgba(255,255,255,.55); margin-bottom: 12px; }
.foot-blurb { font-size: 13.5px; line-height: 1.6; color: rgba(255,255,255,.72); max-width: 34ch; margin: 0; }
.foot-contact { color: rgba(255,255,255,.85); text-decoration: none; font-size: 13.5px; border-bottom: 1px solid rgba(255,255,255,.25); padding-bottom: 1px; transition: color .15s, border-color .15s; }
.foot-contact:hover { color: #fff; border-color: rgba(255,255,255,.6); }
.foot-h { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: rgba(255,255,255,.6); margin-bottom: 12px; }
.foot-links { display: flex; flex-direction: column; gap: 2px; align-items: flex-start; }
.foot-link {
  background: transparent; border: none; color: rgba(255,255,255,.85); font-family: inherit;
  font-size: 14px; cursor: pointer; padding: 6px 8px; margin-left: -8px; border-radius: 7px;
  text-align: left; transition: background .15s, color .15s; text-decoration: none;
}
.foot-link:hover { background: rgba(255,255,255,.1); color: #fff; }
.foot-link:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.foot-social { display: flex; flex-direction: column; gap: 4px; }
.foot-slink {
  display: flex; align-items: center; gap: 10px; padding: 7px 8px; margin-left: -8px; border-radius: 8px;
  color: rgba(255,255,255,.85); text-decoration: none; font-size: 13.5px; transition: background .15s, color .15s;
}
.foot-slink svg { color: rgba(255,255,255,.75); flex: 0 0 auto; }
.foot-slink:hover { background: rgba(255,255,255,.1); color: #fff; }
.foot-slink:hover svg { color: #fff; }
.foot-bar {
  border-top: 1px solid rgba(255,255,255,.14); text-align: center; font-size: 12.5px;
  color: rgba(255,255,255,.6); padding: 16px 24px; margin-top: 8px;
}
@media (max-width: 760px) {
  .foot-inner { grid-template-columns: 1fr 1fr; gap: 24px 20px; padding: 32px 20px 24px; }
  .foot-brand { grid-column: 1 / -1; }
}
@media (max-width: 440px) { .foot-inner { grid-template-columns: 1fr; } }

/* ═══════════════ MOBİL DÜZƏLİŞLƏR (≤639px) ═══════════════ */
@media (max-width: 639px) {
  .page { padding: 0 0 24px; }           /* masthead ən üstə yapışır */
  .container { padding: 0 12px; }

  /* Header: brend kiçilir, əməliyyat düymələri tam en alt sıraya düşür */
  .hdr { gap: 10px; padding: 12px 14px; }
  .brand { gap: 10px; min-width: 0; }
  .seal { width: 46px; height: 46px; font-size: 14px; }
  .wordmark { font-size: 33px; }
  .tagline { margin-top: 13px; }
  /* mobildə logo daralır → şrift və hərf-aralığı kiçilir, daşma olmasın */
  .tagline-main { font-size: 9.5px; letter-spacing: 0.14em; margin-bottom: 1px; }
  .tagline-sub { font-size: 12.5px; }
  .hdr-actions { order: 3; flex: 1 1 100%; width: 100%; margin-left: 0; gap: 6px; flex-wrap: wrap; }
  /* 2 düymə/sıra: 3-4 admin düyməsi tək sıraya sığmayıb mətn kənarlarda kəsilirdi.
     grow:1 → sırada tək qalan düymə tam enə uzanır (2/3/4 düymə hamısı səliqəli). */
  /* Bərabər ölçü: sırada tək qalan düymə də yarım endə qalır (uzanmır). */
  .hdr-act { flex: 0 0 calc(50% - 3px); width: auto; min-width: 0; padding: 6px 8px; font-size: 12.5px; gap: 5px; min-height: 44px; }
  .hdr-act span {
    position: static;
    width: auto; height: auto;
    margin: 0; padding: 0;
    overflow: visible;
    clip: auto;
    white-space: nowrap;
  }
  .hdr-act svg { width: 15px; height: 15px; }
  .hdr-user { margin-left: auto; }
  .user-btn { width: auto; }
  .user-menu { min-width: 210px; max-width: calc(100vw - 24px); }

  .card { padding: 18px; border-radius: 12px; }

  /* Sənəd vərəqi */
  .paper { padding: 22px 16px; max-height: 68vh; }
  .doc { font-size: 15px; line-height: 1.7; }
  /* İki-sütunlu sətirlər mobilində qırılsın — nowrap üfüqi daşma yaradırdı */
  .doc-fmt .doc-row { flex-wrap: wrap; gap: 0 .8em; }
  .doc-fmt .doc-row-l { padding-left: .6em; white-space: normal; }
  .doc-fmt .doc-row-r { white-space: normal; }
  .doc-fmt .doc-p { text-indent: .8em; }
  /* Ünvan bloku dar ekranda 2/3 girintidə bir-iki sözlük sütuna düşür → yarıya endirilir */
  .doc-fmt .doc-addr { margin-left: 40%; }

  /* Nəticə paneli: düymələr tam en */
  .complete-row { flex-direction: column; align-items: stretch; }
  .actions .btn { flex: 1 1 140px; justify-content: center; }

  /* Giriş sırası: üç düymə bir sırada bərabər, ipucu altda */
  /* min-width:0 — əks halda flex əsası mətn eninə görə qalır, düymələr fərqli ölçüdə çıxırdı */
  .fb-ingest-btns .ig-btn { flex: 1 1 0; min-width: 0; justify-content: center; padding: 10px 6px; gap: 6px; white-space: nowrap; }
  .fb-ingest-hint { flex-basis: 100%; }

  /* Panel düymələri alt-alta (əsas düymə yuxarıda) */
  .panel-actions { flex-direction: column-reverse; }
  .panel-actions .btn { width: 100%; justify-content: center; }

  /* Recovery kodları: tək sütun, uzun kod sındırılır */
  .rc-grid { grid-template-columns: 1fr; }
  .rc-code { word-break: break-all; }

  .code-input { font-size: 17px; letter-spacing: .4em; }

  /* Toast-lar ekran eninə */
  .toast-host { width: calc(100vw - 24px); max-width: none; }
  .toast { width: 100%; }

  /* Nav bandı mobilində kompakt — dar ekranda mərkəzlə (space-between çox seyrək olmasın) */
  .service-bar { padding: 8px 0; }
  .nav-inner { padding: 0 12px; justify-content: center; gap: 6px 16px; }
  .nav-inner .service-link:first-child { margin-left: 0; }
  .nav-inner .service-link:last-child { margin-right: 0; }
  .service-bar .service-link { font-size: 14px; padding: 9px 12px; }

  /* iOS Safari fokus zamanı avtomatik zoom-un qarşısını al: mobil form
     sahələri ≥16px olmalıdır (kiçik font fokusla səhifəni sıçradır) */
  .fb-input, #anon-out, .field input, .field textarea.field-ta,
  .tpl-search input, .tpl-pf-grid input, .tpl-json {
    font-size: 16px;
  }
}

/* ── Məqaləçi (mq-*) — demo boru xətti UI ─────────────────────────────── */
/* Parametr bloku — Sənədçi çips-bloku konvensiyası: düymədən sonra, üst xətt. */
.mq-params {
  display: flex; flex-direction: column; gap: 14px;
  border-top: 1px solid #e6dfce; padding-top: 16px;
}
.mq-param-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.mq-param-title {
  font-size: 12px; color: #8b8474; font-weight: 600;
  text-transform: uppercase; letter-spacing: .05em; min-width: 120px;
}
.mq-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.mq-param-hint { flex-basis: 100%; font-size: 12.5px; color: #8b8474; margin-top: -6px; }
.mq-backend-warn { color: #9a5a1c; margin-top: -2px; }
.mq-codes .mq-pill span { padding: 5px 11px; font-size: 12.5px; }
.mq-pill input { position: absolute; opacity: 0; pointer-events: none; }
.mq-pill { position: relative; cursor: pointer; }
.mq-pill span {
  display: inline-flex; align-items: baseline; gap: 6px;
  padding: 7px 14px; border: 1px solid #d3ccbb; border-radius: 9px;
  background: #fffdf7; font-size: 13.5px; font-weight: 600; color: #4a4335;
  transition: background .15s, border-color .15s, color .15s;
}
.mq-pill span em { font-style: normal; font-weight: 500; font-size: 12px; color: #8b8474; }
.mq-pill:hover span { border-color: #2d5a3d; }
.mq-pill input:checked + span {
  background: #2d5a3d; border-color: #2d5a3d; color: #faf7f0;
}
.mq-pill input:checked + span em { color: #cfe0d2; }
.mq-pill input:focus-visible + span { outline: 2px solid #2d5a3d; outline-offset: 2px; }
.mq-adv summary {
  cursor: pointer; font-size: 13px; font-weight: 600; color: #2d5a3d;
  user-select: none; margin-bottom: 4px;
}
.mq-adv[open] summary { margin-bottom: 12px; }
.mq-adv { border-top: 1px dashed #e6dfce; padding-top: 12px; }
.mq-adv .mq-param-row { margin-bottom: 10px; }
.mq-slider { display: flex; align-items: center; gap: 10px; flex: 1; max-width: 300px; }
.mq-slider input[type=range] { flex: 1; accent-color: #2d5a3d; }
.mq-slider-val {
  min-width: 28px; text-align: center; font-variant-numeric: tabular-nums;
  background: #fffdf7; border: 1px solid #d3ccbb; border-radius: 6px;
  padding: 2px 6px; font-size: 13px; font-weight: 600; color: #26231c;
}

/* Gedişat: timer + mərhələ kartları */
.mq-timer {
  font-size: 13px; font-weight: 600; color: #6b7d6b;
  font-variant-numeric: tabular-nums;
  background: #fffdf7; border: 1px solid #e6dfce; border-radius: 6px; padding: 2px 8px;
}
.mq-stages { display: flex; gap: 10px; flex-wrap: wrap; }
.mq-stage {
  flex: 1; min-width: 110px; padding: 12px 14px;
  background: #faf7f0; border: 1px solid #e6dfce; border-left: 3px solid transparent;
  border-radius: 10px; opacity: .55; transition: opacity .3s, border-color .3s;
}
.mq-stage.running { opacity: 1; border-left-color: #2d5a3d; animation: mq-pulse 1.4s ease-in-out infinite; }
.mq-stage.done { opacity: 1; border-left-color: #4a8560; }
.mq-stage.error { opacity: 1; border-left-color: #b23c1e; }
.mq-s-name { font-weight: 600; font-size: 14px; color: #26231c; }
.mq-s-status { font-size: 12px; color: #8b8474; margin-top: 2px; }
.mq-stage.running .mq-s-status { color: #2d5a3d; }
.mq-stage.done .mq-s-status { color: #4a8560; }
.mq-stage.error .mq-s-status { color: #b23c1e; }
@keyframes mq-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(45,90,61,.18); }
  50% { box-shadow: 0 0 0 5px rgba(45,90,61,.12); }
}
@media (prefers-reduced-motion: reduce) { .mq-stage.running { animation: none; } }

/* Nəticə: demo badge + alt-tablar + panellər */
.mq-demo-badge { background: #f3ecd9; color: #8a5a12; border: 1px solid #e3d3a8; }
.mq-demo-badge .dot { background: #c99a3c; }
.mq-tabs { display: flex; gap: 2px; border-bottom: 1px solid #e6dfce; flex-wrap: wrap; }
.mq-tab {
  padding: 9px 16px; background: transparent; border: none; cursor: pointer;
  font: inherit; font-size: 14px; font-weight: 600; color: #8b8474;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.mq-tab:hover { color: #26231c; }
.mq-tab.active { color: #2d5a3d; border-bottom-color: #2d5a3d; }
.mq-pane { min-height: 120px; }
.mq-empty { color: #8b8474; font-style: italic; }

/* Məqalə mətni — markdown render (serif başlıqlar, sitat bloku) */
.mq-article h1, .mq-article h2, .mq-article h3 {
  font-family: 'IBM Plex Serif', Georgia, serif; color: #26231c; line-height: 1.3;
}
.mq-article h1 { font-size: 24px; margin: 0 0 14px; }
.mq-article h2 { font-size: 18px; margin: 22px 0 8px; color: #2d5a3d; }
.mq-article p { margin: 0 0 12px; line-height: 1.7; }
.mq-article ul { margin: 0 0 12px; padding-left: 22px; }
.mq-article li { margin: 4px 0; line-height: 1.6; }
.mq-article blockquote {
  margin: 14px 0; padding: 10px 16px; border-left: 3px solid #2d5a3d;
  background: #f3f0e4; border-radius: 0 8px 8px 0; color: #4a4335;
}
.mq-article blockquote p { margin: 0; }

/* Plan paneli */
.mq-plan-title {
  font-family: 'IBM Plex Serif', Georgia, serif; font-weight: 600;
  font-size: 17px; color: #2d5a3d; margin-bottom: 10px;
}
.mq-plan-list { margin: 0; padding-left: 22px; }
.mq-plan-list li { margin: 8px 0; line-height: 1.5; }
.mq-plan-q { font-size: 12.5px; color: #8b8474; margin-top: 2px; }

/* Mənbə kartları */
#mq-sources { display: grid; gap: 10px; }
.mq-param-help { flex-basis: 100%; font-size: 12px; color: #6b6355; line-height: 1.4; }
.mq-src-tools { margin: 0 0 10px; text-align: right; }
.mq-src {
  padding: 13px 15px; background: #faf7f0;
  border: 1px solid #e6dfce; border-radius: 10px;
}
.mq-src header { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 5px; }
.mq-src-badge {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; font-weight: 700;
  padding: 2px 8px; border-radius: 9px; background: #e8efe8; color: #2d5a3d;
}
.mq-src-badge.komm { background: #f3ecd9; color: #8a5a12; }
.mq-src-ref { font-size: 12.5px; color: #6b6455; font-variant-numeric: tabular-nums; }
.mq-src-via {
  margin-left: auto; font-size: 10.5px; color: #8b8474;
  border: 1px solid #e6dfce; border-radius: 5px; padding: 1px 6px;
}
.mq-src h4 { margin: 0 0 4px; font-size: 14.5px; color: #26231c; }
.mq-src p { margin: 0; font-size: 13px; color: #4a4335; line-height: 1.55; }
.mq-src-link { display: inline-block; margin-top: 7px; font-size: 12.5px; color: #2d5a3d; font-weight: 600; }
.mq-src-meta { margin: 6px 0 0; font-size: 12px; line-height: 1.5; color: #6b6355; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.mq-src-meta i { font-style: normal; color: #b5ad9c; }
.mq-src-meta a { color: inherit; text-decoration: underline; text-decoration-color: #c9c2b0; }

/* Audit paneli */
.mq-audit-head { font-weight: 600; font-size: 14px; color: #2d5a3d; margin-bottom: 10px; }
.mq-audit-row {
  display: flex; align-items: baseline; gap: 10px; padding: 9px 12px;
  background: #faf7f0; border: 1px solid #e6dfce; border-radius: 9px; margin-bottom: 7px;
  font-size: 13.5px; line-height: 1.5;
}
.mq-audit-row.bad { border-color: #e3b7ab; background: #fbf1ee; }
.mq-audit-mark { font-weight: 700; color: #4a8560; flex: 0 0 auto; }
.mq-audit-row.bad .mq-audit-mark { color: #b23c1e; }
.mq-audit-src {
  margin-left: auto; font-size: 11px; color: #8b8474;
  font-family: ui-monospace, Menlo, Consolas, monospace; flex: 0 0 auto;
}
/* Məqaləçi plan təsdiqi */
.mq-review { display: flex; flex-direction: column; gap: 12px; }
.mq-rv-head h3 { margin: 0 0 4px; font-family: "IBM Plex Serif", Georgia, serif; font-size: 19px; color: #26231c; }
.mq-rv-head .hint { margin: 0; }
.mq-rv-loading { display: flex; align-items: center; gap: 10px; color: #4a4335; font-size: 14px; padding: 18px 0; }
.mq-rv-title { display: flex; flex-direction: column; gap: 4px; }
.mq-rv-title .lbl { font-size: 12px; color: #8b8474; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.mq-rv-title input, .mq-rv-h, .mq-rv-qs {
  font: inherit; font-size: 14.5px; padding: 8px 10px; border: 1px solid #d9d1bf; border-radius: 9px;
  background: #fffdf8; color: #26231c; width: 100%; box-sizing: border-box;
}
.mq-rv-title input:focus, .mq-rv-h:focus, .mq-rv-qs:focus { outline: 2px solid #2d5a3d33; border-color: #2d5a3d; }
.mq-rv-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.mq-rv-item { background: #faf7f0; border: 1px solid #e6dfce; border-radius: 10px; padding: 8px 10px; }
.mq-rv-row { display: flex; align-items: center; gap: 6px; }
.mq-rv-no { flex: 0 0 22px; font-weight: 600; color: #2d5a3d; text-align: center; }
.mq-rv-btn {
  flex: 0 0 auto; width: 32px; height: 32px; border: 1px solid #d9d1bf; border-radius: 8px;
  background: #fffdf8; color: #4a4335; cursor: pointer; font-size: 14px;
}
.mq-rv-btn:hover:not(:disabled) { border-color: #2d5a3d; color: #2d5a3d; }
.mq-rv-btn.del:hover:not(:disabled) { border-color: #b23c1e; color: #b23c1e; }
.mq-rv-btn:disabled { opacity: .35; cursor: default; }
.mq-rv-q { margin: 6px 0 0 28px; font-size: 12.5px; color: #8b8474; }
.mq-rv-q summary { cursor: pointer; }
.mq-rv-qs { margin-top: 6px; font-size: 13px; resize: vertical; }
textarea.mq-rv-h { resize: none; overflow: hidden; line-height: 1.4; min-height: 38px; display: block; }
.mq-rv-add { align-self: flex-start; }
.mq-rv-add:disabled { opacity: .4; cursor: default; }
.mq-rv-err { color: #b23c1e; font-size: 13.5px; margin: 0; }
.mq-rv-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.mq-rv-actions .btn { padding: 9px 16px; font-size: 14px; line-height: 1.4; }
@media (max-width: 639px) {
  .mq-rv-row { flex-wrap: wrap; }
  .mq-rv-h { flex: 1 1 calc(100% - 28px); }
  .mq-rv-row .mq-rv-btn:first-of-type { margin-left: auto; }
  .mq-rv-q { margin-left: 0; }
  .mq-rv-actions .btn { flex: 1 1 auto; }
}

/* Məqaləçi canlı önizləmə (bölmələr hazır olduqca) */
.mq-live-wrap { margin-top: 16px; }
.mq-live-head { font-size: 12.5px; color: #8b8474; margin-bottom: 8px; }
.mq-live { max-height: 420px; overflow-y: auto; }
.mq-live-sec.pending h2, .mq-live-sec.error h2 { color: #8b8474; }
.mq-live-wait { font-size: 13px; color: #8b8474; font-style: italic; }
.mq-live-sec.pending .mq-live-wait::after { content: ""; animation: ek-dots 1.4s steps(4) infinite; }
.mq-live-sec.error .mq-live-wait { color: #b23c1e; font-style: normal; }
@keyframes ek-dots { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75% { content: "..."; } }
.mq-audit-why { display: block; font-size: 12px; color: #9a5a1c; margin-top: 2px; }
.mq-audit-note { font-size: 12.5px; color: #8b8474; margin: -4px 0 10px; }
.mq-audit-notes { margin-top: 14px; font-size: 12.5px; color: #4a4335; }
.mq-audit-notes ul { margin: 4px 0 0; padding-left: 18px; }
.mq-audit-sub {
  font-size: 11.5px; font-weight: 600; color: #8b8474; text-transform: uppercase; letter-spacing: .05em;
}
.mq-article a { color: #2d5a3d; word-break: break-all; }
@media (max-width: 639px) {
  .mq-param-title { min-width: 100%; }
  .mq-stage { min-width: calc(50% - 10px); }
}
.mq-plan-meta { font-size: 12.5px; color: #8b8474; margin: -6px 0 10px; }

/* ── Təhlilçi (th-*) — analiz UI ──────────────────────────────────────── */

/* Risk başlığı: badge + bal + zolaq */
.th-risk { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.th-risk-badge {
  font-size: 13px; font-weight: 700; letter-spacing: .04em;
  padding: 7px 16px; border-radius: 9px; border: 1px solid transparent;
}
.th-risk-badge.HIGH { background: #fbf1ee; color: #b23c1e; border-color: #e3b7ab; }
.th-risk-badge.MEDIUM { background: #f3ecd9; color: #8a5a12; border-color: #e3d3a8; }
.th-risk-badge.LOW { background: #e8efe8; color: #2d5a3d; border-color: #cbdccb; }
.th-score { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 220px; }
.th-score-num {
  font-family: 'IBM Plex Serif', Georgia, serif; font-weight: 600; font-size: 22px; color: #26231c;
  font-variant-numeric: tabular-nums;
}
.th-score-num small { font-size: 13px; color: #8b8474; font-weight: 500; }
.th-score-track {
  flex: 1; height: 10px; border-radius: 999px; background: #e6dfce; overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0,0,0,.08);
}
.th-score-fill { height: 100%; border-radius: 999px; transition: width .5s ease; }
.th-score-fill.HIGH { background: linear-gradient(90deg, #d0693f, #b23c1e); }
.th-score-fill.MEDIUM { background: linear-gradient(90deg, #d8b05e, #b98a2e); }
.th-score-fill.LOW { background: linear-gradient(90deg, #4a8560, #2d5a3d); }

/* Bölmə kartları */
.th-sec { margin-top: 18px; }
.th-sec-title {
  font-size: 12px; color: #8b8474; font-weight: 600;
  text-transform: uppercase; letter-spacing: .05em; margin-bottom: 10px;
  border-top: 1px solid #e6dfce; padding-top: 14px;
}
.th-summary { margin: 0 0 8px; font-size: 15px; line-height: 1.65; color: #26231c; }
.th-recommend {
  margin: 0; padding: 10px 14px; background: #e8efe8; border-radius: 9px;
  font-size: 14px; font-weight: 600; color: #2d5a3d; line-height: 1.5;
}
.th-list { margin: 0; padding-left: 20px; }
.th-list li { margin: 5px 0; font-size: 14px; line-height: 1.55; color: #26231c; }

/* Uyğunluq kartları */
.th-comp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px; }
.th-comp-card { padding: 13px 15px; background: #faf7f0; border: 1px solid #e6dfce; border-radius: 10px; }
.th-comp-name { font-weight: 600; font-size: 14px; color: #26231c; margin-bottom: 4px; }
.th-comp-status { font-size: 13px; font-weight: 700; color: #8a5a12; }
.th-comp-status.ok { color: #2d5a3d; }
.th-vio-list { margin: 8px 0 0; padding-left: 16px; }
.th-vio-list li { margin: 7px 0; font-size: 13px; line-height: 1.5; color: #4a4335; }
.th-law-ref { font-weight: 600; color: #2d5a3d; font-size: 12.5px; }

/* Riskli maddə kartları — sol haşiyə risk rəngində */
.th-clause {
  padding: 11px 14px; margin-bottom: 8px; background: #faf7f0;
  border: 1px solid #e6dfce; border-left: 3px solid #cfc7b3; border-radius: 9px;
}
.th-clause.HIGH { border-left-color: #b23c1e; background: #fbf1ee; }
.th-clause.MEDIUM { border-left-color: #b98a2e; background: #f9f4e6; }
.th-clause.LOW { border-left-color: #4a8560; }
.th-clause-text { font-size: 14px; line-height: 1.55; color: #26231c; font-style: italic; }
.th-clause-exp { margin-top: 5px; font-size: 13px; line-height: 1.5; color: #6b6455; }

/* ── Şablonlarım (sablon-*) — istifadəçi nümunə hovuzu (baxış + sil) ─────── */
.sablon-body { max-height: 60vh; overflow-y: auto; }
.sablon-empty {
  color: #6b6455; font-size: 14px; line-height: 1.6; text-align: center;
  padding: 28px 16px;
}
.sablon-list { display: flex; flex-direction: column; gap: 10px; }
.sablon-card {
  border: 1px solid #e6dfce; border-radius: 10px; background: #faf7f0;
  overflow: hidden;
}
.sablon-card-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; }
.sablon-card-info {
  flex: 1; min-width: 0; text-align: left; background: transparent;
  border: none; cursor: pointer; font: inherit; padding: 0; color: inherit;
}
.sablon-card-title {
  font-weight: 600; font-size: 14.5px; color: #26231c;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sablon-card-meta { font-size: 12.5px; color: #8b8474; margin-top: 2px; }
.sablon-del { flex: 0 0 auto; }
.sablon-del-confirm { background: #fbf1ee; border-color: #d0693f; color: #b23c1e; }
.sablon-preview {
  padding: 12px 14px; border-top: 1px dashed #e0d8c6; background: #fffdf7;
  font-size: 13px; line-height: 1.6; color: #4a4335;
  white-space: pre-wrap; max-height: 260px; overflow-y: auto;
}
.sablon-card.is-open { border-color: #d3ccbb; }

/* Töhfə modalı — gedişat göstəricisi (docRAG əlavəsi bir neçə saniyə çəkə bilər) */
.contrib-progress {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px; border-radius: 9px;
  background: #f3f0e4; border: 1px solid #e3d9c2;
  font-size: 13.5px; color: #4a4335; line-height: 1.5;
}
.ek-spinner {
  flex: 0 0 auto; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid #cfc7b3; border-top-color: #2d5a3d;
  animation: ek-spin .7s linear infinite;
}
@media (prefers-reduced-motion: reduce) { .ek-spinner { animation-duration: 1.6s; } }

/* PIN pop-up-da iş konteksti (Sənədçi → iş üçün sənəd, Seyf kilidi bağlı) */
.pin-ctx {
  display: flex; align-items: flex-start; gap: 11px; margin: 4px 0 16px;
  padding: 12px 14px; border-radius: 11px;
  background: #e8efe8; border: 1px solid #c5d6c9; border-left: 3px solid #2d5a3d; color: #2d5a3d;
}
.pin-ctx > svg { flex: none; margin-top: 2px; }
.pin-ctx-body { min-width: 0; }
.pin-ctx-k { font-size: 10.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: #4a7a59; }
.pin-ctx-title {
  font-family: 'IBM Plex Serif', Georgia, serif; font-weight: 600; font-size: 16px; color: #1f3d2a;
  overflow-wrap: anywhere;
}
.pin-ctx-doc { margin-top: 3px; font-size: 13px; color: #4a4536; overflow-wrap: anywhere; }

/* İşin faktları — avtomatik saxlama statusu */
.facts-status { font-size: 12px; font-weight: 600; color: #8b8474; min-height: 1em; transition: color .2s ease; }
.facts-status.is-pending { color: #a39b88; }
.facts-status.is-ok { color: #2d5a3d; }
.facts-status.is-err { color: #b3412a; }

/* Mobil: bölmə başlığının düymələri tam enə keçir (kəsilməsin, üst-üstə düşməsin) */
@media (max-width: 560px) {
  .seyf-sec-head { flex-wrap: wrap; }
  .seyf-head-acts { width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
  .seyf-head-acts .btn { width: 100%; }
  .docs-actions .btn { flex: 1 1 auto; }
}

/* Çap: yalnız açıq Seyf sənədinin kağızı (body.print-doc printOpenDoc-da qoyulur) */
@media print {
  body.print-doc * { visibility: hidden !important; }
  body.print-doc .docs-paper, body.print-doc .docs-paper * { visibility: visible !important; }
  body.print-doc .docs-paper {
    position: absolute; left: 0; top: 0; width: 100%; margin: 0;
    max-height: none !important; overflow: visible !important;
    box-shadow: none !important; border: 0 !important; background: #fff !important;
  }
}

/* ═══ Seyf Mərhələ 2: kilid göstəricisi, axtarış/süzgəc, mənbə nişanları ═══ */
.docs-page-head .seyf-lock { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
/* Seyf başlıq düymələri: üçü eyni ölçüdə */
.docs-page-head .seyf-lock { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; flex-wrap: nowrap; }
.seyf-head-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; width: 100%; min-width: 150px; text-align: center; }
.seyf-head-btn.is-on { color: #2d5a3d; background: #e8efe8; border-color: #c5d6c9; }
.seyf-head-btn svg { flex: none; }
.seyf-set-card { display: flex; flex-direction: column; gap: 14px; background: #faf7f0; border: 1px solid #e0d8c6; border-radius: 12px; padding: 14px 16px; }
.seyf-set-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.seyf-set-row.is-pin { padding-top: 14px; border-top: 1px solid #e6dfce; }
.seyf-set-title { font-weight: 600; color: #26231c; font-size: 14.5px; }
.seyf-set-hint { font-size: 12.5px; color: #6b6455; margin-top: 2px; line-height: 1.45; }
.seyf-pin-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.seyf-pin-form input { padding: 9px 11px; border: 1px solid #d3ccbb; border-radius: 9px; background: #fffdf7; font: inherit; font-size: 14px; }
.seyf-pin-form input:focus { outline: none; border-color: #2d5a3d; box-shadow: 0 0 0 3px rgba(45,90,61,.14); }
.seyf-pin-acts { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 8px; }
@media (max-width: 640px) {
  .seyf-head-btn { min-width: 0; padding-left: 6px; padding-right: 6px; font-size: 12.5px; white-space: normal; line-height: 1.2; }
  .seyf-set-row { flex-direction: column; align-items: stretch; }
  .seyf-pin-form { grid-template-columns: 1fr; }
}
.seyf-author-wrap { margin: -6px 0 18px; padding-bottom: 14px; border-bottom: 1px solid #e6dfce; }

.seyf-locked {
  display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center;
  padding: 48px 20px 56px; color: #2d5a3d; animation: ek-up .2s ease both;
}
.seyf-locked-title { font-family: 'IBM Plex Serif', Georgia, serif; font-size: 20px; font-weight: 600; color: #1f3d2a; margin-top: 4px; }
.seyf-locked-sub { font-size: 14px; color: #6b6455; margin-bottom: 10px; }

.seyf-tools { display: flex; flex-direction: column; gap: 10px; margin: 0 0 6px; }
.seyf-search { position: relative; display: flex; align-items: center; }
.seyf-search > svg { position: absolute; left: 13px; color: #8b8474; pointer-events: none; }
#seyf-q {
  width: 100%; font: inherit; font-size: 15px; color: #26231c;
  padding: 11px 14px 11px 40px; border-radius: 11px; border: 1px solid #d8d0bc; background: #fffdf7;
  transition: border-color .15s ease, box-shadow .15s ease;
}
#seyf-q::placeholder { color: #a39b88; }
#seyf-q:focus { outline: none; border-color: #2d5a3d; box-shadow: 0 0 0 3px rgba(45,90,61,.14); }
.seyf-filter-row { display: flex; flex-wrap: wrap; gap: 10px 18px; }
.sf-group { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.sf-chip {
  font: inherit; font-size: 12.5px; font-weight: 600; color: #4a4536; cursor: pointer;
  padding: 5px 12px; border-radius: 999px; border: 1px solid #ddd5c2; background: #faf7f0;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.sf-chip:hover { border-color: #9cbca6; color: #2d5a3d; }
.sf-chip.is-on { background: #2d5a3d; border-color: #2d5a3d; color: #fff; }

.seyf-results { margin-top: 12px; display: flex; flex-direction: column; gap: 12px; }
.seyf-results-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-size: 12.5px; font-weight: 600; color: #6b6455;
}
.seyf-clear { font-size: 12.5px; padding: 0; }

/* Sənəd sətri: mənbə nişanı + ad + (iş) + tarix */
.docs-row-main { display: flex; align-items: center; gap: 9px; min-width: 0; flex-wrap: wrap; }
.docs-row-title { overflow-wrap: anywhere; }
.doc-kind {
  flex: none; font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  padding: 2px 8px; border-radius: 6px; border: 1px solid transparent;
}
.doc-kind-katib { color: #2d5a3d; background: #e8efe8; border-color: #c5d6c9; }
.doc-kind-tehlil { color: #8a5a10; background: #fbf1d9; border-color: #ecd9a4; }
.doc-kind-meqale { color: #5b4a86; background: #eeeaf6; border-color: #d6cfe8; }
.doc-case-chip {
  font-size: 11.5px; color: #6b6455; padding: 1px 8px; border-radius: 999px;
  border: 1px dashed #cfc7b3; background: transparent; white-space: nowrap;
}
.docs-group-h {
  display: flex; align-items: center; gap: 8px; margin: 8px 0 0;
  font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: #8b8474;
}
.docs-group-h:first-child { margin-top: 0; }
.docs-group-h::after { content: ""; flex: 1; height: 1px; background: #e6dfce; }

@media (max-width: 560px) {
  .docs-page-head { flex-wrap: wrap; }
  .docs-page-head .seyf-lock { margin-left: 0; width: 100%; justify-content: space-between; }
  .docs-row { align-items: flex-start; }
  .docs-row-date { font-size: 11.5px; }
}

/* ═══ Seyf Mərhələ 3: qruplar, zəngin iş kartları, köçürmə, menyu, tərəf forması ═══ */
.case-sort {
  font: inherit; font-size: 13px; padding: 6px 10px; border: 1px solid #d3ccbb; border-radius: 9px;
  background: #fffdf7; color: #26231c; cursor: pointer;
}
.case-groups { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.cg-chip { display: inline-flex; align-items: center; gap: 7px; }
.cg-n {
  font-size: 11px; font-variant-numeric: tabular-nums; padding: 0 6px; border-radius: 999px;
  background: rgba(38,35,28,.08); line-height: 1.6;
}
.cg-chip.is-on .cg-n { background: rgba(255,255,255,.22); }

/* İş kartı (indi div role=button — daxilində «+ Sənəd» düyməsi var) */
.case-folder { align-items: flex-start; }
.case-folder-body { flex: 1 1 auto; gap: 5px; }
.case-folder-top { display: flex; align-items: center; gap: 7px; min-width: 0; }
.case-folder-top .case-folder-title { flex: 0 1 auto; }
.case-group-tag {
  flex: none; font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: #4a7a59; padding: 1px 7px; border-radius: 6px; background: #e8efe8;
}
.case-folder-no { font-size: 12px; color: #8a836f; }
.case-roles { display: flex; flex-wrap: wrap; gap: 4px; }
.case-role {
  font-size: 11px; color: #4a4536; padding: 1px 7px; border-radius: 999px;
  border: 1px solid #e0d8c6; background: #fffdf7;
}
.case-role.is-more { color: #8a836f; }
.case-folder-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 2px; }
.case-quick {
  flex: none; font: inherit; font-size: 12px; font-weight: 600; color: #2d5a3d; cursor: pointer;
  padding: 3px 9px; border-radius: 8px; border: 1px solid #c5d6c9; background: #fff;
  transition: background .15s ease, border-color .15s ease;
}
.case-quick:hover { background: #e8efe8; border-color: #2d5a3d; }
.case-folder.is-drop { border-color: #2d5a3d; background: #eef4ee; box-shadow: 0 0 0 3px rgba(45,90,61,.18); }
body.is-doc-dragging .case-folder { border-style: dashed; }

/* Ayrı sənədlər: sürükləmə ipucu + seçim rejimi */
.docs-dnd-hint { font-size: 12px; color: #a39b88; margin: -4px 0 8px; }
@media (hover: none) { .docs-dnd-hint { display: none; } }
.docs-row[draggable="true"] { cursor: grab; }
.docs-select-bar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 10px;
  padding: 10px 12px; border-radius: 11px; background: #e8efe8; border: 1px solid #c5d6c9;
  position: sticky; top: 8px; z-index: 5;
}
.docs-sel-count { font-size: 13px; font-weight: 600; color: #1f3d2a; margin-right: auto; }
.docs-row.is-selectable { justify-content: flex-start; }
.docs-row.is-selectable .docs-row-date { margin-left: auto; }
.docs-check {
  flex: none; width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid #9cbca6; background: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: #fff;
}
.docs-row.is-picked { border-color: #2d5a3d; background: #f1f6f1; }
.docs-row.is-picked .docs-check { background: #2d5a3d; border-color: #2d5a3d; }

/* İş detalı: qrup, ad dəyişmə, ⋯ menyu */
.case-head-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.case-rename { display: inline-flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.case-rename input {
  font-family: 'IBM Plex Serif', Georgia, serif; font-size: 17px; padding: 6px 10px; min-width: 240px;
  border: 1px solid #2d5a3d; border-radius: 9px; background: #fffdf7; color: #26231c;
}
.case-group-edit { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 12.5px; font-weight: 600; color: #6b6455; flex-wrap: wrap; }
.case-group-edit input {
  font: inherit; font-size: 13px; font-weight: 400; padding: 5px 10px; width: 200px;
  border: 1px solid #d3ccbb; border-radius: 8px; background: #fffdf7; color: #26231c;
}
.case-group-edit input:focus { outline: none; border-color: #2d5a3d; box-shadow: 0 0 0 3px rgba(45,90,61,.12); }
.case-menu-wrap { position: relative; display: inline-flex; }
.case-menu-btn { font-size: 18px; line-height: 1; padding: 6px 12px; letter-spacing: 1px; }
.case-menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 170px;
  display: flex; flex-direction: column; padding: 6px; border-radius: 11px;
  background: #fffdf7; border: 1px solid #ddd5c2; box-shadow: 0 12px 30px -12px rgba(38,35,28,.35);
}
.case-menu[hidden] { display: none; }
.case-menu button {
  font: inherit; font-size: 13.5px; text-align: left; padding: 8px 10px; border: 0; border-radius: 7px;
  background: transparent; color: #26231c; cursor: pointer;
}
.case-menu button:hover { background: #f2ede2; }
.case-menu button.is-danger { color: #b3412a; }
.case-menu button.is-danger:hover { background: #f8e7e2; }

/* Boş vəziyyətlər */
.seyf-empty {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  padding: 16px 18px; border-radius: 12px; border: 1px dashed #d8d0bc; background: rgba(255,253,247,.6);
}
.case-grid > .seyf-empty { grid-column: 1 / -1; }
.seyf-empty-title { font-family: 'IBM Plex Serif', Georgia, serif; font-weight: 600; font-size: 15.5px; color: #1f3d2a; }
.seyf-empty-text { font-size: 13.5px; color: #6b6455; line-height: 1.5; max-width: 620px; }
.seyf-empty-acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }

/* Tərəf forması: «Ətraflı» */
.pf-more { border-top: 1px dashed #e0d8c6; padding-top: 10px; }
.pf-more > summary {
  cursor: pointer; font-size: 12.5px; font-weight: 700; color: #2d5a3d; list-style: none;
  display: inline-flex; align-items: center; gap: 6px;
}
.pf-more > summary::-webkit-details-marker { display: none; }
.pf-more > summary::before { content: "▸"; transition: transform .15s ease; }
.pf-more[open] > summary::before { transform: rotate(90deg); }
.pf-more-fields { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }

@media (max-width: 560px) {
  .case-group-edit input { width: 100%; }
  .case-rename input { min-width: 0; width: 100%; }
  .docs-select-bar select { flex: 1 1 100%; }
}
/* Kart adı kəsilməsin: 2 sətrə qədər, qrup nişanı lazım olsa alt sətrə keçir */
.case-folder-top { flex-wrap: wrap; row-gap: 3px; }
.case-folder-top .case-folder-title {
  white-space: normal; overflow: hidden; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere;
}
@media (max-width: 560px) {
  .seyf-head-acts { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); }
}

/* ═══ Müəllif profili — Seyf kartı + Profilim tabı + PIN razılığı ═══
   Ortaq fikir: kart sənəddə çap olunacaq İMZA BLOKUNU göstərir (kağız, serif, imza xətti). */
.prof-select {
  width: 100%; padding: 11px 13px; border: 1px solid #d3ccbb; border-radius: 9px;
  background: #fffdf7; font-family: inherit; font-size: 14.5px; color: #26231c;
}
.prof-select:focus { outline: none; border-color: #2d5a3d; box-shadow: 0 0 0 3px rgba(45,90,61,.14); }
.prof-divider { height: 1px; background: #e4ddcb; margin: 2px 0; }
.prof-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.prof-loc {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; line-height: 1.3;
}
.prof-loc.is-seyf { background: #e8efe8; color: #2d5a3d; border: 1px solid #cbdccb; }
.prof-loc.is-open { background: #f3ecd9; color: #8a5a12; border: 1px solid #e3d3a8; }
.prof-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.prof-form .field.is-wide { grid-column: 1 / -1; }
.prof-form .field input { padding: 10px 12px; font-size: 14px; }
.prof-form .field label { font-size: 13px; }
.seyf-author .prof-form .field input:focus { outline: none; border-color: #2d5a3d; box-shadow: 0 0 0 3px rgba(45,90,61,.14); }
.prof-acts { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.prof-acts .prof-acts-gap { flex: 1 1 auto; }
.btn-link-danger { background: none; border: none; color: #a3341a; font: 600 13px/1.2 inherit; cursor: pointer; padding: 6px 4px; }
.btn-link-danger:hover { text-decoration: underline; }
.prof-note {
  display: flex; gap: 12px; align-items: flex-start; padding: 13px 15px; border-radius: 11px;
  background: #faf7f0; border: 1px solid #e0d8c6; color: #4a4536; font-size: 13.5px; line-height: 1.55;
}
.prof-note > svg { flex: none; margin-top: 2px; color: #2d5a3d; }
.prof-note strong { color: #1f3d2a; }

/* İmza önizləməsi: sənəd vərəqindən kəsik */
.sig-sheet {
  position: relative; background: #fffdf7; border: 1px solid #e0d8c6; border-radius: 4px;
  padding: 18px 20px 16px; box-shadow: 0 1px 0 #efe9da, 0 10px 24px -20px rgba(38,35,28,.55);
  background-image: repeating-linear-gradient(0deg, transparent 0 27px, rgba(45,90,61,.045) 27px 28px);
}

.sig-k { font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #8b8474; margin-bottom: 10px; }
.sig-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; }
.sig-who {
  font-family: 'IBM Plex Serif', Georgia, serif; font-size: 14.5px; line-height: 1.5; color: #26231c;
  min-width: 0; overflow-wrap: anywhere;
}
.sig-who .sig-muted { color: #b0a790; font-style: italic; }
.sig-line { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 120px; }
.sig-line::before { content: ""; width: 100%; border-bottom: 1px solid #8b8474; height: 18px; }
.sig-line span { font-size: 10.5px; color: #a39b88; letter-spacing: .04em; }
.sig-name { font-family: 'IBM Plex Serif', Georgia, serif; font-weight: 600; font-size: 14.5px; color: #1f3d2a; text-align: right; overflow-wrap: anywhere; }
@media (max-width: 560px) {
  .prof-form { grid-template-columns: 1fr; }
  .sig-row { flex-direction: column; align-items: stretch; }
  .sig-line { align-self: flex-end; }
}

/* Seyf kartı */
.seyf-author { display: flex; flex-direction: column; gap: 12px; }
.author-card {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px 18px; align-items: start;
  background: #faf7f0; border: 1px solid #e0d8c6; border-radius: 12px; padding: 14px 16px;
}
.author-card .sig-sheet { grid-column: 1 / 2; }
.author-card-acts { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.author-card-acts .btn { white-space: nowrap; }
.author-card.is-away { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.author-card .prof-form { grid-column: 1 / -1; }
.author-card .prof-acts { grid-column: 1 / -1; }
@media (max-width: 640px) {
  .author-card { grid-template-columns: 1fr; }
  .author-card-acts { flex-direction: row; flex-wrap: wrap; }
}

/* PIN modalında razılıq + alternativ hərəkət */
.pin-optin {
  display: flex; gap: 11px; align-items: flex-start; margin: 2px 0 14px; padding: 12px 14px;
  border: 1px dashed #d3ccbb; border-radius: 11px; background: #fffdf7; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.pin-optin:hover { border-color: #b9cbb9; }
.pin-optin:has(input:checked) { border-style: solid; border-color: #2d5a3d; background: #f1f6f1; }
.pin-optin input { margin-top: 3px; accent-color: #2d5a3d; width: 16px; height: 16px; flex: none; }
.pin-optin-label { display: block; font-size: 14px; font-weight: 600; color: #26231c; line-height: 1.4; }
.pin-optin-hint { display: block; font-size: 12.5px; color: #6b6455; line-height: 1.5; margin-top: 3px; }
/* Alternativ hərəkət olanda: əsas düymə tam enli yuxarıda, ikinci dərəcəlilər altda bir sırada. */
.pin-panel.has-alt { max-width: 440px; }
.pin-panel.has-alt .panel-actions { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; }
.pin-panel.has-alt #pin-submit { grid-column: 1 / -1; order: -1; width: 100%; justify-content: center; }
.pin-panel.has-alt .pin-alt { justify-self: start; }
#prof-body { display: flex; flex-direction: column; gap: 16px; }
.seyf-sec-head.is-author { margin-top: 0; }
.pin-panel .panel-actions .btn-ghost { padding: 10px 16px; font-size: 14px; }
.prof-form .prof-tip { grid-column: 1 / -1; margin-top: -4px; }
.prof-form .field textarea.prof-ta {
  width: 100%; padding: 10px 12px; border: 1px solid #d3ccbb; border-radius: 9px; resize: vertical;
  background: #fffdf7; font-family: inherit; font-size: 14px; line-height: 1.45; color: #26231c; min-height: 64px;
}
.prof-form .field textarea.prof-ta:focus { outline: none; border-color: #2d5a3d; box-shadow: 0 0 0 3px rgba(45,90,61,.14); }

/* Təhlilçi — sənəddəki qanun istinadlarının yoxlanması */
.th-refs { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.th-refs li { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; font-size: 14px; }
.th-ref-status {
  flex: none; min-width: 84px; text-align: center; font-size: 11px; font-weight: 700; letter-spacing: .03em;
  padding: 2px 8px; border-radius: 9px; background: #f3ecd9; color: #8a5a12;
}
.th-ref-status.ok { background: #e8efe8; color: #2d5a3d; }
.th-ref-status.bad { background: #f6e1dc; color: #9b2c1f; }
.th-ref-status.muted { background: #ece8de; color: #6b6455; }
.th-ref-name a { color: inherit; }

/* Təhlilçi — uyğunsuzluq aşkarlanan qanun maddələri */
.th-src-wrap summary { cursor: pointer; font-size: 13px; font-weight: 600; color: #2d5a3d; user-select: none; }
.th-src-wrap[open] summary { margin-bottom: 10px; }
.th-src-list { display: grid; gap: 8px; }
.th-src {
  padding: 12px 14px; background: #faf7f0; border: 1px solid #e6dfce; border-radius: 10px;
  scroll-margin: 80px; transition: box-shadow .3s, border-color .3s;
}
.th-src header { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.th-src h4 { margin: 0 0 4px; font-size: 14px; }
.th-src p { margin: 0 0 6px; font-size: 13px; color: #4a4335; line-height: 1.5; }
.th-src-cited { font-size: 11px; font-weight: 700; color: #2d5a3d; }
.th-src.flash { border-color: #2d5a3d; box-shadow: 0 0 0 3px rgba(45, 90, 61, .18); }
a.th-src-link { text-decoration: underline dotted; text-underline-offset: 3px; cursor: pointer; }

/* ── Araşdırmaçı (ar-*) — peşəkar araşdırma: dosye üslubu ─────────────── */
/* Giriş: persona cümləsinin altında konkret fayda sətri */
.ar-lede { margin: -8px 0 0; font-size: 14.5px; line-height: 1.55; color: #6b6455; max-width: 760px; }
.ar-examples { display: flex; flex-wrap: wrap; gap: 8px; flex: 1; min-width: 0; }
.ar-ex {
  font: inherit; font-size: 13px; color: #4a4335; text-align: left; cursor: pointer;
  background: transparent; border: 1px dashed #cfc6b0; border-radius: 9px; padding: 6px 12px;
  transition: border-color .15s, background .15s, color .15s;
}
.ar-ex::before { content: "“"; color: #2d5a3d; font-family: 'IBM Plex Serif', Georgia, serif; margin-right: 3px; }
.ar-ex:hover { border-style: solid; border-color: #2d5a3d; background: #fffdf7; color: #26231c; }

.ar-recent { display: flex; flex-direction: column; gap: 2px; border-top: 1px dashed #e6dfce; padding-top: 12px; }
.ar-recent-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.ar-recent-clear { font: inherit; font-size: 12px; color: #8b8474; background: none; border: none; cursor: pointer; padding: 2px 4px; }
.ar-recent-clear:hover { color: #b23c1e; }
.ar-recent-item {
  display: flex; align-items: baseline; gap: 10px; width: 100%; text-align: left;
  font: inherit; font-size: 14px; color: #4a4335; background: none; border: none;
  padding: 7px 8px; border-radius: 8px; cursor: pointer;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ar-recent-item span { color: #8b8474; flex: 0 0 auto; }
.ar-recent-item:hover { background: #f3efe4; color: #26231c; }
.ar-botnote { font-size: 13.5px; color: #6b6455; border-top: 1px dashed #e6dfce; padding-top: 12px; }
.ar-bot-link { font-size: 13.5px; padding: 0; }

/* Gedişat: soruşulan sual başlıqda (istifadəçi nəyin işləndiyini görür) */
.ar-asked {
  font-family: 'IBM Plex Serif', Georgia, serif; font-size: 18px; line-height: 1.45; color: #26231c;
  padding-left: 14px; border-left: 3px solid #2d5a3d;
}

/* Nəticə başlığı */
.ar-head { display: flex; flex-direction: column; gap: 6px; }
.ar-eyebrow, .ar-sec-k {
  font-size: 11.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: #8b8474;
}
.ar-question {
  margin: 0; font-family: 'IBM Plex Serif', Georgia, serif; font-weight: 600;
  font-size: clamp(20px, 2.4vw, 27px); line-height: 1.3; color: #26231c; max-width: 900px;
}
.ar-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: #8b8474; }
.ar-meta span + span::before { content: "·"; margin-right: 14px; color: #cfc6b0; }

.ar-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; align-items: start; }
.ar-main {
  min-width: 0; display: flex; flex-direction: column; gap: 12px;
  background: #fffdf7; border: 1px solid #e4ddcb; border-radius: 8px;
  box-shadow: 0 1px 0 #efe7d6, 0 14px 34px -22px rgba(0,0,0,.28);
  padding: 30px 34px;
}
.ar-short {
  background: #eef3ec; border-left: 3px solid #2d5a3d; border-radius: 0 8px 8px 0;
  padding: 14px 18px; margin-bottom: 10px;
}
.ar-short .ar-sec-k { color: #2d5a3d; margin-bottom: 4px; }
.ar-short-top { margin: 6px 0 18px; padding: 18px 22px; border-radius: 0 10px 10px 0; box-shadow: 0 1px 0 #e4ddcb; }
.ar-short p { margin: 0; font-family: 'IBM Plex Serif', Georgia, serif; font-size: 16.5px; line-height: 1.65; color: #26231c; }
.ar-body p { font-family: 'IBM Plex Serif', Georgia, serif; font-size: 15.5px; line-height: 1.8; }

/* Sitat nişanı — mətnin içində kliklənən § düyməsi */
.ar-cite {
  display: inline-flex; align-items: center; gap: 5px; vertical-align: 1px;
  font: 600 12px/1 'IBM Plex Sans', system-ui, sans-serif; color: #2d5a3d;
  background: #e8efe8; border: 1px solid #cbdccb; border-radius: 6px;
  padding: 3px 7px 3px 4px; margin: 0 1px; cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s;
}
.ar-cite-n {
  display: inline-grid; place-items: center; min-width: 16px; height: 16px; border-radius: 4px;
  background: #2d5a3d; color: #faf7f0; font-size: 10.5px; font-variant-numeric: tabular-nums;
}
.ar-cite:hover, .ar-cite.hl { background: #2d5a3d; border-color: #2d5a3d; color: #faf7f0; }
.ar-cite:hover .ar-cite-n, .ar-cite.hl .ar-cite-n { background: #faf7f0; color: #2d5a3d; }

.ar-limits {
  font-size: 13px; line-height: 1.55; color: #6b6455; margin-top: 6px;
  padding: 10px 14px; border: 1px dashed #d8cfb9; border-radius: 8px; background: #faf7f0;
}
.ar-limits b { color: #4a4335; font-weight: 600; }
.ar-follow { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.ar-follow-list { display: flex; flex-direction: column; gap: 6px; }
.ar-follow-q {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; text-align: left;
  font: inherit; font-size: 14px; color: #26231c; cursor: pointer;
  background: #faf7f0; border: 1px solid #e6dfce; border-radius: 9px; padding: 10px 14px;
  transition: border-color .15s, background .15s;
}
.ar-follow-go { color: #2d5a3d; font-weight: 700; transition: transform .15s; }
.ar-follow-q:hover { border-color: #2d5a3d; background: #fff; }
.ar-follow-q:hover .ar-follow-go { transform: translateX(3px); }

/* Mənbə sütunu — yapışqan, öz sürüşməsi ilə */
.ar-side {
  position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow: auto;
  display: flex; flex-direction: column; gap: 10px; padding-right: 2px;
}
.ar-side-head { display: flex; align-items: center; gap: 8px; }
.ar-side-count {
  font-size: 11.5px; font-weight: 700; color: #faf7f0; background: #2d5a3d;
  border-radius: 99px; padding: 1px 8px; font-variant-numeric: tabular-nums;
}
.ar-src-list { display: flex; flex-direction: column; gap: 10px; }
.ar-src {
  background: #fffdf7; border: 1px solid #e4ddcb; border-radius: 8px; padding: 12px 14px;
  display: flex; flex-direction: column; gap: 6px;
  transition: border-color .2s, box-shadow .2s;
}
.ar-src.hl { border-color: #2d5a3d; }
.ar-src.flash { animation: ar-flash 1.4s ease-out; border-color: #2d5a3d; }
@keyframes ar-flash {
  0% { box-shadow: 0 0 0 0 rgba(45,90,61,.45); background: #eef3ec; }
  100% { box-shadow: 0 0 0 10px rgba(45,90,61,0); background: #fffdf7; }
}
.ar-src-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ar-src-n {
  display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 5px;
  background: #2d5a3d; color: #faf7f0; font-size: 11.5px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.ar-src-cite { font-size: 13px; font-weight: 700; color: #26231c; flex: 1; min-width: 0; }
.ar-src-status { font-size: 11px; font-weight: 700; border-radius: 99px; padding: 2px 8px; white-space: nowrap; }
.ar-src-status.ok { background: #e3eee5; color: #2d5a3d; }
.ar-src-status.bad { background: #f6e3dc; color: #a2361b; }
.ar-src-status.warn { background: #f5ecd6; color: #8a5a12; }
.ar-src-title { margin: 0; font-family: 'IBM Plex Serif', Georgia, serif; font-size: 14.5px; font-weight: 600; color: #26231c; line-height: 1.35; }
.ar-src-text { margin: 0; font-size: 13px; line-height: 1.6; color: #4a4335; }
.ar-src-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12.5px; }
.ar-src-meta { margin: 0; font-size: 12px; line-height: 1.5; color: #6b6355; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ar-src-meta i { font-style: normal; color: #b5ad9c; }
.ar-src-meta a { color: inherit; text-decoration: underline; text-decoration-color: #c9c2b0; }
.ar-src-foot a { font-weight: 600; }
.ar-src-copy { font: inherit; font-size: 12px; color: #8b8474; background: none; border: none; cursor: pointer; padding: 2px 0; }
.ar-src-copy:hover { color: #2d5a3d; }

/* Mobil: maddə aşağıdan açılan vərəqdə */
.ar-sheet { position: fixed; inset: 0; z-index: 900; }
.ar-sheet-backdrop { position: absolute; inset: 0; background: rgba(38,35,28,.38); animation: ar-fade .2s ease-out; }
.ar-sheet-panel {
  position: absolute; left: 0; right: 0; bottom: 0; max-height: 78vh; overflow: auto;
  background: #f6f1e7; border-radius: 16px 16px 0 0; padding: 30px 16px 22px;
  box-shadow: 0 -12px 40px -12px rgba(0,0,0,.3); animation: ar-up .25s cubic-bezier(.2,.8,.2,1);
}
.ar-sheet-panel::before {
  content: ""; position: absolute; top: 10px; left: 50%; width: 40px; height: 4px;
  margin-left: -20px; border-radius: 99px; background: #d3ccbb;
}
.ar-sheet-x {
  position: absolute; top: 8px; right: 10px; width: 34px; height: 34px; border-radius: 50%;
  border: none; background: transparent; font-size: 16px; color: #6b6455; cursor: pointer;
}
.ar-sheet-x:hover { background: #ebe4d4; }
body.ar-sheet-open { overflow: hidden; }
@keyframes ar-up { from { transform: translateY(100%); } to { transform: none; } }
@keyframes ar-fade { from { opacity: 0; } to { opacity: 1; } }

@media (max-width: 899px) {
  .ar-grid { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .ar-side { position: static; max-height: none; overflow: visible; }
}
@media (max-width: 639px) {
  .ar-main { padding: 20px 16px; }
  .ar-short p { font-size: 15.5px; }
  .ar-body p { font-size: 15px; }
  .ar-examples { flex-basis: 100%; }
}
.ar-cite-glue { white-space: nowrap; }

/* ── Araşdırmaçı: rejim açarı + maddə üzrə təcrübə ───────────────────── */
.ar-modes {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: stretch; gap: 6px; max-width: 720px;
  background: #e9e2d2; border-radius: 12px; padding: 5px;
}
/* iki seçim EYNİ ölçüdə: 1fr = minmax(auto,1fr) uzun mətnli tabı enlədirdi; button grid-də özü uzanmır → height:100% */
.ar-mode {
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; text-align: left;
  width: 100%; height: 100%; min-height: 60px; box-sizing: border-box;
  font: inherit; background: transparent; border: none; border-radius: 9px; padding: 10px 14px;
  cursor: pointer; color: #6b6455; transition: background .15s, color .15s, box-shadow .15s;
}
.ar-mode b { font-size: 15px; font-weight: 700; color: inherit; }
.ar-mode span { font-size: 12.5px; color: #8b8474; }
.ar-mode:hover { color: #26231c; }
.ar-mode[aria-selected="true"] {
  background: #fffdf7; color: #2d5a3d; box-shadow: 0 1px 0 #e4ddcb, 0 4px 12px -6px rgba(0,0,0,.18);
}
.ar-mode[aria-selected="true"] span { color: #6b6455; }

.ar-pform { display: flex; flex-direction: column; gap: 14px; max-width: 720px; }
.ar-pfields { display: grid; grid-template-columns: minmax(0, 2fr) minmax(140px, 1fr); gap: 14px; max-width: 720px; }
.ar-field { display: flex; flex-direction: column; gap: 6px; }
.ar-field .lbl em { font-style: normal; font-weight: 500; font-size: 12.5px; color: #8b8474; margin-left: 4px; }
.ar-field select, .ar-field input {
  width: 100%; font: inherit; font-size: 15px; color: #26231c;
  padding: 12px 14px; border: 1px solid #d3ccbb; border-radius: 10px; background: #fffdf7;
}
.ar-field select { appearance: none; padding-right: 38px; cursor: pointer;
  background: #fffdf7 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%232d5a3d' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='m1 1.5 5 5 5-5'/%3E%3C/svg%3E") no-repeat right 14px center; }
.ar-field-art input { font-variant-numeric: tabular-nums; font-weight: 600; }
.ar-field select:focus, .ar-field input:focus { outline: none; border-color: #2d5a3d; box-shadow: 0 0 0 3px rgba(45,90,61,.14); }
.ar-pex::before { content: "§"; }
.mq-pill.is-off { opacity: .4; cursor: not-allowed; }
.mq-pill.is-off:hover span { border-color: #d3ccbb; }

/* ── Məhkəmə təcrübəsi paneli (tək sistem: sual + maddə rejimi eyni paneli göstərir) ── */
.ar-sec-sub { font-weight: 500; letter-spacing: 0; text-transform: none; color: #a39b88; margin-left: 6px; }
.ar-practice-wrap { display: flex; flex-direction: column; gap: 10px; margin: 4px 0 22px; }
.ar-prac {
  position: relative; border: 1px solid #e0d8c4; border-radius: 14px; padding: 18px 20px 14px;
  background: radial-gradient(120% 90% at 100% 0%, rgba(45,90,61,.07), transparent 55%), linear-gradient(#fcfaf3, #f8f4ea);
  display: flex; flex-direction: column; gap: 14px; overflow: hidden;
}
.ar-prac::before {
  content: "§"; position: absolute; right: 16px; top: -26px; font-family: 'IBM Plex Serif', Georgia, serif;
  font-size: 128px; line-height: 1; color: rgba(45,90,61,.07); pointer-events: none;
}
.ar-prac.flash { animation: ar-flash 1.4s ease-out; border-color: #2d5a3d; }
.ar-prac-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px 20px; position: relative; }
.ar-prac-ref { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ar-prac-reftxt { font-family: 'IBM Plex Serif', Georgia, serif; font-size: 17px; color: #26231c; }
.ar-prac-k { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #8b8474; }
.ar-prac-hero { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.ar-prac-big {
  font-family: 'IBM Plex Serif', Georgia, serif; font-size: 42px; line-height: 1; font-weight: 600; color: #2d5a3d;
  font-variant-numeric: tabular-nums; letter-spacing: -.01em;
}
.ar-prac-sub { font-size: 13px; color: #6b6455; }
.ar-prac-proc { font-style: normal; color: #8a5a12; font-weight: 600; }
.ar-prac-filters {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; padding: 10px 0;
  border-top: 1px dashed #e0d8c4; border-bottom: 1px dashed #e0d8c4;
}
.ar-pf-group { display: flex; flex-wrap: wrap; gap: 6px; }
.ar-pf {
  font: inherit; font-size: 12.5px; font-weight: 600; color: #4a4335; cursor: pointer;
  background: #fffdf7; border: 1px solid #d3ccbb; border-radius: 99px; padding: 4px 11px 4px 9px;
  display: inline-flex; align-items: center; gap: 6px; transition: background .15s, border-color .15s, color .15s, opacity .15s;
}
.ar-pf i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.ar-pf span { color: #8b8474; font-variant-numeric: tabular-nums; font-weight: 500; }
.ar-pf:hover { border-color: #2d5a3d; }
.ar-pf[aria-pressed="false"] { opacity: .5; }
.ar-pf[aria-pressed="false"] i { background: #c9c2b0 !important; }
.ar-pf-period .ar-pf { padding: 4px 11px; }
.ar-pf-period .ar-pf[aria-pressed="false"] { opacity: 1; }
.ar-pf-period .ar-pf[aria-pressed="true"] { background: #2d5a3d; border-color: #2d5a3d; color: #faf7f0; }
.ar-prac-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 16px 36px; }
.ar-prac-col { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.ar-prac-h {
  margin: 4px 0 0; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #8b8474;
  display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline;
}
.ar-prac-h span { font-weight: 500; letter-spacing: 0; text-transform: none; color: #a39b88; font-size: 12px; }
.ar-prac-empty { margin: 0; font-size: 14px; color: #8b8474; }
/* instansiya zolaqları */
.ar-bars { display: flex; flex-direction: column; gap: 7px; }
.ar-bar-row { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; align-items: center; gap: 10px; font-size: 13px; }
.ar-bar-l { color: #4a4335; }
.ar-bar-t { height: 14px; background: #ece6d8; border-radius: 4px; overflow: hidden; }
.ar-bar-t i {
  display: block; height: 100%; border-radius: 4px; transform-origin: left;
  animation: ar-grow .7s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--i, 0) * 90ms);
}
.ar-bar-v { white-space: nowrap; color: #8b8474; font-variant-numeric: tabular-nums; }
.ar-bar-v b { color: #26231c; }
@keyframes ar-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
/* nəticə payları */
.ar-oc { display: flex; flex-direction: column; gap: 6px; }
.ar-oc-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 10px; font-size: 13px; }
.ar-oc-head b { color: #26231c; font-weight: 600; }
.ar-oc-head span { font-size: 11.5px; color: #8a5a12; }
.ar-dist { display: flex; gap: 2px; height: 14px; border-radius: 4px; overflow: hidden; }
.ar-seg { min-width: 3px; flex-basis: 0; transition: filter .15s; }
.ar-seg:hover { filter: brightness(1.12); }
.ar-legend { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 3px 18px; font-size: 12.5px; color: #4a4335; }
.ar-legend li { display: flex; align-items: center; gap: 6px; min-width: 0; }
.ar-legend li > :nth-child(2) { flex: 1; min-width: 0; }
.ar-legend em { font-style: normal; flex: 1; min-width: 0; }
.ar-legend b { color: #26231c; font-variant-numeric: tabular-nums; min-width: 36px; text-align: right; }
.ar-legend span { color: #a39b88; font-variant-numeric: tabular-nums; min-width: 56px; text-align: right; }
.ar-sw { width: 10px; height: 10px; border-radius: 3px; display: inline-block; flex: 0 0 auto; }
/* illər üzrə sütunlar (SVG) */
.ar-years { width: 100%; height: auto; display: block; }
.ar-years .ar-grid-l line { stroke: #e3dccb; stroke-width: 1; }
.ar-years text { font-family: 'IBM Plex Sans', system-ui, sans-serif; fill: #8b8474; font-size: 11px; }
.ar-years .ar-col-v { fill: #4a4335; font-weight: 600; font-size: 10.5px; }
.ar-years .ar-col rect {
  transform-box: fill-box; transform-origin: bottom;
  animation: ar-rise .6s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--i, 0) * 45ms);
}
@keyframes ar-rise { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.ar-prac-fn { margin: -4px 0 0; font-size: 11.5px; color: #a39b88; }
/* son aktlar */
.ar-acts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.ar-act {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "id date text" "court court court" "tags tags tags";
  gap: 2px 10px; align-items: center; padding: 7px 0; border-top: 1px solid #ebe5d6; font-size: 12.5px;
}
.ar-act-id { grid-area: id; font-weight: 700; color: #26231c; font-variant-numeric: tabular-nums; }
.ar-act-date { grid-area: date; color: #8b8474; font-variant-numeric: tabular-nums; }
.ar-act-court { grid-area: court; color: #4a4335; line-height: 1.35; }
.ar-act-tags { grid-area: tags; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ar-act-inst { font-style: normal; font-size: 11px; font-weight: 700; color: var(--c, #4a4335); padding-left: 12px; position: relative; }
.ar-act-inst::before {
  content: ""; position: absolute; left: 0; top: 50%; width: 7px; height: 7px; border-radius: 50%;
  background: var(--c, #8b8474); transform: translateY(-50%);
}
.ar-act-out { font-weight: 600; color: #26231c; }
.ar-act-text { grid-area: text; justify-self: end; white-space: nowrap; font: inherit; font-size: 12px; font-weight: 600; color: #2d5a3d; background: none; border: none; cursor: pointer; padding: 2px 0; }
.ar-act-text:hover { text-decoration: underline; }
.ar-prac-notes { font-size: 12.5px; line-height: 1.55; color: #6b6455; border-top: 1px dashed #e0d8c4; padding-top: 10px; }
.ar-prac-notes b { color: #4a4335; }
.ar-prac-notes span { color: #a39b88; margin-left: 6px; }
/* mənbə sütununda təcrübə kartı */
.ar-src-prac { background: linear-gradient(#fcfaf3, #f6f1e4); }
.ar-src-prac .ar-src-text b { font-family: 'IBM Plex Serif', Georgia, serif; font-size: 17px; color: #2d5a3d; }
.ar-src-jump { font: inherit; font-size: 12.5px; font-weight: 600; color: #2d5a3d; background: none; border: none; cursor: pointer; padding: 0; }
.ar-src-jump:hover { text-decoration: underline; }
@media (max-width: 900px) {
  .ar-prac { padding: 16px 14px 12px; }
  .ar-prac-grid { grid-template-columns: minmax(0, 1fr); }
  .ar-bar-row { grid-template-columns: 112px minmax(0, 1fr) auto; }
  .ar-prac-big { font-size: 32px; }
  .ar-legend { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) { .ar-bar-t i, .ar-years .ar-col rect { animation: none; } }

/* Məhkəmə nişanı (mətn daşıyır — rəng yalnız köməkçi) */
.ar-court {
  display: inline-block; font-size: 11.5px; font-weight: 700; border-radius: 6px; padding: 2px 8px;
  background: #efebe1; color: #4a4335; white-space: nowrap;
}
.ar-court.ali { background: #2d5a3d; color: #faf7f0; }
.ar-court.apel { background: #e3eee5; color: #2d5a3d; }
.ar-court.aihm { background: #e4e9f1; color: #2b4a7a; }

/* Qərar kartı */
.ar-dec-date { margin-left: auto; font-size: 12px; color: #8b8474; font-variant-numeric: tabular-nums; }
.ar-dec-no { font-size: 12px; color: #8b8474; margin-top: -3px; }
.ar-dec-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ar-outcome { font-size: 11.5px; font-weight: 700; border-radius: 99px; padding: 2px 9px; }
.ar-outcome::before { margin-right: 4px; }
.ar-outcome.pos { background: #e1eee6; color: #1e6a43; }
.ar-outcome.pos::before { content: "✓"; }
.ar-outcome.mix { background: #efebe1; color: #5c5646; }
.ar-outcome.mix::before { content: "◐"; }
.ar-outcome.neg { background: #fbeadb; color: #93501a; }
.ar-outcome.neg::before { content: "✕"; }
.ar-dec-arts { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.ar-art-tag { font-size: 11.5px; font-weight: 600; color: #6b6455; border: 1px solid #e0d9c7; border-radius: 6px; padding: 2px 6px; }
.ar-cite-sm { font-size: 11px; padding: 2px 6px 2px 3px; }
.ar-cite-sm .ar-cite-n { min-width: 14px; height: 14px; font-size: 9.5px; }
/* Qərar sitatı mətndə — qanun sitatından fərqlənsin (qırıq kontur + boz nömrə) */
.ar-cite.is-dec { background: #fffdf7; border-color: #b9ccbd; border-style: dashed; }
.ar-cite.is-dec .ar-cite-n { background: #6b6455; }
.ar-cite.is-dec:hover, .ar-cite.is-dec.hl { background: #4a4335; border-color: #4a4335; border-style: solid; color: #faf7f0; }

/* Mənbə sütunu: qruplar + məhkəmə süzgəci */
#ar-sources { display: flex; flex-direction: column; gap: 10px; }
#ar-sources .ar-side-head:not(:first-child) { margin-top: 10px; }
.ar-cfilter { display: flex; flex-wrap: wrap; gap: 6px; }
.ar-cfilter button {
  font: inherit; font-size: 12.5px; font-weight: 600; color: #4a4335; cursor: pointer;
  background: #fffdf7; border: 1px solid #d3ccbb; border-radius: 99px; padding: 4px 11px;
}
.ar-cfilter button span { color: #8b8474; font-weight: 500; margin-left: 2px; }
.ar-cfilter button:hover { border-color: #2d5a3d; }
.ar-cfilter button[aria-pressed="true"] { background: #2d5a3d; border-color: #2d5a3d; color: #faf7f0; }
.ar-cfilter button[aria-pressed="true"] span { color: #cfe0d2; }

@media (max-width: 639px) {
  .ar-modes { grid-template-columns: 1fr; }
  .ar-pfields { grid-template-columns: 1fr; }
  .ar-mini { display: none; }
  .ar-prac { padding: 14px; }
}

/* Təhlilçi: sənəddə süni intellektə gizli təlimat aşkarlananda xəbərdarlıq */
.th-sec-warn { margin: 0 0 16px; padding: 12px 14px; border-radius: 10px; background: #fbeee9; border: 1px solid #e2b4ab; color: #6e2318; }
.th-sec-warn strong { display: block; margin-bottom: 4px; }
.th-sec-warn p { margin: 0; font-size: 14px; line-height: 1.5; }
.th-sec-warn ul { margin: 8px 0 0; padding-left: 18px; font-size: 13px; }

/* ── Araşdırmaçı: təcrübə panelində əhatə + ölkə müqayisəsi; akt mətni pop-up ───────────── */
.ar-prac-scope { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #4a4335; margin-top: -4px; }
.ar-prac-scope i { font-style: normal; color: #2d5a3d; font-size: 15px; }
.ar-prac-scope b { color: #26231c; font-weight: 600; }
.ar-cmp-wrap { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px 28px; }
.ar-cmp { display: flex; flex-direction: column; gap: 6px; }
.ar-cmp-row { display: grid; grid-template-columns: 200px minmax(0, 1fr); align-items: center; gap: 10px; font-size: 12.5px; }
.ar-cmp-who { color: #6b6455; line-height: 1.3; }
.ar-cmp-who b { display: block; }
.ar-cmp-who b { color: #26231c; font-variant-numeric: tabular-nums; }
.ar-dist.sm { height: 9px; }
.ar-legend-cmp span { min-width: 44px; }
.ar-legend-cmp b::after { content: " /"; color: #c9c2b0; font-weight: 400; }
/* akt pop-up */
.ar-act-panel { max-width: 860px; width: min(92vw, 860px); }
.ar-act-head { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.ar-act-title { margin: 0; font-family: 'IBM Plex Serif', Georgia, serif; font-size: 22px; color: #26231c; }
.ar-act-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ar-act-chips span { font-size: 12px; font-weight: 600; color: #4a4335; background: #efebe1; border-radius: 6px; padding: 3px 9px; }
.ar-act-cites { font-size: 12.5px; color: #6b6455; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.ar-act-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 0; border-top: 1px dashed #e0d8c4; border-bottom: 1px dashed #e0d8c4; margin-bottom: 12px; }
.ar-act-len { margin-left: auto; font-size: 12px; color: #a39b88; font-variant-numeric: tabular-nums; }
.ar-act-text-body { font-family: 'IBM Plex Serif', Georgia, serif; font-size: 15px; line-height: 1.75; color: #26231c; }
.ar-act-text-body p { margin: 0 0 12px; }
.ar-act-text-body mark { background: #e3eee5; color: #1e6a43; padding: 0 2px; border-radius: 3px; }
.ar-act-note { font-size: 12px; color: #a39b88; border-top: 1px dashed #e0d8c4; padding-top: 10px; margin: 8px 0 0; }
.ar-act-loading { display: flex; align-items: center; gap: 10px; color: #6b6455; padding: 20px 0; }
.ar-act-err { color: #a2361b; }
@media (max-width: 900px) { .ar-cmp-row { grid-template-columns: 120px minmax(0, 1fr); } }
@media (min-width: 900px) {
  .ar-act-panel {
    left: 50%; right: auto; bottom: auto; top: 50%; transform: translate(-50%, -50%);
    max-height: 86vh; border-radius: 14px; padding: 28px 32px 24px; animation: ar-fade .2s ease-out;
  }
  .ar-act-panel::before { display: none; }
}

/* ── Seyf: müddət sayğacı (ərizə/vəsatətə baxılma) ── */
.dl-list { display: grid; gap: 8px; }
.dl-card { display: grid; grid-template-columns: 6px 1fr auto; gap: 0 12px; align-items: stretch; background: #faf7f0;
  border: 1px solid #e0d8c6; border-radius: 11px; overflow: hidden; }
.dl-bar { background: var(--dl-c, #9aa39a); }
.dl-main { padding: 10px 12px 10px 0; min-width: 0; }
.dl-title { font-size: 14.5px; font-weight: 600; color: #26231c; overflow-wrap: anywhere; }
.dl-meta { font-size: 13px; color: #6b6455; margin-top: 3px; line-height: 1.5; }
.dl-left { display: inline-block; font-weight: 700; color: var(--dl-c, #6b6455); margin-right: 6px; }
.dl-acts { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: flex-end; padding: 10px 12px 10px 0; }
.dl-date { display: none; gap: 6px; align-items: center; padding: 0 12px 10px 18px; grid-column: 1 / -1; }
.dl-date.is-open { display: flex; }
.dl-date input { font: inherit; font-size: 13px; padding: 4px 8px; border: 1px solid #d6cdb8; border-radius: 7px; }
.dl-card.lv-green { --dl-c: #1e7a4c; }
.dl-card.lv-yellow { --dl-c: #b98a12; }
.dl-card.lv-orange { --dl-c: #d0711c; }
.dl-card.lv-red { --dl-c: #b5502e; background: #fbf1ec; border-color: #ecc9bb; }
.dl-card.lv-done { --dl-c: #9aa39a; opacity: .82; }
.dl-card.lv-done .dl-title { text-decoration: none; color: #4c493f; }
.dl-progress { height: 4px; background: #ece5d6; border-radius: 3px; margin-top: 7px; overflow: hidden; max-width: 360px; }
.dl-progress > i { display: block; height: 100%; background: var(--dl-c, #9aa39a); }
.hdr-act .dl-dot { position: absolute; top: 4px; right: 4px; width: 8px; height: 8px; border-radius: 50%; background: #b5502e; }
.hdr-act .dl-dot.is-warn { background: #d0711c; }
@media (max-width: 560px) {
  .dl-card { grid-template-columns: 5px 1fr; }
  .dl-acts { grid-column: 2; justify-content: flex-start; padding: 0 12px 10px 0; }
}

/* ═══ Seyf bölmələri: İşlər · Sənədlər · Müddətlər ═══ */
.seyf-tabs { display: flex; gap: 4px; border-bottom: 1px solid #e0d8c6; margin: 4px 0 14px; overflow-x: auto; scrollbar-width: none; }
.seyf-tabs::-webkit-scrollbar { display: none; }
.seyf-tab {
  position: relative; display: inline-flex; align-items: center; gap: 7px; padding: 10px 16px 11px;
  background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer;
  font: inherit; font-size: 15px; font-weight: 600; color: #6b6455; white-space: nowrap;
  transition: color .15s, border-color .15s;
}
.seyf-tab:hover { color: #26231c; }
.seyf-tab.is-on { color: #2d5a3d; border-bottom-color: #2d5a3d; }
.seyf-tab:focus-visible { outline: 2px solid #2d5a3d; outline-offset: -2px; border-radius: 6px; }
.stab-n { min-width: 22px; padding: 1px 7px; border-radius: 999px; font-size: 12px; font-weight: 700; text-align: center; background: #ece6d8; color: #6b6455; font-variant-numeric: tabular-nums; }
.stab-n:empty { display: none; }
.seyf-tab.is-on .stab-n { background: #e1ebe2; color: #2d5a3d; }
.stab-dot { width: 8px; height: 8px; border-radius: 50%; background: #b3261e; box-shadow: 0 0 0 2px #fbf8f1; }
.stab-dot.is-warn { background: #d9822b; }
.seyf-pane-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 0 0 12px; }
.seyf-pane-bar.is-end { justify-content: flex-end; }
.seyf-pane-bar .case-groups { margin: 0; flex: 1 1 auto; }
.seyf-pane-bar .seyf-head-acts { margin-left: auto; }
#spane-senedler .seyf-filter-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0 0 12px; }
#spane-senedler .seyf-sel-btn { margin-left: auto; }
#seyf-list-view > .seyf-search { margin-bottom: 14px; }
@media (max-width: 560px) {
  .seyf-tab { flex: 1 1 0; justify-content: center; padding: 9px 2px 10px; gap: 5px; font-size: 13.5px; }
  .stab-n { min-width: 0; padding: 1px 5px; font-size: 11px; }
  #spane-senedler .seyf-sel-btn { margin-left: 0; }
}
.docs-select-bar .docs-sel-delete { margin-left: auto; }
.seyf-arch-note {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin: 10px 0 12px; padding: 10px 14px; border-radius: 10px;
  background: #f3efe4; border: 1px dashed #cfc5ae; color: #5c5547; font-size: 13.5px;
}
#arch-cases-wrap .seyf-sec-head:first-child, #arch-docs-wrap .seyf-sec-head { margin-top: 6px; }
.case-grid.is-archive .case-folder { opacity: .85; }
.docs-list .docs-more { align-self: center; margin: 8px auto 2px; display: block; }
/* İş səhifəsi: ad və nömrə üzərinə basanda redaktə olunur */
.case-detail-title.is-editable, .case-detail-no.is-editable { cursor: pointer; border-radius: 6px; width: fit-content; max-width: 100%; }
.case-detail-title.is-editable:hover, .case-detail-no.is-editable:hover { background: #efe9dc; box-shadow: 0 0 0 4px #efe9dc; }
.case-detail-title.is-editable:hover::after, .case-detail-no.is-editable:not(.is-empty):hover::after { content: " ✎"; font-size: .8em; color: #8a836f; }
.case-detail-title.is-editable:focus-visible, .case-detail-no.is-editable:focus-visible { outline: 2px solid #2d5a3d; outline-offset: 3px; }
.case-detail-no.is-empty { color: #2d5a3d; font-weight: 600; }
#case-no-box { margin-top: 4px; }
/* İş içi bölmələr + yüklənmiş sənədlər */
.case-tabs { margin-top: 14px; }
#cpane-files .seyf-pane-bar { align-items: center; }
.cf-hint { font-size: 13px; color: #6b6455; flex: 1 1 260px; }
.cf-form { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: flex-end; margin: 0 0 14px; padding: 12px 14px;
  background: #faf7f0; border: 1px solid #e0d8c6; border-radius: 12px; }
.cf-field { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: #6b6455; font-weight: 600; }
.cf-field input[type=text], .cf-field input:not([type]), .cf-field input[maxlength] { padding: 8px 10px; border: 1px solid #d3ccbb; border-radius: 9px; background: #fffdf7; font: inherit; font-size: 14px; font-weight: 400; color: #26231c; }
.cf-grow { flex: 1 1 240px; }
.cf-file { flex: 1 1 100%; }
.cf-file input { font-size: 13px; font-weight: 400; }
.cf-acts { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.cf-item { display: flex; flex-direction: column; }
.cf-kind { background: #f1ece0; color: #5c5547; border-color: #ddd4bf; }
.cf-body { margin: -2px 0 6px; padding: 10px 14px 14px; border: 1px solid #e0d8c6; border-top: 0; border-radius: 0 0 12px 12px; background: #fffdf7; }
.cf-body .cf-acts { margin: 0 0 10px; justify-content: flex-start; }
.cf-text { white-space: pre-wrap; font-size: 13.5px; line-height: 1.55; color: #3a362d; max-height: 360px; overflow: auto; }
.field-casefiles .chip.is-match { border-color: #9cb8a2; }
.field-casefiles .chip.is-on { background: #2d5a3d; color: #fff; border-color: #2d5a3d; }
.stab-soon { padding: 1px 7px; border-radius: 999px; font-size: 10.5px; font-weight: 700; letter-spacing: .02em; background: #f3ead2; color: #8a5a10; }
.case-soon { text-align: center; align-items: center; padding: 34px 20px; }
.case-soon-badge { display: inline-block; margin-bottom: 10px; padding: 3px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; background: #f3ead2; color: #8a5a10; }
.case-soon .seyf-empty-text { max-width: 520px; margin: 0 auto; }
@media (max-width: 560px) { .case-tabs .seyf-tab { flex: 0 0 auto; padding: 9px 10px 10px; } .case-tabs { overflow-x: auto; } }

/* İşin ərazisi — sabit siyahıdan seçim (eraziPicker) */
.erazi-pick { position: relative; flex: 1 1 240px; min-width: 0; }
.new-case-form .erazi-pick input { width: 100%; box-sizing: border-box; }
.case-erazi-edit .erazi-pick { flex: 0 1 280px; }
.case-erazi-edit .erazi-pick input { width: 100%; box-sizing: border-box; }
.erazi-list {
  position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: 4px;
  list-style: none; max-height: 260px; overflow-y: auto; background: #fffdf7; border: 1px solid #d3ccbb;
  border-radius: 9px; box-shadow: 0 10px 24px -14px rgba(38,35,28,.45); font-size: 13.5px; font-weight: 400;
}
.erazi-list li { padding: 7px 10px; border-radius: 6px; cursor: pointer; color: #26231c; }
.erazi-list li.is-active, .erazi-list li:hover { background: #e7efe6; color: #1f4a30; }
.erazi-list li.erazi-empty { cursor: default; color: #8a826f; background: none; }

/* Seyf tərəfi — «Müvəkkilim» işarəsi */
.party-form-fields label.pf-client { display: flex; flex-direction: row; align-items: flex-start; gap: 9px; grid-column: 1 / -1;
  background: #eef4ee; border: 1px solid #cfdccf; border-radius: 9px; padding: 9px 11px; cursor: pointer; }
.party-form-fields label.pf-client input { width: auto; margin: 3px 0 0; flex: 0 0 auto; }
.party-form-fields label.pf-client span { font-weight: 600; color: #1f4a30; }
.party-form-fields label.pf-client small { display: block; font-weight: 400; color: #5d6a5f; margin-top: 2px; }
.party-client { margin-left: 8px; background: #2d5a3d; color: #fff; border-radius: 999px; padding: 2px 8px; letter-spacing: .04em; }

/* ── Mobil istifadə rahatlığı (2026-10-29, 390px iPhone auditi) ──────────────
   Başlıq+nav əvvəl ekranın ~43%-ni tuturdu (admin düymələri 2 sıra + nav 2 sıra);
   iOS <16px sahələrdə fokusda səhifəni zoom edirdi; bəzi tab/düymələr sıxılıb kəsilirdi. */
@media (max-width: 639px) {
  /* Başlıq düymələri BİR sırada (2/3 düymə bərabər; tək Seyf yarım endə qalır) */
  .hdr-actions { flex-wrap: nowrap; }
  .hdr-act { flex: 1 1 0; max-width: calc(50% - 3px); padding: 6px 4px; min-height: 42px; }

  /* Nav: tək sıra, üfüqi sürüşür (sağ kənarda solğunlaşma — davamı olduğu görünsün) */
  .service-bar { padding: 6px 0; }
  .nav-inner {
    flex-wrap: nowrap; justify-content: flex-start; gap: 4px;
    overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent);
            mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent);
  }
  .nav-inner::-webkit-scrollbar { display: none; }
  .service-bar .service-link { flex: 0 0 auto; padding: 9px 12px; }
  .nav-inner .service-link:last-child { margin-right: 24px; }

  /* iOS fokus zoom-u: bütün mətn sahələri ≥16px (id/sinif üslubları 13–15px qoyurdu) */
  input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not(.code-input),
  textarea, select { font-size: 16px !important; }

  /* Hesab tənzimləmələri tabları: «İki mərhələli doğrulama» 3 sətrə qırılırdı → tək sıra, sürüşən */
  .acct-tabs { overflow-x: auto; scrollbar-width: none; flex-shrink: 0; }
  .acct-tabs::-webkit-scrollbar { display: none; }
  .acct-tab { flex: 0 0 auto; white-space: nowrap; padding: 10px 12px; }

  /* Kataloq/Qraf keçidi — barmaq hədəfi */
  .pv-btn { min-height: 36px; }

  /* Footer-in son sətri üzən Soraqçı düyməsinin altında qalmasın */
  .foot-bar { padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)); }
}
@media (max-width: 560px) {
  /* Seyf tabları 2px daşırdı → «Arxiv» kəsilirdi */
  .seyf-tabs { gap: 0; }
  /* Seyf başlıq düymələri (Müəllif · Kilidlə · Tənzimləmələr): 3 sütunda «Seyf tənzimləmələri» 2 sətrə
     qırılırdı → 2 sütun, sonuncu tam en */
  .docs-page-head .seyf-lock { grid-template-columns: 1fr 1fr; }
  .docs-page-head .seyf-lock > :last-child { grid-column: 1 / -1; }
  .docs-page-head .seyf-head-btn { white-space: nowrap; min-height: 40px; }
}

/* Mikrofon yazısı: dar ekranda bərabər düyməyə «Dayandır ·» sığmır — yalnız vaxt göstərilir */
@media (max-width: 639px) {
  .ig-btn.is-rec .ig-rec-word { display: none; }
}

/* ── Fakt qutusunun içində nümunə çipləri (createFactBox `suggestions`; hazırda Araşdırmaçı) ──
   Çərçivə textarea + çip zolağını birlikdə əhatə edir; çiplər yalnız qutu boş olanda görünür. */
.fb-field {
  border: 1px solid #d3ccbb; border-radius: 10px; background: #fffdf7;
  transition: border-color .15s, box-shadow .15s;
}
.fb-field:focus-within { border-color: #2d5a3d; box-shadow: 0 0 0 3px rgba(45,90,61,.14); }
.fb-field .fb-input {
  border: 0; border-radius: 10px; background: transparent; min-height: 96px; outline: none; box-shadow: none;
}
.fb-sugg { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 0 12px 12px; }
.fb-sugg[hidden] { display: none; }
.fb-sugg-k { font-size: 12.5px; color: #8a836f; margin-right: 2px; }
.fb-sugg-chip {
  font: inherit; font-size: 13px; color: #4a4335; cursor: pointer; text-align: left;
  background: #f5efe2; border: 1px solid #e6dcc4; border-radius: 999px; padding: 5px 12px; line-height: 1.35;
  transition: border-color .15s, background .15s, color .15s;
}
.fb-sugg-chip:hover { border-color: #2d5a3d; color: #26231c; background: #faf7f0; }
.fb-sugg-chip:focus-visible { outline: 2px solid #2d5a3d; outline-offset: 1px; }
@media (max-width: 639px) {
  /* Mobil: çiplər tək sıra, üfüqi sürüşür (qutu hündürləşmir) */
  .fb-sugg { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 10px; }
  .fb-sugg::-webkit-scrollbar { display: none; }
  .fb-sugg-chip { flex: 0 0 auto; white-space: nowrap; min-height: 34px; }
}
/* Araşdırmaçı: «Ətraflı» bölməsi parametrlərin ilk elementidir → .mq-params-in öz xətti ilə ikiqat xətt olmasın */
.ar-params > .ar-adv:first-child { border-top: 0; padding-top: 0; }

/* ── «+ Yeni …» — nəticə başlığında yeni işə keçid (5 xidmət) ── */
.btn-new { background: #fffdf7; border: 1px solid #2d5a3d; color: #2d5a3d; font-weight: 600; }
.btn-new:hover { background: #e8efe8; color: #234a31; }
.btn-new > span[aria-hidden] { font-size: 1.15em; line-height: 1; }
/* Əməliyyat düyməli bildiriş («Əvvəlki nəticəyə qayıt») — toast-host pointer-events:none olduğundan aktivləşdirilir */
.toast-action { pointer-events: auto; }
.toast-btn {
  font: inherit; font-size: 13.5px; font-weight: 600; color: #234a31; cursor: pointer;
  background: transparent; border: 1px solid #a9c6b3; border-radius: 8px; padding: 6px 10px; margin-left: 4px;
  white-space: nowrap;
}
.toast-btn:hover { background: #fffdf7; border-color: #2d5a3d; }
@media (max-width: 639px) {
  /* Mobil: «+ Yeni» nəticə düymələrinin üstündə tam en (ilk görünən hərəkət) */
  .result-bar .actions .btn-new, .cr-actions .btn-new { flex-basis: 100%; }
  .toast-action { flex-wrap: wrap; }
}

/* ── Yapışqan nəticə zolağı (initStickyBars) — nəticənin düymə sırası ekrandan çıxanda ──
   z-index: Soraqçı (55) və modallardan (60) aşağı; Araşdırmaçı alt vərəqi (900) üstündədir. */
.res-sticky {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  background: rgba(250,247,240,.97); border-bottom: 1px solid #e2d8c2;
  box-shadow: 0 8px 22px -14px rgba(30,26,18,.45);
  transform: translateY(-100%); transition: transform .18s ease;
  padding-top: env(safe-area-inset-top, 0px);
}
.res-sticky.is-on { transform: none; }
.res-sticky[hidden] { display: none; }
.res-sticky-in {
  max-width: 1200px; margin: 0 auto; padding: 7px 28px;
  display: flex; align-items: center; gap: 14px;
}
.res-sticky-title {
  flex: 1 1 auto; min-width: 0; font-size: 14px; font-weight: 600; color: #2d5a3d;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.res-sticky-acts { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.res-sticky-btn { min-height: 34px; padding: 5px 11px; }
.res-sticky-btn .rs-ico { margin-right: 5px; }
@media (prefers-reduced-motion: reduce) { .res-sticky { transition: none; } }
@media (max-width: 639px) {
  /* Mobil: ad qısa, düymələr ikon (ad title/aria-da); «+ Yeni» mətnli qalır */
  .res-sticky-in { padding: 6px 12px; gap: 8px; }
  .res-sticky-title { font-size: 13px; }
  .res-sticky-acts { gap: 4px; }
  .res-sticky-btn { min-width: 40px; min-height: 40px; padding: 4px 9px; justify-content: center; }
  .res-sticky-btn:not(.is-new):not(.is-short) .rs-lbl { display: none; }
  .res-sticky-btn:not(.is-new) .rs-ico { margin-right: 0; }
  .res-sticky-btn.is-short .rs-ico { display: none; }
  .res-sticky-btn.is-short .rs-lbl { font-size: 12.5px; }
  .res-sticky-btn.is-new .rs-lbl { display: none; }
  .res-sticky-btn.is-new::after { content: "Yeni"; font-size: 13px; }
  .res-sticky-btn.is-new .rs-ico { margin-right: 4px; }
}

/* Bildirişlər */
.notif-list{display:grid;gap:10px;max-height:60vh;overflow-y:auto;padding:2px}
.notif-item{border:1px solid #e3ddcf;border-radius:10px;padding:12px;background:#fff}
.notif-item.unread{border-left:4px solid #1e7a4c}
.notif-meta{font-size:12px;color:#6c6658;margin-bottom:4px}
.notif-title{font-weight:600;margin-bottom:4px;overflow-wrap:anywhere}
.notif-body{white-space:pre-wrap;overflow-wrap:anywhere;font-size:14px}
.notif-acts{display:flex;gap:12px;margin-top:8px;font-size:13px}
.notif-pref{display:flex;align-items:center;gap:8px;margin-top:10px}
