:root {
  --bg: #F4F6FA;
  --card: #FFFFFF;
  --ink: #0F1B2D;
  --ink-2: #44526A;
  --ink-3: #7A869B;
  --line: #E3E8F0;
  --navy: #0B1F3A;
  --navy-2: #13315C;
  --teal: #0FA89A;
  --teal-soft: #E1F6F3;
  --gold: #E9A41C;
  --gold-soft: #FFF4DC;
  --blue: #2563EB;
  --blue-soft: #E7EEFE;
  --rose: #E0485B;
  --rose-soft: #FDE8EB;
  --violet: #7C4DDB;
  --violet-soft: #EFE8FC;
  --shadow: 0 1px 2px rgba(15, 27, 45, .05), 0 6px 20px rgba(15, 27, 45, .06);
  --shadow-lg: 0 2px 6px rgba(15, 27, 45, .06), 0 16px 40px rgba(15, 27, 45, .10);
  --r: 18px;
  --font: "Inter", "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", sans-serif;
}
html[lang="ar"] { --font: "IBM Plex Sans Arabic", "Inter", system-ui, sans-serif; }

* { box-sizing: border-box; }
html { font-size: 18px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); line-height: 1.6; padding-bottom: 84px; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
img, svg { display: block; }
.container { max-width: 1280px; margin: 0 auto; padding: 24px 16px 40px; outline: none; }
.ico { width: 1.2em; height: 1.2em; flex: none; }

