/* volcano.css — standalone terminal theme + Web Bluetooth control-panel styles.
   No build step, no framework: one stylesheet, one script, plain HTML. */

:root {
  --accent: #e08a3c;
  --bg:     #0a0a0a;
  --panel:  #0a140d;
  --edge:   #1f3a2a;
  --text:   #b0b0b0;
}
* { box-sizing: border-box; }
body {
  margin: 0 auto;
  max-width: 46rem;
  padding: 1.4rem 1.1rem 4rem;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.6 ui-monospace, "JetBrains Mono", "Cascadia Code", "SFMono-Regular", Menlo, Consolas, monospace;
}
a { color: var(--accent); }
h1, h2 { color: var(--accent); font-weight: 600; letter-spacing: 0.02em; line-height: 1.25; }
h1 { font-size: 1.35rem; margin: 1.3rem 0 0.4rem; }
h2 { font-size: 1.05rem; margin: 2rem 0 0.5rem; }
img.banner { display: block; width: 100%; height: auto; border: 1px solid var(--edge); border-radius: 8px; }
pre { white-space: pre-wrap; word-wrap: break-word; margin: 0.8rem 0; }
code { color: var(--accent); }
strong.term { color: var(--accent); }
.sub { opacity: 0.72; }
hr { border: 0; border-top: 1px solid var(--edge); margin: 1.6rem 0; }

/* keyboard focus — a visible amber ring. :focus-visible fires only for keyboard
   (and other non-pointer) focus, so mouse/touch users see no change. The
   terminal input keeps its borderless look; its container lights up instead. */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.v-term-in:focus-visible { outline: none; }
.v-term:focus-within { border-color: var(--accent); }

.v-panel { max-width: 34rem; margin: 1rem 0; }

