@import url("fonts.css");
@import url("tokens.css");
:root {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--surface-page);
  font-synthesis: none;
  --brand-blue: var(--accent);
  --brand-yellow: var(--highlight);
  --muted: var(--text-muted);
  --border: var(--line);
  --ink: var(--text);
  --paper: var(--surface);
  --radius: 16px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: 0.55;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  border: 0;
  background: transparent;
  color: inherit;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid var(--text-muted);
  outline-offset: 3px;
}
button svg {
  pointer-events: none;
}
svg.icon {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 11px 18px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: var(--text-md);
  white-space: nowrap;
}
.primary {
  background: var(--brand-blue);
  color: var(--text-on-accent);
  box-shadow: var(--shadow-xs);
}
.primary:hover {
  background: var(--accent);
}
.secondary {
  background: var(--surface);
  border: 1px solid var(--border);
}
.secondary:hover {
  background: var(--surface-page);
}
.quiet {
  color: var(--text-muted);
}
.danger {
  color: var(--danger);
}
.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
}
.icon-btn:hover {
  background: var(--surface-soft);
}
.eyebrow {
  text-transform: uppercase;
  font-size: var(--text-2xs);
  font-weight: 700;
  letter-spacing: 1.8px;
  color: var(--muted);
}
.muted {
  color: var(--muted);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--text-xl);
  font-weight: 750;
  letter-spacing: -1px;
}
.brand img {
  width: 35px;
  height: 35px;
}
.brand small {
  font-size: var(--text-2xs);
  letter-spacing: 1px;
  color: var(--muted);
  margin-left: 3px;
  border: 1px solid var(--border);
  padding: 4px;
  border-radius: var(--radius-xs);
}
.shell {
  display: grid;
  grid-template-columns: 232px 1fr;
  min-height: 100dvh;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100dvh;
  border-right: 1px solid var(--border);
  background: var(--surface-page);
  padding: 30px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.sidebar .brand {
  padding: 0 6px;
}
.workspace-tag {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: 600;
}
.workspace-mark {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  background: var(--surface-soft);
  color: var(--text);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
}
.nav-label {
  font-size: var(--text-2xs);
  font-weight: 700;
  letter-spacing: 1.4px;
  color: var(--text-muted);
  padding: 0 12px;
  margin-bottom: 12px;
}
.sidebar nav {
  display: grid;
  gap: 6px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: var(--radius-sm);
  padding: 12px;
  font-size: var(--text-md);
  font-weight: 600;
}
.nav-item.active {
  background: var(--surface-soft);
  color: var(--accent);
}
.sidebar-bottom {
  margin-top: auto;
}
.sidebar-note {
  padding: 15px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  line-height: 1.7;
  color: var(--text-muted);
}
.profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 0 0;
  border-top: 1px solid var(--border);
  margin-top: 22px;
}
.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--surface-soft);
  color: var(--text);
  font-weight: 700;
  font-size: var(--text-xs);
  flex-shrink: 0;
}
.profile-name {
  font-size: var(--text-xs);
  font-weight: 650;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 108px;
}
.profile small {
  font-size: var(--text-2xs);
  color: var(--muted);
}
.page {
  min-width: 0;
}
.topbar {
  height: 82px;
  padding: 0 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  background: #ffffff82;
  font-size: var(--text-sm);
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}
.breadcrumb strong {
  color: var(--text);
  font-weight: 550;
}
.status-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: var(--text-2xs);
  color: var(--text-muted);
}
.status-dot {
  width: 6px;
  height: 6px;
  background: var(--text-muted);
  border-radius: 50%;
}
.dashboard {
  padding: 38px 44px;
  max-width: 1500px;
  margin: auto;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 27px;
}
h1 {
  font-size: var(--text-2xl);
  letter-spacing: -1px;
  font-weight: 650;
  margin: 0 0 8px;
}
h2 {
  font-size: var(--text-lg);
  letter-spacing: -0.45px;
  margin: 0;
}
.page-heading p {
  margin: 0;
  font-size: var(--text-md);
  color: var(--muted);
}
.welcome {
  background: var(--surface-soft);
  border: 1px solid var(--surface-soft);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  position: relative;
  overflow: hidden;
  margin-bottom: 28px;
}
.welcome-copy {
  max-width: 510px;
}
.welcome .eyebrow {
  color: var(--text);
  margin-bottom: 12px;
}
.welcome h2 {
  font-size: var(--text-xl);
  line-height: 1.25;
}
.welcome p {
  line-height: 1.65;
  color: var(--text-muted);
  font-size: var(--text-sm);
  margin: 12px 0 0;
}
.welcome-illustration {
  width: 180px;
  flex-shrink: 0;
  position: relative;
  display: grid;
  place-items: center;
  transform: rotate(-5deg);
}
.mini-sheet {
  width: 143px;
  height: 116px;
  background: var(--surface-page);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 15px;
  box-shadow: 8px 10px 0 var(--surface-soft);
}
.mini-line {
  height: 5px;
  width: 80%;
  background: var(--surface-soft);
  border-radius: var(--radius-xs);
  margin: 8px 0;
}
.mini-image {
  height: 37px;
  background: var(--surface-soft);
  border-radius: var(--radius-xs);
}
.mini-pin {
  position: absolute;
  border: 4px solid var(--surface-soft);
  display: grid;
  place-items: center;
  background: var(--brand-blue);
  color: var(--text-on-accent);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: var(--text-xs);
  right: 24px;
  top: 13px;
  transform: rotate(5deg);
}
.mini-comment {
  position: absolute;
  bottom: 7px;
  left: -14px;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 9px 14px;
  font-size: var(--text-2xs);
  border-radius: var(--radius-sm);
  transform: rotate(5deg);
  box-shadow: var(--shadow-sm);
}
.mini-comment span {
  color: var(--text-muted);
  margin-right: 5px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}
.stat {
  padding: 20px 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.stat-label {
  font-size: var(--text-xs);
  color: var(--muted);
}
.stat-value {
  font-size: var(--text-xl);
  letter-spacing: -1px;
  font-weight: 600;
  margin-top: 7px;
}
.stat-icon {
  width: 43px;
  height: 43px;
  background: var(--surface-soft);
  border-radius: var(--radius-md);
  display: grid;
  place-items: center;
  color: var(--text-muted);
}
.project-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  gap: 16px;
}
.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--text-base);
  font-weight: 650;
}
.count-pill {
  font-size: var(--text-2xs);
  font-weight: 600;
  background: var(--surface-soft);
  color: var(--text-muted);
  padding: 3px 7px;
  border-radius: var(--radius-xs);
}
.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
}
.search-box input {
  border: 0;
  background: transparent;
  min-height: 40px;
  padding: 8px 0;
  min-width: 0;
  width: 200px;
  font-size: var(--text-xs);
}
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(265px, 1fr));
  gap: 20px;
}
.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition:
    transform 0.15s,
    box-shadow 0.15s;
}
.project-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.project-preview {
  height: 170px;
  background: var(--surface-soft);
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
}
.project-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.folder-preview {
  width: 87px;
  height: 62px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 5px 12px 12px 12px;
  position: relative;
  display: grid;
  place-items: center;
  color: var(--text-muted);
}
.folder-preview:before {
  content: "";
  position: absolute;
  top: -10px;
  left: -1px;
  width: 37px;
  height: 12px;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 5px 7px 0 0;
  background: var(--surface-soft);
}
.project-info {
  padding: 18px;
}
.project-info h3 {
  font-size: var(--text-base);
  font-weight: 600;
  margin: 0 0 8px;
}
.project-meta {
  font-size: var(--text-2xs);
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.project-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 19px;
  padding-top: 14px;
  border-top: 1px solid var(--surface-soft);
  font-size: var(--text-2xs);
  color: var(--muted);
}
.empty {
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: var(--radius-md);
  text-align: center;
  padding: 47px 24px;
}
.empty-icon {
  width: 60px;
  height: 60px;
  background: var(--surface-soft);
  display: grid;
  place-items: center;
  margin: 0 auto 19px;
  color: var(--text-muted);
  border-radius: var(--radius-lg);
}
.empty h2 {
  font-size: var(--text-lg);
}
.empty p {
  font-size: var(--text-sm);
  line-height: 1.7;
  color: var(--muted);
  max-width: 360px;
  margin: 12px auto 22px;
}
.footnote {
  text-align: center;
  font-size: var(--text-2xs);
  color: var(--text-muted);
  margin: 25px 0;
}
.auth-page {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  min-height: 100dvh;
}
.auth-story {
  background: var(--login-background, var(--surface-soft));
  background-size: cover;
  background-position: center;
  color: var(--login-story-text, var(--text));
  padding: 48px 64px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
.auth-story .brand {
  color: var(--login-story-text, var(--text));
  margin-bottom: 100px;
}
.auth-story > .eyebrow { color:inherit; opacity:.8; }
.auth-story h1 {
  white-space: pre-line;
  overflow-wrap: anywhere;
  font-size: clamp(36px, 4vw, 58px);
  letter-spacing: -2px;
  line-height: 1.1;
  max-width: 530px;
}
.auth-story > p {
  overflow-wrap: anywhere;
  white-space: pre-line;
  font-size: var(--text-base);
  line-height: 1.8;
  color: var(--login-story-text, var(--text-muted));
  max-width: 440px;
  margin-top: 20px;
}
.auth-art {
  color: var(--text);
  margin: 40px 0 20px;
  width: 100%;
  max-width: 420px;
  background: var(--surface-page);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 18px;
  box-shadow: 16px 18px 0 var(--surface-soft);
  transform: rotate(-3deg);
}
.art-header {
  display: flex;
  gap: 5px;
  border-bottom: 1px solid var(--surface-soft);
  padding-bottom: 12px;
}
.art-header i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--line);
}
.art-content {
  display: flex;
  gap: 16px;
  padding: 20px 0 6px;
}
.art-block {
  width: 47%;
  height: 112px;
  background: var(--surface-soft);
  border-radius: var(--radius-sm);
}
.art-copy {
  flex: 1;
  padding-top: 16px;
}
.art-copy b {
  font-size: var(--text-lg);
  letter-spacing: -0.7px;
}
.art-feedback {
  background: var(--accent);
  color: var(--text-on-accent);
  display: flex;
  align-items: center;
  gap: 9px;
  border-radius: var(--radius-sm);
  max-width: 250px;
  padding: 12px 15px;
  margin: 8px 0 0 auto;
  transform: rotate(3deg);
  font-size: var(--text-xs);
}
.auth-footer {
  font-size: var(--text-2xs);
  color: var(--login-story-text, var(--text-muted));
  margin-top: auto;
  padding-top: 40px;
}
.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-page);
  padding: 50px 30px;
}
.auth-card {
  width: 100%;
  max-width: 375px;
}
.auth-card h2 {
  overflow-wrap: anywhere;
  font-size: var(--text-2xl);
  margin-bottom: 10px;
}
.auth-card > p {
  overflow-wrap: anywhere;
  font-size: var(--text-sm);
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 30px;
}
.field {
  display: grid;
  gap: 8px;
  margin-bottom: 19px;
}
.field label {
  font-size: var(--text-xs);
  font-weight: 600;
}
.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 12px 13px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  min-height: 46px;
  font-size: var(--text-md);
  color: var(--text);
}
.field textarea {
  min-height: 100px;
  line-height: 1.5;
  resize: vertical;
}
.field small {
  font-size: var(--text-2xs);
  color: var(--muted);
}
input:user-invalid,
textarea:user-invalid {
  border-color: var(--danger);
}
.auth-card .primary {
  background: var(--login-accent, var(--accent));
  color: var(--login-accent-text, var(--text-on-accent));
  width: 100%;
  margin-top: 4px;
}
.auth-page .auth-card .primary:hover { background:var(--login-accent, var(--accent)); filter:brightness(.95); }
.auth-switch {
  text-align: center;
  font-size: var(--text-xs);
  margin-top: 24px;
  color: var(--muted);
}
.text-link {
  font-size: var(--text-xs);
  font-weight: 650;
  color: var(--brand-blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.error {
  color: var(--danger);
  font-size: var(--text-xs);
  line-height: 1.5;
}
.error:empty {
  display: none;
}
dialog {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: min(460px, calc(100% - 32px));
  padding: 28px;
  color: inherit;
  box-shadow: var(--shadow-lg);
}
dialog::backdrop {
  background: #2526b34d;
  backdrop-filter: blur(3px);
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.modal-head h2 {
  font-size: var(--text-lg);
}
.modal-description {
  font-size: var(--text-sm);
  line-height: 1.6;
  color: var(--muted);
  margin: 0 0 24px;
}
.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 22px;
}
#toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--surface-inverse);
  color: var(--text-on-accent);
  padding: 13px 20px;
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  z-index: 10;
  opacity: 0;
  pointer-events: none;
  max-width: calc(100% - 30px);
  box-shadow: var(--shadow-md);
  transition:
    opacity 0.18s,
    transform 0.18s;
}
#toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.update-banner {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 12px 10px 18px;
  font-size: var(--text-sm);
  z-index: 20;
  max-width: calc(100% - 30px);
  box-shadow: var(--shadow-md);
}
.project-page {
  padding: 38px 44px;
}
.project-parent {
  margin: 0 0 14px;
  font-size: var(--text-sm);
}
.project-parent a {
  color: var(--text);
  text-decoration: none;
  font-weight: 650;
}
.subprojects {
  margin: 6px 0 28px;
}
.subprojects .project-controls {
  margin-bottom: 12px;
}
.upload-zone {
  width: 100%;
  padding: 38px 20px;
  background: var(--surface-soft);
  border: 1px dashed var(--line);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
  color: var(--text);
}
.upload-zone strong {
  font-size: var(--text-base);
  color: var(--text);
}
.upload-zone small {
  font-size: var(--text-xs);
  color: var(--muted);
}
.upload-zone.dragging {
  background: var(--surface-soft);
  outline: 3px solid var(--text-muted);
}
.asset-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  overflow: hidden;
  text-align: left;
}
.asset-thumb {
  height: 190px;
  background: var(--surface-soft);
  display: grid;
  place-items: center;
}
.asset-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.asset-details {
  padding: 17px;
}
.asset-details strong {
  font-size: var(--text-sm);
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.asset-details span {
  font-size: var(--text-2xs);
  color: var(--muted);
  display: block;
  margin-top: 7px;
}
.pdf-badge {
  background: var(--surface-page);
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
  box-shadow: 5px 5px 0 var(--line);
  color: var(--text-muted);
}
.pdf-badge span {
  display: block;
  font-size: var(--text-2xs);
  font-weight: 700;
  letter-spacing: 1px;
  margin-top: 7px;
}
.upload-progress {
  margin: -16px 0 25px;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: var(--text-xs);
  color: var(--muted);
}
progress {
  width: 100%;
  height: 8px;
  accent-color: var(--brand-blue);
}
.share-row {
  display: flex;
  gap: 8px;
}
.share-row input {
  min-width: 0;
  flex: 1;
}
.share-warning {
  font-size: var(--text-xs);
  line-height: 1.65;
  color: var(--muted);
  margin: 18px 0;
}
.review-shell {
  height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--surface-soft);
}
.review-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  height: 74px;
  padding: 0 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.review-heading {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}
