:root {
  --ky-orange: #ff7a00;
  --ky-orange-soft: #fff0e1;
  --ky-black: #050505;
  --ky-ink: #111111;
  --ky-paper: #efeee8;
  --ky-white: #ffffff;
  --ky-muted: #66645f;
  --ky-line: #aaa8a0;
  --ky-line-dark: #343434;
  --ky-green: #129765;
  --ky-red: #c63e3e;
  --ky-yellow: #f2b230;
  --ky-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --ky-sans: Inter, "Arial Narrow", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  --ky-navy-950: #050505;
  --ky-navy-900: #0b0b0b;
  --ky-navy-800: #171717;
  --ky-blue-600: #b55200;
  --ky-blue-500: #ff7a00;
  --ky-gold-500: #ff7a00;
  --ky-gold-300: #ffad5c;
  --ky-ink-900: #111111;
  --ky-ink-700: #393834;
  --ky-ink-500: #6c6a64;
  --ky-surface: #ffffff;
  --ky-canvas: #efeee8;
  --ky-success: #129765;
  --ky-warning: #b66b00;
  --ky-danger: #c63e3e;
  --ky-radius-sm: 0;
  --ky-radius-md: 0;
  --ky-radius-lg: 0;
  --ky-shadow-sm: none;
  --ky-shadow-md: none;
}

html { color-scheme: light; background: var(--ky-paper); }

body.ky-ui {
  padding-top: 58px !important;
  background: var(--ky-paper) !important;
  color: var(--ky-ink) !important;
  font-family: var(--ky-sans) !important;
  -webkit-font-smoothing: antialiased;
}

body.ky-ui::before {
  content: "";
  position: fixed;
  z-index: 10002;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--ky-orange) 0 24%, #f0f0f0 24% 25%, #252525 25% 100%);
}

.ky-shellbar {
  position: fixed;
  z-index: 10000;
  inset: 0 0 auto 0;
  height: 58px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 4px max(18px, calc((100vw - 1440px) / 2)) 0;
  color: #fff;
  background: rgba(5, 5, 5, .985);
  border-bottom: 1px solid #3b3b3b;
  box-shadow: none;
}

.ky-shellbar__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  flex: 0 0 auto;
}

.ky-shellbar__mark {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 0;
  color: #000;
  font: 900 11px/1 var(--ky-mono);
  letter-spacing: .5px;
  background: var(--ky-orange);
}

