/* Bonumark shared base and generic public content. */

:root {
  --bg: #0f0f0f;
  --panel: #171717;
  --panel-2: #202020;
  --text: #f3f0ea;
  --muted: #b7b0a6;
  --line: #34312d;
  --accent: #f2f0ea;
  --danger: #c14b4b;
  --success: #6fbf73;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
}

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }

a:hover { opacity: .8; }

.site-header {
  max-width: 920px;
  margin: 0 auto;
  padding: 28px 22px 12px;
}

.site-title {
  color: var(--text);
  font-weight: 800;
  text-decoration: none;
  letter-spacing: .02em;
}

.hero {
  max-width: 920px;
  margin: 0 auto;
  padding: 64px 22px 24px;
}

.hero h1 {
  font-size: clamp(2.4rem, 8vw, 5rem);
  line-height: .98;
  margin: 0 0 18px;
  letter-spacing: -.05em;
}

.hero p:not(.eyebrow) {
  max-width: 640px;
  color: var(--muted);
  font-size: 1.15rem;
}

.description {
  font-size: 1.2rem;
  color: var(--muted);
  margin: 0 0 16px;
}

.meta, .eyebrow {
  color: var(--muted);
  font-size: .9rem;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: .12em;
  font-weight: 800;
  margin: 0 0 12px;
}

.content {
  margin-top: 42px;
}

.content h2 {
  font-size: 2rem;
  line-height: 1.15;
  margin: 44px 0 12px;
}

.content h3 {
  font-size: 1.45rem;
  margin: 34px 0 10px;
}

.content p, .content li {
  font-size: 1.06rem;
}

.content blockquote {
  border-left: 4px solid var(--accent);
  margin: 32px 0;
  padding: 6px 0 6px 22px;
  color: var(--muted);
}

.content pre {
  overflow-x: auto;
  background: #080808;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px;
}

.content code {
  background: #080808;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 5px;
}

.content pre code {
  border: 0;
  padding: 0;
}

.content table {
  width: 100%;
  border-collapse: collapse;
  margin: 28px 0;
}

.content th, .content td {
  border-bottom: 1px solid var(--line);
  padding: 12px;
  text-align: left;
  vertical-align: top;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px;
  margin: 18px 0;
}

.card h2 {
  margin: 0 0 8px;
  line-height: 1.1;
}

.card h2 a {
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
}

.public-nav {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 22px;
}

.public-nav a,
.terms a {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 10px;
  text-decoration: none;
  color: var(--text);
  background: var(--panel-2);
  font-size: .86rem;
}

.terms {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 0;
}

.terms.compact {
  margin-top: 12px;
}

.eyebrow a {
  color: var(--muted);
  text-decoration: none;
}

.registration-honeypot {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}