.review-heading h1 {
  font-size: var(--text-md);
  letter-spacing: 0;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 350px;
}
.review-heading small {
  display: block;
  color: var(--muted);
  font-size: var(--text-2xs);
  margin-top: 5px;
}
.review-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.asset-navigation {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: var(--text-xs);
  font-weight: 650;
}
.asset-navigation .icon-btn:disabled,
.zoom-controls .icon-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.zoom-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}
.zoom-controls select {
  min-height: 34px;
  max-width: 154px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 8px;
  background: var(--surface);
  color: var(--ink);
}
.thumbnail-strip {
  display: flex;
  gap: 10px;
  flex: 0 0 auto;
  max-width: 100%;
  overflow-x: auto;
  padding: 8px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-page);
}
.file-thumbnail {
  width: 100px;
  flex: 0 0 100px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 5px;
  background: var(--surface);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.file-thumbnail[aria-current="true"] {
  border: 2px solid var(--brand-blue);
  background: var(--surface-page);
}
.file-thumbnail > span:last-child {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--text-2xs);
  margin-top: 4px;
}
.thumbnail-preview {
  height: 62px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: var(--text-2xs);
}
.thumbnail-preview img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 62px;
  object-fit: contain;
}
.review-layout {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 355px;
}
.canvas-area {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  position: relative;
}
.canvas-toolbar {
  min-height: 57px;
  height: auto;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  flex-wrap: wrap;
  padding: 8px 18px;
  flex-shrink: 0;
  font-size: var(--text-xs);
  color: var(--text-muted);
  gap: 10px;
}
.viewer-scroll {
  flex: 1 1 1px;
}
.viewer-stage {
  margin-inline: auto;
}
.page-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-page);
  border: 1px solid var(--surface-soft);
  border-radius: var(--radius-sm);
  padding: 2px 5px;
  font-size: var(--text-2xs);
}
.page-controls .icon-btn {
  width: 30px;
  height: 30px;
}
.viewer-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 24px 35px 80px;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
}
.viewer-stage {
  position: relative;
  max-width: none;
  box-shadow: var(--shadow-md);
  background: var(--surface);
  line-height: 0;
  flex-shrink: 0;
  margin-inline: auto;
}
.viewer-stage canvas,
.viewer-stage img {
  display: block;
  width: 100%;
  height: auto;
}
.viewer-stage.annotating {
  cursor: crosshair;
}
.pins-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.pin {
  pointer-events: auto;
  position: absolute;
  left: calc(var(--x) * 100%);
  top: calc(var(--y) * 100%);
  transform: translate(-50%, -50%);
  width: 32px;
  height: 32px;
  border: 3px solid var(--surface);
  background: var(--brand-blue);
  color: var(--text-on-accent);
  border-radius: 50% 50% 50% 5px;
  box-shadow: var(--shadow-sm);
  font-size: var(--text-2xs);
  font-weight: 700;
  display: grid;
  place-items: center;
  line-height: 1;
  touch-action: none;
  cursor: grab;
}
.pin.selected {
  background: var(--highlight);
  color: var(--text);
  width: 37px;
  height: 37px;
  z-index: 1;
}
.pin.resolved {
  background: var(--text-muted);
}
.canvas-bottom {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  font-size: var(--text-xs);
  white-space: nowrap;
}
.canvas-bottom .btn {
  min-height: 36px;
  padding: 8px 14px;
  font-size: var(--text-xs);
}
.canvas-bottom .active {
  background: var(--surface-soft);
  color: var(--accent);
}
.canvas-bottom .divider {
  height: 20px;
  width: 1px;
  background: var(--border);
  margin: 0 7px;
}
.comment-panel {
  background: var(--surface);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.comment-panel-header {
  padding: 24px 21px 16px;
}
.comment-panel-header h2 {
  font-size: var(--text-base);
  display: flex;
  align-items: center;
  gap: 8px;
}
.comment-panel-header p {
  font-size: var(--text-2xs);
  color: var(--muted);
  line-height: 1.6;
  margin: 9px 0 15px;
}
.tabs {
  display: flex;
  gap: 3px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
}
.tab {
  padding: 10px 12px;
  font-size: var(--text-xs);
  border-bottom: 2px solid transparent;
  font-weight: 500;
}
.tab.active {
  border-color: var(--brand-blue);
  color: var(--brand-blue);
  font-weight: 650;
}
.discussion-list {
  overflow: auto;
  flex: 1;
  padding: 0 17px 22px;
}
.discussion-empty {
  text-align: center;
  padding: 60px 18px;
  color: var(--muted);
}
.discussion-empty .empty-icon {
  width: 48px;
  height: 48px;
}
.discussion-empty strong {
  font-size: var(--text-sm);
  font-weight: 550;
  color: var(--text);
}
.discussion-empty p {
  font-size: var(--text-xs);
  line-height: 1.7;
}
.comment-card {
  padding: 17px 6px;
  border-bottom: 1px solid var(--surface-soft);
}
.comment-card.selected {
  background: var(--surface-page);
  margin: 0 -8px;
  padding: 17px 14px;
  border-radius: var(--radius-sm);
}
.comment-top {
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.3;
}
.comment-number {
  width: 23px;
  height: 23px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--surface-soft);
  color: var(--accent);
  font-size: var(--text-2xs);
  font-weight: 700;
  flex-shrink: 0;
}
.comment-top strong {
  font-size: var(--text-2xs);
  font-weight: 650;
}
.comment-top time {
  font-size: var(--text-2xs);
  color: var(--text-muted);
}
.comment-top .resolve-btn {
  margin-left: auto;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid var(--surface-soft);
  color: var(--text-muted);
}
.comment-top .resolve-btn.done {
  background: var(--surface-soft);
  color: var(--accent);
}
.comment-text {
  font-size: var(--text-xs);
  line-height: 1.75;
  margin: 11px 0;
  color: var(--text);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.comment-location {
  font-size: var(--text-2xs);
  color: var(--text-muted);
}
.reply {
  border-left: 2px solid var(--surface-soft);
  padding: 2px 0 2px 11px;
  margin: 14px 0 0 12px;
}
.reply strong {
  font-size: var(--text-2xs);
}
.reply p {
  font-size: var(--text-2xs);
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 5px 0;
  color: var(--text-muted);
}
.reply-form {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 13px;
}
.reply-form textarea {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 9px 10px;
  font-size: var(--text-xs);
  min-height: 38px;
  resize: vertical;
  width: 100%;
}
.reply-form .btn {
  min-height: 29px;
  padding: 6px 10px;
  font-size: var(--text-2xs);
  align-self: flex-end;
}
.reply-toggle {
  font-size: var(--text-2xs);
  color: var(--text);
  padding: 6px 0;
}
.comment-draft {
  padding: 17px;
  background: var(--surface-page);
  margin: 0 -3px 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.comment-draft h3 {
  font-size: var(--text-xs);
  margin: 0 0 12px;
}
.comment-draft .field {
  margin: 0 0 11px;
}
.comment-draft textarea {
  font-size: var(--text-xs);
  padding: 10px;
  min-height: 90px;
}
.comment-draft .modal-actions {
  margin-top: 9px;
}
.comment-draft .btn {
  font-size: var(--text-2xs);
  padding: 8px 11px;
  min-height: 34px;
}
.guest-footer {
  border-top: 1px solid var(--border);
  padding: 15px 21px;
  font-size: var(--text-2xs);
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.guest-footer .brand {
  font-size: var(--text-base);
}
.guest-footer img {
  width: 22px;
  height: 22px;
}
.mobile-tabs {
  display: none;
}
.error-screen {
  max-width: 480px;
  padding: 70px 25px;
  margin: auto;
  text-align: center;
}
.error-screen p {
  color: var(--muted);
  line-height: 1.7;
}
.viewer-message {
  font-size: var(--text-sm);
  line-height: 1.6;
  padding: 60px 30px;
  color: var(--muted);
}
.help-list {
  font-size: var(--text-sm);
  line-height: 1.85;
  color: var(--text-muted);
  padding-left: 18px;
}
.password-wrap {
  position: relative;
}
.password-wrap input {
  padding-right: 48px;
}
.password-wrap button {
  position: absolute;
  right: 3px;
  top: 3px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  color: var(--muted);
}
[hidden] {
  display: none !important;
}
@media (min-width: 1500px) {
  .dashboard,
  .project-page {
    padding: 45px 60px;
  }
  .review-layout {
    grid-template-columns: minmax(0, 1fr) 390px;
  }
}
@media (max-width: 1050px) {
  .shell {
    grid-template-columns: 190px 1fr;
  }
  .sidebar {
    padding: 25px 14px;
  }
  .dashboard,
  .project-page {
    padding: 30px 26px;
  }
  .topbar {
    padding: 0 26px;
  }
  .welcome-illustration {
    width: 140px;
  }
  .review-layout {
    grid-template-columns: minmax(0, 1fr) 320px;
  }
  .viewer-scroll {
    padding: 20px 20px 80px;
  }
  .auth-story {
    padding: 40px;
  }
  .auth-story .brand {
    margin-bottom: 75px;
  }
}
@media (max-width: 760px) {
  .shell {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: static;
    height: auto;
    padding: 16px 20px;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    border-right: 0;
    border-bottom: 1px solid var(--border);
    gap: 12px;
  }
  .sidebar .brand {
    font-size: var(--text-lg);
  }
  .sidebar nav,
  .workspace-tag,
  .sidebar-note,
  .nav-label,
  .sidebar-bottom > .profile small {
    display: none;
  }
  .sidebar-bottom {
    margin: 0;
  }
  .profile {
    border: 0;
    padding: 0;
    margin: 0;
  }
  .profile-name {
    display: none;
  }
  .topbar {
    height: 60px;
    padding: 0 20px;
  }
  .dashboard,
  .project-page {
    padding: 25px 20px;
  }
  .page-heading {
    align-items: flex-start;
    gap: 10px;
  }
  h1 {
    font-size: var(--text-xl);
  }
  .page-heading p {
    font-size: var(--text-xs);
  }
  .page-heading .btn {
    font-size: var(--text-xs);
    padding: 10px 12px;
    min-height: 40px;
  }
  .welcome {
    padding: 23px;
  }
  .welcome h2 {
    font-size: var(--text-lg);
  }
  .welcome-illustration {
    display: none;
  }
  .stats {
    gap: 8px;
  }
  .stat {
    padding: 16px 12px;
  }
  .stat-label {
    font-size: var(--text-2xs);
  }
  .stat-value {
    font-size: var(--text-xl);
  }
  .stat-icon {
    display: none;
  }
  .project-controls {
    flex-wrap: wrap;
  }
  .search-box input {
    width: 160px;
  }
  .project-grid {
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  }
  .auth-page {
    grid-template-columns: 1fr;
  }
  .auth-story {
    padding: 26px 28px;
  }
  .auth-story .brand {
    margin-bottom: 32px;
  }
  .auth-story h1 {
    font-size: var(--text-2xl);
    letter-spacing: -1px;
  }
  .auth-story > p {
    font-size: var(--text-sm);
    margin-bottom: 0;
  }
  .auth-art,
  .auth-footer {
    display: none;
  }
  .auth-panel {
    padding: 36px 28px;
  }
  .auth-card h2 {
    font-size: var(--text-xl);
  }
  .review-header {
    padding: 8px 12px;
    height: auto;
    min-height: 66px;
    flex-wrap: wrap;
    gap: 8px;
  }
  .review-heading {
    gap: 8px;
  }
  .review-heading h1 {
    font-size: var(--text-xs);
    max-width: 190px;
  }
  .review-heading small {
    max-width: 190px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: var(--text-2xs);
  }
  .review-header-actions {
    gap: 5px;
    margin-left: auto;
  }
  .review-header-actions .btn {
    font-size: var(--text-2xs);
    padding: 9px;
    min-height: 36px;
  }
  .review-header-actions .status-pill {
    display: none;
  }
  .review-header .brand {
    display: none;
  }
  .review-layout {
    display: flex;
    flex-direction: column;
  }
  .canvas-area {
    flex: 1;
  }
  .comment-panel {
    flex: 1;
    border-left: 0;
    display: none;
  }
  .review-shell.show-discussion .canvas-area {
    display: none;
  }
  .review-shell.show-discussion .comment-panel {
    display: flex;
  }
  .mobile-tabs {
    display: flex;
    gap: 4px;
    background: var(--surface);
    justify-content: center;
    border-bottom: 1px solid var(--border);
    padding: 4px;
  }
  .mobile-tabs .btn {
    min-height: 34px;
    padding: 8px 25px;
    font-size: var(--text-xs);
  }
  .mobile-tabs .active {
    background: var(--surface-soft);
  }
  .viewer-scroll {
    padding: 18px 12px 80px;
  }
  .canvas-toolbar {
    padding: 6px 10px;
    font-size: var(--text-2xs);
    gap: 6px;
  }
  .canvas-toolbar > #viewer-hint {
    flex: 1 1 100%;
  }
  .asset-navigation {
    order: 1;
  }
  .zoom-controls {
    order: 2;
  }
  #thumbnails-toggle {
    order: 3;
  }
  #download-file,
  #fullscreen-toggle {
    order: 4;
  }
  .thumbnail-strip {
    padding: 6px 10px;
  }
  .file-thumbnail {
    width: 78px;
    flex-basis: 78px;
  }
  .thumbnail-preview {
    height: 50px;
  }
  .thumbnail-preview img {
    max-height: 50px;
  }
  .guest-footer {
    padding: 12px 21px;
  }
  .canvas-bottom {
    bottom: 15px;
  }
  .project-page > .page-heading {
    flex-wrap: wrap;
  }
  .share-row .btn {
    padding: 10px;
  }
  .auth-card .field input {
    font-size: var(--text-base);
  }
  .comment-draft textarea {
    font-size: var(--text-base);
  }
  .reply-form textarea {
    font-size: var(--text-base);
  }
  .comment-top strong {
    font-size: var(--text-xs);
  }
  .comment-text {
    font-size: var(--text-md);
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
@media (max-width: 760px) {
  .canvas-toolbar {
    flex-wrap: wrap;
    height: auto;
    min-height: 60px;
    padding-block: 8px;
  }
  #viewer-hint {
    width: 100%;
    font-size: var(--text-2xs);
  }
}

/* Casepoint internal feedback: white workspace, blue actions, yellow accents. */
:root {
  --brand-blue: var(--accent);
  --brand-yellow: var(--highlight);
  --brand-beige: var(--surface-soft);
  color: var(--text);
  background: var(--surface-page);
}
.brand > span {
  color: var(--brand-yellow);
}
.primary:hover {
  background: var(--accent-hover);
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline-color: var(--brand-blue);
}
.review-shell {
  background: var(--surface);
}
.review-header {
  height: 66px;
  gap: 12px;
}
.review-header-actions .status-pill {
  display: none;
}
.review-layout {
  grid-template-columns: 300px minmax(0, 1fr) 164px;
}
.review-layout.files-hidden {
  grid-template-columns: 300px minmax(0, 1fr);
}
.comment-panel {
  border-left: 0;
  border-right: 1px solid var(--border);
}
.review-project-title {
  padding: 24px 22px;
  border-bottom: 1px solid var(--border);
}
.review-project-title h2 {
  font-size: var(--text-base);
  font-weight: 650;
  line-height: 1.5;
  margin: 0 0 8px;
}
.review-project-title span {
  font-size: var(--text-2xs);
  color: var(--muted);
}
.comment-panel-header {
  padding: 20px 22px 14px;
}
.comment-panel-header > p {
  display: none;
}
.comment-card {
  border-radius: 0;
  margin: 0;
  border: 0;
  border-bottom: 1px solid var(--border);
  padding: 22px;
}
.comment-card.selected {
  background: var(--surface-selected);
  box-shadow: inset 3px 0 var(--brand-blue);
}
.discussion-list {
  padding: 0;
}
.comment-number {
  background: var(--brand-blue);
  color: var(--text-on-accent);
  border-radius: 50%;
}
.files-panel {
  border-left: 1px solid var(--border);
  background: var(--surface);
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.files-panel[hidden] {
  display: none;
}
.files-panel > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  min-height: 58px;
  border-bottom: 1px solid var(--border);
}
.files-panel h2 {
  font-size: var(--text-sm);
  margin: 0;
}
.thumbnail-strip {
  flex-direction: column;
  border: 0;
  background: var(--surface);
  padding: 16px 12px;
  overflow: auto;
  min-height: 0;
}
.file-thumbnail {
  flex: 0 0 auto;
  width: 100%;
  padding: 6px;
  border-color: transparent;
  border-radius: var(--radius-sm);
}
.file-thumbnail[aria-current="true"] {
  background: var(--surface-selected);
  border: 2px solid var(--brand-blue);
}
.thumbnail-preview {
  height: 86px;
  background: var(--surface-sunken);
  border-radius: var(--radius-xs);
}
.thumbnail-preview img {
  max-height: 86px;
  max-width: 100%;
}
.file-thumbnail > span:last-child {
  margin-top: 8px;
}
.canvas-toolbar {
  background: var(--surface-sunken);
  border-bottom: 1px solid var(--border);
  gap: 8px;
  padding: 10px 16px;
  color: var(--text-muted);
}
#viewer-hint {
  width: 100%;
  font-size: var(--text-2xs);
}
.viewer-scroll {
  background: var(--surface);
  padding: 24px 28px;
}
.viewer-stage {
  box-shadow: none;
}
.asset-navigation {
  gap: 12px;
  color: var(--text-muted);
}
.canvas-bottom.review-mode {
  position: static;
  transform: none;
  padding: 3px;
  border-radius: var(--radius-sm);
  box-shadow: none;
}
.review-mode .btn {
  min-height: 32px;
  padding: 6px 14px;
  font-size: var(--text-xs);
}
.review-mode .btn.active {
  color: var(--text-on-accent);
  background: var(--brand-blue);
}
.pin,
.pin.selected,
.pin.resolved {
  border-radius: 50%;
  width: 34px;
  height: 34px;
  border: 2px solid var(--surface);
  box-shadow:
    0 0 0 1px var(--brand-blue),
    0 4px 16px #2526b320;
  background: var(--brand-blue);
  color: var(--text-on-accent);
  font-size: var(--text-xs);
}
.pin.selected {
  outline: 2px solid var(--brand-blue);
  outline-offset: 2px;
}
.pin.resolved {
  background: var(--text-muted);
}
.pin.draft-pin {
  background: var(--brand-yellow);
  color: var(--ink);
  box-shadow: 0 0 0 1px var(--brand-yellow);
}
.pin-preview,
dialog.pin-dialog {
  position: fixed;
  inset: auto;
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  width: min(430px, calc(100vw - 24px));
  z-index: 20;
  padding: 20px;
  font-size: var(--text-sm);
  line-height: 1.6;
  overflow: auto;
  max-height: calc(100dvh - 130px);
}
.pin-preview {
  width: min(350px, calc(100vw - 24px));
  max-height: 280px;
}
.pin-preview[hidden] {
  display: none;
}
.pin-preview-author {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}
.pin-preview time,
.pin-preview small {
  color: var(--muted);
  font-size: var(--text-2xs);
}
.pin-preview p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 14px 0 0;
}
.pin-preview .preview-status {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid var(--border);
  border-radius: 50%;
}
.pin-dialog .modal-head {
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
  margin-bottom: 12px;
}
.pin-dialog .modal-head h2 {
  font-size: var(--text-sm);
  font-weight: 600;
}
.pin-dialog .modal-description {
  margin-bottom: 14px;
  font-size: var(--text-2xs);
}
.pin-dialog textarea {
  min-height: 72px;
  background: var(--surface-sunken);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 12px;
}
.pin-dialog textarea:focus {
  border-color: var(--brand-blue);
}
.pin-dialog .conversation-text {
  margin: 0 0 20px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: var(--text-md);
}
.pin-dialog .conversation-actions {
  display: flex;
  gap: 8px;
  margin: 12px 0;
}
.pin-dialog .conversation-actions .btn {
  min-height: 30px;
  font-size: var(--text-2xs);
  padding: 6px 10px;
}
.pin-dialog .modal-actions {
  margin-top: 14px;
}
.pin-dialog .btn {
  min-height: 36px;
  padding: 8px 12px;
  font-size: var(--text-xs);
}
@media (min-width: 1700px) {
  .review-layout {
    grid-template-columns: 340px minmax(0, 1fr) 184px;
  }
  .review-layout.files-hidden {
    grid-template-columns: 340px minmax(0, 1fr);
  }
}
@media (min-width: 761px) and (max-width: 1100px) {
  .review-layout {
    grid-template-columns: 250px minmax(0, 1fr) 128px;
  }
  .review-layout.files-hidden {
    grid-template-columns: 250px minmax(0, 1fr);
  }
  .review-heading h1 {
    max-width: 210px;
  }
  .review-mode .btn {
    padding: 6px 9px;
  }
}
@media (max-width: 760px) {
  .review-layout,
  .review-layout.files-hidden {
    display: flex;
  }
  .comment-panel {
    border-right: 0;
  }
  .files-panel {
    flex: 0 0 auto;
    border-left: 0;
    border-top: 1px solid var(--border);
    max-height: 132px;
  }
  .files-panel > header {
    display: none;
  }
  .thumbnail-strip {
    flex-direction: row;
    padding: 6px 10px;
  }
  .file-thumbnail {
    width: 100px;
    flex: 0 0 100px;
  }
  .thumbnail-preview,
  .thumbnail-preview img {
    height: 62px;
    max-height: 62px;
  }
  .review-shell.show-discussion .files-panel {
    display: none;
  }
  .asset-navigation {
    gap: 6px;
  }
  .review-mode .btn {
    font-size: var(--text-2xs);
    min-height: 28px;
    padding: 5px 9px;
  }
  .pin-dialog,
  .pin-preview {
    max-height: calc(100dvh - 150px);
  }
  .viewer-scroll {
    padding: 16px;
  }
}
.guest-footer {
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 18px 22px;
}
.guest-footer > span {
  font-size: var(--text-2xs);
}
.reply-toggle {
  margin-right: 12px;
  margin-top: 10px;
}
.pin-dialog .modal-description {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.pin-dialog .modal-description strong {
  color: var(--ink);
  font-size: var(--text-sm);
}
.pin-dialog .modal-head .conversation-actions {
  margin: 0 6px 0 auto;
}
.pin-dialog #toggle-resolved {
  width: 30px;
  padding: 4px;
  border-radius: 50%;
  border: 1px solid var(--border);
}
.new-pin-dialog .modal-description {
  display: none;
}
.new-pin-dialog .field label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
@media (min-width: 761px) and (max-width: 1100px) {
  .canvas-toolbar {
    gap: 6px;
    padding: 8px 12px;
  }
  .canvas-toolbar .icon-btn {
    width: 30px;
    height: 30px;
  }
  .zoom-controls select {
    max-width: 120px;
  }
  #image-size {
    display: none;
  }
  #thumbnails-toggle {
    min-height: 32px;
    padding: 5px 8px;
  }
}
/* Compact Pinpoint review and file management. */
.dashboard,
.project-page {
  padding: 24px 28px;
}
.page-heading {
  margin-bottom: 22px;
}
.page-heading h1 {
  font-size: var(--text-xl);
}
.page-heading p {
  font-size: var(--text-xs);
}
.project-grid {
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 18px;
}
.project-preview,
.asset-thumb {
  height: 160px;
  background: var(--surface-sunken);
}
.project-preview img,
.asset-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.project-info,
.asset-details {
  padding: 12px 14px;
}
.project-info h3,
.asset-details strong {
  font-size: var(--text-sm);
}
.project-meta,
.project-footer,
.asset-details span {
  font-size: var(--text-2xs);
}
.upload-zone {
  padding: 20px;
  margin-bottom: 22px;
}
.upload-zone strong {
  font-size: var(--text-sm);
}
.asset-card,
.file-thumbnail {
  position: relative;
}
.asset-card > a {
  display: block;
}
.asset-actions {
  display: flex;
  gap: 4px;
  position: absolute;
  right: 6px;
  top: 6px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s;
}
.asset-card:hover .asset-actions,
.file-thumbnail:hover .asset-actions,
.asset-card:focus-within .asset-actions,
.file-thumbnail:focus-within .asset-actions {
  opacity: 1;
  pointer-events: auto;
}
.asset-actions .icon-btn {
  width: 27px;
  height: 27px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.asset-actions svg {
  width: 15px;
  height: 15px;
}
.file-select {
  display: block;
  width: 100%;
  padding: 0;
  text-align: left;
}
.file-select > span:last-child {
  display: block;
  font-size: var(--text-2xs);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 5px;
}
.comment-panel[hidden],
.pins-layer[hidden] {
  display: none;
}
.review-layout.discussion-hidden {
  grid-template-columns: minmax(0, 1fr) 164px;
}
.review-layout.discussion-hidden.files-hidden {
  grid-template-columns: minmax(0, 1fr);
}
#discussion-toggle {
  position: fixed;
  left: 300px;
  top: 50%;
  width: 22px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 0 6px 6px 0;
  background: var(--surface);
  z-index: 4;
  padding: 2px;
}
.review-shell.discussion-collapsed #discussion-toggle {
  left: 0;
}
.pin-preview {
  width: min(290px, calc(100vw - 24px));
  padding: 14px;
}
dialog.pin-dialog {
  width: min(330px, calc(100vw - 24px));
  padding: 14px;
  font-size: var(--text-xs);
}
.pin-dialog .modal-head {
  padding-bottom: 8px;
  margin-bottom: 9px;
}
.pin-dialog .modal-description {
  margin-bottom: 10px;
  gap: 8px;
}
.pin-dialog .conversation-text {
  font-size: var(--text-sm);
  margin-bottom: 14px;
}
.pin-dialog .field {
  margin-bottom: 8px;
}
.pin-dialog textarea {
  min-height: 44px;
  padding: 9px;
  font-size: var(--text-xs);
}
.pin-dialog .btn {
  min-height: 29px;
  padding: 5px 9px;
  font-size: var(--text-2xs);
}
.pin-dialog .modal-actions {
  margin-top: 8px;
}
.pin,
.pin.selected,
.pin.resolved {
  width: 27px;
  height: 27px;
  font-size: var(--text-2xs);
}
.pin.draft-pin {
  background: var(--brand-blue);
  color: var(--text-on-accent);
  box-shadow: 0 0 0 1px var(--brand-blue);
}
dialog.file-dialog {
  width: min(360px, calc(100vw - 24px));
  padding: 20px;
}
.file-dialog .modal-head h2 {
  font-size: var(--text-base);
  overflow-wrap: anywhere;
}
.file-dialog .modal-description {
  font-size: var(--text-xs);
  margin-bottom: 16px;
}
.file-dialog .btn {
  min-height: 32px;
  padding: 7px 12px;
  font-size: var(--text-xs);
}
@media (min-width: 1700px) {
  #discussion-toggle {
    left: 340px;
  }
  .review-layout.discussion-hidden {
    grid-template-columns: minmax(0, 1fr) 184px;
  }
}
@media (min-width: 761px) and (max-width: 1100px) {
  #discussion-toggle {
    left: 250px;
  }
  .review-layout.discussion-hidden {
    grid-template-columns: minmax(0, 1fr) 128px;
  }
}
@media (max-width: 760px) {
  #discussion-toggle {
    display: none;
  }
  .dashboard,
  .project-page {
    padding: 20px;
  }
  .review-layout.discussion-hidden {
    display: flex;
  }
}
/* File ⋯ menu: touch screens only; mouse users get the hover icons. */
.asset-more {
  display: none;
  position: absolute;
  right: 6px;
  top: 6px;
  z-index: 2;
}
.asset-more > summary {
  list-style: none;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius-full);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}
