/* Rooflo — professional, mobile-first */

:root {
  /* Brand: Royal Purple + Gold + light accents */
  --primary: #5a2d82;
  --primary-dark: #3d1f5a;
  --secondary: #f2c94c;
  --secondary-dim: #c9a83d;
  --surface: #ffffff;
  --surface-alt: #edeaf3;
  --bg: #f3f0f8;
  --text: #1f1528;
  --muted: #6b6078;
  --border: #ddd7e8;
  --navy: var(--primary-dark);
  --navy-2: var(--primary);
  --gold: var(--secondary);
  --gold-dim: var(--secondary-dim);
  --accent: var(--primary);
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(90, 45, 130, 0.1);
  --shadow-lg: 0 20px 50px rgba(61, 31, 90, 0.15);
  --font: "DM Sans", system-ui, sans-serif;
  --font-display: "Fraunces", Georgia, serif;
  --space: clamp(1rem, 4vw, 2rem);
  --header-h: 56px;
  --header-bar-bg: #ffffff;
  --header-bar-border: #e8e8e8;
  --header-nav-muted: #5c5c5c;
}

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

html {
  scroll-behavior: smooth;
  /* Match body so overscroll / between-load paints don’t flash a different color */
  background-color: var(--bg);
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.25;
  margin: 0 0 0.5rem;
}

h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
}

h2 {
  font-size: clamp(1.35rem, 3vw, 1.75rem);
}

h3 {
  font-size: 1.15rem;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
  color: var(--primary-dark);
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--space);
}

.container--narrow {
  max-width: 560px;
}

/* Full-width .container + left-aligned narrow form (matches header / hero edge; avoids centered container--narrow) */
.form-page-inner {
  max-width: 560px;
  margin: 0;
}

/* Header (LinkedIn-style bar: logo, search, icon-above-label nav) */
.site-header {
  position: sticky;
  top: 0;
  z-index: 500;
  background: var(--header-bar-bg);
  color: var(--text);
  border-bottom: 1px solid var(--header-bar-border);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
  overflow: visible;
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  min-height: var(--header-h);
  position: relative;
  overflow: visible;
  padding-top: 0.35rem;
  padding-bottom: 0.35rem;
}

.header-inner > .logo {
  order: 1;
}

.header-inner > .header-search {
  flex: 1 1 0%;
  min-width: 0;
  max-width: none;
}

.header-inner > .site-nav {
  order: 3;
}

.header-inner > .nav-toggle {
  order: 2;
}

.header-user-wrap {
  position: relative;
  flex-shrink: 0;
}

.header-user {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.header-user--trigger {
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  color: inherit;
  font: inherit;
  text-align: center;
  border-radius: 0;
}

.header-user--trigger:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.header-user-menu {
  position: absolute;
  top: calc(100% + 0.4rem);
  right: 0;
  min-width: 11rem;
  padding: 0.35rem 0;
  margin: 0;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  z-index: 220;
}

.header-user-menu[hidden] {
  display: none !important;
}

.header-user-menu__link {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}

.header-user-menu__link .site-nav__icon {
  width: 1.125rem;
  height: 1.125rem;
  opacity: 0.85;
  color: var(--muted);
}

.header-user-menu__link:hover .site-nav__icon {
  opacity: 1;
  color: var(--primary-dark);
}

.header-user-menu__link:hover {
  background: var(--surface-alt);
  text-decoration: none;
  color: var(--primary-dark);
}

.header-user-menu__link--signout {
  border-top: 1px solid var(--border);
  margin-top: 0.2rem;
  padding-top: 0.65rem;
}

.account-profile-page .account-profile-card {
  padding: 1.25rem 1.35rem;
  max-width: 38rem;
}

.account-profile-card__main {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  align-items: flex-start;
}

.account-profile-card__avatar {
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.account-profile-card__avatar--ph {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: var(--surface-alt);
  border: 1px solid var(--border);
}

.account-profile-dl {
  margin: 0;
  flex: 1;
  min-width: 12rem;
}

.account-profile-dl > div {
  margin-bottom: 0.85rem;
}

.account-profile-dl dt {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin: 0 0 0.2rem;
}

.account-profile-dl dd {
  margin: 0;
  font-weight: 600;
}

.account-profile-card__foot {
  margin: 1rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.account-profile-page .account-photo-section {
  margin-top: 1.25rem;
  padding: 1.25rem 1.35rem;
  max-width: 42rem;
}

.account-photo-section__title {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
}

.account-photo-form {
  margin-top: 0.75rem;
  max-width: 28rem;
}

.account-photo-file {
  display: block;
}

.account-photo-file__label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
}

.account-photo-empty {
  margin: 1rem 0 0;
}

.account-photo-group {
  margin-top: 1.35rem;
}

.account-photo-group__title {
  margin: 0 0 0.65rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

.account-photo-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem;
}

.account-photo-tile {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.account-photo-tile__thumb-wrap {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface-alt);
  aspect-ratio: 1;
}

.account-photo-tile__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.account-photo-tile__badge {
  position: absolute;
  bottom: 0.35rem;
  left: 0.35rem;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
  background: rgba(15, 23, 42, 0.75);
  color: #fff;
}

.account-photo-tile__actions {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.account-photo-tile__actions .btn {
  width: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
  color: var(--text);
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
}
.logo:hover {
  text-decoration: none;
  opacity: 0.88;
}

.logo__mark {
  display: block;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(61, 31, 90, 0.22);
}

.logo-text {
  font-family: var(--font-display);
  font-size: 1.15rem;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-alt);
  cursor: pointer;
  position: relative;
  margin-left: auto;
}
.nav-toggle::before,
.nav-toggle::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  height: 2px;
  background: var(--text);
  transition: transform 0.2s;
}
.nav-toggle::before {
  top: 14px;
  box-shadow: 0 7px 0 var(--text);
}
.nav-toggle::after {
  bottom: 14px;
}
.nav-toggle[aria-expanded="true"]::before {
  transform: translateY(7px) rotate(45deg);
  box-shadow: none;
}
.nav-toggle[aria-expanded="true"]::after {
  transform: translateY(-7px) rotate(-45deg);
}

/* Global header search: sits after logo; width flexes until the icon nav cluster */
.header-search {
  margin: 0;
}

.header-search__inner {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.125rem;
  padding: 0 0.65rem;
  background: #eef3f8;
  border-radius: 6px;
  border: 1px solid transparent;
  transition: border-color 0.15s, background 0.15s;
}

.header-search:focus-within .header-search__inner {
  background: #fff;
  border-color: var(--primary);
}

.header-search__icon {
  display: flex;
  flex-shrink: 0;
  width: 1.125rem;
  height: 1.125rem;
  color: var(--header-nav-muted);
}

.header-search__icon-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.header-search__input {
  flex: 1 1 auto;
  min-width: 0;
  border: none;
  background: transparent;
  font: inherit;
  font-size: 0.875rem;
  color: var(--text);
  outline: none;
}

.header-search__input::placeholder {
  color: var(--muted);
}

.site-nav {
  flex: 0 1 auto;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 0.15rem 0.35rem;
  min-width: 0;
  overflow: visible;
}

/* Icon on top, label beneath (LinkedIn-style) */
.site-nav__scroll {
  flex: 0 1 auto;
  min-width: 0;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 0.15rem 0.1rem;
  overflow: visible;
}

.site-nav__link {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 0.1rem;
  min-width: 3.25rem;
  max-width: 5.5rem;
  padding: 0.15rem 0.35rem 0;
  text-align: center;
  text-decoration: none;
  color: var(--header-nav-muted);
  font-weight: 500;
  font-size: 0.6875rem;
  line-height: 1.15;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  box-sizing: border-box;
  background: transparent;
  cursor: pointer;
}

.site-nav__link:hover {
  color: var(--text);
  text-decoration: none;
  opacity: 1;
}

.site-nav__link.is-active {
  color: var(--text);
  border-bottom-color: var(--text);
}

.site-nav__link--me {
  min-width: 3rem;
  max-width: 4.5rem;
}

.site-nav__label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 400;
  line-height: 1.15;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-nav__caret {
  font-size: 0.55rem;
  opacity: 0.75;
  margin-left: 0.08rem;
  vertical-align: middle;
}

.site-nav__icon {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  color: inherit;
}

.site-nav__icon--avatar-wrap {
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid var(--border);
}

.header-me-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.site-nav__icon--lg {
  width: 1.5rem;
  height: 1.5rem;
}

.site-nav__icon-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.site-nav .site-nav__btn-cta {
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.12rem !important;
  padding: 0.3rem 0.45rem 0.15rem !important;
  min-width: 3.5rem;
  max-width: 5rem;
  min-height: 0;
  font-size: 0.6875rem;
  line-height: 1.1;
  border-radius: 8px;
}

/* Beat .site-nav a { color: inherit } so primary CTA text + icons stay white on purple */
.site-nav a.site-nav__btn-cta.btn--primary {
  color: #fff;
}

.site-nav a.site-nav__btn-cta.btn--primary .site-nav__icon,
.site-nav a.site-nav__btn-cta.btn--primary .site-nav__icon-svg {
  color: #fff;
}

.site-nav .site-nav__btn-cta .site-nav__label {
  font-weight: 600;
  color: inherit;
}

.site-nav .site-nav__btn-cta.is-active {
  border-bottom-color: rgba(255, 255, 255, 0.85);
}

.site-nav a {
  color: inherit;
}

.site-nav a:hover {
  text-decoration: none;
}

/* Profile menu is inside .site-nav; keep dropdown readable on light panel */
.site-nav .header-user-menu__link {
  color: var(--text);
  opacity: 1;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.55rem 1rem;
}

.site-nav .header-user-menu__link:hover {
  color: var(--primary-dark);
  opacity: 1;
  text-decoration: none;
}

.nav-muted {
  opacity: 0.75;
}

@media (min-width: 769px) {
  .header-inner > .header-search {
    order: 2;
    min-width: 5.5rem;
  }

  .header-inner > .site-nav {
    order: 3;
  }

  .site-nav {
    flex-wrap: nowrap;
  }

  .site-nav__scroll {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: visible;
    overscroll-behavior-x: contain;
    scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
    scrollbar-width: thin;
    padding-bottom: 1px;
  }

  .site-nav__scroll::-webkit-scrollbar {
    height: 4px;
  }

  .site-nav__scroll::-webkit-scrollbar-track {
    background: transparent;
  }

  .site-nav__scroll::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
  }

  .site-nav__scroll > a,
  .site-nav__scroll > .btn {
    flex-shrink: 0;
  }

  .site-nav .header-user-wrap {
    flex-shrink: 0;
    margin-left: 0.15rem;
    padding-left: 0.5rem;
    border-left: 1px solid var(--header-bar-border);
    align-self: flex-end;
    padding-bottom: 1px;
  }
}

