/* AKDA Fabric UI — design tokens. Every visual decision is a variable; presets only re-assign variables.
   Root attributes set by app.js: data-preset, data-density, data-motion, data-bg. */
:root {
  --primary: #2f6fed; --primary-ink: #ffffff; --bg: #f4f5f7; --panel: #ffffff; --panel-2: #f8f9fb; --ink: #1d2230; --muted: #6b7280;
  --line: #e3e6eb; --soft: #f0f4ff; --ok: #1e8e5a; --bad: #c0392b; --info: #2f6fed; --warn: #b7791f;
  --side: #151a24; --side-ink: #d7dbe3; --side-hover: #222a38; --side-muted: #8b93a3;
  --radius: 12px; --scale: 1; --pad: 16px; --gap: 12px; --shadow: 0 1px 2px rgba(16, 24, 40, .06);
  --shadow-lift: 0 10px 28px -12px rgba(16, 24, 40, .28); --blur: 0px; --panel-alpha: 1;
  --font: "Segoe UI", "Noto Naskh Arabic", "Noto Sans Arabic", Tahoma, sans-serif; --heading-weight: 800;
  --ease: cubic-bezier(.2, .8, .2, 1); --t: 220ms;
}
@media (prefers-color-scheme: dark) {
  :root[data-preset="classic"], :root:not([data-preset]) {
    --bg: #11141a; --panel: #1a1e26; --panel-2: #161a21; --ink: #e8eaed; --muted: #9aa1ad; --line: #2a303b; --soft: #1f2633; --side: #0b0e13;
  }
}
/* ---------- presets ---------- */
:root[data-preset="glass"] {
  --bg: #e9eefb; --panel: rgba(255, 255, 255, .62); --panel-2: rgba(255, 255, 255, .45); --line: rgba(255, 255, 255, .7);
  --soft: rgba(255, 255, 255, .5); --blur: 14px; --side: rgba(17, 24, 39, .78); --shadow: 0 8px 30px -12px rgba(30, 41, 80, .25);
}
:root[data-preset="soft"] {
  --bg: #f6f3fb; --panel: #ffffff; --panel-2: #fbf9ff; --line: #ece6f6; --soft: #f3eefc; --side: #2b2440; --side-hover: #3a3156;
  --shadow: 0 6px 18px -10px rgba(76, 52, 140, .25); --heading-weight: 700;
}
:root[data-preset="contrast"] {
  --bg: #ffffff; --panel: #ffffff; --panel-2: #ffffff; --ink: #000000; --muted: #2b2b2b; --line: #000000; --soft: #f1f1f1;
  --side: #000000; --side-ink: #ffffff; --side-muted: #d0d0d0; --shadow: none; --heading-weight: 900;
}
:root[data-preset="night"] {
  --bg: #0d1017; --panel: #161b24; --panel-2: #121720; --ink: #e9ecf1; --muted: #9aa3b2; --line: #262d3a; --soft: #1b2230;
  --side: #090c11; --side-hover: #1a2130; --shadow: 0 1px 0 rgba(255, 255, 255, .03);
}
:root[data-preset="paper"] {
  --bg: #f5f0e6; --panel: #fffdf8; --panel-2: #faf5ea; --ink: #2a2118; --muted: #7a6a58; --line: #e7dcc8; --soft: #f3ead9;
  --side: #2a2118; --side-ink: #f3ead9; --side-hover: #3a2e22; --side-muted: #b9a68c; --shadow: 0 1px 0 rgba(42, 33, 24, .06);
}
:root[data-density="compact"] { --pad: 10px; --gap: 8px; }
:root[data-density="spacious"] { --pad: 22px; --gap: 16px; }
/* ---------- backgrounds ---------- */
:root[data-bg="gradient"] .main { background: linear-gradient(160deg, color-mix(in srgb, var(--primary) 9%, var(--bg)), var(--bg) 55%); }
:root[data-bg="mesh"] .main { background: radial-gradient(60% 50% at 10% 0%, color-mix(in srgb, var(--primary) 18%, transparent), transparent),
  radial-gradient(50% 40% at 100% 20%, color-mix(in srgb, var(--info) 14%, transparent), transparent),
  radial-gradient(60% 50% at 50% 100%, color-mix(in srgb, var(--ok) 10%, transparent), transparent), var(--bg); }
:root[data-bg="dots"] .main { background-image: radial-gradient(color-mix(in srgb, var(--ink) 12%, transparent) 1px, transparent 1px); background-size: 18px 18px; }
:root[data-bg="grid"] .main { background-image: linear-gradient(color-mix(in srgb, var(--ink) 6%, transparent) 1px, transparent 1px),
  linear-gradient(90deg, color-mix(in srgb, var(--ink) 6%, transparent) 1px, transparent 1px); background-size: 28px 28px; }
/* ---------- base ---------- */
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--ink); font-family: var(--font); line-height: 1.55; font-size: calc(15px * var(--scale)); }
button, input, select, textarea { font: inherit; color: inherit; }
svg.ico { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; }
.shell { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 100vh; }
.title-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.btn.nav-toggle { display: none; }
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: static !important; height: auto !important; display: none; }
  .shell.nav-open .side { display: block; }
  .btn.nav-toggle { display: inline-flex; }
}
.side { background: var(--side); color: var(--side-ink); padding: 14px 10px; position: sticky; top: 0; height: 100vh; overflow: auto;
        backdrop-filter: blur(var(--blur)); -webkit-backdrop-filter: blur(var(--blur)); }
.side .brand { font-weight: var(--heading-weight); font-size: 1.05rem; padding: 6px 10px 14px; color: #fff; }
.side .brand small { display: block; font-weight: 400; color: var(--side-muted); font-size: .75rem; }
.side .grp { margin: 12px 0 4px; padding: 0 10px; font-size: .72rem; letter-spacing: .4px; color: var(--side-muted); display: flex; gap: 7px; align-items: center; }
.side .grp i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.side .grp svg.ico { width: 14px; height: 14px; }
.side a { display: flex; align-items: center; gap: 8px; color: var(--side-ink); text-decoration: none; padding: 7px 12px; border-radius: 8px; font-size: .92rem;
          transition: background var(--t) var(--ease), transform var(--t) var(--ease); }
.side a:hover { background: var(--side-hover); }
.side a.on { background: var(--primary); color: var(--primary-ink); }
.main { padding: 0 18px 40px; min-width: 0; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 0; border-bottom: 1px solid var(--line); margin-bottom: 16px; flex-wrap: wrap; }
.top h1 { font-size: 1.25rem; margin: 0; font-weight: var(--heading-weight); }
.who { color: var(--muted); font-size: .85rem; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.btn { border: 0; border-radius: calc(var(--radius) * .75); padding: 8px 14px; font-weight: 700; cursor: pointer; background: var(--primary); color: var(--primary-ink);
       display: inline-flex; align-items: center; gap: 6px; transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease), filter var(--t); }
.btn:hover { filter: brightness(1.06); }
.btn.ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.btn.danger { background: var(--bad); color: #fff; }
.btn.small { padding: 4px 10px; font-size: .82rem; }
.btn:disabled { opacity: .5; cursor: default; }
.bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: var(--gap); }
.bar input[type=search] { flex: 1; min-width: 180px; }
input, select, textarea { border: 1.5px solid var(--line); border-radius: calc(var(--radius) * .75); padding: 8px 10px; background: var(--panel); width: 100%;
                          transition: border-color var(--t), box-shadow var(--t); }
textarea { min-height: 80px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 22%, transparent); }
.panel, .kpi, .card, table.grid { backdrop-filter: blur(var(--blur)); -webkit-backdrop-filter: blur(var(--blur)); }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--pad); box-shadow: var(--shadow); }
.tablewrap { overflow-x: auto; }
table.grid { width: 100%; border-collapse: collapse; background: var(--panel); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
table.grid th, table.grid td { padding: calc(var(--pad) * .55) 10px; border-bottom: 1px solid var(--line); text-align: start; font-size: .9rem; white-space: nowrap; }
table.grid th { background: var(--soft); font-weight: 700; color: var(--muted); font-size: .8rem; }
table.grid tr.row:hover td { background: var(--soft); cursor: pointer; }
td.num, th.num { text-align: end; font-variant-numeric: tabular-nums; }
td.empty { text-align: center; color: var(--muted); padding: 30px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); background: var(--panel); border-radius: 999px; padding: 3px 11px; font-size: .8rem; cursor: pointer; transition: background var(--t); }
.chip.on { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .78rem; font-weight: 700; background: var(--soft); color: var(--muted); }
.badge.ok { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }
.badge.bad { background: color-mix(in srgb, var(--bad) 14%, transparent); color: var(--bad); }
.badge.info { background: color-mix(in srgb, var(--info) 14%, transparent); color: var(--info); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--gap); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: calc(var(--pad) * .8); cursor: pointer; box-shadow: var(--shadow);
        transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease); transform-style: preserve-3d; }
