@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@600;700;800&family=Cormorant+Garamond:wght@500;600;700&family=Source+Serif+4:wght@400;500;600&display=swap");

:root {
  --brand-yellow: #ffe135;
  --brand-ink: #050505;
  --brand-paper: #f7f5f0;
  --brand-surface: #fafaf8;
  --brand-surface-alt: #f0eee9;
  --brand-border: #d8d4cc;
  --brand-mid: #6c6c6c;
  --brand-success: #4f7a58;
  --brand-warning: #d39b18;
  --brand-error: #a33a32;
  --brand-info: #3f5f8e;
  --text-primary: #18181b;
  --text-secondary: #3f3f46;
  --text-tertiary: #71717a;
  --text-placeholder: #a1a1aa;
  --overlay-backdrop: rgba(0, 0, 0, 0.16);
  --overlay-panel: #111111;
  --overlay-text: #faf9f6;
  --overlay-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  --page-width: 1120px;
  --focus-ring: #ffe135;
  --page-background: var(--brand-paper);
  --panel-background: #ffffff;
  --panel-muted: var(--brand-surface);
  --panel-alt: var(--brand-surface-alt);
  --border-strong: var(--brand-ink);
  --border-soft: var(--brand-border);
  --button-text: var(--brand-ink);
  --status-muted-bg: var(--brand-surface);
  --status-muted-text: var(--text-secondary);
}

body.dark {
  --brand-yellow: #b09b12;
  --brand-ink: #faf9f6;
  --brand-paper: #090909;
  --brand-surface: #151515;
  --brand-surface-alt: #1b1b1b;
  --brand-border: rgba(255, 255, 255, 0.16);
  --brand-mid: rgba(250, 249, 246, 0.58);
  --brand-success: #305238;
  --brand-warning: #7b5a12;
  --brand-error: #6f2f2a;
  --brand-info: #26466f;
  --text-primary: #faf9f6;
  --text-secondary: rgba(250, 249, 246, 0.82);
  --text-tertiary: rgba(250, 249, 246, 0.58);
  --text-placeholder: rgba(250, 249, 246, 0.42);
  --overlay-backdrop: rgba(0, 0, 0, 0.58);
  --overlay-panel: #111111;
  --overlay-text: #faf9f6;
  --overlay-shadow: 0 10px 32px rgba(0, 0, 0, 0.42);
  --focus-ring: #b09b12;
  --page-background: #090909;
  --panel-background: #111111;
  --panel-muted: #151515;
  --panel-alt: #1b1b1b;
  --border-strong: rgba(255, 255, 255, 0.16);
  --border-soft: rgba(255, 255, 255, 0.16);
  --button-text: var(--brand-ink);
  --status-muted-bg: #181818;
  --status-muted-text: rgba(250, 249, 246, 0.82);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  min-width: 0;
}

html {
  color-scheme: light;
}

body.dark {
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--page-background);
  color: var(--text-primary);
  font-family: "Source Serif 4", Georgia, serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--brand-yellow);
  color: #000000;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

.wrap,
.hero-content,
.section-content,
.survey-footer,
.survey-hero > header {
  width: min(var(--page-width), calc(100% - 2rem));
  margin: 0 auto;
}

.wrap {
  padding: 2.5rem 0 4rem;
}

body.has-site-header {
  padding-top: var(--site-header-height, 5rem);
}

body.has-site-header.has-session-card {
  --site-header-height: 6.75rem;
  --brand-lockup-width: min(20vw, 100%);
}

#site-header-root {
  display: contents;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2000;
  background: var(--page-background);
  border-bottom: 1px solid var(--border-strong);
}

.topbar {
  display: flex;
  min-height: 5rem;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem max(1rem, calc((100vw - var(--page-width)) / 2));
}

body.has-site-header.has-session-card .topbar {
  min-height: 6.25rem;
  padding-bottom: 0.85rem;
}

body.has-site-header.has-session-card .brand-lockup {
  flex: 1;
  justify-items: start;
}

body.has-site-header.has-session-card .brand-title {
  width: var(--brand-lockup-width);
  max-width: 100%;
  min-width: 0;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.has-site-header.has-session-card .session-card-bar {
  width: var(--brand-lockup-width);
  max-width: 100%;
  min-width: 0;
  justify-content: flex-start;
}

body.has-site-header.has-session-card .session-card {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.session-card-bar {
  display: flex;
  justify-content: flex-start;
  width: 100%;
  max-width: 36rem;
}

.session-card-bar[hidden] {
  display: none;
}

.session-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.7rem;
  width: 100%;
  padding: 0.45rem 0.65rem 0.45rem 0.5rem;
  border: 1px solid var(--border-soft);
  border-radius: 0.75rem;
  background: var(--panel-background);
  box-shadow: 0 1px 0 color-mix(in srgb, var(--brand-ink) 4%, transparent);
}

.session-card[hidden] {
  display: none;
}

.session-card__avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 999px;
  background: var(--brand-yellow);
  color: #050505;
  font-family: "Montserrat", sans-serif;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1;
  text-transform: uppercase;
  user-select: none;
}

.session-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 0;
  flex: 1 1 auto;
}

.session-card__header {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  width: 100%;
  min-width: 0;
  margin: 0;
  line-height: 1.15;
}

.session-card__status {
  flex: 0 0 auto;
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 999px;
  background: var(--brand-success);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand-success) 22%, transparent);
}

.session-card__label {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin: 0;
  font-family: "Montserrat", sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text-primary);
}

.session-card__label[hidden] {
  display: none;
}

.session-card__line {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  width: 100%;
  min-width: 0;
  margin: 0;
  line-height: 1.15;
  white-space: nowrap;
}

.session-card__org {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: "Montserrat", sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--text-primary);
}

.session-card__org[hidden] {
  display: none;
}

.session-card__email {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 0.78rem;
  color: var(--text-tertiary);
}

.session-card__role {
  flex: 0 0 auto;
  margin-left: auto;
  padding: 0.15rem 0.45rem;
  border: 1px solid color-mix(in srgb, var(--brand-yellow) 55%, var(--border-soft));
  border-radius: 999px;
  background: color-mix(in srgb, var(--brand-yellow) 22%, var(--panel-background));
  color: var(--text-secondary);
  font-family: "Montserrat", sans-serif;
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.session-card__role[hidden] {
  display: none;
}

body.dark .session-card {
  background: var(--panel-muted);
  box-shadow: none;
}

body.dark .session-card__avatar {
  color: #050505;
}

body.dark .session-card__role {
  background: color-mix(in srgb, var(--brand-yellow) 18%, var(--panel-background));
  border-color: color-mix(in srgb, var(--brand-yellow) 40%, var(--border-soft));
  color: var(--text-secondary);
}

.brand-lockup {
  display: grid;
  gap: 0.55rem;
  align-content: start;
  min-width: 0;
}

.brand-title,
.logo {
  margin: 0;
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1.2;
  text-transform: uppercase;
}

.brand-title {
  font-size: 1.45em;
}

.logo {
  font-size: 0.9rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-left: auto;
}

.nav-link[hidden] {
  display: none;
}

.nav-link,
.back-link,
.panel a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.2rem 0;
  border-bottom: 2px solid transparent;
  color: var(--text-secondary);
  font-family: "Montserrat", sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition:
    color 150ms ease,
    border-color 150ms ease;
}

.nav-link:hover,
.nav-link:focus-visible,
.back-link:hover,
.back-link:focus-visible,
.panel a:hover,
.panel a:focus-visible {
  color: var(--text-primary);
  border-color: var(--brand-yellow);
}

.nav-link--active,
.nav-link[aria-current="page"] {
  color: var(--text-primary);
  border-bottom-color: var(--brand-yellow);
}

.nav-link--active:hover,
.nav-link--active:focus-visible,
.nav-link[aria-current="page"]:hover,
.nav-link[aria-current="page"]:focus-visible {
  color: var(--text-primary);
  border-bottom-color: var(--brand-yellow);
}

.theme-toggle {
  display: inline-flex;
  height: 2.75rem;
  width: 2.75rem;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--panel-background);
  color: var(--text-primary);
  transition:
    background-color 150ms ease,
    color 150ms ease,
    border-color 150ms ease,
    transform 150ms ease;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  background: var(--panel-muted);
  border-color: var(--brand-yellow);
  transform: translateY(-1px);
}

.theme-toggle svg {
  width: 1.25rem;
  height: 1.25rem;
}

header nav[aria-label="Primary"] button:not(.theme-toggle):not(.nav-signin-button),
.button-primary,
.card-action {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  justify-content: center;
  padding: 0 1rem;
  border: 1px solid var(--border-strong);
  border-radius: 0.375rem;
  background: var(--brand-yellow);
  color: var(--button-text);
  font-family: "Montserrat", sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition:
    background-color 150ms ease,
    color 150ms ease,
    transform 150ms ease;
}

header nav[aria-label="Primary"] button[hidden],
header nav[aria-label="Primary"] .nav-signin-button[hidden] {
  display: none !important;
}

header nav[aria-label="Primary"] button:not(.theme-toggle):not(.nav-signin-button):hover,
header nav[aria-label="Primary"] button:not(.theme-toggle):not(.nav-signin-button):focus-visible,
.button-primary:hover,
.button-primary:focus-visible,
.card-action:hover,
.card-action:focus-visible {
  background: var(--brand-ink);
  color: var(--brand-yellow);
  transform: translateY(-1px);
}

.hero-badge,
.section-kicker,
.status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 2rem;
  padding: 0.35rem 0.8rem;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--brand-yellow);
  color: var(--button-text);
  font-family: "Montserrat", sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.page-hero,
.hero-content,
.section-content,
.content-panel,
.panel,
.benefit-item,
.spec-card {
  border: 1px solid var(--border-soft);
  background: var(--panel-background);
}

.page-hero,
.hero-content,
.section-content,
.content-panel {
  padding: 2rem;
}

.page-hero,
.hero-content {
  display: grid;
  gap: 2rem;
  align-items: start;
}

.page-title,
.hero-text h1,
.survey-section h2,
.panel h1,
.card h1,
.section-title,
.name {
  margin: 0;
  color: var(--text-primary);
  font-family: "Montserrat", sans-serif;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 0.95;
  text-transform: uppercase;
}

.page-title,
.hero-text h1 {
  font-size: clamp(2.4rem, 6vw, 4.4rem);
  max-width: 12ch;
}

.section-title,
.survey-section h2,
.panel h1,
.card h1 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
}

.hero-copy-block,
.hero-text {
  display: grid;
  gap: 1rem;
}

.subtitle,
.hero-copy {
  margin: 0;
  max-width: 40rem;
  color: var(--text-secondary);
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  font-weight: 600;
  line-height: 1.3;
}

.survey-section p,
.meta,
#status {
  margin: 0;
  color: var(--text-secondary);
  font-size: 1rem;
}

.hero-stats,
.benefits,
.specs-grid {
  display: grid;
  gap: 1rem;
}

.hero-stats {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hero-stat {
  border: 1px solid var(--border-soft);
  background: var(--panel-muted);
  padding: 1.25rem;
}

.hero-stat strong {
  display: block;
  margin-bottom: 0.6rem;
  color: var(--text-primary);
  font-family: "Montserrat", sans-serif;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  text-transform: uppercase;
}

.hero-stat span {
  display: block;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.5;
}

.content-panel {
  margin-top: 2rem;
}

.section-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-soft);
}

.section-kicker {
  margin-bottom: 0.75rem;
}

.toolbar {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.search-shell {
  display: flex;
  width: min(100%, 28rem);
  align-items: center;
  gap: 0.75rem;
  border: 1px solid var(--border-strong);
  background: var(--panel-muted);
  padding: 0 1rem;
}

.search-shell svg {
  flex: none;
  width: 1.1rem;
  height: 1.1rem;
  color: var(--text-tertiary);
}

.toolbar input,
input[type="search"],
input[type="text"],
textarea {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 0.95rem 0;
  color: var(--text-primary);
  font-size: 1rem;
}

.toolbar input::placeholder,
input[type="search"]::placeholder,
input[type="text"]::placeholder,
textarea::placeholder {
  color: var(--text-placeholder);
}

.toolbar input:focus,
input[type="search"]:focus,
input[type="text"]:focus,
textarea:focus {
  outline: none;
}

.search-shell:focus-within {
  box-shadow: inset 0 0 0 1px var(--border-strong), 0 0 0 2px var(--focus-ring);
}

.state {
  display: flex;
  min-height: 9rem;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-soft);
  background: var(--panel-muted);
  padding: 1.5rem;
  color: var(--text-secondary);
  text-align: center;
}

