@import url("./framework.css");

/* App-specific launcher and tool styles (shared primitives live in framework.css).
 * Skins and user overrides are linked from HTML so they can load after this file.
 */

:root {
  --bg: #090b0d;
  --panel: #101419;
  --panel-2: #0d1115;
  --panel-3: #0b0f13;
  --line: #202730;
  --line-soft: #171d25;
  --line-strong: #2d3743;
  --text: #e7edf4;
  --text-soft: #b4bfcb;
  --text-dim: #7f8a98;
  --accent: #6ecbff;
  --accent-2: #84f3cb;
  --warn: #ffd37a;
  --red: #ff7f86;
  --green: #79dba3;
  --amber: #ffcf72;
  --shadow: 0 18px 38px rgba(0, 0, 0, 0.28);
  --radius: 12px;
  --radius-sm: 8px;
  --gutter: 12px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background:
    radial-gradient(circle at 5% 0%, rgba(110, 203, 255, 0.07), transparent 30%),
    radial-gradient(circle at 100% 0%, rgba(132, 243, 203, 0.05), transparent 28%),
    linear-gradient(180deg, #090b0d 0%, #07090b 100%);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.4;
}

code,
kbd,
.mono,
.tools-table,
.search-wrap input,
.quick-list,
.stack-list,
.meta-key,
.path-pill {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.ui-icon {
  width: 15px;
  height: 15px;
  display: inline-block;
  flex: 0 0 auto;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.05;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: middle;
  opacity: 0.96;
}

.ui-icon.icon-xs {
  width: 20px;
  height: 20px;
  stroke-width: 2.15;
}

.ui-icon.icon-sm {
  width: 14px;
  height: 14px;
}

.icon-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.workspace {
  width: min(1840px, calc(100% - 12px));
  margin: 6px auto;
}

.app-frame {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  align-content: start;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(15, 19, 24, 0.96), rgba(12, 16, 20, 0.96));
  box-shadow: var(--shadow);
  overflow: hidden;
}

.chrome {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 9px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background:
    linear-gradient(180deg, rgba(17, 22, 28, 0.98), rgba(14, 18, 23, 0.98));
}

.chrome-left,
.chrome-center,
.chrome-right {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.chrome-center {
  justify-content: center;
  flex-wrap: wrap;
}

.chrome-right {
  justify-content: flex-end;
  color: var(--text-dim);
}

.traffic {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding-right: 4px;
}

.traffic .dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.35);
}

.traffic .dot.red {
  background: var(--red);
}

.traffic .dot.amber {
  background: var(--amber);
}

.traffic .dot.green {
  background: var(--green);
}

.project-id {
  display: inline-grid;
  gap: 1px;
  align-items: start;
  min-width: 0;
}

.project-name {
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.05;
}

.project-sep,
.project-mode {
  color: var(--text-dim);
}

.project-mode {
  text-transform: none;
  font-size: 12px;
  line-height: 1.05;
}

.path-pill {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  max-width: 100%;
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
  white-space: nowrap;
}

.today-label {
  min-width: 0;
  color: var(--text-soft);
}

.today-label .today-label-inner {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.today-label .ui-icon {
  opacity: 1;
}

.today-label.is-day .ui-icon {
  color: #ffd37a;
}

.today-label.is-night .ui-icon {
  color: #b4c6ff;
}

.command-deck {
  margin: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(14, 18, 23, 0.98), rgba(12, 15, 19, 0.96));
  padding: 10px;
  display: grid;
  gap: 10px;
}

.command-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: end;
}

.eyebrow {
  margin: 0;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 11px;
  font-weight: 700;
}

.command-head h1 {
  margin: 2px 0 0;
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.hint-cluster {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.hint-chip {
  border: 1px solid var(--line);
  background: var(--panel-3);
  color: var(--text-dim);
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 12px;
}

.search-wrap {
  display: block;
}

.command-input {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line-strong);
  background: #0a0d11;
  border-radius: 10px;
  padding: 6px 8px;
}

.command-input:focus-within {
  border-color: rgba(110, 203, 255, 0.34);
  box-shadow: 0 0 0 3px rgba(110, 203, 255, 0.09);
}

.prompt {
  color: var(--accent-2);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-weight: 700;
  padding-left: 2px;
}

.search-wrap input {
  width: 100%;
  background: transparent;
  border: 0;
  outline: none;
  color: var(--text);
  font-size: 16px;
  padding: 4px 0;
  height: 35px;
}

.search-wrap input::placeholder {
  color: var(--text-dim);
}

.deck-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: start;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  appearance: none;
  border: 1px solid var(--line-strong);
  background: var(--panel-3);
  color: var(--text-soft);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  cursor: pointer;
  letter-spacing: 0.01em;
}

