:root {
  --background: #090d14;
  --surface: rgba(255, 255, 255, 0.05);
  --surface-strong: rgba(255, 255, 255, 0.08);
  --foreground: #f8fafc;
  --muted: #9ca3af;
  --border: rgba(255, 255, 255, 0.12);
  --primary: #10b981;
  --primary-dark: #047857;
  --danger: #ef4444;
  --danger-dark: #991b1b;
  --shadow: 0 20px 40px rgba(16, 185, 129, 0.08);
  --radius: 16px;
  --max: 1240px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--foreground);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 25% 25%, rgba(16, 185, 129, 0.035) 0%, transparent 30%),
    radial-gradient(circle at 75% 75%, rgba(5, 150, 105, 0.058) 0%, transparent 31%),
    linear-gradient(135deg, #0d1724 0%, #09111d 48%, #020617 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

img {
  max-width: 100%;
}

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

.container {
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto;
}

.narrow {
  max-width: 760px;
}

.narrow-wide {
  max-width: 980px;
}

.gradient-text {
  background: linear-gradient(135deg, #34d399 0%, #10b981 50%, #047857 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(145%) blur(14px);
  background: rgba(7, 11, 20, 0.72);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.site-nav.nav-scrolled {
  background: rgba(4, 9, 17, 0.9);
  border-bottom-color: rgba(52, 211, 153, 0.12);
  box-shadow: 0 16px 36px rgba(2, 6, 23, 0.24);
}

.nav-inner {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem 2.4rem;
  padding: 0.9rem 0 0.85rem;
}

.brand {
  align-self: center;
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  white-space: nowrap;
  padding: 0.2rem 0;
}

.nav-links {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 0.7rem;
  min-width: 0;
}

.nav-mobile-tools {
  display: none;
}

.nav-toggle {
  display: none;
}

.nav-toggle-lines {
  display: inline-flex;
  flex-direction: column;
  gap: 0.24rem;
}

.nav-toggle-lines span {
  display: block;
  width: 1.05rem;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.nav-primary-links {
  display: flex;
  align-items: center;
  gap: 1.15rem;
  flex-wrap: nowrap;
  min-width: 0;
  padding-top: 0;
}

.nav-link {
  position: relative;
  color: rgba(248, 250, 252, 0.74);
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.25;
  padding: 0.25rem 0 0.7rem;
  white-space: nowrap;
  transition: color 0.18s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 1.8rem;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, #34d399 0%, #10b981 100%);
  transform: translateX(-50%) scaleX(0);
  transform-origin: center;
  transition: transform 0.2s ease;
}

.nav-link:hover,
.nav-link:focus-visible,
.nav-link.is-active {
  color: var(--foreground);
}

.nav-link.is-active::after {
  transform: translateX(-50%) scaleX(1);
}

.nav-profile-icon {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 48px;
  padding: 0.34rem 0.55rem 0.34rem 0.38rem;
  border-radius: 999px;
  background: rgba(6, 10, 18, 0.84);
  border: 1px solid rgba(16, 185, 129, 0.36);
  color: var(--foreground);
  box-shadow: 0 10px 28px rgba(2, 6, 23, 0.18);
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-profile-icon:hover {
  background: rgba(10, 15, 26, 0.96);
  border-color: rgba(52, 211, 153, 0.58);
  transform: translateY(-1px);
}

.nav-profile-icon[aria-expanded="true"] .nav-profile-chevron {
  transform: rotate(180deg);
}

.nav-profile-badge {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(16, 185, 129, 0.24);
  background: rgba(16, 185, 129, 0.08);
  color: #d1fae5;
  overflow: hidden;
}

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

.nav-profile-initials,
.nav-profile-guest {
  width: 100%;
  height: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.nav-profile-initials {
  background: transparent;
  color: #d1fae5;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.nav-profile-chevron {
  color: rgba(248, 250, 252, 0.72);
  transition: transform 0.2s ease, color 0.2s ease;
}

.nav-profile-wrapper {
  position: relative;
  display: inline-flex;
  justify-self: end;
  align-self: center;
}

.nav-profile-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 0.7rem);
  right: 0;
  width: 260px;
  flex-direction: column;
  align-items: stretch;
  gap: 0.7rem;
  padding: 1rem;
  border-radius: 18px;
  border: 1px solid rgba(52, 211, 153, 0.14);
  background: rgba(7, 11, 20, 0.96);
  backdrop-filter: blur(16px);
  box-shadow: 0 24px 44px rgba(2, 6, 23, 0.35);
}

.nav-profile-dropdown.profile-open {
  display: flex;
}

.nav-profile-dropdown > a:not(.button) {
  color: var(--muted);
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-profile-dropdown > a:not(.button):hover {
  color: var(--foreground);
  transform: translateX(2px);
}

.nav-divider {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin: 0.25rem 0;
}

.nav-welcome {
  color: var(--muted);
  font-size: 0.95rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 46px;
  padding: 0.8rem 1.2rem;
  border-radius: 999px;
  border: 1px solid transparent;
  background: linear-gradient(135deg, var(--primary) 0%, #059669 100%);
  color: white;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 15px 30px rgba(16, 185, 129, 0.22);
}

.button-small {
  min-height: 38px;
  padding: 0.55rem 1rem;
  font-size: 0.95rem;
}

.button-outline,
.button-ghost {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--border);
  color: var(--foreground);
}

.button-outline:hover,
.button-ghost:hover {
  box-shadow: none;
  background: rgba(255, 255, 255, 0.08);
}

.button-danger {
  background: linear-gradient(135deg, var(--danger) 0%, var(--danger-dark) 100%);
}

.search-form {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
}

.search-form input {
  flex: 1;
}

.nav-home-tools {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  justify-self: stretch;
  justify-content: flex-start;
  flex-wrap: nowrap;
  min-width: 0;
}

.nav-search-form {
  flex: 1 1 auto;
  min-width: 0;
}

.nav-search-input {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.nav-search-input input {
  width: 100%;
  min-height: 48px;
  padding: 0.88rem 3rem 0.88rem 1.05rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.04);
  color: var(--foreground);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.nav-search-input input::placeholder {
  color: rgba(156, 163, 175, 0.86);
}

.nav-search-input input:focus {
  outline: none;
  border-color: rgba(52, 211, 153, 0.48);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
}

.nav-search-submit {
  position: absolute;
  top: 50%;
  right: 0.75rem;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--muted);
  padding: 0.2rem;
  cursor: pointer;
  transition: color 0.18s ease, transform 0.18s ease;
}

.nav-search-submit:hover,
.nav-search-submit:focus-visible {
  color: var(--foreground);
  transform: translateY(-50%) scale(1.04);
}

.nav-advanced-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  flex: 0 0 auto;
  white-space: nowrap;
  color: rgba(52, 211, 153, 0.94);
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.18s ease, transform 0.18s ease;
}

.nav-advanced-link:hover,
.nav-advanced-link:focus-visible {
  color: #6ee7b7;
  transform: translateX(2px);
}

.nav-home-tools .button {
  white-space: nowrap;
}

@media (max-width: 1180px) {
  .nav-inner {
    gap: 0.9rem 1.3rem;
  }

  .nav-links {
    gap: 0.75rem;
  }

  .nav-primary-links {
    gap: 0.95rem;
  }
}

@media (max-width: 1040px) and (min-width: 861px) {
  .nav-inner {
    align-items: start;
    gap: 0.8rem 1rem;
  }

  .brand,
  .nav-profile-wrapper {
    align-self: start;
    padding-top: 0.2rem;
  }

  .nav-links {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 0.75rem;
  }

  .nav-primary-links {
    gap: 0.9rem;
  }

  .nav-home-tools {
    justify-self: stretch;
    align-items: center;
  }
}

@media (min-width: 1041px) {
  .nav-inner {
    align-items: start;
  }

  .brand,
  .nav-profile-wrapper {
    align-self: start;
    padding-top: 0.28rem;
  }

  .nav-links {
    align-items: start;
  }

  .nav-primary-links {
    padding-top: 0.45rem;
  }

  .nav-home-tools {
    align-items: center;
  }
}

.advanced-search-card {
  margin-bottom: 1.25rem;
  padding: 0;
  overflow: hidden;
  scroll-margin-top: 7.5rem;
}

.advanced-search-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem;
  cursor: pointer;
  list-style: none;
}

.advanced-search-summary::-webkit-details-marker {
  display: none;
}

.advanced-search-summary-copy {
  display: grid;
  gap: 0.3rem;
}

.advanced-search-summary-copy h3 {
  margin: 0;
  font-size: 1.05rem;
  color: #f8fafc;
}

.advanced-search-kicker {
  color: #ff8f00;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.advanced-search-summary-button {
  pointer-events: none;
}

.advanced-search-form {
  display: grid;
  gap: 1rem;
  padding: 1rem 1.1rem 1.1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.advanced-search-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}

.advanced-search-field {
  display: grid;
  gap: 0.45rem;
}

.advanced-search-field span {
  color: #ff8f00;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.advanced-search-field input,
.advanced-search-field select {
  width: 100%;
}

.advanced-search-active {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.advanced-search-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero {
  padding: 4rem 0 3rem;
}

.hero-title {
  margin: 0 0 1rem;
  font-size: clamp(3rem, 7vw, 5rem);
}

.hero-copy {
  max-width: 840px;
  margin: 0 auto;
  color: var(--muted);
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  line-height: 1.65;
}

.section {
  padding: 2.5rem 0;
}

.stats-section {
  padding: 2rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.center-text {
  text-align: center;
}

.card,
.disclaimer,
.flash,
.muted-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(12px);
}

.card {
  padding: 1.35rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.post-card,
.detail-card,
.form-card,
.auth-card {
  box-shadow: var(--shadow);
}

.card-link {
  display: block;
  height: 100%;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.2rem;
}

.card-header,
.detail-top,
.comment-head,
.action-row,
.meta-row,
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.badge-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding-top: 0.5rem;
  margin-bottom: 2rem;
}

.stack-list,
.comment-list {
  display: grid;
  gap: 1rem;
}

.card-title,
h1,
h2,
h3 {
  margin: 0;
}

.card-title-stack {
  display: grid;
  gap: 0.35rem;
  justify-items: start;
}

.card-title-stack .card-side-label {
  text-align: left;
}

.card-badge-stack {
  display: grid;
  gap: 0.45rem;
  justify-items: end;
}

.card-side-label-stack {
  display: grid;
  gap: 0.35rem;
  justify-items: end;
  align-self: start;
}

.card-side-label {
  color: #ff8f00;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: right;
}

.card-subtitle {
  font-size: 1.15rem;
  line-height: 1.2;
}

.detail-heading-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.5rem;
  align-items: start;
}

.detail-heading-text {
  min-width: 0;
}

.detail-header-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: flex-start;
  gap: 0.85rem;
}

.detail-actions {
  grid-column: 3;
  justify-content: flex-end;
  justify-self: end;
}

.detail-actions form {
  margin: 0;
}

.detail-kicker-row {
  margin-bottom: 0;
  grid-column: 2;
  text-align: center;
}

.detail-kicker {
  color: #ffffff;
  display: inline-block;
  font-size: 2.4rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.detail-subtitle {
  font-size: clamp(1.35rem, 3vw, 2rem);
  line-height: 1.15;
  margin-top: 0;
}

.detail-rating-inline {
  font-weight: 700;
}

.detail-title-stack {
  display: grid;
  gap: 0.45rem;
}

.detail-title-block {
  display: grid;
  gap: 0.12rem;
}

.detail-title-stack {
  display: grid;
  gap: 1rem;
}

.detail-inline-label {
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.detail-summary-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.3rem;
  align-items: start;
  margin-top: 1rem;
}

.detail-overview-block {
  display: grid;
  gap: 0.3rem;
}

.detail-overview-block .detail-section-heading {
  margin-bottom: 0;
}

.detail-overview-copy {
  margin: 0;
  color: #d1d5db;
  font-size: 1rem;
  line-height: 1.55;
}

.detail-meta-panel {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.detail-meta-item {
  display: grid;
  gap: 0.3rem;
}

.detail-meta-line {
  color: #d1d5db;
  line-height: 1.35;
}

.detail-certainty-value {
  color: #fbbf24;
}

.detail-post-meta-block {
  margin-top: 1rem;
  padding: 0.15rem 0;
}

.detail-post-meta-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.detail-post-meta-line {
  color: #d1d5db;
  line-height: 1.45;
}

.detail-section-heading,
.detail-mini-heading {
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.detail-section-heading {
  color: #ffffff;
  font-weight: 400;
  font-size: 0.92rem;
  line-height: 1.2;
  margin: 0 0 0.3rem;
}

.detail-heading-lower {
  text-transform: none;
  letter-spacing: 0;
}

.detail-mini-heading {
  color: #ff8f00;
  font-weight: 700;
  font-size: 0.88rem;
  line-height: 1.2;
  margin: 0;
}

.detail-side-effects-block {
  margin-top: 1rem;
}

.detail-side-effects-block > .detail-section-heading {
  margin-bottom: 0.3rem;
}

.detail-side-effects-severity {
  color: #d1d5db;
  line-height: 1.45;
}

.detail-side-effects-severity-block {
  display: grid;
  gap: 0.3rem;
  margin-top: 0;
}

.detail-side-effects-list {
  display: grid;
  gap: 1rem;
}

.detail-side-effects-item {
  display: grid;
  gap: 1rem;
}

.detail-side-effects-item .detail-side-effects-severity-block {
  margin-top: 0;
}

.detail-meta-item .detail-section-heading,
.detail-side-effects-severity-block .detail-section-heading {
  margin-bottom: 0;
}

.detail-side-effects-line {
  color: #d1d5db;
  line-height: 1.55;
  margin: 0;
}

h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 0.75rem;
}

h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.15rem;
}

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

.small-gap {
  margin-bottom: 0.5rem;
}

.card-excerpt,
.detail-block p,
.comment-card p {
  color: #d1d5db;
  line-height: 1.7;
}

.card-excerpt {
  position: relative;
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.card-excerpt.is-clamped {
  padding-right: 5.75rem;
}

.card-excerpt.is-clamped::after {
  content: "... and more";
  position: absolute;
  right: 0;
  bottom: 0;
  padding-left: 1.5rem;
  color: #d1fae5;
  font-weight: 600;
  background: linear-gradient(90deg, rgba(12, 18, 29, 0), rgba(12, 18, 29, 0.94) 38%, rgba(12, 18, 29, 0.99) 100%);
}

.advanced-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.advanced-summary-card {
  display: grid;
  gap: 0.4rem;
  min-height: 100%;
}

.advanced-summary-card p {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--foreground);
}

.post-meta,
.stats-grid,
.admin-stats {
  display: grid;
  gap: 0.75rem;
}

.listing-actions {
  display: grid;
  gap: 0.85rem;
  margin-top: 1rem;
}

.listing-actions-top {
  margin-top: 0;
  margin-bottom: 1rem;
}

.listing-card-header {
  display: block;
  margin-bottom: 0.9rem;
}

.listing-title-stack {
  display: grid;
  justify-items: start;
  gap: 0.55rem;
}

.listing-actions-top .button {
  border-color: #c2410c;
  background: linear-gradient(135deg, #fb923c 0%, #ea580c 100%);
  color: #fff;
}

.listing-actions-top .button:hover {
  background: linear-gradient(135deg, #fdba74 0%, #f97316 100%);
  box-shadow: 0 15px 30px rgba(249, 115, 22, 0.25);
}

.listing-actions .button-link {
  color: var(--primary);
  font-weight: 600;
}

.treatment-browse-shell {
  display: grid;
  gap: 1.5rem;
}

.treatment-browse-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.treatment-browse-header-copy {
  display: grid;
  gap: 0.18rem;
}

.treatment-browse-header-copy h2 {
  font-size: clamp(2rem, 4vw, 2.7rem);
}

.treatment-browse-header-copy p {
  margin: 0;
  max-width: 680px;
}

.treatment-browse-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.treatment-browse-sort-form {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.3rem 0.35rem 0.3rem 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.035);
}

.treatment-browse-sort-form label {
  color: rgba(248, 250, 252, 0.74);
  font-size: 0.9rem;
  font-weight: 600;
}

.treatment-browse-sort-form select {
  min-width: 180px;
  border: none;
  background: rgba(7, 11, 20, 0.78);
  color: var(--foreground);
  border-radius: 12px;
  padding: 0.75rem 2.4rem 0.75rem 0.85rem;
}

.treatment-view-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem;
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.035);
}

.treatment-view-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: rgba(248, 250, 252, 0.7);
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.treatment-view-button:hover,
.treatment-view-button:focus-visible,
.treatment-view-button.is-active {
  color: var(--foreground);
  background: rgba(16, 185, 129, 0.22);
  box-shadow: inset 0 0 0 1px rgba(16, 185, 129, 0.34);
}

.treatment-category-slider {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.7rem;
}

.treatment-category-viewport {
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  scroll-behavior: smooth;
}

.treatment-category-viewport::-webkit-scrollbar {
  display: none;
}

.treatment-category-row {
  display: inline-flex;
  gap: 0.8rem;
  flex-wrap: nowrap;
  align-items: center;
  min-width: max-content;
  padding-bottom: 0.15rem;
}

.treatment-category-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
  color: rgba(248, 250, 252, 0.82);
  cursor: pointer;
  transition: opacity 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.treatment-category-arrow:hover,
.treatment-category-arrow:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(52, 211, 153, 0.3);
  background: rgba(255, 255, 255, 0.05);
  color: var(--foreground);
}

.treatment-category-arrow.is-disabled {
  opacity: 0.38;
  cursor: default;
  pointer-events: none;
}

.treatment-category-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.72rem 0.88rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.035);
  color: var(--foreground);
  white-space: nowrap;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.treatment-category-chip:hover,
.treatment-category-chip:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(52, 211, 153, 0.3);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 14px 28px rgba(2, 6, 23, 0.2);
}

