/* Colours of the price annotation and the panel's speech bubble (content.css, panel.css). */
:root {
  --navy: #1f3b6e;
  --cream: #fffdf5;
  --bg: #f6f7fb;
  --surface: #ffffff;
  --text: #1c2230;
  --muted: #5b6475;
  --border: #dde1ea;
  --accent: var(--navy);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12161f;
    --surface: #1b2130;
    --text: #e6e9f0;
    --muted: #9aa3b5;
    --border: #2c3446;
    --accent: #8fb0ea;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font:
    16px/1.6 system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
}

a {
  color: var(--accent);
}

.wrap {
  max-width: 52rem;
  margin: 0 auto;
  padding: 0 1rem;
}

.hero {
  background: var(--navy);
  color: var(--cream);
  padding: 3rem 0;
}

.hero-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem 3.5rem;
}

.hero h1 {
  margin: 0;
  font-size: 2.5rem;
  letter-spacing: 0.02em;
}

.lead {
  max-width: 32rem;
  margin: 0.5rem 0;
  font-size: 1.15rem;
}

.version {
  margin: 0;
  opacity: 0.75;
  font-size: 0.9rem;
}

/* Minerva with a speech bubble, as in the panel. */
.logo {
  position: relative;
  flex: none;
}

.logo img {
  display: block;
  border-radius: 50%;
  background: var(--cream);
}

main section {
  margin: 2.5rem 0;
  scroll-margin-top: 1rem;
}

h2 {
  margin: 0 0 0.75rem;
  font-size: 1.4rem;
}

h3 {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
}

.hero-text {
  flex: 1 1 20rem;
}

.stores,
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.25rem 0 0.75rem;
}

.store {
  display: flex;
  flex-direction: column;
  min-width: 10rem;
  padding: 0.55rem 1.1rem;
  border: 1.5px solid var(--cream);
  border-radius: 0.6rem;
  background: var(--cream);
  color: var(--navy);
  line-height: 1.25;
  text-decoration: none;
}

.store small {
  font-size: 0.75rem;
  opacity: 0.8;
}

.store:hover {
  background: transparent;
  color: var(--cream);
}

.toc {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}

.toc a {
  text-decoration: none;
}

.columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: 1rem 2rem;
}

.facts {
  margin: 0 0 0.5rem;
  padding-left: 1.1rem;
}

.facts li {
  margin: 0.15rem 0;
}

h3 {
  margin: 1.5rem 0 0.4rem;
}

.columns h3 {
  margin-top: 0;
}

.fields dt {
  font-weight: 600;
}

.fields dd {
  margin: 0 0 0.6rem;
  padding-left: 0.9rem;
  border-left: 2px solid var(--border);
}

.formula {
  overflow-x: auto;
  padding: 0.9rem 1rem;
  border: 1px solid var(--border);
  border-radius: 0.6rem;
  background: var(--surface);
  font-size: 0.85rem;
}

.button {
  display: inline-block;
  padding: 0.5rem 1.1rem;
  border: 1.5px solid var(--accent);
  border-radius: 0.6rem;
  background: var(--accent);
  color: var(--bg);
  font-weight: 600;
  text-decoration: none;
}

.button.secondary,
.button:hover {
  background: transparent;
  color: var(--accent);
}

.button.secondary:hover {
  background: var(--accent);
  color: var(--bg);
}

.disclaimer {
  padding: 1rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background: var(--surface);
}

.disclaimer h2 {
  font-size: 1.15rem;
}

.disclaimer p {
  margin: 0;
  color: var(--muted);
}

code {
  font-size: 0.9em;
  overflow-wrap: anywhere;
}

.note,
.footer {
  color: var(--muted);
  font-size: 0.85rem;
}

.footer {
  padding-top: 1rem;
  padding-bottom: 2rem;
  border-top: 1px solid var(--border);
}

img {
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
}

/* Side by side on wide screens, at equal height: each link grows by its image's aspect ratio. */
.screenshots {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.screenshots a {
  display: block;
  min-width: 0;
}

.screenshots img {
  display: block;
  width: 100%;
}

@media (min-width: 48rem) {
  .screenshots {
    flex-direction: row;
  }

  .screenshots a {
    flex-grow: calc(var(--ratio));
    flex-basis: 0;
  }
}
