@charset "UTF-8";
/* ==========================================================================
   دادیستا — design system
   Concept: the Iranian legal code. Content hangs off a continuous rule with
   Persian numerals set in the margin, the way ماده numbering is printed.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Fonts
   -------------------------------------------------------------------------- */

@font-face {
  font-family: "Dadista";
  src: url("../fonts/iransans-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Dadista";
  src: url("../fonts/iransans-bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* Persian numerals for generated content. Declared explicitly rather than
   relying on the predefined `persian` style, whose support still varies. */
@counter-style fa-num {
  system: numeric;
  symbols: "\06F0" "\06F1" "\06F2" "\06F3" "\06F4" "\06F5" "\06F6" "\06F7" "\06F8" "\06F9";
  suffix: "";
}

/* --------------------------------------------------------------------------
   2. Tokens
   -------------------------------------------------------------------------- */

:root {
  /* Ink — the printed colour */
  --ink: #1a2030;
  --ink-2: #232b3d;
  --ink-3: #2f3850;
  --ink-line: rgba(245, 242, 235, 0.14);

  /* Paper — the page */
  --paper: #f5f2eb;
  --paper-2: #ece7db;
  --paper-3: #e2dccc;
  --white: #fffefb;

  /* Brass — rules, numerals, large type only */
  --brass: #b9a879;
  --brass-lit: #d4c391;
  --brass-text: #7a6534; /* AA on paper */
  --brass-line: rgba(185, 168, 121, 0.42);

  /* Seal — the official stamp. Used sparingly. */
  --seal: #9b2c2c;
  --seal-soft: rgba(155, 44, 44, 0.1);

  /* Text on paper */
  --tx: #1a2030;
  --tx-2: #4c5566;
  --tx-3: #6d7789;
  --tx-line: rgba(26, 32, 48, 0.13);
  --tx-line-2: rgba(26, 32, 48, 0.07);

  /* Text on ink */
  --on-ink: #f5f2eb;
  --on-ink-2: #b3bbcb;
  --on-ink-3: #838da1;

  --ok: #2f6f4f;
  --ok-soft: rgba(47, 111, 79, 0.1);

  /* Type scale — fluid, tuned for Persian */
  --t-display: clamp(2.15rem, 1.35rem + 3.4vw, 3.9rem);
  --t-h1: clamp(1.9rem, 1.3rem + 2.5vw, 3rem);
  --t-h2: clamp(1.55rem, 1.15rem + 1.7vw, 2.35rem);
  --t-h3: clamp(1.2rem, 1.03rem + 0.7vw, 1.5rem);
  --t-h4: clamp(1.06rem, 1rem + 0.3vw, 1.19rem);
  --t-lead: clamp(1.03rem, 0.97rem + 0.35vw, 1.19rem);
  --t-body: 1.0625rem;
  --t-sm: 0.9375rem;
  --t-xs: 0.8125rem;
  --t-label: 0.75rem;

  --lh-tight: 1.32;
  --lh-head: 1.45;
  --lh-body: 2;
  --lh-loose: 2.1;

  /* Space — 4px base */
  --s1: 0.25rem;
  --s2: 0.5rem;
  --s3: 0.75rem;
  --s4: 1rem;
  --s5: 1.5rem;
  --s6: 2rem;
  --s7: 3rem;
  --s8: 4rem;
  --s9: 6rem;

  --gutter: clamp(1.15rem, 0.6rem + 2.2vw, 2rem);
  --wrap: 1240px;
  --wrap-narrow: 800px;
  --section-y: clamp(3.5rem, 2rem + 6vw, 6.5rem);

  --rule: 1px solid var(--tx-line);
  --rule-brass: 1px solid var(--brass-line);
  --rule-ink: 1px solid var(--ink-line);

  --shadow-1: 0 1px 2px rgba(26, 32, 48, 0.05);
  --shadow-2: 0 14px 34px -14px rgba(26, 32, 48, 0.22);
  --shadow-3: 0 28px 60px -22px rgba(26, 32, 48, 0.32);

  --ease: cubic-bezier(0.32, 0.72, 0.3, 1);
  --dur: 0.19s;

  --header-h: 68px;
}

/* --------------------------------------------------------------------------
   3. Reset & base
   -------------------------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1.5rem);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--tx);
  font-family: "Dadista", "Segoe UI", Tahoma, system-ui, sans-serif;
  font-size: var(--t-body);
  line-height: var(--lh-body);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: 700;
  line-height: var(--lh-head);
  letter-spacing: -0.011em;
  text-wrap: balance;
}

p { margin: 0 0 1.15em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

a {
  color: var(--brass-text);
  text-decoration: none;
  transition: color var(--dur) var(--ease);
}
a:hover { color: var(--tx); }

img, svg, video { max-width: 100%; height: auto; display: block; }

ul, ol { margin: 0 0 1.15em; padding-inline-start: 1.4em; }
li { margin-bottom: 0.45em; }
li::marker { color: var(--brass-text); }

hr { border: 0; border-top: var(--rule); margin: var(--s6) 0; }

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

button { cursor: pointer; background: none; border: 0; padding: 0; }

table { border-collapse: collapse; width: 100%; }

::selection { background: var(--brass); color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--brass-text);
  outline-offset: 3px;
  border-radius: 1px;
}

/* Latin runs (phone, email, URLs) inside Persian text */
.ltr {
  direction: ltr;
  unicode-bidi: isolate;
  font-feature-settings: "tnum";
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  inset-inline-start: 50%;
  top: -100px;
  transform: translateX(50%);
  z-index: 200;
  background: var(--ink);
  color: var(--on-ink);
  padding: var(--s3) var(--s5);
  font-weight: 700;
  transition: top var(--dur) var(--ease);
}
.skip-link:focus { top: var(--s3); color: var(--brass); }

/* --------------------------------------------------------------------------
   4. Layout primitives
   -------------------------------------------------------------------------- */

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.wrap--narrow { max-width: var(--wrap-narrow); }

.section { padding-block: var(--section-y); }
.section--tight { padding-block: calc(var(--section-y) * 0.62); }
.section--paper2 { background: var(--paper-2); }
.section--white { background: var(--white); }

.section--ink {
  background: var(--ink);
  color: var(--on-ink-2);
}
.section--ink h1,
.section--ink h2,
.section--ink h3,
.section--ink h4 { color: var(--on-ink); }

/* Buttons and cards are excluded: they carry their own colour pair, and a
   blanket link colour here would paint brass text onto a brass button. */
.section--ink a:not(.btn):not(.card):not(.dept):not(.person):not(.cat):not(.feature):not(.subdept):not(.index__row) {
  color: var(--brass);
}
.section--ink a:not(.btn):not(.card):not(.dept):not(.person):not(.cat):not(.feature):not(.subdept):not(.index__row):hover {
  color: var(--brass-lit);
}

.grid { display: grid; gap: var(--s5); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (max-width: 980px) {
  .grid--3, .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: minmax(0, 1fr); }
}

.stack > * + * { margin-top: var(--s4); }
.cluster { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: center; }

/* --------------------------------------------------------------------------
   5. Section headers — eyebrow rule + title
   -------------------------------------------------------------------------- */

.eyebrow {
  display: flex;
  align-items: center;
  gap: var(--s3);
  margin: 0 0 var(--s4);
  font-size: var(--t-label);
  font-weight: 700;
  letter-spacing: 0.09em;
  color: var(--brass-text);
  text-transform: none;
}
.eyebrow::before {
  content: "";
  inline-size: 2.4rem;
  block-size: 1px;
  background: var(--brass);
  flex: none;
}
.section--ink .eyebrow { color: var(--brass); }

.s-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s6);
  flex-wrap: wrap;
  margin-bottom: var(--s7);
}
.s-head__main { max-width: 46rem; }
.s-head__side { display: flex; align-items: center; gap: var(--s4); }
.s-head__title { font-size: var(--t-h2); }
.s-head__lead {
  margin: var(--s4) 0 0;
  font-size: var(--t-lead);
  line-height: var(--lh-loose);
  color: var(--tx-2);
  max-width: 42rem;
}
.section--ink .s-head__lead { color: var(--on-ink-2); }

/* --------------------------------------------------------------------------
   6. Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  padding: 0.95rem 1.7rem;
  font-size: var(--t-sm);
  font-weight: 700;
  line-height: 1.4;
  border: 1px solid transparent;
  background: var(--ink);
  color: var(--brass);
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease),
              border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
  white-space: nowrap;
}
.btn:hover { background: var(--ink-2); color: var(--brass-lit); transform: translateY(-1px); }
.btn:active { transform: none; }

/* Doubled selector so a button keeps its own colour pair regardless of the
   section it sits in. */
.btn--brass,
a.btn--brass { background: var(--brass); color: var(--ink); }
.btn--brass:hover,
a.btn--brass:hover { background: var(--brass-lit); color: var(--ink); }

.btn--ghost {
  background: transparent;
  border-color: var(--tx-line);
  color: var(--tx);
}
.btn--ghost:hover { border-color: var(--brass); color: var(--brass-text); background: transparent; }

.btn--ghost-light,
a.btn--ghost-light {
  background: transparent;
  border-color: rgba(245, 242, 235, 0.4);
  color: var(--on-ink);
}
.btn--ghost-light:hover,
a.btn--ghost-light:hover { background: rgba(245, 242, 235, 0.1); color: var(--on-ink); }

.btn--sm { padding: 0.62rem 1.1rem; font-size: var(--t-xs); }
.btn--block { display: flex; width: 100%; }

.btn .ic { flex: none; }

/* Text link with a sliding arrow */
.tlink {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  font-size: var(--t-sm);
  font-weight: 700;
  color: var(--brass-text);
}
.tlink .ic { transition: transform var(--dur) var(--ease); }
.tlink:hover .ic { transform: translateX(-4px); }
.section--ink .tlink { color: var(--brass); }

/* --------------------------------------------------------------------------
   7. Header
   -------------------------------------------------------------------------- */

.topbar {
  background: var(--ink);
  color: var(--on-ink-3);
  font-size: var(--t-xs);
  border-bottom: var(--rule-ink);
}
.topbar__in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s5);
  min-height: 40px;
  padding-block: var(--s2);
}
.topbar__loc {
  display: flex;
  align-items: center;
  gap: var(--s2);
  min-width: 0;
}
.topbar__loc span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.topbar__loc .ic { color: var(--brass); flex: none; }
.topbar__right { display: flex; align-items: center; gap: var(--s5); flex: none; }
.topbar__phone { color: var(--brass); font-weight: 700; }
.topbar__phone:hover { color: var(--brass-lit); }

