:root {
  color-scheme: light dark;
  --background: #ffffff;
  --text-primary: #333333;
  --text-secondary: #4b5563;
  --text-muted: #6b7280;
  --link: #5877b8;
  --link-hover: #3f5f9e;
  /* Secondary accent — same value in both themes on purpose, used in
     exactly one or two spots (version badge, one word in the hero),
     never on links/borders/anything --link already owns. */
  --accent-pink: #ec55a2;

  /* Derived, not invented — every one of these is just --text-primary,
     --background, --link, or --accent-pink at a different mix, so the
     page still reads as "one accent, minimal" rather than a new palette. */
  --surface: color-mix(in oklab, var(--text-primary) 4%, var(--background));
  --border: color-mix(in oklab, var(--text-primary) 12%, var(--background));
  --code-bg: color-mix(in oklab, var(--text-primary) 8%, var(--background));
  --link-soft: color-mix(in oklab, var(--link) 10%, transparent);
  --accent-pink-soft: color-mix(in oklab, var(--accent-pink) 10%, transparent);
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #333333;
    --text-primary: #f5f5f5;
    --text-secondary: #d4d4d4;
    --text-muted: #a3a3a3;
    --link: #6b8fd6;
    --link-hover: #87a8f5;
  }
}

[data-theme="light"] {
  --background: #ffffff;
  --text-primary: #333333;
  --text-secondary: #4b5563;
  --text-muted: #6b7280;
  --link: #5877b8;
  --link-hover: #3f5f9e;
}

[data-theme="dark"] {
  --background: #333333;
  --text-primary: #f5f5f5;
  --text-secondary: #d4d4d4;
  --text-muted: #a3a3a3;
  --link: #6b8fd6;
  --link-hover: #87a8f5;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text-primary);
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Helvetica,
    Arial,
    sans-serif;
  line-height: 1.6;
  transition: background-color 0.2s ease, color 0.2s ease;
}

main {
  max-width: 920px;
  margin: 0 auto;
  padding: 48px 24px 96px;
}

/* The fixed-position theme toggle (top:20px, 40px tall) can otherwise sit
   on top of the hero heading once it wraps to more lines than it has room
   for — push all content below the toggle's footprint instead of trying
   to dodge it horizontally. */
@media (max-width: 700px) {
  main {
    padding-top: 76px;
  }
}

a {
  color: var(--link);
}
a:hover {
  color: var(--link-hover);
}

code {
  background: var(--code-bg);
  border-radius: 4px;
  padding: 0.1em 0.4em;
  font-size: 0.9em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--text-primary);
}

/* --- Theme toggle --- */
.theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 100;
  padding: 0;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.theme-toggle:hover {
  border-color: var(--link);
}
.theme-toggle:active {
  transform: scale(0.92);
}
.theme-toggle:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
}
.theme-toggle .icon {
  position: absolute;
  width: 17px;
  height: 17px;
  opacity: 0;
  transform: scale(0.5) rotate(-90deg);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
/* Icon shown represents where a click takes you, not where you are —
   moon (switch to dark) while in light mode, sun (switch to light)
   while in dark mode. */
[data-theme="light"] .theme-toggle .icon-moon,
[data-theme="dark"] .theme-toggle .icon-sun {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}
@media (prefers-reduced-motion: reduce) {
  .theme-toggle,
  .theme-toggle .icon {
    transition: none;
  }
  .theme-toggle:active {
    transform: none;
  }
}

header.hero h1 {
  font-size: 2rem;
  margin: 0 0 4px;
  letter-spacing: -0.02em;
  font-weight: 700;
}

/* Reads as a subtitle directly under the h1, not a separate heading block —
   hence the near-zero top margin (overriding the browser default) and a
   distinct, lighter weight/color than the h1. */
header.hero h3 {
  margin: 0 0 16px;
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--text-secondary);
}

header.hero p {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin: 0;
}

/* A secondary aside, not a continuation — extra top margin visually
   separates it from the paragraph above, italics carry the emphasis
   instead of a border/box treatment. (Specificity needs to beat
   `header.hero p` above, hence the repeated `header.hero` prefix.) */
header.hero p.scope-note {
  margin-top: 28px;
  color: var(--text-muted);
  font-style: italic;
}

.accent-pink {
  color: var(--accent-pink);
}

/* --- Version badge + status --- */
.version-block {
  margin: 24px 0 40px;
}

.version-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--accent-pink);
  color: var(--accent-pink);
  background: var(--accent-pink-soft);
  margin-bottom: 12px;
}

.status-list {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.9rem;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.status-list strong {
  color: var(--text-primary);
}

/* --- Framework grid --- */
.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
  margin: 36px 0 56px;
}

.app-card {
  display: block;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.app-card:hover {
  border-color: var(--link);
  transform: translateY(-2px);
}

.app-card .framework-name {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 6px;
  color: var(--text-primary);
}

.app-card .stack {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.app-card .go {
  display: inline-block;
  margin-top: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--link);
}

section.findings > h2 {
  font-size: 1.5rem;
  margin: 0 0 6px;
}

section.findings > .lede {
  color: var(--text-secondary);
  margin: 0 0 32px;
  font-size: 0.95rem;
}

h3.section-heading {
  font-size: 1.05rem;
  margin: 40px 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.section-lede {
  margin: -6px 0 14px;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Scrolls horizontally instead of squishing columns on narrow viewports —
   the min-width on table below is what actually forces the overflow. */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 10px;
}

.table-scroll + .table-scroll {
  margin-top: 20px;
}

table {
  width: 100%;
  min-width: 480px;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  font-size: 0.9rem;
}

th,
td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}

thead th {
  background: var(--link-soft);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--link);
}

tbody tr:last-child td {
  border-bottom: none;
}

tbody th {
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
}

.pending {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-muted);
  border: 1px dashed var(--text-muted);
  border-radius: 999px;
  padding: 2px 8px;
}

.cards {
  display: grid;
  gap: 14px;
}

.finding-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 20px;
}

.finding-card h4 {
  margin: 0 0 8px;
  font-size: 1rem;
  color: var(--text-primary);
}

.finding-card p {
  margin: 0 0 10px;
  font-size: 0.92rem;
  color: var(--text-secondary);
}

.finding-card p:last-child {
  margin-bottom: 0;
}

.finding-card .resolution {
  color: var(--text-primary);
}

.finding-card .resolution::before {
  content: "→ ";
  color: var(--link);
  font-weight: 700;
}