.state.error,
.panel.error {
  border-left: 4px solid var(--brand-error);
}

.error {
  color: var(--brand-error);
}

.empty-state {
  border-style: dashed;
}

.recovery-panel-wrap {
  flex-direction: column;
  gap: 1rem;
  min-height: 11rem;
  padding: 2rem 1.5rem;
}

.recovery-panel {
  display: grid;
  gap: 0.75rem;
  max-width: 28rem;
}

.recovery-panel__title {
  margin: 0;
  font-family: "Montserrat", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-primary);
}

.recovery-panel__message {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.55;
}

.recovery-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 0.35rem;
}

.button-secondary {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  justify-content: center;
  padding: 0 1rem;
  border: 1px solid var(--border-strong);
  border-radius: 0.375rem;
  background: var(--panel-background);
  color: var(--text-primary);
  font-family: "Montserrat", sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color 150ms ease,
    color 150ms ease,
    transform 150ms ease,
    border-color 150ms ease;
}

.button-secondary:hover,
.button-secondary:focus-visible {
  background: var(--panel-muted);
  border-color: var(--brand-yellow);
  transform: translateY(-1px);
}

.access-denied-panel {
  margin-top: 0;
}

.access-denied-panel__copy {
  display: grid;
  gap: 1rem;
  max-width: 40rem;
}

.access-denied-panel__title {
  margin: 0;
}

.access-denied-panel__message {
  margin: 0;
}

.access-denied-panel__hint,
.access-denied-panel__redirect {
  margin: 0;
}

.access-denied-panel__actions {
  justify-content: flex-start;
  margin-top: 0.25rem;
}

.access-notice-banner {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding: 1rem 1.15rem;
  border: 1px solid var(--border-soft);
  border-left: 4px solid var(--brand-info);
  background: color-mix(in srgb, var(--panel-background) 88%, var(--brand-info) 12%);
}

.access-notice-banner[hidden] {
  display: none;
}

.access-notice-banner__message {
  margin: 0;
  max-width: 52rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.access-notice-banner__dismiss {
  flex: 0 0 auto;
  min-height: 2.25rem;
  padding: 0 0.85rem;
  border: 1px solid var(--border-strong);
  border-radius: 0.375rem;
  background: var(--panel-background);
  color: var(--text-primary);
  font-family: "Montserrat", sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
}

.access-notice-banner__dismiss:hover,
.access-notice-banner__dismiss:focus-visible {
  border-color: var(--brand-yellow);
  background: var(--panel-muted);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

/* Projects library: card columns capped at one-third of the content width (wide viewports) */
.projects-page .grid {
  gap: 1.5rem;
}

@media (min-width: 901px) {
  .projects-page .grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) and (min-width: 561px) {
  .projects-page .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .projects-page .grid {
    grid-template-columns: 1fr;
  }
}

.grid > .state {
  grid-column: 1 / -1;
}

.card {
  overflow: hidden;
  border: 1px solid var(--border-strong);
  background: var(--panel-background);
  transition:
    transform 150ms ease,
    border-color 150ms ease,
    background-color 150ms ease;
}

.card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

.card:hover,
.card:focus-within,
.card-link:hover,
.card-link:focus-visible {
  transform: translateY(-2px);
  background: var(--panel-muted);
}

.card-link:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

.card-link:hover .card-action,
.card-link:focus-visible .card-action {
  background: var(--brand-ink);
  color: var(--brand-yellow);
  transform: translateY(-1px);
}

.thumb-wrap {
  aspect-ratio: 4 / 3;
  border-bottom: 1px solid var(--border-strong);
  background: var(--panel-alt);
  padding: 1.25rem;
}

.thumb {
  height: 100%;
  width: 100%;
  border: 1px solid color-mix(in srgb, var(--border-strong) 55%, transparent);
  background: var(--brand-paper);
  object-fit: cover;
}

.card-body {
  display: flex;
  flex: 1;
  min-height: 15rem;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1.25rem;
}

.card-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 0.75rem;
}

.card-header__meta {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 0.35rem;
}

.card-company {
  margin: 0;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 0.82rem;
  line-height: 1.3;
  color: var(--text-secondary);
}

.name {
  display: -webkit-box;
  overflow: hidden;
  font-size: 1.3rem;
  line-height: 1.05;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-copy {
  display: -webkit-box;
  overflow: hidden;
  max-width: 34ch;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.meta {
  color: var(--text-secondary);
}

.meta--small {
  color: var(--text-tertiary);
  font-family: "Montserrat", sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.status {
  gap: 0.45rem;
}

.status::before {
  content: "";
  height: 0.5rem;
  width: 0.5rem;
  border-radius: 999px;
  background: currentColor;
}

.status--live {
  border-color: #79b084;
  background: #4f7a58;
  color: #ffffff;
}

.status--archived {
  border-color: var(--border-soft);
  background: var(--status-muted-bg);
  color: var(--status-muted-text);
}

.card-footer {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--border-soft);
}

.card-footer .card-action {
  flex: 0 0 auto;
  min-width: 8.5rem;
  justify-content: center;
  text-align: center;
}

.card-timestamps {
  display: grid;
  flex: 0 0 9rem;
  gap: 0.3rem;
}

.card-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 7rem 1rem 2rem;
}

body.auth-page.card-page.has-site-header {
  padding-top: calc(var(--site-header-height, 5rem) + 2rem);
}

.site-header--minimal .topbar {
  min-height: 4.25rem;
}

/* Home page overlay nav (index.html) */
body.home-page.has-site-header[data-site-header-overlay] {
  padding-top: 0;
}

body.site-header-overlay-open {
  overflow: hidden;
}

body.site-header-overlay-open .site-header__menu-toggle {
  display: none;
}

.site-header--overlay {
  background: transparent;
  border-bottom: none;
  pointer-events: none;
}

.site-header__menu-toggle {
  position: fixed;
  top: 1rem;
  right: max(1rem, calc((100vw - var(--page-width)) / 2));
  z-index: 2100;
  display: inline-flex;
  height: 2.75rem;
  width: 2.75rem;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid rgba(250, 249, 246, 0.45);
  border-radius: 999px;
  background: rgba(5, 5, 5, 0.42);
  color: #faf9f6;
  backdrop-filter: blur(8px);
  pointer-events: auto;
  transition:
    background-color 150ms ease,
    border-color 150ms ease,
    color 150ms ease,
    transform 150ms ease;
}

.site-header__menu-toggle svg {
  width: 1.2rem;
  height: 1.2rem;
}

.site-header__menu-toggle:hover,
.site-header__menu-toggle:focus-visible {
  border-color: var(--brand-yellow);
  background: var(--brand-yellow);
  color: var(--brand-ink);
  transform: translateY(-1px);
}

.site-header__title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  min-width: 0;
}

.site-header__title-row .brand-title {
  min-width: 0;
}

.site-header--with-drawer .site-header__menu-toggle {
  position: static;
  top: auto;
  right: auto;
  flex-shrink: 0;
  border-color: var(--border-strong);
  background: var(--panel-background);
  color: var(--text-primary);
  backdrop-filter: none;
  display: none;
}

.site-header--overlay .site-header__overlay,
.site-header--with-drawer .site-header__overlay {
  position: fixed;
  inset: 0;
  z-index: 2050;
  pointer-events: auto;
}

.site-header--overlay .site-header__overlay[hidden],
.site-header--with-drawer .site-header__overlay[hidden] {
  display: none;
}

.site-header__overlay-scrim {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(5, 5, 5, 0.62);
  cursor: pointer;
}

.site-header__overlay-panel {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  width: min(22rem, 88vw);
  height: 100%;
  flex-direction: column;
  gap: 1.25rem;
  padding: 1.25rem 1.25rem 1.5rem;
  padding-top: max(1.25rem, env(safe-area-inset-top));
  padding-right: max(1.25rem, env(safe-area-inset-right));
  padding-bottom: max(1.5rem, env(safe-area-inset-bottom));
  border-left: 1px solid var(--border-strong);
  background: var(--page-background);
  box-shadow: -12px 0 40px rgba(0, 0, 0, 0.28);
  overflow-y: auto;
  animation: site-header-overlay-in 220ms ease;
}

@keyframes site-header-overlay-in {
  from {
    transform: translateX(100%);
  }

  to {
    transform: translateX(0);
  }
}

.site-header__overlay-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 0.75rem;
}

.site-header__overlay-header .brand-title {
  margin: 0;
  padding-top: 0.15rem;
}

.site-header__overlay-close {
  display: inline-flex;
  height: 2.5rem;
  width: 2.5rem;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--panel-background);
  color: var(--text-primary);
  transition:
    background-color 150ms ease,
    border-color 150ms ease,
    color 150ms ease;
}

.site-header__overlay-close svg {
  width: 1.1rem;
  height: 1.1rem;
}

.site-header__overlay-close:hover,
.site-header__overlay-close:focus-visible {
  border-color: var(--brand-yellow);
  background: var(--panel-muted);
}

.site-header--overlay .session-card-bar,
.site-header--with-drawer .site-header__overlay .session-card-bar {
  width: 100%;
  max-width: none;
}

.site-header__overlay-nav {
  flex-direction: column;
  align-items: stretch;
  gap: 0.35rem;
  margin-left: 0;
}

.site-header__overlay-nav .nav-link,
.site-header__overlay-nav .nav-signin-button,
.site-header__overlay-nav .nav-logout-button {
  justify-content: flex-start;
  width: 100%;
  min-height: 2.75rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid transparent;
  border-radius: 0.375rem;
  border-bottom: 1px solid transparent;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
}

.site-header__overlay-nav .nav-link:hover,
.site-header__overlay-nav .nav-link:focus-visible,
.site-header__overlay-nav .nav-link--active,
.site-header__overlay-nav .nav-link[aria-current="page"] {
  border-color: var(--border-soft);
  border-bottom-color: var(--border-soft);
  background: var(--panel-muted);
}

.site-header__overlay-nav .nav-link--active,
.site-header__overlay-nav .nav-link[aria-current="page"] {
  border-color: color-mix(in srgb, var(--brand-yellow) 45%, var(--border-soft));
}

.site-header__overlay-nav .nav-signin-button,
.site-header__overlay-nav .nav-logout-button {
  margin-top: 0.35rem;
}

.site-header__overlay-nav .theme-toggle {
  align-self: flex-start;
  margin-top: 0.5rem;
}

@media (prefers-reduced-motion: reduce) {
  .site-header__overlay-panel {
    animation: none;
  }

  .site-header__menu-toggle:hover,
  .site-header__menu-toggle:focus-visible {
    transform: none;
  }
}

@media (max-width: 720px) {
  .site-header--overlay .site-header__menu-toggle {
    top: max(0.875rem, env(safe-area-inset-top));
    right: max(0.875rem, env(safe-area-inset-right));
  }

  .site-header--with-drawer .site-header__desktop-nav {
    display: none;
  }

  .site-header--with-drawer .site-header__menu-toggle {
    display: inline-flex;
  }

  body.site-header-overlay-open .site-header--with-drawer .site-header__menu-toggle {
    display: none;
  }
}

@media (min-width: 721px) {
  .site-header--with-drawer .site-header__overlay {
    display: none !important;
  }
}

.panel {
  width: min(100%, 34rem);
  padding: 2rem;
}

.panel h1 {
  margin-bottom: 1rem;
}

.panel p + p {
  margin-top: 1rem;
}

.auth-card {
  display: grid;
  gap: 1rem;
}

.loading {
  position: fixed;
  inset: 0;
  z-index: 20000;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background:
    radial-gradient(circle at top, rgba(255, 225, 53, 0.16), transparent 30%),
    var(--page-background);
}

.loading .panel {
  max-width: 30rem;
  border-color: var(--border-strong);
  background: var(--panel-background);
  box-shadow: var(--overlay-shadow);
}

.loading.hidden {
  display: none;
}

.survey-hero {
  padding: 2rem 0 2rem;
}

