:root {
  color-scheme: dark;
  --bg: #0e1113;
  --bg-deep: #090c0e;
  --panel: #111517;
  --panel-soft: #151a1c;
  --ink: #f3f0e8;
  --muted: #aaa9a7;
  --faint: #777b7c;
  --line: #4b4e4f;
  --line-soft: #303537;
  --accent: #ed6849;
  --accent-deep: #a94133;
  --green: #a6df8d;
  --blue: #8bbbe8;
  --yellow: #f2bd4f;
  --purple: #d2a7e8;
  --red: #ef665c;
  --mono: "SFMono-Regular", "Cascadia Code", "Roboto Mono", Menlo, Monaco, Consolas, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  width: 100%;
  min-width: 0;
  min-height: 100%;
  overflow-x: clip;
  background: var(--bg-deep);
}

body {
  width: 100%;
  min-width: 0;
  min-height: 100dvh;
  margin: 0;
  overflow-x: clip;
  color: var(--ink);
  background:
    radial-gradient(circle at 72% 31%, rgba(58, 65, 67, 0.14), transparent 32rem),
    linear-gradient(120deg, #101416 0%, #0b0e10 100%);
  font: 16px/1.45 var(--mono);
  letter-spacing: 0.012em;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

button {
  color: inherit;
}

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

.skip-link {
  position: fixed;
  z-index: 50;
  top: 0.5rem;
  left: 0.5rem;
  padding: 0.55rem 0.8rem;
  color: var(--bg);
  background: var(--ink);
  transform: translateY(-180%);
}

.skip-link:focus {
  transform: translateY(0);
}

.terminal-shell {
  display: grid;
  grid-template-rows: 52px auto minmax(0, 1fr) auto;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: 100dvh;
  min-height: 0;
  max-height: 100dvh;
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(10, 13, 15, 0.22);
}

.titlebar,
.questionbar,
.prompt-dock {
  border-color: var(--line);
  background: rgba(12, 15, 17, 0.86);
  backdrop-filter: blur(12px);
}

.titlebar {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  padding: 0 72px;
  border-bottom: 1px solid var(--line);
}

.window-controls {
  position: absolute;
  left: 18px;
  display: flex;
  gap: 10px;
}

.window-dot {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.35);
}

.window-dot-red { background: var(--red); }
.window-dot-yellow { background: var(--yellow); }
.window-dot-green { background: #61c978; }

.terminal-title {
  margin: 0;
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 0.91rem;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.questionbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-width: 0;
  padding: 12px 24px;
  border-bottom: 1px solid var(--line);
}

.question-copy,
.directory-trust {
  min-width: 0;
}

.question-copy h1 {
  margin: 0;
  color: #e9e7e1;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.025em;
}

.question-copy p,
.directory-trust p {
  margin: 0.18rem 0 0;
  color: var(--faint);
  font-size: 0.72rem;
}

.directory-trust {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1.25rem;
}

.ai-status {
  color: var(--green);
  font-size: 0.72rem;
  text-decoration: none;
  white-space: nowrap;
}

.ai-status::before {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 0.48rem;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.tool-count {
  white-space: nowrap;
}

.mobile-switch {
  display: none;
}

.directory-workspace {
  display: grid;
  grid-template-columns: minmax(300px, 340px) minmax(0, 1fr);
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.software-panel,
.tool-preview {
  min-width: 0;
  min-height: 0;
}

.software-panel {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  overflow: hidden;
  border-right: 1px solid var(--line);
  background: rgba(10, 13, 15, 0.26);
}

.software-search {
  min-width: 0;
  padding: 22px 20px 0;
}

.software-search label {
  display: block;
  margin: 0 0 8px 5px;
  color: #e6e5df;
  font-size: 0.77rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.search-line {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  padding: 0 6px 7px;
  border-bottom: 1px solid #747676;
  color: var(--faint);
}

.search-line:focus-within {
  border-color: var(--ink);
}

.search-line input {
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  caret-color: var(--ink);
}

.search-line input::placeholder {
  color: var(--muted);
  opacity: 1;
}

.search-line input::-webkit-search-cancel-button {
  display: none;
}

.clear-search {
  padding: 0;
  border: 0;
  color: var(--accent);
  background: transparent;
  font-size: 0.7rem;
  cursor: pointer;
}

.search-help {
  margin: 0.55rem 5px 0;
  color: var(--faint);
  font-size: 0.65rem;
}

.result-note {
  min-height: 1.75rem;
  margin: 0;
  padding: 0.4rem 25px 0;
  color: var(--faint);
  font-size: 0.7rem;
}

.tool-list {
  min-width: 0;
  min-height: 0;
  padding-bottom: 1.5rem;
  overflow: hidden auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}

.tool-option {
  position: relative;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
  padding: 8px 20px 8px 24px;
  border: 0;
  color: #eeece7;
  background: transparent;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.tool-option:hover {
  background: rgba(255, 255, 255, 0.045);
}

.tool-option.is-selected {
  background: linear-gradient(90deg, var(--accent-deep), #c64c3d);
}

.tool-chevron {
  color: transparent;
  font-size: 1.2rem;
  line-height: 1;
}

.tool-option.is-selected .tool-chevron {
  color: var(--ink);
}

.tool-option-name {
  min-width: 0;
  overflow: hidden;
  font-size: 0.9rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tool-option-status {
  width: 8px;
  height: 8px;
  border: 1px solid #8f9292;
  border-radius: 50%;
}

.tool-option-status.is-official { border: 0; background: var(--green); }
.tool-option-status.is-official-scoped { border: 0; background: var(--blue); }
.tool-option-status.is-official-preview { border: 0; background: var(--yellow); }
.tool-option-status.is-community { border: 0; background: var(--purple); }
.tool-option-status.is-deprecated { border: 0; background: var(--red); }
.tool-option-status.is-none { background: transparent; }
.tool-option-status.status-official-scoped { border: 0; background: var(--blue); }
.tool-option-status.status-official-preview { border: 0; background: var(--yellow); }
.tool-option-status.status-community { border: 0; background: var(--purple); }
.tool-option-status.status-deprecated { border: 0; background: var(--red); }
.tool-option-status.status-none { border: 1px solid #8f9292; background: transparent; }

.tool-preview {
  overflow: hidden auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}

.preview-inner {
  width: min(100%, 68rem);
  min-width: 0;
  margin: 0 auto;
  padding: clamp(1.8rem, 3.4vw, 3rem) clamp(1.5rem, 4vw, 4rem) 3.5rem;
}

.product-header {
  min-width: 0;
  margin-bottom: 1.5rem;
}

.product-wordmark {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  min-width: 0;
  margin-bottom: 0.55rem;
}

.product-symbol {
  display: grid;
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
  place-items: center;
  overflow: hidden;
  color: var(--accent);
  font-size: 2.7rem;
  font-weight: 400;
  line-height: 1;
}

.product-symbol.is-claude {
  background:
    linear-gradient(var(--accent), var(--accent)) center / 48px 6px no-repeat,
    linear-gradient(var(--accent), var(--accent)) center / 6px 48px no-repeat,
    linear-gradient(45deg, transparent 44%, var(--accent) 44%, var(--accent) 56%, transparent 56%) center / 37px 37px no-repeat,
    linear-gradient(-45deg, transparent 44%, var(--accent) 44%, var(--accent) 56%, transparent 56%) center / 37px 37px no-repeat;
}

.product-wordmark h2 {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  color: #f1eee4;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.15rem, 3.8vw, 3.55rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1;
}

.cli-name {
  margin: 0.9rem 0 0.4rem;
  color: var(--accent);
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  overflow-wrap: anywhere;
  text-transform: uppercase;
}

.product-description {
  max-width: 48rem;
  margin: 0;
  color: #f2efea;
  font-size: 0.95rem;
  overflow-wrap: anywhere;
}

.availability {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0.5rem 0 0;
  color: var(--green);
  font-size: 0.86rem;
}

.availability.is-official-scoped { color: var(--blue); }
.availability.is-official-preview { color: var(--yellow); }
.availability.is-community { color: var(--purple); }
.availability.is-deprecated { color: var(--red); }
.availability.is-none { color: var(--muted); }

.availability-dot {
  flex: 0 0 11px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: currentColor;
}

.availability.is-none .availability-dot {
  border: 1px solid currentColor;
  background: transparent;
}

.tabs {
  display: flex;
  gap: clamp(1.4rem, 4vw, 3.5rem);
  min-width: 0;
  border-bottom: 1px solid var(--line);
}

.tab {
  position: relative;
  padding: 0.65rem 0 0.7rem;
  border: 0;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}

.tab:hover,
.tab:focus-visible,
.tab.is-active {
  color: var(--ink);
}

.tab.is-active::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: var(--ink);
  content: "";
}

.tab-panel {
  min-width: 0;
}

.data-row {
  display: grid;
  grid-template-columns: 125px minmax(0, 1fr) auto;
  gap: 1rem;
  min-width: 0;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line-soft);
}

.data-label {
  color: var(--muted);
}

.data-value {
  min-width: 0;
  overflow-wrap: anywhere;
  color: #efede8;
}

.data-value code {
  font: inherit;
}

.data-value small {
  display: block;
  margin-top: 0.22rem;
  color: var(--muted);
}

.copy-button {
  align-self: start;
  padding: 0;
  border: 0;
  color: var(--accent);
  background: transparent;
  cursor: pointer;
}

.copy-button:hover,
.copy-button:focus-visible {
  color: #ff9278;
  text-decoration: underline;
}

.feature-section {
  padding-top: 1.15rem;
}

.feature-section h3 {
  margin: 0 0 0.75rem;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 500;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  background: var(--line-soft);
}

.feature-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-content: start;
  gap: 0.65rem;
  min-width: 0;
  padding: 0.9rem;
  background: var(--panel);
}

.feature-check {
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--green) 65%, transparent);
  border-radius: 50%;
  color: var(--green);
  font-size: 0.65rem;
}

.feature-copy {
  min-width: 0;
}

.feature-copy strong {
  display: block;
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.feature-copy span {
  display: block;
  margin-top: 0.28rem;
  color: var(--muted);
  font-size: 0.72rem;
  overflow-wrap: anywhere;
}

.feature-source,
.feature-fallback {
  margin: 0.7rem 0 0;
  color: var(--muted);
  font-size: 0.75rem;
}

.feature-source a,
.record-links a,
.panel-link {
  color: var(--accent);
}

.install-block {
  margin-top: 1.1rem;
  padding: 1rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
}

.install-block-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.install-code {
  display: block;
  min-width: 0;
  color: var(--ink);
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.install-note {
  max-width: 50rem;
  color: var(--muted);
  font-size: 0.83rem;
}

.record-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.35rem;
  margin-top: 1.1rem;
}

.record-links a,
.feature-source a {
  font-size: 0.8rem;
  text-decoration: none;
}

.record-links a:hover,
.record-links a:focus-visible,
.feature-source a:hover,
.feature-source a:focus-visible {
  color: #ff9278;
  text-decoration: underline;
}

.empty-panel {
  padding: 1.5rem 0;
  color: var(--muted);
}

.prompt-dock {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
  padding: 11px 22px 10px;
  border-top: 1px solid var(--line);
}

.prompt-form {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}

.prompt-label {
  flex: 0 0 auto;
  color: var(--ink);
  font-size: 0.82rem;
}

.prompt-label span:first-child {
  color: #f4f2eb;
}

.prompt-form input {
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  caret-color: var(--ink);
  font-size: 0.82rem;
}

.prompt-form input::placeholder {
  color: #666a6b;
}

.prompt-status {
  grid-column: 1;
  height: 1rem;
  margin: 0.15rem 0 0;
  color: var(--green);
  font-size: 0.67rem;
}

.prompt-hint {
  grid-column: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 0.15rem 0 0;
  color: var(--muted);
  font-size: 0.7rem;
}

.prompt-hint span {
  color: #d7d5d0;
}


.noscript-note {
  margin: 0;
  padding: 0.8rem;
  color: var(--ink);
  background: #6d271f;
  text-align: center;
}

:focus-visible {
  outline: 2px solid #f4eee2;
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

@media (max-width: 960px) {
  .directory-workspace {
    grid-template-columns: minmax(280px, 320px) minmax(0, 1fr);
  }

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

@media (max-width: 800px) {
  .terminal-shell {
    grid-template-rows: 48px auto 44px minmax(0, 1fr) auto;
    min-height: 0;
  }

  .titlebar {
    padding: 0 54px;
  }

  .window-controls {
    left: 11px;
    gap: 6px;
  }

  .window-dot {
    width: 11px;
    height: 11px;
  }

  .terminal-title {
    font-size: 0.7rem;
  }

  .questionbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.2rem;
    padding: 8px 12px;
  }

  .question-copy h1 {
    max-width: 100%;
    font-size: 0.78rem;
    white-space: normal;
  }

  .question-copy p,
  .tool-count {
    display: none;
  }

  .ai-status {
    font-size: 0.62rem;
    white-space: normal;
  }

  .directory-trust {
    width: 100%;
    justify-content: flex-start;
  }

  .mobile-switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-width: 0;
    border-bottom: 1px solid var(--line);
    background: rgba(12, 15, 17, 0.86);
  }

  .mobile-switch-button {
    min-width: 0;
    border: 0;
    border-right: 1px solid var(--line);
    color: var(--muted);
    background: transparent;
    font-size: 0.72rem;
    text-transform: uppercase;
    cursor: pointer;
  }

  .mobile-switch-button:last-child {
    border-right: 0;
  }

  .mobile-switch-button.is-active {
    color: var(--ink);
    box-shadow: inset 0 -2px var(--accent);
  }

  .directory-workspace {
    display: block;
  }

  .software-panel,
  .tool-preview {
    width: 100%;
    max-width: 100%;
    height: 100%;
    border-right: 0;
  }

  body[data-mobile-view="software"] .tool-preview,
  body[data-mobile-view="preview"] .software-panel {
    display: none;
  }

  .software-search {
    padding: 18px 14px 0;
  }

  .result-note {
    padding-right: 19px;
    padding-left: 19px;
  }

  .tool-option {
    padding-right: 16px;
    padding-left: 18px;
  }

  .preview-inner {
    padding: 1.3rem 1rem 2.5rem;
  }

  .product-symbol {
    flex-basis: 42px;
    width: 42px;
    height: 42px;
    font-size: 2.2rem;
  }

  .product-symbol.is-claude {
    background:
      linear-gradient(var(--accent), var(--accent)) center / 40px 5px no-repeat,
      linear-gradient(var(--accent), var(--accent)) center / 5px 40px no-repeat,
      linear-gradient(45deg, transparent 44%, var(--accent) 44%, var(--accent) 56%, transparent 56%) center / 30px 30px no-repeat,
      linear-gradient(-45deg, transparent 44%, var(--accent) 44%, var(--accent) 56%, transparent 56%) center / 30px 30px no-repeat;
  }

  .product-wordmark h2 {
    font-size: clamp(1.9rem, 11vw, 3rem);
  }

  .data-row {
    grid-template-columns: minmax(5rem, 0.27fr) minmax(0, 1fr) auto;
    gap: 0.6rem;
  }

  .prompt-dock {
    grid-template-columns: minmax(0, 1fr);
    padding: 9px 12px 8px;
  }

  .prompt-label,
  .prompt-form input {
    font-size: 0.72rem;
  }

  .prompt-hint {
    gap: 0.35rem;
    font-size: 0.61rem;
  }
}

@media (max-width: 430px) {
  .tabs {
    justify-content: space-between;
    gap: 0.5rem;
  }

  .data-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .data-label {
    grid-column: 1 / -1;
    font-size: 0.7rem;
    text-transform: uppercase;
  }

}

@media (max-height: 680px) and (min-width: 801px) {
  .question-copy p,
  .search-help,
  .prompt-hint {
    display: none;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .tool-option,
  .tab,
  .copy-button {
    transition: color 130ms ease, background-color 130ms ease;
  }

  .tool-preview.is-changing .preview-inner {
    animation: terminal-flicker 150ms ease-out;
  }

  @keyframes terminal-flicker {
    from { opacity: 0.62; transform: translateY(2px); }
    to { opacity: 1; transform: translateY(0); }
  }
}

@media print {
  .terminal-shell {
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .directory-workspace {
    display: block;
    overflow: visible;
  }

  .software-panel,
  .tool-preview {
    overflow: visible;
  }

  .prompt-dock,
  .mobile-switch,
  .window-controls {
    display: none;
  }
}