@media (max-width: 760px) {
  .topbar__loc { display: none; }
  .topbar__in { justify-content: center; }
  .topbar__hours { display: none; }
}

.header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(245, 242, 235, 0.93);
  backdrop-filter: saturate(150%) blur(14px);
  border-bottom: var(--rule);
  transition: box-shadow var(--dur) var(--ease);
}
.header.is-stuck { box-shadow: var(--shadow-2); }

.header__in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s5);
  min-height: var(--header-h);
}

.brand { display: flex; align-items: center; gap: var(--s3); flex: none; }
.brand__mark { block-size: 40px; inline-size: auto; }
.brand__txt { line-height: 1.3; border-inline-start: var(--rule); padding-inline-start: var(--s3); }
.brand__name { display: block; font-size: 1.12rem; font-weight: 700; color: var(--tx); }
.brand__sub { display: block; font-size: 0.66rem; color: var(--tx-3); letter-spacing: 0.02em; }

/* The wordmark stays on small screens; it is the only place the firm's full
   name appears above the fold. It just gets tighter. */
@media (max-width: 560px) {
  .brand { gap: var(--s2); }
  .brand__mark { block-size: 34px; }
  .brand__txt { padding-inline-start: var(--s2); }
  .brand__name { font-size: 0.98rem; }
  .brand__sub { font-size: 0.58rem; line-height: 1.35; }
}
@media (max-width: 380px) {
  .brand__sub { display: none; }
}

/* Primary nav */
.nav { display: flex; align-items: center; gap: clamp(0.8rem, 1.6vw, 1.6rem); }
.nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--s1);
  padding-block: 0.6rem;
  font-size: var(--t-sm);
  font-weight: 700;
  color: var(--tx-2);
  white-space: nowrap;
}
.nav__link::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  block-size: 2px;
  background: var(--brass);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--dur) var(--ease);
}
.nav__link:hover { color: var(--tx); }
.nav__link:hover::after,
.nav__link[aria-current]::after { transform: scaleX(1); }
.nav__link[aria-current] { color: var(--tx); }
.nav__caret { transition: transform var(--dur) var(--ease); }
.nav__item[data-open="true"] .nav__caret { transform: rotate(180deg); }

.nav__item { position: relative; display: inline-flex; }

/* Mega menu */
.mega {
  position: absolute;
  top: 100%;
  /* Centred on the trigger. Physical left/translateX is deliberate: the panel
     is centred, so it must not flip with the writing direction. */
  left: 50%;
  display: block;
  padding-top: 0.85rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, -6px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease), visibility var(--dur);
}
.nav__item[data-open="true"] .mega {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.mega__panel {
  display: block;
  inline-size: min(46rem, calc(100vw - 2rem));
  background: var(--white);
  border: var(--rule);
  border-top: 3px solid var(--brass);
  box-shadow: var(--shadow-3);
  padding: var(--s5);
}
.mega__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px var(--s5);
}
.mega__row {
  display: grid;
  grid-template-columns: 2.2rem minmax(0, 1fr);
  gap: var(--s3);
  align-items: start;
  padding: 0.6rem 0.7rem;
  color: var(--tx-2);
  border-inline-start: 2px solid transparent;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.mega__row:hover {
  background: var(--paper);
  border-inline-start-color: var(--brass);
  color: var(--tx);
}
.mega__num {
  font-size: var(--t-xs);
  font-weight: 700;
  color: var(--brass-text);
  padding-top: 0.2rem;
  font-feature-settings: "tnum";
}
.mega__name {
  display: block;
  font-size: var(--t-sm);
  font-weight: 700;
  color: var(--tx);
  line-height: 1.6;
}
.mega__hint {
  display: block;
  font-size: var(--t-xs);
  color: var(--tx-3);
  line-height: 1.7;
  margin-top: 0.1rem;
}
.mega__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
  margin-top: var(--s4);
  padding-top: var(--s4);
  border-top: var(--rule);
}

@media (max-width: 1180px) {
  .mega__panel { inline-size: min(34rem, 88vw); }
  .mega__grid { grid-template-columns: 1fr; }
}

@media (max-width: 1040px) {
  .nav, .header__cta { display: none; }
}

