/* ==========================================================================
   ShadowShells stylesheet.

   Target: a shell-provider site circa 2000-2003 -- EuShells, NordicBots,
   QuakeNet and the rest. The defining traits of that look, all deliberate
   here: a fixed-width centred column sized for an 800x600 screen, a left
   sidebar of navigation boxes, every content block inside a 1px-bordered
   box with a coloured title bar, small Verdana/Tahoma text, dense spacing,
   and bright accent links on a dark ground.

   SINGLE THEME, ON PURPOSE. Sites of this era had exactly one appearance;
   a light/dark toggle is precisely the modern affordance that made the
   previous design read as new. There is therefore no prefers-color-scheme
   block -- but every colour is still declared explicitly, and the body
   paints its own background, so the page never inherits a host theme.
   ========================================================================== */

:root {
  /* Ground: near-black with a blue cast, the way a CRT-era dark site sat. */
  --page:        #0b0d13;
  --box-bg:      #12151f;
  --box-alt:     #171b28;
  --title-bg:    #232a3d;
  --title-bg2:   #1a2032;
  --border:      #333c54;
  --border-lit:  #454f6b;

  --text:        #c3c9d6;
  --text-dim:    #8b93a6;
  --text-bright: #e8ecf4;

  /* Amber title bars, cyan links -- the ShadowShells identity kept, but
     saturated the way period palettes were rather than muted. */
  --accent:      #ffa733;
  --accent-dim:  #c07d24;
  --link:        #7ec8ff;
  --link-hover:  #ffa733;
  --link-visit:  #b39ae0;

  --ok:          #6fcf6f;
  --warn:        #ffc861;
  --bad:         #ff7a6b;

  --mono: "DejaVu Sans Mono", "Courier New", Courier, monospace;
  --ui: Verdana, Tahoma, Geneva, "DejaVu Sans", Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  background: var(--page);
  color: var(--text);
  font-family: var(--ui);
  font-size: 11px;          /* the single biggest "this is 2001" signal */
  line-height: 1.55;
  margin: 0;
  padding: 12px 8px 24px;
}

/* Fixed-width centred column. 780px was the safe width for 800x600. */
#wrap {
  width: 780px;
  max-width: 100%;
  margin: 0 auto;
}

/* -- banner ---------------------------------------------------------------- */
#banner {
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--title-bg) 0%, var(--title-bg2) 100%);
  padding: 10px 12px;
  margin-bottom: 8px;
}

#logo {
  font-family: var(--mono);
  font-size: 22px;
  font-weight: bold;
  letter-spacing: 2px;
  color: var(--accent);
  text-shadow: 0 1px 0 #000;
}

#logo a { color: var(--accent); text-decoration: none; }
#logo a:hover { color: var(--text-bright); }

#slogan {
  color: var(--text-dim);
  font-size: 10px;
  letter-spacing: 0.5px;
  margin-top: 2px;
}

/* -- two columns ------------------------------------------------------------
   Grid, not floats or nested tables: same visual result, none of the
   clearfix hacks the original sites needed. */
#columns {
  display: grid;
  grid-template-columns: 158px 1fr;
  gap: 8px;
  align-items: start;
}

/* -- boxes ------------------------------------------------------------------
   The workhorse of the era: a bordered panel with a coloured title strip. */
.box {
  border: 1px solid var(--border);
  background: var(--box-bg);
  margin-bottom: 8px;
}

.box-title {
  margin: 0;
  padding: 3px 8px;
  font-family: var(--ui);
  font-size: 11px;
  font-weight: bold;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--accent);
  background: linear-gradient(180deg, var(--title-bg) 0%, var(--title-bg2) 100%);
  border-bottom: 1px solid var(--border);
}

.box-body { padding: 10px 12px; }

/* -- sidebar menus --------------------------------------------------------- */
.menu { list-style: none; margin: 0; padding: 4px 0; }

.menu li { margin: 0; }

.menu a {
  display: block;
  padding: 3px 10px;
  color: var(--link);
  text-decoration: none;
  border-left: 3px solid transparent;
}

.menu a::before { content: "\00BB\00A0"; color: var(--text-dim); }

.menu a:hover {
  background: var(--box-alt);
  color: var(--link-hover);
  border-left-color: var(--accent);
}

.menu a.on {
  color: var(--accent);
  font-weight: bold;
  border-left-color: var(--accent);
  background: var(--box-alt);
}

.menu .who {
  padding: 3px 10px;
  color: var(--text-dim);
  font-size: 10px;
}

.menu .who strong { color: var(--text-bright); }

/* -- content typography ----------------------------------------------------- */
#content h1 {
  font-size: 15px;
  color: var(--accent);
  margin: 0 0 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border);
}

#content h2 {
  font-size: 12px;
  color: var(--accent);
  margin: 16px 0 6px;
  padding-bottom: 2px;
  border-bottom: 1px dotted var(--border-lit);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

#content h3 {
  font-size: 11px;
  color: var(--text-bright);
  margin: 12px 0 4px;
}

p { margin: 0 0 8px; }

a { color: var(--link); }
a:visited { color: var(--link-visit); }
a:hover { color: var(--link-hover); }

