:root {
  --paper: #f5f1e8;
  --paper-deep: #ebe5d8;
  --surface: rgba(255, 253, 248, 0.92);
  --white: #fffefa;
  --ink: #172522;
  --ink-soft: #43534f;
  --muted: #74807c;
  --line: #dcd8cc;
  --teal: #087f70;
  --teal-dark: #05655a;
  --teal-pale: #dcefe9;
  --orange: #e86f45;
  --orange-pale: #f9dfd4;
  --yellow: #f4c95d;
  --danger: #bd3f38;
  --shadow-sm: 0 8px 24px rgba(40, 51, 47, 0.08);
  --shadow-lg: 0 24px 70px rgba(40, 51, 47, 0.14);
  --radius-sm: 12px;
  --radius: 20px;
  --radius-lg: 32px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--paper);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: "Manrope", "Avenir Next", sans-serif;
  background:
    linear-gradient(rgba(23, 37, 34, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 37, 34, 0.025) 1px, transparent 1px),
    var(--paper);
  background-size: 38px 38px;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

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

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2 {
  letter-spacing: -0.035em;
}

h1 {
  font-family: "DM Serif Display", Georgia, serif;
  font-weight: 400;
}

h2,
h3 {
  margin-bottom: 0;
}

.hidden {
  display: none !important;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
}

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

.eyebrow {
  margin-bottom: 0.4rem;
  color: var(--teal);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.ambient {
  position: fixed;
  z-index: -1;
  width: 32rem;
  height: 32rem;
  border-radius: 50%;
  filter: blur(3px);
  opacity: 0.42;
  pointer-events: none;
}

.ambient-one {
  top: -14rem;
  right: -9rem;
  background: radial-gradient(circle, rgba(232, 111, 69, 0.3), transparent 68%);
}

.ambient-two {
  bottom: -16rem;
  left: 5%;
  background: radial-gradient(circle, rgba(8, 127, 112, 0.22), transparent 68%);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.wordmark > span:last-child > span {
  color: var(--teal);
}

.brand-mark {
  display: inline-grid;
  width: 2.25rem;
  height: 2.25rem;
  place-items: center;
  border-radius: 11px 11px 11px 3px;
  color: var(--white);
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 1.6rem;
  font-weight: 400;
  background: var(--teal);
  box-shadow: 0 8px 18px rgba(8, 127, 112, 0.22);
}

.button {
  display: inline-flex;
  min-height: 2.85rem;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.7rem 1.05rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-weight: 800;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button:disabled {
  cursor: wait;
  opacity: 0.6;
  transform: none;
}

.button-primary {
  color: #fff;
  background: var(--teal);
  box-shadow: 0 10px 22px rgba(8, 127, 112, 0.18);
}

.button-primary:hover {
  background: var(--teal-dark);
}

.button-ink {
  color: var(--white);
  background: var(--ink);
}

.button-light {
  color: var(--ink);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.button-ghost {
  border-color: var(--line);
  color: var(--ink);
  background: transparent;
}

.button-danger {
  color: #fff;
  background: var(--danger);
}

.button-large {
  min-height: 3.35rem;
}

.compact {
  min-height: 2.4rem;
  padding: 0.48rem 0.85rem;
  font-size: 0.8rem;
}

.text-button,
.icon-button,
.link-button {
  border: 0;
  color: var(--teal);
  font-weight: 800;
  background: transparent;
  cursor: pointer;
}

.link-button {
  justify-self: start;
  margin-top: -0.4rem;
  padding: 0;
  color: var(--teal);
  font-size: 0.72rem;
  font-weight: 800;
  background: transparent;
  cursor: pointer;
}

.text-button {
  padding: 0.4rem;
}

.icon-button {
  display: inline-grid;
  width: 2.55rem;
  height: 2.55rem;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  background: var(--white);
}

.danger-icon,
.danger-text {
  color: var(--danger);
}

label {
  display: grid;
  gap: 0.45rem;
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  outline: none;
  color: var(--ink);
  background: rgba(255, 254, 250, 0.88);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

input,
select {
  min-height: 3rem;
  padding: 0 0.9rem;
}

textarea {
  padding: 0.85rem 0.9rem;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(8, 127, 112, 0.1);
}

input::placeholder,
textarea::placeholder {
  color: #a4aaa6;
}

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

.field-pair {
  display: grid;
  grid-template-columns: 0.75fr 1.25fr;
  gap: 0.8rem;
}

.form-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.6;
}

.oauth-area {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.2rem;
  text-align: center;
}

.oauth-area > span {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--muted);
  font-size: 0.66rem;
}

.oauth-area > span::before,
.oauth-area > span::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--line);
}

.oauth-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}