.v-readout {
  display: flex;
  gap: 1rem;
  margin: 1rem 0;
}
.v-readout .v-cell {
  flex: 1;
  border: 1px solid #1f3a2a;
  border-radius: 6px;
  padding: 0.6rem 0.8rem;
  background: #0a140d;
}
.v-readout .v-cell .v-label {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.7;
}
.v-readout .v-cell .v-value {
  font-size: 1.9rem;
  line-height: 1.1;
  color: var(--accent, #e08a3c);
}

.v-row { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; margin: 0.8rem 0; }
.v-row .v-rowlabel { min-width: 5.5rem; opacity: 0.85; }

.v-btn {
  font: inherit;
  cursor: pointer;
  color: var(--accent, #e08a3c);
  background: #0a140d;
  border: 1px solid var(--accent, #e08a3c);
  border-radius: 6px;
  padding: 0.5rem 0.9rem;
}
.v-btn:hover:not(:disabled) { background: #10251a; }
.v-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.v-btn.wide { min-width: 9.5rem; }

.v-step {
  font: inherit;
  cursor: pointer;
  width: 2.6rem;
  height: 2.6rem;
  color: var(--accent, #e08a3c);
  background: #0a140d;
  border: 1px solid var(--accent, #e08a3c);
  border-radius: 6px;
  font-size: 1.3rem;
}
.v-step:disabled { opacity: 0.4; cursor: not-allowed; }

.v-presets { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.v-preset {
  font: inherit;
  cursor: pointer;
  color: var(--accent, #e08a3c);
  background: #0a140d;
  border: 1px solid #1f3a2a;
  border-radius: 6px;
  padding: 0.35rem 0.55rem;
  min-width: 3.4rem;
}
.v-preset:hover:not(:disabled) { border-color: var(--accent, #e08a3c); background: #10251a; }
.v-preset:disabled { opacity: 0.4; cursor: not-allowed; }
/* edit mode: chips become removable, tinted amber to signal "tap to delete" */
.v-preset.v-preset-editing { color: #e0a800; border-color: #6b5510; }
.v-preset.v-preset-editing:hover { color: #ff9a9a; border-color: #ff6b6b; background: #2a1414; }

/* small icon button to toggle preset editing */
.v-mini {
  font: inherit;
  cursor: pointer;
  color: var(--accent, #e08a3c);
  background: #0a140d;
  border: 1px solid #1f3a2a;
  border-radius: 6px;
  padding: 0.3rem 0.5rem;
  line-height: 1;
}
.v-mini:hover { border-color: var(--accent, #e08a3c); background: #10251a; }
.v-mini.active { background: var(--accent, #e08a3c); color: #04140c; border-color: var(--accent, #e08a3c); }

.v-preset-editor { margin: 0.2rem 0 0.6rem; }
.v-preset-help { opacity: 0.75; font-size: 0.85rem; line-height: 1.5; margin: 0.4rem 0; max-width: 32rem; }
.v-preset-help em { font-style: normal; color: var(--accent, #e08a3c); }

.v-num {
  font: inherit;
  width: 4.5rem;
  color: var(--accent, #e08a3c);
  background: #0a140d;
  border: 1px solid var(--accent, #e08a3c);
  border-radius: 6px;
  padding: 0.45rem 0.5rem;
}
.v-num:disabled { opacity: 0.4; }
.v-unit { opacity: 0.75; }
.v-hint { opacity: 0.75; font-size: 0.85rem; }  /* 0.75 keeps hints >= 4.5:1 on the dark bg (WCAG AA); 0.6 fell to ~3.9:1 */

.v-check { display: inline-flex; align-items: center; gap: 0.35rem; opacity: 0.85; cursor: pointer; }
.v-check input { accent-color: var(--accent, #e08a3c); }
.v-check input:disabled { opacity: 0.4; }

.v-seg { display: inline-flex; border: 1px solid #1f3a2a; border-radius: 6px; overflow: hidden; }
.v-segbtn {
  font: inherit;
  cursor: pointer;
  color: var(--accent, #e08a3c);
  background: #0a140d;
  border: 0;
  border-left: 1px solid #1f3a2a;
  padding: 0.4rem 0.85rem;
}
.v-segbtn:first-child { border-left: 0; }
.v-segbtn.active { background: var(--accent, #e08a3c); color: #04140c; }
.v-segbtn:hover:not(:disabled):not(.active) { background: #10251a; }
.v-segbtn:disabled { opacity: 0.4; cursor: not-allowed; }

.v-led {
  display: inline-block;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: #2a2a2a;
  border: 1px solid #444;
  vertical-align: middle;
}
.v-led.on {
  background: var(--accent, #e08a3c);
  border-color: var(--accent, #e08a3c);
  box-shadow: 0 0 6px var(--accent, #e08a3c);
}

#v-status {
  margin-top: 0.8rem;
  padding: 0.5rem 0.7rem;
  border-left: 3px solid #1f3a2a;
  background: #0a140d;
  min-height: 1.2rem;
}
#v-status[data-kind="ok"]   { border-left-color: var(--accent, #e08a3c); }
#v-status[data-kind="warn"] { border-left-color: #e0a800; }
#v-status[data-kind="err"]  { border-left-color: #ff6b6b; color: #ff9a9a; }

.v-note { color: #ff6b6b; }
.v-error {
  margin: 0.7rem 0 0;
  padding: 0.5rem 0.7rem;
  border-left: 3px solid #ff6b6b;
  background: #2a1414;
  color: #ff9a9a;
}

/* ---- workflow editor ---- */
.v-wf-bar { display: flex; gap: 0.5rem; margin: 0.5rem 0 0.8rem; flex-wrap: wrap; }
.v-wf-card {
  border: 1px solid #1f3a2a; border-radius: 8px;
  padding: 0.7rem; margin: 0.7rem 0; background: #0a140d;
}
.v-wf-card.running { border-color: var(--accent, #e08a3c); }
.v-wf-head { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.v-wf-name {
  flex: 1; min-width: 8rem; font: inherit; color: var(--accent, #e08a3c);
  background: #04140c; border: 1px solid #1f3a2a; border-radius: 6px; padding: 0.4rem 0.5rem;
}
.v-wf-run {
  margin: 0.5rem 0; padding: 0.4rem 0.6rem; font-size: 0.9rem;
  border-left: 3px solid var(--accent, #e08a3c); background: #04140c;
}
.v-wf-actions { margin: 0.6rem 0; }
.v-wf-action { border: 1px solid #14261a; border-radius: 6px; padding: 0.5rem; margin: 0.4rem 0; }
.v-wf-acthead { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; }
.v-wf-num { color: var(--accent, #e08a3c); font-size: 0.85rem; }
.v-wf-actctrls { display: flex; gap: 0.3rem; }
.v-wf-actbody { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; margin-top: 0.4rem; }
.v-wf-type {
  font: inherit; color: var(--accent, #e08a3c); background: #04140c;
  border: 1px solid #1f3a2a; border-radius: 6px; padding: 0.35rem 0.4rem;
}
.v-wf-params { display: inline-flex; gap: 0.35rem; align-items: center; flex-wrap: wrap; }
.v-wf-plabel { opacity: 0.7; font-size: 0.85rem; }
.v-wf-cond { display: flex; flex-direction: column; gap: 0.4rem; width: 100%; margin-top: 0.4rem; }
.v-wf-condrow { display: flex; gap: 0.35rem; align-items: center; flex-wrap: wrap; }
.v-wf-card .v-num { width: 4rem; }
.v-wf-del { color: #ff9a9a; border-color: #6b1f1f; }
.v-wf-del:hover:not(:disabled) { background: #2a1414; border-color: #ff6b6b; }
.v-wf-add, .v-wf-addcond { width: 100%; }

/* ---- help / FAQ ---- */
.v-faq details {
  border: 1px solid #1f3a2a; border-radius: 6px;
  margin: 0.4rem 0; background: #0a140d;
}
.v-faq summary {
  cursor: pointer; padding: 0.55rem 0.8rem;
  color: var(--accent, #e08a3c); list-style: none;
}
.v-faq summary::-webkit-details-marker { display: none; }
.v-faq summary::before { content: "\25b8\00a0"; }          /* ▸ */
.v-faq details[open] summary::before { content: "\25be\00a0"; } /* ▾ */
.v-faq summary:hover { background: #10251a; }
.v-faq p { margin: 0 0 0.6rem; padding: 0 0.9rem; opacity: 0.9; }

/* ---- tabs ---- */
.v-appbar { margin-bottom: 0.5rem; }
.v-tabs {
  display: flex; gap: 0.25rem; flex-wrap: wrap; align-items: flex-end;
  border-bottom: 1px solid var(--edge); margin: 1rem 0 0.9rem;
}
.v-tab {
  font: inherit; cursor: pointer;
  color: var(--text); background: transparent;
  border: 1px solid transparent; border-bottom: none;
  border-radius: 6px 6px 0 0;
  padding: 0.5rem 0.9rem; opacity: 0.65;
  text-decoration: none;
}
.v-tab:hover { opacity: 1; }
.v-tab.active {
  color: var(--accent); opacity: 1;
  border-color: var(--edge); background: var(--panel);
  margin-bottom: -1px;                 /* sit on top of the row's border */
}
.v-tab-link { margin-left: auto; }     /* push Help to the right */
.v-tabpanel { margin: 0.4rem 0; }
.v-subhead {
  font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.08em;
  opacity: 0.85; margin: 1.1rem 0 0.4rem;
}

/* ---- console / terminal ---- */
.v-term {
  border: 1px solid var(--edge); border-radius: 8px;
  background: #050505; padding: 0.6rem 0.7rem; font-size: 0.9rem;
}
.v-term-out {
  max-height: 22rem; min-height: 6rem; overflow-y: auto;
  white-space: pre-wrap; word-break: break-word; margin-bottom: 0.4rem;
}
.v-term-line { line-height: 1.45; }
.v-term-cmd { color: var(--text); }
.v-term-prompt { color: var(--accent, #e08a3c); font-weight: 600; }
.v-term-ok   { color: #8fd06a; }   /* terminal-green success */
.v-term-err  { color: #ff9a9a; }
.v-term-warn { color: #e0a800; }
.v-term-dim  { opacity: 0.6; }
.v-term-sys  { color: var(--accent, #e08a3c); opacity: 0.75; }
.v-term-form {
  display: flex; align-items: baseline; gap: 0.4rem;
  border-top: 1px solid var(--edge); padding-top: 0.4rem;
}
.v-term-in {
  flex: 1; font: inherit; color: var(--accent, #e08a3c);
  background: transparent; border: 0; outline: none;
  caret-color: var(--accent, #e08a3c);
}

/* Hide the live controls until connected is not required — JS toggles state. */
