/* rrmyers social app — Matrix green (matched to rrmyers-static) */

:root {
  --bg: #101010;
  --panel: #0d0d0d;
  --panel-border: #1b5e20;
  --text: #78787f;
  --headings: #ffffff;
  --logo: #ffffff;
  --link: #66bb6a;
  --link-hover: #32cd32;
  --accent: #2e7d32;
  --lime: #39ff14;
  --menu-bg: #1b5e20;
  --menu-bg-scroll: rgba(27, 94, 32, 0.95);
  --footer-bg: #0d1f0e;
  --footer-text: #a0a0a0;
  --footer-link: #0bb4aa;
  --footer-link-hover: #076c65;
  --danger: #e57373;
  --danger-bg: rgba(229, 115, 115, 0.12);
  --ok: #66bb6a;
  --ok-bg: rgba(102, 187, 106, 0.12);
  --input-bg: #141414;
  --input-border: #2a2a2a;
  --max-width: 560px;
  --header-height: 64px;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --font-heading: "Onest", "Inter", system-ui, sans-serif;
  --radius: 10px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--link);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover,
a:focus {
  color: var(--link-hover);
}

::selection {
  background: var(--lime);
  color: #000;
}

/* ----- Config banner ----- */
.config-banner {
  background: #3e2723;
  color: #ffccbc;
  padding: 0.65rem 1.25rem;
  font-size: 0.85rem;
  text-align: center;
  border-bottom: 1px solid #5d4037;
}

.config-banner code {
  font-size: 0.8em;
  color: #fff;
}

/* ----- Header ----- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--menu-bg);
  box-shadow: 0 2px 18px rgba(0, 0, 0, 0.35);
}

.nav-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.25rem;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-logo {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  color: var(--logo);
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
}

.site-logo:hover,
.site-logo:focus {
  color: var(--logo);
}

.site-logo span {
  color: var(--lime);
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.85em;
  margin-left: 0.35rem;
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-radius: 4px;
  color: #fff;
  width: 42px;
  height: 42px;
  cursor: pointer;
  padding: 0;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: #fff;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.site-nav a {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 15px;
  color: #fff;
}

.site-nav a:hover,
.site-nav a:focus,
.site-nav a[aria-current="page"] {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.auth-slot {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.auth-slot a:not(.btn) {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 15px;
  color: #fff;
}

/* Beat .site-nav a { color:#fff } so Sign up stays black on the lime pill */
.site-nav a.btn--primary,
.auth-slot a.btn--primary,
a.btn.btn--primary {
  color: #0a0a0a !important;
  text-decoration: none !important;
}

.site-nav a.btn--primary:hover,
.site-nav a.btn--primary:focus,
.auth-slot a.btn--primary:hover,
.auth-slot a.btn--primary:focus,
a.btn.btn--primary:hover,
a.btn.btn--primary:focus {
  color: #0a0a0a !important;
  text-decoration: none !important;
}

/* Log in outline stays white */
.site-nav a.btn--outline,
.auth-slot a.btn--outline,
a.btn.btn--outline {
  color: #ffffff !important;
  text-decoration: none !important;
}

.site-nav a.btn--outline:hover,
.site-nav a.btn--outline:focus,
.auth-slot a.btn--outline:hover,
.auth-slot a.btn--outline:focus,
a.btn.btn--outline:hover,
a.btn.btn--outline:focus {
  color: #39ff14 !important;
  text-decoration: none !important;
}

/* ----- Main ----- */
.app-main {
  flex: 1;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
}

.app-main--wide {
  max-width: 720px;
}

h1,
h2,
h3 {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--headings);
  line-height: 1.3;
}

h1 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  margin: 0 0 0.75rem;
}

h2 {
  font-size: 1.25rem;
  margin: 0 0 0.75rem;
}

.lede {
  margin: 0 0 1.5rem;
  font-size: 1.05rem;
}

.muted,
.is-muted {
  color: var(--text);
  opacity: 0.85;
}

