/* ===== megafors.net - main stylesheet v2.4 - do not edit ===== */

@font-face { font-family: "MF Silkscreen"; src: url("fonts/silkscreen-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "MF Silkscreen"; src: url("fonts/silkscreen-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "MF Exo"; src: url("fonts/exo-2-latin-900-italic.woff2") format("woff2"); font-weight: 900; font-style: italic; font-display: swap; }
@font-face { font-family: "MF Sans"; src: url("fonts/noto-sans-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "MF Sans"; src: url("fonts/noto-sans-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --sahko: #0b2fd8;      /* electric blue */
  --sahko-dark: #061a8c;
  --sahko-light: #3d63ff;
  --lime: #a6ff00;
  --lime-dark: #6fcc00;
  --pale: #eef3ff;
  --pale-lime: #f4ffe0;
  --grey: #c7d0e8;
  --text: #000033;
  --red: #ff0033;
  --font-body: Verdana, Tahoma, "MF Sans", Geneva, sans-serif;
  --font-pixel: "MF Silkscreen", Verdana, Tahoma, sans-serif;
  --font-logo: "MF Exo", "Arial Black", Arial, sans-serif;
}

/* the tiled "GIF" background covers the whole canvas, however short the page */
html {
  min-height: 100%;
  background-color: var(--sahko-dark);
  background-image:
    linear-gradient(45deg, var(--sahko) 25%, transparent 25%, transparent 75%, var(--sahko) 75%),
    linear-gradient(45deg, var(--sahko) 25%, transparent 25%, transparent 75%, var(--sahko) 75%);
  background-size: 8px 8px;
  background-position: 0 0, 4px 4px;
}
body {
  margin: 0; padding: 12px 0 30px;
  background: transparent;
  font-family: var(--font-body);
  font-size: 11px;
  color: var(--text);
}
a { color: var(--sahko); font-weight: bold; text-decoration: none; }
a:hover { color: var(--red); text-decoration: underline; }
a:focus-visible { outline: 2px dotted var(--red); outline-offset: 1px; }
::selection { background: var(--lime); color: #000; }
table { border-collapse: collapse; }
td { vertical-align: top; font-size: 11px; }
.main { width: 760px; margin: 0 auto; background: #ffffff; border: 2px solid #000000; }

/* -- header -- */
.head td { background: linear-gradient(#ffffff, var(--pale)); padding: 8px 10px; vertical-align: middle; }
.logo {
  display: block;
  font-family: var(--font-logo);
  font-size: 36px; font-weight: 900; font-style: italic; letter-spacing: -1px; line-height: 0.88;
  color: var(--sahko);
  text-shadow: 2px 2px 0 var(--lime), 3px 3px 0 #000;
  white-space: nowrap;
}
.logo:hover { color: var(--sahko); text-decoration: none; }
.logo small {
  display: block; font-family: var(--font-pixel); font-style: normal; font-weight: 400;
  font-size: 8px; letter-spacing: 2px; text-shadow: none; color: #000; margin-top: 7px;
}
.adlabel { font-family: var(--font-pixel); font-size: 8px; color: #666; text-align: right; letter-spacing: 1px; margin-bottom: 2px; }
.banner-link:hover { text-decoration: none; }
.banner {
  width: 468px; height: 60px; border: 1px solid #000; position: relative; overflow: hidden;
  background: var(--sahko);
  font-family: var(--font-logo); font-weight: 900; font-style: italic;
}
.banner .f {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 10px;
  color: #fff; font-size: 23px; text-transform: uppercase; letter-spacing: 0;
  opacity: 0; animation: gif 7.5s steps(1, end) infinite;
}
.banner .f:nth-child(1) { animation-delay: 0s; }
.banner .f:nth-child(2) { animation-delay: 1.5s; background: var(--lime); color: var(--sahko-dark); }
.banner .f:nth-child(3) { animation-delay: 3s; }
.banner .f:nth-child(4) { animation-delay: 4.5s; background: #000; color: var(--lime); }
.banner .f:nth-child(5) { animation-delay: 6s; background: var(--lime); color: var(--sahko-dark); font-size: 20px; text-transform: none; }
@keyframes gif { 0% { opacity: 1; } 20% { opacity: 0; } 100% { opacity: 0; } }
.banner .star { color: var(--lime); font-size: 26px; animation: blink 0.4s steps(1, end) infinite; }
.banner .f:nth-child(2) .star, .banner .f:nth-child(5) .star { color: var(--red); }

/* -- tabs -- */
.tabs td { background: var(--sahko); padding: 6px 0 0 8px; border-bottom: 3px solid var(--lime); }
.tabs a {
  display: inline-block; margin-right: 2px; padding: 4px 11px 3px;
  background: var(--sahko-light); color: #fff; font-size: 11px;
  border: 1px solid #000; border-bottom: 0;
  border-radius: 6px 6px 0 0;
}
.tabs a:hover { background: #fff; color: var(--sahko); text-decoration: none; }
.tabs a.on { background: var(--lime); color: #000; }

/* -- ticker bar: starts readable, scrolls forever, no stray glyph at the edge -- */
.ticker { table-layout: fixed; }
.ticker td { background: var(--pale-lime); border-bottom: 1px dotted var(--sahko); padding: 3px 8px; font-size: 10px; }
.ticker .date { white-space: nowrap; font-weight: bold; color: var(--sahko); width: 104px; padding-right: 10px; border-right: 1px dotted var(--sahko); }
.ticker .tape { overflow: hidden; white-space: nowrap; }
.ticker .track { display: inline-block; white-space: nowrap; font-weight: bold; color: #000; animation: tape 40s linear infinite; }
.ticker .track span { padding-right: 40px; }
@keyframes tape { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.ticker .tape:hover .track { animation-play-state: paused; }

/* -- columns -- */
.left { width: 150px; background: var(--pale); border-right: 1px solid var(--grey); padding: 8px; }
.mid { padding: 8px 10px; }
.right { width: 170px; background: var(--pale); border-left: 1px solid var(--grey); padding: 8px; }

.box { border: 1px solid var(--sahko); margin-bottom: 10px; background: #fff; }
.box .hd {
  background: linear-gradient(var(--sahko-light), var(--sahko));
  color: #fff; font-family: var(--font-pixel); font-weight: 700; font-size: 10px; line-height: 12px;
  padding: 3px 6px 2px; border-bottom: 1px solid #000; text-transform: uppercase; letter-spacing: 1px;
}
.box .hd.limehd { background: linear-gradient(#d4ff66, var(--lime)); color: #000; }
.box .bd { padding: 6px; line-height: 1.45; }
.box .bd p { margin: 0 0 6px; }

ul.arrows { list-style: none; margin: 0; padding: 0; }
ul.arrows li { padding: 3px 0 3px 12px; border-bottom: 1px dotted var(--sahko); position: relative; }
ul.arrows li:last-child { border-bottom: 0; }
ul.arrows li::before {
  content: ""; position: absolute; left: 1px; top: 6px;
  border-left: 6px solid var(--sahko); border-top: 4px solid transparent; border-bottom: 4px solid transparent;
}
ul.arrows li:hover::before, ul.arrows li.here::before { border-left-color: var(--red); }
ul.arrows li.here a { color: #000; }

.headline {
  font-size: 17px; font-weight: bold; color: var(--sahko);
  margin: 2px 0 2px; letter-spacing: -0.5px;
}
h1.headline { margin-top: 2px; }
.sub { color: #555; font-size: 10px; margin: 0 0 8px; }
.welcome { border: 1px dashed var(--lime-dark); background: var(--pale-lime); padding: 8px; margin-bottom: 10px; }
.welcome b.big { font-size: 13px; }

.news .item { border-bottom: 1px dotted var(--sahko); padding: 5px 0; }
.news .item:last-child { border-bottom: 0; }
.news .d { color: #666; font-size: 10px; font-weight: bold; }
.uusi {
  display: inline-block; background: var(--red); color: #fff; font-family: var(--font-pixel); font-size: 8px; line-height: 9px;
  padding: 1px 3px; margin-left: 3px; vertical-align: 1px; animation: blink 0.8s steps(1, end) infinite;
}
@keyframes blink { 50% { visibility: hidden; } }

.info td { padding: 3px 6px 3px 0; border-bottom: 1px dotted var(--grey); font-size: 11px; }
.info td.k { color: #555; white-space: nowrap; width: 1%; }

.btn {
  display: inline-block;
  font-family: var(--font-body); font-size: 10px; font-weight: bold;
  background: linear-gradient(#ffffff, #d6dcec); border: 2px outset #e8ecf6; padding: 2px 8px; color: #000; cursor: pointer;
}
.btn:hover { color: #000; text-decoration: none; background: linear-gradient(#ffffff, var(--lime)); }
.btn:active { border-style: inset; }
.btn.big { font-size: 12px; padding: 5px 14px; }
.poll label { display: block; padding: 2px 0; cursor: pointer; }
.poll input { vertical-align: -2px; margin: 0 4px 0 0; }
.poll .q { font-weight: bold; margin-bottom: 4px; }
.thanks { font-weight: bold; color: var(--sahko); }
.spacer { height: 6px; }

.button88 {
  display: inline-block; width: 88px; height: 31px; border: 1px solid #000; box-sizing: border-box;
  background: linear-gradient(90deg, var(--sahko) 0 30px, var(--lime) 30px);
  position: relative; vertical-align: middle;
}
.button88:hover { text-decoration: none; }
.button88 .m { position: absolute; left: 0; top: 0; width: 30px; height: 29px; color: var(--lime);
  font: italic 900 19px/29px var(--font-logo); text-align: center; }
.button88 .t { position: absolute; left: 33px; top: 7px; color: #000; font: 400 8px/8px var(--font-pixel); letter-spacing: 0; }
.code {
  font-family: "Courier New", "Liberation Mono", monospace; font-size: 10px; line-height: 1.35;
  background: #fff; border: 1px inset var(--grey);
  padding: 3px; margin: 4px 0 0; color: #333;
  white-space: pre; overflow-x: auto;
}

.badge { border: 1px solid #000; background: #000; color: var(--lime); font-family: var(--font-pixel); font-size: 10px; line-height: 13px; padding: 4px 3px; text-align: center; margin-top: 4px; }
.badge b { color: #fff; font-weight: 400; }

/* -- portfolio -- */
.ref .bd { padding: 8px; }
.preview {
  display: block; width: 382px; height: 282px; margin: 2px auto 8px; overflow: hidden; position: relative;
  border: 2px inset var(--grey); background: #200944;
}
.preview iframe {
  width: 760px; height: 560px; border: 0; transform: scale(0.5); transform-origin: 0 0;
  pointer-events: none; background: #200944;
}
.preview .sticker {
  position: absolute; right: 6px; bottom: 6px; background: var(--red); color: #fff;
  font-family: var(--font-pixel); font-size: 8px; line-height: 9px; padding: 3px 4px; border: 1px solid #000;
  transform: rotate(-4deg);
}
.preview:hover .sticker { background: var(--lime); color: #000; }
.ref .cta { text-align: center; padding: 6px 0 2px; }
.ref .cta small { display: block; color: #666; font-size: 9px; margin-top: 4px; font-weight: normal; }

.foot td { background: var(--sahko); color: #fff; text-align: center; padding: 6px; font-size: 10px; border-top: 3px solid var(--lime); }
.foot a { color: var(--lime); }

/* the 800x600 era meets the phone: stack the columns, keep the attitude */
@media (max-width: 780px) {
  body { padding: 0 0 20px; }
  .main { width: auto; margin: 0 6px; }
  .main, .main > tbody, .main > tbody > tr, .main > tbody > tr > td,
  .cols, .cols > tbody, .cols > tbody > tr > td,
  .head, .head > tbody, .head > tbody > tr, .head > tbody > tr > td { display: block; width: auto; }
  .cols > tbody > tr { display: flex; flex-direction: column; }
  .head td { text-align: left !important; }
  .banner { width: 100%; max-width: 468px; }
  .banner .f { font-size: 18px; }
  .banner .f:nth-child(5) { font-size: 16px; }
  .adlabel { text-align: left; }
  .left, .right { border: 0; border-top: 1px solid var(--grey); }
  .mid { order: -1; }
  .tabs td { padding-left: 4px; }
  .tabs a { padding: 4px 8px 3px; margin-top: 2px; }
  html, body { overflow-x: clip; }
  .ticker .date { width: 112px; }
  body, td { font-size: 13px; }
  .info td, .poll label, .ticker td { font-size: 12px; }
  .preview { width: 344px; height: 254px; max-width: 100%; }
  .preview iframe { transform: scale(0.45); }
}
@media (max-width: 370px) {
  .preview { width: 306px; height: 226px; }
  .preview iframe { transform: scale(0.4); }
}
@media (prefers-reduced-motion: reduce) {
  .banner .f { animation: none; }
  .banner .f:nth-child(1) { opacity: 1; }
  .uusi, .banner .star { animation: none; }
  .ticker .track { animation: none; }
}