.treatment-category-chip.is-active {
  background: linear-gradient(135deg, rgba(18, 201, 138, 0.84), rgba(7, 155, 108, 0.88));
  border-color: rgba(52, 211, 153, 0.78);
  color: #fff;
  box-shadow: 0 14px 28px rgba(16, 185, 129, 0.16);
}

.treatment-category-chip-icon {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(18, 201, 138, 0.28);
  color: #2ee6a0;
  background: transparent;
  flex: 0 0 auto;
}

.treatment-category-chip.is-active .treatment-category-chip-icon {
  border-color: rgba(255, 255, 255, 0.22);
  color: #fff;
  background: transparent;
}

.treatment-category-chip-label {
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
}

.treatment-category-chip-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.65rem;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(248, 250, 252, 0.72);
  font-size: 0.74rem;
  font-weight: 700;
}

.treatment-category-chip.is-active .treatment-category-chip-count {
  background: rgba(7, 11, 20, 0.18);
  color: #fff;
}

.treatment-browse-grid {
  gap: 1.45rem;
}

.treatment-card {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  padding: 0;
  overflow: hidden;
  border-color: rgba(16, 185, 129, 0.22);
  background:
    radial-gradient(circle at top left, rgba(18, 201, 138, 0.035), transparent 38%),
    linear-gradient(180deg, rgba(20, 30, 48, 0.95), rgba(12, 18, 29, 0.98));
  box-shadow: 0 16px 32px rgba(2, 6, 23, 0.18);
}