/* Comment sign-in prompts should read as links, not pills. */
.comment-note .comment-inline-link {
  color: var(--accent, #c7895b);
  font-weight: 700;
  text-decoration: none;
}

.comment-note .comment-inline-link:hover,
.comment-note .comment-inline-link:focus-visible {
  text-decoration: underline;
}


/* Core pinned-post fallback presentation. Themes may refine these classes without owning pin logic. */
body.bonumark-public .stream-pinned-posts {
  margin: 0 0 1rem;
}
body.bonumark-public .stream-pinned-heading {
  display: flex;
  align-items: center;
  gap: .65rem;
  margin: 0 0 .55rem;
}
body.bonumark-public .stream-pinned-heading::after {
  content: '';
  height: 1px;
  flex: 1;
  background: var(--line);
}
body.bonumark-public .stream-pinned-label {
  color: var(--muted);
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
body.bonumark-public .stream-pinned-feed {
  display: grid;
  gap: 1rem;
}
body.bonumark-public .stream-card-pinned {
  border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
}
body.bonumark-public .stream-post-actions-menu {
  position: relative;
  z-index: 1;
  display: inline-flex;
  margin: 0;
}
body.bonumark-public .stream-post-actions-menu[open] {
  z-index: 31;
}
body.bonumark-public .stream-post-actions-toggle {
  width: 38px;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
  cursor: pointer;
  list-style: none;
}
body.bonumark-public .stream-post-actions-toggle::-webkit-details-marker {
  display: none;
}
body.bonumark-public .stream-post-actions-toggle::marker {
  content: '';
}
body.bonumark-public .stream-post-actions-menu[open] .stream-post-actions-toggle,
body.bonumark-public .stream-post-actions-toggle:hover,
body.bonumark-public .stream-post-actions-toggle:focus-visible {
  border-color: var(--accent);
  color: var(--text);
}
body.bonumark-public .stream-post-actions-dots {
  display: block;
  margin-top: -0.18rem;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  line-height: 1;
}
body.bonumark-public .stream-post-actions-popover {
  position: absolute;
  z-index: 30;
  right: 0;
  top: calc(100% + 0.45rem);
  bottom: auto;
  min-width: 10.5rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  background: var(--panel);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
}

body.bonumark-public:not(.stream-quick-edit-enhanced) [data-stream-quick-edit-open] {
  display: none !important;
}
body.bonumark-public .stream-inline-edit[hidden] {
  display: none !important;
}
body.bonumark-public .stream-inline-edit {
  display: grid;
  gap: .65rem;
  margin: 0;
}
body.bonumark-public .stream-inline-edit textarea {
  width: 100%;
  min-height: 112px;
  max-height: 65vh;
  box-sizing: border-box;
  resize: vertical;
  padding: .85rem .9rem;
  border: 1px solid var(--line);
  border-radius: .75rem;
  background: var(--panel);
  color: var(--text);
  font: inherit;
  line-height: 1.55;
}
body.bonumark-public .stream-inline-edit textarea:focus {
  outline: 2px solid color-mix(in srgb, var(--accent) 45%, transparent);
  outline-offset: 2px;
  border-color: var(--accent);
}
body.bonumark-public .stream-inline-edit-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}
body.bonumark-public .stream-inline-edit-status {
  min-height: 1.2em;
  margin: 0;
  color: var(--muted);
  font-size: .82rem;
}
body.bonumark-public .stream-inline-edit-status.is-error {
  color: #ef4444;
}
body.bonumark-public .stream-inline-edit-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .55rem;
  margin-left: auto;
}
body.bonumark-public .stream-inline-edit-cancel,
body.bonumark-public .stream-inline-edit-save {
  min-height: 38px;
  padding: .55rem .85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--text);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
body.bonumark-public .stream-inline-edit-save {
  border-color: var(--accent);
  background: var(--accent);
  color: #111;
}
body.bonumark-public .stream-inline-edit-cancel:hover,
body.bonumark-public .stream-inline-edit-cancel:focus-visible,
body.bonumark-public .stream-inline-edit-save:hover,
body.bonumark-public .stream-inline-edit-save:focus-visible {
  filter: brightness(1.06);
}
body.bonumark-public .stream-inline-edit button:disabled {
  cursor: wait;
  opacity: .65;
}

body.bonumark-public .stream-post-action-form {
  display: block;
  margin: 0;
}
body.bonumark-public .stream-post-action-item {
  width: 100%;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: flex-start; /* Keep button and link actions aligned. */
  box-sizing: border-box;
  padding: 0.65rem 0.8rem;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-weight: 700;
  line-height: 1.2;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
body.bonumark-public .stream-post-action-item:hover,
body.bonumark-public .stream-post-action-item:focus-visible {
  background: color-mix(in srgb, var(--accent) 12%, var(--panel));
  color: var(--text);
  text-decoration: none;
}

body.bonumark-public .stream-post-action-danger {
  color: #f87171;
}
body.bonumark-public .stream-post-action-danger:hover,
body.bonumark-public .stream-post-action-danger:focus-visible {
  background: color-mix(in srgb, #ef4444 14%, var(--panel));
  color: #fecaca;
}
body.bonumark-public .stream-post-action-danger:disabled {
  cursor: wait;
  opacity: 0.65;
}

body.bonumark-public .stream-pin-form {
  margin: 0;
}
body.bonumark-public .stream-pin-button {
  appearance: none;
  cursor: pointer;
  font: inherit;
}
body.bonumark-public .stream-public-notices {
  display: grid;
  gap: .55rem;
  margin: 0 0 1rem;
}
body.bonumark-public .stream-public-notice {
  margin: 0;
  padding: .75rem .9rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
}
body.bonumark-public .stream-public-notice.is-success { border-color: var(--success); }
body.bonumark-public .stream-public-notice.is-error { border-color: var(--danger); }

/* Local Places */
.stream-compose-location-toggle.is-active,
.stream-compose-location-toggle[aria-expanded="true"] {
  background: var(--panel-2);
  border-color: var(--accent);
}

.local-places-picker {
  margin: 10px 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-2);
  padding: 10px;
}

.local-places-picker[hidden],
.local-places-picker-body[hidden],
.local-places-create-modal[hidden] { display: none !important; }

.local-places-selected {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
}

.local-places-selected.is-selected { display: flex; }
.local-places-selected-copy { min-width: 0; }
.local-places-selected strong,
.local-places-selected span { display: block; }
.local-places-selected strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.local-places-selected span { color: var(--muted); font-size: .82rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.local-places-selected-actions { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.local-places-change,
.local-places-remove {
  margin: 0;
  padding: 5px 8px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: .78rem;
  cursor: pointer;
}
.local-places-change:hover,
.local-places-remove:hover { color: var(--text); }

.local-places-picker-body { display: grid; gap: 9px; }
.local-places-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
}
.local-places-controls label { margin: 0; }
.local-places-controls select,
.local-places-create-fields input {
  width: 100%;
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 9px 10px;
}
.local-places-nearby-button { margin: 0; white-space: nowrap; }
.local-places-status { min-height: 0; margin: 0; }
.local-places-status:empty { display: none; }
.local-places-status.is-error { color: var(--danger); }
.local-places-nearby { display: grid; gap: 7px; }
.local-places-nearby-result {
  width: 100%;
  text-align: left;
  margin: 0;
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--line);
}
.local-places-add-button {
  justify-self: start;
  margin: 0;
  padding: 2px 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.local-places-add-button:hover { color: var(--text); }

body.local-places-modal-open { overflow: hidden; }
.local-places-create-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 18px;
}
.local-places-create-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: rgba(0, 0, 0, .72);
  cursor: default;
}
.local-places-create-dialog {
  position: relative;
  width: min(100%, 440px);
  max-height: calc(100vh - 36px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel-2);
  color: var(--text);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .45);
  padding: 18px;
}
.local-places-create-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
.local-places-create-header .eyebrow { margin: 0 0 2px; }
.local-places-create-header h3 { margin: 0; }
.local-places-create-close {
  margin: 0;
  padding: 2px 7px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}