body.has-site-header .survey-hero {
  padding-top: 2rem;
}

.survey-section {
  padding: 0 0 1.5rem;
}

.survey-section h2 {
  margin-bottom: 1rem;
}

.survey-section p + p {
  margin-top: 1rem;
}

.benefits,
.specs-grid {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  margin-top: 1.75rem;
}

.benefit-item,
.spec-card {
  padding: 1.5rem;
}

.benefit-item h3,
.spec-card h3 {
  margin: 0 0 0.9rem;
  color: var(--text-primary);
  font-family: "Montserrat", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1.2;
  text-transform: uppercase;
}

.spec-card ul {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--text-secondary);
}

.spec-card li + li {
  margin-top: 0.5rem;
}

.survey-section.dark .section-content {
  background: var(--panel-muted);
  border-color: var(--border-strong);
}

.survey-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 2rem 0 3rem;
  border-top: 1px solid var(--border-strong);
  color: var(--text-tertiary);
}

.survey-footer__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
}

.survey-footer__links a {
  color: var(--text-secondary);
  font-family: "Montserrat", sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

.survey-footer__links a:hover,
.survey-footer__links a:focus-visible {
  color: var(--text-primary);
  border-color: var(--brand-yellow);
}

.viewer-page {
  overflow: hidden;
  background: #050505;
  --viewer-chrome-bar-height: 3rem;
  --viewer-chrome-height: 3rem;
}

#viewer-chrome-root {
  display: contents;
}

.viewer-chrome {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 25000;
  border-bottom: 1px solid var(--border-strong);
  background: var(--page-background);
}

.viewer-chrome__inner {
  display: flex;
  min-height: var(--viewer-chrome-bar-height);
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0 0.75rem;
}

.viewer-chrome__brand {
  overflow: hidden;
  font-family: "Montserrat", sans-serif;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1.2;
  text-decoration: none;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.viewer-chrome__nav {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 0.65rem;
}

.viewer-chrome__mobile-controls {
  display: none;
  flex-shrink: 0;
  align-items: center;
  gap: 0.45rem;
}

.viewer-chrome__menu {
  position: relative;
}

.viewer-chrome__menu-toggle {
  display: inline-flex;
  height: 2.5rem;
  width: 2.5rem;
  list-style: none;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--panel-background);
  color: var(--text-primary);
  cursor: pointer;
}

.viewer-chrome__menu-toggle::-webkit-details-marker {
  display: none;
}

.viewer-chrome__menu-toggle svg {
  width: 1.15rem;
  height: 1.15rem;
}

.viewer-chrome__menu-toggle:hover,
.viewer-chrome__menu-toggle:focus-visible,
.viewer-chrome__menu[open] .viewer-chrome__menu-toggle {
  border-color: var(--brand-yellow);
  background: var(--brand-yellow);
  color: var(--brand-ink);
  outline: none;
}

.viewer-chrome__menu-panel {
  position: absolute;
  top: calc(100% + 0.4rem);
  right: 0;
  z-index: 2;
  display: flex;
  min-width: 11rem;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.5rem;
  border: 1px solid var(--border-strong);
  background: var(--page-background);
  box-shadow: var(--overlay-shadow);
}

.viewer-chrome__menu-panel .viewer-chrome__link {
  min-height: 2.75rem;
  padding: 0.55rem 0.75rem;
  font-size: 0.68rem;
}

.viewer-chrome__link {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0;
  border-bottom: 2px solid transparent;
  font-family: "Montserrat", sans-serif;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-decoration: none;
  text-transform: uppercase;
  transition:
    color 150ms ease,
    border-color 150ms ease;
}

/*
 * Potree sets `a:link/visited/hover/active { color: #ccccff }`, which outranks
 * a bare class selector and washes out the chrome on light backgrounds.
 * Scope + :any-link raises specificity above that global rule.
 */
.viewer-chrome a.viewer-chrome__brand:any-link,
.viewer-chrome a.viewer-chrome__brand:hover,
.viewer-chrome a.viewer-chrome__brand:active,
.viewer-chrome a.viewer-chrome__brand:focus-visible,
.viewer-chrome a.viewer-chrome__link:any-link,
.viewer-chrome a.viewer-chrome__link:hover,
.viewer-chrome a.viewer-chrome__link:active,
.viewer-chrome a.viewer-chrome__link:focus-visible {
  color: var(--brand-ink);
}

.viewer-chrome__brand:hover,
.viewer-chrome__brand:focus-visible {
  border-bottom: 2px solid var(--brand-yellow);
}

.viewer-chrome__link:hover,
.viewer-chrome__link:focus-visible {
  border-bottom-color: var(--brand-yellow);
}

.viewer-chrome .theme-toggle {
  height: 2.25rem;
  width: 2.25rem;
}

body.has-viewer-chrome .potree_container {
  position: fixed;
  top: var(--viewer-chrome-height);
  right: 0;
  bottom: 0;
  left: 0;
}

body.has-viewer-chrome.viewer-page #potree_quick_buttons {
  top: calc(var(--viewer-chrome-height) + 0.75rem);
}

@media (max-width: 720px) {
  .viewer-page {
    --viewer-chrome-bar-height: 2.75rem;
    --viewer-chrome-height: 2.75rem;
  }

  .viewer-chrome {
    padding-top: env(safe-area-inset-top);
  }

  .viewer-chrome__inner {
    padding-left: max(0.5rem, env(safe-area-inset-left));
    padding-right: max(0.5rem, env(safe-area-inset-right));
  }

  .viewer-chrome__brand {
    max-width: min(14rem, 55vw);
    font-size: 0.62rem;
  }

  .viewer-chrome__nav--desktop {
    display: none;
  }

  .viewer-chrome__mobile-controls {
    display: inline-flex;
  }
}

.pcuk-demo-banner {
  position: fixed;
  z-index: 99999;
  color: #fff;
  font-size: 0.88rem;
}

.pcuk-demo-banner--corner {
  top: calc(var(--viewer-chrome-height, 3rem) + 0.75rem);
  right: 0.75rem;
  left: auto;
  bottom: auto;
}

.pcuk-demo-banner__chip {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.1rem;
  padding: 0 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(20, 20, 20, 0.82);
  color: #fff;
  font-family: "Montserrat", sans-serif;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  transition:
    opacity 0.25s ease,
    visibility 0.25s ease,
    background-color 150ms ease,
    color 150ms ease,
    border-color 150ms ease;
}

.pcuk-demo-banner__chip:hover,
.pcuk-demo-banner__chip:focus-visible {
  background: var(--brand-yellow);
  border-color: #050505;
  color: #050505;
  outline: none;
}

.pcuk-demo-banner__panel {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: min(22rem, calc(100vw - 1.5rem));
  padding: 0.85rem 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  background: rgba(20, 20, 20, 0.88);
  backdrop-filter: blur(12px);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35);
  transform-origin: top right;
  transform: scale(1) translateY(0);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition:
    transform 0.42s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.32s ease,
    visibility 0.32s ease;
}

.pcuk-demo-banner__text {
  line-height: 1.5;
  margin: 0;
}

/* Minimised: only the chip shows; panel scales away into the corner */
.pcuk-demo-banner--corner.is-auto-hidden .pcuk-demo-banner__panel {
  transform: scale(0.72) translateY(-0.35rem);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.pcuk-demo-banner--corner:not(.is-auto-hidden) .pcuk-demo-banner__chip {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

body.dark .pcuk-demo-banner__chip,
body.dark .pcuk-demo-banner__panel {
  background: rgba(10, 10, 10, 0.88);
}

.pcuk-demo-banner strong {
  font-weight: 700;
}

.pcuk-demo-actions {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  gap: 0.5rem;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 0.35rem;
}

.pcuk-demo-actions .pcuk-demo-banner__btn,
.pcuk-demo-actions .pcuk-demo-change-scene {
  width: 100%;
  max-width: 14rem;
}

.pcuk-demo-actions .pcuk-demo-banner__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.4rem;
  padding: 0 0.9rem;
  border: 1px solid #050505;
  border-radius: 0.375rem;
  background: var(--brand-yellow);
  color: #050505;
  font-family: "Montserrat", sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background-color 150ms ease,
    color 150ms ease,
    border-color 150ms ease,
    transform 150ms ease;
}

.pcuk-demo-actions .pcuk-demo-banner__btn:hover,
.pcuk-demo-actions .pcuk-demo-banner__btn:focus-visible {
  background: #050505;
  color: var(--brand-yellow);
  border-color: var(--brand-yellow);
  transform: translateY(-1px);
}

.pcuk-demo-actions .pcuk-demo-change-scene {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  min-height: 2.4rem;
  padding: 0 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 0.375rem;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-family: "Montserrat", sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition:
    background-color 150ms ease,
    border-color 150ms ease,
    color 150ms ease,
    transform 150ms ease;
}

.pcuk-demo-actions .pcuk-demo-change-scene:hover,
.pcuk-demo-actions .pcuk-demo-change-scene:focus-visible {
  background: rgba(255, 255, 255, 0.16);
  border-color: var(--brand-yellow);
  color: #fff;
  transform: translateY(-1px);
}

.pcuk-demo-reset-modal[hidden],
.pcuk-confirm-modal[hidden] {
  display: none;
}

.pcuk-demo-reset-modal,
.pcuk-confirm-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: grid;
  place-items: center;
  background: var(--overlay-backdrop);
  padding: 16px;
}

.pcuk-demo-reset-modal__panel,
.pcuk-confirm-modal__panel {
  width: min(440px, 100%);
  border: 1px solid var(--border-strong);
  border-radius: 0.75rem;
  background: var(--panel-background);
  color: var(--text-primary);
  box-shadow: var(--overlay-shadow);
  padding: 1rem;
}

.pcuk-demo-reset-modal__panel h2,
.pcuk-confirm-modal__panel h2 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pcuk-demo-reset-modal__panel p,
.pcuk-confirm-modal__panel p {
  margin: 0 0 1rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.pcuk-confirm-modal__panel p strong {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--text-primary);
  font-weight: 700;
}

.pcuk-demo-reset-modal__actions,
.pcuk-confirm-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

.pcuk-demo-reset-modal__cancel,
.pcuk-confirm-modal__cancel {
  background: var(--panel-muted);
}

.pcuk-demo-reset-modal__cancel:hover,
.pcuk-demo-reset-modal__cancel:focus-visible,
.pcuk-confirm-modal__cancel:hover,
.pcuk-confirm-modal__cancel:focus-visible {
  background: var(--panel-alt);
  color: var(--text-primary);
}

/* ── Scene picker (demo.html) ─────────────────────────────── */

.pcuk-scene-picker[hidden] {
  display: none;
}

.pcuk-scene-picker {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: grid;
  place-items: center;
  padding: 2rem 1.25rem 3rem;
  overflow: auto;
  background:
    radial-gradient(circle at 18% 8%, rgba(255, 225, 53, 0.1), transparent 40%),
    radial-gradient(circle at 82% 92%, rgba(255, 255, 255, 0.04), transparent 38%),
    #080808;
  color: #faf9f6;
}

.pcuk-scene-picker .pcuk-loading-particles {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .pcuk-scene-picker .pcuk-loading-particles {
    display: none;
  }
}

.pcuk-scene-picker__center {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(34rem, 100%);
  text-align: center;
}

.pcuk-scene-picker__center .hero-badge {
  margin-bottom: 1.5rem;
}

.pcuk-scene-picker__icon {
  display: flex;
  width: 4rem;
  height: 4rem;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--brand-yellow);
  color: var(--brand-ink);
}

.pcuk-scene-picker__icon svg {
  width: 1.75rem;
  height: 1.75rem;
}

.pcuk-scene-picker__title {
  margin: 0 0 0.5rem;
  color: #faf9f6;
  font-family: "Montserrat", sans-serif;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  text-transform: uppercase;
}

.pcuk-scene-picker__lead {
  margin: 0 0 1.75rem;
  max-width: 40ch;
  color: rgba(250, 249, 246, 0.68);
  font-size: 1rem;
  line-height: 1.55;
}

.pcuk-scene-picker__list {
  list-style: none;
  display: grid;
  gap: 0.65rem;
  width: 100%;
  margin: 0 0 1.25rem;
  padding: 0;
  text-align: left;
}

