:root {
  --black: #000000;
  --near-black: #050706;
  --panel: #0a0e0b;
  --green-bright: #73a47c;
  --line: #304d36;
  --text: #c5c9c5;
  --muted: #858c86;
  --white: #e1e3e1;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 300px;
  margin: 0;
  background: var(--black);
  color: var(--text);
  font-family: Verdana, Arial, Helvetica, sans-serif;
  font-size: 12px;
  line-height: 1.6;
}

button,
a {
  font: inherit;
}

button {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
  border-radius: 0;
  box-shadow: none;
}

a {
  color: var(--green-bright);
}

a:hover {
  color: var(--white);
}

.skip-link {
  position: fixed;
  top: -60px;
  left: 12px;
  z-index: 10;
  padding: 8px 12px;
  border: 1px solid var(--green-bright);
  background: var(--black);
}

.skip-link:focus {
  top: 12px;
}

.site-shell {
  width: min(780px, calc(100% - 24px));
  margin: 26px auto;
  border: 1px solid #243127;
  background: var(--near-black);
  box-shadow: 0 0 0 3px #070a08, 0 0 0 4px #17221a;
}

.site-header {
  min-height: 145px;
  padding: 27px 32px 24px;
  border-bottom: 1px solid var(--line);
  background:
    repeating-linear-gradient(
      135deg,
      transparent,
      transparent 9px,
      rgba(83, 118, 89, 0.035) 9px,
      rgba(83, 118, 89, 0.035) 10px
    ),
    #030504;
  text-align: center;
}

.eyebrow {
  margin-bottom: 4px;
  color: var(--green-bright);
  font-family: "Courier New", monospace;
  font-size: 10px;
  letter-spacing: 0.45em;
}

.site-header h1 {
  margin: 0;
  color: #667c6a;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(31px, 6vw, 48px);
  font-weight: normal;
  line-height: 1.05;
  letter-spacing: 0.06em;
  text-shadow: 1px 1px 0 #1c2c20, 2px 2px 0 #000;
}

.site-header p {
  margin: 10px 0 0;
  color: var(--muted);
  font-family: "Courier New", monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.main-nav {
  display: flex;
  justify-content: center;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(#172219, #0e1510);
}

.main-nav button {
  -webkit-appearance: none;
  appearance: none;
  width: auto;
  min-width: 112px;
  padding: 9px 16px;
  border-right: 1px solid #2d4632;
  border-top: 0;
  border-bottom: 0;
  border-left: 0;
  border-radius: 0;
  background: transparent;
  color: #aeb8b0;
  cursor: pointer;
  font-family: "Courier New", monospace;
  font-weight: bold;
  text-align: center;
  text-decoration: none;
}

.main-nav button:first-child {
  border-left: 1px solid #2d4632;
}

.main-nav button:hover,
.main-nav button:focus-visible {
  background: #263b2a;
  color: var(--white);
  outline: none;
}

.announcement {
  overflow: hidden;
  padding: 6px 12px;
  border-bottom: 1px solid #1d2d21;
  background: #050806;
  color: #8e948f;
  font-family: "Courier New", monospace;
  font-size: 11px;
  white-space: nowrap;
}

.announcement span {
  color: var(--green-bright);
  font-weight: bold;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 205px;
  gap: 12px;
  padding: 12px;
}

.main-column,
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.panel,
.side-panel {
  border: 1px solid #243b29;
  background: var(--panel);
}

.panel h2,
.side-panel h2 {
  margin: 0;
  padding: 6px 9px;
  border-bottom: 1px solid #29432f;
  background: linear-gradient(90deg, #1a2a1e, #0d150f);
  color: #a1b1a4;
  font-family: "Courier New", monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
}

.panel-body {
  padding: 12px 14px;
}

.panel-body p:first-child,
.side-body p:first-child {
  margin-top: 0;
}

.panel-body p:last-child,
.side-body p:last-child {
  margin-bottom: 0;
}

.side-body {
  padding: 10px;
  color: #9ba09c;
  font-size: 11px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

th,
td {
  padding: 5px 7px;
  border: 1px solid #1f3224;
  text-align: left;
  vertical-align: top;
}

th {
  width: 33%;
  background: #0f1811;
  color: var(--green-bright);
  font-family: "Courier New", monospace;
  font-weight: normal;
  text-transform: uppercase;
}

td {
  background: #080c09;
}

.connect-box {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 8px;
  margin-top: 12px;
  padding: 9px;
  border: 1px dashed #35533b;
  background: #050806;
}

.connect-label {
  grid-column: 1 / -1;
  color: #77857a;
  font-family: "Courier New", monospace;
  font-size: 10px;
}

.connect-box code,
.console-command {
  overflow-wrap: anywhere;
  color: #8fb697;
  font-family: "Courier New", monospace;
}

.connect-actions {
  display: flex;
  gap: 5px;
}

.connect-box button,
.connect-actions a,
#refresh-status {
  -webkit-appearance: none;
  appearance: none;
  padding: 3px 9px;
  border: 1px outset #506956;
  border-radius: 0;
  background: #263b2a;
  color: #d0d7d1;
  cursor: pointer;
  font-family: "Courier New", monospace;
  font-size: 10px;
  font-weight: bold;
  line-height: 1.6;
  text-decoration: none;
}

.connect-box button:active,
.connect-actions a:active,
#refresh-status:active {
  border-style: inset;
}

.connect-box button:focus-visible,
.connect-actions a:focus-visible,
#refresh-status:focus-visible {
  outline: 1px solid var(--green-bright);
  outline-offset: 2px;
}

.live-status {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.live-status .status-line {
  margin: 0;
}

#refresh-status:disabled {
  color: #7c837d;
  cursor: wait;
}

.status-note {
  margin: 8px 0 0;
  color: #737873;
  font-family: "Courier New", monospace;
  font-size: 9px;
}

.rules-table th:first-child {
  width: 68%;
}

.rules-table th:last-child {
  width: 32%;
}

.rules-table thead th {
  background: #142018;
  color: #8fa394;
  font-weight: bold;
}

.rules-table td:first-child {
  color: #c4ccc5;
}

.rules-table td:last-child {
  color: #929a94;
  font-family: "Courier New", monospace;
  font-size: 10px;
}

.rules-table small {
  display: block;
  margin-top: 3px;
  color: #9f7777;
  font-size: 8px;
  line-height: 1.4;
}

.penalty {
  display: inline-block;
  padding: 1px 4px;
  border: 1px solid #38483b;
  background: #111812;
  white-space: nowrap;
}

.penalty.permanent {
  border-color: #633d3d;
  color: #bd8585;
}

.penalty.temporary {
  border-color: #5b5635;
  color: #b2a56d;
}

.rule-policy {
  margin-top: 12px;
  padding: 8px 10px;
  border-left: 2px solid #35533b;
  background: #070b08;
  color: #a7aca8;
  font-size: 10px;
}

.rule-policy strong {
  color: #86a08b;
  font-family: "Courier New", monospace;
  font-size: 9px;
  font-weight: normal;
  text-transform: uppercase;
}

.motd-date {
  margin-bottom: 0;
  color: #666e67;
  font-family: "Courier New", monospace;
  font-size: 9px;
}

.status-line {
  color: #91ae96;
  font-family: "Courier New", monospace;
  font-size: 10px;
  font-weight: bold;
}

.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 6px;
  border: 1px solid #7ea786;
  border-radius: 50%;
  background: #6d765f;
  box-shadow: 0 0 5px #3e4538;
}