@media (max-width: 768px) {
  .header-inner > .header-search {
    order: 10;
    flex: 1 0 100%;
    width: 100%;
    min-width: 0 !important;
    max-width: none !important;
  }

  .header-inner > .nav-toggle {
    display: block;
    order: 2;
  }

  .header-inner > .site-nav {
    order: 20;
    flex: 1 0 100%;
    width: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .site-nav > .site-nav__scroll {
    order: 1;
    display: none;
  }

  .site-nav > .header-user-wrap {
    order: 2;
    display: none;
  }

  /* Inline panel (no position:absolute on whole nav) */
  .site-nav.is-open {
    flex-direction: column;
    align-items: stretch;
    padding: 0 var(--space) 0.75rem;
    margin-bottom: 0.25rem;
    border-bottom: 1px solid var(--header-bar-border);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
    overflow-x: visible;
  }

  .site-nav.is-open > .site-nav__scroll {
    display: flex;
    flex-direction: column;
  }

  .site-nav.is-open > .header-user-wrap {
    display: block;
    margin-top: 0.35rem;
    padding-top: 0.65rem;
    border-top: 1px solid var(--header-bar-border);
  }

  .site-nav__scroll {
    flex-direction: column;
    align-items: stretch;
    overflow-x: visible;
    flex: none;
    width: 100%;
    gap: 0;
  }

  .site-nav__link,
  .site-nav .site-nav__btn-cta {
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
    max-width: none;
    width: 100%;
    padding: 0.65rem 0.25rem;
    margin-bottom: 0;
    border-bottom: 1px solid var(--header-bar-border);
    border-left: 3px solid transparent;
    text-align: left;
    font-size: 0.9rem;
    white-space: normal;
  }

  .site-nav__link .site-nav__label {
    font-size: 0.9rem;
    text-align: left;
    white-space: normal;
  }

  .site-nav__link.is-active,
  .site-nav .site-nav__btn-cta.is-active {
    border-bottom-color: var(--header-bar-border);
    border-left-color: var(--primary);
  }

  .site-nav .site-nav__btn-cta.is-active {
    border-bottom-color: var(--header-bar-border);
  }

  .site-nav .header-user-menu {
    right: 0;
    left: 0;
    min-width: 0;
  }
}

/* Hero */
.hero {
  background: linear-gradient(145deg, var(--primary-dark) 0%, #4a2a6b 50%, var(--primary-dark) 100%);
  color: #fff;
  padding: clamp(2rem, 6vw, 4rem) 0;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 50% at 100% 0%, rgba(242, 201, 76, 0.18), transparent 55%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
  align-items: center;
}

@media (min-width: 900px) {
  .hero-inner {
    grid-template-columns: 1.1fr 0.9fr;
  }
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  color: var(--gold);
  margin: 0 0 0.75rem;
  font-weight: 600;
}

.hero .lead {
  font-size: 1.05rem;
  opacity: 0.88;
  max-width: 36ch;
  margin: 0 0 1.5rem;
}

.search-hero__row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.search-hero .input--lg {
  flex: 1 1 180px;
}

.hero-visual {
  display: none;
}

@media (min-width: 900px) {
  .hero-visual {
    display: block;
  }
}

.hero-card {
  height: 220px;
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow-lg);
}

/* Sections */
.section {
  padding: clamp(2rem, 5vw, 3.5rem) 0;
}

.section--muted {
  background: var(--surface-alt);
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.section-tight {
  padding-bottom: 3rem;
}

.page-head {
  padding: 2rem 0 1rem;
}

.page-head h1 {
  margin-bottom: 0.35rem;
}

/* Listing/detail page titles — sans-serif to align with header logo (shared across blog, forum, reviews, properties) */
.page-head .breadcrumb {
  display: block;
  padding: 0;
  margin: 0 0 0.5rem;
}

.page-head__title {
  font-family: var(--font);
  font-weight: 700;
  font-size: clamp(1.5rem, 3.5vw, 2.15rem);
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin: 0 0 0.35rem;
  padding: 0;
  color: var(--text);
}

.page-head__lead {
  margin: 0 0 0.25rem;
}

/* Property detail — single container so title aligns with media column; sans title matches breadcrumb edge */
.property-detail {
  padding-bottom: 3rem;
}

.property-detail__head {
  padding: 2rem 0 1rem;
}

.property-detail__head .breadcrumb {
  display: block;
  margin: 0 0 0.5rem;
  padding: 0;
}

.property-detail__title {
  font-family: var(--font);
  font-weight: 700;
  font-size: clamp(1.5rem, 3.5vw, 2.15rem);
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin: 0 0 0.35rem;
  padding: 0;
  color: var(--text);
}

.property-detail__head .lead-price {
  margin: 0 0 0.5rem;
}

.property-detail .detail-grid {
  padding-bottom: 0;
}

.lead-price {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--navy);
  margin: 0;
}

.lead-price--offer {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.6rem;
}

.lead-price__strikethrough {
  text-decoration: line-through;
  color: var(--muted);
  font-size: 1.1rem;
  font-weight: 500;
}

.lead-price__now {
  color: #0a7a3e;
  font-size: 1.35rem;
  font-weight: 700;
}

.property-offer-pill {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #fff;
  background: var(--accent, #5a2d82);
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  line-height: 1.2;
  vertical-align: middle;
  margin: 0 0 0 0.15rem;
}

.property-offer-pill--soft {
  background: var(--navy, #0f172a);
  text-transform: none;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.property-offers h2 {
  font-size: 1.1rem;
  margin: 0 0 0.75rem;
}

.property-offer-cards {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin: 0 0 1.5rem;
}

.property-offer-card {
  padding: 0.9rem 1rem;
}

.property-offer-card__title {
  font-size: 1.05rem;
  margin: 0 0 0.4rem;
}

.property-offer-card__body {
  font-size: 0.95rem;
  color: var(--text);
  margin: 0 0 0.5rem;
}

.property-offer-card__sum {
  font-size: 0.9rem;
  margin: 0.25rem 0 0.4rem;
}

.property-offer-card__images {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.4rem;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 0.85rem;
}

.link-arrow {
  font-weight: 600;
  color: var(--accent);
}

/* Cards */
.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.grid-articles {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
  align-items: start;
}

.grid-articles > * {
  min-width: 0;
}

@media (min-width: 700px) {
  .grid-articles {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Home “From the community”: avoid stretched row heights; keep tag + body aligned */
.grid-articles--home .card--article {
  display: flex;
  flex-direction: column;
  height: auto;
}

.grid-articles--home .card--article .card-body {
  flex: 0 1 auto;
}

.card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.card--flat {
  box-shadow: none;
  border: 1px solid var(--border);
}

.card--flat:hover {
  transform: none;
  box-shadow: var(--shadow);
}

.card-link {
  color: inherit;
  text-decoration: none;
  display: block;
}

.card-link:hover {
  text-decoration: none;
}

.card-media {
  height: 140px;
  background: linear-gradient(120deg, #e2e8f0, #cbd5e1 50%, #f1f5f9);
  position: relative;
  overflow: hidden;
}

.card-media--photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-body {
  padding: 1rem 1.1rem 1.15rem;
}

.card-price {
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}

.card-price--with-offer {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem 0.65rem;
}

.card-price__orig {
  text-decoration: line-through;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.95rem;
}

.card-price__now {
  color: #0a7a3e;
  font-size: 1.1rem;
}

.card-offer-badge {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #fff;
  background: var(--accent, #5a2d82);
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  margin: 0.15rem 0 0.45rem;
  line-height: 1.2;
  display: inline-block;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-offer-badge--soft {
  background: var(--navy, #0f172a);
  font-weight: 600;
  opacity: 0.9;
}

.card h2,
.card h3 {
  font-size: 1.05rem;
  margin: 0 0 0.35rem;
  font-family: var(--font);
  font-weight: 600;
}

.card-meta {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0;
}

.card-tag {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  font-weight: 600;
  margin: 0 0 0.5rem;
}

.card-excerpt {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0 0 0.75rem;
}

.card-byline {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0;
}

/* Forms */
.input {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font: inherit;
  background: #fff;
}

.input:focus {
  outline: 2px solid rgba(90, 45, 130, 0.35);
  border-color: var(--primary);
}

.input--lg {
  padding: 0.85rem 1rem;
}

label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--navy);
}

.form-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-bottom: 3rem;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
}

.form-fieldset {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem 1.1rem;
  margin: 0;
}

.form-fieldset legend {
  padding: 0 0.35rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--navy);
}

/* My properties — booking records + listings */
.properties-mine-page .mine-section {
  margin-bottom: 2rem;
  padding: 1.15rem 1.25rem 1.35rem;
}

.properties-mine-page .mine-section__title {
  font-size: 1.1rem;
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
}

.properties-mine-page .mine-section__lead {
  margin: 0 0 1rem;
}

.properties-mine-page .mine-section--cta .mine-section-cta__row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}

.properties-mine-page .mine-section--cta .mine-section__title {
  margin-bottom: 0.25rem;
}

.link-button-inline {
  display: inline;
  padding: 0;
  margin: 0;
  border: none;
  background: none;
  font: inherit;
  font-weight: 600;
  color: var(--accent);
  cursor: pointer;
  text-decoration: underline;
}

.link-button-inline:hover {
  color: var(--primary-dark);
}

.property-record-modal .article-modal-inner {
  max-width: min(96vw, 640px);
  max-height: min(92vh, 860px);
}

.property-record-modal .property-record-modal__form.form-stack {
  padding-bottom: 0;
}

.forum-new-topic-modal .article-modal-inner,
.blog-write-modal .article-modal-inner {
  max-width: min(96vw, 560px);
  max-height: min(92vh, 820px);
}

.forum-new-topic-modal .forum-new-topic-modal__form.form-stack,
.blog-write-modal .blog-write-modal__form.form-stack {
  padding-bottom: 0;
}

.properties-mine-page .mine-bookings-table-wrap {
  overflow-x: auto;
  margin-top: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.properties-mine-page .mine-bookings-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.properties-mine-page .mine-bookings-table th,
.properties-mine-page .mine-bookings-table td {
  padding: 0.65rem 0.75rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
}

.properties-mine-page .mine-bookings-table th {
  background: var(--surface-alt);
  font-weight: 600;
  white-space: nowrap;
}

.properties-mine-page .mine-bookings-table tr:last-child td {
  border-bottom: none;
}

.properties-mine-page .mine-bookings-table__amt {
  font-weight: 600;
  color: var(--navy);
}

.properties-mine-page .mine-booking-delete-form {
  margin: 0;
}

.properties-mine-page .mine-listings-grid {
  margin-top: 1rem;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: flex-end;
  padding: 1rem;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: 1.5rem;
}

.filters .input {
  max-width: 200px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.1rem;
  border-radius: var(--radius-sm);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: background 0.15s, transform 0.1s;
}

.btn:hover {
  text-decoration: none;
  opacity: 0.95;
}

.btn--primary {
  background: var(--primary);
  color: #fff;
}

.btn--accent {
  background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-dim) 100%);
  color: #1f1528;
}

.btn--secondary {
  background: var(--surface);
  color: var(--navy);
  border: 1px solid var(--border);
}

.btn--secondary:hover {
  background: #f1f5f9;
}

.btn--sm {
  padding: 0.4rem 0.85rem;
  font-size: 0.9rem;
}

.btn--lg {
  padding: 0.85rem 1.25rem;
  font-size: 1rem;
}

/* Detail */
.detail-property-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-top: 0.75rem;
}

.detail-property-actions__form {
  display: inline;
  margin: 0;
}

.detail-property-actions__hint {
  margin: 0.75rem 0 0;
  font-size: 0.95rem;
}

.detail-grid {
  display: grid;
  gap: 1.5rem;
  padding-bottom: 3rem;
}

@media (min-width: 800px) {
  .detail-grid {
    grid-template-columns: 1fr 320px;
    align-items: start;
  }
}

.detail-hero {
  height: 240px;
  border-radius: var(--radius);
  background: linear-gradient(140deg, #cbd5e1, #e2e8f0);
  margin-bottom: 1.25rem;
  overflow: hidden;
}

.detail-hero--photo {
  padding: 0;
  height: auto;
  min-height: 200px;
  max-height: 420px;
}

.detail-hero--photo img {
  width: 100%;
  height: 100%;
  max-height: 420px;
  object-fit: cover;
  display: block;
}

.detail-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.detail-gallery__item {
  display: block;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
}

.detail-gallery__item img {
  width: 100%;
  height: 100px;
  object-fit: cover;
  display: block;
}

.detail-embed {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--radius);
  margin-bottom: 1.25rem;
  border: 1px solid var(--border);
}

.detail-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.detail-video {
  width: 100%;
  max-height: 400px;
  border-radius: var(--radius);
  margin-bottom: 1.25rem;
  background: #000;
}

.detail-link-out {
  margin: 0 0 1rem;
}

.detail-social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.prose {
  background: var(--surface);
  padding: 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

/* Property detail sidebar — card has no .card-body, so pad the aside itself */
.detail-aside {
  padding: 1.25rem 1.2rem 1.35rem;
}

.detail-aside > h3 {
  margin: 0 0 0.65rem;
  font-size: 1.05rem;
  font-weight: 600;
}

.detail-aside > p:not(.detail-aside__byline) {
  margin: 0 0 0.4rem;
  line-height: 1.45;
}

.detail-aside > hr {
  margin: 1rem 0;
  border: 0;
  border-top: 1px solid var(--border);
}

.detail-aside h3.detail-aside__specs-title {
  margin-top: 0.35rem;
  margin-bottom: 0.5rem;
}

.detail-aside__byline {
  margin: 1rem 0 0;
  padding-top: 0.9rem;
  border-top: 1px solid var(--border);
  line-height: 1.4;
}

.spec-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.spec-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem 1rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}

.spec-list li:first-child {
  padding-top: 0.65rem;
  border-top: 1px solid var(--border);
}

.spec-list__label {
  flex: 1 1 auto;
  min-width: 0;
  color: var(--text);
}

.spec-list__value {
  flex: 0 0 auto;
  text-align: right;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--navy);
}

.spec-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.breadcrumb {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.breadcrumb a {
  color: var(--primary);
  font-weight: 500;
}

.breadcrumb a:hover {
  color: var(--primary-dark);
}

/* Feed */
.feed-item {
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.feed-content {
  white-space: pre-wrap;
  word-break: break-word;
}

/* Auth */
.auth-box {
  padding: 2rem 0 3rem;
}

.auth-box h1 {
  margin-bottom: 0.5rem;
}

.auth-password-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.auth-password-field > label {
  font-weight: 600;
  font-size: 0.9rem;
}

.auth-password-wrap {
  position: relative;
}

.auth-password-wrap .input {
  width: 100%;
  padding-right: 4.25rem;
}

.auth-password-toggle {
  position: absolute;
  top: 1px;
  right: 1px;
  bottom: 1px;
  margin: 0;
  padding: 0 0.7rem;
  border: none;
  background: var(--surface-alt);
  color: var(--accent);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: 0 5px 5px 0;
}

.auth-password-toggle:hover {
  background: var(--border);
  color: var(--primary-dark, var(--primary));
}

.auth-password-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.auth-alt {
  text-align: center;
  margin-top: 1.5rem;
  color: var(--muted);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.85rem;
  margin: 1.25rem 0;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-divider span {
  white-space: nowrap;
}

.auth-oauth {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 0.35rem;
}

.auth-oauth-row {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.auth-oauth-inner {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
}

.oauth-unconfigured {
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--muted);
  margin: 0;
}

.oauth-unconfigured code {
  font-size: 0.78em;
  word-break: break-all;
}

.oauth-account-label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.oauth-account-hint {
  font-size: 0.85rem;
  margin-bottom: 0.35rem;
}

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

.input--sm {
  font-size: 0.9rem;
  padding: 0.45rem 0.6rem;
}

.nav-user-handle {
  color: var(--muted);
  font-weight: 400;
  font-size: 0.85em;
}

button.btn-google,
button.btn-linkedin {
  cursor: pointer;
  font-family: inherit;
}

.btn-google {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.85rem 1rem;
  background: #fff;
  color: #3c4043;
  border: 1px solid #dadce0;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(60, 64, 67, 0.1);
  transition: background 0.15s, box-shadow 0.15s;
}

.btn-google:hover {
  background: #f8f9fa;
  box-shadow: 0 2px 6px rgba(60, 64, 67, 0.12);
  text-decoration: none;
}

.btn-google__icon {
  flex-shrink: 0;
}

.btn-linkedin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.85rem 1rem;
  background: #0a66c2;
  color: #fff;
  border: 1px solid #004182;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(10, 102, 194, 0.25);
  transition: background 0.15s, box-shadow 0.15s;
}

.btn-linkedin:hover {
  background: #004182;
  color: #fff;
  box-shadow: 0 2px 6px rgba(10, 102, 194, 0.35);
  text-decoration: none;
}

.btn-linkedin__icon {
  flex-shrink: 0;
}

.nav-avatar {
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.35);
}

/* Community 3-column feed */
.community-head {
  padding: 1.5rem 0 0.5rem;
}

.layout-community {
  display: grid;
  gap: 1.25rem;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--space) 3rem;
  grid-template-columns: 1fr;
}

@media (min-width: 960px) {
  .layout-community {
    grid-template-columns: 240px minmax(0, 1fr) 260px;
    align-items: start;
  }

  .community-col--left,
  .community-col--right {
    position: sticky;
    top: calc(var(--header-h) + 0.75rem);
  }
}

.sidebar-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  margin-bottom: 1rem;
}

.sidebar-card--muted {
  background: #f8fafc;
}

.sidebar-card--accent {
  background: linear-gradient(145deg, #eff6ff 0%, #f8fafc 100%);
  border-color: #bae6fd;
}

.sidebar-title {
  font-size: 0.95rem;
  margin: 0 0 0.65rem;
  font-family: var(--font);
  font-weight: 600;
}

.sidebar-profile {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sidebar-avatar {
  border-radius: 50%;
  object-fit: cover;
}

.sidebar-avatar--placeholder {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--muted);
}

.sidebar-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.sidebar-list li {
  margin-bottom: 0.45rem;
}

.sidebar-list a {
  font-size: 0.9rem;
}

.tag-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.tag-list li {
  margin-bottom: 0.4rem;
}

.tag-list a {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  background: #fff;
  border-radius: 6px;
  border: 1px solid var(--border);
  font-size: 0.85rem;
}

.composer-card {
  margin-bottom: 0.5rem;
}

.composer-prompt {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  width: 100%;
  color: var(--muted);
  text-decoration: none;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.composer-prompt:hover {
  background: #f8fafc;
  text-decoration: none;
}

.feed-empty-compose {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--primary);
  text-decoration: underline;
  cursor: pointer;
}

.feed-empty-compose:hover {
  color: var(--primary-dark, var(--primary));
}

/*
 * <dialog> centering: full-viewport flex overlay + card on .article-modal-inner.
 * WebKit often ignores margin:auto / transform on the dialog box itself; flex centering is reliable on mobile.
 */
.article-modal-dialog {
  padding: 0;
  border: none;
}

.article-modal-dialog[open],
.article-modal-dialog:modal {
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  /* Explicit edges: UA modal <dialog> often uses left:50% + translate; we clear transform in JS,
     so without these the box can start at mid-viewport and spill off the right on mobile. */
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  inset: 0;
  z-index: 200;
  /* min(100%, 100vw) avoids UA dialog “half off-screen” without adding desktop scrollbar gutter issues */
  width: min(100%, 100vw);
  min-width: 0;
  max-width: min(100%, 100vw);
  height: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  transform: none;
  padding: max(0.5rem, env(safe-area-inset-top, 0px)) max(0.5rem, env(safe-area-inset-right, 0px))
    max(0.5rem, env(safe-area-inset-bottom, 0px)) max(0.5rem, env(safe-area-inset-left, 0px));
  background: transparent;
  border: none;
  box-shadow: none;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  box-sizing: border-box;
}

.article-modal-dialog::backdrop {
  background: rgba(15, 23, 42, 0.45);
}

.article-modal-inner {
  width: 100%;
  max-width: min(96vw, 560px);
  margin: 0 auto;
  align-self: center;
  flex: 0 1 auto;
  min-width: 0;
  padding: 1.15rem 1.25rem 1.35rem;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  max-height: min(85vh, 680px);
  overflow-x: hidden;
  overflow-y: auto;
  box-sizing: border-box;
}

@supports (height: 100dvh) {
  .article-modal-inner {
    max-height: min(85dvh, 680px);
  }
}

.article-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.article-modal-head h2 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin: 0;
}

.article-modal-lead {
  margin: 0 0 0.75rem;
}

.article-modal__close {
  flex-shrink: 0;
  border: none;
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

.article-modal__close:hover {
  background: var(--surface-alt);
  color: var(--text);
}

.review-write-modal .article-modal-inner {
  max-width: min(96vw, 520px);
  max-height: min(90vh, 760px);
}

.property-create-modal .article-modal-inner {
  max-width: min(96vw, 640px);
  max-height: min(92vh, 860px);
}

.article-modal-inner .article-composer-form.form-stack,
.property-create-modal .form-stack {
  padding-bottom: 0;
}

.article-composer-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.65rem;
  margin-top: 1rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}

.composer-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dim) 100%);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}

