/* E-SPORTS AL AHSA 2026 · Command Center
   Design system built from the official event identity (proposal p.13):
   Mint #A7F7C9 · Bright green #00E676 (primary) · Light aqua green #5CF2B2
   Dark green #063D2B (dark backgrounds) · Deep black #071B14 · White #FFFFFF
   Wordmark: official E-SPORTS logotype (vector from e-sports.ai) · Support face: Montserrat */

@font-face { font-family: 'Plex Arabic'; src: url(/fonts/ibm-plex-sans-arabic-arabic-300-normal.woff2) format('woff2'); font-weight: 300; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: 'Plex Arabic'; src: url(/fonts/ibm-plex-sans-arabic-arabic-400-normal.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: 'Plex Arabic'; src: url(/fonts/ibm-plex-sans-arabic-arabic-500-normal.woff2) format('woff2'); font-weight: 500; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: 'Plex Arabic'; src: url(/fonts/ibm-plex-sans-arabic-arabic-600-normal.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: 'Plex Arabic'; src: url(/fonts/ibm-plex-sans-arabic-arabic-700-normal.woff2) format('woff2'); font-weight: 700; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: 'Montserrat'; src: url(/fonts/montserrat-latin-400-normal.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Montserrat'; src: url(/fonts/montserrat-latin-500-normal.woff2) format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Montserrat'; src: url(/fonts/montserrat-latin-600-normal.woff2) format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Montserrat'; src: url(/fonts/montserrat-latin-700-normal.woff2) format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Montserrat'; src: url(/fonts/montserrat-latin-800-normal.woff2) format('woff2'); font-weight: 800; font-display: swap; }
@font-face { font-family: 'JB Mono'; src: url(/fonts/jetbrains-mono-latin-400-normal.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'JB Mono'; src: url(/fonts/jetbrains-mono-latin-500-normal.woff2) format('woff2'); font-weight: 500; font-display: swap; }

:root {
  /* official palette */
  --mint: #A7F7C9;
  --green: #00E676;
  --aqua: #5CF2B2;
  --forest: #063D2B;
  --abyss: #071B14;
  --white: #FFFFFF;

  /* supporting neutrals derived from the palette (never pure black) */
  --bg: #061712;
  --bg-2: #08201A;
  --surface: #0A271E;
  --surface-2: #0D3024;
  --surface-3: #113A2C;
  --line: rgba(167, 247, 201, .10);
  --line-2: rgba(167, 247, 201, .18);
  --line-strong: rgba(167, 247, 201, .32);
  --text: #EAF7F0;
  --text-2: #A9C7B9;
  --text-3: #6F9283;
  --on-green: #04140E;

  /* status (supporting accents, used sparingly) */
  --s-done: var(--green);
  --s-progress: var(--aqua);
  --s-upcoming: #8FB3A3;
  --s-delayed: #FF6B5E;
  --s-approval: #F5C451;
  --s-blocked: #FF6B5E;

  --r-1: 4px;
  --r-2: 8px;
  --r-3: 14px;
  --cut: 14px;               /* angled corner, from the faceted pattern */
  --ease: cubic-bezier(.2, .8, .2, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
  --rail: 248px;
  --top: 64px;
  --f-ar: 'Plex Arabic', 'Montserrat', system-ui, sans-serif;
  --f-en: 'Montserrat', 'Plex Arabic', system-ui, sans-serif;
  --f-mono: 'JB Mono', ui-monospace, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  font-family: var(--f-ar);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}
html[lang="en"] body { font-family: var(--f-en); font-size: 14.5px; }
img, video, svg { max-width: 100%; display: block; }
/* default size for inline UI icons (24-grid line icons) */
svg[viewBox="0 0 24 24"] { width: 1.15em; height: 1.15em; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; display: inline-block; vertical-align: -0.2em; }
.file svg { width: 16px; height: 16px; color: var(--text-3); }
summary svg { display: inline-block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--green); color: var(--on-green); }
:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; border-radius: 2px; }
.num, .mono { font-family: var(--f-mono); font-feature-settings: 'tnum' 1, 'zero' 0; letter-spacing: -.01em; }
.en { font-family: var(--f-en); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* ------------------------------------------------------------------ environment layer */
.env {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(0, 230, 118, .07), transparent 60%),
    radial-gradient(900px 700px at -10% 110%, rgba(92, 242, 178, .05), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, #051410 100%);
}
.env svg { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .55; }
.env .grain {
  position: absolute; inset: -50%;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='.5'/></svg>");
  opacity: .035; mix-blend-mode: overlay;
}

/* ------------------------------------------------------------------ shell */
.shell { position: relative; z-index: 1; display: grid; grid-template-columns: var(--rail) 1fr; min-height: 100vh; }
.rail {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
  border-inline-end: 1px solid var(--line); background: linear-gradient(180deg, rgba(6, 23, 18, .92), rgba(6, 23, 18, .75));
  backdrop-filter: blur(14px); padding: 22px 14px 16px;
}
.rail .brand { display: flex; flex-direction: column; gap: 10px; padding: 4px 10px 22px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.rail .brand .wm { color: var(--white); width: 152px; }
.rail .brand .sub { font-size: 11.5px; color: var(--text-3); line-height: 1.4; }
.rail .brand .sub b { color: var(--mint); font-weight: 600; font-family: var(--f-mono); letter-spacing: .08em; }
.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; scrollbar-width: none; }
.nav a {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-2);
  color: var(--text-2); font-size: 14px; font-weight: 500; transition: background .25s var(--ease), color .25s var(--ease);
}
.nav a .ix { font-family: var(--f-mono); font-size: 10.5px; color: var(--text-3); width: 18px; text-align: center; transition: color .25s; }
.nav a svg { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.6; }
.nav a:hover { background: rgba(167, 247, 201, .05); color: var(--text); }
.nav a[aria-current="page"] { color: var(--white); background: linear-gradient(90deg, rgba(0, 230, 118, .14), rgba(0, 230, 118, .02)); }
html[dir="rtl"] .nav a[aria-current="page"] { background: linear-gradient(270deg, rgba(0, 230, 118, .14), rgba(0, 230, 118, .02)); }
.nav a[aria-current="page"]::before {
  content: ''; position: absolute; inset-inline-start: -14px; top: 9px; bottom: 9px; width: 3px; background: var(--green); border-radius: 0 3px 3px 0;
}
html[dir="rtl"] .nav a[aria-current="page"]::before { border-radius: 3px 0 0 3px; }
.nav a[aria-current="page"] .ix { color: var(--green); }
.nav .badge { margin-inline-start: auto; }
.nav .sep { height: 1px; background: var(--line); margin: 10px 8px; }
.rail .foot { border-top: 1px solid var(--line); padding-top: 14px; display: grid; gap: 10px; }
.partners { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 8px; opacity: .8; }
.partners img { height: 30px; width: auto; }
.partners img.gt { height: 34px; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20; height: var(--top); display: flex; align-items: center; gap: 14px; padding: 0 28px;
  background: rgba(6, 23, 18, .72); backdrop-filter: blur(16px) saturate(1.2); border-bottom: 1px solid var(--line);
}
.crumbs { display: flex; align-items: center; gap: 10px; min-width: 0; color: var(--text-3); font-size: 13px; }
.crumbs b { color: var(--text); font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .grow { flex: 1; }
.search { position: relative; width: min(340px, 34vw); }
.search input {
  width: 100%; height: 38px; padding: 0 38px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(10, 39, 30, .6);
  font-size: 13.5px; transition: border-color .2s, background .2s;
}
.search input::placeholder { color: var(--text-3); }
.search input:focus { outline: none; border-color: var(--green); background: var(--surface); }
.search > svg { position: absolute; inset-inline-start: 13px; top: 11px; width: 16px; height: 16px; stroke: var(--text-3); fill: none; stroke-width: 1.8; }
.search .results {
  position: absolute; top: 46px; inset-inline: 0; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-3);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .6); padding: 6px; max-height: 60vh; overflow: auto; z-index: 40;
}
.search .results a { display: flex; gap: 10px; align-items: center; padding: 9px 10px; border-radius: var(--r-2); font-size: 13.5px; }
.search .results a:hover, .search .results a.on { background: var(--surface-2); }
.search .results .t { font-family: var(--f-mono); font-size: 10px; text-transform: uppercase; color: var(--green); letter-spacing: .08em; min-width: 64px; }
.icon-btn {
  display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 999px; border: 1px solid var(--line-2);
  background: transparent; cursor: pointer; transition: border-color .2s, background .2s; position: relative; flex: none;
}
.icon-btn:hover { border-color: var(--line-strong); background: rgba(167, 247, 201, .05); }
.icon-btn svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.7; }
.lang-btn { font-family: var(--f-mono); font-size: 12px; width: auto; padding: 0 12px; letter-spacing: .06em; }
.me { display: flex; align-items: center; gap: 10px; padding: 4px 4px 4px 12px; border-radius: 999px; border: 1px solid var(--line-2); cursor: pointer; background: none; }
html[dir="rtl"] .me { padding: 4px 12px 4px 4px; }
.me .nm { font-size: 13px; font-weight: 600; line-height: 1.1; text-align: start; }
.me .rl { font-size: 10.5px; color: var(--text-3); font-family: var(--f-mono); letter-spacing: .06em; text-transform: uppercase; }
.avatar {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 12px; flex: none;
  background: linear-gradient(135deg, var(--forest), #0F5A3F); color: var(--mint); border: 1px solid var(--line-2);
}
.avatar.client { background: linear-gradient(135deg, #1E3A33, #2C5247); color: var(--white); }
.avatar.lg { width: 40px; height: 40px; font-size: 14px; }
.menu {
  position: absolute; top: 54px; inset-inline-end: 24px; min-width: 220px; background: var(--surface); border: 1px solid var(--line-2);
  border-radius: var(--r-3); padding: 6px; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .6); z-index: 50;
}
.menu button, .menu a { display: block; width: 100%; text-align: start; padding: 9px 12px; border: 0; background: none; border-radius: var(--r-2); cursor: pointer; font-size: 13.5px; }
.menu button:hover, .menu a:hover { background: var(--surface-2); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 4px; }

.banner {
  display: flex; align-items: center; gap: 12px; padding: 10px 28px; font-size: 13.5px; border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(0, 230, 118, .12), rgba(0, 230, 118, .03));
}
.banner .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(0, 230, 118, .18); flex: none; }

.view { padding: 28px 28px 80px; width: 100%; max-width: 1480px; margin: 0 auto; }
.view-enter { animation: viewIn .55s var(--ease) both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(10px); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }

/* ------------------------------------------------------------------ section heads */
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; flex-wrap: wrap; }
.head h1 { margin: 0; font-size: clamp(24px, 2.4vw, 32px); line-height: 1.2; font-weight: 700; letter-spacing: -.01em; }
.head .kick { display: flex; align-items: center; gap: 10px; font-family: var(--f-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--green); margin-bottom: 8px; }
.head .kick::before { content: ''; width: 18px; height: 1px; background: var(--green); }
.head p { margin: 6px 0 0; color: var(--text-2); max-width: 70ch; }
.head .actions { display: flex; gap: 10px; flex-wrap: wrap; }