.asset-more > summary::-webkit-details-marker {
  display: none;
}
.asset-more-list {
  position: fixed;
  z-index: 60;
  min-width: 180px;
  display: grid;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}
.asset-more-list button {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-height: var(--touch-target);
  padding: 0 10px;
  border: 0;
  border-radius: var(--radius-sm);
  background: none;
  font: inherit;
  font-size: var(--text-md);
  color: var(--text);
  text-align: left;
}
.asset-more-list button:active {
  background: var(--surface-hover);
}
.asset-more-list .icon {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
}
.asset-more-list .danger-text,
.asset-more-list .danger-text .icon {
  color: var(--danger);
}
@media (hover: none) {
  .asset-actions {
    display: none;
  }
  .asset-more {
    display: block;
  }
}
.page-heading .btn {
  min-height: 36px;
  padding: 8px 12px;
  font-size: var(--text-xs);
}
#discussion-toggle {
  width: 24px;
  height: 40px;
}
/* Keep review controls and card metadata in separate, compact rows. */
.topbar {
  height: 48px;
  min-height: 48px;
  padding: 0 24px;
}
.breadcrumb a {
  color: inherit;
  text-decoration: none;
}
.breadcrumb a:hover,
.review-title a:hover {
  text-decoration: underline;
}
.btn,
.page-heading .btn {
  min-height: 32px;
  padding: 6px 10px;
  font-size: var(--text-xs);
}
.page-heading {
  gap: 12px;
  margin-bottom: 16px;
  align-items: center;
}
.page-heading > div:last-child {
  flex-wrap: wrap;
}
.page-heading h1 {
  font-size: var(--text-xl);
}
.project-page .eyebrow {
  margin-bottom: 5px !important;
  font-size: var(--text-2xs);
}
.project-parent {
  margin-bottom: 12px;
  font-size: var(--text-xs);
}
.upload-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 100px;
  padding: 16px;
}
.upload-zone small {
  font-size: var(--text-2xs);
}
.asset-card > a {
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100%;
}
.asset-thumb {
  height: 160px;
  flex: 0 0 160px;
  overflow: hidden;
}
.asset-thumb img {
  display: block;
  width: 100%;
  height: 160px;
  object-fit: cover;
}
.asset-details {
  position: static;
  background: var(--surface);
  min-height: 64px;
  width: 100%;
  flex: 0 0 auto;
}
.asset-details strong,
.asset-details span {
  position: static;
  line-height: 1.4;
}
.project-grid {
  grid-template-columns: repeat(auto-fill, minmax(210px, 280px));
}
.review-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  height: 52px;
  min-height: 52px;
  padding: 0 16px;
  gap: 10px;
}
.review-heading {
  min-width: 0;
  gap: 8px;
}
.review-title {
  min-width: 0;
}
.review-heading h1 {
  max-width: 100%;
  font-size: var(--text-xs);
}
.review-heading small {
  margin-top: 2px;
  font-size: var(--text-2xs);
}
.review-title a {
  color: inherit;
}
.review-header-actions {
  justify-self: end;
}
.asset-navigation {
  grid-column: 2;
  gap: 5px;
}
.canvas-bottom.review-mode {
  border-radius: var(--radius-sm);
  padding: 2px;
}
.review-mode .btn {
  min-height: 28px;
  padding: 4px 9px;
  font-size: var(--text-2xs);
}
.icon-btn {
  width: 30px;
  height: 30px;
}
.review-header .icon {
  width: 20px;
  height: 20px;
}
.canvas-toolbar {
  min-height: 44px;
  padding: 5px 10px;
  gap: 5px;
  flex-wrap: nowrap;
  overflow-x: auto;
}
#viewer-hint {
  width: auto;
  flex: 1 1 auto;
  min-width: 100px;
  max-width: 300px;
  font-size: var(--text-2xs);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.zoom-controls select {
  min-height: 28px;
  font-size: var(--text-2xs);
  max-width: 128px;
}
.zoom-controls {
  flex-shrink: 0;
  gap: 1px;
}
.canvas-toolbar .icon-btn {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  font-size: var(--text-lg);
}
.canvas-toolbar .icon {
  width: 21px;
  height: 21px;
}
#thumbnails-toggle {
  min-height: 28px;
  padding: 4px;
  font-size: var(--text-2xs);
}
#image-size,
#zoom-label {
  font-size: var(--text-2xs);
  white-space: nowrap;
}
.review-layout {
  grid-template-columns: 270px minmax(0, 1fr) 132px;
}
.review-layout.files-hidden {
  grid-template-columns: 270px minmax(0, 1fr);
}
.review-layout.discussion-hidden {
  grid-template-columns: minmax(0, 1fr) 132px;
}
.review-layout.discussion-hidden.files-hidden {
  grid-template-columns: minmax(0, 1fr);
}
#discussion-toggle {
  left: 270px;
}
.files-panel > header {
  min-height: 44px;
  padding: 5px 10px;
}
.thumbnail-strip {
  padding: 10px 7px;
  gap: 10px;
}
.thumbnail-preview,
.thumbnail-preview img {
  max-height: 72px;
  height: 72px;
}
.review-project-title {
  padding: 15px 16px;
}
.review-project-title h2 {
  font-size: var(--text-md);
  margin-bottom: 4px;
}
.comment-panel-header {
  padding: 14px 16px 8px;
}
.comment-card {
  padding: 16px;
}
.comment-tools {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 0 16px 12px;
  border-bottom: 1px solid var(--border);
}
.comment-tools input {
  grid-column: 1 / -1;
}
.comment-tools input,
.comment-tools select {
  width: 100%;
  min-width: 0;
  min-height: 28px;
  padding: 5px 7px;
  font-size: var(--text-2xs);
}
.resolve-btn.done,
#toggle-resolved.done {
  color: var(--success);
  background: var(--success-soft);
  border-color: var(--success-soft);
}
.pin.resolved,
.timeline-marker.done {
  background: var(--success);
  box-shadow: var(--shadow-xs);
  color: var(--text-on-accent);
}
.pin-dialog .modal-head > h2 {
  display: none;
}
.conversation-navigation {
  display: flex;
  gap: 3px;
  margin-right: auto;
}
.conversation-navigation .icon-btn,
.pin-dialog .modal-head .icon-btn {
  width: 27px;
  height: 27px;
}
.conversation-navigation button:disabled {
  opacity: 0.3;
}
#conversation-reply .field {
  display: flex;
  gap: 6px;
  align-items: end;
  margin: 0;
}
#conversation-reply textarea {
  flex: 1;
  min-width: 0;
  min-height: 36px;
  height: 36px;
  max-height: 90px;
  border: 0;
  background: var(--surface-sunken);
}
#conversation-reply button[type="submit"] {
  width: 30px;
  height: 36px;
  padding: 6px;
  min-height: 36px;
  font-size: 0;
}
#conversation-reply button[type="submit"]::after {
  content: "➜";
  font-size: var(--text-lg);
}
#conversation-reply .error {
  margin: 5px 0 0;
}
.replacement-drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px dashed var(--muted);
  border-radius: var(--radius-sm);
  padding: 28px 12px;
}
.replacement-drop.dragging {
  border-color: var(--brand-blue);
  background: var(--surface-selected);
}
.replacement-drop input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.replacement-drop:focus-within {
  outline: 2px solid var(--brand-blue);
}
#replacement-name {
  font-size: var(--text-2xs);
  max-width: 100%;
  overflow-wrap: anywhere;
}
.video-review video {
  display: block;
  max-width: none;
}
.video-review .pins-layer {
  pointer-events: none;
  bottom: 44px;
}
.video-review .pins-layer .pin {
  pointer-events: auto;
}
.video-controls {
  padding: 10px 24px;
  background: var(--surface-sunken);
  border-top: 1px solid var(--border);
}
#video-markers {
  height: 25px;
  position: relative;
  margin: 0 12px 4px;
}
.timeline-marker {
  position: absolute;
  transform: translateX(-50%);
  width: 23px;
  height: 23px;
  border-radius: 50%;
  background: var(--brand-blue);
  color: var(--text-on-accent);
  font-size: var(--text-2xs);
  border: 1px solid var(--surface);
}
#video-seek {
  width: 100%;
  accent-color: var(--brand-blue);
  height: 16px;
  padding: 0;
  min-height: 0;
}
.video-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-2xs);
}
.video-actions .icon-btn {
  width: 32px;
  font-size: var(--text-2xs);
}
#video-comment {
  margin-left: auto;
  font-size: var(--text-2xs);
}
@media (min-width: 1700px) {
  .review-layout {
    grid-template-columns: 290px minmax(0, 1fr) 140px;
  }
  .review-layout.files-hidden {
    grid-template-columns: 290px minmax(0, 1fr);
  }
  .review-layout.discussion-hidden {
    grid-template-columns: minmax(0, 1fr) 140px;
  }
  #discussion-toggle {
    left: 290px;
  }
}
@media (min-width: 761px) and (max-width: 1100px) {
  .review-layout {
    grid-template-columns: 240px minmax(0, 1fr) 112px;
  }
  .review-layout.files-hidden {
    grid-template-columns: 240px minmax(0, 1fr);
  }
  .review-layout.discussion-hidden {
    grid-template-columns: minmax(0, 1fr) 112px;
  }
  #discussion-toggle {
    left: 240px;
  }
  #viewer-hint {
    display: none;
  }
}
@media (max-width: 760px) {
  .review-header {
    height: auto;
    min-height: 80px;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 6px 12px;
    gap: 4px;
  }
  .review-header-actions {
    grid-column: 2;
    grid-row: 1;
  }
  .asset-navigation {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: center;
  }
  .review-heading h1 {
    font-size: var(--text-2xs);
  }
  .canvas-toolbar {
    padding: 5px 8px;
  }
  #viewer-hint {
    display: none;
  }
  .review-layout {
    display: flex;
  }
  .project-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  }
  .page-heading {
    flex-wrap: wrap;
  }
  .project-page,
  .dashboard {
    padding: 16px;
  }
  .video-controls {
    padding: 10px 16px;
  }
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
@media (max-width: 1100px) {
  #viewer-hint {
    display: inline;
    min-width: 70px;
    max-width: 120px;
    flex: 0 1 120px;
    font-size: var(--text-2xs);
  }
}
.workspace-project-toolbar {
  border-block: 1px solid var(--border);
  margin-bottom: 22px;
  padding: 8px 0;
}
.project-toolbar-row,
.project-tool-icons,
#project-selection {
  display: flex;
  align-items: center;
  gap: 6px;
}
.project-toolbar-row {
  flex-wrap: wrap;
}
.project-toolbar-row > .section-title {
  margin-right: auto;
  font-size: var(--text-sm);
}
.project-tool-icons .active {
  background: var(--surface-selected);
  outline: 1px solid var(--brand-blue);
}
#project-selection {
  font-size: var(--text-xs);
}
#project-selection-count {
  background: var(--surface-sunken);
  padding: 6px 8px;
  border-radius: var(--radius-xs);
}
.project-filter-row,
.project-find-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}
.project-filter-row {
  padding-top: 8px;
}
.project-filter-row > span {
  color: var(--muted);
  font-size: var(--text-2xs);
}
.project-filter-row select,
#project-sort {
  min-height: 30px;
  width: auto;
  padding: 4px 8px;
  font-size: var(--text-2xs);
  border: 0;
  background: transparent;
}
.project-find-row:has(> :not([hidden])) {
  padding-top: 8px;
}
#project-search-box {
  max-width: 250px;
}
.project-page .project-grid > [hidden],
.project-page .subprojects[hidden],
.project-page .project-grid[hidden],
.project-page > .project-controls[hidden],
.project-no-match[hidden] {
  display: none;
}
.project-no-match {
  padding: var(--space-5) 0;
  text-align: center;
}
#project-search {
  min-height: 30px;
  font-size: var(--text-xs);
}
.selectable-project {
  position: relative;
  min-width: 0;
  border-radius: var(--radius-md);
}
.selectable-project .project-card {
  height: 100%;
}
.selectable-project.selected {
  outline: 2px solid var(--brand-blue);
  outline-offset: 1px;
}
.project-select-hit {
  position: absolute;
  left: 0;
  top: 0;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  cursor: pointer;
  opacity: 0;
}
.project-select-hit input {
  accent-color: var(--brand-blue);
  width: 18px;
  height: 18px;
  min-height: 0;
  margin: 0;
  cursor: pointer;
  background: var(--surface);
}
.selectable-project:hover .project-select-hit,
.selectable-project:focus-within .project-select-hit,
.selectable-project.selected .project-select-hit {
  opacity: 1;
}
.archive-label {
  font-size: var(--text-2xs);
  color: var(--muted);
}
@media (hover: none) {
  .project-select-hit {
    opacity: 1;
  }
}
@media (max-width: 760px) {
  .project-toolbar-row > .section-title {
    width: 100%;
  }
  .project-filter-row {
    gap: 4px;
  }
}
.video-review .pins-layer {
  bottom: 0;
}
.video-actions {
  flex-wrap: wrap;
}
#video-speed {
  width: 62px;
  min-height: 28px;
  padding: 3px 5px;
  font-size: var(--text-2xs);
}
#video-volume {
  width: 70px;
  min-height: 0;
  height: 16px;
  padding: 0;
  accent-color: var(--brand-blue);
}
#video-mute.muted {
  opacity: 0.45;
}
.video-actions .icon {
  width: 19px;
  height: 19px;
}
@media (max-width: 760px) {
  #video-comment {
    width: 100%;
    justify-content: center;
  }
}
#asset-version {
  min-height: 28px;
  width: 120px;
  flex: 0 0 120px;
  padding: 3px 5px;
  font-size: var(--text-2xs);
}
.history-view #viewer-hint {
  color: var(--brand-blue);
  font-weight: 600;
}
.history-view .viewer-stage.annotating {
  cursor: default;
}
.history-view .pin {
  cursor: pointer;
  touch-action: auto;
}
.project-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  height: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  overflow: hidden;
}
.project-card .project-preview {
  flex: 0 0 160px;
  width: 100%;
}
.project-card .project-info {
  flex: 1;
  background: var(--surface);
}
.selectable-project .project-card {
  height: 100%;
}
dialog.compression-dialog {
  width: min(900px, calc(100vw - 24px));
  max-height: 90dvh;
  padding: 22px;
}
.compress-settings {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: var(--text-xs);
}
.compress-settings input {
  width: 80px;
  min-height: 30px;
  padding: 5px;
}
.compress-files {
  max-height: 180px;
  overflow: auto;
  margin: 16px 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.compress-files label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  font-size: var(--text-xs);
  cursor: pointer;
}
.compress-files input {
  width: 16px;
  height: 16px;
  min-height: 0;
  accent-color: var(--brand-blue);
}
.compress-files span {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.compress-files small {
  white-space: nowrap;
  color: var(--muted);
}
.compression-status {
  font-size: var(--text-xs);
  color: var(--muted);
}
.compression-result {
  border: 1px solid var(--border);
  padding: 12px;
  border-radius: var(--radius-sm);
  margin: 12px 0;
  font-size: var(--text-xs);
}
.compression-preview-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.compression-preview-pair figure {
  margin: 10px 0 0;
  min-width: 0;
}
.compression-preview-pair img {
  display: block;
  width: 100%;
  height: 180px;
  object-fit: contain;
  background: var(--surface-sunken);
}
.compression-preview-pair figcaption {
  padding-top: 6px;
  font-size: var(--text-2xs);
  color: var(--muted);
}
.compression-dialog .modal-actions {
  position: sticky;
  bottom: 0;
  background: var(--surface);
  padding: 10px 0;
  border-top: 1px solid var(--border);
  z-index: 1;
}

.compression-preview-pair video {
  width: 100%;
  height: 180px;
  object-fit: contain;
  background: var(--surface-sunken);
}

.viewer-stage iframe {
  display: block;
  border: 0;
  background: var(--surface-inverse);
}
.sharepoint-controls {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  background: var(--surface);
  font-size: var(--text-xs);
}
.sharepoint-access-notice {
  width: min(560px, calc(100% - 24px));
  box-sizing: border-box;
  margin: 12px auto;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: var(--text-xs);
  line-height: 1.5;
}
.viewer-scroll.sharepoint-embed-view {
  flex-direction: column;
  align-items: center;
}
.sharepoint-embed-view > * {
  flex-shrink: 0;
}
.sharepoint-access-notice p {
  margin: 6px 0;
  color: var(--muted);
}
.sharepoint-controls input {
  width: 90px;
}
.sharepoint-controls small,
.sharepoint-controls details {
  flex-basis: 100%;
  color: var(--muted);
}
.sharepoint-controls details p {
  margin-top: 8px;
}

.viewer-stage.linked-video .pins-layer {
  display: none;
}

/* Comparison uses the existing private file endpoints and read-only History. */
dialog.comparison-dialog {
  position: fixed;
  inset: 0;
  margin: 0;
  width: 100%;
  height: 100dvh;
  max-width: none;
  max-height: 100dvh;
  box-sizing: border-box;
  padding: 0;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  overscroll-behavior: contain;
}
dialog.comparison-dialog[open] { display:flex; flex-direction:column; }
dialog.comparison-dialog::backdrop { overflow:hidden; overscroll-behavior:contain; }
.comparison-dialog > .modal-head { flex-shrink:0; padding:12px 24px; margin:0; border-bottom:1px solid var(--border); }
.comparison-dialog > .modal-head .icon-btn { width:40px; height:40px; flex-shrink:0; }
.comparison-dialog > .modal-description { flex-shrink:0; margin:0; padding:12px 24px 0; }
.comparison-body { flex:1; min-height:0; padding:16px 24px 24px; overflow:auto; overscroll-behavior:contain; }
.comparison-toolbar { display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin-bottom:12px; font-size:var(--text-xs); }
.comparison-toolbar select { min-width:0; max-width:100%; min-height:32px; padding:5px 8px; border:1px solid var(--border); border-radius:var(--radius-sm); background:var(--surface); color:inherit; font:inherit; }
#comparison-version { flex:1; }
.comparison-images, .comparison-feedback { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:20px; align-items:start; }
.comparison-images[hidden], .comparison-slider-controls[hidden] { display:none; }
.comparison-images figure { margin:0; min-width:0; }
.comparison-images figcaption { margin:0 0 8px; font-size:var(--text-xs); font-weight:650; }
.comparison-frame { position:relative; border:1px solid var(--border); background:var(--surface-soft); line-height:0; }
.comparison-frame img { display:block; width:100%; height:auto; }
.comparison-pins { position:absolute; inset:0; pointer-events:none; }
.comparison-pin { position:absolute; transform:translate(-50%,-50%); width:24px; height:24px; border:2px solid var(--surface); border-radius:50%; background:var(--accent); color:var(--text-on-accent); font-size:var(--text-2xs); cursor:pointer; pointer-events:auto; line-height:20px; padding:0; }
.comparison-pin.resolved { background:var(--success); }
.comparison-pin.selected { outline:3px solid var(--highlight); outline-offset:2px; }
.comparison-images.slider-view { display:block; position:relative; overflow:hidden; }
.comparison-images[hidden] { display:none; }
.slider-view figure:first-child { position:absolute; inset:0 0 auto; z-index:1; clip-path:inset(0 calc(100% - var(--split,50%)) 0 0); }
.slider-view figcaption { position:absolute; top:8px; right:8px; z-index:2; padding:4px 8px; border-radius:var(--radius-xs); background:var(--surface); }
.slider-view figure:first-child figcaption { right:auto; left:8px; }
.comparison-slider-controls { display:flex; align-items:center; flex-wrap:wrap; gap:10px; margin:12px 0; font-size:var(--text-xs); }
.comparison-slider-controls input { flex:1; min-width:100px; accent-color:var(--accent); }
.comparison-slider-controls .admin-help { flex-basis:100%; margin:0; }
.comparison-feedback { margin-top:20px; }
.comparison-feedback h3 { font-size:var(--text-md); margin:0 0 12px; }
.comparison-feedback h3 small { color:var(--muted); font-weight:400; font-size:var(--text-2xs); }
.comparison-comment { padding:12px; border:1px solid var(--border); border-radius:var(--radius-sm); margin-bottom:10px; font-size:var(--text-xs); overflow-wrap:anywhere; }
.comparison-comment.selected { border-color:var(--accent); background:var(--surface-selected); }
.comparison-comment p { white-space:pre-wrap; margin:8px 0; line-height:1.6; }
.comparison-comment-status { display:block; margin-top:4px; color:var(--muted); }
.comparison-comment .btn { font-size:var(--text-2xs); padding:4px 8px; min-height:28px; }
@media(max-width:640px) {
  .comparison-dialog > .modal-head { padding:8px 12px; }
  .comparison-dialog > .modal-description { padding:10px 12px 0; }
  .comparison-body { padding:12px; }
  .comparison-images, .comparison-feedback { grid-template-columns:minmax(0,1fr); }
  .comparison-toolbar select { flex-basis:100%; }
}

.casepoint-loader {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  vertical-align: middle;
  line-height: 1.5;
}
.casepoint-loading-icon,
.btn[aria-busy="true"]::before {
  display: inline-block;
  width: 18px;
  height: 24px;
  flex-shrink: 0;
  background: url("casepoint-icon.svg") center / contain no-repeat;
}
.btn[aria-busy="true"]::before {
  content: "";
  background-color: var(--surface);
  background-size: 12px 16px;
  border-radius: var(--radius-xs);
}
.initial-loading {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
  color: var(--muted);
}
.initial-loading .casepoint-loader {
  flex-direction: column;
  gap: 22px;
}
.initial-loading .casepoint-loading-icon {
  width: 45px;
  height: 60px;
}
@media (prefers-reduced-motion: no-preference) {
  .casepoint-loading-icon,
  .btn[aria-busy="true"]::before {
    animation: casepoint-loading 1.4s ease-in-out infinite;
  }
}
@keyframes casepoint-loading {
  0%, 100% { transform: translateY(0) scale(1); opacity: 1; }
  50% { transform: translateY(-3px) scale(.93); opacity: .65; }
}
.video-loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  z-index: 2;
  background: #faf9f6e6;
  color: var(--muted);
  font-size: var(--text-sm);
}