.ky-shellbar__brand-copy { display: grid; gap: 1px; }
.ky-shellbar__brand-copy strong { font-size: 13px; letter-spacing: -.1px; }
.ky-shellbar__brand-copy small { color: #969696; font: 700 7px/1.2 var(--ky-mono); letter-spacing: 1.1px; }
.ky-shellbar__divider { width: 1px; height: 24px; background: #444; }
.ky-shellbar__module { color: #fff; font-size: 13px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ky-shellbar__status { margin-left: auto; display: inline-flex; align-items: center; gap: 7px; color: #aaa; font: 800 8px/1 var(--ky-mono); letter-spacing: .65px; }
.ky-shellbar__status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ky-green); }
.ky-shellbar__time { color: #ddd; font: 800 10px/1 var(--ky-mono); min-width: 70px; text-align: right; }
.ky-shellbar__actions { display: flex; align-items: center; gap: 8px; }
.ky-shellbar__home {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid var(--ky-orange);
  border-radius: 0;
  color: #000;
  background: var(--ky-orange);
  text-decoration: none;
  font: 900 9px/1 var(--ky-mono);
  letter-spacing: .45px;
  transition: none;
}
.ky-shellbar__home:hover { color: #fff; border-color: #fff; background: #111; }

body.ky-ui :where(button, a, input, select, textarea):focus-visible {
  outline: 3px solid rgba(255, 122, 0, .32) !important;
  outline-offset: 2px;
}

body.ky-ui :where(input, select, textarea) {
  border-radius: 0 !important;
  border-color: #aaa8a0 !important;
  background: #fff !important;
  color: #111 !important;
}

body.ky-ui :where(input, select, textarea):focus {
  border-color: var(--ky-orange) !important;
  box-shadow: inset 3px 0 0 var(--ky-orange) !important;
}

body.ky-ui :where(button, .btn, .primary, .secondary, .refresh-btn, .page-btn) {
  border-radius: 0 !important;
  box-shadow: none !important;
}

body.ky-ui :where(.btn-primary, .primary, .refresh-btn) {
  background: var(--ky-orange) !important;
  border-color: var(--ky-orange) !important;
  color: #000 !important;
  font-weight: 900 !important;
}

body.ky-ui :where(.btn-primary, .primary, .refresh-btn):hover {
  background: #111 !important;
  border-color: #111 !important;
  color: #fff !important;
  transform: none !important;
}

body.ky-ui :where(.card, .panel, .stat-card, .summary-card, .map-container, .chart-card, .table-container, .table-wrap) {
  border-radius: 0 !important;
  border-color: var(--ky-line) !important;
  box-shadow: none !important;
}

body.ky-ui :where(.card, .panel, .stat-card, .summary-card):hover { box-shadow: none !important; }

body.ky-ui > :where(.header, .topbar, header:not(.ky-shellbar)) {
  background: #080808 !important;
  border-bottom: 4px solid var(--ky-orange) !important;
  box-shadow: none !important;
}

body.ky-ui > :where(.header, .topbar, header:not(.ky-shellbar)) h1::before { content: none !important; }
body.ky-ui :where(.badge, .tag, .pill, .status-badge, .status-tag, .exchange-tag, .exchange-pill) { border-radius: 0 !important; }
body.ky-ui .site-footer { background: #050505 !important; color: #999 !important; border-color: #333 !important; opacity: 1 !important; }
body.ky-ui .site-footer a { color: #aaa !important; }
body.ky-ui .site-footer a:hover { color: var(--ky-orange) !important; }

body.ky-ui table { background: #fff !important; border-collapse: collapse !important; }
body.ky-ui table thead { background: #090909 !important; color: #fff !important; }
body.ky-ui table th { background: #090909 !important; color: #fff !important; border-color: #414141 !important; font: 800 10px/1.35 var(--ky-mono) !important; letter-spacing: .35px; }
body.ky-ui table td { border-color: #d3d1ca !important; }
body.ky-ui table tbody tr:hover { background: #fff2e6 !important; }

/* Project monitor and exchange measures. */
body.ky-route-monitor .header,
body.ky-route-punish .header { background: #080808 !important; border-bottom: 5px solid var(--ky-orange) !important; padding-top: 18px !important; padding-bottom: 18px !important; }
body.ky-route-monitor .header h1,
body.ky-route-punish .header h1 { font-weight: 900 !important; letter-spacing: -.55px !important; }
body.ky-route-monitor .summary-card,
body.ky-route-punish .summary-card { border: 1px solid var(--ky-line) !important; border-top: 4px solid #111 !important; background: #fff !important; }
body.ky-route-monitor .summary-card.rank-card,
body.ky-route-punish .summary-card.updated { border-top-color: var(--ky-orange) !important; }
body.ky-route-monitor .card-value,
body.ky-route-punish .card-value { color: #111 !important; font-family: var(--ky-mono) !important; }
body.ky-route-monitor .card-value.accent,
body.ky-route-punish .summary-card.updated .card-value { color: var(--ky-orange) !important; }
body.ky-route-monitor :where(.filter-tabs, .toolbar),
body.ky-route-punish :where(.exchange-tabs, .toolbar, .type-filter) { background: #fff !important; border-color: var(--ky-line) !important; }
body.ky-route-monitor .filter-tab,
body.ky-route-punish :where(.exchange-tab, .type-btn) { border-radius: 0 !important; }
body.ky-route-monitor .filter-tab.active,
body.ky-route-punish :where(.exchange-tab.active, .type-btn.active) { background: #111 !important; border-color: #111 !important; color: var(--ky-orange) !important; }
body.ky-route-monitor .table-container,
body.ky-route-punish .table-container { border: 1px solid var(--ky-line) !important; background: #fff !important; }
body.ky-route-monitor .exchange-tag,
body.ky-route-punish .exchange-pill { background: var(--ky-orange-soft) !important; color: #9a4300 !important; }

/* Tender app uses a fixed terminal-style navigation rail. */
body.ky-route-tender aside {
  top: 58px !important;
  height: calc(100vh - 58px) !important;
  background: #090909 !important;
  border-right: 1px solid #444 !important;
}
body.ky-route-tender aside .brand > span { border: 0 !important; border-radius: 0 !important; color: #000 !important; background: var(--ky-orange) !important; }
body.ky-route-tender aside nav button { border-radius: 0 !important; border-left: 3px solid transparent !important; }
body.ky-route-tender aside nav button.active,
body.ky-route-tender aside nav button:hover { background: var(--ky-orange) !important; border-left-color: #fff !important; color: #000 !important; }
body.ky-route-tender main > header { padding-bottom: 16px !important; border-bottom: 1px solid #8e8c85 !important; }
body.ky-route-tender .eyebrow { color: var(--ky-orange) !important; font-family: var(--ky-mono) !important; }
body.ky-route-tender .metrics article { border-radius: 0 !important; border: 1px solid var(--ky-line) !important; border-top: 4px solid #111 !important; box-shadow: none !important; }
body.ky-route-tender .metrics article:first-child { border-top-color: var(--ky-orange) !important; }
body.ky-route-tender .metrics strong { color: #111 !important; font-family: var(--ky-mono) !important; }
body.ky-route-tender .panel { border: 1px solid var(--ky-line) !important; }
body.ky-route-tender .card { border-color: #c7c5be !important; }
body.ky-route-tender dialog { border-radius: 0 !important; border: 2px solid #111 !important; }
body.ky-route-tender .badge { background: #e6e4de !important; color: #444 !important; }

/* Ministry of Finance penalties. */
body.ky-route-mof-penalties { background: var(--ky-paper) !important; }
body.ky-route-mof-penalties .topbar { height: 42px !important; background: #151515 !important; border-bottom: 1px solid #454545 !important; }
body.ky-route-mof-penalties .topbar .brand { display: none !important; }
body.ky-route-mof-penalties .topbar :where(.back, .source) { color: #bbb !important; font: 800 9px/1 var(--ky-mono) !important; letter-spacing: .35px; }
body.ky-route-mof-penalties .hero { height: 190px !important; color: #fff !important; background-color: #090909 !important; background-image: linear-gradient(#1c1c1c 1px,transparent 1px),linear-gradient(90deg,#1c1c1c 1px,transparent 1px) !important; background-size: 72px 72px !important; }
body.ky-route-mof-penalties .hero h1 { color: #fff !important; font-size: 34px !important; font-weight: 900 !important; letter-spacing: -1.3px !important; }
body.ky-route-mof-penalties .eyebrow { color: var(--ky-orange) !important; font-family: var(--ky-mono) !important; }
body.ky-route-mof-penalties .hero-tags span { border-radius: 0 !important; border-color: #555 !important; }
body.ky-route-mof-penalties .health { border-radius: 0 !important; background: #151515 !important; border-color: #555 !important; }
body.ky-route-mof-penalties .metrics article { border-radius: 0 !important; border-top: 4px solid #111 !important; box-shadow: none !important; }
body.ky-route-mof-penalties .metrics article:first-child { border-top-color: var(--ky-orange) !important; }
body.ky-route-mof-penalties .metrics strong { color: #111 !important; font-family: var(--ky-mono) !important; }
body.ky-route-mof-penalties .panel { border-radius: 0 !important; border: 1px solid var(--ky-line) !important; box-shadow: none !important; }
body.ky-route-mof-penalties .pill { background: var(--ky-orange-soft) !important; color: #934100 !important; }

/* Ranking. */
body.ky-route-rank { background: var(--ky-paper) !important; color: var(--ky-ink) !important; }
body.ky-route-rank > header { top: 58px !important; background: #080808 !important; border-bottom: 5px solid var(--ky-orange) !important; }
body.ky-route-rank > header h1 { color: #fff !important; font-weight: 900 !important; }
body.ky-route-rank > header .badge { background: var(--ky-orange) !important; color: #000 !important; }
body.ky-route-rank :where(.filter-bar, .stat-card, .rank-toggle button, .rank-table, .xm-panel, .modal-content) { background: #fff !important; color: #111 !important; border-color: var(--ky-line) !important; }
body.ky-route-rank .filter-bar { border-bottom: 1px solid var(--ky-line) !important; }
body.ky-route-rank .stat-card { border-radius: 0 !important; border-top: 4px solid #111 !important; }
body.ky-route-rank .stat-card.gold { border-top-color: var(--ky-orange) !important; }
body.ky-route-rank .stat-card .value { color: #111 !important; font-family: var(--ky-mono) !important; }
body.ky-route-rank .stat-card.gold .value { color: var(--ky-orange) !important; }
body.ky-route-rank .rank-toggle button.active { background: #111 !important; border-color: #111 !important; color: var(--ky-orange) !important; }
body.ky-route-rank .rank-table tbody tr:hover { background: #fff2e6 !important; }
body.ky-route-rank :where(.bar-fill, .share-bar-fill) { background: var(--ky-orange) !important; }
body.ky-route-rank .modal { border-radius: 0 !important; }

/* Yield chart. */
body.ky-route-yield { background: var(--ky-paper) !important; color: var(--ky-ink) !important; }
body.ky-route-yield .header { background: #080808 !important; border-bottom: 5px solid var(--ky-orange) !important; }
body.ky-route-yield .header h1 { color: #fff !important; font-weight: 900 !important; }
body.ky-route-yield .header h1::before { background: var(--ky-orange) !important; }
body.ky-route-yield :where(.symbol-bar, .toolbar) { background: #fff !important; border-color: var(--ky-line) !important; }
body.ky-route-yield :where(.symbol-bar-title, .toolbar label, .update-info, .subtitle) { color: var(--ky-muted) !important; }
body.ky-route-yield :where(.symbol-item, .toolbar input, .toolbar select, .range-btn) { border-radius: 0 !important; background: #f7f6f1 !important; color: #333 !important; border-color: var(--ky-line) !important; }
body.ky-route-yield .symbol-item em { color: #111 !important; }
body.ky-route-yield :where(.symbol-item.active, .range-btn.active) { background: #111 !important; border-color: #111 !important; color: var(--ky-orange) !important; }
body.ky-route-yield .symbol-item.active em { color: var(--ky-orange) !important; }
body.ky-route-yield :where(.chart-card, .chart-container, .info-card, .stat-card, .data-table-wrap) { border-radius: 0 !important; background: #fff !important; color: #111 !important; border-color: var(--ky-line) !important; box-shadow: none !important; }
body.ky-route-yield .stat-card { border-top: 4px solid #111 !important; }
body.ky-route-yield .stat-card:first-child { border-top-color: var(--ky-orange) !important; }
body.ky-route-yield .stat-card .value { color: #111 !important; font-family: var(--ky-mono) !important; }

/* CSRC measures. */
body.ky-route-csrc-measures > header { background: #080808 !important; border-bottom: 5px solid var(--ky-orange) !important; }
body.ky-route-csrc-measures > header h1 { font-weight: 900 !important; letter-spacing: -.5px !important; }
body.ky-route-csrc-measures .stats-bar { background: #fff !important; border-bottom: 1px solid var(--ky-line) !important; }
body.ky-route-csrc-measures .stat-item { border-left: 4px solid #111 !important; padding-left: 12px !important; }
body.ky-route-csrc-measures .stat-item:first-child { border-left-color: var(--ky-orange) !important; }
body.ky-route-csrc-measures .stat-item .num { color: #111 !important; font-family: var(--ky-mono) !important; }
body.ky-route-csrc-measures .search-section,
body.ky-route-csrc-measures .region-tabs { background: #fff !important; border-color: var(--ky-line) !important; }
body.ky-route-csrc-measures .region-tab { border-radius: 0 !important; }
body.ky-route-csrc-measures .region-tab.active { color: #111 !important; border-bottom-color: var(--ky-orange) !important; }
body.ky-route-csrc-measures .badge { background: var(--ky-orange-soft) !important; color: #944100 !important; }

/* Sensitive-word checker. */
body.ky-route-sensitive > header { background: #080808 !important; border-bottom: 5px solid var(--ky-orange) !important; }
body.ky-route-sensitive > header h1 { font-weight: 900 !important; }
body.ky-route-sensitive .card { border: 1px solid var(--ky-line) !important; border-radius: 0 !important; box-shadow: none !important; }
body.ky-route-sensitive .card-head { color: #111 !important; border-bottom: 1px solid var(--ky-line) !important; border-left: 5px solid var(--ky-orange) !important; }
body.ky-route-sensitive .upload-zone { border-radius: 0 !important; border-color: #777 !important; background: #f8f7f2 !important; }
body.ky-route-sensitive .upload-zone:hover { border-color: var(--ky-orange) !important; background: var(--ky-orange-soft) !important; }
body.ky-route-sensitive .summary-bar .stat { border-radius: 0 !important; border: 1px solid var(--ky-line) !important; background: #f7f6f1 !important; }
body.ky-route-sensitive .result-file,
body.ky-route-sensitive .finding { border-radius: 0 !important; }
body.ky-route-sensitive .finding { border-left-color: var(--ky-orange) !important; }

/* Document generator. */
body.ky-route-docgen .topbar { background: #080808 !important; border-bottom: 5px solid var(--ky-orange) !important; }
body.ky-route-docgen .topbar h1 { font-weight: 900 !important; }
body.ky-route-docgen .card { border-radius: 0 !important; border: 1px solid var(--ky-line) !important; border-left: 5px solid #111 !important; box-shadow: none !important; }
body.ky-route-docgen a.card:hover { border-color: var(--ky-orange) !important; border-left-color: var(--ky-orange) !important; transform: none !important; background: var(--ky-orange-soft) !important; }
body.ky-route-docgen .card-icon { display: none !important; }
body.ky-route-docgen .tag { border-radius: 0 !important; background: var(--ky-orange-soft) !important; color: #934100 !important; }
body.ky-route-docgen :where(.card-header, .section-title) { border-color: var(--ky-line) !important; }
body.ky-route-docgen .section-title { border-left: 4px solid var(--ky-orange) !important; padding-left: 9px !important; }

/* Hidden-debt React app and Tailwind utility overrides. */
body.ky-route-debt { background: var(--ky-paper) !important; }
body.ky-route-debt [class*="bg-gradient-to-r"] { background: #080808 !important; border-bottom: 5px solid var(--ky-orange) !important; }
body.ky-route-debt :where(.rounded-lg, .rounded-xl, .rounded-md, .rounded) { border-radius: 0 !important; }
body.ky-route-debt [class*="shadow"] { box-shadow: none !important; }
body.ky-route-debt [class*="bg-gray-50"] { background: var(--ky-paper) !important; }
body.ky-route-debt [class*="bg-blue-50"],
body.ky-route-debt [class*="bg-blue-100"],
body.ky-route-debt [class*="bg-blue-200"] { background: var(--ky-orange-soft) !important; }
body.ky-route-debt [class*="text-blue-"] { color: #934100 !important; }
body.ky-route-debt [class*="border-blue-"] { border-color: var(--ky-orange) !important; }
body.ky-route-debt [class*="bg-blue-600"],
body.ky-route-debt [class*="bg-blue-700"],
body.ky-route-debt [class*="bg-blue-800"] { background: #111 !important; color: #fff !important; }
body.ky-route-debt table th { background: #090909 !important; color: #fff !important; }
body.ky-route-debt button { border-radius: 0 !important; }

@media (max-width: 800px) {
  .ky-shellbar { height: 54px; padding: 4px 12px 0; gap: 9px; }
  body.ky-ui { padding-top: 54px !important; }
  .ky-shellbar__brand-copy small, .ky-shellbar__divider, .ky-shellbar__status { display: none; }
  .ky-shellbar__module { font-size: 11px; }
  .ky-shellbar__time { margin-left: auto; font-size: 9px; min-width: 54px; }
  .ky-shellbar__home { padding: 0 8px; min-height: 28px; }
  body.ky-route-tender aside { top: 54px !important; height: calc(100vh - 54px) !important; }
  body.ky-route-rank > header { top: 54px !important; }
  body.ky-route-mof-penalties .hero { height: 280px !important; }
}

@media (max-width: 520px) {
  .ky-shellbar__brand-copy { display: none; }
  .ky-shellbar__module { max-width: 110px; }
  .ky-shellbar__time { display: none; }
  .ky-shellbar__actions { margin-left: auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