/* Top bar */
.topbar { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.topbar-inner { max-width: 1280px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 20px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text b { font-size: 1.25rem; font-weight: 800; letter-spacing: -.01em; }
.brand-text small { color: var(--ink-3); font-size: .74rem; }
.nav { display: flex; gap: 4px; margin-inline-start: 12px; }
.nav a { padding: 9px 16px; border-radius: 12px; color: var(--ink-2); font-weight: 600; font-size: .95rem; display: flex; gap: 8px; align-items: center; }
.nav a:hover { background: var(--bg); color: var(--ink); }
.nav a.active { background: var(--navy); color: #fff; }
.top-actions { margin-inline-start: auto; display: flex; gap: 10px; align-items: center; }
.live-pill { display: flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; background: var(--teal-soft); color: #08756B; font-weight: 700; font-size: .82rem; }
.live-pill i { width: 9px; height: 9px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 0 rgba(15,168,154,.6); animation: pulse 1.8s infinite; }
.live-pill.off { background: var(--rose-soft); color: var(--rose); }
.live-pill.off i { background: var(--rose); animation: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(15,168,154,.55); } 70% { box-shadow: 0 0 0 9px rgba(15,168,154,0); } 100% { box-shadow: 0 0 0 0 rgba(15,168,154,0); } }
.lang-btn { border: 1.5px solid var(--navy); background: #fff; color: var(--navy); border-radius: 12px; padding: 8px 16px; font-weight: 700; font-size: .95rem; }
.lang-btn:hover { background: var(--navy); color: #fff; }
.bottom-nav { display: none; }

/* Headings */
h1, h2, h3, h4 { margin: 0; line-height: 1.25; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 8px 0 22px; }
.page-head h1 { font-size: 2rem; font-weight: 800; letter-spacing: -.02em; }
.page-head p { margin: 6px 0 0; color: var(--ink-2); font-size: 1.05rem; }
.section-title { display: flex; align-items: center; gap: 12px; font-size: 1.35rem; font-weight: 800; margin: 34px 0 16px; }
.section-title .badge-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--navy); color: #fff; }
.section-title .more { margin-inline-start: auto; font-size: .92rem; font-weight: 700; color: var(--blue); }

/* Hero */
.hero { position: relative; overflow: hidden; background: radial-gradient(1200px 400px at 85% -20%, #1E4E8C 0%, transparent 60%), linear-gradient(135deg, #0B1F3A 0%, #102B52 60%, #0E3B5E 100%); color: #fff; border-radius: 26px; padding: 40px 36px; box-shadow: var(--shadow-lg); }
.hero h1 { font-size: 2.4rem; font-weight: 800; letter-spacing: -.02em; max-width: 760px; }
.hero p { color: #C8D5EA; font-size: 1.15rem; margin: 12px 0 26px; max-width: 760px; }
.hero-art { position: absolute; inset-inline-end: -30px; bottom: -30px; opacity: .22; width: 360px; }
.search { position: relative; max-width: 680px; }
.search input { width: 100%; padding: 18px 22px; padding-inline-start: 56px; border-radius: 16px; border: 0; font: inherit; font-size: 1.05rem; color: var(--ink); box-shadow: 0 10px 30px rgba(0,0,0,.25); outline: none; }
.search .ico { position: absolute; inset-inline-start: 20px; top: 50%; transform: translateY(-50%); color: var(--ink-3); width: 24px; height: 24px; }
.search-results { position: absolute; z-index: 10; inset-inline: 0; top: calc(100% + 8px); background: #fff; color: var(--ink); border-radius: 16px; box-shadow: var(--shadow-lg); max-height: 420px; overflow: auto; }
.search-results a { display: flex; align-items: center; gap: 14px; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.search-results a:hover { background: var(--bg); }

/* Stat tiles */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 22px; }
.stat { background: var(--card); border-radius: var(--r); padding: 20px 22px; box-shadow: var(--shadow); display: flex; gap: 16px; align-items: center; }
.stat .s-ico { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; flex: none; }
.stat .s-ico svg { width: 28px; height: 28px; }
.stat b { display: block; font-size: 2rem; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat span { color: var(--ink-2); font-size: .92rem; font-weight: 500; }
.t-teal { background: var(--teal-soft); color: var(--teal); }
.t-gold { background: var(--gold-soft); color: #B87A00; }
.t-blue { background: var(--blue-soft); color: var(--blue); }
.t-rose { background: var(--rose-soft); color: var(--rose); }
.t-violet { background: var(--violet-soft); color: var(--violet); }
.t-navy { background: #E6EBF3; color: var(--navy); }

/* Chips / tabs */
.chips { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.chip { border: 1.5px solid var(--line); background: #fff; color: var(--ink-2); padding: 10px 18px; border-radius: 999px; font-weight: 700; font-size: .95rem; display: inline-flex; gap: 10px; align-items: center; }
.chip:hover { border-color: var(--navy); color: var(--navy); }
.chip.active { background: var(--navy); border-color: var(--navy); color: #fff; }
.chip .count { background: rgba(127,127,127,.16); padding: 1px 9px; border-radius: 999px; font-size: .8rem; }
.code { font-weight: 800; font-size: .78rem; letter-spacing: .04em; padding: 2px 7px; border-radius: 6px; background: #E6EBF3; color: var(--navy); }
.chip.active .code { background: rgba(255,255,255,.18); color: #fff; }

/* Company cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; }
.ccard { background: var(--card); border-radius: var(--r); padding: 20px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 14px; border: 1.5px solid transparent; transition: transform .15s, box-shadow .15s, border-color .15s; position: relative; }
.ccard:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: #CBD6E6; }
.ccard .top { display: flex; gap: 14px; align-items: center; }
.avatar { width: 54px; height: 54px; border-radius: 15px; display: grid; place-items: center; font-weight: 800; font-size: 1.05rem; color: #fff; flex: none; letter-spacing: .02em; }
.ccard h3 { font-size: 1.08rem; font-weight: 700; }
.ccard .sub { color: var(--ink-3); font-size: .88rem; }
.ccard .meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; }
.tag { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 700; padding: 4px 11px; border-radius: 999px; background: var(--bg); color: var(--ink-2); }
.rank { position: absolute; inset-inline-end: 16px; top: 16px; font-weight: 800; color: var(--ink-3); font-size: .95rem; }
.ccard .note { color: var(--ink-2); font-size: .9rem; }

/* Panels */
.panel { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 24px; }
.two-col { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; }

/* News */
.news-list { display: flex; flex-direction: column; }
.news-item { display: grid; grid-template-columns: 46px 1fr; gap: 14px; padding: 16px 4px; border-bottom: 1px solid var(--line); }
.news-item:last-child { border-bottom: 0; }
.news-item .n-ico { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue); font-weight: 800; }
.news-item a.t { font-weight: 600; font-size: 1.02rem; line-height: 1.5; }
.news-item a.t:hover { color: var(--blue); }
.news-item .m { color: var(--ink-3); font-size: .84rem; margin-top: 4px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.news-item .co { color: var(--navy); font-weight: 700; }
.news-head { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; flex-wrap: wrap; }
.news-head { justify-content: space-between; flex-wrap: nowrap; }
.news-head .nrefresh { flex: none; }
.panel .upd { color: var(--ink-3); font-size: .84rem; margin-bottom: 4px; }
.news-item .m span { display: inline-flex; align-items: center; gap: 5px; }
.news-item .m .ico { width: 15px; height: 15px; }
.btn { border: 0; background: var(--navy); color: #fff; padding: 10px 18px; border-radius: 12px; font-weight: 700; font-size: .92rem; display: inline-flex; gap: 8px; align-items: center; }
.btn.ghost { background: #fff; color: var(--navy); border: 1.5px solid var(--line); }
.btn:disabled { opacity: .5; cursor: default; }

/* Company header */
.co-head { background: linear-gradient(135deg, #0B1F3A 0%, #13315C 100%); color: #fff; border-radius: 24px; padding: 28px; box-shadow: var(--shadow-lg); display: grid; grid-template-columns: auto 1fr auto; gap: 22px; align-items: center; }
.co-head .avatar { width: 78px; height: 78px; border-radius: 22px; font-size: 1.5rem; box-shadow: 0 0 0 4px rgba(255,255,255,.12); }
.co-head h1 { font-size: 1.9rem; font-weight: 800; }
.co-head .alt { color: #B7C6DD; font-size: 1.05rem; margin-top: 2px; }
.co-head .facts { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.co-head .facts span { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.16); padding: 5px 13px; border-radius: 999px; font-size: .86rem; font-weight: 600; display: inline-flex; gap: 7px; align-items: center; }
.co-head .actions { display: flex; flex-direction: column; gap: 10px; }
.co-head .actions a { background: #fff; color: var(--navy); padding: 11px 18px; border-radius: 12px; font-weight: 700; font-size: .92rem; display: flex; gap: 8px; align-items: center; white-space: nowrap; }
.back { display: inline-flex; gap: 8px; align-items: center; color: var(--ink-2); font-weight: 700; margin-bottom: 14px; }
.back .ico { transform: scaleX(1); }
html[dir="rtl"] .back .ico, html[dir="rtl"] .flip { transform: scaleX(-1); }

.tabs { display: flex; gap: 8px; overflow-x: auto; padding: 18px 2px 6px; scrollbar-width: thin; position: sticky; top: 64px; z-index: 5; background: var(--bg); }
.tab { flex: none; border: 1.5px solid var(--line); background: #fff; color: var(--ink-2); padding: 10px 16px; border-radius: 14px; font-weight: 700; font-size: .92rem; display: inline-flex; gap: 8px; align-items: center; }
.tab .ico { width: 20px; height: 20px; }
.tab.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.tab:hover:not(.active) { border-color: var(--navy); color: var(--navy); }

/* Intel states */
.state { text-align: center; padding: 50px 24px; }
.state .big-ico { width: 84px; height: 84px; border-radius: 26px; display: grid; place-items: center; margin: 0 auto 18px; }
.state .big-ico svg { width: 42px; height: 42px; }
.state h3 { font-size: 1.35rem; margin-bottom: 8px; }
.state p { color: var(--ink-2); max-width: 620px; margin: 0 auto; }
.progress { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; max-width: 420px; margin: 22px auto 0; }
.progress i { display: block; height: 100%; width: 30%; background: linear-gradient(90deg, var(--teal), var(--blue)); border-radius: 99px; animation: slide 1.6s ease-in-out infinite; }
@keyframes slide { 0% { margin-inline-start: -30%; } 100% { margin-inline-start: 100%; } }
.steps-live { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 20px; }
.steps-live span { padding: 6px 14px; border-radius: 999px; background: var(--bg); color: var(--ink-3); font-size: .85rem; font-weight: 600; }
.steps-live span.on { background: var(--teal-soft); color: #08756B; }
.skeleton { background: linear-gradient(90deg, #EEF1F6 25%, #F7F9FC 50%, #EEF1F6 75%); background-size: 200% 100%; animation: sk 1.4s infinite; border-radius: 12px; }
@keyframes sk { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

.summary { display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center; background: #fff; border-radius: var(--r); padding: 22px 24px; box-shadow: var(--shadow); border-inline-start: 6px solid var(--teal); }
.summary .s-ico { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; }
.summary .s-ico svg { width: 30px; height: 30px; }
.summary p { margin: 0; font-size: 1.08rem; color: var(--ink); }
.summary .when { color: var(--ink-3); font-size: .84rem; text-align: end; white-space: nowrap; }
.updating { display: inline-flex; gap: 6px; align-items: center; color: #B87A00; font-weight: 700; }

/* Product cards */
.pgrid { display: grid; grid-template-columns: 1fr; gap: 22px; margin-top: 20px; }
.product { background: #fff; border-radius: 22px; box-shadow: var(--shadow); overflow: hidden; }
.p-head { display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; padding: 22px 24px; border-bottom: 1px solid var(--line); }
.p-head .p-ico { width: 60px; height: 60px; border-radius: 18px; display: grid; place-items: center; }
.p-head .p-ico svg { width: 30px; height: 30px; }
.p-head h3 { font-size: 1.3rem; font-weight: 800; }
.p-head .p-sub { color: var(--ink-3); font-size: .9rem; display: flex; gap: 10px; flex-wrap: wrap; margin-top: 3px; }
.status { padding: 6px 14px; border-radius: 999px; font-weight: 800; font-size: .8rem; letter-spacing: .03em; text-transform: uppercase; }
html[lang="ar"] .status { text-transform: none; letter-spacing: 0; font-size: .88rem; }
.status.new { background: var(--gold-soft); color: #B87A00; }
.status.existing { background: #E6EBF3; color: var(--navy-2); }
.p-body { padding: 22px 24px; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.block { border-radius: 16px; padding: 18px; background: var(--bg); }
.block.full { grid-column: 1 / -1; }
.block h4 { display: flex; gap: 10px; align-items: center; font-size: .95rem; font-weight: 800; color: var(--ink-2); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 12px; }
html[lang="ar"] .block h4 { text-transform: none; letter-spacing: 0; font-size: 1.02rem; }
.block h4 .h-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; }
.block h4 .h-ico svg { width: 19px; height: 19px; }
.block p { margin: 0; font-size: 1.02rem; }
.obj { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.obj div { background: #fff; border-radius: 12px; padding: 12px 14px; display: flex; gap: 10px; align-items: flex-start; font-weight: 600; font-size: .95rem; }
.obj div .ico { color: var(--teal); margin-top: 3px; }

/* Flow diagram */
.flow { display: flex; align-items: stretch; gap: 0; overflow-x: auto; padding: 6px 2px 10px; }
.flow .stp { flex: 1 1 0; min-width: 150px; background: #fff; border-radius: 16px; padding: 16px 14px 14px; position: relative; text-align: center; box-shadow: 0 1px 3px rgba(15,27,45,.06); }
.flow .stp .n { width: 40px; height: 40px; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 800; display: grid; place-items: center; margin: 0 auto 10px; font-size: 1.05rem; }
.flow .stp:nth-child(4n+3) .n { background: var(--teal); }
.flow .stp:nth-child(4n+5) .n { background: var(--blue); }
.flow .stp:nth-child(4n+7) .n { background: var(--gold); }
.flow .stp p { font-size: .93rem; font-weight: 600; }
.flow .arr { flex: none; width: 34px; display: grid; place-items: center; color: var(--ink-3); }
html[dir="rtl"] .flow .arr svg { transform: scaleX(-1); }
.feat { display: flex; flex-wrap: wrap; gap: 8px; }
.feat span { background: #fff; border: 1px solid var(--line); padding: 7px 14px; border-radius: 999px; font-size: .9rem; font-weight: 600; display: inline-flex; gap: 7px; align-items: center; }
.feat span .ico { color: var(--teal); width: 16px; height: 16px; }
.src { display: inline-flex; gap: 6px; align-items: center; color: var(--blue); font-weight: 700; font-size: .88rem; }
.p-foot { padding: 0 24px 20px; }

/* Department */
.pillars { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.pillar { background: #fff; border-radius: 18px; padding: 20px; box-shadow: var(--shadow); border-top: 5px solid var(--teal); }
.pillar:nth-child(4n+2) { border-top-color: var(--blue); }
.pillar:nth-child(4n+3) { border-top-color: var(--gold); }
.pillar:nth-child(4n+4) { border-top-color: var(--violet); }
.pillar .num { width: 40px; height: 40px; border-radius: 12px; background: var(--bg); display: grid; place-items: center; font-weight: 800; color: var(--navy); margin-bottom: 12px; }
.pillar h4 { font-size: 1.08rem; font-weight: 800; margin-bottom: 6px; }
.pillar p { margin: 0; color: var(--ink-2); font-size: .97rem; }
.metrics { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.metric { background: #fff; border-radius: 18px; padding: 20px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.metric::after { content: ""; position: absolute; inset-inline-end: -26px; top: -26px; width: 90px; height: 90px; border-radius: 50%; background: var(--teal-soft); }
.metric:nth-child(3n+2)::after { background: var(--blue-soft); }
.metric:nth-child(3n+3)::after { background: var(--gold-soft); }
.metric b { display: block; font-size: 1.7rem; font-weight: 800; line-height: 1.2; position: relative; z-index: 1; font-variant-numeric: tabular-nums; }
.metric .lbl { color: var(--ink); font-weight: 700; font-size: .98rem; margin-top: 6px; position: relative; z-index: 1; }
.metric .per { color: var(--ink-3); font-size: .84rem; margin-top: 4px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; position: relative; z-index: 1; }
.timeline { position: relative; padding-inline-start: 34px; }
.timeline::before { content: ""; position: absolute; inset-inline-start: 11px; top: 6px; bottom: 6px; width: 3px; background: var(--line); border-radius: 3px; }
.tl { position: relative; background: #fff; border-radius: 16px; padding: 16px 20px; box-shadow: var(--shadow); margin-bottom: 14px; }
.tl::before { content: ""; position: absolute; inset-inline-start: -30px; top: 20px; width: 15px; height: 15px; border-radius: 50%; background: #fff; border: 4px solid var(--teal); }
.tl .d { color: var(--teal); font-weight: 800; font-size: .86rem; }
.tl h4 { font-size: 1.05rem; font-weight: 700; margin: 4px 0; }
.tl p { margin: 0; color: var(--ink-2); font-size: .96rem; }
.sources { display: flex; flex-wrap: wrap; gap: 8px; }
.sources a { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 7px 12px; font-size: .84rem; color: var(--ink-2); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; }
.sources a:hover { border-color: var(--blue); color: var(--blue); }
.sub-title { display: flex; align-items: center; gap: 10px; font-size: 1.12rem; font-weight: 800; margin: 28px 0 14px; color: var(--ink); }
.sub-title .ico { color: var(--teal); width: 24px; height: 24px; }

/* Department overview tiles on company page */
.dept-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.dept-tile { background: #fff; border-radius: 18px; padding: 18px; box-shadow: var(--shadow); display: flex; gap: 14px; align-items: center; font-weight: 700; border: 1.5px solid transparent; }
.dept-tile:hover { border-color: var(--navy); }
.dept-tile .d-ico { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; flex: none; }

.empty { color: var(--ink-3); padding: 30px; text-align: center; }
.notice { background: var(--gold-soft); border-radius: 14px; padding: 14px 18px; color: #7A5200; font-weight: 600; display: flex; gap: 10px; align-items: center; margin-bottom: 18px; }
.filter-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.filter-row input { flex: 1 1 260px; padding: 13px 18px; border-radius: 14px; border: 1.5px solid var(--line); font: inherit; background: #fff; outline: none; }
.filter-row input:focus { border-color: var(--navy); }
.basis { color: var(--ink-3); font-size: .86rem; margin: -6px 0 18px; }
.daily-item { display: grid; grid-template-columns: auto 1fr; gap: 16px; background: #fff; border-radius: 18px; padding: 18px; box-shadow: var(--shadow); align-items: center; }
.daily-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 16px; }
footer.foot { text-align: center; color: var(--ink-3); font-size: .84rem; padding: 30px 0 10px; }

/* Responsive */
@media (max-width: 1000px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .two-col { grid-template-columns: 1fr; }
  .nav { display: none; }
  .bottom-nav { display: grid; grid-template-columns: repeat(3, 1fr); position: fixed; bottom: 0; inset-inline: 0; z-index: 30; background: #fff; border-top: 1px solid var(--line); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); }
  .bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: .74rem; font-weight: 700; color: var(--ink-3); padding: 6px 2px; border-radius: 12px; }
  .bottom-nav a .ico { width: 24px; height: 24px; }
  .bottom-nav a.active { color: var(--navy); background: var(--bg); }
}
@media (max-width: 720px) {
  html { font-size: 17px; }
  .container { padding: 16px 16px 30px; }
  .brand-text small, .live-pill span { display: none; }
  .live-pill { padding: 8px; }
  .nrefresh span { display: none; }
  .nrefresh { padding: 10px 12px; }
  .hero { padding: 28px 20px; border-radius: 22px; }
  .hero h1 { font-size: 1.75rem; }
  .hero p { font-size: 1.02rem; }
  .stats { gap: 12px; }
  .stat { padding: 16px; flex-direction: column; align-items: flex-start; gap: 10px; }
  .stat b { font-size: 1.6rem; }
  .page-head h1 { font-size: 1.6rem; }
  .co-head { grid-template-columns: 1fr; padding: 22px; }
  .co-head .avatar { width: 64px; height: 64px; }
  .co-head h1 { font-size: 1.5rem; }
  .co-head .actions { flex-direction: row; flex-wrap: wrap; }
  .tabs { top: 58px; }
  .summary { grid-template-columns: auto 1fr; }
  .summary .when { grid-column: 1 / -1; text-align: start; }
  .p-head { grid-template-columns: auto 1fr; padding: 18px; }
  .p-head .status { grid-column: 1 / -1; justify-self: start; }
  .p-body { grid-template-columns: 1fr; padding: 18px; gap: 14px; }
  .obj { grid-template-columns: 1fr; }
  .flow { flex-direction: column; }
  .flow .stp { min-width: 0; display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: center; text-align: start; }
  .flow .stp .n { margin: 0; }
  .flow .arr { width: auto; height: 26px; }
  .flow .arr svg { transform: rotate(90deg) !important; }
  .daily-list { grid-template-columns: 1fr; }
  .grid { grid-template-columns: 1fr; }
}

.key-row { display: flex; gap: 10px; max-width: 560px; margin: 22px auto 0; flex-wrap: wrap; }
.key-row input { flex: 1 1 260px; padding: 14px 18px; border-radius: 14px; border: 1.5px solid var(--line); font: inherit; font-size: 1.05rem; outline: none; }
.key-row input:focus { border-color: var(--navy); }
.key-row .btn { padding: 14px 22px; font-size: 1rem; }
.key-msg { margin-top: 12px !important; color: var(--rose) !important; font-weight: 600; min-height: 1.4em; }