.chip:hover {
  border-color: #405062;
  color: var(--text);
}

.chip.active {
  background: rgba(110, 203, 255, 0.08);
  border-color: rgba(110, 203, 255, 0.24);
  color: #bfe9ff;
}

.toggle-row-group {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.toggle-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  background: var(--panel-3);
  color: var(--text-soft);
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  cursor: pointer;
}

.toggle-row input {
  margin: 0;
}

.ghost-btn,
.action-btn {
  appearance: none;
  background: var(--panel-3);
  border: 1px solid var(--line-strong);
  color: var(--text-soft);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12px;
  cursor: pointer;
}

.ghost-btn .icon-label,
.action-btn .icon-label {
  gap: 5px;
}

.ghost-btn .ui-icon,
.action-btn .ui-icon {
  color: currentColor;
  opacity: 0.82;
}

.ghost-btn:hover,
.action-btn:hover {
  border-color: #415265;
  color: var(--text);
}

.ghost-btn:hover .ui-icon,
.action-btn:hover .ui-icon {
  color: currentColor;
  opacity: 0.95;
}

.ghost-btn-small {
  padding: 4px 7px;
  font-size: 11px;
}

.status-strip {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
  color: var(--text-dim);
  font-size: 12px;
}

#resultsCount {
  color: var(--accent-2);
  white-space: nowrap;
}

#statusHint {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-grid {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  grid-template-areas: "sidebar results";
  gap: 12px;
  padding: 0 10px 10px;
  align-items: start;
  align-content: start;
  position: relative;
}

.sidebar {
  grid-area: sidebar;
  display: grid;
  gap: 10px;
  position: sticky;
  top: 8px;
}

.panel,
.table-panel {
  background: linear-gradient(180deg, rgba(14, 18, 23, 0.98), rgba(11, 15, 19, 0.96));
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius);
}

.panel {
  padding: 10px;
  display: grid;
  gap: 8px;
}

.compact-panel {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.01);
}

.workspace-grid[data-view="cards"] {
  grid-template-columns: 320px minmax(0, 1fr);
  grid-template-areas: "sidebar results";
  justify-items: stretch;
}

.workspace-grid[data-view="cards"] .table-panel {
  grid-area: results;
  width: 100%;
  max-width: none;
  min-height: 560px;
}

