/* Shared interface contract. Native controls; one responsive layout across platforms.
   Loaded last while legacy feature styles are progressively consolidated. */
* {
  box-sizing: border-box;
}
html {
  scroll-padding-block: 24px 100px;
}
body.product-active {
  background: var(--canvas);
  color: var(--ink);
}
.product-active :is(button, input, textarea, select) {
  font-family: inherit;
}
.product-active :is(button, a, input, select, textarea, summary):focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}
.product-active :is(button, a, summary) {
  touch-action: manipulation;
}
.product-active button {
  transition:
    background-color 120ms,
    border-color 120ms;
}
.product-active button:disabled {
  cursor: default;
  opacity: 0.48;
  filter: none;
}
.product-active button[aria-busy="true"] {
  cursor: progress;
  opacity: 0.7;
}
.product-active :is(.product-content, .product-dialog) {
  min-width: 0;
  font-size: 14px;
  line-height: 1.45;
}
.product-active :is(.product-content, .product-dialog) button {
  min-height: var(--control-height);
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
}
.product-active :is(.product-content, .product-dialog) button.primary,
.product-active .profile-savebar > button[type="submit"],
.product-active .message-composer button[type="submit"] {
  background: var(--accent);
  border: 1px solid #ce6251;
  color: #fff;
}
.product-active :is(.product-content, .product-dialog) button.secondary {
  color: var(--ink);
  background: var(--surface-raised);
  border-color: var(--control-line);
}
.product-active
  :is(.product-content, .product-dialog)
  :is(
    input:not(
      [type="checkbox"],
      [type="radio"],
      [type="range"],
      [type="hidden"],
      [type="file"],
      [type="color"]
    ),
    select,
    textarea
  ) {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: var(--control-height);
  margin: 0;
  padding: 9px 11px;
  border: 1px solid var(--control-line);
  border-radius: var(--radius);
  background-color: #141416;
  color: var(--ink);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
  box-shadow: none;
}
.product-active :is(.product-content, .product-dialog) select:not([multiple]) {
  padding-right: 36px;
}
.product-active :is(.product-content, .product-dialog) textarea {
  resize: vertical;
}
.product-active :is(input, textarea)::placeholder {
  color: #a6a39e;
  opacity: 1;
}
.product-active :is(input[type="checkbox"], input[type="radio"]) {
  accent-color: var(--accent);
}
.product-active :is(.product-content, .product-dialog) .field {
  min-width: 0;
  margin: 0;
  gap: 6px;
  align-content: start;
}
.product-active .field > span:first-child {
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
}
.field-error {
  display: block;
  color: #ffb5a7;
  font-size: 12px;
  line-height: 1.4;
  margin-top: 4px;
}
.product-active :is(input, select, textarea)[aria-invalid="true"] {
  border-color: #ed8c7a;
}
.product-active :is(.muted, .small, .character-count) {
  color: var(--muted);
}
.product-active :is(.section-heading, .editor-panel-heading) {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 12px;
  min-width: 0;
}
.product-active
  :is(.section-heading, .editor-panel-heading)
  > :is(h2, h3, h4, p) {
  margin: 0;
  min-width: 0;
}
.product-active :is(.section-heading, .editor-panel-heading) > button {
  width: auto;
  margin: 0;
  flex-shrink: 0;
}
.product-active :is(.product-content, .product-dialog) details > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  padding: 10px 12px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
  list-style: none;
  border-radius: 8px;
}
.product-active details > summary::-webkit-details-marker {
  display: none;
}
.product-active
  :is(.product-content, .product-dialog)
  details
  > summary::after {
  content: "";
  display: block;
  flex: 0 0 7px;
  width: 7px;
  height: 7px;
  border: solid currentColor;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
  margin: -4px 3px 0 0;
  background: none;
}
.product-active
  :is(.product-content, .product-dialog)
  details[open]
  > summary::after {
  transform: rotate(225deg);
  margin-top: 4px;
}
.product-active :is(.product-content, .product-dialog) details > summary:hover {
  background: var(--surface-hover);
}
/* Four destinations. Wide rail -> icon rail -> thumb-accessible bottom navigation. */
body.product-active > header {
  max-width: 1480px;
  padding: 18px 28px;
}
body.product-active main {
  max-width: 1480px;
  padding: 0 28px;
  margin: 0 auto 64px;
}
#product-shell {
  grid-template-columns: 168px minmax(0, 1fr);
  gap: 28px;
}
.workspace-rail {
  top: 16px;
  padding: 22px 16px 0 0;
  min-height: 360px;
  height: calc(100vh - 125px);
  height: calc(100dvh - 125px);
  border-color: var(--line);
}
.rail-brand {
  margin: 0 10px 20px;
}
.product-nav {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  padding: 0;
}
.product-nav .nav-item {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  gap: 12px;
  border-radius: 10px;
  color: var(--muted);
}
.product-nav .nav-item[aria-current="page"] {
  background: #302422;
  border-color: #765047;
  color: var(--ink);
}
.product-nav .nav-item[aria-current="page"]::before {
  display: none;
}
.product-nav .nav-icon {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
}
.product-content .view-heading {
  padding: 24px 0 16px;
  gap: 8px;
}
.product-content .view-heading h1 {
  font:
    650 28px/1.15 system-ui,
    sans-serif;
  letter-spacing: -0.8px;
  margin: 0;
}
.product-content .view-heading > p {
  margin: 6px 0 0;
  font-size: 13px;
}
/* Section navigation uses one quiet, legible selected state. */
.product-content :is(.discovery-sections, .editor-menu, .inbox-tabs) {
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: thin;
  padding: 0 0 6px;
  margin: 0 0 14px;
  border-bottom: 1px solid var(--line);
  background: none;
  border-radius: 0;
}
.product-content :is(.discovery-section, .editor-menu-item, .inbox-tab) {
  flex: 0 0 auto;
  width: auto;
  min-height: 40px;
  padding: 9px 12px;
  margin: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  white-space: nowrap;
}
.product-content
  :is(.discovery-section, .editor-menu-item, .inbox-tab)[aria-pressed="true"],