/* Shared surface treatment: calm contrast, clear edges and restrained motion. */
:root {
  --border: var(--line);
  --muted: var(--text-muted);
  --surface-shadow: var(--shadow-md);
}
.dashboard, .project-page { background: var(--surface-sunken); }
.project-card, .asset-card {
  border-color: var(--border);
  box-shadow: var(--surface-shadow);
}
.project-card:hover {
  transform: none;
  border-color: var(--cp-blue-20);
  box-shadow: var(--shadow-md);
}
.project-preview { background: var(--surface-sunken); }
.btn { letter-spacing: -.01em; }
.primary { box-shadow: 0 2px 3px #2526b314, inset 0 1px 0 #ffffff18; }
.secondary { border-color: var(--line-strong); box-shadow: var(--shadow-xs); }
.secondary:hover, .icon-btn:hover { background-color: var(--surface-hover); }
.quiet:hover { background-color: var(--surface-hover); }
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]), textarea, select {
  border-color: var(--line-strong);
}
.review-header { background: var(--surface); border-bottom-color: var(--border); }
.review-header-actions { gap: 12px; }
.canvas-toolbar, .comment-panel-header, .files-panel-header { border-color: var(--border); }
.comment-card { border-color: var(--line); }
.comment-card.selected { box-shadow: inset 3px 0 var(--brand-blue); }
.viewer-avatars {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 3px;
  border-radius: var(--radius-lg);
  flex-shrink: 0;
}
.viewer-avatar {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 2px solid var(--surface);
  background: var(--surface-selected);
  color: var(--brand-blue);
  font-weight: 650;
  font-size: var(--text-2xs);
  flex-shrink: 0;
  box-shadow: var(--shadow-xs);
}
.viewer-avatars .viewer-avatar + .viewer-avatar { margin-left: -8px; }
.viewer-avatar-more { background: var(--surface-sunken); color: var(--text-muted); }
.viewer-avatars:hover { background: var(--surface-hover); }
.viewer-activity-popover {
  position: fixed;
  inset: auto;
  width: min(370px, calc(100vw - 24px));
  margin: 0;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  color: var(--ink);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  overflow: auto;
  overscroll-behavior: contain;
}
.activity-popover-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.activity-popover-heading h2 { margin: 0; font-size: var(--text-md); letter-spacing: -.02em; }
.viewer-activity-list { list-style: none; padding: 0; margin: 12px 0; }
.viewer-activity-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; }
.viewer-activity-person { flex: 1; min-width: 0; }
.viewer-activity-person strong { font-size: var(--text-xs); font-weight: 600; overflow-wrap: anywhere; }
.viewer-activity-person small { display: block; font-size: var(--text-2xs); line-height: 1.6; color: var(--muted); overflow-wrap: anywhere; margin-top: 4px; }
.viewer-activity-row time { color: var(--muted); font-size: var(--text-2xs); flex-shrink: 0; }
.activity-note { font-size: var(--text-2xs); line-height: 1.6; color: var(--muted); margin: 8px 0 16px; }
.activity-details { width: 100%; }
.activity-full-list .viewer-activity-row { border-bottom: 1px solid var(--border); align-items: flex-start; }
.activity-full-list time { max-width: 110px; text-align: right; line-height: 1.6; }
@media (max-width: 760px) {
  .review-header-actions { gap: 8px; }
  .viewer-avatars .viewer-avatar:nth-child(n+2) { display: none; }
  .viewer-avatar { width: 30px; height: 30px; font-size: var(--text-2xs); }
}
@media (prefers-reduced-motion: no-preference) {
  .btn, .icon-btn, .project-card, .asset-card, .viewer-avatars {
    transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
  }
  @starting-style { .viewer-activity-popover:popover-open { opacity: 0; } }
  .viewer-activity-popover:popover-open { transition: opacity 140ms ease-out; }
}
@media (prefers-reduced-motion: reduce) {
  .btn, .icon-btn, .project-card, .asset-card, .viewer-avatars, .viewer-activity-popover { transition: none; }
}
.comment-tools input, .comment-tools select {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-sunken);
  color: var(--ink);
  box-shadow: var(--shadow-xs);
}
.comment-tools input:focus, .comment-tools select:focus { background: var(--surface); }

