/* Reddit-inspired company forums — soft “cute” variant */
:root {
  --rd-bg: #fef3f8;
  --rd-bg2: #fdf2f8;
  --rd-card: #ffffff;
  --rd-border: #f5cddd;
  --rd-border-soft: #fde1ec;
  --rd-orange: #ff5fa2;
  --rd-orange-soft: #ff8abd;
  --rd-blue: #7c4dff;
  --rd-blue-hover: #6d3ef5;
  --rd-text: #3b1f33;
  --rd-muted: #9b6d88;
  --rd-meta: #a36f8d;
  --rd-up: #ff78b0;
  --rd-down: #9a8cff;
  --rd-radius: 4px;
  --rd-font: "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --rd-shadow-soft: 0 6px 22px rgba(217, 70, 143, 0.08);
  --rd-shadow-card: 0 10px 26px rgba(124, 77, 255, 0.1);
}

.forum-view {
  font-family: var(--rd-font);
  background:
    radial-gradient(circle at 8% -4%, rgba(255, 175, 204, 0.33), rgba(255, 255, 255, 0) 28%),
    radial-gradient(circle at 90% 6%, rgba(196, 181, 253, 0.34), rgba(255, 255, 255, 0) 24%),
    linear-gradient(180deg, var(--rd-bg) 0%, #f8fbff 100%);
  margin: -30px calc(-1 * var(--page-inline-pad, 18px)) -56px;
  min-height: 60vh;
  padding-bottom: 48px;
}

.forum-view.hidden {
  display: none !important;
}

/* Top bar */
.reddit-top {
  max-width: 1120px;
  margin: 0 auto;
  padding: 12px var(--page-inline-pad, 18px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  position: relative;
  z-index: 2;
}

.reddit-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 13px;
  color: var(--rd-text);
  text-decoration: none;
  padding: 8px 14px;
  background: linear-gradient(180deg, #fff 0%, #fff7fb 100%);
  border: 1px solid var(--rd-border);
  border-radius: 999px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.reddit-back:hover {
  border-color: #ff83b9;
  color: #d9468f;
}

.reddit-hub-title {
  flex: 1;
  min-width: 200px;
}

.reddit-hub-title h1 {
  margin: 0;
  font-size: clamp(1.3rem, 2.1vw, 1.7rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--rd-text);
}

.reddit-hub-title p {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--rd-muted);
  max-width: 72ch;
}

/* Company search (hub) */
.forum-co-search-wrap {
  position: relative;
  flex: 1;
  min-width: 220px;
  max-width: 420px;
}

.forum-co-search {
  width: 100%;
  padding: 10px 14px 10px 38px;
  border: 1px solid var(--rd-border);
  border-radius: var(--rd-radius);
  font-size: 14px;
  background: var(--rd-card);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
}

.forum-co-search:focus {
  outline: none;
  border-color: var(--rd-blue);
  box-shadow: 0 0 0 2px rgba(0, 121, 211, 0.2);
}

.forum-co-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--rd-muted);
  font-size: 14px;
  pointer-events: none;
}

.forum-co-results {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  background: var(--rd-card);
  border: 1px solid var(--rd-border);
  border-radius: var(--rd-radius);
  max-height: 280px;
  overflow-y: auto;
  z-index: 30;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  list-style: none;
  margin: 0;
  padding: 0;
}

.forum-co-results:empty {
  display: none;
}

.forum-co-results li button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid var(--rd-border-soft);
  background: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
}

.forum-co-results li:last-child button {
  border-bottom: 0;
}

.forum-co-results li button:hover {
  background: #f6f7f8;
}

.forum-co-results .fc-rank {
  margin-left: auto;
  font-size: 12px;
  color: var(--rd-muted);
  font-weight: 600;
}

/* Subreddit-style header */
.reddit-sub-header {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--page-inline-pad, 18px) 16px;
  position: sticky;
  top: 0;
  z-index: 5;
  backdrop-filter: blur(7px);
}