ul, ol { margin: 0 0 8px; padding-left: 18px; }
li { margin: 0 0 2px; }

code, pre, kbd, samp { font-family: var(--mono); font-size: 11px; }

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

pre {
  background: #080a10;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent-dim);
  padding: 8px 10px;
  overflow-x: auto;
  color: var(--text-bright);
  margin: 0 0 10px;
}

hr { border: none; border-top: 1px solid var(--border); margin: 12px 0; }

/* -- definition lists ------------------------------------------------------- */
dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 2px 14px;
  margin: 0 0 12px;
  border: 1px solid var(--border);
  background: var(--box-alt);
  padding: 8px 10px;
}

dt { color: var(--text-dim); font-family: var(--mono); }
dd { margin: 0; color: var(--text-bright); font-variant-numeric: tabular-nums; }

/* -- tables ----------------------------------------------------------------- */
.table-wrap { overflow-x: auto; margin: 0 0 12px; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  border: 1px solid var(--border);
}

caption { text-align: left; color: var(--text-dim); padding-bottom: 4px; }

th, td { padding: 3px 7px; text-align: left; border: 1px solid var(--border); }

thead th {
  background: linear-gradient(180deg, var(--title-bg) 0%, var(--title-bg2) 100%);
  color: var(--accent);
  font-weight: bold;
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.4px;
}

tbody tr:nth-child(odd) { background: var(--box-alt); }
tbody tr:hover { background: #1d2233; }

/* -- news ------------------------------------------------------------------- */
.news-item {
  border: 1px solid var(--border);
  background: var(--box-alt);
  margin: 0 0 8px;
}

.news-date {
  background: linear-gradient(180deg, var(--title-bg) 0%, var(--title-bg2) 100%);
  border-bottom: 1px solid var(--border);
  padding: 2px 8px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--accent);
}

.news-item p { margin: 0; padding: 8px 10px; }

/* -- forms ------------------------------------------------------------------ */
form { margin: 10px 0; max-width: 34em; }

label {
  display: block;
  margin: 8px 0 2px;
  color: var(--text-bright);
  font-weight: bold;
}

input[type="text"], input[type="password"], input[type="email"],
input[type="datetime-local"], textarea, select {
  width: 100%;
  font-family: var(--ui);
  font-size: 11px;
  padding: 3px 5px;
  color: var(--text-bright);
  background: #080a10;
  /* Inset border: the period way of saying "this is a field". */
  border: 1px solid var(--border);
  border-top-color: #05070c;
  border-left-color: #05070c;
}

textarea { font-family: var(--mono); min-height: 4.5em; }

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent-dim);
  background: #0c0f17;
}

:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

button {
  margin-top: 10px;
  font-family: var(--ui);
  font-size: 11px;
  font-weight: bold;
  padding: 3px 12px;
  color: #1a1206;
  /* Beveled button: light top edge, dark bottom. Straight out of 2001. */
  background: linear-gradient(180deg, #ffc06b 0%, var(--accent) 45%, var(--accent-dim) 100%);
  border: 1px solid #6b4611;
  border-top-color: #ffd9a3;
  border-left-color: #ffd9a3;
  cursor: pointer;
}

button:hover { background: linear-gradient(180deg, #ffd08b 0%, #ffb84f 45%, #d08c28 100%); }
button:active { border-top-color: #6b4611; border-left-color: #6b4611; }

.field-hint {
  display: block;
  color: var(--text-dim);
  font-size: 10px;
  font-weight: normal;
  margin-top: 2px;
}

/* -- notices ---------------------------------------------------------------- */
.form-notice, .form-error {
  border: 1px solid var(--border);
  border-left-width: 4px;
  padding: 6px 10px;
  margin: 0 0 10px;
  background: var(--box-alt);
}

.form-notice { border-left-color: var(--ok); }
.form-error  { border-left-color: var(--bad); color: #ffd7d1; }

/* -- item lists (ports, keys) ------------------------------------------------ */
.item-list { list-style: none; padding: 0; margin: 8px 0; }

.item-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  border: 1px solid var(--border);
  background: var(--box-alt);
  margin-bottom: 3px;
}

.item-list .item-main { font-family: var(--mono); color: var(--accent); font-weight: bold; }
.item-list .item-note { color: var(--text-dim); font-size: 10px; }
.item-list .item-action { margin-left: auto; }

.inline-form { display: inline; margin: 0; max-width: none; }
.inline-form button { margin: 0; padding: 1px 8px; font-size: 10px; }

/* -- footer ------------------------------------------------------------------ */
#footer {
  margin-top: 8px;
  border: 1px solid var(--border);
  background: var(--box-bg);
  padding: 8px 12px;
  text-align: center;
  color: var(--text-dim);
  font-size: 10px;
}

#footer a { color: var(--link); }
#footer .tiny { margin-top: 3px; color: #6c7488; }

/* -- narrow screens ----------------------------------------------------------
   The original sites simply broke below 800px. Collapsing the sidebar above
   the content keeps the same look while staying usable on a phone -- the one
   concession to the present, and an invisible one on desktop. */
@media (max-width: 700px) {
  #columns { grid-template-columns: 1fr; }
  dl { grid-template-columns: 1fr; gap: 0; }
  dd { margin-bottom: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
