/* Navigation: the top bar, its More menu and account actions, on light,
   gallery and chronicle pages. */

.workspace {
  margin-left: 234px;
  width: calc(100% - 234px);
}
.topbar {
  height: 87px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 44px;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}
.preview-badge {
  font-size: 8px;
  letter-spacing: 1.3px;
  color: #686270;
}
.preview-badge i {
  display: inline-block;
  background: var(--gold);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  margin-right: 6px;
}
.icon-button {
  font-size: 21px;
  padding: 5px;
}
@media (max-width: 1200px) {
  .workspace {
    margin-left: 205px;
    width: calc(100% - 205px);
  }
  .topbar {
    padding: 0 30px;
  }
}
@media (max-width: 900px) {
  .workspace {
    margin-left: 180px;
    width: calc(100% - 180px);
  }
  .topbar {
    padding: 0 25px;
    height: 70px;
  }
  .top-actions {
    gap: 10px;
  }
  .preview-badge {
    font-size: 7px;
  }
}
@media (max-width: 640px) {
  .workspace {
    margin: 0;
    width: 100%;
  }
  .topbar {
    height: 68px;
    padding: 0 21px;
  }
  .top-actions .icon-button {
    display: none;
  }
  .preview-badge {
    letter-spacing: 0.6px;
    font-size: 7px;
  }
  .top-actions {
    gap: 12px;
  }
}
.landing .workspace,
.showcase-mode .workspace {
  width: 100%;
  margin: 0;
}
.landing .topbar {
  padding: 0 6.5%;
  height: 94px;
}
.landing .top-actions .owner,
.landing .top-actions .icon-button {
  display: none;
}
.landing .topbar .preview-badge {
  font-size: 7px;
}
.showcase-mode .topbar {
  background: #f7f6f2;
}
@media (max-width: 760px) {
  .landing .topbar {
    height: 78px;
    padding: 0 6%;
  }
  .landing .topbar .preview-badge {
    display: none;
  }
}
.topbar {
  border-color: var(--line);
}
.landing .topbar {
  background: var(--midnight);
  border-color: #333845;
  height: 91px;
}
.landing .preview-badge {
  color: #c3b7a9;
}
.landing .preview-badge i {
  background: #bb855b;
}
.showcase-mode .topbar {
  background: var(--midnight);
  color: #ead8bd;
  border-color: var(--line-dark);
}
.showcase-mode .preview-badge {
  color: #c6bcaf;
}
@media (max-width: 760px) {
  .landing .topbar {
    height: 77px;
    padding: 0 6%;
  }
}
.chronicle-mode .workspace {
  background: var(--midnight);
}
.chronicle-mode .topbar {
  background: var(--midnight);
  border-color: var(--line-dark);
  color: #ead8bd;
}
.chronicle-mode .preview-badge {
  color: #c6bcaf;
}
/* A quiet top bar leaves the collection room to breathe. */
.workspace {
  width: 100%;
  margin-left: 0;
}
.topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 25px;
  height: 92px;
  padding: 0 4.5%;
  background: var(--paper);
  border-bottom: 1px solid #cdbb9855;
  position: relative;
  z-index: 40;
}
.top-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  width: fit-content;
  color: var(--ink);
}
.top-brand > span:last-child {
  font: 19px var(--serif);
  letter-spacing: 2.5px;
}
.top-brand small {
  display: block;
  font: 6px var(--sans);
  letter-spacing: 2px;
  margin-top: 6px;
  color: #806d5b;
}
.top-monogram {
  font: 31px var(--serif);
  color: var(--gold);
  border: 1px solid #a96b4366;
  width: 35px;
  height: 40px;
  display: grid;
  place-items: center;
}
.topbar .top-actions {
  justify-self: end;
  gap: 15px;
}
.primary-nav {
  display: flex;
  align-items: center;
  gap: 5px;
}
.primary-nav > a,
.nav-more > summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 12px 16px;
  font-size: 11px;
  color: #736758;
  border-radius: 0;
  background: transparent;
  cursor: pointer;
  border-bottom: 1px solid transparent;
  white-space: nowrap;
}
.primary-nav > a.active,
.primary-nav > a:hover,
.nav-more.active > summary,
.nav-more > summary:hover,
.nav-more[open] > summary {
  color: var(--ink);
  background: transparent;
  border-bottom-color: var(--gold);
}
/* The active link's inset rule, which the prototype's sidebar styles once gave every nav link. */
.primary-nav a.active {
  box-shadow: inset 2px 0 #bb855b;
}
.nav-more {
  position: relative;
}
.nav-more summary {
  list-style: none;
}
.nav-more summary::-webkit-details-marker {
  display: none;
}
.nav-more summary:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}
.nav-more[open] > summary > span {
  transform: rotate(180deg);
}
.more-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 12px);
  width: 240px;
  padding: 15px 12px 10px;
  background: #192131;
  border: 1px solid #cdbb9866;
  box-shadow: 0 18px 50px #10172430;
  color: var(--paper);
}
.more-heading {
  display: block;
  padding: 7px 12px 12px;
  font-size: var(--label-size);
  letter-spacing: 1.2px;
  color: var(--sand);
}
.more-panel a {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 13px 12px;
  min-height: 44px;
  font-size: 11px;
  color: #e7ddd0;
  background: transparent;
  border-radius: 0;
}
.more-panel a:hover,
.more-panel a.active {
  color: #fff3e0;
  background: #cdbb9817;
}
.more-panel .more-home {
  margin-top: 8px;
  border-top: 1px solid #cdbb9840;
  color: var(--sand);
  font-size: 10px;
}
.showcase-mode .top-brand,
.chronicle-mode .top-brand,
.landing .top-brand {
  color: var(--paper);
}
.showcase-mode .top-brand small,
.chronicle-mode .top-brand small,
.landing .top-brand small {
  color: var(--sand);
}
.showcase-mode .primary-nav > a,
.chronicle-mode .primary-nav > a,
.showcase-mode .nav-more > summary,
.chronicle-mode .nav-more > summary {
  color: #c7bdaf;
}
.showcase-mode .primary-nav > a.active,
.chronicle-mode .primary-nav > a.active,
.showcase-mode .primary-nav > a:hover,
.chronicle-mode .primary-nav > a:hover,
.showcase-mode .nav-more.active > summary,
.chronicle-mode .nav-more.active > summary,
.showcase-mode .nav-more[open] > summary,
.chronicle-mode .nav-more[open] > summary {
  color: #f0dfc7;
  border-bottom-color: var(--sand);
}
.landing .primary-nav {
  display: none;
}
.landing .topbar {
  grid-template-columns: 1fr auto;
}
.landing .top-actions .icon-button,
.landing .top-actions .avatar {
  display: none;
}
@media (max-width: 1100px) {
  .topbar .preview-badge {
    display: none;
  }
}
@media (max-width: 760px) {
  .topbar {
    height: auto;
    padding: 17px 20px 0;
    gap: 14px;
    grid-template-columns: 1fr auto;
  }
  .top-brand {
    grid-column: 1;
    grid-row: 1;
  }
  .topbar .top-actions {
    grid-column: 2;
    grid-row: 1;
    gap: 10px;
  }
  .primary-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: center;
    gap: 0;
    width: 100%;
  }
  .primary-nav > a,
  .nav-more > summary {
    padding: 12px 15px;
    font-size: 11px;
  }
  .top-brand > span:last-child {
    font-size: 18px;
  }
  .more-panel {
    right: 0;
    width: min(240px, calc(100vw - 40px));
  }
  .landing .topbar {
    padding: 17px 20px;
    height: auto;
  }
}
@media (max-width: 360px) {
  .primary-nav > a,
  .nav-more > summary {
    padding: 12px 11px;
  }
  .top-brand small {
    letter-spacing: 1.2px;
  }
}