.burger {
  display: none;
  inline-size: 44px;
  block-size: 44px;
  border: var(--rule);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  background: var(--white);
  flex: none;
}
.burger span {
  display: block;
  inline-size: 19px;
  block-size: 1.5px;
  background: var(--tx);
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
@media (max-width: 1040px) { .burger { display: flex; } }

/* Mobile drawer */
.drawer {
  position: fixed;
  inset: 0;
  z-index: 120;
  visibility: hidden;
}
.drawer[data-open="true"] { visibility: visible; }
.drawer__veil {
  position: absolute;
  inset: 0;
  background: rgba(16, 20, 30, 0.55);
  opacity: 0;
  transition: opacity 0.24s var(--ease);
}
.drawer[data-open="true"] .drawer__veil { opacity: 1; }
/* Anchored to the right edge in RTL and slid in from the right. Using `right`
   directly rather than a logical property so the panel cannot end up on the
   opposite side of the screen. */
.drawer__panel {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  left: auto;
  inline-size: min(88vw, 350px);
  background: var(--paper);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overscroll-behavior: contain;
  transform: translateX(100%);
  transition: transform 0.26s var(--ease);
  box-shadow: -20px 0 50px rgba(23, 28, 41, 0.25);
}
.drawer[data-open="true"] .drawer__panel { transform: translateX(0); }

.drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--s4) var(--s5);
  border-bottom: var(--rule);
  background: var(--white);
}
.drawer__close {
  inline-size: 38px; block-size: 38px;
  border: var(--rule);
  display: grid; place-items: center;
  color: var(--tx);
}
.drawer__body { padding-block: var(--s2); flex: 1; }
.drawer__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem var(--s5);
  font-size: 1rem;
  font-weight: 700;
  color: var(--tx);
  border-bottom: 1px solid var(--tx-line-2);
}
.drawer__sub { background: var(--paper-2); }
.drawer__sub .drawer__link {
  font-size: var(--t-sm);
  font-weight: 400;
  color: var(--tx-2);
  padding-inline-start: calc(var(--s5) + 1.1rem);
}
.drawer__foot {
  padding: var(--s5);
  border-top: var(--rule);
  display: grid;
  gap: var(--s3);
  background: var(--white);
}

/* --------------------------------------------------------------------------
   8. Hero — the index of departments
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  background: var(--ink);
  color: var(--on-ink);
  overflow: hidden;
  isolation: isolate;
}
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-size: cover;
  background-position: center;
  opacity: 0.4;
  filter: grayscale(0.9) contrast(1.05);
}
/* Darkens the text side while letting the skyline read on the far edge. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(to left, rgba(26, 32, 48, 0.62), rgba(26, 32, 48, 0.9) 58%);
}
.hero__in {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
  padding-block: clamp(3.2rem, 2rem + 6vw, 6rem);
  min-block-size: min(78vh, 660px);
}

.hero__eyebrow { color: var(--brass); margin-bottom: var(--s5); }
.hero__title {
  font-size: var(--t-display);
  line-height: var(--lh-tight);
  color: var(--white);
  margin: 0 0 var(--s5);
}
.hero__title em { font-style: normal; color: var(--brass); display: block; }
.hero__lead {
  font-size: var(--t-lead);
  line-height: var(--lh-loose);
  color: var(--on-ink-2);
  max-width: 34rem;
  margin: 0 0 var(--s6);
}
.hero__cta { display: flex; flex-wrap: wrap; gap: var(--s3); }

.hero__slidewrap { position: relative; }
.hero__slide { display: none; }
.hero__slide[data-active="true"] { display: block; animation: rise 0.5s var(--ease) both; }

.hero__dots { display: flex; gap: var(--s2); margin-top: var(--s6); }
.hero__dot {
  inline-size: 34px;
  block-size: 3px;
  background: rgba(245, 242, 235, 0.28);
  transition: background var(--dur) var(--ease);
}
.hero__dot[aria-selected="true"] { background: var(--brass); }

/* The department index — the signature element */
.index {
  border-top: var(--rule-ink);
  border-bottom: var(--rule-ink);
}
.index__cap {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s4);
  padding-block: var(--s3);
  font-size: var(--t-label);
  font-weight: 700;
  letter-spacing: 0.09em;
  color: var(--on-ink-3);
  border-bottom: var(--rule-ink);
}
.index__row {
  position: relative;
  display: grid;
  grid-template-columns: 2.4rem max-content 1fr;
  align-items: baseline;
  gap: var(--s3);
  padding: 0.72rem var(--s3) 0.72rem 0;
  color: var(--on-ink-2);
  border-bottom: 1px solid rgba(245, 242, 235, 0.07);
  transition: color var(--dur) var(--ease), padding var(--dur) var(--ease);
}
.index__row:last-child { border-bottom: 0; }
.index__row::before {
  content: "";
  position: absolute;
  inset-block: 0;
  inset-inline-end: 0;
  inline-size: 2px;
  background: var(--brass);
  transform: scaleY(0);
  transform-origin: center;
  transition: transform var(--dur) var(--ease);
}
.index__row:hover { color: var(--white); padding-inline-end: var(--s4); }
.index__row:hover::before { transform: scaleY(1); }
.index__num {
  font-size: var(--t-sm);
  font-weight: 700;
  color: var(--brass);
  font-feature-settings: "tnum";
}
.index__name { font-size: var(--t-sm); font-weight: 700; white-space: nowrap; }
.index__hint {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--s2);
  font-size: var(--t-xs);
  color: var(--on-ink-3);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.index__hint .ic { flex: none; opacity: 0; transition: opacity var(--dur) var(--ease); }
.index__row:hover .index__hint .ic { opacity: 1; }

@media (max-width: 1040px) {
  .hero__in { grid-template-columns: minmax(0, 1fr); gap: var(--s7); min-block-size: 0; }
  .index__hint { display: none; }
}

/* On phones a nine-row list is too long, so the index becomes a compact
   two-column grid of tappable tiles. */
@media (max-width: 620px) {
  .index { border: 0; }
  .index__cap { border-bottom: 0; padding-bottom: var(--s2); }
  .index__body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--s2);
  }
  .index__row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--s1);
    padding: 0.7rem 0.75rem;
    border: var(--rule-ink);
    background: rgba(245, 242, 235, 0.04);
  }
  .index__row::before { display: none; }
  .index__row:hover { padding-inline-end: 0.75rem; }
  .index__num { font-size: var(--t-label); }
  .index__name { font-size: 0.82rem; line-height: 1.5; white-space: normal; }
  /* A lone tile on the last row spans instead of sitting half-empty. */
  .index__row:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

/* Item 9: on phones the section's action sits full width under the heading. */
@media (max-width: 620px) {
  .s-head { gap: var(--s4); margin-bottom: var(--s5); }
  .s-head__side { inline-size: 100%; }
  .s-head__side .btn { inline-size: 100%; }
}

@media (max-width: 560px) {
  .hero__cta .btn { width: 100%; }
}

/* --------------------------------------------------------------------------
   Rail (horizontal carousel)
   -------------------------------------------------------------------------- */

.rail__track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 2 * var(--s5)) / 3);
  gap: var(--s5);
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 0;
  /* Room for the cards' hover lift, which would otherwise be clipped. */
  padding-block-end: var(--s2);
  scrollbar-width: none;
}
.rail__track::-webkit-scrollbar { display: none; }
.rail__item { scroll-snap-align: start; min-inline-size: 0; display: flex; }
.rail__item > * { inline-size: 100%; }

.rail__nav { display: flex; gap: var(--s2); }
.rail__btn {
  inline-size: 2.6rem;
  block-size: 2.6rem;
  display: grid;
  place-items: center;
  padding: 0;
  background: transparent;
  border: var(--rule);
  color: var(--tx);
  cursor: pointer;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease),
              border-color var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.rail__btn:hover:not(:disabled) { background: var(--brass); border-color: var(--brass); color: var(--ink); }
.rail__btn:disabled { opacity: 0.3; cursor: default; }
/* The arrow glyph points to the inline start; "next" is the other way. */
.rail__btn[data-rail-next] .ic { transform: scaleX(-1); }
.section--ink .rail__btn { border-color: var(--ink-line); color: var(--on-ink); }