/* Public sign-in and review identity also use this helper text. */
.admin-help { font-size:var(--text-xs); line-height:1.8; color:var(--muted); }

.review-more { position:relative; flex-shrink:0; }
.review-more > summary { list-style:none; cursor:pointer; }
.review-more > summary::-webkit-details-marker { display:none; }
.review-more > summary::after { content:"⌄"; margin-left:6px; }
.review-more-menu { position:fixed; z-index:60; min-width:200px; padding:6px; border:1px solid var(--line); border-radius:var(--radius-md); background:var(--surface); box-shadow:var(--shadow-md); display:grid; gap:2px; }
.review-more-menu button,
.review-more-menu #download-file { display:flex; align-items:center; justify-content:flex-start; gap:var(--space-2); width:100%; height:auto; min-height:36px; padding:0 10px; border:0; border-radius:var(--radius-sm); background:none; box-shadow:none; font:inherit; font-size:var(--text-sm); font-weight:var(--weight-medium); color:var(--text); white-space:nowrap; cursor:pointer; }
.review-more-menu button:hover,
.review-more-menu button:focus-visible { background:var(--surface-hover); }
.review-more-menu .icon,
.review-more-menu svg { width:16px; height:16px; flex:none; color:var(--text-muted); }
@media (pointer: coarse) { .review-more-menu button { min-height:var(--touch-target); } }

.brand img.login-logo { display:block; width:auto; max-width:220px; height:auto; max-height:64px; object-fit:contain; }

.account-page {
  max-width: 620px;
  margin: 70px auto;
  padding: 30px;
}
.account-page .brand {
  margin-bottom: 44px;
}
.account-page h1 {
  font-size: var(--text-2xl);
}
.account-page p {
  color: var(--muted);
  font-size: var(--text-md);
  line-height: 1.8;
}
.account-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 25px;
}
.workspace-select {
  width: 100%;
  font: inherit;
  font-size: var(--text-xs);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 11px;
  border-radius: var(--radius-sm);
  color: inherit;
}
.workspace-selector label {
  font-size: var(--text-2xs);
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  display: block;
  margin-bottom: 7px;
}
.signin-review {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.status-detail {
  font-size: var(--text-2xs);
  color: var(--muted);
}
@media (max-width:760px) {
  .account-page {
    margin: 30px auto;
    padding: 25px;
  }
  .workspace-selector {
    max-width: 160px;
  }
  .workspace-selector label {
    display: none;
  }
  .shell:not(.admin-shell) .sidebar .workspace-selector {
    display: block;
  }
}

/* Notification bell and inbox panel */
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}
.inbox {
  position: relative;
}
.inbox-bell {
  position: relative;
}
.inbox-badge {
  position: absolute;
  top: -3px;
  right: -4px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: var(--radius-sm);
  background: var(--danger);
  color: var(--text-on-accent);
  font-size: var(--text-2xs);
  font-weight: 700;
  line-height: 17px;
  text-align: center;
}
.inbox-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 60;
  width: min(380px, calc(100vw - 32px));
  max-height: min(560px, calc(100vh - 120px));
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  text-align: left;
}
.inbox-panel[hidden] {
  display: none;
}
.inbox-head,
.inbox-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
}
.inbox-head h2 {
  margin: 0;
  font-size: var(--text-md);
}
.inbox-panel .tabs {
  padding: 0 10px;
}
.inbox-foot {
  border-top: 1px solid var(--border);
}
.inbox-list {
  list-style: none;
  margin: 0;
  padding: 4px 0;
  overflow: auto;
  flex: 1;
}
.inbox-item {
  display: grid;
  gap: 3px;
  padding: 10px 16px 10px 26px;
  position: relative;
  color: var(--ink);
  text-decoration: none;
  font-size: var(--text-xs);
}
.inbox-item:hover,
.inbox-item:focus-visible {
  background: var(--surface-sunken);
}
.inbox-item.unread::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 15px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand-blue);
}
.inbox-line strong {
  font-weight: 650;
}
.inbox-excerpt {
  color: var(--text-muted);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.inbox-item small {
  color: var(--muted);
  font-size: var(--text-2xs);
}
.inbox-empty {
  margin: 0;
  padding: 24px 16px;
  color: var(--muted);
  font-size: var(--text-xs);
}
.inbox-more {
  margin: 4px 16px 8px;
}
.choice-list {
  border: 0;
  margin: 0 0 14px;
  padding: 0;
  display: grid;
  gap: 8px;
}
.choice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  cursor: pointer;
}
.choice:has(input:checked) {
  border-color: var(--brand-blue);
  background: var(--surface-sunken);
}
.choice small {
  display: block;
  color: var(--muted);
  margin-top: 2px;
}
.choice input {
  margin-top: 3px;
}

