@font-face {
  font-family: Newsreader;
  src: url("/assets/fonts/newsreader-latin.woff2") format("woff2");
  font-weight: 400 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: Newsreader;
  src: url("/assets/fonts/newsreader-italic-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("/assets/fonts/instrument-sans-latin.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}
:root {
  --ink: #17233a;
  --ink-muted: #566173;
  --stone: #f2f2f0;
  --surface: #ffffff;
  --line: #dcdfe3;
  --blue: #3a6db4;
  --blue-text: #2c5a9e;
  --blue-on-navy: #7fa6e0;
  --new-pill: #7a5c2e;
  --navy: #1f3354;
  --navy-hover: #182a47;
  --danger: #a4432f;
  --radius-sm: 6px;
  --radius: 10px;
  --shadow: 0 1px 2px rgb(23 35 58 / 0.06), 0 4px 16px rgb(23 35 58 / 0.06);
  --serif: "Newsreader", Georgia, serif;
  --sans: "Instrument Sans", system-ui, sans-serif;
  --space-4: 4px;
  --space-8: 8px;
  --space-12: 12px;
  --space-16: 16px;
  --space-20: 20px;
  --space-24: 24px;
  --space-32: 32px;
  --space-48: 48px;
  --space-72: 72px;
  --space-112: 112px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}
.time-clock { white-space: nowrap; }
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--stone);
  color: var(--ink);
  font: 16px/1.6 var(--sans);
}
h1,
h2 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.2;
  margin: 0 0 var(--space-24);
}
h1,
h2 {
  font-size: 36px;
}
h3 {
  font: 600 20px/1.4 var(--sans);
  margin: 0 0 var(--space-12);
}
p {
  margin: 0 0 var(--space-20);
}
a {
  color: var(--blue-text);
  text-underline-offset: 3px;
}
a:hover {
  color: var(--blue-text);
}
button,
input,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
}
input,
textarea {
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-12) var(--space-12);
  min-height: 44px;
  max-width: 100%;
}
textarea {
  resize: vertical;
}
label {
  display: block;
}
label > input,
label > textarea {
  display: block;
  width: 100%;
  margin-top: var(--space-8);
}
:is(a, button, input, textarea, iframe, [tabindex]):focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}
[hidden] {
  display: none !important;
}
.content {
  width: 100%;
  max-width: 1160px;
  padding-left: var(--space-24);
  padding-right: var(--space-24);
  margin: auto;
}
.small {
  font-size: 14px;
}
.muted {
  color: var(--ink-muted);
}
.eyebrow {
  font: 600 12px/1.6 var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--blue-text);
  margin-bottom: var(--space-12);
}
.button {
  height: 44px;
  border-radius: var(--radius-sm);
  font: 600 15px/1 var(--sans);
  padding: 0 var(--space-20);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-8);
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid transparent;
}
.primary {
  background: var(--navy);
  color: white;
}
.primary:hover {
  background: var(--navy-hover);
  color: white;
}
.secondary {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
}
.secondary:hover {
  color: var(--ink);
  background: var(--stone);
}
.on-photo {
  background: white;
  color: var(--ink);
}
.on-photo:hover {
  background: var(--stone);
  color: var(--ink);
}
.danger {
  color: var(--danger);
  border: 1px solid var(--danger);
  background: transparent;
}
.filled-danger {
  background: var(--danger);
  color: white;
}
.wordmark {
  display: inline-flex;
  width: 142px;
  height: 34px;
  flex-shrink: 0;
}
.wordmark > svg {
  display: block;
  width: 100%;
  height: 100%;
}
.portal-bar {
  height: 56px;
  padding: 0 var(--space-24);
  background: var(--navy);
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-24);
}
.portal-brand,
.bar-account {
  display: flex;
  align-items: center;
  gap: var(--space-16);
}
.bar-divider {
  height: 28px;
  width: 1px;
  background: rgb(255 255 255 / 0.4);
}
.bar-label,
.bar-account {
  color: rgb(255 255 255 / 0.8);
  font-size: 14px;
}
.owner-pill {
  color: var(--blue-on-navy);
  border: 1px solid var(--blue);
  border-radius: var(--radius);
  padding: 0 var(--space-8);
  font-size: 11px;
  line-height: 20px;
}
.portal-content {
  padding-top: var(--space-48);
  padding-bottom: var(--space-48);
}
.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-24);
}
.project-card {
  display: block;
  background: white;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  color: var(--ink);
  overflow: hidden;
  text-decoration: none;
}
.project-card:hover {
  color: var(--ink);
}
.project-card > img,
.cover-empty {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
}
.cover-empty {
  background: var(--line);
  color: var(--ink-muted);
  display: grid;
  place-items: center;
}
.project-body {
  padding: var(--space-20);
}
.project-meta {
  font-size: 14px;
  color: var(--ink-muted);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-12);
}
.new-badge {
  background: var(--new-pill);
  color: white;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius);
  padding: 0 var(--space-8);
}
.empty-state {
  background: white;
  max-width: 520px;
  text-align: center;
  padding: var(--space-32);
  border-radius: var(--radius-sm);
  margin: var(--space-48) auto;
  box-shadow: var(--shadow);
}
.empty-state p {
  margin-bottom: 0;
}
.revision-bar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-8);
  margin-bottom: var(--space-24);
}
.revision-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-8);
  padding: var(--space-8) var(--space-16);
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  color: var(--ink);
  text-decoration: none;
  font-size: 14px;
}
.revision-pill.selected {
  background: var(--navy);
  border-color: var(--navy);
  color: white;
}
.new-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--blue);
}
.note-card {
  background: white;
  border-left: 3px solid var(--blue);
  padding: var(--space-16);
  margin-bottom: var(--space-24);
}
.note-card p {
  margin-bottom: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.dev-login {
  max-width: 520px;
  margin: var(--space-72) auto;
  padding: var(--space-32);
  background: white;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
}
.login-buttons {
  display: flex;
  flex-direction: column;
  gap: var(--space-12);
  margin-top: var(--space-24);
}
.admin-page {
  min-width: 1024px;
}
.admin-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  min-height: calc(100vh - 56px);
}
.admin-sidebar {
  width: 320px;
  background: white;
  border-right: 1px solid var(--line);
}
.sidebar-controls {
  padding: var(--space-24);
  display: grid;
  gap: var(--space-16);
}
.sidebar-controls .button,
.sidebar-controls input {
  width: 100%;
}
.admin-project-row {
  padding: var(--space-16) var(--space-20);
  border-left: 3px solid transparent;
  color: var(--ink);
  display: flex;
  justify-content: space-between;
  gap: var(--space-12);
  text-decoration: none;
}
.admin-project-row:hover {
  color: var(--ink);
}
.admin-project-row.selected {
  background: var(--stone);
  border-left-color: var(--blue);
}
.admin-project-row strong {
  display: block;
  font-size: 15px;
  font-weight: 600;
}
.admin-project-row div > span {
  display: block;
  font-size: 13px;
  color: var(--ink-muted);
}
.view-count {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  color: var(--ink-muted);
  font-size: 13px;
}
.admin-empty {
  min-height: calc(100vh - 56px);
  display: grid;
  place-items: center;
}
.admin-detail {
  padding: var(--space-32);
  display: grid;
  gap: var(--space-32);
}
.admin-project-header {
  display: flex;
  justify-content: space-between;
  gap: var(--space-24);
  align-items: flex-start;
}
.project-heading {
  min-width: 0;
  flex: 1;
}
.editable-title {
  font-size: 28px;
  cursor: text;
  margin-bottom: var(--space-12);
  overflow-wrap: anywhere;
}
.title-editor {
  font-family: var(--serif);
  font-size: 28px;
  width: 100%;
  margin-bottom: var(--space-12);
}
.copy-row {
  display: flex;
  gap: var(--space-8);
}
.copy-row input {
  width: 100%;
  min-width: 0;
  font-size: 14px;
}
.header-actions {
  display: flex;
  gap: var(--space-8);
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: 350px;
}
.client-row {
  display: flex;
  align-items: center;
  gap: var(--space-20);
  padding: var(--space-12) 0;
  border-bottom: 1px solid var(--line);
}
.client-row > :first-child {
  flex: 1;
  overflow-wrap: anywhere;
}
.text-danger {
  font-size: 14px;
  color: var(--danger);
  border: 0;
  padding: 0;
  background: transparent;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.add-client {
  display: flex;
  gap: var(--space-8);
  margin-top: var(--space-16);
}
.add-client input {
  width: 320px;
}
.drop-zone {
  border: 2px dashed var(--line);
  border-radius: var(--radius-sm);
  padding: var(--space-32);
  text-align: center;
}
.drop-zone.drag-over {
  border-color: var(--blue);
  background: var(--stone);
}
.browse-link {
  border: 0;
  padding: 0;
  color: var(--blue-text);
  background: transparent;
  text-decoration: underline;
  font-size: 16px;
}
.file-summary {
  display: flex;
  align-items: center;
  gap: var(--space-16);
  margin: var(--space-16) 0;
  font-size: 14px;
}
.file-summary img {
  object-fit: cover;
}
.revision-fields {
  display: flex;
  gap: var(--space-20);
  margin-bottom: var(--space-16);
}
input.letter-input {
  width: 80px;
}
.note-field {
  flex: 1;
}
.table-scroll {
  overflow-x: auto;
}
.revisions-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  text-align: left;
  table-layout: fixed;
}
.revisions-table th,
.revisions-table td {
  padding: var(--space-12) var(--space-8);
  border-bottom: 1px solid var(--line);
}
.revisions-table th {
  font-weight: 600;
}
.revisions-table th:first-child {
  width: 50px;
}
.revisions-table th:nth-child(3) {
  width: 115px;
}
.revisions-table th:nth-child(5) {
  width: 70px;
}
.revisions-table th:last-child {
  width: 110px;
}
.table-note {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.table-actions {
  white-space: nowrap;
}
.table-actions a {
  color: var(--ink);
  margin-right: var(--space-12);
}
.toggle {
  width: 36px;
  height: 22px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--line);
  padding: 2px;
  display: inline-flex;
  align-items: center;
}
.toggle span {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: white;
}
.toggle[aria-checked="true"] {
  background: var(--navy);
  border-color: var(--navy);
  justify-content: flex-end;
}
dialog {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: white;
  color: var(--ink);
  padding: var(--space-24);
  box-shadow: var(--shadow);
  max-width: calc(100vw - 48px);
}
dialog::backdrop {
  background: rgb(23 35 58 / 0.45);
}
.new-project-dialog {
  width: 480px;
}
.confirm-dialog {
  width: 420px;
}
.new-project-dialog form {
  display: grid;
  gap: var(--space-20);
}
.new-project-dialog .chips-field {
  margin-top: calc(-1 * var(--space-16));
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-8);
  margin-top: var(--space-8);
}
.chips-field {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: var(--space-8);
}
#email-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-8);
}
.email-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-8);
  padding: var(--space-4) var(--space-8);
  background: var(--stone);
  border-radius: var(--radius-sm);
  font-size: 14px;
}
.email-chip.invalid {
  color: var(--danger);
  border: 1px solid var(--danger);
}
.email-chip button {
  color: inherit;
  background: transparent;
  border: 0;
  padding: 0 2px;
}
.chips-field input {
  width: 100%;
  border: 0;
}
.toast {
  position: fixed;
  z-index: 30;
  bottom: 24px;
  right: 24px;
  padding: var(--space-16) var(--space-20);
  background: var(--navy);
  color: white;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  max-width: 420px;
}
.toast.error {
  top: 80px;
  bottom: auto;
  background: var(--danger);
}
@media (width < 720px) {
  .project-grid {
    grid-template-columns: 1fr;
  }
}
@media (width < 560px) {
  .portal-bar {
    gap: var(--space-12);
  }
  .portal-brand {
    gap: var(--space-12);
  }
}

