:root {
  --sky: #cfe4f5;
  --grass: #7cb36a;
  --grass-edge: #5a9149;
  --ground: #f3f7f1;
  --ink: #263142;
  --ink-soft: #4d5a6e;
  --window: #fbfcfe;
  --window-line: #9db4d0;
  --title: #7fa2cf;
  --title-edge: #56789f;
  --field-bg: #ffffff;
  --field-line: #a9b9cf;
  --focus: #2462c4;
  --button: #4a73a8;
  --button-hover: #3d6496;
  --ok: #2f7a2d;
  --ok-bg: #e5f3e2;
  --bad: #a83a32;
  --bad-bg: #fbe7e5;
  --logo-fill: #ffffff;
  --logo-line: #2a3e5f;
  --poring: #f7a1bc;
  --poring-line: #c9567a;
  --poring-shadow: rgba(46, 80, 38, 0.28);
  --display: "DotGothic16", "MS Gothic", monospace;
  --text: "Atkinson Hyperlegible", "Segoe UI", system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --sky: #1b2a45;
    --grass: #3b6a38;
    --grass-edge: #2a4f28;
    --ground: #151e2c;
    --ink: #e4eaf3;
    --ink-soft: #aebbcd;
    --window: #212e44;
    --window-line: #4a6488;
    --title: #3f5f8c;
    --title-edge: #2b466b;
    --field-bg: #18233a;
    --field-line: #536c90;
    --focus: #8ab8ff;
    --button: #5d88c2;
    --button-hover: #6d97cf;
    --ok: #8fd68a;
    --ok-bg: #1f3a24;
    --bad: #ff9a91;
    --bad-bg: #42221f;
    --logo-fill: #f4f7ff;
    --logo-line: #0f1b30;
    --poring-shadow: rgba(0, 0, 0, 0.35);
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 17px/1.55 var(--text);
}

a { color: var(--button); text-underline-offset: 2px; }
a:hover { color: var(--button-hover); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

code {
  font: 0.95em/1 Consolas, "Courier New", monospace;
  background: var(--window);
  border: 1px solid var(--window-line);
  border-radius: 3px;
  padding: 1px 5px;
}

/* Top bar */
.topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 20px;
  padding: 12px 16px;
  background: var(--sky);
  max-width: 100%;
}
.topbar-name {
  font: 20px/1 var(--display);
  color: var(--ink);
  text-decoration: none;
}
.topbar nav { display: flex; gap: 18px; }
.topbar nav a { color: var(--ink); font-weight: 700; text-decoration: none; padding: 4px 0; }
.topbar nav a:hover { text-decoration: underline; }
.topbar nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; }

/* Hero: the sky over Prontera field */
.hero { background: var(--sky); }
.hero-inner {
  max-width: 1040px;
  margin: 0 auto;
  padding: 40px 16px 48px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 400px);
  gap: 40px 56px;
  align-items: start;
}
.hero-single { grid-template-columns: minmax(0, 420px); justify-content: center; }
.hero-copy { padding-top: 28px; }

.logo {
  margin: 0 0 20px;
  font: clamp(52px, 10vw, 96px)/0.95 var(--display);
  color: var(--logo-fill);
  letter-spacing: 0.01em;
  /* Outlined like the name tags above characters in the game */
  text-shadow:
    -3px -3px 0 var(--logo-line), 0 -3px 0 var(--logo-line), 3px -3px 0 var(--logo-line),
    -3px 0 0 var(--logo-line), 3px 0 0 var(--logo-line),
    -3px 3px 0 var(--logo-line), 0 3px 0 var(--logo-line), 3px 3px 0 var(--logo-line),
    0 7px 0 var(--logo-line);
}
.lede { margin: 0 0 20px; font-size: 21px; line-height: 1.45; max-width: 30ch; }