/* ----- Panels ----- */
.panel {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 1.5rem 1.35rem;
  box-shadow: 0 0 24px rgba(46, 125, 50, 0.12);
}

.panel + .panel {
  margin-top: 1.25rem;
}

.panel-title {
  margin: 0 0 1rem;
  font-size: 1.1rem;
  color: var(--lime);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-family: var(--font-heading);
}

/* ----- Forms ----- */
.form-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.field label {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--headings);
  margin-bottom: 0.35rem;
}

.field .hint {
  display: block;
  font-size: 0.8rem;
  color: var(--text);
  margin-top: 0.3rem;
}

.field input,
.field textarea {
  width: 100%;
  padding: 0.7rem 0.85rem;
  font: inherit;
  color: var(--headings);
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 8px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field input:focus,
.field textarea:focus {
  border-color: var(--lime);
  box-shadow: 0 0 0 3px rgba(50, 205, 50, 0.2);
}

.field textarea {
  min-height: 110px;
  resize: vertical;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-top: 0.25rem;
}

.form-footer {
  margin: 1.25rem 0 0;
  font-size: 0.95rem;
  text-align: center;
}

/* ----- Buttons (pill style matched to www.rrmyers.com nav) ----- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  padding: 0.65rem 1.2rem;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none !important;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn--primary {
  background: #39ff14;
  color: #0a0a0a !important;
  border-color: #39ff14;
  box-shadow: 0 0 18px rgba(57, 255, 20, 0.55);
}

.btn--primary:hover,
.btn--primary:focus {
  background: #7cff6b;
  border-color: #7cff6b;
  color: #0a0a0a !important;
  box-shadow: 0 0 22px rgba(57, 255, 20, 0.75);
}

.btn--ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
}

.btn--ghost:hover,
.btn--ghost:focus {
  border-color: #39ff14;
  color: #39ff14;
}

.btn--outline {
  background: transparent;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.7);
}

.btn--outline:hover,
.btn--outline:focus {
  border-color: #39ff14;
  color: #39ff14;
  background: rgba(57, 255, 20, 0.08);
}

.btn--sm {
  padding: 0.45rem 1.05rem;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
}

/* Auth nav slot: keep pills tight in the header */
.auth-slot {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.auth-slot a:not(.btn) {
  color: #fff;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.25rem 0 0;
}

/* ----- Alerts ----- */
.alert {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.95rem;
  margin-bottom: 1rem;
  border: 1px solid transparent;
}

.alert[hidden] {
  display: none !important;
}

.alert--error {
  background: var(--danger-bg);
  border-color: var(--danger);
  color: #ffcdd2;
}

.alert--success {
  background: var(--ok-bg);
  border-color: var(--ok);
  color: #c8e6c9;
}

.alert--info {
  background: rgba(27, 94, 32, 0.35);
  border-color: var(--accent);
  color: #dcedc8;
}

/* ----- Home ----- */
.hero-card {
  text-align: center;
  padding: 2rem 1.5rem;
}

.hero-card .mark {
  display: inline-block;
  background: var(--menu-bg);
  color: var(--lime);
  padding: 2px 10px;
  border-radius: 4px;
  font-weight: 700;
  border: 1px solid var(--lime);
  font-family: var(--font-heading);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.feed-placeholder {
  border: 1px dashed var(--panel-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  color: var(--text);
  background: rgba(13, 13, 13, 0.6);
}

.feed-placeholder strong {
  color: var(--lime);
  font-family: var(--font-heading);
}

/* ----- Profile ----- */
.profile-header {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}

.avatar {
  flex-shrink: 0;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  border: 2px solid var(--lime);
  background: #1a1a1a;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 16px rgba(50, 205, 50, 0.25);
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-fallback {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--lime);
}

.profile-meta h1 {
  margin-bottom: 0.15rem;
}

.profile-username {
  color: var(--link);
  font-family: var(--font-heading);
  font-size: 0.95rem;
  margin: 0 0 0.5rem;
}

.profile-bio {
  margin: 0;
  white-space: pre-wrap;
}

.owner-actions {
  margin-top: 1.25rem;
}

.status-line {
  margin: 0 0 1rem;
  font-size: 0.95rem;
}

/* ----- Footer ----- */
.site-footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  padding: 1.75rem 1.25rem;
  text-align: center;
  font-size: 0.9rem;
}

.site-footer a {
  color: var(--footer-link);
}

.site-footer a:hover,
.site-footer a:focus {
  color: var(--footer-link-hover);
}

.footer-copy {
  margin: 0.35rem 0 0;
  font-size: 0.8rem;
}

/* ----- Mobile ----- */
@media (max-width: 640px) {
  .nav-toggle {
    display: flex;
  }

  .site-nav {
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--menu-bg-scroll);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .site-nav.is-open {
    max-height: 360px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
  }

  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem 0 1rem;
  }

  .site-nav a,
  .auth-slot {
    display: block;
    padding: 0.65rem 1.25rem;
  }

  .auth-slot {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }

  .profile-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .app-main {
    padding: 1.5rem 1rem 2.5rem;
  }
}

/* ----- Phase A: toast ----- */
.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  background: var(--menu-bg);
  color: var(--lime);
  border: 1px solid var(--lime);
  border-radius: 999px;
  padding: 0.55rem 1.25rem;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  box-shadow: 0 0 24px rgba(57, 255, 20, 0.35);
  z-index: 2000;
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
  pointer-events: none;
}

.toast.is-visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ----- Phase A: nav user chip ----- */
.nav-user-chip {
  display: inline-flex !important;
  align-items: center;
  gap: 0.45rem;
  color: #fff !important;
  text-decoration: none !important;
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 0.9rem;
  max-width: 160px;
}

.nav-user-chip:hover,
.nav-user-chip:focus {
  color: var(--lime) !important;
  text-decoration: none !important;
}

.nav-user-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.avatar--nav {
  width: 28px;
  height: 28px;
  border-width: 1.5px;
  box-shadow: none;
}

.avatar-fallback--nav {
  font-size: 0.75rem;
}

/* ----- Phase A: profile polish ----- */
.panel--profile {
  background: linear-gradient(160deg, rgba(27, 94, 32, 0.18) 0%, var(--panel) 45%);
}

.avatar--lg {
  width: 104px;
  height: 104px;
}

.profile-share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.85rem;
}