.local-places-create-close:hover { color: var(--text); }
.local-places-create-fields { display: grid; gap: 11px; }
.local-places-create-fields label { margin: 0; }
.local-places-create-fields small { color: var(--muted); font-weight: 400; }
.local-places-create-fields .field-help { margin: 0; }
.local-places-create-status:empty { display: none; }
.local-places-create-status.is-error { color: var(--danger); }
.local-places-create-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}
.local-places-create-actions button { margin: 0; }


.stream-card-location {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0 12px;
  color: var(--muted);
  font-size: .9rem;
}
.stream-card-location-icon { width: 18px; height: 18px; flex: 0 0 18px; }
.stream-card-location-icon svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.stream-card-location-copy strong,
.stream-card-location-copy span { display: block; }
.stream-card-location-copy strong { color: var(--text); font-size: .92rem; }
.stream-card-location-copy span { font-size: .82rem; }

@media (max-width: 640px) {
  .local-places-controls { grid-template-columns: 1fr; }
  .local-places-nearby-button { width: 100%; }
}

/* Core photo-gallery contract. Themes may override presentation, but core keeps galleries usable. */
.stream-media-gallery {
  --bms-media-gallery-gap: 4px;
  --bms-media-gallery-radius: 10px;
  --bms-media-gallery-item-aspect-ratio: 1 / 1;
  --bms-media-gallery-feature-aspect-ratio: 2 / 1;
  --bms-media-gallery-object-fit: cover;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--bms-media-gallery-gap);
  overflow: hidden;
  border-radius: var(--bms-media-gallery-radius);
}
.stream-media-gallery-item {
  position: relative;
  display: block;
  min-width: 0;
  overflow: hidden;
  aspect-ratio: var(--bms-media-gallery-item-aspect-ratio);
  background: rgba(127, 127, 127, .12);
}
.stream-media-gallery-count-3 .stream-media-gallery-item-1 {
  grid-column: 1 / -1;
  aspect-ratio: var(--bms-media-gallery-feature-aspect-ratio);
}
.stream-media-gallery-image,
.stream-media-gallery .stream-media-gallery-image {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: var(--bms-media-gallery-object-fit);
}