.legal-mini {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem;
  color: var(--muted);
  font-size: 0.62rem;
}

.legal-mini a:hover {
  color: var(--teal);
}

.auth-page {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(25rem, 1.06fr) minmax(26rem, 0.94fr);
}

.auth-brand {
  position: relative;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: 3.2rem 4.5rem;
  color: #f9f7f1;
  background:
    radial-gradient(circle at 78% 22%, rgba(244, 201, 93, 0.24), transparent 26%),
    linear-gradient(145deg, #173e38, #0a655b 58%, #087f70);
}

.auth-brand::after {
  content: "";
  position: absolute;
  right: -5rem;
  bottom: -8rem;
  width: 27rem;
  height: 27rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50% 50% 36% 64%;
  box-shadow:
    0 0 0 3.5rem rgba(255, 255, 255, 0.035),
    0 0 0 7rem rgba(255, 255, 255, 0.025);
  transform: rotate(19deg);
}

.auth-brand .brand-mark {
  color: var(--teal);
  background: var(--white);
}

.auth-story {
  position: relative;
  z-index: 1;
  max-width: 42rem;
}

.auth-story .eyebrow {
  color: #9edacf;
}

.auth-story h1 {
  max-width: 38rem;
  margin-bottom: 1.3rem;
  font-size: clamp(3.2rem, 5.3vw, 6rem);
  line-height: 0.98;
}

.auth-story > p:not(.eyebrow) {
  max-width: 35rem;
  color: rgba(255, 255, 255, 0.76);
  font-size: 1.05rem;
  line-height: 1.75;
}

.promise-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 2rem;
}

.promise-list span {
  padding: 0.62rem 0.86rem;
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.07);
}

.auth-footnote {
  position: relative;
  z-index: 1;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.72rem;
}

.auth-panel {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  justify-content: center;
  padding: 4rem clamp(2rem, 7vw, 7rem);
  background: rgba(255, 253, 248, 0.8);
  backdrop-filter: blur(20px);
}

.mobile-wordmark {
  display: none;
}

.auth-copy {
  margin-bottom: 1.6rem;
}

.auth-copy h2 {
  margin-bottom: 0.45rem;
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 2.4rem;
  font-weight: 400;
}

.auth-copy > p:last-child {
  color: var(--muted);
}

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.3rem;
  margin-bottom: 1.5rem;
  padding: 0.3rem;
  border-radius: 14px;
  background: var(--paper-deep);
}

.segmented button {
  min-height: 2.7rem;
  border: 0;
  border-radius: 10px;
  color: var(--muted);
  font-weight: 800;
  background: transparent;
  cursor: pointer;
}

.segmented button.active {
  color: var(--ink);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.public-page {
  min-height: 100vh;
  padding: 1.5rem;
}

.public-header {
  display: flex;
  max-width: 74rem;
  align-items: center;
  justify-content: space-between;
  margin: 0 auto;
  padding: 0.8rem 0;
}

.public-main {
  display: grid;
  max-width: 64rem;
  min-height: calc(100vh - 8rem);
  grid-template-columns: 0.85fr 1.15fr;
  align-items: center;
  gap: 2rem;
  margin: 0 auto;
  padding: 3rem 0;
}

.public-profile {
  padding: 2rem;
}

.public-profile h1 {
  margin: 1.4rem 0 0.2rem;
  font-size: clamp(2.4rem, 5vw, 4.4rem);
  line-height: 1;
}

.public-profile .profile-bio {
  margin-top: 1.3rem;
}

.public-inbox {
  display: grid;
  gap: 1.4rem;
  padding: clamp(1.5rem, 4vw, 3rem);
  border: 1px solid rgba(8, 127, 112, 0.14);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}

.public-inbox h2 {
  max-width: 28rem;
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 2.5rem;
  font-weight: 400;
}

.composer {
  display: grid;
  gap: 0.7rem;
}

.composer textarea {
  min-height: 8rem;
  border: 0;
  background: var(--paper);
}

.composer-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.7rem;
}

