/* HICHEM PUBLIC · final public-surface polish.
   This layer is intentionally small and loaded last. What used to live here
   was source repair applied from outside: hiding the preview/version stamp
   and correcting a list marker declared as an em dash. Both are now fixed
   where they are declared, so only script-specific corrections and bounded
   public-page additions live here. */

/* Evidence captures. The other plates reproduce an artifact as live text, which
   is the honest form when the artifact is text we control. A capture of a
   historical render, or of somebody else's public page, cannot be retyped
   without becoming a reconstruction of it, so those plates carry a raster and
   say so in the mast. The image is the artifact; it is never annotated, and it
   keeps the same frame, mast and caption as every other plate.
   Kept LTR in every edition: the pixels are a fixed record, not copy. */
.plate__capture{display:block;width:100%;height:auto;border:0}
[dir="rtl"] .plate__body--capture{direction:ltr}

/* Arabic SVG labels need Arabic geometry, not merely Arabic strings.
   The base node layout was authored LTR: a positive-x label grows to the right
   and a negative-x/end label grows to the left. Under RTL those growth
   directions reverse and the words run back through the node marker. Reversing
   the anchors restores the intended clearance while keeping every path and node
   at exactly the same coordinates. */
html[lang="ar"] svg text[data-t]{
  direction:rtl;
  unicode-bidi:plaintext;
  font-family:"Segoe UI",Tahoma,Arial,sans-serif;
  letter-spacing:0;
  text-transform:none;
}
html[lang="ar"] .hero__visual .node text[data-t]:not([text-anchor]),
html[lang="ar"] .home-map__mobile .node text[data-t]:not([text-anchor]){
  text-anchor:end;
}
html[lang="ar"] .hero__visual .node text[data-t][text-anchor="end"],
html[lang="ar"] .home-map__mobile .node text[data-t][text-anchor="end"]{
  text-anchor:start;
}

/* Invariant Latin names inside Arabic diagrams remain LTR. This is deliberately
   narrow: translated or dynamic station labels elsewhere are not captured here. */
html[lang="ar"] .home-map__visual .node text:not([data-t]),
html[lang="ar"] .systasys-constellation .hero-node text:not([data-t]){
  direction:ltr;
  unicode-bidi:isolate;
}

/* Legal and privacy surface.
   Same material language as the rest of HICHEM PUBLIC: paper, rule, graphite,
   oxide and measured space. No legal-template white box is introduced. */
body[data-room="legal"] .topbar__state{
  color:var(--oxide-text);
}
body[data-room="legal"] .surface-dock a{
  white-space:nowrap;
}

.legal-hero{
  padding-top:clamp(5rem,10vw,9rem);
  padding-bottom:clamp(4rem,8vw,7rem);
  border-bottom:1px solid var(--rule);
}
.legal-hero__grid{
  display:grid;
  grid-template-columns:minmax(0,1.05fr) minmax(18rem,.95fr);
  align-items:center;
  gap:clamp(2.5rem,7vw,7rem);
}
.legal-hero__claim{
  max-width:11ch;
  margin-top:clamp(1.1rem,2.5vw,2rem);
}
.legal-hero__claim span{
  display:block;
}
.legal-hero__lead{
  max-width:31rem;
  margin-top:clamp(1.5rem,3vw,2.25rem);
  font-family:var(--serif);
  font-size:clamp(1.08rem,1.8vw,1.35rem);
  line-height:1.55;
  color:var(--graphite);
}
.legal-mark{
  margin:0;
  min-width:0;
}
.legal-mark svg{
  display:block;
  width:100%;
  height:auto;
  overflow:visible;
}
.legal-mark__frame,
.legal-mark__rule,
.legal-mark__trace{
  fill:none;
  vector-effect:non-scaling-stroke;
}
.legal-mark__frame{stroke:var(--rule);stroke-width:1}
.legal-mark__rule{stroke:var(--rule-soft);stroke-width:1}
.legal-mark__trace{stroke:var(--oxide);stroke-width:1.4}
.legal-mark__node{fill:var(--paper);stroke:var(--ink);stroke-width:1.4}
.legal-mark text{
  fill:var(--graphite);
  font-family:var(--mono);
  font-size:10px;
  letter-spacing:.13em;
}

.legal-room{
  padding-block:clamp(4rem,8vw,7.5rem);
  border-bottom:1px solid var(--rule);
}
.legal-room__head{
  margin-bottom:clamp(2.5rem,5vw,4.5rem);
}
.legal-ledger{
  border-top:1px solid var(--ink);
}
.legal-ledger__row{
  display:grid;
  grid-template-columns:minmax(9rem,.34fr) minmax(0,1fr);
  gap:clamp(1.5rem,5vw,5rem);
  padding-block:clamp(1.35rem,2.5vw,2rem);
  border-bottom:1px solid var(--rule);
}
.legal-ledger__key,
.legal-boundaries__label,
.legal-card__index,
.legal-updated,
.legal-footer-note{
  font-family:var(--mono);
  font-size:.68rem;
  line-height:1.45;
  letter-spacing:.14em;
  text-transform:uppercase;
}
.legal-ledger__key{color:var(--graphite)}
.legal-ledger__row strong{
  display:block;
  margin-bottom:.45rem;
  font-size:clamp(1rem,1.45vw,1.15rem);
}
.legal-ledger__row p,
.legal-host address,
.legal-card p,
.legal-card li,
.legal-boundaries p,
.legal-english p{
  color:var(--graphite);
  line-height:1.65;
}
.legal-source{
  max-width:56rem;
  margin-top:clamp(2rem,4vw,3.25rem);
  padding-top:1rem;
  border-top:1px solid var(--rule-soft);
  font-family:var(--mono);
  font-size:.73rem;
  line-height:1.65;
  color:var(--graphite);
}
.legal-source a,
.legal-references a{
  color:var(--ink);
  text-underline-offset:.24em;
  text-decoration-thickness:1px;
}

