:root {
  --navy: #0f1f3a;
  --navy-2: #17294a;
  --navy-3: #22385f;
  --gold: #c9a45c;
  --gold-2: #e8d3a3;
  --gold-ink: #8a6a2c;
  --ink: #18202e;
  --paper: #f7f5f0;
  --card: #ffffff;
  --line: #e6e0d4;
  --muted: #5d6472;
  --olive: #2f4a3c;
  --danger: #9b2c2c;
  --brass: var(--gold-ink);
  --brass-2: var(--gold);
  --mulberry: #7a5520;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(15, 31, 58, .05), 0 12px 32px rgba(15, 31, 58, .07);
  --shadow-lg: 0 24px 60px rgba(15, 31, 58, .16);
  --max: 1200px;
  --font: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
  --font-head: "Noto Naskh Arabic", "IBM Plex Sans Arabic", serif;
}
html[lang="en"] { --font: "IBM Plex Sans Arabic", "Segoe UI", system-ui, sans-serif; --font-head: Literata, Georgia, serif; }
* { box-sizing: border-box; }
html { overflow-x: hidden; scroll-behavior: smooth; }
body {
  margin: 0; color: var(--ink); background: var(--paper);
  font-family: var(--font); font-size: 1.02rem; line-height: 1.8; min-height: 100vh;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
body.nav-open { overflow: hidden; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.35; font-weight: 700; margin: 0 0 .6rem; color: var(--navy); }
h1 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
h2 { font-size: clamp(1.35rem, 2.4vw, 1.85rem); }
h3 { font-size: 1.18rem; }
p { margin: 0 0 .8rem; }
a { color: var(--mulberry); text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { color: var(--navy); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 6px; }
img, svg, video { max-width: 100%; height: auto; }
code, .copyline { overflow-wrap: anywhere; }
.skip { position: absolute; inset-inline-start: .5rem; top: -4rem; background: var(--navy); color: #fff; padding: .4rem .7rem; z-index: 100; }
.skip:focus { top: .5rem; }
.wrap, main { width: min(var(--max), calc(100% - 2.5rem)); margin-inline: auto; }

/* Top bar + header */
.topbar { background: var(--navy); color: #c8d0de; font-size: .86rem; }
.topbar-in { display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: 38px; }
.topbar-place { display: inline-flex; align-items: center; gap: .4rem; }
.topbar-place svg { color: var(--gold); }
.topbar-links { display: flex; align-items: center; gap: 1.1rem; }
.topbar a { color: #e6eaf1; text-decoration: none; }
.topbar a:hover { color: var(--gold-2); }
.lang { display: flex; gap: .2rem; background: rgba(255,255,255,.06); border-radius: 999px; padding: .15rem; }
.lang a { padding: .05rem .65rem; border-radius: 999px; line-height: 1.7; }
.lang a[aria-current="true"] { background: var(--gold); color: var(--navy); font-weight: 600; }
.site-header {
  position: sticky; top: 0; z-index: 50; background: #fff;
  border-bottom: 1px solid var(--line); box-shadow: 0 2px 12px rgba(15,31,58,.04);
}
.bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 76px; }
.brand { display: flex; gap: .7rem; align-items: center; color: var(--navy); text-decoration: none; min-width: 0; flex: 0 1 auto; }
.brand-text { font-family: var(--font-head); font-weight: 700; font-size: 1.02rem; line-height: 1.35; max-width: 17rem; }
.mark { flex: 0 0 auto; display: grid; }
.header-tools { display: flex; align-items: center; gap: .6rem; flex: 0 0 auto; }
.site-nav { display: flex; align-items: center; gap: .15rem; }
.site-nav > a {
  color: var(--navy); text-decoration: none; padding: .4rem .6rem; border-radius: 10px;
  font-weight: 500; font-size: .95rem; white-space: nowrap; position: relative;
}
.site-nav > a:hover { background: #f3efe6; color: var(--navy); }
.site-nav > a[aria-current="page"] { color: var(--gold-ink); }
.site-nav > a[aria-current="page"]::after {
  content: ""; position: absolute; inset-inline: .6rem; bottom: .1rem; height: 2px; background: var(--gold); border-radius: 2px;
}
.nav-extra { display: none; }
.nav-toggle {
  display: none; align-items: center; gap: .5rem; min-height: 44px; border: 1px solid var(--line); background: #fff;
  color: var(--navy); border-radius: 12px; padding: .3rem .8rem; font: inherit; font-weight: 600; cursor: pointer;
}
.burger { display: grid; gap: 4px; width: 20px; }
.burger i { display: block; height: 2px; background: currentColor; border-radius: 2px; transition: transform .2s, opacity .2s; }
.nav-toggle[aria-expanded="true"] .burger i:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .burger i:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .burger i:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Buttons */
.btn, button.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 46px;
  padding: .5rem 1.25rem; border-radius: 12px; background: var(--navy); color: #fff;
  text-decoration: none; border: 1px solid var(--navy); font: inherit; font-weight: 600; cursor: pointer;
  transition: background .15s, color .15s, border-color .15s, transform .15s, box-shadow .15s;
}
.btn:hover { background: var(--navy-3); border-color: var(--navy-3); color: #fff; transform: translateY(-1px); }
.btn.ghost { background: transparent; color: var(--navy); border-color: #cfc6b4; }
.btn.ghost:hover { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn.gold { background: var(--gold); border-color: var(--gold); color: var(--navy); }
.btn.gold:hover { background: #d8b673; border-color: #d8b673; color: var(--navy); box-shadow: 0 8px 22px rgba(201,164,92,.35); }
.btn.outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.45); }
.btn.outline-light:hover { background: #fff; color: var(--navy); border-color: #fff; }

/* Main */
main { padding: 1.6rem 0 3.5rem; }
body.is-home main { padding-top: 0; }
.bleed { margin-inline: calc(50% - 50vw); }
.block { margin: 3.2rem 0; }
.page-head {
  margin: .6rem 0 1.4rem; padding: 1.6rem 1.6rem 1.3rem; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); border-top: 4px solid var(--gold);
}
.page-head h1 { margin-bottom: .4rem; }
.page-head > p:last-child, .page-head .prose p:last-child { margin-bottom: 0; }
.eyebrow { color: var(--gold-ink); font-weight: 600; font-size: .9rem; margin-bottom: .35rem; }
.eyebrow a { color: inherit; }
.lead { font-size: 1.1rem; max-width: 44rem; }
.muted, .empty, small { color: var(--muted); }
.text-link { color: var(--mulberry); font-weight: 600; }
html[dir="ltr"] .arrow { display: inline-block; transform: scaleX(-1); }

/* Hero */
.hero {
  position: relative; color: #e8ecf3; overflow: hidden;
  background:
    radial-gradient(900px 420px at 85% -10%, rgba(201,164,92,.22), transparent 60%),
    radial-gradient(700px 400px at 0% 110%, rgba(34,56,95,.9), transparent 60%),
    linear-gradient(160deg, #0b1830 0%, var(--navy) 55%, #142a4d 100%);
}
.hero::before {
  content: ""; position: absolute; inset: 0; opacity: .07; pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'><path d='M40 6 L45 35 L74 40 L45 45 L40 74 L35 45 L6 40 L35 35 Z' fill='none' stroke='%23e8d3a3'/></svg>");
}
.hero-in {
  position: relative; width: min(var(--max), calc(100% - 2.5rem)); margin-inline: auto;
  display: grid; gap: 2rem; padding: 4.2rem 0 4.6rem; align-items: center;
}
.hero h1 { color: #fff; font-size: clamp(2rem, 4.6vw, 3.3rem); line-height: 1.3; margin-bottom: 1rem; }
.hero .lead { color: #c9d1de; font-size: 1.12rem; }
.hero .actions { margin-top: 1.6rem; }
.hero-badge, .panel-badge {
  display: inline-flex; align-items: center; gap: .5rem; color: var(--gold-2); font-weight: 600; font-size: .9rem;
  border: 1px solid rgba(201,164,92,.4); background: rgba(201,164,92,.08); border-radius: 999px; padding: .2rem .9rem; margin-bottom: 1.1rem;
}
.hero-panel {
  background: rgba(255,255,255,.06); border: 1px solid rgba(232,211,163,.25); border-radius: 20px;
  padding: 1.7rem; box-shadow: var(--shadow-lg); backdrop-filter: blur(4px); transition: transform .2s, border-color .2s;
}
.hero-panel:hover { transform: translateY(-3px); border-color: rgba(232,211,163,.55); }
.hero-panel a { color: inherit; text-decoration: none; display: block; }
.hero-panel h2 { color: #fff; font-size: 1.45rem; }
.hero-panel p { color: #c9d1de; }
.hero-panel .text-link { color: var(--gold); }

/* Stats */
.stats {
  position: relative; z-index: 2; margin-top: -2.2rem; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); overflow: hidden;
}
.stats div { padding: 1.1rem 1.2rem; display: grid; gap: .1rem; border-inline-end: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stats strong { font-family: Literata, var(--font-head); font-size: 1.6rem; color: var(--navy); line-height: 1.2; }
.stats span { color: var(--muted); font-size: .92rem; }

/* Section heads */
.section-head { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-end; margin-bottom: 1.3rem; }
.section-head h2 { position: relative; padding-bottom: .55rem; margin-bottom: .5rem; }
.section-head h2::after { content: ""; position: absolute; inset-inline-start: 0; bottom: 0; width: 56px; height: 3px; background: var(--gold); border-radius: 3px; }
.section-head p { margin: 0; max-width: 46rem; }
.see-all { font-weight: 600; white-space: nowrap; }

/* Cards */
.service, .person, .record, .hit, .chapter, .source, .note, .stack, .profile, .empty-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.services { display: grid; gap: 1rem; }
.service { position: relative; padding: 1.5rem 1.4rem 1.3rem; transition: transform .2s, box-shadow .2s, border-color .2s; }
.service:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: #dccaa2; }
.service::before { content: ""; position: absolute; inset-inline: 0; top: 0; height: 3px; background: linear-gradient(90deg, var(--gold), transparent); border-radius: 16px 16px 0 0; opacity: 0; transition: opacity .2s; }
.service:hover::before { opacity: 1; }
.service-icon { width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center; background: var(--navy); color: var(--gold); margin-bottom: 1rem; }
.service p { color: var(--muted); margin: 0; }
.num { position: absolute; top: 1.2rem; inset-inline-end: 1.3rem; color: #d9cfbb; font-family: Literata, serif; font-weight: 700; font-size: 1.3rem; }

/* Arbitration band */
.arb-band { background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%); color: #d6dce6; margin-top: 3.4rem; margin-bottom: 3.4rem; }
.arb-in { width: min(var(--max), calc(100% - 2.5rem)); margin-inline: auto; padding: 3.4rem 0; display: grid; gap: 2rem; align-items: center; }
.arb-band h2 { color: #fff; }
.arb-steps li { background: rgba(255,255,255,.05) !important; border-color: rgba(232,211,163,.2) !important; color: #e3e8ef; }
.arb-steps span { background: var(--gold) !important; color: var(--navy) !important; }

/* People */
.people { display: grid; gap: 1rem; }
.person { padding: .3rem; transition: transform .2s, box-shadow .2s; }
.person:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.person-link, .hit a, .index-list a { display: flex; gap: .9rem; color: inherit; text-decoration: none; align-items: center; }
.person-link { padding: .8rem; }
.person-link img { width: 72px; height: 72px; border-radius: 14px; object-fit: cover; }
.person h3 { margin-bottom: .3rem; }
.avatar, .portrait { width: 72px; height: 72px; border-radius: 14px; object-fit: cover; background: var(--navy); color: var(--gold); display: grid; place-items: center; font-family: var(--font-head); font-size: 1.5rem; flex: 0 0 auto; }
.avatar.xl, .profile .portrait { width: 140px; height: 140px; border-radius: 20px; font-size: 2.6rem; }
.people > .empty { grid-column: 1 / -1; padding: 1.4rem 1.6rem; background: #fffdf8; border: 1px dashed #d8ccb2; border-radius: var(--radius); color: var(--navy); font-weight: 500; }
.empty-card { grid-column: 1 / -1; padding: 1.6rem; border-style: dashed; border-color: #d8ccb2; background: #fffdf8; box-shadow: none; }
.empty-card .empty { font-weight: 600; color: var(--navy); }
.tags { display: flex; flex-wrap: wrap; gap: .35rem; }
.tags span { border: 1px solid var(--line); background: #f8f6f1; border-radius: 999px; padding: .05rem .6rem; font-size: .84rem; color: var(--navy-3); }
.tag-arb { background: #f6ecd6 !important; border-color: #e3cf9f !important; color: var(--gold-ink) !important; }

/* Steps */
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: .8rem; counter-reset: s; }
.steps li { display: flex; gap: .9rem; align-items: flex-start; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 1rem 1.1rem; }
.steps li p { margin: 0; }
.steps span { width: 2.2rem; height: 2.2rem; border-radius: 50%; display: grid; place-items: center; background: var(--navy); color: var(--gold-2); font-weight: 700; flex: 0 0 auto; }

/* Guides */
.cta-row { display: grid; gap: 1rem; }
.cta-row > div { padding: 1.6rem; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); border-inline-start: 4px solid var(--gold); }
.cta-row p { color: var(--muted); }
.guide-count { display: inline-block; color: var(--gold-ink) !important; font-weight: 700; background: #f6ecd6; border-radius: 999px; padding: 0 .7rem; font-size: .88rem; margin-bottom: .6rem; }
.guide-search { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.2rem; box-shadow: var(--shadow); }

/* CTA band */
.cta-band {
  display: grid; gap: 1.2rem; align-items: center; margin: 3.4rem 0 1rem; padding: 2.2rem; border-radius: 22px; color: #d6dce6;
  background: radial-gradient(600px 200px at 100% 0, rgba(201,164,92,.25), transparent 60%), linear-gradient(135deg, var(--navy), var(--navy-3));
}
.cta-band h2 { color: #fff; }
.cta-band p { margin: 0; }
.cta-band .actions { margin: 0; }

/* Forms */
.actions, .filters, .search-form { display: flex; flex-wrap: wrap; gap: .7rem; align-items: end; margin: 1rem 0; }
.filters, .search-form:not(.guide-search) { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.2rem; }
.field { display: flex; flex-direction: column; gap: .3rem; min-width: 0; flex: 1 1 12rem; }
.field.grow { flex: 2 1 16rem; }
.field span, legend { font-weight: 600; color: var(--navy); font-size: .95rem; }
input, textarea, select {
  width: 100%; max-width: 100%; font: inherit; color: inherit; background: #fff;
  border: 1px solid #d6cfc0; border-radius: 12px; padding: .65rem .8rem; min-height: 46px; transition: border-color .15s, box-shadow .15s;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,164,92,.25); }
textarea { min-height: 8rem; resize: vertical; }
.stack { display: grid; gap: .9rem; padding: 1.4rem; }
.stack.narrow { max-width: 36rem; }
fieldset { border: 1px solid var(--line); border-radius: 14px; margin: 0; padding: .9rem; min-width: 0; }
.choice { display: flex; gap: .5rem; align-items: center; margin: .25rem 0; }
.choice input { width: auto; min-height: 0; accent-color: var(--navy); }
.hp { position: absolute; inset-inline-start: -10000px; height: 0; width: 0; overflow: hidden; }
.flash, .sample { background: #f6ecd6; border: 1px solid var(--gold); padding: .8rem 1rem; border-radius: 12px; }
.error { color: var(--danger); font-weight: 600; }

/* Guides pages */
.disclaimer { background: #fbf6ea; color: #5b4720; border: 1px solid #ead9b1; border-inline-start: 4px solid var(--gold); padding: .9rem 1.1rem; border-radius: 12px; margin-bottom: 1rem; }
.disclaimer-en { display: block; color: #7a6334; font-size: .95rem; }
.index-list { list-style: none; padding: 0; display: grid; gap: .6rem; }
.index-list a, .hit { padding: .95rem 1.15rem; background: var(--card); border: 1px solid var(--line); border-radius: 14px; transition: border-color .15s, box-shadow .15s; }
.index-list a:hover { border-color: var(--gold); box-shadow: var(--shadow); }
.index-list a { justify-content: space-between; }
.index-list strong { color: var(--navy); }
.index-list span, .hit p { color: var(--muted); }
.chapter { padding: 1.2rem; margin-bottom: .9rem; }
.article-index { display: flex; flex-wrap: wrap; gap: .4rem; }
.article-index a { border: 1px solid var(--line); border-radius: 10px; padding: .25rem .65rem; text-decoration: none; color: var(--navy); background: #faf8f3; min-width: 2.6rem; text-align: center; }
.article-index a:hover { background: var(--navy); color: #fff; border-color: var(--navy); }
.prose p, .statute p { margin-bottom: .8rem; }
.statute { font-family: "Noto Naskh Arabic", serif; font-size: 1.18rem; line-height: 2.05; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem 1.5rem; }
.note, .source { padding: 1.1rem 1.2rem; margin-top: 1rem; }
.source { background: #fbfaf6; }
.source h2 { font-size: 1.1rem; }
.pager { display: flex; justify-content: space-between; gap: .8rem; margin: 1rem 0; }
.facts { display: grid; gap: .6rem; margin: 1rem 0; }
.facts div { display: grid; gap: .15rem; background: #f8f6f1; border-radius: 12px; padding: .6rem .8rem; }
.facts dt { color: var(--muted); font-size: .9rem; }
.facts dd { margin: 0; font-weight: 600; color: var(--navy); }
.profile { display: grid; gap: 1.4rem; padding: 1.6rem; }
.thread { display: grid; gap: .7rem; margin: 1rem 0; }
.bubble { padding: .85rem 1.05rem; border-radius: 16px; background: #fff; border: 1px solid var(--line); max-width: 100%; }
.bubble.staff { background: #eef2f8; border-color: #d5deeb; }
.bubble.bot { background: #f4f7fb; border-color: #d5deeb; border-inline-start: 3px solid var(--gold); }
.bubble header { display: flex; justify-content: space-between; gap: .5rem; color: var(--muted); font-size: .85rem; }
.file-list { list-style: none; margin: .55rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.file-chip {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .35rem .7rem; border-radius: 999px;
  border: 1px solid #d5deeb; background: #f7f9fc;
  color: var(--ink); text-decoration: none; font-size: .88rem;
}
.file-chip:hover { border-color: var(--gold); background: #fffaf0; }
.clause { margin: 0 0 .8rem; padding: 1rem 1.2rem; border-inline-start: 4px solid var(--gold); background: #fff; border-radius: 0 12px 12px 0; }
html[dir="rtl"] .clause { border-radius: 12px 0 0 12px; }
.table-wrap { overflow-x: auto; max-width: 100%; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
table.fees { width: 100%; border-collapse: collapse; }
table.fees th, table.fees td { text-align: start; padding: .8rem 1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
table.fees tr:last-child th, table.fees tr:last-child td { border-bottom: 0; }
table.fees th { color: var(--navy); }
.record { padding: 1.1rem; margin-bottom: .8rem; }
.plain { list-style: none; padding: 0; }
.plain li, .admin-nav-links { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; justify-content: space-between; }
.admin-nav { display: flex; flex-direction: column; align-items: stretch; gap: .75rem; margin: .5rem 0 1rem; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: .85rem 1rem; }
.admin-nav-links {
  justify-content: flex-start;
  gap: .45rem .5rem;
  padding-top: .15rem;
  border-top: 1px solid var(--line);
}
.admin-nav-links a,
.admin-nav.portal-nav > a {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  min-height: 2.35rem;
  padding: .35rem .85rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8f6f1;
  color: var(--navy);
  text-decoration: none;
  font-size: .92rem;
  font-weight: 600;
  line-height: 1.35;
  white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
}
.admin-nav-links a:hover,
.admin-nav.portal-nav > a:hover {
  background: #fff;
  border-color: var(--gold);
  color: var(--navy);
  box-shadow: 0 1px 0 rgba(15, 31, 58, .04);
}
.admin-nav-links a[aria-current="page"],
.admin-nav.portal-nav > a[aria-current="page"] {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}
.admin-nav-links a[aria-current="page"]:hover,
.admin-nav.portal-nav > a[aria-current="page"]:hover {
  background: var(--navy-3);
  border-color: var(--navy-3);
  color: #fff;
}
.admin-nav-links form {
  margin-inline-start: auto;
  display: inline-flex;
}
.admin-nav-links .btn,
.admin-nav.portal-nav .btn {
  min-height: 2.35rem;
  padding: .35rem .95rem;
  font-size: .92rem;
}
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.admin-search { position: relative; display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; width: 100%; max-width: 44rem; }
.admin-search input[type="search"] { flex: 1 1 16rem; min-width: 0; margin: 0; }
.admin-search-results { position: absolute; inset-inline-start: 0; inset-inline-end: 0; top: calc(100% + 4px); z-index: 40; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 28px rgba(15,31,58,.14); max-height: min(22rem, 70vh); overflow: auto; padding: .3rem; }
.admin-search-results[hidden] { display: none; }
.admin-search-option { display: block; width: 100%; text-align: start; border: 0; background: transparent; border-radius: 8px; padding: .55rem .7rem; color: var(--navy); cursor: pointer; text-decoration: none; }
.admin-search-option:hover, .admin-search-option.is-active { background: #eef2f8; }
.admin-search-option strong { display: block; font-weight: 650; }
.admin-search-option span { display: block; color: var(--muted); font-size: .85rem; margin-top: .1rem; }
.admin-search-empty { margin: 0; padding: .7rem; color: var(--muted); }
.setting-key { font-weight: 500; color: var(--muted); font-size: .85em; margin-inline-start: .35rem; }
.setting-block:target, .record:target, section:target, .search-hit { outline: 2px solid var(--gold); outline-offset: 3px; background: #fff8e8; box-shadow: 0 0 0 6px rgba(201,164,92,.2); scroll-margin-top: 1rem; }
@keyframes search-pulse { from { box-shadow: 0 0 0 8px rgba(201,164,92,.35); } to { box-shadow: 0 0 0 0 rgba(201,164,92,0); } }
.setting-block:target, .record:target, section:target, .search-hit { animation: search-pulse 1.4s ease 1; }

/* Footer */
.site-footer { background: var(--navy); color: #b7c0cf; margin-top: 2rem; border-top: 3px solid var(--gold); }
.footer-grid { display: grid; gap: 1.8rem; padding: 3rem 0 2rem; }
.site-footer h2 { color: var(--gold-2); font-family: var(--font); font-size: .95rem; font-weight: 700; margin-bottom: .8rem; }
.footer-brand strong { display: block; color: #fff; font-family: var(--font-head); font-size: 1.15rem; margin-bottom: .5rem; }
.footer-brand p { max-width: 26rem; font-size: .93rem; }
.footer-grid nav, .footer-contact { display: flex; flex-direction: column; gap: .45rem; }
.site-footer a { color: #dfe4ec; text-decoration: none; }
.site-footer a:hover { color: var(--gold-2); }
.site-footer .btn.gold { color: var(--navy); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 1rem 0 1.4rem; font-size: .85rem; color: #8e99ab; }

/* Responsive */
@media (min-width: 640px) {
  .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .stats div { border-bottom: 0; }
  .stats div:last-child { border-inline-end: 0; }
}
@media (min-width: 800px) {
  .services { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .people { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cta-row { grid-template-columns: 1fr 1fr; }
  .profile { grid-template-columns: auto 1fr; }
  .hero-in { grid-template-columns: 1.35fr .9fr; gap: 3rem; }
  .arb-in { grid-template-columns: 1fr 1fr; gap: 3rem; }
  .facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1fr; }
  .cta-band { grid-template-columns: 1.5fr auto; padding: 2.6rem 3rem; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .arb-steps { grid-template-columns: 1fr; }
}
@media (min-width: 1000px) {
  .services { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .people { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1179px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    display: none; position: fixed; inset-inline: 0; top: var(--nav-top, 114px); bottom: 0; z-index: 60;
    flex-direction: column; align-items: stretch; gap: .1rem; padding: 1rem 1.25rem 2rem; background: #fff; overflow-y: auto;
    border-top: 1px solid var(--line); box-shadow: var(--shadow-lg);
  }
  .site-nav.open { display: flex; }
  .site-nav > a { font-size: 1.05rem; padding: .8rem .6rem; border-bottom: 1px solid #f0ebe1; border-radius: 0; }
  .site-nav > a[aria-current="page"]::after { display: none; }
  .site-nav > a[aria-current="page"] { background: #faf5ea; border-inline-start: 3px solid var(--gold); }
  .nav-extra { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem; margin-top: 1.2rem; }
  .nav-extra .btn { flex: 1 1 auto; }
  .nav-lang { font-weight: 600; color: var(--navy); padding: .6rem .9rem; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; }
}
@media (max-width: 640px) {
  .wrap, main { width: calc(100% - 2rem); }
  .topbar-links > a { display: none; }
  .bar { min-height: 66px; }
  .brand-text { font-size: .9rem; max-width: 11.5rem; }
  .mark svg { width: 34px; height: 34px; }
  .header-cta { display: none; }
  .nav-toggle-text { display: none; }
  .nav-toggle { padding: .3rem .7rem; }
  .hero-in { padding: 2.6rem 0 3.6rem; width: calc(100% - 2rem); }
  .hero .actions .btn, .cta-band .actions .btn { flex: 1 1 auto; }
  .hero-panel { padding: 1.3rem; }
  .stats strong { font-size: 1.35rem; }
  .stats div { padding: .9rem 1rem; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .page-head { padding: 1.2rem 1.1rem 1rem; }
  .cta-band { padding: 1.6rem 1.3rem; }
  .arb-in { width: calc(100% - 2rem); padding: 2.6rem 0; }
  .block { margin: 2.4rem 0; }
}
@media (max-width: 700px) {
  table.fees, table.fees tbody, table.fees tr, table.fees th, table.fees td { display: block; width: 100%; }
  table.fees th { border-bottom: 0; padding-bottom: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}

/* Hero quick links */
.quick { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.quick a {
  display: flex; align-items: center; gap: .8rem; padding: .7rem .85rem; border-radius: 12px; color: #fff; text-decoration: none;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); font-weight: 500; transition: background .15s, border-color .15s;
}
.quick a:hover { background: rgba(201,164,92,.14); border-color: rgba(232,211,163,.45); color: #fff; }
.quick .q-icon { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: rgba(201,164,92,.16); color: var(--gold); flex: 0 0 auto; }
.quick .arrow { margin-inline-start: auto; color: var(--gold); }
.hero-panel:hover { transform: none; }
@media (min-width: 1000px) {
  .services { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .services .service { grid-column: span 2; }
  .services .service:nth-child(4):nth-last-child(2), .services .service:nth-child(5):nth-last-child(1) { grid-column: span 3; }
}
@media (max-width: 640px) {
  .hero h1 { font-size: 1.85rem; }
}

/* Fee calculator */
.calc { margin: 2.2rem 0; scroll-margin-top: 110px; }
.calc-head h2 { position: relative; padding-bottom: .55rem; }
.calc-head h2::after { content: ""; position: absolute; inset-inline-start: 0; bottom: 0; width: 56px; height: 3px; background: var(--gold); border-radius: 3px; }
.calc-box { background: var(--card); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); overflow: hidden; }
.calc-form { display: flex; flex-wrap: wrap; gap: .9rem; align-items: end; padding: 1.4rem; }
.calc-form input[readonly] { background: #f6f3ec; color: var(--muted); }
.calc-form .btn { min-height: 46px; }
.calc-note { margin: 0 1.4rem 1rem; padding: .8rem 1rem; background: #fbf6ea; border: 1px solid #ead9b1; border-inline-start: 4px solid var(--gold); border-radius: 12px; color: #5b4720; font-size: .95rem; }
.calc-error { margin: 0 1.4rem 1rem; }
.calc-result { margin: 0; background: var(--navy); color: #d6dce6; padding: .6rem 1.4rem; }
.calc-row { display: flex; justify-content: space-between; gap: 1rem; padding: .85rem 0; border-bottom: 1px solid rgba(255,255,255,.1); align-items: baseline; }
.calc-row dt { color: #c3ccdb; }
.calc-row dd { margin: 0; font-weight: 600; color: #fff; text-align: end; }
.calc-total { border-bottom: 0; padding-top: 1rem; }
.calc-total dt { color: var(--gold-2); font-weight: 700; }
.calc-total dd { color: var(--gold); font-size: 1.25rem; font-family: Literata, var(--font-head); }
.calc-disclaimer { margin: 0; padding: 1rem 1.4rem; background: #fbf6ea; color: #5b4720; font-size: .92rem; border-top: 3px solid var(--gold); }
@media (max-width: 640px) {
  .calc-form { padding: 1.1rem; }
  .calc-form .btn { width: 100%; }
  .calc-row { flex-direction: column; align-items: flex-start; gap: .15rem; }
  .calc-row dd { text-align: start; }
  .calc-result { padding: .4rem 1.1rem; }
}
body:not(.is-home) main > section + section { margin-top: 2.2rem; }

.calc-rate { margin: 0; padding: 0 1.4rem 1rem; font-size: .9rem; }
.calc-row dd { overflow-wrap: anywhere; }
.calc-row dd .usd { display: block; }
.calc-row dd .syp { display: block; font-weight: 500; font-size: .88rem; color: #aab5c8; }
.calc-total dd .syp { color: var(--gold-2); font-family: var(--font); }
.calc-total dd .usd { unicode-bidi: isolate; }

/* ===== Center services (process, clauses, panel, documents, legislation, FAQ) ===== */
.svc-nav { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin: 1.4rem 0 .2rem; padding: .55rem .7rem; background: var(--card); border: 1px solid var(--line); border-radius: 14px; }
.svc-nav-label { font-weight: 700; color: var(--gold-ink); font-size: .85rem; padding-inline-end: .4rem; margin-inline-end: .2rem; border-inline-end: 1px solid var(--line); }
.svc-nav a { text-decoration: none; color: var(--navy); font-size: .92rem; padding: .3rem .7rem; border-radius: 999px; border: 1px solid transparent; }
.svc-nav a:hover { border-color: #dccaa2; background: #fbf6ea; }
.svc-nav a[aria-current="page"] { background: var(--navy); color: var(--gold-2); }
.svc-ico { width: 52px; height: 52px; flex: 0 0 auto; border-radius: 14px; display: grid; place-items: center; background: var(--navy); color: var(--gold); }
.note-box { margin: 1.2rem 0; padding: .95rem 1.15rem; background: #fbf6ea; border: 1px solid #ead9b1; border-inline-start: 4px solid var(--gold); border-radius: 12px; color: #5b4720; }
.note-box p { margin: 0; }
.note-box strong { display: block; color: var(--navy); margin-bottom: .25rem; }
.clause-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.3rem 1.4rem; margin: 1.2rem 0; }
.clause-card h2 { margin-bottom: .3rem; }
.clause-card .clause { background: #fdfbf6; line-height: 1.9; }
.actors { display: grid; gap: .9rem; }
.actor { display: flex; gap: .9rem; align-items: flex-start; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 1rem 1.1rem; }
.actor h3 { margin: 0 0 .25rem; font-size: 1.05rem; }
.actor p { margin: 0; color: var(--muted); }
.timeline { list-style: none; margin: 0; padding: 0; position: relative; display: grid; gap: 1rem; }
.timeline::before { content: ""; position: absolute; top: 1rem; bottom: 1rem; inset-inline-start: 26px; width: 2px; background: linear-gradient(var(--gold), #e8dcc0); }
.stage { position: relative; display: flex; gap: 1rem; align-items: flex-start; }
.stage .svc-ico { position: relative; z-index: 1; box-shadow: 0 0 0 5px var(--paper); }
.stage > div { flex: 1; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 1rem 1.15rem; box-shadow: var(--shadow); }
.stage h3 { margin: 0 0 .3rem; font-size: 1.08rem; }
.stage p { margin: 0; color: var(--muted); }
.stage-num { position: absolute; z-index: 2; inset-inline-start: 36px; top: -6px; min-width: 1.5rem; height: 1.5rem; border-radius: 999px; background: var(--gold); color: var(--navy); font-weight: 700; font-size: .8rem; display: grid; place-items: center; padding: 0 .3rem; }
p.stage-link { margin-top: .5rem; }
.stage-link a { font-weight: 600; color: var(--gold-ink); }
.faq-list { display: grid; gap: .7rem; margin: 1.2rem 0; }
.faq { background: var(--card); border: 1px solid var(--line); border-radius: 14px; }
.faq summary { cursor: pointer; list-style: none; padding: 1rem 1.15rem; font-weight: 600; color: var(--navy); display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: 0 0 auto; width: 1.7rem; height: 1.7rem; border-radius: 50%; display: grid; place-items: center; background: #f6efe0; color: var(--gold-ink); font-weight: 700; }
.faq[open] summary::after { content: "−"; background: var(--navy); color: var(--gold-2); }
.faq[open] { border-color: #dccaa2; box-shadow: var(--shadow); }
.faq-a { padding: 0 1.15rem 1rem; color: var(--ink); }
.faq-a p { margin: 0 0 .4rem; }
.leg-card { display: flex; gap: 1rem; align-items: flex-start; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.3rem 1.4rem; margin: 1.2rem 0; }
.leg-card h2 { margin-bottom: .4rem; }
.link-list { list-style: none; padding: 0; margin: .6rem 0 0; display: grid; gap: .45rem; }
.link-list li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .4rem 1rem; padding: .6rem .8rem; background: #f8f6f1; border-radius: 10px; }
.link-list a { font-weight: 600; color: var(--navy); }
.docs { list-style: none; padding: 0; display: grid; gap: .7rem; }
.doc a { display: flex; gap: 1rem; align-items: center; padding: .9rem 1.1rem; background: var(--card); border: 1px solid var(--line); border-radius: 14px; text-decoration: none; color: inherit; }
.doc a:hover { border-color: var(--gold); box-shadow: var(--shadow); }
.doc-body { flex: 1; display: flex; flex-direction: column; gap: .15rem; }
.doc-body strong { color: var(--navy); }
.doc-meta { color: var(--muted); font-size: .85rem; white-space: nowrap; }
@media (min-width: 800px) {
  .footer-grid { grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr; }
  .actors { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1000px) {
  .actors { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .svc-nav { gap: .25rem; padding: .5rem; }
  .svc-nav-label { width: 100%; border: 0; padding: 0 .2rem .2rem; }
  .svc-nav a { font-size: .85rem; padding: .25rem .55rem; }
  .svc-ico { width: 44px; height: 44px; }
  .timeline::before { inset-inline-start: 22px; }
  .stage-num { inset-inline-start: 30px; }
  .leg-card { flex-direction: column; padding: 1.1rem; }
  .doc a { flex-wrap: wrap; }
}

/* Staff (site manager, arbitration center director) */
.staff { margin: 2rem 0; }
.staff-grid { display: grid; gap: 1rem; grid-template-columns: 1fr; }
.staff-card { display: flex; gap: 1rem; align-items: center; background: var(--paper, #fff); border: 1px solid var(--line, #e3dfd3); border-top: 3px solid var(--gold); border-radius: 14px; padding: 1.1rem 1.2rem; }
.staff-card h3 { margin: 0 0 .15rem; }
.staff-card .eyebrow { margin: 0 0 .15rem; }
.staff-card .prose { margin-top: .5rem; }
@media (min-width: 700px) { .staff-grid { grid-template-columns: 1fr 1fr; } }
.page-head > .actions { margin-top: 1rem; }
.section-head > .actions { display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; margin: 0; }

/* Status badges, unread indicators, lawyer portal */
.badge { display: inline-block; padding: .12rem .55rem; border-radius: 999px; font-size: .78rem; font-weight: 600; line-height: 1.5; border: 1px solid transparent; vertical-align: middle; white-space: nowrap; }
.badge.st-new, .badge.bk-new { background: #fbf3e2; color: #8a6a2c; border-color: #ead7ad; }
.badge.st-accepted, .badge.bk-accepted { background: #e8f4ec; color: #22643a; border-color: #c4e2cf; }
.badge.st-assigned, .badge.bk-review { background: #e9eef7; color: #0f1f3a; border-color: #cdd7ea; }
.badge.st-closed, .badge.bk-closed, .badge.st-other, .badge.bk-other { background: #eeeeec; color: #555; border-color: #ddd; }
.badge.unread { background: #b23b3b; color: #fff; }
.index-list li.has-unread a { border-inline-start: 4px solid #b23b3b; }
.bubble.is-new { box-shadow: inset 0 0 0 2px #ead7ad; }
.record.is-new { border-inline-start: 4px solid var(--gold); }
.status-summary { display: flex; flex-wrap: wrap; gap: .4rem .9rem; align-items: center; margin: 0 0 1rem; }
.dot-count { display: inline-grid; place-items: center; min-width: 1.35rem; height: 1.35rem; padding: 0 .35rem; border-radius: 999px; background: #b23b3b; color: #fff; font-size: .75rem; font-weight: 700; }
.admin-nav.portal-nav {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
}
.portal-nav .portal-who {
  color: var(--navy);
  font-weight: 700;
  margin-inline-end: .35rem;
}
.admin-nav.portal-nav form {
  margin-inline-start: auto;
}
.portal-card { text-decoration: none; color: inherit; }
.portal-card:hover { border-color: var(--gold); }
.footer-portal { color: inherit; opacity: .6; font-size: .82rem; text-decoration: none; }
.footer-portal:hover { opacity: 1; text-decoration: underline; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; }

/* ===== Admin user guide ===== */
.guide { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem 1.8rem; box-shadow: var(--shadow); line-height: 1.95; font-size: 1.02rem; }
.guide h2 { font-size: 1.45rem; margin: 2.2rem 0 .8rem; padding: .35rem .8rem .35rem 0; border-inline-start: 5px solid var(--gold); padding-inline-start: .8rem; padding-inline-end: 0; color: var(--navy); }
.guide h2:first-child { margin-top: 0; }
.guide h3 { font-size: 1.15rem; margin: 1.4rem 0 .4rem; color: var(--navy-3); }
.guide p { margin: .5rem 0; }
.guide ul, .guide ol { margin: .5rem 0; padding-inline-start: 1.6rem; }
.guide li { margin: .25rem 0; }
.guide .lead { font-size: 1.1rem; color: var(--muted); }
.guide .meta { color: var(--muted); font-size: .92rem; }
.guide-toc { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: .9rem 1.2rem; margin: 1rem 0 1.6rem; }
.guide-toc h2 { margin: 0 0 .4rem; border: 0; padding: 0; font-size: 1.15rem; }
.guide-toc ol { columns: 2; column-gap: 2rem; margin: 0; padding-inline-start: 1.4rem; }
.guide-toc li { break-inside: avoid; }
.guide-toc a { text-decoration: none; }
.guide .tip, .guide .warn, .guide .note { border-radius: 12px; padding: .7rem 1rem; margin: .9rem 0; border: 1px solid var(--line); break-inside: avoid; }
.guide .tip { background: #f3f7f1; border-color: #cfdccb; }
.guide .warn { background: #fbf2f0; border-color: #e6c3be; }
.guide .note { background: #fbf7ec; border-color: var(--gold-2); }
.guide .tip > strong:first-child, .guide .warn > strong:first-child, .guide .note > strong:first-child { display: block; margin-bottom: .1rem; }
.guide .warn > strong:first-child { color: var(--danger); }
.guide figure { margin: 1rem 0 1.4rem; break-inside: avoid; }
.guide figure img { display: block; max-width: 100%; height: auto; margin: 0 auto; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); background: #fff; }
.guide figcaption { text-align: center; color: var(--muted); font-size: .9rem; margin-top: .4rem; }
.guide table { width: 100%; border-collapse: collapse; margin: .8rem 0 1.2rem; font-size: .96rem; break-inside: avoid; }
.guide th, .guide td { border: 1px solid var(--line); padding: .45rem .7rem; text-align: start; vertical-align: top; }
.guide th { background: var(--paper); color: var(--navy); }
.guide code, .guide pre { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; direction: ltr; unicode-bidi: isolate; }
.guide code { background: var(--paper); border: 1px solid var(--line); border-radius: 6px; padding: 0 .35rem; font-size: .92em; }
.guide pre { background: var(--navy); color: #f4efe2; border-radius: 10px; padding: .8rem 1rem; overflow-x: auto; text-align: left; white-space: pre-wrap; line-height: 1.6; break-inside: avoid; }
.guide pre code { background: none; border: 0; padding: 0; color: inherit; }
.guide .menu { display: inline-block; background: var(--navy); color: #fff; border-radius: 8px; padding: 0 .55rem; font-size: .92em; white-space: nowrap; }
.guide .btnl { display: inline-block; background: var(--gold-2); color: var(--navy); border-radius: 8px; padding: 0 .55rem; font-size: .92em; white-space: nowrap; border: 1px solid var(--gold); }
.guide-actions { margin: .2rem 0 1rem; display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; }
.guide-link { margin: 1.2rem 0 0; }

/* Floating AI assistant widget (AleppoGift-style layout, legal brand colors) */
.ag-assist {
  position: fixed;
  inset-inline-end: 1.15rem;
  bottom: 1.15rem;
  z-index: 80;
  font-family: var(--font);
}
.ag-assist-launcher {
  width: 60px;
  height: 60px;
  border-radius: 999px;
  border: 3px solid var(--gold);
  background: var(--navy);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(15, 31, 58, .28);
  transition: transform .15s, background .15s;
}
.ag-assist-launcher:hover { transform: translateY(-2px); background: var(--navy-2); }
.ag-assist-panel {
  position: absolute;
  inset-inline-end: 0;
  bottom: 4.6rem;
  width: min(360px, calc(100vw - 1.6rem));
  height: min(520px, calc(100vh - 6.5rem));
  display: flex;
  flex-direction: column;
  background: #fcf8f2;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 18px 50px rgba(15, 31, 58, .28);
  border: 1px solid rgba(15, 31, 58, .08);
}
.ag-assist-panel[hidden] { display: none !important; }
.ag-assist-head {
  background: var(--navy);
  color: #fff;
  padding: .9rem 1rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .8rem;
  border-bottom: 3px solid var(--gold);
}
.ag-assist-head strong { display: block; font-size: 1.02rem; font-weight: 700; line-height: 1.3; }
.ag-assist-head span { display: block; margin-top: .15rem; font-size: .86rem; color: #d7dde8; font-weight: 400; }
.ag-assist-close {
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 .2rem;
  opacity: .9;
}
.ag-assist-close:hover { opacity: 1; }
.ag-assist-msgs {
  flex: 1 1 auto;
  overflow: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: .7rem;
  background: #fcf8f2;
}
.ag-assist-bubble {
  background: #fff;
  border: 1px solid #e5e0d6;
  border-radius: 10px;
  padding: .75rem .9rem;
  color: #3a4250;
  font-size: .95rem;
  line-height: 1.65;
  max-width: 95%;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.ag-assist-bubble.user {
  align-self: flex-end;
  background: #eef2f8;
  border-color: #d5deeb;
  color: var(--navy);
}
.ag-assist-bubble.thinking { color: var(--muted); font-style: italic; }
.ag-assist-form {
  background: #fff;
  border-top: 1px solid #ebe5da;
  padding: .75rem .8rem .65rem;
}
.ag-assist-row { display: flex; gap: .45rem; align-items: center; }
.ag-assist-row input {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  min-height: 42px;
  border: 1px solid #222;
  border-radius: 8px;
  padding: .45rem .7rem;
  background: #fff;
  font: inherit;
}
.ag-assist-send {
  flex: 0 0 auto;
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  background: var(--navy);
  color: #fff;
  font: inherit;
  font-weight: 700;
  padding: .4rem .95rem;
  cursor: pointer;
}
.ag-assist-send:hover { background: var(--navy-3); }
.ag-assist-send:disabled { opacity: .65; cursor: wait; }
.ag-assist-note {
  margin: .45rem 0 0;
  text-align: center;
  font-size: .72rem;
  color: #8a909a;
  line-height: 1.4;
}
@media (max-width: 480px) {
  .ag-assist { inset-inline-end: .7rem; bottom: .7rem; }
  .ag-assist-panel {
    width: calc(100vw - 1.2rem);
    height: min(70vh, 520px);
    bottom: 4.3rem;
  }
}

@media print {
  .skip, .topbar, .site-header, .site-footer, .admin-nav, .guide-actions, .flash, .ag-assist { display: none !important; }
  body { background: #fff !important; }
  main#content { padding: 0 !important; max-width: none !important; }
  .guide { border: 0; box-shadow: none; padding: 0; font-size: 11pt; }
  .guide h2 { break-after: avoid; }
  .guide h3 { break-after: avoid; }
  .guide figure img { box-shadow: none; max-height: 20cm; }
  .guide a { color: inherit; text-decoration: none; }
}