.feed-post {
  margin-bottom: 1rem;
  padding: 1.15rem 1.2rem;
}

.feed-post__head {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}

.feed-post__avatar {
  border-radius: 50%;
  object-fit: cover;
}

.feed-post__avatar--ph {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--muted);
}

.feed-post__author {
  margin: 0;
  font-weight: 600;
}

.feed-post__meta {
  margin: 0.15rem 0 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.feed-post__title {
  font-size: 1.15rem;
  margin: 0 0 0.5rem;
  font-family: var(--font);
  font-weight: 600;
}

.feed-post__body {
  font-size: 0.95rem;
  color: #334155;
  margin-bottom: 0.85rem;
  word-break: break-word;
}

.feed-post__media-block {
  margin-bottom: 0.85rem;
}

.feed-post__gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.5rem;
}

.feed-post__gallery-item {
  display: block;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.feed-post__gallery-item img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  display: block;
  vertical-align: middle;
}

.feed-post__embed--youtube {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--radius-sm);
  margin-top: 0.5rem;
  border: 1px solid var(--border);
}

.feed-post__embed--youtube iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.feed-post__link-row {
  margin: 0.5rem 0 0;
  font-size: 0.9rem;
}

.feed-post__video {
  width: 100%;
  max-height: 360px;
  border-radius: var(--radius-sm);
  margin-top: 0.5rem;
  background: #000;
}

