/* ============================================================
   SSM – SSH Session Manager
   noir-cat theme · GitHub Pages
   ============================================================ */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap");

/* ── Custom Properties ────────────────────────────────────── */

:root {
  --bg:            #1a1a1a;
  --bg-surface:    #212121;
  --bg-overlay:    #2a2a2a;
  --bg-selection:  #313244;
  --fg:            #d4d4d4;
  --fg-muted:      #8a8a9a;
  --fg-subtle:     #585b70;
  --border:        #2e2e3a;
  --blue:   #89b4fa;
  --purple: #cba6f7;
  --green:  #a6e3a1;
  --red:    #f38ba8;
  --yellow: #f9e2af;
  --cyan:   #89dceb;
  --accent: var(--blue);
  --nav-height:    60px;
  --container-max: 1100px;
  --radius:        8px;
  --radius-sm:     4px;
  --transition:    0.18s ease;
}

/* ── Reset & Base ─────────────────────────────────────────── */

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: opacity var(--transition);
}

a:hover {
  opacity: 0.85;
}

img {
  max-width: 100%;
  display: block;
}

ul,
ol {
  list-style: none;
}

button {
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input,
textarea {
  font-family: inherit;
  font-size: inherit;
}

::selection {
  background: var(--bg-selection);
}

/* ── Typography ───────────────────────────────────────────── */

h1, h2, h3, h4, h5, h6 {
  color: #fff;
  line-height: 1.25;
  font-weight: 600;
}

h1 {
  font-size: clamp(1.75rem, 4vw, 2.6rem);
}

h2 {
  font-size: clamp(1.35rem, 3vw, 1.85rem);
}

h3 {
  font-size: clamp(1.05rem, 2vw, 1.3rem);
}

h4 {
  font-size: 1.05rem;
}

p {
  color: var(--fg);
  margin-bottom: 1rem;
}

strong {
  color: #fff;
  font-weight: 600;
}

code,
kbd,
pre {
  font-family: "JetBrains Mono", ui-monospace, monospace;
}

code {
  background: var(--bg-overlay);
  color: var(--cyan);
  padding: 0.15em 0.4em;
  border-radius: var(--radius-sm);
  font-size: 0.875em;
}

pre {
  background: var(--bg-overlay);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  margin-bottom: 1.5rem;
}

pre code {
  background: none;
  padding: 0;
  color: var(--fg);
  font-size: 0.875rem;
  line-height: 1.75;
}

/* ── Layout ───────────────────────────────────────────────── */

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 5rem 0;
}

.section-sm {
  padding: 3rem 0;
}

.divider {
  border-top: 1px solid var(--border);
  margin: 0;
}

/* ── Navigation ───────────────────────────────────────────── */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-height);
  background: rgba(26, 26, 26, 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  z-index: 200;
  display: flex;
  align-items: center;
}

.nav__inner {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav__logo img {
  height: 26px;
}

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav__toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--fg);
  border-radius: 1px;
  transition: var(--transition);
}

.nav__menu {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.nav__links {
  display: flex;
  flex-direction: row;
  gap: 1.5rem;
  align-items: center;
}

.nav__links a {
  color: var(--fg-muted);
  font-size: 0.875rem;
  font-weight: 500;
  transition: color var(--transition);
  text-decoration: none;
}

.nav__links a:hover {
  color: var(--fg);
  opacity: 1;
}

.nav__links a.active {
  color: var(--blue);
}

.nav__github {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--fg-muted);
  font-size: 0.875rem;
  text-decoration: none;
  transition: color var(--transition);
}

.nav__github:hover {
  color: var(--fg);
  opacity: 1;
}

.nav__github svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

/* ── Hero ─────────────────────────────────────────────────── */

.hero {
  padding-top: calc(var(--nav-height) + 4rem);
  padding-bottom: 5rem;
}

.hero__content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.hero__left {
  /* left column */
}

.hero__eyebrow {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
  font-weight: 500;
}

.hero__eyebrow .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse 2s infinite;
}

.hero__title {
  margin-bottom: 1rem;
}

