/* Fx. Nippy. v3.1 — lightweight, transparent
   Perplexity-like grammar: centred wordmark, single composer, generous whitespace.
   teal #0E7A82 · ink #1C1C1C · muted #5A5A5A · page #F7F4EC · paper #FBFAF5 */

:root {
  --teal: #0E7A82;
  --teal-deep: #0a5f66;
  --teal-bright: #14959F;
  --teal-light: #E6F3F4;
  --ink: #1C1C1C;
  --ink-soft: #2c2c2c;
  --muted: #5A5A5A;
  --muted-2: #8a8a8a;
  --row-alt: #F5F8F8;
  --page: #F7F4EC;
  --paper: #FBFAF5;
  --hairline: rgba(28, 28, 28, 0.08);
  --hairline-strong: rgba(28, 28, 28, 0.14);
  --rust: #8b2a2a;
  --radius: 4px;
  --radius-soft: 12px;
  --radius-pill: 999px;
  --topbar-h: 56px;
  --composer-h: 120px;
  --max-w: 760px;
  --font-display: "DM Sans", system-ui, sans-serif;
  --font-body: "Source Serif 4", "Source Serif Pro", Georgia, serif;
  --font-sans: "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, monospace;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
html { background: var(--page); }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100dvh;
}

/* ---------- app shell (bounded card) ---------- */
.app {
  max-width: 880px;
  margin: 0 auto;
  padding: 20px 20px 24px;
  padding-top: calc(20px + env(safe-area-inset-top));
  padding-bottom: calc(24px + env(safe-area-inset-bottom));
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ---------- topbar (in-flow, above card) ---------- */
.topbar {
  height: var(--topbar-h);
  padding: 0 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: transparent;
  flex-shrink: 0;
}
.brand {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.02em;
  color: var(--ink);
  display: inline-flex;
  align-items: baseline;
}
.brand-fx { color: var(--teal); }
.brand-nippy { color: var(--ink); margin-left: 3px; }
.brand-dot { color: var(--ink); }
.threadbar { display: flex; gap: 2px; align-items: center; }
.iconbtn {
  background: transparent;
  color: var(--muted-2);
  border: 0;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 120ms ease;
  border-radius: var(--radius);
}
.iconbtn:hover, .iconbtn:focus-visible {
  color: var(--ink);
  outline: none;
}

/* ---------- card (chat frame that reads as an app) ---------- */
.card {
  flex: 1;
  background: var(--paper);
  border: 1px solid rgba(28,28,28,0.18);
  border-radius: var(--radius-soft);
  box-shadow: 0 1px 0 rgba(28,28,28,0.03), 0 20px 40px -12px rgba(28,28,28,0.10), 0 4px 8px rgba(28,28,28,0.04);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 460px;
  max-height: calc(100dvh - var(--topbar-h) - 90px);
}

/* ---------- chat (inside card) ---------- */
.chat {
  flex: 1;
  width: 100%;
  padding: 28px 28px 12px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  overflow-y: auto;
}

/* ---------- empty state (inside card) ---------- */
.empty {
  margin: auto;
  max-width: 560px;
  text-align: center;
  padding: 24px 8px;
}
.empty-eyebrow {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
  margin: 0 0 14px;
}
.empty-title {
  font-family: var(--font-body);
  font-weight: 400;
  font-style: italic;
  font-size: 34px;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 10px;
  line-height: 1.1;
}
.empty-sub {
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 22px;
  line-height: 1.55;
}
.empty-sub code {
  font-family: var(--font-mono);
  font-size: 12.5px;
  background: var(--page);
  padding: 1px 6px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  color: var(--teal-deep);
}
.suggest {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 0 auto;
  max-width: 520px;
}
.chip {
  background: var(--page);
  border: 1px solid var(--hairline-strong);
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 12.5px;
  padding: 7px 12px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: color 120ms ease, border-color 120ms ease, background 120ms ease;
}
.chip:hover, .chip:focus-visible {
  color: var(--teal);
  border-color: var(--teal);
  background: var(--teal-light);
  outline: none;
}

/* inline API key box (only when no key) */
.empty-keybox {
  max-width: 520px;
  margin: 0 auto;
  padding: 14px 16px;
  background: var(--paper);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius-soft);
  text-align: left;
}
.empty-keybox-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.empty-keybox-row input {
  flex: 1;
  font-family: var(--font-sans);
  font-size: 14px;
  padding: 9px 12px;
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  outline: none;
}
.empty-keybox-row input:focus { border-color: var(--teal); }
.empty-keybox-row button { white-space: nowrap; }
.empty-keybox-hint {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

/* ---------- messages ---------- */
.msg { display: flex; flex-direction: column; gap: 6px; }
.msg .role {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.msg.user .role { color: var(--teal); }
.msg.assistant .role { color: var(--muted); }
.msg.system .role { color: var(--rust); }

.bubble {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
  white-space: pre-wrap;
  word-wrap: break-word;
}
.msg.user .bubble {
  background: transparent;
  border-left: 2px solid var(--teal);
  padding: 0 0 0 14px;
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--ink-soft);
}
.msg.assistant .bubble { background: transparent; padding: 0; }
.msg.assistant .bubble p:first-child { margin-top: 0; }
.msg.assistant .bubble p:last-child { margin-bottom: 0; }

.bubble h1, .bubble h2, .bubble h3 {
  font-family: var(--font-sans);
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 1.3em 0 0.4em;
}
.bubble h1 { font-size: 22px; }
.bubble h2 { font-size: 18px; }
.bubble h3 { font-size: 15.5px; color: var(--ink); }
.bubble a {
  color: var(--teal);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}
.bubble a:hover { color: var(--teal-bright); }
.bubble code {
  font-family: var(--font-mono);
  font-size: 13px;
  background: var(--paper);
  padding: 1px 5px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
}
.bubble pre {
  background: var(--paper);
  border: 1px solid var(--hairline);
  padding: 12px 14px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.55;
  border-radius: var(--radius);
}
.bubble pre code { background: transparent; border: 0; padding: 0; }
.bubble blockquote {
  border-left: 2px solid var(--hairline-strong);
  margin: 0.6em 0;
  padding: 0.2em 0 0.2em 14px;
  color: var(--muted);
}
.bubble ul, .bubble ol { padding-left: 22px; }
.bubble li { margin: 0.25em 0; }
.bubble table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  margin: 0.8em 0;
}
.bubble th, .bubble td {
  border: 1px solid var(--hairline-strong);
  padding: 6px 10px;
  text-align: left;
  vertical-align: top;
}
.bubble th {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-weight: 600;
  letter-spacing: 0.02em;
  font-size: 12px;
}
.bubble tr:nth-child(even) td { background: var(--row-alt); }

