/* =========================================================
   AIMI ORBITAL NAV — warm daylight sci-fi interface
   Loaded after styles.css. Layout lives in styles.css;
   this file owns the visual language and the circular dial.
   ========================================================= */

:root {
  --ink: #332f3d;
  --ink-soft: #5a5260;
  --muted: #8d8176;
  --muted-strong: #74695f;
  --bg: #f8f1e6;
  --panel: #fffaf3;
  --line: rgba(43, 119, 122, 0.13);
  --line-strong: rgba(43, 119, 122, 0.24);
  --indigo: #168d99;
  --violet: #806be3;
  --blue: #438fd4;
  --gold: #b5822a;
  --gold-soft: #f7ebd4;
  --shadow-sm: 0 4px 14px rgba(95, 70, 35, 0.06);
  --shadow-md: 0 14px 34px rgba(95, 70, 35, 0.1);
  --shadow-lg: 0 24px 60px rgba(95, 70, 35, 0.14);
  --sci-teal: #187f8b;
  --sci-teal-bright: #23aab2;
  --sci-teal-pale: #e3f5f3;
  --sci-amber: #d89a38;
  --sci-amber-deep: #b5822a;
  --sci-amber-pale: #fbefd9;
  --sci-coral: #e5846b;
  --sci-coral-pale: #fdebe4;
  --sci-ink: #332f3d;
  --sci-muted: #8b7d71;
  --sci-panel: rgba(255, 251, 245, 0.9);
  --sci-line: rgba(34, 119, 123, 0.17);
  --sci-grid: rgba(29, 112, 116, 0.055);
  --sci-mono: "Consolas", "SFMono-Regular", "Cascadia Mono", monospace;
  --font: "Bahnschrift", "Segoe UI", "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
}

html {
  background: #f7efe3;
}

body {
  color: var(--sci-ink);
  background:
    radial-gradient(circle at 86% -8%, rgba(255, 196, 105, 0.45), transparent 31%),
    radial-gradient(circle at 4% 8%, rgba(45, 190, 190, 0.2), transparent 27%),
    radial-gradient(circle at 55% 108%, rgba(255, 163, 137, 0.16), transparent 36%),
    linear-gradient(135deg, #faf5ec 0%, #f7efe3 48%, #f4e9db 100%);
  font-family: var(--font);
  letter-spacing: 0.015em;
}

/* Orbital grid + faint scanlines */

body::before {
  content: "";
  position: fixed;
  z-index: 0;
  inset: 0;
  background-image:
    linear-gradient(var(--sci-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--sci-grid) 1px, transparent 1px);
  background-size: 54px 54px;
  -webkit-mask-image: radial-gradient(ellipse at 64% 44%, #000 2%, transparent 82%);
  mask-image: radial-gradient(ellipse at 64% 44%, #000 2%, transparent 82%);
  pointer-events: none;
}

body::after {
  content: "";
  position: fixed;
  z-index: 80;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    rgba(94, 73, 45, 0.018) 0,
    rgba(94, 73, 45, 0.018) 1px,
    transparent 1px,
    transparent 4px
  );
  opacity: 0.55;
  pointer-events: none;
}

::selection {
  color: #fffdf8;
  background: var(--sci-teal);
}

:focus-visible {
  outline: 2px solid rgba(24, 127, 139, 0.75);
  outline-offset: 3px;
}

body::-webkit-scrollbar {
  width: 9px;
}

body::-webkit-scrollbar-track {
  background: #f1e6d7;
}

body::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(24, 127, 139, 0.55), rgba(181, 130, 42, 0.4));
  border: 2px solid #f1e6d7;
  border-radius: 8px;
}

.skip-link {
  color: #fffdf8;
  background: var(--sci-teal);
  box-shadow: 0 6px 20px rgba(24, 127, 139, 0.22);
  font-family: var(--sci-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
}

.ambient {
  opacity: 0.4;
  filter: blur(125px);
}

.ambient--one {
  background: #5acfd0;
  opacity: 0.22;
}

.ambient--two {
  background: #ffc477;
  opacity: 0.28;
}

/* =========================================================
   Sidebar
   ========================================================= */

.sidebar {
  background:
    radial-gradient(circle at 54% 25%, rgba(255, 198, 119, 0.17), transparent 39%),
    linear-gradient(180deg, rgba(255, 252, 247, 0.95), rgba(249, 240, 227, 0.92));
  border-right: 1px solid rgba(181, 130, 42, 0.18);
  box-shadow:
    12px 0 35px rgba(92, 68, 34, 0.06),
    inset -1px 0 0 rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(22px) saturate(115%);
  -webkit-backdrop-filter: blur(22px) saturate(115%);
}

.sidebar::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 0 24px, rgba(24, 127, 139, 0.035) 24px 25px, transparent 25px),
    repeating-linear-gradient(0deg, rgba(90, 68, 40, 0.02) 0, rgba(90, 68, 40, 0.02) 1px, transparent 1px, transparent 6px);
  pointer-events: none;
}