.workspace-grid[data-view="cards"] .sidebar .is-optional-in-cards {
  display: none;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.panel-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.panel-head h2 {
  margin: 0;
  font-size: 13px;
  letter-spacing: 0.02em;
}

.panel-title {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.panel-title .ui-icon {
  color: #a7d8ef;
  opacity: 0.9;
}

.tiny {
  color: var(--text-dim);
  font-size: 12px;
}

.quick-list,
.stack-list,
.meta-list,
.keymap-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.quick-list,
.stack-list {
  display: grid;
  gap: 6px;
}

.quick-list li,
.stack-list li {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(9, 12, 16, 0.9);
}

.quick-item-btn,
.recent-item-btn {
  width: 100%;
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 7px;
  text-align: left;
  cursor: pointer;
  display: grid;
  gap: 4px;
}

.quick-item-btn:hover,
.recent-item-btn:hover {
  background: rgba(110, 203, 255, 0.04);
}

.quick-line,
.recent-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.quick-line strong,
.recent-line strong {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}

.quick-line strong .ui-icon,
.recent-line strong .ui-icon {
  color: #a8b6c6;
  opacity: 0.9;
}

.subtle-line {
  color: var(--text-dim);
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.path-chip {
  border: 1px solid rgba(132, 243, 203, 0.16);
  background: rgba(132, 243, 203, 0.05);
  color: var(--accent-2);
  border-radius: 999px;
  padding: 2px 6px;
  font-size: 11px;
  white-space: nowrap;
}

.empty-list {
  color: var(--text-dim);
  font-size: 12px;
  padding: 2px 0;
}

.meta-list {
  display: grid;
  gap: 6px;
}

.meta-list li {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  border: 1px solid var(--line);
  background: rgba(9, 12, 16, 0.88);
  border-radius: 8px;
  padding: 7px;
}

.meta-key {
  color: var(--text-dim);
  font-size: 11px;
  text-transform: lowercase;
}

.meta-list code,
.note-list code,
.tool-panel code,
.alias-card code {
  color: var(--text);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 2px 6px;
  font-size: 12px;
  width: fit-content;
}

.keymap-list {
  display: grid;
  gap: 6px;
}

.keymap-list li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--line);
  background: rgba(9, 12, 16, 0.88);
  border-radius: 8px;
  padding: 6px 7px;
  color: var(--text-soft);
  font-size: 12px;
}

.shortcuts-panel {
  border-style: solid;
  position: fixed;
  z-index: 80;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  width: min(640px, calc(100vw - 24px));
  max-height: min(80vh, 680px);
  overflow: auto;
  margin: 0 !important;
  overscroll-behavior: contain;
}

.shortcuts-panel .keymap-list {
  gap: 7px;
}

.shortcuts-panel .panel-head {
  position: sticky;
  top: 0;
  z-index: 1;
}

.shortcuts-panel[hidden] {
  display: none !important;
}

.shortcuts-overlay {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(6, 8, 11, 0.68);
}

.shortcuts-overlay[hidden] {
  display: none !important;
}

body.dashboard-page.shortcuts-open {
  overflow: hidden;
}

.keymap-list li > span {
  min-width: 0;
}

kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  padding: 2px 6px;
  border-radius: 6px;
  border: 1px solid var(--line-strong);
  background: #0b0f13;
  color: var(--text);
  font-size: 11px;
  line-height: 1.2;
}

.keymap-list kbd + kbd {
  margin-left: -2px;
}

.table-panel {
  grid-area: results;
  min-width: 0;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.table-head {
  padding: 10px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(17, 22, 28, 0.92), rgba(14, 18, 23, 0.92));
  align-items: start;
}

.table-head-actions {
  display: grid;
  gap: 7px;
  justify-items: end;
}

.table-controls-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--text-dim);
  font-size: 12px;
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.legend .dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.pinned-dot {
  background: rgba(255, 211, 122, 0.6);
}

.recent-dot {
  background: rgba(132, 243, 203, 0.55);
}

.alias-dot {
  background: rgba(110, 203, 255, 0.55);
}

.view-switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 999px;
  background: rgba(8, 11, 15, 0.78);
}

.column-menu {
  position: relative;
}

.column-menu > summary {
  list-style: none;
}

.column-menu > summary::-webkit-details-marker {
  display: none;
}

.column-menu > summary.ghost-btn {
  display: inline-flex;
  align-items: center;
}

.column-menu[open] > summary {
  border-color: rgba(110, 203, 255, 0.22);
  background: rgba(110, 203, 255, 0.05);
  color: #c4ecff;
}

.column-menu[open] > summary .ui-icon {
  color: currentColor;
  opacity: 0.95;
}

.column-menu-panel {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 20;
  width: min(320px, calc(100vw - 32px));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(13, 17, 22, 0.98), rgba(10, 13, 17, 0.98));
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.3);
  padding: 8px;
  display: grid;
  gap: 8px;
}

.column-menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.column-menu-head strong {
  font-size: 12px;
  letter-spacing: 0.01em;
}

.column-checklist {
  display: grid;
  gap: 5px;
  max-height: 260px;
  overflow: auto;
  padding-right: 2px;
}

.column-check-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.015);
  padding: 6px 7px;
  cursor: pointer;
}

.column-check-item:hover {
  border-color: rgba(110, 203, 255, 0.14);
}

.column-check-item input {
  margin: 0;
}

.column-check-main {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  color: var(--text-soft);
  font-size: 12px;
}

.column-check-main .ui-icon {
  color: rgba(255, 255, 255, 0.65);
}

