/* ShellGrove (P4c SAMPLE, 2026-11-19): commands in task text and hints. Used with app/richtext.js (renderRich).
   Load it AFTER shellgrove.css. The code font is JetBrains Mono, which shellgrove.css already loads (--sg-mono).
   Dark is the default; html.light overrides the colors, the same way as app/vmscreen.css.
   Colors are VS Code Dark+ / Light+ (decoration only). Every one reaches 4.5:1 on the chip, the task and the hint
   backgrounds in both themes (checked by tests/browser/samples/task_code_sample.mjs). */
:root{
  --rt-bg:var(--sg-term-bg,#141024);--rt-line:var(--sg-border,#2E2649);
  --rt-fg:#D4D4D4;--rt-cmd:#DCDCAA;--rt-flag:#9CDCFE;--rt-arg:#CE9178;
  --rt-fill:var(--sg-accent-tx,#CDBDFF);--rt-fill-bg:rgba(167,139,250,.22);
}
html.light{
  --rt-fg:#1F1F1F;--rt-cmd:#795E26;--rt-flag:#0451A5;--rt-arg:#A31515;
  --rt-fill:var(--sg-accent-tx,#5B21B6);--rt-fill-bg:rgba(106,47,216,.15);
}

.rt-code{
  font:400 12.5px/1.2 var(--sg-mono,"JetBrains Mono",Consolas,monospace);
  font-variant-ligatures:none;letter-spacing:0;
  color:var(--rt-fg);background:var(--rt-bg);border:1px solid var(--rt-line);border-radius:5px;
}
/* a word never splits; the only breaks are the spaces between words */
.rt-w{white-space:nowrap}
/* a plain hyphenated word in text (Wi-Fi, Host-only) is kept whole too: a line never ends with "Wi-" */
.rt-h{white-space:nowrap}
/* a flag and its value (-p tcp) are one unit: a line never ends with the flag alone */
.rt-g{white-space:nowrap}
/* last resort for one word longer than the box (over 28 letters): it may break inside itself, so nothing scrolls sideways */
.rt-w.rt-long{white-space:normal;overflow-wrap:anywhere}

/* short command: inline chip, kept whole on one line */
.rt-chip{display:inline;padding:0 5px;white-space:nowrap}

/* long command: its own block that fills the width. Lines break at spaces; a wrapped line is indented by 2 characters */
.rt-block{
  display:block;margin:6px 0;padding:7px 9px 7px calc(9px + 2ch);text-indent:-2ch;
  line-height:1.55;white-space:normal;overflow-wrap:normal;word-break:normal;
}
.hint .rt-block:first-child{margin-top:0}
.hint .rt-block:last-child{margin-bottom:0}

.rt-cmd{color:var(--rt-cmd)}
.rt-flag{color:var(--rt-flag)}
.rt-arg{color:var(--rt-arg)}
.rt-op{color:var(--rt-fg)}
/* a stand-in word like <username>: bold on a soft violet patch. The brackets stay, so color is never the only clue */
.rt-fill{color:var(--rt-fill);background:var(--rt-fill-bg);font-weight:700;border-radius:3px;padding:0 2px}
