/* Kurious Hub · design system (4 Dec 2026)
   A dark control room: near-black ground, a receding light grid, glass slabs with real depth that tilt toward
   the pointer, squared corners (no pills: Hussein reads them as AI-generated), hand-drawn geometric glyphs, solid
   colours (no gradient text: it breaks Arabic dots). Brand v2 blues; Claude orange is not used here at all. */

:root {
  --ink: #05070C;
  --night: #0A1220;
  --navy: #04182E;
  --slab: rgba(14, 24, 42, 0.72);
  --slab-2: rgba(9, 16, 30, 0.86);
  --line: rgba(53, 194, 245, 0.14);
  --line-2: rgba(53, 194, 245, 0.28);
  --text: #E9F2FA;
  --dim: #8DA2BC;
  --faint: #56677E;
  --blue: #1FA8E8;
  --blue-deep: #0B7BD0;
  --sky: #35C2F5;
  --cyan: #34D8FE;
  --wa: #2BD67B;          /* WhatsApp: its own green, as the brand rules allow */
  --mail: #35C2F5;
  --social: #B9C8FF;
  --good: #3DDC97;
  --warn: #FFC15E;
  --bad: #FF5D73;
  --r: 6px;               /* squared corners everywhere */
  --font: "Space Grotesk", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --ar: "IBM Plex Sans Arabic", "Almarai", system-ui, sans-serif;
  --rail: 232px;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--ink); color: var(--text); font: 14px/1.5 var(--font);
  -webkit-font-smoothing: antialiased; overflow: hidden;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--sky); }
::selection { background: rgba(53, 194, 245, 0.35); }

/* ---------------------------------------------------------------- the room: grid floor + glow + stars */
.room { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; perspective: 900px; }
.room::before {           /* the receding floor grid */
  content: ""; position: absolute; left: -50%; right: -50%; bottom: -30%; height: 90%;
  background:
    repeating-linear-gradient(90deg, rgba(53,194,245,0.10) 0 1px, transparent 1px 72px),
    repeating-linear-gradient(0deg, rgba(53,194,245,0.10) 0 1px, transparent 1px 72px);
  transform: rotateX(74deg); transform-origin: 50% 100%;
  mask-image: linear-gradient(to top, rgba(0,0,0,0.9), transparent 75%);
  animation: floor 14s linear infinite;
}
.room::after {            /* horizon glow */
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(60% 45% at 62% 108%, rgba(31,168,232,0.22), transparent 70%),
    radial-gradient(40% 35% at 10% -10%, rgba(52,216,254,0.10), transparent 70%);
}
@keyframes floor { from { background-position: 0 0, 0 0; } to { background-position: 0 0, 0 72px; } }
@media (prefers-reduced-motion: reduce) { .room::before { animation: none; } }

/* ---------------------------------------------------------------- shell */
.shell { position: relative; z-index: 1; display: grid; grid-template-columns: var(--rail) 1fr; height: 100vh; }
.rail {
  display: flex; flex-direction: column; gap: 4px; padding: 18px 14px; border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(5,7,12,0.92), rgba(5,7,12,0.78)); backdrop-filter: blur(10px);
}
.mark { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; }
.mark svg { width: 34px; height: 34px; }
.mark b { font-weight: 700; letter-spacing: 0.02em; font-size: 15px; }
.mark span { display: block; font: 500 10px/1 var(--mono); color: var(--dim); letter-spacing: 0.24em; margin-top: 4px; }
.nav {
  display: flex; align-items: center; gap: 12px; padding: 10px 10px; border-radius: var(--r); color: var(--dim);
  text-decoration: none; border: 1px solid transparent; position: relative; transition: color .15s, background .15s, border-color .15s;
}
.nav svg { width: 22px; height: 22px; flex: none; }
.nav:hover { color: var(--text); background: rgba(53,194,245,0.05); }
.nav.on { color: var(--text); background: linear-gradient(90deg, rgba(31,168,232,0.16), rgba(31,168,232,0.02)); border-color: var(--line); }
.nav.on::before { content: ""; position: absolute; left: -15px; top: 8px; bottom: 8px; width: 3px; background: var(--sky); box-shadow: 0 0 12px var(--sky); }
.nav .count { margin-left: auto; font: 600 11px var(--mono); color: var(--cyan); }
.rail .sep { height: 1px; background: var(--line); margin: 10px 6px; }
.rail .foot { margin-top: auto; padding: 10px; font: 11px var(--mono); color: var(--faint); }