/* Core photo viewer. Themes may style the gallery grid, while core keeps full-size viewing usable. */
body.stream-media-viewer-open {
  overflow: hidden;
}
.stream-media-viewer[hidden] {
  display: none !important;
}
.stream-media-viewer-previous[hidden],
.stream-media-viewer-next[hidden] {
  display: none !important;
}
.stream-media-viewer {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 3.75rem 4.5rem;
  background: rgba(5, 8, 13, 0.94);
}
.stream-media-viewer-stage {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
}
.stream-media-viewer-image {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(100vh - 7.5rem);
  object-fit: contain;
  border-radius: 6px;
}
.stream-media-viewer-close,
.stream-media-viewer-previous,
.stream-media-viewer-next {
  position: fixed;
  z-index: 10001;
  display: grid;
  place-items: center;
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.86);
  color: #fff;
  font: inherit;
  line-height: 1;
  cursor: pointer;
}
.stream-media-viewer-close:hover,
.stream-media-viewer-close:focus-visible,
.stream-media-viewer-previous:hover,
.stream-media-viewer-previous:focus-visible,
.stream-media-viewer-next:hover,
.stream-media-viewer-next:focus-visible {
  background: rgba(31, 41, 55, 0.98);
  border-color: rgba(255, 255, 255, 0.58);
}
.stream-media-viewer-close {
  top: 1rem;
  right: 1rem;
  width: 44px;
  height: 44px;
  font-size: 2rem;
}
.stream-media-viewer-previous,
.stream-media-viewer-next {
  top: 50%;
  width: 46px;
  height: 46px;
  transform: translateY(-50%);
  font-size: 2.25rem;
}
.stream-media-viewer-previous { left: 1rem; }
.stream-media-viewer-next { right: 1rem; }
.stream-media-viewer-status {
  position: fixed;
  left: 50%;
  bottom: 1rem;
  z-index: 10001;
  transform: translateX(-50%);
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.86);
  color: #fff;
  font-size: 0.85rem;
}
@media (max-width: 640px) {
  .stream-media-viewer {
    padding: 4.25rem 0.75rem 4rem;
  }
  .stream-media-viewer-image {
    max-height: calc(100vh - 8.25rem);
  }
  .stream-media-viewer-previous,
  .stream-media-viewer-next {
    top: auto;
    bottom: 0.85rem;
    transform: none;
  }
  .stream-media-viewer-previous { left: 0.85rem; }
  .stream-media-viewer-next { right: 0.85rem; }
}

/* Front composer multi-photo preview. */
.stream-compose-preview.has-error { color: var(--danger); }
.stream-compose-preview-message { margin: 0; }
.stream-compose-preview-inner {
  display: grid;
  gap: 0.65rem;
}
.stream-compose-preview-inner.is-gallery {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.stream-compose-preview-item {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-2);
}
.stream-compose-preview-thumb {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: rgba(127, 127, 127, .12);
}
.stream-compose-preview-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.stream-compose-preview-icon {
  display: grid;
  place-items: center;
  min-height: 88px;
  font-size: 1.6rem;
}
.stream-compose-preview-meta {
  display: grid;
  gap: 0.25rem;
  padding: 0.55rem 0.65rem 0.65rem;
}
.stream-compose-preview-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  font-weight: 700;
}
.stream-compose-preview-type { color: var(--muted); font-size: 0.82rem; }
.stream-compose-preview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.15rem;
}
.stream-compose-preview-actions button {
  margin: 0;
  min-height: 30px;
  padding: 0.3rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.78rem;
  cursor: pointer;
}
.stream-compose-preview-actions button:disabled { opacity: 0.4; cursor: default; }


/* Compact front composer controls, intentionally theme-neutral fallbacks. */
.stream-compose-more { position: relative; }
.stream-compose-more > summary { display: grid; place-items: center; list-style: none; cursor: pointer; }
.stream-compose-more > summary::-webkit-details-marker { display: none; }
.stream-compose-more-menu {
  position: absolute;
  left: 0;
  bottom: calc(100% + .5rem);
  z-index: 30;
  display: grid;
  min-width: 14rem;
  padding: .35rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-2);
}
.stream-compose-more-item { justify-content: flex-start; width: 100%; text-align: left; white-space: nowrap; }
.stream-compose-advanced[hidden] { display: none; }
.stream-compose-advanced-header { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.stream-compose-advanced-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.stream-compose-advanced-wide { grid-column: 1 / -1; }
.stream-compose-advanced-field { display: grid; gap: .35rem; min-width: 0; }
.stream-compose-advanced-field input,
.stream-compose-advanced-field textarea,
.stream-compose-advanced-field select { width: 100%; min-width: 0; }
@media (max-width: 640px) {
  .stream-compose-advanced-grid { grid-template-columns: 1fr; }
  .stream-compose-advanced-wide { grid-column: auto; }
  .stream-compose-more-menu { min-width: min(14rem, calc(100vw - 2rem)); }
}
