:root {
  --green: #0b6b46;
  --green-dark: #084f34;
  --green-soft: #e8f2ec;
  --sand: #f7f5f0;
  --ink: #17211c;
  --muted: #5f6d65;
  --line: #e4dfd4;
  --white: #ffffff;
  --warn-bg: #fdf4e3;
  --warn-line: #ecd9ad;
  --radius: 16px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--sand);
  color: var(--ink);
  font-family: "IBM Plex Sans Arabic", "Segoe UI", "Noto Naskh Arabic", "Geeza Pro", "Dubai", Tahoma, system-ui, sans-serif;
  -webkit-text-size-adjust: 100%;
}

body { padding-bottom: 40px; }

/* header */
.top {
  background: var(--green);
  color: #fff;
  padding: calc(14px + env(safe-area-inset-top)) 0 0;
  position: sticky;
  top: 0;
  z-index: 20;
  box-shadow: 0 2px 12px rgba(9, 60, 40, .18);
}
.top-inner { padding: 0 18px 12px; }
.brand { display: flex; align-items: center; gap: 12px; }
.logo {
  width: 42px; height: 42px; border-radius: 12px;
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .28);
  display: grid; place-items: center;
  font-size: 22px; font-weight: 700;
}
.brand h1 { margin: 0; font-size: 20px; letter-spacing: 0; }
.brand p { margin: 2px 0 0; font-size: 12.5px; opacity: .82; }