.sidebar::after {
  height: 190px;
  background: linear-gradient(180deg, rgba(181, 130, 42, 0.48), rgba(24, 127, 139, 0.12), transparent);
  box-shadow: 0 0 14px rgba(181, 130, 42, 0.14);
}

.sidebar > * {
  position: relative;
  z-index: 1;
}

.sidebar-head {
  border-bottom: 1px solid rgba(181, 130, 42, 0.08);
}

.brand-mark {
  border: 1px solid rgba(181, 130, 42, 0.32);
  box-shadow:
    0 0 0 4px rgba(181, 130, 42, 0.045),
    0 8px 18px rgba(124, 86, 34, 0.13);
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: -5px;
  border: 1px solid rgba(24, 127, 139, 0.16);
  border-radius: 17px;
  pointer-events: none;
}

.brand-spark {
  width: 8px;
  height: 8px;
  background: var(--sci-teal-bright);
  border: 1px solid #eaffff;
  box-shadow: 0 0 10px rgba(35, 170, 178, 0.5);
}

.brand-copy strong {
  color: #332d29;
  font-weight: 680;
  letter-spacing: 0.01em;
}

.brand-copy small {
  color: #8d7c63;
  font-family: var(--sci-mono);
  font-size: 7px;
  font-weight: 500;
  letter-spacing: 1.35px;
}

.sidebar-close {
  color: #8b7f74;
  border-color: rgba(181, 130, 42, 0.08);
}

.sidebar-close:hover {
  color: var(--sci-teal);
  background: rgba(24, 127, 139, 0.06);
  border-color: rgba(24, 127, 139, 0.16);
}

.nav-kicker {
  color: #987d55;
  font-family: var(--sci-mono);
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 1.35px;
}

/* =========================================================
   Circular sector dial
   ========================================================= */

.dial-shell {
  margin: 1px 0 3px;
  padding: 0;
}

.dial-stage {
  --dial-rotation: 0deg;
  position: relative;
  width: 216px;
  height: 216px;
  margin: 0 auto;
  touch-action: none;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}

.dial-stage.is-dragging {
  cursor: grabbing;
}

.dial-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 45%, #fffdf9 0%, #f9f0e2 56%, #f1e0c8 100%);
  border: 1px solid rgba(181, 130, 42, 0.26);
  border-radius: 50%;
  box-shadow:
    inset 0 0 36px rgba(255, 255, 255, 0.9),
    inset 0 -8px 22px rgba(161, 111, 42, 0.05),
    0 12px 30px rgba(120, 85, 40, 0.08);
}

