/* Clean, monochrome theme in the spirit of openstore.site, light and dark. */
:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --surface: #ffffff;
  --soft: #f7f7f7;
  --hover: #efefef;
  --text: #171717;
  --body: #404040;
  --muted: #6f6f6f;
  --faint: #a3a3a3;
  --border: #ebebeb;
  --strong-border: #d9d9d9;
  --primary: #171717;
  --on-primary: #ffffff;
  --green: #18794e;
  --heart: #d6204f;
  --dot: #e2e2e2;
  --shadow: 0 1px 2px #09090b0a, 0 8px 24px #09090b14;
  --sans: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --surface: #0a0a0a;
    --soft: #111111;
    --hover: #1a1a1a;
    --text: #ededed;
    --body: #b4b4b4;
    --muted: #878787;
    --faint: #525252;
    --border: #1f1f1f;
    --strong-border: #2e2e2e;
    --primary: #ededed;
    --on-primary: #000000;
    --green: #62c073;
    --heart: #ff6b8b;
    --dot: #1d1d1d;
    --shadow: 0 0 0 1px #ffffff05, 0 16px 40px #0009;
  }
}

* { box-sizing: border-box; }

/* Focus shows as a background tint or a border colour, never a ring. */
:focus, :focus-visible { outline: none; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--text); }
a:focus-visible { background: var(--hover); border-radius: 4px; }

/* Header: brand, view pills in the middle, the main action on the right */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 12px 32px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
}
.brand {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.01em;
}
.brand .icon { width: 20px; height: 20px; }
.views { justify-self: center; display: flex; gap: 2px; }
.views a {
  padding: 6px 12px;
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
}
.views a[aria-current="page"] { background: var(--hover); color: var(--text); }
.views a:hover, .views a:focus-visible { background: var(--soft); color: var(--text); }
.header-actions { justify-self: end; }
.add-editor {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--primary);
  background: var(--primary);
  color: var(--on-primary);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
}
.add-editor:hover, .add-editor:focus-visible { background: var(--body); border-color: var(--body); }

main, .site-footer {
  max-width: 1160px;
  margin: 0 auto;
  padding-left: 32px;
  padding-right: 32px;
}

/* Hero */
.hero { text-align: center; padding: 72px 0 56px; }
.eyebrow {
  margin: 0 0 18px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.hero h1 {
  margin: 0;
  font-size: clamp(38px, 5vw, 60px);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.045em;
}
.mark {
  text-decoration: underline;
  text-decoration-color: var(--green);
  text-decoration-thickness: 4px;
  text-underline-offset: 10px;
}
.lede { margin: 18px 0 28px; font-size: 18px; color: var(--muted); }
.pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; list-style: none; margin: 0; padding: 0; }
.pills a {
  display: inline-block;
  padding: 5px 12px;
  border: 1px solid var(--strong-border);
  border-radius: 999px;
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
}
.pills a:hover, .pills a:focus-visible { background: var(--soft); border-color: var(--faint); }

/* Section headings */
.month, .kind-group h2 { margin: 8px 0 16px; font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }

/* Cards: every card has the same width and height. */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
  margin-bottom: 56px;
}
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.15s ease;
}
.card:hover { border-color: var(--strong-border); }
.card:has(.card-link:focus-visible) { border-color: var(--faint); background: var(--soft); }
/* The name's link covers the whole card; the links out sit above it. */
.card-link { color: inherit; text-decoration: none; }
.card-link::after { content: ""; position: absolute; inset: 0; }
.card-link:focus-visible { background: none; }