.reddit-sub-banner {
  height: 80px;
  border-radius: var(--rd-radius) var(--rd-radius) 0 0;
  background: linear-gradient(120deg, #ff82b8 0%, #ff5fa2 45%, #c4b5fd 100%);
  position: relative;
  overflow: hidden;
}

.reddit-sub-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Ccircle cx='40' cy='40' r='2' fill='white' opacity='.15'/%3E%3C/svg%3E");
  opacity: 0.5;
}

.reddit-sub-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='48' viewBox='0 0 96 48'%3E%3Cg shape-rendering='crispEdges'%3E%3Crect x='8' y='8' width='2' height='2' fill='%23ffffff' fill-opacity='.7'/%3E%3Crect x='10' y='8' width='2' height='2' fill='%23ffffff' fill-opacity='.7'/%3E%3Crect x='8' y='10' width='2' height='2' fill='%23ffffff' fill-opacity='.7'/%3E%3Crect x='10' y='10' width='2' height='2' fill='%23ffffff' fill-opacity='.7'/%3E%3Crect x='36' y='12' width='2' height='2' fill='%23ffe4f2'/%3E%3Crect x='38' y='12' width='2' height='2' fill='%23ffe4f2'/%3E%3Crect x='40' y='12' width='2' height='2' fill='%23ffe4f2'/%3E%3Crect x='38' y='10' width='2' height='2' fill='%23ffe4f2'/%3E%3Crect x='38' y='14' width='2' height='2' fill='%23ffe4f2'/%3E%3Crect x='62' y='6' width='2' height='2' fill='%23fff' fill-opacity='.72'/%3E%3Crect x='64' y='8' width='2' height='2' fill='%23fff' fill-opacity='.72'/%3E%3Crect x='62' y='10' width='2' height='2' fill='%23fff' fill-opacity='.72'/%3E%3Crect x='60' y='8' width='2' height='2' fill='%23fff' fill-opacity='.72'/%3E%3Crect x='78' y='16' width='2' height='2' fill='%23ffd2ea'/%3E%3Crect x='80' y='16' width='2' height='2' fill='%23ffd2ea'/%3E%3Crect x='78' y='18' width='2' height='2' fill='%23ffd2ea'/%3E%3Crect x='80' y='18' width='2' height='2' fill='%23ffd2ea'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 192px 96px;
  mix-blend-mode: soft-light;
  opacity: 0.8;
}