.main { overflow: auto; height: 100vh; scroll-behavior: smooth; }
.top {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 16px; padding: 14px 28px;
  background: linear-gradient(180deg, rgba(5,7,12,0.94), rgba(5,7,12,0.70)); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line);
}
.top h1 { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }
.top .sub { color: var(--dim); font-size: 13px; }
.top .grow { flex: 1; }
.clock { font: 500 12px var(--mono); color: var(--dim); text-align: right; line-height: 1.3; }
.clock b { color: var(--text); font-size: 14px; }
.lights { display: flex; gap: 10px; }
.light { display: flex; align-items: center; gap: 6px; font: 600 11px var(--mono); color: var(--dim); letter-spacing: 0.06em; }
.light i { width: 8px; height: 8px; display: block; background: var(--faint); transform: rotate(45deg); }
.light.live i { background: var(--good); box-shadow: 0 0 10px var(--good); }
.light.test i { background: var(--warn); box-shadow: 0 0 10px var(--warn); }
.light.off i { background: var(--faint); }

.page { padding: 26px 28px 80px; max-width: 1480px; }

/* ---------------------------------------------------------------- slabs: glass with depth, corner ticks, tilt */
.slab {
  position: relative; background: linear-gradient(180deg, var(--slab), var(--slab-2));
  border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px;
  box-shadow: 0 1px 0 rgba(255,255,255,0.05) inset, 0 -1px 0 rgba(0,0,0,0.6) inset, 0 28px 50px -28px rgba(0,0,0,0.9), 0 0 0 1px rgba(0,0,0,0.4);
  transform-style: preserve-3d; transition: transform .25s ease, border-color .2s;
}
.slab::before, .slab::after {   /* corner ticks */
  content: ""; position: absolute; width: 10px; height: 10px; border: 1px solid var(--sky); opacity: .55; pointer-events: none;
}
.slab::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.slab::after { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }
.slab.tilt:hover { border-color: var(--line-2); }
.slab .lift { transform: translateZ(28px); }
.slab h2, .slab h3 { margin: 0 0 12px; font-size: 13px; font-weight: 600; color: var(--dim); letter-spacing: 0.08em; text-transform: uppercase; display: flex; align-items: center; gap: 8px; }
.slab h2 svg, .slab h3 svg { width: 16px; height: 16px; color: var(--sky); }
.slab h2 .act, .slab h3 .act { margin-left: auto; text-transform: none; letter-spacing: 0; }

.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: 1fr 1fr; }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
.hero { grid-template-columns: 1.35fr 1fr; }
@media (max-width: 1100px) { .hero, .g2, .g3 { grid-template-columns: 1fr; } .g4 { grid-template-columns: 1fr 1fr; } }

