/* Same colours and shapes as the ARM and circuit simulators */
:root {
  --bg: #0f1827;
  --panel: #0a1019;
  --border: #243246;
  --teal: #008080;
  --teal-hi: #009b9b;
  --red: #db133c;
  --text: #ffffff;
  --text-2: #c6c6c6;
  --muted: #8a93a0;
  --sans: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --radius: 18px;
}

* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  min-height: 100%;
}
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
button {
  font: inherit;
  color: inherit;
}
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--teal-hi);
  outline-offset: 3px;
}

/* ---------------------------------------------------------------- Header */
.topbar {
  position: relative;
  min-height: 72px;
  flex: 0 0 auto;
}
.topbar-right {
  position: absolute;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 14px;
}
/* Like the first version of the ARM simulator: the rounded corners crop the logo */
.logo-slot img {
  display: block;
  height: 55px;
  background: #fff;
  border-radius: 20px;
}
.lang-switch {
  display: flex;
  gap: 2px;
}
/* Two connected halves, like the up/down buttons of the memory view */
.lang-switch button {
  background: #121a26;
  border: 1px solid var(--border);
  color: var(--text-2);
  padding: 2px 10px;
  font-size: 12.5px;
  cursor: pointer;
}
.lang-switch button:first-child {
  border-radius: 999px 2px 2px 999px;
  padding-left: 12px;
}
.lang-switch button:last-child {
  border-radius: 2px 999px 999px 2px;
  padding-right: 12px;
}
.lang-switch button:hover {
  border-color: var(--teal);
  color: #fff;
}
.lang-switch button.on {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}

/* ---------------------------------------------------------------- Content */
main {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 48px;
  padding: 24px 16px 64px;
}
.title {
  margin: 0;
  font-size: 46px;
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1.1;
  text-align: center;
}
.t-red {
  color: var(--red);
  font-weight: 800;
}
.t-teal {
  color: var(--teal);
  font-weight: 500;
}

.tiles {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
  justify-content: center;
}
.tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 300px;
  height: 220px;
  background: var(--panel);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: 46px;
  line-height: 1.1;
  letter-spacing: -0.5px;
  text-decoration: none;
  transition:
    border-color 0.15s,
    transform 0.15s,
    box-shadow 0.15s;
}
.tile:hover {
  border-color: var(--teal);
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}
.tile:active {
  transform: none;
}

.about {
  max-width: 640px;
  margin: 0;
  color: var(--text-2);
  font-size: 16px;
  line-height: 1.6;
  text-align: center;
}
.about a {
  color: var(--teal-hi);
}

/* ---------------------------------------------------------------- Small windows */
@media (max-width: 920px) {
  .logo-slot {
    display: none;
  }
}
@media (max-width: 700px) {
  .title {
    font-size: 34px;
  }
  .tile {
    width: 100%;
    max-width: 340px;
    height: 160px;
    font-size: 38px;
  }
  .tiles {
    gap: 20px;
    width: 100%;
  }
  main {
    gap: 36px;
  }
}
