/* «دستیار ناظر» · v7.8 — look of the search page.
   Owner's palette: paper F1FAEE · mist A8DADC · steel 457B9D · navy 1D3557 · red E63946.
   Rule: the page is mostly paper and white; navy carries text, buttons and the footer; steel and mist are for
   lines and quiet fills; red is a touch (the full stop of the headline, the result number, the active filter), never a surface.
   Type: Vazirmatn, Regular and Bold only (the Black files are not shipped, so heavier weights are mapped to Bold). */
@font-face{font-family:"Vazirmatn";font-weight:800 900;font-display:swap;src:local("Vazirmatn Bold"),url(/static/fonts/Vazirmatn-Bold.woff2) format("woff2")}
:root{
  --paper:#F1FAEE;--paper-2:#E7F3E9;--mist:#A8DADC;--mist-soft:#D6EEEC;--steel:#457B9D;--steel-ink:#35627E;--navy:#1D3557;--red:#E63946;
  --ink:#1D3557;--ink-soft:#3C5A78;--line:rgba(29,53,87,.14);--radius:16px;--shadow:none;
  --font:"Vazirmatn","Noto Sans Arabic UI","Segoe UI",Tahoma,system-ui,sans-serif;
  --text:#1D3557;--muted:#3C5A78;--bg:#F1FAEE;--surface:#fff;--gold:#E63946;
  font-family:var(--font);color:var(--ink);background:var(--paper);
}
html{scroll-behavior:smooth}
body{font-family:var(--font);background:var(--paper)!important;color:var(--ink);line-height:1.9}
button,input,select,textarea{font-family:inherit}
h1,h2,h3,h4{font-weight:700;color:var(--navy)}
:focus-visible{outline:3px solid var(--steel)!important;outline-offset:3px}

/* ---------- customers see the clean page: no library drawer, no upload panel ---------- */
body.customer .sidebar,body.customer .side-scrim,body.customer .menu-toggle{display:none!important}
body.customer .app-shell{display:block}

/* ---------- header ---------- */
.topbar{height:68px;padding:0 max(16px,calc((100% - 1080px)/2));background:rgba(241,250,238,.94);border-bottom:1px solid var(--line);backdrop-filter:blur(10px)}
.top-brand{display:flex;align-items:center;gap:10px;text-decoration:none;color:var(--navy)}
.top-brand img{border-radius:10px;display:block}
.top-brand strong{font-size:1.08rem;font-weight:700}
.top-actions{display:flex;align-items:center;gap:8px}
.top-chip{border:1.5px solid var(--navy);background:transparent;color:var(--navy);border-radius:999px;padding:6px 16px;font-size:.88rem;font-weight:700}
.top-chip:hover{background:var(--navy);color:var(--paper)}
.top-icon{display:grid;place-items:center;width:40px;height:40px;border-radius:50%;border:1.5px solid var(--mist);color:var(--steel);transition:background .15s,color .15s}
.top-icon:hover{background:var(--mist);color:var(--navy)}
.top-icon svg{width:20px;height:20px}

/* ---------- content column ---------- */
.content{max-width:1080px;width:100%;margin-inline:auto;padding:26px 16px 40px;gap:22px}
.section-kicker,.eyebrow,.panel-kicker{display:none}
.hero-card,.search-panel,.suggestions-panel,.results-area,.library-section{background:transparent;border:0;box-shadow:none;border-radius:0;padding:0}
.hero-card:before{display:none}

/* hero: headline, a plain sentence, then the search itself */
.hero-card{display:block}
.hero-copy h1{font-size:clamp(1.65rem,5.4vw,2.6rem);line-height:1.55;font-weight:700;color:var(--navy);max-width:20em}
.period{color:var(--red)}
.hero-copy p{font-size:1rem;color:var(--ink-soft);line-height:2;max-width:38em;margin:10px 0 0}
.hero-actions{display:none}

/* three figures as a ruled strip, like a title block on a drawing */
.hero-metrics{display:grid;grid-template-columns:repeat(3,1fr);gap:0;margin-top:22px;border-top:1.5px solid var(--navy);border-bottom:1px solid var(--line)}
.metric-card{background:transparent;border:0;border-radius:0;padding:14px 4px 12px;position:relative}
.metric-card+.metric-card{border-inline-start:1px solid var(--line);padding-inline-start:16px}
.metric-card:after{display:none}
.metric-card span{color:var(--steel-ink);font-size:.86rem;font-weight:400}
.metric-card strong{font-size:clamp(1.4rem,4.6vw,2.1rem);font-weight:700;color:var(--navy);margin-top:2px;font-variant-numeric:tabular-nums;line-height:1.3}
.metric-card small{color:var(--ink-soft);font-size:.76rem;line-height:1.7;margin-top:2px}