/* ---------------------------------------------------------------- numbers */
.big { font: 600 40px/1 var(--font); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.big small { font-size: 16px; color: var(--dim); font-weight: 500; margin-left: 4px; }
.mid { font: 600 24px/1.1 var(--font); font-variant-numeric: tabular-nums; }
.k { font: 500 11px var(--mono); color: var(--dim); letter-spacing: 0.12em; text-transform: uppercase; }
.dim { color: var(--dim); } .faint { color: var(--faint); } .mono { font-family: var(--mono); }
.up { color: var(--good); } .down { color: var(--bad); }
.kpi { display: flex; flex-direction: column; gap: 10px; min-height: 120px; }
.kpi .row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.spark { width: 100%; height: 44px; display: block; }

/* ---------------------------------------------------------------- the 3D core */
.core { position: relative; min-height: 420px; padding: 0; overflow: hidden; }
.core canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.core .labels { position: absolute; inset: 0; pointer-events: none; }
.core .tag3d {
  position: absolute; transform: translate(-50%, -50%); pointer-events: auto; cursor: pointer;
  background: rgba(5,7,12,0.78); border: 1px solid var(--line-2); border-left: 3px solid var(--c, var(--sky));
  padding: 6px 10px; border-radius: 4px; font: 500 12px var(--mono); white-space: nowrap; backdrop-filter: blur(6px);
}
.core .tag3d b { display: block; font: 600 15px var(--font); color: var(--text); }
.core .caption { position: absolute; left: 20px; top: 16px; }
.core .caption h2 { margin: 0; color: var(--text); font-size: 18px; letter-spacing: 0; text-transform: none; }
.core .caption p { margin: 4px 0 0; color: var(--dim); font-size: 13px; }
.core .legend { position: absolute; left: 20px; bottom: 16px; display: flex; gap: 16px; font: 11px var(--mono); color: var(--dim); }
.core .legend i { display: inline-block; width: 14px; height: 2px; vertical-align: middle; margin-right: 6px; }

/* ---------------------------------------------------------------- buttons: tactile, with a 3D edge */
.btn {
  display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line-2); background: rgba(10,18,32,0.9);
  padding: 9px 14px; border-radius: 4px; cursor: pointer; color: var(--text); font-weight: 600; font-size: 13px;
  box-shadow: 0 3px 0 rgba(0,0,0,0.6), 0 1px 0 rgba(255,255,255,0.06) inset; transition: transform .08s, box-shadow .08s, background .15s;
  text-decoration: none; white-space: nowrap;
}
.btn:hover { background: rgba(20,36,60,0.95); }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(0,0,0,0.6); }
.btn svg { width: 16px; height: 16px; }
.btn.primary { background: var(--blue); border-color: #5fd0ff; color: #02131F; box-shadow: 0 3px 0 var(--blue-deep), 0 0 24px -6px rgba(31,168,232,0.7), 0 1px 0 rgba(255,255,255,0.5) inset; }
.btn.primary:hover { background: #33b5f0; }
.btn.wa { background: var(--wa); border-color: #7bf0b0; color: #031a0d; box-shadow: 0 3px 0 #179a55, 0 0 24px -6px rgba(43,214,123,0.6); }
.btn.danger { border-color: rgba(255,93,115,0.5); color: #ffc1ca; }
.btn.ghost { background: transparent; box-shadow: none; border-color: transparent; color: var(--dim); }
.btn.ghost:hover { color: var(--text); background: rgba(53,194,245,0.06); }
.btn.sm { padding: 6px 10px; font-size: 12px; }
.btn.lg { padding: 14px 22px; font-size: 15px; }
.btn[disabled] { opacity: .45; pointer-events: none; }

/* segmented control (squared) */
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 4px; overflow: hidden; background: rgba(5,7,12,0.6); }
.seg button { border: 0; background: transparent; padding: 7px 14px; cursor: pointer; color: var(--dim); font-weight: 600; font-size: 12px; border-right: 1px solid var(--line); }
.seg button:last-child { border-right: 0; }
.seg button.on { background: rgba(31,168,232,0.2); color: var(--text); box-shadow: inset 0 -2px 0 var(--sky); }
.seg button.on.live { background: rgba(61,220,151,0.16); box-shadow: inset 0 -2px 0 var(--good); }
.seg button.on.test { background: rgba(255,193,94,0.14); box-shadow: inset 0 -2px 0 var(--warn); }

/* status labels: squared, with a colour edge */
.st { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border-radius: 3px; font: 600 11px var(--mono);
  letter-spacing: 0.04em; border: 1px solid var(--line); background: rgba(5,7,12,0.55); border-left: 3px solid var(--c, var(--faint)); white-space: nowrap; }
.st.ok { --c: var(--good); } .st.warn { --c: var(--warn); } .st.bad { --c: var(--bad); } .st.blue { --c: var(--sky); } .st.wa { --c: var(--wa); }

/* ---------------------------------------------------------------- forms */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font: 500 11px var(--mono); color: var(--dim); letter-spacing: 0.1em; text-transform: uppercase; }
.input, select.input, textarea.input {
  width: 100%; background: rgba(3,6,12,0.8); border: 1px solid var(--line-2); border-radius: 4px; padding: 10px 12px; outline: none;
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.5); transition: border-color .15s, box-shadow .15s;
}
.input:focus { border-color: var(--sky); box-shadow: inset 0 2px 6px rgba(0,0,0,0.5), 0 0 0 3px rgba(53,194,245,0.15); }
textarea.input { min-height: 120px; resize: vertical; line-height: 1.7; }
.ar, [dir="rtl"] { font-family: var(--ar); }
.hint { color: var(--faint); font-size: 12px; }
.search { position: relative; flex: 1; max-width: 460px; }
.search svg { position: absolute; left: 12px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); color: var(--faint); }
.search .input { padding-left: 38px; }