@media (max-width: 900px) {
  .rail__track { grid-auto-columns: calc((100% - var(--s5)) / 2); }
}
@media (max-width: 620px) {
  .rail__track { grid-auto-columns: 78%; gap: var(--s4); }
  .rail__nav { display: none; }
}

/* --------------------------------------------------------------------------
   9. Stats strip
   -------------------------------------------------------------------------- */

.stats {
  background: var(--white);
  border-bottom: var(--rule);
}
.stats__in {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.stat {
  padding: var(--s6) var(--s4);
  border-inline-start: var(--rule);
}
.stat:first-child { border-inline-start: 0; }
.stat__n {
  display: block;
  font-size: clamp(1.6rem, 1.2rem + 1.5vw, 2.3rem);
  font-weight: 700;
  color: var(--brass-text);
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.stat__l {
  display: block;
  margin-top: var(--s2);
  font-size: var(--t-xs);
  color: var(--tx-2);
  line-height: 1.85;
}

@media (max-width: 800px) {
  .stats__in { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(3) { border-inline-start: 0; }
  .stat:nth-child(n + 3) { border-top: var(--rule); }
}

/* --------------------------------------------------------------------------
   10. Cards
   -------------------------------------------------------------------------- */

.card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: var(--rule);
  color: var(--tx);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
              transform var(--dur) var(--ease);
}
.card:hover {
  border-color: var(--brass);
  box-shadow: var(--shadow-2);
  transform: translateY(-2px);
  color: var(--tx);
}

.card__media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--ink);
}
.card__media img {
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}
.card:hover .card__media img { transform: scale(1.045); }

.card__tag {
  position: absolute;
  inset-block-start: 0;
  inset-inline-end: 0;
  background: var(--ink);
  color: var(--brass);
  font-size: var(--t-label);
  font-weight: 700;
  padding: 0.42rem 0.75rem;
  z-index: 2;
}

.card__body {
  display: flex;
  flex-direction: column;
  gap: var(--s3);
  padding: var(--s5);
  flex: 1;
}
.card__title {
  font-size: var(--t-h4);
  line-height: 1.65;
  color: var(--tx);
}
.card__text {
  font-size: var(--t-sm);
  line-height: 1.95;
  color: var(--tx-2);
  flex: 1;
  margin: 0;
}
.card__meta {
  display: flex;
  align-items: center;
  gap: var(--s4);
  font-size: var(--t-xs);
  color: var(--tx-3);
}
.card__meta span { display: inline-flex; align-items: center; gap: var(--s1); }
.card__meta .ic { color: var(--brass); }
.card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
  padding-top: var(--s3);
  border-top: var(--rule);
  font-size: var(--t-xs);
  color: var(--tx-3);
}
.card__more { color: var(--brass-text); font-weight: 700; }

.card__pills { display: flex; flex-wrap: wrap; gap: var(--s1); }
.pill {
  background: var(--paper-2);
  color: var(--tx-2);
  font-size: var(--t-label);
  padding: 0.28rem 0.55rem;
}

/* Department card — number hangs on the rule */
.dept {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: var(--s3);
  padding: var(--s5) var(--s5) var(--s5) var(--s5);
  background: var(--white);
  border: var(--rule);
  border-inline-end: 3px solid var(--paper-3);
  color: var(--tx);
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease),
              transform var(--dur) var(--ease);
}
.dept:hover {
  border-inline-end-color: var(--brass);
  transform: translateY(-2px);
  color: var(--tx);
  box-shadow: var(--shadow-2);
}
.dept__top { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); }
.dept__num {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--brass);
  line-height: 1;
  letter-spacing: -0.02em;
}
.dept__icon { color: var(--brass-text); opacity: 0.85; }
.dept__name { font-size: var(--t-h4); line-height: 1.6; }
.dept__text { font-size: var(--t-sm); line-height: 1.95; color: var(--tx-2); margin: 0; }
.dept__foot {
  display: flex;
  align-items: center;
  gap: var(--s2);
  padding-top: var(--s3);
  border-top: var(--rule);
  font-size: var(--t-xs);
  font-weight: 700;
  color: var(--brass-text);
}
.dept__foot .ic { transition: transform var(--dur) var(--ease); }
.dept:hover .dept__foot .ic { transform: translateX(-4px); }

/* Feature department — the wide one */
.feature {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  background: var(--ink);
  color: var(--on-ink-2);
  border: 0;
  overflow: hidden;
  transition: background var(--dur) var(--ease);
}
.feature:hover { background: var(--ink-2); color: var(--on-ink-2); }
.feature__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--s4);
  padding: clamp(2rem, 1rem + 3vw, 3.2rem);
}
.feature__title { font-size: var(--t-h2); color: var(--white); }
.feature__text { font-size: var(--t-body); line-height: var(--lh-loose); max-width: 34rem; margin: 0; }
.feature__pills { display: flex; flex-wrap: wrap; gap: var(--s2); }
.feature__pill {
  border: 1px solid var(--brass-line);
  color: var(--brass);
  font-size: var(--t-xs);
  padding: 0.38rem 0.7rem;
}
.feature__media { position: relative; min-block-size: 260px; }
.feature__media img { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; object-fit: cover; }
.feature__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to left, rgba(26, 32, 48, 0) 32%, rgba(26, 32, 48, 0.95));
}

@media (max-width: 860px) {
  .feature { grid-template-columns: minmax(0, 1fr); }
  .feature__media { min-block-size: 190px; order: -1; }
  .feature__media::after { background: linear-gradient(to top, rgba(26, 32, 48, 0.95), rgba(26, 32, 48, 0.25)); }
}

/* Sub-department card: a real, explained entry point rather than a bare chip. */
.subdept {
  display: grid;
  grid-template-columns: 2.6rem minmax(0, 1fr);
  gap: var(--s3) var(--s4);
  align-items: start;
  padding: var(--s5);
  background: var(--white);
  border: var(--rule);
  border-inline-start: 3px solid var(--paper-3);
  color: var(--tx);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
              transform var(--dur) var(--ease);
}
.subdept:hover {
  border-inline-start-color: var(--brass);
  box-shadow: var(--shadow-2);
  transform: translateY(-2px);
  color: var(--tx);
}
.subdept__icon {
  grid-row: 1 / span 2;
  inline-size: 2.6rem;
  block-size: 2.6rem;
  display: grid;
  place-items: center;
  background: var(--paper-2);
  color: var(--brass-text);
}
.subdept:hover .subdept__icon { background: var(--brass); color: var(--ink); }
.subdept__name {
  font-size: var(--t-h4);
  font-weight: 700;
  line-height: 1.6;
}
.subdept__text {
  margin: 0;
  font-size: var(--t-sm);
  line-height: 1.95;
  color: var(--tx-2);
}
.subdept__more {
  grid-column: 2;
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  font-size: var(--t-xs);
  font-weight: 700;
  color: var(--brass-text);
}
.subdept__more .ic { transition: transform var(--dur) var(--ease); }
.subdept:hover .subdept__more .ic { transform: translateX(-4px); }

@media (max-width: 520px) {
  .subdept { padding: var(--s4); gap: var(--s2) var(--s3); }
}