/* Account page */
a.profile-name,
a.avatar {
  color: inherit;
  text-decoration: none;
}
a.profile-name,
.profile small {
  display: block;
}
a.profile-name:hover {
  text-decoration: underline;
}
.settings-page {
  padding: 38px 44px;
  max-width: 760px;
}
.settings-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: -10px 0 22px;
  font-size: var(--text-sm);
}
.settings-jump a {
  color: var(--brand-blue);
}
.settings-card {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px 24px;
  margin-bottom: 18px;
  scroll-margin-top: 16px;
}
.settings-card h2 {
  margin: 0 0 6px;
  font-size: var(--text-base);
}
.settings-card h3 {
  margin: 22px 0 6px;
  font-size: var(--text-md);
}
.settings-help {
  color: var(--muted);
  font-size: var(--text-sm);
  margin: 0 0 14px;
}
.settings-help .icon {
  width: 14px;
  height: 14px;
  vertical-align: -2px;
}
.settings-card form {
  max-width: 460px;
}
.settings-card .choice-list legend {
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: 8px;
}
.settings-facts {
  display: grid;
  gap: 6px;
  margin: 0 0 12px;
  font-size: var(--text-sm);
}
.settings-facts div {
  display: flex;
  gap: 10px;
}
.settings-facts dt {
  width: 60px;
  color: var(--muted);
}
.settings-facts dd {
  margin: 0;
}
.settings-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.settings-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: var(--text-sm);
}
.settings-list small {
  color: var(--muted);
  flex: 1;
}
@media (max-width: 760px) {
  .settings-page {
    padding: 24px 16px;
  }
}

/* Mentions and assignments */
.mention {
  color: var(--brand-blue);
  background: var(--surface-selected);
  border-radius: var(--radius-xs);
  padding: 0 2px;
  font-weight: 600;
}
.field:has(.mention-picker) {
  position: relative;
}
.mention-picker {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  z-index: 70;
  list-style: none;
  margin: 4px 0 0;
  padding: 4px;
  max-height: 220px;
  overflow: auto;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
}
.mention-picker[hidden] {
  display: none;
}
.mention-picker li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  cursor: pointer;
}
.mention-picker li[aria-selected="true"],
.mention-picker li:hover {
  background: var(--surface-selected);
}
.mention-initials {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--brand-blue);
  color: var(--text-on-accent);
  font-size: var(--text-2xs);
  font-weight: 700;
}
.task-summary {
  margin: 6px 0 0;
  font-size: var(--text-2xs);
  color: var(--muted);
}
.task-summary strong {
  color: var(--ink);
}
.task-warning {
  color: var(--danger);
  font-weight: 600;
}
.task-priority.high {
  color: var(--danger);
  font-weight: 650;
}
.task-due.overdue {
  color: var(--danger);
  font-weight: 650;
}
.task-controls {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin: 10px 0;
  padding: 8px 10px 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
}
.task-controls legend {
  font-size: var(--text-2xs);
  font-weight: 650;
  color: var(--muted);
  padding: 0 4px;
}
.task-controls label {
  display: grid;
  gap: 3px;
  font-size: var(--text-2xs);
  color: var(--muted);
  flex: 1 1 110px;
}
.task-controls select,
.task-controls input {
  font: inherit;
  font-size: var(--text-xs);
  color: var(--ink);
  padding: 5px 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  min-width: 0;
}
.comment-panel-header .tabs {
  flex-wrap: wrap;
}
.my-tasks {
  margin: 0 0 24px;
}
.task-list {
  list-style: none;
  margin: 8px 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.task-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 12px;
  padding: 12px 14px;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--ink);
  text-decoration: none;
  font-size: var(--text-sm);
}
.task-item:hover {
  border-color: var(--brand-blue);
}
.task-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.task-item small {
  grid-column: 1;
  color: var(--muted);
  font-size: var(--text-2xs);
}
.task-meta {
  grid-column: 2;
  grid-row: 1 / span 2;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--text-2xs);
  color: var(--muted);
}

/* Version approval */
.approval-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: var(--radius-full);
  font-size: var(--text-2xs);
  font-weight: 650;
  vertical-align: 1px;
  background: var(--surface-sunken);
  color: var(--text-muted);
  white-space: nowrap;
}
.approval-badge.in_review {
  background: var(--surface-selected);
  color: var(--brand-blue);
}
.approval-badge.changes_requested {
  background: var(--warning-soft);
  color: var(--warning);
}
.approval-badge.approved {
  background: var(--success-soft);
  color: var(--success);
}
.approval-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.approval-button .approval-badge {
  margin: 0;
}
.approval-ask {
  font-size: var(--text-2xs);
  font-weight: 650;
  color: var(--brand-blue);
}
.approval-status {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: var(--text-sm);
}
.approval-status .approval-badge {
  margin: 0;
}
.approval-approvers {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  display: grid;
  gap: 6px;
  font-size: var(--text-sm);
}
.approval-approvers li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
}
.approval-approvers p {
  flex-basis: 100%;
  margin: 0;
  color: var(--muted);
}
.approval-decision {
  margin-left: auto;
  font-size: var(--text-xs);
  color: var(--muted);
}
.approval-decision.approved {
  color: var(--success);
  font-weight: 650;
}
.approval-decision.changes_requested {
  color: var(--warning);
  font-weight: 650;
}
.approval-decision .icon {
  width: 13px;
  height: 13px;
  vertical-align: -2px;
}
.approval-people {
  display: grid;
  gap: 6px;
  max-height: 220px;
  overflow: auto;
}
.approval-history {
  color: var(--success);
}

/* Trash */
.trash-page {
  max-width: 900px;
}
.trash-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.trash-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
}
.trash-item:first-child {
  border-top: 0;
}
.trash-item strong {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-md);
}
.trash-item strong .icon {
  width: 16px;
  height: 16px;
  color: var(--muted);
}
.trash-item small {
  display: block;
  color: var(--muted);
  font-size: var(--text-xs);
  margin-top: 3px;
}
.trash-purge {
  color: var(--warning);
}
.trash-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.danger-text {
  color: var(--danger);
}
@media (max-width: 760px) {
  .trash-item {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Share-link rules */
.link-rules {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin: 4px 0 14px;
}
.link-rules summary {
  cursor: pointer;
  font-weight: 650;
  font-size: var(--text-sm);
}
.link-rules-summary {
  font-weight: 400;
  color: var(--muted);
}
.link-rules form {
  margin-top: 12px;
}
.inline-check {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: var(--text-sm);
  margin: 0 0 10px;
}
.inline-check input {
  margin-top: 3px;
}
.inline-check small {
  color: var(--muted);
}
.unlock-screen form {
  max-width: 320px;
  margin: 20px auto 0;
  text-align: left;
}
.field .inline-check {
  margin: 8px 0 4px;
}
.field .inline-check input[type="checkbox"],
.inline-check input[type="checkbox"] {
  width: auto;
  height: auto;
  min-height: 0;
  padding: 0;
  flex: none;
}
/* Page header actions: one main action, the rest in a More menu */
.page-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.actions-menu {
  position: relative;
}
.actions-menu > summary {
  list-style: none;
  cursor: pointer;
}
.actions-menu > summary::-webkit-details-marker {
  display: none;
}
.actions-menu-list {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 50;
  min-width: 230px;
  display: grid;
  padding: 6px;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
}
.actions-menu-list button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: var(--radius-sm);
  background: none;
  font: inherit;
  font-size: var(--text-sm);
  text-align: left;
  color: var(--ink);
  cursor: pointer;
}
.actions-menu-list button[hidden] {
  display: none;
}
.actions-menu-list button:hover,
.actions-menu-list button:focus-visible {
  background: var(--surface-sunken);
}
.actions-menu-list button.danger-text {
  color: var(--danger);
}
.actions-menu-list .icon {
  width: 16px;
  height: 16px;
  flex: none;
}
.actions-menu-list hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 6px 4px;
}
.muted-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  vertical-align: middle;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  background: var(--surface-sunken);
  color: var(--muted);
  font-size: var(--text-2xs);
  font-weight: 600;
  letter-spacing: 0;
}
.muted-pill .icon {
  width: 12px;
  height: 12px;
}
.danger-text {
  color: var(--danger);
}
.filter-chips {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: var(--text-2xs);
  color: var(--muted);
}
.chip {
  padding: 3px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  background: var(--paper);
  font: inherit;
  font-size: var(--text-2xs);
  color: var(--ink);
  cursor: pointer;
}
.chip.active {
  border-color: var(--brand-blue);
  background: var(--surface-selected);
  color: var(--brand-blue);
  font-weight: 650;
}
.approval-label {
  font-size: var(--text-2xs);
  color: var(--muted);
}
@media (max-width: 760px) {
  a.profile-name {
    display: none;
  }
}
/* Phones: the review toolbar fits without sideways scrolling. The hint and size are
   dropped there: touch users tap anyway, and the file strip switches files. */
@media (max-width: 760px) {
  .canvas-toolbar #viewer-hint,
  .canvas-toolbar #image-size,
  .canvas-toolbar #zoom-label {
    display: none;
  }
  .canvas-toolbar {
    justify-content: space-between;
  }
  .canvas-toolbar #zoom-select {
    max-width: 104px;
  }
  .canvas-toolbar .review-more {
    order: 10;
  }
}

/* Design tokens v1: app shell, dashboard, project and review pages.
   Casepoint brand first; Mobbin and Miro informed the flat, hairline-first surfaces and the
   segmented control. Tokens only (see tokens.css). Layout stays with the rules above. */
:root {
  --radius: var(--radius-lg);
  --surface-shadow: none;
}
body {
  color: var(--text);
  background: var(--surface-page);
}
:where(button, a, input, textarea, select, summary):focus-visible {
  outline: 2px solid var(--line-focus);
  outline-offset: 2px;
}

/* Buttons: one main action in Core Blue, the rest quiet */
.btn {
  border-radius: var(--radius-sm);
  font-size: var(--text-md);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-tight);
  gap: var(--space-2);
}
.primary {
  background: var(--accent);
  color: var(--text-on-accent);
  box-shadow: var(--shadow-xs);
}
.primary:hover {
  background: var(--accent-hover);
}
.primary:active {
  transform: translateY(1px);
}
.secondary {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  color: var(--text);
  box-shadow: none;
}
.secondary:hover,
.icon-btn:hover,
.quiet:hover {
  background: var(--surface-hover);
}
.icon-btn {
  border-radius: var(--radius-sm);
  color: var(--text-muted);
}
.icon-btn:hover {
  color: var(--text);
}
.icon-btn.danger,
.danger-text {
  color: var(--danger);
}
.count-pill,
.muted-pill {
  border-radius: var(--radius-full);
  background: var(--surface-soft);
  color: var(--text-muted);
  font-size: var(--text-2xs);
  font-weight: var(--weight-semibold);
  padding: 2px var(--space-2);
}
.eyebrow {
  color: var(--accent);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-label);
}

/* App shell: calm white canvas, beige reserved for soft fills */
.sidebar {
  background: var(--surface-page);
  border-right-color: var(--line);
}
.nav-label {
  font-size: var(--text-2xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-label);
  color: var(--text-muted);
}
.nav-item {
  color: var(--text-muted);
  font-weight: var(--weight-medium);
  border: 1px solid transparent;
}
.nav-item .icon {
  color: var(--text-muted);
}
.nav-item:hover {
  background: var(--surface-hover);
  color: var(--text);
}
.nav-item.active {
  background: var(--surface);
  border-color: var(--line);
  box-shadow: var(--shadow-xs);
  color: var(--accent);
  font-weight: var(--weight-semibold);
}
.nav-item.active .icon {
  color: var(--accent);
}
.sidebar-note {
  border: 0;
  background: var(--surface-soft);
  border-radius: var(--radius-sm);
}
.workspace-select {
  border-color: var(--line-strong);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
}
.topbar {
  background: var(--surface);
  border-bottom-color: var(--line);
}
.breadcrumb strong {
  font-weight: var(--weight-semibold);
}
.dashboard,
.project-page {
  background: var(--surface-page);
}

/* Page heading: one title, one line of help, one main action */
.page-heading h1 {
  font-size: var(--text-2xl);
  font-weight: var(--weight-semibold);
  letter-spacing: -0.02em;
  line-height: var(--leading-tight);
  margin: 0 0 var(--space-1);
}
.page-heading p {
  color: var(--text-muted);
  font-size: var(--text-md);
}
.section-title {
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  gap: var(--space-2);
}

/* Project and file cards: flat, hairline, lift only on hover */
.project-card,
.asset-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: none;
  background: var(--surface);
}
.project-card:hover,
.asset-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
}
.project-card:focus-within,
.asset-card:focus-within {
  border-color: var(--accent);
}
.project-preview,
.asset-thumb {
  background: var(--surface-soft);
}
.project-info,
.asset-details {
  padding: var(--space-3) var(--space-4) var(--space-4);
}
.project-info h3,
.asset-details strong {
  font-size: var(--text-md);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-tight);
}
.project-meta,
.asset-details span {
  font-size: var(--text-xs);
  color: var(--text-muted);
}
.project-footer {
  border-top-color: var(--line);
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: var(--space-3);
  padding-top: var(--space-3);
}

.folder-preview,
.folder-preview:before {
  background: var(--surface);
  border-color: var(--line-strong);
}
.folder-preview {
  color: var(--text-muted);
  box-shadow: var(--shadow-xs);
}
.pdf-badge {
  background: var(--surface);
  border-color: var(--line-strong);
  box-shadow: 4px 4px 0 var(--line);
}
.nav-label {
  text-transform: uppercase;
}