.label {
  display: flex; align-items: center; gap: 10px; font-size: 11px; font-family: var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--text-3);
}
html[lang="ar"] .label { font-family: var(--f-ar); letter-spacing: 0; font-size: 12.5px; text-transform: none; font-weight: 500; }
.label .ix { color: var(--green); font-family: var(--f-mono); font-size: 11px; letter-spacing: .1em; }
.label .rule { flex: 1; height: 1px; background: var(--line); }

/* ------------------------------------------------------------------ panels (faceted, not "cards") */
.panel {
  position: relative; background: linear-gradient(180deg, rgba(13, 48, 36, .55), rgba(10, 39, 30, .35));
  border: 1px solid var(--line); border-radius: var(--r-3); padding: 20px;
}
.panel.cut { clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%); border-radius: 0; }
html[dir="rtl"] .panel.cut { clip-path: polygon(var(--cut) 0, 100% 0, 100% 100%, 0 100%, 0 var(--cut)); }
.panel > .label { margin-bottom: 16px; }
.panel.flush { padding: 0; overflow: hidden; }

/* ------------------------------------------------------------------ buttons & inputs */
.btn {
  --b: var(--line-2);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 18px; border-radius: 999px;
  border: 1px solid var(--b); background: transparent; cursor: pointer; font-weight: 600; font-size: 13.5px; white-space: nowrap;
  transition: transform .2s var(--ease), background .2s, border-color .2s, color .2s, box-shadow .3s;
}
.btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.btn:hover { border-color: var(--line-strong); background: rgba(167, 247, 201, .06); }
.btn:active { transform: translateY(1px) scale(.99); }
.btn.primary { background: var(--green); border-color: var(--green); color: var(--on-green); }
.btn.primary:hover { background: #2BF08C; box-shadow: 0 10px 30px -10px rgba(0, 230, 118, .55); }
.btn.ghost { border-color: transparent; }
.btn.danger { color: #FF8A80; border-color: rgba(255, 107, 94, .35); }
.btn.danger:hover { background: rgba(255, 107, 94, .1); }
.btn.sm { height: 32px; padding: 0 12px; font-size: 12.5px; }
.btn[disabled], .btn.loading { opacity: .55; pointer-events: none; }
.btn.loading::after { content: ''; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-top-color: transparent; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.field { display: grid; gap: 6px; }
.field > span { font-size: 12.5px; color: var(--text-2); font-weight: 500; }
.field .hint { font-size: 12px; color: var(--text-3); }
.field .err { font-size: 12px; color: #FF8A80; }
.input, .select, .textarea {
  width: 100%; min-height: 42px; padding: 9px 13px; border-radius: var(--r-2); border: 1px solid var(--line-2); background: rgba(6, 23, 18, .6);
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.textarea { min-height: 110px; resize: vertical; line-height: 1.6; }
.select { appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23A9C7B9' stroke-width='2'><path d='m6 9 6 6 6-6'/></svg>"); background-repeat: no-repeat; background-position: right 12px center; padding-inline-end: 34px; }
html[dir="rtl"] .select { background-position: left 12px center; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(0, 230, 118, .14); background: var(--bg-2); }
.input[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: #FF6B5E; }
.input[type="date"] { color-scheme: dark; }
.check { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 13.5px; color: var(--text-2); }
.check input { width: 18px; height: 18px; accent-color: var(--green); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.form { display: grid; gap: 16px; }
.range { width: 100%; accent-color: var(--green); }

.seg { display: inline-flex; padding: 3px; border: 1px solid var(--line-2); border-radius: 999px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: none; padding: 6px 14px; border-radius: 999px; font-size: 12.5px; cursor: pointer; color: var(--text-2); font-weight: 500; transition: background .2s, color .2s; }
.seg button[aria-pressed="true"] { background: var(--surface-3); color: var(--white); }
.seg button:hover { color: var(--white); }

.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 18px; }
.toolbar .input, .toolbar .select { min-height: 38px; width: auto; }
.toolbar .input { min-width: 220px; }

/* ------------------------------------------------------------------ chips & status */
.chip {
  --c: var(--text-3);
  display: inline-flex; align-items: center; gap: 7px; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 11.5px; font-weight: 600;
  color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); border: 1px solid color-mix(in srgb, var(--c) 28%, transparent); white-space: nowrap;
}
.chip::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--c); }
.chip.plain::before { display: none; }
.chip.completed, .chip.done, .chip.approved, .chip.published, .chip.on_track { --c: var(--s-done); }
.chip.in_progress, .chip.open, .chip.review, .chip.live { --c: var(--s-progress); }
.chip.upcoming, .chip.todo, .chip.draft, .chip.reference, .chip.resolved, .chip.archived { --c: var(--s-upcoming); }
.chip.delayed, .chip.blocked, .chip.rejected, .chip.critical { --c: var(--s-delayed); }
.chip.needs_approval, .chip.pending, .chip.changes_requested, .chip.at_risk, .chip.high { --c: var(--s-approval); }
.chip.awaiting, .chip.awaiting_input, .chip.unreported, .chip.low, .chip.normal { --c: #7FA697; }
.chip.live::before { animation: pulse 1.6s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--c) 60%, transparent); } 100% { box-shadow: 0 0 0 8px transparent; } }
.badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--green); color: var(--on-green); font-size: 11px; font-weight: 700; display: inline-grid; place-items: center; font-family: var(--f-mono); }
.await { color: var(--text-3); font-style: normal; display: inline-flex; align-items: center; gap: 8px; font-size: 13px; }
.await::before { content: ''; width: 14px; height: 1px; background: currentColor; opacity: .7; }

.bar { position: relative; height: 4px; border-radius: 4px; background: rgba(167, 247, 201, .1); overflow: hidden; }
.bar > i { position: absolute; inset-block: 0; inset-inline-start: 0; width: 0; background: linear-gradient(90deg, var(--aqua), var(--green)); border-radius: 4px; transition: width 1.2s var(--ease); }
html[dir="rtl"] .bar > i { background: linear-gradient(270deg, var(--aqua), var(--green)); }
.bar.null { background: repeating-linear-gradient(90deg, rgba(167, 247, 201, .12) 0 6px, transparent 6px 10px); }

