/*
 * 0xBDAY :: style.css
 * no frameworks. no gradients. no rounded corners. no mercy.
 */

html, body {
  background: #000;
}

body {
  margin: 0;
  padding: 14px 16px 30px;
  color: #b0b0b0;
  font: 13px/1.5 Monaco, "Lucida Console", "Courier New", Courier, monospace;
}

a { color: #33ff33; text-decoration: underline; }
a:visited { color: #25b825; }
a:hover, a:focus { background: #33ff33; color: #000; text-decoration: none; outline: none; }

b, strong { color: #e8e8e8; }
hr { border: 0; border-top: 1px dashed #333; margin: 10px 0; }
pre { margin: 0; font: inherit; }
::selection { background: #33ff33; color: #000; }

.wrap { max-width: 800px; margin: 0 auto; }

.g   { color: #33ff33; }
.dim { color: #5c5c5c; }
.amb { color: #ffb000; }
.red { color: #ff3b30; }
.inv { background: #33ff33; color: #000; padding: 0 3px; }

.blink { animation: blink 1s step-end infinite; }
@keyframes blink { 50% { visibility: hidden; } }

/* ---- header ---------------------------------------------------- */

.logo {
  color: #33ff33;
  font-size: 13px;
  line-height: 1.05;
  white-space: pre;
  overflow: hidden;
  margin-top: 4px;
}
.sub { color: #5c5c5c; margin: 6px 0 2px; }
.nav { margin: 8px 0 2px; color: #5c5c5c; }
.nav a, .nav .here { padding: 0 2px; }
.nav .here { background: #33ff33; color: #000; }
.bar { color: #5c5c5c; font-size: 12px; }
.bar b { color: #33ff33; font-weight: normal; }

/* ---- layout ---------------------------------------------------- */

table.frame { width: 100%; border-collapse: collapse; table-layout: fixed; }
table.frame > tbody > tr > td { vertical-align: top; }
td.side { width: 200px; padding-right: 14px; }
td.main { padding-left: 14px; border-left: 1px solid #1f1f1f; }

.box { border: 1px solid #2b2b2b; margin-bottom: 14px; }
.box h3 {
  margin: 0;
  padding: 1px 6px;
  background: #1c1c1c;
  border-bottom: 1px solid #2b2b2b;
  color: #33ff33;
  font-size: 12px;
  font-weight: normal;
}
.box .in { padding: 6px 8px; font-size: 12px; }
.box ul { margin: 0; padding: 0; list-style: none; }
.box li:before { content: "> "; color: #5c5c5c; }

h2.sec {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: normal;
  color: #33ff33;
  white-space: nowrap;
  overflow: hidden;
}
h2.sec:after { content: " ----------------------------------------------------------------------------------------------------"; color: #2e2e2e; }

.ticker { color: #ffb000; border-top: 1px solid #1f1f1f; border-bottom: 1px solid #1f1f1f; margin: 10px 0 0; padding: 2px 0; }

/* ---- news ------------------------------------------------------ */

.post { margin-bottom: 18px; }
.post .hdr { color: #5c5c5c; }
.post .hdr b { color: #ffb000; font-weight: normal; }
.post p { margin: 4px 0 0; }

/* ---- tables ---------------------------------------------------- */

.scroll { overflow-x: auto; }
table.list { width: 100%; border-collapse: collapse; font-size: 13px; }
table.list th {
  text-align: left;
  font-weight: normal;
  color: #000;
  background: #33ff33;
  padding: 0 8px;
  white-space: nowrap;
}
table.list td { padding: 3px 8px; border-bottom: 1px dotted #2b2b2b; white-space: nowrap; }
table.list tr:hover td { background: #0b160b; }
table.list td.num, table.list th.num { text-align: right; }
.redacted { background: #b0b0b0; color: #b0b0b0; user-select: none; }
.st-locked { color: #ffb000; }
.st-open   { color: #33ff33; }
.st-pwned  { background: #33ff33; color: #000; padding: 0 2px; }

/* ---- challenge page -------------------------------------------- */

.chal-desc { border-left: 2px solid #2b2b2b; padding: 4px 0 4px 12px; margin: 10px 0 14px; white-space: pre-wrap; }
.kv td { padding: 0 12px 0 0; vertical-align: top; }
.kv td:first-child { color: #5c5c5c; }

.flagform { margin: 16px 0 6px; }
.flagform label { color: #33ff33; }
input.tt {
  background: #000;
  color: #33ff33;
  border: 1px solid #555;
  border-top-color: #2a2a2a;
  border-left-color: #2a2a2a;
  font: inherit;
  font-size: 13px;
  padding: 2px 4px;
  width: 22em;
  max-width: 100%;
  box-sizing: border-box;
  border-radius: 0;
  caret-color: #33ff33;
}
input.tt:focus { outline: 1px dotted #33ff33; outline-offset: 1px; }

/* the grey win9x button. on a black site. like god intended. */
button.w95 {
  font: 12px Tahoma, Verdana, "MS Sans Serif", sans-serif;
  color: #000;
  background: #c0c0c0;
  border: 2px solid;
  border-color: #fff #404040 #404040 #fff;
  box-shadow: inset -1px -1px #808080, inset 1px 1px #dfdfdf;
  padding: 2px 12px;
  border-radius: 0;
  cursor: default;
}
button.w95:active { border-color: #404040 #fff #fff #404040; box-shadow: inset 1px 1px #808080; padding: 3px 11px 1px 13px; }
button.w95:focus { outline: 1px dotted #000; outline-offset: -5px; }

.msg { margin-top: 10px; white-space: pre; overflow-x: auto; }

/* ---- the reveal ------------------------------------------------ */

.reveal { border: 1px solid #33ff33; margin: 6px 0 20px; }
.reveal h3 {
  margin: 0;
  padding: 3px 8px;
  background: #33ff33;
  color: #000;
  font-size: 13px;
  font-weight: normal;
  letter-spacing: 2px;
}
.reveal .in { padding: 12px 14px; }
.reveal pre { color: #33ff33; white-space: pre; overflow-x: auto; }
.reveal .coord {
  font-size: 15px;
  color: #e8e8e8;
  margin: 10px 0;
  letter-spacing: 1px;
}
.reveal .coord b { color: #33ff33; }
.reveal .love { color: #ffb000; margin: 12px 0 4px; }
.reveal .go {
  display: inline-block;
  margin: 8px 0 2px;
  padding: 5px 14px;
  background: #33ff33;
  color: #000 !important;
  text-decoration: none;
  border: 1px solid #33ff33;
}
.reveal .go:hover, .reveal .go:focus { background: #000; color: #33ff33 !important; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  background: #000;
  color: #33ff33;
  border: 1px solid #33ff33;
  padding: 6px 14px;
  font-size: 13px;
  z-index: 50;
  box-shadow: 0 0 0 3px #000;
}

/* ---- nfo ------------------------------------------------------- */

.nfo { white-space: pre; overflow-x: auto; color: #b0b0b0; }

/* ---- footer ---------------------------------------------------- */

.foot { text-align: center; color: #5c5c5c; font-size: 11px; margin-top: 22px; }
.odo { display: inline-block; margin: 0 2px; }
.odo span {
  display: inline-block;
  width: 1ch;
  padding: 0 2px;
  margin-right: 1px;
  background: #111;
  border: 1px solid #333;
  color: #ff3b30;
  font-size: 12px;
}
.badges { margin-top: 10px; }
.b88 {
  display: inline-block;
  width: 88px;
  height: 31px;
  box-sizing: border-box;
  border: 1px solid #777;
  margin: 2px;
  vertical-align: middle;
  overflow: hidden;
  font: bold 9px/1 Verdana, Tahoma, sans-serif;
  text-align: left;
  color: #fff;
  background: #000;
}
.b88 i { float: left; width: 30px; height: 29px; font-style: normal; text-align: center; line-height: 29px; font-size: 11px; }
.b88 s { display: block; text-decoration: none; padding: 5px 0 0 34px; line-height: 10px; }

/* ---- login tty: alacritty + tmux, solarized dark --------------- */

html.alac, html.alac body { background: #002b36; }
body.tty {
  padding: 0 8px 16px;
  min-height: 100vh;
  box-sizing: border-box;
  color: #eee8d5;
  font: 15px/1.45 "JetBrains Mono", Hack, "DejaVu Sans Mono", Menlo, Consolas, monospace;
  font-variant-ligatures: none;
  cursor: text;
}
#tmux {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 2ch;
  margin: 0 -8px 0;
  padding: 0 8px;
  background: #5f6b6e;
  color: #eee8d5;
  white-space: pre;
  overflow: hidden;
}
#tmux span:last-child { overflow: hidden; }
body.tty #screen { white-space: pre-wrap; overflow-wrap: anywhere; }
body.tty .logo { color: #268bd2; font-size: 15px; line-height: 1.15; white-space: pre; overflow: hidden; }
body.tty .p-dir { color: #268bd2; }
body.tty .p-sym { color: #d33682; }
body.tty .p-cmd { color: #b58900; }
body.tty .dim { color: #657b83; }
body.tty .red { color: #dc322f; }
body.tty .ok  { display: inline-block; background: #859900; color: #002b36; padding: 0 4px; }
.cur { background: #eee8d5; color: #002b36; }
#kbd {
  position: fixed;
  left: 0; top: 0;
  width: 100%; height: 100%;
  opacity: 0;
  border: 0;
  font-size: 16px; /* stops ios from zooming in */
  color: transparent;
  background: transparent;
  caret-color: transparent;
}

/* ---- small screens --------------------------------------------- */

@media (max-width: 680px) {
  body { font-size: 12px; }
  .logo { font-size: 2.7vw; }
  body.tty { font-size: 13px; }
  body.tty .logo { font-size: 3.2vw; }
  table.frame > tbody > tr > td { display: block; width: auto; padding: 0; border: 0; }
  td.side { margin-bottom: 6px; }
  input.tt { width: 100%; margin-bottom: 6px; }
  .nfo { white-space: pre-wrap; }
  .nfo.head { white-space: pre; font-size: 2.2vw; }
}