.reddit-sub-bar {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  padding: 12px 16px 16px;
  background: linear-gradient(180deg, #ffffff 0%, #fff8fc 100%);
  border: 1px solid var(--rd-border);
  border-top: 0;
  border-radius: 0 0 14px 14px;
  flex-wrap: wrap;
  box-shadow: var(--rd-shadow-soft);
}

.reddit-sub-avatar {
  width: 72px;
  height: 72px;
  margin-top: -48px;
  border: 4px solid var(--rd-card);
  border-radius: 50%;
  background: var(--rd-card);
  box-shadow: 0 6px 16px rgba(255, 95, 162, 0.2);
  flex-shrink: 0;
  overflow: hidden;
}

.reddit-sub-avatar svg {
  display: block;
  width: 100%;
  height: 100%;
}

.reddit-sub-info h2 {
  margin: 0;
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.reddit-sub-info h2 a {
  color: var(--rd-text);
  text-decoration: none;
}

.reddit-sub-info h2 a:hover {
  color: var(--rd-blue);
}

.reddit-sub-meta {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--rd-muted);
}

.reddit-sub-meta strong {
  color: var(--rd-text);
  font-weight: 700;
}

/* Layout: feed + sidebar */
.reddit-layout {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--page-inline-pad, 18px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 312px;
  gap: 20px;
  align-items: start;
}

@media (max-width: 900px) {
  .reddit-layout {
    grid-template-columns: 1fr;
  }
}

/* Create post */
.reddit-create {
  background: var(--rd-card);
  border: 1px solid var(--rd-border);
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 16px;
  box-shadow: var(--rd-shadow-soft);
}

.reddit-create h3 {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--rd-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.reddit-create input[type="text"] {
  width: 100%;
  padding: 10px 12px;
  margin-bottom: 8px;
  border: 1px solid var(--rd-border);
  border-radius: var(--rd-radius);
  font-size: 15px;
  font-weight: 600;
}

.reddit-create textarea {
  width: 100%;
  min-height: 100px;
  padding: 10px 12px;
  border: 1px solid var(--rd-border);
  border-radius: var(--rd-radius);
  font-size: 14px;
  resize: vertical;
  font-family: inherit;
}

.reddit-create-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
  gap: 8px;
}

.reddit-btn-primary {
  padding: 8px 20px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff5fa2 0%, #7c4dff 100%);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}

.reddit-btn-primary:hover {
  filter: brightness(1.05);
}

.reddit-btn-ghost {
  padding: 8px 14px;
  border: 1px solid var(--rd-border);
  border-radius: 999px;
  background: #fff;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  color: var(--rd-blue);
}

/* Sort tabs */
.reddit-sort {
  display: flex;
  gap: 4px;
  padding: 8px 12px;
  background: var(--rd-card);
  border: 1px solid var(--rd-border);
  border-radius: 12px;
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--rd-muted);
}

.reddit-sort button {
  border: 0;
  background: transparent;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  color: inherit;
  font: inherit;
  font-weight: 700;
}

.reddit-sort button.is-active {
  background: #fff0f7;
  color: #d9468f;
}

/* Post card */
.reddit-post {
  display: flex;
  background: var(--rd-card);
  border: 1px solid var(--rd-border);
  border-radius: 14px;
  margin-bottom: 10px;
  box-shadow: var(--rd-shadow-soft);
  overflow: hidden;
  transition: transform 0.14s ease, box-shadow 0.18s ease;
}

.reddit-post:hover {
  transform: translateY(-1px);
  box-shadow: var(--rd-shadow-card);
}

.reddit-votes {
  width: 40px;
  flex-shrink: 0;
  background: linear-gradient(180deg, #fff7fc 0%, #f8f4ff 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 4px;
  border-right: 1px solid var(--rd-border-soft);
}

.reddit-vote {
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 2px;
  color: var(--rd-muted);
  font-size: 14px;
  line-height: 1;
  border-radius: 4px;
}

.reddit-vote:hover {
  background: rgba(0, 0, 0, 0.06);
}

.reddit-vote.up:hover,
.reddit-vote.up.is-on {
  color: var(--rd-orange);
}

.reddit-vote.down:hover,
.reddit-vote.down.is-on {
  color: var(--rd-blue);
}

.reddit-score {
  font-size: 12px;
  font-weight: 700;
  color: var(--rd-text);
  padding: 4px 0;
}

.reddit-post-main {
  flex: 1;
  min-width: 0;
  padding: 12px 14px 14px;
}

.reddit-post-meta {
  font-size: 12px;
  color: var(--rd-meta);
  margin-bottom: 6px;
}

.reddit-post-meta a {
  color: var(--rd-text);
  font-weight: 700;
  text-decoration: none;
}

.reddit-post-meta a:hover {
  text-decoration: underline;
}

.reddit-post-title {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--rd-text);
  text-wrap: pretty;
}

.reddit-post-body {
  font-size: 14px;
  line-height: 1.55;
  color: var(--rd-text);
  white-space: pre-wrap;
  word-break: break-word;
}

.reddit-post-actions {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.reddit-post-actions button {
  border: 0;
  background: transparent;
  color: var(--rd-muted);
  font-weight: 700;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: var(--rd-radius);
  cursor: pointer;
}

.reddit-post-actions button:hover {
  background: #fff0f7;
  color: var(--rd-text);
}

.reddit-post-actions button.is-on,
.reddit-post-actions .rd-c-up.is-on {
  color: var(--rd-orange);
  background: rgba(255, 69, 0, 0.08);
}

.reddit-post-actions .rd-c-down.is-on {
  color: var(--rd-blue);
  background: rgba(0, 121, 211, 0.08);
}

.reddit-comment-count {
  font-weight: 700;
  color: var(--rd-muted);
}

.reddit-author-headline {
  color: var(--rd-muted);
  font-weight: 500;
}

.reddit-notice {
  max-width: 1120px;
  margin: 0 auto 12px;
  padding: 10px 14px;
  border: 1px solid #ffc6df;
  border-radius: var(--rd-radius);
  background: #fff3f9;
  color: #b83280;
  font-size: 13px;
  font-weight: 700;
}

/* Comments */
.reddit-comments {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--rd-border-soft);
}

.reddit-comment-form textarea {
  width: 100%;
  min-height: 72px;
  padding: 8px 10px;
  border: 1px solid var(--rd-border);
  border-radius: var(--rd-radius);
  font-size: 14px;
  font-family: inherit;
  margin-bottom: 8px;
}

.reddit-comment-thread {
  margin-top: 12px;
}

.reddit-comment {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 14px;
  line-height: 1.45;
}

.reddit-comment-bar {
  width: 2px;
  flex-shrink: 0;
  background: #e9e9e9;
  border-radius: 2px;
  align-self: stretch;
  min-height: 32px;
}

.reddit-comment-body {
  flex: 1;
  min-width: 0;
}

.reddit-comment-meta {
  font-size: 12px;
  color: var(--rd-meta);
  margin-bottom: 4px;
}

.reddit-comment-meta strong {
  color: var(--rd-text);
}

.reddit-comment-text {
  color: var(--rd-text);
  white-space: pre-wrap;
  word-break: break-word;
}

.reddit-nested {
  margin-left: 12px;
  margin-top: 10px;
  padding-left: 12px;
  border-left: 2px solid #e9e9e9;
}

/* Sidebar card */
.reddit-sidebar {
  background: var(--rd-card);
  border: 1px solid var(--rd-border);
  border-radius: 14px;
  padding: 16px;
  box-shadow: var(--rd-shadow-soft);
  font-size: 13px;
  color: var(--rd-muted);
  line-height: 1.5;
}

.reddit-sidebar h4 {
  margin: 0 0 8px;
  font-size: 14px;
  color: var(--rd-text);
}

.reddit-sidebar ul {
  margin: 0;
  padding-left: 18px;
}

/* Hub grid */
.reddit-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 8px var(--page-inline-pad, 18px) 32px;
}