.profile-share-open {
  font-size: 0.9rem;
}

.avatar-upload-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}

.avatar-upload-status {
  margin-top: 0 !important;
  color: var(--lime);
}

/* ----- Phase A: online now ----- */
.online-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.4rem;
  height: 1.4rem;
  margin-left: 0.45rem;
  padding: 0 0.4rem;
  border-radius: 999px;
  background: rgba(57, 255, 20, 0.15);
  border: 1px solid var(--lime);
  color: var(--lime);
  font-size: 0.75rem;
  font-weight: 700;
  vertical-align: middle;
  letter-spacing: 0;
  text-transform: none;
}

.online-empty {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
}

.online-empty[hidden] {
  display: none !important;
}

.online-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.online-item {
  margin: 0;
}

.online-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  color: var(--headings);
  text-decoration: none !important;
  transition: background 0.15s ease;
}

.online-link:hover,
.online-link:focus {
  background: rgba(57, 255, 20, 0.08);
  color: var(--lime);
}

.avatar--sm {
  width: 40px;
  height: 40px;
  border-width: 1.5px;
  box-shadow: 0 0 10px rgba(50, 205, 50, 0.2);
}

.avatar-fallback--sm {
  font-size: 1rem;
}

.online-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.online-name {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.online-handle {
  font-size: 0.8rem;
  color: var(--link);
}

.online-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 8px var(--lime);
  flex-shrink: 0;
}


/* ----- Phase B: feed + posts + likes ----- */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.home-member-hero {
  margin-bottom: 1.25rem;
}