.pcuk-scene-picker__item {
  display: block;
}

.pcuk-scene-picker__option {
  display: grid;
  grid-template-columns: 7.5rem 1fr auto;
  gap: 0.85rem;
  align-items: center;
  width: 100%;
  padding: 0.85rem;
  border: 1px solid var(--border-soft);
  border-radius: 0.5rem;
  background: var(--panel-background);
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
  transition:
    background-color 150ms ease,
    border-color 150ms ease,
    transform 150ms ease;
}

.pcuk-scene-picker__option:hover,
.pcuk-scene-picker__option:focus-visible {
  border-color: var(--border-strong);
  transform: translateY(-1px);
  outline: none;
}

.pcuk-scene-picker__option:focus-visible {
  box-shadow: 0 0 0 2px #080808, 0 0 0 4px var(--focus-ring);
}

.pcuk-scene-picker__option.is-selected {
  border-color: var(--border-strong);
  background: var(--panel-muted);
  box-shadow: inset 0 0 0 1px var(--border-strong);
}

.pcuk-scene-picker__option.is-selected:hover,
.pcuk-scene-picker__option.is-selected:focus-visible {
  background: var(--brand-yellow);
}

.pcuk-scene-picker__thumb {
  display: block;
  width: 7.5rem;
  height: 5rem;
  flex-shrink: 0;
  overflow: hidden;
  object-fit: cover;
  object-position: center;
  border: 1px solid var(--border-soft);
  border-radius: 0.375rem;
  background: var(--panel-alt);
}

.pcuk-scene-picker__meta {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}

.pcuk-scene-picker__meta strong {
  font-family: "Montserrat", sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1.3;
  text-transform: uppercase;
}

.pcuk-scene-picker__meta span {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.4;
}

.pcuk-scene-picker__badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 0.15rem 0.5rem;
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  background: var(--panel-background);
  color: var(--text-tertiary);
  font-family: "Montserrat", sans-serif;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}

.pcuk-scene-picker__option.is-selected .pcuk-scene-picker__badge {
  border-color: var(--border-strong);
  color: var(--text-secondary);
}

.pcuk-scene-picker__actions {
  display: grid;
  gap: 0.65rem;
  width: 100%;
}

.pcuk-scene-picker__actions .button-primary,
.pcuk-scene-picker__actions .button-secondary {
  width: 100%;
}

.pcuk-scene-picker__footnote {
  margin: 1.5rem 0 0;
  color: rgba(250, 249, 246, 0.48);
  font-size: 0.82rem;
  line-height: 1.45;
}

.pcuk-scene-picker__footnote a {
  color: rgba(250, 249, 246, 0.72);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.pcuk-scene-picker__footnote a:hover,
.pcuk-scene-picker__footnote a:focus-visible {
  color: #faf9f6;
}

@media (max-width: 720px) {
  .pcuk-demo-banner--corner {
    top: calc(var(--viewer-chrome-height, 2.75rem) + 0.5rem);
    right: 0.5rem;
  }

  .pcuk-demo-banner__panel {
    width: min(18.5rem, calc(100vw - 1rem));
  }

  .pcuk-demo-actions {
    width: 100%;
  }

  .pcuk-demo-actions .pcuk-demo-banner__btn,
  .pcuk-demo-actions .pcuk-demo-change-scene {
    max-width: none;
  }

  .pcuk-demo-reset-modal,
  .pcuk-confirm-modal {
    padding: 10px;
  }

  .pcuk-demo-reset-modal__panel,
  .pcuk-confirm-modal__panel {
    width: min(100%, 28rem);
    max-height: calc(100dvh - 1.25rem);
    padding: 1rem;
    border-radius: 0.65rem;
  }

  .pcuk-demo-reset-modal__actions,
  .pcuk-confirm-modal__actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .pcuk-demo-reset-modal__actions .button-primary,
  .pcuk-confirm-modal__actions .button-danger {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .pcuk-scene-picker {
    padding: 1.25rem 1rem 2rem;
    align-items: start;
  }

  .pcuk-scene-picker__option {
    grid-template-columns: 5.5rem 1fr;
    grid-template-areas:
      "thumb meta"
      "badge badge";
    gap: 0.65rem 0.75rem;
  }

  .pcuk-scene-picker__thumb {
    grid-area: thumb;
    width: 5.5rem;
    height: 3.7rem;
  }

  .pcuk-scene-picker__meta {
    grid-area: meta;
  }

  .pcuk-scene-picker__badge {
    grid-area: badge;
    justify-self: start;
  }

  .pcuk-scene-picker__title {
    font-size: 1.25rem;
  }

  .pcuk-scene-picker__lead {
    font-size: 0.95rem;
    margin-bottom: 1.25rem;
  }
}

.potree_container {
  position: fixed;
  inset: 0;
}

#potree_render_area,
#potree_sidebar_container {
  font-family: "Montserrat", sans-serif;
}

.viewer-page #potree_sidebar_container {
  width: 340px;
  border-right: 1px solid var(--border-strong);
  background: var(--brand-mid);
  color: var(--text-primary);
  scrollbar-color: var(--text-tertiary) var(--brand-mid);
  /* Clip selectmenus / popups so they do not extend under #potree_render_area (higher z-index) */
  overflow-x: hidden;
}

.viewer-page #sidebar_root {
  color: var(--text-primary);
  font-family: "Montserrat", sans-serif;
}

.viewer-page #sidebar_root #sidebar_header h3 {
  margin: 0.9rem 0.75rem 0.6rem;
  color: var(--overlay-text);
  font-family: "Montserrat", sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.viewer-page #potree_menu.accordion > h3 {
  background: var(--brand-mid) !important;
  color: var(--overlay-text);
  font-family: "Montserrat", sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.viewer-page #potree_sidebar_container a {
  color: var(--text-primary);
}

.viewer-page #potree_sidebar_container #menu_about + div,
.viewer-page #potree_sidebar_container .about-credit {
  margin: 8px 0;
  padding: 0 8px;
  color: var(--overlay-text);
}

.viewer-page #potree_sidebar_container #menu_about + div a,
.viewer-page #potree_sidebar_container .about-credit a {
  color: var(--overlay-text);
}

.viewer-page #tools {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: repeat(3, auto);
  row-gap: 0.4rem;
  column-gap: 0.25rem;
  align-items: center;
}

.viewer-page #tools .button-icon {
  justify-self: center;
  align-self: center;
}

.viewer-page #navigation {
  /* Potree injects a set of <img class="button-icon"> controls + a couple selectgroups.
     Using a 4-column grid makes the controls lay out predictably in ~4 rows. */
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.4rem 0.25rem;
  align-items: center;
}

.viewer-page #navigation br {
  display: none;
}

.viewer-page #navigation .button-icon {
  justify-self: center;
  align-self: center;
}

/* Camera Projection is a selectgroup label row; make it span full width. */
.viewer-page #navigation #camera_projection_options {
  grid-column: 1 / -1;
}

.viewer-page #camera_projection_options label.ui-button {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  white-space: nowrap;
}

/* Clipping tools (icons) - keep in one horizontal row. */
.viewer-page #clipping_tools {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.25rem;
  align-items: center;
}

.viewer-page #clipping_tools .button-icon {
  flex: 0 0 auto;
}

.viewer-page #sidebar_root a.home-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 2.1rem;
  padding: 0 0.5rem;
  border: 1px solid var(--border-strong);
  border-radius: 0.375rem;
  background: var(--brand-yellow);
  color: var(--button-text);
  font-family: "Montserrat", sans-serif;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition:
    background-color 150ms ease,
    color 150ms ease,
    transform 150ms ease;
}

.viewer-page #sidebar_root #sidebar_header .header-buttons {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  margin: 0 0.75rem 0.85rem;
}

.viewer-page #sidebar_root a.home-button span {
  line-height: 1;
  white-space: nowrap;
}

.viewer-page #sidebar_root a.home-button:hover,
.viewer-page #sidebar_root a.home-button:focus-visible {
  background: var(--brand-ink);
  color: var(--brand-yellow);
  transform: translateY(-1px);
}

.viewer-page #sidebar_root a.home-button svg {
  width: 1.05rem;
  height: 1.05rem;
  flex: 0 0 auto;
}

.viewer-page .divider {
  background: var(--text-tertiary);
  color: var(--overlay-text);
}

.viewer-page .ui-slider {
  /* Needed so jQuery UI can position the handle using `left` correctly. */
  position: relative;
  height: 10px;
  border-width: 2px !important;
  border-style: solid;
  border-color: var(--border-soft) !important;
  background: var(--panel-background) !important;
  border-radius: 999px;
}

.viewer-page .ui-slider-handle {
  /* Potree ships a custom slider look; we keep positioning behavior from jQuery UI. */
  position: absolute !important;
  width: 18px !important;
  height: 18px !important;
  border-radius: 999px !important;
  background: var(--brand-yellow) !important;
  border: 2px solid var(--brand-ink) !important;
  box-sizing: border-box !important;
  /* Center the handle vertically on the thicker track. */
  top: 50% !important;
  transform: translateY(-50%);
  /* jQuery UI normally uses a negative margin-left to center the handle. */
  margin-left: -9px !important;
}

.viewer-page #splat_quality_options label.ui-button {
  /* Potree renders Splat Quality options as selectgroup labels (flex "buttons"). */
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
}

.viewer-page #background_options label.ui-button {
  /* Potree renders Background options as selectgroup labels (flex "buttons"). */
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
}

.viewer-page #cliptask_options > fieldset > span,
.viewer-page #clipmethod_options > fieldset > span {
  /* Keep Clip Task / Clip Method buttons on a single row. */
  display: flex !important;
  flex-wrap: nowrap !important;
  width: 100%;
}

.viewer-page #cliptask_options label.ui-button,
.viewer-page #clipmethod_options label.ui-button {
  /* Center the text within each selectgroup button. */
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  white-space: nowrap;
  flex: 1 1 0;
}

.viewer-page .potree-panel {
  border: 1px solid var(--border-soft);
  border-radius: 0;
  background: var(--panel-muted);
  color: var(--text-secondary);
}

.viewer-page .potree-panel-heading {
  border-bottom: 1px solid var(--border-soft);
  background: transparent;
  color: var(--text-primary);
  font-family: "Montserrat", sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.viewer-page #menu_scene + .pv-menu-list .potree-panel {
  /* Restore Potree's original panel styling for the Scene menu area. */
  border: 1px solid black;
  border-radius: 0.4em;
  padding: 0px;
  background-color: var(--bg-light-color);
}

.viewer-page #menu_scene + .pv-menu-list .potree-panel-heading {
  /* Restore Potree's heading background for the Scene menu area. */
  border-bottom: none;
  background: var(--bg-dark-color);
  background-color: var(--bg-dark-color);
}

.viewer-page #scene_export {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.5rem;
}

.viewer-page #scene_export br {
  display: none;
}

.viewer-page .potree_sidebar_brand,
.viewer-page .propertypanel_content .heading {
  color: var(--text-primary);
  font-family: "Montserrat", sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.viewer-page .jstree-anchor {
  color: var(--text-secondary) !important;
  font-family: "Montserrat", sans-serif;
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.viewer-page #jstree_scene .jstree-anchor {
  /* Match the default Potree Scene menu (jstree) look. */
  color: var(--font-color-2) !important;
  font-family: "Montserrat", sans-serif;
  font-size: 0.76rem;
  letter-spacing: 0;
  text-transform: none;
}

.viewer-page #jstree_scene .jstree-checkbox {
  display: inline-block !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.viewer-page .ui-state-default,
.viewer-page .ui-widget-content,
.viewer-page .ui-widget-header,
.viewer-page select,
.viewer-page input[type="text"] {
  border-color: var(--border-soft);
  background: var(--panel-background) !important;
  color: var(--text-primary);
}

.viewer-page .potree_menu_toggle,
.viewer-page #potree_map_toggle {
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--panel-background);
}

.viewer-page .annotation-titlebar,
.viewer-page .annotation-item {
  border: 1px solid var(--border-strong);
  background: var(--overlay-panel);
  color: var(--overlay-text);
  box-shadow: var(--overlay-shadow);
}

.viewer-page .annotation-description {
  display: none !important;
}

@media (min-width: 960px) {
  .page-hero,
  .hero-content {
    grid-template-columns: minmax(0, 1.2fr) 320px;
  }
}

