/* WGSTYLE.CSS - the classic Active-HTML pages in the web front end's look
   (GALAPIAH's APP.CSS:  same colours, fonts and light/dark switch).
   Linked from every classic template's <head>.  Only restyles:  the pages'
   markup, server tokens and scripts are unchanged.  Author CSS beats the old
   presentational attributes (bgcolor, text, link, <font size/color>), which is
   what lets one file modernise 1997 pages.
   Redux Version Developed By Daniel Spain In 2026 */

:root {
  --bg: #0e1114;
  --panel: #161a1f;
  --panel-2: #1c2228;
  --line: #2a323a;
  --text: #e8e6e1;
  --muted: #9aa3ab;
  --accent: #f2b544;
  --accent-ink: #1a1405;
  --bad: #ff8d7e;
  --good: #7ed6a5;
  --mono: ui-monospace, "Cascadia Mono", Consolas, Menlo, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6f4ef;
    --panel: #ffffff;
    --panel-2: #efece4;
    --line: #dcd7cb;
    --text: #1d2023;
    --muted: #5e666d;
    --accent: #9a6400;
    --accent-ink: #ffffff;
    --bad: #b3261e;
    --good: #1c7a4b;
    color-scheme: light;
  }
}

/* page */
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0; padding: 14px 18px;
  background: var(--bg) !important; background-image: none !important;
  color: var(--text) !important;
  font: 15px/1.5 var(--sans);
}
* { box-sizing: border-box; }
a, a:visited { color: var(--accent); text-underline-offset: 2px; }
a:hover { filter: brightness(1.12); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 12px 0; }
h1, h2, h3, h4 { font-weight: 650; line-height: 1.25; margin: .4em 0 .5em; }
h1 { font-size: 1.6em; } h2 { font-size: 1.35em; } h3 { font-size: 1.15em; }
pre, tt, code, kbd { font-family: var(--mono); font-size: .92em; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; }
strong, b { font-weight: 650; }
blockquote { border-left: 3px solid var(--line); margin: 8px 0; padding: 2px 12px; color: var(--muted); }

/* <font>:  one font, a type scale instead of sizes 1-7 */
font { font-family: inherit !important; }
font[size="1"], font[size="-2"] { font-size: .8em; }
font[size="2"], font[size="-1"] { font-size: .9em; }
font[size="3"], font[size="+0"] { font-size: 1em; }
font[size="4"], font[size="+1"] { font-size: 1.15em; }
font[size="5"], font[size="+2"] { font-size: 1.35em; font-weight: 650; }
font[size="6"], font[size="7"], font[size="+3"], font[size="+4"] { font-size: 1.6em; font-weight: 650; letter-spacing: -.01em; }
/* colours from 1997:  dark ones would vanish on the dark background */
font[color] { color: var(--accent); }
font[color="#000000" i], font[color="black" i], font[color="#000080" i], font[color="navy" i],
font[color="#000033" i], font[color="#333333" i], font[color="#404040" i] { color: inherit; }
font[color="#FF0000" i], font[color="red" i], font[color="#CC0000" i], font[color="#800000" i],
font[color="maroon" i], font[color="#990000" i] { color: var(--bad); }
font[color="#008000" i], font[color="green" i], font[color="#00FF00" i], font[color="#006600" i] { color: var(--good); }
font[color="#808080" i], font[color="gray" i], font[color="grey" i], font[color="#C0C0C0" i],
font[color="silver" i], font[color="#666666" i] { color: var(--muted); }
font[color="#FFFFFF" i], font[color="white" i] { color: var(--text); }

/* tables:  panels and lines instead of grey blocks */
table { border-collapse: collapse; max-width: 100%; }
table[border]:not([border="0"]) { border: 1px solid var(--line); }
table[border]:not([border="0"]) td, table[border]:not([border="0"]) th { border: 1px solid var(--line); }
td, th { padding: 4px 8px; vertical-align: top; color: inherit; }
th { text-align: left; font-weight: 600; color: var(--muted); font-size: .92em; }
table[bgcolor], tr[bgcolor], td[bgcolor], th[bgcolor] {
  background: var(--panel-2) !important; background-image: none !important; color: var(--text);
}
table[background], td[background], tr[background] { background-image: none !important; }
td[bgcolor="#FFFFFF" i], td[bgcolor="white" i], table[bgcolor="#FFFFFF" i], tr[bgcolor="#FFFFFF" i] {
  background: var(--panel) !important;
}
tr:has(> th) { background: var(--panel-2); }

/* forms */
input, select, textarea, button {
  font: inherit; color: var(--text); background: var(--bg);
  border: 1px solid var(--line); border-radius: 5px; padding: 6px 9px; max-width: 100%;
}
textarea { font-family: var(--mono); font-size: 14px; line-height: 1.45; }
input[type="checkbox"], input[type="radio"] { padding: 0; width: auto; accent-color: var(--accent); vertical-align: middle; }
input[type="image"] { border: 0; padding: 0; background: none; }
input[type="submit"], input[type="button"], input[type="reset"], button {
  cursor: pointer; font-weight: 600; background: var(--accent); color: var(--accent-ink);
  border-color: var(--accent); padding: 6px 13px; margin: 2px 2px;
}
input[type="reset"], input[type="button"] { background: transparent; color: var(--text); border-color: var(--line); font-weight: 500; }
input[type="submit"]:hover, input[type="button"]:hover, input[type="reset"]:hover, button:hover { filter: brightness(1.08); }
input[type="file"] { padding: 4px; }
select { padding-right: 24px; }
fieldset { border: 1px solid var(--line); border-radius: 6px; padding: 8px 12px; }
legend { color: var(--muted); padding: 0 6px; }

/* the old logos and spacer art */
img[src*="gallogo" i], img[src*="wrldgrp" i], img[src*="wglogo" i], img[src*="gcomm" i],
img[alt="Worldgroup Showcase" i] { display: none !important; }
img { max-width: 100%; height: auto; border: 0; }
img[src*="helpicon" i] { vertical-align: middle; font-size: .8em; }

/* frames' little pages and pop-ups keep the same look */
frameset { border: 0; }
center > table { margin: 0 auto; }
[hidden] { display: none !important; }

@media (max-width: 640px) {
  body { padding: 10px 12px; font-size: 15px; }
  td, th { padding: 4px 6px; }
  td[nowrap], th[nowrap], nobr { white-space: normal; }   /* banner link rows wrap */
}
/* frames keep their 1997 sizes (banners 70-90px high, lists 215px or 17% wide):
   each frame is its own viewport, so these fit the content to the frame */
@media (max-height: 130px) {
  body { padding: 6px 14px 0; line-height: 1.3; }
  h1, h2, h3, h4 { margin: 0 0 .2em; }
  h1 { font-size: 1.3em; } h2 { font-size: 1.2em; }
  font[size="5"], font[size="+2"], font[size="6"], font[size="7"], font[size="+3"], font[size="+4"] { font-size: 1.3em; }
  p { margin: .2em 0; }
  hr { margin: 4px 0; }
  br + br { display: none; }                 /* the banners' blank line */
}
@media (max-width: 300px) {
  body { padding: 8px 8px; font-size: 14px; }
  td, th { padding: 3px 4px; }
}