/* Lawyer card */
.person {
  display: flex;
  flex-direction: column;
  background: var(--ink);
  border: var(--rule-ink);
  color: var(--on-ink-2);
  overflow: hidden;
  transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.person:hover { border-color: var(--brass); transform: translateY(-2px); color: var(--on-ink-2); }
.person__media {
  position: relative;
  aspect-ratio: 3 / 4;
  background:
    radial-gradient(120% 80% at 50% 8%, rgba(185, 168, 121, 0.16), transparent 62%),
    var(--ink-2);
  overflow: hidden;
}
.person__media img {
  position: absolute;
  inset: 0;
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
  object-position: top center;
  background: transparent;
}
.person__body { padding: var(--s4) var(--s5) var(--s5); border-top: var(--rule-ink); }
.person__name { font-size: var(--t-h4); color: var(--white); }
.person__role { display: block; margin-top: var(--s1); font-size: var(--t-xs); color: var(--brass); }
.person__spec { margin: var(--s3) 0 0; font-size: var(--t-xs); color: var(--on-ink-3); line-height: 1.85; }

/* --------------------------------------------------------------------------
   11. The ماده rule — numbered list against a continuous hairline
   -------------------------------------------------------------------------- */

.code {
  position: relative;
  counter-reset: code;
}

.code__item {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  column-gap: var(--s4);
  align-items: start;
  padding-block: 0.85rem;
  border-bottom: 1px solid var(--tx-line-2);
}
.code__item:last-child { border-bottom: 0; }

/* Numeral first in reading order: the start (right) edge in RTL. */
.code__item::before {
  counter-increment: code;
  content: counter(code, fa-num);
  grid-column: 1;
  grid-row: 1;
  inline-size: 2rem;
  block-size: 2rem;
  display: grid;
  place-items: center;
  background: var(--paper);
  border: 1px solid var(--brass-line);
  color: var(--brass-text);
  font-size: var(--t-xs);
  font-weight: 700;
  line-height: 1;
}

.code__title {
  grid-column: 2;
  grid-row: 1;
  align-self: center;
  font-size: var(--t-body);
  font-weight: 700;
  color: var(--tx);
  line-height: 1.75;
}
.code__desc {
  grid-column: 2;
  grid-row: 2;
  margin: var(--s1) 0 0;
  font-size: var(--t-sm);
  color: var(--tx-2);
  line-height: 1.9;
}

/* Surface-aware numeral background so the rule appears to pass behind it. */
.section--white .code__item::before,
.consult .code__item::before,
.code--on-white .code__item::before { background: var(--white); }
.section--paper2 .code__item::before { background: var(--paper-2); }
.section--ink .code__item { border-bottom-color: rgba(245, 242, 235, 0.08); }
.section--ink .code__item::before { background: var(--ink); color: var(--brass); }
.section--ink .code__title { color: var(--on-ink); }
.section--ink .code__desc { color: var(--on-ink-2); }

@media (min-width: 760px) {
  .code--split {
    column-count: 2;
    column-gap: clamp(2rem, 4vw, 3.5rem);
  }
  .code--split .code__item { break-inside: avoid; }
}

/* --------------------------------------------------------------------------
   11b. Catalogues
   -------------------------------------------------------------------------- */

.cats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(19rem, 100%), 1fr));
  gap: var(--s5);
}

/* The card leads with the cover, because a catalogue is a physical object. */
.cat {
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr);
  background: var(--white);
  border: var(--rule);
  color: var(--tx);
  overflow: hidden;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
              transform var(--dur) var(--ease);
}
.cat:hover {
  border-color: var(--brass);
  box-shadow: var(--shadow-2);
  transform: translateY(-2px);
  color: var(--tx);
}
.cat__cover {
  position: relative;
  background: var(--ink);
  overflow: hidden;
}
.cat__cover img {
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
  object-position: top center;
}
.cat__cover::after {
  content: "";
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  inline-size: 4px;
  background: linear-gradient(to bottom, var(--brass), rgba(185, 168, 121, 0.25));
}
.cat__body {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
  padding: var(--s5);
  min-inline-size: 0;
}
.cat__name { font-size: var(--t-h4); line-height: 1.6; }
.cat__text {
  margin: 0;
  font-size: var(--t-sm);
  line-height: 1.9;
  color: var(--tx-2);
  flex: 1;
}
.cat__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2) var(--s4);
  font-size: var(--t-xs);
  color: var(--tx-3);
}
.cat__meta span { display: inline-flex; align-items: center; gap: var(--s1); }
.cat__meta .ic { color: var(--brass); }
.cat__actions {
  display: flex;
  gap: var(--s2);
  flex-wrap: wrap;
  padding-top: var(--s3);
  border-top: var(--rule);
}

@media (max-width: 480px) {
  .cat { grid-template-columns: minmax(0, 1fr); }
  .cat__cover { aspect-ratio: 3 / 2; }
  .cat__cover::after { inset: auto 0 0 0; inline-size: auto; block-size: 4px; }
}

/* Promo band: cover and pitch. The QR belongs on the catalogue's own page. */
.catband {
  display: grid;
  grid-template-columns: 18rem minmax(0, 1fr);
  gap: clamp(1.75rem, 4vw, 3.25rem);
  align-items: center;
}
.catband__cover {
  position: relative;
  display: block;
  border: 1px solid var(--brass-line);
  background: var(--ink-2);
  overflow: hidden;
  transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.catband__cover:hover { transform: translateY(-3px); border-color: var(--brass); }
.catband__cover img {
  inline-size: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: top center;
  display: block;
}

/* The cover reads as a cover: the title set on it, over a scrim so it stays
   legible whatever artwork the firm uploads. */
.catband__cap {
  position: absolute;
  inset-inline: 0;
  inset-block-end: 0;
  display: block;
  padding: 3.5rem var(--s4) var(--s4);
  background: linear-gradient(to top, rgba(16, 20, 31, 0.94) 34%, rgba(16, 20, 31, 0) 100%);
  color: var(--on-ink);
}
.catband__caplabel {
  display: block;
  font-size: var(--t-label);
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--brass);
  margin-bottom: 0.45rem;
}
.catband__captitle {
  display: block;
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.75;
  text-wrap: balance;
}
.catband__capyear {
  display: block;
  margin-top: 0.55rem;
  padding-top: 0.55rem;
  border-top: 1px solid rgba(185, 168, 121, 0.4);
  font-size: var(--t-xs);
  color: var(--brass);
}

.catband__body { display: flex; flex-direction: column; gap: var(--s3); min-inline-size: 0; }
.catband__name { font-size: var(--t-h3); line-height: 1.5; }
.catband__text { margin: 0; font-size: var(--t-lead); line-height: var(--lh-loose); }
.catband__meta { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); font-size: var(--t-xs); }
.catband__meta span { display: inline-flex; align-items: center; gap: var(--s1); }
.catband__meta .ic { color: var(--brass); }
.catband__cta { display: flex; flex-wrap: wrap; gap: var(--s3); margin-top: var(--s2); }
.catband__more {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s2) var(--s4);
  margin-top: var(--s3);
  padding-top: var(--s4);
  border-top: 1px solid currentColor;
  border-top-color: var(--tx-line);
  font-size: var(--t-sm);
}
.section--ink .catband__more { border-top-color: var(--ink-line); }
.catband__morecap { font-size: var(--t-label); font-weight: 700; letter-spacing: 0.08em; opacity: 0.75; }

@media (max-width: 1040px) {
  .catband { grid-template-columns: 14rem minmax(0, 1fr); }
}
@media (max-width: 620px) {
  .catband { grid-template-columns: minmax(0, 1fr); justify-items: center; }
  /* Centred, and wide enough that the title on it is still readable. */
  .catband__cover { inline-size: min(15rem, 68vw); }
  .catband__body { inline-size: 100%; }
}