@media (max-width: 720px) {
  .wrap,
  .hero-content,
  .section-content,
  .survey-footer {
    width: min(100%, calc(100% - 1rem));
  }

  .site-header .topbar {
    width: 100%;
  }

  body.has-site-header.has-session-card {
    --brand-lockup-width: 100%;
  }

  body.has-site-header.has-session-card .brand-lockup,
  body.has-site-header.has-session-card .session-card-bar,
  body.has-site-header.has-session-card .brand-title {
    width: 100%;
    max-width: 100%;
  }

  .topbar {
    align-items: start;
    flex-direction: column;
    padding: 0.875rem 1rem;
    padding-top: max(0.875rem, env(safe-area-inset-top));
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
  }

  .nav-links {
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 0.65rem 0.85rem;
  }

  .nav-link {
    min-height: 2.75rem;
    padding: 0.55rem 0.35rem;
    font-size: 0.64rem;
    letter-spacing: 0.12em;
  }

  header nav[aria-label="Primary"] button:not(.theme-toggle) {
    min-height: 2.75rem;
    padding: 0 0.75rem;
    font-size: 0.64rem;
  }

  .session-card {
    width: 100%;
    min-width: 0;
    max-width: none;
  }

  .session-card__avatar {
    width: 2rem;
    height: 2rem;
    font-size: 0.62rem;
  }

  .page-hero,
  .hero-content,
  .section-content,
  .content-panel,
  .panel {
    padding: 1.5rem;
  }

  .section-header,
  .card-footer,
  .survey-footer {
    align-items: start;
    flex-direction: column;
  }

  .toolbar,
  .search-shell {
    width: 100%;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .page-title,
  .hero-text h1 {
    max-width: none;
  }
}

/* Privacy / legal document pages */
body.legal-page .legal-hero .page-title {
  max-width: 18ch;
}

body.legal-page .legal-meta {
  margin: 0;
  color: var(--text-tertiary);
  font-size: 0.9rem;
}

body.legal-page .legal-doc {
  display: grid;
  gap: 2rem;
  margin-top: 1.5rem;
  padding: 2rem;
}

body.legal-page .legal-doc section {
  display: grid;
  gap: 0.85rem;
}

body.legal-page .legal-doc h2 {
  margin: 0;
  color: var(--text-primary);
  font-family: "Montserrat", sans-serif;
  font-size: clamp(1.15rem, 2.2vw, 1.45rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  text-transform: uppercase;
}

body.legal-page .legal-doc p,
body.legal-page .legal-doc li {
  margin: 0;
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.65;
}

body.legal-page .legal-doc ul,
body.legal-page .legal-doc ol {
  margin: 0;
  padding-left: 1.25rem;
  display: grid;
  gap: 0.45rem;
}

body.legal-page .legal-doc a {
  color: var(--text-primary);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

body.legal-page .legal-doc a:hover,
body.legal-page .legal-doc a:focus-visible {
  color: var(--brand-yellow);
}

body.legal-page .legal-doc code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  word-break: break-word;
}

body.legal-page .legal-toc {
  display: grid;
  gap: 0.75rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-soft);
}

body.legal-page .legal-toc__title {
  margin: 0;
  color: var(--text-primary);
  font-family: "Montserrat", sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

body.legal-page .legal-toc ol {
  list-style: none;
  padding-left: 0;
  display: grid;
  gap: 0.35rem;
  columns: 2;
  column-gap: 2rem;
}

@media (max-width: 640px) {
  body.legal-page .legal-toc ol {
    columns: 1;
  }
}

body.legal-page .legal-toc a {
  text-decoration: none;
}

body.legal-page .legal-toc a:hover,
body.legal-page .legal-toc a:focus-visible {
  text-decoration: underline;
}

body.legal-page .legal-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border-soft);
  border-radius: 0.375rem;
}

body.legal-page .legal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

body.legal-page .legal-table th,
body.legal-page .legal-table td {
  padding: 0.85rem 1rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border-soft);
  color: var(--text-secondary);
  line-height: 1.5;
}

body.legal-page .legal-table th {
  background: var(--panel-muted);
  color: var(--text-primary);
  font-family: "Montserrat", sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

body.legal-page .legal-table tr:last-child td {
  border-bottom: none;
}

body.legal-page .legal-footer {
  margin-top: 1.5rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Static error pages (e.g. CloudFront custom error responses) */
body.error-page .page-hero.error-hero .page-title {
  max-width: 24ch;
}

body.error-page .error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  margin-top: 0.25rem;
}

body.error-page .error-detail {
  margin: 0;
  max-width: 36rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.55;
}

body.error-page .error-back {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  justify-content: center;
  padding: 0 1rem;
  border: 1px solid var(--border-strong);
  border-radius: 0.375rem;
  background: var(--panel-background);
  color: var(--text-primary);
  font-family: "Montserrat", sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition:
    background-color 150ms ease,
    color 150ms ease,
    transform 150ms ease,
    border-color 150ms ease;
}

body.error-page .error-back:hover,
body.error-page .error-back:focus-visible {
  background: var(--panel-muted);
  border-color: var(--brand-yellow);
  transform: translateY(-1px);
}

/* ── Viewer page overrides ─────────────────────────────────── */

#menu_filters,
#menu_filters + div {
  display: none !important;
}

.viewer-page #potree_quick_buttons {
  left: 1rem;
  top: 1rem;
}

.viewer-page .potree_menu_toggle,
.viewer-page #potree_map_toggle {
  width: 56px;
  height: 56px;
  min-width: 56px;
  min-height: 56px;
  max-width: 56px;
  max-height: 56px;
  aspect-ratio: 1 / 1;
  display: block;
  margin: 0;
  padding: 10px;
  box-sizing: border-box;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  background: var(--brand-yellow);
  object-fit: contain;
  transition:
    background-color 150ms ease,
    border-color 150ms ease,
    transform 150ms ease;
}

.viewer-page .potree_menu_toggle:hover,
.viewer-page .potree_menu_toggle:focus-visible,
.viewer-page #potree_map_toggle:hover,
.viewer-page #potree_map_toggle:focus-visible {
  background: var(--brand-yellow);
  border-color: var(--brand-ink);
  filter: brightness(0.95);
  transform: translateY(-1px);
}

#toast_container {
  position: fixed;
  right: 16px;
  bottom: 64px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.viewer-toast {
  min-width: 220px;
  max-width: min(360px, calc(100vw - 32px));
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(17, 24, 39, 0.92);
  color: #f9fafb;
  font-size: 14px;
  font-family: "Montserrat", sans-serif;
  font-weight: 500;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
  opacity: 0;
  transform: translateY(6px);
  animation: toast-in 160ms ease-out forwards;
}

.viewer-toast.toast-success {
  border-color: rgba(52, 211, 153, 0.6);
}

.viewer-toast.toast-error {
  border-color: rgba(248, 113, 113, 0.7);
}

.viewer-toast.toast-hide {
  animation: toast-out 180ms ease-in forwards;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes toast-out {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(6px);
  }
}

/* ── Annotations UI ────────────────────────────────────────── */

.pcuk-annotations-toolbar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 10px 10px 6px;
}

.pcuk-annotations-toolbar button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: rgba(17, 24, 39, 0.92);
  color: #f9fafb;
  font-family: "Montserrat", sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition:
    filter 150ms ease,
    transform 150ms ease,
    background-color 150ms ease,
    border-color 150ms ease;
}

.pcuk-annotations-toolbar button:hover,
.pcuk-annotations-toolbar button:focus-visible {
  filter: brightness(0.95);
  transform: translateY(-1px);
  border-color: var(--brand-yellow);
}

.pcuk-annotations-toolbar button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.pcuk-annotations-list {
  margin: 0;
  padding: 0 10px 12px;
  list-style: none;
  display: grid;
  gap: 8px;
}

.pcuk-annotations-item {
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: rgba(17, 24, 39, 0.92);
  color: #f9fafb;
  padding: 10px 10px;
  display: grid;
  gap: 3px;
  cursor: pointer;
  transition:
    transform 150ms ease,
    border-color 150ms ease,
    filter 150ms ease;
}

.pcuk-annotations-item:hover,
.pcuk-annotations-item:focus-visible {
  transform: translateY(-1px);
  border-color: var(--brand-yellow);
  filter: brightness(0.98);
  outline: none;
}

.pcuk-annotations-item.is-selected {
  border-color: var(--brand-yellow);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand-yellow) 40%, transparent);
}

.pcuk-annotations-item-title {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.pcuk-annotations-item-meta {
  font-size: 11px;
  opacity: 0.82;
}

#pcuk_annotation_modal {
  display: none;
}

.pcuk-modal-grid {
  display: grid;
  gap: 10px;
}

.pcuk-modal-grid label {
  display: grid;
  gap: 6px;
  font-family: "Montserrat", sans-serif;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-primary);
}

.pcuk-modal-grid input[type="text"],
.pcuk-modal-grid input[type="number"],
.pcuk-modal-grid textarea {
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 10px 12px;
  background: var(--panel-background);
  color: var(--text-primary);
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 14px;
  letter-spacing: 0;
  text-transform: none;
}

.pcuk-modal-grid textarea {
  min-height: 110px;
  resize: vertical;
}

.pcuk-coords-fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

.pcuk-coords-legend {
  margin-bottom: 6px;
  padding: 0;
  font-family: "Montserrat", sans-serif;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-primary);
}

.pcuk-coords-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

@media (pointer: coarse) {
  .pcuk-coords-fieldset {
    display: none;
  }
}

.pcuk-file-row {
  display: grid;
  gap: 6px;
}

.pcuk-file-hint {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 12px;
  color: var(--text-secondary);
  letter-spacing: 0;
  text-transform: none;
}

.pcuk-photo-preview {
  position: relative;
  margin-top: 4px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  overflow: hidden;
  background: var(--panel-background);
  max-height: 280px;
}

.pcuk-photo-preview img {
  display: block;
  width: 100%;
  max-height: 280px;
  object-fit: contain;
  border-radius: 10px;
}

.pcuk-photo-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}

.pcuk-photo-remove:hover,
.pcuk-photo-remove:focus-visible {
  background: rgba(200, 40, 40, 0.85);
}

/* ── PDF hint row (hint text + view button side by side) ──── */

.pcuk-pdf-hint-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pcuk-pdf-hint-row .pcuk-file-hint {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pcuk-pdf-view-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 4px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--brand-yellow);
  color: var(--button-text);
  font-family: "Montserrat", sans-serif;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    background-color 150ms ease,
    color 150ms ease,
    transform 150ms ease;
}

.pcuk-pdf-view-btn:hover,
.pcuk-pdf-view-btn:focus-visible {
  background: var(--brand-ink);
  color: var(--brand-yellow);
  transform: translateY(-1px);
}

/* ── PDF viewer overlay / popup ───────────────────────────── */

.pcuk-pdf-overlay {
  position: fixed;
  inset: 0;
  z-index: 30000;
  display: none;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: pcuk-pdf-fade-in 180ms ease-out;
}

.pcuk-pdf-overlay.is-open {
  display: grid;
}

.pcuk-pdf-viewer {
  display: grid;
  grid-template-rows: auto 1fr;
  width: min(960px, calc(100vw - 48px));
  height: min(85vh, calc(100vh - 48px));
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  overflow: hidden;
  background: var(--panel-background);
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.06);
  animation: pcuk-pdf-scale-in 220ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.pcuk-pdf-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-soft);
  background: var(--panel-muted);
}

.pcuk-pdf-filename {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: "Montserrat", sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-primary);
}

.pcuk-pdf-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

.pcuk-pdf-download-btn,
.pcuk-pdf-close-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--panel-background);
  color: var(--text-primary);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
  transition:
    background-color 150ms ease,
    color 150ms ease,
    border-color 150ms ease,
    transform 150ms ease;
}

.pcuk-pdf-download-btn:hover,
.pcuk-pdf-download-btn:focus-visible,
.pcuk-pdf-close-btn:hover,
.pcuk-pdf-close-btn:focus-visible {
  background: var(--brand-yellow);
  color: var(--button-text);
  border-color: var(--brand-ink);
  transform: translateY(-1px);
}

.pcuk-pdf-body {
  position: relative;
  overflow: hidden;
}