.dial-orbit {
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(24, 127, 139, 0.17);
  border-radius: 50%;
  background: repeating-conic-gradient(
    from -0.5deg,
    rgba(24, 127, 139, 0.32) 0deg 0.9deg,
    transparent 0.9deg 15deg
  );
  -webkit-mask: radial-gradient(circle, transparent 0 92px, #000 93px 97px, transparent 98px);
  mask: radial-gradient(circle, transparent 0 92px, #000 93px 97px, transparent 98px);
  transform: rotate(var(--dial-rotation));
  transition: transform 0.05s linear;
  pointer-events: none;
}

.dial-orbit::after {
  content: "";
  position: absolute;
  inset: 25px;
  border: 1px dashed rgba(181, 130, 42, 0.2);
  border-radius: 50%;
}

.dial-pointer {
  position: absolute;
  z-index: 7;
  top: -2px;
  left: 50%;
  width: 0;
  height: 0;
  border-top: 8px solid var(--sci-amber-deep);
  border-right: 5px solid transparent;
  border-left: 5px solid transparent;
  filter: drop-shadow(0 2px 3px rgba(116, 78, 28, 0.16));
  transform: translateX(-50%);
  pointer-events: none;
}

.dial-node {
  position: absolute;
  z-index: 4;
  top: 50%;
  left: 50%;
  display: grid;
  width: 44px;
  height: 44px;
  padding: 0;
  color: var(--sci-teal);
  background: linear-gradient(145deg, #fffefa, #f9f0e2);
  border: 1px solid rgba(181, 130, 42, 0.22);
  border-radius: 14px;
  box-shadow:
    0 5px 13px rgba(105, 72, 30, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  place-items: center;
  cursor: pointer;
  transform: translate(-50%, -50%) rotate(var(--a)) translateY(-74px) rotate(calc(-1 * var(--a)));
  transition: background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, color 0.18s ease;
}

.dial-node .ui-icon {
  width: 19px;
  height: 19px;
  stroke-width: 1.8;
}

.dial-node--social {
  color: #137f8b;
}

.dial-node--tools {
  color: #7a61dd;
}

.dial-node--cloud {
  color: #397fc3;
}

.dial-node--workspace {
  color: #a97624;
}

.dial-node:hover {
  background: #fffefa;
  border-color: rgba(24, 127, 139, 0.38);
  box-shadow:
    0 7px 18px rgba(105, 72, 30, 0.13),
    0 0 0 4px rgba(24, 127, 139, 0.055);
}

.dial-node.is-active {
  color: #5a3e17;
  background: linear-gradient(145deg, #fff5dd, #f6d79e);
  border-color: rgba(181, 130, 42, 0.68);
  box-shadow:
    0 0 0 5px rgba(216, 154, 56, 0.12),
    0 8px 20px rgba(149, 102, 39, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.dial-core {
  position: absolute;
  z-index: 6;
  top: 50%;
  left: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100px;
  height: 100px;
  padding: 8px;
  background:
    radial-gradient(circle at 42% 25%, rgba(255, 255, 255, 0.96), transparent 48%),
    linear-gradient(150deg, #fffdf8, #f8ecd9);
  border: 1px solid rgba(181, 130, 42, 0.35);
  border-radius: 50%;
  box-shadow:
    0 0 0 7px rgba(255, 252, 246, 0.54),
    0 9px 22px rgba(121, 83, 34, 0.11),
    inset 0 0 22px rgba(255, 255, 255, 0.7);
  transform: translate(-50%, -50%);
  text-align: center;
  pointer-events: none;
}

.dial-core-code {
  color: var(--sci-teal);
  font-family: var(--sci-mono);
  font-size: 7px;
  letter-spacing: 0.08em;
  line-height: 1;
}

.dial-core strong {
  max-width: 84px;
  margin-top: 4px;
  color: #40372f;
  font-size: 12px;
  font-weight: 680;
  letter-spacing: 0.03em;
  line-height: 1.35;
  white-space: nowrap;
}

.dial-core-count {
  margin-top: 4px;
  color: #9a7a45;
  font-family: var(--sci-mono);
  font-size: 6.5px;
  letter-spacing: 0.08em;
  line-height: 1;
}

.dial-core-count b {
  color: var(--sci-amber-deep);
  font-size: 8px;
  font-weight: 700;
}

.dial-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin: 0 0 2px;
  color: #aa9578;
  font-family: var(--sci-mono);
  font-size: 7px;
  letter-spacing: 0.08em;
}

.dial-hint-icon {
  display: inline-grid;
  width: 14px;
  height: 14px;
  color: var(--sci-teal);
  border: 1px solid rgba(24, 127, 139, 0.18);
  border-radius: 50%;
  place-items: center;
  font-size: 9px;
  line-height: 1;
}

.sidebar-scroll {
  scrollbar-color: rgba(181, 130, 42, 0.28) transparent;
}

.side-rule {
  background: linear-gradient(90deg, transparent, rgba(181, 130, 42, 0.23), rgba(24, 127, 139, 0.16), transparent);
}

.side-utility .nav-kicker {
  margin-top: 0;
}

.side-action {
  color: #7d7065;
  border-radius: 5px;
}

.side-action:hover {
  color: var(--sci-teal);
  background: rgba(24, 127, 139, 0.055);
  border-color: rgba(24, 127, 139, 0.08);
}

.side-action .side-icon {
  border: 1px solid rgba(181, 130, 42, 0.12);
  border-radius: 10px;
}

.side-icon--mist {
  color: #7d8c8f;
  background: rgba(72, 126, 130, 0.07);
  border-color: rgba(72, 126, 130, 0.1);
}

.side-icon--gold {
  color: #a97624;
  background: rgba(216, 154, 56, 0.12);
  border-color: rgba(181, 130, 42, 0.16);
}

.side-action kbd {
  color: #9b886e;
  background: rgba(255, 253, 248, 0.9);
  border-color: rgba(181, 130, 42, 0.2);
  box-shadow: 0 1px 0 rgba(119, 86, 42, 0.06);
  font-family: var(--sci-mono);
}

.side-action .mini-external {
  color: #b09b7e;
}

/* compact side scanner + mission log */

.side-scanner {
  margin: 11px 4px 4px;
  padding: 9px 8px 8px;
  background:
    radial-gradient(circle at 50% 58%, rgba(35, 170, 178, 0.08), transparent 52%),
    rgba(255, 252, 246, 0.58);
  border: 1px solid rgba(181, 130, 42, 0.14);
  border-radius: 10px;
}

.scanner-head,
.scanner-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #a18d72;
  font-family: var(--sci-mono);
  font-size: 6px;
  letter-spacing: 0.07em;
  line-height: 1.2;
}

.scanner-head b {
  color: var(--sci-teal);
  font-weight: 600;
}

.scanner-disc {
  position: relative;
  width: 142px;
  height: 142px;
  margin: 7px auto;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.9), transparent 27%),
    repeating-radial-gradient(circle at 50% 50%, transparent 0 22px, rgba(24, 127, 139, 0.1) 23px 24px, transparent 25px 46px),
    conic-gradient(from 20deg, rgba(216, 154, 56, 0.1), rgba(35, 170, 178, 0.08), rgba(216, 154, 56, 0.1));
  border: 1px solid rgba(24, 127, 139, 0.18);
  border-radius: 50%;
  box-shadow:
    inset 0 0 22px rgba(24, 127, 139, 0.06),
    0 4px 12px rgba(102, 74, 39, 0.05);
}

.scanner-disc::before,
.scanner-disc::after {
  content: "";
  position: absolute;
  background: rgba(24, 127, 139, 0.16);
}

.scanner-disc::before {
  top: 50%;
  right: 10px;
  left: 10px;
  height: 1px;
}

.scanner-disc::after {
  top: 10px;
  bottom: 10px;
  left: 50%;
  width: 1px;
}

.scanner-sweep {
  position: absolute;
  z-index: 1;
  inset: 0;
  background: conic-gradient(from 0deg, transparent 0 68%, rgba(35, 170, 178, 0.15) 86%, rgba(216, 154, 56, 0.3) 98%, transparent 100%);
  border-radius: 50%;
  animation: scannerSweep 7s linear infinite;
}

.scanner-blip {
  position: absolute;
  z-index: 2;
  width: 5px;
  height: 5px;
  background: var(--sci-amber);
  border: 1px solid #fffdf7;
  border-radius: 50%;
  box-shadow: 0 0 7px rgba(216, 154, 56, 0.55);
}

.scanner-blip--one {
  top: 32%;
  left: 62%;
}

.scanner-blip--two {
  top: 62%;
  left: 34%;
  background: var(--sci-teal-bright);
  box-shadow: 0 0 7px rgba(35, 170, 178, 0.55);
}

.scanner-blip--three {
  top: 46%;
  left: 78%;
  width: 4px;
  height: 4px;
}

.scanner-cross {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  width: 7px;
  height: 7px;
  background: var(--sci-teal);
  border: 1px solid #fffdf7;
  border-radius: 50%;
  box-shadow: 0 0 9px rgba(35, 170, 178, 0.4);
  transform: translate(-50%, -50%);
}

.scanner-foot {
  color: #ad9a80;
}

.side-log {
  margin: 5px 6px 0;
  padding: 8px 7px 6px;
  border-left: 1px solid rgba(24, 127, 139, 0.16);
}

.side-log > span {
  display: block;
  margin-bottom: 5px;
  color: #a18d72;
  font-family: var(--sci-mono);
  font-size: 6px;
  letter-spacing: 0.08em;
}

.side-log p {
  margin: 3px 0;
  color: #a69784;
  font-family: var(--sci-mono);
  font-size: 6.5px;
  letter-spacing: 0.02em;
  line-height: 1.35;
}

.side-log i {
  color: var(--sci-teal);
  font-style: normal;
}

/* small live telemetry panel */

.side-telemetry {
  margin-top: auto;
  padding: 10px 9px 5px;
  border-top: 1px solid rgba(181, 130, 42, 0.14);
}

.telemetry-head,
.telemetry-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #a08d74;
  font-family: var(--sci-mono);
  font-size: 6.5px;
  letter-spacing: 0.07em;
  line-height: 1.2;
}

.telemetry-head b {
  color: var(--sci-teal);
  font-weight: 600;
}

.telemetry-bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 28px;
  margin: 8px 0 7px;
}

.telemetry-bars i {
  flex: 1;
  height: var(--h);
  min-height: 4px;
  background: linear-gradient(180deg, rgba(216, 154, 56, 0.8), rgba(24, 127, 139, 0.55));
  border-radius: 2px;
  opacity: 0.6;
}

.telemetry-bars i:nth-child(3n) {
  opacity: 0.85;
}

.telemetry-foot {
  color: #b09b7e;
}

.sidebar-foot {
  border-top: 1px solid rgba(181, 130, 42, 0.1);
  padding: 10px 16px 13px;
}

.sidebar-version {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #a28e73;
  font-family: var(--sci-mono);
  font-size: 7px;
  letter-spacing: 0.07em;
}

.sidebar-version .status-dot {
  width: 5px;
  height: 5px;
  background: var(--sci-teal-bright);
  box-shadow: 0 0 0 3px rgba(35, 170, 178, 0.11);
}

.sidebar-version b {
  color: #8d7d68;
  font-weight: 500;
}

/* =========================================================
   System line + toolbar
   ========================================================= */

.system-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 18px;
  margin: 0 3px 9px;
  color: #9b8d7c;
  font-family: var(--sci-mono);
  font-size: 7.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.system-state,
.system-time {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.system-state {
  color: var(--sci-teal);
}

.system-mid {
  overflow: hidden;
  color: #b0a18d;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.system-mid b {
  color: rgba(24, 127, 139, 0.35);
  font-weight: 400;
}

.system-time {
  color: #a39178;
}

.sys-dot {
  width: 5px;
  height: 5px;
  background: var(--sci-teal-bright);
  border-radius: 50%;
  box-shadow: 0 0 7px rgba(35, 170, 178, 0.5);
  animation: sysPulse 2.8s ease-in-out infinite;
}

.toolbar {
  position: relative;
  z-index: 20;
  background:
    linear-gradient(112deg, rgba(255, 252, 246, 0.96), rgba(253, 247, 238, 0.88)),
    radial-gradient(circle at 20% 0%, rgba(255, 196, 111, 0.2), transparent 38%);
  border: 1px solid rgba(181, 130, 42, 0.22);
  border-radius: 12px;
  box-shadow:
    0 12px 35px rgba(104, 72, 32, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(22px) saturate(115%);
  -webkit-backdrop-filter: blur(22px) saturate(115%);
}

.toolbar::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 16px;
  width: 72px;
  height: 2px;
  background: linear-gradient(90deg, var(--sci-teal-bright), var(--sci-amber));
  border-radius: 0 0 3px 3px;
  box-shadow: 0 0 10px rgba(35, 170, 178, 0.18);
  pointer-events: none;
}

.toolbar::after {
  content: "";
  position: absolute;
  right: 12px;
  bottom: 9px;
  width: 15px;
  height: 8px;
  border-right: 1px solid rgba(24, 127, 139, 0.27);
  border-bottom: 1px solid rgba(24, 127, 139, 0.27);
  pointer-events: none;
}

.update-chip {
  border-right-color: rgba(181, 130, 42, 0.15);
}

.update-icon {
  color: var(--sci-teal);
  background:
    radial-gradient(circle at 35% 20%, rgba(255, 255, 255, 0.98), transparent 60%),
    linear-gradient(145deg, #e6f6f3, #f8eddb);
  border-color: rgba(24, 127, 139, 0.17);
  border-radius: 8px;
  box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.65);
}

.update-copy strong {
  color: #443b33;
  font-size: 11px;
  font-weight: 620;
  letter-spacing: 0.03em;
}

.update-copy small {
  color: #a49177;
  font-family: var(--sci-mono);
  font-size: 7px;
  letter-spacing: 0.06em;
}

.search-wrap {
  color: #9b8c7a;
  background:
    linear-gradient(180deg, rgba(255, 254, 250, 0.98), rgba(251, 245, 236, 0.92));
  border-color: rgba(181, 130, 42, 0.15);
  border-radius: 8px;
  box-shadow: inset 0 1px 3px rgba(110, 79, 40, 0.04);
}

.search-wrap:focus-within {
  background: #fffefb;
  border-color: rgba(24, 127, 139, 0.45);
  box-shadow:
    0 0 0 3px rgba(24, 127, 139, 0.07),
    inset 0 1px 3px rgba(110, 79, 40, 0.03);
}

.search-icon {
  color: var(--sci-teal);
}

.search-wrap input {
  color: #403b3d;
  font-size: 12px;
  letter-spacing: 0.02em;
}

.search-wrap input::placeholder {
  color: #a99b8b;
}

.search-clear {
  color: #8c7f70;
  background: rgba(181, 130, 42, 0.1);
}

.search-clear:hover {
  color: #5e4a2e;
  background: rgba(181, 130, 42, 0.17);
}

.search-kbd {
  color: #9d8a6d;
  background: #fffdf8;
  border-color: rgba(181, 130, 42, 0.18);
  box-shadow: 0 1px 0 rgba(120, 86, 42, 0.06);
  font-family: var(--sci-mono);
}

.toolbar-links {
  border-left-color: rgba(181, 130, 42, 0.14);
}

.mini-link {
  color: #74695f;
  background: rgba(255, 253, 248, 0.82);
  border-color: rgba(181, 130, 42, 0.15);
  border-radius: 8px;
  font-size: 10px;
  letter-spacing: 0.02em;
}

.mini-link:hover {
  color: #3d3838;
  background: #fffefb;
  border-color: rgba(24, 127, 139, 0.3);
  box-shadow: 0 6px 15px rgba(104, 72, 32, 0.06);
}

.mini-link--aimi {
  color: #8c641d;
  background: linear-gradient(135deg, #fff9ed, #f7ead1);
  border-color: rgba(181, 130, 42, 0.26);
}

.mini-link--aimi:hover {
  color: #754f12;
  background: #fff8ea;
  border-color: rgba(181, 130, 42, 0.4);
}

.mini-link .ui-icon {
  color: var(--sci-teal);
}

.mini-link .mini-external {
  color: #aa957d;
}

.mini-new {
  color: #8d641e;
  background: rgba(216, 154, 56, 0.15);
  border: 1px solid rgba(181, 130, 42, 0.2);
  border-radius: 3px;
  font-family: var(--sci-mono);
  font-size: 6px;
  letter-spacing: 0.05em;
}

.icon-button {
  color: #8f8274;
  border-color: transparent;
}

.icon-button:hover {
  color: var(--sci-teal);
  background: rgba(24, 127, 139, 0.055);
  border-color: rgba(24, 127, 139, 0.12);
}

/* =========================================================
   Search result strip
   ========================================================= */

.search-status {
  color: #8e8174;
  background: rgba(255, 252, 246, 0.72);
  border-color: rgba(181, 130, 42, 0.15);
  border-radius: 5px;
  font-family: var(--sci-mono);
  font-size: 9px;
  letter-spacing: 0.03em;
}

.search-status-copy strong {
  color: var(--sci-teal);
}

.search-status-query {
  color: #9b8b7a;
}

.text-button {
  color: var(--sci-teal);
}

.text-button:hover {
  background: rgba(24, 127, 139, 0.06);
}

/* =========================================================
   Sectors
   ========================================================= */

.section-code {
  flex: 0 0 auto;
  padding: 3px 5px 2px;
  color: var(--sci-teal);
  background: rgba(24, 127, 139, 0.055);
  border: 1px solid rgba(24, 127, 139, 0.13);
  border-radius: 3px;
  font-family: var(--sci-mono);
  font-size: 7px;
  letter-spacing: 0.06em;
  line-height: 1;
}

.section-emblem {
  border: 1px solid transparent;
  border-radius: 8px;
}

.section-emblem--indigo {
  color: #137f8b;
  background: #e6f6f3;
  border-color: rgba(24, 127, 139, 0.16);
  box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.6);
}

.section-emblem--violet {
  color: #7761da;
  background: #f0ecff;
  border-color: rgba(128, 107, 227, 0.16);
  box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.6);
}

.section-emblem--blue {
  color: #3b83c8;
  background: #eaf4fe;
  border-color: rgba(67, 143, 212, 0.15);
  box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.6);
}

.section-emblem--gold {
  color: #a97624;
  background: #fbefd9;
  border-color: rgba(181, 130, 42, 0.18);
  box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.6);
}