/* Single catalogue: viewer beside the QR panel. */
.viewer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 17rem;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  align-items: start;
}
@media (max-width: 960px) {
  .viewer { grid-template-columns: minmax(0, 1fr); }
}
.viewer__frame {
  border: var(--rule);
  background: var(--paper-2);
  overflow: hidden;
}
.viewer__frame iframe,
.viewer__frame embed,
.viewer__frame object {
  display: block;
  inline-size: 100%;
  block-size: min(80vh, 900px);
  border: 0;
}
.viewer__fallback {
  padding: var(--s7) var(--s5);
  text-align: center;
  color: var(--tx-2);
  font-size: var(--t-sm);
}

/* QR panel: the whole point is that a phone camera can reach the PDF. */
.qr {
  background: var(--white);
  border: var(--rule);
  border-top: 3px solid var(--brass);
  padding: var(--s5);
  text-align: center;
}
.qr__img {
  inline-size: min(11rem, 100%);
  block-size: auto;
  margin: 0 auto var(--s3);
  display: block;
  image-rendering: pixelated;
  background: #fff;
  padding: var(--s2);
  border: var(--rule);
}
.qr__cap {
  font-size: var(--t-label);
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--brass-text);
  margin-bottom: var(--s2);
}
.qr__hint {
  font-size: var(--t-xs);
  line-height: 1.85;
  color: var(--tx-2);
  margin: 0 0 var(--s4);
}
.qr__url {
  display: block;
  font-size: var(--t-label);
  color: var(--tx-3);
  word-break: break-all;
  direction: ltr;
  margin-top: var(--s3);
}

/* --------------------------------------------------------------------------
   12. Marquee
   -------------------------------------------------------------------------- */

.marquee {
  background: var(--ink);
  border-block: var(--rule-ink);
  overflow: hidden;
  padding-block: var(--s3);
  -webkit-mask-image: linear-gradient(to left, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(to left, transparent, #000 6%, #000 94%, transparent);
}
.marquee__track {
  display: flex;
  inline-size: max-content;
  animation: slide 42s linear infinite;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__group {
  display: flex;
  align-items: center;
  gap: var(--s5);
  padding-inline-start: var(--s5);
  font-size: var(--t-sm);
  color: var(--on-ink-3);
  white-space: nowrap;
}
.marquee__dot { color: var(--brass); font-size: 0.6rem; }

@keyframes slide {
  from { transform: translateX(0); }
  to { transform: translateX(50%); }
}

/* --------------------------------------------------------------------------
   13. Article & prose
   -------------------------------------------------------------------------- */

.page-head {
  background: var(--ink);
  color: var(--on-ink-2);
  padding-block: clamp(2.4rem, 1.4rem + 4vw, 4.2rem);
  position: relative;
  overflow: hidden;
}
.page-head__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.14;
  filter: grayscale(1);
}
.page-head__in { position: relative; }
.page-head__title { font-size: var(--t-h1); color: var(--white); max-width: 44rem; }
.page-head__lead {
  margin: var(--s4) 0 0;
  font-size: var(--t-lead);
  line-height: var(--lh-loose);
  color: var(--on-ink-2);
  max-width: 46rem;
}
.page-head__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2) var(--s5);
  margin-top: var(--s5);
  font-size: var(--t-xs);
  color: var(--on-ink-3);
}
.page-head__meta span { display: inline-flex; align-items: center; gap: var(--s1); }
.page-head__meta .ic { color: var(--brass); }

.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s1);
  margin-bottom: var(--s5);
  font-size: var(--t-xs);
  color: var(--on-ink-3);
}
.crumbs a { color: var(--on-ink-3); }
.crumbs a:hover { color: var(--brass); }
.crumbs__sep { opacity: 0.5; }
.crumbs [aria-current] { color: var(--brass); }

/* Article layout: body + sticky rail */
.doc {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 21.5rem;
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: start;
}
@media (max-width: 1100px) {
  .doc { grid-template-columns: minmax(0, 1fr) 19rem; }
}
/* On an article the table of contents is its own child of .doc so it can lead
   on a phone while still sitting in the rail column on a wide screen. */
.doc--toc { grid-template-rows: auto 1fr; }
.doc--toc > .doc__toc  { grid-column: 2; grid-row: 1; }
.doc--toc > .doc__main { grid-column: 1; grid-row: 1 / span 2; }
.doc--toc > .doc__rail { grid-column: 2; grid-row: 2; }

@media (max-width: 1000px) {
  /* One column, and the order is the reading order: contents, article,
     then the consultation form last. */
  .doc { display: flex; flex-direction: column; }
  .doc__toc { order: -1; }
}

.doc__rail { position: sticky; top: calc(var(--header-h) + 1.5rem); display: grid; gap: var(--s5); }
@media (max-width: 1000px) { .doc__rail { position: static; } }

/* Other departments: two columns on a phone so the list is not a long tail. */
.sibs { display: grid; gap: 0.15rem var(--s4); font-size: var(--t-sm); }
.sibs__link { display: block; padding-block: 0.35rem; color: var(--tx-2); }
.sibs__link:hover { color: var(--brass-text); }
@media (max-width: 1000px) { .sibs { grid-template-columns: 1fr 1fr; } }

/* The contents list is a <details>: collapsed on a phone, forced open on a
   wide screen by app.js, which owns the `open` attribute. */
.toc { border-inline-start: 2px solid var(--brass-line); padding-inline-start: var(--s4); }
.toc > summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: var(--s3); }
.toc > summary::-webkit-details-marker { display: none; }
.toc[data-collapse] > summary::after {
  content: "";
  inline-size: 0.5rem;
  block-size: 0.5rem;
  border-inline-start: 1.5px solid currentColor;
  border-block-end: 1.5px solid currentColor;
  transform: rotate(-45deg);
  transition: transform var(--dur) var(--ease);
}
.toc[data-collapse][open] > summary::after { transform: rotate(135deg); }
@media (min-width: 1001px) { .toc > summary { cursor: default; } .toc[data-collapse] > summary::after { display: none; } }
.toc__cap {
  font-size: var(--t-label);
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--brass-text);
}
.toc__list { list-style: none; margin: var(--s3) 0 0; padding: 0; display: grid; gap: 0.15rem; }
.toc__link {
  display: block;
  padding: 0.4rem 0;
  font-size: var(--t-xs);
  line-height: 1.8;
  color: var(--tx-2);
  border-inline-start: 2px solid transparent;
  margin-inline-start: calc(var(--s4) * -1 - 2px);
  padding-inline-start: var(--s4);
}
.toc__link:hover { color: var(--tx); }
.toc__link.is-active { color: var(--brass-text); border-inline-start-color: var(--brass); font-weight: 700; }
.toc__link--2 { padding-inline-start: calc(var(--s4) + 0.7rem); color: var(--tx-3); }

.progress {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  block-size: 2px;
  background: var(--brass);
  transform-origin: right;
  transform: scaleX(0);
  z-index: 200;
  transition: transform 0.1s linear;
}

/* The lead image spans the whole content column, not the prose measure. */
.doc__hero {
  margin: 0 0 clamp(1.75rem, 1rem + 2vw, 2.6rem);
  position: relative;
}
.doc__hero img {
  inline-size: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}
.doc__hero figcaption {
  margin-top: var(--s2);
  font-size: var(--t-xs);
  color: var(--tx-3);
}

/* Prose — the reading surface */
.prose {
  font-size: var(--t-body);
  line-height: var(--lh-loose);
  color: var(--tx);
  max-width: 44rem;
}
/* On the article page the prose shares the column with a full-width hero, so
   it should fill it rather than sit in a narrower measure. */