.pcuk-pdf-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: none;
  background: #f4f4f4;
}

@keyframes pcuk-pdf-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes pcuk-pdf-scale-in {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Admin dashboard (admin.html) — Atlas design system: flat panels, 1px borders, paper surfaces, yellow accent — see notes/design-system.json */
.admin-page .admin-grid {
  display: grid;
  gap: 1.75rem;
}

.admin-dashboard-stack {
  margin-top: 2rem;
  padding: 0;
  border: none;
  background: transparent;
}

/* Admin dashboard layout — sidebar + main (admin.html) */
.admin-dashboard-shell {
  display: grid;
  grid-template-columns: minmax(13.5rem, 16rem) minmax(0, 1fr);
  gap: 1.75rem;
  align-items: start;
  min-width: 0;
}

.admin-sidebar {
  position: sticky;
  top: 1rem;
  border: 1px solid var(--border-soft);
  background: var(--panel-background);
  padding: 1rem 0.75rem;
  min-width: 0;
}

.admin-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin: 0;
  padding: 0;
}

.admin-sidebar-heading {
  margin: 0 0 0.5rem;
  padding: 0.35rem 0.5rem 0;
  color: var(--text-secondary);
  font-family: "Montserrat", sans-serif;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  line-height: 1.3;
  text-transform: uppercase;
}

.admin-sidebar-heading--spaced {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border-soft);
}

.admin-sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  margin: 0;
  padding: 0.65rem 0.65rem;
  border: 1px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--text-secondary);
  font-family: "Montserrat", sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1.35;
  text-align: left;
  text-transform: none;
  cursor: pointer;
  transition:
    color 0.15s ease,
    border-color 0.15s ease,
    background 0.15s ease;
}

/* Author display:flex overrides the UA [hidden] rule — keep retired tabs invisible */
.admin-sidebar-link[hidden],
.admin-sidebar-link[data-ui-retired] {
  display: none !important;
}

.admin-sidebar-link--sub {
  padding-left: 0.85rem;
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.admin-sidebar-link__step {
  flex: 0 0 1.35rem;
  width: 1.35rem;
  height: 1.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-soft);
  background: var(--panel-background);
  color: var(--text-secondary);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0;
}

.admin-sidebar-link:hover {
  color: var(--text-primary);
  background: color-mix(in srgb, var(--panel-background) 85%, var(--text-primary));
}

.admin-sidebar-link:focus-visible {
  outline: 2px solid var(--accent-ring, #ffe135);
  outline-offset: 2px;
}

.admin-sidebar-link[aria-selected="true"] {
  border-color: var(--border-soft);
  background: color-mix(in srgb, var(--panel-background) 70%, var(--accent-ring, #ffe135) 12%);
  color: var(--text-primary);
}

.admin-sidebar-link[aria-selected="true"] .admin-sidebar-link__step {
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.admin-main-panels {
  min-width: 0;
}

.admin-recent-projects,
.admin-companies-overview {
  margin-top: 0;
  grid-column: 1 / -1;
}

/* Company registry + Recent projects: five-column card grid with gap between cards */
.admin-list.admin-list--company-cards,
.admin-list.admin-list--project-cards {
  border: none;
  background: transparent;
  gap: 1.25rem;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.admin-list.admin-list--company-cards > li,
.admin-list.admin-list--project-cards > li {
  margin: 0;
  border: 1px solid var(--border-soft);
  border-radius: 2px;
  padding: 1rem 1.1rem;
  background: var(--panel-muted);
  box-shadow: 0 1px 0 color-mix(in srgb, var(--text-primary) 6%, transparent);
}

.admin-list.admin-list--company-cards > li:last-child,
.admin-list.admin-list--project-cards > li:last-child {
  border-bottom: 1px solid var(--border-soft);
}

.admin-list--company-cards > li.admin-company-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.65rem;
}

.admin-company-card__media {
  flex: 0 0 auto;
}

.admin-company-card__logo {
  display: block;
  width: 5.5rem;
  height: 5.5rem;
  object-fit: contain;
  border: 1px solid var(--border-soft);
  background: var(--panel-muted);
}

.admin-company-card__body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  width: 100%;
  min-width: 0;
}

.admin-list--company-cards > li.admin-company-card strong {
  color: var(--text-primary);
  font-family: "Montserrat", sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.3;
}

.admin-list--company-cards > li.admin-company-card .admin-muted code {
  font-size: 0.88em;
  word-break: break-all;
}

.admin-list--company-cards > li.admin-company-card--message {
  grid-column: 1 / -1;
  max-width: none;
  align-items: stretch;
  text-align: left;
  border-style: dashed;
  box-shadow: none;
  color: var(--text-secondary);
  font-size: 0.92rem;
}

.admin-list--company-cards button.registry-delete {
  align-self: center;
  margin-top: 0.25rem;
}

.admin-company-card__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.admin-company-card__actions button.registry-delete {
  margin-top: 0;
}

button.registry-edit,
button.registry-edit-cancel {
  min-height: 2.25rem;
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--border-strong);
  border-radius: 0;
  background: var(--panel-background);
  color: var(--text-secondary);
  font-family: "Montserrat", sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
}

button.registry-edit:hover,
button.registry-edit-cancel:hover {
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.admin-registry-current-logo {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
}

#editRegistryOrgId[readonly] {
  background: var(--panel-muted);
  color: var(--text-secondary);
  cursor: default;
}

.admin-list--project-cards > li.admin-project-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.65rem;
}

.admin-project-card__body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  width: 100%;
  min-width: 0;
}

.admin-list--project-cards > li.admin-project-card strong {
  color: var(--text-primary);
  font-family: "Montserrat", sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.3;
}

.admin-project-card__company {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 0.92rem;
  line-height: 1.35;
  color: var(--text-secondary);
}

.admin-list--project-cards > li.admin-project-card .admin-muted code {
  font-size: 0.88em;
  word-break: break-all;
}

.admin-project-card__pills {
  margin-top: 0.15rem;
}

.admin-list--project-cards > li.admin-project-card--message {
  grid-column: 1 / -1;
  align-items: stretch;
  text-align: left;
  border-style: dashed;
  box-shadow: none;
  color: var(--text-secondary);
  font-size: 0.92rem;
}

.admin-registry-logo-hint {
  margin: -0.25rem 0 0.75rem;
  font-size: 0.85rem;
}

.admin-registry-logo-preview {
  margin: 0 0 0.5rem;
}

.admin-registry-logo-preview img {
  display: block;
  border: 1px solid var(--border-soft);
  object-fit: contain;
  background: var(--panel-muted);
}

@media (max-width: 80rem) {
  .admin-list.admin-list--company-cards,
  .admin-list.admin-list--project-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.admin-workspace-select-wrap {
  display: none;
  width: 100%;
  margin-bottom: 0.75rem;
}

.admin-workspace-select-label {
  display: block;
  margin-bottom: 0.4rem;
  color: var(--text-tertiary);
  font-family: "Montserrat", sans-serif;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.admin-workspace-select {
  width: 100%;
  min-height: 2.75rem;
  border: 1px solid var(--border-strong);
  border-radius: 0.375rem;
  background: var(--panel-background);
  padding: 0.55rem 0.75rem;
  color: var(--text-primary);
  font-family: "Montserrat", sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
}

.admin-workspace-select:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--focus-ring);
}

@media (max-width: 52rem) {
  .admin-list.admin-list--company-cards,
  .admin-list.admin-list--project-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-dashboard-shell {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: static;
  }

  .admin-workspace-select-wrap {
    display: block;
  }

  .admin-sidebar-nav,
  .admin-sidebar-heading {
    display: none;
  }
}

@media (max-width: 30rem) {
  .admin-list.admin-list--company-cards,
  .admin-list.admin-list--project-cards {
    grid-template-columns: 1fr;
  }
}

.admin-tab-panel.admin-grid {
  display: grid;
  gap: 1.75rem;
}

.admin-tab-panel[hidden] {
  display: none !important;
}

.admin-cognito-section {
  margin-top: 1rem;
}

.admin-cognito-panel .admin-cognito-body {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.65rem 1.25rem;
  align-items: center;
}

.admin-cognito-panel h2 {
  margin-bottom: 0.5rem;
}

.admin-cognito-copy {
  min-width: 0;
}

.admin-cognito-copy #metricsContent {
  margin-top: 0.35rem;
}

.admin-cognito-copy #metricsContent p {
  margin: 0.15rem 0 0;
}

.admin-cognito-copy #metricsContent p:first-child {
  margin-top: 0;
}

.admin-cognito-chart-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

#metricsPieChart {
  display: block;
  max-width: 100%;
  height: auto;
}

.admin-cognito-legend {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.35;
}

.admin-cognito-legend li {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0.1rem 0;
}

.admin-cognito-legend .swatch {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 1px;
  flex-shrink: 0;
}

@media (max-width: 720px) {
  .admin-cognito-panel .admin-cognito-body {
    grid-template-columns: 1fr;
  }

  .admin-cognito-chart-wrap {
    justify-self: center;
  }
}

.admin-panel {
  margin: 0;
  border: 1px solid var(--border-soft);
  border-radius: 0;
  background: var(--panel-background);
  padding: 1.5rem;
}

.admin-panel > h2 {
  margin: 0 0 1.25rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border-soft);
  color: var(--text-primary);
  font-family: "Montserrat", sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  line-height: 1.3;
  text-transform: uppercase;
}

.admin-step-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.85rem;
}

.admin-step-pill {
  margin: 0;
}

.admin-step-text {
  color: var(--text-secondary);
  font-family: "Montserrat", sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1.2;
  text-transform: uppercase;
}

.admin-panel > p:first-of-type {
  margin-top: 0;
}

.admin-panel .admin-lede {
  margin: 0 0 1.25rem;
}

.admin-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.75rem;
}

.admin-users-list,
.admin-pending-users {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}

.admin-user-row,
.admin-pending-user-row {
  align-items: flex-start;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border-subtle, var(--border-strong));
}

.admin-user-row:last-child,
.admin-pending-user-row:last-child {
  border-bottom: none;
}

.admin-user-row--unassigned {
  box-shadow: inset 3px 0 0 var(--border-strong);
}

.admin-user-row__info,
.admin-pending-user-row__info {
  flex: 1 1 14rem;
  min-width: 12rem;
  line-height: 1.4;
}

.admin-row:last-child {
  margin-bottom: 0;
}

.admin-row input[type="text"],
.admin-row select {
  min-height: 2.75rem;
  flex: 1 1 12rem;
  max-width: 22rem;
  border: 1px solid var(--border-strong);
  border-radius: 0;
  background: var(--panel-background);
  padding: 0.65rem 0.85rem;
  color: var(--text-primary);
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1rem;
  transition:
    box-shadow 150ms ease,
    border-color 150ms ease;
}

.admin-row input[type="text"]::placeholder {
  color: var(--text-placeholder);
}

.admin-row input[type="text"]:focus,
.admin-row select:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--focus-ring);
}

/* Must follow .admin-row select — equal element+class specificity was letting flex: 1 1 12rem win. */
.admin-users-toolbar {
  align-items: center;
}

.admin-users-filter-label {
  flex: 0 0 auto;
  margin: 0;
  color: var(--text-tertiary);
  font-family: "Montserrat", sans-serif;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.admin-row select.admin-users-filter-select {
  flex: 0 0 auto;
  width: 10.5rem;
  max-width: 10.5rem;
  min-height: 2.5rem;
  height: 2.5rem;
  padding: 0.35rem 0.65rem;
  font-size: 0.9rem;
}

.admin-input-compact {
  max-width: 12rem !important;
}

.admin-label-fov {
  margin-top: 0.65rem;
  display: grid !important;
  gap: 0.35rem !important;
  max-width: 8rem;
}

.admin-label-fov input[type="text"] {
  width: 100%;
  min-height: 2.75rem;
  border: 1px solid var(--border-strong);
  border-radius: 0;
  background: var(--panel-background);
  padding: 0.65rem 0.85rem;
  color: var(--text-primary);
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1rem;
}

.admin-label-fov input[type="text"]:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--focus-ring);
}

#orgUsersContainer {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
}

#orgUsersContainer label {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 0.5rem;
  text-transform: none;
  letter-spacing: normal;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--text-secondary);
}