/* ---------------------------------------------------------------- tables */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font: 500 11px var(--mono); color: var(--faint); letter-spacing: 0.1em; text-transform: uppercase; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.table td { padding: 11px 12px; border-bottom: 1px solid rgba(53,194,245,0.06); vertical-align: middle; }
.table tr.click { cursor: pointer; transition: background .12s; }
.table tr.click:hover td { background: rgba(53,194,245,0.05); }
.who b { display: block; font-weight: 600; }
.who span { color: var(--dim); font: 12px var(--mono); }

/* rate bars */
.bar { position: relative; height: 8px; background: rgba(53,194,245,0.08); border-radius: 2px; overflow: hidden; min-width: 80px; }
.bar i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--c, var(--sky)); box-shadow: 0 0 10px var(--c, var(--sky)); }
.stack { display: flex; height: 10px; border-radius: 2px; overflow: hidden; background: rgba(53,194,245,0.06); }
.stack i { display: block; height: 100%; }

/* ---------------------------------------------------------------- lists */
.list { display: flex; flex-direction: column; }
.li { display: flex; align-items: center; gap: 12px; padding: 11px 2px; border-bottom: 1px solid rgba(53,194,245,0.07); }
.li:last-child { border-bottom: 0; }
.li .when { font: 500 12px var(--mono); color: var(--dim); width: 104px; flex: none; }
.li .what { flex: 1; min-width: 0; }
.li .what b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li .what span { color: var(--dim); font-size: 12px; }
.chan { width: 26px; height: 26px; flex: none; display: grid; place-items: center; border: 1px solid var(--line-2); border-radius: 4px; transform: rotate(45deg); }
.chan svg { width: 14px; height: 14px; transform: rotate(-45deg); }
.chan.email { color: var(--mail); } .chan.whatsapp { color: var(--wa); border-color: rgba(43,214,123,0.4); } .chan.social { color: var(--social); }