.public-thread {
  display: grid;
  max-height: 18rem;
  gap: 0.65rem;
  overflow-y: auto;
  padding: 0.8rem;
  border-radius: var(--radius);
  background: var(--paper);
}

.presence-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--teal);
  font-size: 0.74rem;
  font-weight: 800;
}

.presence-label::before {
  content: "";
  width: 0.52rem;
  height: 0.52rem;
  border-radius: 50%;
  background: currentColor;
}

.handle {
  color: var(--teal);
  font-weight: 700;
}

.profile-meta {
  margin: 0.8rem 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.profile-bio {
  color: var(--ink-soft);
  line-height: 1.75;
  white-space: pre-line;
}

.avatar {
  position: relative;
  display: inline-grid;
  width: 3rem;
  height: 3rem;
  flex: 0 0 auto;
  place-items: center;
  overflow: hidden;
  border-radius: 35% 35% 35% 12%;
  color: var(--teal-dark);
  font-weight: 800;
  background: var(--teal-pale);
}

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

.avatar-small {
  width: 2.4rem;
  height: 2.4rem;
}

.avatar-hero {
  width: 7.5rem;
  height: 7.5rem;
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 3rem;
}

.avatar-online::after {
  content: "";
  position: absolute;
  right: 0.22rem;
  bottom: 0.22rem;
  width: 0.7rem;
  height: 0.7rem;
  border: 2px solid var(--white);
  border-radius: 50%;
  background: #20a96b;
}

.app-view {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  z-index: 20;
  top: 0;
  bottom: 0;
  left: 0;
  display: flex;
  width: 17rem;
  flex-direction: column;
  padding: 1.8rem 1.3rem 1.3rem;
  border-right: 1px solid rgba(23, 37, 34, 0.08);
  background: rgba(255, 253, 248, 0.9);
  backdrop-filter: blur(24px);
}

.sidebar-brand {
  padding: 0 0.7rem;
}

.main-nav {
  display: grid;
  gap: 0.28rem;
  margin-top: 2.4rem;
}

.nav-item {
  position: relative;
  display: flex;
  min-height: 3rem;
  align-items: center;
  gap: 0.85rem;
  padding: 0 0.85rem;
  border: 0;
  border-radius: 13px;
  color: var(--muted);
  font-weight: 700;
  text-align: left;
  background: transparent;
  cursor: pointer;
}

.nav-item:hover,
.nav-item.active {
  color: var(--ink);
  background: var(--teal-pale);
}

.nav-item.active::before {
  content: "";
  position: absolute;
  left: 0;
  width: 3px;
  height: 1.3rem;
  border-radius: 4px;
  background: var(--teal);
}

.nav-icon {
  display: inline-grid;
  width: 1.45rem;
  height: 1.45rem;
  place-items: center;
  font-size: 1.1rem;
}

.nav-badge {
  min-width: 1.3rem;
  margin-left: auto;
  padding: 0.12rem 0.35rem;
  border-radius: 999px;
  color: #fff;
  font-size: 0.64rem;
  text-align: center;
  background: var(--orange);
}

.sidebar-offer {
  margin-top: auto;
  padding: 1.05rem;
  border: 1px solid rgba(232, 111, 69, 0.2);
  border-radius: 16px;
  background: var(--orange-pale);
}

.sidebar-offer .offer-kicker {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--orange);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sidebar-offer strong {
  font-size: 0.86rem;
}

.sidebar-offer p {
  margin: 0.35rem 0 0;
  color: #805342;
  font-size: 0.68rem;
  line-height: 1.5;
}

.account-mini {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-top: 0.75rem;
  padding: 0.7rem;
  border: 0;
  border-radius: 14px;
  text-align: left;
  background: transparent;
  cursor: pointer;
}

.account-mini:hover {
  background: var(--paper);
}

.account-mini > span:last-child {
  display: grid;
  min-width: 0;
}

.account-mini strong,
.account-mini small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-mini strong {
  font-size: 0.78rem;
}

.account-mini small {
  color: var(--muted);
  font-size: 0.62rem;
}

.workspace {
  min-height: 100vh;
  margin-left: 17rem;
  padding: 2rem clamp(1.5rem, 4vw, 4rem) 5rem;
}

.workspace-header {
  display: flex;
  max-width: 84rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 auto 2rem;
}

.workspace-header h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.7rem);
  line-height: 1;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.connection-status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
}