.treatment-card:hover,
.treatment-card:focus-within {
  transform: translateY(-3px);
  box-shadow: 0 22px 42px rgba(2, 6, 23, 0.22), 0 0 0 1px rgba(18, 201, 138, 0.22);
  border-color: rgba(18, 201, 138, 0.32);
}

.treatment-card-link {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 0.9rem;
  height: auto;
  padding: 1.05rem 1.05rem 0.92rem;
}

.treatment-card-link:focus-visible {
  outline: none;
}

.treatment-card-top {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
  gap: 0.8rem;
  min-height: 3.6rem;
}

.treatment-card-heading {
  display: grid;
  gap: 0.45rem;
  min-width: 0;
  justify-items: center;
  align-content: center;
  text-align: center;
  justify-self: center;
  width: 100%;
}

.treatment-card-icon {
  width: 54px;
  height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(18, 201, 138, 0.42);
  color: #24e39a;
  background: transparent;
  flex: 0 0 auto;
  justify-self: start;
}

.treatment-card-menu {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(248, 250, 252, 0.48);
  justify-self: end;
  align-self: start;
}

.treatment-card-body {
  display: grid;
  align-content: start;
  gap: 0.72rem;
  justify-items: center;
}

.treatment-card-badge {
  justify-self: center;
  padding: 0.3rem 0.62rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: rgba(226, 232, 240, 0.9);
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.08);
}