/* ------------------------------------------------------------------ overview: the stage */
.stage {
  position: relative; border-radius: 22px; overflow: hidden; min-height: 460px; isolation: isolate; border: 1px solid var(--line);
  display: grid; grid-template-columns: 1.25fr 1fr; background: var(--abyss);
}
.stage .bgimg { position: absolute; inset: 0; z-index: -2; }
.stage .bgimg img { width: 100%; height: 100%; object-fit: cover; opacity: .38; transform: scale(1.06); animation: drift 30s var(--ease-in-out) infinite alternate; filter: saturate(1.1); }
@keyframes drift { to { transform: scale(1.12) translate3d(-1.5%, -1%, 0); } }
.stage::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(7, 27, 20, .96) 0%, rgba(7, 27, 20, .82) 42%, rgba(7, 27, 20, .45) 100%),
    linear-gradient(0deg, rgba(7, 27, 20, .95) 0%, transparent 45%);
}
html[dir="rtl"] .stage::before {
  background:
    linear-gradient(270deg, rgba(7, 27, 20, .96) 0%, rgba(7, 27, 20, .82) 42%, rgba(7, 27, 20, .45) 100%),
    linear-gradient(0deg, rgba(7, 27, 20, .95) 0%, transparent 45%);
}
.stage .shards { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.stage .shards polygon { transform-box: fill-box; transform-origin: center; }
.stage .swoosh { position: absolute; z-index: -1; inset-inline-end: -40px; bottom: -30px; width: 62%; opacity: .9; pointer-events: none; }
html[dir="rtl"] .stage .swoosh { transform: scaleX(-1); }
.stage .left { padding: 38px 40px 34px; display: flex; flex-direction: column; gap: 22px; }
.stage .right { padding: 34px 40px; display: flex; flex-direction: column; justify-content: space-between; gap: 24px; border-inline-start: 1px solid var(--line); background: linear-gradient(180deg, rgba(6, 23, 18, .35), rgba(6, 23, 18, .7)); backdrop-filter: blur(4px); }
.stage .ident { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.stage .ident .wm { width: clamp(220px, 26vw, 360px); color: var(--white); filter: drop-shadow(0 6px 30px rgba(0, 230, 118, .18)); }
.stage .ident .yr { font-family: var(--f-mono); font-size: 13px; color: var(--green); letter-spacing: .2em; border: 1px solid rgba(0, 230, 118, .4); padding: 4px 10px; border-radius: 999px; }
.stage h2 { margin: 0; font-size: clamp(18px, 1.7vw, 22px); font-weight: 600; color: var(--text); line-height: 1.5; max-width: 34ch; }
.stage .meta { display: flex; flex-wrap: wrap; gap: 8px 22px; color: var(--text-2); font-size: 13px; }
.stage .meta b { color: var(--white); font-weight: 600; }
.stage .meta span { display: inline-flex; align-items: center; gap: 8px; }
.stage .meta svg { width: 15px; height: 15px; stroke: var(--green); fill: none; stroke-width: 1.8; }

.count { display: grid; gap: 12px; margin-top: auto; }
.count .cap { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--text-2); flex-wrap: wrap; }
.count .digits { display: flex; align-items: flex-end; gap: clamp(10px, 1.6vw, 22px); direction: ltr; justify-content: flex-start; }
html[dir="rtl"] .count .digits { justify-content: flex-end; }
.count .unit { display: grid; gap: 6px; }
.count .unit .v {
  font-family: var(--f-mono); font-weight: 500; font-size: clamp(44px, 6vw, 84px); line-height: .9; color: var(--white); letter-spacing: -.04em;
  font-feature-settings: 'tnum' 1; display: flex; padding-top: .06em;
}
.count .unit .v span { display: inline-block; transition: transform .45s var(--ease), opacity .45s; }
.count .unit .v span.tick { animation: tick .45s var(--ease); }
@keyframes tick { from { transform: translateY(-40%); opacity: 0; } to { transform: none; opacity: 1; } }
.count .unit .k { font-size: 11px; font-family: var(--f-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--text-3); text-align: center; }
html[lang="ar"] .count .unit .k { font-family: var(--f-ar); letter-spacing: 0; font-size: 12.5px; }
.count .colon { font-family: var(--f-mono); font-size: clamp(30px, 4vw, 56px); color: var(--green); opacity: .55; line-height: 1; padding-bottom: 28px; }
.count.live .unit .v { color: var(--green); }

.ring { position: relative; width: 168px; height: 168px; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
html[dir="rtl"] .ring svg { transform: rotate(-90deg) scaleY(-1); }
.ring .trk { stroke: rgba(167, 247, 201, .1); }
.ring .val { stroke: url(#ringGrad); stroke-linecap: round; transition: stroke-dashoffset 1.6s var(--ease); }
.ring .ticks line { stroke: rgba(167, 247, 201, .25); }
.ring .c { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring .c .p { font-family: var(--f-mono); font-size: 40px; font-weight: 500; color: var(--white); line-height: 1; }
.ring .c .p small { font-size: 18px; color: var(--green); margin-inline-start: 2px; }
.ring .c .s { font-size: 11.5px; color: var(--text-3); margin-top: 6px; max-width: 110px; line-height: 1.35; }
.ring.null .c .p { font-size: 15px; color: var(--text-2); font-family: inherit; font-weight: 600; }

.statusline { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.statusline .k { font-size: 12px; color: var(--text-3); display: block; margin-bottom: 4px; }
.kv { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); }
.kv > div { padding: 14px 0 0; }
.kv > div + div { padding-inline-start: 16px; border-inline-start: 1px solid var(--line); }
.kv .k { font-size: 11.5px; color: var(--text-3); }
.kv .v { font-family: var(--f-mono); font-size: 22px; color: var(--white); line-height: 1.3; }
.kv .v small { font-size: 12px; color: var(--text-3); margin-inline-start: 4px; }

/* the mission track: oasis → arena, day by day */
.track { margin-top: 26px; }
.track .scroller { overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; scrollbar-color: var(--surface-3) transparent; }
.track .grid {
  position: relative; display: grid; grid-template-columns: 180px repeat(var(--days), minmax(38px, 1fr)); min-width: calc(180px + var(--days) * 40px);
  border: 1px solid var(--line); border-radius: var(--r-3); background: rgba(6, 23, 18, .5); overflow: hidden;
}
.track .dh {
  padding: 10px 0 8px; text-align: center; border-inline-start: 1px solid var(--line); font-family: var(--f-mono); font-size: 11px; color: var(--text-3); line-height: 1.3;
}
.track .dh b { display: block; font-size: 15px; color: var(--text-2); font-weight: 500; }
.track .dh.today b { color: var(--green); }
.track .dh.event { background: rgba(0, 230, 118, .05); }
.track .corner { padding: 12px 16px; font-size: 12px; color: var(--text-3); display: flex; align-items: flex-end; }
.track .rowlabel {
  padding: 9px 16px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  display: flex; align-items: center; gap: 10px; cursor: pointer;
}
.track .rowlabel .n { font-family: var(--f-mono); font-size: 10.5px; color: var(--text-3); width: 18px; }
.track .rowlabel:hover { color: var(--white); }
.track .cell { border-top: 1px solid var(--line); border-inline-start: 1px solid var(--line); position: relative; }
.track .cell.event { background: rgba(0, 230, 118, .03); }
.track .seg-bar {
  position: relative; z-index: 2; align-self: center; height: 16px; margin: 0 3px; border-radius: 3px; cursor: pointer;
  background: var(--sc, var(--s-upcoming)); opacity: .9; transform-origin: inline-start; animation: grow .9s var(--ease) both;
  transition: filter .2s, transform .2s;
}
.track .seg-bar:hover { filter: brightness(1.2); transform: scaleY(1.25); }
.track .seg-bar.unreported { background: repeating-linear-gradient(135deg, rgba(167, 247, 201, .35) 0 5px, rgba(167, 247, 201, .12) 5px 10px); }
.track .seg-bar.completed { --sc: var(--s-done); }
.track .seg-bar.in_progress { --sc: var(--s-progress); }
.track .seg-bar.delayed { --sc: var(--s-delayed); }
.track .seg-bar.needs_approval { --sc: var(--s-approval); }
.track .seg-bar.upcoming { --sc: #5D7F71; }
.track .seg-bar .fill { position: absolute; inset-block: 0; inset-inline-start: 0; background: rgba(255, 255, 255, .35); border-radius: 3px; }
@keyframes grow { from { transform: scaleX(0); opacity: 0; } }
.track .now {
  position: absolute; top: 0; bottom: 0; width: 2px; background: var(--green); z-index: 3; pointer-events: none;
  box-shadow: 0 0 18px 2px rgba(0, 230, 118, .45);
}
.track .now::after {
  content: attr(data-label); position: absolute; top: 4px; inset-inline-start: 6px; font-family: var(--f-mono); font-size: 10px; color: var(--on-green);
  background: var(--green); padding: 1px 6px; border-radius: 3px; white-space: nowrap;
}
.legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 12px; font-size: 12px; color: var(--text-3); }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend i { width: 14px; height: 8px; border-radius: 2px; background: var(--c); }
.legend i.stripe { background: repeating-linear-gradient(135deg, rgba(167, 247, 201, .4) 0 3px, rgba(167, 247, 201, .12) 3px 6px); }

/* overview lower grid */
.ov-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 18px; margin-top: 18px; }
.span-4 { grid-column: span 4; } .span-5 { grid-column: span 5; } .span-6 { grid-column: span 6; } .span-7 { grid-column: span 7; } .span-8 { grid-column: span 8; } .span-12 { grid-column: span 12; }

.list { display: grid; }
.list > * { border-top: 1px solid var(--line); }
.list > *:first-child { border-top: 0; }
.li { display: flex; align-items: center; gap: 14px; padding: 12px 2px; min-width: 0; transition: background .2s; border-radius: 6px; }
a.li:hover { background: rgba(167, 247, 201, .04); }
.li .main-t { flex: 1; min-width: 0; }
.li .main-t b { display: block; font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li .main-t small { color: var(--text-3); font-size: 12px; }
.li .when { font-family: var(--f-mono); font-size: 12px; color: var(--text-2); text-align: end; white-space: nowrap; }
.li .when b { display: block; font-size: 18px; color: var(--white); font-weight: 500; }

.mile { display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; align-items: center; padding: 14px 0; }
.mile .d { text-align: center; border: 1px solid var(--line-2); border-radius: 10px; padding: 6px 0; line-height: 1.1; }
.mile .d b { display: block; font-family: var(--f-mono); font-size: 22px; font-weight: 500; color: var(--white); }
.mile .d small { font-size: 11px; color: var(--text-3); }
.mile .t b { font-weight: 600; font-size: 14px; display: block; }
.mile .t small { color: var(--text-3); font-size: 12px; }
.mile .cd { font-family: var(--f-mono); font-size: 12.5px; color: var(--mint); text-align: end; direction: ltr; }
.mile.first .d { border-color: var(--green); box-shadow: inset 0 0 0 1px rgba(0, 230, 118, .3); }

.feed { display: grid; }
.feed .it { display: grid; grid-template-columns: 14px 1fr; gap: 12px; padding: 10px 0; position: relative; }
.feed .it::before { content: ''; position: absolute; inset-inline-start: 6px; top: 26px; bottom: -6px; width: 1px; background: var(--line); }
.feed .it:last-child::before { display: none; }
.feed .it .dot { width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--green); margin-top: 8px; background: var(--bg); }
.feed .it.client .dot { border-color: var(--mint); background: var(--mint); }
.feed .it p { margin: 0; font-size: 13.5px; }
.feed .it small { color: var(--text-3); font-size: 12px; }

.empty {
  display: grid; place-items: center; text-align: center; gap: 10px; padding: 34px 18px; color: var(--text-3); font-size: 13.5px;
  border: 1px dashed var(--line-2); border-radius: var(--r-3);
}
.empty svg { width: 54px; height: 54px; opacity: .7; }
.empty b { color: var(--text-2); font-weight: 600; font-size: 14.5px; }
.empty.big { padding: 70px 20px; }

.report-teaser { display: grid; gap: 10px; }
.report-teaser h3 { margin: 0; font-size: 18px; }
.report-teaser p { margin: 0; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }

/* ------------------------------------------------------------------ timeline */
.tl { position: relative; display: grid; gap: 0; }
.tl-stage { display: grid; grid-template-columns: 200px 1fr; gap: 0; border-top: 1px solid var(--line); }
.tl-stage:first-child { border-top: 0; }
.tl-stage .sname { padding: 22px 0; position: sticky; top: calc(var(--top) + 10px); align-self: start; }
.tl-stage .sname b { display: block; font-size: 18px; font-weight: 700; }
.tl-stage .sname small { font-family: var(--f-mono); color: var(--text-3); font-size: 11.5px; letter-spacing: .08em; }
.tl-items { position: relative; padding-inline-start: 34px; }
.tl-items::before { content: ''; position: absolute; inset-inline-start: 10px; top: 0; bottom: 0; width: 1px; background: linear-gradient(180deg, var(--line-2), var(--line)); }
.ph {
  position: relative; display: grid; grid-template-columns: 1fr auto; gap: 8px 20px; padding: 18px 20px; margin: 12px 0; border-radius: var(--r-3);
  border: 1px solid var(--line); background: rgba(10, 39, 30, .45); cursor: pointer; transition: border-color .25s, background .25s, transform .3s var(--ease);
}
.ph:hover { border-color: var(--line-strong); background: rgba(13, 48, 36, .6); }
.ph::before {
  content: ''; position: absolute; inset-inline-start: -29px; top: 26px; width: 11px; height: 11px; transform: rotate(45deg); border: 2px solid var(--sc, var(--text-3));
  background: var(--bg);
}
.ph.completed::before { background: var(--s-done); border-color: var(--s-done); }
.ph.in_progress { --sc: var(--s-progress); } .ph.in_progress::before { box-shadow: 0 0 0 5px rgba(92, 242, 178, .15); }
.ph.delayed { --sc: var(--s-delayed); } .ph.needs_approval { --sc: var(--s-approval); } .ph.completed { --sc: var(--s-done); }
.ph.today { border-color: rgba(0, 230, 118, .45); }
.ph .t b { font-size: 15.5px; font-weight: 600; display: block; }
.ph .t small { color: var(--text-3); font-size: 12.5px; }
.ph .facts { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 12.5px; color: var(--text-2); grid-column: 1 / -1; }
.ph .facts span { display: inline-flex; gap: 6px; align-items: center; }
.ph .facts svg { width: 14px; height: 14px; stroke: var(--text-3); fill: none; stroke-width: 1.8; }
.ph .side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.ph .prog { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 52px; gap: 12px; align-items: center; }
.ph .prog .pv { font-family: var(--f-mono); font-size: 12.5px; text-align: end; color: var(--text-2); }
.ph .notes { grid-column: 1 / -1; font-size: 13px; color: var(--text-2); border-inline-start: 2px solid var(--line-2); padding-inline-start: 12px; }
.ph .notes.internal { border-color: var(--s-approval); }
.ph .notes .lab { font-size: 11px; color: var(--text-3); display: block; }

/* ------------------------------------------------------------------ tasks */
.board { display: grid; grid-template-columns: repeat(5, minmax(240px, 1fr)); gap: 14px; overflow-x: auto; padding-bottom: 10px; }
.col { background: rgba(6, 23, 18, .4); border: 1px solid var(--line); border-radius: var(--r-3); padding: 12px; min-height: 200px; display: flex; flex-direction: column; gap: 10px; }
.col h4 { margin: 2px 4px 4px; font-size: 12.5px; display: flex; align-items: center; gap: 8px; color: var(--text-2); font-weight: 600; }
.col h4 .num { margin-inline-start: auto; color: var(--text-3); }
.tcard { display: grid; gap: 10px; padding: 14px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); cursor: pointer; transition: border-color .2s, transform .25s var(--ease), box-shadow .25s; }
.tcard:hover { border-color: var(--line-strong); transform: translateY(-2px); box-shadow: 0 16px 30px -18px rgba(0, 0, 0, .7); }
.tcard b { font-weight: 600; font-size: 13.5px; line-height: 1.45; }
.tcard .row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 11.5px; color: var(--text-3); }
.tcard .row .grow { flex: 1; }
.pri { width: 8px; height: 8px; border-radius: 2px; transform: rotate(45deg); display: inline-block; background: var(--c, #7FA697); }
.pri.high { --c: var(--s-approval); } .pri.critical { --c: var(--s-delayed); } .pri.low { --c: #4D6B5F; }
.overdue { color: #FF8A80 !important; }

.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: start; font-weight: 500; font-size: 12px; color: var(--text-3); padding: 10px 12px; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.table td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr.click { cursor: pointer; transition: background .2s; }
.table tr.click:hover td { background: rgba(167, 247, 201, .035); }
.table-wrap { overflow-x: auto; }

/* ------------------------------------------------------------------ detail drawer & modal */
.scrim { position: fixed; inset: 0; background: rgba(2, 10, 7, .62); backdrop-filter: blur(3px); z-index: 80; animation: fade .3s var(--ease); }
@keyframes fade { from { opacity: 0; } }
.drawer {
  position: fixed; top: 0; bottom: 0; inset-inline-end: 0; width: min(640px, 100vw); background: var(--bg-2); border-inline-start: 1px solid var(--line-2);
  z-index: 90; display: flex; flex-direction: column; animation: slideIn .45s var(--ease); box-shadow: -40px 0 80px -30px rgba(0, 0, 0, .6);
}
html[dir="ltr"] .drawer { --from: 40px; } html[dir="rtl"] .drawer { --from: -40px; }
@keyframes slideIn { from { transform: translateX(var(--from)); opacity: 0; } }
.drawer header { display: flex; align-items: flex-start; gap: 14px; padding: 22px 24px 16px; border-bottom: 1px solid var(--line); }
.drawer header h2 { margin: 0; font-size: 20px; line-height: 1.35; flex: 1; }
.drawer .body { flex: 1; overflow-y: auto; padding: 20px 24px 40px; display: grid; gap: 22px; align-content: start; }
.drawer footer { padding: 14px 24px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.modal {
  position: fixed; z-index: 95; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(620px, calc(100vw - 32px)); max-height: calc(100vh - 48px);
  background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 18px; display: flex; flex-direction: column; animation: pop .35s var(--ease);
  box-shadow: 0 40px 100px -30px rgba(0, 0, 0, .8);
}
.modal.wide { width: min(900px, calc(100vw - 32px)); }
@keyframes pop { from { opacity: 0; transform: translate(-50%, -46%) scale(.98); } }
.modal header { padding: 20px 24px 14px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.modal header h2 { margin: 0; font-size: 18px; flex: 1; }
.modal .body { padding: 20px 24px; overflow-y: auto; }
.modal footer { padding: 14px 24px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; }
.dl { display: grid; grid-template-columns: 140px 1fr; gap: 10px 16px; font-size: 13.5px; margin: 0; }
.dl dt { color: var(--text-3); }
.dl dd { margin: 0; }
.prose { white-space: pre-wrap; line-height: 1.75; color: var(--text); font-size: 14px; margin: 0; }

.comments { display: grid; gap: 14px; }
.cmt { display: grid; grid-template-columns: 32px 1fr; gap: 12px; }
.cmt .bubble { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; }
.cmt.internal .bubble { border-color: rgba(245, 196, 81, .35); background: rgba(245, 196, 81, .05); }
.cmt .who { font-size: 12px; color: var(--text-3); display: flex; gap: 8px; align-items: center; margin-bottom: 4px; flex-wrap: wrap; }
.cmt .who b { color: var(--text); font-weight: 600; font-size: 13px; }
.cmt p { margin: 0; white-space: pre-wrap; font-size: 13.5px; }

.files { display: grid; gap: 8px; }
.file { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 13px; transition: border-color .2s, background .2s; }
.file:hover { border-color: var(--line-strong); background: rgba(167, 247, 201, .03); }
.file .ext { font-family: var(--f-mono); font-size: 10px; text-transform: uppercase; padding: 4px 6px; border-radius: 4px; background: var(--surface-3); color: var(--mint); min-width: 40px; text-align: center; }
.file .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file small { color: var(--text-3); font-family: var(--f-mono); font-size: 11px; }
.drop {
  display: grid; place-items: center; gap: 6px; padding: 22px; border: 1.5px dashed var(--line-strong); border-radius: 12px; text-align: center; cursor: pointer;
  color: var(--text-2); font-size: 13px; transition: border-color .2s, background .2s;
}
.drop:hover, .drop.over { border-color: var(--green); background: rgba(0, 230, 118, .05); }
.drop input { display: none; }
.drop svg { width: 26px; height: 26px; stroke: var(--green); fill: none; stroke-width: 1.6; }
.picked { display: grid; gap: 6px; margin-top: 8px; font-size: 12.5px; color: var(--text-2); }

/* ------------------------------------------------------------------ communication center */
.comms { display: grid; grid-template-columns: 380px 1fr; gap: 0; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; min-height: calc(100vh - var(--top) - 170px); background: rgba(6, 23, 18, .45); }
.comms .threads { border-inline-end: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.comms .threads .tools { padding: 14px; border-bottom: 1px solid var(--line); display: grid; gap: 10px; }
.comms .threads .scroll { overflow-y: auto; flex: 1; max-height: calc(100vh - var(--top) - 300px); }
.th { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); cursor: pointer; transition: background .2s; position: relative; }
.th:hover { background: rgba(167, 247, 201, .035); }
.th[aria-current="true"] { background: linear-gradient(90deg, rgba(0, 230, 118, .1), transparent); }
html[dir="rtl"] .th[aria-current="true"] { background: linear-gradient(270deg, rgba(0, 230, 118, .1), transparent); }
.th[aria-current="true"]::before { content: ''; position: absolute; inset-inline-start: 0; top: 0; bottom: 0; width: 3px; background: var(--green); }
.th .k { font-family: var(--f-mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--green); }
html[lang="ar"] .th .k { font-family: var(--f-ar); letter-spacing: 0; font-size: 11.5px; text-transform: none; }
.th b { font-weight: 600; font-size: 14px; grid-column: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.th.unread b { color: var(--white); }
.th .pv { grid-column: 1 / -1; color: var(--text-3); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.th time { font-family: var(--f-mono); font-size: 11px; color: var(--text-3); }
.conv { display: flex; flex-direction: column; min-height: 0; }
.conv header { padding: 18px 24px; border-bottom: 1px solid var(--line); display: grid; gap: 8px; }
.conv header h2 { margin: 0; font-size: 19px; }
.conv .msgs { flex: 1; overflow-y: auto; padding: 22px 24px; display: grid; gap: 16px; align-content: start; max-height: calc(100vh - var(--top) - 360px); }
.msg { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; max-width: 760px; }
.msg.mine { margin-inline-start: auto; grid-template-columns: minmax(0, 1fr) 34px; }
.msg.mine .avatar { order: 2; }
.msg .bubble { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; }
.msg.mine .bubble { background: linear-gradient(180deg, rgba(0, 230, 118, .1), rgba(0, 230, 118, .05)); border-color: rgba(0, 230, 118, .25); }
.msg.client:not(.mine) .bubble { border-color: rgba(167, 247, 201, .25); }
.msg .who { font-size: 12px; color: var(--text-3); margin-bottom: 4px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.msg .who b { color: var(--text); font-size: 13px; }
.msg p { margin: 0; white-space: pre-wrap; font-size: 14px; line-height: 1.7; }
.msg.system { grid-template-columns: 1fr; text-align: center; max-width: none; }
.msg.system .bubble { background: none; border: 1px dashed var(--line-2); display: inline-block; justify-self: center; font-size: 13px; color: var(--text-2); }
.compose { border-top: 1px solid var(--line); padding: 14px 18px; display: grid; gap: 10px; }
.compose .row { display: flex; gap: 10px; align-items: flex-end; }
.compose textarea { min-height: 48px; max-height: 200px; }
.decision { margin: 0 24px 0; padding: 16px; border-radius: 14px; border: 1px solid rgba(245, 196, 81, .35); background: rgba(245, 196, 81, .05); display: grid; gap: 12px; }
.decision .opts { display: flex; gap: 8px; flex-wrap: wrap; }
.reads { font-size: 11.5px; color: var(--text-3); padding: 0 24px 10px; text-align: end; }

/* ------------------------------------------------------------------ reports */
.rgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.rcard { position: relative; display: grid; gap: 12px; padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: rgba(10, 39, 30, .45); overflow: hidden; transition: border-color .25s, transform .3s var(--ease); cursor: pointer; }
.rcard:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.rcard .type { font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--green); }
html[lang="ar"] .rcard .type { font-family: var(--f-ar); letter-spacing: 0; font-size: 12px; }
.rcard h3 { margin: 0; font-size: 16.5px; line-height: 1.45; }
.rcard .per { font-family: var(--f-mono); font-size: 12px; color: var(--text-2); }
.rcard .foot { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--text-3); }
.rcard::after { content: ''; position: absolute; inset-inline-end: -30px; top: -30px; width: 90px; height: 90px; background: linear-gradient(135deg, rgba(0, 230, 118, .25), transparent 60%); transform: rotate(45deg); }
.redit { display: grid; gap: 18px; }
.redit .sec { display: grid; gap: 8px; }
.redit .sec h3 { margin: 0; font-size: 14px; display: flex; gap: 10px; align-items: center; }
.redit .sec h3 .ix { font-family: var(--f-mono); color: var(--green); font-size: 11px; }

/* ------------------------------------------------------------------ media gallery */
.cats { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.masonry { columns: 3 320px; column-gap: 14px; }
.tile { break-inside: avoid; margin-bottom: 14px; position: relative; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); cursor: zoom-in; background: var(--surface); display: block; width: 100%; padding: 0; text-align: start; }
.tile img, .tile video { width: 100%; height: auto; transition: transform .8s var(--ease), filter .5s; }
.tile:hover img, .tile:hover video { transform: scale(1.04); }
.tile .cap { position: absolute; inset: auto 0 0 0; padding: 40px 14px 12px; background: linear-gradient(0deg, rgba(4, 16, 12, .92), transparent); font-size: 13px; }
.tile .cap b { display: block; font-weight: 600; }
.tile .cap small { color: var(--text-2); font-family: var(--f-mono); font-size: 11px; }
.tile .play { position: absolute; top: 12px; inset-inline-end: 12px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgba(4, 16, 12, .7); border: 1px solid var(--line-2); }
.tile .play svg { width: 14px; height: 14px; fill: var(--white); }
.concepts { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.concept { position: relative; aspect-ratio: 16 / 10; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); cursor: zoom-in; padding: 0; background: var(--surface); }
.concept img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.concept:hover img { transform: scale(1.06); }
.concept span { position: absolute; inset: auto 0 0 0; padding: 26px 12px 9px; background: linear-gradient(0deg, rgba(4, 16, 12, .9), transparent); font-size: 12.5px; font-weight: 600; text-align: start; }
.lightbox { position: fixed; inset: 0; z-index: 120; background: rgba(2, 8, 6, .94); display: grid; grid-template-rows: auto 1fr auto; animation: fade .3s var(--ease); }
.lightbox .lb-top { display: flex; align-items: center; gap: 12px; padding: 14px 20px; }
.lightbox .lb-top .grow { flex: 1; }
.lightbox .stagebox { display: grid; place-items: center; min-height: 0; padding: 0 70px; position: relative; }
.lightbox .stagebox img, .lightbox .stagebox video { max-height: calc(100vh - 170px); max-width: 100%; width: auto; border-radius: 10px; animation: pop2 .5s var(--ease); }
@keyframes pop2 { from { opacity: 0; transform: scale(.97); } }
.lightbox .nav-btn { position: absolute; top: 50%; transform: translateY(-50%); }
.lightbox .nav-btn.prev { inset-inline-start: 16px; } .lightbox .nav-btn.next { inset-inline-end: 16px; }
html[dir="rtl"] .lightbox .nav-btn svg { transform: scaleX(-1); }
.lightbox .lb-cap { padding: 14px 20px 22px; text-align: center; color: var(--text-2); font-size: 13.5px; }
.lightbox .lb-cap b { color: var(--white); display: block; font-size: 15px; }

/* ------------------------------------------------------------------ documents */
.doc-row .ttl { display: flex; align-items: center; gap: 12px; min-width: 0; }
.doc-row .ttl b { font-weight: 600; }
.doc-row .ttl small { color: var(--text-3); display: block; font-size: 12px; }
.vlist { display: grid; gap: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.vlist > div { display: grid; grid-template-columns: 54px 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; border-top: 1px solid var(--line); font-size: 13px; }
.vlist > div:first-child { border-top: 0; background: rgba(0, 230, 118, .05); }
.vlist .vn { font-family: var(--f-mono); color: var(--green); font-size: 14px; }

/* ------------------------------------------------------------------ toasts */
.toasts { position: fixed; bottom: 22px; inset-inline-end: 22px; display: grid; gap: 10px; z-index: 200; }
.toast {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line-2);
  box-shadow: 0 20px 40px -20px rgba(0, 0, 0, .7); font-size: 13.5px; animation: toastIn .4s var(--ease); max-width: 380px;
}
.toast.err { border-color: rgba(255, 107, 94, .45); }
.toast i { width: 8px; height: 8px; border-radius: 50%; background: var(--green); flex: none; }
.toast.err i { background: var(--s-delayed); }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } }

/* ------------------------------------------------------------------ loading */
.skel { border-radius: 10px; background: linear-gradient(90deg, rgba(167, 247, 201, .05), rgba(167, 247, 201, .1), rgba(167, 247, 201, .05)); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.boot { position: fixed; inset: 0; display: grid; place-items: center; z-index: 300; background: var(--abyss); transition: opacity .6s var(--ease), visibility .6s; }
.boot.done { opacity: 0; visibility: hidden; }
.boot .wm { width: 220px; color: var(--white); }
.boot .ln { height: 2px; width: 220px; margin-top: 18px; background: rgba(167, 247, 201, .12); overflow: hidden; border-radius: 2px; }
.boot .ln i { display: block; height: 100%; width: 40%; background: var(--green); animation: load 1.1s var(--ease-in-out) infinite; }
@keyframes load { from { transform: translateX(-100%); } to { transform: translateX(260%); } }
.boot .wm path { stroke: var(--green); stroke-width: 1; fill: transparent; stroke-dasharray: 600; stroke-dashoffset: 600; animation: draw 1.4s var(--ease) forwards, fillin .6s .9s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fillin { to { fill: var(--white); stroke-width: 0; } }

/* ------------------------------------------------------------------ auth */
.auth { position: relative; z-index: 1; min-height: 100vh; display: grid; grid-template-columns: 1.2fr 1fr; }
.auth .art { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; padding: 44px; isolation: isolate; }
.auth .art img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; opacity: .5; animation: drift 34s var(--ease-in-out) infinite alternate; }
.auth .art::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(7, 27, 20, .96), rgba(7, 27, 20, .35) 60%, rgba(7, 27, 20, .7)); }
.auth .art .wm { width: min(420px, 70%); color: var(--white); }
.auth .art h1 { margin: 18px 0 0; font-size: clamp(22px, 2.4vw, 32px); line-height: 1.45; max-width: 26ch; font-weight: 600; }
.auth .art .partners { padding: 0; justify-content: flex-start; gap: 26px; }
.auth .art .partners img { height: 38px; } .auth .art .partners img.gt { height: 44px; }
.auth .pane { display: grid; place-items: center; padding: 40px 28px; border-inline-start: 1px solid var(--line); background: rgba(6, 23, 18, .7); backdrop-filter: blur(10px); }
.auth form { width: min(380px, 100%); display: grid; gap: 18px; }
.auth form h2 { margin: 0; font-size: 24px; }
.auth form p { margin: 0; color: var(--text-2); font-size: 13.5px; }
.auth .alert { padding: 10px 14px; border-radius: 10px; font-size: 13px; border: 1px solid rgba(255, 107, 94, .4); background: rgba(255, 107, 94, .08); color: #FFB3AB; }
.auth .lang { position: absolute; top: 20px; inset-inline-end: 20px; z-index: 2; }

/* ------------------------------------------------------------------ admin */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.tabs button { background: none; border: 0; padding: 10px 16px; cursor: pointer; color: var(--text-2); font-weight: 600; font-size: 13.5px; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button[aria-selected="true"] { color: var(--white); border-color: var(--green); }

/* ------------------------------------------------------------------ mobile */
.mbar { display: none; }
@media (max-width: 1180px) {
  .stage { grid-template-columns: 1fr; }
  .stage .right { border-inline-start: 0; border-top: 1px solid var(--line); }
  .span-4, .span-5, .span-6, .span-7, .span-8 { grid-column: span 12; }
  .comms { grid-template-columns: 300px 1fr; }
}
@media (max-width: 900px) {
  :root { --top: 58px; }
  .shell { grid-template-columns: 1fr; }
  .rail { display: none; }
  .topbar { padding: 0 16px; gap: 10px; }
  .search { display: none; }
  .search.open { display: block; position: absolute; inset-inline: 12px; top: 10px; width: auto; }
  .me .nm, .me .rl { display: none; }
  .me { padding: 3px !important; }
  .view { padding: 18px 16px 110px; }
  .banner { padding: 10px 16px; }
  .stage { border-radius: 16px; min-height: 0; }
  .stage .left, .stage .right { padding: 24px 20px; }
  .stage .swoosh { width: 120%; }
  .ring { width: 132px; height: 132px; }
  .ring .c .p { font-size: 32px; }
  .count .colon { display: none; }
  .count .digits { gap: 14px; }
  .kv .v { font-size: 18px; }
  .tl-stage { grid-template-columns: 1fr; }
  .tl-stage .sname { position: static; padding: 18px 0 0; }
  .comms { grid-template-columns: 1fr; min-height: 0; }
  .comms.has-conv .threads { display: none; }
  .comms:not(.has-conv) .conv { display: none; }
  .comms .threads .scroll, .conv .msgs { max-height: none; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .dl { grid-template-columns: 1fr; gap: 2px 0; }
  .dl dt { margin-top: 8px; }
  .drawer { width: 100vw; }
  .board { grid-template-columns: repeat(5, 82vw); scroll-snap-type: x mandatory; }
  .col { scroll-snap-align: start; }
  .auth { grid-template-columns: 1fr; }
  .auth .art { min-height: 300px; padding: 28px 20px; }
  .auth .pane { border-inline-start: 0; border-top: 1px solid var(--line); }
  .toasts { inset-inline: 16px; bottom: 86px; }
  .mbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; bottom: 0; inset-inline: 0; z-index: 60; height: 68px; padding-bottom: env(safe-area-inset-bottom);
    background: rgba(6, 23, 18, .92); backdrop-filter: blur(16px); border-top: 1px solid var(--line);
  }
  .mbar a, .mbar button { display: grid; place-items: center; align-content: center; gap: 4px; font-size: 10.5px; color: var(--text-3); background: none; border: 0; position: relative; }
  .mbar svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.7; }
  .mbar [aria-current="page"] { color: var(--green); }
  .mbar .badge { position: absolute; top: 8px; inset-inline-end: calc(50% - 22px); min-width: 16px; height: 16px; font-size: 9.5px; }
  .sheet { position: fixed; inset: auto 0 0 0; z-index: 95; background: var(--bg-2); border-top: 1px solid var(--line-2); border-radius: 20px 20px 0 0; padding: 10px 12px calc(84px + env(safe-area-inset-bottom)); animation: up .35s var(--ease); }
  .sheet .nav a { padding: 13px 14px; }
  @keyframes up { from { transform: translateY(30px); opacity: 0; } }
}

/* ------------------------------------------------------------------ motion preferences */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .stage .bgimg img, .auth .art img.bg { animation: none; transform: none; }
}

/* ------------------------------------------------------------------ print (report PDF) */
.print-only { display: none; }
@media print {
  @page { size: A4; margin: 0; }
  html, body { background: #fff !important; color: #0B1F17 !important; }
  .env, .shell, .boot, .toasts, .mbar, .scrim, .drawer, .modal { display: none !important; }
  .print-only { display: block !important; }
}

/* user-entered text may be Arabic or English: let each line pick its own direction */
.msg p, .th b, .th .pv, .conv h2, .li b, .li small, .tcard b, .prose, .feed p, .cmt p, .rcard h3, .drawer header h2, .head h1, .report-teaser h3, .report-teaser p, .table td b, .rp-sec p, .rp-cover h1 { unicode-bidi: plaintext; }

/* ---------------------------------------------------------------- team topology */
.topo-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-3); overflow: hidden; margin-bottom: 18px; }
.topo-kpis > div { background: var(--surface); padding: 14px 18px; display: grid; gap: 4px; }
.topo-kpis .k { font-size: 12px; color: var(--text-3); }
.topo-kpis b.num { font-size: 26px; font-weight: 600; color: var(--white); font-family: var(--f-en); }
.topo-kpis b small { font-size: 13px; color: var(--text-3); font-weight: 500; }
.topo-panel { padding: 22px 18px 16px; position: relative; overflow: hidden; }
.topo-scroll { overflow-x: auto; padding: 4px 4px 10px; scrollbar-width: thin; }
.topo-in { position: relative; margin-inline: auto; }
.topo-links { position: absolute; inset: 0; overflow: visible; pointer-events: none; }
.topo-links path { fill: none; stroke: var(--line-strong); stroke-width: 1.5; transition: stroke .2s, opacity .2s; }
.topo-links path.dash { stroke-dasharray: 5 5; }
.topo-links circle { fill: var(--green); opacity: .7; }

.tnode { position: absolute; display: grid; grid-template-rows: auto auto; align-content: center; gap: 4px; text-align: start; padding: 10px 14px 10px 16px; padding-inline: 16px 14px;
  background: linear-gradient(180deg, var(--surface-2), var(--surface)); border: 1px solid var(--line-2); border-radius: 10px; color: var(--text); cursor: pointer; font: inherit;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%);
  transition: border-color .2s, transform .2s, opacity .2s, box-shadow .2s; }
[dir=rtl] .tnode { clip-path: polygon(0 10px, 10px 0, 100% 0, 100% 100%, 0 100%); }
.tnode::before { content: ''; position: absolute; inset-block: 10px; inset-inline-start: 0; width: 3px; border-radius: 0 3px 3px 0; background: var(--c, var(--green)); }
.tnode.client { --c: var(--aqua); }
.tnode.organizer { --c: var(--green); }
.tnode.supplier { --c: var(--mint); }
.tnode.proposed { border-style: dashed; }
.tnode b { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-inline-end: 40px; unicode-bidi: plaintext; text-align: start; }
.tnode small { font-size: 12px; color: var(--text-2); display: flex; align-items: center; gap: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tnode small svg { width: 13px; height: 13px; flex: none; opacity: .7; }
.tnode small .await { font-size: 12px; }
.tnode .meta { position: absolute; inset-block-start: 9px; inset-inline-end: 12px; display: flex; gap: 8px; font-family: var(--f-mono); font-size: 11px; color: var(--text-3); }
.tnode .meta span { display: inline-flex; align-items: center; gap: 3px; }
.tnode .meta svg { width: 12px; height: 12px; }
.tnode:hover, .tnode:focus-visible { border-color: var(--c, var(--green)); transform: translateY(-1px); outline: none; box-shadow: 0 8px 26px rgba(0, 0, 0, .3); }
.tnode.root { cursor: default; place-items: center; text-align: center; gap: 2px; background: radial-gradient(120% 140% at 50% 0%, rgba(0, 230, 118, .22), transparent 60%), var(--forest); border-color: rgba(0, 230, 118, .45); }
.tnode.root::before { display: none; }
.tnode.root .wm { width: 150px; color: var(--white); }
.tnode.root small { font-family: var(--f-mono); letter-spacing: .14em; font-size: 10.5px; color: var(--mint); }
.topo.focus .tnode:not(.hot) { opacity: .38; }
.topo.focus .topo-links path:not(.hot), .topo.focus .topo-links circle:not(.hot) { opacity: .25; }
.topo .topo-links path.hot { stroke: var(--green); }

.topo-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 12px; color: var(--text-3); }
.topo-legend span { display: inline-flex; align-items: center; gap: 7px; }
.topo-legend .sep { width: 1px; height: 14px; background: var(--line-2); }
.topo-legend .sw { width: 10px; height: 10px; border-radius: 2px; background: var(--green); }
.topo-legend .sw.client { background: var(--aqua); }
.topo-legend .sw.supplier { background: var(--mint); }
.topo-legend .ln { width: 22px; border-top: 1.5px solid var(--line-strong); }
.topo-legend .ln.dash { border-top-style: dashed; }

.topo-list { display: none; list-style: none; margin: 0; padding: 0; }
.topo-list ul { list-style: none; margin: 0; padding: 0; padding-inline-start: 18px; border-inline-start: 1px solid var(--line-2); margin-inline-start: 10px; }
.topo-list li { position: relative; padding-top: 8px; }
.topo-list ul > li::before { content: ''; position: absolute; inset-inline-start: -18px; top: 30px; width: 14px; border-top: 1px solid var(--line-2); }
.tl-node { width: 100%; display: grid; gap: 3px; text-align: start; padding: 10px 14px; background: var(--surface-2); border: 1px solid var(--line-2); border-inline-start: 3px solid var(--c, var(--green)); border-radius: 8px; color: var(--text); font: inherit; cursor: pointer; }
.tl-node.client { --c: var(--aqua); } .tl-node.supplier { --c: var(--mint); } .tl-node.proposed { border-style: dashed; border-inline-start-style: solid; }
.tl-node b { font-size: 14px; font-weight: 600; } .tl-node small { font-size: 12px; color: var(--text-2); }

.owners { display: flex; flex-wrap: wrap; gap: 6px; }
.owner { font: inherit; font-size: 12px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.owner::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.owner.client::before { background: var(--aqua); } .owner.supplier::before { background: var(--mint); }
.owner:hover { border-color: var(--line-strong); }
.plink { color: var(--text); } .plink:hover { color: var(--mint); }
.chip.org-client { --c: var(--aqua); } .chip.org-supplier { --c: var(--mint); }

@media (max-width: 900px) {
  .topo-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topo-scroll { display: none; }
  .topo-list { display: block; }
  .topo-legend .sep { display: none; }
  .table.resp thead { display: none; }
  .table.resp, .table.resp tbody { display: block; }
  .table.resp tr { display: grid; grid-template-columns: 34px 1fr; gap: 6px 10px; padding: 14px 14px; border-bottom: 1px solid var(--line); }
  .table.resp td { display: block; padding: 0; border: 0; }
  .table.resp td:first-child { grid-row: span 3; padding-top: 2px; }
  .table.resp td:nth-child(3) { color: var(--text-3); font-size: 12.5px; }
}

/* ---------------------------------------------------------------- weather */
.wxi { width: 18px; height: 18px; flex: none; }
#wxbar:empty { display: none; }
.wxbar { display: flex; align-items: center; gap: 18px; padding: 8px 28px; border-bottom: 1px solid var(--line); background: linear-gradient(90deg, rgba(0, 230, 118, .05), transparent 60%); color: var(--text-2); font-size: 13px; text-decoration: none; white-space: nowrap; overflow: hidden; }
.wxbar:hover { background-color: rgba(167, 247, 201, .03); }
.wxbar .now { display: inline-flex; align-items: center; gap: 8px; color: var(--text); }
.wxbar .now .wxi { width: 22px; height: 22px; color: var(--mint); }
.wxbar .now b { font-size: 17px; font-weight: 600; font-family: var(--f-en); }
.wxbar .kv { display: inline-flex; align-items: center; gap: 5px; }
.wxbar .kv .wxi { width: 15px; height: 15px; opacity: .7; }
.wxbar .kv small { color: var(--text-3); font-size: 11.5px; }
.wxbar .al { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--line-2); overflow: hidden; text-overflow: ellipsis; }
.wxbar .al .wxi { width: 15px; height: 15px; }
.wxbar .al em { font-style: normal; font-family: var(--f-mono); font-size: 11px; opacity: .8; }
.wxbar .al.ok { color: var(--text-3); }
.wxbar .stale { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; background: var(--s-approval); color: var(--on-green); font-weight: 700; font-size: 11px; }
.lv-watch { --lv: #8FD3FF; } .lv-warning { --lv: var(--s-approval); } .lv-severe { --lv: var(--s-delayed); } .lv-info { --lv: var(--text-3); }
.wxbar .al[class*="lv-"] { color: var(--lv); border-color: color-mix(in srgb, var(--lv) 45%, transparent); background: color-mix(in srgb, var(--lv) 10%, transparent); }
.wxbar.lv-severe { background: linear-gradient(90deg, rgba(255, 107, 94, .14), transparent 70%); border-bottom-color: rgba(255, 107, 94, .35); }
.wxbar.lv-warning { background: linear-gradient(90deg, rgba(245, 196, 81, .10), transparent 70%); }
.wxbar.muted { color: var(--text-3); }

.wx-note { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border: 1px dashed var(--line-strong); border-radius: 10px; margin-bottom: 16px; font-size: 13px; color: var(--text-2); }
.wx-note svg { width: 16px; height: 16px; color: var(--mint); flex: none; }
.wx-note span { flex: 1; }
.wx-top { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 18px; align-items: start; }
.wx-now .big { display: flex; align-items: center; gap: 16px; margin: 14px 0 18px; }
.wx-now .big .wxi { width: 64px; height: 64px; color: var(--mint); stroke-width: 1.2; }
.wx-now .big b { display: block; font-size: 56px; line-height: 1; font-weight: 600; color: var(--white); font-family: var(--f-en); }
.wx-now .big span { color: var(--text-2); font-size: 15px; }
.wx-kv { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 16px; margin: 0; }
.wx-kv dt { font-size: 11.5px; color: var(--text-3); margin-bottom: 2px; }
.wx-kv dd { margin: 0; font-size: 13.5px; color: var(--text); }
.wx-upd { margin: 16px 0 0; font-size: 12px; color: var(--text-3); }
.wx-al-list { display: grid; gap: 10px; margin-top: 12px; }
.wx-al { display: grid; grid-template-columns: 40px 1fr; gap: 12px; padding: 12px 14px; border: 1px solid color-mix(in srgb, var(--lv) 35%, transparent); border-inline-start: 3px solid var(--lv); border-radius: 10px; background: color-mix(in srgb, var(--lv) 6%, var(--surface)); }
.wx-al .ic { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, var(--lv) 16%, transparent); color: var(--lv); }
.wx-al .ic .wxi { width: 22px; height: 22px; }
.wx-al .t1 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.wx-al .t1 .lvl { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--lv); color: var(--on-green); }
.wx-al .t1 b { font-size: 15px; color: var(--white); }
.wx-al .t1 .pk { font-size: 12px; color: var(--lv); }
.wx-al .t2 { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-2); margin-top: 4px; }
.wx-al .t2 svg { width: 13px; height: 13px; opacity: .7; }
.wx-al .t2 .op { color: var(--lv); font-weight: 600; }
.wx-al .t3 { font-size: 12.5px; color: var(--text-3); margin-top: 4px; }
.wx-al .t3 a { color: var(--mint); margin-inline-end: 8px; }
.wx-al .t4 { font-size: 12.5px; color: var(--text-2); margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--line); }
.wx-al .t5 { font-size: 11.5px; color: var(--text-3); margin-top: 4px; font-style: italic; }
.wx-clear { display: flex; align-items: center; gap: 12px; padding: 22px 6px; color: var(--text-2); }
.wx-clear .wxi { width: 32px; height: 32px; color: var(--green); }
.wx-info { margin-top: 12px; font-size: 13px; color: var(--text-3); }
.wx-info summary { cursor: pointer; margin-bottom: 8px; }
.wx-info .wx-al { margin-top: 8px; }

.wx-days { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 8px; }
.wx-day { position: relative; display: grid; justify-items: center; gap: 6px; padding: 12px 6px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text); font: inherit; cursor: pointer; transition: border-color .2s, background .2s; }
.wx-day:hover { border-color: var(--line-strong); }
.wx-day.on { border-color: var(--green); background: linear-gradient(180deg, rgba(0, 230, 118, .12), var(--surface)); }
.wx-day.ev { box-shadow: inset 0 3px 0 var(--green); }
.wx-day.past { opacity: .45; }
.wx-day.far .tt, .wx-day.far .wxi { opacity: .75; }
.wx-day .dn { font-size: 12px; color: var(--text-2); }
.wx-day > .wxi { width: 30px; height: 30px; color: var(--mint); }
.wx-day .tt { display: flex; gap: 6px; align-items: baseline; }
.wx-day .tt b { font-size: 17px; font-weight: 600; font-family: var(--f-en); }
.wx-day .tt small { font-size: 12px; color: var(--text-3); }
.wx-day .mini { display: flex; gap: 8px; font-size: 11px; color: var(--text-3); }
.wx-day .mini span { display: inline-flex; align-items: center; gap: 2px; }
.wx-day .mini .wxi { width: 12px; height: 12px; }
.wx-day .mini i { font-style: normal; }
.wx-day .lvdot { position: absolute; top: 8px; inset-inline-end: 8px; width: 9px; height: 9px; border-radius: 50%; background: var(--lv); box-shadow: 0 0 0 3px color-mix(in srgb, var(--lv) 25%, transparent); }
.wx-day .tags { display: flex; gap: 4px; min-height: 18px; flex-wrap: wrap; justify-content: center; }
.wx-day .tags em { font-style: normal; font-size: 10.5px; font-family: var(--f-mono); padding: 1px 6px; border-radius: 6px; background: var(--surface-3); color: var(--text-2); }
.wx-day .tags em.evt { background: rgba(0, 230, 118, .16); color: var(--green); font-family: inherit; }
.wx-acc { margin: 10px 0 0; font-size: 12px; color: var(--text-3); }