.legal-host{
  position:relative;
  padding:clamp(2rem,5vw,4rem);
  border:1px solid var(--rule);
  background:linear-gradient(135deg,rgba(255,255,255,.2),rgba(24,24,21,.018));
}
.legal-host::before{
  content:"";
  position:absolute;
  inset:1rem auto 1rem 1rem;
  width:2px;
  background:var(--gold);
}
.legal-host__name{
  margin:0 0 1rem;
  font-size:clamp(1.4rem,3vw,2.15rem);
  font-weight:650;
}
.legal-host address{
  margin:0 0 1.5rem;
  font-style:normal;
}

.legal-room--privacy{
  background:linear-gradient(180deg,rgba(24,24,21,.018),transparent 44%);
}
.legal-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  border-top:1px solid var(--ink);
  border-left:1px solid var(--rule);
}
.legal-card{
  position:relative;
  min-height:18rem;
  padding:clamp(1.6rem,4vw,3rem);
  border-right:1px solid var(--rule);
  border-bottom:1px solid var(--rule);
}
.legal-card__index{
  display:block;
  margin-bottom:clamp(2rem,4vw,3.5rem);
  color:var(--oxide-text);
}
.legal-card h3{
  max-width:19ch;
  margin:0 0 1rem;
  font-size:clamp(1.15rem,2vw,1.55rem);
  line-height:1.25;
}
.legal-card p + p{margin-top:1rem}
.legal-card ul{
  margin:0;
  padding-left:1.15rem;
}
.legal-card li + li{margin-top:.45rem}

.legal-room--boundary{
  border-bottom-color:rgba(255,255,255,.12);
}
.legal-boundaries{
  border-top:1px solid rgba(255,255,255,.5);
}
.legal-boundaries>div{
  display:grid;
  grid-template-columns:minmax(8rem,.28fr) minmax(0,1fr);
  gap:clamp(1.5rem,5vw,5rem);
  padding-block:clamp(1.5rem,3vw,2.25rem);
  border-bottom:1px solid rgba(255,255,255,.14);
}
.legal-boundaries__label{color:var(--gold)}
.legal-boundaries p{color:rgba(251,248,241,.78)}

.legal-room--english .statement{
  margin-top:1rem;
}
.legal-english{
  max-width:43rem;
  margin-top:clamp(2rem,4vw,3rem);
}
.legal-english p{
  font-family:var(--serif);
  font-size:clamp(1.02rem,1.45vw,1.16rem);
}
.legal-english p + p{margin-top:1.15rem}

.legal-references{
  margin:0;
  padding:0;
  list-style:none;
  border-top:1px solid var(--ink);
}
.legal-references li{
  display:grid;
  grid-template-columns:4rem minmax(0,1fr);
  gap:1rem;
  align-items:baseline;
  padding-block:1.15rem;
  border-bottom:1px solid var(--rule);
}
.legal-references li>span{
  font-family:var(--mono);
  font-size:.68rem;
  letter-spacing:.14em;
  color:var(--oxide-text);
}
.legal-updated{
  margin-top:2rem;
  color:var(--graphite);
}
.footer__legal-current{
  display:block;
  margin-top:.35rem;
  font-family:var(--mono);
  font-size:.65rem;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:var(--graphite);
}
.legal-footer-note{
  margin:0;
  color:var(--graphite);
}

.footer__meta-links{
  display:flex;
  flex-wrap:wrap;
  gap:.65rem 1rem;
  align-items:center;
  margin-top:.55rem;
}
.footer__meta-links a{
  font-family:var(--mono);
  font-size:.64rem;
  letter-spacing:.1em;
  text-transform:uppercase;
  color:var(--graphite);
  text-decoration:none;
  border-bottom:1px solid var(--rule);
}
.footer__meta-links a:hover,
.footer__meta-links a:focus-visible{
  color:var(--ink);
  border-bottom-color:var(--oxide);
}

@media (max-width:52rem){
  .legal-hero__grid,
  .legal-grid{
    grid-template-columns:1fr;
  }
  .legal-mark{max-width:31rem;margin-inline:auto}
  .legal-grid{border-left:0}
  .legal-card{min-height:0;border-left:1px solid var(--rule)}
}

@media (max-width:40rem){
  .legal-hero{padding-top:4.25rem}
  .legal-ledger__row,
  .legal-boundaries>div{
    grid-template-columns:1fr;
    gap:.7rem;
  }
  .legal-ledger__key,
  .legal-boundaries__label{margin-bottom:.15rem}
  .legal-references li{grid-template-columns:2.5rem minmax(0,1fr)}
  .legal-host{padding-left:2rem}
}

@media (prefers-reduced-motion:reduce){
  body[data-room="legal"] *{scroll-behavior:auto}
}