.section-head h2 {
  color: #3b3542;
  font-size: 15.5px;
  font-weight: 680;
  letter-spacing: 0.035em;
}

.section-count {
  color: var(--sci-teal);
  background: rgba(255, 252, 246, 0.8);
  border-color: rgba(24, 127, 139, 0.13);
  border-radius: 3px;
  font-family: var(--sci-mono);
  font-size: 8px;
}

.section-line {
  background: linear-gradient(90deg, rgba(181, 130, 42, 0.22), rgba(24, 127, 139, 0.09), transparent);
}

.section-subtitle {
  color: #a08e79;
  font-family: var(--sci-mono);
  font-size: 7px;
  letter-spacing: 0.05em;
}

/* =========================================================
   Cards
   ========================================================= */

.nav-card {
  color: #47413f;
  background:
    radial-gradient(circle at 12% 0%, rgba(255, 199, 116, 0.1), transparent 36%),
    linear-gradient(135deg, rgba(255, 253, 249, 0.97), rgba(252, 246, 237, 0.94));
  border: 1px solid rgba(58, 119, 120, 0.13);
  border-radius: 11px;
  box-shadow:
    0 5px 16px rgba(102, 74, 39, 0.055),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition:
    transform 0.3s var(--ease),
    box-shadow 0.3s var(--ease),
    border-color 0.24s ease,
    background-color 0.24s ease;
}