.card b { display: block; margin-bottom: 4px; }
.card .meta { color: var(--muted); font-size: .82rem; }
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr); gap: var(--gap); overflow-x: auto; padding-bottom: 6px; }
.kcol { background: var(--soft); border-radius: var(--radius); padding: 8px; min-height: 120px; }
.kcol h3 { margin: 2px 4px 8px; font-size: .85rem; color: var(--muted); display: flex; justify-content: space-between; }
.kcol .card { margin-bottom: 8px; }
.form { display: grid; gap: var(--gap); }
.section h2 { font-size: .95rem; margin: 0 0 10px; color: var(--muted); }
.fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px 14px; }
.field label { display: block; font-size: .8rem; color: var(--muted); margin-bottom: 3px; }
.field .ro { padding: 8px 0; font-weight: 600; }
.field .help { color: var(--muted); font-size: .75rem; margin-top: 2px; }
.field .err, .errline { color: var(--bad); font-size: .8rem; min-height: 1em; }
.field.wide { grid-column: 1 / -1; }
.field.emphasis label { color: var(--ink); font-weight: 700; }
.field.emphasis input, .field.emphasis .ro { font-size: 1.12em; font-weight: 700; }
.field[data-tone] input, .field[data-tone] select, .field[data-tone] textarea { border-inline-start: 4px solid var(--tone, var(--primary)); }
.field[data-tone="ok"] { --tone: var(--ok); } .field[data-tone="bad"] { --tone: var(--bad); } .field[data-tone="info"] { --tone: var(--info); }
.field[data-tone="warn"] { --tone: var(--warn); } .field[data-tone="neutral"] { --tone: var(--muted); }
.lines td { padding: 4px 6px; }
.lines input, .lines select { padding: 6px 8px; min-width: 90px; }
.statebar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: space-between; margin-bottom: 12px; }
.steps { display: flex; gap: 4px; flex-wrap: wrap; }
.steps span { padding: 3px 10px; border-radius: 999px; background: var(--soft); color: var(--muted); font-size: .78rem; transition: background var(--t); }
.steps span.on { background: var(--primary); color: var(--primary-ink); }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: var(--gap); margin-bottom: 14px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--pad); box-shadow: var(--shadow);
       transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease); transform-style: preserve-3d; position: relative; overflow: hidden; }