.feed-post__social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.65rem;
}

.feed-post__social-chip {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  background: #f1f5f9;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--text);
}

.feed-post__social-chip:hover {
  background: #e2e8f0;
}

/* LinkedIn-style post engagement */
.feed-post__engage {
  margin-top: 0.25rem;
  padding-top: 0.35rem;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid #e5e7eb;
  background: #fafafa;
  margin-left: -1.2rem;
  margin-right: -1.2rem;
  padding-left: 1.2rem;
  padding-right: 1.2rem;
  padding-bottom: 0.35rem;
}

.feed-post__stats-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 1.5rem;
  font-size: 0.8rem;
  color: #5c5c5c;
  padding: 0.35rem 0 0.5rem;
}

.feed-post__stats-left {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 1.25rem;
}

.feed-post__reaction-stack {
  display: inline-flex;
  align-items: center;
}

.feed-post__reaction-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #fafafa;
  box-sizing: border-box;
}

.feed-post__reaction-dot--like {
  background: var(--primary);
  color: #fff;
}

.feed-post__reaction-svg {
  display: block;
}

.feed-post__reaction-total {
  font-weight: 500;
  color: #5c5c5c;
}

.feed-post__stats-right {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem;
  justify-content: flex-end;
  text-align: right;
}

.feed-post__stats-sep {
  color: #9ca3af;
  user-select: none;
}

.feed-post__engage-divider {
  height: 1px;
  background: #e5e7eb;
  margin: 0 -0.25rem;
}

.feed-action-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  padding: 0.15rem 0 0.25rem;
}

.feed-action-bar__cell {
  min-width: 0;
}

.feed-action-bar__form {
  margin: 0;
  height: 100%;
}

.feed-action-bar__btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  width: 100%;
  min-height: 3.25rem;
  padding: 0.4rem 0.35rem;
  border: none;
  border-radius: 6px;
  background: transparent;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  color: #5c5c5c;
  cursor: pointer;
  text-decoration: none;
  box-sizing: border-box;
}

.feed-action-bar__btn:hover {
  background: rgba(0, 0, 0, 0.06);
  color: #1f2937;
}

.feed-action-bar__btn--link {
  color: inherit;
}

.feed-action-bar__btn.is-active {
  color: var(--primary);
}

.feed-action-bar__btn.is-active .feed-action-bar__icon {
  color: var(--primary);
}

.feed-action-bar__icon {
  flex-shrink: 0;
  color: #5c5c5c;
  opacity: 0.95;
}

.feed-action-bar__label {
  line-height: 1.1;
  text-align: center;
}

@media (max-width: 480px) {
  .feed-action-bar__btn {
    font-size: 0.68rem;
    min-height: 3rem;
    padding: 0.35rem 0.2rem;
  }

  .feed-action-bar__icon {
    width: 18px;
    height: 18px;
  }
}

.feed-comments {
  margin-top: 0;
  padding-top: 0.85rem;
  border-top: none;
  background: var(--surface);
}

.feed-comments__title {
  font-size: 0.9rem;
  margin: 0 0 0.75rem;
  font-family: var(--font);
  font-weight: 600;
  color: var(--muted);
}

.feed-comment {
  padding: 0.65rem 0;
  border-bottom: 1px solid #f1f5f9;
}

.feed-comment:last-of-type {
  border-bottom: none;
}

.feed-comment__head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.feed-comment__av {
  border-radius: 50%;
  object-fit: cover;
}

.feed-comment__av--ph {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
}

.feed-comment__text {
  margin: 0;
  font-size: 0.9rem;
  padding-left: calc(32px + 0.5rem);
}

.feed-comment-form {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.feed-comment-form textarea {
  resize: vertical;
  min-height: 64px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

@media (max-width: 959px) {
  .community-col--main {
    order: -1;
  }
}

/* Flash */
.flash-wrap {
  padding-top: 0.75rem;
}

.flash {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.flash--success {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.flash--error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

/* Footer */
.site-footer {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.85);
  padding: 2rem 0 0;
  margin-top: auto;
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.5rem;
  padding-bottom: 1.5rem;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: #fff;
  text-decoration: none;
}

.footer-brand:hover {
  color: #fff;
  text-decoration: none;
  opacity: 0.92;
}

.footer-brand__mark {
  display: block;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

.footer-brand__name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.footer-tagline {
  margin: 0.35rem 0 0;
  font-size: 0.9rem;
  opacity: 0.75;
}

.footer-links {
  display: flex;
  gap: 1rem;
}
.footer-links a {
  color: rgba(255, 255, 255, 0.85);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1rem 0;
  opacity: 0.6;
}

.footer-cookie-link {
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.75);
  text-decoration: underline;
  text-underline-offset: 0.12em;
  cursor: pointer;
}

.footer-cookie-link:hover {
  color: #fff;
}

#main {
  min-height: calc(100vh - var(--header-h) - 120px);
}

/* —— Pre-launch landing (SPA-style) —— */
.page-launch #main {
  min-height: auto;
}

.launch-hero {
  background: linear-gradient(160deg, var(--primary-dark) 0%, var(--primary) 45%, #2d1840 100%);
  color: #fff;
  padding: clamp(2.5rem, 8vw, 4.5rem) 0;
  position: relative;
  overflow: hidden;
}

.launch-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 60% at 20% 0%, rgba(242, 201, 76, 0.2), transparent 50%);
  pointer-events: none;
}

.launch-hero__inner {
  position: relative;
  max-width: 720px;
  margin: 0;
  text-align: left;
}

.launch-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  color: var(--secondary);
  margin: 0 0 0.75rem;
  font-weight: 600;
}

.launch-hero__title {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 4vw, 2.75rem);
  margin: 0 0 0.75rem;
  line-height: 1.15;
}

.launch-hero__lead {
  margin: 0;
  font-size: 1.05rem;
  opacity: 0.9;
  max-width: 52ch;
}

.launch-wrap {
  padding-bottom: 3rem;
}

.launch-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.75rem 0 1.25rem;
}

.launch-chip {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.launch-chip:hover {
  background: var(--surface-alt);
}

.launch-chip--active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.launch-grid {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.launch-empty {
  text-align: center;
  padding: 2rem;
}

.launch-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
  box-shadow: var(--shadow);
}

.launch-card__head {
  margin-bottom: 1rem;
}

.launch-card__badge {
  display: inline-block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--primary);
  background: var(--surface-alt);
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  margin-bottom: 0.5rem;
}

.launch-card__title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  margin: 0;
  color: var(--text);
}

.launch-card__yt {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  border: 1px solid var(--border);
  background: #000;
}

.launch-card__yt iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.launch-card__gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.launch-card__img-wrap {
  display: block;
  padding: 0;
  border: none;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  background: var(--surface-alt);
  line-height: 0;
}

.launch-card__img-wrap:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.launch-card__img-wrap img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  transition: transform 0.2s;
}

.launch-card__img-wrap:hover img {
  transform: scale(1.03);
}

.launch-card__summary {
  margin: 0;
  color: #3d3648;
  font-size: 0.95rem;
}

.launch-card__listing {
  margin: 0.75rem 0 0;
  font-size: 0.9rem;
}

.launch-card__listing a {
  font-weight: 600;
}

.launch-toolbar--segment {
  margin-top: 0.75rem;
}

.launch-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.35rem 0 0.5rem;
}

.launch-card__pill {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(90, 45, 130, 0.12);
  color: #5a2d82;
}

.launch-card__pill--muted {
  background: rgba(15, 23, 42, 0.06);
  color: #475569;
}

.launch-card__extra-videos {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0.5rem 0;
}

.launch-card__mp4 {
  width: 100%;
  max-height: 220px;
  border-radius: var(--radius);
  background: #0f172a;
}

.launch-card__linkout {
  margin: 0.35rem 0 0;
  font-size: 0.88rem;
}