.connection-status::before {
  content: "";
  width: 0.48rem;
  height: 0.48rem;
  border-radius: 50%;
  background: var(--yellow);
}

.connection-status.online::before {
  background: #20a96b;
}

.app-section {
  max-width: 84rem;
  margin: 0 auto;
  animation: section-in 260ms ease both;
}

@keyframes section-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.discover-hero {
  position: relative;
  display: flex;
  min-height: 12rem;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
  overflow: hidden;
  padding: 2rem;
  border-radius: var(--radius-lg);
  color: #fff;
  background:
    radial-gradient(circle at 82% 20%, rgba(244, 201, 93, 0.52), transparent 22%),
    linear-gradient(125deg, #173e38, var(--teal));
  box-shadow: var(--shadow-lg);
}

.discover-hero::after {
  content: "";
  position: absolute;
  top: -6rem;
  right: 10%;
  width: 15rem;
  height: 15rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 44% 56% 54% 46%;
}

.discover-hero > * {
  position: relative;
  z-index: 1;
}

.discover-hero h2 {
  max-width: 38rem;
  margin-top: 1rem;
  font-family: "DM Serif Display", Georgia, serif;
  font-size: clamp(2rem, 4vw, 3.4rem);
  font-weight: 400;
  line-height: 1;
}

.discover-hero p {
  max-width: 40rem;
  margin: 0.7rem 0 0;
  color: rgba(255, 255, 255, 0.7);
}

.hero-pill {
  padding: 0.36rem 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  color: #fce6a8;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.search-bar {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 0.65rem;
  margin: 1.2rem 0 0.8rem;
}

.search-bar input {
  min-height: 3.2rem;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.filter-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.72);
}

.filter-panel summary {
  display: flex;
  min-height: 3.2rem;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.1rem;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
}

.filter-panel summary small {
  color: var(--teal);
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.7rem;
  padding: 0 1rem 1rem;
}

