/* Vynek public pages (ADR-0078): black and white like the app, dark first, system font. */
:root {
  color-scheme: dark light;
  --bg: #000;
  --raised: #141414;
  --text: #fff;
  --muted: #a3a3a3;
  --line: #262626;
  --button: #fff;
  --button-text: #000;
  /* The verified badge, the one colour in Vynek (ADR-0079), the same in both modes. */
  --verified: #1a8cd8;
  --verified-check: #fff;
  /* A business's badge is gold and a government's grey (ADR-0084). */
  --verified-gold: #b88a00;
  --verified-grey: #71767b;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #fff;
    --raised: #f5f5f5;
    --text: #0a0a0a;
    --muted: #525252;
    --line: #e5e5e5;
    --button: #0a0a0a;
    --button-text: #fff;
  }
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}
body {
  font:
    16px/1.5 system-ui,
    -apple-system,
    'Segoe UI',
    Roboto,
    sans-serif;
  -webkit-text-size-adjust: 100%;
}
a {
  color: inherit;
}
img {
  max-width: 100%;
  height: auto;
}
h1 {
  font-size: 1.5rem;
  line-height: 1.25;
  margin: 12px 0 0;
}
h2 {
  font-size: 1.1rem;
  margin: 24px 0 8px;
}

.bar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  font-weight: 700;
  text-decoration: none;
  font-size: 1.1rem;
}
.brand img {
  border-radius: 7px;
}

main {
  max-width: 640px;
  margin: 0 auto;
  padding: 16px 16px 48px;
}
.card {
  background: var(--raised);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
}
.head {
  text-align: center;
}
.head .avatar {
  margin: 0 auto;
}

.byline {
  display: flex;
  gap: 12px;
  align-items: center;
}
.who {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.who a {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.handle {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 2px 0 0;
}
.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
  display: block;
  background: var(--line);
}
.avatar.large {
  width: 96px;
  height: 96px;
}
.badge {
  vertical-align: -2px;
  margin-left: 4px;
}
.badge.gold {
  --verified: var(--verified-gold);
}
.badge.grey {
  --verified: var(--verified-grey);
}

.text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 12px 0 0;
}
.note {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 8px 0 0;
}
.event {
  display: flex;
  flex-direction: column;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.event span {
  color: var(--muted);
  font-size: 0.9rem;
}

.photos {
  display: grid;
  gap: 4px;
  margin-top: 12px;
  border-radius: 12px;
  overflow: hidden;
}
.photos.n2,
.photos.n3,
.photos.n4 {
  grid-template-columns: 1fr 1fr;
}
.photos img {
  display: block;
  width: 100%;
  max-height: 600px;
  object-fit: contain;
  background: var(--line);
}
.photos.n2 img,
.photos.n3 img,
.photos.n4 img {
  aspect-ratio: 1;
  height: 100%;
}
.embed .photos {
  grid-template-columns: 1fr;
}
.embed .photos img {
  aspect-ratio: auto;
  max-height: 300px;
}

.stats {
  display: flex;
  gap: 16px;
  justify-content: inherit;
  color: var(--muted);
  font-size: 0.9rem;
  margin: 12px 0 0;
  flex-wrap: wrap;
}
.head .stats {
  justify-content: center;
}
.stats strong {
  color: var(--text);
}

.actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.head .actions {
  justify-content: center;
}
.action,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  text-decoration: none;
  font-weight: 600;
}
.action.primary,
.button {
  background: var(--button);
  color: var(--button-text);
  border-color: var(--button);
}
.button.quiet {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}
.button.small {
  min-height: 36px;
  padding: 0 14px;
  font-size: 0.9rem;
}

.list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.posts {
  margin-top: 12px;
}
.posts time,
.row time {
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 8px;
}
.row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  text-decoration: none;
}
.row .text {
  margin: 0;
  display: block;
}
.thumb {
  width: 72px;
  height: 72px;
  border-radius: 8px;
  object-fit: cover;
  flex: none;
}

/* "Sign in or get Vynek": shown when an action's link points here, with no script. */
.prompt {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10;
  align-items: flex-end;
  justify-content: center;
}
.prompt:target {
  display: flex;
}
.signed-in .prompt {
  display: none;
}
.scrim {
  position: absolute;
  inset: 0;
  background: rgb(0 0 0 / 60%);
}
.sheet {
  position: relative;
  width: 100%;
  max-width: 440px;
  margin: 16px;
  background: var(--raised);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: center;
}
.sheet h2 {
  margin: 0;
}
.sheet p {
  color: var(--muted);
  margin: 0 0 8px;
}
.text-link {
  color: var(--muted);
  padding: 8px;
}
@media (min-width: 600px) {
  .prompt {
    align-items: center;
  }
}

/* The embed: compact, no navigation, fits the frame it is given. */
.embed main {
  max-width: none;
  padding: 0;
  height: 100vh;
  overflow: auto;
  display: flex;
  flex-direction: column;
}
.embed main > .card,
.embed main > .list {
  border-radius: 0;
  border: 0;
}
.embed main > .card {
  padding: 14px 16px 4px;
}
.embed .posts {
  padding: 0 16px;
  margin: 0;
}
.embed .posts .card {
  padding: 12px;
}
.embed-foot {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 12px 16px;
  margin-top: auto;
  border-top: 1px solid var(--line);
}
.embed-foot .button {
  min-height: 36px;
  padding: 0 14px;
  font-size: 0.9rem;
}
.embed-foot .mark {
  margin-left: auto;
  display: inline-flex;
}
.embed-foot .mark img {
  border-radius: 5px;
}
.embed .head {
  text-align: left;
}
.embed .head .avatar,
.embed .head .stats,
.embed .head .actions {
  margin-left: 0;
  justify-content: flex-start;
}
body.embed {
  background: var(--raised);
}