.card-media {
  display: flex;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  padding: 18px 18px 0;
  border-bottom: 1px solid var(--border);
  background-color: var(--soft);
  background-image: radial-gradient(var(--dot) 1px, transparent 1px);
  background-size: 14px 14px;
}
.card-shot {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top left;
  border: 1px solid var(--strong-border);
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  box-shadow: var(--shadow);
}
.card-banner { display: flex; flex-direction: column; width: 100%; padding: 2px 2px 18px; }
.banner-kind {
  order: -1;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.banner-name { margin-top: 8px; font-size: 22px; font-weight: 600; line-height: 1.2; letter-spacing: -0.02em; }

.card-body { display: flex; flex-direction: column; height: 188px; padding: 16px 18px 12px; }
.card-head { display: flex; align-items: center; gap: 12px; }
.card-icon {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--text);
  color: var(--bg);
  font-weight: 600;
  font-size: 18px;
}
.card-title { flex: 1; min-width: 0; }
.card-name { margin: 0; font-size: 15px; font-weight: 600; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-by { margin: 0; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-actions { display: inline-flex; align-items: center; gap: 6px; }
.card-out {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: 1px solid var(--strong-border);
  border-radius: 7px;
  color: var(--text);
}
.card-out:hover, .card-out:focus-visible { border-color: var(--faint); background: var(--soft); }
.card-comments { margin-left: 4px; }
.card-hearts, .card-comments { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; font-family: var(--mono); }
.card-hearts { align-self: flex-start; font-size: 13px; color: var(--heart); }
.icon { width: 15px; height: 15px; flex: none; }
.card-desc {
  margin: 12px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--body);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.chips {
  display: flex;
  flex-wrap: nowrap;
  min-width: 0;
  overflow: hidden;
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  -webkit-mask-image: linear-gradient(to right, #000 82%, transparent);
  mask-image: linear-gradient(to right, #000 82%, transparent);
}
.chips li + li::before { content: "·"; margin: 0 6px; color: var(--faint); }
.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 26px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}

/* Editor page */
.editor { max-width: 860px; margin: 40px 0 64px; }
.editor-shot {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  background-color: var(--soft);
  background-image: radial-gradient(var(--dot) 1px, transparent 1px);
  background-size: 14px 14px;
}
.editor-shot img {
  display: block;
  width: calc(100% - 48px);
  height: auto;
  margin: 24px 24px 0;
  border: 1px solid var(--strong-border);
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  box-shadow: var(--shadow);
}
.editor-shot figcaption {
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  background: var(--surface);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}
.editor-shot figcaption a { color: var(--muted); }
.editor-image { width: 100%; height: auto; border: 1px solid var(--border); border-radius: 12px; }
.editor h1 { margin: 28px 0 6px; font-size: 32px; letter-spacing: -0.03em; }
.editor-desc { margin: 0 0 6px; font-size: 16px; color: var(--body); }
.editor-by { margin: 0 0 14px; color: var(--muted); }
.editor .chips { flex-wrap: wrap; gap: 6px; margin: 0 0 16px; font-family: var(--sans); white-space: normal; -webkit-mask-image: none; mask-image: none; }
.editor .chips li { padding: 3px 10px; border: 1px solid var(--strong-border); border-radius: 999px; color: var(--body); }
.editor .chips li + li::before { content: none; }
.editor-links { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0 0 14px; padding: 0; }
.editor-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border: 1px solid var(--strong-border);
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
}
.editor-links a:hover, .editor-links a:focus-visible { background: var(--soft); border-color: var(--faint); }
.editor-links a.primary { border-color: var(--primary); background: var(--primary); color: var(--on-primary); }
.editor-links a.primary:hover, .editor-links a.primary:focus-visible { border-color: var(--body); background: var(--body); }
.editor-links .icon-arrow-up-right { width: 13px; height: 13px; opacity: 0.6; }
.arrived { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.discussion { margin-top: 32px; padding: 20px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.discussion h2 { margin-top: 0; font-size: 16px; font-weight: 600; }

/* Footer */
.site-footer {
  margin-top: 24px;
  padding-top: 24px;
  padding-bottom: 48px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
}
.site-footer a { color: var(--muted); }
.site-footer .dot { color: var(--faint); }

@media (max-width: 720px) {
  .header-inner { grid-template-columns: 1fr auto; padding: 12px 20px; }
  .views { grid-column: 1 / -1; grid-row: 2; justify-self: start; }
  main, .site-footer { padding-left: 20px; padding-right: 20px; }
  .hero { padding: 48px 0 40px; }
}