.column-check-meta {
  color: var(--text-dim);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.column-check-item.is-locked {
  background: rgba(132, 243, 203, 0.03);
  border-color: rgba(132, 243, 203, 0.1);
}

.column-check-item.is-locked .column-check-meta {
  color: #9fddcd;
}

.column-menu-actions {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  border-top: 1px dashed rgba(255, 255, 255, 0.06);
  padding-top: 7px;
}

.view-switch .ghost-btn {
  border-radius: 999px;
  border-color: transparent;
  background: transparent;
  color: var(--text-dim);
  padding: 4px 10px;
}

.view-switch .ghost-btn .ui-icon {
  color: currentColor;
  opacity: 0.9;
}

.view-switch .ghost-btn[aria-pressed="true"] {
  border-color: rgba(110, 203, 255, 0.22);
  background: rgba(110, 203, 255, 0.08);
  color: #c4ecff;
}

.workspace-grid[data-view="cards"] .table-head .legend {
  opacity: 0.85;
}

.workspace-grid[data-view="cards"] .table-head {
  padding-bottom: 8px;
}

.table-scroll {
  overflow: auto;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.008), rgba(255, 255, 255, 0));
}

.tools-table {
  width: 100%;
  min-width: var(--table-min-width, 1040px);
  border-collapse: collapse;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.tools-table [data-col].is-col-hidden {
  display: none;
}

.tools-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  text-align: left;
  padding: 8px 10px;
  background: #11161c;
  color: var(--text-dim);
  border-bottom: 1px solid var(--line);
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.tools-table tbody tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.035);
}

.tools-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.01);
}

.tools-table tbody tr:hover {
  background: rgba(110, 203, 255, 0.03);
}

.tools-table tbody tr.selected {
  background:
    linear-gradient(90deg, rgba(110, 203, 255, 0.08), rgba(110, 203, 255, 0.02));
  box-shadow: inset 2px 0 0 rgba(110, 203, 255, 0.6);
}

.tools-table td {
  padding: 8px 10px;
  vertical-align: top;
}

.row-index {
  width: 44px;
  color: var(--text-dim);
}

.index-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #0c1014;
  color: var(--text-dim);
  padding: 2px 4px;
}

.index-badge.hotkey {
  border-color: rgba(110, 203, 255, 0.2);
  color: #bdeaff;
}

.tool-name-cell {
  min-width: 250px;
}

.tool-name-wrap {
  display: grid;
  gap: 3px;
}

.tool-title-line {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.tool-link {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tool-link:hover,
.tool-link:focus-visible {
  color: #c7eeff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.tool-link .ui-icon {
  color: #9ecfe6;
  opacity: 0.9;
}

.tool-desc {
  color: var(--text-soft);
  font-size: 12px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.015);
  color: var(--text-dim);
  border-radius: 999px;
  padding: 1px 6px;
  font-size: 10px;
  letter-spacing: 0.05em;
}

.status-pill.pinned {
  border-color: rgba(255, 211, 122, 0.2);
  color: #ffd98c;
}

.status-pill.recent {
  border-color: rgba(132, 243, 203, 0.18);
  color: #aaf7e0;
}

.alias-link,
.path-link {
  color: var(--accent-2);
  text-decoration: none;
  white-space: nowrap;
}

.alias-link:hover,
.alias-link:focus-visible,
.path-link:hover,
.path-link:focus-visible {
  color: #c5ffe9;
  text-decoration: underline;
}

.alias-link::before {
  content: "/";
  color: var(--accent);
  margin-right: 2px;
}

.category-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--line);
  background: #0d1116;
  color: var(--text-soft);
  border-radius: 999px;
  padding: 1px 7px;
  font-size: 11px;
  text-transform: lowercase;
}

.category-chip .ui-icon {
  width: 13px;
  height: 13px;
  color: #9ec0d4;
  opacity: 0.92;
}

.tags-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  max-width: 230px;
}

.tag {
  border: 1px solid rgba(110, 203, 255, 0.12);
  background: rgba(110, 203, 255, 0.03);
  color: #aedff5;
  border-radius: 999px;
  padding: 1px 6px;
  font-size: 11px;
  white-space: nowrap;
}

.actions-cell {
  min-width: 248px;
}

.actions-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.action-btn {
  padding: 4px 8px;
  font-size: 11px;
  border-radius: 7px;
}

.action-btn.pin-active {
  border-color: rgba(255, 211, 122, 0.22);
  color: #ffd98c;
}

.action-btn.copy-ok {
  border-color: rgba(132, 243, 203, 0.22);
  color: #aaf7e0;
}

.action-btn.copy-ok .ui-icon {
  color: #aaf7e0;
  opacity: 1;
}