/* v1.1 phone-first surfaces; v1's admin interactions remain intact. */
html {
  color-scheme: light;
  scroll-padding-top: 120px;
}
h1,
h2 {
  font-optical-sizing: auto;
  letter-spacing: -0.01em;
  margin-bottom: var(--space-16);
}
h1 {
  font-size: 30px;
  line-height: 1.15;
}
h2 {
  font-size: 26px;
  line-height: 1.2;
}
h3 {
  font: 600 18px/1.3 var(--sans);
}
a,
.browse-link {
  color: var(--blue-text);
}
a:hover {
  color: var(--blue-text);
}
a,
button,
.project-card,
.drawing-card {
  transition:
    color 160ms var(--ease),
    background 160ms var(--ease),
    border-color 160ms var(--ease),
    transform 160ms var(--ease),
    opacity 160ms var(--ease);
}
button:disabled,
.button[aria-disabled="true"] {
  opacity: 0.45;
  pointer-events: none;
}
button:active,
.button:active {
  transform: translateY(1px);
}
input,
textarea,
select {
  font: 400 16px/1.6 var(--sans);
  min-height: 48px;
  border-radius: var(--radius-sm);
  padding: var(--space-12);
  color: var(--ink);
  background: white;
  border: 1px solid var(--line);
  max-width: 100%;
}
label {
  font-size: 15px;
  font-weight: 600;
}
label > input,
label > textarea {
  margin-top: var(--space-8);
}
.content {
  padding-inline: var(--space-20);
}
.eyebrow {
  font: 600 12px/1 var(--sans);
  color: var(--blue-text);
}
.button {
  min-height: 44px;
  height: auto;
  border-radius: var(--radius-sm);
  padding: var(--space-12) var(--space-20);
  line-height: 1.3;
}
.primary,
.primary:hover {
  color: white;
}
.secondary,
.secondary:hover,
.on-photo,
.on-photo:hover {
  color: var(--ink);
}
.secondary:hover {
  background: color-mix(in srgb, var(--stone) 92%, black);
}
.on-photo:hover {
  background: color-mix(in srgb, white 92%, black);
}
.filled-danger,
.filled-danger:hover {
  color: white;
}
.filled-danger:hover {
  background: color-mix(in srgb, var(--danger) 92%, black);
}
.text-button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: var(--space-8) var(--space-12);
  color: var(--ink);
  font-size: 15px;
}
.card {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
img {
  display: block;
  max-width: 100%;
  background: var(--line);
  transition: opacity 200ms var(--ease);
}
img.loading-image {
  opacity: 0;
}
img.loaded-image {
  opacity: 1;
}
.image-button {
  display: block;
  border: 0;
  background: var(--line);
  padding: 0;
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius);
  min-height: 44px;
}
.image-button img {
  width: 100%;
  height: auto;
}
.image-button:active {
  transform: none;
}
.portal-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  padding-inline: var(--space-20);
  gap: var(--space-16);
}
.bar-divider,
.bar-label {
  display: none;
}
.bar-divider {
  height: 24px;
}
.bar-wordmark {
  color: white;
  display: flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
}
.bar-wordmark:hover {
  color: white;
}
.owner-pill {
  border-radius: 999px;
  color: var(--blue-on-navy);
  font-size: 12px;
}
.back-button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  font-size: 32px;
  color: white;
  text-decoration: none;
  margin-left: calc(-1 * var(--space-12));
}
.back-button:hover {
  color: white;
}
.account-menu {
  position: relative;
}
.account-menu summary {
  list-style: none;
  cursor: pointer;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
}
.account-menu summary::-webkit-details-marker {
  display: none;
}
.account-menu summary span {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid white;
  border-radius: 999px;
}
.account-card {
  position: absolute;
  right: 0;
  top: 48px;
  background: white;
  color: var(--ink);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  padding: var(--space-16);
  min-width: 240px;
  display: grid;
  z-index: 30;
}
.account-card a {
  min-height: 44px;
  display: flex;
  align-items: center;
}
.account-card span {
  overflow-wrap: anywhere;
}
.portal-content {
  padding-top: var(--space-24);
  padding-bottom: var(--space-48);
}
.project-grid {
  grid-template-columns: 1fr;
  gap: var(--space-16);
}
.project-card {
  border-radius: var(--radius);
}
.card-cover {
  position: relative;
  aspect-ratio: 4/3;
  background: var(--line);
}
.card-cover img,
.cover-empty {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  object-fit: cover;
}
.card-cover > .new-badge {
  position: absolute;
  top: var(--space-12);
  left: var(--space-12);
}
.project-body {
  padding: var(--space-16);
}
.project-meta {
  line-height: 1.5;
  gap: var(--space-8);
}
.new-badge {
  background: var(--new-pill);
  border-radius: 999px;
  padding: var(--space-4) var(--space-8);
}
.status-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: var(--space-4) 10px;
  font: 600 12px/1.5 var(--sans);
  border: 1px solid transparent;
  white-space: nowrap;
}
.status-pill.approved {
  background: var(--navy);
  color: white;
}
.status-pill.changes {
  background: white;
  color: var(--ink);
  border-color: var(--ink);
}
.project-body > .status-pill {
  margin-top: var(--space-12);
}
.empty-state {
  border-radius: var(--radius);
  margin: var(--space-48) auto;
}
.project-title {
  display: flex;
  flex-direction: column;
  gap: var(--space-20);
  margin-bottom: var(--space-24);
}
.project-title h1 {
  margin-bottom: var(--space-12);
}
.revision-bar {
  display: none;
  margin: 0;
}
.revision-mobile > .button {
  width: 100%;
  height: 48px;
}
.revision-fallback {
  display: flex;
  gap: var(--space-12);
  flex-wrap: wrap;
}
.revision-fallback a {
  min-height: 44px;
}
.revision-pill {
  border-radius: 999px;
  flex-wrap: wrap;
}
.new-dot,
.unseen-dot {
  width: 8px;
  height: 8px;
  flex-shrink: 0;
  border-radius: 999px;
  background: var(--blue);
}
.revision-pill.selected .new-dot {
  background: var(--line);
}
.earlier-banner {
  background: var(--stone);
  font-size: 14px;
  padding: var(--space-12) 0;
}
.earlier-banner a {
  font-weight: 600;
}
.note-card {
  padding: var(--space-20);
  border-radius: var(--radius);
  margin-bottom: var(--space-24);
}
.note-card p {
  font: italic 400 17px/1.6 var(--serif);
  margin: 0;
}
.section-nav {
  height: 48px;
  position: sticky;
  top: 56px;
  z-index: 15;
  background: white;
  border-bottom: 1px solid var(--line);
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
  margin-inline: calc(-1 * var(--space-20));
  padding-inline: var(--space-20);
  gap: var(--space-24);
}
.section-nav::-webkit-scrollbar {
  display: none;
}
.section-nav a {
  font: 500 15px/1.5 var(--sans);
  color: var(--ink-muted);
  text-decoration: none;
  display: flex;
  align-items: center;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  min-height: 44px;
}
.section-nav a.active {
  color: var(--blue-text);
  border-bottom-color: var(--blue);
}
.portal-section {
  margin-top: var(--space-48);
}
.views-gallery {
  display: flex;
  gap: var(--space-12);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  margin-inline: calc(-1 * var(--space-20));
  padding-inline: var(--space-20);
  scroll-padding-inline: var(--space-20);
}
.views-gallery::-webkit-scrollbar {
  display: none;
}
.views-gallery figure {
  margin: 0;
  flex: 0 0 86vw;
  min-width: 0;
  scroll-snap-align: start;
}
.views-gallery figure:only-child {
  flex-basis: 100%;
}
.views-gallery figcaption {
  font-size: 14px;
  color: var(--ink-muted);
  padding-top: var(--space-8);
}
.drawings-grid {
  display: grid;
  gap: var(--space-16);
}
.drawing-card {
  padding: var(--space-16);
  min-width: 0;
}
.drawing-card .image-button {
  background: white;
  border-radius: 0;
}
.drawing-card img {
  background: white;
}
.zoom-hint {
  font-size: 13px;
  margin-top: var(--space-12);
}
.pointer-hint {
  display: none;
}
.response-card {
  max-width: 720px;
  padding: var(--space-20);
}
.response-actions,
.contact-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-12);
}
.response-actions > .button,
.contact-actions > .button {
  width: 100%;
}
.response-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}
.response-links > a {
  display: flex;
  align-items: center;
  min-height: 44px;
}
.changes-form textarea {
  display: block;
  width: 100%;
  margin-block: var(--space-8);
  font-size: 16px;
}
.field-error {
  color: var(--danger);
  font-size: 14px;
  margin-bottom: var(--space-8);
}
blockquote {
  border-left: 3px solid var(--line);
  padding-left: var(--space-16);
  margin: var(--space-16) 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.approval-check {
  display: inline-grid;
  place-items: center;
  vertical-align: middle;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  color: white;
  background: var(--navy);
  margin-right: var(--space-8);
}
.response-history {
  margin-top: var(--space-32);
}
.history-label {
  font-size: 13px;
}
.response-history .response-entry {
  margin-top: var(--space-24);
}
.contact-card {
  background: var(--navy);
  color: white;
  padding: var(--space-24);
  border-radius: var(--radius);
}
.project-footer {
  color: var(--ink-muted);
  font-size: 13px;
  text-align: center;
  padding: var(--space-32) 0;
}
.project-footer p:last-child {
  margin: var(--space-20) 0 0;
}
.footer-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-12);
  align-items: center;
}
.footer-actions > a {
  min-height: 44px;
  display: flex;
  align-items: center;
}
.project-footer .button {
  font-size: 14px;
}
.dev-login {
  border-radius: var(--radius);
}
.dev-login .button {
  white-space: normal;
  overflow-wrap: anywhere;
}
dialog {
  padding: var(--space-24);
  border-radius: var(--radius);
  max-width: calc(100vw - 40px);
}
.sheet-dialog {
  width: 440px;
  max-height: 90dvh;
  overflow: auto;
}
.grab-handle {
  display: none;
}
.dialog-actions {
  margin-top: var(--space-20);
}
.revision-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-12);
  min-height: 56px;
  text-decoration: none;
  color: var(--ink);
  padding: var(--space-12) 0;
  border-bottom: 1px solid var(--line);
}
.revision-row > div:first-child {
  min-width: 0;
}
.revision-row span {
  display: block;
}
.revision-note {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}
.revision-badges {
  display: flex;
  gap: var(--space-8);
  align-items: center;
  flex-wrap: wrap;
}
.lightbox,
.zoom-viewer {
  position: fixed;
  inset: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  padding: 0;
  box-shadow: none;
  overflow: hidden;
}
.lightbox {
  background: rgb(12 16 14/0.96);
  color: white;
}
.lightbox[open] {
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox > img {
  background: transparent;
  object-fit: contain;
  max-width: calc(100% - 32px);
  max-height: calc(100dvh - 160px);
}
.viewer-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  display: grid;
  place-items: center;
  color: white;
  background: rgb(0 0 0/0.4);
  border: 0;
  border-radius: 999px;
  width: 44px;
  height: 44px;
  font-size: 32px;
  z-index: 2;
}
.viewer-close {
  right: var(--space-16);
  top: max(var(--space-16), env(safe-area-inset-top));
}
.lightbox-prev {
  left: var(--space-16);
  top: 50%;
}
.lightbox-next {
  right: var(--space-16);
  top: 50%;
}
.lightbox-bottom {
  position: absolute;
  left: var(--space-20);
  right: var(--space-20);
  bottom: max(var(--space-24), env(safe-area-inset-bottom));
  display: flex;
  justify-content: space-between;
  gap: var(--space-16);
  font-size: 14px;
}
.zoom-bar {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding-inline: var(--space-12);
  gap: var(--space-8);
}
.zoom-bar > span {
  font-size: 16px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.zoom-bar > div {
  display: flex;
  flex-shrink: 0;
}
.zoom-bar button {
  min-width: 44px;
  height: 44px;
  border: 0;
  background: white;
  color: var(--ink);
  border-radius: var(--radius-sm);
  padding: var(--space-8);
}
.zoom-stage {
  position: absolute;
  inset: 56px 0 0;
  overflow: hidden;
  touch-action: none;
  cursor: grab;
  display: grid;
  place-items: center;
}
.zoom-stage:active {
  cursor: grabbing;
}
.zoom-stage img {
  max-width: none;
  background: white;
  transform-origin: center;
  user-select: none;
  pointer-events: none;
  will-change: transform;
}
.admin-page {
  min-width: 0;
}
.admin-layout {
  display: block;
}
.admin-sidebar {
  width: 100%;
  border-right: 0;
  border-bottom: 1px solid var(--line);
}
.sidebar-controls {
  padding: var(--space-20);
}
#admin-project-list,
#project-search {
  display: none;
}
.admin-empty {
  min-height: 50vh;
  padding: var(--space-20);
}
.admin-detail {
  padding: var(--space-20);
  min-width: 0;
  grid-template-columns: minmax(0, 1fr);
}
.admin-detail > section,
#admin-right {
  min-width: 0;
}
.admin-project-header {
  flex-direction: column;
}
.client-row {
  flex-wrap: wrap;
  gap: var(--space-12);
}
.text-danger,
.browse-link {
  padding: var(--space-8);
  min-height: 44px;
}
.table-actions a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.copy-row input {
  font-size: 16px;
}
.add-client input {
  min-width: 0;
  flex: 1;
}
.revisions-table {
  min-width: 800px;
}
.revisions-table th:nth-child(5) {
  width: 160px;
}
.revisions-table th:nth-child(6) {
  width: 72px;
}
.toggle {
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  padding: var(--space-8);
  position: relative;
}
.toggle:before {
  content: "";
  position: absolute;
  inset: var(--space-12) var(--space-4);
  background: var(--line);
  border-radius: 999px;
}
.toggle span {
  z-index: 1;
}
.toggle[aria-checked="true"] {
  background: transparent;
}
.toggle[aria-checked="true"]:before {
  background: var(--navy);
}
.new-project-dialog {
  width: 480px;
}
.confirm-dialog {
  width: 440px;
}
.email-chip button {
  min-width: 44px;
  min-height: 44px;
}
.response-timeline article {
  border-top: 1px solid var(--line);
  padding-top: var(--space-16);
  margin-bottom: var(--space-20);
}
.timeline-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-12);
  font-size: 14px;
}
.timeline-meta time {
  color: var(--ink-muted);
}
@media (hover: hover) {
  .project-card:hover,
  .drawing-card:hover {
    transform: translateY(-2px);
    box-shadow:
      0 2px 4px rgb(23 35 58/0.06),
      0 12px 32px rgb(23 35 58/0.1);
  }
  .pointer-hint {
    display: inline;
  }
  .touch-hint {
    display: none;
  }
}
@media (width<768px) {
  .sheet-dialog {
    inset: auto 0 0;
    margin: 0;
    max-width: 100%;
    width: 100%;
    border-radius: 16px 16px 0 0;
    padding-bottom: max(var(--space-24), env(safe-area-inset-bottom));
  }
  .grab-handle {
    display: block;
    width: 36px;
    height: 4px;
    background: var(--line);
    border-radius: 999px;
    margin: 0 auto var(--space-20);
  }
  .dialog-actions .button {
    white-space: normal;
  }
  .dev-login {
    margin: var(--space-48) var(--space-20);
  }
}
@media (width>=768px) {
  .content {
    padding-inline: var(--space-32);
  }
  h1 {
    font-size: 38px;
  }
  h2 {
    font-size: 32px;
  }
  .portal-bar {
    padding-inline: var(--space-32);
  }
  .bar-divider,
  .bar-label {
    display: block;
  }
  .back-button {
    display: none;
  }
  .portal-content {
    padding-top: var(--space-48);
  }
  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-24);
  }
  .project-body {
    padding: var(--space-20);
  }
  .project-title {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-32);
  }
  .revision-mobile {
    display: none;
  }
  .revision-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: var(--space-8);
    max-width: 48%;
  }
  .section-nav {
    margin-inline: 0;
    padding-inline: var(--space-20);
  }
  .portal-section {
    margin-top: var(--space-72);
  }
  .views-gallery {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-24);
    margin: 0;
    padding: 0;
    overflow: visible;
  }
  .views-gallery figure:first-child {
    grid-column: 1/-1;
  }
  .views-gallery.two-views figure:first-child {
    grid-column: auto;
  }
  .views-gallery figure:first-child img {
    max-height: 640px;
    object-fit: cover;
  }
  .views-gallery figcaption {
    display: none;
  }
  .response-card {
    padding: var(--space-32);
  }
  .response-actions,
  .contact-actions {
    flex-direction: row;
  }
  .response-actions > .button,
  .contact-actions > .button {
    width: auto;
  }
  .contact-card {
    padding: var(--space-32);
  }
}
@media (width>=1024px) {
  .admin-layout {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
  }
  .admin-sidebar {
    width: 320px;
    border-right: 1px solid var(--line);
    border-bottom: 0;
  }
  .sidebar-controls {
    padding: var(--space-24);
  }
  #admin-project-list,
  #project-search {
    display: block;
  }
  #project-select {
    display: none;
  }
  .admin-project-row .status-pill {
    margin-top: var(--space-8);
    color: var(--ink);
    font-size: 12px;
  }
  .admin-project-row .status-pill.approved {
    color: white;
  }
  .row-indicators {
    display: flex;
    gap: var(--space-8);
    align-items: center;
  }
  .admin-detail {
    padding: var(--space-32);
  }
  .admin-project-header {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
  }
  .header-actions {
    justify-content: flex-end;
    max-width: 350px;
  }
}
@media (width>=1200px) {
  h1 {
    font-size: 44px;
  }
  h2 {
    font-size: 36px;
  }
  .project-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .views-gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .views-gallery.two-views {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  #elevations .drawings-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  a,
  button,
  img,
  .project-card,
  .drawing-card {
    transition: opacity 160ms var(--ease);
  }
  *:is(:hover, :active) {
    transform: none !important;
  }
  .zoom-stage img {
    will-change: auto;
  }
}
@media print {
  body {
    background: white;
  }
  .portal-bar,
  .section-nav,
  .revision-bar,
  .revision-mobile,
  dialog,
  .contact-card,
  .response-actions,
  .response-links,
  .changes-form,
  .approval-form,
  .footer-actions,
  button:not(.image-button) {
    display: none !important;
  }
  .content {
    max-width: none;
    padding: 0;
  }
  .portal-content {
    padding: 0;
  }
  .portal-section {
    margin-top: 24px;
  }
  .views-gallery {
    display: block;
    margin: 0;
    padding: 0;
    overflow: visible;
  }
  .views-gallery figure {
    width: 100%;
    margin-bottom: var(--space-24);
    break-inside: avoid;
  }
  .image-button {
    display: block;
    pointer-events: none;
  }
  .views-gallery figure img {
    max-height: none !important;
    width: 100%;
  }
  .views-gallery figcaption {
    display: block;
  }
  .drawings-grid {
    display: block !important;
  }
  .drawing-card {
    break-before: page;
    break-inside: avoid;
    box-shadow: none;
    margin-bottom: 24px;
  }
  .zoom-hint {
    display: none;
  }
  .response-card {
    box-shadow: none;
    padding: 0;
  }
  .project-footer {
    break-inside: avoid;
  }
  .card {
    box-shadow: none;
  }
}
.zoom-stage {
  display: flex;
  align-items: center;
  justify-content: center;
}
.zoom-stage img {
  flex-shrink: 0;
}
:is(summary, select):focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}
.empty-state a,
.earlier-banner a,
.response-card > p a,
.portal-content > p a,
.revision-fallback a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.project-card,
.drawing-card {
  transition:
    color 160ms var(--ease),
    background 160ms var(--ease),
    border-color 160ms var(--ease),
    transform 160ms var(--ease),
    opacity 160ms var(--ease);
}
@media print {
  .response-section:not(.has-response),
  .response-history {
    display: none !important;
  }
}

