/* yl-css-block l0 | unified */
/* yl-css-block l1 | unified */
/* yl-css-block l2 | unified */
/* yl-css-block l3 | unified */
/* yl-css-block l4 | unified */
/* yl-css-block l5 | unified */
/* yl-css-block l6 | unified */
/* yl-css-block l7 | unified */
/* yl-css-block l8 | unified */
/* yl-css-block l9 | unified */
/* yl-css-block l10 | unified */
/* yl-css-block l11 | unified */
/* yl-css-block l12 | unified */
/* yl-css-block l13 | unified */
/* yl-css-block l14 | unified */
/* yl-css-block l15 | unified */
/* yl-css-block l16 | unified */
/* yl-css-block l17 | unified */
/* yl-css-block l18 | unified */
/* yl-css-block l19 | unified */
/* yl-css-block l20 | unified */
/* yl-css-block l21 | unified */
/* yl-css-block l22 | unified */
/* yl-css-block l23 | unified */
/* yl-css-block l24 | unified */
/* yl-css-block l25 | unified */
/* yl-css-block l26 | unified */
/* yl-css-block l27 | unified */
/* yl-css-block l28 | unified */
/* yl-css-block l29 | unified */
/* yl-css-block l30 | unified */
/* ==========================================================================
   الموقع القانوني اليمني — Unified Yemeni Laws Stylesheet (laws-unified.css)
   Replaces 674.3 KB legacy bundle with one clean, high-contrast Royal Navy & Gold stylesheet.
   Includes original Hero, full-width mobile reading layout, and Floating Share/Facebook icons.
   ========================================================================== */

@font-face {
  font-family: "Cairo";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("/assets/fonts/cairo/cairo-01.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC4, U+10EFC-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1;
}
@font-face {
  font-family: "Cairo";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("/assets/fonts/cairo/cairo-02.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Cairo";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("/assets/fonts/cairo/cairo-03.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --yl-font: "Cairo", Tahoma, Arial, sans-serif;
  --yl-navy-950: #031022;
  --yl-navy-900: #061225;
  --yl-navy-800: #0b225a;
  --yl-blue-700: #0b6fd8;
  --yl-gold-500: #d4a63a;
  --yl-gold-300: #f3c969;
  --yl-page: #f5f7fb;
  --yl-surface: #ffffff;
  --yl-text: #0f172a;
  --yl-muted: #475569;
  --yl-border: rgba(11, 34, 90, 0.14);
  --yl-focus: #005fcc;
  --yl-radius: 18px;
  --yl-shadow: 0 10px 28px rgba(6, 18, 37, 0.07);
}

*, *::before, *::after { box-sizing: border-box; }
html {
  direction: rtl;
  font-family: var(--yl-font);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  font-family: var(--yl-font);
  background: var(--yl-page);
  color: var(--yl-text);
  font-size: clamp(16px, 0.96rem + 0.14vw, 18px);
  line-height: 1.9;
  overflow-x: hidden;
}
a { color: var(--yl-navy-800); text-underline-offset: 3px; }
a:hover { color: var(--yl-blue-700); }
img { max-width: 100%; height: auto; }
button, input, select, textarea { font-family: inherit; }
:focus-visible { outline: 3px solid var(--yl-focus); outline-offset: 2px; }
[hidden] { display: none !important; }

/* Main Container */
.page-shell,
.law-shell {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: clamp(16px, 2.4vw, 28px) clamp(12px, 2vw, 22px) 44px;
}

/* Breadcrumb */
.breadcrumb,
.yl-library-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--yl-muted);
}
.breadcrumb a { color: var(--yl-navy-800); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

/* Original Classic Hero */
.yl-static-hero,
.hero.hero-modern,
.yl-site-static-hero {
  position: relative;
  text-align: center;
  background: radial-gradient(circle at top center, rgba(215, 174, 85, 0.16), transparent 55%),
              linear-gradient(135deg, #041229 0%, #091d4a 55%, #0d2b6b 100%);
  color: #ffffff;
  border-radius: 22px;
  padding: clamp(24px, 3.6vw, 40px) clamp(16px, 3vw, 32px);
  margin: 0 0 22px;
  border: 1px solid rgba(215, 174, 85, 0.34);
  box-shadow: 0 16px 38px rgba(3, 16, 34, 0.22);
}
.yl-static-hero__content,
.hero-content {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  text-align: center;
}
.yl-static-hero__badge,
.hero-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 999px;
  background: rgba(215, 174, 85, 0.16);
  border: 1px solid rgba(240, 213, 142, 0.48);
  color: #f4d88c;
  font-size: 0.9rem;
  font-weight: 800;
  margin-bottom: 12px;
}
.yl-static-hero h1,
.hero h1 {
  margin: 0 auto 10px;
  color: #ffffff;
  font-size: clamp(1.45rem, 2.8vw, 2.2rem);
  font-weight: 900;
  line-height: 1.38;
  max-width: 920px;
}
.yl-static-hero__description,
.hero p {
  display: block;
  max-width: 900px;
  margin: 12px auto 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(0.95rem, 1.3vw, 1.05rem);
  line-height: 1.85;
}
.yl-static-hero__rows {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  width: 100%;
  margin: clamp(20px, 3.5vw, 30px) 0 0;
}
.yl-static-hero__whatsapp {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  min-height: 68px;
  padding: 12px 18px;
  border-radius: 18px;
  background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #ffffff;
  text-decoration: none;
  text-align: right;
  box-shadow: 0 12px 26px rgba(21, 128, 61, 0.34);
  transition: transform 0.18s ease, filter 0.18s ease;
}
.yl-static-hero__whatsapp:hover {
  transform: translateY(-2px);
  filter: brightness(1.04);
  color: #ffffff;
}
.yl-static-hero__whatsapp-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  font-size: 26px;
}
.yl-static-hero__notification-dot {
  position: absolute;
  top: -2px;
  left: -2px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #fde047;
  border: 2px solid #15803d;
}
.yl-static-hero__whatsapp-copy { display: block; min-width: 0; }
.yl-static-hero__whatsapp-copy strong {
  display: block;
  color: #ffffff;
  font-size: clamp(16px, 2vw, 19px);
  font-weight: 900;
}
.yl-static-hero__action-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
}
.yl-static-hero__action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  min-height: 48px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(215, 174, 85, 0.32);
  color: #ffffff;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  transition: transform 0.18s ease, background 0.18s ease;
}
.yl-static-hero__action:hover {
  transform: translateY(-2px);
  background: rgba(215, 174, 85, 0.18);
  color: #ffffff;
}
.yl-static-hero__action i { flex: 0 0 auto; color: #f0d58e; font-size: 17px; }
.yl-static-hero__action span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }

/* Law Cards, Text Blocks & Full-Text Preformatted Law Articles */
.section-card,
.law-card,
.law-card-admin,
.law-card-admin-single,
.yl-related-library,
.yl-library-internal-links,
.yl-original-editorial {
  background: var(--yl-surface);
  border: 1px solid var(--yl-border);
  border-radius: var(--yl-radius);
  padding: clamp(16px, 2.5vw, 28px);
  margin: 0 0 20px;
  box-shadow: var(--yl-shadow);
}
.section-head {
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid rgba(212, 166, 58, 0.28);
}
.law-title,
.section-card h2,
.law-card h2 {
  margin: 0 0 10px;
  color: var(--yl-navy-800);
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  font-weight: 800;
  line-height: 1.42;
}
.law-sub,
.section-card h3,
.law-card h3 {
  margin: 16px 0 8px;
  color: var(--yl-navy-900);
  font-size: 1.1rem;
  font-weight: 800;
}
.law-note {
  padding: 13px 16px;
  margin: 12px 0 16px;
  border-radius: 14px;
  background: #fffbeb;
  border: 1px solid #f59e0b;
  color: #78350f;
  font-weight: 700;
  font-size: 0.94rem;
}
.law-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
}
.law-text,
.law-text-block {
  color: var(--yl-text);
  font-size: clamp(1rem, 1.05vw, 1.08rem);
  line-height: 1.95;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.law-text-pre {
  margin: 0;
  padding: 16px 18px;
  border-radius: 14px;
  background: #fcfaf4;
  border: 1px solid #e2d8c3;
  font-family: var(--yl-font);
  font-size: clamp(0.98rem, 1.02vw, 1.06rem);
  line-height: 1.95;
  color: #111827;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.law-text mark,
.law-text-pre mark,
mark.yl-law-hit {
  background: #fde047;
  color: #061225;
  padding: 1px 4px;
  border-radius: 4px;
}

/* Law Article Search Box & Section Search */
.library-section-search-panel,
.yl-law-search-box,
.yl-admin-laws-search {
  background: #ffffff;
  border: 1px solid rgba(11, 34, 90, 0.16);
  border-radius: 16px;
  padding: 16px 18px;
  margin: 0 0 18px;
  box-shadow: 0 6px 20px rgba(6, 18, 37, 0.06);
}
.library-section-search-panel input,
.yl-law-search-box input,
.yl-admin-laws-search input {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  border: 1px solid rgba(11, 34, 90, 0.24);
  border-radius: 12px;
  background: #f8fafc;
  color: #0f172a;
  font-size: 1rem;
}
.library-section-search-button,
.yl-law-search-box button,
.yl-admin-laws-search button {
  min-height: 44px;
  padding: 9px 18px;
  border: 0;
  border-radius: 12px;
  background: #0b225a;
  color: #ffffff;
  font-weight: 800;
  cursor: pointer;
}

/* Laws Index Grid & Internal Links */
.laws-grid,
.posts-grid,
.seo-internal-links-grid,
.ai-results {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}
.case-card {
  background: #f8fafc;
  border: 1px solid rgba(11, 34, 90, 0.12);
  border-radius: 16px;
  padding: 18px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}
.case-card:hover {
  border-color: var(--yl-gold-500);
  box-shadow: 0 8px 20px rgba(6, 18, 37, 0.08);
}
.seo-internal-link,
.action-btn,
.claim-precedents-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 14px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid rgba(11, 34, 90, 0.14);
  color: var(--yl-navy-800);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.94rem;
}
.seo-internal-link:hover,
.action-btn:hover,
.claim-precedents-link:hover {
  background: #eef4ff;
  border-color: var(--yl-blue-700);
  color: var(--yl-navy-900);
}
.action-btn.primary {
  background: #0b225a;
  color: #ffffff;
  border-color: #0b225a;
}
.action-btn.primary:hover {
  background: #14368a;
  color: #ffffff;
}

/* PDF Save Button */
.yl-pdf-save-area {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
}
.yl-pdf-save-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid #d4a63a;
  border-radius: 12px;
  background: linear-gradient(135deg, #061225, #0b225a);
  color: #f3c969;
  font-weight: 800;
  font-size: 0.94rem;
  cursor: pointer;
}
.yl-pdf-save-btn svg { width: 20px; height: 20px; fill: currentColor; }

/* Ads */
.yl-in-article-ad,
.yl-law-bottom-ad,
.yl-autorelaxed-ad,
.yl-main-bottom-autorelaxed-ad {
  text-align: center;
  margin: 18px auto;
  min-height: 90px;
}

/* Floating Share & Facebook Buttons (Crisp White Icons) */
.yl-floating-share-wrap {
  position: fixed;
  inset-inline-end: max(14px, env(safe-area-inset-right, 0px));
  bottom: max(20px, env(safe-area-inset-bottom, 0px));
  z-index: 99998;
  display: flex;
  flex-direction: column;
  gap: 10px;
  direction: rtl;
  font-family: var(--yl-font);
}
.yl-floating-share-btn {
  width: 56px;
  height: 56px;
  min-height: 56px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0f766e, #14b8a6);
  color: #ffffff;
  text-decoration: none;
  box-shadow: 0 12px 28px rgba(15, 118, 110, 0.34);
  cursor: pointer;
  transition: transform 0.18s ease, filter 0.18s ease;
}
.yl-floating-share-btn.yl-floating-share-facebook,
.yl-floating-share-facebook {
  background: #1877f2;
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(24, 119, 242, 0.34);
}
.yl-floating-share-btn:hover { transform: translateY(-2px) scale(1.03); filter: brightness(1.06); color: #ffffff; }
.yl-floating-share-btn svg { width: 26px; height: 26px; display: block; fill: currentColor; color: #ffffff; flex-shrink: 0; }
.yl-floating-share-toast {
  position: fixed;
  inset-inline-end: 18px;
  bottom: 156px;
  z-index: 99999;
  max-width: min(310px, calc(100vw - 36px));
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.96);
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.yl-floating-share-toast.show { opacity: 1; transform: translateY(0); }

/* Unified Footer */
.site-footer {
  background: linear-gradient(180deg, #061225 0%, #030b18 100%);
  color: #e2e8f0;
  border-top: 2px solid rgba(243, 201, 105, 0.28);
  padding: 32px 16px 28px;
  margin-top: 32px;
}
.site-footer a { color: #f3c969; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer .yl-trust-footer-links {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 8px 14px !important;
  margin: 12px auto 0 !important;
  padding: 12px 10px 0 !important;
  border-top: 1px solid rgba(243, 201, 105, 0.22) !important;
  max-width: 980px !important;
}
.site-footer .yl-trust-footer-links a {
  color: #f3c969 !important;
  text-decoration: none !important;
  font-size: 0.92rem !important;
  font-weight: 700 !important;
}

@media (max-width: 768px) {
  .page-shell,
  .law-shell {
    padding-inline: 6px !important;
  }
  .law-card,
  .law-card-admin,
  .law-card-admin-single {
    padding: 14px 10px !important;
    border-radius: 14px !important;
  }
  .law-text-pre {
    padding: 12px 10px !important;
    font-size: 0.94rem !important;
  }
  .yl-static-hero__action-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .yl-static-hero__whatsapp {
    min-height: 62px;
    padding: 11px 13px;
    gap: 10px;
  }
  .yl-static-hero__whatsapp-icon {
    width: 42px;
    height: 42px;
    font-size: 24px;
  }
  .yl-floating-share-wrap {
    inset-inline-end: max(12px, env(safe-area-inset-right, 0px));
    bottom: max(16px, env(safe-area-inset-bottom, 0px));
  }
  .yl-floating-share-btn { width: 52px; height: 52px; min-height: 52px; }
  .yl-floating-share-btn svg { width: 24px; height: 24px; }
}

@media print {
  header.topbar,
  .yl-floating-share-wrap,
  .yl-floating-share-toast,
  .yl-pdf-save-area,
  .yl-in-article-ad,
  .yl-law-bottom-ad,
  .yl-autorelaxed-ad,
  .yl-main-bottom-autorelaxed-ad {
    display: none !important;
  }
}

/* ===== Header Menu Navigation ===== */
/* Header menu CSS - cleaned */
:root{
  --yl-header-h: 88px;
  --yl-safe-top: 0px;
  --yl-safe-right: env(safe-area-inset-right, 0px);
  --yl-safe-bottom: env(safe-area-inset-bottom, 0px);
  --yl-safe-left: env(safe-area-inset-left, 0px);
  --yl-gold: #f3c969;
  --yl-blue: #1d77ff;
  --yl-ink: #061326;
  --yl-rose: #e65b91;
  --yl-green: #2fbf8f;
  --yl-violet: #7c5cff;
}

/* Official fixed header */
.topbar.yl-header-ready{
  position: sticky !important;
  top: 0 !important;
  right: 0 !important;
  left: 0 !important;
  z-index: 99999 !important;
  width: 100% !important;
  display: grid !important;
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  grid-auto-rows: minmax(46px, auto) !important;
  align-items: stretch !important;
  gap: 10px !important;
  padding-top: calc(8px + var(--yl-safe-top)) !important;
  padding-right: calc(12px + var(--yl-safe-right)) !important;
  padding-bottom: 8px !important;
  padding-left: calc(12px + var(--yl-safe-left)) !important;
  min-height: calc(62px + var(--yl-safe-top)) !important;
  background: rgba(5, 12, 26, .96) !important;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .22) !important;
  overflow: visible !important;
}

.topbar.yl-header-ready .brand{
  display: none !important;
}

.topbar.yl-header-ready .yl-header-shortcuts{
  display: contents !important;
}

.topbar.yl-header-ready .yl-header-link,
.topbar.yl-header-ready .yl-header-menu-btn{
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  min-height: 46px !important;
  padding: 0 10px !important;
  border-radius: 16px !important;
  border: 1px solid rgba(255, 255, 255, .10) !important;
  color: #fff !important;
  text-decoration: none !important;
  font-weight: 600 !important;
  text-align: center !important;
  line-height: 1.35 !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  box-shadow: 0 4px 10px rgba(0, 0, 0, .12) !important;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease !important;
}

.topbar.yl-header-ready .yl-header-link:focus-visible,
.topbar.yl-header-ready .yl-header-menu-btn:focus-visible{
  outline: none !important;
  box-shadow: 0 6px 14px rgba(0, 0, 0, .18) !important;
}

@media (hover: hover) and (pointer: fine) {
  .topbar.yl-header-ready .yl-header-link:hover,
  .topbar.yl-header-ready .yl-header-menu-btn:hover{
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 18px rgba(0, 0, 0, .20) !important;
  }
}

.topbar.yl-header-ready .yl-header-link:active,
.topbar.yl-header-ready .yl-header-menu-btn:active{
  transform: scale(.97) !important;
}

.topbar.yl-header-ready .yl-header-link--site,
.topbar.yl-header-ready .yl-header-link--contracts{
  background: linear-gradient(180deg, #f8d46b, #c79210) !important;
  color: #3d2a00 !important;
}

.topbar.yl-header-ready .yl-header-link--library{
  background: linear-gradient(180deg, #42c8ff, #1d77ff) !important;
  color: #fff !important;
}

.topbar.yl-header-ready .yl-header-link--posts{
  background: linear-gradient(180deg, #34d399, #059669) !important;
  color: #052e1a !important;
}

.topbar.yl-header-ready .yl-header-link--services{
  background: linear-gradient(180deg, #fb7185, #e11d48) !important;
  color: #fff !important;
}

.topbar.yl-header-ready .yl-header-link--ai-search{
  position: relative !important;
  overflow: hidden !important;
  border-radius: 22px !important;
  border: 1px solid rgba(125, 211, 252, .72) !important;
  background:
    radial-gradient(circle at 16% 20%, rgba(255, 255, 255, .95) 0 1.5px, transparent 2.5px),
    radial-gradient(circle at 82% 28%, rgba(196, 181, 253, .9) 0 1.5px, transparent 2.5px),
    linear-gradient(135deg, #7c3aed 0%, #2563eb 45%, #06b6d4 100%) !important;
  color: #fff !important;
  font-weight: 800 !important;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .08),
    0 6px 18px rgba(79, 70, 229, .34) !important;
}

.topbar.yl-header-ready .yl-header-link--ai-search::before{
  content: "AI";
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 0 26px !important;
  width: 26px !important;
  height: 26px !important;
  border-radius: 999px !important;
  border: 1px solid rgba(255, 255, 255, .42) !important;
  background: rgba(255, 255, 255, .14) !important;
  color: #e0f2fe !important;
  font-size: .68rem !important;
  font-weight: 950 !important;
  line-height: 1 !important;
  letter-spacing: .04em !important;
  box-shadow: inset 0 0 12px rgba(255,255,255,.08) !important;
}

.topbar.yl-header-ready .yl-header-menu-btn{
  background: linear-gradient(180deg, #16304d, #0f1f35) !important;
  color: #fff !important;
  cursor: pointer !important;
  font-family: inherit !important;
}

.topbar.yl-header-ready .yl-header-menu-btn__icon{
  flex: 0 0 24px !important;
  width: 24px !important;
  height: 24px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 8px !important;
  background: rgba(255, 255, 255, .08) !important;
  line-height: 1 !important;
}

.topbar.yl-header-ready .main-nav{
  display: none !important;
  width: 100% !important;
  grid-column: 1 / -1 !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 8px !important;
  padding-top: 10px !important;
  margin-top: 2px !important;
}

.topbar.yl-header-ready .main-nav.is-open{
  display: flex !important;
}

.topbar.yl-header-ready .main-nav a{
  display: block !important;
  padding: 12px 14px !important;
  border-radius: 14px !important;
  background: rgba(255, 255, 255, .05) !important;
  border: 1px solid rgba(255, 255, 255, .06) !important;
  color: #eef5ff !important;
  text-decoration: none !important;
}

/*
 * header-menu.js measures the rendered header (including the safe area)
 * and writes the final value into --yl-header-h, so the safe inset must
 * not be added a second time here.
 */
body.yl-header-active{
  padding-top: 0 !important;
}

/* Book author note */
.book-note.author-contact-ready{
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-wrap: wrap !important;
  gap: 10px !important;
  margin-top: 18px !important;
  font-size: 16px !important;
  line-height: 1.9 !important;
  text-align: center !important;
}

.book-note.author-contact-ready::before,
.book-note.author-contact-ready br{
  display: none !important;
  content: none !important;
}

.author-name-button{
  background: linear-gradient(135deg, #173d6e, #2563eb) !important;
  border: 1px solid rgba(37, 99, 235, .35) !important;
  color: #fff !important;
}

/* Mobile header */
@media (max-width: 760px) {
  :root{
    --yl-header-h: 116px;
  }

  .topbar.yl-header-ready{
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    grid-auto-rows: minmax(44px, auto) !important;
    gap: 8px !important;
    padding-top: calc(8px + var(--yl-safe-top)) !important;
    padding-right: calc(8px + var(--yl-safe-right)) !important;
    padding-bottom: 8px !important;
    padding-left: calc(8px + var(--yl-safe-left)) !important;
    min-height: calc(108px + var(--yl-safe-top)) !important;
  }

  .topbar.yl-header-ready .yl-header-link,
  .topbar.yl-header-ready .yl-header-menu-btn{
    min-height: 44px !important;
    padding: 5px 6px !important;
    border-radius: 14px !important;
    font-size: clamp(11px, 2.8vw, 13px) !important;
    line-height: 1.35 !important;
    gap: 6px !important;
  }

  .topbar.yl-header-ready .yl-header-link--ai-search{
    border-radius: 20px !important;
  }

  .topbar.yl-header-ready .yl-header-link--ai-search::before{
    flex-basis: 24px !important;
    width: 24px !important;
    height: 24px !important;
    font-size: .64rem !important;
  }

  .topbar.yl-header-ready .yl-header-menu-btn__icon{
    font-size: 1rem !important;
  }

  body.yl-header-active{
    padding-top: 0 !important;
  }
}

/*
 * iOS 26 can return safe-area-inset-top as 0 for installed Home Screen apps.
 * Keep a hard minimum guard in standalone mode so the first row of controls
 * always starts below the status bar even when WebKit reports a bad inset.
 */
@media (display-mode: standalone) and (max-width: 760px) {
  .topbar.yl-header-ready{
    padding-top: max(48px, calc(8px + var(--yl-safe-top))) !important;
    min-height: max(148px, calc(108px + var(--yl-safe-top))) !important;
  }
}

@media (max-width: 380px) {
  .topbar.yl-header-ready .yl-header-link,
  .topbar.yl-header-ready .yl-header-menu-btn{
    font-size: clamp(10px, 2.6vw, 12px) !important;
    padding-inline: 4px !important;
  }
}

/* Footer links spacing */
.site-footer .yl-trust-footer-links{
  display: block !important;
  text-align: center !important;
  line-height: 2 !important;
  white-space: normal !important;
  word-spacing: normal !important;
}

.site-footer .yl-trust-footer-links a{
  display: inline !important;
  color: inherit !important;
  text-decoration: underline !important;
  text-underline-offset: 3px !important;
  white-space: nowrap !important;
  margin: 0 !important;
  padding: 0 !important;
}

.site-footer .yl-trust-footer-links a + a::before{
  content: " " !important;
  white-space: pre !important;
}

/* CLS stable header geometry v6:start */
/*
 * A single, deterministic header box is reserved from the first paint.
 * Do not use env(safe-area-inset-top) in header geometry: iOS/Safari may
 * resolve it after the first frame and move the whole page.
 */
:root{--yl-safe-top:0px!important}
html{--yl-header-h:0px!important}
body,body.yl-header-active{padding-top:0!important;padding-block-start:0!important;margin-top:0!important;margin-block-start:0!important}
header.topbar,header.topbar.yl-header-ready,.topbar.yl-header-ready{
  box-sizing:border-box!important;
  position:sticky!important;
  top:0!important;
  right:auto!important;
  left:auto!important;
  inset-inline:auto!important;
  width:100%!important;
  height:62px!important;
  min-height:62px!important;
  max-height:62px!important;
  display:grid!important;
  grid-template-columns:repeat(6,minmax(0,1fr))!important;
  grid-auto-rows:46px!important;
  align-items:stretch!important;
  align-content:start!important;
  gap:10px!important;
  padding:8px 12px!important;
  margin:0!important;
  overflow:visible!important;
  font-synthesis:none!important;
  transform:none!important;
  translate:none!important;
  transition:none!important;
  animation:none!important;
}
header.topbar>.yl-header-shortcuts,.topbar.yl-header-ready>.yl-header-shortcuts{display:contents!important}
header.topbar .yl-header-link,header.topbar .yl-header-menu-btn,header.topbar .nav-toggle{
  box-sizing:border-box!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:100%!important;
  height:46px!important;
  min-height:46px!important;
  max-height:46px!important;
  padding:0 10px!important;
  margin:0!important;
  line-height:1.35!important;
  overflow:hidden!important;
  font-synthesis:none!important;
  transform:none!important;
  translate:none!important;
  transition:none!important;
  animation:none!important;
}
header.topbar .yl-header-link>span{display:inline-flex!important;align-items:center!important;justify-content:center!important;max-height:40px!important;overflow:hidden!important;line-height:1.35!important}
header.topbar>.main-nav{min-height:0!important;transition:none!important;animation:none!important}
nav.breadcrumb,nav[class*="breadcrumb"]{box-sizing:border-box;min-block-size:48px;font-synthesis:none;transition:none!important;animation:none!important}
nav.breadcrumb>a,nav.breadcrumb>span,nav[class*="breadcrumb"]>a,nav[class*="breadcrumb"]>span{box-sizing:border-box;display:inline-flex;align-items:center;min-block-size:32px;line-height:1.5;transition:none!important;animation:none!important}
#copyToast,.copy-toast{position:fixed!important;z-index:2147483000;top:auto!important;right:auto!important;bottom:20px!important;left:50%!important;box-sizing:border-box;inline-size:min(92vw,220px)!important;block-size:44px!important;min-block-size:44px!important;padding:0 16px!important;margin:0!important;line-height:44px!important;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-synthesis:none;transform:translateX(-50%)!important;translate:none!important;scale:none!important;rotate:none!important;contain:layout paint;will-change:opacity;pointer-events:none;animation:none!important;transition:opacity .15s ease,visibility .15s linear!important}
@media(max-width:760px){
  header.topbar,header.topbar.yl-header-ready,.topbar.yl-header-ready{
    height:116px!important;
    min-height:116px!important;
    max-height:116px!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    grid-auto-rows:46px!important;
    gap:8px!important;
    padding:8px!important;
  }
  header.topbar .yl-header-link,header.topbar .yl-header-menu-btn,header.topbar .nav-toggle{
    height:46px!important;
    min-height:46px!important;
    max-height:46px!important;
    padding:4px 6px!important;
    line-height:1.35!important;
  }
  nav.breadcrumb,nav[class*="breadcrumb"]{min-block-size:52px}
}
@media(display-mode:standalone) and (max-width:760px){
  header.topbar,header.topbar.yl-header-ready,.topbar.yl-header-ready{
    height:156px!important;
    min-height:156px!important;
    max-height:156px!important;
    padding-top:48px!important;
    padding-right:8px!important;
    padding-bottom:8px!important;
    padding-left:8px!important;
  }
}
/* CLS stable header geometry v6:end */

/* Mobile header pre-compact restore v1:start */
@media (max-width: 760px) {
  html body header.topbar,
  html body header.topbar.yl-header-ready,
  html body .topbar.yl-header-ready {
    box-sizing: border-box !important;
    height: 116px !important;
    min-height: 116px !important;
    max-height: 116px !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    grid-auto-rows: 46px !important;
    gap: 8px !important;
    padding: 8px !important;
  }

  html body header.topbar .yl-header-link,
  html body header.topbar .yl-header-menu-btn,
  html body header.topbar .nav-toggle {
    height: 46px !important;
    min-height: 46px !important;
    max-height: 46px !important;
    padding: 4px 6px !important;
    font-size: clamp(11px, 2.8vw, 13px) !important;
    line-height: 1.35 !important;
  }
}

@media (display-mode: standalone) and (max-width: 760px) {
  html body header.topbar,
  html body header.topbar.yl-header-ready,
  html body .topbar.yl-header-ready {
    height: 156px !important;
    min-height: 156px !important;
    max-height: 156px !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    grid-auto-rows: 46px !important;
    padding: 48px 8px 8px !important;
  }
}
/* Mobile header pre-compact restore v1:end */
.site-footer .yl-trust-footer-links{display:flex!important;flex-wrap:wrap!important;justify-content:center!important;align-items:center!important;gap:8px 14px!important;max-width:100%!important;box-sizing:border-box!important;padding-inline:12px!important}.site-footer .yl-trust-footer-links a{display:inline-flex!important;white-space:nowrap!important;max-width:100%!important}.site-footer .yl-trust-footer-links a+a::before{content:none!important;display:none!important}
/* ===== Unified Library-Style Law Article Search UI ===== */
#ylLawArticleSearch {
  margin: 0 0 20px;
}
.yl-law-article-panel,
.library-section-search-panel {
  background: #ffffff;
  border: 1px solid rgba(11, 34, 90, 0.16);
  border-radius: 18px;
  padding: 16px 18px;
  box-shadow: 0 10px 26px rgba(6, 18, 37, 0.07);
}
#ylLawArticleSearchForm {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 10px;
}
#ylLawArticleSearchInput {
  flex: 1 1 auto;
  min-width: 0;
  height: 48px;
  padding: 0 14px;
  border: 1.5px solid rgba(11, 34, 90, 0.22);
  border-radius: 12px;
  background: #f8fafc;
  color: #0f172a;
  font-size: 1rem;
  font-weight: 600;
  transition: border-color 0.15s ease, background 0.15s ease;
}
#ylLawArticleSearchInput:focus {
  outline: none;
  border-color: #0b6fd8;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(11, 111, 216, 0.15);
}
#ylLawArticleSearchForm button,
.library-section-search-button {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 20px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, #061225, #0b225a);
  color: #f3c969;
  font-size: 0.96rem;
  font-weight: 800;
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.15s ease;
}
#ylLawArticleSearchForm button:hover,
.library-section-search-button:hover {
  filter: brightness(1.12);
  transform: translateY(-1px);
}
#ylLawArticleSearchStatus {
  margin: 10px 2px 0;
  font-size: 0.92rem;
  font-weight: 800;
  color: #0b225a;
}
#ylLawArticleSearchStatus:empty {
  display: none;
}
#ylLawArticleSearchResults {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 12px;
}
#ylLawArticleSearchResults:empty {
  display: none;
}
.yl-law-article-result,
.ai-result {
  background: #fcfaf4;
  border: 1px solid #e2d8c3;
  border-right: 4px solid #d4a63a;
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: 0 4px 14px rgba(6, 18, 37, 0.05);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.yl-law-article-result:hover,
.ai-result:hover {
  border-color: #0b225a;
  box-shadow: 0 8px 20px rgba(6, 18, 37, 0.09);
}
.yl-law-article-title,
.ai-result-title-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  padding: 4px 12px;
  border-radius: 8px;
  background: #0b225a;
  color: #f3c969;
  font-size: 0.92rem;
  font-weight: 800;
  text-decoration: none;
}
.yl-law-article-result p,
.ai-excerpt {
  margin: 0 0 10px;
  color: #111827;
  font-size: 0.96rem;
  line-height: 1.85;
  overflow-wrap: anywhere;
}
.yl-law-article-jump,
.ai-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 6px 14px;
  border: 1px solid rgba(11, 34, 90, 0.18);
  border-radius: 10px;
  background: #ffffff;
  color: #0b225a;
  font-size: 0.88rem;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}