/* ---------------------------------------------------------------- drawer + modal */
.veil { position: fixed; inset: 0; background: rgba(2,4,8,0.6); backdrop-filter: blur(3px); z-index: 20; animation: fade .15s; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(640px, 96vw); z-index: 21; overflow: auto;
  background: linear-gradient(180deg, #0B1424, #060B15); border-left: 1px solid var(--line-2); box-shadow: -40px 0 80px rgba(0,0,0,0.6);
  animation: slide .22s cubic-bezier(.2,.8,.2,1); padding: 22px 24px 60px;
}
.modal {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 21; width: min(720px, 94vw); max-height: 88vh; overflow: auto;
  background: linear-gradient(180deg, #0D1729, #070C17); border: 1px solid var(--line-2); border-radius: var(--r); padding: 22px 24px;
  box-shadow: 0 50px 100px rgba(0,0,0,0.7); animation: pop .18s ease;
}
.modal.wide { width: min(980px, 96vw); }
.x { position: absolute; top: 14px; right: 14px; }
@keyframes fade { from { opacity: 0; } } @keyframes slide { from { transform: translateX(40px); opacity: 0; } }
@keyframes pop { from { transform: translate(-50%, -47%) scale(.98); opacity: 0; } }

.toasts { position: fixed; bottom: 22px; right: 22px; z-index: 40; display: flex; flex-direction: column; gap: 8px; }
.toast { background: #0E1A2E; border: 1px solid var(--line-2); border-left: 3px solid var(--c, var(--sky)); padding: 11px 14px; border-radius: 4px; min-width: 260px; max-width: 420px; box-shadow: 0 20px 40px rgba(0,0,0,0.5); animation: slide .2s; }
.toast.bad { --c: var(--bad); } .toast.ok { --c: var(--good); }

/* ---------------------------------------------------------------- WhatsApp phone preview */
.phone {
  width: 300px; border-radius: 26px; padding: 12px; background: linear-gradient(160deg, #1b2738, #0b111c);
  border: 1px solid rgba(255,255,255,0.08); box-shadow: 0 30px 60px -20px rgba(0,0,0,0.8), inset 0 1px 0 rgba(255,255,255,0.08);
  transform: perspective(900px) rotateY(-10deg) rotateX(4deg); transition: transform .4s;
}
.phone:hover { transform: perspective(900px) rotateY(-3deg) rotateX(1deg); }
.phone .scr { border-radius: 18px; background: #0B141A; min-height: 380px; padding: 14px 12px; display: flex; flex-direction: column; justify-content: flex-end; gap: 6px;
  background-image: radial-gradient(rgba(255,255,255,0.03) 1px, transparent 1px); background-size: 14px 14px; }
.phone .head { display: flex; align-items: center; gap: 8px; padding: 0 2px 10px; border-bottom: 1px solid rgba(255,255,255,0.05); margin-bottom: auto; font-size: 12px; color: #cfd8df; }
.phone .head i { width: 26px; height: 26px; border-radius: 50%; background: var(--blue); display: block; }
.bubble { align-self: flex-start; max-width: 92%; background: #1F2C34; color: #E9EDEF; padding: 8px 10px 6px; border-radius: 8px; border-top-left-radius: 0;
  font: 14px/1.6 var(--ar); white-space: pre-wrap; word-wrap: break-word; box-shadow: 0 1px 1px rgba(0,0,0,0.3); }
.bubble .t { display: block; text-align: right; font: 10px var(--mono); color: #8696a0; margin-top: 2px; }
.bubble mark { background: rgba(43,214,123,0.18); color: #c9f7dc; border-radius: 2px; padding: 0 2px; }

/* ---------------------------------------------------------------- broadcast flow: step tiles */
.steps { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 18px; }
@media (max-width: 1100px) { .steps { grid-template-columns: 1fr; } }
.stepn { display: flex; align-items: center; gap: 10px; margin: 18px 0 10px; }
.stepn b { width: 26px; height: 26px; display: grid; place-items: center; border: 1px solid var(--sky); color: var(--sky); font: 600 12px var(--mono); transform: rotate(45deg); }
.stepn b span { transform: rotate(-45deg); }
.stepn h3 { margin: 0; font-size: 15px; letter-spacing: 0; text-transform: none; color: var(--text); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.tile {
  text-align: left; border: 1px solid var(--line-2); background: rgba(5,9,16,0.7); border-radius: var(--r); padding: 14px; cursor: pointer;
  transition: transform .15s, border-color .15s, box-shadow .15s; box-shadow: 0 6px 0 -2px rgba(0,0,0,0.6);
}
.tile:hover { transform: translateY(-2px); border-color: var(--sky); }
.tile.on { border-color: var(--sky); box-shadow: 0 0 0 1px var(--sky), 0 0 30px -8px rgba(53,194,245,0.6), 0 6px 0 -2px rgba(0,0,0,0.6); background: rgba(31,168,232,0.10); }
.tile.on.wa { border-color: var(--wa); box-shadow: 0 0 0 1px var(--wa), 0 0 30px -8px rgba(43,214,123,0.5); background: rgba(43,214,123,0.07); }
.tile b { display: block; font-size: 14px; margin-top: 8px; }
.tile span { color: var(--dim); font-size: 12px; }
.tile svg { width: 26px; height: 26px; color: var(--sky); }
.tile.wa svg { color: var(--wa); }
.review { border: 1px dashed var(--line-2); border-radius: var(--r); padding: 16px; margin-top: 14px; background: rgba(3,6,12,0.5); }
.review .n { font: 600 34px var(--font); }

/* ---------------------------------------------------------------- automations timeline */
.rail3d { position: relative; height: 150px; margin: 8px 0 20px; perspective: 800px; }
.rail3d .track { position: absolute; left: 0; right: 0; top: 50%; height: 60px; transform: translateY(-50%) rotateX(58deg); transform-style: preserve-3d;
  background: repeating-linear-gradient(90deg, rgba(53,194,245,0.18) 0 1px, transparent 1px 40px), linear-gradient(180deg, rgba(31,168,232,0.05), rgba(31,168,232,0.16));
  border: 1px solid var(--line-2); }
.rail3d .pin { position: absolute; top: 50%; transform: translate(-50%, -100%); display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; }
.rail3d .pin i { width: 2px; height: 34px; background: linear-gradient(var(--c, var(--sky)), transparent); }
.rail3d .pin b { width: 10px; height: 10px; background: var(--c, var(--sky)); transform: rotate(45deg); box-shadow: 0 0 12px var(--c, var(--sky)); order: -1; }
.rail3d .anchor { position: absolute; top: 4px; transform: translateX(-50%); text-align: center; font: 600 11px var(--mono); color: var(--text); }
.rail3d .anchor::after { content: ""; display: block; width: 1px; height: 120px; margin: 4px auto 0; background: linear-gradient(var(--line-2), transparent); }
.rail3d .now { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--good); box-shadow: 0 0 14px var(--good); }
.rail3d .now span { position: absolute; top: -2px; left: 6px; font: 600 10px var(--mono); color: var(--good); }
.day { margin-top: 18px; }
.day h4 { margin: 0 0 6px; font: 600 12px var(--mono); color: var(--sky); letter-spacing: 0.1em; text-transform: uppercase; }
.empty-val { border-left: 3px solid var(--bad); background: rgba(255,93,115,0.06); }

/* ---------------------------------------------------------------- social calendar */
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.cal .dh { font: 600 11px var(--mono); color: var(--dim); letter-spacing: 0.1em; text-transform: uppercase; padding: 0 4px; }
.cell { min-height: 150px; border: 1px solid var(--line); border-radius: 4px; padding: 8px; background: rgba(5,9,16,0.55); position: relative; transition: border-color .15s; }
.cell:hover { border-color: var(--line-2); }
.cell.today { border-color: var(--sky); box-shadow: inset 0 0 0 1px rgba(53,194,245,0.4); }
.cell.past { opacity: .55; }
.cell .d { font: 600 12px var(--mono); color: var(--dim); display: flex; justify-content: space-between; }
.cell .add { opacity: 0; border: 0; background: none; color: var(--sky); cursor: pointer; font: 600 16px var(--mono); line-height: 1; }
.cell:hover .add { opacity: 1; }
.post { margin-top: 6px; border: 1px solid var(--line-2); border-left: 3px solid var(--c, var(--social)); border-radius: 3px; padding: 6px; background: rgba(10,18,32,0.9); cursor: pointer; font-size: 12px; display: flex; gap: 6px; }
.post img { width: 34px; height: 44px; object-fit: cover; border-radius: 2px; flex: none; }
.post .tx { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; color: var(--dim); font-family: var(--ar); }
.post .tm { font: 600 10px var(--mono); color: var(--text); }
.post.published { --c: var(--good); } .post.failed { --c: var(--bad); } .post.draft { --c: var(--faint); }

/* ---------------------------------------------------------------- onboarding: a 3D carousel of stations */
.orbit { position: relative; height: 560px; perspective: 1400px; margin-top: 10px; }
.orbit .ring { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .8s cubic-bezier(.2,.8,.2,1); }
.station { position: absolute; left: 50%; top: 0; width: min(560px, 86vw); margin-left: calc(min(560px, 86vw) / -2); backface-visibility: hidden; transition: opacity .5s, filter .5s; }
.station.away { opacity: .25; filter: blur(2px); pointer-events: none; }
.dots { display: flex; gap: 14px; justify-content: center; margin-top: 8px; }
.dots button { border: 0; background: none; cursor: pointer; color: var(--faint); font: 600 11px var(--mono); letter-spacing: 0.1em; display: flex; align-items: center; gap: 8px; }
.dots button i { width: 9px; height: 9px; border: 1px solid currentColor; transform: rotate(45deg); display: block; }
.dots button.on { color: var(--sky); } .dots button.on i { background: var(--sky); box-shadow: 0 0 10px var(--sky); }
.dots button.done { color: var(--good); } .dots button.done i { background: var(--good); }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatches button { width: 36px; height: 36px; border-radius: 4px; border: 2px solid transparent; cursor: pointer; }
.swatches button.on { border-color: #fff; box-shadow: 0 0 0 2px rgba(255,255,255,0.2); }
.drop { border: 1px dashed var(--line-2); border-radius: var(--r); padding: 26px; text-align: center; color: var(--dim); cursor: pointer; transition: border-color .15s, background .15s; }
.drop:hover, .drop.over { border-color: var(--sky); background: rgba(53,194,245,0.05); }

/* ---------------------------------------------------------------- login */
.gate { position: relative; z-index: 1; height: 100vh; display: grid; place-items: center; }
.gate .box { width: min(420px, 92vw); text-align: center; }
.gate canvas { width: 280px; height: 280px; display: block; margin: 0 auto -20px; }
.gate h1 { font-size: 26px; margin: 0 0 6px; letter-spacing: -0.02em; }
.code { display: flex; gap: 8px; justify-content: center; margin: 18px 0; }
.code input { width: 46px; height: 58px; text-align: center; font: 600 24px var(--mono); background: rgba(3,6,12,0.85); border: 1px solid var(--line-2); border-radius: 4px; outline: none; box-shadow: inset 0 3px 8px rgba(0,0,0,0.6); }
.code input:focus { border-color: var(--sky); box-shadow: 0 0 0 3px rgba(53,194,245,0.2); }

/* ---------------------------------------------------------------- misc */
.empty { text-align: center; padding: 40px 20px; color: var(--dim); }
.empty svg { width: 44px; height: 44px; color: var(--sky); opacity: .8; margin-bottom: 10px; }
.empty b { display: block; color: var(--text); font-size: 16px; margin-bottom: 6px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.mt { margin-top: 16px; } .mt2 { margin-top: 26px; } .mb { margin-bottom: 16px; }
.skel { height: 14px; border-radius: 2px; background: linear-gradient(90deg, rgba(53,194,245,0.05), rgba(53,194,245,0.12), rgba(53,194,245,0.05)); background-size: 200% 100%; animation: sk 1.2s infinite; }
@keyframes sk { to { background-position: -200% 0; } }
.note { border-left: 3px solid var(--warn); background: rgba(255,193,94,0.06); padding: 10px 14px; border-radius: 3px; color: #f3e3c4; font-size: 13px; }
.note.info { border-color: var(--sky); background: rgba(53,194,245,0.06); color: #cfeafa; }
.note.bad { border-color: var(--bad); background: rgba(255,93,115,0.07); color: #ffd0d7; }
iframe.mail { width: 100%; height: 62vh; border: 1px solid var(--line); border-radius: 4px; background: #fff; }
kbd { font: 600 11px var(--mono); border: 1px solid var(--line-2); border-bottom-width: 2px; padding: 1px 5px; border-radius: 3px; color: var(--dim); }

/* ---------------------------------------------------------------- phones and small tablets: the rail becomes a top strip */
@media (max-width: 820px) {
  body { overflow: auto; }
  .shell { grid-template-columns: 1fr; height: auto; }
  .rail { flex-direction: row; align-items: center; overflow-x: auto; gap: 2px; padding: 8px 10px; border-right: 0; border-bottom: 1px solid var(--line);
    position: sticky; top: 0; z-index: 6; scrollbar-width: none; }
  .rail::-webkit-scrollbar { display: none; }
  .rail .mark { padding: 0 8px 0 0; } .rail .mark div { display: none; }
  .rail select.input, .rail > .k, .rail .sep, .rail .foot div { display: none; }
  .rail .foot { margin: 0; padding: 0; }
  .nav { padding: 8px 10px; flex: none; } .nav span { display: none; } .nav.on span { display: inline; }
  .nav.on::before { left: 8px; right: 8px; top: auto; bottom: -9px; width: auto; height: 3px; }
  .main { height: auto; overflow: visible; }
  .top { position: static; flex-wrap: wrap; padding: 12px 16px; gap: 8px; }
  .top .grow { display: none; } .lights { order: 3; width: 100%; }
  .page { padding: 16px 14px 60px; }
  .g4 { grid-template-columns: 1fr; }
  .core { min-height: 360px; }
  .slab { padding: 14px; }
  .table { display: block; overflow-x: auto; white-space: nowrap; }
  .between { flex-wrap: wrap; }
  .search { max-width: none; width: 100%; flex: auto; }
  .seg { max-width: 100%; overflow-x: auto; }
  .cal { grid-template-columns: 1fr; } .cal .dh { display: none; } .cell { min-height: 0; } .cell.past { display: none; }
  .phone { transform: none; width: 100%; max-width: 300px; }
  .orbit { height: auto; perspective: none; } .orbit .ring { transform: none !important; position: static; }
  .station { position: static; width: auto; margin: 0; transform: none !important; display: none; }
  .station:not(.away) { display: block; }
  .dots { flex-wrap: wrap; }
  .row[style*="nowrap"] { flex-wrap: wrap !important; }
  .rail3d { overflow: hidden; }
  .li .when { width: 78px; }
  .drawer { width: 100vw; padding: 18px 14px 50px; }
}
