/* onlymammals — original chrome over a familiar layout. */

:root {
  --accent: #3d7a5f;
  --accent-hover: #2f5f4a;
  --accent-soft: #e8f0ea;
  --bg: #f3f3f1;
  --surface: #ffffff;
  --border: #e3e3df;
  --text: #16181a;
  --muted: #6d7570;
  --radius: 12px;
  --rail-left: 232px;
  --rail-right: 320px;
  --topbar-h: 60px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

button { font: inherit; color: inherit; cursor: pointer; }

/* ------------------------------- top bar ------------------------------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  max-width: 1320px;
  margin: 0 auto;
  height: var(--topbar-h);
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: var(--text);
  flex: 0 0 auto;
}

.wordmark-mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 19px;
  font-weight: 700;
  line-height: 1;
  padding-bottom: 2px;
}

.wordmark-text {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.search {
  position: relative;
  flex: 1 1 auto;
  max-width: 380px;
}

.search-icon {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  width: 17px;
  height: 17px;
}

.search input {
  width: 100%;
  height: 38px;
  padding: 0 14px 0 36px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  font: inherit;
  outline: none;
}

.search input:focus { border-color: var(--accent); background: var(--surface); }

.topbar-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text);
}

.icon-btn:hover { background: var(--accent-soft); color: var(--accent-hover); }

.avatar {
  display: inline-block;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: #ccc;
  flex: 0 0 auto;
}

.avatar-sm { width: 30px; height: 30px; }

/* ------------------------------- layout ------------------------------- */

.layout {
  max-width: 1320px;
  margin: 0 auto;
  padding: 20px;
  display: grid;
  grid-template-columns: var(--rail-left) minmax(0, 1fr) var(--rail-right);
  gap: 24px;
  align-items: start;
}

.rail { position: sticky; top: calc(var(--topbar-h) + 20px); }

.column { min-width: 0; display: flex; flex-direction: column; gap: 16px; }

/* ------------------------------- left nav ------------------------------- */

#nav-list { display: flex; flex-direction: column; gap: 2px; margin-bottom: 16px; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 11px 14px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
}

.nav-item:hover { background: var(--accent-soft); }
.nav-item.is-active { color: var(--accent); font-weight: 650; }
.nav-label { flex: 1 1 auto; }

.nav-badge {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  display: grid;
  place-items: center;
}

/* ------------------------------- buttons ------------------------------- */

.btn {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 9px 18px;
  font-weight: 600;
  font-size: 14px;
}

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--accent); }
.btn-ghost:hover { background: var(--accent-soft); }
.btn-sm { padding: 5px 13px; font-size: 13px; }
.btn-block { width: 100%; }

/* ------------------------------- cards ------------------------------- */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

.card-title { margin: 0 0 12px; font-size: 14px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }

.post-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.post-head { display: flex; align-items: center; gap: 11px; padding: 14px 16px; }
.post-who { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.post-name-row { display: flex; align-items: center; gap: 5px; }
.post-name { font-weight: 650; }
.verified { color: var(--accent); font-size: 12px; font-weight: 700; }
.post-handle { color: var(--muted); font-size: 13px; }
.post-more { font-size: 18px; line-height: 1; }
.post-body { margin: 0 16px 12px; }

.post-media { position: relative; width: 100%; background: #ddd; }

.post-media.is-locked::after {
  content: "";
  position: absolute;
  inset: 0;
  backdrop-filter: blur(14px);
  background: rgba(20, 22, 20, 0.28);
}

.lock-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
}

.lock-icon { width: 30px; height: 30px; }
.lock-text { font-weight: 600; }

.post-actions { display: flex; align-items: center; gap: 6px; padding: 10px 12px; }

.post-action {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 0;
  background: transparent;
  padding: 7px 11px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 600;
}

.post-action:hover { background: var(--accent-soft); color: var(--accent-hover); }

.feed { display: flex; flex-direction: column; gap: 16px; }

.feed-end { text-align: center; color: var(--muted); font-size: 13px; padding: 20px 0 4px; }

/* ------------------------------- suggested ------------------------------- */

.suggested ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.suggested-item { display: flex; align-items: center; gap: 10px; }
.suggested-who { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.suggested-name { font-weight: 600; font-size: 14px; }
.suggested-handle { color: var(--muted); font-size: 12.5px; }

/* ------------------------------- ad units ------------------------------- */

.slot { display: block; }
.slot[hidden] { display: none; }

.ad-unit {
  --ad-bg: #ddd;
  --ad-ink: #333;
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  max-width: var(--ad-w, 100%);
  min-height: var(--ad-h, 90px);
  margin: 0 auto;
  padding: 14px 18px;
  background: var(--ad-bg);
  color: var(--ad-ink);
  border: 1px solid rgba(0, 0, 0, 0.09);
  border-radius: var(--radius);
  overflow: hidden;
}

.ad-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ad-eyebrow { font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; opacity: 0.6; }
.ad-headline { font-size: 16px; font-weight: 750; letter-spacing: -0.01em; }
.ad-copy { font-size: 13px; opacity: 0.78; }

.ad-cta {
  margin-left: auto;
  flex: 0 0 auto;
  border: 1.5px solid currentColor;
  border-radius: 999px;
  padding: 7px 15px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.ad-size {
  position: absolute;
  right: 6px;
  bottom: 4px;
  font-family: var(--mono);
  font-size: 9px;
  opacity: 0.4;
}

.ad-rail {
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-height: var(--ad-h, 250px);
}

.ad-rail .ad-cta { margin-left: 0; margin-top: 12px; }

.slot-mobile { display: none; }

/* ------------------------------- footer ------------------------------- */

.footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  margin-top: 32px;
  padding: 26px 20px 34px;
}

.footer-links {
  max-width: 1320px;
  margin: 0 auto 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.footer-link { color: var(--muted); text-decoration: none; font-size: 13px; }
.footer-link:hover { color: var(--accent); text-decoration: underline; }

.footer-meta {
  max-width: 1320px;
  margin: 0 auto;
  display: flex;
  gap: 18px;
  color: var(--muted);
  font-size: 12.5px;
}

/* ------------------------------- mobile ------------------------------- */

.tabbar { display: none; }

@media (max-width: 1100px) {
  .layout { grid-template-columns: 76px minmax(0, 1fr) var(--rail-right); }
  .nav-label, .nav-badge { display: none; }
  .nav-item { justify-content: center; }
  .btn-block { font-size: 0; padding: 11px 0; }
  .btn-block::after { content: "+"; font-size: 20px; }
}

@media (max-width: 880px) {
  .layout { grid-template-columns: minmax(0, 1fr); padding: 16px 12px 96px; }
  .rail-left, .rail-right { display: none; }
  .search { max-width: none; }

  .tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 56px;
    background: var(--surface);
    border-top: 1px solid var(--border);
  }

  .tab-item { display: grid; place-items: center; width: 48px; height: 48px; color: var(--muted); text-decoration: none; }
  .tab-item.is-active { color: var(--accent); }

  .slot-mobile {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 56px;
    z-index: 39;
    display: block;
    padding: 6px 8px;
  }

  .slot-mobile .ad-unit { min-height: 50px; padding: 8px 12px; border-radius: 8px; }
  .slot-mobile .ad-copy, .slot-mobile .ad-size { display: none; }
  .slot-mobile .ad-headline { font-size: 14px; }

  .footer { margin-bottom: 108px; }
}