.kpi::after { content: ""; position: absolute; inset-inline-start: 0; top: 0; bottom: 0; width: 4px; background: var(--primary); opacity: .75; }
.kpi .v { font-size: 1.5rem; font-weight: var(--heading-weight); font-variant-numeric: tabular-nums; }
.kpi .l { color: var(--muted); font-size: .82rem; }
.charts { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: var(--gap); }
.chart h3 { margin: 0 0 8px; font-size: .9rem; }
.chart svg { width: 100%; height: auto; display: block; }
.chart rect.bar-r { transform-origin: bottom; transform-box: fill-box; }
.login { max-width: 380px; margin: 10vh auto; }
.login h1 { font-size: 1.3rem; }
.login .field { margin-bottom: 10px; }
.note { color: var(--muted); font-size: .85rem; }
.toast { position: fixed; inset-inline-start: 16px; bottom: 16px; background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: 10px; font-size: .9rem; z-index: 30; }
.pager { display: flex; gap: 8px; align-items: center; justify-content: flex-end; margin-top: 8px; color: var(--muted); font-size: .85rem; }
.roles { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.roles label { display: flex; gap: 5px; align-items: center; font-size: .85rem; color: var(--ink); }
.roles input { width: auto; }
/* ---------- customisation drawer ---------- */
.scrim { position: fixed; inset: 0; background: rgba(10, 14, 22, .35); z-index: 20; }
.drawer { position: fixed; top: 0; bottom: 0; inset-inline-end: 0; width: min(420px, 100vw); background: var(--panel); color: var(--ink); z-index: 21;
          border-inline-start: 1px solid var(--line); box-shadow: -18px 0 40px -20px rgba(0, 0, 0, .35); padding: 18px; overflow: auto;
          backdrop-filter: blur(calc(var(--blur) + 6px)); -webkit-backdrop-filter: blur(calc(var(--blur) + 6px)); }
.drawer h2 { margin: 0 0 4px; font-size: 1.1rem; display: flex; align-items: center; gap: 8px; }
.drawer .actions { margin-top: 16px; }
.drawer h3 { margin: 18px 0 8px; font-size: .85rem; color: var(--muted); }
.drawer .row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.drawer input[type=range] { padding: 0; }
.drawer input[type=color] { width: 44px; height: 34px; padding: 2px; }
.presets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.preset { border: 1.5px solid var(--line); border-radius: calc(var(--radius) * .8); padding: 8px; cursor: pointer; background: var(--panel-2); text-align: center; font-size: .8rem; }
.preset[aria-pressed="true"] { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 20%, transparent); }
.preset .sw { display: flex; height: 22px; border-radius: 6px; overflow: hidden; margin-bottom: 6px; }
.preset .sw i { flex: 1; }
.seg { display: inline-flex; border: 1.5px solid var(--line); border-radius: 999px; overflow: hidden; }
.seg button { border: 0; background: transparent; padding: 5px 12px; cursor: pointer; font-size: .82rem; }
.seg button[aria-pressed="true"] { background: var(--primary); color: var(--primary-ink); }
.swatches { display: flex; gap: 6px; flex-wrap: wrap; }
.swatches button { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--panel); box-shadow: 0 0 0 1px var(--line); cursor: pointer; }
.swatches button[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--ink); }
.relabel { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 8px; align-items: center; font-size: .82rem; }
.relabel span { color: var(--muted); }
/* ---------- motion (data-motion="full" | "reduced" | "none") ---------- */
@keyframes enter { from { opacity: 0; transform: translateY(8px) scale(.995); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
:root[data-motion="full"] .view > * { animation: enter 420ms var(--ease) both; animation-delay: calc(var(--i, 0) * 45ms); }
:root[data-motion="full"] .card:hover, :root[data-motion="full"] .kpi:hover { box-shadow: var(--shadow-lift); }
:root[data-motion="full"] .btn:active { transform: translateY(1px) scale(.98); }
:root[data-motion="full"] .chart rect.bar-r { animation: grow 650ms var(--ease) both; animation-delay: calc(var(--i, 0) * 50ms); }
:root[data-motion="full"] .drawer { animation: enter 260ms var(--ease) both; }
:root[data-motion="full"] tr.row { animation: fade 300ms var(--ease) both; animation-delay: calc(var(--i, 0) * 25ms); }
:root[data-motion="reduced"] .view > *, :root[data-motion="reduced"] .drawer { animation: fade 160ms linear both; }
:root[data-motion="none"] *, :root[data-motion="none"] *::before, :root[data-motion="none"] *::after { animation: none !important; transition: none !important; }
@media (prefers-reduced-motion: reduce) {
  :root[data-motion="full"] .view > *, :root[data-motion="full"] tr.row, :root[data-motion="full"] .chart rect.bar-r { animation: fade 160ms linear both; }
  .card, .kpi { transform: none !important; }
}

/* ---------- about / credits ---------- */
.about-card { margin-bottom: 16px; }
.about-card h2 { font-size: 1.05rem; margin: 0 0 10px; }
.complist { margin: 0; padding-inline-start: 18px; line-height: 1.9; }
.credit { border-top: 1px solid var(--line); padding: 10px 0; }
.credit-head { display: flex; gap: 8px; align-items: center; }
pre.notice { white-space: pre-wrap; font-size: .78rem; background: var(--soft); padding: 10px; border-radius: 8px; max-height: 260px; overflow: auto; direction: ltr; text-align: left; }
.side a.about { margin-top: 14px; opacity: .85; }

/* notifications */
.btn.bell { position: relative; }
.btn.bell .count { position: absolute; top: -6px; inset-inline-end: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--bad, #d1435b); color: #fff; font-size: .7rem; line-height: 18px; text-align: center; }
.btn.bell .count[hidden] { display: none; }
.notifs { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.notif { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: var(--radius, 10px); background: var(--bg);
  color: var(--ink); text-decoration: none; border: 1px solid var(--line, rgba(0,0,0,.08)); }
.notif.unread { border-inline-start: 3px solid var(--primary); font-weight: 600; }
.notif small { color: var(--muted); font-weight: 400; }
/* printing */
.print-head { display: none; }
@media print {
  .side, .top .who, .bar, .statebar .chips, .nav-toggle, .toast, .scrim, .drawer, #customize_btn { display: none !important; }
  .shell { display: block !important; }
  body, .main, .panel { background: #fff !important; color: #000 !important; box-shadow: none !important; }
  .print-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; border-bottom: 2px solid #000; padding-bottom: 8px; margin-bottom: 12px; }
  input, select, textarea { border: none !important; background: transparent !important; color: #000 !important; }
}

/* files */
.filebox { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.filebox .thumb { max-width: 96px; max-height: 72px; border-radius: 8px; object-fit: cover; border: 1px solid var(--line, rgba(0,0,0,.1)); }
.filebox .thumb[hidden], .filebox [hidden] { display: none; }
.filebox .fname { color: var(--muted); overflow-wrap: anywhere; }
.filebox input[type=file] { width: 100%; }

/* public website (kernel capability "portal") */
.site-body { background: var(--bg); }
.site-head { position: sticky; top: 0; z-index: 5; background: var(--panel); border-bottom: 1px solid var(--line, rgba(0,0,0,.08)); }
.site-nav { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; max-width: 1100px; margin: 0 auto; padding: 12px 16px; }
.site-nav a { color: var(--ink); text-decoration: none; }
.site-nav .site-brand { font-weight: 800; font-size: 1.15rem; margin-inline-end: auto; }
.site-nav .staff { color: var(--muted); font-size: .85rem; }
.site-main { max-width: 1100px; margin: 0 auto; padding: 16px; }
.hero { padding: 36px 0 12px; }
.hero h1 { font-size: clamp(1.6rem, 4vw, 2.6rem); margin: 0; }
.site-section { margin: 24px 0; }
.site-section-head { display: flex; justify-content: space-between; align-items: baseline; }
.site-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin-top: 12px; }
.site-card { display: flex; flex-direction: column; gap: 6px; background: var(--panel); color: var(--ink); text-decoration: none; padding: 12px;
  border-radius: var(--radius, 12px); border: 1px solid var(--line, rgba(0,0,0,.08)); }
.site-card img, .site-detail img { width: 100%; max-height: 220px; object-fit: cover; border-radius: 10px; }
.site-card h3 { margin: 4px 0; font-size: 1.02rem; }
.site-card .fact, .site-detail .fact { display: flex; justify-content: space-between; gap: 8px; font-size: .9rem; }
.site-card .fact small, .site-detail .fact small { color: var(--muted); }
.site-detail { display: flex; flex-direction: column; gap: 10px; max-width: 720px; }
.site-form { max-width: 640px; margin: 24px 0; display: flex; flex-direction: column; gap: 10px; }
.site-form { position: relative; }
.site-form .hp { position: absolute; top: 0; inset-inline-start: 0; width: 1px; height: 1px; padding: 0; border: 0; opacity: 0; overflow: hidden; clip-path: inset(50%); pointer-events: none; }
.site-ok { padding: 12px 0; }
.site-foot { text-align: center; color: var(--muted); padding: 24px 16px; font-size: .85rem; }
#site_q { max-width: 420px; }

/* ---------- interface atoms (ui_weave) ---------- */
.ibub { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; flex: none;
  background: color-mix(in srgb, var(--primary) 12%, var(--panel)); color: var(--primary); }
.ibub .ico { width: 18px; height: 18px; }
.ibub.big { width: 52px; height: 52px; border-radius: 16px; }
.ibub.big .ico { width: 26px; height: 26px; }
.ibub.warn { background: color-mix(in srgb, var(--warn) 14%, var(--panel)); color: var(--warn); }
.ibub.money { background: color-mix(in srgb, var(--ok) 14%, var(--panel)); color: var(--ok); }
.hero-band { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px;
  padding: calc(var(--pad) * 1.2) calc(var(--pad) * 1.4); border-radius: calc(var(--radius) + 4px); color: var(--primary-ink);
  background: linear-gradient(120deg, var(--primary), color-mix(in srgb, var(--primary) 55%, #0b1020)); box-shadow: var(--shadow-lift); }
.hero-band h2 { margin: 0 0 4px; font-size: 1.25rem; }
.hero-band p { margin: 0; opacity: .85; }
.hero-band .ibub { background: rgba(255, 255, 255, .16); color: inherit; width: 48px; height: 48px; }
.kpi { display: flex; flex-direction: column; gap: 6px; }
.kpi .khead { display: flex; align-items: center; gap: 10px; }
.kpi.tone-money::after { background: var(--ok); }
.kpi.tone-warn::after { background: var(--warn); }
.kpi .kspark { height: 34px; margin-top: 2px; }
.kpi.skeleton { min-height: 110px; }
.skeleton { background: linear-gradient(90deg, var(--panel) 0%, var(--soft) 50%, var(--panel) 100%); background-size: 200% 100%;
  animation: shimmer 1.2s linear infinite; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
svg.spark { width: 100%; height: 34px; display: block; }
.spark-line { fill: none; stroke: var(--primary); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.spark-fill { fill: color-mix(in srgb, var(--primary) 14%, transparent); }
.tone-money .spark-line { stroke: var(--ok); } .tone-money .spark-fill { fill: color-mix(in srgb, var(--ok) 14%, transparent); }
.chart h3, .upcoming h3, .section h2 { display: flex; align-items: center; gap: 10px; }
.upcoming-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--gap); margin-bottom: 14px; }
.upcoming h3 { margin: 0 0 10px; font-size: .95rem; }
.up-item { display: flex; align-items: center; gap: 12px; padding: 8px 6px; border-radius: 10px; color: inherit; text-decoration: none; }
.up-item:hover { background: var(--soft); }
.datepill { display: grid; place-items: center; min-width: 46px; padding: 4px 6px; border-radius: 12px; line-height: 1.1;
  background: color-mix(in srgb, var(--primary) 10%, var(--panel)); color: var(--primary); border: 1px solid color-mix(in srgb, var(--primary) 22%, transparent); }
.datepill b { font-size: 1.1rem; } .datepill small { font-size: .7rem; }
.up-text { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.up-text b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .up-text small { color: var(--muted); }
.empty-state { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px 8px; color: var(--muted); font-size: .85rem; }
.empty-state .ico { width: 28px; height: 28px; opacity: .55; }
.donut { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.donut-svg { width: 150px !important; flex: none; }
.donut-svg circle { transition: stroke-width var(--t); } .donut-svg circle:hover { stroke-width: 26; }
.donut-total { font-size: 22px; font-weight: 800; fill: currentColor; }
.legend { list-style: none; margin: 0; padding: 0; flex: 1; min-width: 150px; display: grid; gap: 6px; font-size: .85rem; }
.legend li { display: flex; align-items: center; gap: 8px; } .legend li span { flex: 1; } .legend i { width: 10px; height: 10px; border-radius: 3px; }
.area-fill { fill: color-mix(in srgb, var(--primary) 16%, transparent); } .area-line { fill: none; stroke: var(--primary); stroke-width: 2.5; stroke-linejoin: round; }
.area-dot { fill: var(--panel); stroke: var(--primary); stroke-width: 2; } .gridline { stroke: var(--line); stroke-dasharray: 3 4; }
.axis { font-size: 11px; fill: var(--muted); }
.hbars { display: grid; gap: 8px; }
.hbar { display: grid; grid-template-columns: minmax(80px, 34%) 1fr auto; align-items: center; gap: 10px; font-size: .85rem; }
.hbar .hl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); }
.hbar .ht { background: var(--soft); border-radius: 999px; height: 10px; overflow: hidden; }
.hbar .ht i { display: block; height: 100%; border-radius: 999px; transform-origin: inline-start; }
:root[data-motion="full"] .hbar .ht i { animation: barx 700ms var(--ease) both; animation-delay: calc(var(--i, 0) * 60ms); }
@keyframes barx { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.chip2 { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 999px; font-size: .76rem; font-weight: 700;
  color: var(--c, var(--primary)); background: color-mix(in srgb, var(--c, var(--primary)) 13%, var(--panel)); }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 6px; }
.avatar { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; font-size: .72rem; font-weight: 800;
  color: #fff; background: var(--c, var(--primary)); flex: none; }
.who { display: inline-flex; align-items: center; gap: 7px; min-width: 0; }
.who > span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card.rich { display: flex; flex-direction: column; gap: 4px; border-inline-start: 4px solid var(--line); }
.card.rich.tone-info { border-inline-start-color: var(--info); } .card.rich.tone-warn { border-inline-start-color: var(--warn); }
.card.rich.tone-ok { border-inline-start-color: var(--ok); } .card.rich.tone-bad { border-inline-start-color: var(--bad); }
.card-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.card-title { margin: 0 !important; }
.card-text { color: var(--muted); font-size: .85rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.money-badge { font-size: .78rem; font-weight: 800; color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, var(--panel)); padding: 2px 8px; border-radius: 8px; }
.card-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 6px; font-size: .8rem; color: var(--muted); }
.card-foot .when { display: inline-flex; align-items: center; gap: 4px; } .card-foot .when .ico { width: 14px; height: 14px; }
.record-hero { display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap; margin-bottom: 12px; }
.rh-main { display: flex; gap: 14px; align-items: center; min-width: 0; }
.rh-main h2 { margin: 0; font-size: 1.3rem; } .rh-sub { margin: 2px 0 0; color: var(--muted); }
.rh-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; flex: 1; max-width: 680px; }
.stat { display: flex; gap: 10px; align-items: center; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; }
.stat b { display: block; font-size: 1.05rem; } .stat small { color: var(--muted); }
.section h2 { font-size: 1rem; margin: 0 0 12px; }
@media (max-width: 860px) { .record-hero { flex-direction: column; align-items: stretch; } .hero-band h2 { font-size: 1.05rem; } }
.card-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.money-badge { flex: none; max-width: 55%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.section[data-section^="lines_"] .empty-state { padding: 8px; flex-direction: row; justify-content: center; }
@media (max-width: 560px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi { padding: 12px; } .kpi .v { font-size: 1.15rem; } .kpi .khead { flex-direction: column; align-items: flex-start; gap: 6px; }
  .ibub { width: 30px; height: 30px; } .rh-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.chip2.alert { --c: var(--bad); }
.card.rich:has(.chip2.alert) { border-inline-start-color: var(--bad); }
/* ---------- procedural awareness ---------- */
.case { display: flex; align-items: center; gap: 10px; padding: 8px 6px; border-radius: 10px; border-inline-start: 4px solid var(--line); margin-bottom: 6px; background: var(--panel-2); }
.case.pr-3 { border-inline-start-color: var(--bad); } .case.pr-2 { border-inline-start-color: var(--warn); } .case.pr-1 { border-inline-start-color: var(--info); }
.case.acked { opacity: .7; }
.case-pr { font-size: .7rem; font-weight: 800; color: var(--muted); min-width: 44px; }
.case.pr-3 .case-pr { color: var(--bad); } .case.pr-2 .case-pr { color: var(--warn); }
.case-text { flex: 1; min-width: 0; display: flex; flex-direction: column; color: inherit; text-decoration: none; }
.case-text b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .case-text small { color: var(--muted); }
.case-acts { display: flex; gap: 6px; align-items: center; } .case-acts select { width: auto; padding: 4px 8px; }
.count-pill { margin-inline-start: auto; background: var(--bad); color: #fff; border-radius: 999px; padding: 1px 9px; font-size: .78rem; }
.more-link { display: block; text-align: center; color: var(--muted); font-size: .85rem; margin-top: 4px; }
.case-group h2 { font-size: 1rem; margin: 0 0 10px; }

/* ---------- Salma, the system's assistant ---------- */
.salma-fab { position: fixed; inset-inline-end: 18px; bottom: 18px; z-index: 40; display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 16px; border: 0; border-radius: 999px; cursor: pointer; font: inherit; font-weight: 700; color: var(--primary-ink);
  background: linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--primary) 55%, #7c3aed));
  box-shadow: 0 10px 26px color-mix(in srgb, var(--primary) 35%, transparent); transition: transform .18s ease, box-shadow .18s ease; }
.salma-fab:hover { transform: translateY(-2px); box-shadow: 0 14px 30px color-mix(in srgb, var(--primary) 45%, transparent); }
.salma-fab .ico { width: 18px; height: 18px; }
.salma { position: fixed; inset-inline-end: 18px; bottom: 78px; z-index: 41; width: min(400px, calc(100vw - 24px)); height: min(620px, calc(100vh - 110px));
  display: flex; flex-direction: column; background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-radius: 18px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, .22); overflow: hidden; animation: salmaIn .22s ease; }
@keyframes salmaIn { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
:root[data-motion="none"] .salma, :root[data-motion="none"] .salma-fab { animation: none; transition: none; }
.salma header { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 12%, var(--panel)), var(--panel)); }
.salma header > div { flex: 1; display: flex; flex-direction: column; line-height: 1.2; }
.salma header small { color: var(--muted); font-size: .78rem; }
.salma-av { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: var(--primary-ink);
  background: linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--primary) 55%, #7c3aed)); }
.salma-av .ico { width: 18px; height: 18px; }
.salma-log { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; background: var(--panel-2); }
.bubble { max-width: 92%; padding: 10px 12px; border-radius: 14px; font-size: .92rem; line-height: 1.55; }
.bubble p { margin: 0; white-space: pre-wrap; }
.bubble.me { align-self: flex-end; background: var(--primary); color: var(--primary-ink); border-end-end-radius: 4px; }
.bubble.salma-b { align-self: flex-start; background: var(--panel); border: 1px solid var(--line); border-end-start-radius: 4px; }
.bubble.salma-b.deep { border-color: color-mix(in srgb, #7c3aed 40%, var(--line)); }
.bubble.thinking { color: var(--muted); font-style: italic; }
.bubble .note { display: block; margin-top: 6px; color: var(--muted); font-size: .78rem; }
.salma-items { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.salma-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; background: var(--panel-2);
  border: 1px solid var(--line); color: inherit; text-decoration: none; }
a.salma-item:hover { border-color: var(--primary); }
.salma-item.overdue { border-inline-start: 3px solid var(--bad); }
.si-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.si-main b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.si-main small { color: var(--muted); font-size: .78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.si-date { font-size: .78rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.salma-sugg { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 14px 0; }
.bubble .salma-sugg { padding: 8px 0 0; }
.salma-sugg .chip { border: 1px solid var(--line); background: var(--panel); color: var(--ink); border-radius: 999px; padding: 5px 10px;
  font: inherit; font-size: .8rem; cursor: pointer; }
.salma-sugg .chip:hover { border-color: var(--primary); color: var(--primary); }
.salma-confirm { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.salma-form { display: flex; gap: 8px; padding: 10px 14px 14px; }
.salma-form input { flex: 1; min-width: 0; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); font: inherit; }
@media (max-width: 700px) {
  .salma { inset-inline: 8px; bottom: 70px; width: auto; height: calc(100vh - 90px); }
  .salma-fab span { display: none; }
  .salma-fab { padding: 13px; }
}
@media print { .salma, .salma-fab { display: none !important; } }

/* ---------- depth atoms: flat · layered (default) · 3d — projected geometry and CSS 3D, drawn on the user's device ---------- */
:root[data-depth="flat"] { --shadow: none; --shadow-lift: none; }
:root[data-depth="flat"] .kpi, :root[data-depth="flat"] .card, :root[data-depth="flat"] .panel { box-shadow: none; transform: none !important; }
:root[data-depth="3d"] .kpi, :root[data-depth="3d"] .panel, :root[data-depth="3d"] .card {
  box-shadow: 0 1px 0 color-mix(in srgb, var(--ink) 6%, transparent), 0 4px 0 -1px color-mix(in srgb, var(--primary) 16%, var(--line)),
              0 14px 28px -12px rgba(15, 23, 42, .28); }
:root[data-depth="3d"] .kpis { perspective: 900px; }
:root[data-depth="3d"] .kpi { transform: rotateX(7deg) translateZ(0); transform-origin: 50% 100%; transition: transform .25s ease, box-shadow .25s ease; }
:root[data-depth="3d"] .kpi:hover { transform: rotateX(0) translateY(-4px); }
:root[data-depth="3d"] .hero-band { box-shadow: 0 6px 0 -2px color-mix(in srgb, var(--primary) 55%, #000), 0 22px 40px -18px color-mix(in srgb, var(--primary) 60%, transparent); }
.iso-wrap { width: 100%; overflow: hidden; }
.iso-svg { width: 100%; height: auto; display: block; }
.iso-floor { fill: color-mix(in srgb, var(--primary) 7%, var(--panel-2)); stroke: var(--line); }
.iso-val { font-size: 11px; font-weight: 700; fill: var(--ink); }
.iso-bar { transform-box: fill-box; transform-origin: 50% 100%; }
:root[data-motion="full"] .iso-bar { animation: isoRise .6s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i, 0) * 60ms); }
@keyframes isoRise { from { transform: scaleY(.02); opacity: .3; } to { transform: none; opacity: 1; } }
.iso-bar:hover rect { filter: brightness(1.08); }
.pie3d-svg { width: 100%; max-width: 280px; height: auto; display: block; margin-inline: auto; }
.pie3d-slice { stroke: var(--panel); stroke-width: 1; }
.pie3d-hole { fill: var(--panel); }
.cube-stage { width: 64px; height: 64px; perspective: 380px; flex: 0 0 auto; margin-inline-end: 8px; }
.cube3d { width: 40px; height: 40px; position: relative; margin: 12px; transform-style: preserve-3d; transform: rotateX(-24deg) rotateY(38deg); }
.cube3d i { position: absolute; inset: 0; border-radius: 6px; border: 1px solid rgba(255, 255, 255, .45); opacity: .92; }
.cube3d i:nth-child(1) { transform: translateZ(20px); }
.cube3d i:nth-child(2) { transform: rotateY(180deg) translateZ(20px); }
.cube3d i:nth-child(3) { transform: rotateY(90deg) translateZ(20px); filter: brightness(.82); }
.cube3d i:nth-child(4) { transform: rotateY(-90deg) translateZ(20px); filter: brightness(.82); }
.cube3d i:nth-child(5) { transform: rotateX(90deg) translateZ(20px); filter: brightness(1.15); }
.cube3d i:nth-child(6) { transform: rotateX(-90deg) translateZ(20px); }
:root[data-motion="full"] .cube3d { animation: cubeSpin 14s linear infinite; }
@keyframes cubeSpin { from { transform: rotateX(-24deg) rotateY(0deg); } to { transform: rotateX(-24deg) rotateY(360deg); } }
@media (prefers-reduced-motion: reduce) { .cube3d, .iso-bar { animation: none !important; } }
@media print { :root[data-depth="3d"] .kpi { transform: none; } .cube-stage { display: none; } }

/* ---------- depth: tabs of everything around a record ---------- */
.depth { margin-top: 14px; }
.dtabs { display: flex; flex-wrap: wrap; gap: 6px; border-bottom: 1px solid var(--line); padding-bottom: 10px; margin-bottom: 12px; }
.dtab { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--panel-2); color: var(--ink);
  border-radius: 999px; padding: 6px 12px; font: inherit; font-size: .86rem; cursor: pointer; }
.dtab .ico { width: 15px; height: 15px; }
.dtab.on { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
.dtab .count-pill { background: color-mix(in srgb, currentColor 18%, transparent); color: inherit; }
.rel-top { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-bottom: 10px; }
.rel-sum { display: flex; flex-direction: column; padding: 8px 12px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); }
.rel-sum small { color: var(--muted); font-size: .76rem; }
.rel-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.rel-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--panel); color: inherit; text-decoration: none; }
.rel-item:hover { border-color: var(--primary); }
.ri-main { display: flex; flex-direction: column; min-width: 0; }
.ri-main b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.ri-main small { color: var(--muted); font-size: .78rem; }
.tl { display: flex; flex-direction: column; gap: 2px; }
.tl .chips { margin-bottom: 8px; }
.tl-item { display: flex; gap: 10px; padding: 8px 4px; border-inline-start: 2px solid var(--line); margin-inline-start: 6px; position: relative; }
.tl-dot { position: absolute; inset-inline-start: -6px; top: 13px; width: 10px; height: 10px; border-radius: 50%; background: var(--primary); }
.tl-item > div { padding-inline-start: 10px; display: flex; flex-direction: column; }
.tl-item b { font-weight: 600; font-size: .9rem; }
.tl-item small { color: var(--muted); font-size: .78rem; }
@media print { .depth { display: none; } }
.tl-item { color: inherit; text-decoration: none; } a.tl-item:hover b { color: var(--primary); }

/* ---------- the website every system carries: scene player, services, contact, popup, side rail ---------- */
.stage { position: relative; overflow: hidden; border-radius: 24px; min-height: 380px; margin: 18px 0 26px; color: #fff; isolation: isolate;
  display: grid; grid-template-columns: 1fr 1.3fr; align-items: center; padding: 34px 40px; gap: 24px; }
.stage-bg { position: absolute; inset: 0; z-index: -2;
  background: radial-gradient(120% 90% at 85% 15%, color-mix(in srgb, var(--primary) 55%, #ffffff) 0%, transparent 55%),
              radial-gradient(90% 80% at 10% 90%, color-mix(in srgb, var(--primary) 60%, #7c3aed) 0%, transparent 60%),
              linear-gradient(135deg, color-mix(in srgb, var(--primary) 85%, #0b1020), #0b1020); background-size: 140% 140%; }
:root[data-motion="full"] .stage-bg { animation: stageDrift 18s ease-in-out infinite alternate; }
@keyframes stageDrift { from { background-position: 0% 0%; } to { background-position: 100% 100%; } }
.stage-particles { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.stage-particles .pt { fill: rgba(255, 255, 255, .55); }
:root[data-motion="full"] .stage-particles .pt { animation: ptFloat var(--d, 9s) ease-in-out var(--dl, 0s) infinite alternate; }
@keyframes ptFloat { from { transform: translate(0, 0); opacity: .25; } to { transform: translate(3px, -6px); opacity: .9; } }
.stage-ring { position: relative; width: 220px; height: 220px; justify-self: center; }
.stage-ring i { position: absolute; inset: 0; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, .35); }
.stage-ring i:nth-child(2) { inset: 22px; border-style: dashed; border-color: rgba(255, 255, 255, .45); }
.stage-ring i:nth-child(3) { inset: 46px; background: rgba(255, 255, 255, .1); backdrop-filter: blur(6px); border-color: rgba(255, 255, 255, .6); }
:root[data-motion="full"] .stage-ring i:nth-child(1) { animation: spin 22s linear infinite; }
:root[data-motion="full"] .stage-ring i:nth-child(2) { animation: spin 14s linear infinite reverse; }
@keyframes spin { to { transform: rotate(360deg); } }
.stage-glyph { position: absolute; inset: 0; display: grid; place-items: center; }
.stage-ico { width: 64px; height: 64px; color: #fff; filter: drop-shadow(0 6px 18px rgba(0, 0, 0, .35)); }
.stage-words h1 { font-size: clamp(1.7rem, 4vw, 2.8rem); margin: 0 0 10px; line-height: 1.2; text-shadow: 0 4px 24px rgba(0, 0, 0, .25); }
.stage-words p { margin: 0; font-size: 1.08rem; opacity: .92; max-width: 46ch; }
:root[data-motion="full"] .enter0 { animation: inUp .7s cubic-bezier(.2, .8, .2, 1) both; }
:root[data-motion="full"] .enter1 { animation: inSide .7s cubic-bezier(.2, .8, .2, 1) both; }
:root[data-motion="full"] .enter2 { animation: inZoom .7s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes inUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes inSide { from { opacity: 0; transform: translateX(-26px); } to { opacity: 1; transform: none; } }
@keyframes inZoom { from { opacity: 0; transform: scale(.85); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
.stage-dots { position: absolute; bottom: 16px; inset-inline-start: 40px; display: flex; gap: 8px; }
.stage-dots button { width: 9px; height: 9px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .4); cursor: pointer; padding: 0; }
.stage-dots button.on { width: 26px; border-radius: 6px; background: #fff; }
.stage-toggle { position: absolute; bottom: 12px; inset-inline-end: 16px; background: rgba(255, 255, 255, .16); color: #fff; border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 999px; padding: 4px 12px; font: inherit; font-size: .8rem; cursor: pointer; }
.svc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.svc-card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 18px; transition: transform .2s ease, box-shadow .2s ease; }
.svc-card:hover { transform: translateY(-4px); box-shadow: 0 16px 30px -18px color-mix(in srgb, var(--primary) 60%, transparent); }
:root[data-motion="full"] .svc-card { animation: inUp .6s ease both; animation-delay: calc(var(--i, 0) * 80ms); }
.svc-ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; color: var(--primary);
  background: color-mix(in srgb, var(--primary) 12%, transparent); margin-bottom: 10px; }
.svc-card h3 { margin: 0 0 6px; font-size: 1.05rem; }
.svc-card p { margin: 0; color: var(--muted); font-size: .9rem; }
.about p { max-width: 70ch; line-height: 1.8; }
.contact-wrap { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; align-items: start; }
.contact-form { display: grid; gap: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 18px; }
.contact-form .field { display: flex; flex-direction: column; gap: 4px; }
.contact-form input, .contact-form textarea { padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); font: inherit; background: var(--panel-2); color: var(--ink); }
.contact-form .hp { position: absolute; width: 1px; height: 1px; padding: 0; border: 0; overflow: hidden; clip-path: inset(50%); opacity: 0; }
.contact-form .sent { color: var(--ok); font-weight: 600; }
.contact-facts p { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; }
.contact-facts .ico { color: var(--primary); width: 18px; height: 18px; }
.nav-cta { background: var(--primary); color: var(--primary-ink, #fff) !important; padding: 6px 14px; border-radius: 999px; }
.site-popup { position: fixed; inset-inline-start: 18px; bottom: 18px; z-index: 50; width: min(340px, calc(100vw - 36px)); padding: 20px; border-radius: 18px;
  background: var(--panel); color: var(--ink); border: 1px solid var(--line); box-shadow: 0 24px 60px rgba(15, 23, 42, .25); overflow: hidden; }
:root[data-motion="full"] .site-popup { animation: popIn .55s cubic-bezier(.2, .9, .3, 1.2) both; }
@keyframes popIn { from { opacity: 0; transform: translateY(30px) scale(.9); } to { opacity: 1; transform: none; } }
.pop-glow { position: absolute; inset: -40% -40% auto auto; width: 180px; height: 180px; border-radius: 50%; background: color-mix(in srgb, var(--primary) 30%, transparent); filter: blur(30px); z-index: -1; }
.site-popup h3 { margin: 0 0 6px; }
.site-popup p { margin: 0 0 12px; color: var(--muted); }
.pop-x { position: absolute; top: 8px; inset-inline-end: 8px; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.site-rail { position: fixed; inset-inline-end: 18px; top: 120px; width: 200px; z-index: 4; }
.rail-tag { display: inline-block; font-size: .72rem; color: var(--muted); margin-bottom: 6px; }
.rail-card { display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line);
  box-shadow: 0 12px 26px -16px rgba(15, 23, 42, .35); }
.rail-card .ico { color: var(--primary); }
.rail-card small { color: var(--muted); font-size: .78rem; }
@media (max-width: 1400px) { .site-rail { display: none; } }
@media (max-width: 760px) {
  .stage { grid-template-columns: 1fr; padding: 26px 20px 48px; min-height: 0; text-align: center; }
  .stage-ring { width: 150px; height: 150px; }
  .stage-words p { margin-inline: auto; }
  .contact-wrap { grid-template-columns: 1fr; }
}
.stage-glyph .ico.stage-ico { width: 72px; height: 72px; stroke-width: 1.6; }

/* ------------------------------------------------------------------ website & growth (admins) */
.site-words h2, #site_domain h2, #site_growth h2, #site_inbox h2 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.site-words h2 .btn { margin-inline-start: auto; }
.site-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 16px; }
.site-words textarea { width: 100%; resize: vertical; }
.domain-form { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 12px; }
.domain-form input { flex: 1 1 240px; min-width: 0; }
.domain-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 0; border-top: 1px solid var(--line); }
.domain-row b { font-family: ui-monospace, monospace; }
.dns-steps { margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: var(--soft); }
.dns-rec { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 6px 0; }
.dns-rec code { padding: 3px 8px; border-radius: 8px; background: var(--panel); user-select: all; overflow-wrap: anywhere; }
.inq-list { display: grid; gap: 10px; }
.inq { padding: 10px 12px; border-radius: 10px; background: var(--soft); display: grid; gap: 2px; }
.inq small { color: var(--muted); }
.inq p { margin: 4px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.need-list { margin: 6px 0 12px; padding-inline-start: 18px; }
.need-list small { color: var(--muted); }
.offer-list { display: grid; gap: 8px; margin-bottom: 10px; }
.offer { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.offer span { display: grid; gap: 2px; }
.offer small { color: var(--muted); }
.row-acts { display: flex; gap: 8px; flex-wrap: wrap; }
#memory_badge { margin-inline-start: auto; font-weight: 600; }
#site_words, #site_domain, #site_inbox, #site_growth { margin-bottom: 16px; }

/* ================================================================== identity genome (identity.css sets the tokens)
   Every rule below is one option of one gene; a system wears only the options its genome chose. */
:root[data-identity] h1, :root[data-identity] h2, :root[data-identity] h3, :root[data-identity] .brand,
:root[data-identity] .kpi .v { font-family: var(--font-head, var(--font)); }
:root[data-identity] .side .brand { color: var(--side-ink); }
/* shell */
:root[data-g-shell="side-end"] .shell { grid-template-columns: minmax(0, 1fr) 250px; }
:root[data-g-shell="side-end"] .shell > .side { order: 2; }
:root[data-g-shell="rail"] .shell { grid-template-columns: 76px minmax(0, 1fr); }
:root[data-g-shell="rail"] .side { padding: 10px 6px; transition: width var(--t) var(--ease); width: 76px; z-index: 30; }
:root[data-g-shell="rail"] .side:hover, :root[data-g-shell="rail"] .side:focus-within { width: 250px; box-shadow: var(--shadow-lift); }
:root[data-g-shell="rail"] .side:not(:hover):not(:focus-within) a { font-size: 0; justify-content: center; }
:root[data-g-shell="rail"] .side:not(:hover):not(:focus-within) a svg.ico { font-size: 1rem; width: 20px; height: 20px; }
:root[data-g-shell="rail"] .side:not(:hover):not(:focus-within) .grp, :root[data-g-shell="rail"] .side:not(:hover):not(:focus-within) .brand small { display: none; }
:root[data-g-shell="rail"] .side:not(:hover):not(:focus-within) .brand { font-size: 0; }
:root[data-g-shell="top"] .shell, :root[data-g-shell="dock"] .shell { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
:root[data-g-shell="top"] .side { position: sticky; height: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 4px; padding: 8px 14px; z-index: 20; }
:root[data-g-shell="top"] .side .brand { padding: 4px 14px 4px 6px; }
:root[data-g-shell="top"] .side .brand small, :root[data-g-shell="top"] .side .grp { display: none; }
:root[data-g-shell="top"] .side a { padding: 6px 10px; }
:root[data-g-shell="top"] .side details.grp-fold { display: contents; }
:root[data-g-shell="dock"] .side { position: fixed; bottom: 14px; inset-inline: 50%; transform: translateX(50%); top: auto; height: auto; max-width: min(96vw, 980px);
  display: flex; gap: 4px; overflow-x: auto; padding: 8px 10px; border-radius: 22px; z-index: 40; box-shadow: var(--shadow-lift); width: max-content; }
:root[dir="ltr"][data-g-shell="dock"] .side { transform: translateX(-50%); }
:root[data-g-shell="dock"] .side .brand, :root[data-g-shell="dock"] .side .grp { display: none; }
:root[data-g-shell="dock"] .side a { flex-direction: column; font-size: .68rem; gap: 2px; padding: 6px 10px; white-space: nowrap; }
:root[data-g-shell="dock"] .side details.grp-fold { display: contents; }
:root[data-g-shell="dock"] .main { padding-bottom: 110px; }
@media (max-width: 860px) {
  :root[data-g-shell] .shell { grid-template-columns: 1fr !important; }
  :root[data-g-shell="dock"] .side, :root[data-g-shell="rail"] .side { position: static; transform: none; width: auto; border-radius: 0; }
}
.side details.grp-fold > summary { cursor: pointer; list-style: none; }
.side details.grp-fold > summary::-webkit-details-marker { display: none; }
/* the side's own look */
:root[data-g-side="brand"] .side { background: linear-gradient(170deg, var(--primary), color-mix(in srgb, var(--primary) 70%, #000)); --side-ink: var(--primary-ink);
  --side-muted: color-mix(in srgb, var(--primary-ink) 70%, transparent); --side-hover: color-mix(in srgb, #fff 14%, transparent); }
:root[data-g-side="brand"] .side a.on { background: var(--panel); color: var(--primary); }
:root[data-g-side="light"] .side { background: var(--panel); border-inline-end: 1px solid var(--line); --side-ink: var(--ink); --side-muted: var(--muted); --side-hover: var(--soft); }
:root[data-g-side="glass"] .side { background: color-mix(in srgb, var(--panel) 62%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-inline-end: 1px solid var(--line); --side-ink: var(--ink); --side-muted: var(--muted); --side-hover: color-mix(in srgb, var(--primary) 12%, transparent); }
:root[data-g-side="gradient"] .side { background: linear-gradient(200deg, var(--side), color-mix(in srgb, var(--accent, var(--primary)) 55%, var(--side))); }
:root[data-g-side="pattern"] .side { background: var(--ornament-on) repeat, var(--side); background-size: 90px auto, auto; }
:root[data-g-side="light"][data-g-shell="top"] .side, :root[data-g-side="glass"][data-g-shell="top"] .side { border-inline-end: 0; border-bottom: 1px solid var(--line); }
/* header */
:root[data-g-header="band"] .top { background: linear-gradient(90deg, color-mix(in srgb, var(--primary) 14%, var(--panel)), var(--panel)); margin: 0 -18px 16px; padding: 14px 18px; border: 0; }
:root[data-g-header="floating"] .top { position: sticky; top: 8px; z-index: 15; background: color-mix(in srgb, var(--panel) 80%, transparent); backdrop-filter: blur(12px);
  border: 1px solid var(--line); border-radius: calc(var(--radius) + 4px); padding: 10px 14px; margin-top: 10px; box-shadow: var(--shadow-lift); }
:root[data-g-header="ornament"] .top { background: var(--ornament) repeat-x center / auto 140%, transparent; border-bottom: 2px solid var(--primary); }
/* buttons */
:root[data-g-button="pill"] .btn { border-radius: 999px; padding-inline: 18px; }
:root[data-g-button="square"] .btn { border-radius: 2px; text-transform: none; letter-spacing: .2px; }
:root[data-g-button="cut"] .btn { border-radius: 0; clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%); padding-inline: 20px; }
:root[data-g-button="soft"] .btn:not(.ghost) { background: color-mix(in srgb, var(--primary) 16%, var(--panel)); color: var(--primary); box-shadow: 0 6px 16px -10px var(--primary); }
:root[data-g-button="line"] .btn:not(.ghost):not(.danger) { background: transparent; color: var(--primary); border: 1.5px solid var(--primary); }
:root[data-g-button="line"] .btn:not(.ghost):not(.danger):hover { background: var(--primary); color: var(--primary-ink); }
/* cards and panels */
:root[data-g-card="flat"] :is(.panel, .kpi, .card) { box-shadow: none; border-color: transparent; background: var(--panel-2); }
:root[data-g-card="outline"] :is(.panel, .kpi, .card) { box-shadow: none; border: 1.5px solid var(--line); }
:root[data-g-card="elevated"] :is(.panel, .kpi, .card) { border-color: transparent; box-shadow: 0 12px 30px -18px color-mix(in srgb, var(--ink) 45%, transparent), 0 2px 4px -2px color-mix(in srgb, var(--ink) 18%, transparent); }
:root[data-g-card="glass"] :is(.panel, .kpi, .card) { background: color-mix(in srgb, var(--panel) 66%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
:root[data-g-card="glass"][data-identity] .main { background: radial-gradient(60% 40% at 0% 0%, color-mix(in srgb, var(--primary) 16%, transparent), transparent), radial-gradient(50% 40% at 100% 30%, color-mix(in srgb, var(--accent, var(--primary)) 14%, transparent), transparent); }
:root[data-g-card="stripe"] :is(.panel, .kpi) { border-inline-start: 4px solid var(--primary); }
:root[data-g-card="notch"] :is(.panel, .kpi, .card) { border-radius: 0 calc(var(--radius) + 6px) 0 calc(var(--radius) + 6px); }
:root[data-g-card="soft"] :is(.panel, .kpi, .card) { border-color: transparent; background: color-mix(in srgb, var(--primary) 5%, var(--panel)); box-shadow: 0 8px 24px -16px color-mix(in srgb, var(--primary) 60%, transparent); }
/* inputs */
:root[data-g-input="underline"] :is(input, select, textarea) { border-width: 0 0 1.5px; border-radius: 0; background: transparent; padding-inline: 2px; }
:root[data-g-input="filled"] :is(input, select, textarea) { border-color: transparent; background: var(--soft); }
:root[data-g-input="pill"] :is(input, select) { border-radius: 999px; padding-inline: 14px; }
/* lists */
:root[data-g-lists="striped"] table.grid tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--soft) 60%, transparent); }
:root[data-g-lists="lines"] table.grid { box-shadow: none; background: transparent; }
:root[data-g-lists="lines"] table.grid th { background: transparent; border-bottom: 2px solid var(--ink); color: var(--ink); }
:root[data-g-lists="cards"] table.grid { border-collapse: separate; border-spacing: 0 6px; background: transparent; box-shadow: none; }
:root[data-g-lists="cards"] table.grid td { background: var(--panel); border-bottom: 0; }
:root[data-g-lists="cards"] table.grid th { background: transparent; }
/* icon frames: the bubble every module icon sits in */
:root[data-g-iconframe="none"] .ibub { background: transparent !important; box-shadow: none; }
:root[data-g-iconframe="circle"] .ibub { border-radius: 50%; }
:root[data-g-iconframe="squircle"] .ibub { border-radius: 34%; }
:root[data-g-iconframe="rounded"] .ibub { border-radius: 8px; }
:root[data-g-iconframe="hexagon"] .ibub { border-radius: 0; clip-path: polygon(25% 4%, 75% 4%, 100% 50%, 75% 96%, 25% 96%, 0 50%); }
:root[data-g-iconframe="diamond"] .ibub { border-radius: 4px; transform: rotate(45deg) scale(.86); }
:root[data-g-iconframe="diamond"] .ibub > svg { transform: rotate(-45deg); }
:root[data-g-iconframe="drop"] .ibub { border-radius: 50% 50% 50% 8%; }
:root[data-g-iconframe="arch"] .ibub { border-radius: 999px 999px 4px 4px; }
:root[data-g-iconframe="leaf"] .ibub { border-radius: 2px 60% 2px 60%; }
:root[data-g-iconfill="tint"] .ibub { background: color-mix(in srgb, var(--primary) 16%, transparent); color: var(--primary); }
:root[data-g-iconfill="duo"] .ibub { background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 22%, transparent), color-mix(in srgb, var(--accent, var(--primary)) 18%, transparent)); }
/* hover */
:root[data-g-hover="lift"] :is(.kpi, .card, .panel.chart):hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
:root[data-g-hover="glow"] :is(.kpi, .card, .btn):hover { box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 20%, transparent), 0 10px 26px -12px var(--primary); }
:root[data-g-hover="underline"] .side a:hover { text-decoration: underline; text-underline-offset: 5px; background: transparent; }
:root[data-g-hover] :is(.kpi, .card, .panel.chart) { transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease); }
/* entrances */
@keyframes g-rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes g-scale { from { opacity: 0; transform: scale(.96); } }
@keyframes g-slide { from { opacity: 0; transform: translateX(calc(var(--dirx, 1) * 18px)); } }
@keyframes g-blur { from { opacity: 0; filter: blur(8px); } }
:root[data-motion="full"][data-g-entrance="rise"] .view > * { animation: g-rise calc(var(--t) * 2) var(--ease) both; animation-delay: calc(var(--i, 0) * 50ms); }
:root[data-motion="full"][data-g-entrance="scale"] .view > * { animation: g-scale calc(var(--t) * 2) var(--ease) both; animation-delay: calc(var(--i, 0) * 45ms); }
:root[data-motion="full"][data-g-entrance="slide"] .view > * { animation: g-slide calc(var(--t) * 2) var(--ease) both; animation-delay: calc(var(--i, 0) * 45ms); }
:root[data-motion="full"][data-g-entrance="blur"] .view > * { animation: g-blur calc(var(--t) * 2.2) var(--ease) both; animation-delay: calc(var(--i, 0) * 55ms); }
/* the administration's entrance */
.login-stage { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login-stage .login { margin: 0; width: min(380px, 100%); }
.login-art { display: none; }
:root[data-identity] .login-stage { background: var(--bg); }
:root[data-g-login="pattern"] .login-stage { background: var(--ornament) repeat, var(--bg); background-size: 120px auto, auto; }
:root[data-g-login="glass"] .login-stage { background: var(--ornament) repeat, linear-gradient(140deg, color-mix(in srgb, var(--primary) 40%, var(--bg)), var(--bg)); background-size: 110px auto, auto; }
:root[data-g-login="glass"] .login { background: color-mix(in srgb, var(--panel) 62%, transparent); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
:root[data-g-login="minimal"] .login { box-shadow: none; border: 0; background: transparent; }
:root[data-g-login="minimal"] .login h1 { font-size: 2rem; }
:root:is([data-g-login="split"], [data-g-login="story"]) .login-stage { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); padding: 0; gap: 0; place-items: stretch; }
:root:is([data-g-login="split"], [data-g-login="story"]) .login-stage .login { align-self: center; justify-self: center; }
:root:is([data-g-login="split"], [data-g-login="story"]) .login-art { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 10px;
  align-self: stretch; justify-self: stretch; min-height: 100vh; box-sizing: border-box; padding: 8vw; color: var(--primary-ink); background: var(--ornament-on) repeat, linear-gradient(160deg, var(--primary), color-mix(in srgb, var(--primary) 55%, #000));
  background-size: 120px auto, auto; }
:root[data-g-login="story"] .login-art { background: var(--ornament-on) repeat, linear-gradient(200deg, var(--accent, var(--primary)), var(--primary)); background-size: 140px auto, auto; }
.login-mark { width: 72px; height: 72px; display: grid; place-items: center; font-size: 2.2rem; font-weight: 800; border-radius: 22px;
  background: color-mix(in srgb, #fff 18%, transparent); font-family: var(--font-head, var(--font)); }
.login-art b { font-size: clamp(1.4rem, 3vw, 2.4rem); font-family: var(--font-head, var(--font)); }
.login-art span { opacity: .85; }
@media (max-width: 860px) {
  :root:is([data-g-login="split"], [data-g-login="story"]) .login-stage { grid-template-columns: 1fr; }
  :root:is([data-g-login="split"], [data-g-login="story"]) .login-art { padding: 28px; min-height: 160px; }
  :root:is([data-g-login="split"], [data-g-login="story"]) .login-stage .login { margin: 20px auto; }
}
/* the dashboard's greeting band carries the ornament */
:root[data-identity] .hero-band { background: var(--ornament-on) repeat, linear-gradient(120deg, var(--primary), color-mix(in srgb, var(--primary) 60%, var(--accent, #0b1020)));
  background-size: 110px auto, auto; }

/* the website's hero, one shape per genome (hero gene); the ornament is the system's own */
:root[data-identity] .stage-bg { background: var(--ornament-on) repeat, radial-gradient(120% 90% at 85% 15%, color-mix(in srgb, var(--accent, var(--primary)) 55%, transparent) 0%, transparent 55%),
  linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--primary) 50%, #0b1020)); background-size: 120px auto, auto, auto; }
:root[data-identity] .stage-words h1, :root[data-identity] .site-brand, :root[data-identity] .site-section h2 { font-family: var(--font-head, var(--font)); }
:root[data-g-hero="wave"] .stage { border-radius: 24px 24px 0 0; padding-bottom: 80px; }
:root[data-g-hero="wave"] .stage::after { content: ""; position: absolute; inset: auto 0 -1px 0; height: 70px; z-index: 1;
  background: var(--bg); -webkit-mask: radial-gradient(60px 36px at 50% 0, transparent 98%, #000) 0 0 / 120px 70px repeat-x;
  mask: radial-gradient(60px 36px at 50% 0, transparent 98%, #000) 0 0 / 120px 70px repeat-x; }
:root[data-g-hero="arch"] .stage { border-radius: 260px 260px 20px 20px; padding-top: 70px; }
:root[data-g-hero="diagonal"] .stage { border-radius: 0; clip-path: polygon(0 0, 100% 0, 100% 84%, 0 100%); padding-bottom: 70px; }
:root[data-g-hero="split"] .stage { grid-template-columns: 1fr 1fr; border-radius: var(--radius); }
:root[data-g-hero="split"] .stage-words { background: color-mix(in srgb, #000 22%, transparent); padding: 24px; border-radius: var(--radius); }
:root[data-g-hero="pattern"] .stage { border-radius: 0; margin-inline: calc(50% - 50vw); padding-inline: max(40px, calc(50vw - 520px)); min-height: 440px; }
:root[data-g-hero="circle"] .stage-ring { width: 300px; height: 300px; }
:root[data-g-hero="circle"] .stage { border-radius: 40px; }
:root[data-g-hero="stack"] .stage { grid-template-columns: 1fr; text-align: center; justify-items: center; min-height: 460px; }
:root[data-g-hero="stack"] .stage-words p { margin-inline: auto; }
:root[data-identity] .svc-card { border-radius: var(--radius); }
:root[data-g-card="stripe"] .svc-card, :root[data-g-card="stripe"] .site-card { border-inline-start: 4px solid var(--primary); }
:root[data-g-card="soft"] .svc-card { background: color-mix(in srgb, var(--primary) 6%, var(--panel)); border-color: transparent; }
:root[data-g-card="glass"] .svc-card { background: color-mix(in srgb, var(--panel) 65%, transparent); backdrop-filter: blur(12px); }
@media (max-width: 760px) { :root[data-g-hero] .stage { grid-template-columns: 1fr; border-radius: 18px; clip-path: none; margin-inline: 0; padding: 26px 20px; } }

/* forged glyphs (glyphs.py): the modifier sits in a cut of the base, the cut takes the colour behind the icon */
svg.ico .knock { fill: var(--knock, var(--panel)); stroke: none; }
.side { --knock: var(--side); } .side a.on { --knock: var(--primary); }
.ibub { --knock: color-mix(in srgb, var(--primary) 12%, var(--panel)); }
:root[data-g-iconframe="none"] .ibub { --knock: var(--panel); }
:root[data-g-side="light"] .side, :root[data-g-side="glass"] .side { --knock: var(--panel); }
.btn { --knock: var(--primary); } .btn.ghost { --knock: var(--panel); }
:root[data-g-login="centered"] .login-stage { background: radial-gradient(60% 50% at 50% 0%, color-mix(in srgb, var(--primary) 16%, transparent), transparent),
  radial-gradient(40% 40% at 100% 100%, color-mix(in srgb, var(--accent, var(--primary)) 14%, transparent), transparent), var(--bg); }
:root[data-g-login="centered"] .login { border-top: 5px solid var(--primary); box-shadow: var(--shadow-lift); }
:root[data-g-login="minimal"] .login h1 { padding-bottom: 10px; border-bottom: 3px solid var(--primary); display: inline-block; }
:root[data-g-login="minimal"] .login-stage { background: var(--ornament) no-repeat 0 100% / 260px auto, var(--bg); }
.share-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 12px 0; }
.share-bar small { color: var(--muted); }
.btn.wa { background: #1fa855; color: #fff; display: inline-flex; margin: 10px 0; text-decoration: none; }
/* the ornament is a moving layer: banners become a slow film made of the system's own atoms (no video, no GPU) */
@keyframes ornDrift { from { background-position: 0 0, 0 0, 0 0; } to { background-position: 240px 120px, 0 0, 0 0; } }
:root[data-identity][data-motion="full"] .stage-bg, :root[data-identity][data-motion="full"] .hero-band,
:root[data-identity][data-motion="full"] .login-art { animation: ornDrift 48s linear infinite; }
@media (prefers-reduced-motion: reduce) { :root[data-identity] :is(.stage-bg, .hero-band, .login-art) { animation: none !important; } }
#site_identity { margin-bottom: 16px; } #site_identity h2 { display: flex; align-items: center; gap: 10px; }
.id-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 8px 0; }
.id-sw { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line); display: inline-block; }
/* photo frames (frame gene): products, people and places sit in the system's own frame */
:root[data-g-frame] :is(.site-card img, .site-detail img) { object-fit: cover; }
:root[data-g-frame="rounded"] :is(.site-card img, .site-detail img) { border-radius: calc(var(--radius) + 6px); }
:root[data-g-frame="arch"] :is(.site-card img, .site-detail img) { border-radius: 999px 999px 10px 10px; }
:root[data-g-frame="blob"] :is(.site-card img, .site-detail img) { border-radius: 42% 58% 63% 37% / 41% 44% 56% 59%; }
:root[data-g-frame="polaroid"] :is(.site-card img, .site-detail img) { padding: 8px 8px 26px; background: #fff; box-shadow: 0 10px 24px -12px rgba(0,0,0,.4); }
:root[data-g-frame="hexagon"] :is(.site-card img, .site-detail img) { clip-path: polygon(25% 3%, 75% 3%, 100% 50%, 75% 97%, 25% 97%, 0 50%); }
:root[data-g-frame="circle"] :is(.site-card img, .site-detail img) { border-radius: 50%; aspect-ratio: 1; }
:root[data-g-frame="tilted"] :is(.site-card img, .site-detail img) { transform: rotate(-2deg); border-radius: 12px; box-shadow: 0 12px 26px -14px rgba(0,0,0,.45); }
/* KPI widgets (kpi gene) */
:root[data-g-kpi="tile"] .kpi { background: color-mix(in srgb, var(--primary) 9%, var(--panel)); border-color: transparent; }
:root[data-g-kpi="edge"] .kpi { border-inline-start: 0; border-top: 4px solid var(--primary); }
:root[data-g-kpi="badge"] .kpi .v { display: inline-block; align-self: flex-start; padding: 2px 14px; border-radius: 999px;
  background: var(--primary); color: var(--primary-ink); }
:root[data-g-kpi="ribbon"] .kpi { position: relative; overflow: hidden; }
:root[data-g-kpi="ribbon"] .kpi::after { content: ""; position: absolute; inset: 0 auto 0 0; width: 46px; background: var(--ornament) repeat; background-size: 46px auto; opacity: .9; }