.treatment-card-title {
  font-size: 1.12rem;
  line-height: 1.28;
  letter-spacing: -0.02em;
  color: #f8fafc;
  margin: 0;
  text-align: center;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.treatment-card-summary {
  margin: 0;
  color: #c9d5e6;
  font-size: 0.92rem;
  line-height: 1.62;
  min-height: 5.3rem;
  text-align: left;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.treatment-card-summary.is-placeholder {
  color: #94a3b8;
}

.treatment-card-meta {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-wrap: wrap;
  padding-top: 0.8rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  color: #8fa2bc;
  font-size: 0.72rem;
}

.treatment-card-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
}

.treatment-card-meta-item svg {
  color: #24e39a;
}

.treatment-card-meta-divider {
  width: 1px;
  height: 12px;
  background: rgba(255, 255, 255, 0.08);
}

.treatment-card-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.treatment-card-action-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-width: 0;
  padding: 0.95rem 0.85rem 1rem;
  color: #d8e2f1;
  font-size: 0.94rem;
  font-weight: 500;
  line-height: 1.35;
  text-align: center;
  transition: color 0.18s ease, background 0.18s ease;
}

.treatment-card-action-link + .treatment-card-action-link {
  border-left: 1px solid rgba(255, 255, 255, 0.07);
}

.treatment-card-action-link:hover,
.treatment-card-action-link:focus-visible {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.03);
}

.treatment-card-action-link.is-accent {
  color: #24e39a;
}

.treatment-card-action-link.is-accent:hover,
.treatment-card-action-link.is-accent:focus-visible {
  color: #58f1b4;
}

.treatment-browse-grid[data-view="list"] {
  grid-template-columns: 1fr;
}

.treatment-browse-grid[data-view="list"] .treatment-card-link {
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-rows: auto;
  align-items: start;
  gap: 1rem 1.15rem;
}

.treatment-browse-grid[data-view="list"] .treatment-card-top {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  justify-items: stretch;
}

.treatment-browse-grid[data-view="list"] .treatment-card-body {
  gap: 0.65rem;
}

.treatment-browse-grid[data-view="list"] .treatment-card-summary {
  min-height: 0;
}

.treatment-browse-grid[data-view="list"] .treatment-card-meta {
  border-top: none;
  padding-top: 0.1rem;
  justify-content: flex-end;
  align-self: center;
}

.treatment-browse-grid[data-view="list"] .treatment-card-actions {
  grid-column: 1 / -1;
}

.treatment-browse-empty {
  padding: 2rem;
}

.stats-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 2rem;
}

.admin-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 1.5rem;
}

.stat-value {
  font-size: clamp(2rem, 5vw, 2.6rem);
  font-weight: 800;
}

.badge-row,
.pagination,
.tab-links {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.listing-detail-shell {
  display: grid;
  gap: 0.8rem;
  margin-bottom: 1.25rem;
}

.listing-detail-breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.listing-detail-breadcrumb a {
  color: #79f0b6;
}

.listing-detail-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 1.35rem;
  padding: 1.2rem 1.3rem;
  border-color: rgba(16, 185, 129, 0.2);
  background:
    radial-gradient(circle at top left, rgba(18, 201, 138, 0.055), transparent 38%),
    linear-gradient(180deg, rgba(20, 30, 48, 0.94), rgba(12, 18, 29, 0.98));
}

.listing-detail-hero:hover,
.listing-share-callout:hover,
.listing-stat-card:hover {
  transform: none;
  box-shadow: var(--shadow);
}

.listing-detail-hero-icon {
  width: 86px;
  height: 86px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(18, 201, 138, 0.42);
  color: #24e39a;
  background: transparent;
}

.listing-detail-hero-copy {
  display: grid;
  gap: 0.5rem;
  min-width: 0;
}

.listing-detail-hero-sort {
  align-self: center;
  justify-self: end;
  margin-left: auto;
}

.listing-detail-badge {
  padding: 0.3rem 0.72rem;
  font-size: 0.72rem;
  color: #dbe7f4;
  background: rgba(255, 255, 255, 0.06);
  white-space: nowrap;
  flex: 0 0 auto;
}

.listing-detail-title-row {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.listing-detail-title-row h1 {
  margin: 0;
  font-size: clamp(2rem, 4.2vw, 2.8rem);
}

.listing-detail-title-row svg {
  color: #24e39a;
}

.listing-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
}

.listing-detail-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: #dbe7f4;
  font-size: 0.93rem;
}

.listing-detail-meta-item svg {
  color: #dbe7f4;
}

.listing-detail-shell + .advanced-search-card .advanced-search-summary {
  padding: 1.05rem 1.15rem;
}

.listing-detail-shell + .advanced-search-card .advanced-search-summary-copy h3 {
  font-size: 1rem;
}

.listing-experience-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.listing-experience-toolbar-copy {
  display: grid;
  gap: 0.2rem;
}

.listing-experience-toolbar-copy p {
  margin: 0;
}

.listing-experience-sort {
  min-width: min(100%, 320px);
}

.listing-experience-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.35rem;
}

.listing-experience-card {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  padding: 0;
  overflow: hidden;
  border-color: rgba(16, 185, 129, 0.22);
  background:
    radial-gradient(circle at top left, rgba(18, 201, 138, 0.05), transparent 40%),
    linear-gradient(180deg, rgba(20, 30, 48, 0.95), rgba(11, 18, 30, 0.99));
  box-shadow: 0 16px 32px rgba(2, 6, 23, 0.18);
}

.listing-experience-card:hover,
.listing-experience-card:focus-within {
  transform: translateY(-3px);
  box-shadow: 0 22px 42px rgba(2, 6, 23, 0.22), 0 0 0 1px rgba(18, 201, 138, 0.2);
  border-color: rgba(18, 201, 138, 0.32);
}

.listing-experience-card-body {
  display: grid;
  gap: 0.95rem;
  padding: 1.05rem 1.1rem 1rem;
}

.listing-experience-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.listing-experience-card-heading {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
  flex: 1 1 auto;
  flex-wrap: wrap;
}

.listing-experience-card-badge {
  padding: 0.28rem 0.62rem;
  font-size: 0.72rem;
  color: #7ef1bb;
  background: rgba(18, 201, 138, 0.14);
  border-color: rgba(18, 201, 138, 0.16);
  white-space: nowrap;
  flex: 0 0 auto;
}

.listing-experience-card-menu {
  color: rgba(248, 250, 252, 0.5);
  flex: 0 0 auto;
}