.doc .prose { max-width: none; }
.prose > * + * { margin-top: 1.15em; }
.prose h2 {
  font-size: var(--t-h3);
  margin-top: 2.1em;
  padding-top: 0.9em;
  border-top: var(--rule);
  scroll-margin-top: calc(var(--header-h) + 1.5rem);
}
.prose h3 {
  font-size: var(--t-h4);
  margin-top: 1.75em;
  color: var(--tx);
  scroll-margin-top: calc(var(--header-h) + 1.5rem);
}
.prose h2 + *, .prose h3 + * { margin-top: 0.75em; }
.prose p { margin-bottom: 0; }
.prose a { text-decoration: underline; text-underline-offset: 0.24em; text-decoration-thickness: 1px; }
.prose a:hover { text-decoration-color: var(--brass); }
.prose ul, .prose ol { padding-inline-start: 1.35em; }
.prose li { line-height: 1.95; }
.prose img { margin-block: 1.6em; inline-size: 100%; }
.prose figure { margin: 1.8em 0; }
.prose figcaption {
  margin-top: var(--s2);
  font-size: var(--t-xs);
  color: var(--tx-3);
  text-align: center;
}
.prose blockquote {
  margin: 1.8em 0;
  padding: var(--s4) var(--s5);
  border-inline-start: 3px solid var(--brass);
  background: var(--paper-2);
  font-size: var(--t-sm);
  line-height: 1.95;
  color: var(--tx-2);
}
.prose blockquote p:last-child { margin-bottom: 0; }
.prose table {
  display: block;
  overflow-x: auto;
  font-size: var(--t-sm);
  border: var(--rule);
}
.prose th, .prose td { padding: 0.7rem 0.9rem; border: var(--rule); text-align: start; }
.prose th { background: var(--paper-2); font-weight: 700; }
.prose code {
  background: var(--paper-2);
  padding: 0.12em 0.4em;
  font-size: 0.9em;
  direction: ltr;
  unicode-bidi: isolate;
}
.prose hr { margin: 2.2em 0; }
.prose .embed,
.prose video,
.prose audio {
  display: block;
  inline-size: 100%;
  margin-block: 1.8em;
  background: var(--ink);
}
.prose audio { background: var(--paper-2); }

/* A framed sub-panel inside the content column (required documents, notes). */
.panel-box {
  margin-top: var(--s7);
  background: var(--white);
  border: var(--rule);
  border-top: 3px solid var(--brass);
  padding: clamp(1.5rem, 1rem + 2vw, 2.4rem);
}
.panel-box > .code { margin-top: var(--s2); }

/* The home about section's portrait shot, with the firm's number as a seal. */
.about-shot { position: relative; }
.about-shot img {
  inline-size: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  display: block;
}
.about-shot__seal {
  position: absolute;
  inset-block-end: 0;
  inset-inline-start: 0;
  background: var(--brass);
  color: var(--ink);
  padding: var(--s4) var(--s5);
  max-inline-size: 13rem;
}
.about-shot__num {
  display: block;
  font-size: 2.8rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
}
.about-shot__seal span:last-child {
  display: block;
  margin-top: var(--s2);
  font-size: var(--t-xs);
  font-weight: 700;
  line-height: 1.7;
}

/* Callout — the legal note */
.note {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--s3);
  margin-block: 2em;
  padding: var(--s5);
  background: var(--seal-soft);
  border-inline-start: 3px solid var(--seal);
  font-size: var(--t-sm);
  line-height: 1.95;
  color: var(--tx-2);
}
.note__icon { color: var(--seal); padding-top: 0.2rem; }
.note__title { display: block; font-weight: 700; color: var(--tx); margin-bottom: var(--s1); }

/* --------------------------------------------------------------------------
   14. FAQ
   -------------------------------------------------------------------------- */

.faq { border-top: var(--rule); }
.faq__item { border-bottom: var(--rule); }
.faq__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
  inline-size: 100%;
  padding: var(--s4) 0;
  font-size: var(--t-h4);
  font-weight: 700;
  color: var(--tx);
  text-align: start;
  line-height: 1.7;
  transition: color var(--dur) var(--ease);
}
.faq__q:hover { color: var(--brass-text); }
.faq__sign {
  flex: none;
  inline-size: 1.9rem;
  block-size: 1.9rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--brass-line);
  color: var(--brass-text);
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease),
              transform var(--dur) var(--ease);
}
.faq__q[aria-expanded="true"] .faq__sign {
  background: var(--brass);
  color: var(--ink);
  transform: rotate(45deg);
}
.faq__a {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.25s var(--ease);
}
.faq__q[aria-expanded="true"] + .faq__a { grid-template-rows: 1fr; }
.faq__a > div { overflow: hidden; }
.faq__a p {
  font-size: var(--t-sm);
  line-height: 1.98;
  color: var(--tx-2);
  padding-bottom: var(--s5);
  max-width: 52rem;
}

/* --------------------------------------------------------------------------
   15. Consultation form
   -------------------------------------------------------------------------- */

.consult {
  background: var(--white);
  border: var(--rule);
  border-top: 3px solid var(--brass);
  padding: clamp(1.5rem, 1rem + 2vw, 2.35rem);
}
.consult__title { font-size: var(--t-h3); margin-bottom: var(--s2); }
.consult__lead { font-size: var(--t-sm); color: var(--tx-2); line-height: 1.9; margin-bottom: var(--s5); }

.field { display: grid; gap: var(--s2); margin-bottom: var(--s4); }
.field__label { font-size: var(--t-xs); font-weight: 700; color: var(--tx-2); }
.field__label span { color: var(--seal); }
.field__hint { font-size: var(--t-label); color: var(--tx-3); }
.field__error { font-size: var(--t-xs); color: var(--seal); }

.input, .textarea, .select {
  inline-size: 100%;
  padding: 0.78rem 0.9rem;
  background: var(--paper);
  border: var(--rule);
  color: var(--tx);
  font-size: var(--t-sm);
  line-height: 1.7;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.input:focus, .textarea:focus, .select:focus {
  outline: none;
  border-color: var(--brass);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(185, 168, 121, 0.16);
}
.input[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--seal); }
.textarea { resize: vertical; min-block-size: 6.5rem; }
.select { appearance: none; padding-inline-end: 2.2rem; background-image: none; }

.input::placeholder, .textarea::placeholder { color: var(--tx-3); }

.hp { position: absolute; inset-inline-start: -9999px; opacity: 0; pointer-events: none; }

.alert {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--s3);
  padding: var(--s4);
  margin-bottom: var(--s5);
  font-size: var(--t-sm);
  line-height: 1.85;
  border-inline-start: 3px solid;
}
.alert--ok { background: var(--ok-soft); border-color: var(--ok); color: var(--ok); }
.alert--err { background: var(--seal-soft); border-color: var(--seal); color: var(--seal); }
.alert .ic { padding-top: 0.22rem; }

/* --------------------------------------------------------------------------
   16. CTA band
   -------------------------------------------------------------------------- */

.band {
  position: relative;
  background: var(--ink);
  color: var(--on-ink-2);
  overflow: hidden;
  isolation: isolate;
}
.band__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-size: cover;
  background-position: center;
  opacity: 0.15;
  filter: grayscale(1);
}
.band__in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s6);
  flex-wrap: wrap;
  padding-block: clamp(2.6rem, 1.6rem + 3.5vw, 4.2rem);
}
.band__title { font-size: var(--t-h2); color: var(--white); max-width: 32rem; }
.band__lead { margin: var(--s3) 0 0; font-size: var(--t-lead); line-height: 1.95; max-width: 34rem; }
.band__cta { display: flex; gap: var(--s3); flex-wrap: wrap; }

/* --------------------------------------------------------------------------
   17. Pagination
   -------------------------------------------------------------------------- */