.yl-law-article-jump:hover,
.ai-action:hover {
  background: #0b225a;
  color: #ffffff;
}
.yl-law-article-empty,
.ai-empty {
  padding: 14px 16px;
  border-radius: 12px;
  background: #fffbeb;
  border: 1px solid #f59e0b;
  color: #78350f;
  font-weight: 700;
  text-align: center;
}
.yl-law-article-block {
  padding: 14px 16px;
  margin: 0 0 12px;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid #e2d8c3;
  border-right: 4px solid #0b225a;
  line-height: 1.95;
  overflow-wrap: anywhere;
}
.yl-law-preamble {
  padding: 14px 16px;
  margin: 0 0 14px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid rgba(11, 34, 90, 0.14);
  line-height: 1.9;
}
.ai-score {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: #eef4ff;
  color: #0b225a;
  font-size: 0.78rem;
  font-weight: 800;
}

@media (max-width: 640px) {
  .yl-law-article-panel {
    padding: 12px;
    border-radius: 14px;
  }
  #ylLawArticleSearchForm {
    gap: 8px;
  }
  #ylLawArticleSearchInput {
    height: 44px;
    font-size: 0.95rem;
    padding: 0 10px;
  }
  #ylLawArticleSearchForm button {
    height: 44px;
    padding: 0 14px;
    font-size: 0.9rem;
  }
  .yl-law-article-result,
  .yl-law-article-block {
    padding: 12px;
  }
}