.nav-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 42px;
  height: 2px;
  background: linear-gradient(90deg, var(--sci-teal-bright), var(--sci-amber));
  border-radius: 0 0 2px 2px;
  opacity: 0.5;
  transform: none;
  transition: width 0.35s var(--ease), opacity 0.25s ease;
}

.nav-card::after {
  content: "";
  position: absolute;
  top: auto;
  right: 9px;
  bottom: 9px;
  width: 7px;
  height: 7px;
  background: transparent;
  border-right: 1px solid rgba(24, 127, 139, 0.28);
  border-bottom: 1px solid rgba(24, 127, 139, 0.28);
  border-radius: 0;
  opacity: 0.38;
  transition: opacity 0.22s ease, border-color 0.22s ease;
}

.nav-card:hover {
  background:
    radial-gradient(circle at 12% 0%, rgba(255, 198, 111, 0.2), transparent 40%),
    linear-gradient(135deg, #fffefa, #fdf7ed);
  border-color: rgba(24, 127, 139, 0.38);
  box-shadow:
    0 14px 30px rgba(102, 74, 39, 0.1),
    0 0 0 1px rgba(24, 127, 139, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
  transform: translateY(-2px);
}

.nav-card:hover::before {
  width: 100%;
  opacity: 1;
}

.nav-card:hover::after {
  opacity: 1;
  border-color: var(--sci-teal);
}

.nav-card:active {
  box-shadow: 0 4px 12px rgba(102, 74, 39, 0.07);
}

.app-icon {
  border-color: rgba(181, 130, 42, 0.1);
  border-radius: 12px;
  box-shadow:
    0 3px 9px rgba(102, 74, 39, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.nav-card:hover .app-icon {
  box-shadow:
    0 0 0 1px rgba(24, 127, 139, 0.18),
    0 4px 12px rgba(102, 74, 39, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.card-name {
  color: #403b3b;
  font-size: 12.5px;
  font-weight: 560;
  letter-spacing: 0.02em;
}

.nav-card:hover .card-name {
  color: #272427;
}

.new-badge {
  color: #8e641c;
  background: linear-gradient(135deg, #fff0ce, #f6d99a);
  border-color: rgba(181, 130, 42, 0.22);
  border-radius: 3px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35);
  font-family: var(--sci-mono);
  font-size: 6px;
  letter-spacing: 0.04em;
}

.card-open {
  color: #a39482;
}

.nav-card:hover .card-open {
  color: var(--sci-teal);
}

.icon-image--aimi {
  border-color: rgba(181, 130, 42, 0.22);
  box-shadow: 0 4px 10px rgba(132, 93, 33, 0.12);
}

/* =========================================================
   Empty state, footer, floating UI
   ========================================================= */

.empty-illustration {
  color: var(--sci-teal);
  background: linear-gradient(145deg, #e7f6f2, #f8eddc);
  border-color: rgba(24, 127, 139, 0.16);
  box-shadow: inset 0 0 24px rgba(255, 255, 255, 0.7);
}

.empty-state h2 {
  color: #443d3b;
}

.empty-state p {
  color: #968778;
}

.primary-button {
  color: #fffdf8;
  background: linear-gradient(135deg, #1e9aa4, #157a84);
  border: 1px solid rgba(19, 112, 120, 0.3);
  box-shadow:
    0 7px 16px rgba(24, 127, 139, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
  font-family: var(--sci-mono);
  font-size: 9px;
  letter-spacing: 0.06em;
}

.primary-button:hover {
  box-shadow:
    0 10px 22px rgba(24, 127, 139, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.site-footer {
  position: relative;
  border-top-color: rgba(181, 130, 42, 0.17);
}

.site-footer::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 50%;
  width: 170px;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(24, 127, 139, 0.55), rgba(216, 154, 56, 0.55), transparent);
  border-radius: 2px;
  transform: translateX(-50%);
}

.footer-main {
  color: #9f8f7e;
  font-family: var(--sci-mono);
  font-size: 8px;
  letter-spacing: 0.02em;
}

.footer-brand {
  color: #7e7368;
}

.footer-brand img {
  box-shadow: 0 2px 8px rgba(132, 93, 33, 0.12);
}

.footer-sep {
  background: rgba(181, 130, 42, 0.3);
}

.footer-heart {
  color: #9a8b7b;
}

.footer-heart svg {
  color: var(--sci-teal);
  fill: rgba(24, 127, 139, 0.1);
}

.footer-note,
.footer-credit {
  color: #b0a18e;
  font-family: var(--sci-mono);
  font-size: 7px;
  letter-spacing: 0.03em;
}

.footer-credit {
  margin: 3px 0 0;
  color: #b8a995;
  font-size: 6.5px;
}

/* =========================================================
   DeepSeek floating assistant (draggable)
   ========================================================= */

.floating-actions {
  right: 24px;
  bottom: 20px;
  gap: 3px;
  align-items: center;
}

.assistant-fab {
  --drag-x: 0px;
  --drag-y: 0px;
  position: relative;
  display: block;
  width: 88px;
  height: 92px;
  padding: 0;
  overflow: visible;
  color: inherit;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  cursor: grab;
  touch-action: none;
  transform: translate(var(--drag-x), var(--drag-y));
  transition: transform 0.2s var(--ease), filter 0.2s ease;
}

.assistant-fab::before,
.assistant-fab::after {
  display: none;
}

.assistant-fab:hover {
  transform: translate(var(--drag-x), calc(var(--drag-y) - 2px));
}

.assistant-fab:active,
.assistant-fab.is-dragging {
  cursor: grabbing;
  transition: none;
}

.assistant-halo {
  position: absolute;
  z-index: 0;
  top: 50%;
  left: 50%;
  width: 76px;
  height: 76px;
  background:
    radial-gradient(circle at 38% 30%, rgba(255, 255, 255, 0.9), transparent 24%),
    radial-gradient(circle, rgba(95, 222, 220, 0.36), rgba(255, 193, 106, 0.2) 62%, transparent 72%);
  border: 1px solid rgba(24, 127, 139, 0.2);
  border-radius: 50%;
  box-shadow:
    0 0 0 5px rgba(255, 252, 245, 0.42),
    0 8px 20px rgba(102, 74, 39, 0.13);
  transform: translate(-50%, -55%);
  pointer-events: none;
}

.assistant-avatar {
  position: relative;
  z-index: 1;
  display: block;
  width: 88px;
  height: auto;
  filter: drop-shadow(0 8px 12px rgba(83, 60, 32, 0.19));
  pointer-events: none;
  transition: transform 0.25s var(--ease);
  user-select: none;
  -webkit-user-drag: none;
}

.assistant-fab:hover .assistant-avatar {
  transform: translateY(-2px) scale(1.02);
}

.assistant-label {
  position: absolute;
  z-index: 2;
  bottom: -1px;
  left: 50%;
  padding: 3px 6px 2px;
  color: #fffdf8;
  background: rgba(51, 47, 61, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(65, 47, 28, 0.18);
  font-family: var(--sci-mono);
  font-size: 6px;
  letter-spacing: 0.06em;
  line-height: 1;
  white-space: nowrap;
  transform: translateX(-50%);
  pointer-events: none;
}

.assistant-tip {
  top: 50%;
  right: 96px;
  padding: 7px 9px;
  color: #74695f;
  background: rgba(255, 252, 246, 0.96);
  border-color: rgba(181, 130, 42, 0.2);
  box-shadow: 0 7px 18px rgba(102, 74, 39, 0.1);
  font-family: var(--sci-mono);
  font-size: 8px;
  letter-spacing: 0.02em;
}

.assistant-tip kbd {
  color: #9d8a6d;
  background: #fffdf8;
  border-color: rgba(181, 130, 42, 0.18);
}

.back-top {
  color: #7d7064;
  background: rgba(255, 252, 246, 0.94);
  border-color: rgba(181, 130, 42, 0.2);
  box-shadow: 0 5px 14px rgba(102, 74, 39, 0.08);
}

.back-top:hover {
  color: var(--sci-teal);
  border-color: rgba(24, 127, 139, 0.35);
  box-shadow: 0 7px 18px rgba(24, 127, 139, 0.1);
}

.back-top-ring {
  border-color: rgba(181, 130, 42, 0.15);
}

/* =========================================================
   Drawer & details
   ========================================================= */

.sidebar-scrim {
  background: rgba(73, 52, 27, 0.22);
  backdrop-filter: blur(3px);
}

.noscript {
  color: #5c4b31;
  background: #fff8ea;
  border-color: rgba(181, 130, 42, 0.22);
}

@media (max-width: 1120px) {
  .dial-stage {
    width: 204px;
    height: 204px;
  }

  .dial-node {
    transform: translate(-50%, -50%) rotate(var(--a)) translateY(-69px) rotate(calc(-1 * var(--a)));
  }

  .dial-core {
    width: 94px;
    height: 94px;
  }

  .dial-orbit {
    inset: 7px;
    -webkit-mask: radial-gradient(circle, transparent 0 86px, #000 87px 91px, transparent 92px);
    mask: radial-gradient(circle, transparent 0 86px, #000 87px 91px, transparent 92px);
  }
}

@media (max-width: 980px) {
  .sidebar {
    box-shadow:
      20px 0 50px rgba(92, 68, 34, 0.16),
      inset -1px 0 0 rgba(255, 255, 255, 0.55);
  }
}

@media (max-width: 720px) {
  .system-line {
    margin-bottom: 7px;
    font-size: 7px;
  }

  .system-mid {
    display: none;
  }

  .section-code {
    display: none;
  }

  .section-head h2 {
    font-size: 15px;
  }

  .footer-main {
    font-size: 7.5px;
  }

  .assistant-tip {
    display: none;
  }
}

@media (max-width: 640px) {
  .dial-stage {
    width: 194px;
    height: 194px;
  }

  .dial-node {
    width: 42px;
    height: 42px;
    transform: translate(-50%, -50%) rotate(var(--a)) translateY(-66px) rotate(calc(-1 * var(--a)));
  }

  .dial-core {
    width: 90px;
    height: 90px;
  }

  .dial-orbit {
    inset: 6px;
    -webkit-mask: radial-gradient(circle, transparent 0 82px, #000 83px 87px, transparent 88px);
    mask: radial-gradient(circle, transparent 0 82px, #000 83px 87px, transparent 88px);
  }

  .assistant-fab {
    width: 76px;
    height: 80px;
  }

  .assistant-avatar {
    width: 76px;
  }

  .assistant-halo {
    width: 66px;
    height: 66px;
  }

  .assistant-label {
    font-size: 5.5px;
  }
}

@media (max-width: 430px) {
  .system-time {
    font-size: 6.5px;
  }

  .card-name {
    font-size: 11.5px;
  }

  .footer-credit {
    padding: 0 20px;
    line-height: 1.5;
  }
}

/* =========================================================
   Motion
   ========================================================= */

@keyframes sysPulse {
  0%, 100% { opacity: 0.55; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.12); }
}

@keyframes scannerSweep {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .sys-dot,
  .scanner-sweep {
    animation: none !important;
  }
}