.filter-grid .check-row {
  align-content: center;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.check-row input {
  width: 1rem;
  min-height: auto;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin: 2rem 0 1rem;
}

.section-heading h2 {
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 2rem;
  font-weight: 400;
}

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

.profile-card {
  position: relative;
  display: grid;
  min-height: 19rem;
  align-content: space-between;
  overflow: hidden;
  padding: 1.25rem;
  border: 1px solid rgba(23, 37, 34, 0.09);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

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

.profile-card::after {
  content: "";
  position: absolute;
  top: -4rem;
  right: -4rem;
  width: 9rem;
  height: 9rem;
  border-radius: 50%;
  background: var(--teal-pale);
  opacity: 0.48;
}

.profile-card-top,
.profile-card-body,
.profile-actions {
  position: relative;
  z-index: 1;
}

.profile-card-top {
  display: flex;
  align-items: start;
  justify-content: space-between;
}

.profile-card h3 {
  margin-top: 1rem;
  font-size: 1.05rem;
}

.profile-card .handle {
  margin: 0.2rem 0 0.8rem;
  font-size: 0.75rem;
}

.profile-card .profile-bio {
  display: -webkit-box;
  min-height: 3.2rem;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 0.78rem;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.profile-card-meta {
  color: var(--muted);
  font-size: 0.68rem;
}

.boost-label {
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  color: #805342;
  font-size: 0.6rem;
  font-weight: 800;
  background: var(--orange-pale);
}

.profile-actions {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 0.45rem;
  margin-top: 1.2rem;
}

.profile-actions .button {
  min-height: 2.5rem;
  padding: 0.45rem 0.65rem;
  font-size: 0.7rem;
}

.profile-menu-button {
  width: 2.5rem;
  min-height: 2.5rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: transparent;
  cursor: pointer;
}

.split-panel {
  display: grid;
  min-height: 42rem;
  grid-template-columns: minmax(17rem, 0.36fr) minmax(24rem, 0.64fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.thread-list-panel {
  min-width: 0;
  padding: 1.2rem;
  border-right: 1px solid var(--line);
  background: rgba(245, 241, 232, 0.5);
}

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.panel-title h2 {
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 1.7rem;
  font-weight: 400;
}

.thread-list {
  display: grid;
  gap: 0.4rem;
}

.thread-item {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border: 0;
  border-radius: 14px;
  color: var(--ink);
  text-align: left;
  background: transparent;
  cursor: pointer;
}

.thread-item:hover,
.thread-item.active {
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.thread-copy {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: 0.15rem;
}

.thread-copy strong,
.thread-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.thread-copy strong {
  font-size: 0.78rem;
}

.thread-copy span {
  color: var(--muted);
  font-size: 0.68rem;
}

.thread-time {
  align-self: start;
  color: var(--muted);
  font-size: 0.58rem;
}

.unread-dot {
  display: inline-grid;
  min-width: 1.25rem;
  height: 1.25rem;
  place-items: center;
  padding: 0 0.28rem;
  border-radius: 999px;
  color: #fff;
  font-size: 0.58rem;
  background: var(--orange);
}

.chat-panel {
  min-width: 0;
  background:
    radial-gradient(circle at 90% 10%, rgba(8, 127, 112, 0.08), transparent 22%),
    var(--white);
}

.empty-state {
  display: grid;
  height: 100%;
  min-height: 36rem;
  place-content: center;
  justify-items: center;
  padding: 2rem;
  text-align: center;
}

.empty-state h3 {
  margin: 1rem 0 0.4rem;
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 1.8rem;
  font-weight: 400;
}

.empty-state p {
  max-width: 22rem;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.6;
}

.empty-symbol {
  display: grid;
  width: 4rem;
  height: 4rem;
  place-items: center;
  border-radius: 40% 40% 40% 12%;
  color: var(--teal);
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 2rem;
  background: var(--teal-pale);
}

.chat-active {
  display: grid;
  height: 100%;
  min-height: 42rem;
  grid-template-rows: auto 1fr auto auto;
}

.chat-header {
  display: flex;
  min-height: 5rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 1.2rem;
  border-bottom: 1px solid var(--line);
}

.chat-person {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.chat-person h3 {
  font-size: 0.9rem;
}

.chat-person .muted {
  font-size: 0.65rem;
}

.chat-actions {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.message-list {
  display: flex;
  max-height: 32rem;
  flex-direction: column;
  gap: 0.6rem;
  overflow-y: auto;
  padding: 1.25rem;
  scroll-behavior: smooth;
}

.message {
  align-self: flex-start;
  max-width: min(78%, 34rem);
  padding: 0.72rem 0.9rem;
  border-radius: 8px 17px 17px 17px;
  color: var(--ink);
  font-size: 0.8rem;
  line-height: 1.55;
  background: var(--paper-deep);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.message.mine {
  align-self: flex-end;
  border-radius: 17px 8px 17px 17px;
  color: #fff;
  background: var(--teal);
}

.message small {
  display: block;
  margin-top: 0.3rem;
  color: rgba(67, 83, 79, 0.62);
  font-size: 0.56rem;
  text-align: right;
}

.message.mine small {
  color: rgba(255, 255, 255, 0.68);
}

.typing-status {
  min-height: 1.35rem;
  padding: 0 1.25rem;
  color: var(--teal);
  font-size: 0.62rem;
}

.message-composer {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.65rem;
  padding: 0.8rem 1rem 1rem;
  border-top: 1px solid var(--line);
}

.attach-button {
  width: 3rem;
  height: 3rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--teal);
  font-size: 1.25rem;
  background: var(--white);
  cursor: pointer;
}

.attachment-preview {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.6rem 0.75rem;
  border-radius: 12px;
  color: var(--ink-soft);
  font-size: 0.68rem;
  background: var(--teal-pale);
}

.attachment-preview button {
  border: 0;
  color: var(--danger);
  font-weight: 800;
  background: transparent;
  cursor: pointer;
}

.message-media {
  display: block;
  width: min(100%, 24rem);
  max-height: 22rem;
  margin-bottom: 0.5rem;
  border-radius: 12px;
  object-fit: cover;
}

audio.message-media {
  min-width: min(18rem, 100%);
  height: 2.6rem;
}

.message-composer textarea {
  min-height: 3rem;
  max-height: 8rem;
  resize: none;
  background: var(--paper);
}

.send-button {
  width: 3rem;
  height: 3rem;
  border: 0;
  border-radius: 14px 14px 14px 5px;
  color: #fff;
  font-size: 1.25rem;
  font-weight: 800;
  background: var(--teal);
  cursor: pointer;
}

.anonymous-intro {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 1.2rem;
  padding: 1.8rem 2rem;
  border-radius: var(--radius-lg);
  color: #fff;
  background: var(--ink);
}

.anonymous-intro h2 {
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 2.3rem;
  font-weight: 400;
}

.anonymous-intro p:last-child {
  max-width: 42rem;
  margin: 0.6rem 0 0;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.8rem;
}

.anonymous-intro .eyebrow {
  color: #9edacf;
}

.anonymous-split {
  min-height: 32rem;
}

.anonymous-split .chat-active {
  min-height: 32rem;
}

.stories-layout {
  display: grid;
  grid-template-columns: minmax(17rem, 0.34fr) minmax(0, 0.66fr);
  gap: 2rem;
}

.story-composer,
.settings-card,
.card-surface {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.story-composer {
  align-self: start;
  display: grid;
  gap: 1rem;
  padding: 1.4rem;
}

.story-composer h2 {
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 2rem;
  font-weight: 400;
}

.file-picker input[type="file"] {
  padding: 0.65rem;
  background: var(--paper);
}

.file-picker small {
  color: var(--muted);
  font-weight: 500;
}

.story-heading {
  margin-top: 0;
}

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

.story-card {
  position: relative;
  min-height: 17rem;
  overflow: hidden;
  border-radius: var(--radius);
  color: #fff;
  background: linear-gradient(145deg, #17433d, #0b776b);
  box-shadow: var(--shadow-sm);
}

.story-card.has-image {
  min-height: 21rem;
  background-position: center;
  background-size: cover;
}

.story-card.has-image::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(14, 27, 24, 0.08), rgba(14, 27, 24, 0.84));
}

.story-background {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.story-content {
  position: absolute;
  inset: auto 0 0;
  z-index: 1;
  padding: 1.2rem;
}

.story-author {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 1rem;
}

.story-author .avatar {
  width: 2.3rem;
  height: 2.3rem;
}

.story-author strong {
  display: block;
  font-size: 0.75rem;
}

.story-author small,
.story-stats {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.58rem;
}

.story-text {
  margin-bottom: 0.8rem;
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 1.35rem;
  line-height: 1.25;
  white-space: pre-line;
}

.story-delete {
  position: absolute;
  z-index: 2;
  top: 0.7rem;
  right: 0.7rem;
  width: 2rem;
  height: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  color: #fff;
  background: rgba(23, 37, 34, 0.36);
  cursor: pointer;
}

.profile-layout {
  display: grid;
  grid-template-columns: minmax(18rem, 0.32fr) minmax(0, 0.68fr);
  gap: 1.2rem;
}

.profile-preview {
  align-self: start;
  position: sticky;
  top: 1.5rem;
  padding: 1.5rem;
}

.profile-preview .eyebrow {
  margin-top: 1.4rem;
}

.profile-preview h2 {
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 2.2rem;
  font-weight: 400;
}

.link-card {
  display: grid;
  gap: 0.4rem;
  margin: 1.4rem 0 1rem;
  padding: 1rem;
  border-radius: 14px;
  background: var(--teal-pale);
}

.link-card span {
  color: var(--teal-dark);
  font-size: 0.64rem;
  font-weight: 800;
}

.link-card strong {
  overflow: hidden;
  font-size: 0.68rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.link-card .text-button {
  justify-self: start;
  padding-left: 0;
  font-size: 0.66rem;
}

.profile-settings {
  display: grid;
  gap: 1rem;
}

.settings-card {
  padding: 1.4rem;
}

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

.settings-heading h2 {
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 1.9rem;
  font-weight: 400;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.9rem;
}

.wide-field {
  grid-column: 1 / -1;
}

.privacy-options {
  display: grid;
  gap: 0.6rem;
  margin-top: 1.2rem;
}

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
  border-top: 1px solid var(--line);
}

.switch-row > span {
  display: grid;
  gap: 0.2rem;
}

.switch-row small {
  color: var(--muted);
  font-weight: 500;
}

.switch-row input {
  width: 2.7rem;
  height: 1.45rem;
  min-height: 0;
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: var(--line);
  cursor: pointer;
}

.switch-row input::before {
  content: "";
  display: block;
  width: 1.05rem;
  height: 1.05rem;
  margin: 0.2rem;
  border-radius: 50%;
  background: #fff;
  transition: transform 160ms ease;
}

.switch-row input:checked {
  background: var(--teal);
}

.switch-row input:checked::before {
  transform: translateX(1.25rem);
}

.inline-security-form {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 0.7rem;
}

.app-lock-form {
  grid-template-columns: 1fr 1fr auto auto;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.settings-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
}

.blocked-section {
  margin-top: 1.4rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
}

.blocked-section h3 {
  margin-bottom: 0.8rem;
  font-size: 0.82rem;
}

.blocked-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.blocked-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.55rem 0.45rem 0.7rem;
  border-radius: 999px;
  font-size: 0.68rem;
  background: var(--paper);
}

.blocked-chip button {
  border: 0;
  color: var(--teal);
  font-weight: 800;
  background: transparent;
  cursor: pointer;
}

.danger-zone {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.2rem 1.4rem;
  border: 1px solid rgba(189, 63, 56, 0.2);
  border-radius: var(--radius);
  background: rgba(249, 223, 212, 0.45);
}

.freeze-zone {
  border-color: rgba(8, 127, 112, 0.2);
  background: rgba(220, 239, 233, 0.5);
}

.freeze-zone strong {
  color: var(--teal-dark);
}

.admin-summary {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 1.2rem;
  padding: 1.8rem 2rem;
  border-radius: var(--radius-lg);
  color: #fff;
  background: linear-gradient(130deg, var(--ink), #284b44);
}

.admin-summary h2 {
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 2.5rem;
  font-weight: 400;
}

.admin-summary p:last-child {
  max-width: 48rem;
  margin: 0.6rem 0 0;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.78rem;
}

.admin-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.admin-list {
  display: grid;
  gap: 0.7rem;
}

.admin-item {
  display: grid;
  gap: 0.65rem;
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
}

.admin-item header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.admin-item p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.72rem;
  line-height: 1.6;
}

.status-chip {
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  color: var(--teal-dark);
  font-size: 0.58rem;
  font-weight: 800;
  background: var(--teal-pale);
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.danger-zone strong {
  color: var(--danger);
  font-size: 0.8rem;
}

.danger-zone p {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.67rem;
}

.report-dialog {
  width: min(31rem, calc(100% - 2rem));
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  color: var(--ink);
  background: var(--white);
  box-shadow: var(--shadow-lg);
}

.lock-dialog {
  width: min(25rem, calc(100% - 2rem));
  border: 0;
  border-radius: var(--radius-lg);
  color: var(--ink);
  background: var(--white);
  box-shadow: var(--shadow-lg);
}

.lock-dialog::backdrop {
  background: rgba(23, 37, 34, 0.88);
  backdrop-filter: blur(12px);
}

.lock-dialog form {
  display: grid;
  justify-items: center;
  gap: 0.8rem;
  padding: 1.5rem;
  text-align: center;
}

.lock-dialog h2 {
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 2rem;
  font-weight: 400;
}

.lock-dialog p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.76rem;
}

.report-dialog::backdrop {
  background: rgba(23, 37, 34, 0.55);
  backdrop-filter: blur(5px);
}

.report-dialog form {
  display: grid;
  gap: 1rem;
  padding: 1.5rem;
}

.report-dialog h2 {
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 2rem;
  font-weight: 400;
}

.dialog-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
}

.toast-stack {
  position: fixed;
  z-index: 100;
  top: 1rem;
  right: 1rem;
  display: grid;
  width: min(23rem, calc(100% - 2rem));
  gap: 0.6rem;
}

.toast {
  padding: 0.9rem 1rem;
  border-left: 4px solid var(--teal);
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-size: 0.76rem;
  background: var(--white);
  box-shadow: var(--shadow-lg);
  animation: toast-in 200ms ease both;
}

.toast.error {
  border-color: var(--danger);
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateX(12px);
  }
}

.loading-card,
.empty-card {
  display: grid;
  min-height: 12rem;
  grid-column: 1 / -1;
  place-content: center;
  padding: 2rem;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
  background: rgba(255, 253, 248, 0.5);
}

.empty-card strong {
  margin-bottom: 0.4rem;
  color: var(--ink);
}

@media (max-width: 1180px) {
  .profile-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filter-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .stories-layout {
    grid-template-columns: 1fr;
  }

  .admin-columns {
    grid-template-columns: 1fr;
  }

  .app-lock-form {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 920px) {
  .auth-page {
    grid-template-columns: 1fr;
  }

  .auth-brand {
    display: none;
  }

  .auth-panel {
    min-height: 100vh;
    padding: 2rem clamp(1.2rem, 8vw, 5rem);
  }

  .mobile-wordmark {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 3rem;
  }

  .sidebar {
    top: auto;
    right: 0;
    width: auto;
    height: 4.6rem;
    padding: 0.5rem max(0.5rem, env(safe-area-inset-right)) max(0.5rem, env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    border-right: 0;
  }

  .sidebar-brand,
  .sidebar-offer,
  .account-mini {
    display: none;
  }

  .main-nav {
    display: grid;
    height: 100%;
    grid-template-columns: repeat(auto-fit, minmax(3.2rem, 1fr));
    gap: 0.15rem;
    margin: 0;
  }

  .nav-item {
    min-height: 3.5rem;
    flex-direction: column;
    justify-content: center;
    gap: 0.12rem;
    padding: 0.2rem;
    font-size: 0.58rem;
    text-align: center;
  }

  .nav-item.active::before {
    top: -0.5rem;
    left: 50%;
    width: 1.5rem;
    height: 3px;
    transform: translateX(-50%);
  }

  .nav-icon {
    font-size: 1rem;
  }

  .nav-badge {
    position: absolute;
    top: 0.2rem;
    right: 18%;
    margin: 0;
  }

  .workspace {
    margin-left: 0;
    padding: 1.4rem 1rem 7rem;
  }

  .workspace-header {
    margin-bottom: 1.4rem;
  }

  .split-panel {
    grid-template-columns: 1fr;
  }

  .thread-list-panel {
    max-height: 18rem;
    overflow-y: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

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

  .profile-preview {
    position: static;
  }
}

@media (max-width: 680px) {
  .public-header .button {
    display: none;
  }

  .public-main {
    grid-template-columns: 1fr;
    padding: 1.5rem 0;
  }

  .public-profile {
    padding: 1rem 0;
  }

  .public-profile h1 {
    font-size: 3rem;
  }

  .public-inbox {
    padding: 1.25rem;
  }

  .composer-foot {
    align-items: stretch;
    flex-direction: column;
  }

  .workspace-header h1 {
    font-size: 2.25rem;
  }

  .connection-status {
    display: none;
  }

  .discover-hero,
  .anonymous-intro {
    align-items: stretch;
    flex-direction: column;
    padding: 1.4rem;
  }

  .discover-hero {
    min-height: 16rem;
  }

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

  .search-bar .button-ghost {
    grid-column: 1 / -1;
  }

  .filter-grid,
  .settings-grid,
  .inline-security-form {
    grid-template-columns: 1fr;
  }

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

  .profile-card {
    min-height: 17rem;
  }

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

  .split-panel {
    min-height: 0;
    border-radius: var(--radius);
  }

  .chat-active {
    min-height: 34rem;
  }

  .chat-header {
    padding: 0.7rem;
  }

  .chat-actions .text-button {
    font-size: 0.65rem;
  }

  .message-list {
    max-height: 26rem;
    padding: 0.85rem;
  }

  .message {
    max-width: 88%;
  }

.danger-zone,
.settings-heading,
.admin-summary {
    align-items: stretch;
    flex-direction: column;
  }

  .oauth-buttons,
  .app-lock-form {
    grid-template-columns: 1fr;
  }

  .field-pair {
    grid-template-columns: 0.7fr 1.3fr;
  }
}

.data-export-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
}

.data-export-row p {
  margin: 0.3rem 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

@media (max-width: 680px) {
  .data-export-row {
    align-items: stretch;
    flex-direction: column;
  }
}

.data-export-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
}

.data-export-row p {
  margin: 0.3rem 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}