.listing-experience-card-title {
  margin: 0;
  font-size: 1.95rem;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.listing-experience-card-summary {
  margin: 0;
  color: #f8fafc;
  font-size: 1rem;
  line-height: 1.45;
  font-weight: 600;
}

.listing-experience-card-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  padding: 1rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.listing-experience-card-metric {
  display: grid;
  gap: 0.45rem;
}

.listing-experience-card-metric-label {
  color: #4cf0a5;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.listing-experience-card-metric-value,
.listing-experience-card-certainty {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: #f8fafc;
  font-size: 1.55rem;
  font-weight: 800;
  line-height: 1;
}

.listing-experience-card-metric-value .stars {
  display: inline-flex;
  gap: 0.1rem;
}

.listing-experience-card-metric-value .star {
  font-size: 1.15rem;
}

.listing-experience-card-metric-value span:last-child,
.listing-experience-card-certainty span:last-child {
  font-size: 1.05rem;
}

.listing-experience-card-metric p {
  margin: 0;
  color: #a9b8cd;
  font-size: 0.9rem;
  line-height: 1.55;
}

.listing-experience-card-certainty {
  color: #24e39a;
}

.listing-experience-card-detail {
  margin: 0;
  color: #d5e1f0;
  font-size: 0.95rem;
  line-height: 1.68;
}

.listing-experience-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.listing-experience-card-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.3rem 0.58rem;
  border-radius: 10px;
  background: rgba(18, 201, 138, 0.1);
  color: #79f0b6;
  font-size: 0.76rem;
  line-height: 1.2;
}

.listing-experience-card-author {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.listing-experience-card-author-main {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  min-width: 0;
}

.listing-experience-card-author-avatar {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(18, 201, 138, 0.36);
  color: #dce6f3;
  font-size: 0.82rem;
  font-weight: 800;
}

.listing-experience-card-author-copy {
  display: grid;
  gap: 0.12rem;
}

.listing-experience-card-author-copy strong,
.listing-experience-card-author-copy span {
  white-space: nowrap;
}

.listing-experience-card-author-copy span {
  color: #9fb0c8;
  font-size: 0.84rem;
}

.listing-experience-card-author-certainty {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: #dce6f3;
  font-size: 0.84rem;
  white-space: nowrap;
}

.listing-experience-card-author-certainty svg {
  color: #24e39a;
}

.listing-experience-card-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.listing-experience-card-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 1rem 0.9rem;
  color: #dce6f3;
  font-weight: 500;
  transition: background 0.18s ease, color 0.18s ease;
}

.listing-experience-card-action + .listing-experience-card-action {
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.listing-experience-card-action:hover,
.listing-experience-card-action:focus-visible {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.03);
}

.listing-experience-card-action.is-accent {
  color: #24e39a;
}

.listing-experience-card-action.is-accent:hover,
.listing-experience-card-action.is-accent:focus-visible {
  color: #58f1b4;
}

.listing-share-callout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.05rem;
  margin-bottom: 1rem;
  padding: 1.15rem 1.25rem;
  border-color: rgba(16, 185, 129, 0.18);
  background:
    radial-gradient(circle at right center, rgba(18, 201, 138, 0.05), transparent 35%),
    linear-gradient(180deg, rgba(20, 30, 48, 0.92), rgba(12, 18, 29, 0.98));
}

.listing-share-callout-copy {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.listing-share-callout-copy h3,
.listing-share-callout-copy p {
  margin: 0;
}

.listing-share-callout-icon {
  width: 56px;
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(18, 201, 138, 0.34);
  color: #24e39a;
}

.listing-category-row {
  justify-content: flex-start;
  padding-top: 0;
}

.listing-stat-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.35rem;
}

.listing-stat-card-icon {
  width: 60px;
  height: 60px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(18, 201, 138, 0.3);
  color: #24e39a;
}

.listing-stat-card-copy {
  display: grid;
  gap: 0.08rem;
  text-align: left;
}

.feed-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.035);
}

.feed-toolbar-copy {
  display: grid;
  gap: 0.35rem;
}

.feed-toolbar-copy p {
  margin: 0;
}

.feed-sort-form {
  display: grid;
  gap: 0.45rem;
  min-width: min(100%, 320px);
}

.feed-sort-form label {
  color: #ff8f00;
  font-weight: 700;
}

.feed-sort-summary-mobile {
  display: none;
  margin: 0;
}

.feed-sort-controls {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.feed-sort-controls select {
  min-width: 210px;
}

.feed-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.35rem;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
}

.feed-arrow {
  min-width: 130px;
}

.feed-arrow.is-disabled {
  pointer-events: none;
  opacity: 0.45;
}

.feed-page-status {
  color: var(--muted);
  font-weight: 700;
  text-align: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.badge:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--foreground);
  border-color: rgba(255, 255, 255, 0.2);
}

.badge.badge-active,
.badge-active {
  background: var(--primary);
  color: var(--foreground);
  border-color: var(--primary);
  font-weight: 500;
  box-shadow: 0 0 15px rgba(29, 185, 114, 0.2);
}

.badge-subtle {
  background: rgba(255, 255, 255, 0.06);
}

.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.auth-wrap {
  width: min(460px, 100%);
}

.auth-card {
  display: grid;
  gap: 1.25rem;
}

.auth-callout {
  display: grid;
  gap: 0.4rem;
  padding: 1rem 1.1rem;
  border-radius: 16px;
  border: 1px solid rgba(16, 185, 129, 0.22);
  background: rgba(16, 185, 129, 0.08);
}

.auth-callout p {
  margin: 0;
}

.auth-divider {
  position: relative;
  text-align: center;
  color: var(--muted);
  font-size: 0.92rem;
  margin: 0.15rem 0;
}

.auth-divider::before {
  content: "";
  position: absolute;
  inset: 50% 0 auto 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-divider span {
  position: relative;
  display: inline-block;
  padding: 0 0.85rem;
  background: rgba(13, 19, 31, 0.96);
}

.auth-secondary-button {
  width: 100%;
}

.auth-links {
  display: grid;
  gap: 0.7rem;
  text-align: center;
}

.page-back {
  margin-bottom: 1rem;
}

.stack-form {
  display: grid;
  gap: 1rem;
}

.stack-form label {
  display: grid;
  gap: 0.5rem;
  color: #e5e7eb;
  font-weight: 600;
}

.form-card .stack-form {
  gap: 1.45rem;
}

.form-card .stack-form label {
  gap: 0.7rem;
}

.form-card form[data-advanced-form] label {
  color: #ff8f00;
}

.form-card form[data-advanced-form] > label,
.form-card form[data-advanced-form] > .field-group,
.form-card form[data-advanced-form] > .two-col > label,
.form-card form[data-advanced-form] > .two-col > .side-effect-entry-card,
.form-card form[data-advanced-form] .field-group > .two-col > .side-effect-entry-card,
.form-card form[data-advanced-form] .advanced-panel-inner > label,
.form-card form[data-advanced-form] .advanced-panel-inner > .two-col > label,
.form-card form[data-advanced-form] .advanced-entry-card > label,
.form-card form[data-advanced-form] .advanced-entry-card .advanced-entry-grid > label {
  padding: 1rem 1.05rem;
  border: 1px solid rgba(255, 143, 0, 0.18);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.025));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.form-card form[data-advanced-form] > label:focus-within,