.status { display: flex; align-items: baseline; gap: 10px; margin: 0; font-weight: 700; max-width: 40ch; }
.status-dot {
  flex: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--logo-line);
  transform: translateY(1px);
}
.status-dot.is-up { background: #5fd35a; }
.status-dot.is-down { background: #e0574d; }

/* The in-game window */
.window {
  background: var(--window);
  border: 1px solid var(--title-edge);
  border-radius: 7px 7px 3px 3px;
  box-shadow: 4px 4px 0 rgba(38, 49, 66, 0.16);
  overflow: hidden;
}
.window-title {
  margin: 0;
  padding: 9px 14px 8px;
  background: var(--title);
  border-bottom: 1px solid var(--title-edge);
  color: #ffffff;
  font: 17px/1.2 var(--display);
  text-shadow: 1px 1px 0 var(--title-edge);
}
.window-body { padding: 18px 18px 20px; }
.window-body > p { margin: 0 0 14px; }

.row { margin-bottom: 16px; }
label { display: block; margin-bottom: 5px; font-weight: 700; font-size: 16px; }
input {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 9px 11px;
  font: inherit;
  color: var(--ink);
  background: var(--field-bg);
  border: 1px solid var(--field-line);
  border-radius: 3px;
}
input:focus-visible { outline: 3px solid var(--focus); outline-offset: 0; border-color: var(--focus); }
input[type="date"] { color-scheme: light dark; }
.hint { margin: 5px 0 0; font-size: 14.5px; line-height: 1.45; color: var(--ink-soft); }
.window-foot { margin-top: 16px; }

.button {
  display: block;
  width: 100%;
  min-height: 48px;
  margin-top: 6px;
  padding: 12px 16px;
  font: 700 17px/1.2 var(--text);
  text-align: center;
  text-decoration: none;
  color: #ffffff;
  background: var(--button);
  border: 1px solid var(--title-edge);
  border-radius: 3px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
  cursor: pointer;
}
.button:hover { background: var(--button-hover); color: #ffffff; }

.notice { margin: 0 0 16px; padding: 10px 12px; border-left: 4px solid; border-radius: 0 3px 3px 0; }
.notice ul { margin: 0; padding-left: 18px; }
.notice li + li { margin-top: 4px; }
.notice.is-ok { color: var(--ok); background: var(--ok-bg); }
.notice.is-bad { color: var(--bad); background: var(--bad-bg); }
.notice.is-ok strong { color: var(--ink); }

/* The field the Poring sits on */
.field {
  position: relative;
  height: 64px;
  background: var(--grass);
  border-top: 5px solid var(--grass-edge);
}
.poring {
  position: absolute;
  left: max(24px, calc(50% - 500px));
  bottom: calc(100% - 14px);
  width: 92px;
  height: auto;
  overflow: visible;
  cursor: pointer;
}
.poring-shadow { fill: var(--poring-shadow); transform-origin: 60px 106px; }
.poring-body { transform-origin: 60px 104px; }
.poring-jelly { fill: var(--poring); stroke: var(--poring-line); stroke-width: 3; }
.poring-tip { fill: none; stroke: var(--poring-line); stroke-width: 3; stroke-linecap: round; }
.poring-shine { fill: #ffffff; opacity: 0.75; }
.poring-eye { fill: #2b2430; }
.poring-mouth { fill: none; stroke: #7a2a45; stroke-width: 2.5; stroke-linecap: round; }

.poring.hop .poring-body { animation: hop 0.62s cubic-bezier(0.3, 0, 0.4, 1) 3; }
.poring.hop .poring-shadow { animation: shadow 0.62s cubic-bezier(0.3, 0, 0.4, 1) 3; }
@keyframes hop {
  0%, 100% { transform: translateY(0) scale(1.08, 0.9); }
  15% { transform: translateY(0) scale(0.95, 1.06); }
  50% { transform: translateY(-30px) scale(0.97, 1.04); }
  85% { transform: translateY(0) scale(1.04, 0.95); }
}
@keyframes shadow {
  0%, 100%, 85% { transform: scale(1); }
  50% { transform: scale(0.6); }
}
@media (prefers-reduced-motion: reduce) {
  .poring.hop .poring-body, .poring.hop .poring-shadow { animation: none; }
}

/* Info sections below the field */
.info { max-width: 760px; margin: 0 auto; padding: 56px 16px 8px; }
.info h2 { margin: 0 0 10px; font: 30px/1.15 var(--display); }
.info-lede { margin: 0 0 28px; color: var(--ink-soft); }

.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  column-gap: 16px;
  padding: 0 0 26px;
}
.steps li > * { grid-column: 2; }
.steps li > p + p { margin-top: 10px; }
.steps li::before {
  content: counter(step);
  grid-column: 1;
  grid-row: 1 / span 4;
  align-self: start;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  font: 24px/1 var(--display);
  color: #ffffff;
  background: var(--title);
  border: 1px solid var(--title-edge);
  border-radius: 6px 6px 3px 3px;
  text-shadow: 1px 1px 0 var(--title-edge);
}
.steps h3 { margin: 6px 0 4px; font-size: 19px; }
.steps p { margin: 0; }

.facts { margin: 0; }
.facts div {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 4px 24px;
  padding: 14px 0;
  border-top: 1px solid var(--window-line);
}
.facts div:last-child { border-bottom: 1px solid var(--window-line); }
.facts dt { font-weight: 700; }
.facts dd { margin: 0; }

.footer { max-width: 760px; margin: 0 auto; padding: 48px 16px 40px; font-size: 14.5px; color: var(--ink-soft); }
.footer p { margin: 0; }

@media (max-width: 820px) {
  .hero-inner { grid-template-columns: minmax(0, 1fr); padding-top: 24px; padding-bottom: 76px; gap: 28px; }
  .hero-copy { padding-top: 0; }
  .lede { font-size: 19px; }
  .poring { width: 72px; }
  .facts div { grid-template-columns: minmax(0, 1fr); }
}

.button-inline { display: inline-block; width: auto; margin: 2px 0 10px; padding-left: 22px; padding-right: 22px; }

.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; margin: 32px 0 0; }
.hero-actions .button-inline { margin: 0; }
.hero-link { color: var(--ink); font-weight: 700; }
.hero-link:hover { color: var(--ink); text-decoration-thickness: 2px; }