.wx-hhead { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 14px; }
.wx-hhead > div { flex: 1; }
.wx-ph { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.wx-ph .chip { text-decoration: none; }
.wx-oplegend { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-3); white-space: nowrap; }
.wx-oplegend i { width: 14px; height: 10px; border-radius: 3px; background: rgba(0, 230, 118, .18); border: 1px solid rgba(0, 230, 118, .4); }
.wx-hscroll { overflow-x: auto; padding-bottom: 6px; }
.wx-hgrid { position: relative; display: grid; grid-template-columns: repeat(var(--n), var(--cw)); padding-top: 74px; width: max-content; }
.wx-line { position: absolute; top: 0; inset-inline-start: 0; }
.wx-h { display: grid; justify-items: center; gap: 6px; padding: 8px 0; border-radius: 8px; font-size: 12px; }
.wx-h.op { background: rgba(0, 230, 118, .07); box-shadow: inset 0 0 0 1px rgba(0, 230, 118, .14); }
.wx-h .hl { color: var(--text-3); font-size: 11px; white-space: nowrap; }
.wx-h .tp { font-size: 14px; font-weight: 600; color: var(--white); }
.wx-h > .wxi { width: 20px; height: 20px; color: var(--mint); }
.wx-h .pop { position: relative; width: 10px; height: 34px; border-radius: 3px; background: var(--surface-3); display: flex; align-items: flex-end; overflow: visible; }
.wx-h .pop i { display: block; width: 100%; border-radius: 3px; background: #6FB8FF; }
.wx-h .pop small { position: absolute; top: 36px; left: 50%; transform: translateX(-50%); font-size: 10px; color: var(--text-3); }
.wx-h .g { margin-top: 14px; padding: 1px 6px; border-radius: 6px; color: var(--text-2); }
.wx-h .d { padding: 1px 6px; border-radius: 6px; color: var(--text-3); }
.wx-h .md { background: rgba(143, 211, 255, .14); color: #8FD3FF; }
.wx-h .hi { background: rgba(245, 196, 81, .18); color: var(--s-approval); }
.wx-hlegend { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 10px; font-size: 11.5px; color: var(--text-3); }
.wx-hlegend span { display: inline-flex; align-items: center; gap: 5px; }
.wx-hlegend .wxi { width: 13px; height: 13px; }
.wx-rules td, .wx-rules th { font-size: 12.5px; padding: 8px 10px; }
.wx-rules td:not(:first-child) { font-family: var(--f-mono); direction: ltr; text-align: center; white-space: nowrap; }
.wx-rules th:not(:first-child) { text-align: center; }
.wx-rules small { color: var(--text-3); }
.wx-rules td:first-child { color: var(--text-2); white-space: nowrap; }

@media (max-width: 1100px) { .wx-days { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .wxbar { padding: 7px 16px; gap: 12px; }
  .wxbar .hide-s, .wxbar .now .cond { display: none; }
  .wx-top { grid-template-columns: 1fr; }
  .wx-kv { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wx-days { display: flex; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; }
  .wx-day { flex: 0 0 96px; scroll-snap-align: start; }
}

.wx-srcp p { margin: 0 0 12px; font-size: 13.5px; line-height: 1.7; color: var(--text-2); }
.wx-srcp b { color: var(--text); }
.wx-h.now { box-shadow: inset 0 0 0 1.5px var(--green); background: rgba(0, 230, 118, .1); }
.wx-h.now .hl { color: var(--green); font-weight: 600; }

/* ---------------------------------------------------------------- credit footer */
.credit { text-align: center; padding: 18px 16px 26px; font-family: var(--f-en); font-size: 12px; letter-spacing: .08em; color: var(--text-3); border-top: 1px solid var(--line); }
.credit b { color: var(--mint); font-weight: 600; }
.view + .credit { margin-top: -40px; }
.auth .pane .credit { border-top: 0; margin-top: 28px; padding-bottom: 0; }
@media (max-width: 900px) { .main .credit { margin-top: -80px; padding-bottom: calc(18px + 68px + env(safe-area-inset-bottom)); } }