.hero__lede {
  font-size: 1.1rem;
  color: var(--fg-muted);
  max-width: 480px;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.hero__lede strong {
  color: var(--fg);
}

.hero__actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.hero__install {
  display: flex;
  align-items: center;
  background: var(--bg-overlay);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.5rem 0.75rem;
  margin-top: 1.5rem;
  max-width: 100%;
}

.hero__install-prompt {
  color: var(--green);
  font-family: "JetBrains Mono", monospace;
  margin-right: 0.5rem;
  font-size: 0.875rem;
  flex-shrink: 0;
}

.hero__install code {
  background: none;
  color: var(--fg);
  font-size: 0.8rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hero__install-copy {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--fg-muted);
  border-radius: var(--radius-sm);
  padding: 0.25rem 0.6rem;
  font-size: 0.75rem;
  cursor: pointer;
  margin-left: 0.5rem;
  flex-shrink: 0;
  transition: color var(--transition), border-color var(--transition);
}

.hero__install-copy:hover {
  color: var(--fg);
  border-color: var(--fg-subtle);
}

.hero__right {
  /* right column – TUI demo */
}

/* ── Buttons ──────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  transition: opacity var(--transition), border-color var(--transition), color var(--transition);
  cursor: pointer;
  text-decoration: none;
  border: none;
}

.btn-primary {
  background: var(--blue);
  color: #0a0e17;
  border: none;
}

.btn-primary:hover {
  opacity: 0.9;
  color: #0a0e17;
}

.btn-secondary {
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--fg-subtle);
  color: #fff;
}

/* ── Feature Cards ────────────────────────────────────────── */

.section-heading {
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  color: #fff;
  margin-bottom: 0.5rem;
}

.section-sub {
  color: var(--fg-muted);
  margin-bottom: 2.5rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color var(--transition), background var(--transition);
}

.card:hover {
  border-color: var(--fg-subtle);
  background: #242424;
}

.card__icon {
  width: 38px;
  height: 38px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.card__icon--blue {
  background: rgba(137, 180, 250, 0.1);
  color: var(--blue);
}

.card__icon--purple {
  background: rgba(203, 166, 247, 0.1);
  color: var(--purple);
}

.card__icon--green {
  background: rgba(166, 227, 161, 0.1);
  color: var(--green);
}

.card__icon--yellow {
  background: rgba(249, 226, 175, 0.1);
  color: var(--yellow);
}

.card__icon--cyan {
  background: rgba(137, 222, 235, 0.1);
  color: var(--cyan);
}

.card__icon--red {
  background: rgba(243, 139, 168, 0.1);
  color: var(--red);
}

.card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}

.card p {
  font-size: 0.875rem;
  color: var(--fg-muted);
  margin-bottom: 0;
}

/* ── Tool Stack ───────────────────────────────────────────── */

.tool-list {
  border-top: 1px solid var(--border);
}

.tool-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.tool-name {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.9rem;
  color: #fff;
  font-weight: 500;
}

.tool-desc {
  font-size: 0.85rem;
  color: var(--fg-muted);
}

/* ── CTA ──────────────────────────────────────────────────── */

.cta-block {
  text-align: center;
  padding: 3rem 0;
}

.cta-block h2 {
  margin-bottom: 0.5rem;
}

.cta-block p {
  color: var(--fg-muted);
  margin-bottom: 1.5rem;
}

/* ── Footer ───────────────────────────────────────────────── */

.footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
}

.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer__copy {
  font-size: 0.8rem;
  color: var(--fg-muted);
}

.footer__nav {
  display: flex;
  gap: 1.5rem;
}

.footer__nav a {
  font-size: 0.8rem;
  color: var(--fg-muted);
  text-decoration: none;
  transition: color var(--transition);
}

.footer__nav a:hover {
  color: var(--fg);
}

/* ── About Page ───────────────────────────────────────────── */

.page-header {
  padding: 5rem 0 3rem;
}

.page-header h1 {
  margin-bottom: 0.5rem;
}

.page-header .lead {
  color: var(--fg-muted);
  font-size: 1.1rem;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 3rem;
  padding-bottom: 5rem;
}

.about-main h2 {
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
}

.about-main h2:first-child {
  margin-top: 0;
}

.about-main p {
  margin-bottom: 1rem;
}