.launch-hero__cta {
  margin-top: 1.25rem;
}

.requirement-dialog {
  padding: 0;
  border: none;
  border-radius: var(--radius);
  max-width: min(96vw, 480px);
  width: 100%;
  box-shadow: var(--shadow-lg);
}

.requirement-dialog--chat {
  max-width: min(96vw, 560px);
}

.requirement-dialog::backdrop {
  background: rgba(15, 23, 42, 0.45);
}

.requirement-dialog__inner {
  padding: 1.15rem 1.25rem 1.35rem;
  position: relative;
}

.requirement-dialog__title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin: 0 0 0.35rem;
  padding-right: 2rem;
}

.requirement-dialog__close {
  position: absolute;
  top: 0.65rem;
  right: 0.75rem;
  border: none;
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
}

.requirement-dialog__msg {
  margin-top: 0.75rem;
  font-size: 0.95rem;
  color: var(--primary);
  font-weight: 600;
  min-height: 1.25rem;
}

.requirement-dialog__msg--err {
  color: #b91c1c;
  font-weight: 500;
}

.requirement-dialog__warn {
  margin-bottom: 0.75rem;
}

.requirement-chat-messages {
  min-height: 200px;
  max-height: min(45vh, 360px);
  overflow-y: auto;
  padding: 0.75rem;
  background: var(--surface-alt);
  border-radius: var(--radius-sm);
  margin-bottom: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.requirement-chat-bubble {
  max-width: 95%;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  font-size: 0.92rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.requirement-chat-bubble--user {
  align-self: flex-end;
  background: rgba(90, 45, 130, 0.12);
  color: var(--text);
}

.requirement-chat-bubble--model {
  align-self: flex-start;
  background: #fff;
  border: 1px solid var(--border);
}

.requirement-chat-bubble--typing {
  color: var(--muted);
  font-style: italic;
}

.requirement-chat-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.requirement-chat-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

.launch-modal[hidden] {
  display: none !important;
}

.launch-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.launch-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(31, 21, 40, 0.55);
  cursor: pointer;
}

.launch-modal__dialog {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.5rem 1.35rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}

.launch-modal__close {
  position: absolute;
  top: 0.65rem;
  right: 0.75rem;
  border: none;
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
}

.launch-modal__title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin: 0 0 0.35rem;
  padding-right: 2rem;
}

.launch-lead-msg {
  margin-top: 0.75rem;
  font-size: 0.95rem;
  color: var(--primary);
  font-weight: 600;
}

.launch-img-lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(31, 21, 40, 0.88);
  cursor: zoom-out;
}

.launch-img-lightbox img {
  max-width: min(96vw, 1200px);
  max-height: 92vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  cursor: default;
}

.launch-img-lightbox__close {
  position: absolute;
  top: 0.65rem;
  right: 0.75rem;
  border: none;
  background: transparent;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

body.modal-open {
  overflow: hidden;
}

/* Admin tables */
.admin-table-wrap {
  overflow-x: auto;
  margin-top: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.admin-table th,
.admin-table td {
  padding: 0.65rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.admin-table th {
  background: var(--surface-alt);
  font-weight: 600;
  color: var(--text);
}

.admin-table__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

/* Admin — bulk actions toolbar (e.g. /admin/users) */
.form-stack.admin-users-bulk-form {
  padding-bottom: 0;
}

.admin-bulk-toolbar {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0 0 1.25rem;
  padding: 1rem 1.15rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.admin-bulk-toolbar__section {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.9rem;
}

.admin-bulk-toolbar__section:last-of-type {
  padding-bottom: 0;
  border-bottom: none;
  margin-bottom: 0;
}

@media (min-width: 900px) {
  .admin-bulk-toolbar {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-end;
    row-gap: 1rem;
    column-gap: 0;
  }

  .admin-bulk-toolbar__section {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 0;
    padding: 0 1.1rem 0.15rem 0;
    border-bottom: none;
    border-right: 1px solid var(--border);
    min-width: 0;
  }

  .admin-bulk-toolbar__section:first-child {
    padding-left: 0;
  }

  .admin-bulk-toolbar__section:last-of-type {
    border-right: none;
    padding-right: 0;
    padding-bottom: 0.15rem;
    flex: 1 1 20rem;
    min-width: min(100%, 20rem);
  }
}

@media (min-width: 1100px) {
  .admin-bulk-toolbar__section--role {
    min-width: 16rem;
  }
}

.admin-bulk-toolbar__heading {
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted, #64748b);
  margin: 0;
  line-height: 1.2;
}

.admin-bulk-toolbar__controls {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.5rem 0.65rem;
}

.admin-bulk-toolbar__field {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.28rem;
  min-width: 0;
  margin: 0;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--navy);
  flex: 0 1 11rem;
}

@media (min-width: 600px) {
  .admin-bulk-toolbar__section--password .admin-bulk-toolbar__field {
    flex: 1 1 8.5rem;
  }
}

.admin-bulk-toolbar__field .input,
.admin-bulk-toolbar__field .input--sm {
  min-height: 2.25rem;
  width: 100%;
  max-width: 100%;
}

.admin-bulk-toolbar__field-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted, #64748b);
  line-height: 1.2;
}

/* Type column chips */
.admin-pill {
  display: inline-block;
  padding: 0.2rem 0.45rem;
  font-size: 0.8rem;
  line-height: 1.2;
  font-weight: 600;
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, "Segoe UI", monospace);
  color: var(--navy);
  background: #f1f5f9;
  border: 1px solid var(--border);
  border-radius: 6px;
}

@supports (background: color-mix(in srgb, red 12%, white)) {
  .admin-pill--type {
    background: color-mix(in srgb, var(--primary) 8%, var(--surface) 92%);
  }
}

.inline-form {
  display: inline;
}

.link-btn {
  background: none;
  border: none;
  padding: 0;
  color: var(--primary);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.92rem;
  cursor: pointer;
}

/* Blog & forum */
.hero-resource-strip {
  font-size: 0.88rem;
  margin: 0 0 1rem;
  opacity: 0.92;
}

.hero-resource-strip a {
  color: rgba(255, 255, 255, 0.95);
  font-weight: 600;
  text-decoration: none;
}

.hero-resource-strip a:hover {
  text-decoration: underline;
  color: var(--secondary);
}

.blog-grid {
  display: grid;
  gap: 1.25rem;
  padding-bottom: 3rem;
}

@media (min-width: 700px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.blog-card__cover {
  height: 180px;
  background-size: cover;
  background-position: center;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.blog-card__cover-link {
  display: block;
  text-decoration: none;
}

.blog-card__body {
  padding: 1rem 1.1rem 1.15rem;
}

.blog-card__meta {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0 0 0.35rem;
}

.blog-card__title {
  font-size: 1.1rem;
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
}

.blog-card__title a {
  color: var(--text);
  text-decoration: none;
}

.blog-card__title a:hover {
  color: var(--primary);
}

.blog-card__excerpt {
  font-size: 0.92rem;
  color: #3d3648;
  margin: 0 0 0.65rem;
}

.blog-article-head {
  padding-top: 1.5rem;
}

.blog-article__byline {
  margin: 0 0 1rem;
}

.blog-article__hero {
  height: 220px;
  background-size: cover;
  background-position: center;
  border-radius: var(--radius);
  margin-bottom: 1.25rem;
  border: 1px solid var(--border);
}

.blog-article__body {
  font-size: 1.02rem;
  line-height: 1.7;
}

.blog-article__footer {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.forum-layout {
  display: grid;
  gap: 2rem;
  padding-bottom: 3rem;
}

@media (min-width: 900px) {
  .forum-layout {
    grid-template-columns: 1.2fr 0.8fr;
    align-items: start;
  }
}

.forum-section-title {
  font-size: 1.1rem;
  margin: 0 0 1rem;
  font-family: var(--font-display);
}

.forum-cat-grid {
  display: grid;
  gap: 0.75rem;
}

@media (min-width: 520px) {
  .forum-cat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.forum-cat-card {
  display: block;
  padding: 1rem 1.1rem;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.15s;
}

.forum-cat-card:hover {
  box-shadow: var(--shadow);
  text-decoration: none;
}

.forum-cat-card h3 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}

.forum-recent-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.forum-recent-list li {
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
}

.forum-recent-list a {
  font-weight: 600;
  display: block;
  margin-bottom: 0.2rem;
}

.forum-topic-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.forum-topic-row {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.forum-topic-row__title {
  font-weight: 600;
  font-size: 1.02rem;
  text-decoration: none;
  color: var(--text);
}

.forum-topic-row__title:hover {
  color: var(--primary);
}

.forum-topic-row__meta {
  display: block;
  margin-top: 0.35rem;
}

.forum-thread {
  padding-bottom: 3rem;
}

.forum-post {
  margin-bottom: 1rem;
}

.forum-post__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1rem;
  margin-bottom: 0.65rem;
}

.forum-post__badge {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--surface-alt);
  color: var(--primary);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  font-weight: 700;
}

.forum-post__body {
  font-size: 0.95rem;
  line-height: 1.65;
}

.forum-reply {
  margin-top: 1.5rem;
}

.forum-reply__title {
  font-size: 1rem;
  margin: 0 0 0.75rem;
}

.forum-topic-head {
  padding-top: 1.5rem;
}

.empty-state {
  text-align: center;
  padding: 2rem;
  color: var(--muted);
}

code {
  font-size: 0.85em;
  background: var(--surface-alt);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1rem 0;
}

/* Reviews & ratings */
.reviews-head__row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.reviews-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 1rem 1.5rem;
  margin-top: 1rem;
}

.reviews-filters label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.reviews-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  align-items: stretch;
}

.reviews-grid > li {
  display: flex;
  min-width: 0;
}

.reviews-page .reviews-grid .review-card {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  width: 100%;
  min-height: 100%;
  padding: 1rem 1.15rem 1.1rem;
  box-sizing: border-box;
}

.reviews-page .reviews-grid .review-card:hover {
  transform: none;
  box-shadow: var(--shadow-lg);
}

.review-card__title {
  font-size: 1.05rem;
  margin: 0.35rem 0 0.25rem;
  font-family: var(--font-display);
}

.review-card__title a {
  color: var(--text);
  text-decoration: none;
}

.review-card__title a:hover {
  color: var(--primary);
}

.review-card__subject {
  font-size: 0.88rem;
  margin: 0 0 0.5rem;
}

.review-card__excerpt {
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--muted);
  margin: 0;
  flex: 1 1 auto;
}

