/*
======================================================================
  GAME TOOLS  -  LOOK AND FEEL  (tools/shared/tools.css)
======================================================================
  The look of the tools list (tools/index.html), each game's tools page (5150 now, other games
  later) and any simple tool page: the same cyberpunk console style as
  the 5150 tools, in the Arjade green-and-purple colours, on the
  black scales background, with hazard-stripe dividers.

  These pages load ONLY this file (not the main site's css/style.css),
  so the tools area has its own look. To change a colour everywhere in
  the tools area, change it in section 1.

  (The Character Generator has its own, bigger file, characters.css,
  with its colour scheme choices. Keep the two looking alike.)
======================================================================
*/


/* ------------------------------------------------------------------
   1. FONTS AND COLOURS
   Fonts are free for commercial use (SIL Open Font License; the
   licences sit next to them in tools/shared/fonts/).
------------------------------------------------------------------ */
@font-face {
  font-family: "Orbitron";
  src: url("fonts/Orbitron.ttf") format("truetype");
  font-weight: 400 900;
  font-display: swap;
}
@font-face {
  font-family: "Share Tech Mono";
  src: url("fonts/ShareTechMono.ttf") format("truetype");
  font-display: swap;
}

:root {
  --font-heading: "Orbitron", "Segoe UI", sans-serif;     /* titles          */
  --font-text:    "Share Tech Mono", Consolas, monospace; /* everything else */

  /* The Arjade colours, the same as the 5150 tools' default scheme
     (tools/5150/shared/console.css, "Arjade"): the main site's emerald
     and dark grey, with the user's purple (R197 G3 B211). Changed from
     Amber terminal on 30 Oct 2026. */
  --ink:      #6fd08a;                  /* glowing green: titles, links, buttons */
  --ink-dim:  #5aa871;                  /* quieter green                         */
  --accent:   #c503d3;                  /* purple highlights (hovers, labels)    */
  --glow:     rgba(111, 208, 138, 0.35);/* the soft glow around titles           */
  --text:     #dfe2dc;                  /* main words                            */
  --soft:     #a4aaa3;                  /* labels and small print                */
  --frame:    #555a61;                  /* plain grey frame lines                */
  --panel:    rgba(28, 29, 31, 0.92);   /* the boxes' dark grey background       */
  --well:     #141516;                  /* inside typing boxes                   */
  --on-ink:   #1c1d1f;                  /* writing on a green or purple button   */
}


/* ------------------------------------------------------------------
   2. THE PAGE
------------------------------------------------------------------ */
* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: var(--font-text);
  font-size: 17px;
  line-height: 1.5;
  /* The main site's black scales picture, darkened. The path is from
     this file (tools/shared/) up to the site's images folder. */
  background-color: #0b0c0d;
  background-image:
    linear-gradient(rgba(8, 9, 10, 0.72), rgba(8, 9, 10, 0.72)),
    url("../../images/texture-scales.jpg");
  background-size: auto, cover;
  background-attachment: fixed;
}

a { color: var(--ink); text-underline-offset: 0.2em; }
a:hover { color: var(--accent); }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* The middle column everything sits in. */
.tools-page {
  max-width: 60rem;
  margin: 0 auto;
  padding: 24px 16px 40px;
}

/* The top: logo (tools list only), trail of links, big title, intro. */
.tools-crest { display: block; width: 120px; margin: 0 auto 12px; }
.tools-crest img { display: block; width: 100%; height: auto; }

.tool-trail { margin: 0 0 6px; font-size: 14px; color: var(--soft); }

h1 {
  margin: 0 0 10px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(26px, 5vw, 40px);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  text-shadow: 0 0 12px var(--glow);
}
.intro { margin: 0 0 18px; max-width: 46rem; }


/* ------------------------------------------------------------------
   3. HAZARD-STRIPE DIVIDER
   The picture is made from the user's tools/2045.jpg by
   tools/5150/scripts/make-hazard-strip.py. Change "height" to make
   the strip thicker or thinner.
------------------------------------------------------------------ */
.hazard-strip {
  height: 16px;
  margin: 18px 0;
  background: #111 url("images/hazard-strip.jpg") repeat-x left center;
  background-size: auto 100%;
  border-top: 1px solid var(--frame);
  border-bottom: 1px solid var(--frame);
}


/* ------------------------------------------------------------------
   4. A GAME SYSTEM AND ITS LIST OF TOOLS
   (on the tools list and each game's tools page)
------------------------------------------------------------------ */
.system {
  background: var(--panel);
  border: 1px solid var(--frame);
  padding: 14px 16px 6px;
  margin-bottom: 18px;
}
/* The game's name (e.g. "5150") is in the purple highlight colour. */
.system h2 {
  margin: 0 0 4px;
  font-family: var(--font-heading);
  font-size: 22px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}
.system h2 a { color: var(--accent); text-decoration: none; }
.system h2 a:hover { text-shadow: 0 0 10px var(--glow); }
.system > p { margin: 0 0 10px; color: var(--soft); }