.about-aside {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.aside-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.aside-card h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--fg-subtle);
  margin-bottom: 0.75rem;
}

.aside-card p {
  font-size: 0.875rem;
  margin-bottom: 0;
}

.aside-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.aside-links a {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  color: var(--fg-muted);
  text-decoration: none;
  transition: color var(--transition);
}

.aside-links a:hover {
  color: var(--fg);
}

/* ── Docs Page ────────────────────────────────────────────── */

.docs-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 3rem;
  padding-top: var(--nav-height);
  min-height: 100vh;
}

.docs-sidebar {
  position: sticky;
  top: calc(var(--nav-height) + 2rem);
  align-self: start;
  padding: 2rem 0;
}

.docs-sidebar h4 {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--fg-subtle);
  margin-bottom: 0.5rem;
  margin-top: 1.5rem;
}

.docs-sidebar h4:first-child {
  margin-top: 0;
}

.docs-sidebar a {
  display: block;
  font-size: 0.85rem;
  color: var(--fg-muted);
  padding: 0.3rem 0;
  border-left: 2px solid transparent;
  padding-left: 0.75rem;
  text-decoration: none;
  transition: color var(--transition);
}

.docs-sidebar a:hover {
  color: var(--fg);
}

.docs-sidebar a.active {
  color: var(--blue);
  border-left-color: var(--blue);
}

.docs-content {
  padding: 2rem 0 5rem;
}

.docs-content section {
  margin-bottom: 3rem;
}

.docs-content section h2 {
  margin-bottom: 1rem;
  scroll-margin-top: calc(var(--nav-height) + 1.5rem);
}

.docs-content section h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.docs-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
}

.docs-content table th {
  background: var(--bg-overlay);
  color: #fff;
  text-align: left;
  padding: 0.6rem 0.75rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.docs-content table td {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
}

.docs-content table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* ── Callouts ─────────────────────────────────────────────── */

.callout {
  border-left: 3px solid;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
}

.callout--info {
  border-color: var(--blue);
  background: rgba(137, 180, 250, 0.05);
}

.callout--tip {
  border-color: var(--green);
  background: rgba(166, 227, 161, 0.05);
}

.callout--warn {
  border-color: var(--yellow);
  background: rgba(249, 226, 175, 0.05);
}

/* ── Changelog Page ───────────────────────────────────────── */

.changelog-loading {
  text-align: center;
  padding: 5rem 0;
  color: var(--fg-muted);
}

.changelog-entry {
  margin-bottom: 3rem;
}

.changelog-version {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.changelog-version h2 {
  font-size: 1.5rem;
}

.changelog-date {
  font-size: 0.875rem;
  color: var(--fg-muted);
}

.changelog-section {
  margin-bottom: 1.5rem;
}

.changelog-section h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.changelog-section ul {
  padding-left: 1.25rem;
  list-style: disc;
}

.changelog-section li {
  font-size: 0.9rem;
  color: var(--fg);
  margin-bottom: 0.4rem;
  line-height: 1.5;
}

.changelog-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.15rem 0.5rem;
  border-radius: 99px;
}

.changelog-badge--added {
  background: rgba(166, 227, 161, 0.14);
  color: var(--green);
}

.changelog-badge--changed {
  background: rgba(137, 180, 250, 0.14);
  color: var(--blue);
}

.changelog-badge--fixed {
  background: rgba(249, 226, 175, 0.14);
  color: var(--yellow);
}

.changelog-badge--removed {
  background: rgba(243, 139, 168, 0.14);
  color: var(--red);
}

.changelog-badge--security {
  background: rgba(203, 166, 247, 0.14);
  color: var(--purple);
}

/* ── Interactive TUI Demo ─────────────────────────────────── */

.tui-demo {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
  border: 1px solid var(--border);
}

.tui-demo__bar {
  display: flex;
  align-items: center;
  height: 36px;
  padding: 0 12px;
  background: #0e0e0e;
  border-bottom: 1px solid var(--border);
}

.tui-demo__dots {
  display: flex;
  gap: 6px;
  margin-right: auto;
}

.tui-demo__dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.tui-demo__dot--red {
  background: #f38ba8;
}

.tui-demo__dot--yellow {
  background: #f9e2af;
}

.tui-demo__dot--green {
  background: #a6e3a1;
}

.tui-demo__title {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
  color: var(--fg-subtle);
}

.tui-demo__body {
  background: #0e0e0e;
  padding: 0;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.7rem;
  line-height: 1.6;
  min-height: 320px;
  color: var(--fg);
  overflow: hidden;
}

/* ssm TUI rendered by demo.js */

.ssm-tui {
  --ssm-accent: #89b4fa;
  --ssm-bg: #0e0e0e;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 0.5rem 0;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.65rem;
  line-height: 1.5;
}

.ssm-border {
  color: #585b70;
  white-space: pre;
  padding: 0 0.5rem;
}

.ssm-border--header {
  color: #89b4fa;
}

.ssm-border--footer {
  color: #585b70;
}

.ssm-col-header {
  display: flex;
  padding: 0.15rem 0.5rem;
  font-size: 0.6rem;
  color: #585b70;
  white-space: nowrap;
}

.ssm-col-cursor { width: 22px; flex-shrink: 0; }
.ssm-col-glyph { width: 18px; flex-shrink: 0; }
.ssm-col-name { width: 160px; flex-shrink: 0; }
.ssm-col-host { width: 200px; flex-shrink: 0; }
.ssm-col-port { width: 48px; flex-shrink: 0; }
.ssm-col-latency { width: 54px; flex-shrink: 0; }
.ssm-col-spark { width: 60px; flex-shrink: 0; }
.ssm-col-tags { flex: 1; }

.ssm-list-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
}

