/* Home screen — the landing is now My Stuff: heading, the three-way toggle,
   and one collection at a time. (The old Explore hero styles below are unused
   since discovery moved to search.) */

.home {
  display: grid;
  gap: var(--space-5);
}

.page:has(.home) {
  padding-top: var(--space-4);
}

.my-stuff-header h2 {
  font-size: 1.18rem;
}

.my-stuff-header {
  flex-wrap: wrap;
  justify-content: flex-start;
  column-gap: var(--space-5);
  row-gap: var(--space-2);
}

.my-stuff-controls {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.my-stuff-controls .section-icon-button {
  width: 28px;
  height: 28px;
  font-size: 1.04rem;
}

/* The landing's three-way toggle. It carries the broad-to-close hierarchy as
   layers: Spaces is the outer capsule, Sources is an outlined pill above it,
   and Discussions rides the front edge of Sources. No glyphs — the surfaces
   and the number carry it. Reuses the panel/line/accent tokens so it still
   reads with the room header's boxed pairs.

   The container is a capsule because the selected segment is: a fully-round
   pill inside a rounded rectangle reads as a mistake at the corners. */
.segmented {
  display: inline-flex;
  align-items: stretch;
  gap: 0;
  padding: 2px;
  border: 1px solid color-mix(in srgb, var(--line) 84%, var(--accent));
  border-radius: 999px;
  background: var(--panel);
  transition: background 0.15s ease, border-color 0.15s ease;
}

.segmented.is-spaces {
  border-color: var(--accent);
  background: var(--accent);
}

.segment {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.36em;
  min-height: 24px;
  padding: calc(var(--space-2) - 4px) calc(var(--space-3) - 3px);
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: 640 0.82rem var(--font-ui);
  position: relative;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}

/* The layer stack. Spaces is the base, Sources is the nested surface, and
   Discussions sits on the front edge of Sources in every state. */
.segment:nth-child(1) {
  z-index: 0;
  width: 82px;
  color: color-mix(in srgb, var(--muted) 86%, var(--ink));
  font-weight: 690;
  opacity: 0.72;
}

.segment:nth-child(2) {
  z-index: 1;
  width: 132px;
  margin-left: 2px;
  padding-right: calc(var(--space-5) + var(--space-3));
  border-color: color-mix(in srgb, var(--accent) 32%, var(--line));
  background: color-mix(in srgb, var(--accent) 7%, var(--panel));
  color: color-mix(in srgb, var(--accent-dark) 62%, var(--muted));
  font-weight: 690;
}

.segment:nth-child(3) {
  z-index: 2;
  width: 122px;
  margin-left: calc(-1 * (var(--space-5) + var(--space-3)));
  color: color-mix(in srgb, var(--muted) 88%, var(--ink));
  font-weight: 620;
  opacity: 0.72;
}

.segmented.is-spaces .segment:nth-child(1).is-active {
  color: var(--color-on-accent);
  font-weight: 760;
  opacity: 1;
}

.segmented.is-spaces .segment:nth-child(2) {
  border-color: color-mix(in srgb, var(--accent) 32%, var(--line));
  background: color-mix(in srgb, var(--accent) 7%, var(--panel));
}

.segmented.is-spaces .segment:nth-child(3),
.segmented.is-topics .segment:nth-child(3) {
  z-index: 3;
  border-color: color-mix(in srgb, var(--accent) 28%, var(--line));
  background: var(--panel);
  color: color-mix(in srgb, var(--accent-dark) 50%, var(--muted));
  opacity: 1;
}

/* The nesting has to read in both directions: with Discussions selected, Sources
   behind it is a light tint, so with Sources selected, Discussions in front of
   it gets the same tint rather than plain paper. */
.segmented.is-topics .segment:nth-child(3) {
  background: color-mix(in srgb, var(--accent) 7%, var(--panel));
}

.segment:nth-child(2).is-active {
  z-index: 2;
  border-color: var(--accent);
  background: var(--accent);
  color: var(--color-on-accent);
  font-weight: 760;
  opacity: 1;
}

.segment:nth-child(3).is-active {
  z-index: 3;
  border-color: var(--accent);
  background: var(--accent);
  color: var(--color-on-accent);
  font-weight: 760;
  opacity: 1;
}

.segment:not(.is-active):hover,
.segment:not(.is-active):focus-visible {
  color: var(--ink);
  opacity: 1;
  outline: 0;
}

.segment.is-active:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 32%, transparent);
  outline-offset: 2px;
}

.my-stuff-view {
  display: grid;
  gap: var(--space-4);
}

.my-stuff-empty {
  padding: var(--space-6);
}

.my-stuff-empty .bookmark-glyph {
  vertical-align: -4px;
  margin: 0 -3px 0 0;
}

.my-stuff-empty .bookmark-glyph svg {
  width: 16px;
  height: 16px;
}

.my-stuff-screen .room-row {
  min-height: 76px;
  padding: var(--space-4);
}

.my-stuff-screen .room-row-icon {
  width: 30px;
  height: 28px;
}

.my-stuff-screen .room-row-icon svg {
  width: 32px;
  height: 28px;
}

.my-stuff-screen .room-row-title {
  font-family: var(--font-ui);
  font-size: 1.04rem;
  font-weight: 700;
}

/* A draft row's status is the same kind of thing as a live room's signal, so it
   sits in the same slot of the room-row grid and wears the same state label —
   the topic screen's version of this row still carries a composed sentence
   ("7:29 · proposed by Maya · Draft"), which is why the type differs there. */
.my-stuff-screen .room-row > .state-label {
  grid-area: meta;
  min-width: 0;
}

.home-intro {
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(360px, 1fr);
  gap: var(--space-7);
  align-items: end;
}

.kicker {
  margin: 0 0 var(--space-3);
  color: var(--clay);
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 760;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}


.home-identity {
  display: grid;
  grid-template-rows: auto auto;
  row-gap: var(--space-2);
}

.home-identity h1 {
  margin-bottom: 0;
}

.home-copy {
  display: grid;
  grid-template-rows: auto auto;
  row-gap: var(--space-2);
  max-width: 720px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: clamp(1.14rem, 2vw, 1.45rem);
  line-height: 1.16;
  text-align: right;
  transform: translateY(-22px);
}

.home-copy span {
  display: block;
}

.dashboard-intro {
  align-items: center;
}

.home-heading h1 {
  margin: 0;
  font-size: clamp(2.1rem, 5vw, 4rem);
  line-height: 1;
}

.home-subtitle {
  margin: 0;
  color: var(--clay);
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 760;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}


.explore {
  display: grid;
  gap: var(--space-4);
}

.explore-track {
  gap: var(--space-4);
}