/* ---------- search ---------- */
.search-panel{margin-top:2px}
.panel-head h2{font-size:1.15rem;margin:0}
.panel-head{margin-bottom:12px}
.inline-tools label{color:var(--ink-soft);font-size:.86rem}
select{background:#fff;border:1.5px solid var(--mist);border-radius:12px;color:var(--navy);min-height:44px;padding:0 12px}
.search-line{gap:10px}
.search-field{background:#fff;border:1.5px solid var(--mist);border-radius:16px;box-shadow:none;transition:border-color .15s,box-shadow .15s}
.search-field:focus-within{border-color:var(--steel);box-shadow:0 0 0 4px rgba(69,123,157,.18)}
.search-field input{color:var(--navy);font-size:16px!important}
.search-field svg{color:var(--steel)}
.search-field input::placeholder{color:#7f97ab}
.button{border-radius:14px;font-weight:700}
.button-primary,.search-button{background:var(--navy);color:var(--paper);border:0;box-shadow:none}
.button-primary:hover,.search-button:hover{background:#142843}
.button-outline{background:transparent;color:var(--navy);border:1.5px solid var(--line)}
.button-outline:hover{background:var(--mist-soft)}
.search-modes label span{border-radius:999px}
.search-modes input:checked+span{background:var(--navy);color:var(--paper);border-color:var(--navy)}
.search-hint{color:var(--ink-soft)}

/* ---------- results ---------- */
.results-heading h2{font-size:1.3rem}
.results-heading p{color:var(--ink-soft)}
.summary-bar{background:var(--mist-soft);border:0;color:var(--navy);border-radius:12px}
.facet-bar{background:transparent;border:0;padding:0}
.facet-chip{background:#fff;border:1.5px solid var(--mist);color:var(--navy);font-weight:700;border-radius:999px}
.facet-chip:hover{background:var(--mist-soft)}
.source-disclaimer{color:var(--ink-soft);font-size:.86rem}
.result-card{background:#fff;border:1px solid var(--line);border-radius:var(--radius);box-shadow:none;padding:16px}
.book-tag{background:var(--mist-soft);border:0;color:var(--navy);font-weight:700}
.meta-tag{background:transparent;border:1px solid var(--line);color:var(--ink-soft)}
.result-index{display:inline-flex;align-items:center;gap:6px;color:var(--steel-ink);font-weight:400;font-size:.82rem}
.result-index:before{content:"";width:7px;height:7px;border-radius:50%;background:var(--red)}
.card-action{background:var(--navy);color:var(--paper);border-radius:12px;font-weight:700}
.card-action.secondary{background:transparent;color:var(--navy);border:1.5px solid var(--line)}
.card-action.secondary:hover{background:var(--mist-soft)}
.page-hit{border:1px solid var(--line);background:var(--mist-soft);border-radius:12px}
.page-hit img{background:var(--mist-soft)}
.pagination button{background:#fff;border:1.5px solid var(--mist);color:var(--navy);border-radius:12px}
.pagination span{color:var(--ink-soft)}
.empty-state{background:#fff;border:1px dashed var(--mist);border-radius:var(--radius)}
.empty-icon{background:var(--mist-soft);color:var(--navy)}
.empty-state h3{color:var(--navy)}

/* ---------- suggestions & library ---------- */
.suggestions-panel h2,.library-section h2{font-size:1.15rem;margin:0}
.panel-sub{color:var(--ink-soft);font-size:.9rem}
.suggestion-card,.library-card{background:#fff;border:1px solid var(--line);border-radius:var(--radius);box-shadow:none}
.suggestion-card:hover,.library-card:hover{border-color:var(--steel)}
.suggestion-title,.library-title{color:var(--navy);font-weight:700}
.meta-pill{background:var(--mist-soft);color:var(--navy);border:0}
.meta-pill.gold{background:transparent;border:1px solid var(--red);color:var(--red)}
.library-icon{background:var(--mist-soft);color:var(--navy)}
.suggestion-hint,.library-meta{color:var(--ink-soft)}
.inline-empty{color:var(--ink-soft)}

/* ---------- footer ---------- */
.footer{background:var(--navy);color:var(--paper);border:0;border-radius:20px;box-shadow:none;padding:22px 22px 18px}
.footer span:first-child,.footer strong{color:#fff}
.footer span{color:#c7dfe0}
.footer a{color:var(--mist);border-color:rgba(168,218,220,.4);background:transparent}
.footer a:hover{background:var(--mist);color:var(--navy)}
.footer-disclaimer{color:#b9d3d6}

/* ---------- dialogs, toast, notices ---------- */
.toast{background:var(--navy)}
.page-preview-dialog,.reference-photo-dialog{border:0}
.page-preview-top h2{color:var(--navy)}
.offline-notice{background:var(--mist-soft);border:0;color:var(--navy);border-radius:12px}

@media (max-width:640px){
  .topbar{height:62px}
  .top-brand strong{font-size:1rem}
  .top-chip{padding:5px 12px;font-size:.8rem}
  .top-icon{width:36px;height:36px}
  .hero-metrics .metric-card small{display:none}
  .metric-card+.metric-card{padding-inline-start:10px}
}

/* ---------- overrides of older rules that are more specific ---------- */
body .suggestion-button,body .button-primary,body .search-button{background:var(--navy)!important;color:var(--paper)!important;box-shadow:none!important;font-weight:700}
body .suggestion-button:hover,body .button-primary:hover,body .search-button:hover{background:#142843!important}
body .footer-v7{background:var(--navy);border:0;box-shadow:none;border-radius:20px;color:var(--paper)}
body .footer-v7 strong,body .footer-v7 .footer-brand strong{color:#fff;font-weight:700}
body .footer-v7 span{color:#c7dfe0}
body .footer-brand{border-right:0;border-inline-start:3px solid var(--red);padding-right:0;padding-inline-start:12px}
body .footer-links a{background:transparent;color:var(--paper);border:1.5px solid rgba(168,218,220,.55);font-weight:700}
body .footer-links a:hover,body .footer-links a:focus-visible{background:var(--mist);color:var(--navy);box-shadow:none;transform:none}
body .footer-links a b{font-weight:700}
body .footer-disclaimer{grid-column:1/-1;color:#c7dfe0;border-top:1px solid rgba(168,218,220,.25);padding-top:14px;margin:0;font-size:.82rem}
body .page-chip,body .meta-tag{font-weight:400}
