/* Tokens from ci.terascore.my. Dark is the base, light follows the system unless the user picked. */
:root {
  --bg: #020617; --card: #0e1223; --card-2: #1a1e2f; --fg: #f8fafc; --muted: #94a3b8; --border: #334155;
  --ok: #22c55e; --warn: #f59e0b; --bad: #f87171; --info: #60a5fa; --primary: #2563eb; --ring: #60a5fa; --accent: #fb923c; --violet: #a78bfa;
  --ok-bg: rgba(34,197,94,.14); --warn-bg: rgba(245,158,11,.14); --bad-bg: rgba(239,68,68,.16); --info-bg: rgba(59,130,246,.16); --idle-bg: rgba(148,163,184,.14); --violet-bg: rgba(167,139,250,.16); --accent-bg: rgba(251,146,60,.14);
  --wire: #60a5fa; --wire-2: #fb923c; --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 30px rgba(0,0,0,.35);
  --sans: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f8fafc; --card: #ffffff; --card-2: #e9eef6; --fg: #0f172a; --muted: #475569; --border: #dbe3ef;
  --ok: #15803d; --warn: #b45309; --bad: #b91c1c; --info: #1d4ed8; --primary: #1d4ed8; --ring: #1e40af; --accent: #c2410c; --violet: #6d28d9;
  --ok-bg: #dcfce7; --warn-bg: #fef3c7; --bad-bg: #fee2e2; --info-bg: #dbeafe; --idle-bg: #e2e8f0; --violet-bg: #ede9fe; --accent-bg: #ffedd5;
  --wire: #2563eb; --wire-2: #ea580c; --shadow: 0 1px 2px rgba(15,23,42,.05), 0 10px 28px rgba(15,23,42,.08);
  color-scheme: light;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    --bg: #f8fafc; --card: #ffffff; --card-2: #e9eef6; --fg: #0f172a; --muted: #475569; --border: #dbe3ef;
    --ok: #15803d; --warn: #b45309; --bad: #b91c1c; --info: #1d4ed8; --primary: #1d4ed8; --ring: #1e40af; --accent: #c2410c; --violet: #6d28d9;
    --ok-bg: #dcfce7; --warn-bg: #fef3c7; --bad-bg: #fee2e2; --info-bg: #dbeafe; --idle-bg: #e2e8f0; --violet-bg: #ede9fe; --accent-bg: #ffedd5;
    --wire: #2563eb; --wire-2: #ea580c; --shadow: 0 1px 2px rgba(15,23,42,.05), 0 10px 28px rgba(15,23,42,.08);
    color-scheme: light;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--fg); font: 14px/1.45 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
.num, .mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
a { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; border-radius: 4px; }
button, .btn { font: inherit; color: inherit; background: var(--card-2); border: 1px solid var(--border); border-radius: 8px; padding: 6px 12px; cursor: pointer; min-height: 36px; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
button:hover, .btn:hover { border-color: var(--muted); }
button:disabled { opacity: .5; cursor: not-allowed; }
button.primary, .btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
button.danger { color: var(--bad); }
button.small, .btn.small { min-height: 30px; padding: 3px 10px; font-size: 12px; }
button.ghost { background: transparent; border-color: transparent; }
button.ghost:hover { background: var(--card-2); }
svg.i { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.85; stroke-linecap: round; stroke-linejoin: round; flex: none; }
input, select, textarea { font: inherit; color: var(--fg); background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 7px 10px; min-height: 36px; width: 100%; }
textarea { min-height: 84px; resize: vertical; line-height: 1.5; }
label.f { display: grid; gap: 4px; font-size: 12px; color: var(--muted); }
label.f > span { font-weight: 500; }
.msg { font-size: 12px; color: var(--muted); min-height: 18px; }
.msg.bad { color: var(--bad); } .msg.ok { color: var(--ok); }
.sub { color: var(--muted); font-size: 12px; }
h2 { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 26px 0 10px; font-weight: 600; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
h2.first { margin-top: 0; }

/* shell */
.shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; overflow-y: auto; border-right: 1px solid var(--border); padding: 18px 12px; display: flex; flex-direction: column; gap: 4px; background: var(--bg); z-index: 30; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px 14px; }
.brand .mark { width: 30px; height: 30px; border-radius: 8px; background: var(--accent-bg); color: var(--accent); display: grid; place-items: center; font: 700 11px var(--mono); border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); }
.brand b { font-size: 17px; letter-spacing: -.01em; display: block; line-height: 1.15; }
.brand small { color: var(--muted); font-size: 11px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; text-decoration: none; color: var(--fg); font-weight: 500; position: relative; }
.nav a:hover { background: var(--card-2); }
.nav a.on { background: var(--card-2); box-shadow: inset 3px 0 0 var(--primary); }
.nav a .count { margin-left: auto; font: 600 11px var(--mono); background: var(--warn-bg); color: var(--warn); border-radius: 999px; padding: 1px 7px; }
.side .sec { font: 600 11px var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 16px 10px 6px; }
.side .co a { padding: 6px 10px; font-weight: 400; color: var(--fg); }
.side .co a .code { font: 600 11px var(--mono); color: var(--muted); width: 22px; }
.sdot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
.sdot.ok { background: var(--ok); } .sdot.warn { background: var(--warn); } .sdot.bad { background: var(--bad); } .sdot.off, .sdot.idle { background: var(--border); }
.side .foot { margin-top: auto; border-top: 1px solid var(--border); padding: 12px 8px 0; display: grid; gap: 10px; }
.live { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.dot.pulse { animation: pulse 2s ease-in-out infinite; }
.userrow { display: flex; align-items: center; gap: 10px; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--primary); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }
.userrow .who { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.main-wrap { min-width: 0; }
.main { min-width: 0; padding: 18px 22px 60px; }
.mtop { display: none; }
.scrim { display: none; }

/* page header */
.ph { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.ph h1 { margin: 0; font-size: 24px; letter-spacing: -.02em; line-height: 1.2; }
.ph .sub { margin-top: 4px; font-size: 13px; }
.ph .tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.clock { display: inline-flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--border); border-radius: 999px; padding: 6px 13px; font: 600 13px var(--mono); }
.clock svg { width: 15px; height: 15px; color: var(--warn); }

/* stats and alerts (from CI) */
.summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; min-width: 0; text-decoration: none; display: block; }
a.stat:hover { border-color: var(--muted); }
.stat .k { color: var(--muted); font-size: 12px; }
.stat .v { font: 600 26px var(--mono); margin-top: 2px; }
.stat .v small { font-size: 14px; color: var(--muted); }
.alerts { display: grid; gap: 8px; margin-bottom: 8px; }
.alert { display: flex; gap: 10px; align-items: flex-start; border-radius: 10px; padding: 10px 12px; border: 1px solid; }
.alert.bad { background: var(--bad-bg); border-color: var(--bad); } .alert.warn { background: var(--warn-bg); border-color: var(--warn); } .alert.ok { background: var(--ok-bg); border-color: var(--ok); } .alert.info { background: var(--info-bg); border-color: var(--info); }
.alert svg { margin-top: 2px; } .alert.bad svg { color: var(--bad); } .alert.warn svg { color: var(--warn); } .alert.info svg { color: var(--info); } .alert.ok svg { color: var(--ok); }
.alert .tx { flex: 1; min-width: 0; }
.alert .tx a { font-weight: 600; text-decoration: none; }
.alert .asrc { color: var(--muted); font-size: 12px; }
.alert button { min-height: 26px; padding: 2px 8px; font-size: 12px; background: transparent; }