.table-panel[data-view="cards"] .table-scroll {
  display: none;
}

.table-panel[data-view="cards"] .tools-card-grid {
  display: grid;
}

.table-panel[data-view="table"] .tools-card-grid {
  display: none;
}

.tools-card-grid {
  padding: 12px;
  display: none;
  gap: 12px;
  width: 100%;
  grid-template-columns: repeat(auto-fit, minmax(390px, 1fr));
  align-content: start;
  min-height: 0;
  overflow: auto;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.008), rgba(255, 255, 255, 0));
}

.tool-card {
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(12, 16, 20, 0.92), rgba(9, 12, 16, 0.9));
  padding: 11px 12px;
  display: grid;
  gap: 10px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.01),
    0 8px 24px rgba(0, 0, 0, 0.12);
}

.tool-card:hover {
  border-color: rgba(110, 203, 255, 0.14);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.01),
    0 10px 28px rgba(0, 0, 0, 0.16);
}

.tool-card.selected {
  border-color: rgba(110, 203, 255, 0.26);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.01),
    inset 0 0 0 1px rgba(110, 203, 255, 0.1);
  background:
    linear-gradient(180deg, rgba(16, 22, 27, 0.98), rgba(10, 14, 18, 0.96));
}

.tool-card-top {
  display: grid;
  gap: 6px;
}

.tool-card-headline {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}

.tool-card-title-block {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.tool-card-title-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
}