.ssm-row {
  display: flex;
  padding: 0.1rem 0.5rem;
  border-radius: 3px;
  cursor: pointer;
  transition: background 0.1s;
  align-items: center;
  font-size: 0.65rem;
  white-space: nowrap;
}

.ssm-row:hover {
  background: rgba(137, 180, 250, 0.06);
}

.ssm-row-selected {
  background: rgba(137, 180, 250, 0.12) !important;
}

.ssm-cursor {
  width: 22px;
  flex-shrink: 0;
  color: var(--ssm-accent);
}

.ssm-glyph {
  width: 18px;
  flex-shrink: 0;
}

.ssm-cell-name {
  width: 160px;
  flex-shrink: 0;
  color: #fff;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ssm-cell-host {
  width: 200px;
  flex-shrink: 0;
  color: #a6adc8;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ssm-cell-port {
  width: 48px;
  flex-shrink: 0;
  color: #585b70;
}

.ssm-cell-latency {
  width: 54px;
  flex-shrink: 0;
  color: #585b70;
}

.ssm-cell-spark {
  width: 60px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.ssm-sparkline {
  display: flex;
  gap: 1px;
  align-items: flex-end;
  height: 12px;
  flex-shrink: 0;
}

.ssm-spark-bar {
  width: 3px;
  border-radius: 1px;
  transition: height 0.3s ease;
}

.ssm-cell-tags {
  flex: 1;
  color: #585b70;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ssm-desc {
  padding: 0.2rem 0.5rem;
  color: #a6adc8;
  white-space: nowrap;
  overflow: hidden;
  min-height: 1.5em;
}

.ssm-desc-prompt {
  color: #585b70;
}

.ssm-flash {
  color: var(--ssm-accent);
}

.ssm-footer-keys {
  padding: 0.2rem 0.5rem;
  color: #585b70;
  font-size: 0.6rem;
  white-space: nowrap;
}

.ssm-footer-dim {
  color: #45475a;
}

.ssm-search-input-wrap {
  color: #89b4fa;
}

.ssm-search-input {
  background: none;
  border: none;
  color: #cdd6f4;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.65rem;
  outline: none;
  width: 200px;
  padding: 0;
}

.ssm-highlight {
  background: rgba(137, 180, 250, 0.2);
  color: #fff;
  border-radius: 2px;
}

.ssm-actions-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  border-radius: 0 0 6px 6px;
}

.ssm-actions-menu {
  background: #181825;
  border: 1px solid #313244;
  border-radius: 6px;
  padding: 0.75rem 0;
  min-width: 220px;
}

.ssm-actions-title {
  padding: 0 1rem 0.5rem;
  border-bottom: 1px solid #313244;
  margin-bottom: 0.5rem;
  font-size: 0.7rem;
  color: #cdd6f4;
}