.product-content .editor-menu-item[aria-selected="true"] {
  background: var(--surface-raised);
  border-color: var(--control-line);
  color: var(--ink);
  box-shadow: inset 0 -2px #c48c6a;
}
.product-content .discovery-toolbar {
  gap: 8px;
  margin: 12px 0;
  align-items: start;
}
.product-content .filter-disclosure {
  min-width: 0;
  border: 1px solid var(--control-line);
  border-radius: 10px;
  background: var(--surface);
}
.product-content .filter-disclosure > summary {
  padding: 9px 12px;
}
.product-content .discovery-filters {
  padding: 16px;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0 0 10px 10px;
  background: none;
}
.product-content .filter-grid {
  gap: 12px;
  align-items: start;
}
.product-content .discovery-filters details {
  margin: 12px 0 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #141416;
}
.product-content .discovery-filters details > :not(summary) {
  margin-inline: 12px;
}
.product-content .discovery-filters details > :last-child {
  margin-bottom: 12px;
}
.product-content .applied-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.product-content .results-toolbar {
  margin-top: 12px;
  padding-top: 12px;
  border-color: var(--line);
  gap: 8px;
}
.product-content .view-switch {
  padding: 2px;
  gap: 2px;
  border-color: var(--line);
  background: var(--surface);
}
.product-content .view-switch button {
  min-height: 34px;
  padding: 6px 10px;
}
.product-content .view-switch button[aria-pressed="true"] {
  background: #3a3632;
  color: var(--ink);
}
.product-content .search-location {
  padding: 14px;
  margin: 12px 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}