.review-card__by {
  margin: 0;
  margin-top: auto;
  padding-top: 0.75rem;
  flex-shrink: 0;
}

.review-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  align-content: flex-start;
  gap: 0.5rem 0.65rem;
  flex-shrink: 0;
  min-height: 3.1rem;
}

.rating-stars {
  display: inline-flex;
  gap: 0.1rem;
  line-height: 1;
}

.rating-stars--lg {
  font-size: 1.35rem;
}

.rating-star {
  color: var(--border);
}

.rating-star.is-on {
  color: var(--gold);
}

.review-badge {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(90, 45, 130, 0.12);
  color: var(--primary);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

.review-badge--muted {
  background: var(--surface-alt);
  color: var(--muted);
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
}

.review-hero {
  margin-bottom: 1rem;
}

.review-hero__rating {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.review-hero__score {
  font-weight: 700;
  color: var(--primary);
}

.review-hero__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.5rem 0 0;
}

.review-body__text {
  font-size: 1rem;
  line-height: 1.7;
}

.review-qa h2 {
  font-size: 1.15rem;
  margin: 1.5rem 0 0.5rem;
}

.review-qa h3 {
  font-size: 1rem;
  margin: 0 0 0.5rem;
}

.review-q {
  margin-top: 1rem;
}

.review-q__question p {
  margin: 0.5rem 0 0;
  line-height: 1.6;
}

.review-q__answer {
  margin-top: 1rem;
  padding: 1rem;
  background: var(--surface-alt);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--primary);
}

.review-q__answer-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary);
  margin-bottom: 0.35rem;
}

.review-q__answer-form {
  margin-top: 1rem;
}

.review-ask {
  margin-top: 1.5rem;
}

.reviews-show-head {
  padding-top: 1.25rem;
}

/* —— My network + LinkedIn-style messaging dock —— */
body.has-network-dock {
  padding-bottom: 5.5rem;
}

.network-page .page-head {
  margin-bottom: 1.25rem;
}

.network-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
  margin-bottom: 1.25rem;
}

@media (min-width: 768px) {
  .network-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.network-card--wide {
  margin-bottom: 1.25rem;
}

.network-page .network-card {
  padding: 1rem 1.1rem 1.15rem;
}

.network-card h2 {
  margin-top: 0;
  font-size: 1.1rem;
}

.network-search-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.65rem;
}

.network-search-form .input {
  flex: 1 1 200px;
  min-width: 0;
  margin: 0;
}

.network-search-form .btn {
  flex-shrink: 0;
}

.network-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.network-list__item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 0.85rem;
  row-gap: 0.5rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
}

.network-list__item:last-child {
  border-bottom: 0;
}

.network-list--simple .network-list__item {
  border-bottom: 1px solid var(--border);
}

.network-list__who {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.network-list__who > div {
  min-width: 0;
  line-height: 1.35;
}

.network-list__who strong {
  font-weight: 600;
}

.network-list__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.4rem;
}

.network-list__actions .inline-form {
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 0;
}

.network-list__actions .inline-form .btn {
  margin: 0;
}

.empty-inline {
  margin: 0;
}

.network-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.network-avatar--placeholder {
  display: block;
  box-sizing: border-box;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  background: var(--surface-alt);
  border: 1px solid var(--border);
}

.network-pill {
  font-size: 0.78rem;
  margin-top: 0.2rem;
}

.network-pill--ok {
  color: var(--primary);
  font-weight: 600;
}

.network-chips {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.network-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  background: var(--surface-alt);
  border-radius: 999px;
  font-size: 0.9rem;
  border: 1px solid var(--border);
}

.network-chip img {
  border-radius: 50%;
}

.network-chips--selectable {
  gap: 0.55rem;
}

.network-chips--selectable li {
  list-style: none;
  margin: 0;
  padding: 0;
}

.network-chip--selectable {
  cursor: pointer;
  font: inherit;
  color: inherit;
  text-align: left;
  border: 2px solid var(--border);
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.network-chip--selectable:hover {
  border-color: rgba(90, 45, 130, 0.35);
  background: var(--surface);
}

.network-chip--selectable.is-selected,
.network-chip--selectable[aria-pressed="true"] {
  border-color: var(--primary);
  background: rgba(90, 45, 130, 0.08);
  box-shadow: 0 0 0 1px rgba(90, 45, 130, 0.2);
}

.network-selection-count {
  font-size: 0.88rem;
  margin: 0.35rem 0 0.75rem;
}

/* Teams / Slack–style presence (last activity–based) */
.presence-dot {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  box-sizing: border-box;
  border: 2px solid var(--surface);
  pointer-events: none;
}

.presence-dot--online {
  background: #22c55e;
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.35);
}

.presence-dot--away {
  background: #f97316;
  box-shadow: 0 0 0 1px rgba(249, 115, 22, 0.35);
}

.presence-dot--offline {
  background: #94a3b8;
  box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.4);
}

.network-chat-dock__avatar-wrap {
  position: relative;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
}

.network-chat-dock__avatar-wrap .presence-dot {
  pointer-events: auto;
}

.network-chat-win__avatar-wrap {
  position: relative;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
}

.network-chat-win__avatar-wrap img,
.network-chat-win__avatar-wrap .network-chat-win__ph {
  display: block;
  width: 28px;
  height: 28px;
  border-radius: 50%;
}

.network-chat-win__avatar-wrap .network-chat-win__ph {
  background: var(--border);
}

.network-chat-win__avatar-wrap .presence-dot {
  width: 10px;
  height: 10px;
  pointer-events: auto;
}

/* Messaging dock — full-width anchor so the cluster stays inside the viewport (avoids vw/row-reverse clipping) */
.network-chat-dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  /* Above .cookie-banner (180) so the rail / chat windows aren’t hidden under the consent strip; below modals (.article-modal-dialog 200). */
  z-index: 195;
  padding-left: max(0.5rem, env(safe-area-inset-left, 0px));
  /* Tuck rail into the right gutter (empty space) — minimal inset beyond safe area */
  padding-right: max(0.25rem, env(safe-area-inset-right, 0px));
  padding-bottom: max(0.5rem, env(safe-area-inset-bottom, 0px));
  box-sizing: border-box;
  pointer-events: none;
}

.network-chat-dock__inner {
  display: flex;
  flex-direction: row;
  justify-content: flex-end;
  align-items: flex-end;
  gap: 0.5rem;
  width: fit-content;
  max-width: 100%;
  margin-left: auto;
  margin-right: 0;
  pointer-events: none;
}

/* Narrow viewports: center chat popouts + hub (avoid right-clipped windows on phones) */
@media (max-width: 640px) {
  .network-chat-dock__inner {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    justify-content: center;
    flex-wrap: wrap;
  }

  .network-chat-dock__chats {
    justify-content: center;
    flex: 1 1 100%;
    max-width: 100%;
  }

  .network-chat-dock__panel {
    width: min(100%, calc(100vw - 1rem));
    max-width: min(300px, calc(100vw - 1rem));
    margin-left: auto;
    margin-right: auto;
  }

  .network-chat-win {
    width: min(calc(100vw - 1.25rem), 312px);
    max-width: calc(100vw - 1.25rem);
  }
}

.network-chat-dock__inner > * {
  pointer-events: auto;
}

/* Hub first in DOM for accessibility; flex order places conversation popouts to the left (LinkedIn-style) */
.network-chat-dock__panel {
  order: 2;
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: 0fr auto;
  gap: 0;
  align-items: stretch;
  flex-shrink: 0;
  width: min(300px, calc(100vw - 0.65rem));
  transition: grid-template-rows 0.38s cubic-bezier(0.32, 0.72, 0, 1);
}

/* Independent chat windows sit left of the Messaging hub; higher z-index when columns overlap */
.network-chat-dock__chats {
  order: 1;
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  gap: 0.5rem;
  min-width: 0;
  flex: 0 1 auto;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: visible;
  padding-bottom: 0.25rem;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

.network-chat-dock.is-open .network-chat-dock__panel {
  grid-template-rows: 1fr auto;
}

@media (prefers-reduced-motion: reduce) {
  .network-chat-dock__panel {
    transition: none;
  }
}

.network-chat-dock__sheet-shell {
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.network-chat-dock__sheet {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: min(340px, 56vh);
  max-height: min(540px, 72vh);
  background: var(--surface);
  border-radius: var(--radius) var(--radius) 0 0;
  box-shadow: 0 -8px 40px rgba(61, 31, 90, 0.18);
  border: 1px solid var(--border);
  border-bottom: 0;
  overflow: hidden;
}

.network-chat-dock.is-open .network-chat-dock__sheet {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

/* Expanded hub header — brand primary (LinkedIn-style purple strip) */
.network-chat-dock__sheet-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.65rem 0.85rem;
  flex-shrink: 0;
  background: linear-gradient(180deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.network-chat-dock__sheet-heading {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
}

.network-chat-dock__sheet-close {
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}

.network-chat-dock__sheet-close:hover {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.network-chat-dock__sheet-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--surface);
}

.network-chat-dock__search-wrap {
  padding: 0.5rem 0.65rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.network-chat-dock__search {
  width: 100%;
  font-size: 0.875rem;
}

.network-chat-dock__list {
  list-style: none;
  margin: 0;
  padding: 0.25rem 0;
  overflow-y: auto;
  flex: 1;
  -webkit-overflow-scrolling: touch;
}

.network-chat-dock__hint {
  padding: 0.75rem 1rem;
  margin: 0;
  font-size: 0.88rem;
  flex-shrink: 0;
  border-top: 1px solid var(--border);
}

.network-chat-dock__hint a {
  color: var(--primary);
}

/* Collapsed rail — white bar + avatar (reference: LinkedIn collapsed messaging) */
.network-chat-dock__rail-footer {
  display: flex;
  align-items: stretch;
  flex-shrink: 0;
  background: var(--surface);
  border-radius: var(--radius) var(--radius) 0 0;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  border-bottom: 0;
  overflow: hidden;
}

.network-chat-dock.is-open .network-chat-dock__rail-footer {
  border-top: 0;
  border-radius: 0;
  box-shadow: none;
}

.network-chat-dock__toggle {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.55rem;
  flex: 1;
  min-width: 0;
  margin: 0;
  padding: 0.5rem 0.65rem 0.5rem 0.75rem;
  font: inherit;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text);
  background: var(--surface);
  border: 0;
  cursor: pointer;
  text-align: left;
}

.network-chat-dock__toggle:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
}

.network-chat-dock__toggle-avatar-wrap {
  flex-shrink: 0;
}

.network-chat-dock__toggle-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  border: 2px solid var(--border);
}

.network-chat-dock__toggle-avatar-ph {
  display: block;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface-alt);
  border: 2px solid var(--border);
}