/* citations */
.citations {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--hairline);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.citations .head {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: 4px;
}
.citations a {
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  display: flex;
  gap: 8px;
}
.citations a:hover { color: var(--teal); }
.citations .num {
  color: var(--teal);
  font-family: var(--font-mono);
  font-size: 11.5px;
  flex-shrink: 0;
  min-width: 22px;
}
.citation-ref {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  background: var(--teal-light);
  border: 1px solid var(--hairline);
  color: var(--teal);
  padding: 0 4px;
  margin: 0 1px;
  text-decoration: none;
  vertical-align: super;
  line-height: 1.4;
  border-radius: var(--radius);
}
.citation-ref:hover { background: var(--teal); color: #fff; }

/* streaming cursor */
.cursor {
  display: inline-block;
  width: 7px;
  height: 1em;
  background: var(--teal);
  vertical-align: -0.15em;
  margin-left: 2px;
  animation: blink 0.9s steps(2) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ---------- composer (in-card, not fixed) ---------- */
.composer {
  flex-shrink: 0;
  padding: 14px 20px 20px;
  border-top: 1px solid var(--hairline);
  background: var(--paper);
}
.composer-inner {
  background: #fff;
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius-soft);
  padding: 12px 14px 8px;
  box-shadow: 0 1px 0 rgba(28,28,28,0.02);
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
.composer-inner:focus-within {
  border-color: var(--hairline-strong);
  box-shadow: 0 1px 0 rgba(28,28,28,0.02), 0 12px 32px rgba(28,28,28,0.08);
}
.composer textarea {
  width: 100%;
  resize: none;
  background: transparent;
  border: 0;
  outline: 0;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  padding: 2px 2px;
  max-height: 220px;
  overflow-y: auto;
}
.composer textarea::placeholder { color: var(--muted-2); }
.composer-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.spacer { flex: 1; }

/* foot — minimal */
.composer-foot {
  max-width: var(--max-w);
  margin: 8px auto 0;
  padding: 0 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 0;
  color: var(--muted-2);
}
.foot-mark { color: var(--muted); }
.foot-sep { color: var(--hairline-strong); }

/* ---------- pills ---------- */
.pill {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--hairline-strong);
  padding: 4px 10px;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 12.5px;
  letter-spacing: 0;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  border-radius: var(--radius-pill);
  transition: color 120ms ease, border-color 120ms ease, background 120ms ease;
}
.pill:hover { color: var(--ink); border-color: var(--muted-2); }
.pill.toggle.on {
  color: var(--teal);
  border-color: var(--teal);
  background: var(--teal-light);
}
.pill.stop { color: var(--rust); border-color: var(--rust); }
.pill.ghost { background: transparent; }
.pill.primary {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.pill.primary:hover { background: var(--ink-soft); border-color: var(--ink-soft); }
select.pill {
  padding-right: 24px;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 12px) 50%, calc(100% - 7px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  background-color: transparent;
}
.kbd {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 1px 6px;
  background: var(--paper);
  border: 1px solid var(--hairline);
  color: var(--ink);
  border-radius: var(--radius);
}

.sendbtn {
  width: 34px;
  height: 34px;
  padding: 0;
  background: var(--ink);
  color: #fff;
  border: 1px solid var(--ink);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 120ms ease;
  border-radius: var(--radius-pill);
}
.sendbtn:hover { background: var(--ink-soft); border-color: var(--ink-soft); }
.sendbtn:disabled { opacity: 0.35; cursor: not-allowed; }

/* ---------- dialogs ---------- */
.dialog {
  display: none;
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(520px, 92vw);
  max-height: 86vh;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius-soft);
  padding: 0;
  z-index: 1000;
  box-shadow: 0 24px 64px rgba(28, 28, 28, 0.24);
}
.dialog.is-open { display: block; }
.iconbtn svg, .pill svg, button svg { pointer-events: none; }
body.modal-open { overflow: hidden; }
body.modal-open::before {
  content: '';
  position: fixed;
  inset: 0;
  background: rgba(28, 28, 28, 0.45);
  backdrop-filter: blur(4px);
  z-index: 999;
  pointer-events: none;
}
.dialog-inner {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px 20px 20px;
  overflow-y: auto;
  max-height: 86vh;
}
.dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.dialog-head h2 {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--ink);
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field.row { flex-direction: row; align-items: center; gap: 10px; cursor: pointer; }
.field-label {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.field input[type="password"],
.field input[type="text"],
.field textarea {
  background: #fff;
  border: 1px solid var(--hairline-strong);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 14px;
  padding: 9px 12px;
  outline: 0;
  width: 100%;
  border-radius: var(--radius);
}
.field textarea {
  font-family: var(--font-sans);
  font-size: 14px;
  resize: vertical;
  line-height: 1.5;
}
.field input:focus, .field textarea:focus { border-color: var(--teal); }
.field-hint {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}
.field-hint strong { color: var(--ink); font-weight: 600; }
.dialog-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 4px;
}
.dialog-foot {
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid var(--hairline);
}
.textbtn {
  background: transparent;
  border: 0;
  color: var(--muted);
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 12px;
  cursor: pointer;
  padding: 4px 0;
}
.textbtn:hover { color: var(--ink); }
.textbtn.danger { color: var(--rust); }
.textbtn.danger:hover { color: #c04040; }

.threads { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; }
.threads li { border-top: 1px solid var(--hairline); }
.threads li:last-child { border-bottom: 1px solid var(--hairline); }
.thread-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 4px;
  cursor: pointer;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 14px;
}
.thread-row .ttitle { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thread-row .tdate { font-family: var(--font-mono); font-size: 11px; color: var(--muted-2); }
.thread-row.active { color: var(--teal); font-weight: 600; }
.thread-del { background: transparent; border: 0; color: var(--muted-2); cursor: pointer; padding: 4px 6px; }
.thread-del:hover { color: var(--rust); }

.errtoast {
  background: #fff;
  border-left: 2px solid var(--rust);
  color: var(--ink);
  padding: 10px 12px;
  font-size: 13.5px;
  border-radius: var(--radius);
}

/* ---------- app footer (under card) ---------- */
.appfoot {
  padding: 4px 4px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 11px;
  color: var(--muted-2);
  flex-shrink: 0;
}
.foot-mark { color: var(--muted); }
.foot-sep { color: var(--hairline-strong); }

@media (max-width: 640px) {
  .app { padding: 12px 12px 16px; gap: 8px; }
  .empty-title { font-size: 28px; }
  .chat { padding: 20px 18px 8px; }
  .composer { padding: 12px 14px 14px; }
  .card { min-height: 420px; max-height: calc(100dvh - var(--topbar-h) - 80px); }
}

/* --- Nippy additions (v3.3) --- */
.tagline {
  margin: 14px 0 0;
  font-size: 13px;
  color: #6b6b6b;
  letter-spacing: 0.01em;
  font-weight: 400;
}
.status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11px;
  color: #5a5a5a;
  background: transparent;
  border: 1px solid rgba(0,0,0,0.08);
  user-select: none;
}
.status-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #c8c8c8;
  box-shadow: 0 0 0 0 rgba(0,0,0,0);
  transition: background 0.2s;
}
.status-dot[data-state="ok"]      { background: #16a34a; }
.status-dot[data-state="off"]     { background: #dc2626; }
.status-dot[data-state="probing"] { background: #f59e0b; }
.status-text { font-variant-numeric: tabular-nums; }

/* Recommended roster cards */
.roster {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 6px;
}
.roster-card {
  display: block;
  text-align: left;
  padding: 12px 14px;
  border: 1px solid rgba(0,0,0,0.10);
  border-radius: 10px;
  background: #FBFAF5;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s, background 0.15s, transform 0.05s;
}
.roster-card:hover {
  border-color: #0E7A82;
  background: #F5F1E8;
}
.roster-card:active { transform: translateY(1px); }
.roster-card.is-active {
  border-color: #0E7A82;
  background: #EEF6F6;
}
.roster-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}
.roster-name {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-weight: 600;
  font-size: 14px;
  color: #171614;
}
.roster-badge {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 999px;
  background: #0E7A82;
  color: #FBFAF5;
}
.roster-badge.alt {
  background: transparent;
  color: #0E7A82;
  border: 1px solid #0E7A82;
}
.roster-badge.warn {
  background: transparent;
  color: #8A5A2B;
  border: 1px solid #C9A66B;
}
.roster-meta {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 11px;
  color: #5a5a5a;
  margin-bottom: 4px;
}
.roster-note {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 13px;
  line-height: 1.35;
  color: #2c2b28;
}

/* ---------- Roster tier filter ---------- */
.roster-filter {
  display: inline-flex;
  gap: 4px;
  padding: 3px;
  margin: 8px 0 4px;
  border: 1px solid rgba(0,0,0,0.10);
  border-radius: 999px;
  background: #FBFAF5;
}
.roster-filter button {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 4px 12px;
  border-radius: 999px;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: #5a5a5a;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.roster-filter button:hover { color: #171614; }
.roster-filter button.is-active {
  background: #0E7A82;
  color: #FBFAF5;
}
.roster-card.is-hidden { display: none; }

/* Termux-open button */
.termux-open {
  margin-top: 12px;
  width: 100%;
  justify-content: center;
}

/* ---------- Termux dialog ---------- */
.termux-inner {
  max-width: 720px;
}
.termux-lede {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 14px;
  line-height: 1.5;
  color: #2c2b28;
  margin: 4px 0 16px;
}
.termux-block {
  margin: 14px 0;
  padding: 12px 14px;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 10px;
  background: #FBFAF5;
}
.termux-block h3 {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #0E7A82;
  margin: 0 0 8px;
  letter-spacing: 0.01em;
}
.termux-block p {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 13px;
  line-height: 1.5;
  color: #2c2b28;
  margin: 6px 0;
}
.termux-block code {
  font-family: 'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;
  font-size: 12px;
  background: rgba(14,122,130,0.08);
  color: #0E5A60;
  padding: 1px 5px;
  border-radius: 4px;
}
.termux-block pre {
  position: relative;
  background: #171614;
  color: #E4E4E7;
  padding: 12px 14px;
  padding-right: 60px;
  border-radius: 8px;
  overflow-x: auto;
  font-family: 'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;
  font-size: 12px;
  line-height: 1.5;
  margin: 8px 0;
}
.termux-block pre code {
  background: transparent;
  color: inherit;
  padding: 0;
  font-size: inherit;
}
.termux-block pre[data-copy]::after {
  content: attr(data-copy-label, "copy");
}
.termux-block .copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  appearance: none;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.06);
  color: #E4E4E7;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.termux-block .copy-btn:hover {
  background: rgba(14,122,130,0.25);
  border-color: #2DD4BF;
}
.termux-block .copy-btn.ok {
  background: #0E7A82;
  border-color: #0E7A82;
}
.termux-block details {
  margin-top: 8px;
}
.termux-block details summary {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 12px;
  color: #0E7A82;
  cursor: pointer;
  padding: 4px 0;
}
.termux-block details[open] summary { margin-bottom: 4px; }
.termux-hint {
  font-size: 12px !important;
  color: #5a5a5a !important;
}
.termux-list {
  padding-left: 18px;
  margin: 4px 0;
}
.termux-list li {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 13px;
  line-height: 1.6;
  color: #2c2b28;
}
.termux-foot {
  background: #F0EDE4;
  border-color: rgba(0,0,0,0.06);
}
