:root {
  color-scheme: dark;
  --bg: #111316;
  --panel: #171a1e;
  --panel-low: #131619;
  --line: #353b40;
  --line-soft: #272d31;
  --text: #d8dcda;
  --muted: #777f81;
  --blue: #6a9cad;
  --blue-dim: #385d6d;
  --sage: #80958a;
  --ochre: #aa9363;
}

* { box-sizing: border-box; }

html { min-height: 100%; background: var(--bg); }

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  font-family: Verdana, Tahoma, Arial, sans-serif;
  font-size: 12px;
  background-color: var(--bg);
  background-image:
    repeating-linear-gradient(0deg, rgba(255,255,255,.012) 0, rgba(255,255,255,.012) 1px, transparent 1px, transparent 4px),
    repeating-linear-gradient(90deg, rgba(0,0,0,.09) 0, rgba(0,0,0,.09) 1px, transparent 1px, transparent 5px);
}

.page {
  position: relative;
  width: min(760px, calc(100% - 48px));
  min-height: 354px;
  margin: 34px 0 0 clamp(24px, 5vw, 74px);
  border: 1px solid #3c4246;
  background: rgba(19, 22, 25, .96);
  box-shadow: 0 1px 0 rgba(255,255,255,.045) inset, 0 10px 30px rgba(0,0,0,.14);
}

.masthead {
  position: relative;
  min-height: 91px;
  padding: 15px 19px 14px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(#202429 0%, #1a1d21 48%, #15181b 100%);
  box-shadow: 0 1px 0 rgba(255,255,255,.025) inset;
}

.index-link {
  display: inline-block;
  margin-bottom: 8px;
  color: #91b8c6;
  font-size: 10px;
  line-height: 1;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.index-link:hover { color: #c0d9e0; }

h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.1;
  font-weight: bold;
  letter-spacing: -1.1px;
  text-shadow: 0 1px 0 #000;
}
h1 span { color: #e0e1dc; }
h1 small {
  color: var(--blue);
  font-size: 20px;
  font-weight: normal;
  letter-spacing: -0.8px;
}

.edge-mark {
  position: absolute;
  right: 18px;
  bottom: 19px;
  display: flex;
  gap: 3px;
  align-items: end;
  height: 14px;
  padding: 3px 4px;
  border: 1px solid #3d4549;
  background: #111416;
  box-shadow: 0 1px 0 rgba(255,255,255,.06) inset;
}
.edge-mark i { display: block; width: 13px; height: 3px; background: var(--blue-dim); }
.edge-mark i:nth-child(2) { width: 7px; background: var(--ochre); }
.edge-mark i:nth-child(3) { width: 4px; background: var(--sage); }

.rule {
  display: flex;
  gap: 3px;
  height: 6px;
  margin: 0 19px;
  border-bottom: 1px solid #262c30;
}
.rule span { width: 13px; height: 2px; margin-top: 3px; background: #486d7b; }
.rule span:nth-child(2) { width: 5px; background: #927f56; }
.rule span:nth-child(3) { width: 8px; background: #667f73; }

.field {
  position: relative;
  min-height: 225px;
  margin: 17px 19px 18px;
  overflow: hidden;
  border: 1px solid #2e3539;
  background:
    linear-gradient(rgba(255,255,255,.014) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.014) 1px, transparent 1px),
    linear-gradient(145deg, #161a1d 0%, #121518 70%);
  background-size: 16px 16px, 16px 16px, auto;
  box-shadow: 0 1px 0 rgba(255,255,255,.025) inset, 0 2px 4px rgba(0,0,0,.16) inset;
}

.field-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 18px;
  border-bottom: 1px solid #292f33;
  background: linear-gradient(#202529, #181c1f);
}
.field-top span {
  display: inline-block;
  width: 3px;
  height: 3px;
  margin: 7px 0 0 7px;
  border-radius: 50%;
  background: #526a73;
  box-shadow: 0 1px 0 #0b0d0e;
}
.field-top span:nth-child(2) { background: #7c846e; }
.field-top span:nth-child(3) { background: #8c7651; }

.quiet-line {
  position: absolute;
  top: 89px;
  left: 22px;
  width: min(210px, 42%);
  height: 1px;
  background: linear-gradient(90deg, #526e78, #37444a 58%, transparent);
  box-shadow: 0 1px 0 rgba(255,255,255,.025);
}

.pixel-track {
  position: absolute;
  left: 22px;
  bottom: 24px;
  display: flex;
  gap: 3px;
  align-items: center;
  height: 7px;
  padding: 1px;
  border: 1px solid #30383c;
  background: #0f1214;
}
.pixel-track b { display: block; width: 8px; height: 3px; background: #456c7b; }
.pixel-track b:nth-child(2) { width: 3px; background: #789aa2; }
.pixel-track b:nth-child(3) { width: 14px; background: #4b5a60; }
.pixel-track b:nth-child(4) { width: 5px; background: #9d895d; }
.pixel-track b:nth-child(5) { width: 3px; background: #596f67; }
.pixel-track b:nth-child(6) { width: 11px; background: #384b53; }
.pixel-track b:nth-child(7) { width: 4px; background: #617a70; }
.pixel-track b:nth-child(8) { width: 7px; background: #3b5a68; }

.corner {
  position: absolute;
  width: 9px;
  height: 9px;
  border-color: #536770;
  border-style: solid;
  opacity: .7;
}
.bottom-left { bottom: 0; left: 0; border-width: 0 0 1px 1px; }
.bottom-right { right: 0; bottom: 0; border-width: 0 1px 1px 0; }

.footer-rule {
  height: 7px;
  margin: 0 19px 15px;
  border-top: 1px solid #272d31;
}
.footer-rule span {
  display: block;
  width: 44px;
  height: 2px;
  margin-top: 2px;
  background: linear-gradient(90deg, #456d7b 0 48%, #aa9363 48% 66%, #71877c 66%);
}

@media (max-width: 600px) {
  .page { width: calc(100% - 24px); margin: 12px; min-height: 330px; }
  .masthead { padding: 13px 14px; }
  h1 { font-size: 22px; }
  h1 small { font-size: 18px; }
  .rule { margin-right: 14px; margin-left: 14px; }
  .field { margin: 14px; min-height: 210px; }
  .footer-rule { margin-right: 14px; margin-left: 14px; }
}