/* badges and tags */
.badge { display: inline-flex; gap: 6px; align-items: center; border-radius: 999px; padding: 3px 10px 3px 8px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge svg.i { width: 13px; height: 13px; }
.badge.ok { background: var(--ok-bg); color: var(--ok); } .badge.warn { background: var(--warn-bg); color: var(--warn); } .badge.bad { background: var(--bad-bg); color: var(--bad); }
.badge.info { background: var(--info-bg); color: var(--info); } .badge.off, .badge.idle { background: var(--idle-bg); color: var(--muted); } .badge.violet { background: var(--violet-bg); color: var(--violet); }
.tag { font: 600 11px var(--mono); letter-spacing: .06em; border-radius: 4px; padding: 1px 5px; text-transform: uppercase; vertical-align: 1px; white-space: nowrap; }
.tag.live { background: var(--ok-bg); color: var(--ok); } .tag.claude { background: var(--accent-bg); color: var(--accent); } .tag.manual { background: var(--violet-bg); color: var(--violet); }

/* the map */
.mapcard { position: relative; background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 22px 18px 24px; overflow: hidden; }
.mapcard::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(color-mix(in srgb, var(--muted) 22%, transparent) 1px, transparent 1px); background-size: 22px 22px; opacity: .35; pointer-events: none; }
#wires { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; overflow: visible; }
#wires .w { fill: none; stroke: var(--wire); stroke-width: 1.3; opacity: .6; }
#wires .w.o { stroke: var(--wire-2); }
#wires .w.d { stroke-dasharray: 3 5; }
#wires .knot { fill: var(--card); stroke: var(--wire); stroke-width: 1.2; opacity: .8; }
#wires .knot.o { stroke: var(--wire-2); }
#wires .pulse { fill: var(--wire); }
#wires .pulse.o { fill: var(--wire-2); }
#wires .arrow { fill: var(--wire); opacity: .8; }
.layer { position: relative; z-index: 1; }
.sources { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.src { position: relative; width: 66px; display: flex; flex-direction: column; align-items: center; gap: 6px; text-decoration: none; opacity: 0; transform: translateY(6px); animation: rise .5s forwards; }
.src .ic { width: 44px; height: 44px; border-radius: 12px; background: var(--card-2); border: 1px solid var(--border); display: grid; place-items: center; }
.src .ic b { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; color: #fff; font: 700 11px var(--mono); }
.src .st { position: absolute; top: -3px; right: 8px; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--card); background: var(--border); }
.src .st.on { background: var(--ok); animation: pulse 2.4s infinite; } .src .st.err { background: var(--warn); }
.src span { font-size: 11.5px; color: var(--muted); text-align: center; line-height: 1.15; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sys { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; margin-top: 58px; }
.box { background: var(--card-2); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; min-width: 0; }
.box h4 { margin: 0 0 8px; font: 600 11.5px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); text-align: center; }
.box .row { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.box .n { font: 600 22px var(--mono); text-align: center; }
.box.ink { background: #000; border-color: #1f2937; }
.box.ink h4 { color: #e5e7eb; text-align: left; }
.box.ink pre { margin: 0; font: 500 12px/1.6 var(--mono); color: #fdba74; white-space: pre-wrap; word-break: break-word; }
.mini { min-width: 26px; height: 26px; padding: 0 5px; border-radius: 7px; display: grid; place-items: center; color: #fff; font: 700 11px var(--mono); }
.hubwrap { display: flex; justify-content: center; margin-top: 26px; }
#hub { width: 420px; max-width: 100%; height: 200px; }
#hub svg { width: 100%; height: 100%; overflow: visible; }
#hub .l { stroke: var(--muted); stroke-width: .8; opacity: .35; }
#hub .n { fill: var(--muted); }
#hub .sat { cursor: pointer; }
#hub .sat circle.bg { fill: var(--card-2); stroke: var(--border); }
#hub .sat text { font: 700 11px var(--mono); fill: var(--fg); text-anchor: middle; dominant-baseline: central; }
#hub .sat .ring { fill: none; stroke-width: 2.2; }
#hub .sat.focus circle.bg { stroke: var(--accent); stroke-width: 2; }
#hub .core circle { fill: var(--card-2); stroke: var(--border); }
#hub .core text { font: 800 14px var(--mono); fill: var(--accent); text-anchor: middle; dominant-baseline: central; }
#hub .orbit { fill: none; stroke: var(--border); stroke-dasharray: 2 4; }
#hub .spin { transform-origin: 210px 100px; animation: spin 80s linear infinite; }
.pillwrap { display: flex; justify-content: center; margin-top: 46px; }
.pill { background: var(--fg); color: var(--bg); border-radius: 999px; padding: 6px 14px; font: 700 11.5px var(--mono); letter-spacing: .08em; display: inline-flex; align-items: center; gap: 8px; text-transform: uppercase; }
.pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); animation: pulse 2s infinite; }
.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 52px; }

/* company card */
.co-card { display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 0; white-space: normal; min-height: 0; text-align: left; background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 14px; min-width: 0; width: 100%; cursor: pointer; transition: transform .2s, border-color .2s; opacity: 0; transform: translateY(10px); animation: rise .5s forwards; font: inherit; color: inherit; }
.co-card:hover { border-color: var(--muted); transform: translateY(-2px); }
.co-card.bad { border-color: var(--bad); }
.co-card .head { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.co-card .k { font: 600 11px var(--mono); letter-spacing: .07em; text-transform: uppercase; color: var(--accent); }
.co-card h3 { margin: 3px 0 2px; font-size: 15.5px; line-height: 1.25; letter-spacing: -.01em; }
.co-card .own { font: 600 11px var(--mono); color: var(--violet); }
.co-card .sum { color: var(--muted); font-size: 12px; line-height: 1.4; margin-top: 4px; }
.co-card .prods { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.co-card .prods span { font: 600 11px var(--mono); border: 1px solid var(--border); border-radius: 5px; padding: 1px 5px; color: var(--muted); }
.co-card .rows { margin-top: 8px; }
.prow { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto 16px; align-items: center; gap: 8px; padding: 6px 0; border-top: 1px solid var(--border); font-size: 13px; }
.prow .pi { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; }
.prow .pi svg { width: 13px; height: 13px; }
.prow .pl { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prow .pv { font: 600 12px var(--mono); white-space: nowrap; max-width: 120px; overflow: hidden; text-overflow: ellipsis; }
.prow .pv.none { color: var(--muted); font: 400 12px var(--sans); }
.mark { width: 16px; height: 16px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.mark svg { width: 10px; height: 10px; }
.mark.ok { background: var(--ok); } .mark.warn { background: var(--warn); } .mark.bad { background: var(--bad); }
.mark.idle { border: 1.5px solid var(--muted); } .mark.off { border: 1.5px dashed var(--border); } .mark.wait { border: 1.5px solid var(--border); }
.mark.in { animation: tick .3s cubic-bezier(.2,.9,.3,1.4); }
.co-card .foot { display: flex; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 10px; font-size: 11.5px; color: var(--muted); min-width: 0; }
.co-card .foot span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.co-card .foot .fl { flex: none; max-width: 100%; }
.co-card .foot .fr { flex: 1; text-align: right; }
.co-card .foot b { color: var(--fg); font-weight: 600; }

/* panels */
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 12px; }
/* Four pillars: four in a row, two by two, or one column, never three and one left over. */
.grid3.pillars { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1380px) { .grid3.pillars { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .grid3.pillars { grid-template-columns: minmax(0, 1fr); } }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 14px; min-width: 0; }
.card > .ch { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; }
.card > .ch h3 { margin: 0; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.item { display: flex; gap: 10px; padding: 10px 0; border-top: 1px solid var(--border); align-items: flex-start; }
.item:first-child { border-top: 0; padding-top: 0; }
.item .tx { flex: 1; min-width: 0; }
.item .tx b { font-weight: 600; display: block; overflow-wrap: anywhere; }
.item .tx .sub { display: block; overflow-wrap: anywhere; }
.item .acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.cotag { font: 700 11px var(--mono); border-radius: 5px; padding: 2px 6px; background: var(--accent-bg); color: var(--accent); text-decoration: none; height: fit-content; white-space: nowrap; }
.when { font: 600 11px var(--mono); color: var(--muted); width: 74px; flex: none; padding-top: 2px; }
.empty { color: var(--muted); font-size: 13px; padding: 6px 0; }
.card.empty { padding: 14px; }
.check { display: flex; gap: 8px; align-items: flex-start; padding: 5px 0; }
.check input { width: 16px; height: 16px; min-height: 0; margin-top: 2px; accent-color: var(--primary); flex: none; }
.check.done span { text-decoration: line-through; color: var(--muted); }
.late { color: var(--bad); font-weight: 600; }

/* company page */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 16px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { padding: 9px 12px; text-decoration: none; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a.on { color: var(--fg); border-color: var(--primary); }
.tabs a .count { font: 600 11px var(--mono); margin-left: 4px; color: var(--muted); }
.pcard .top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.pcard .lbl { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.pcard .big { font: 600 26px var(--mono); margin: 10px 0 2px; overflow-wrap: anywhere; }
.pcard .big.none { font: 500 14px var(--sans); color: var(--muted); }
.pcard .note { font-size: 13px; color: var(--muted); min-height: 19px; }
.pcard .meta { display: flex; gap: 8px; align-items: center; margin-top: 12px; font-size: 12px; color: var(--muted); min-width: 0; }
.pcard .meta .msrc { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcard .meta .mago { flex: none; white-space: nowrap; }
dl.kv { display: grid; gap: 6px; font-size: 12.5px; margin: 12px 0 0; padding-top: 10px; border-top: 1px solid var(--border); }
.kvr { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; min-width: 0; }
.kvr dt { flex: 1; min-width: 0; }
.kvr dd { flex: none; max-width: 60%; }
.kvr.stack { display: block; }
.kvr.stack dt { font: 600 11px var(--mono); letter-spacing: .03em; }
.kvr.stack dd { max-width: none; text-align: left; font: 500 12.5px var(--sans); color: var(--fg); margin-top: 1px; }
dl.kv dt { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
dl.kv dd { margin: 0; font: 600 12px var(--mono); text-align: right; overflow-wrap: anywhere; }
.proj { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; padding: 12px 0; border-top: 1px solid var(--border); align-items: center; }
.proj:first-child { border-top: 0; padding-top: 0; }
.proj .nm { font-weight: 600; }
.proj .pc { font: 700 13px var(--mono); }
.proj .meta { grid-column: 1 / -1; font-size: 12px; color: var(--muted); }
.bar { grid-column: 1 / -1; height: 8px; background: var(--card-2); border-radius: 99px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--ok); border-radius: 99px; width: 0; transition: width .9s cubic-bezier(.2,.9,.3,1); }
.bar > i.warn { background: var(--warn); } .bar > i.info { background: var(--info); }
.tablewrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { color: var(--muted); font-weight: 500; font-size: 12px; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td.cellbtn { cursor: pointer; }
td.cellbtn:hover { background: var(--card-2); }
.cell { display: flex; gap: 6px; align-items: flex-start; min-width: 120px; }
.cell .mark { width: 12px; height: 12px; margin-top: 3px; } .cell .mark svg { width: 7px; height: 7px; }
.cell b { font: 600 12px var(--mono); display: block; }
.cell small { color: var(--muted); font-size: 12px; display: block; }
.chartrow { display: flex; gap: 20px; align-items: flex-end; justify-content: space-between; }
.csum { display: grid; gap: 10px; text-align: right; flex: none; padding-bottom: 20px; }
.csum b { display: block; font: 600 24px var(--mono); line-height: 1.1; }
.csum b.dim { color: var(--muted); font-size: 18px; }
.csum span { font-size: 12px; color: var(--muted); }
.chart { display: flex; align-items: flex-end; gap: 14px; height: 120px; padding-top: 10px; flex: 1; min-width: 0; overflow: hidden; }
.chart .col { flex: 0 1 46px; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; min-width: 0; }
.chart .b { width: 100%; max-width: 46px; background: color-mix(in srgb, var(--muted) 45%, transparent); border-radius: 5px 5px 0 0; height: 0; transition: height .8s cubic-bezier(.2,.9,.3,1); position: relative; }
.chart .b.cur { background: var(--accent); }
.chart .b.ghost { background: color-mix(in srgb, var(--info) 45%, transparent); }
.chart .lab { font: 600 11px var(--mono); color: var(--muted); }
.chart .val { font: 600 11px var(--mono); }

/* connectors */
.conn .ch { align-items: flex-start !important; }
.conn .url { font: 500 12px var(--mono); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.links { display: grid; gap: 6px; margin-top: 10px; }
.links .lk { display: grid; grid-template-columns: minmax(0, 1fr) 190px; gap: 8px; align-items: center; font-size: 13px; }
.links .lk span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.presets { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 10px; }
.preset { display: flex; gap: 10px; align-items: center; justify-content: flex-start; white-space: normal; text-align: left; padding: 12px; border-radius: 12px; background: var(--card); min-height: 64px; }
.preset .mini { width: 34px; height: 34px; font-size: 11px; border-radius: 9px; }
.preset b { display: block; } .preset small { color: var(--muted); font-size: 12px; }
.secret { font: 600 13px var(--mono); background: var(--card-2); border: 1px dashed var(--border); border-radius: 8px; padding: 10px; overflow-wrap: anywhere; user-select: all; }

/* dialogs */
dialog { border: 1px solid var(--border); border-radius: 14px; background: var(--card); color: var(--fg); padding: 0; width: min(520px, calc(100vw - 24px)); max-height: calc(100vh - 40px); box-shadow: var(--shadow); }
dialog::backdrop { background: rgba(2,6,23,.6); }
dialog form { padding: 18px; display: grid; gap: 12px; }
dialog h3 { margin: 0; font-size: 17px; }
dialog .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
dialog .btns { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.seg label { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border); border-radius: 999px; padding: 5px 11px; cursor: pointer; font-size: 12.5px; color: var(--fg); }
.seg input { width: auto; min-height: 0; margin: 0; accent-color: var(--primary); }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%) translateY(30px); background: var(--fg); color: var(--bg); padding: 9px 16px; border-radius: 999px; font-size: 13px; font-weight: 600; opacity: 0; transition: all .3s; z-index: 90; pointer-events: none; max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; transform: translateX(-50%); }

/* login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login form { width: min(380px, 100%); background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 22px; display: grid; gap: 12px; }
.login .brand { padding: 0; }

/* tour */
body.touring .shell { filter: blur(3px); opacity: .25; transition: filter .4s, opacity .4s; }
#stage { position: fixed; inset: 0; z-index: 70; display: none; align-items: flex-start; justify-content: center; padding: 86px 16px 16px; overflow: auto; }
body.touring #stage { display: flex; }
#stage .inner { width: 380px; max-width: 100%; display: flex; flex-direction: column; align-items: center; }
#stage .co-card { animation: pop .45s cubic-bezier(.2,.9,.3,1.2); opacity: 1; transform: none; cursor: default; border: 1.5px solid var(--fg); box-shadow: var(--shadow); position: relative; }
#stage .working { position: absolute; top: -11px; right: 12px; background: var(--fg); color: var(--bg); border-radius: 999px; padding: 3px 9px; font: 700 11px var(--mono); letter-spacing: .06em; display: flex; gap: 6px; align-items: center; }
#stage .working i { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); animation: pulse 1s infinite; }
#stage .prow.cur { background: var(--accent-bg); box-shadow: inset 3px 0 0 var(--accent); margin: 0 -14px; padding: 6px 14px; }
#stage .stem { width: 1.5px; height: 24px; background: var(--fg); position: relative; }
#stage .stem::after { content: ""; position: absolute; bottom: -3px; left: -3px; width: 7.5px; height: 7.5px; border-radius: 50%; background: var(--fg); }
#stage .detail { width: 460px; max-width: calc(100vw - 32px); background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 16px; box-shadow: var(--shadow); opacity: 0; transform: translateY(14px); transition: all .45s cubic-bezier(.2,.9,.3,1.1); }
#stage .detail.show { opacity: 1; transform: none; }
.dhead { display: flex; justify-content: space-between; gap: 8px; font: 700 11px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.tstats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tstats .stat { padding: 9px 10px; }
.tstats .stat .v { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dline { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: var(--card-2); font-size: 12.5px; }
.dline b { font: 700 11px var(--mono); letter-spacing: .06em; text-transform: uppercase; display: block; color: var(--muted); margin-bottom: 2px; }
.tourbar { position: fixed; left: 50%; transform: translateX(-50%); top: 16px; z-index: 80; display: none; gap: 8px; align-items: center; background: var(--card); border: 1px solid var(--border); border-radius: 999px; padding: 6px; box-shadow: var(--shadow); }
body.touring .tourbar { display: flex; }
.tourbar .prog { display: flex; gap: 4px; }
.tourbar .prog i { width: 16px; height: 4px; border-radius: 2px; background: var(--border); }
.tourbar .prog i.on { background: var(--accent); }

@keyframes pulse { 50% { opacity: .35; } }
@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes pop { from { transform: scale(.86); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes tick { from { transform: scale(0); } to { transform: scale(1); } }

@media (max-width: 1180px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; left: 0; top: 0; width: 270px; transform: translateX(-102%); transition: transform .3s; box-shadow: var(--shadow); }
  body.menu .side { transform: none; }
  body.menu .scrim { display: block; position: fixed; inset: 0; background: rgba(2,6,23,.5); z-index: 25; }
  .mtop { display: flex; position: sticky; top: 0; z-index: 20; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 16px; background: var(--bg); border-bottom: 1px solid var(--border); }
  .mtop .brand { padding: 0; }
  .main { padding: 16px 16px 60px; }
  #wires { display: none; }
  .sys { grid-template-columns: minmax(0, 1fr); gap: 10px; margin-top: 20px; }
  .cards { grid-template-columns: minmax(0, 1fr); margin-top: 20px; }
  .sources { gap: 6px; }
  .src { width: 60px; }
  #hub { height: 170px; }
  .ph h1 { font-size: 21px; }
  .summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat .v { font-size: 22px; }
  dialog .row2 { grid-template-columns: minmax(0, 1fr); }
  .links .lk { grid-template-columns: minmax(0, 1fr); }
  .tourbar { left: 8px; right: 8px; transform: none; justify-content: space-between; }
  .tourbar .prog { display: none; }
  .tourbar button { padding: 4px 9px; font-size: 12px; }
  #stage { padding-top: 74px; }
  .tstats .stat .v { font-size: 13.5px; }
  .tstats .stat { padding: 8px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* SaaS tab. Categorical slots 1 to 4 stepped for each surface (validated: adjacent CVD 8.4 dark / 9.1 light). */
:root { --s1:#3987e5; --s2:#d95926; --s3:#199e70; --s4:#c98500; --gain:#3987e5; --loss:#e66767; --total:#64748b; --grid:rgba(148,163,184,.14); --axis:#475569; }
:root[data-theme="light"] { --s1:#2a78d6; --s2:#eb6834; --s3:#1baf7a; --s4:#eda100; --gain:#2a78d6; --loss:#e34948; --total:#94a3b8; --grid:#e2e8f0; --axis:#cbd5e1; }
@media (prefers-color-scheme: light) { :root:not([data-theme]) { --s1:#2a78d6; --s2:#eb6834; --s3:#1baf7a; --s4:#eda100; --gain:#2a78d6; --loss:#e34948; --total:#94a3b8; --grid:#e2e8f0; --axis:#cbd5e1; } }
.chips { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.chip { border-radius: 999px; padding: 5px 12px; font-weight: 600; font-size: 13px; min-height: 32px; }
.chip i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }
.chip.on { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.chips .sp { flex: 1; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; margin-bottom: 12px; }
.tiles .stat .v { font-size: 22px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tiles .d { font: 600 12px var(--mono); color: var(--muted); margin-top: 2px; }
.tiles .d.good { color: var(--ok); } .tiles .d.badd { color: var(--bad); }
.split { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 12px; }
svg.chart2 { width: 100%; height: auto; display: block; overflow: visible; }
svg.chart2 text { font: 500 11.5px var(--mono); fill: var(--muted); }
svg.chart2 .lbl { fill: var(--fg); font-weight: 600; }
svg.chart2 .gridl { stroke: var(--grid); } svg.chart2 .base { stroke: var(--axis); }
svg.chart2.dim .seg:not(.sel) { opacity: .18; }
.grow { transform-box: fill-box; transform-origin: bottom; animation: growy .8s cubic-bezier(.2,.9,.3,1) both; }
@keyframes growy { from { transform: scaleY(0); } }
.legend2 { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.legend2 span { display: inline-flex; gap: 6px; align-items: center; } .legend2 i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.ptab td, .ptab th { text-align: right; white-space: nowrap; } .ptab td:first-child, .ptab th:first-child { text-align: left; }
.ptab td { font: 500 12.5px var(--mono); } .ptab td:first-child { font: 600 13px var(--sans); }
.ptab tr.row { cursor: pointer; } .ptab tr.row:hover td, .ptab tr.row.sel td { background: var(--card-2); }
.ptab tr.row.sel td:first-child { box-shadow: inset 3px 0 0 var(--primary); }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 8px; vertical-align: -1px; }
.heat { display: grid; gap: 3px; }
.heat .c { height: 30px; border-radius: 5px; display: grid; place-items: center; font: 600 11px var(--mono); }
.heat .h { color: var(--muted); display: grid; place-items: center; font: 600 11.5px var(--mono); }
.tip2 { position: fixed; pointer-events: none; z-index: 95; background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 9px 11px; font-size: 12px; box-shadow: var(--shadow); opacity: 0; transition: opacity .12s; min-width: 170px; }
.tip2.show { opacity: 1; } .tip2 b { display: block; margin-bottom: 4px; }
.tip2 .r { display: flex; justify-content: space-between; gap: 12px; } .tip2 .r span { display: inline-flex; gap: 6px; align-items: center; } .tip2 i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
@media (max-width: 980px) { .split { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .tiles .stat .v { font-size: 18px; } }

#mrrC { overflow-x: auto; }
@media (max-width: 560px) { #mrrC svg { min-width: 520px; } }

/* ---------- WhatsApp digest (Tetapan) ---------- */
.card.digest { margin-bottom: 14px; --wa-bubble: #005c4b; --wa-bg: #0b141a; }
:root[data-theme="light"] .card.digest { --wa-bubble: #d9fdd3; --wa-bg: #efeae2; }
@media (prefers-color-scheme: light) { :root:not([data-theme]) .card.digest { --wa-bubble: #d9fdd3; --wa-bg: #efeae2; } }
.dg-alert { margin-top: 12px; }
.dg-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; margin-top: 14px; }
.dg-form { display: grid; gap: 14px; align-content: start; min-width: 0; }
.dg-step { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--card-2); min-width: 0; }
.dg-step > b { font-size: 13px; }
.dg-person { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr) auto; grid-template-areas: "name phone del"; gap: 8px; align-items: center; }
.dg-person .dgName { grid-area: name; } .dg-person .dgPhone { grid-area: phone; } .dg-person .dgDel { grid-area: del; }
#dgPeople { display: grid; gap: 8px; }
#dgMsg:empty { display: none; }
.dg-times { display: flex; gap: 8px; flex-wrap: wrap; }
.dg-times input { width: 150px; max-width: 100%; }
.dg-chk { display: inline-flex; gap: 8px; align-items: center; font-size: 13px; cursor: pointer; }
.dg-chk input { width: auto; min-height: 0; margin: 0; accent-color: var(--primary); }
.dg-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.dg-last { display: grid; gap: 4px; }
.linkbtn { background: none; border: 0; padding: 0; min-height: 0; color: var(--info); text-decoration: underline; font-size: inherit; display: inline; }
.dg-prev { display: grid; gap: 8px; align-content: start; min-width: 0; }
.dg-seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 9px; background: var(--card-2); border: 1px solid var(--border); justify-self: start; }
.dg-seg button { border: 0; background: transparent; min-height: 28px; padding: 3px 14px; font-size: 12.5px; color: var(--muted); }
.dg-seg button.on { background: var(--card); color: var(--fg); font-weight: 600; box-shadow: var(--shadow); }
.wa { background: var(--wa-bg); border-radius: 12px; padding: 14px; border: 1px solid var(--border); max-height: 560px; overflow: auto; }
.wa-bubble { background: var(--wa-bubble); color: var(--fg); border-radius: 10px 10px 10px 2px; padding: 9px 11px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; line-height: 1.5; max-width: 420px; box-shadow: 0 1px 1px rgba(0,0,0,.18); }
@media (max-width: 820px) { .dg-grid { grid-template-columns: minmax(0, 1fr); } .wa { max-height: 420px; } }
@media (max-width: 480px) { .dg-person { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name del" "phone phone"; padding-bottom: 8px; border-bottom: 1px solid var(--border); } .dg-person:last-child { border-bottom: 0; padding-bottom: 0; } }

/* ---------- Touch screens: 44px targets (phones, iPhone Duo, tablets) ---------- */
@media (pointer: coarse) {
  button, .btn, button.small, .btn.small { min-height: 44px; }
  button.small, .btn.small { padding: 6px 12px; font-size: 13px; }
  .side nav a, .side .co a, .side a { min-height: 44px; }
  .tabs a { min-height: 44px; display: inline-flex; align-items: center; }
  .cotag { min-width: 32px; min-height: 24px; display: inline-flex; align-items: center; justify-content: center; }
  input[type=checkbox] { width: 24px; height: 24px; }
  #themeBtn, #logoutBtn, #menuBtn, .alert button[data-dismiss] { min-width: 44px; min-height: 44px; }
  .cotag { position: relative; }
  .cotag::after { content: ''; position: absolute; inset: -10px -6px; }
  .prepo { min-height: 32px; display: flex; align-items: center; }
  .dg-seg button { min-height: 40px; padding-left: 14px; padding-right: 14px; }
  .rname a, .rlink { display: inline-flex; align-items: center; min-height: 32px; }
  .rlink { padding: 4px 0; }
  select, input, textarea { min-height: 44px; font-size: 16px; }
}

/* ---------- iPhone Duo open and small tablets: give the content the whole width, with an even
   two-column grid whose gutter sits on the middle of the screen, where the fold is. ---------- */
@media (min-width: 861px) and (max-width: 1023px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 290px; transform: translateX(-102%); transition: transform .3s; box-shadow: var(--shadow); z-index: 30; }
  body.menu .side { transform: none; }
  body.menu .scrim { display: block; position: fixed; inset: 0; background: rgba(2,6,23,.5); z-index: 25; }
  .mtop { display: flex; position: sticky; top: 0; z-index: 20; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 24px; background: var(--bg); border-bottom: 1px solid var(--border); }
  .mtop .brand { padding: 0; }
  .main { padding: 20px 24px 60px; }
  .cards, .grid2, .grid3.pillars { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 44px; }
  .summary { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .summary > .stat:nth-child(5):last-child { grid-column: 1 / -1; }
}
/* An odd tile out on two columns takes the whole row rather than sitting alone in half of it. */
@media (max-width: 860px) { .summary > .stat:last-child:nth-child(odd) { grid-column: 1 / -1; } }
/* Where the browser reports two screen segments (a foldable held open), leave the fold empty. */
@media (horizontal-viewport-segments: 2) {
  .cards, .grid2, .grid3.pillars { column-gap: calc(env(viewport-segment-left 1 0, 50vw) - env(viewport-segment-right 0 0, 50vw) + 44px); }
}

/* ---------- WhatsApp chats on a company page ---------- */
.chatrow { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--border); }
.chatrow:first-child { border-top: 0; }
.cav { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font: 700 13px var(--sans); color: #fff; background: #15803D; flex: none; }
.cav.p { background: #2F5BEA; }
.cmain { min-width: 0; display: grid; gap: 2px; }
.cname { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.cmeta { color: var(--muted); font-size: 12.5px; }
.clast, .lc-row .cmeta { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cpill { font: 600 11px var(--sans); border-radius: 999px; padding: 2px 8px; background: var(--idle-bg); color: var(--muted); }
.cpill.g { background: var(--ok-bg); color: var(--ok); } .cpill.p { background: var(--info-bg); color: var(--info); }
.cact { text-align: right; display: grid; justify-items: end; gap: 2px; }
.cbig { font-size: 20px; font-weight: 600; line-height: 1.1; }
.spark { display: flex; gap: 2px; align-items: flex-end; height: 20px; }
.spark i { width: 5px; background: #15803D; border-radius: 2px; }
.fday { font: 600 11px var(--mono); color: var(--muted); text-transform: uppercase; margin: 10px 0 4px; }
.frow { display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 10px; padding: 8px 0; border-top: 1px solid var(--border); }
.ft { color: var(--muted); font-size: 12px; padding-top: 2px; }
.ftext { overflow-wrap: anywhere; }
#chatFeed { max-height: 640px; overflow: auto; }
dialog.wide { width: min(640px, calc(100vw - 24px)); }
.lc-tools { display: grid; gap: 8px; margin: 10px 0 6px; }
.lc-list { max-height: 300px; overflow: auto; border: 1px solid var(--border); border-radius: 10px; padding: 0 10px; }
.lc-row { display: grid; grid-template-columns: 24px 36px minmax(0, 1fr); gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--border); cursor: pointer; }
.lc-row:first-child { border-top: 0; }
.lc-row input { width: 20px; height: 20px; min-height: 0; margin: 0; accent-color: var(--primary); }
.lc-row .cav { width: 36px; height: 36px; font-size: 12px; }
@media (max-width: 560px) {
  .chatrow { grid-template-columns: 40px minmax(0, 1fr) auto; align-items: start; }
  .chatrow .cav { grid-row: 1 / span 2; }
  .chatrow .cmain { grid-row: 1 / span 2; grid-column: 2; }
  .chatrow .cact { grid-row: 1; grid-column: 3; }
  .chatrow .cdel { grid-column: 3; grid-row: 2; justify-self: end; }
}

/* ---------- The group as a 3D world (home) ---------- */
.worldcard { padding: 0; overflow: hidden; margin-bottom: 16px; background: radial-gradient(120% 90% at 50% 0%, var(--card-2), var(--card) 70%); }
#world { position: relative; outline: none; }
#world > .empty { display: grid; place-items: center; height: clamp(320px, 56vw, 600px); }
.wstage { position: relative; height: clamp(320px, 56vw, 600px); }
.world canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.world .wlines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.world .wlines line { stroke: var(--muted); stroke-width: 1.2; stroke-dasharray: 2 4; stroke-linecap: round; }
.world .wlines circle { fill: var(--card); stroke: var(--muted); stroke-width: 1.5; }
.world .wlines line.wcl { stroke: var(--violet); stroke-width: 1.6; stroke-dasharray: 3 5; }
.world .wchips { position: absolute; inset: 0; pointer-events: none; }
.wchip { position: absolute; left: 0; top: 0; pointer-events: auto; min-height: 30px; padding: 4px 10px 4px 8px; border-radius: 999px; background: var(--card); border: 1px solid var(--border); box-shadow: var(--shadow); font-size: 12px; gap: 6px; white-space: nowrap; will-change: transform; }
.wchip i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.wchip b { font: 700 11.5px var(--mono); letter-spacing: .04em; }
.wchip span { color: var(--muted); font-variant-numeric: tabular-nums; }
.wchip.off { border-style: dashed; background: transparent; box-shadow: none; }
.wchip.hot, .wchip:hover { border-color: var(--violet); }
.wchip.hq { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.wchip.hq span { color: inherit; opacity: .75; }
.wcard { position: absolute; z-index: 3000; width: 250px; background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 12px; box-shadow: var(--shadow); animation: pop .22s ease-out; }
.whead { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-bottom: 6px; }
.whead > div { display: grid; gap: 4px; min-width: 0; }
.whead b { font-size: 14px; }
.whead button { min-height: 28px; width: 28px; padding: 0; justify-content: center; font-size: 18px; line-height: 1; background: transparent; border-color: transparent; color: var(--muted); }
.wtag { justify-self: start; font: 700 10.5px var(--mono); letter-spacing: .08em; padding: 1px 6px; border-radius: 5px; background: var(--idle-bg); color: var(--muted); }
.wtag.live { background: var(--ok-bg); color: var(--ok); }
.wrow { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-top: 1px solid var(--border); font-size: 13px; }
.wrow span { color: var(--muted); }
.wrow b { font: 600 13px var(--mono); text-align: right; }
.wrow b.none { color: var(--muted); font: 400 12.5px var(--sans); }
.wrow b.warn { color: var(--warn); } .wrow b.bad { color: var(--bad); }
.wopen { width: 100%; justify-content: center; margin-top: 10px; }
.wlive { position: absolute; left: 12px; top: 12px; display: inline-flex; align-items: center; gap: 7px; padding: 4px 10px 4px 8px; border-radius: 999px; background: var(--card); border: 1px solid var(--border); font-size: 12px; color: var(--muted); pointer-events: none; }
.wlive i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.wlive b { font: 700 11px var(--mono); letter-spacing: .08em; color: var(--muted); }
.wlive.on i { background: var(--bad); animation: pulse 1.6s ease-in-out infinite; }
.wlive.on b { color: var(--fg); }
.wtick { position: absolute; left: 12px; right: 12px; bottom: 10px; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
.wtick.in { animation: rise .45s ease-out both; }
.wtick b { font: 700 11px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--fg); margin-right: 4px; }
.wtick b.bad { color: var(--bad); } .wtick b.warn { color: var(--warn); } .wtick b.chat { color: var(--ok); }
.wpops { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.wpop { position: absolute; transform: translate(-50%, -100%); padding: 2px 8px; border-radius: 999px; background: var(--fg); color: var(--bg); font: 600 11.5px var(--mono); white-space: nowrap; animation: wpop 2.8s ease-out forwards; }
.wpop.warn { background: var(--warn); color: #111827; } .wpop.bad { background: var(--bad); color: #fff; } .wpop.chat { background: #15803D; color: #fff; }
.wpop.down { animation-name: wpopdown; }
@keyframes wpopdown { 0% { opacity: 0; margin-top: -8px; } 12% { opacity: 1; margin-top: 0; } 75% { opacity: 1; } 100% { opacity: 0; margin-top: 24px; } }
@keyframes wpop { 0% { opacity: 0; margin-top: 8px; } 12% { opacity: 1; margin-top: 0; } 75% { opacity: 1; } 100% { opacity: 0; margin-top: -30px; } }
@media (max-width: 559px) {
  .wchip span { display: none; }
  .wchip { min-height: 26px; padding: 3px 8px 3px 6px; }
  .wcard { position: static; width: auto; margin: 0 10px 10px; box-shadow: none; }
  .wlive span { display: none; }
  .wpop { font-size: 10.5px; padding: 1px 6px; }
  .wtick { font-size: 12px; }
}
@media (pointer: coarse) { .wchip { min-height: 34px; } .wchip::after { content: ''; position: absolute; inset: -6px; } .whead button { min-height: 44px; width: 44px; } }

/* ---------- logos: a white tile like an app icon, or a soft tile in the company's own colour ---------- */
.lg { display: inline-grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 28%; background: #fff; object-fit: contain; padding: 4px; border: 1px solid var(--border); box-shadow: 0 1px 2px rgba(0,0,0,.12); vertical-align: middle; }
.lg.nol, .lg.nol.s, .lg.nol.l, .lg.nol.xl { padding: 0; }
.lg.nol { border: 0; background: linear-gradient(145deg, hsl(var(--h) 85% 90%), hsl(calc(var(--h) + 28) 80% 82%)); color: hsl(var(--h) 55% 24%); font: 800 12px var(--mono); letter-spacing: .02em; box-shadow: inset 0 0 0 1px hsl(var(--h) 60% 76%), 0 1px 2px rgba(0,0,0,.1); }
.lg.xs { width: 14px; height: 14px; border-radius: 4px; padding: 1px; box-shadow: none; margin-right: 4px; }
.lg.s { width: 24px; height: 24px; padding: 2px; }
.lg.nol.s { font-size: 9.5px; font-weight: 700; }
.lg.l { width: 64px; height: 64px; padding: 7px; }
.lg.nol.l { font-size: 19px; }
.lg.xl { width: 128px; height: 128px; padding: 14px; }
.lg.nol.xl { font-size: 36px; }
.side .co a .nm { min-width: 0; }
.co-card .head { align-items: center; }
.co-card .hl { display: flex; gap: 10px; align-items: center; min-width: 0; margin-top: 10px; }
.co-card .hl h3 { margin: 0; }
.co-card .hl > div { min-width: 0; }
.phl { display: flex; gap: 14px; align-items: flex-start; min-width: 0; }
.phl > div { min-width: 0; }
.pcell { display: flex; gap: 10px; align-items: center; }
/* The logo is itself the button that changes it: a small round badge says so. */
.lgedit { position: relative; padding: 0; min-height: 0; border: 0; background: transparent; border-radius: 28%; flex: none; white-space: normal; transition: transform .18s; }
.lgedit:hover { transform: translateY(-1px) rotate(-2deg); border-color: transparent; }
.lgedit > i { position: absolute; right: -6px; bottom: -6px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--primary); color: #fff; border: 2px solid var(--bg); box-shadow: var(--shadow); }
.lgedit > i svg { width: 12px; height: 12px; }
.lgedit.sm > i { width: 18px; height: 18px; right: -5px; bottom: -5px; opacity: 0; transition: opacity .15s; }
.lgedit.sm > i svg { width: 9px; height: 9px; }
.lgedit.sm:hover > i, .lgedit.sm:focus-visible > i { opacity: 1; }
@media (pointer: coarse) { .lgedit.sm > i { opacity: 1; } .lgedit, .lgedit.sm { min-height: 0; } .lgedit.sm::after { content: ''; position: absolute; inset: -4px; } }
.lgpick { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; align-items: center; margin: 6px 0 4px; }
.lgdrop { display: grid; place-items: center; width: 168px; height: 168px; border: 2px dashed var(--border); border-radius: 22px; background: var(--card-2); transition: border-color .15s, background .15s; }
.lgdrop.over { border-color: var(--primary); background: var(--info-bg); }
.lgside { display: grid; gap: 10px; justify-items: start; }
.lgbtn { position: relative; cursor: pointer; }
.lgbtn:focus-within { outline: 2px solid var(--ring); outline-offset: 2px; }
.vh { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; clip-path: inset(50%); }
@media (max-width: 560px) { .lgpick { grid-template-columns: minmax(0, 1fr); justify-items: center; } .lgside { justify-items: center; text-align: center; } .lg.l { width: 52px; height: 52px; } .lg.nol.l { font-size: 16px; } }
/* logos in the 3D world's labels */
.wchip img.wlogo { width: 18px; height: 18px; border-radius: 5px; background: #fff; object-fit: contain; padding: 1px; flex: none; }

/* ---------- GitHub repos and their deploys ---------- */
.reporow { padding: 14px 0; border-top: 1px solid var(--border); display: grid; gap: 8px; }
.reporow:first-of-type { border-top: 0; padding-top: 2px; }
.rhead { display: flex; gap: 10px; align-items: center; min-width: 0; }
.rhead .mini.gh { background: #24292F; flex: none; width: 34px; height: 34px; border-radius: 9px; }
.rhead .mini.gh svg { width: 17px; height: 17px; }
.rname { flex: 1; min-width: 0; }
.rname a { color: var(--fg); text-decoration: none; }
.rname a:hover b { text-decoration: underline; }
.rname b { font-size: 15px; overflow-wrap: anywhere; }
.pipe { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pipe > i { flex: 0 1 22px; min-width: 8px; height: 2px; border-radius: 2px; background: var(--border); }
.stg { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 4px 10px; font: 600 12px var(--sans); background: var(--idle-bg); color: var(--muted); white-space: nowrap; }
.stg svg.i { width: 12px; height: 12px; }
.stg.ok { background: var(--ok-bg); color: var(--ok); } .stg.bad { background: var(--bad-bg); color: var(--bad); } .stg.run { background: var(--info-bg); color: var(--info); }
.stg.run svg.i, .badge.info svg.i { animation: spin 1.4s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.ptitle b { color: var(--fg); font-weight: 600; overflow-wrap: anywhere; }
.rwhy { display: flex; gap: 8px; align-items: flex-start; background: var(--bad-bg); border-radius: 8px; padding: 8px 10px; font-size: 12.5px; overflow-wrap: anywhere; }
.rwhy svg.i { width: 14px; height: 14px; flex: none; margin-top: 2px; }
.rfacts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px 16px; margin: 2px 0 0; }
.rfacts dt { font: 600 11px var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.rfacts dd { margin: 2px 0 0; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.badtx { color: var(--bad); font-weight: 600; }
.rlink { font-size: 12.5px; color: var(--primary); text-decoration: none; justify-self: start; }
.rlink:hover { text-decoration: underline; }
.rhint { margin-bottom: 12px; }
.rhint a { color: inherit; font-weight: 600; }
.alert.info { background: var(--info-bg); border-color: color-mix(in srgb, var(--info) 35%, transparent); color: var(--fg); }
.alert.info svg.i { color: var(--info); }
/* the dot beside a product: where its newest deploy stands */
.dp { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-left: 5px; background: var(--muted); vertical-align: 1px; }
.dp.ok { background: var(--ok); } .dp.bad { background: var(--bad); box-shadow: 0 0 0 3px var(--bad-bg); } .dp.info { background: var(--info); animation: dpulse 1.2s ease-in-out infinite; }
@keyframes dpulse { 50% { opacity: .35; } }
.prepo { display: block; text-decoration: none; }
.prepo .dp { margin: 0 6px 0 0; }
.prepo:hover { text-decoration: underline; }
.prepoadd { display: flex; margin-left: -6px; padding: 2px 6px; min-height: 0; font-size: 12px; margin-top: 2px; color: var(--muted); }
/* the repo picker */
.lrlist { max-height: 240px; overflow-y: auto; border: 1px solid var(--border); border-radius: 10px; margin: -4px 0 12px; }
.lrlist .empty { padding: 12px; }
.lropt { display: flex; width: 100%; gap: 10px; align-items: center; justify-content: space-between; text-align: left; border: 0; border-top: 1px solid var(--border); border-radius: 0; background: transparent; padding: 9px 12px; min-height: 44px; white-space: normal; }
.lropt:first-child { border-top: 0; }
.lropt:hover, .lropt.on { background: var(--card-2); border-color: var(--border); }
.lropt.on { box-shadow: inset 3px 0 0 var(--primary); }
.lrn { min-width: 0; display: grid; }
.lrn b { overflow-wrap: anywhere; }
.lrn small { color: var(--muted); font-size: 12px; }
.lrt { display: flex; gap: 4px; flex: none; flex-wrap: wrap; justify-content: flex-end; }
@media (prefers-reduced-motion: reduce) { .stg.run svg.i, .badge.info svg.i, .dp.info { animation: none; } }
@media (max-width: 560px) {
  .rhead { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; }
  .rhead .badge { grid-column: 2 / -1; grid-row: 2; justify-self: start; }
  .rhead .cdel { grid-column: 3; grid-row: 1; }
  .rfacts { grid-template-columns: 1fr 1fr; }
  .pipe { flex-wrap: nowrap; gap: 4px; }
  .pipe > i { flex: 1 1 6px; min-width: 4px; }
  .stg { padding: 4px 8px; font-size: 11.5px; gap: 4px; }
}

/* ---------- polish pass: things that wrapped or stretched badly ---------- */
.ph .sumrow { display: flex; gap: 6px; align-items: flex-start; }
.ph .sumrow > span { min-width: 0; padding-top: 5px; }
.ph .sumrow #editSum { flex: none; }
.pill { white-space: nowrap; }
.actlist { display: grid; }
.actrow { display: grid; grid-template-columns: 118px 150px minmax(0, 1fr); gap: 12px; padding: 8px 0; border-top: 1px solid var(--border); font-size: 13px; align-items: baseline; }
.actrow:first-child { border-top: 0; padding-top: 0; }
.actrow .awhen { color: var(--muted); font-size: 12px; white-space: nowrap; }
.actrow .awho { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.actrow .awhat { overflow-wrap: anywhere; }
@media (max-width: 560px) {
  .pill { font-size: 11px; letter-spacing: .01em; padding: 6px 10px; gap: 6px; }
  .actrow { grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; }
  .actrow .awhat { grid-column: 1 / -1; grid-row: 1; }
  .actrow .awho { grid-column: 1; grid-row: 2; font-size: 12px; }
  .actrow .awhen { grid-column: 2; grid-row: 2; }
  /* a note's date sits above it, so the words get the full width */
  .item:has(> .when) { flex-wrap: wrap; }
  .item > .when { width: 100%; padding: 0; }
  .item:has(> .when) > .tx { flex-basis: 0; }
  .chartrow { gap: 12px; }
  .csum b { font-size: 20px; }
}

/* ---------- inside the office ---------- */
.world .wfade { position: absolute; inset: 0; background: var(--card); opacity: 0; pointer-events: none; transition: opacity .22s ease; z-index: 2500; }
.world .wfade.on { opacity: 1; }
.world.wbusy .wchips, .world.wbusy .wlines { opacity: 0; transition: opacity .15s; }
.world .wchips, .world .wlines { transition: opacity .3s .25s; }
.wgone { display: none !important; }
.wback { position: absolute; left: 12px; top: 48px; z-index: 2600; min-height: 32px; padding: 4px 12px; border-radius: 999px; background: var(--card); border: 1px solid var(--border); box-shadow: var(--shadow); font-size: 12.5px; font-weight: 600; }
.wtitle { position: absolute; right: 12px; top: 14px; z-index: 5; text-align: right; font-size: 13px; font-weight: 600; max-width: 62%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; pointer-events: none; }
.wtitle b { font: 700 10.5px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-right: 6px; }
.wchip.room { border-left: 3px solid var(--rc, var(--border)); }
.wchip.room span { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wrow.big { border-top: 0; padding: 2px 0 6px; }
.wrow.big b { font: 600 19px var(--mono); text-align: left; }
.wnote { font-size: 12.5px; color: var(--muted); margin-bottom: 6px; line-height: 1.4; }
.wenter { width: 100%; justify-content: center; margin-top: 6px; }
@media (max-width: 560px) { .wback { top: 42px; } .wtitle { top: 12px; font-size: 12px; } .wchip.room { padding-left: 6px; } }
@media (pointer: coarse) { .wback { min-height: 44px; } }
@media (prefers-reduced-motion: reduce) { .world .wfade { transition: none; } }



/* a stage under 640px wide: the card goes under it and the labels shrink, whatever the window is */
.world.narrow .wcard { position: static; width: auto; margin: 0 10px 10px; box-shadow: none; }
.world.narrow .wchip span { display: none; }
.world.narrow .wlive span { display: none; }
.world.narrow .wtick { font-size: 12px; }
.world.narrow .wchip { min-height: 26px; padding: 3px 8px 3px 6px; }
.world.narrow .wchip.room { min-height: 24px; padding: 2px 7px 2px 5px; font-size: 10px; border-left-width: 3px; }
.world.narrow .wchip.room b { font-size: 10px; letter-spacing: .02em; }
.world.narrow .wchip.room::after { inset: -6px; }
.world.narrow .wtitle { display: none; }
.wbcode { color: var(--muted); font-weight: 500; }
.worldcard { scroll-margin-top: 76px; }

/* ---------- Laporan Isnin ---------- */
.wk-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); align-items: start; }
.wk-sec { min-width: 0; }
.wk-sec h4 { margin: 14px 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
.wk-co { padding: 10px 0; border-top: 1px solid var(--border); }
.wk-co:first-of-type { border-top: 0; padding-top: 0; }
.wk-co > a, .wk-co > b { font-size: 13.5px; text-decoration: none; color: var(--fg); }
.wk-line { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 5px 0; font-size: 13px; align-items: baseline; }
.wk-l { color: var(--muted); } .wk-v { font: 600 14px var(--mono); text-align: right; } .wk-v small { color: var(--muted); font-weight: 400; }
.wk-vs { grid-column: 1 / -1; color: var(--muted); font-size: 12px; text-align: right; }
.chg { font: 600 12px var(--mono); } .chg.up { color: var(--ok); } .chg.down { color: var(--bad); }
.wk-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.wk-list li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-top: 1px solid var(--border); font-size: 13px; }
.wk-list li:first-child { border-top: 0; }
.wk-t { min-width: 0; overflow-wrap: anywhere; } .wk-m { color: var(--muted); font-size: 12px; white-space: nowrap; } .wk-m.bad { color: var(--bad); }
.wk-list.late .wk-m { color: var(--bad); }
.wk-done { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 8px; }
.wk-done div { background: var(--card-2); border-radius: 10px; padding: 10px; text-align: center; }
.wk-done b { display: block; font: 600 22px var(--mono); } .wk-done span { font-size: 12px; color: var(--muted); }
@media (max-width: 640px) { .wk-list li { flex-direction: column; gap: 2px; } .wk-m { white-space: normal; } .ph .tools .btn, .ph .tools button { min-height: 44px; } }

/* ---------- Peribadi ---------- */
.summary .stat .v.sm { font-size: 17px; line-height: 1.35; padding-top: 4px; } .summary .stat .v.sm small { font-size: 15px; font-weight: 600; color: var(--fg); }
.agday { padding: 8px 0; border-top: 1px solid var(--border); } .agday:first-of-type { border-top: 0; padding-top: 0; }
.agh { font-weight: 600; font-size: 13px; margin-bottom: 4px; }
.ev { display: grid; grid-template-columns: 10px 156px minmax(0, 1fr); gap: 8px; align-items: baseline; padding: 4px 0; font-size: 13px; }
.ev.free { opacity: .7; }
.evdot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; } .evdot.big { width: 12px; height: 12px; margin-top: 4px; }
.evt { font: 500 12px var(--mono); color: var(--muted); white-space: nowrap; } .evx { min-width: 0; overflow-wrap: anywhere; }
.pkv { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; font-size: 13px; border-top: 1px solid var(--border); } .pkv:first-of-type { border-top: 0; } .pkv span { color: var(--muted); } .pkv b { font-weight: 600; text-align: right; }
th.r, td.r { text-align: right; }
.slotpre { margin: 10px 0 0; padding: 10px 12px; background: var(--card-2); border: 1px solid var(--border); border-radius: 8px; font: 12.5px/1.6 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; user-select: all; }
.slotform { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; align-items: end; margin-bottom: 12px; }
.slotday { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 8px; padding: 7px 0; border-top: 1px solid var(--border); align-items: start; } .slotday:first-child { border-top: 0; }
.slotday > span { display: flex; flex-wrap: wrap; gap: 6px; }
.pchip { display: inline-flex; gap: 5px; align-items: baseline; background: var(--card-2); border: 1px solid var(--border); border-radius: 999px; padding: 3px 10px; font-size: 12.5px; } .pchip small { color: var(--muted); }
.chrow { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 10px; align-items: center; width: 100%; text-align: left; padding: 10px 6px; border: 0; border-top: 1px solid var(--border); border-radius: 0; background: transparent; min-height: 56px; white-space: normal; }
.chrow:first-child { border-top: 0; } .chrow:hover { background: var(--card-2); }
.chrow .cmain { display: grid; min-width: 0; } .chrow .cmain b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .chrow .cmeta { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .chrow .pv { color: var(--fg); opacity: .8; }
.thread { max-height: min(60vh, 520px); overflow-y: auto; display: grid; gap: 6px; padding: 4px 2px; align-content: start; }
.msgrow { display: flex; } .msgrow.mine { justify-content: flex-end; }
.bubble { max-width: 85%; background: var(--card-2); border: 1px solid var(--border); border-radius: 10px; padding: 6px 10px; font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; } .msgrow.mine .bubble { background: var(--info-bg); }
.bubble .who { display: block; font-size: 11px; color: var(--muted); font-weight: 600; } .bubble .at { display: block; font-size: 11px; color: var(--muted); text-align: right; margin-top: 2px; }
button.dbtn { width: 100%; text-align: left; background: transparent; border: 0; border-top: 1px solid var(--border); border-radius: 0; min-height: 44px; padding: 8px 4px; white-space: normal; } button.dbtn:first-child { border-top: 0; } button.dbtn:hover { background: var(--card-2); }
.seg input[type=checkbox] { width: auto; min-height: 0; margin: 0; accent-color: var(--primary); }
@media (max-width: 640px) {
  .ev { grid-template-columns: 10px minmax(0, 1fr); } .ev .evt { grid-column: 2; } .ev .evx { grid-column: 2; }
  .slotday { grid-template-columns: minmax(0, 1fr); }
  .seg label, .dg-chk { min-height: 40px; }
  .tabs a { padding-left: 14px; padding-right: 14px; }
}

.card .row2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.dg-chk.blk { display: flex; margin-top: 8px; }

.slotform > *, .card .row2 > * { min-width: 0; }
.slotform input, .slotform select { min-width: 0; max-width: 100%; }
@media (max-width: 640px) {
  .slotform { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .slotform .dg-chk, .slotform > div { grid-column: 1 / -1; }
  #agPrev, #agNext { min-width: 44px; justify-content: center; }
}

@media (pointer: coarse) { #agPrev, #agNext { min-width: 44px; justify-content: center; } .seg label, .dg-chk { min-height: 44px; } }

/* ---------- the city's clock ---------- */
.wtime { position: absolute; right: 12px; top: 12px; z-index: 5; min-height: 32px; padding: 4px 12px; border-radius: 999px; font: 600 12px var(--mono); background: var(--card); border: 1px solid var(--border); color: var(--fg); opacity: .92; }
.wtime:hover { opacity: 1; border-color: var(--muted); }
.world.inside .wtime { display: none; }
@media (pointer: coarse) { .wtime { min-height: 44px; padding: 6px 14px; } }
@media (max-width: 640px) { .wtime { top: 8px; right: 8px; } }