.ssm-actions-item {
  padding: 0.3rem 1rem;
  font-size: 0.65rem;
  color: #a6adc8;
  cursor: pointer;
  display: flex;
  gap: 0.75rem;
}

.ssm-actions-item:hover {
  background: rgba(137, 180, 250, 0.1);
  color: #cdd6f4;
}

.ssm-action-key {
  color: #585b70;
  min-width: 2.5rem;
}

.ssm-actions-dismiss {
  padding: 0.5rem 1rem 0;
  border-top: 1px solid #313244;
  margin-top: 0.5rem;
  font-size: 0.55rem;
  color: #45475a;
}

.ssm-footer-theme {
  color: var(--ssm-accent);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.55rem;
}

.ssm-highlight {
  background: rgba(249, 226, 175, 0.25);
  color: #fff;
  border-radius: 2px;
  padding: 0 1px;
}

.ssm-flash {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(166, 227, 161, 0.12);
  color: var(--green);
  padding: 0.4rem 0.75rem;
  font-size: 0.6rem;
  border-top: 1px solid rgba(166, 227, 161, 0.2);
  animation: flash-in 0.15s ease;
}

@keyframes flash-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.ssm-actions-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  animation: fade-in 0.12s ease;
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.ssm-actions-menu {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  min-width: 220px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

.ssm-actions-title {
  font-size: 0.65rem;
  color: var(--fg-muted);
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.ssm-actions-title strong {
  color: #fff;
}

.ssm-actions-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.5rem;
  border-radius: 4px;
  font-size: 0.65rem;
  color: var(--fg);
  cursor: pointer;
  transition: background 0.1s;
}

.ssm-actions-item:hover {
  background: rgba(137, 180, 250, 0.1);
}

.ssm-action-key {
  font-size: 0.55rem;
  color: var(--fg-subtle);
  background: var(--bg-overlay);
  padding: 0.1rem 0.3rem;
  border-radius: 3px;
  border: 1px solid var(--border);
  min-width: 24px;
  text-align: center;
}

.ssm-actions-dismiss {
  font-size: 0.55rem;
  color: var(--fg-subtle);
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}

.ssm-search-input-wrap {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--green);
  font-size: 0.6rem;
}

.ssm-search-input {
  background: transparent;
  border: none;
  color: var(--fg);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.6rem;
  outline: none;
  width: 120px;
}

/* ── Animations ───────────────────────────────────────────── */

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* ── Responsive · 900px ──────────────────────────────────── */

@media (max-width: 900px) {
  .hero__content {
    grid-template-columns: 1fr;
  }

  .hero__right {
    margin-top: 2rem;
  }

  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .about-aside {
    order: -1;
  }

  .docs-layout {
    grid-template-columns: 180px 1fr;
  }
}

/* ── Responsive · 720px ──────────────────────────────────── */

@media (max-width: 720px) {
  .nav__toggle {
    display: flex;
  }

  .nav__menu {
    display: none;
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: rgba(26, 26, 26, 0.98);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.5rem;
    flex-direction: column;
    gap: 0.5rem;
  }

  .nav__menu.open {
    display: flex;
  }

  .nav__links {
    flex-direction: column;
    gap: 0;
  }

  .nav__links a {
    padding: 0.6rem 0;
    font-size: 1rem;
  }

  .nav__github {
    display: none;
  }

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

  .tool-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }

  .footer__inner {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

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

  .docs-layout {
    grid-template-columns: 1fr;
  }

  .docs-sidebar {
    position: static;
    display: none;
  }

  .ssm-list-header,
  .ssm-row {
    grid-template-columns: 12px 70px 1fr 70px 1fr;
  }

  .ssm-cell-user,
  .ssm-cell-tags {
    display: none;
  }
}

/* ── Responsive · 480px ──────────────────────────────────── */

@media (max-width: 480px) {
  .hero__install code {
    font-size: 0.7rem;
  }

  .hero__actions {
    flex-direction: column;
  }

  .hero__actions .btn {
    width: 100%;
  }

  .tui-demo__body {
    padding: 0.5rem;
    font-size: 0.6rem;
  }
}