.network-chat-dock__rail-action {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  flex-shrink: 0;
  border: 0;
  border-left: 1px solid var(--border);
  background: var(--surface);
  color: var(--primary);
  font-size: 1.1rem;
  font-weight: 600;
  text-decoration: none;
}

.network-chat-dock__rail-action:hover {
  background: var(--surface-alt);
  text-decoration: none;
  color: var(--primary-dark);
}

.network-chat-dock__contact {
  cursor: pointer;
  font-size: 0.92rem;
}

.network-chat-dock__contact-inner {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.75rem;
}

.network-chat-dock__contact:hover .network-chat-dock__contact-inner {
  background: var(--surface-alt);
}

.network-chat-dock__contact--active .network-chat-dock__contact-inner {
  background: rgba(90, 45, 130, 0.1);
  box-shadow: inset 3px 0 0 var(--primary);
}

.network-chat-dock__contact--muted {
  opacity: 0.92;
}

.network-chat-dock__contact-text {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.network-chat-dock__contact-meta {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.25;
}

.network-chat-dock__contact img,
.network-chat-dock__contact-ph {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
}

.network-chat-dock__contact-ph {
  background: var(--surface-alt);
  border: 1px solid var(--border);
}

.network-chat-dock__contact-name {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
}

.network-chat-dock__toggle-label {
  flex: 1;
  min-width: 0;
  text-align: left;
}

.network-chat-dock__toggle-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  flex-shrink: 0;
  opacity: 0.95;
}

.network-chat-dock__toggle-chevron::after {
  content: "";
  display: block;
  width: 0.45rem;
  height: 0.45rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  margin-bottom: 0.15rem;
}

.network-chat-dock.is-open .network-chat-dock__toggle-chevron::after {
  transform: rotate(-135deg);
  margin-bottom: -0.1rem;
}

/* Pop-out DM windows (LinkedIn-style): separate card left of the Messaging hub */
.network-chat-win {
  width: min(312px, calc(100vw - 2rem));
  max-width: 100%;
  height: min(400px, 58vh);
  background: var(--surface);
  border-radius: var(--radius) var(--radius) 0 0;
  box-shadow:
    0 0 0 1px rgba(15, 23, 42, 0.06),
    0 8px 28px rgba(61, 31, 90, 0.14);
  border: 1px solid var(--border);
  border-bottom: 0;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow: hidden;
}

.network-chat-win.is-minimized {
  height: auto;
}

.network-chat-win.is-minimized .network-chat-win__body,
.network-chat-win.is-minimized .network-chat-win__form {
  display: none;
}

.network-chat-win__head {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.55rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  flex-shrink: 0;
}

.network-chat-win__head .network-chat-win__avatar-wrap {
  flex-shrink: 0;
}

.network-chat-win__title {
  flex: 1;
  font-weight: 700;
  font-size: 0.88rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.network-chat-win__head-actions {
  display: flex;
  gap: 0.15rem;
}

.network-chat-win__icon {
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  padding: 0.2rem 0.35rem;
  color: var(--muted);
  border-radius: var(--radius-sm);
}

.network-chat-win__icon:hover {
  background: var(--bg);
  color: var(--text);
}

.network-chat-win__body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0.5rem;
  background: var(--bg);
}

.network-chat-win__form {
  flex-shrink: 0;
}

.network-chat-bubble-row {
  display: flex;
  margin-bottom: 0.35rem;
}

.network-chat-bubble-row.is-mine {
  justify-content: flex-end;
}

.network-chat-bubble {
  max-width: 85%;
  padding: 0.45rem 0.6rem;
  border-radius: 12px;
  font-size: 0.88rem;
  line-height: 1.45;
  word-break: break-word;
}

.network-chat-bubble-row.is-theirs .network-chat-bubble {
  background: var(--surface);
  border: 1px solid var(--border);
}

.network-chat-bubble-row.is-mine .network-chat-bubble {
  background: var(--primary);
  color: #fff;
}

.network-chat-msg {
  position: relative;
  max-width: 85%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  align-items: stretch;
}

.network-chat-bubble-row.is-mine .network-chat-msg {
  margin-left: auto;
}

.network-chat-bubble-row.is-theirs .network-chat-msg {
  margin-right: auto;
}

.network-chat-bubble-row.is-mine .network-chat-msg__bodyblock,
.network-chat-bubble-row.is-mine .network-chat-msg__quote {
  align-self: flex-end;
}

.network-chat-bubble-row.is-theirs .network-chat-msg__bodyblock,
.network-chat-bubble-row.is-theirs .network-chat-msg__quote {
  align-self: flex-start;
}

.network-chat-msg__quote {
  font-size: 0.75rem;
  line-height: 1.35;
  padding: 0.35rem 0.5rem;
  border-radius: 8px;
  border-left: 3px solid var(--primary);
  background: var(--surface);
  color: var(--text-muted);
  max-width: 100%;
}

.network-chat-msg__quote-author {
  font-weight: 600;
  color: var(--text);
  margin-right: 0.35rem;
}

.network-chat-msg__quote-text {
  display: inline;
}

.network-chat-msg__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.4rem;
  align-self: stretch;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  margin-top: 0.15rem;
}

/* LinkedIn-style hover toolbar: emojis + edit/reply */
.network-chat-hoverbar {
  position: absolute;
  z-index: 5;
  bottom: 100%;
  left: 0;
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0.15rem;
  margin-bottom: 0.2rem;
  padding: 0.25rem 0.35rem;
  max-width: min(100%, 18rem);
  background: #fff;
  border-radius: 999px;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.12);
  border: 1px solid var(--border);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s ease;
}

.network-chat-bubble-row.is-mine .network-chat-hoverbar {
  left: auto;
  right: 0;
}

@media (hover: hover) and (pointer: fine) {
  .network-chat-msg:hover .network-chat-hoverbar,
  .network-chat-hoverbar:hover {
    opacity: 1;
    pointer-events: auto;
  }
}

@media (hover: none) {
  .network-chat-hoverbar {
    opacity: 1;
    pointer-events: auto;
    position: static;
    margin-bottom: 0.35rem;
    max-width: 100%;
  }
}

.network-chat-hoverbar__emojis {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.05rem;
  overflow-x: auto;
  max-width: 11rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.network-chat-hoverbar__emo {
  border: 0;
  background: transparent;
  padding: 0.15rem 0.2rem;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 4px;
  font-family: system-ui, -apple-system, "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
  flex-shrink: 0;
}

.network-chat-hoverbar__emo:hover {
  background: var(--bg);
}

.network-chat-hoverbar__sep {
  width: 1px;
  align-self: stretch;
  min-height: 1.4rem;
  background: var(--border);
  flex-shrink: 0;
}

.network-chat-hoverbar__actions {
  display: flex;
  align-items: center;
  gap: 0.1rem;
}

.network-chat-hoverbar__act {
  border: 0;
  background: transparent;
  padding: 0.2rem 0.35rem;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 4px;
  color: var(--text-muted);
}

.network-chat-hoverbar__act:hover {
  background: var(--bg);
  color: var(--text);
}

.network-chat-msg__media {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-width: 100%;
  margin-bottom: 0.35rem;
}

.network-chat-msg__att-img {
  max-width: 100%;
  max-height: 200px;
  width: auto;
  height: auto;
  border-radius: 8px;
  object-fit: cover;
}

.network-chat-msg__att-vid {
  max-width: 100%;
  max-height: 200px;
  border-radius: 8px;
  background: #000;
}

.network-chat-msg__att-aud {
  width: 100%;
  max-width: 220px;
}

.network-chat-msg__att-file {
  display: inline-block;
  font-size: 0.8rem;
  color: var(--primary);
  text-decoration: underline;
  word-break: break-all;
}

/* Composer: tools + textarea + send */
.network-chat-composer {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 0.4rem 0.45rem;
  flex-shrink: 0;
}

.network-chat-composer__previews {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.network-chat-composer__previews[hidden] {
  display: none;
}

.network-chat-composer__chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.72rem;
  padding: 0.2rem 0.45rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  max-width: 100%;
}

.network-chat-composer__chip-remove {
  border: 0;
  background: transparent;
  padding: 0 0.15rem;
  cursor: pointer;
  font-size: 0.9rem;
  line-height: 1;
  color: var(--text-muted);
}

.network-chat-composer__row {
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  gap: 0.4rem;
  width: 100%;
  min-width: 0;
}
.network-chat-composer__actions {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 0 0 auto;
  z-index: 2;
}
.network-chat-composer__plus {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  line-height: 0;
  flex-shrink: 0;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}
.network-chat-composer__plus:hover,
.network-chat-composer__plus[aria-expanded="true"] {
  background: var(--bg);
  border-color: var(--text-muted);
}
.network-chat-composer__plus-ico {
  display: block;
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1;
  margin: 0 0 1px 0;
}
.network-chat-composer__panel[hidden] {
  display: none;
}
.network-chat-composer__panel {
  position: absolute;
  bottom: calc(100% + 0.35rem);
  right: 0;
  min-width: 11.5rem;
  padding: 0.45rem 0.4rem 0.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  z-index: 20;
}
.network-chat-composer__panel-title {
  margin: 0 0 0.35rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.network-chat-composer__panel-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.1rem 0.15rem;
  max-width: 12rem;
}
.network-chat-composer__emoji-wrap--in-panel .network-chat-composer__emoji-pop {
  right: 0;
  left: auto;
  bottom: 100%;
  top: auto;
  margin-bottom: 0.2rem;
  margin-top: 0;
  z-index: 30;
}

.network-chat-composer__tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.1rem;
  flex-shrink: 0;
}

.network-chat-composer__tool {
  border: 0;
  background: transparent;
  padding: 0.2rem 0.25rem;
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 4px;
  opacity: 0.9;
}

.network-chat-composer__tool:hover {
  background: var(--bg);
  opacity: 1;
}