#orgUsersContainer input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  accent-color: var(--brand-yellow);
}

#metricsContent p {
  margin: 0.35rem 0 0;
  color: var(--text-secondary);
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1rem;
  line-height: 1.5;
}

#metricsContent p:first-child {
  margin-top: 0;
}

#metricsContent strong {
  color: var(--text-primary);
  font-family: "Montserrat", sans-serif;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.admin-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
  border: 1px solid var(--border-soft);
  background: var(--panel-background);
}

.admin-list li {
  border-bottom: 1px solid var(--border-soft);
  padding: 1rem 1.1rem;
  background: var(--panel-background);
}

.admin-list li:last-child {
  border-bottom: none;
}

.admin-muted {
  color: var(--text-tertiary);
  font-size: 0.92rem;
  line-height: 1.45;
}

.admin-panel p.admin-muted,
.admin-lede.admin-muted {
  font-family: "Source Serif 4", Georgia, serif;
  color: var(--text-secondary);
}

.pill {
  display: inline-block;
  margin-right: 0.35rem;
  margin-bottom: 0.15rem;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  background: var(--panel-muted);
  color: var(--text-secondary);
  font-family: "Montserrat", sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.admin-existing-pill {
  display: inline-block;
  width: fit-content;
  justify-self: start;
  margin-top: 0.25rem;
  margin-right: 0;
}

.admin-existing-pill.admin-existing-pill--has-data {
  border-color: color-mix(in srgb, var(--brand-success) 72%, #ffffff 28%);
  background: color-mix(in srgb, var(--brand-success) 85%, #ffffff 15%);
  color: #ffffff;
}

.admin-existing-pill.admin-existing-pill--no-data {
  border-color: color-mix(in srgb, var(--brand-warning) 72%, #ffffff 28%);
  background: color-mix(in srgb, var(--brand-warning) 85%, #ffffff 15%);
  color: #1b1b1b;
}

.admin-fieldset {
  margin: 0 0 1rem;
  border: 1px solid var(--border-soft);
  border-radius: 0;
  background: var(--panel-muted);
  padding: 1rem 1.1rem 1.15rem;
}

.admin-epochs-list {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.4rem;
}

.admin-epochs-list li {
  padding: 0.45rem 0.65rem;
  border: 1px solid var(--border-soft);
  font-size: 0.9rem;
}

.admin-epochs-list li code {
  font-size: 0.8em;
}

.admin-fieldset:last-of-type {
  margin-bottom: 0;
}

.admin-fieldset > label {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 0.65rem;
  color: var(--text-secondary);
  font-family: "Montserrat", sans-serif;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  line-height: 1.3;
  text-transform: uppercase;
}

.admin-fieldset > label input[type="text"] {
  width: 100%;
  max-width: 36rem;
  min-height: 2.75rem;
  border: 1px solid var(--border-strong);
  border-radius: 0;
  background: var(--panel-background);
  padding: 0.75rem 1rem;
  color: var(--text-primary);
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1rem;
  transition:
    box-shadow 150ms ease,
    border-color 150ms ease;
}

.admin-fieldset > label input[type="text"]:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--focus-ring);
}

.admin-fieldset legend {
  padding: 0 0.4rem;
  color: var(--text-secondary);
  font-family: "Montserrat", sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.admin-form-grid {
  display: grid;
  gap: 0.85rem;
}

.admin-form-grid--responsive-cols {
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
}

.admin-form-grid-span-2 {
  grid-column: 1 / -1;
}

.admin-fieldset-note {
  margin: 0 0 0.75rem;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 0.88rem;
  letter-spacing: 0.02em;
  line-height: 1.45;
  text-transform: none;
}

.admin-form-grid label,
.potree-upload-row label,
.admin-form-row-3 label,
.admin-form-row-6 label {
  display: grid;
  gap: 0.35rem;
  color: var(--text-secondary);
  font-family: "Montserrat", sans-serif;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  line-height: 1.3;
  text-transform: uppercase;
}

.admin-form-grid input[type="text"],
.admin-form-grid input[type="number"],
.admin-form-grid input[type="search"],
.admin-form-grid textarea,
.admin-form-grid select,
.admin-form-row-3 input[type="text"],
.admin-form-row-6 input[type="text"] {
  width: 100%;
  max-width: 36rem;
  border: 1px solid var(--border-strong);
  border-radius: 0;
  background: var(--panel-background);
  padding: 0.75rem 1rem;
  color: var(--text-primary);
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1rem;
  line-height: 1.4;
  transition:
    box-shadow 150ms ease,
    border-color 150ms ease;
}

.admin-form-grid textarea {
  min-height: 5.5rem;
  resize: vertical;
}

.admin-form-grid input::placeholder,
.admin-form-grid textarea::placeholder {
  color: var(--text-placeholder);
}

.admin-form-grid input:focus,
.admin-form-grid textarea:focus,
.admin-form-grid select:focus,
.admin-form-row-3 input:focus,
.admin-form-row-6 input:focus {
  outline: none;
  border-color: var(--border-strong);
  box-shadow: 0 0 0 2px var(--focus-ring);
}

.admin-form-row-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(7.25rem, 1fr));
  gap: 0.65rem;
  align-items: end;
}

.admin-form-row-3 input[type="text"] {
  max-width: none;
  min-height: 2.75rem;
}

.admin-form-row-6 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(7.25rem, 1fr));
  gap: 0.65rem;
  align-items: end;
}

.admin-camera-row-title {
  margin: 0.35rem 0 0.5rem;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.admin-camera-divider {
  height: 1px;
  margin: 0.85rem 0 0.65rem;
  background: var(--border-soft);
}

.admin-form-row-6 input[type="text"] {
  max-width: none;
  min-height: 2.75rem;
}

@media (max-width: 720px) {
  .admin-form-row-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
  }

  .admin-camera-row-title {
    margin: 0.2rem 0 0.4rem;
  }

  .admin-camera-divider {
    margin: 0.7rem 0 0.55rem;
  }
}

@media (max-width: 540px) {
  .admin-form-row-3 {
    grid-template-columns: 1fr;
    gap: 0.55rem;
  }
}

.potree-upload-row {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.5rem;
}

.potree-upload-row input[type="file"] {
  width: 100%;
  max-width: 36rem;
  border: 1px dashed var(--border-soft);
  border-radius: 0;
  background: var(--panel-background);
  padding: 0.5rem 0.65rem;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.potree-upload-row input[type="file"]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--focus-ring);
}

.admin-panel code {
  padding: 0.1rem 0.35rem;
  border: 1px solid var(--border-soft);
  background: var(--brand-paper);
  font-family: ui-monospace, "Cascadia Code", monospace;
  font-size: 0.85em;
}

body.dark .admin-panel code {
  background: var(--panel-alt);
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-soft);
}

.admin-actions .admin-muted {
  flex: 1 1 12rem;
}

.upload-progress {
  display: grid;
  gap: 0.5rem;
  flex: 1 1 18rem;
  min-width: min(520px, 100%);
}

.upload-progress__row {
  display: grid;
  grid-template-columns: 4.5rem 1fr 3.5rem;
  align-items: center;
  gap: 0.65rem;
}

.upload-progress__label {
  color: var(--text-tertiary);
  font-family: "Montserrat", sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.upload-progress progress {
  width: 100%;
  height: 0.85rem;
  appearance: none;
  border: 1px solid var(--border-soft);
  background: var(--panel-alt);
}

.upload-progress progress::-webkit-progress-bar {
  background: var(--panel-alt);
}

.upload-progress progress::-webkit-progress-value {
  background: var(--brand-success);
}

.upload-progress progress::-moz-progress-bar {
  background: var(--brand-success);
}

.upload-progress__text {
  color: var(--text-secondary);
  font-family: ui-monospace, "Cascadia Code", monospace;
  font-size: 0.85rem;
  text-align: right;
}

.upload-modal[hidden] {
  display: none;
}

.upload-modal {
  position: fixed;
  inset: 0;
  z-index: 100001;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: var(--overlay-backdrop);
}

.upload-modal__panel {
  width: min(720px, 100%);
  border: 1px solid var(--border-strong);
  background: var(--panel-background);
  padding: 1rem;
  box-shadow: var(--overlay-shadow);
}

.upload-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.upload-modal__header h2 {
  margin: 0;
}

.upload-modal__close {
  border: 1px solid var(--border-soft);
  background: var(--panel-muted);
  padding: 0.55rem 0.9rem;
  font-family: "Montserrat", sans-serif;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.upload-modal__close:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.upload-modal__close:not(:disabled):hover,
.upload-modal__close:not(:disabled):focus-visible {
  box-shadow: 0 0 0 2px var(--focus-ring);
}

.button-danger {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  justify-content: center;
  padding: 0 1rem;
  border: 1px solid color-mix(in srgb, var(--brand-error) 75%, #000000 25%);
  border-radius: 0.375rem;
  background: var(--brand-error);
  color: #ffffff;
  font-family: "Montserrat", sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    background-color 150ms ease,
    border-color 150ms ease,
    transform 150ms ease;
}

.button-danger:hover,
.button-danger:focus-visible {
  background: color-mix(in srgb, var(--brand-error) 72%, #000000 28%);
  color: #ffffff;
  transform: translateY(-1px);
}

body.dark .button-danger {
  color: #ffffff;
}

body.dark .button-danger:hover,
body.dark .button-danger:focus-visible {
  background: color-mix(in srgb, var(--brand-error) 85%, #ffffff 15%);
  color: #ffffff;
}

.admin-warning {
  margin: 0 0 1rem;
  border: 1px solid color-mix(in srgb, var(--brand-error) 70%, #ffffff 30%);
  background: color-mix(in srgb, var(--brand-error) 12%, transparent 88%);
  padding: 0.65rem 0.85rem;
  color: var(--brand-error);
  font-family: "Montserrat", sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-delete-modal[hidden] {
  display: none;
}

.admin-delete-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: var(--overlay-backdrop);
}

.admin-delete-modal__panel {
  width: min(480px, 100%);
  border: 1px solid var(--border-strong);
  background: var(--panel-background);
  padding: 1rem;
  box-shadow: var(--overlay-shadow);
}

.admin-delete-modal__panel h2 {
  margin: 0 0 0.65rem;
}

.admin-delete-modal__project {
  margin: 0.65rem 0 0;
  font-family: "Montserrat", sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-primary);
}

.admin-delete-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  margin-top: 1rem;
}

.admin-delete-modal__cancel:hover,
.admin-delete-modal__cancel:focus-visible {
  background: var(--panel-alt);
}

button.registry-delete {
  margin-top: 0.65rem;
  min-height: 2.25rem;
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--border-strong);
  border-radius: 0;
  background: var(--panel-background);
  color: var(--text-secondary);
  font-family: "Montserrat", sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
}

button.registry-delete:hover {
  color: var(--text-primary);
  border-color: var(--border-strong);
}

/* ── Viewer profile presets (Potree sidebar) ──────────────── */

.pcuk-profile-presets-sidebar {
  padding: 0 10px 12px;
}

.pcuk-profile-presets-sidebar .pcuk-profile-presets-list {
  margin: 0;
  padding: 0;
  max-height: none;
}

.pcuk-profile-presets-sidebar .pcuk-profile-presets-list > li:first-child .pcuk-profile-presets-item {
  margin-top: 10px;
}

.pcuk-profile-presets-list {
  margin: 0;
  padding: 0 10px 12px;
  list-style: none;
  display: grid;
  gap: 6px;
}

.pcuk-profile-presets-item {
  width: 100%;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: rgba(17, 24, 39, 0.92);
  color: #f9fafb;
  padding: 10px 12px;
  text-align: left;
  font-family: "Montserrat", sans-serif;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition:
    transform 150ms ease,
    border-color 150ms ease,
    filter 150ms ease;
}

.pcuk-profile-presets-item:hover,
.pcuk-profile-presets-item:focus-visible {
  transform: translateY(-1px);
  border-color: var(--brand-yellow);
  filter: brightness(0.98);
  outline: none;
}

/* ── Admin profile preset editor ──────────────────────────── */

.admin-profile-presets-list {
  display: grid;
  gap: 12px;
  margin-bottom: 12px;
}

.admin-profile-preset-card {
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 12px;
  background: color-mix(in srgb, var(--surface-muted) 70%, transparent);
}

.admin-profile-preset-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.admin-profile-preset-card textarea {
  min-height: 96px;
  resize: vertical;
}

/* Homepage landing hero (index.html) */
body.home-page {
  background: #050505;
}

.home-hero {
  position: relative;
  display: flex;
  min-height: 100dvh;
  flex-direction: column;
  justify-content: center;
}

body.home-page.has-site-header:not([data-site-header-overlay]) .home-hero {
  min-height: calc(100dvh - var(--site-header-height, 5rem));
}

body.home-page.has-site-header:not([data-site-header-overlay]).has-session-card .home-hero {
  min-height: calc(100dvh - var(--site-header-height, 6.75rem));
}

.home-hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.home-hero__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.95;
  pointer-events: none;
}

.home-hero__overlay {
  position: absolute;
  inset: 0;
  background: #1d5670;
  mix-blend-mode: overlay;
  opacity: 0.9;
}

body.dark .home-hero__overlay {
  background: #0b1f29;
  opacity: 0.78;
}

.home-hero__content {
  position: relative;
  z-index: 1;
  width: min(var(--page-width), calc(100% - 2rem));
  margin: 0 auto;
  padding: 2.5rem 0 4rem;
}

.home-hero__copy-block {
  display: grid;
  gap: 1rem;
  max-width: 42rem;
}

.home-hero__title,
.home-hero__subtitle {
  color: #faf9f6;
}

.home-hero__title {
  max-width: 17ch;
  text-shadow: 0 1px 24px rgba(0, 0, 0, 0.35);
}

.home-hero__subtitle {
  max-width: 38ch;
  color: rgba(250, 249, 246, 0.9);
  font-size: 1.05rem;
  line-height: 1.65;
}

.home-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.home-hero .button-secondary {
  background: transparent;
  color: #faf9f6;
  border-color: rgba(250, 249, 246, 0.85);
}

.home-hero .button-secondary:hover,
.home-hero .button-secondary:focus-visible {
  background: #faf9f6;
  color: var(--brand-ink);
  border-color: #faf9f6;
}

.home-hero__footer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(var(--page-width), calc(100% - 2rem));
  margin: 0 auto;
  padding: 0 0 max(1.5rem, env(safe-area-inset-bottom));
}

.home-hero__legal {
  color: rgba(255, 255, 255, 0.78);
  font-family: "Montserrat", sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

.home-hero__legal:hover,
.home-hero__legal:focus-visible {
  color: #fff;
  border-color: var(--brand-yellow);
}

.home-hero__social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  transition: transform 150ms ease, filter 150ms ease;
}

.home-hero__social-logo {
  display: block;
  width: 1.75rem;
  height: 1.75rem;
}

.home-hero__social:hover,
.home-hero__social:focus-visible {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

@media (prefers-reduced-motion: reduce) {
  .home-hero__video {
    display: none;
  }

  .home-hero__media {
    background:
      radial-gradient(circle at 20% 20%, rgba(255, 225, 53, 0.12), transparent 35%),
      #090909;
  }

  .home-hero .button-primary:hover,
  .home-hero .button-primary:focus-visible,
  .home-hero .button-secondary:hover,
  .home-hero .button-secondary:focus-visible,
  .home-hero__social:hover,
  .home-hero__social:focus-visible {
    transform: none;
  }
}

@media (max-width: 720px) {
  .home-hero__content {
    width: min(100%, calc(100% - 1rem));
    padding: 2rem 0 3rem;
  }

  .home-hero__footer {
    width: min(100%, calc(100% - 1rem));
  }

  .home-hero__title {
    font-size: clamp(1.5rem, 10vw, 2.8rem);
    max-width: none;
  }

  .home-hero__actions .button-primary,
  .home-hero__actions .button-secondary {
    width: 100%;
  }
}

/* Screen-reader only */
.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;
}

/* Header auth controls (UX-005) */
header nav[aria-label="Primary"] .nav-signin-button {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  justify-content: center;
  padding: 0 1rem;
  border: 1px solid var(--border-strong);
  border-radius: 0.375rem;
  background: var(--panel-background);
  color: var(--text-primary);
  font-family: "Montserrat", sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition:
    background-color 150ms ease,
    color 150ms ease,
    border-color 150ms ease,
    transform 150ms ease;
}

header nav[aria-label="Primary"] .nav-signin-button:hover,
header nav[aria-label="Primary"] .nav-signin-button:focus-visible {
  background: var(--panel-muted);
  border-color: var(--brand-yellow);
  transform: translateY(-1px);
}

/* Projects page content area */
.projects-content {
  min-height: 9rem;
}

.projects-content--error {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
}

.recovery-panel--standalone {
  width: 100%;
  max-width: 28rem;
  padding: 1.5rem;
  border: 1px solid var(--border-soft);
  background: var(--panel-muted);
}

#projectsSearchToolbar[hidden],
#projectsLibraryHeading[hidden] {
  display: none;
}

