/* حال منظومة بن حم · identity v1.4: ink bar, paper ground, the red only as the "down" signal */
@font-face { font-family: 'BH Alexandria'; src: url('/brand/fonts/Alexandria-700.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'BH Plex'; src: url('/brand/fonts/PlexAr-400.woff2') format('woff2'); font-weight: 400; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: 'BH Plex'; src: url('/brand/fonts/PlexAr-600.woff2') format('woff2'); font-weight: 600; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: 'BH Plex'; src: url('/brand/fonts/PlexLa-400.woff2') format('woff2'); font-weight: 400; font-display: swap; unicode-range: U+0000-024F, U+2000-206F; }
@font-face { font-family: 'BH Plex'; src: url('/brand/fonts/PlexLa-600.woff2') format('woff2'); font-weight: 600; font-display: swap; unicode-range: U+0000-024F, U+2000-206F; }

:root {
  --ink: #231f20; --ink-3: #2e2a2b; --steel: #5e6367; --paper: #f7f6f4; --paper-2: #efedea; --line: #dcd9d4;
  --white: #fff; --red: #ed1c24; --crimson: #6b080d;
  --up: #2f7d4f; --slow: #b07a1a; --down: var(--red); --nd: #e2dfda;
  --titles: 'BH Alexandria', system-ui, sans-serif; --body: 'BH Plex', system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root { --paper: #1a1718; --paper-2: #2e2a2b; --white: #231f20; --ink: #f2f0ed; --steel: #b4b7b9; --line: #3d3839; --nd: #3d3839; --up: #4caf78; --slow: #d9a441; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1rem/1.7 var(--body); }
.wrap { max-width: 56rem; margin-inline: auto; padding-inline: 1rem; }
.muted { color: var(--steel); }
bdi { unicode-bidi: isolate; font-variant-numeric: tabular-nums; }

.bar { background: #231f20; color: #fff; }
.bar__in { display: flex; align-items: center; gap: 0.9rem; min-height: 4rem; flex-wrap: wrap; padding-block: 0.5rem; }
.bar__in img { height: 2.1rem; width: auto; display: block; }
.bar__sys { padding-inline-start: 0.9rem; border-inline-start: 1px solid #3d3839; color: #c9cbcc; }
.bar__lang { margin-inline-start: auto; color: #fff; text-decoration: none; border: 1px solid #3d3839; border-radius: 999px; padding: 0.3rem 0.9rem; font-size: 0.9rem; }
.bar__lang:hover { background: #fff; color: #231f20; }

h1 { margin: 0; font: 700 clamp(1.3rem, 1rem + 1.4vw, 1.9rem)/1.35 var(--titles); }
h2 { margin: 2.2rem 0 0.8rem; font: 700 1.15rem/1.4 var(--titles); }
.sum { margin-top: 1.8rem; display: flex; gap: 1rem; align-items: center; padding: 1.2rem 1.3rem; background: var(--white);
  border: 1px solid var(--line); border-inline-start: 5px solid var(--up); border-radius: 12px; }
.sum p { margin: 0.2rem 0 0; color: var(--steel); font-size: 0.92rem; }
.sum__disc { flex: none; width: 2.4rem; height: 2.4rem; border-radius: 50%; background: var(--up); }
.sum--slow { border-inline-start-color: var(--slow); } .sum--slow .sum__disc { background: var(--slow); }
.sum--down { border-inline-start-color: var(--down); } .sum--down .sum__disc { background: var(--down); }

ul { list-style: none; margin: 0; padding: 0; }
.svcs { display: grid; gap: 0.75rem; }
.svc { background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 1rem 1.1rem 0.8rem; }
.svc__head { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.dot { flex: none; width: 0.75rem; height: 0.75rem; border-radius: 50%; }
.svc__name { font-weight: 600; }
.svc__domain { color: var(--steel); font-size: 0.85rem; direction: ltr; }
.svc__state { margin-inline-start: auto; font-weight: 600; font-size: 0.92rem; }
.svc__ms { color: var(--steel); font-size: 0.85rem; min-width: 4.5rem; text-align: end; }
.s-up { color: var(--up); } .s-slow { color: var(--slow); } .s-down { color: var(--down); }

/* the oldest day on the reading side, today at the end: right to left in Arabic, left to right in English */
.bars { margin-top: 0.8rem; display: grid; grid-template-columns: repeat(90, 1fr); gap: 2px; height: 2rem; }
.bars i { background: var(--up); border-radius: 2px; }
.bars i.sl { background: var(--slow); } .bars i.dn { background: var(--down); } .bars i.nd { background: var(--nd); }
.bars__legend { display: flex; justify-content: space-between; margin-top: 0.35rem; font-size: 0.78rem; color: var(--steel); }
@media (max-width: 560px) {
  .bars { grid-template-columns: repeat(30, 1fr); }
  .bars i:nth-child(-n+60) { display: none; }
  .svc__ms { display: none; }
  .d90 { display: none; }
}
@media (min-width: 561px) { .d30 { display: none; } }

.infra { background: var(--white); border: 1px solid var(--line); border-radius: 12px; }
.infra li { display: flex; align-items: center; gap: 0.6rem; padding: 0.7rem 1.1rem; border-top: 1px solid var(--line); }
.infra li:first-child { border-top: 0; }
.inc li { display: flex; gap: 1rem; flex-wrap: wrap; padding: 0.6rem 0; border-top: 1px solid var(--line); }
.inc__when { color: var(--steel); min-width: 9rem; }
.note { margin: 2.5rem 0 3rem; color: var(--steel); font-size: 0.85rem; max-width: 40rem; }