.tabs { display: flex; gap: 6px; padding: 0 12px 10px; }
.tab {
  flex: 1;
  appearance: none;
  border: 1px solid rgba(255, 255, 255, .25);
  background: rgba(255, 255, 255, .08);
  color: #eaf3ee;
  font: inherit;
  font-size: 14.5px;
  padding: 10px 8px;
  border-radius: 11px;
  cursor: pointer;
}
.tab.is-on { background: #fff; color: var(--green-dark); border-color: #fff; font-weight: 700; }

/* layout */
.view { max-width: 760px; margin: 0 auto; padding: 16px 14px 8px; }
.lead { margin: 4px 4px 14px; color: var(--muted); font-size: 14px; line-height: 1.8; }

.grid { display: grid; grid-template-columns: 1fr; gap: 12px; }

.card {
  position: relative;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.card-hit {
  display: block;
  width: 100%;
  text-align: right;
  background: none;
  border: 0;
  padding: 15px 16px 13px;
  font: inherit;
  color: inherit;
  cursor: pointer;
}
.card-hit:active { background: #fbfaf6; }
.fav {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  color: #9aa79f;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}
.fav.on { color: #c8892a; border-color: #ecd9ad; background: #fdf6e8; }

.search { position: relative; margin: 2px 2px 10px; }
.search input {
  width: 100%;
  font: inherit;
  font-size: 15px;
  padding: 12px 14px;
  padding-inline-end: 42px;
  border: 1px solid #d9d3c6;
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
}
.search input:focus { outline: 2px solid rgba(11, 107, 70, .25); border-color: var(--green); }
.qclear {
  position: absolute;
  inset-inline-end: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 0;
  background: #eee9de;
  color: #5f6d65;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}
.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 10px;
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
.chip-btn {
  flex: 0 0 auto;
  font: inherit;
  font-size: 13px;
  padding: 8px 13px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: #3c4a43;
  cursor: pointer;
  white-space: nowrap;
}
.chip-btn.on { background: var(--green); border-color: var(--green); color: #fff; font-weight: 600; }
.count { margin: 0 4px 10px; color: var(--muted); font-size: 12.5px; }
.empty { margin: 20px 6px; color: var(--muted); font-size: 14px; line-height: 1.9; text-align: center; }
.empty.big { padding: 40px 20px; background: #fff; border: 1px dashed var(--line); border-radius: var(--radius); }
.sect { font-size: 15px; color: var(--green-dark); margin: 22px 4px 10px; }
.pending { display: grid; gap: 8px; margin-bottom: 8px; }
.pitem {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 13px;
  font-size: 13.5px;
}
.pitem .pnote { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; }
.pitem a { color: var(--green); font-size: 12.5px; text-decoration: none; white-space: nowrap; }
.chip {
  display: inline-block;
  background: var(--green-soft);
  color: var(--green-dark);
  font-size: 11.5px;
  padding: 3px 9px;
  border-radius: 999px;
  margin-bottom: 8px;
}
.card-title { display: block; font-size: 17px; font-weight: 700; line-height: 1.5; }
.card-blurb { display: block; margin-top: 5px; color: var(--muted); font-size: 13.5px; line-height: 1.75; }
.card-go { display: block; margin-top: 9px; color: var(--green); font-size: 13px; font-weight: 600; }

/* form */
.crumb {
  display: flex; align-items: center; gap: 10px;
  margin: 2px 2px 12px; font-size: 14px; color: var(--muted);
}
.crumb span { font-weight: 700; color: var(--ink); font-size: 15.5px; }
.back {
  appearance: none; border: 1px solid var(--line); background: #fff;
  color: var(--ink); font: inherit; font-size: 13px;
  padding: 7px 12px; border-radius: 10px; cursor: pointer;
}

.group {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px 14px 6px; margin-bottom: 12px;
}
.group h2 { margin: 0 0 10px; font-size: 15px; color: var(--green-dark); }
.fields { display: grid; grid-template-columns: 1fr; gap: 12px; }

.field { display: block; }
.lab { display: block; font-size: 13.5px; margin-bottom: 6px; color: #2c3a33; }
.req { color: #b3261e; }
.field input, .field textarea {
  width: 100%;
  font: inherit;
  font-size: 15px;
  padding: 11px 12px;
  border: 1px solid #d9d3c6;
  border-radius: 11px;
  background: #fdfcf9;
  color: var(--ink);
}
.field input:focus, .field textarea:focus {
  outline: 2px solid rgba(11, 107, 70, .25);
  border-color: var(--green);
  background: #fff;
}
.field textarea { resize: vertical; line-height: 1.7; }

.actions { display: flex; gap: 10px; margin: 4px 0 18px; flex-wrap: wrap; }
.btn {
  appearance: none;
  font: inherit;
  font-size: 15px;
  padding: 13px 18px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  flex: 1 1 auto;
  min-width: 120px;
}
.btn.primary { background: var(--green); border-color: var(--green); color: #fff; font-weight: 700; }
.btn.primary:disabled { opacity: .7; }
.btn.ghost { background: transparent; color: var(--muted); }

.note-box {
  background: var(--green-soft);
  border: 1px solid #cfe3d7;
  color: #24513c;
  font-size: 13.5px;
  line-height: 1.8;
  padding: 11px 13px;
  border-radius: 12px;
  margin: 0 2px 12px;
}
.note-box.warn { background: var(--warn-bg); border-color: var(--warn-line); color: #6b4d14; }

/* paper */
.paper-wrap { padding: 2px 0 104px; }
.mini {
  margin-inline-start: auto;
  appearance: none; border: 1px solid var(--line); background: #fff;
  color: var(--green-dark); font: inherit; font-size: 12.5px;
  padding: 6px 11px; border-radius: 9px; cursor: pointer;
}
.sheet {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 22px 20px 26px;
  font-size: 15px;
  line-height: 2;
  color: #10160f;
}
.sheet-top {
  display: flex; justify-content: space-between;
  font-size: 13px; color: #3c4a43;
  border-bottom: 1px solid #ece7dc;
  padding-bottom: 10px; margin-bottom: 16px;
}
.sheet-to { margin-bottom: 12px; line-height: 1.9; }
.sheet-subject {
  background: #f6f4ee;
  border-right: 3px solid var(--green);
  padding: 8px 12px;
  border-radius: 6px;
  margin-bottom: 16px;
  font-size: 15px;
}
.sheet-greet { margin: 0 0 10px; }
.sheet-body p { margin: 0 0 12px; text-align: justify; }
.sheet-close { margin: 16px 0 22px; }
.sheet-sign { font-size: 14px; line-height: 2.1; border-top: 1px dashed #ded8cb; padding-top: 12px; }
.sheet-sign .sign-line { margin-top: 14px; color: #3c4a43; }
.soft { color: #6d7a72; }

.sticky-actions {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  margin: 0;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background: var(--sand);
  border-top: 1px solid var(--line);
  z-index: 15;
  max-width: 760px;
  margin-inline: auto;
  display: flex;
  gap: 10px;
}
.sticky-actions .btn { min-width: 0; }

/* guide detail */
.gdetail { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 16px 20px; }
.gtitle { margin: 0 0 8px; font-size: 20px; line-height: 1.5; }
.gsum { color: #3c4a43; font-size: 14.5px; line-height: 1.9; margin: 0 0 16px; }
.gdetail h3 { font-size: 15px; color: var(--green-dark); margin: 18px 0 8px; }
.facts { display: grid; gap: 8px; }
.fact { display: flex; gap: 10px; background: #f9f8f4; border: 1px solid #eee9de; border-radius: 10px; padding: 9px 12px; font-size: 13.5px; }
.fk { color: var(--muted); min-width: 92px; flex: 0 0 auto; }
.fv { color: var(--ink); line-height: 1.7; }
.list, .steps { margin: 0; padding-inline-start: 20px; font-size: 14.5px; line-height: 1.95; color: #26332c; }
.list li, .steps li { margin-bottom: 5px; }
.src { margin-top: 20px; border-top: 1px solid var(--line); padding-top: 12px; font-size: 13px; line-height: 1.8; }
.src a { color: var(--green); word-break: break-all; }

/* footer */
.foot { max-width: 760px; margin: 0 auto; padding: 14px 18px 0; color: #7b877f; font-size: 12px; line-height: 1.8; }
.foot p { margin: 0; }

@media (min-width: 620px) {
  .grid { grid-template-columns: 1fr 1fr; }
  .fields { grid-template-columns: 1fr 1fr; }
  .field.full { grid-column: 1 / -1; }
  .sheet { padding: 40px 44px 44px; }
}

/* print: only the sheet */
@media print {
  @page { size: A4; margin: 16mm 15mm; }
  html, body { background: #fff !important; padding: 0; }
  .paper-wrap { padding-bottom: 0 !important; }
  .sticky-actions { display: none !important; position: static !important; }
  .top, .foot, .crumb, .actions, .sticky-actions, .note-box, .paper-wrap > .note-box { display: none !important; }
  .view { padding: 0; max-width: none; }
  .paper-wrap { padding: 0; }
  .sheet {
    border: 0; border-radius: 0; padding: 0;
    font-size: 13.5pt; line-height: 2; color: #000;
    box-shadow: none;
  }
  .sheet-subject { background: #f2f2f2 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .sheet-sign { page-break-inside: avoid; }
}


/* =========================================================
   ORAQI DESIGN SYSTEM — premium responsive refresh
   Keeps original component classes and application behavior.
   ========================================================= */
:root {
  --green: #176b55;
  --green-dark: #102f28;
  --green-soft: #e8f3ee;
  --sand: #f5f7f5;
  --ink: #172824;
  --muted: #71817b;
  --line: #e5ebe7;
  --white: #fff;
  --radius: 18px;
  --shadow-soft: 0 10px 32px rgba(20, 54, 43, .055);
  --shadow-card: 0 5px 18px rgba(20, 54, 43, .045);
}
html { scroll-behavior: smooth; }
body { background: #f5f7f5; font-family: "IBM Plex Sans Arabic", "Segoe UI", "Noto Naskh Arabic", "Geeza Pro", "Dubai", Tahoma, system-ui, sans-serif; color: var(--ink); }
button, input, textarea { font-family: inherit; }
.top { background: #102b25; padding: calc(13px + env(safe-area-inset-top)) 0 0; box-shadow: 0 8px 26px rgba(12, 39, 31, .13); }
.top-inner { max-width: 1160px; margin: 0 auto; padding: 0 24px 15px; display:flex; align-items:center; justify-content:space-between; }
.brand { display:flex; align-items:center; gap:13px; color:#fff; text-decoration:none; }
.logo { width:48px; height:48px; display:grid; place-items:center; border-radius:15px; background:linear-gradient(145deg,#d8eee4,#a8d4bf); color:#123d30; border:1px solid rgba(255,255,255,.28); box-shadow:inset 0 1px 0 rgba(255,255,255,.8); }
.logo span { font-size:27px; font-weight:700; }
.brand-copy { display:grid; gap:2px; }
.brand-copy strong { font-size:20px; letter-spacing:-.4px; }
.brand-copy small { font-size:11.5px; color:#b8cec5; }
.top-meta { display:flex; align-items:center; gap:8px; color:#c2d6ce; font-size:12px; }
.secure-dot { width:8px; height:8px; border-radius:50%; background:#7bd4a8; box-shadow:0 0 0 4px rgba(123,212,168,.12); }
.tabs { max-width:1160px; margin:0 auto; padding:0 24px 14px; gap:8px; }
.tab { flex:0 0 auto; min-width:116px; border:1px solid rgba(255,255,255,.13); background:rgba(255,255,255,.055); color:#c9d8d2; border-radius:12px; padding:10px 17px; font-size:13px; transition:background .2s,border-color .2s,transform .2s; }
.tab:hover { background:rgba(255,255,255,.12); }
.tab.is-on { background:#e8f3ee; color:#153e32; border-color:#e8f3ee; box-shadow:0 4px 12px rgba(0,0,0,.08); }
.tab-icon { display:inline-block; margin-inline-end:7px; font-size:16px; vertical-align:-1px; }
.view { max-width:1160px; padding:28px 24px 18px; min-height:58vh; }
.welcome { position:relative; overflow:hidden; min-height:218px; display:flex; align-items:center; justify-content:space-between; gap:24px; padding:30px 36px; border-radius:24px; color:#fff; background:linear-gradient(112deg,#123b30 0%,#17634e 58%,#23745b 100%); box-shadow:0 15px 35px rgba(21,78,59,.13); }
.welcome:after { content:""; position:absolute; width:340px; height:340px; border:1px solid rgba(255,255,255,.09); border-radius:50%; inset-inline-start:35%; top:-205px; }
.welcome-copy { position:relative; z-index:2; max-width:650px; }
.eyebrow { display:inline-flex; align-items:center; gap:8px; color:#b9dfcd; font-size:11px; font-weight:600; letter-spacing:.2px; }
.eyebrow i { width:7px; height:7px; background:#8de0b4; border-radius:50%; box-shadow:0 0 0 4px rgba(141,224,180,.13); }
.welcome h2 { margin:13px 0 8px; font-size:clamp(23px,3vw,32px); line-height:1.45; letter-spacing:-.6px; }
.welcome p { margin:0; max-width:590px; color:#d2e4dc; font-size:14px; line-height:1.9; }
.welcome-points { display:flex; flex-wrap:wrap; gap:17px; margin-top:18px; color:#e1f0e9; font-size:11px; }
.welcome-points span { white-space:nowrap; }
.welcome-art { width:190px; height:170px; flex:0 0 190px; position:relative; display:grid; place-items:center; }
.art-orbit { position:absolute; border:1px solid rgba(218,245,231,.17); border-radius:50%; }
.orbit-one { width:160px; height:160px; }
.orbit-two { width:122px; height:122px; }
.art-doc { width:83px; height:108px; position:relative; z-index:1; background:#f5fbf7; border-radius:10px; transform:rotate(-7deg); padding:15px 12px; box-shadow:0 12px 30px rgba(0,0,0,.2); }
.art-doc b { display:block; color:#176b55; font-size:22px; margin-bottom:9px; }
.art-doc i { display:block; height:4px; border-radius:4px; background:#d8e7df; margin:6px 0; }
.art-doc i:nth-of-type(1) { width:100%; background:#9ccab4; }
.art-doc i:nth-of-type(2) { width:78%; }.art-doc i:nth-of-type(3) { width:88%; }
.art-doc span { display:inline-block; margin-top:7px; color:#176b55; font-size:8px; font-weight:700; letter-spacing:1px; }
.art-check { position:absolute; z-index:2; bottom:15px; inset-inline-end:25px; width:35px; height:35px; display:grid; place-items:center; border-radius:50%; background:#a8e4c2; color:#124b38; border:4px solid #246d55; font-weight:800; }
.stats-row { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:13px; margin:16px 0 30px; }
.stat-card { min-height:78px; display:flex; align-items:center; gap:13px; padding:14px 17px; background:#fff; border:1px solid var(--line); border-radius:16px; box-shadow:var(--shadow-card); }
.stat-icon { width:40px; height:40px; flex:0 0 40px; display:grid; place-items:center; border-radius:12px; background:#edf5f0; color:#23654f; font-size:20px; }
.stat-card strong { display:block; font-size:20px; line-height:1.25; color:#193a30; }
.stat-card small { display:block; margin-top:3px; color:#819089; font-size:11px; }
.section-heading { display:flex; align-items:end; justify-content:space-between; margin:0 2px 15px; }
.section-heading h2 { margin:5px 0 3px; font-size:20px; color:#1b332c; }
.section-heading p { margin:0; color:#829089; font-size:12px; }
.muted-eyebrow { color:#67917e; }
.search { margin:0 0 13px; }
.search input { min-height:50px; border:1px solid #dfe8e2; border-radius:14px; padding:13px 17px; background:#fff; box-shadow:0 3px 12px rgba(20,54,43,.025); font-size:14px; }
.search input:focus { outline:3px solid rgba(35,112,83,.12); border-color:#75ad91; }
.chips { gap:7px; padding:3px 1px 13px; }
.chip-btn { border-color:#e2eae5; color:#66776f; background:#fff; padding:8px 14px; font-size:12px; transition:all .18s; }
.chip-btn:hover { border-color:#9dbdac; color:#1b6249; }
.chip-btn.on { background:#1c6a52; border-color:#1c6a52; box-shadow:0 4px 10px rgba(28,106,82,.15); }
.count { font-size:12px; margin:3px 3px 12px; color:#84918b; }
.grid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:13px; }
.card { border:1px solid #e6ece8; border-radius:16px; box-shadow:0 3px 13px rgba(18,54,42,.035); transition:transform .2s,box-shadow .2s,border-color .2s; }
.card:hover { transform:translateY(-3px); border-color:#c8ddd1; box-shadow:0 12px 25px rgba(18,54,42,.08); }
.card-hit { min-height:142px; padding:18px 17px 16px; }
.chip { background:#edf5f0; color:#36745a; font-size:10px; padding:4px 9px; margin-bottom:9px; }
.card-title { color:#20382f; font-size:15px; line-height:1.6; padding-inline-end:26px; }
.card-blurb { color:#829089; font-size:11.5px; line-height:1.8; margin-top:6px; }
.fav { top:11px; left:11px; width:30px; height:30px; border-radius:9px; border-color:#edf0ed; color:#a3b0a9; font-size:17px; }
.fav.on { color:#bd8a32; background:#fff8e9; border-color:#f1dfb9; }
.empty { padding:26px 18px; background:#fff; border:1px dashed #dce6df; border-radius:16px; }
.empty.big { padding:45px 22px; }
.sect { color:#1b604a; font-size:16px; margin:23px 3px 12px; }
.note-box { border-radius:13px; padding:13px 15px; font-size:12px; }
.pending { grid-template-columns:repeat(2,minmax(0,1fr)); }
.pitem { border-radius:13px; border-color:#e6ece8; padding:13px 14px; }
.pitem a { color:#176b55; font-weight:600; }
.crumb { gap:12px; margin:0 0 18px; }
.crumb span { font-size:15px; }
.back,.mini { border-color:#e2eae5; border-radius:10px; padding:8px 13px; transition:background .2s; }
.back:hover,.mini:hover { background:#edf5f0; }
.group { border-color:#e5ece7; border-radius:17px; padding:18px 18px 9px; box-shadow:var(--shadow-card); }
.group h2 { font-size:14px; margin-bottom:13px; }
.fields { gap:15px; }
.lab { font-size:12px; font-weight:600; color:#52645b; }
.field input,.field textarea { border-color:#e1e9e3; border-radius:11px; background:#fbfcfb; padding:12px 13px; font-size:14px; }
.field input:focus,.field textarea:focus { outline:3px solid rgba(35,112,83,.11); border-color:#75ad91; }
.actions { gap:9px; margin-top:15px; }
.btn { border-radius:12px; padding:13px 19px; font-size:13px; transition:transform .18s,box-shadow .18s,background .18s; }
.btn:hover { transform:translateY(-1px); }
.btn.primary { background:#176b55; border-color:#176b55; box-shadow:0 6px 14px rgba(23,107,85,.15); }
.btn.primary:hover { background:#105640; }
.btn.ghost { background:#fff; border-color:#e3eae5; }
.paper-wrap { max-width:850px; margin:0 auto; }
.sheet { border:1px solid #e4e9e5; border-radius:12px; box-shadow:0 8px 28px rgba(20,54,43,.06); padding:34px 38px; }
.sheet-subject { border-right:3px solid #176b55; background:#f0f6f2; }
.sticky-actions { max-width:1160px; padding:12px 24px calc(12px + env(safe-area-inset-bottom)); background:rgba(245,247,245,.94); backdrop-filter:blur(14px); border-top:1px solid #e3eae5; }
.gdetail { border-color:#e5ece7; border-radius:18px; padding:25px; box-shadow:var(--shadow-card); }
.gtitle { font-size:23px; color:#18392e; }
.gsum { color:#687a71; }
.fact { background:#f7faf8; border-color:#eaf0ec; border-radius:11px; }
.gdetail h3 { color:#1c684f; }
.src a { color:#176b55; font-weight:600; }
.foot { max-width:1160px; display:flex; align-items:center; gap:12px; padding:22px 24px 35px; color:#87948d; border-top:1px solid #e7ece8; font-size:11px; }
.foot p { margin:0; }
.foot-mark { width:28px; height:28px; flex:0 0 28px; display:grid; place-items:center; border-radius:9px; background:#e7f1eb; color:#23634c; font-weight:700; }
button:focus-visible,a:focus-visible { outline:3px solid rgba(47,132,98,.35); outline-offset:2px; }
@media (max-width:900px) { .grid { grid-template-columns:repeat(2,minmax(0,1fr)); } .welcome { padding:26px; } }
@media (max-width:620px) {
  .top-inner { padding:0 16px 13px; }
  .top-meta { font-size:10px; }
  .logo { width:42px; height:42px; }
  .brand-copy strong { font-size:18px; }
  .tabs { padding:0 12px 11px; gap:6px; }
  .tab { min-width:0; flex:1; padding:10px 5px; font-size:11px; }
  .tab-icon { margin-inline-end:4px; }
  .view { padding:17px 13px 15px; }
  .welcome { min-height:unset; padding:23px 20px; border-radius:19px; }
  .welcome h2 { font-size:22px; max-width:310px; }
  .welcome p { font-size:12px; }
  .welcome-art { width:92px; height:112px; flex-basis:92px; transform:scale(.72); transform-origin:center; margin-inline-start:-10px; }
  .welcome-points { gap:8px 12px; font-size:9px; }
  .stats-row { gap:7px; margin:11px 0 25px; }
  .stat-card { min-height:69px; padding:9px 8px; gap:7px; border-radius:12px; }
  .stat-icon { width:30px; height:30px; flex-basis:30px; border-radius:9px; font-size:15px; }
  .stat-card strong { font-size:16px; }
  .stat-card small { font-size:9px; line-height:1.4; }
  .section-heading { margin-bottom:12px; }
  .section-heading h2 { font-size:17px; }
  .section-heading p { font-size:10px; }
  .grid { grid-template-columns:1fr; gap:9px; }
  .card-hit { min-height:unset; padding:15px 15px 13px; }
  .card-title { font-size:14px; }
  .card-blurb { font-size:11px; }
  .pending { grid-template-columns:1fr; }
  .group { padding:15px 13px 7px; }
  .fields { grid-template-columns:1fr; }
  .sheet { padding:22px 17px; font-size:14px; }
  .sticky-actions { padding:10px 12px calc(10px + env(safe-area-inset-bottom)); }
  .sticky-actions .btn { font-size:12px; padding:12px 8px; }
  .gdetail { padding:19px 15px; }
  .gtitle { font-size:20px; }
  .foot { padding:17px 15px 28px; }
}
@media (prefers-reduced-motion: reduce) { *,*::before,*::after { scroll-behavior:auto!important; transition:none!important; animation:none!important; } }
@media print {
  body { font-family: "IBM Plex Sans Arabic", "Segoe UI", "Noto Naskh Arabic", "Geeza Pro", "Dubai", Tahoma, system-ui, sans-serif; }
  .sheet { box-shadow:none; }
}

/* --- refinements after review --- */
.sticky-actions { margin-inline: auto; }
@media (max-width:620px) {
  .chips { flex-wrap: wrap; overflow-x: visible; row-gap: 7px; padding-bottom: 4px; }
  .chips .chip-btn { flex: 0 1 auto; }
}

/* clean A4 print: no card chrome around the letter */
@media print {
  .sheet { border: 0 !important; border-radius: 0 !important; box-shadow: none !important; padding: 0 !important; }
  .paper-wrap { padding: 0 !important; }
  .note-box, .crumb, .sticky-actions, .top, .foot { display: none !important; }
}

/* ============ calculator, checklists, signature, footer links ============ */

/* footer */
.foot { flex-direction: column; align-items: stretch; gap: 10px; }
.foot-main { display: flex; align-items: center; gap: 12px; }
.foot-links { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 11px; padding-inline-start: 40px; }
.foot-links a { color: #23634c; font-weight: 600; text-decoration: none; border-bottom: 1px dotted #b9cfc4; }
.foot-links a:hover { color: #10493a; }
.foot-sep { color: #c3cec8; }
.foot-credit { color: #87948d; }

/* end of service calculator */
.calc-form .fields { grid-template-columns: 1fr; }
.calc-dur { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.calc-reasons { margin-top: 16px; }
.calc-reasons .lab { display: block; margin-bottom: 8px; }
.seg { display: flex; gap: 8px; flex-wrap: wrap; }
.seg-btn { flex: 1 1 auto; border: 1px solid #e2eae5; background: #fff; border-radius: 12px; padding: 11px 12px; font: inherit; font-size: 12.5px; color: #52645b; cursor: pointer; transition: background .18s, border-color .18s, color .18s; }
.seg-btn:hover { border-color: #9dbdac; color: #1b6249; }
.seg-btn.on { background: #176b55; border-color: #176b55; color: #fff; font-weight: 600; }
.calc-card { background: #fff; border: 1px solid #e5ece7; border-radius: 18px; padding: 20px 18px; box-shadow: var(--shadow-card); margin-top: 16px; }
.calc-total { display: flex; flex-direction: column; gap: 4px; padding-bottom: 14px; border-bottom: 1px dashed #e3eae5; }
.calc-label { font-size: 12px; color: #71817b; }
.calc-total strong { font-size: 30px; color: #102f28; letter-spacing: -.5px; line-height: 1.3; }
.calc-total small { font-size: 13px; font-weight: 500; color: #52645b; }
.calc-steps { margin: 14px 0 0; padding-inline-start: 18px; display: grid; gap: 8px; font-size: 12.5px; color: #3c4a43; line-height: 1.85; }
.calc-rule { margin-top: 16px; padding: 12px 14px; background: #f0f6f2; border: 1px solid #dbe9e1; border-radius: 12px; font-size: 12px; color: #1c5a45; display: grid; gap: 6px; line-height: 1.8; }
.calc-rule a { color: #176b55; font-weight: 600; }
.calc-note { margin: 12px 0 0; font-size: 11px; color: #7a8781; line-height: 1.9; }
.calc-warn { margin-top: 12px; }
.empty-calc p { margin: 0 0 6px; color: #52645b; font-size: 13px; }
.calc-hint { font-size: 11px; color: #8a968f; }

/* per-guide checklist */
.checklist { margin-top: 24px; padding-top: 18px; border-top: 1px solid #e9efeb; }
.chk-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.chk-head h3 { margin: 0; font-size: 15px; color: #1c684f; }
.chk-count { font-size: 12px; font-weight: 700; color: #176b55; background: #eaf3ee; border-radius: 999px; padding: 3px 10px; }
.chk-note { margin: 8px 0 12px; font-size: 11.5px; color: #7a8781; line-height: 1.8; }
.chk-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.chk-item { display: flex; align-items: flex-start; gap: 9px; background: #f8faf9; border: 1px solid #e8eeea; border-radius: 12px; padding: 10px 12px; cursor: pointer; font-size: 12.5px; line-height: 1.8; color: #3c4a43; }
.chk-item input { margin: 4px 0 0; accent-color: #176b55; width: 17px; height: 17px; flex: 0 0 auto; }
.chk-item.done { background: #eef6f1; border-color: #cfe4d8; }
.chk-item.done .chk-text { text-decoration: line-through; color: #7d8d86; }
.chk-tag { flex: 0 0 auto; font-size: 9.5px; background: #e7efe9; color: #4d6a5c; border-radius: 6px; padding: 2px 6px; margin-top: 5px; }
.chk-reset { margin-top: 12px; font-size: 12px; padding: 9px 14px; }
.chk-badge { display: inline-block; margin-top: 8px; font-size: 10.5px; font-weight: 700; color: #176b55; background: #eaf3ee; border-radius: 999px; padding: 3px 9px; }

/* finger signature */
.sig-group { margin-top: 14px; }
.sigpad { display: block; width: 100%; height: 150px; background: #fbfcfb; border: 1px dashed #c8d7cf; border-radius: 14px; touch-action: none; margin-top: 10px; }
.sig-hint { margin: 8px 0 0; font-size: 11.5px; color: #7a8781; line-height: 1.8; }
.sig-msg { margin: 6px 0 0; font-size: 11.5px; color: #a3532f; min-height: 16px; }
.sig-actions { display: flex; gap: 9px; margin-top: 10px; }
.sig-actions .btn { flex: 1; font-size: 12px; padding: 11px 12px; }
.sig-saved img { display: block; max-width: 220px; height: auto; background: #fff; border: 1px solid #e8eeea; border-radius: 12px; padding: 6px; margin-top: 10px; }
.sign-img-wrap { margin: 0 0 10px; }
.sign-img { max-width: 150px; height: auto; display: block; }

@media (max-width: 620px) {
  .tab { font-size: 10.5px; padding: 9px 3px; }
  .tab-icon { display: none; }
  .calc-total strong { font-size: 26px; }
  .foot-links { padding-inline-start: 0; }
  .chk-item { font-size: 12px; }
}

@media print {
  .sign-img { max-width: 45mm; }
  .checklist, .calc-card, .calc-form, .calc-reasons, .foot-links { display: none !important; }
}

/* privacy pages */
.policy { max-width: 900px; }
.policy-body { padding: 26px 22px; }
.policy-body .gsum { margin-bottom: 8px; }
.policy-body h3 { margin: 22px 0 8px; font-size: 14.5px; color: #1c684f; }
.policy-body p, .policy-body li { font-size: 13px; line-height: 2; color: #3c4a43; }
.policy-body p { margin: 0 0 8px; }
.policy-body a { color: #176b55; font-weight: 600; }
.policy-back { margin: 18px 2px 34px; font-size: 12.5px; color: #71817b; }
.policy-back a { color: #176b55; font-weight: 600; }
body.ltr { direction: ltr; }
body.ltr .section-heading, body.ltr .policy-body, body.ltr .policy-back, body.ltr .foot p { text-align: left; }
body.ltr .foot-links { padding-inline-start: 0; }
@media (max-width: 620px) { .policy-body { padding: 20px 15px; } }

/* calculator: optional commissions (Article 86) + independence line */
.calc-chk { display: flex; align-items: flex-start; gap: 9px; margin: 2px 0 14px; font-size: 13.5px; color: #3c4d45; line-height: 1.6; cursor: pointer; }
.calc-chk input { flex: 0 0 auto; width: 18px; height: 18px; margin: 2px 0 0; accent-color: #176b55; }
.welcome-indep { margin: 12px 0 0; font-size: 13px; color: #4a5b52; background: rgba(23, 107, 85, .07); border: 1px solid rgba(23, 107, 85, .16); border-radius: 10px; padding: 8px 12px; display: inline-block; }
.policy-id { font-size: 13px; color: #4a5b52; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; line-height: 1.9; }
.policy-id a { color: var(--green-dark); }