.product-content .search-location-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 10px;
}
.product-content .search-location-controls > .field {
  flex: 1 1 140px;
}
.product-content .search-location-controls > button {
  flex: 0 0 auto;
  width: auto;
  margin: 0;
}
.product-content .search-zip {
  display: flex;
  align-items: center;
  gap: 8px;
}
.product-content .search-zip > button {
  flex: 0 0 auto;
  width: auto;
  margin: 0;
}
/* Bounded cards retain their two-row measured tags and generous photography. */
.product-content .people-grid {
  gap: 14px;
  margin: 16px 0 24px;
}
.product-content .person-card {
  border-color: var(--line);
  background: var(--surface);
  box-shadow: none;
}
.product-content .person-card:hover {
  border-color: #77716b;
  background: #202022;
}
.product-content .person-open {
  min-height: 0;
  padding: 0;
  text-align: left;
  font-weight: 400;
}
.product-content .person-body {
  padding: 11px 12px;
}
.product-content .person-copy {
  padding: 0;
}
.product-content .person-title {
  gap: 6px;
}
.product-content .people-list {
  gap: 10px;
}
.product-content .people-list .person-body {
  padding: 12px 14px;
}
.product-content .people-list .person-copy {
  padding: 0;
}
/* Dialogs: one header, consistent gutters, clear action and reading columns. */
.product-active .product-dialog {
  border: 1px solid var(--control-line);
  border-radius: 16px;
  background: var(--surface);
  color: var(--ink);
  padding: 0;
  margin: auto;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  box-shadow: 0 24px 80px #0009;
}
.product-dialog::backdrop {
  background: #000b;
}
.product-dialog > .section-heading {
  position: sticky;
  top: 0;
  z-index: 4;
  background: #1c1c1e;
  padding: 12px 16px;
  margin: 0;
  border-bottom: 1px solid var(--line);
}
.product-dialog > .section-heading > h2 {
  font:
    600 18px/1.3 system-ui,
    sans-serif;
  flex: 1 1 100px;
}
.product-dialog .dialog-body {
  padding: 16px;
}
.profile-dialog .dialog-body {
  padding: 0;
}
.profile-dialog .profile-sheet {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.45fr);
  gap: 0;
}
.profile-dialog .profile-visual {
  padding: 16px;
  gap: 10px;
  border-right: 1px solid var(--line);
  background: #151517;
  min-width: 0;
}
.profile-dialog .profile-main {
  padding: 20px;
  min-width: 0;
}
.profile-dialog .profile-cover {
  border-radius: 10px;
  overflow: hidden;
}
.profile-dialog .profile-name {
  font:
    650 28px/1.15 system-ui,
    sans-serif;
  letter-spacing: -0.5px;
}
.profile-dialog .profile-bio {
  font-size: 15px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.profile-dialog .profile-actions {
  gap: 8px;
}
.profile-dialog .profile-actions > button,
.profile-dialog .spark-action > button {
  width: 100%;
  min-height: 42px;
  justify-content: center;
  text-align: center;
}
.profile-dialog .profile-actions .message-toggle {
  background: var(--accent);
  border-color: #ce6251;
  color: #fff;
}
.profile-dialog .profile-actions .spark-action > button {
  background: #282323;
  color: #f0d8c4;
  border-color: #725448;
}
.profile-dialog .profile-composer {
  padding: 10px;
  border: 1px solid var(--control-line);
  border-radius: 10px;
  background: var(--surface);
}
.profile-dialog .profile-disclosure {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #1d1d20;
  margin-block: 12px;
}
.profile-dialog .profile-disclosure-content {
  padding: 0 12px 12px;
}
.profile-dialog .profile-activity {
  margin-block: 4px;
  padding: 10px 0;
  border-block: 1px solid var(--line);
}
.profile-dialog .profile-activity dt {
  color: var(--muted);
}
.profile-dialog .profile-albums {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.profile-dialog .profile-actions .safety-actions {
  border-top: 1px solid var(--line);
  padding-top: 8px;
  gap: 12px;
}
.profile-dialog .profile-spark-footer {
  border: 0;
  margin-top: 8px;
}
.profile-dialog .profile-spark-footer summary {
  color: var(--muted);
  font-size: 12px;
  padding-inline: 0;
}
/* Editor: the heading and its contents share exactly one alignment edge. */
.product-content .editor-workspace {
  display: block;
}
.product-content .editor-navigation {
  display: flex;
  align-items: start;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
}
.product-content .editor-menu {
  flex: 1;
  min-width: 0;
  border: 0;
  margin: 0;
}
.product-content .editor-preview {
  width: auto;
  flex: 0 0 auto;
  margin: 0;
  min-height: 40px;
}
.product-content .editor-body,
.product-content .profile-editor {
  padding: 0;
  margin: 0;
  min-width: 0;
}
.product-content .editor-panel {
  padding: 20px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}
.product-content .editor-panel-heading {
  padding: 0 0 14px;
  margin: 0 0 16px;
  border-bottom: 1px solid var(--line);
}
.product-content .editor-panel-heading > h2 {
  font:
    650 19px/1.3 system-ui,
    sans-serif;
  color: var(--ink);
}
.product-content .editor-panel > :is(.editor-section, .account-settings) {
  padding-inline: 0;
  margin-top: 0;
}
.product-content .editor-panel .editor-section > summary {
  background: var(--surface-raised);
  margin-bottom: 12px;
}
.product-content .editor-panel :is(.basics-grid, .form-grid) {
  gap: 14px;
}
.product-content .profile-savebar {
  width: 100%;
  max-width: none;
  position: sticky;
  left: auto;
  right: auto;
  transform: none;
  bottom: 16px;
  z-index: 6;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid var(--control-line);
  border-radius: 10px;
  background: #262426;
  box-shadow: 0 6px 24px #0006;
}
.product-content .profile-savebar > button {
  width: auto;
  min-width: 96px;
  margin: 0;
}
.product-active .editor-panel > .editor-section > .field {
  margin-top: 14px;
}
.product-active .editor-panel > .editor-section > .field:first-child {
  margin-top: 0;
}
.product-active .editor-panel > .editor-section > .place-picker {
  margin-top: 14px;
}
.product-active .product-content .chips > button,
.product-active .product-dialog .chips > button,
.product-active .product-content .single-picker > button.chip {
  min-height: 32px;
  padding: 5px 9px;
  font-size: 12px;
}
/* Album and writing management use compact toolbars, not competing full-width actions. */
.product-content .album-editor {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #141416;
  padding: 14px;
}
.product-content .album-toolbar {
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.product-content .album-toolbar button,
.product-content .album-rename button,
.product-content .album-grant button {
  width: auto;
  margin: 0;
  flex-shrink: 0;
}
.product-content .album-access {
  border-top: 1px solid var(--line);
  padding-top: 10px;
  margin-top: 12px;
}
.product-content .album-access-list {
  display: grid;
  gap: 0;
  padding: 0;
}
.product-content .album-grantee {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.product-content .album-member-name {
  min-width: 0;
  flex: 1;
  overflow-wrap: anywhere;
}
.product-content .album-grantee > button {
  width: auto;
  margin: 0;
  flex-shrink: 0;
}
.product-content .writing-list-item {
  border-color: var(--line);
  background: #1c1c1f;
}
.product-content .writing-list-item[aria-pressed="true"] {
  border-color: #b38b6c;
  background: #302923;
}
.product-active .product-content .writing-editor > textarea {
  min-height: 300px;
  padding: 12px;
  font-size: 15px;
  line-height: 1.65;
}
.product-content .writing-metadata {
  grid-template-columns: minmax(0, 1fr);
}
.product-content .writing-editor-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.product-content .writing-empty {
  border-color: var(--control-line);
  background: #141416;
}
/* Inbox: compact rows, a stable header, and a growing but bounded composer. */
.product-content .inbox-workspace {
  gap: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: hidden;
  grid-template-columns: minmax(230px, 0.8fr) minmax(0, 1.5fr);
}
.product-content .inbox-sidebar {
  padding: 12px;
  border-right: 1px solid var(--line);
  min-width: 0;
}
.product-content .inbox-tabs {
  gap: 2px;
  margin-bottom: 8px;
}
.product-content .inbox-tabs button {
  padding-inline: 10px;
  min-width: 0;
  flex: 1 0 auto;
}
.product-content .conversation-row {
  border-radius: 8px;
  padding: 10px;
  gap: 10px;
  margin: 2px 0;
  border: 1px solid transparent;
  min-width: 0;
}
.product-content .conversation-row[aria-current="true"] {
  border-color: #6e5b4f;
  background: #302824;
}
.product-content .conversation-pane {
  min-width: 0;
  padding: 0;
  background: #141416;
}
.product-content .thread-heading {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  gap: 10px;
  background: #1d1d20;
}
.product-content .thread-heading button {
  margin: 0;
}
.product-content .thread-profile-link {
  padding: 0;
  background: none;
  border: 0;
  text-align: left;
}
.product-content .thread-feed {
  padding: 14px;
  gap: 8px;
}
.product-content .message-composer {
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  gap: 8px;
  background: #1d1d20;
}
.product-active .product-content .message-composer textarea {
  min-height: 44px;
  max-height: 144px;
  padding: 10px;
  resize: vertical;
}
.product-content .composer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.product-content .composer-bottom button {
  width: auto;
  min-height: 36px;
  padding: 7px 10px;
  margin: 0;
}
.product-content .composer-bottom button[type="submit"] {
  margin-left: auto;
  padding-inline: 18px;
}
.product-content .message-bubble {
  border-radius: 11px;
}
.product-active .product-status {
  left: auto;
  right: 24px;
  bottom: 24px;
  transform: none;
  width: min(460px, calc(100vw - 48px));
  border: 1px solid var(--control-line);
  border-radius: 12px;
  box-shadow: 0 8px 30px #0008;
}
.product-active .product-content .inbox-tabs button {
  background: transparent;
  border-color: transparent;
  color: var(--muted);
}
.product-active .product-content .inbox-tabs button[aria-pressed="true"] {
  background: var(--surface-raised);
  border-color: var(--control-line);
  color: var(--ink);
  box-shadow: inset 0 -2px #c48c6a;
}
.product-content {
  padding-top: 0;
}
/* Entrance clarity: structured sign-in card and 3-pillar overview. */
.auth-page:not(.product-active) .intro {
  display: flex;
  flex-direction: column;
}
.auth-page:not(.product-active) .intro h1 {
  margin: 56px 0 16px;
}
.auth-page:not(.product-active) .intro > p {
  font-size: 16px;
  color: #ebe6df;
}
.auth-page:not(.product-active) .intro .intro-values {
  margin-top: auto;
  padding-top: 28px;
  max-width: 440px;
  gap: 14px;
}
.auth-page:not(.product-active) .intro .intro-values li {
  border-left: 2px solid var(--accent);
  padding: 2px 0 2px 14px;
  background: rgb(12 12 14 / 0.55);
  border-radius: 0 8px 8px 0;
}
.auth-page:not(.product-active) .intro .intro-values strong {
  color: #f6f1ea;
  font-size: 14px;
  font-weight: 650;
}
.auth-page:not(.product-active) .intro .intro-values span {
  color: #d4cdc4;
  font-size: 13px;
  line-height: 1.45;
}
.auth-page:not(.product-active) .workspace > .panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 18px 48px rgb(0 0 0 / 0.35);
}
/* Interactive rail identity & quick support links. */
button.rail-identity {
  width: 100%;
  min-height: 52px;
  padding: 10px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 12px !important;
  background: var(--surface);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  text-align: left;
}
button.rail-identity:hover {
  background: var(--surface-raised);
  border-color: var(--control-line);
}
.rail-identity-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}
.rail-visibility-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--muted);
}
.rail-visibility-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #8d867e;
}
.rail-visibility-badge.is-visible {
  color: #cde6d3;
}
.rail-visibility-badge.is-visible::before {
  background: #5fbf7a;
}
.rail-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin-top: 12px;
  padding: 0 4px;
  font-size: 11px;
  color: var(--muted);
}
.rail-links a {
  text-decoration: none;
  color: var(--muted);
}
.rail-links a:hover {
  color: var(--ink);
  text-decoration: underline;
}
/* Context & orientation bars across Discover, Visitors, and Inbox. */
.product-content .discovery-context-bar,
.product-content .visitors-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  margin: 0 0 12px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}
.product-content .discovery-context-bar .discovery-caption,
.product-content .visitors-toolbar > p {
  margin: 0;
  font-size: 13px;
  color: #ddd6cd;
}
.product-content .discovery-context-action,
.product-content .visitors-toolbar-actions button {
  width: auto;
  min-height: 32px;
  padding: 5px 10px;
  margin: 0;
  font-size: 12px;
  font-weight: 600;
}
.product-content .visitors-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.product-content .inbox-box-caption {
  margin: -2px 2px 10px;
  font-size: 12px;
  line-height: 1.4;
}
/* Plain-language direction & state badges (Received, Sent, Mutual). */
.direction-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 650;
  line-height: 1.35;
  letter-spacing: 0.01em;
  border: 1px solid var(--line);
  background: var(--surface-raised);
  color: var(--muted);
  white-space: nowrap;
}
.direction-badge.incoming {
  background: #1f2e2b;
  border-color: #467369;
  color: #c8efe5;
}
.direction-badge.mutual {
  background: #35281c;
  border-color: #9e7346;
  color: #f6dcb9;
}
.direction-badge.outgoing {
  background: #232326;
  border-color: #4a4a50;
  color: #c6c2bc;
}
.profile-dialog .profile-foot {
  display: grid;
  gap: 8px;
  margin-top: auto;
  padding-top: 8px;
}
@media (max-width: 900px) {
  .product-content .inbox-workspace {
    grid-template-columns: minmax(210px, 0.85fr) minmax(0, 1.35fr);
  }
  .product-content .editor-panel {
    padding: 16px;
  }
  .writing-workspace {
    grid-template-columns: minmax(0, 1fr);
  }
  .writing-library .writing-list {
    display: flex;
    overflow-x: auto;
    max-height: 180px;
  }
  .writing-list .writing-list-item {
    flex: 0 0 170px;
  }
}
@media (max-width: 860px) {
  .auth-page:not(.product-active) main {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
    padding: 0 18px;
  }
  .auth-page:not(.product-active) .intro {
    min-height: 0;
    padding: 28px 24px;
  }
  .auth-page:not(.product-active) .intro h1 {
    margin: 20px 0 12px;
    font-size: clamp(54px, 12vw, 78px);
  }
  .auth-page:not(.product-active) .intro .intro-values {
    display: grid;
    padding-top: 18px;
    gap: 10px;
  }
  .auth-page:not(.product-active) .workspace > .panel {
    padding: 22px;
  }
  .profile-dialog .profile-foot {
    order: 6;
  }
}
@media (max-width: 800px) {
  .product-content .inbox-workspace {
    display: block;
    height: auto;
    min-height: 0;
  }
  .product-content .inbox-sidebar {
    border-right: 0;
    padding-inline: 0;
  }
  .product-content .conversation-pane {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
  }
  .product-content .inbox-workspace:not(.thread-open) .conversation-pane {
    display: none;
  }
  .product-content .inbox-workspace.thread-open .inbox-sidebar {
    display: none;
  }
  .product-content .inbox-workspace.thread-open .conversation-pane {
    display: flex;
    flex-direction: column;
    min-height: calc(100dvh - 210px);
  }
  .product-content .thread-heading .thread-back {
    display: inline-flex;
    padding: 6px 11px;
    min-height: 36px;
    border: 1px solid var(--control-line);
    border-radius: 8px;
    background: var(--surface-raised);
    color: var(--ink);
    font-size: 12px;
    font-weight: 600;
  }
}
/* Breakpoints describe available space, never a browser or operating system. */
@media (min-width: 701px) and (max-width: 1100px) {
  #product-shell {
    grid-template-columns: 84px minmax(0, 1fr);
    gap: 20px;
  }
  .workspace-rail {
    padding-right: 10px;
  }
  .product-nav .nav-item {
    flex-direction: column;
    gap: 4px;
    padding: 9px 6px;
    min-height: 56px;
    justify-content: center;
    text-align: center;
  }
  .product-nav .nav-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.15;
  }
  .rail-brand,
  .rail-foot > p,
  .rail-links,
  .rail-identity-copy {
    display: none;
  }
  button.rail-identity {
    justify-content: center;
    padding: 8px;
  }
  .product-nav .unread-dot {
    right: 14px;
    top: 7px;
  }
}
@media (max-width: 700px) {
  body.product-active > header {
    padding: 14px 16px;
  }
  body.product-active main {
    padding: 0 14px;
    margin-bottom: 108px;
  }
  #product-shell {
    display: block;
  }
  .workspace-rail {
    position: static;
    display: block;
    height: auto;
    min-height: 0;
    padding: 0;
    border: 0;
  }
  .rail-brand,
  .rail-foot {
    display: none;
  }
  .product-nav {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 20;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
    padding: 6px 10px calc(6px + env(safe-area-inset-bottom, 0px));
    background: rgb(24 24 26 / 0.96);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--control-line);
  }
  .product-nav .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-height: 52px;
    padding: 6px 4px;
    margin: 0;
    border-radius: 10px;
  }
  .product-nav .nav-icon {
    width: 21px;
    height: 21px;
    flex-basis: 21px;
  }
  .product-nav .nav-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.01em;
  }
  .product-nav .unread-dot {
    top: 5px;
    right: calc(50% - 17px);
  }
  .product-content .view-heading {
    padding: 18px 0 14px;
  }
  .product-content .view-heading h1 {
    font-size: 26px;
  }
  .product-content .people-grid {
    gap: 10px;
  }
  .product-content .person-body {
    padding: 9px;
  }
  .product-content .discovery-sections {
    gap: 2px;
  }
  .product-content .discovery-section {
    padding-inline: 10px;
  }
  .product-content .editor-navigation {
    gap: 8px;
  }
  .product-content .editor-preview {
    padding-inline: 10px;
    font-size: 12px;
  }
  .product-content .editor-panel {
    padding: 14px;
  }
  .product-content .profile-savebar {
    bottom: calc(82px + env(safe-area-inset-bottom, 0px));
  }
  .product-content .inbox-workspace {
    display: block;
    border: 0;
    background: none;
    overflow: visible;
  }
  .product-content .inbox-sidebar {
    padding: 0;
    border: 0;
  }
  .product-content .thread-heading,
  .product-content .thread-feed,
  .product-content .message-composer {
    padding: 10px;
  }
  .product-active .product-status {
    bottom: calc(86px + env(safe-area-inset-bottom, 0px));
    right: 12px;
    width: calc(100vw - 24px);
  }
  .product-active .product-dialog {
    max-width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
    max-height: calc(100dvh - 16px);
    border-radius: 12px;
  }
  .profile-dialog .profile-sheet {
    display: flex;
    flex-direction: column;
    padding: 14px;
    gap: 10px;
  }
  .profile-dialog .profile-visual {
    display: contents;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 14px;
  }
  .profile-dialog .profile-main {
    display: contents;
    padding: 16px;
  }
  .profile-dialog .profile-foot {
    order: 6;
  }
  .product-active
    :is(.product-content, .product-dialog)
    :is(
      input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
      select,
      textarea
    ) {
    font-size: 16px;
  }
}
@media (pointer: coarse) {
  .product-active .product-content .chips > button,
  .product-active .product-dialog .chips > button,
  .product-active .product-content .single-picker > button.chip {
    min-height: 44px;
  }
  .product-active :is(.product-content, .product-dialog) button {
    min-height: 44px;
  }
  .product-active :is(.product-content, .product-dialog) .limit-remove {
    min-width: 44px;
    min-height: 44px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .product-active *,
  .product-active *::before,
  .product-active *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
@media (forced-colors: active) {
  .product-active :is(button, input, select, textarea, summary) {
    forced-color-adjust: auto;
  }
  .product-active [aria-current="page"],
  .product-active [aria-selected="true"],
  .product-active [aria-pressed="true"] {
    outline: 2px solid Highlight;
    outline-offset: -3px;
  }
  .product-active
    :is(.product-content, .product-dialog)
    select:not([multiple]) {
    appearance: auto;
    background-image: none;
  }
}
/* Explicit hidden always wins over layout display rules. */
.product-active [hidden] {
  display: none !important;
}