/* Skeleton loading (UX-007) */
.skeleton-grid {
  pointer-events: none;
}

.skeleton-card {
  overflow: hidden;
  border: 1px solid var(--border-strong);
  background: var(--panel-background);
}

.skeleton-card__thumb {
  aspect-ratio: 4 / 3;
  border-bottom: 1px solid var(--border-soft);
  background: var(--panel-alt);
}

.skeleton-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 1.25rem;
  min-height: 15rem;
}

.skeleton-line {
  height: 0.75rem;
  border-radius: 2px;
  background: var(--panel-alt);
}

.skeleton-line--short {
  width: 35%;
}

.skeleton-line--title {
  height: 1.25rem;
  width: 72%;
}

.skeleton-line--medium {
  width: 55%;
}

.skeleton-pulse {
  animation: skeleton-pulse 1.4s ease-in-out infinite;
}

@keyframes skeleton-pulse {
  0%,
  100% {
    opacity: 0.55;
  }

  50% {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .skeleton-pulse {
    animation: none;
    opacity: 0.7;
  }
}

/* Empty states (UX-008) */
.empty-state-panel {
  display: flex;
  min-height: 20rem;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  border: 1px dashed var(--border-soft);
  background: var(--panel-muted);
  padding: 2.5rem 1.5rem;
  text-align: center;
}

.empty-state-panel--compact {
  min-height: 16rem;
}

.empty-state-panel__icon {
  display: flex;
  height: 4rem;
  width: 4rem;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--brand-yellow);
  color: var(--brand-ink);
}

.empty-state-panel__icon svg {
  width: 1.75rem;
  height: 1.75rem;
}

.empty-state-panel__title {
  margin: 0;
  font-family: "Montserrat", sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.1;
  text-transform: uppercase;
  color: var(--text-primary);
}

.empty-state-panel__message {
  margin: 0;
  max-width: 32ch;
  color: var(--text-secondary);
  line-height: 1.55;
}

.empty-state-panel .button-primary,
.empty-state-panel .button-secondary {
  margin-top: 0.35rem;
}

/* Skip-to-content link (UX-015) */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 10000;
  padding: 0.75rem 1.25rem;
  border: 1px solid var(--border-strong);
  border-radius: 0.375rem;
  background: var(--brand-yellow);
  color: var(--brand-ink);
  font-family: "Montserrat", sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-decoration: none;
  text-transform: uppercase;
}

.skip-link:focus,
.skip-link:focus-visible {
  top: 1rem;
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

/* Projects library layout */
.projects-library {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.5rem 0 3rem;
}

.projects-library__header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
}

.projects-library__title {
  margin: 0;
  color: var(--text-primary);
  font-family: "Montserrat", sans-serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 0.95;
  text-transform: uppercase;
}

.projects-library__count {
  margin: 0.45rem 0 0;
  color: var(--text-secondary);
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.05rem;
}

.projects-view-toggle {
  display: inline-flex;
  border: 1px solid var(--border-strong);
  background: var(--panel-background);
}

.projects-view-btn {
  appearance: none;
  min-width: 4.5rem;
  margin: 0;
  padding: 0.55rem 0.85rem;
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  font-family: "Montserrat", sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
}

.projects-view-btn + .projects-view-btn {
  border-left: 1px solid var(--border-strong);
}

.projects-view-btn.is-active {
  background: var(--brand-ink);
  color: var(--brand-paper);
}

.projects-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.projects-search {
  flex: 1 1 18rem;
}

.projects-status-filters {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.projects-chip {
  appearance: none;
  margin: 0;
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--border-strong);
  background: var(--panel-background);
  color: var(--text-secondary);
  font-family: "Montserrat", sans-serif;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
}

.projects-chip:hover,
.projects-chip:focus-visible {
  background: var(--panel-muted);
  color: var(--text-primary);
  outline: none;
}

.projects-chip.is-active {
  background: var(--brand-ink);
  color: var(--brand-paper);
}

.projects-org-filter,
.projects-sort {
  flex: 0 1 12rem;
}

.projects-select {
  width: 100%;
  min-height: 2.5rem;
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--border-strong);
  background: var(--panel-background);
  color: var(--text-primary);
  font: inherit;
  font-size: 0.92rem;
}

.projects-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.projects-list-row {
  display: grid;
  grid-template-columns: minmax(8rem, 12rem) minmax(0, 1fr);
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  background: var(--panel-background);
  color: inherit;
  text-decoration: none;
  transition:
    transform 150ms ease,
    background-color 150ms ease;
}

.projects-list-row:hover,
.projects-list-row:focus-visible {
  transform: translateY(-2px);
  background: var(--panel-muted);
  outline: none;
}

.projects-list-row:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

.projects-list-row__thumb-wrap {
  aspect-ratio: 4 / 3;
  border-right: 1px solid var(--border-strong);
  background: var(--panel-alt);
  padding: 1rem;
}

.projects-list-row__thumb {
  height: 100%;
  width: 100%;
  border: 1px solid color-mix(in srgb, var(--border-strong) 55%, transparent);
  background: var(--brand-paper);
  object-fit: cover;
}

.projects-list-row__body {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1.25rem;
}

.projects-list-row__title {
  font-size: 1.3rem;
}

.projects-list-row__footer {
  margin-top: auto;
}

@media (max-width: 560px) {
  .session-card__header {
    flex-wrap: wrap;
  }

  .session-card__role {
    flex-basis: 100%;
    margin-left: 0;
    align-self: flex-start;
  }
}

.site-header__overlay-panel .session-card__header {
  flex-wrap: wrap;
}

.site-header__overlay-panel .session-card__role {
  flex-basis: 100%;
  margin-left: 0;
  align-self: flex-start;
}

@media (max-width: 640px) {
  .projects-library__header {
    flex-direction: column;
    align-items: stretch;
  }

  .projects-search {
    flex: 1 1 100%;
  }

  .projects-status-filters {
    flex: 1 1 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .projects-status-filters::-webkit-scrollbar {
    display: none;
  }

  .projects-chip {
    flex: 0 0 auto;
    min-height: 2.75rem;
    padding: 0.55rem 0.9rem;
  }

  .projects-view-btn {
    min-height: 2.75rem;
    padding: 0.55rem 1rem;
  }

  .projects-org-filter,
  .projects-sort {
    flex: 1 1 100%;
  }

  .projects-select,
  .projects-search input {
    font-size: 1rem;
  }

  .projects-list-row {
    grid-template-columns: 1fr;
  }

  .projects-list-row__thumb-wrap {
    aspect-ratio: 16 / 10;
    border-right: 0;
    border-bottom: 1px solid var(--border-strong);
  }
}

@media (prefers-reduced-motion: reduce) {
  .projects-list-row:hover,
  .projects-list-row:focus-visible {
    transform: none;
  }
}

/* Global reduced-motion overrides (UX-014) */
@media (prefers-reduced-motion: reduce) {
  .card:hover,
  .card:focus-within,
  .card-link:hover,
  .card-link:focus-visible,
  .card-link:hover .card-action,
  .card-link:focus-visible .card-action,
  .card-action:hover,
  .card-action:focus-visible,
  header nav[aria-label="Primary"] .nav-signin-button:hover,
  header nav[aria-label="Primary"] .nav-signin-button:focus-visible,
  .pcuk-scene-picker__option:hover,
  .pcuk-scene-picker__option:focus-visible,
  .viewer-chrome__link:hover,
  .viewer-chrome__link:focus-visible {
    transform: none;
  }
}