.network-chat-composer__input {
  flex: 1 1 0;
  min-width: 0;
  min-height: 2.15rem;
  max-height: 5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.5rem;
  font: inherit;
  font-size: 0.88rem;
  line-height: 1.4;
  resize: vertical;
}

.network-chat-composer__send {
  flex-shrink: 0;
}

.network-chat-composer__emoji-wrap {
  position: relative;
}
.network-chat-composer__emoji-wrap--in-panel {
  position: static;
  display: inline-flex;
  align-items: center;
}
.network-chat-composer__emoji-wrap--in-panel .network-chat-composer__tool {
  line-height: 1;
}

.network-chat-composer__emoji-pop {
  position: absolute;
  bottom: 100%;
  right: 0;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem;
  max-width: 9rem;
  margin-bottom: 0.2rem;
  padding: 0.35rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
}

.network-chat-composer__emoji-pop[hidden] {
  display: none;
}

.network-chat-composer__emoji-pick {
  border: 0;
  background: transparent;
  font-size: 1.1rem;
  line-height: 1;
  padding: 0.1rem;
  cursor: pointer;
  border-radius: 4px;
}

.network-chat-composer__emoji-pick:hover {
  background: var(--bg);
}

.network-chat-msg__reactions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem;
  align-items: center;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Apple Color Emoji", "Segoe UI Emoji",
    "Segoe UI Symbol", "Noto Color Emoji", sans-serif;
}

.network-chat-msg__react-pill {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 999px;
  padding: 0.1rem 0.35rem;
  font-size: 0.78rem;
  line-height: 1.2;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
}

.network-chat-msg__react-pill.is-mine {
  border-color: var(--primary);
  background: var(--surface);
}

@supports (background: color-mix(in srgb, red 12%, white)) {
  .network-chat-msg__react-pill.is-mine {
    background: color-mix(in srgb, var(--primary) 12%, var(--surface));
  }
}

.network-chat-msg__react-count {
  font-size: 0.68rem;
  opacity: 0.85;
}

.network-chat-msg__bodyblock {
  max-width: 100%;
}

.network-chat-msg__edited {
  display: block;
  font-size: 0.68rem;
  line-height: 1.2;
  margin-top: 0.2rem;
  opacity: 0.75;
}

.network-chat-bubble-row.is-mine .network-chat-msg__edited {
  text-align: right;
}

.network-chat-msg__edit-ui {
  width: 100%;
  max-width: 100%;
}

.network-chat-msg__edit-textarea {
  width: 100%;
  min-height: 3.5rem;
  max-height: 12rem;
  box-sizing: border-box;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.5rem;
  font: inherit;
  font-size: 0.88rem;
  line-height: 1.45;
  resize: vertical;
  margin-bottom: 0.35rem;
}

.network-chat-msg__edit-actions {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.network-chat-bubble-row.is-mine .network-chat-msg__edit-actions {
  justify-content: flex-end;
}

.network-chat-win__reply-banner {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  padding: 0.35rem 0.5rem;
  font-size: 0.78rem;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

@supports (background: color-mix(in srgb, red 6%, white)) {
  .network-chat-win__reply-banner {
    background: color-mix(in srgb, var(--primary) 6%, var(--surface));
  }
}

.network-chat-win__reply-label {
  font-weight: 600;
  color: var(--text-muted);
}

.network-chat-win__reply-summary {
  flex: 1;
  min-width: 0;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.network-chat-win__reply-cancel {
  border: 0;
  background: transparent;
  font-size: 1.1rem;
  line-height: 1;
  padding: 0 0.2rem;
  cursor: pointer;
  color: var(--text-muted);
}

.network-chat-win__reply-cancel:hover {
  color: var(--text);
}

/* Construction calculator */
.construction-calc.container {
  padding-left: max(env(safe-area-inset-left, 0px), clamp(1.25rem, 5vw, 2.75rem));
  padding-right: max(env(safe-area-inset-right, 0px), clamp(1.25rem, 5vw, 2.75rem));
  padding-top: clamp(1rem, 3vw, 2rem);
  padding-bottom: clamp(2.5rem, 6vw, 4rem);
}

.construction-calc .page-head {
  padding-top: clamp(0.35rem, 2vw, 1rem);
  padding-bottom: 1rem;
}

.construction-calc .card.card--flat {
  padding: 1.35rem clamp(1rem, 3.5vw, 1.65rem) 1.65rem;
}

.construction-calc .card.card--flat .form-stack {
  padding-bottom: 0;
}

.construction-calc__layout {
  display: grid;
  gap: 1.25rem;
  align-items: start;
}

@media (min-width: 900px) {
  .construction-calc__layout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}

.construction-calc__h2 {
  font-family: var(--font-display, inherit);
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 0.35rem;
  padding-top: 0.35rem;
  border-top: 1px solid var(--border);
}

.construction-calc__h2:first-child {
  border-top: 0;
  padding-top: 0;
}

.construction-calc__h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0.75rem 0 0.35rem;
}

.construction-calc__dl {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.35rem 1rem;
  margin: 0 0 0.5rem;
  font-size: 0.92rem;
}

.construction-calc__dl dt {
  color: var(--muted);
  margin: 0;
}

.construction-calc__dl dd {
  margin: 0;
  font-weight: 600;
  text-align: right;
}

.construction-calc__disclaimer {
  font-size: 0.82rem;
  margin: 1rem 0 0;
  line-height: 1.45;
}

.construction-calc__warn {
  font-size: 0.88rem;
  margin: 0.75rem 0 0;
  color: var(--warning, #b45309);
}

/* —— Cookie consent banner & preference dialog —— */
body.cookie-banner-visible {
  padding-bottom: max(5.5rem, calc(env(safe-area-inset-bottom, 0px) + 4.5rem));
}

.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 180;
  padding: 0.85rem max(0.75rem, env(safe-area-inset-left, 0px)) max(0.85rem, env(safe-area-inset-bottom, 0px))
    max(0.75rem, env(safe-area-inset-right, 0px));
  background: var(--surface, #fff);
  border-top: 1px solid var(--border, #e5e7eb);
  box-shadow: 0 -8px 28px rgba(15, 23, 42, 0.12);
}

.cookie-banner__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem 1.25rem;
}

.cookie-banner__text {
  margin: 0;
  flex: 1 1 220px;
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--text);
}

.cookie-banner__link {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.cookie-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}

.cookie-consent-dialog .article-modal-inner.cookie-consent-dialog__inner {
  max-width: min(96vw, 480px);
}

.cookie-consent-dialog__lead {
  margin: 0 0 1rem;
  line-height: 1.45;
}

.cookie-consent-dialog__link {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.cookie-consent-list {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
}

.cookie-consent-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border, #e5e7eb);
}

.cookie-consent-row:last-child {
  border-bottom: none;
}

.cookie-consent-row__text {
  flex: 1 1 200px;
  min-width: 0;
}

.cookie-consent-row__title {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 0.15rem;
}

.cookie-consent-row__badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-left: 0.35rem;
}

.cookie-consent-row__desc {
  margin: 0.25rem 0 0;
}

.cookie-consent-row__control {
  flex-shrink: 0;
  padding-top: 0.15rem;
}

.cookie-consent-dialog__footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.25rem;
  padding-top: 0.35rem;
}

/* Toggle switches */
.cookie-toggle {
  position: relative;
  display: inline-block;
  width: 2.75rem;
  height: 1.5rem;
  flex-shrink: 0;
}

.cookie-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.cookie-toggle__slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #cbd5e1;
  border-radius: 999px;
  transition: background 0.18s ease;
}

.cookie-toggle__slider::before {
  content: "";
  position: absolute;
  height: 1.15rem;
  width: 1.15rem;
  left: 0.18rem;
  bottom: 0.175rem;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.2);
  transition: transform 0.18s ease;
}

.cookie-toggle input:checked + .cookie-toggle__slider {
  background: #2563eb;
}

.cookie-toggle input:checked + .cookie-toggle__slider::before {
  transform: translateX(1.2rem);
}

.cookie-toggle input:focus-visible + .cookie-toggle__slider {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.cookie-toggle--locked .cookie-toggle__slider {
  cursor: default;
  background: #93c5fd;
  opacity: 0.85;
}

.cookie-toggle--locked input:disabled + .cookie-toggle__slider {
  cursor: default;
}

/* Pricing (Razorpay) — single .container with .page-head so title + cards share one max-width + padding */
.pricing-page {
  padding-bottom: 3rem;
  width: 100%;
  box-sizing: border-box;
}

.pricing-page .pricing-grid {
  display: grid;
  gap: 1.25rem;
  width: 100%;
  min-width: 0;
  margin-top: 1.5rem;
}

@media (min-width: 900px) {
  .pricing-page .pricing-grid {
    grid-template-columns: repeat(3, 1fr);
    align-items: stretch;
  }
}

.pricing-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 1.35rem 1.4rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.pricing-card--gold {
  border-color: color-mix(in srgb, var(--secondary) 45%, var(--border));
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.08);
}

@supports not (background: color-mix(in srgb, red 1%, white)) {
  .pricing-card--gold {
    border-color: #d4a84b;
  }
}

.pricing-card--diamond {
  border-color: color-mix(in srgb, var(--primary) 35%, var(--border));
}

@supports not (background: color-mix(in srgb, red 1%, white)) {
  .pricing-card--diamond {
    border-color: #9b6bc4;
  }
}

.pricing-card__name {
  font-family: var(--font-display);
  font-size: 1.35rem;
  margin: 0 0 0.5rem;
  color: var(--navy);
}

.pricing-card__blurb {
  margin: 0 0 1rem;
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.45;
  flex: 0 0 auto;
}

.pricing-card__price {
  margin: 0 0 1.1rem;
  line-height: 1.1;
}

.pricing-card__amount {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
}

.pricing-card__period {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  font-weight: 500;
}

.pricing-card__features {
  margin: 0 0 1.25rem;
  padding: 0 0 0 1.1rem;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--navy);
  flex: 1 1 auto;
}

.pricing-card__features li {
  margin-bottom: 0.4rem;
}

.pricing-card__features li::marker {
  color: var(--primary);
}

.pricing-card__cta {
  margin-top: auto;
  padding-top: 0.25rem;
}

.pricing-card__cta .btn {
  width: 100%;
  text-align: center;
  justify-content: center;
}

.pricing-page__disclaimer {
  margin-top: 1.5rem;
  min-height: 1.25rem;
}