.compose-panel {
  margin-top: 0 !important;
  margin-bottom: 1.25rem;
  background: linear-gradient(145deg, rgba(27, 94, 32, 0.16), var(--panel) 55%);
}

.compose-panel textarea {
  min-height: 125px;
}

.compose-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-top: 0.4rem;
}

.compose-meta .hint {
  margin: 0;
}

.compose-count {
  flex-shrink: 0;
  font-family: var(--font-heading);
  font-size: 0.78rem;
  color: var(--link);
}

.compose-actions {
  justify-content: flex-end;
  margin-top: -0.25rem;
}

.join-feed-prompt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.join-feed-prompt[hidden] {
  display: none !important;
}

.join-feed-prompt p {
  margin: 0;
}

.join-feed-prompt strong {
  color: var(--headings);
}

.feed-shell {
  margin-top: 1.75rem;
  scroll-margin-top: calc(var(--header-height) + 1rem);
}

.feed-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.8rem;
}

.feed-heading .panel-title {
  margin: 0;
}

.feed-status {
  margin: 0;
  padding: 1.25rem;
  text-align: center;
  border: 1px dashed var(--panel-border);
  border-radius: var(--radius);
  background: rgba(13, 13, 13, 0.55);
}

.feed-list {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.post-card {
  padding: 1.1rem 1.15rem 0.85rem;
  background: linear-gradient(150deg, rgba(27, 94, 32, 0.11), var(--panel) 42%);
  border: 1px solid rgba(46, 125, 50, 0.75);
  border-radius: var(--radius);
  box-shadow: 0 0 18px rgba(46, 125, 50, 0.08);
}

.post-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.9rem;
}

.post-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  color: var(--headings);
  text-decoration: none !important;
}

a.post-author:hover,
a.post-author:focus {
  color: var(--lime);
}

.avatar--post {
  width: 46px;
  height: 46px;
  border-width: 1.5px;
  box-shadow: 0 0 12px rgba(50, 205, 50, 0.18);
}

.avatar-fallback--post {
  font-size: 1.1rem;
}

.post-author-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.25;
}

.post-author-name {
  max-width: 28rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.98rem;
}

.post-author-handle {
  max-width: 28rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--link);
  font-size: 0.8rem;
}

.post-time {
  flex-shrink: 0;
  padding-top: 0.15rem;
  color: var(--text);
  font-size: 0.78rem;
  white-space: nowrap;
}

.post-body {
  margin: 0.95rem 0 0.8rem;
  color: #dedee2;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.post-actions {
  display: flex;
  align-items: center;
  min-height: 2rem;
  border-top: 1px solid rgba(46, 125, 50, 0.28);
  padding-top: 0.65rem;
}

.like-button {
  min-width: 4.2rem;
  padding: 0.32rem 0.7rem;
  border: 1px solid rgba(102, 187, 106, 0.45);
  border-radius: 999px;
  background: transparent;
  color: var(--link);
  font-family: var(--font-heading);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease,
    box-shadow 0.15s ease;
}

.like-button:hover:not(:disabled),
.like-button:focus-visible:not(:disabled) {
  color: var(--lime);
  border-color: var(--lime);
  background: rgba(57, 255, 20, 0.08);
}

.like-button.is-liked {
  color: var(--lime);
  border-color: var(--lime);
  background: rgba(57, 255, 20, 0.1);
  box-shadow: 0 0 10px rgba(57, 255, 20, 0.12);
}

.like-button:disabled {
  cursor: default;
  opacity: 0.7;
}

@media (max-width: 640px) {
  .join-feed-prompt {
    align-items: stretch;
    flex-direction: column;
  }

  .join-feed-prompt .btn {
    align-self: flex-start;
  }

  .post-card {
    padding: 1rem 0.95rem 0.8rem;
  }

  .post-header {
    gap: 0.6rem;
  }

  .avatar--post {
    width: 40px;
    height: 40px;
  }

  .post-author-name,
  .post-author-handle {
    max-width: 12rem;
  }
}