.reddit-hub-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: var(--rd-card);
  border: 1px solid var(--rd-border);
  border-radius: 14px;
  text-decoration: none;
  color: var(--rd-text);
  box-shadow: var(--rd-shadow-soft);
  transition: border-color 0.15s ease, transform 0.12s ease;
}

.reddit-hub-card:hover {
  border-color: #ff83b9;
  transform: translateY(-1px);
}

.reddit-hub-card::after {
  content: "";
  margin-left: auto;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  background-image: repeating-linear-gradient(0deg, #ffd4eb 0 2px, transparent 2px 4px), repeating-linear-gradient(90deg, #ffd4eb 0 2px, transparent 2px 4px);
  border-radius: 4px;
  opacity: 0.55;
}

.reddit-hub-card span {
  font-weight: 700;
  font-size: 14px;
}

.reddit-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--rd-muted);
  font-size: 14px;
}

.forum-icon-slot svg {
  border-radius: 50%;
  display: block;
}

.rd-reply-box.hidden {
  display: none !important;
}

/* Company-logo and GradCafe-style outcome metadata additions */
.fortune-logo-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 10px;
  background: #fff;
}

.forum-icon-slot {
  display: inline-grid;
  place-items: center;
  overflow: hidden;
  background: transparent;
  border: 0;
}

.fc-mini {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  flex-shrink: 0;
}

