:root {
  color-scheme: dark;
  --bg: #09090b;
  --card: #141418;
  --ink: #f4f4f7;
  --muted: #b9b9c3;
  --line: #303038;
  --accent: #b4bcfd;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
body { margin: 0; font-size: 1rem; line-height: 1.8; }
[hidden] { display: none !important; }
a { color: var(--accent); text-underline-offset: .2em; }
a:hover { color: #fff; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 5px; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -.035em; text-wrap: balance; }
h1 { font-size: clamp(2.5rem, 7vw, 4.8rem); max-width: 20ch; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.2rem; }
p, dd, li { overflow-wrap: anywhere; }
img { max-width: 100%; }
.site-header, main, .site-footer { width: min(1120px, calc(100% - 48px)); margin-inline: auto; }
.site-header { min-height: 90px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--line); position: relative; z-index: 2; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; font-weight: 650; font-size: 1.25rem; min-height: 44px; }
.desktop-nav { display: flex; gap: 8px; }
.desktop-nav a, .mobile-nav a { color: var(--muted); text-decoration: none; padding: 8px 14px; border-radius: 8px; min-height: 44px; }
nav a:hover, nav [aria-current="page"] { background: #24242b; color: var(--ink); }
.mobile-nav { display: none; }
.mobile-nav summary { cursor: pointer; min-height: 44px; padding: 8px 14px; border: 1px solid #707080; border-radius: 8px; }
.mobile-nav nav { position: absolute; right: 0; top: calc(100% - 8px); width: 220px; max-width: 100%; display: grid; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); box-shadow: 0 12px 32px #0008; }
.skip-link { position: fixed; top: 12px; left: 12px; padding: 8px 16px; background: var(--ink); color: var(--bg); transform: translateY(-200%); z-index: 10; }
.skip-link:focus { transform: translateY(0); }
.sr-only { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
.page-intro { padding-block: 80px 52px; }
.page-intro p { font-size: 1.2rem; color: var(--muted); max-width: 65ch; margin-top: 24px; }
main { min-height: 65vh; padding-bottom: 96px; }
.filters { display: grid; grid-template-columns: 1fr auto; gap: 12px 24px; margin-bottom: 36px; align-items: center; }
.filters > label { grid-column: 1 / -1; font-weight: 600; }
input[type="search"] { width: 100%; min-height: 48px; padding: 12px 16px; border: 1px solid #707080; border-radius: 10px; background: var(--card); color: var(--ink); font: inherit; line-height: 1.4; box-shadow: inset 0 2px 3px #0004; }
input::placeholder { color: #a5a5b5; }
fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
legend { font-size: .875rem; color: var(--muted); margin-bottom: 8px; }
.filter-option { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; min-height: 44px; border-radius: 8px; cursor: pointer; background: var(--card); }
.filter-option:has(:checked) { background: #343442; }
input[type="radio"] { accent-color: var(--accent); width: 18px; height: 18px; margin: 0; }
#result-count { color: var(--muted); }
.entry-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.entry-card { min-width: 0; border: 1px solid var(--line); border-radius: 18px; background: var(--card); }
.entry-card h2 { font-size: 1.5rem; }
.entry-card h2 a { text-decoration: none; color: var(--ink); }
.entry-card h2 a:hover { text-decoration: underline; }
.entry-body { padding: 28px; }
.entry-body > p { color: var(--muted); margin-top: 16px; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; margin-block: 22px; }
.badge { display: inline-block; font-size: .8rem; padding: 3px 10px; border-radius: 6px; background: #24242d; color: #d7d7e2; }
.byline, .small { font-size: .875rem; color: var(--muted); }
.text-link { display: inline-block; margin-top: 24px; padding-block: 6px; }
.category { padding: 24px 28px 0; color: var(--muted); }
.theme-preview { background: var(--preview-bg, #151519); color: var(--preview-ink, #fff); padding: 32px; border-radius: 17px 17px 0 0; border-bottom: 1px solid var(--line); }
.swatch-row { display: flex; gap: 10px; margin-bottom: 40px; }
.swatch-row i { display: block; width: 40px; height: 40px; border: 1px solid currentColor; border-radius: 50%; background: var(--preview-bg, #151519); }
.swatch-row i:nth-child(2) { background: var(--preview-surface, #30303c); }
.swatch-row i:nth-child(3) { background: var(--preview-accent, #b4bcfd); }
.sample-title { font-size: clamp(1.3rem, 3vw, 1.8rem); font-weight: 600; letter-spacing: -.035em; line-height: 1.3; }
.sample-copy { margin-top: 12px; }
.theme-preview figcaption { font-size: .8rem; margin-top: 28px; }
.theme-preview-large { min-height: 340px; border: 1px solid var(--line); border-radius: 18px; }
.theme-preview-large .swatch-row { margin-bottom: 64px; }
.detail-layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 40px; align-items: start; margin-top: 28px; }
.back-link { display: inline-block; padding-block: 8px; }
.install-panel { padding: 28px; border: 1px solid var(--line); border-radius: 18px; background: var(--card); }
.install-panel > p { margin-block: 20px; }
.install-panel p:last-child { margin-bottom: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; max-width: 100%; padding: 10px 20px; color: #161622; background: linear-gradient(#d6dbff, #b4bcfd); border: 1px solid #e0e3ff; border-radius: 10px; box-shadow: inset 0 1px #fff8, inset 0 -2px #0002, 0 3px 8px #0003; text-decoration: none; font: inherit; font-weight: 600; cursor: pointer; text-align: center; transition: filter 120ms; }
.button:hover { color: #161622; filter: brightness(1.08); }
.button:active { box-shadow: inset 0 2px 4px #0003; }
.button.secondary { background: linear-gradient(#303039, #22222a); color: var(--ink); border-color: #707080; }
.prose { max-width: 74ch; font-size: 1.05rem; }
.prose section, section.prose, .note { padding-top: 76px; }
.prose h2 { margin-bottom: 24px; }
.prose h3 { margin-block: 32px 16px; }
.prose p + p { margin-top: 20px; }
.prose p, .prose li, .permissions dd { color: #c5c5cf; }
.prose li + li { margin-top: 12px; }
.prose ol { padding-left: 24px; margin-block: 24px; }
.prose code { color: var(--ink); font-size: .9em; }
section[id] { scroll-margin-top: 24px; }
.note { max-width: 74ch; }
.note p { margin-top: 20px; color: var(--muted); }
.official-notice {
  margin-bottom: 36px;
  padding: 20px 24px;
  border: 1px solid #3c3e52;
  border-radius: 16px;
  background: linear-gradient(180deg, #161722, #121218);
  color: #d7d8e6;
  max-width: 78ch;
}
.official-notice strong { color: var(--ink); }
.section-head { margin: 56px 0 24px; max-width: 72ch; }
.section-head p { margin-top: 10px; color: var(--muted); }
.builtin-grid {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.builtin-card {
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
}
.builtin-card h3 { font-size: 1.15rem; margin-bottom: 8px; }
.builtin-card p { color: var(--muted); font-size: .95rem; }
.builtin-card .badges { margin: 14px 0 0; }
.prompt-list {
  list-style: none;
  padding: 0;
  margin: 24px 0;
  display: grid;
  gap: 12px;
}
.prompt-list li {
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  color: var(--ink);
  font-size: .98rem;
}
.tier-grid {
  list-style: none;
  padding: 0;
  margin: 24px 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.tier-card {
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
}
.tier-card h3 { font-size: 1.05rem; margin-bottom: 8px; }
.tier-card p { color: var(--muted); font-size: .94rem; }
.contents { display: flex; flex-wrap: wrap; gap: 12px 24px; border-block: 1px solid var(--line); padding: 20px 0; }
.contents a { min-height: 32px; padding-block: 4px; }
.workflow-list h2 { margin-bottom: 24px; }
.workflow-list details { border-block: 1px solid var(--line); }
.workflow-list summary { padding: 18px 0; cursor: pointer; font-weight: 600; }
.workflow-list p { padding-bottom: 24px; color: var(--muted); }
.permissions dt { font-weight: 650; margin-top: 24px; }
.permissions dd { margin: 8px 0 0; }
.site-footer { border-top: 1px solid var(--line); padding-block: 28px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px 24px; font-size: .875rem; }
.site-footer a { color: var(--muted); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.signature { gap: 10px; }
@media (max-width: 720px) {
  .site-header, main, .site-footer { width: calc(100% - 40px); }
  .desktop-nav { display: none; }
  .mobile-nav { display: block; }
  .page-intro { padding-block: 56px 36px; }
  .entry-grid, .builtin-grid, .tier-grid, .detail-layout, .filters { grid-template-columns: minmax(0, 1fr); }
  .entry-body, .theme-preview, .install-panel { padding: 24px; }
  .filters .button { justify-self: start; }
  .detail-layout { gap: 24px; }
  .prose section, section.prose, .note { padding-top: 64px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }
@media (forced-colors: active) { .badge, .button, .filter-option, .theme-preview { border: 1px solid CanvasText; } }
