/* The dsh-tui page (docs/index.html, docs/en/index.html), served by GitHub
   Pages from this folder. Colors are tokens, redefined for dark mode. */

:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --text: #1b1f2a;
  --muted: #5b6375;
  --line: #dde1ea;
  --accent: #4d6bfe;
  --accent-soft: #e8ecff;
  --code-bg: #eef0f6;
  --term-bg: #0d1117;
  --term-text: #d6dbe5;
  --term-dim: #7d8696;
  --term-accent: #6f8bff;
  --term-yellow: #e3b341;
  --term-green: #56d364;
  --radius: 12px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0e14;
    --surface: #131823;
    --text: #e4e8f0;
    --muted: #9aa3b5;
    --line: #232b3a;
    --accent: #7d95ff;
    --accent-soft: #1b2340;
    --code-bg: #1a2130;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, sans-serif;
}

a { color: var(--accent); }

code, pre, .term {
  font-family: ui-monospace, "JetBrains Mono", "Cascadia Code", "DejaVu Sans Mono", monospace;
}

code {
  background: var(--code-bg);
  padding: 0.1em 0.35em;
  border-radius: 5px;
  font-size: 0.92em;
}

.wrap {
  max-width: 920px;
  margin: 0 auto;
  padding: 0 16px;
}

header.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 0;
}

.brand {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  text-decoration: none;
}

.brand span { color: var(--accent); }

nav.links {
  display: flex;
  gap: 16px;
  font-size: 0.95rem;
}

nav.links a { text-decoration: none; color: var(--muted); }
nav.links a:hover { color: var(--accent); }

.hero { padding: 28px 0 8px; }

.hero h1 {
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  line-height: 1.15;
  margin: 0 0 12px;
}

.hero p.lead {
  font-size: 1.12rem;
  color: var(--muted);
  margin: 0 0 24px;
  max-width: 680px;
}

.install {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin: 0 0 12px;
}

.install .label {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 8px;
}

.cmd {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--term-bg);
  color: var(--term-text);
  border-radius: 8px;
  padding: 10px 10px 10px 14px;
}

.cmd code {
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  white-space: nowrap;
  background: none;
  color: inherit;
  padding: 0;
  font-size: 0.95rem;
}

.cmd code::before { content: "$ "; color: var(--term-dim); }

button.copy {
  flex-shrink: 0;
  border: 1px solid #2c3546;
  background: #1a2230;
  color: var(--term-text);
  border-radius: 6px;
  padding: 6px 12px;
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
}

button.copy:hover { border-color: var(--term-accent); }

.small { font-size: 0.9rem; color: var(--muted); }

/* The terminal drawn in HTML. */
.term {
  background: var(--term-bg);
  color: var(--term-text);
  border-radius: var(--radius);
  border: 1px solid #222a38;
  margin: 28px 0;
  overflow: hidden;
  font-size: 13.5px;
  line-height: 1.5;
}

.term .bar {
  display: flex;
  gap: 7px;
  padding: 10px 12px;
  background: #161b25;
  border-bottom: 1px solid #222a38;
}

.term .bar i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #3a4252;
  display: block;
}

.term pre {
  margin: 0;
  padding: 14px 16px;
  overflow-x: auto;
  white-space: pre;
}

.t-dim { color: var(--term-dim); }
.t-acc { color: var(--term-accent); font-weight: 700; }
.t-yel { color: var(--term-yellow); font-weight: 700; }
.t-sel { background: var(--term-yellow); color: #0d1117; font-weight: 700; }
.t-ok { color: var(--term-green); }

section { padding: 18px 0; }

section h2 {
  font-size: 1.45rem;
  margin: 0 0 14px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 14px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}

.card h3 { margin: 0 0 6px; font-size: 1.02rem; }
.card p { margin: 0; color: var(--muted); font-size: 0.95rem; }

table.keys {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 0.95rem;
}

table.keys td {
  padding: 8px 12px;
  border-top: 1px solid var(--line);
  vertical-align: top;
}

table.keys tr:first-child td { border-top: none; }
table.keys td:first-child { white-space: nowrap; width: 1%; }

ol.steps { padding-left: 1.3em; }
ol.steps li { margin-bottom: 6px; }

footer {
  border-top: 1px solid var(--line);
  margin-top: 24px;
  padding: 20px 0 40px;
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 560px) {
  nav.links { gap: 12px; font-size: 0.88rem; }
  /* The whole command in view, broken over lines, rather than scrolled. */
  .cmd { align-items: flex-start; }
  .cmd code { white-space: normal; word-break: break-all; overflow: visible; }
  .term { font-size: 11.5px; }
  table.keys td:first-child { white-space: normal; }
}