.form-card form[data-advanced-form] > .field-group:focus-within,
.form-card form[data-advanced-form] > .two-col > label:focus-within,
.form-card form[data-advanced-form] > .two-col > .side-effect-entry-card:focus-within,
.form-card form[data-advanced-form] .field-group > .two-col > .side-effect-entry-card:focus-within,
.form-card form[data-advanced-form] .advanced-panel-inner > label:focus-within,
.form-card form[data-advanced-form] .advanced-panel-inner > .two-col > label:focus-within,
.form-card form[data-advanced-form] .advanced-entry-card > label:focus-within,
.form-card form[data-advanced-form] .advanced-entry-card .advanced-entry-grid > label:focus-within {
  border-color: rgba(255, 143, 0, 0.35);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.035));
  box-shadow: 0 0 0 1px rgba(255, 143, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.field-group {
  display: grid;
  gap: 0.8rem;
}

.field-group-title {
  color: #ff8f00;
  font-weight: 700;
}

.ailment-entry-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.ailment-entry-card,
.ailment-rating-card {
  display: grid;
  gap: 0.9rem;
}

.side-effect-entry-card {
  display: grid;
  gap: 0.9rem;
  align-content: start;
  overflow: visible;
}

.form-card form[data-advanced-form] .side-effect-entry-card {
  padding: 1rem 1.05rem;
  border: 1px solid rgba(255, 143, 0, 0.18);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.025));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.form-card form[data-advanced-form] .side-effect-entry-card:focus-within {
  border-color: rgba(255, 143, 0, 0.35);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.035));
  box-shadow: 0 0 0 1px rgba(255, 143, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.side-effect-severity-group {
  display: grid;
  gap: 0.75rem;
  overflow: visible;
}

.side-effect-severity-heading {
  display: block;
  color: #ff8f00;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.5;
  padding-top: 0.4625rem;
  text-transform: uppercase;
}

.side-effect-severity-options {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.35rem;
  align-items: start;
}

.side-effect-severity-option {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0.3rem;
  min-width: 0;
  width: 100%;
  padding: 0.1rem 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 400;
  text-align: center;
  cursor: pointer;
}

.side-effect-severity-option input {
  appearance: none;
  -webkit-appearance: none;
  width: 0.95rem;
  height: 0.95rem;
  margin: 0;
  margin-inline: auto;
  padding: 0;
  border: 1px solid rgba(255, 143, 0, 0.55);
  border-radius: 3px;
  background: transparent;
  box-shadow: none;
  flex: 0 0 auto;
}

.side-effect-severity-option span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1.15;
  color: #ffffff;
  font-weight: 400;
  width: 100%;
}

.side-effect-severity-option input:checked {
  background: #ff8f00;
  border-color: #ff8f00;
}

.side-effect-severity-option input:checked + span {
  color: #ff8f00;
}

.form-card form[data-advanced-form] .ailment-entry-card {
  padding: 1rem 1.05rem;
  border: 1px solid rgba(255, 143, 0, 0.18);
  border-radius: 16px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.055));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.form-card form[data-advanced-form] .ailment-entry-card:focus-within {
  border-color: rgba(255, 143, 0, 0.35);
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.028), rgba(255, 255, 255, 0.07));
  box-shadow: 0 0 0 1px rgba(255, 143, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.advanced-toggle-wrap {
  display: grid;
  gap: 0.7rem;
}

.advanced-toggle-button {
  justify-self: start;
  border-color: #c2410c;
  background: linear-gradient(135deg, #fb923c 0%, #ea580c 100%);
  color: #fff;
}

.advanced-toggle-button:hover {
  background: linear-gradient(135deg, #fdba74 0%, #f97316 100%);
  box-shadow: 0 15px 30px rgba(249, 115, 22, 0.25);
}

.advanced-draft-status {
  min-height: 1.4rem;
}

.advanced-panel {
  display: block;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transform: translateY(-0.35rem);
  transition: max-height 0.28s ease, opacity 0.28s ease, transform 0.28s ease;
}

.advanced-panel[hidden] {
  display: none;
}

.advanced-panel.advanced-panel-open {
  max-height: 5000px;
  opacity: 1;
  transform: translateY(0);
}

.advanced-panel-inner {
  display: grid;
  gap: 1.15rem;
  padding: 1.25rem;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.advanced-panel-heading {
  display: grid;
  gap: 0.4rem;
}

.advanced-panel-heading p {
  margin: 0;
}

.advanced-entry-list {
  display: grid;
  gap: 1rem;
}

.advanced-entry-card {
  display: grid;
  gap: 1rem;
}

.advanced-entry-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.advanced-entry-title {
  margin: 0;
}

.advanced-entry-grid {
  align-items: start;
}

.advanced-actions {
  display: flex;
  justify-content: flex-start;
}

.profile-settings-grid {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}

.profile-avatar-card,
.profile-password-card {
  display: grid;
  gap: 1rem;
}

.profile-avatar-preview-wrap {
  display: flex;
  justify-content: center;
}

.profile-avatar-preview,
.profile-avatar-fallback {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow);
}

.profile-avatar-preview {
  object-fit: cover;
  display: block;
}

.profile-avatar-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 2.4rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.95), rgba(4, 120, 87, 0.9));
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 500;
}

.checkbox-row input {
  width: auto;
}

.input-help {
  font-size: 0.92rem;
  line-height: 1.5;
}

.suggestion-warning {
  color: #fde68a;
  display: block;
  padding: 0.45rem 0.7rem;
  border-radius: 12px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.24);
  white-space: normal;
  overflow-wrap: anywhere;
}

.autocomplete-field {
  position: relative;
}

.autocomplete-menu {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  right: 0;
  z-index: 20;
  display: grid;
  gap: 0.2rem;
  padding: 0.4rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(7, 11, 20, 0.96);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.autocomplete-option {
  text-align: left;
  padding: 0.7rem 0.85rem;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--foreground);
  cursor: pointer;
}

.autocomplete-option:hover,
.autocomplete-option:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  outline: none;
}

input,
select,
textarea {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--foreground);
  padding: 0.85rem 1rem;
}

select option {
  color: #0f172a;
  background: #ffffff;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(16, 185, 129, 0.35);
  outline-offset: 1px;
}

input[aria-invalid="true"],
select[aria-invalid="true"],
textarea[aria-invalid="true"] {
  border-color: rgba(239, 68, 68, 0.8);
}

textarea {
  resize: vertical;
}

.two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.range-output {
  color: var(--primary);
  font-size: 1.2rem;
  font-weight: 800;
  text-align: center;
}

.star-rating {
  display: grid;
  gap: 0.65rem;
}

.star-rating-buttons {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.star-rating-button {
  position: relative;
  width: 2.4rem;
  height: 2.4rem;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
}

.star-rating-button:focus-visible {
  outline: 2px solid rgba(16, 185, 129, 0.45);
  outline-offset: 3px;
  border-radius: 10px;
}

.star-rating-base,
.star-rating-fill {
  display: block;
  font-size: 2rem;
  line-height: 1;
}

.star-rating-base {
  color: rgba(255, 255, 255, 0.18);
}

.star-rating-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  overflow: hidden;
  color: #fbbf24;
}

.star-rating-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.star-rating-meta .star-rating-buttons {
  flex: 0 1 auto;
}