/* "YOUR PRIVATE WORLD" under the logo, in the same flat champagne a shade
   darker than the prototype's #806d5b, so the 10px label reaches 4.5:1 on
   the cream top bar (4.8:1). The navy pages keep their own lighter tone. */
.top-brand small {
  color: #766453;
}
@media (max-width: 420px) {
  .landing .top-brand small {
    white-space: nowrap;
  }
  .landing .topbar .top-actions {
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
  }
}

/* Signed in on a narrow phone, the landing page's top bar carries two links,
   "By invitation" and "Your collection"; they stack on the right so the
   brand's "YOUR PRIVATE WORLD" keeps one line. */

/* The signed-in user's avatar and sign-out button in the top bar. */
.account-menu {
  display: flex;
  align-items: center;
  gap: 10px;
}
.account-menu form {
  display: contents;
}
.sign-out {
  font-size: 10px;
  color: var(--muted);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}
.sign-out:hover {
  text-decoration: underline;
}
/* On the navy pages, the top bar's light text colour (9.6:1), as the badge
   beside them. */
.showcase-mode .sign-out,
.chronicle-mode .sign-out {
  color: #c6bcaf;
}
/* The invitation requests table (the admin table with action buttons), as a
   table on wider screens: number, date and status stay on one line, only
   email and note may break mid-word, and the buttons sit side by side in a
   column no wider than they need (stacked on narrower screens), so the
   note takes the spare width. Sightline stacks its tables into cards below
   700px. */
/* On phones the four admin tabs fit on one line with less padding, and wrap
   onto a second rather than hide past the edge on narrower screens. */

/* Keep the footer at the bottom of the window on short pages (sign-in,
   password reset): the workspace fills the viewport and main takes the slack.
   main keeps the prototype's centred max-width without auto vertical margins. */
.workspace {
  display: flex;
  flex-direction: column;
}
.workspace > main {
  flex: 1 0 auto;
  width: 100%;
  margin: 0 auto;
}