/* Upload: drop files anywhere on the project page; progress shows bottom right */
.drop-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: var(--space-5);
  background: rgba(37, 38, 179, 0.08);
  backdrop-filter: blur(2px);
  pointer-events: none;
}
.drop-overlay[hidden] {
  display: none;
}
.drop-overlay-card {
  display: grid;
  justify-items: center;
  gap: var(--space-2);
  max-width: 420px;
  padding: var(--space-6) var(--space-7);
  border: 2px dashed var(--accent);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  text-align: center;
}
.drop-overlay-card .icon {
  width: 28px;
  height: 28px;
  color: var(--accent);
}
.drop-overlay-card strong {
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  overflow-wrap: anywhere;
}
.drop-overlay-card small {
  font-size: var(--text-xs);
  color: var(--text-muted);
}
.upload-panel {
  position: fixed;
  right: var(--space-5);
  bottom: var(--space-5);
  z-index: 70;
  width: min(360px, calc(100vw - 2 * var(--space-4)));
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.upload-panel-list {
  list-style: none;
  margin: 0;
  padding: var(--space-2) 0;
  max-height: min(288px, 45vh);
  overflow: auto;
  border-bottom: 1px solid var(--line);
}
.upload-panel.single .upload-panel-list,
.upload-panel.collapsed .upload-panel-list {
  display: none;
}
.upload-panel.single .upload-collapse {
  display: none;
}
.upload-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 2px var(--space-3);
  padding: var(--space-2) var(--space-4);
}
.upload-thumb {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  color: var(--text-muted);
  overflow: hidden;
}
.upload-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.upload-thumb .icon {
  width: 18px;
  height: 18px;
}
.upload-row-text {
  display: grid;
  min-width: 0;
}
.upload-row-name {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.upload-row-status {
  font-size: var(--text-xs);
  color: var(--text-muted);
  overflow-wrap: anywhere;
}
.upload-row.is-failed .upload-row-status {
  color: var(--danger);
}
.upload-row-mark {
  display: grid;
  place-items: center;
}
.upload-row-mark .icon,
.upload-summary-icon .icon {
  display: none;
  width: 18px;
  height: 18px;
}
.upload-row.is-done .upload-done-mark {
  display: block;
  color: var(--success);
}
.upload-row.is-failed .upload-error-mark {
  display: block;
  color: var(--danger);
}
.upload-row progress {
  grid-column: 2 / -1;
  width: 100%;
  height: 4px;
  appearance: none;
  border: 0;
  border-radius: var(--radius-full);
  background: var(--surface-soft);
  overflow: hidden;
}
.upload-row:not(.is-active) progress {
  visibility: hidden;
}
.upload-row progress::-webkit-progress-bar {
  background: var(--surface-soft);
}
.upload-row progress::-webkit-progress-value {
  background: var(--accent);
  border-radius: var(--radius-full);
}
.upload-row progress::-moz-progress-bar {
  background: var(--accent);
}
.upload-summary {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-2) var(--space-3) var(--space-4);
}
.upload-summary-icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: var(--radius-full);
  background: var(--accent-soft);
  color: var(--accent);
}
.upload-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--cp-blue-20);
  border-top-color: var(--accent);
  border-radius: var(--radius-full);
}
.upload-panel[data-state="done"] .upload-summary-icon {
  background: var(--success);
  color: var(--text-on-accent);
}
.upload-panel[data-state="error"] .upload-summary-icon {
  background: var(--danger-soft);
  color: var(--danger);
}
.upload-panel:not([data-state="busy"]) .upload-spinner {
  display: none;
}
.upload-panel[data-state="done"] .upload-summary-icon .upload-done-mark,
.upload-panel[data-state="error"] .upload-summary-icon .upload-error-mark {
  display: block;
}
.upload-summary-text {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 2px;
}
.upload-summary-text strong {
  font-size: var(--text-md);
  font-weight: var(--weight-semibold);
}
.upload-summary-text small {
  font-size: var(--text-xs);
  color: var(--text-muted);
}
.upload-summary .icon-btn {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}
.upload-collapse .icon {
  transform: rotate(180deg);
}
.upload-collapse[aria-expanded="true"] .icon {
  transform: none;
}
@media (prefers-reduced-motion: no-preference) {
  .upload-panel {
    animation: upload-panel-in var(--duration) var(--ease);
  }
  .upload-spinner {
    animation: upload-spin 0.9s linear infinite;
  }
  .upload-collapse .icon {
    transition: transform var(--duration-fast) var(--ease);
  }
  @keyframes upload-panel-in {
    from {
      opacity: 0;
      transform: translateY(8px);
    }
  }
  @keyframes upload-spin {
    to {
      transform: rotate(360deg);
    }
  }
}

/* Review page */
.review-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.review-title strong,
.review-title h1 {
  font-weight: var(--weight-semibold);
}
.canvas-bottom.review-mode {
  background: var(--surface-soft);
  border: 0;
  border-radius: var(--radius-full);
  padding: 3px;
  gap: 2px;
}
.review-mode .btn {
  border-radius: var(--radius-full);
  color: var(--text-muted);
  background: transparent;
  font-weight: var(--weight-semibold);
}
.review-mode .btn:hover {
  color: var(--text);
}
.review-mode .btn.active {
  background: var(--surface);
  color: var(--accent);
  box-shadow: var(--shadow-sm);
}
.canvas-toolbar {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  color: var(--text-muted);
}
.canvas-toolbar .review-more > summary {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
}
.zoom-controls select,
.comment-tools input,
.comment-tools select {
  background: var(--surface-sunken);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text);
  box-shadow: none;
}
.comment-tools input:focus,
.comment-tools select:focus {
  background: var(--surface);
  border-color: var(--accent);
}
.viewer-scroll {
  background: var(--surface-sunken);
}
.viewer-stage {
  box-shadow: var(--shadow-sm);
}
.comment-panel {
  background: var(--surface);
  border-right-color: var(--line);
}
.review-project-title {
  border-bottom-color: var(--line);
}
.review-project-title h2 {
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-tight);
}
.review-project-title span {
  font-size: var(--text-xs);
}
.tabs {
  border-bottom-color: var(--line);
  gap: var(--space-1);
}
.tab {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--text-muted);
}
.tab:hover {
  color: var(--text);
}
.tab.active {
  color: var(--accent);
  border-color: var(--accent);
  font-weight: var(--weight-semibold);
}
.chip {
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--text);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  padding: 2px 10px;
  white-space: nowrap;
}
.chip:hover {
  background: var(--surface-hover);
}
.chip.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}
.comment-card {
  border-bottom: 1px solid var(--line);
}
.comment-card:hover {
  background: var(--surface-page);
}
.comment-card.selected {
  background: var(--surface-selected);
  box-shadow: inset 3px 0 var(--accent);
}
.comment-top strong {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
}
.comment-top time,
.comment-location {
  font-size: var(--text-xs);
  color: var(--text-muted);
}
.comment-text {
  font-size: var(--text-md);
  line-height: var(--leading-normal);
}
.comment-number {
  background: var(--accent);
  color: var(--text-on-accent);
  font-size: var(--text-2xs);
}
.comment-top .resolve-btn {
  border-color: var(--line-strong);
}
.comment-top .resolve-btn:hover {
  border-color: var(--success);
  color: var(--success);
}
.reply-toggle {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--accent);
}
.files-panel {
  background: var(--surface);
  border-left-color: var(--line);
}
.files-panel > header {
  border-bottom-color: var(--line);
}
.files-panel h2 {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
}
.thumbnail-strip {
  background: var(--surface);
  gap: var(--space-2);
}
.file-thumbnail {
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
}
.file-thumbnail:hover {
  background: var(--surface-hover);
}
.file-thumbnail[aria-current="true"] {
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}
.thumbnail-preview {
  background: var(--surface-soft);
  border-radius: var(--radius-xs);
}
.file-thumbnail > span:last-child {
  font-size: var(--text-xs);
}
.pin,
.pin.selected {
  box-shadow:
    0 0 0 1px var(--accent),
    var(--shadow-sm);
}
.mobile-tabs {
  background: var(--surface);
  border-bottom-color: var(--line);
}
.mobile-tabs .active {
  background: var(--surface-soft);
  color: var(--accent);
}

@media (prefers-reduced-motion: no-preference) {
  .nav-item,
  .chip,
  .tab,
  .comment-card,
  .file-thumbnail,
  .upload-zone,
  .review-mode .btn {
    transition:
      background-color var(--duration-fast) var(--ease),
      border-color var(--duration-fast) var(--ease),
      color var(--duration-fast) var(--ease),
      box-shadow var(--duration-fast) var(--ease);
  }
  .project-card,
  .asset-card {
    transition:
      border-color var(--duration) var(--ease),
      box-shadow var(--duration) var(--ease);
  }
}
@media (max-width: 760px) {
  .page-heading h1 {
    font-size: var(--text-xl);
  }
}
@media (pointer: coarse) {
  .page-heading .btn,
  .nav-item {
    min-height: var(--touch-target);
  }
}

/* Phones: a clean header. Logo mark, workspace picker and avatar on one row (Sign out lives
   on the Account page); a one-line breadcrumb; the main action full width with the
   secondary actions sharing the row below. */
@media (max-width: 760px) {
  .shell:not(.admin-shell) > .sidebar {
    padding: var(--space-3) var(--space-4);
    gap: var(--space-3);
    background: var(--surface);
  }
  .shell:not(.admin-shell) .sidebar .brand {
    font-size: 0;
    gap: 0;
    padding: 0;
    flex-shrink: 0;
  }
  .shell:not(.admin-shell) .sidebar .brand img {
    width: 36px;
    height: 36px;
  }
  .shell:not(.admin-shell) .sidebar .workspace-selector {
    flex: 1;
    min-width: 0;
    max-width: none;
  }
  .shell:not(.admin-shell) .sidebar .workspace-selector label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }
  .shell:not(.admin-shell) .sidebar .workspace-select {
    width: 100%;
    min-height: var(--control-height);
    padding: 0 var(--space-3);
    text-overflow: ellipsis;
  }
  .shell:not(.admin-shell) .sidebar-bottom {
    flex-shrink: 0;
  }
  .shell:not(.admin-shell) .sidebar-bottom #logout {
    display: none;
  }
  .shell:not(.admin-shell) .profile .avatar {
    width: 36px;
    height: 36px;
  }
  .topbar {
    height: 48px;
    padding: 0 var(--space-4);
    gap: var(--space-3);
  }
  .breadcrumb {
    flex: 1;
    min-width: 0;
    flex-wrap: nowrap;
    gap: var(--space-2);
    white-space: nowrap;
    font-size: var(--text-sm);
  }
  .breadcrumb > a:first-child {
    flex: 0 1 auto;
    min-width: 0;
    max-width: 45%;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .breadcrumb > a:not(:first-child),
  .breadcrumb > strong {
    flex: 0 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .breadcrumb strong {
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .dashboard,
  .project-page {
    padding: var(--space-5) var(--space-4);
  }
  .page-heading {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-4);
    margin-bottom: var(--space-5);
  }
  .page-heading h1 {
    font-size: var(--text-xl);
  }
  .page-heading p {
    font-size: var(--text-sm);
  }
  .page-heading .eyebrow {
    margin-bottom: var(--space-2) !important;
  }
  .page-heading > .btn.primary {
    width: 100%;
  }
  .page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    width: 100%;
  }
  .page-actions > .btn.primary {
    order: -1;
    flex: 1 0 100%;
  }
  .page-actions > .btn.secondary,
  .page-actions > .actions-menu {
    flex: 1 1 0;
    min-width: 0;
  }
  .page-actions > .actions-menu {
    flex: 0 0 var(--touch-target);
  }
  .page-actions > .actions-menu > summary {
    width: 100%;
    padding: 0;
    font-size: 0;
  }
  .page-actions > .actions-menu > summary::before {
    content: "\22EF";
    font-size: var(--text-lg);
    line-height: 1;
  }
  .page-actions > .btn.secondary {
    padding: 0 var(--space-3);
    font-size: var(--text-sm);
  }
  .upload-panel {
    right: var(--space-4);
    bottom: var(--space-4);
  }
  .page-heading .btn {
    min-height: var(--touch-target);
    font-size: var(--text-md);
    padding: 0 var(--space-4);
  }
  .review-header .approval-label {
    display: none;
  }
  .canvas-toolbar #zoom-select {
    max-width: 128px;
  }
}

/* MarkUp-informed details: icon meta rows on cards, a quieter review toolbar */
.project-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: var(--space-1) var(--space-4);
}
.meta-stat {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  color: var(--text-muted);
  font-size: var(--text-xs);
}
.meta-stat .icon {
  width: 14px;
  height: 14px;
}
.meta-stat.has-open {
  color: var(--accent);
  font-weight: var(--weight-semibold);
}
.project-files-hint {
  font-size: var(--text-xs);
  color: var(--text-muted);
}
.canvas-toolbar #zoom-select {
  border-color: transparent;
  background-color: transparent;
}
.canvas-toolbar #zoom-select:hover {
  background-color: var(--surface-hover);
}
.canvas-toolbar #viewer-hint,
.canvas-toolbar #image-size {
  color: var(--text-muted);
}

/* Fluid layout: page gutters and titles scale with the screen instead of jumping at breakpoints */
.dashboard,
.project-page {
  padding: var(--page-gap) var(--page-gutter);
}
.topbar {
  padding-inline: var(--page-gutter);
}
.page-heading h1 {
  font-size: var(--text-title);
  overflow-wrap: anywhere;
}
.page-heading {
  margin-bottom: var(--page-gap);
}
.project-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
  gap: var(--page-gap);
}
.page-heading {
  flex-wrap: wrap;
}
@media (min-width: 761px) {
  .page-heading > div:first-child {
    flex: 1 1 280px;
    min-width: 0;
  }
}
.page-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}
.filter-chips {
  flex-wrap: wrap;
}
/* Tablets: the review header uses two rows, like phones, so nothing overlaps. */
@media (min-width: 761px) and (max-width: 1100px) {
  .review-header {
    height: auto;
    min-height: 0;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: var(--space-2) var(--space-4);
    row-gap: var(--space-2);
  }
  .review-header-actions {
    grid-column: 2;
    grid-row: 1;
  }
  .asset-navigation {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: center;
  }
  .review-header .approval-label {
    display: none;
  }
}

/* Dashboard upload: choose separate projects or one project for several files */
.upload-choice {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  gap: var(--space-3);
}
.choice-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  margin: 0;
  padding: var(--space-5) var(--space-4) var(--space-4);
  border-radius: var(--radius-lg);
  background: var(--surface-soft);
  text-align: center;
}
.choice-card h3 {
  margin: var(--space-1) 0 0;
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
}
.choice-card p {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--text-muted);
}
.choice-card .field {
  width: 100%;
  text-align: left;
}
.choice-card .btn {
  width: 100%;
  margin-top: auto;
}
.choice-art {
  width: 64px;
  height: 48px;
  fill: var(--surface);
  stroke: var(--accent);
  stroke-width: 1.5;
}
.upload-choice-note {
  margin: var(--space-3) 0 0;
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-align: center;
}
#modal.upload-choice-dialog {
  width: min(640px, calc(100vw - 2 * var(--space-4)));
  max-width: none;
}

/* Destructive confirmations: red, never Core Blue */
.btn.primary.danger {
  background: var(--danger);
  color: var(--text-on-accent);
}
.btn.primary.danger:hover {
  background: color-mix(in srgb, var(--danger) 85%, black);
}