.tool-card-title {
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.tool-card-title:hover,
.tool-card-title:focus-visible {
  color: #c7eeff;
  text-decoration: underline;
}

.tool-card-title .ui-icon {
  color: #9fd2ea;
  opacity: 0.92;
}

.tool-card-desc {
  color: #bcc6d2;
  font-size: 13px;
  line-height: 1.42;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tool-card-meta {
  display: grid;
  gap: 6px;
}

.tool-card-line {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 1rem;
  align-items: anchor-center;
}

.tool-card-key {
  color: var(--text-dim);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.tool-card-key .ui-icon {
  color: rgba(255, 255, 255, 0.58);
  opacity: 0.88;
}

.tool-card-line a {
  color: var(--accent-2);
  text-decoration: none;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tool-card-line a:hover,
.tool-card-line a:focus-visible {
  text-decoration: underline;
}

.tool-card-line a code {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tool-card-line.source-line a code {
  color: var(--text-soft);
  opacity: 0.92;
}

.tool-card-foot {
  display: grid;
  gap: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding-top: 8px;
}

.tool-card-strip {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.tool-card .tags-wrap {
  max-width: none;
  row-gap: 5px;
}

.tool-card .actions-wrap {
  gap: 6px;
  justify-content: flex-start;
}

.tool-card .actions-wrap .action-btn {
  flex: 0 0 auto;
  padding: 5px 9px;
}

.tool-card .actions-wrap .action-btn.open-primary {
  border-color: rgba(110, 203, 255, 0.22);
  color: #c7eeff;
  background: rgba(110, 203, 255, 0.06);
}

.tool-card .actions-wrap .action-btn.open-primary:hover {
  border-color: rgba(110, 203, 255, 0.34);
}

.tool-card .actions-wrap .action-btn .ui-icon {
  opacity: 0.9;
}

.tool-card .actions-wrap .action-btn.open-primary .ui-icon {
  color: #bdeaff;
  opacity: 1;
}

.tool-card .tag {
  color: #9fcbe2;
  border-color: rgba(110, 203, 255, 0.08);
  background: rgba(110, 203, 255, 0.02);
}

.tool-card .tag.tag-muted {
  color: var(--text-dim);
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
}

.empty-state {
  margin: 0;
  border-top: 1px solid var(--line);
  padding: 10px;
  color: var(--text-dim);
  font-size: 12px;
}

.is-hidden {
  display: none !important;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid rgba(110, 203, 255, 0.4);
  outline-offset: 2px;
}

/* Placeholder tool pages (canonical) */
.tool-shell-page {
  min-height: 100vh;
  padding: 12px;
  display: grid;
  place-items: center;
}

.tool-shell {
  width: min(980px, 100%);
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(15, 19, 24, 0.96), rgba(11, 15, 19, 0.96));
  box-shadow: var(--shadow);
  padding: 10px;
}

.tool-shell header {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: start;
}

.tool-shell h1 {
  margin: 2px 0 0;
  font-size: clamp(18px, 2vw, 24px);
  letter-spacing: -0.02em;
}

.tool-shell p {
  margin: 0;
  color: var(--text-soft);
}

.back-link {
  display: inline-flex;
  align-items: center;
  height: fit-content;
  color: var(--accent);
  text-decoration: none;
  border: 1px solid rgba(110, 203, 255, 0.18);
  background: rgba(110, 203, 255, 0.03);
  border-radius: 8px;
  padding: 6px 10px;
  white-space: nowrap;
}

.back-link:hover,
.back-link:focus-visible {
  color: #c7eeff;
  text-decoration: underline;
}

.tool-shell-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 10px;
}

.tool-panel {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(9, 12, 16, 0.92);
  padding: 10px;
  display: grid;
  gap: 7px;
}

.tool-panel h2 {
  margin: 0;
  font-size: 13px;
}

.tool-panel ul {
  margin: 0;
  padding-left: 16px;
  display: grid;
  gap: 5px;
  color: var(--text-soft);
  font-size: 13px;
}

.code-chip {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  color: var(--accent-2);
  border: 1px solid rgba(132, 243, 203, 0.14);
  background: rgba(132, 243, 203, 0.05);
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
}

/* Alias pages */
.alias-shell-page {
  min-height: 100vh;
  padding: 12px;
  display: grid;
  place-items: center;
}

.alias-card {
  width: min(760px, 100%);
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(15, 19, 24, 0.96), rgba(11, 15, 19, 0.96));
  box-shadow: var(--shadow);
  padding: 10px;
}

.alias-card h1 {
  margin: 0;
  font-size: 16px;
}

.alias-card p {
  margin: 0;
  color: var(--text-soft);
}

.alias-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.alias-card .cell {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(9, 12, 16, 0.92);
  padding: 8px;
  display: grid;
  gap: 4px;
}

.alias-card .label {
  color: var(--text-dim);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.alias-card a {
  color: var(--accent-2);
  text-decoration: none;
}

.alias-card a:hover,
.alias-card a:focus-visible {
  text-decoration: underline;
}

@media (max-width: 1180px) {
  .chrome {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .chrome-center,
  .chrome-right {
    justify-content: flex-start;
  }

  .chrome-right {
    flex-wrap: wrap;
  }

  .deck-row {
    grid-template-columns: 1fr;
  }

  .toggle-row-group {
    justify-content: flex-start;
  }

  .workspace-grid:not([data-view="cards"]) {
    grid-template-columns: 1fr;
    grid-template-areas:
      "sidebar"
      "results";
  }

  .workspace-grid[data-view="cards"] {
    grid-template-columns: 1fr;
    grid-template-areas:
      "sidebar"
      "results";
  }

  .sidebar {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }

  .shortcuts-panel {
    inset: 50% auto auto 50%;
    width: min(620px, calc(100vw - 20px));
    max-height: min(82vh, 640px);
  }

  .table-head {
    align-items: start;
  }

  .table-head-actions {
    justify-items: start;
  }

  .table-controls-row {
    justify-content: flex-start;
  }

  .legend {
    gap: 8px;
  }
}

@media (max-width: 760px) {
  .workspace {
    width: calc(100% - 8px);
    margin: 4px auto;
  }

  .command-head {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .hint-cluster {
    justify-content: flex-start;
  }

  .status-strip {
    grid-template-columns: 1fr;
  }

  #statusHint {
    white-space: normal;
  }

  .sidebar {
    grid-template-columns: 1fr;
  }

  .shortcuts-panel {
    inset: 50% auto auto 50%;
    width: calc(100vw - 12px);
    max-height: min(84vh, 640px);
    border-radius: 12px;
  }

  .workspace-grid[data-view="cards"] .sidebar {
    grid-template-columns: 1fr;
  }

  .tools-card-grid {
    grid-template-columns: 1fr;
    padding: 8px;
  }

  .column-menu-panel {
    right: auto;
    left: 0;
    width: min(320px, calc(100vw - 24px));
  }

  .tool-card {
    padding: 9px;
    gap: 8px;
  }

  .tool-card-line {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .tool-card-key {
    font-size: 10px;
  }

  .tool-shell header,
  .tool-shell-grid,
  .alias-grid {
    grid-template-columns: 1fr;
  }

  .path-pill {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