.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  margin-top: var(--s8);
  flex-wrap: wrap;
}
.pager__link {
  min-inline-size: 2.6rem;
  block-size: 2.6rem;
  padding-inline: 0.7rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: var(--rule);
  background: var(--white);
  font-size: var(--t-sm);
  font-weight: 700;
  color: var(--tx-2);
  transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease),
              background var(--dur) var(--ease);
}
.pager__link:hover { border-color: var(--brass); color: var(--brass-text); }
.pager__link[aria-current] { background: var(--ink); border-color: var(--ink); color: var(--brass); }
.pager__gap { color: var(--tx-3); padding-inline: var(--s1); }

/* --------------------------------------------------------------------------
   18. Footer
   -------------------------------------------------------------------------- */

.footer { background: var(--ink); color: var(--on-ink-3); }
.footer__top {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr));
  gap: clamp(1.75rem, 1rem + 3vw, 3rem);
  padding-block: clamp(2.75rem, 1.75rem + 3.5vw, 4.25rem) var(--s7);
}
@media (max-width: 980px) { .footer__top { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .footer__top { grid-template-columns: minmax(0, 1fr); } }

.footer__brand { display: flex; align-items: center; gap: var(--s3); margin-bottom: var(--s4); }
.footer__brand img { block-size: 38px; inline-size: auto; }
.footer__brand span {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--on-ink);
  border-inline-start: var(--rule-ink);
  padding-inline-start: var(--s3);
}
.footer__about { font-size: var(--t-sm); line-height: 1.95; max-width: 24rem; margin-bottom: var(--s5); }
.footer__contact { display: grid; gap: var(--s2); font-size: var(--t-sm); }
.footer__contact a { color: var(--brass); font-weight: 700; }
.footer__row { display: flex; align-items: flex-start; gap: var(--s2); }
.footer__row .ic { color: var(--brass); flex: none; margin-top: 0.28rem; }

.footer__cap {
  font-size: var(--t-label);
  font-weight: 700;
  letter-spacing: 0.09em;
  color: var(--on-ink);
  margin-bottom: var(--s4);
  padding-bottom: var(--s2);
  border-bottom: var(--rule-ink);
}
.footer__list { display: grid; gap: 0.55rem; font-size: var(--t-sm); }
/* Two columns on a phone: these lists are short links, and one per line turns
   the footer into a scroll of its own. */
@media (max-width: 620px) {
  .footer__list { grid-template-columns: 1fr 1fr; gap: 0.55rem var(--s4); }
}
.footer__list a { color: var(--on-ink-3); }
.footer__list a:hover { color: var(--brass); }

.socials { display: flex; gap: var(--s2); margin-top: var(--s5); }
.socials a {
  inline-size: 38px;
  block-size: 38px;
  display: grid;
  place-items: center;
  border: var(--rule-ink);
  color: var(--on-ink-3);
  transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease),
              background var(--dur) var(--ease);
}
.socials a:hover { border-color: var(--brass); color: var(--ink); background: var(--brass); }

.footer__bottom {
  border-top: var(--rule-ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
  flex-wrap: wrap;
  padding-block: var(--s4);
  font-size: var(--t-xs);
  color: #6e778c;
}
.footer__seal {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  color: var(--brass);
  letter-spacing: 0.14em;
  font-size: var(--t-label);
}

/* Floating call button (mobile) */
.callbar {
  position: fixed;
  inset-inline: 0;
  inset-block-end: 0;
  z-index: 80;
  display: none;
  background: var(--ink);
  border-top: 1px solid var(--brass);
}
.callbar a {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  padding: 0.85rem;
  font-size: var(--t-sm);
  font-weight: 700;
  color: var(--on-ink);
}
.callbar a + a { border-inline-start: var(--rule-ink); color: var(--brass); }

@media (max-width: 720px) {
  .callbar { display: flex; }
  body { padding-bottom: 3.4rem; }
}

/* --------------------------------------------------------------------------
   19. Utility
   -------------------------------------------------------------------------- */

.muted { color: var(--tx-3); }
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.empty {
  padding: var(--s8) var(--s5);
  text-align: center;
  border: 1px dashed var(--tx-line);
  color: var(--tx-3);
  font-size: var(--t-sm);
}

/* Archive filter bar. Presented as one panel so the row of categories reads as
   a deliberate control strip rather than loose buttons on the page. */
.filters {
  display: flex;
  align-items: center;
  gap: var(--s5);
  margin-bottom: var(--s7);
  padding: var(--s4) var(--s5);
  background: var(--white);
  border: var(--rule);
  border-inline-start: 3px solid var(--brass);
}
.filters .chips { flex: 1 1 auto; min-inline-size: 0; }
.filters__search {
  display: flex;
  gap: var(--s2);
  flex: 0 0 auto;
  inline-size: min(17rem, 100%);
}
.filters__search .input { min-inline-size: 0; background: var(--paper); }

@media (max-width: 900px) {
  .filters {
    flex-direction: column;
    align-items: stretch;
    gap: var(--s4);
    padding: var(--s4);
  }
  .filters__search { inline-size: 100%; }
}

.chips { display: flex; flex-wrap: wrap; gap: var(--s2); }
.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  padding: 0.46rem 0.9rem;
  border: 1px solid var(--tx-line);
  background: var(--paper);
  font-size: var(--t-xs);
  font-weight: 700;
  color: var(--tx-2);
  transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease),
              background var(--dur) var(--ease);
}
.chip:hover {
  border-color: var(--brass);
  background: var(--white);
  color: var(--brass-text);
}
.chip[aria-current] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--brass);
}
.chip__n {
  font-weight: 700;
  font-size: var(--t-label);
  color: var(--tx-3);
  background: var(--white);
  padding: 0.05rem 0.34rem;
  min-inline-size: 1.35rem;
  text-align: center;
}
.chip[aria-current] .chip__n { color: var(--brass); background: rgba(245, 242, 235, 0.12); }

/* --------------------------------------------------------------------------
   20. Motion
   -------------------------------------------------------------------------- */

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.reveal {
  opacity: 0;
  transform: translateY(14px);
}
.reveal.is-in {
  opacity: 1;
  transform: none;
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
}
.reveal.is-in:nth-child(2) { transition-delay: 0.06s; }
.reveal.is-in:nth-child(3) { transition-delay: 0.12s; }
.reveal.is-in:nth-child(4) { transition-delay: 0.18s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .marquee__track { animation: none; }
}

/* --------------------------------------------------------------------------
   21. Print
   -------------------------------------------------------------------------- */

@media print {
  .topbar, .header, .drawer, .callbar, .band, .footer__top,
  .doc__rail, .consult, .progress { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .prose { max-width: none; }
  .prose a::after { content: " (" attr(href) ")"; font-size: 9pt; color: #555; }
}

/* Contact map */
.mapbox { margin-top: 2.5rem; border: var(--rule); background: var(--paper-2); }
.mapbox iframe { inline-size: 100%; block-size: min(48vh, 380px); border: 0; display: block; }
.mapbox__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s2) var(--s4);
  padding: var(--s3) var(--s4);
  border-top: var(--rule);
  font-size: var(--t-sm);
  color: var(--tx-2);
}

/* A three-up grid that becomes a swipeable rail on a phone, so a trailing
   "related reading" block costs one screen instead of three. */
@media (max-width: 620px) {
  .grid--swipe {
    display: grid;
    /* .grid--3 sets explicit columns; they must be cleared or the items fill
       those first and each card ends up a third of the viewport wide. */
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 78%;
    gap: var(--s4);
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-snap-type: x mandatory;
    padding-block-end: var(--s2);
    scrollbar-width: none;
  }
  .grid--swipe::-webkit-scrollbar { display: none; }
  .grid--swipe > * { scroll-snap-align: start; min-inline-size: 0; }
}