.forum-logo-chip {
  position: relative;
  display: grid;
  place-items: center;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.78);
  background:
    radial-gradient(circle at 20% 15%, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0) 42%),
    linear-gradient(145deg,
      hsl(var(--logo-h, 205) 88% 95%) 0%,
      hsl(calc(var(--logo-h, 205) + 24) 90% 88%) 100%);
  box-shadow: 0 5px 14px rgba(15, 23, 42, 0.14);
}

.forum-logo-chip::after {
  content: attr(data-initials);
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: clamp(12px, 34%, 24px);
  font-weight: 900;
  letter-spacing: 0.03em;
  color: rgba(15, 23, 42, 0.75);
}

.forum-logo-chip::before {
  content: "";
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 10px;
  height: 10px;
  z-index: 3;
  background-image: linear-gradient(#ff7eb8 0 0);
  background-size: 2px 2px;
  image-rendering: pixelated;
  clip-path: polygon(20% 0, 40% 0, 50% 10%, 60% 0, 80% 0, 80% 20%, 100% 20%, 100% 40%, 90% 50%, 100% 60%, 100% 80%, 80% 80%, 80% 100%, 60% 100%, 50% 90%, 40% 100%, 20% 100%, 20% 80%, 0 80%, 0 60%, 10% 50%, 0 40%, 0 20%, 20% 20%);
  filter: drop-shadow(0 0 3px rgba(255, 95, 162, 0.55));
}

.forum-logo-chip img {
  position: absolute;
  inset: 10%;
  width: 80%;
  height: 80%;
  object-fit: contain;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08);
  z-index: 2;
}

.reddit-sub-avatar {
  width: 72px;
  height: 72px;
  padding: 7px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid var(--rd-border);
  box-shadow: 0 2px 8px rgba(0,0,0,.10);
}

.reddit-hub-card > span:nth-child(2) {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 2px;
}

.reddit-hub-card small {
  color: var(--rd-muted);
  font-size: 11px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reddit-outcomes {
  background: var(--rd-card);
  border: 1px solid var(--rd-border);
  border-radius: 14px;
  margin-bottom: 12px;
  box-shadow: var(--rd-shadow-soft);
  overflow: hidden;
}

.reddit-outcomes-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--rd-border-soft);
}

.reddit-outcomes-head h3 {
  margin: 0;
  font-size: 16px;
  color: var(--rd-text);
}

.reddit-outcomes-head h3::before {
  content: "✦";
  display: inline-block;
  margin-right: 6px;
  color: #ff5fa2;
  text-shadow: 0 0 8px rgba(255, 95, 162, 0.32);
}

.reddit-outcomes-head p {
  margin: 4px 0 0;
  color: var(--rd-muted);
  font-size: 13px;
  line-height: 1.4;
}

.reddit-stat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--rd-border-soft);
}

.reddit-stat-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid #dfe3e8;
  background: #f6f7f8;
  color: var(--rd-text);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
}

.reddit-stat-chip strong {
  color: var(--rd-orange);
}

.reddit-outcome-table-wrap {
  overflow-x: auto;
}

.reddit-outcome-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 760px;
}

.reddit-outcome-table th,
.reddit-outcome-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--rd-border-soft);
  vertical-align: top;
}

.reddit-outcome-table tbody tr:nth-child(even) td {
  background: #fff8fc;
}

.reddit-outcome-table th {
  background: #fff3f9;
  color: var(--rd-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.reddit-outcome-pill {
  display: inline-flex;
  border-radius: 999px;
  background: rgba(255, 95, 162, 0.12);
  color: #d9468f;
  padding: 4px 8px;
  font-weight: 800;
  white-space: nowrap;
}

@media (max-width: 700px) {
  .reddit-outcomes-head {
    flex-direction: column;
  }
}

/* Login gate for company forum posting/commenting */
.reddit-login-gate p,
.reddit-login-inline {
  margin: 8px 0 0;
  color: var(--rd-muted);
  font-size: 13px;
  line-height: 1.45;
}

.reddit-login-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px dashed var(--rd-border);
  border-radius: var(--rd-radius);
  background: #f8f9fa;
}

/* Public user profile pages */
.reddit-profile-page {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--page-inline-pad, 18px) 40px;
}