/* Account pages (status, verify, invite, password): one calm card in the middle of the page */
.account-page {
  box-sizing: border-box;
  width: min(480px, calc(100% - 2 * var(--space-4)));
  max-width: none;
  margin: clamp(24px, 10vh, 112px) auto var(--space-7);
  padding: clamp(24px, 5vw, 40px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.account-page .brand {
  margin-bottom: var(--space-6);
}
.account-page h1 {
  margin: 0 0 var(--space-3);
  font-size: var(--text-title);
  font-weight: var(--weight-semibold);
  letter-spacing: -0.02em;
  line-height: var(--leading-tight);
}
.account-page p {
  margin: 0 0 var(--space-3);
  color: var(--text-muted);
  font-size: var(--text-md);
  line-height: var(--leading-normal);
}
.account-page .eyebrow {
  margin-bottom: var(--space-2);
}
.account-page form {
  margin-top: var(--space-5);
}
.account-page form .btn.primary,
.account-page > .btn {
  width: 100%;
}
.account-email {
  color: var(--text);
  font-weight: var(--weight-semibold);
  overflow-wrap: anywhere;
}
.account-art {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: var(--space-4);
  border-radius: var(--radius-full);
  background: var(--accent-soft);
  color: var(--accent);
}
.account-status.is-alert .account-art {
  background: var(--danger-soft);
  color: var(--danger);
}
.account-art svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.account-page .status-detail {
  min-height: 0;
  margin: 0;
  font-size: var(--text-sm);
  color: var(--text-muted);
}
.account-page .status-detail:not(:empty) {
  margin-top: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  background: var(--surface-sunken);
}
.account-page .status-detail.is-error {
  background: var(--danger-soft);
  color: var(--danger);
}
.account-page .account-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr));
  gap: var(--space-2);
  margin-top: var(--space-5);
}
.account-page .error:empty {
  display: none;
}
.account-footer {
  margin-top: var(--space-5) !important;
  padding-top: var(--space-4);
  border-top: 1px solid var(--line);
  font-size: var(--text-sm) !important;
}
.account-footer .text-link {
  font: inherit;
  color: var(--accent);
  font-weight: var(--weight-semibold);
  padding: 0;
}
.invite-page input[readonly] {
  background: var(--surface-sunken);
  color: var(--text-muted);
}
.account-page .eyebrow {
  color: var(--accent);
}

/* Signed-in person, top right: who you are and your access, with a small account menu */
.topbar-actions {
  gap: var(--space-2);
}
.user-menu {
  position: relative;
}
.user-menu > summary {
  list-style: none;
}
.user-menu > summary::-webkit-details-marker {
  display: none;
}
.user-menu-trigger {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-height: var(--touch-target);
  padding: var(--space-1) var(--space-2) var(--space-1) var(--space-1);
  border-radius: var(--radius-full);
  cursor: pointer;
}
.user-menu-trigger:hover,
.user-menu[open] > .user-menu-trigger {
  background: var(--surface-hover);
}
.user-menu .avatar {
  width: 32px;
  height: 32px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
}
.user-menu .avatar-lg {
  width: 40px;
  height: 40px;
  font-size: var(--text-sm);
}
.user-menu-who {
  display: grid;
  line-height: 1.25;
  text-align: left;
}
.user-menu-who .profile-name {
  max-width: 160px;
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--text);
}
.user-menu-who small {
  font-size: var(--text-xs);
  color: var(--text-muted);
}
.user-menu-chevron {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
}
.user-menu-panel {
  position: absolute;
  top: calc(100% + var(--space-2));
  right: 0;
  z-index: 60;
  width: min(300px, calc(100vw - 2 * var(--space-4)));
  display: grid;
  padding: var(--space-2);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
}
.user-menu-head {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  padding: var(--space-2) var(--space-2) var(--space-3);
  margin-bottom: var(--space-1);
  border-bottom: 1px solid var(--line);
}
.user-menu-head > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.user-menu-head strong {
  font-size: var(--text-md);
  font-weight: var(--weight-semibold);
  overflow-wrap: anywhere;
}
.user-menu-head small {
  font-size: var(--text-xs);
  color: var(--text-muted);
  overflow-wrap: anywhere;
}
.role-chip {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  margin-top: var(--space-1);
  padding: 2px var(--space-2);
  border-radius: var(--radius-full);
  background: var(--surface-soft);
  color: var(--text-muted);
  font-size: var(--text-2xs);
  font-weight: var(--weight-semibold);
}
.role-chip.admin {
  background: var(--accent-soft);
  color: var(--accent);
}
.role-chip .icon {
  width: 12px;
  height: 12px;
}
.user-menu-panel [role="menuitem"] {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  width: 100%;
  min-height: 40px;
  padding: 0 var(--space-2);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--text);
  text-align: left;
}
.user-menu-panel [role="menuitem"]:hover,
.user-menu-panel [role="menuitem"]:focus-visible {
  background: var(--surface-hover);
}
.user-menu-panel [role="menuitem"].danger-text {
  color: var(--danger);
}
.user-menu-panel [role="menuitem"] .icon {
  width: 18px;
  height: 18px;
}
.user-menu-panel hr {
  width: 100%;
  margin: var(--space-1) 0;
  border: 0;
  border-top: 1px solid var(--line);
}
@media (max-width: 1100px) {
  .user-menu-who,
  .user-menu-chevron {
    display: none;
  }
  .user-menu-trigger {
    padding: var(--space-1);
  }
}
@media (prefers-reduced-motion: no-preference) {
  .user-menu[open] .user-menu-panel {
    animation: upload-panel-in var(--duration-fast) var(--ease);
  }
}

/* Section separation (feedback 2026-11-04): calm hairlines and a resting shadow so each
   area reads as its own block, without heavy borders. */
.project-card,
.asset-card {
  box-shadow: var(--shadow-xs);
}
.project-page .page-heading,
.dashboard .page-heading {
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--line);
}
.project-page .workspace-project-toolbar {
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}
.project-page .subprojects {
  padding-bottom: var(--space-5);
  border-bottom: 1px solid var(--line);
}
.review-header {
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-xs);
  position: relative;
  z-index: 3;
}
.canvas-toolbar {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.comment-panel {
  border-right: 1px solid var(--line);
  box-shadow: var(--shadow-xs);
}
.comment-panel-header,
.comment-tools {
  border-bottom: 1px solid var(--line);
}
.discussion-list > * + * {
  border-top: 1px solid var(--line);
}

/* Quick Share on project and subproject cards. Mouse: shows on hover or focus.
   Touch screens can't hover, so it stays visible there. */
.project-card-shell {
  position: relative;
  min-width: 0;
  height: 100%;
}
.card-share {
  position: absolute;
  top: var(--space-2);
  right: var(--space-2);
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  min-height: 32px;
  padding: 0 var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-full);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  color: var(--text);
  font: inherit;
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  cursor: pointer;
  opacity: 0;
  transition: opacity var(--duration-fast) var(--ease);
}
.card-share .icon {
  width: 14px;
  height: 14px;
}
.card-share:hover {
  border-color: var(--line-strong);
  background: var(--surface-hover);
}
.project-card-shell:hover .card-share,
.project-card-shell:focus-within .card-share,
.card-share:focus-visible {
  opacity: 1;
}
@media (hover: none) {
  .card-share {
    opacity: 1;
    min-height: 40px;
  }
}

/* Files panel: resizable width, thumbnail or list view, and reordering (feedback 2026-11-04) */
.files-panel {
  position: relative;
}
.files-tools {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}
.files-view {
  display: inline-flex;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-sunken);
}
.files-view .icon-btn {
  width: 28px;
  height: 28px;
  min-height: 0;
  border: 0;
  border-radius: var(--radius-xs);
  background: none;
  box-shadow: none;
  color: var(--text-muted);
}
.files-view .icon-btn[aria-pressed="true"] {
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  color: var(--accent);
}
.files-view .icon {
  width: 16px;
  height: 16px;
}
.files-resize {
  position: absolute;
  left: -5px;
  top: 0;
  bottom: 0;
  width: 10px;
  z-index: 3;
  cursor: col-resize;
  touch-action: none;
}
.files-resize::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: transparent;
  transition: background var(--duration-fast) var(--ease);
}
.files-resize:hover::after,
.files-resize:focus-visible::after,
body.resizing-files .files-resize::after {
  background: var(--accent);
}
.files-resize:focus-visible {
  outline: none;
}
body.resizing-files {
  cursor: col-resize;
  user-select: none;
}
body.resizing-files iframe,
body.resizing-files .viewer-stage {
  pointer-events: none;
}
@media (min-width: 761px) {
  .review-layout {
    --comments-col: 270px;
  }
  .review-layout.files-resized:not(.files-hidden) {
    grid-template-columns: var(--comments-col) minmax(0, 1fr) var(--files-width);
  }
  .review-layout.files-resized.discussion-hidden:not(.files-hidden) {
    grid-template-columns: minmax(0, 1fr) var(--files-width);
  }
  /* List view: one row per file, small preview, full name. */
  .files-panel.list-view .thumbnail-strip {
    padding: var(--space-2);
    gap: 2px;
  }
  .files-panel.list-view .file-thumbnail {
    padding: 6px 8px;
  }
  .files-panel.list-view .file-select {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    min-height: 36px;
  }
  .files-panel.list-view .thumbnail-preview {
    flex: 0 0 44px;
    width: 44px;
    height: 32px;
  }
  .files-panel.list-view .thumbnail-preview img {
    max-height: 32px;
  }
  .files-panel.list-view .file-select > span:last-child {
    margin: 0;
    font-size: var(--text-xs);
  }
  .files-panel.list-view.can-reorder .file-thumbnail {
    padding-left: 28px;
  }
  .files-panel.list-view .file-drag {
    top: 50%;
    left: 4px;
    transform: translateY(-50%);
    opacity: 1;
  }
  .files-panel.list-view .asset-actions {
    top: 50%;
    transform: translateY(-50%);
  }
}
@media (min-width: 1700px) {
  .review-layout {
    --comments-col: 290px;
  }
}
@media (min-width: 761px) and (max-width: 1100px) {
  .review-layout {
    --comments-col: 240px;
  }
}
/* Reorder handle: on hover or focus with a mouse; always visible on touch screens. */
.file-drag {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 22px;
  height: 26px;
  min-height: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  color: var(--text-muted);
  cursor: grab;
  touch-action: none;
  opacity: 0;
  transition: opacity var(--duration-fast) var(--ease);
}
.file-drag .icon {
  width: 14px;
  height: 14px;
  stroke-width: 3;
}
.file-thumbnail:hover .file-drag,
.file-thumbnail:focus-within .file-drag,
.file-drag:focus-visible {
  opacity: 1;
}
.file-drag:active {
  cursor: grabbing;
}
.file-thumbnail.dragging {
  opacity: 0.85;
  box-shadow: var(--shadow-md);
  background: var(--surface);
  z-index: 4;
}
.thumbnail-strip.reordering,
.thumbnail-strip.reordering * {
  cursor: grabbing;
  user-select: none;
}
@media (hover: none) {
  .file-drag {
    opacity: 1;
  }
}
@media (max-width: 760px) {
  .files-resize,
  .files-view {
    display: none;
  }
  .file-drag {
    top: 4px;
    left: 4px;
    width: 26px;
    height: 26px;
  }
}
/* At its narrowest the panel has room for the controls only; "Files" stays for screen readers
   (the toolbar's Files button names the panel too). */
.files-panel {
  container-type: inline-size;
}
.files-panel > header {
  gap: var(--space-1);
  min-width: 0;
}
@container (max-width: 160px) {
  .files-panel > header h2 {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  .files-panel > header {
    justify-content: flex-end;
  }
}

/* Move files dialog (feedback 2026-11-04) */
.move-files fieldset {
  border: 0;
  padding: 0;
  margin: 0 0 var(--space-4);
  min-width: 0;
}
.move-files legend {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  margin-bottom: var(--space-2);
}
.move-file-list {
  display: grid;
  gap: 2px;
  max-height: min(240px, 34vh);
  overflow: auto;
  padding: var(--space-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-sunken);
}
.move-file-list label,
.move-all {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 36px;
  padding: 0 var(--space-2);
  border-radius: var(--radius-xs);
  min-width: 0;
}
.move-file-list label span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.move-file-list label:hover {
  background: var(--surface-hover);
}
.move-places {
  display: grid;
  gap: var(--space-2);
}
.move-place {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 52px;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
  min-width: 0;
}
.move-place:hover {
  border-color: var(--line-strong);
  background: var(--surface-hover);
}
.move-place:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px var(--accent);
}
.move-place input {
  accent-color: var(--accent);
  margin: 0;
  flex: 0 0 auto;
}
.move-place-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  color: var(--text-muted);
  flex: 0 0 auto;
}
.move-place > span:last-child {
  display: grid;
  min-width: 0;
}
.move-place strong {
  font-size: var(--text-sm);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.move-place small {
  font-size: var(--text-xs);
  color: var(--text-muted);
}
.move-files input[type="checkbox"] {
  accent-color: var(--accent);
  width: 18px;
  height: 18px;
  min-height: 0;
  margin: 0;
  flex: 0 0 auto;
}
.move-files .inline-check {
  margin: 0;
  align-items: center;
}
.move-files .inline-check input {
  margin-top: 0;
}

/* Optional files when creating a project or subproject (feedback 2026-11-04) */
.attach-field .field-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  margin-bottom: var(--space-2);
}
.attach-drop {
  position: relative;
  display: grid;
  justify-items: center;
  gap: var(--space-1);
  padding: var(--space-4) var(--space-3);
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--surface-sunken);
  color: var(--text-muted);
  text-align: center;
  font-size: var(--text-sm);
  transition: border-color var(--duration-fast) var(--ease), background var(--duration-fast) var(--ease);
}
.attach-drop .icon {
  width: 22px;
  height: 22px;
  color: var(--accent);
}
.attach-drop small {
  font-size: var(--text-xs);
}
.attach-drop.is-over {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.attach-drop input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.attach-drop:focus-within {
  border-color: var(--accent);
}
.attach-browse {
  color: var(--accent);
  font-weight: var(--weight-semibold);
  text-decoration: underline;
  cursor: pointer;
}
.attach-list {
  list-style: none;
  margin: var(--space-2) 0 0;
  padding: 0;
  display: grid;
  gap: 2px;
  max-height: min(180px, 26vh);
  overflow: auto;
}
.attach-list:empty {
  display: none;
}
.attach-list li {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 36px;
  padding: 0 var(--space-1) 0 var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  min-width: 0;
}
.attach-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--text-sm);
}
.attach-size {
  font-size: var(--text-xs);
  color: var(--text-muted);
  flex: 0 0 auto;
}
.attach-list .icon-btn {
  width: 32px;
  height: 32px;
  min-height: 0;
  flex: 0 0 auto;
}