.tool-list { list-style: none; margin: 10px 0; padding: 0; }
.tool-list li {
  border: 1px solid #3c4148;
  border-left: 3px solid var(--ink);
  background: rgba(0, 0, 0, 0.45);
  padding: 10px 14px;
  margin-bottom: 10px;
}
.tool-list h2,
.tool-list h3 {
  margin: 0 0 4px;
  font-family: var(--font-heading);
  font-size: 17px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}
.tool-list h2 a,
.tool-list h3 a { color: var(--ink); }
.tool-list h2 a:hover,
.tool-list h3 a:hover { color: var(--accent); text-shadow: 0 0 10px var(--glow); }
.tool-list p { margin: 0; }

/* The small break between two groups of tools, with a quiet label. */
.tool-list-break {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0 8px;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--soft);
}
.tool-list-break::before,
.tool-list-break::after { content: ""; flex: 1; border-top: 1px dashed var(--frame); }

/* THE TOOLS TERMINAL: the tab bar and groups sit in a terminal frame like
   the terminal tools' (5150/shared/console.css): rounded glass with a
   bezel, faint scan lines, the Arjade line across the top and the
   NHC-NET status line (the open tab shows on its right). */
.tools-terminal {
  position: relative;
  margin: 12px 0 8px;
  padding: 12px 16px 14px;
  background: #101112;
  border: 2px solid #4a4f56;
  border-radius: 14px;
  box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.55), 0 0 0 6px #121315, 0 0 0 7px #3a3d42, 0 10px 34px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}
.tools-terminal::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(111, 208, 138, 0.025) 0 1px, transparent 1px 3px);
}
.tools-terminal .term-brand {
  display: block;
  margin-bottom: 6px;
  font-family: var(--font-heading);
  font-size: 14px;
  letter-spacing: 0.22em;
  text-align: center;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
  text-shadow: 0 0 8px var(--glow);
}
.tools-terminal .term-brand:hover { color: var(--ink); }
.tools-terminal .term-brand .web { text-transform: none; letter-spacing: 0.12em; }
.tools-terminal .term-status {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 16px;
  padding-bottom: 6px;
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  border-bottom: 1px solid rgba(111, 208, 138, 0.35);
}
.tools-terminal .term-where { color: var(--accent); }
@media (max-width: 600px) {
  .tools-terminal { padding: 10px 10px 12px; }
  .tools-terminal .term-brand .long { display: none; }   /* just the web address on phones */
}
/* TABS: the groups of tools work like a terminal's tabs (the script at
   the bottom of each tools page builds the tab bar and adds "has-tabs" to
   the page). One group shows at a time, inside a green-edged panel with
   a "> GROUP" prompt line. Without the script, every group just shows. */
.tool-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin: 14px 0 0; border-bottom: 2px solid var(--ink); }
.tool-tabs[hidden] { display: none; }
.tool-tabs button {
  font-family: var(--font-text); font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--soft); background: var(--well); border: 1px solid var(--frame); border-bottom: none;
  padding: 7px 12px 5px; cursor: pointer;
}
.tool-tabs button:hover { color: var(--ink); border-color: var(--ink); }
.tool-tabs button[aria-selected="true"] { color: var(--on-ink); background: var(--ink); border-color: var(--ink); box-shadow: 0 0 10px var(--glow); }
.tool-tabs button:focus-visible { outline: 1px dashed var(--accent); outline-offset: 2px; }
.has-tabs .tool-group { border: 1px solid var(--ink); border-top: none; padding: 12px 12px 2px; background: rgba(0, 0, 0, 0.35); }
.has-tabs .tool-group[hidden] { display: none; }
/* The group's label becomes a terminal prompt: "> SHEETS ----". */
.has-tabs .tool-group > .tool-list-break { margin: 0 0 10px; color: var(--ink-dim); }
.has-tabs .tool-group > .tool-list-break::before { content: ">"; flex: none; border: none; color: var(--accent); }

/* A tool that is not built yet: dimmer, with a grey edge. */
.tool-list li.not-ready { border-left-color: var(--frame); }
.tool-list li.not-ready h2,
.tool-list li.not-ready h3,
.tool-list li.not-ready p { color: var(--soft); }

/* The "Coming soon" label beside a tool's name. */
.status-label {
  display: inline-block;
  vertical-align: middle;
  margin-left: 8px;
  padding: 1px 6px;
  font-family: var(--font-text);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--soft);
  border: 1px solid var(--frame);
}