.inline-range-input-group {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.inline-value-input {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  width: auto;
  color: #ff8f00;
  font-weight: 700;
}

.inline-value-input input {
  width: 4.5rem;
  min-width: 0;
  padding: 0.55rem 0.7rem;
  text-align: center;
}

.inline-value-input-percent input {
  width: 5rem;
}

.inline-value-input span {
  color: #ff8f00;
  font-weight: 700;
}

.form-card form[data-advanced-form] input[type="range"][data-range-output="certainty-output"],
.form-card form[data-advanced-form] input[type="range"][data-range-output^="ailment-certainty-output-"] {
  width: min(100%, 13rem);
  justify-self: start;
  appearance: none;
  -webkit-appearance: none;
  height: 1.5rem;
  background: transparent;
}

.form-card form[data-advanced-form] input[type="range"][data-range-output="certainty-output"]::-webkit-slider-runnable-track,
.form-card form[data-advanced-form] input[type="range"][data-range-output^="ailment-certainty-output-"]::-webkit-slider-runnable-track {
  height: 0.75rem;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255, 143, 0, 0.9), rgba(234, 88, 12, 0.95));
}

.form-card form[data-advanced-form] input[type="range"][data-range-output="certainty-output"]::-webkit-slider-thumb,
.form-card form[data-advanced-form] input[type="range"][data-range-output^="ailment-certainty-output-"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 1.35rem;
  height: 1.35rem;
  margin-top: -0.3rem;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  background: #fff7ed;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.form-card form[data-advanced-form] input[type="range"][data-range-output="certainty-output"]::-moz-range-track,
.form-card form[data-advanced-form] input[type="range"][data-range-output^="ailment-certainty-output-"]::-moz-range-track {
  height: 0.75rem;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255, 143, 0, 0.9), rgba(234, 88, 12, 0.95));
}

.form-card form[data-advanced-form] input[type="range"][data-range-output="certainty-output"]::-moz-range-thumb,
.form-card form[data-advanced-form] input[type="range"][data-range-output^="ailment-certainty-output-"]::-moz-range-thumb {
  width: 1.35rem;
  height: 1.35rem;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  background: #fff7ed;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.detail-block {
  padding: 1.2rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 1rem;
}

.detail-block h2 {
  margin-bottom: 0.4rem;
}

.detail-info-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 1fr);
  gap: 1rem;
  align-items: start;
}

.detail-summary-list {
  display: grid;
  gap: 0.75rem;
}

.detail-summary-card {
  padding: 0.95rem 1rem;
}

.detail-summary-card p {
  margin: 0;
}

.detail-summary-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.detail-summary-head h2,
.detail-summary-head h3 {
  margin: 0;
}

.detail-summary-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.detail-quickfacts-card {
  align-self: stretch;
}

.detail-quickfacts-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem 0.9rem;
}

.detail-quickfacts-list > div {
  display: grid;
  gap: 0.2rem;
  align-content: start;
}

.detail-quickfacts-list .card-side-label,
.detail-summary-head .card-side-label {
  text-align: left;
}

.detail-top {
  gap: 0.75rem;
}

.detail-main {
  flex: 1 1 100%;
}

.disclaimer {
  margin-top: 1rem;
  padding: 1rem 1.2rem;
  border-color: rgba(245, 158, 11, 0.28);
  background: rgba(245, 158, 11, 0.08);
  color: #fde68a;
}

.comments-section {
  margin-top: 1.8rem;
  padding-top: 1.4rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.comment-card {
  padding: 1rem 1.15rem;
}

.button-link {
  background: transparent;
  border: 0;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
}

.danger-link {
  color: #fda4af;
}

.stars {
  display: inline-flex;
  gap: 0.08rem;
  vertical-align: middle;
}

.star {
  color: rgba(255, 255, 255, 0.18);
}

.star.filled,
.star.half {
  color: #fbbf24;
}

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

.flash-wrap {
  margin-top: 1rem;
}

.flash {
  padding: 0.95rem 1rem;
}

.flash-success {
  border-color: rgba(16, 185, 129, 0.35);
  background: rgba(16, 185, 129, 0.12);
}

.flash-error {
  border-color: rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.12);
}

.pulse-glow {
  box-shadow: 0 0 22px rgba(16, 185, 129, 0.28);
}

.wide-gap {
  margin: 1.5rem 0;
}

