/* Colors follow the app's default Paper palette (Themes/Colors.axaml). */
:root {
  --chrome: #16303f;
  --chrome-text: #f4efe6;
  --brand-mark: #e58b6e;
  --surface: #fcfaf6;
  --surface-alt: #f7f2ea;
  --card: #ede3d3;
  --text: #1f2a30;
  --text-secondary: #566269;
  --label: #9a4526;
  --accent: #1b7c77;
  --link: #156a66;
  --divider: #ddd2c1;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --chrome: #0e1e28;
    --chrome-text: #e9e4da;
    --brand-mark: #e8987a;
    --surface: #1c2e38;
    --surface-alt: #172731;
    --card: #21343f;
    --text: #e9e4da;
    --text-secondary: #a7b4ba;
    --label: #e8987a;
    --accent: #4fb8b0;
    --link: #4fb8b0;
    --divider: #2c4350;
  }
}

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

body {
  margin: 0;
  background: var(--surface);
  color: var(--text);
  font-family: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
}

a {
  color: var(--link);
  text-underline-offset: 0.15em;
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

.skip {
  position: absolute;
  left: -999px;
}

.skip:focus {
  left: 16px;
  top: 8px;
  padding: 8px 12px;
  background: var(--surface);
  z-index: 1;
}

.bar {
  background: var(--chrome);
  color: var(--chrome-text);
}

.bar-inner,
main,
.footer-inner {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 16px;
}

.bar-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  font-family: Bahnschrift, "DIN Alternate", "Segoe UI", sans-serif;
  font-size: 1.125rem;
  letter-spacing: 0.02em;
}

.brand img {
  width: 32px;
  height: 32px;
}

.bar a:focus-visible {
  outline-color: var(--chrome-text);
}

main {
  padding-top: 40px;
  padding-bottom: 56px;
}

h1,
h2,
h3 {
  line-height: 1.25;
}

h1 {
  margin: 0 0 8px;
  font-size: 2rem;
}

h2 {
  margin: 40px 0 8px;
  font-size: 1.375rem;
}

h3 {
  margin: 24px 0 4px;
  font-size: 1.0625rem;
}

.label {
  margin: 0 0 4px;
  color: var(--label);
  font-family: Bahnschrift, "DIN Alternate", "Segoe UI", sans-serif;
  font-size: 0.8125rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.lead {
  margin: 0 0 24px;
  color: var(--text-secondary);
  font-size: 1.1875rem;
}

.meta {
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

.hero {
  display: flex;
  align-items: center;
  gap: 24px;
}

.hero img {
  flex: none;
  width: 128px;
  height: 128px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.cards li {
  padding: 16px;
  background: var(--card);
  border-radius: 8px;
}

.cards h3 {
  margin: 0 0 4px;
}

.cards p {
  margin: 0;
  color: var(--text-secondary);
}

.note {
  margin: 24px 0 0;
  padding: 16px;
  background: var(--surface-alt);
  border-left: 4px solid var(--accent);
  border-radius: 4px;
}

table {
  width: 100%;
  margin: 16px 0;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

th,
td {
  padding: 8px;
  border-bottom: 1px solid var(--divider);
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--surface-alt);
}

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

li + li {
  margin-top: 4px;
}

.cards li + li {
  margin-top: 0;
}

footer {
  border-top: 1px solid var(--divider);
  background: var(--surface-alt);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  padding-top: 16px;
  padding-bottom: 16px;
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

@media (max-width: 560px) {
  h1 {
    font-size: 1.625rem;
  }

  .hero {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .hero img {
    width: 96px;
    height: 96px;
  }

  /* Each row becomes a stacked block; the cell's data-label stands in for its column heading. */
  thead {
    position: absolute;
    left: -999px;
  }

  tr,
  td {
    display: block;
  }

  tr {
    padding: 8px 0;
    border-bottom: 1px solid var(--divider);
  }

  td {
    padding: 2px 0;
    border: 0;
  }

  td::before {
    content: attr(data-label);
    display: block;
    color: var(--label);
    font-size: 0.8125rem;
  }
}

@media (forced-colors: active) {
  .cards li,
  .note {
    border: 1px solid CanvasText;
  }
}
