/* Landing page for widgets.michi.onl. Copied verbatim into public/ by tools/build.py.
   Widget pages do not use this file — they are self-contained. */

:root {
  --bg: #f7f7fa;
  --panel: #ffffff;
  --fg: #16161a;
  --muted: #64646f;
  --border: #e3e3ea;
  --accent: #5b46d6;
  --stage: #eeeef4;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101014;
    --panel: #17171c;
    --fg: #f0f0f4;
    --muted: #9d9daa;
    --border: #2a2a33;
    --accent: #9d8bff;
    --stage: #1d1d24;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 48px 20px 72px;
  background: var(--bg);
  color: var(--fg);
  font: 400 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 760px;
  margin: 0 auto;
}

header {
  margin-bottom: 40px;
}

h1 {
  margin: 0 0 6px;
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

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

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

.widget {
  margin-bottom: 28px;
  padding: 20px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
}

.widget h2 {
  margin: 0;
  font-size: 19px;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.widget h2 a {
  color: inherit;
  text-decoration: none;
}

.widget h2 a:hover {
  text-decoration: underline;
}

.summary {
  margin: 6px 0 0;
  color: var(--muted);
}

.meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted);
}

.pill {
  padding: 2px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.pill.active {
  border-color: transparent;
  background: #d8f3e0;
  color: #14612f;
}

.pill.draft {
  border-color: transparent;
  background: #fdf0d5;
  color: #6b4f1d;
}

.pill.deprecated {
  border-color: transparent;
  background: #f6dcdf;
  color: #7a1f29;
}

code {
  padding: 1px 5px;
  border-radius: 5px;
  background: var(--stage);
  font: 13px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* Live preview: the same iframe protocol the installing site uses, so a widget that is
   broken here is broken there. Zero height until the page reports its size. */
.stage {
  margin-top: 16px;
  padding: 18px;
  background: var(--stage);
  border-radius: 10px;
}

.stage iframe {
  display: block;
  width: 100%;
  height: 0;
  border: 0;
  overflow: hidden;
  visibility: hidden;
}

.stage iframe[data-sized] {
  visibility: visible;
}

footer {
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 14px;
}