@media (max-width: 1100px) {
  .treatment-browse-header {
    align-items: start;
  }

  .treatment-browse-header-actions {
    width: 100%;
    justify-content: space-between;
  }

  .treatment-category-row {
    gap: 0.7rem;
  }

  .controls-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .advanced-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-settings-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .treatment-browse-header-actions {
    align-items: center;
    justify-content: stretch;
    gap: 0.7rem;
    flex-wrap: nowrap;
  }

  .treatment-browse-sort-form {
    width: min(100%, 280px);
    justify-content: space-between;
    padding: 0.2rem 0.3rem 0.2rem 0.7rem;
  }

  .treatment-browse-sort-form select {
    min-width: 0;
    flex: 1;
    padding: 0.65rem 2.1rem 0.65rem 0.75rem;
  }

  .treatment-view-toggle {
    align-self: stretch;
    flex: 0 0 auto;
  }

  .treatment-category-slider {
    gap: 0.55rem;
  }

  .treatment-category-row {
    gap: 0.55rem;
  }

  .treatment-category-chip {
    flex: 0 0 auto;
    padding: 0.65rem 0.78rem;
    border-radius: 14px;
  }

  .treatment-category-chip {
    gap: 0.5rem;
  }

  .treatment-category-chip .treatment-category-chip-label {
    font-size: 0.86rem;
    white-space: nowrap;
  }

  .treatment-category-chip .treatment-category-chip-count {
    min-width: 1.45rem;
    font-size: 0.72rem;
  }

  .treatment-category-arrow {
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }

  .treatment-browse-grid[data-view="list"] .treatment-card-link {
    grid-template-columns: 1fr;
  }

  .treatment-browse-grid[data-view="list"] .treatment-card-top,
  .treatment-browse-grid[data-view="list"] .treatment-card-meta {
    justify-content: space-between;
  }

  .treatment-browse-grid[data-view="list"] .treatment-card-meta {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 0.85rem;
    justify-content: flex-start;
  }

  .nav-inner {
    align-items: center;
    grid-template-columns: 1fr auto 1fr;
    gap: 0.65rem 0.75rem;
  }

  .nav-mobile-tools {
    display: none;
  }

  .nav-toggle {
    display: none;
  }

  .brand {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
    text-align: left;
  }

  .nav-profile-wrapper {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
  }

  .nav-links {
    display: grid;
    position: static;
    grid-column: 1 / -1;
    grid-row: 2;
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 0.65rem;
    padding: 0;
    border: none;
    background: none;
    backdrop-filter: none;
    box-shadow: none;
  }

  .nav-links.nav-open {
    display: grid;
  }

  .nav-primary-links {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0.7rem 1rem;
    flex-wrap: wrap;
    width: 100%;
    padding-top: 0;
  }

  .nav-link {
    width: auto;
    padding: 0.2rem 0 0.55rem;
    text-align: center;
  }

  .nav-link::after {
    left: 50%;
    width: 1.8rem;
  }

  .nav-home-tools {
    width: min(100%, 32rem);
    max-width: 32rem;
    margin-inline: auto;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 0.55rem;
    padding-top: 0;
    border-top: none;
  }

  .nav-search-form {
    flex: 0 1 23rem;
    width: min(100%, 23rem);
    min-width: 0;
  }

  .nav-search-input {
    width: 100%;
  }

  .nav-advanced-link {
    flex: 0 0 auto;
    font-size: 0.86rem;
  }

  .nav-profile-dropdown {
    width: min(260px, calc(100vw - 1rem));
  }

  .controls-grid,
  .card-grid,
  .advanced-summary-grid,
  .stats-grid,
  .admin-stats,
  .two-col,
  .ailment-entry-grid,
  .detail-heading-grid,
  .detail-summary-grid,
  .detail-info-grid {
    grid-template-columns: 1fr;
  }

  .feed-toolbar,
  .feed-pagination,
  .feed-sort-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .detail-actions {
    width: 100%;
    justify-content: stretch;
  }

  .detail-quickfacts-list {
    grid-template-columns: 1fr;
  }

  .feed-sort-form {
    min-width: 0;
    width: 100%;
  }

  .feed-toolbar-home .feed-count-summary {
    display: none;
  }

  .feed-sort-form-home {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: nowrap;
  }

  .feed-sort-form-home label {
    white-space: nowrap;
  }

  .feed-sort-form-home .feed-sort-controls {
    flex: 1 1 auto;
  }

  .feed-sort-form-home .feed-sort-summary-mobile {
    display: block;
    flex: 0 0 auto;
    white-space: nowrap;
    font-size: 0.82rem;
  }

  .feed-sort-controls select,
  .feed-arrow {
    min-width: 0;
    width: 100%;
  }

  .feed-sort-form-home .feed-sort-controls select {
    width: 100%;
  }

  .advanced-search-summary,
  .advanced-search-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .advanced-search-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .advanced-search-card {
    scroll-margin-top: 11.5rem;
  }

  .treatment-browse-header-copy h2 {
    font-size: 1.8rem;
  }

  .treatment-browse-header-actions {
    gap: 0.55rem;
  }

  .treatment-browse-sort-form {
    width: min(100%, 235px);
  }

  .treatment-browse-sort-form label {
    font-size: 0.84rem;
  }

  .treatment-browse-sort-form select {
    font-size: 0.92rem;
  }

  .treatment-view-button {
    width: 38px;
    height: 38px;
  }

  .treatment-category-chip {
    padding: 0.6rem 0.72rem;
  }

  .treatment-category-chip .treatment-category-chip-icon,
  .treatment-category-chip .treatment-category-chip-icon {
    width: 20px;
    height: 20px;
  }

  .treatment-card-link {
    padding: 1rem 1rem 0.9rem;
  }

  .treatment-card-icon {
    width: 48px;
    height: 48px;
  }

  .treatment-card-top {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .treatment-card-title {
    font-size: 1.02rem;
  }

  .treatment-card-meta {
    gap: 0.45rem 0.7rem;
  }

  .treatment-card-meta-divider {
    display: none;
  }

  .container {
    width: min(var(--max), calc(100% - 1rem));
  }

  .advanced-search-grid {
    grid-template-columns: 1fr;
  }


  .nav-inner {
    gap: 0.55rem 0.65rem;
    grid-template-columns: 1fr auto 1fr;
  }

  .brand {
    font-size: 1.2rem;
  }

  .nav-primary-links {
    gap: 0.5rem 0.8rem;
  }

  .nav-link {
    font-size: 0.82rem;
  }

  .nav-home-tools {
    gap: 0.45rem;
  }

  .nav-search-form {
    flex-basis: 20rem;
    width: min(100%, 20rem);
  }

  .nav-profile-icon {
    min-height: 44px;
    padding-right: 0.45rem;
  }

  .nav-profile-badge {
    width: 34px;
    height: 34px;
  }

  .nav-search-input input {
    min-height: 42px;
    padding: 0.72rem 2.7rem 0.72rem 0.9rem;
    font-size: 0.88rem;
  }

  .nav-search-submit {
    width: 34px;
    height: 34px;
  }

  .card {
    padding: 1rem;
  }

  .button,
  .button-outline,
  .button-ghost,
  .button-danger {
    width: 100%;
  }

  .action-row > * {
    flex: 1 1 100%;
  }

  .star-rating-buttons {
    gap: 0.15rem;
  }

  .star-rating-button {
    width: 2.85rem;
    height: 2.85rem;
  }

  .star-rating-base,
  .star-rating-fill {
    font-size: 2.35rem;
  }

  .form-card form[data-advanced-form] input[type="range"][data-range-output="certainty-output"],
  .form-card form[data-advanced-form] input[type="range"][data-range-output^="ailment-certainty-output-"] {
    width: min(100%, 14.85rem);
  }

  .inline-range-input-group {
    align-items: flex-start;
  }

  .side-effect-severity-options {
    gap: 0.3rem;
  }

  .side-effect-severity-option {
    padding: 0.1rem 0;
    font-size: 0.78rem;
  }
}

@media (max-width: 1100px) {
  .listing-experience-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .listing-detail-hero {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .listing-detail-hero-sort {
    width: 100%;
    justify-self: stretch;
    margin-left: 0;
  }

  .listing-detail-hero-icon {
    width: 72px;
    height: 72px;
  }

  .listing-experience-toolbar,
  .listing-share-callout,
  .listing-stat-card {
    align-items: stretch;
  }

  .listing-experience-toolbar,
  .listing-share-callout {
    flex-direction: column;
  }

  .listing-experience-sort {
    width: 100%;
  }

  .listing-experience-card-title {
    font-size: 1.7rem;
  }

  .listing-experience-card-metrics {
    grid-template-columns: 1fr;
  }

  .listing-experience-card-author {
    flex-direction: column;
    align-items: flex-start;
  }

  .listing-share-callout-copy {
    align-items: flex-start;
  }

  .listing-stat-card {
    flex-direction: column;
    text-align: center;
  }

  .listing-stat-card-copy {
    text-align: center;
  }
}

@media (max-width: 640px) {
  .listing-detail-title-row {
    flex-wrap: wrap;
  }

  .listing-detail-title-row h1 {
    font-size: 2rem;
  }

  .listing-detail-summary {
    font-size: 0.95rem;
  }

  .listing-detail-meta {
    gap: 0.7rem;
  }

  .listing-detail-meta-item {
    font-size: 0.88rem;
  }

  .listing-experience-card-body {
    padding: 0.95rem 0.95rem 0.9rem;
  }

  .listing-experience-card-summary {
    font-size: 0.96rem;
  }

  .listing-experience-card-metric-value,
  .listing-experience-card-certainty {
    font-size: 1.3rem;
  }

  .listing-experience-card-actions {
    grid-template-columns: 1fr;
  }

  .listing-experience-card-action + .listing-experience-card-action {
    border-left: none;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }
}