.status-dot.is-online {
  border-color: #7ea786;
  background: #456c4d;
  box-shadow: 0 0 5px #385a3f;
}

.status-dot.is-offline {
  border-color: #9c5f5f;
  background: #6f3232;
  box-shadow: 0 0 5px #4b2525;
}

.status-dot.is-checking {
  border-color: #928a65;
  background: #67613d;
  box-shadow: 0 0 5px #49442b;
}

.console-command {
  display: block;
  padding: 7px;
  border: 1px inset #223627;
  background: #030504;
  font-size: 10px;
}

.quick-join {
  display: inline-block;
  margin-top: 8px;
  font-family: "Courier New", monospace;
  font-size: 10px;
  text-decoration: none;
}

.staff-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.staff-list li {
  padding: 6px 0;
  border-bottom: 1px dotted #29372c;
}

.staff-list li:first-child {
  padding-top: 0;
}

.staff-list li:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.staff-list strong,
.staff-list span {
  display: block;
}

.staff-list strong {
  color: #839f89;
  font-family: "Courier New", monospace;
  font-size: 10px;
}

.staff-list span {
  color: #b3b7b3;
}

.details-list {
  margin: 0;
}

.details-list dt {
  color: #839f89;
  font-family: "Courier New", monospace;
  font-size: 10px;
}

.details-list dd {
  margin: 0 0 7px;
  padding-bottom: 5px;
  border-bottom: 1px dotted #29372c;
  color: #b3b7b3;
}

.details-list dd:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

footer {
  padding: 14px;
  border-top: 1px solid #243b29;
  background: #030504;
  color: #666e67;
  font-family: "Courier New", monospace;
  font-size: 9px;
  text-align: center;
}

footer p {
  margin: 2px 0;
}

footer .scroll-link {
  -webkit-appearance: none;
  appearance: none;
  display: inline-block;
  margin-top: 5px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--green-bright);
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  text-decoration: none;
}

footer .scroll-link:hover {
  color: var(--white);
}

@media (max-width: 650px) {
  .site-shell {
    width: calc(100% - 12px);
    margin: 8px auto;
  }

  .site-header {
    min-height: 0;
    padding: 24px 12px 21px;
  }

  .site-header h1 {
    font-size: clamp(27px, 10vw, 39px);
  }

  .site-header p {
    font-size: 9px;
    letter-spacing: 0.12em;
  }

  .main-nav {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }

  .main-nav button,
  .main-nav button:first-child {
    width: 100%;
    min-width: 0;
    border: 1px solid #243b29;
  }

  .announcement {
    white-space: normal;
  }

  .content-grid {
    grid-template-columns: 1fr;
  }

  .connect-box {
    grid-template-columns: 1fr;
  }

  .connect-label {
    grid-column: auto;
  }

  .connect-actions {
    flex-wrap: wrap;
  }

  .rules-table th:first-child {
    width: 62%;
  }

  .rules-table th:last-child {
    width: 38%;
  }

  .penalty {
    white-space: normal;
  }

  .live-status {
    align-items: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