/* "Start afresh": the Reset all 5150 tools box. */
.reset-box { background: var(--panel); border: 1px solid var(--frame); border-left: 3px solid var(--accent); padding: 12px 16px; margin-bottom: 18px; }
.system .reset-box { margin: 10px 0; }
.reset-box h2, .reset-box h3.reset-title { margin: 0 0 6px; font-family: var(--font-heading); font-size: 18px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.reset-box p { margin: 0 0 10px; }
.reset-box b { color: var(--accent); font-weight: normal; }
.reset-note { min-height: 1.4em; color: var(--ink); }

/* Small print and the links at the bottom of the page. */
.small-print { font-size: 14px; color: var(--soft); }
.page-links { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 10px; }


/* ------------------------------------------------------------------
   5. DICE RESULTS (for future tools)
------------------------------------------------------------------ */
.roll-result {
  background: var(--panel);
  border: 1px solid var(--frame);
  padding: 12px 14px;
  margin: 14px 0;
}
/* One die face, drawn as a small square with the number in it. */
.die {
  display: inline-grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  margin: 0 0.3rem 0.3rem 0;
  font-weight: 700;
  color: var(--ink);
  background: var(--well);
  border: 1px solid var(--ink);
}
/* A die that passed a test glows; one that didn't is grey (never red). */
.die.passed { background: var(--ink); color: var(--on-ink); box-shadow: 0 0 8px var(--glow); }
.die.failed { color: var(--soft); border-color: var(--frame); }


/* ------------------------------------------------------------------
   6. TABLES OF RESULTS (for future tools)
   On a phone, a wide table scrolls sideways inside its own box.
------------------------------------------------------------------ */
.table-scroll { overflow-x: auto; margin: 14px 0; }
.rules-table { width: 100%; border-collapse: collapse; }
.rules-table th,
.rules-table td {
  text-align: left;
  vertical-align: top;
  padding: 6px 10px;
  border-bottom: 1px solid #3c4148;
}
.rules-table th {
  font-family: var(--font-heading);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  white-space: nowrap;
}
/* The row matching the latest roll is lit up. */
.rules-table tr.is-rolled td { background: rgba(111, 208, 138, 0.16); color: var(--accent); }


/* ------------------------------------------------------------------
   7. FORM BOXES AND BUTTONS (for future tools)
------------------------------------------------------------------ */
.field { margin-bottom: 14px; }
.field label { display: block; margin-bottom: 4px; color: var(--soft); }
.field input,
.field select,
.field textarea {
  width: 100%;
  font: inherit;
  color: var(--text);
  background: var(--well);
  border: 1px solid #5d636b;
  border-radius: 2px;
  padding: 6px 8px;
}
.field input[type="number"] { max-width: 7rem; }

/* Puts several boxes side by side, dropping to one per line on phones. */
.field-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 0 14px;
}

button, .button {
  display: inline-block;
  font-family: var(--font-text);
  font-size: 15px;
  color: var(--on-ink);
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 2px;
  padding: 7px 12px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-decoration: none;
}
button:hover, .button:hover { background: var(--accent); border-color: var(--accent); color: var(--on-ink); }


/* ------------------------------------------------------------------
   8. HELP PAGES (each tool's "Full instructions", e.g.
   5150/characters/help.html): a contents list, then one boxed
   section per topic.
------------------------------------------------------------------ */
.version-tag {
  display: inline-block;
  vertical-align: middle;
  margin-left: 6px;
  padding: 1px 7px;
  font-family: var(--font-text);
  font-weight: normal;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: none;
  text-shadow: none;
  color: var(--soft);
  border: 1px solid var(--frame);
}
.help-contents {
  background: var(--panel);
  border: 1px solid var(--frame);
  padding: 10px 16px;
  margin-bottom: 18px;
}
.help-contents ol { margin: 6px 0; padding-left: 1.4em; columns: 2 16rem; column-gap: 2rem; }
.help-contents li { margin-bottom: 3px; }
.help-section {
  background: var(--panel);
  border: 1px solid var(--frame);
  border-left: 3px solid var(--ink);
  padding: 12px 16px 6px;
  margin-bottom: 16px;
  scroll-margin-top: 12px;
}
.help-section h2 {
  margin: 0 0 8px;
  font-family: var(--font-heading);
  font-size: 18px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
}
.help-section h3 {
  margin: 14px 0 4px;
  font-family: var(--font-heading);
  font-size: 14px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}
.help-section p, .help-section ul, .help-section ol { margin: 0 0 10px; }
.help-section li { margin-bottom: 4px; }
/* A button's name, written the way it looks on the tool. */
.btn-name {
  display: inline-block;
  padding: 0 6px;
  font-size: 0.9em;
  color: var(--on-ink);
  background: var(--ink);
  border-radius: 2px;
  white-space: nowrap;
}
/* A handy hint inside a section. */
.tip { padding: 8px 12px; border: 1px dashed var(--frame); color: var(--soft); }
.tip b { color: var(--accent); font-weight: normal; }


/* ------------------------------------------------------------------
   9. PHONES
------------------------------------------------------------------ */
@media (max-width: 600px) {
  body { font-size: 16px; }
  .system { padding: 12px 12px 4px; }
  .tool-list li { padding: 9px 11px; }
}