/* v1.2 stage 1 staff chrome/dashboard. Scoped to preserve client layout. */
.staff-bar {
  height: auto;
  min-height: 64px;
  padding: 12px 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
}
.staff-bar a { color: white; text-decoration: none; }
.staff-bar a:hover { text-decoration: underline; }
.staff-bar a:focus-visible { outline-color: white; }
.staff-bar .bar-wordmark { flex: 0 0 auto; }
.staff-nav { display: flex; flex-wrap: wrap; gap: 8px 20px; width: 100%; order: 3; }
.staff-nav a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: 14px; }
.staff-nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 7px; }
.staff-account { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; width: 100%; }
.staff-account > a { display: inline-flex; align-items: center; min-height: 44px; margin-left: auto; font-size: 14px; }
.staff-name { overflow-wrap: anywhere; }
.staff-role { border: 1px solid white; border-radius: 20px; padding: 3px 10px; font-size: 12px; font-weight: 600; }
.enquiry-count { border-radius: 20px; background: white; color: var(--navy); padding: 1px 7px; font-size: 12px; font-weight: 600; }
.staff-content { max-width: 1264px; margin: 0 auto; padding: 24px 20px; min-height: 60vh; }
.staff-footer { max-width: 1264px; margin: 0 auto; padding: 8px 20px 32px; overflow-wrap: anywhere; }
.dashboard-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.dashboard-heading h1 { margin: 0; }
.dashboard-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.dashboard-search { display: flex; gap: 8px; max-width: 640px; margin-bottom: 16px; }
.dashboard-search input[type="search"] { flex: 1; min-width: 0; width: 100%; font-size: 16px; }
.filter-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.filter-chip { display: inline-flex; align-items: center; padding: 8px 14px; min-height: 44px; border: 1px solid var(--line); border-radius: 24px; background: white; color: var(--ink); text-decoration: none; font-size: 14px; }
.filter-chip.active { background: var(--navy); border-color: var(--navy); color: white; }
.filter-chip:hover { border-color: var(--blue); }
.projects-table { display: none; }
.staff-project-cards { display: grid; gap: 16px; }
.staff-project-card { display: block; color: var(--ink); text-decoration: none; padding: 20px; min-width: 0; }
.staff-project-card:hover { color: var(--ink); border-color: var(--blue); }
.staff-project-card h2 { font-family: var(--sans); font-size: 18px; font-weight: 600; margin-bottom: 4px; overflow-wrap: anywhere; }
.project-client-names { display: block; color: var(--ink-muted); font-size: 13px; font-weight: 400; }
.staff-activity { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 16px; color: var(--ink-muted); font-size: 13px; }
.staff-activity > span { display: inline-flex; gap: 5px; align-items: center; }
.status-pill.waiting { background: transparent; border: 1px solid var(--line); color: var(--ink-muted); }
.dashboard-empty { padding: 32px; }
.staff-back { display: inline-flex; align-items: center; min-height: 44px; }
.staff-content .admin-detail { padding: 16px 0; gap: 32px; }
.staff-content .admin-project-header h1 { margin-bottom: 12px; font-size: 32px; overflow-wrap: anywhere; }
.staff-content .admin-project-header .small { font-size: 13px; }
.staff-placeholder { padding: 24px; max-width: 760px; }
.staff-placeholder h3 { margin-bottom: 8px; }
.admin-upload { margin: 16px 0 24px; }
.admin-upload h4 { font-family: var(--sans); font-size: 16px; margin-bottom: 12px; }
.office-placeholder p { margin-top: 16px; }
@media (width >= 768px) {
  .staff-account { width: auto; margin-left: auto; }
  .staff-project-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (width >= 1024px) {
  .staff-bar { flex-wrap: nowrap; padding: 8px 32px; }
  .staff-nav { width: auto; order: 0; }
  .staff-account { flex-wrap: nowrap; }
  .staff-content { padding: 32px; }
  .staff-footer { padding: 8px 32px 32px; }
  .staff-project-cards { display: none; }
  .projects-table { display: table; width: 100%; border-collapse: collapse; background: white; table-layout: fixed; }
  .projects-table th { text-align: left; color: var(--ink-muted); font-size: 13px; font-weight: 600; padding: 12px 16px; border-bottom: 1px solid var(--line); }
  .projects-table th:nth-child(1) { width: 30%; }
  .projects-table th:nth-child(2) { width: 16%; }
  .projects-table th:nth-child(3) { width: 19%; }
  .projects-table th:nth-child(4) { width: 19%; }
  .projects-table th:nth-child(5) { width: 16%; }
  .projects-table tr { position: relative; }
  .projects-table td { height: 56px; padding: 8px 16px; border-bottom: 1px solid var(--line); font-size: 14px; overflow-wrap: anywhere; }
  .projects-table tr:hover { background: var(--stone); }
  .project-row-link { display: block; line-height: 20px; color: var(--ink); text-decoration: none; }
  .projects-table .project-client-names { line-height: 17px; }
  .project-row-link::after { content: ""; position: absolute; inset: 0; }
  .projects-table tr:focus-within { outline: 2px solid var(--blue); outline-offset: -2px; }
}
@media (width < 1024px) {
  .staff-content .revisions-table { display: block; min-width: 0; width: 100%; }
  .staff-content .revisions-table thead { display: none; }
  .staff-content .revisions-table tbody { display: grid; gap: 16px; }
  .staff-content .revisions-table tr { display: block; padding: 12px 16px; background: white; border: 1px solid var(--line); border-radius: 8px; }
  .staff-content .revisions-table td { display: flex; flex-wrap: wrap; gap: 8px; border: 0; padding: 6px 0; min-width: 0; max-width: none; overflow-wrap: anywhere; white-space: normal; }
  .staff-content .revisions-table td::before { content: attr(data-label); width: 88px; flex-shrink: 0; font-weight: 600; color: var(--ink-muted); font-size: 13px; }
  .staff-content .revisions-table .table-note { display: block; }
  .staff-content .revisions-table .table-note::before { display: block; margin-bottom: 4px; }
}

.staff-account .account-card .text-button { text-align: left; min-height: 44px; }

.staff-bar [data-profile-email] { display: grid; gap: 16px; }
.staff-bar [data-profile-email] label { display: grid; gap: 6px; }
.staff-bar [data-profile-email] input { width: 100%; min-width: 0; font-size: 16px; }
