:root {
  color-scheme: dark;
  --bg: #071018;
  --bg-raise: #102033;
  --ink: #e7f0fb;
  --muted: #b4c3d6;
  --faint: #8ea2bb;
  --line: rgba(126, 176, 240, 0.28);
  --line-strong: rgba(150, 196, 255, 0.72);
  --blue: #7eb6ff;
  --blue-deep: #1c4f93;
  --card: rgba(16, 32, 54, 0.92);
  --shadow: 0 18px 40px rgba(2, 8, 18, 0.35);
  --serif: "Iowan Old Style", Palatino, "Palatino Linotype", Georgia, serif;
  --sans: "Segoe UI", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--sans);
  color: var(--ink);
  background:
    radial-gradient(1200px 520px at 15% -10%, rgba(56, 120, 210, 0.28), transparent 55%),
    radial-gradient(900px 480px at 100% 0%, rgba(24, 70, 140, 0.35), transparent 50%),
    linear-gradient(180deg, #081422 0%, var(--bg) 42%, #050b12 100%);
  line-height: 1.45;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 100% 7px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.55), transparent 78%);
  opacity: 0.45;
}

a {
  color: inherit;
}

.wrap {
  position: relative;
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 64px;
}

.banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-bottom: 28px;
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.wordmark img {
  width: 44px;
  height: 44px;
  display: block;
}

.wordmark h1,
.site-name {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2.1rem, 4vw, 3.1rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 0.95;
}

.intro {
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 1.05rem;
  text-align: center;
}

.apps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

.apps > li:not([hidden]) {
  display: flex;
  width: 100%;
}

.tile {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
  min-height: 248px;
  padding: 18px 18px 16px;
  text-decoration: none;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.tile:hover,
.tile:focus-visible {
  border-color: var(--line-strong);
  background: #152844;
}

.tile:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 76px;
  width: 100%;
  height: 76px;
  margin: 0 0 16px;
}

.logo img {
  display: block;
  height: 72px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  object-position: center;
}

.logo-wide img {
  height: 44px;
}

.plate {
  align-self: center;
  width: fit-content;
  max-width: 100%;
  padding: 7px 10px;
  border-radius: 12px;
  background: #f4f7f2;
}

.mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-bottom: 16px;
  border-radius: 10px;
  background: linear-gradient(160deg, #3c86e6, var(--blue-deep));
  color: #f4f8ff;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.name,
.blurb,
.host {
  width: 100%;
}

.name {
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.blurb {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.95rem;
}

.host {
  margin-top: auto;
  padding-top: 16px;
  color: var(--blue);
  font-size: 0.86rem;
  font-weight: 600;
}

.site-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  margin-top: 42px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 0.9rem;
}

.legal-line {
  align-self: stretch;
  width: 100%;
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.65;
  text-align: center;
}

.legal-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

.legal-links a + a {
  border-left: 1px solid var(--line);
  margin-left: 0.85rem;
  padding-left: 0.85rem;
}

.site-footer a {
  color: var(--blue);
  text-underline-offset: 3px;
}

.legal-links a {
  color: var(--muted);
  text-decoration: none;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--ink);
}

.legal-links a:hover,
.legal-links a:focus-visible {
  text-decoration: underline;
}

.legal-links a:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: 2px;
}

.missing p {
  color: var(--muted);
  font-size: 1.05rem;
}

.missing a.back {
  display: inline-block;
  margin-top: 8px;
  color: var(--blue);
  font-weight: 600;
}

.doc {
  max-width: 40rem;
}

.doc h1 {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.doc .updated {
  margin: 0 0 22px;
  color: var(--faint);
  font-size: 0.92rem;
}

.doc h2 {
  margin: 26px 0 8px;
  font-size: 1.12rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.doc p,
.doc li {
  color: var(--muted);
  font-size: 1rem;
}

.doc p {
  margin: 0 0 12px;
}

.doc ul {
  margin: 0 0 12px;
  padding-left: 1.2rem;
}

.doc li + li {
  margin-top: 6px;
}

.doc a {
  color: var(--blue);
  text-underline-offset: 3px;
}

.doc a:hover,
.doc a:focus-visible {
  color: var(--ink);
}

.doc strong {
  color: var(--ink);
  font-weight: 600;
}

@media (min-width: 720px) {
  .wrap {
    padding-top: 72px;
  }

  .apps > li:not([hidden]) {
    width: calc((100% - 14px) / 2);
  }

  .tile {
    padding: 22px 22px 18px;
  }
}

@media (min-width: 1040px) {
  .apps > li:not([hidden]) {
    width: calc((100% - 28px) / 3);
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto;
    transition: none !important;
  }
}