.reddit-profile-hero {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px;
  background: var(--rd-card);
  border: 1px solid var(--rd-border);
  border-radius: var(--rd-radius);
  box-shadow: var(--rd-shadow-soft);
}

.reddit-profile-avatar {
  width: 84px;
  height: 84px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #ff5fa2, #7c4dff);
  color: #fff;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.04em;
  flex-shrink: 0;
}

.reddit-profile-kicker {
  margin: 0 0 4px;
  color: var(--rd-muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.reddit-profile-hero h1 {
  margin: 0 0 4px;
  color: var(--rd-text);
  font-size: clamp(1.8rem, 5vw, 2.7rem);
  line-height: 1;
  letter-spacing: -0.05em;
}

.reddit-profile-hero p {
  margin: 0;
  color: var(--rd-muted);
  font-size: 14px;
}

.reddit-profile-bio {
  margin-top: 12px;
  max-width: 720px;
  color: var(--rd-text);
  font-size: 14px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.reddit-profile-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.reddit-profile-stats span {
  padding: 12px;
  background: var(--rd-card);
  border: 1px solid var(--rd-border);
  border-radius: 12px;
  color: var(--rd-muted);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.reddit-profile-stats strong {
  display: block;
  color: var(--rd-text);
  font-size: 20px;
}

.reddit-profile-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.reddit-profile-columns section {
  background: var(--rd-card);
  border: 1px solid var(--rd-border);
  border-radius: 12px;
  padding: 14px;
}

.reddit-profile-columns h2 {
  margin: 0 0 10px;
  color: var(--rd-text);
  font-size: 16px;
}

.reddit-profile-activity {
  display: grid;
  gap: 4px;
  padding: 10px 0;
  color: var(--rd-text);
  text-decoration: none;
  border-bottom: 1px solid var(--rd-border-soft);
}

.reddit-profile-activity:last-child {
  border-bottom: 0;
}

.reddit-profile-activity:hover strong {
  color: var(--rd-blue);
}

.reddit-profile-activity span {
  color: var(--rd-muted);
  font-size: 12px;
}

@media (max-width: 760px) {
  .reddit-profile-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .reddit-profile-columns {
    grid-template-columns: 1fr;
  }

  .reddit-profile-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Mobile forum pass: full-width Reddit feed with thumb-friendly controls */
@media (max-width: 760px) {
  .forum-view {
    margin-top: -16px;
    margin-bottom: -36px;
    padding-bottom: 28px;
  }

  .reddit-top {
    align-items: stretch;
    gap: 8px;
    padding: 10px 12px;
  }

  .reddit-top .reddit-back + .reddit-back {
    display: none;
  }

  .reddit-back {
    justify-content: center;
    min-height: 40px;
    padding: 8px 12px;
  }

  .reddit-hub-title {
    order: -1;
    flex: 1 1 100%;
  }

  .reddit-hub-title h1 {
    font-size: 1.22rem;
  }

  .reddit-hub-title p {
    font-size: 12px;
  }

  .forum-co-search-wrap {
    flex: 1 1 100%;
    min-width: 0;
    max-width: none;
  }

  .forum-co-search {
    min-height: 44px;
    font-size: 16px;
  }

  .forum-co-results {
    max-height: 55vh;
  }

  .reddit-hub-grid {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 4px 12px 24px;
  }

  .reddit-hub-card {
    min-height: 58px;
    border-radius: 10px;
    border-color: #d9e5f0;
    background: linear-gradient(180deg, #ffffff 0%, #f9fbff 100%);
  }

  .reddit-sub-header {
    padding: 0 12px 12px;
    position: static;
    backdrop-filter: none;
  }

  .reddit-sub-banner {
    height: 54px;
    border-radius: 10px 10px 0 0;
  }

  .reddit-sub-banner::before {
    background-size: 128px 64px;
    opacity: 0.95;
  }

  .reddit-sub-bar {
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 0 0 10px 10px;
  }

  .reddit-sub-avatar {
    width: 54px;
    height: 54px;
    margin-top: -30px;
    border-radius: 15px;
  }

  .reddit-sub-info h2 {
    font-size: 1.25rem;
  }

  .reddit-sub-meta {
    font-size: 12px;
  }

  .reddit-layout {
    padding: 0 12px;
    gap: 12px;
  }

  .reddit-outcomes,
  .reddit-create,
  .reddit-sort,
  .reddit-post,
  .reddit-sidebar,
  .reddit-profile-hero,
  .reddit-profile-stats span,
  .reddit-profile-columns section {
    border-radius: 12px;
  }

  .reddit-outcomes-head {
    padding: 12px;
  }

  .reddit-outcomes-head .reddit-btn-primary {
    width: 100%;
    min-height: 42px;
  }

  .reddit-outcome-table {
    min-width: 100%;
  }

  .reddit-outcome-table th:nth-child(1),
  .reddit-outcome-table td:nth-child(1),
  .reddit-outcome-table th:nth-child(4),
  .reddit-outcome-table td:nth-child(4),
  .reddit-outcome-table th:nth-child(7),
  .reddit-outcome-table td:nth-child(7) {
    display: none;
  }

  .reddit-create {
    padding: 12px;
  }

  .reddit-create input[type="text"],
  .reddit-create textarea,
  .reddit-comment-form textarea,
  .rd-reply-box textarea {
    min-height: 44px;
    font-size: 16px;
  }

  .reddit-create-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .reddit-btn-primary,
  .reddit-btn-ghost {
    min-height: 42px;
    width: 100%;
  }

  .reddit-sort {
    overflow-x: auto;
    padding: 7px;
  }

  .reddit-sort button {
    min-width: 84px;
    min-height: 38px;
  }

  .reddit-post {
    flex-direction: column;
    border-color: #dbe7f2;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  }

  .reddit-votes {
    width: auto;
    flex-direction: row;
    justify-content: flex-start;
    gap: 8px;
    padding: 8px 12px;
    border-right: 0;
    border-bottom: 1px solid var(--rd-border-soft);
  }

  .reddit-vote {
    min-width: 42px;
    min-height: 34px;
    font-size: 15px;
  }

  .reddit-score {
    min-width: 32px;
    display: grid;
    place-items: center;
    padding: 0;
  }

  .reddit-post-main {
    padding: 12px;
  }

  .reddit-post-meta,
  .reddit-sub-meta,
  .reddit-outcomes-head p {
    line-height: 1.35;
  }

  .reddit-post-title {
    font-size: 18px;
    line-height: 1.28;
  }

  .reddit-post-actions {
    gap: 6px;
  }

  .reddit-post-actions button {
    min-height: 36px;
    padding: 7px 10px;
    background: #f6f7f8;
  }

  .reddit-post-actions .reddit-comment-count {
    width: 100%;
    padding-bottom: 4px;
  }

  .reddit-login-inline {
    display: grid;
    grid-template-columns: 1fr;
  }

  .reddit-comment {
    gap: 7px;
  }

  .reddit-nested {
    margin-left: 5px;
    padding-left: 8px;
  }

  .reddit-sidebar {
    padding: 14px;
  }

  .reddit-sidebar ul {
    padding-left: 16px;
  }

  .reddit-profile-page {
    padding: 0 12px 28px;
  }

  .reddit-profile-hero {
    padding: 16px;
  }

  .reddit-profile-avatar {
    width: 68px;
    height: 68px;
    font-size: 22px;
  }

  .reddit-profile-hero h1 {
    font-size: 1.8rem;
  }

  .reddit-profile-stats {
    gap: 8px;
  }

  .reddit-profile-activity {
    padding: 12px 0;
  }

  .reddit-notice {
    margin: 0 12px 10px;
    border-radius: 12px;
  }
}
