/* Egypt Beyond website admin — self-contained, no external fonts or CDNs. */

:root {
  --navy-900: #0b1630;
  --navy-800: #11204a;
  --navy-700: #1a2d5e;
  --navy-500: #3a5199;
  --ink: #16203a;
  --ink-soft: #4a5572;
  --muted: #5b6582;
  --line: #dfe3ec;
  --bg: #f4f6fa;
  --card: #ffffff;
  --accent: #1f8fff;
  --accent-ink: #ffffff;
  --accent-soft: #e6f2ff;
  --ok: #11693b;
  --ok-soft: #e3f5ea;
  --warn: #8a5a00;
  --warn-soft: #fff4dc;
  --danger: #b42318;
  --danger-soft: #fdecea;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 1px 3px rgba(16, 24, 40, 0.08);
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, "Noto Sans Arabic", "Segoe UI Arabic", Tahoma, sans-serif;
  --mono: Consolas, "Cascadia Mono", "SFMono-Regular", Menlo, monospace;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
}

a { color: var(--navy-500); }
a:hover { color: var(--accent); }

h1, h2, h3 { line-height: 1.25; margin: 0 0 0.5rem; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.15rem; }

code { font-family: var(--mono); font-size: 0.9em; background: #eef1f7; padding: 0.05em 0.3em; border-radius: 4px; }

.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.mono { font-family: var(--mono); font-size: 0.9em; }
.nowrap { white-space: nowrap; }
.num { text-align: right; }
.is-hidden { display: none !important; }
.ar { font-size: 0.95rem; color: var(--ink-soft); text-align: right; }

/* ---------- Shell ---------- */

.shell { display: flex; min-height: 100vh; }

.sidebar {
  width: 240px;
  flex-shrink: 0;
  background: var(--navy-900);
  color: #c9d3ea;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand { padding: 1.4rem 1.25rem 1rem; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.brand-name { display: block; font-size: 1.35rem; font-weight: 700; color: #fff; letter-spacing: 0.01em; }
.brand-sub { display: block; font-size: 0.8rem; color: #8e9cc2; }

.nav { display: flex; flex-direction: column; padding: 0.75rem 0.6rem; gap: 2px; overflow-y: auto; flex: 1; }
.nav-heading { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; color: #8d9bc4; padding: 0.9rem 0.65rem 0.3rem; }
.nav-group { border-radius: 8px; }
.nav-group + .nav-group { margin-top: 2px; }
.nav-group-title { display: flex; align-items: center; gap: 0.55rem; padding: 0.55rem 0.6rem; white-space: nowrap; border-radius: 7px; cursor: pointer; list-style: none; color: #dfe6f7; font-weight: 600; font-size: 0.9rem; user-select: none; }
.nav-group-title::-webkit-details-marker { display: none; }
.nav-group-title::after { content: ""; margin-inline-start: auto; width: 0.45rem; height: 0.45rem; border-right: 2px solid #8d9bc4; border-bottom: 2px solid #8d9bc4; transform: rotate(-45deg); }
.nav-group[open] > .nav-group-title::after { transform: rotate(45deg); }
.nav-group-title:hover { background: var(--navy-800); color: #fff; }
.nav-group-title:focus-visible, .nav-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.nav-icon { width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; opacity: 0.85; }
.nav-count { font-size: 0.72rem; font-weight: 600; color: #8d9bc4; margin-inline-start: auto; }
.nav-group-links { display: flex; flex-direction: column; gap: 1px; padding: 0.15rem 0 0.4rem 1.6rem; }
.nav-group-links .nav-link { padding: 0.4rem 0.65rem; font-size: 0.9rem; }

/* Top bar: breadcrumb, record search, notifications */
.topbar { display: flex; align-items: center; gap: 0.75rem; margin: -0.5rem 0 1.25rem; padding-bottom: 0.9rem; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.crumbs { font-size: 0.85rem; color: var(--muted); flex: 1 1 auto; min-width: 8rem; }
.crumbs [aria-current] { color: var(--ink); font-weight: 600; }
.topbar-search input { width: 18rem; max-width: 100%; padding: 0.45rem 0.75rem; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: 0.9rem; background: #fff; }
.topbar-search input:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.topbar-link { font-size: 0.88rem; text-decoration: none; color: var(--ink-soft); white-space: nowrap; }
.topbar-link:hover { color: var(--accent); }
.topbar-badge { display: inline-block; min-width: 1.3rem; margin-inline-start: 0.3rem; padding: 0 0.35rem; border-radius: 999px; background: var(--danger); color: #fff; font-size: 0.72rem; font-weight: 700; text-align: center; }
.topbar .nav-toggle { display: none; }
.nav-link { display: block; padding: 0.5rem 0.65rem; border-radius: 7px; color: #c9d3ea; text-decoration: none; }
.nav-link:hover { background: var(--navy-800); color: #fff; }
.nav-link.active { background: var(--navy-700); color: #fff; box-shadow: inset 3px 0 0 var(--accent); }

.sidebar-foot { padding: 1rem 1.25rem; border-top: 1px solid rgba(255, 255, 255, 0.08); display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.sidebar-foot .who { font-size: 0.85rem; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-foot form { margin: 0; }

.main { flex: 1; min-width: 0; padding: 1.75rem 2rem 3rem; max-width: 1280px; }

.page-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.page-head h1 { margin: 0; }

/* ---------- Cards, stats ---------- */

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.25rem; margin-bottom: 1.25rem; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 0.75rem; }
.card.narrow { max-width: 520px; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.stat { display: block; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); }
.stat:hover { border-color: var(--navy-500); color: var(--ink); }
.stat-value { display: block; font-size: 1.9rem; font-weight: 700; }
.stat-label { color: var(--muted); font-size: 0.9rem; }
.stat-accent { border-left: 4px solid var(--accent); }

.notice { background: var(--warn-soft); color: var(--warn); border: 1px solid #f1d9a6; border-radius: var(--radius); padding: 0.75rem 1rem; }

/* ---------- Flash ---------- */

.flash { border-radius: 8px; padding: 0.7rem 1rem; margin-bottom: 1rem; }
.flash-ok { background: var(--ok-soft); color: var(--ok); border: 1px solid #b7e2c6; }
.flash-error { background: var(--danger-soft); color: var(--danger); border: 1px solid #f5c2bd; }
.flash-error:empty, .validation-summary-valid { display: none; }
.flash-error ul { margin: 0; padding-left: 1.2rem; }

/* ---------- Tables ---------- */

.table-wrap { overflow-x: auto; }
.table-wrap.card { padding: 0; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 0.65rem 0.9rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.table th { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); font-weight: 600; background: #fafbfd; }
.table th.num, .table td.num { text-align: right; }
.table tbody tr:hover { background: #fafbff; }
.table tbody tr:last-child td { border-bottom: 0; }
.table .actions { text-align: right; white-space: nowrap; }
.table .actions .inline { margin-left: 0.3rem; }
.col-photo { width: 64px; }

.settings-table textarea { min-width: 220px; }

.thumb { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; display: inline-flex; align-items: center; justify-content: center; }
.thumb-initials { background: var(--navy-700); color: #fff; font-weight: 700; font-size: 0.85rem; }

.order-form { display: inline-flex; gap: 0.3rem; align-items: center; justify-content: flex-end; }
.order-input { width: 4.5rem; }

/* ---------- Badges, buttons ---------- */

.badge { display: inline-block; font: inherit; font-size: 0.78rem; font-weight: 600; padding: 0.15rem 0.55rem; border-radius: 999px; border: 1px solid transparent; background: #eef1f7; color: var(--ink-soft); white-space: nowrap; }
button.badge { cursor: pointer; }
.badge-on { background: var(--ok-soft); color: var(--ok); border-color: #b7e2c6; }
.badge-off { background: #f0f1f4; color: var(--muted); border-color: var(--line); }
.badge-accent { background: var(--accent-soft); color: #0b5cad; border-color: #b8dafd; }
.badge-new { background: var(--accent-soft); color: #0b5cad; }
.badge-in-progress { background: var(--warn-soft); color: var(--warn); }
.badge-warn { background: var(--warn-soft); color: var(--warn); border-color: #f1d9a6; }
.badge-closed { background: #f0f1f4; color: var(--muted); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.35rem; font: inherit; font-weight: 600; font-size: 0.92rem; padding: 0.5rem 0.95rem; border-radius: 8px; border: 1px solid var(--line); background: #fff; color: var(--ink); text-decoration: none; cursor: pointer; }
.btn:hover { border-color: var(--navy-500); color: var(--ink); }
.btn-primary { background: var(--navy-700); border-color: var(--navy-700); color: #fff; }
.btn-primary:hover { background: var(--navy-800); color: #fff; }
.btn-danger { color: var(--danger); border-color: #f5c2bd; }
.btn-danger:hover { background: var(--danger-soft); border-color: var(--danger); color: var(--danger); }
.btn-ghost { background: transparent; color: #c9d3ea; border-color: rgba(255, 255, 255, 0.2); }
.btn-ghost:hover { color: #fff; border-color: #fff; }
/* Outside the dark sidebar a ghost button is a quiet button on a light background. */
.main .btn-ghost { color: var(--navy-500); border-color: var(--line); background: transparent; }
.main .btn-ghost:hover { color: var(--navy-700); border-color: var(--navy-500); background: #fff; }
.btn-small { padding: 0.25rem 0.6rem; font-size: 0.82rem; }
.btn-block { width: 100%; }

.inline { display: inline; margin: 0; }

.chip-row { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.chip { font: inherit; font-family: var(--mono); font-size: 0.82rem; padding: 0.2rem 0.6rem; border-radius: 999px; border: 1px solid var(--line); background: #fff; cursor: pointer; }
.chip:hover { border-color: var(--danger); color: var(--danger); }

.tabs { display: flex; gap: 0.25rem; flex-wrap: wrap; margin-bottom: 1rem; border-bottom: 1px solid var(--line); }
.tab { padding: 0.5rem 0.9rem; text-decoration: none; color: var(--ink-soft); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab.active { color: var(--ink); border-bottom-color: var(--accent); font-weight: 600; }
.tab .count { font-size: 0.75rem; background: #eef1f7; border-radius: 999px; padding: 0 0.45rem; margin-left: 0.2rem; }

.pager { display: flex; align-items: center; gap: 1rem; justify-content: center; margin-top: 1rem; }

/* ---------- Forms ---------- */

.form .field { margin-bottom: 0.95rem; }
.field label { display: block; font-weight: 600; font-size: 0.88rem; margin-bottom: 0.3rem; color: var(--ink-soft); }

input[type="text"], input[type="email"], input[type="password"], input[type="url"], input[type="number"], input[type="date"], input:not([type]), select, textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: #fff;
  border: 1px solid #cdd3e0;
  border-radius: 8px;
  padding: 0.5rem 0.65rem;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
textarea { resize: vertical; }
textarea.code { font-family: var(--mono); font-size: 0.85rem; line-height: 1.45; white-space: pre; tab-size: 2; }
input[type="file"] { font: inherit; }
.order-input { width: 4.5rem; }

[dir="rtl"] { text-align: right; }

.field-error { display: block; color: var(--danger); font-size: 0.85rem; margin-top: 0.25rem; }
.field-error:empty { display: none; }
.input-validation-error { border-color: var(--danger) !important; }

.checks { display: flex; gap: 1.5rem; flex-wrap: wrap; margin: 0.25rem 0 1rem; }
.checks-stacked { flex-direction: column; gap: 0.4rem; justify-content: flex-end; }
.check { display: inline-flex !important; align-items: center; gap: 0.45rem; font-weight: 500 !important; color: var(--ink) !important; cursor: pointer; }
.check input { width: auto; margin: 0; }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.25rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem 1.25rem; }
.grid-detail { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 1.25rem; align-items: start; }

fieldset.lang { border: 1px solid var(--line); border-radius: var(--radius); padding: 0.9rem 1rem 0.2rem; margin: 0 0 1rem; min-width: 0; }
fieldset.lang legend { font-weight: 700; padding: 0 0.4rem; color: var(--navy-700); }
fieldset.lang-ar legend { font-family: var(--font); }

.form-actions { display: flex; gap: 0.6rem; align-items: center; margin-top: 0.5rem; }

details.advanced { border: 1px dashed #c3cadb; border-radius: var(--radius); padding: 0.75rem 1rem; margin: 0.5rem 0 1rem; background: #fbfcfe; }
details.advanced summary { cursor: pointer; font-weight: 600; }

/* ---------- Inquiry details ---------- */

.details { display: grid; grid-template-columns: max-content 1fr; gap: 0.45rem 1.25rem; margin: 0 0 1.25rem; }
.details dt { color: var(--muted); font-size: 0.88rem; }
.details dd { margin: 0; overflow-wrap: anywhere; }
.message { white-space: pre-wrap; background: #fafbfd; border: 1px solid var(--line); border-radius: 8px; padding: 0.9rem 1rem; overflow-wrap: anywhere; }

/* ---------- Team photo frame preview ---------- */

.photo-editor { display: flex; gap: 1.5rem; align-items: flex-start; border-top: 1px solid var(--line); padding-top: 1.1rem; margin-top: 0.5rem; flex-wrap: wrap; }
.photo-preview { text-align: center; }
.photo-fields { flex: 1; min-width: 240px; }

.photo-frame {
  position: relative;
  width: 168px;
  height: 168px;
  border-radius: 22px;
  overflow: hidden;
  background: linear-gradient(145deg, var(--navy-700), var(--navy-900));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
}
.photo-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-initials { color: #fff; font-size: 2.6rem; font-weight: 700; letter-spacing: 0.04em; }
.photo-corner {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 46px;
  height: 46px;
  background: var(--accent);
  border-top-left-radius: 22px;
}

/* ---------- Logos (light checkerboard so transparent areas show) ---------- */

.col-logo { width: 112px; }
.logo-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background-color: #ffffff;
  background-image:
    linear-gradient(45deg, #eceff4 25%, transparent 25%),
    linear-gradient(-45deg, #eceff4 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #eceff4 75%),
    linear-gradient(-45deg, transparent 75%, #eceff4 75%);
  background-size: 12px 12px;
  background-position: 0 0, 0 6px, 6px -6px, -6px 0;
}
.logo-box img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.logo-box-small { width: 96px; height: 48px; padding: 4px; }
.logo-box-large { width: 240px; height: 140px; padding: 12px; }
.logo-missing { color: var(--muted); font-size: 0.78rem; text-align: center; }

/* ---------- News cover ---------- */

fieldset.news-fields { padding-bottom: 0.9rem; }
.cover-frame { width: 240px; height: 135px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: #eef1f7; display: flex; align-items: center; justify-content: center; }
.cover-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- Sign-in / setup ---------- */

body.bare { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: var(--navy-900); padding: 1rem; }
.auth-card { width: 100%; max-width: 420px; background: #fff; border-radius: 14px; padding: 2rem; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35); }
.auth-brand { margin-bottom: 1.25rem; }
.auth-brand .brand-name { color: var(--navy-900); }
.auth-brand .brand-sub { color: var(--muted); }

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .shell { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; }
  .nav { padding: 0.5rem; }
  .nav-heading { display: none; }
  /* With script: the menu is a drawer opened from the top bar's Menu button. */
  .js-nav .sidebar { position: fixed; inset: 0 auto 0 0; width: min(86vw, 320px); height: 100vh; z-index: 50; transform: translateX(-105%); box-shadow: 0 0 40px rgba(0,0,0,0.35); }
  .js-nav.nav-open .sidebar { transform: none; }
  .js-nav.nav-anim .sidebar { transition: transform 0.2s ease; }
  .js-nav .topbar .nav-toggle { display: inline-flex; }
  .topbar-search { order: 3; flex: 1 1 100%; }
  .topbar-search input { width: 100%; }
  .main { padding: 1.25rem 1rem 2rem; }
  .grid-2, .grid-3, .grid-detail { grid-template-columns: minmax(0, 1fr); }
}

/* Analytics */
.bars { display: flex; align-items: flex-end; gap: 2px; height: 180px; padding-top: 0.5rem; }
.bar { flex: 1 1 0; height: 100%; display: flex; align-items: flex-end; min-width: 2px; }
.bar-fill { display: block; width: 100%; min-height: 1px; background: var(--accent); border-radius: 3px 3px 0 0; }
.bar:hover .bar-fill { background: var(--navy-500); }
.bars-axis { display: flex; justify-content: space-between; margin-top: 0.4rem; }
.share-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.7rem; }
.share-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.25rem 0.75rem; }
.share-label { overflow-wrap: anywhere; }
.share-num { color: var(--ink-soft); font-variant-numeric: tabular-nums; font-size: 0.9rem; }
.share-track { grid-column: 1 / -1; height: 6px; background: #eef1f7; border-radius: 999px; overflow: hidden; }
.share-fill { display: block; height: 100%; background: var(--accent); }

/* Social media page: newest YouTube videos */
.video-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
.video-list a { display: block; color: inherit; text-decoration: none; }
.video-list img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; display: block; margin-bottom: 0.4rem; background: #e5e7eb; }
.video-list span { font-size: 0.9rem; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.consent-box { border: 1px solid #f0c36d; background: #fff8e6; border-radius: 10px; padding: 0.9rem 1rem; }
.quote-cell { max-width: 32rem; }
.badge-danger { background: #fdecec; color: #b42318; border-color: #f5c2c0; }
.thread { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: .75rem; }
.thread-item { border: 1px solid var(--line); border-radius: 10px; padding: .75rem 1rem; }
.thread-reply { border-color: #b8dafd; background: #f6fbff; }
.inline-form { display: flex; gap: .75rem; align-items: flex-end; flex-wrap: wrap; }
.inline-form .field { flex: 1 1 240px; margin: 0; }
.form-fields-table input, .form-fields-table select, .form-fields-table textarea { width: 100%; }
.pill-list { display: flex; flex-wrap: wrap; gap: .35rem; }
.join-url { word-break: break-all; font-family: ui-monospace, monospace; font-size: .85rem; }
.preview-frame { width: 100%; min-height: 560px; border: 1px solid var(--line); border-radius: 10px; background: #f2f5f9; }

/* ---------- SEO centre ---------- */
.seo-status { display: flex; flex-wrap: wrap; gap: .75rem; margin: 0 0 1rem; }
.seo-switch { display: flex; align-items: center; gap: .6rem; border: 1px solid var(--line); border-radius: 10px; padding: .55rem .8rem; background: #fff; }
.seo-switch form { margin: 0; }
.seo-switch strong { font-size: .92rem; }
.seo-kill-on { border-color: #f5c2c0; background: #fff6f5; }
.rec { border: 1px solid var(--line); border-radius: 10px; padding: .85rem 1rem; margin-bottom: .75rem; background: #fff; }
.rec-head { display: flex; gap: .6rem; align-items: baseline; justify-content: space-between; flex-wrap: wrap; }
.rec-head h3 { margin: 0; font-size: 1rem; }
.rec ul { margin: .5rem 0 0; padding-inline-start: 1.1rem; }
.rec .src { color: var(--muted); font-size: .8rem; margin-top: .35rem; }
.diff { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.diff > div { border-radius: 8px; padding: .5rem .65rem; font-size: .88rem; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 16rem; overflow: auto; }
.diff-old { background: #fdf1f0; border: 1px solid #f5c2c0; }
.diff-new { background: #effaf3; border: 1px solid #b7e4c7; }
pre.code { background: #0f172a; color: #e2e8f0; border-radius: 8px; padding: .8rem 1rem; font-size: .8rem; overflow: auto; max-height: 28rem; white-space: pre-wrap; }
textarea.code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .82rem; min-height: 22rem; }
.why { color: var(--ink-soft); font-size: .82rem; line-height: 1.45; max-width: 46rem; }
.subnav { display: flex; flex-wrap: wrap; gap: .25rem; margin: -.25rem 0 1.25rem; border-bottom: 1px solid var(--line); }
.subnav a { padding: .45rem .75rem; text-decoration: none; color: var(--ink-soft); border-bottom: 2px solid transparent; margin-bottom: -1px; font-size: .92rem; }
.subnav a.active { color: var(--ink); border-bottom-color: var(--accent); font-weight: 600; }
@media (max-width: 720px) { .diff { grid-template-columns: 1fr; } }

/* Admin users, roles and permissions */
dl.details { display: grid; grid-template-columns: max-content 1fr; gap: 0.4rem 1.25rem; margin: 0; }
dl.details dt { font-weight: 600; color: var(--ink-soft); }
dl.details dd { margin: 0; }
.perm-table td, .perm-table th { vertical-align: top; }
.perm-table tr.perm-module th { background: #f3f5fa; text-transform: none; letter-spacing: 0; font-size: 0.9rem; color: var(--ink); }
.perm-filter { max-width: 18rem; margin-left: 0.5rem; padding: 0.3rem 0.5rem; border: 1px solid var(--line); border-radius: 6px; font: inherit; }
.perm-details > summary { cursor: pointer; font-weight: 600; margin: 0.5rem 0; }
.matrix td, .matrix th { text-align: center; vertical-align: middle; }
.matrix td:first-child, .matrix th:first-child { text-align: left; }
.matrix .cell { display: flex; flex-direction: column; gap: 0.2rem; align-items: center; }
.matrix .cell label { font-size: 0.78rem; white-space: nowrap; }
.matrix .na { color: var(--muted); font-size: 0.8rem; }
.diff-add { background: #e9f8ef; }
.diff-remove { background: #fdecec; }
.m365-code { font-size: 1.15rem; letter-spacing: 0.08em; padding: 0.1rem 0.4rem; background: #fff; border: 1px solid var(--line); border-radius: 6px; }

/* App download requests: inline row actions and the events sub-row */
.row-actions { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .4rem; }
.row-actions form { margin: 0; }
.row-actions .btn { padding: .25rem .6rem; font-size: .85rem; }
tr.subrow td { border-top: 0; padding-top: 0; }

/* Two-step verification */
.qr { width: 220px; max-width: 100%; background: #fff; padding: 6px; border-radius: 8px; margin: .5rem 0 1rem; }
.qr svg { display: block; width: 100%; height: auto; }
.recovery-codes { display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: .5rem; padding: 0; list-style: none; }
.recovery-codes code { font-size: 1.05rem; letter-spacing: .05em; }

/* Upload progress (admin.js) */
.upload-progress { position: fixed; inset-inline: 1rem; bottom: 1rem; z-index: 50; max-width: 34rem; margin-inline: auto; padding: 1rem 1.1rem; border-radius: 12px; background: #fff; border: 1px solid #d0d7e2; box-shadow: 0 10px 30px rgb(15 23 42 / 0.18); }
.upload-progress-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 0.6rem; }
.upload-progress progress { width: 100%; height: 0.75rem; accent-color: #0770ad; }
.upload-progress-text { margin-top: 0.45rem; color: #475569; font-variant-numeric: tabular-nums; }
.cairo-clock { display: block; margin-top: 0.35rem; font-size: 0.8rem; color: #c9d3ee; font-variant-numeric: tabular-nums; }

/* Section editor (form fields instead of JSON) */
.content-field { border-top: 1px solid var(--line, #e5e7eb); padding-top: 0.9rem; }
.content-field textarea { min-height: 3rem; }
.checks-wrap { display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; }
.content-field input[type=color] { width: 3rem; height: 2.4rem; padding: 0.15rem; }

/* Pages & menu editor */
.menu-group { margin-bottom: 1rem; }
.menu-links input { width: 100%; min-width: 7rem; }
.menu-links .new-row input::placeholder { color: var(--muted, #8a94a6); }
.menu-links .order-input { width: 4.5rem; min-width: 0; }

/* Colours page */
.theme-previews { margin-bottom: 1.25rem; }
.theme-preview { background: var(--p-obsidian); color: var(--p-ice); border-radius: var(--radius); padding: 1.25rem; border: 1px solid var(--line); }
.theme-preview .tp-label { color: var(--p-cyan); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; margin: 0; }
.theme-preview .tp-title { font-size: 1.4rem; font-weight: 700; margin: 0.4rem 0; color: var(--p-ice); }
.theme-preview .tp-lead { color: var(--p-mist); margin: 0; }
.theme-preview .tp-quiet { color: var(--p-haze); font-size: 0.85rem; margin: 0.3rem 0 0.8rem; }
.theme-preview .tp-card { background: var(--p-midnight); border-radius: 0.8rem; padding: 0.9rem; display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; }
.theme-preview .tp-dot { width: 0.7rem; height: 0.7rem; border-radius: 50%; display: inline-block; }
.theme-preview .tp-c { background: var(--p-cyan); } .theme-preview .tp-v { background: var(--p-violet); } .theme-preview .tp-s { background: var(--p-signal); }
.theme-preview .tp-link { color: var(--p-cyan); text-decoration: underline; }
.theme-preview .tp-btn { background: var(--p-cyan); color: var(--p-obsidian); border-radius: 999px; padding: 0.45rem 1rem; font-weight: 600; margin-inline-start: auto; }
.theme-preview .tp-notice { color: var(--p-amber); margin: 0.8rem 0 0; font-size: 0.85rem; }
.theme-preview .tp-error { color: var(--p-danger); margin: 0.2rem 0 0; font-size: 0.85rem; }
.colour-table input[type=color] { width: 2.6rem; height: 2.2rem; padding: 0.1rem; }
.colour-text { width: 6.5rem; }
.swatch { display: inline-block; padding: 0.1rem 0.4rem; border-radius: 0.3rem; font-weight: 700; margin-inline-end: 0.4rem; border: 1px solid var(--line); }
.row-warn td { background: rgba(196, 43, 68, 0.06); }

/* Printable documents (receipts, certificates) */
.doc-print { max-width: 760px; background: #fff; color: #111; border: 1px solid #d5d9e0; border-radius: 8px; padding: 2rem; }
.doc-print h2 { margin-top: 0; }
.doc-print table { width: 100%; border-collapse: collapse; }
.doc-print th, .doc-print td { text-align: start; padding: .4rem .5rem; border-bottom: 1px solid #e3e6eb; vertical-align: top; }
.doc-print th { width: 38%; font-weight: 600; }
.doc-print .doc-stamp { display: inline-block; border: 2px solid #b42318; color: #b42318; padding: .2rem .6rem; font-weight: 700; transform: rotate(-4deg); }
@media print {
  .sidebar, .page-head .btn, .no-print, .flash { display: none !important; }
  .main { margin: 0 !important; padding: 0 !important; }
  body { background: #fff !important; }
  .doc-print { border: none; max-width: none; }
}
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1rem; margin: 1rem 0; }
.grid-cards .card { margin: 0; }
.grid-cards h2 { font-size: 0.95rem; color: var(--muted); margin: 0 0 .4rem; }
.fin-figure { font-size: 1.35rem; font-weight: 700; margin: 0; }
/* Sales & delivery */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 1fr); gap: .8rem; overflow-x: auto; padding-bottom: .5rem; margin: 1rem 0; }
.board-col { background: #f3f5f8; border: 1px solid #dde2e9; border-radius: 8px; padding: .6rem; min-height: 6rem; }
.board-head { font-size: .95rem; margin: 0 0 .5rem; text-transform: capitalize; }
.board-card { background: #fff; border: 1px solid #d5d9e0; border-radius: 6px; padding: .5rem .6rem; margin-bottom: .5rem; }
.board-card form { margin-top: .4rem; }
.quote-lines input, .quote-lines select, .quote-lines textarea { font: inherit; max-width: 100%; }
.quote-lines textarea { min-width: 16rem; }
.timeline th { width: 28%; font-weight: 500; }
.tl-track { position: relative; display: block; height: 14px; background: #eef1f5; border-radius: 4px; min-width: 200px; }
.tl-bar { position: absolute; top: 2px; height: 10px; border-radius: 3px; background: #2f6fb2; }
.tl-bar.tl-done { background: #1f7a4d; }
.tl-bar.tl-blocked { background: #b42318; }
.tl-bar.tl-cancelled { background: #9aa6b5; }
.tl-ms { position: absolute; top: 0; width: 12px; height: 12px; margin-inline-start: -6px; background: #f0a202; transform: rotate(45deg); }
.progress { display: inline-block; vertical-align: middle; width: 80px; height: 8px; background: #e3e6eb; border-radius: 4px; overflow: hidden; }
.progress span { display: block; height: 100%; background: #1f7a4d; }
/* Forms grouped in a fieldset only to switch them read-only: no frame. */
.main fieldset:not(.checks) { border: 0; padding: 0; margin: 0; min-width: 0; }
.quote-lines td { vertical-align: top; }
.quote-lines input[name$=".Quantity"], .quote-lines input[name$=".DiscountPercent"], .quote-lines input[name$=".SortOrder"] { width: 4.5rem; min-width: 4.5rem; }
.quote-lines input[name$=".UnitPrice"], .quote-lines input[name$=".UnitCost"], .quote-lines input[name$=".DiscountAmount"] { width: 7rem; min-width: 7rem; }
.quote-lines input[name$=".Unit"] { width: 5rem; min-width: 5rem; }
.quote-lines select { min-width: 7.5rem; }
.quote-lines textarea { min-width: 14rem; }

@media (prefers-reduced-motion: reduce) { .js-nav.nav-anim .sidebar { transition: none; } }
.search-hits { list-style: none; margin: 0; padding: 0; }
.search-hits li { padding: 0.4rem 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.search-hits li:last-child { border-bottom: 0; }

/* Dashboard */
.range-form { display: flex; align-items: center; gap: 0.5rem; }
.range-form select { padding: 0.4rem 0.6rem; border: 1px solid var(--line); border-radius: 8px; font: inherit; background: #fff; }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 0.9rem; margin-bottom: 0.75rem; }
.kpi { display: flex; flex-direction: column; gap: 0.15rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.9rem 1rem; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); min-height: 7.2rem; }
.kpi:hover { border-color: var(--navy-500); color: var(--ink); }
.kpi:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.kpi-label { font-size: 0.85rem; color: var(--ink-soft); font-weight: 600; }
.kpi-value { font-size: 1.75rem; font-weight: 700; line-height: 1.2; }
.kpi-delta { font-size: 0.8rem; color: var(--muted); }
.kpi-delta.up { color: var(--ok); }
.kpi-delta.down { color: var(--danger); }
.kpi-basis { font-size: 0.75rem; color: var(--muted); margin-top: auto; }
.money-line { margin: 0 0 1.25rem; }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.dash-grid > .card { margin-bottom: 0; }
.dash-grid + * { margin-top: 1.25rem; }
.actions { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.action a { display: flex; align-items: center; gap: 0.9rem; padding: 0.6rem 0.75rem; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; color: var(--ink); border-inline-start-width: 4px; }
.action a:hover { background: #f8f9fc; }
.action-accent a { border-inline-start-color: var(--accent); }
.action-warn a { border-inline-start-color: #d89b1c; }
.action-danger a { border-inline-start-color: var(--danger); }
.action-count { font-size: 1.35rem; font-weight: 700; min-width: 2.5rem; text-align: center; }
.action-text { display: flex; flex-direction: column; }
.timeline-list { list-style: none; margin: 0; padding: 0; }
.timeline-list li { padding: 0.45rem 0; border-bottom: 1px solid var(--line); font-size: 0.9rem; overflow-wrap: anywhere; }
.timeline-list li:last-child { border-bottom: 0; }
.empty { color: var(--muted); background: #f8f9fc; border: 1px dashed var(--line); border-radius: 8px; padding: 0.9rem 1rem; margin: 0; }
.content-counts { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; }
.content-counts a { text-decoration: none; }
@media (max-width: 900px) { .dash-grid { grid-template-columns: 1fr; } .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; } .kpi { min-height: 0; padding: 0.75rem; } .kpi-value { font-size: 1.45rem; } }

/* Finance */
.head-actions { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.fin-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.fin-card { display: flex; flex-direction: column; margin-bottom: 0; }
.fin-card h2 { font-size: 0.95rem; color: var(--ink-soft); }
.fin-card .card-link { margin-top: auto; padding-top: 0.5rem; font-size: 0.88rem; font-weight: 600; }
.fin-attention { border-inline-start: 4px solid #d89b1c; }
.month-chart { margin: 0 0 1rem; }
.month-bars { display: grid; grid-template-columns: repeat(12, 1fr); gap: 6px; height: 140px; align-items: end; margin-top: 0.4rem; }
.month-bar { height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: stretch; }
.month-fill { display: block; background: var(--accent); border-radius: 4px 4px 0 0; min-height: 0; }
.month-name { font-size: 0.7rem; color: var(--muted); text-align: center; margin-top: 3px; }

/* News intelligence */
.tabs { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 1rem; }
.tab { padding: 0.4rem 0.8rem; border-radius: 999px; border: 1px solid var(--line); background: #fff; text-decoration: none; color: var(--ink-soft); font-size: 0.88rem; }
.tab.active { background: var(--navy-700); border-color: var(--navy-700); color: #fff; }
.filters { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: flex-end; }
.filters .field { margin: 0; min-width: 9rem; flex: 1 1 9rem; }
.filter-actions { display: flex; gap: 0.5rem; }
.story-list { list-style: none; margin: 0; padding: 0; }
.story { display: flex; gap: 1rem; justify-content: space-between; align-items: flex-start; padding: 0.75rem 0; border-bottom: 1px solid var(--line); }
.story:last-child { border-bottom: 0; }
.story-title { font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.story-meta { margin-top: 0.2rem; overflow-wrap: anywhere; }
.story-badges { display: flex; flex-wrap: wrap; gap: 0.3rem; justify-content: flex-end; max-width: 45%; }
.pager { display: flex; gap: 1rem; align-items: center; justify-content: center; margin: 1rem 0; }
@media (max-width: 700px) { .story { flex-direction: column; } .story-badges { max-width: none; justify-content: flex-start; } }
.intel-items { list-style: none; margin: 0; padding: 0; }
.intel-items > li { padding: 0.7rem 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.intel-items > li:last-child { border-bottom: 0; }
.trust { min-width: 1.6rem; text-align: center; }
.trust-A { background: var(--ok-soft); color: var(--ok); border-color: #b7e2c6; }
.trust-B { background: var(--accent-soft); color: #0b5cad; border-color: #b8dafd; }
.trust-C { background: var(--warn-soft); color: var(--warn); border-color: #f1d9a6; }
.trust-D { background: #fdecec; color: #b42318; border-color: #f5c2c0; }
.error-text { color: var(--danger); }
.switch-form { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; align-items: center; }
.switch-form .field { margin: 0; }
.review-group { border: 1px solid var(--line); border-radius: var(--radius); padding: 0.9rem 1rem; margin: 0 0 1rem; }
.review-group legend { font-weight: 700; padding: 0 0.4rem; }
.review-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.25rem; }
.mail-preview { border: 1px solid var(--line); border-radius: 8px; padding: 1rem; background: #fff; max-height: 34rem; overflow: auto; }
@media (max-width: 900px) { .review-cols { grid-template-columns: 1fr; } }
.source-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.source-chips .badge { text-decoration: none; }

/* ETA e-invoicing: long identifiers (UUIDs, hashes) wrap on small screens */
.eta-facts li { overflow-wrap: anywhere; }
pre.code { overflow-wrap: anywhere; }
.fieldset-plain { min-width: 0; border: 0; margin: 0; padding: 0; }

/* ---------- Event gift portal ---------- */
.card-sub { border: 1px solid var(--line, #dfe5ec); border-radius: 10px; padding: .6rem .9rem; margin-top: .8rem; }
.card-sub > summary { cursor: pointer; font-weight: 600; }
.qr-preview { width: 100%; max-width: 260px; background: #fff; padding: 8px; border-radius: 10px; border: 1px solid var(--line, #dfe5ec); }
.qr-preview svg { display: block; width: 100%; height: auto; }
.upload-preview { display: block; max-width: 180px; max-height: 120px; margin-top: .4rem; border-radius: 8px; border: 1px solid var(--line, #dfe5ec); object-fit: contain; }
img.thumb { width: 40px; height: 40px; object-fit: cover; border-radius: 6px; vertical-align: middle; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: .8rem; }
.media-tile { border: 1px solid var(--line, #dfe5ec); border-radius: 10px; padding: .5rem; display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
.media-tile img, .media-tile video { width: 100%; aspect-ratio: 4/3; object-fit: contain; background: #f3f5f8; border-radius: 6px; }
.media-tile .name { overflow-wrap: anywhere; font-size: .85rem; }
.upload-row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.upload-status { font-size: .85rem; }
.upload-status[data-state="error"] { color: var(--danger); }
.upload-status[data-state="ok"] { color: var(--ok); }
progress.upload-progress { width: 160px; }
.design-layout { display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1100px) { .design-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; } .design-layout .preview-col { position: sticky; top: 1rem; } }
.preview-tabs { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: .6rem; }
.preview-tabs button[aria-pressed="true"] { background: var(--accent, #0b6bcb); color: #fff; }
.preview-frame { border: 1px solid var(--line, #dfe5ec); border-radius: 12px; overflow: hidden; background: #fff; margin: 0 auto; }
.preview-frame[data-mode="mobile"] { max-width: 380px; }
.preview-frame[data-mode="print"] { max-width: 420px; }
.gift-desk { max-width: 640px; }
.gift-desk .code-input { font: 700 1.4rem/1.2 ui-monospace, Consolas, monospace; letter-spacing: .12em; text-transform: uppercase; }
.redeem-result { border-radius: 12px; padding: 1rem; border: 2px solid var(--line, #dfe5ec); }
.redeem-result[data-state="ok"] { border-color: var(--ok); background: var(--ok-soft); }
.redeem-result[data-state="warn"] { border-color: var(--warn); background: var(--warn-soft); }
.redeem-result[data-state="bad"] { border-color: var(--danger); background: var(--danger-soft); }
.gift-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr)); gap: .75rem; margin: 0 0 .75rem; }
.gift-stats > div { border: 1px solid var(--line); border-radius: 10px; padding: .6rem .8rem; }
.gift-stats dt { font-size: .8rem; color: var(--muted); }
.gift-stats dd { margin: .2rem 0 0; font-size: 1.5rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.gift-stats.compact dd { font-size: 1rem; font-weight: 600; overflow-wrap: anywhere; }
[data-kind-for][hidden] { display: none !important; }
/* Bulk gift upload */
.input-narrow { max-width: 7rem; }
.bulk-table td { vertical-align: middle; }
.bulk-table input[type=file] { max-width: 15rem; }
.bulk-thumb { max-width: 64px; max-height: 64px; }
.bulk-pick { padding: 1rem; border: 2px dashed var(--line, #dfe5ec); border-radius: 12px; margin-bottom: 1rem; }
[data-js-only][hidden] { display: none !important; }
.text-error { color: #b42318; }
.sample-note { border-left: 4px solid #f0b429; }
/* Cybersecurity */
.badge.sev-critical { background: #fee4e2; color: #912018; border-color: #fecdca; }
.badge.sev-high { background: #fff0e0; color: #93370d; border-color: #fedbb5; }
.badge.sev-medium { background: #fef7c3; color: #713b12; border-color: #fde68a; }
.badge.sev-low { background: #e0f2fe; color: #0b4a6f; border-color: #bae6fd; }
dl.kv { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1rem; }
dl.kv dt { font-weight: 600; }
dl.kv dd { margin: 0; }

/* E-mail registrants */
.bc-row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: .6rem 0; }
.bc-row input[type=search], .bc-row input[type=email] { min-width: 14rem; flex: 1 1 14rem; max-width: 28rem; }
fieldset.bc-groups { border: 1px solid var(--line); border-radius: var(--radius); padding: .5rem 1rem .8rem; margin: .8rem 0; min-width: 0; }
fieldset.bc-groups legend { font-weight: 700; padding: 0 .4rem; color: var(--navy-700); }
fieldset.bc-groups .bc-day { margin-inline-start: 1.6rem; }
.bc-row input[type=search] { font: inherit; padding: .55rem .75rem; border: 1px solid #cfd6e0; border-radius: 8px; background: #fff; }

/* ---- AI SEO Autopilot: server-drawn charts, findings, checklists ---- */
.chart-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); gap: 1rem; margin: .5rem 0 1rem; }
.chart { margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: .75rem .9rem; min-width: 0; }
.chart figcaption { margin-bottom: .5rem; }
.chart-svg { width: 100%; height: 180px; display: block; overflow: visible; }
.ch-grid { stroke: var(--line); stroke-width: 1; }
.ch-axis { fill: var(--muted); font-size: 11px; }
.ch-line { fill: none; stroke-width: 2; vector-effect: non-scaling-stroke; }
.ch-line.ch-c1, .ch-dot.ch-c1 { stroke: var(--accent); }
.ch-line.ch-c2, .ch-dot.ch-c2 { stroke: var(--warn); stroke-dasharray: 5 3; }
.ch-dot { fill: var(--card); stroke-width: 1.5; }
.chart-legend { display: flex; gap: 1rem; flex-wrap: wrap; font-size: .85rem; color: var(--ink-soft); margin: .25rem 0 0; }
.chart-legend span { display: inline-flex; align-items: center; gap: .35rem; }
.ch-key { display: inline-block; width: 1.1rem; height: 0; border-top: 2px solid var(--accent); }
.ch-key.ch-c2 { border-top: 2px dashed var(--warn); }
.chart-data { margin-top: .5rem; font-size: .85rem; }
.chart-data summary { cursor: pointer; color: var(--ink-soft); }
.hbars { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }
.hbar { display: grid; grid-template-columns: minmax(6rem, 38%) 1fr auto; gap: .5rem; align-items: center; text-decoration: none; color: var(--ink); padding: .15rem .25rem; border-radius: 6px; }
a.hbar:hover, a.hbar:focus-visible { background: var(--accent-soft); }
.hbar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .88rem; }
.hbar-track { background: var(--bg); border-radius: 4px; height: .7rem; overflow: hidden; }
.hbar-fill { display: block; height: 100%; background: var(--accent); }
.hbar-fill.ch-c2 { background: var(--warn); }
.hbar-value { font-variant-numeric: tabular-nums; font-size: .88rem; color: var(--ink-soft); }
dl.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.checklist { list-style: none; padding: 0; margin: .5rem 0; display: grid; gap: .3rem; }
.checklist li { display: flex; gap: .5rem; align-items: baseline; }
.checks-stacked { display: grid; gap: .5rem; }
.checks-stacked .check { align-items: flex-start; }
@media (max-width: 560px) {
  dl.kv { grid-template-columns: 1fr; }
  dl.kv dd { margin-bottom: .35rem; }
  .hbar { grid-template-columns: 1fr auto; }
  .hbar-track { grid-column: 1 / -1; grid-row: 2; }
}
@media (prefers-reduced-motion: reduce) { a.hbar { transition: none; } }
.url-wrap { overflow-wrap: anywhere; }
a.hbar:hover, a.hbar:focus-visible { color: var(--ink); }
