/* JobDrafter mobile field-use layer. Loaded additively after the existing theme. */
.mobile-nav-toggle,
.mobile-create-submit,
.mobile-job-actions,
.mobile-diagram-toggle {
  display: none;
}

.mobile-workflow-toggle {
  display: none;
}

.action-status {
  min-height: 20px;
  margin-top: 7px;
  color: #526d83;
  font-size: 13px;
  line-height: 1.4;
}

.action-status[data-action-state="error"] {
  color: #a33d38;
}

.is-action-busy {
  cursor: progress !important;
}

.permit-packet-attachments-card {
  grid-column: 1 / -1;
  min-width: 0;
}

.permit-attachment-section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.permit-attachment-section-heading h3 {
  margin: 0 0 5px;
}

.permit-attachment-section-heading p {
  max-width: 780px;
  margin: 0;
  color: #526d83;
  font-size: 13px;
  line-height: 1.45;
}

.permit-attachment-section-heading > span,
.permit-attachment-included {
  flex: 0 0 auto;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(212, 237, 229, 0.9);
  color: #155b4c;
  font-size: 11px;
  font-weight: 800;
}

.permit-attachment-slot-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.permit-attachment-slot {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
  padding: 13px;
  border: 1px solid rgba(74, 100, 124, 0.23);
  border-radius: 13px;
  background: rgba(248, 251, 253, 0.92);
}

.permit-attachment-slot.is-busy {
  border-color: rgba(45, 112, 195, 0.55);
  box-shadow: 0 0 0 2px rgba(45, 112, 195, 0.1);
}

.permit-attachment-slot-heading {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.permit-attachment-slot-heading > span:not(.permit-attachment-included) {
  color: #688094;
  font-size: 11px;
  font-weight: 750;
}

.permit-attachment-included {
  max-width: 70%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.permit-attachment-label-field {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.permit-attachment-label-field > span {
  color: #29455d;
  font-size: 12px;
  font-weight: 750;
}

.permit-attachment-label-field > span strong {
  margin-left: 5px;
  color: #a33d38;
  font-size: 10px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.permit-attachment-label-field input,
.permit-attachment-photo-choice select {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  font-size: 16px;
}

.permit-attachment-empty-preview,
.permit-attachment-preview {
  display: flex;
  width: 100%;
  height: 132px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px dashed rgba(74, 100, 124, 0.32);
  border-radius: 10px;
  background: #eef4f8;
  color: #61798c;
  font-size: 12px;
  font-weight: 750;
}

.permit-attachment-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.permit-attachment-pdf-mark {
  display: inline-flex;
  min-width: 58px;
  min-height: 68px;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  background: #b33c39;
  color: #fff;
  font-size: 17px;
  font-weight: 900;
}

.permit-attachment-file-name {
  min-width: 0;
  overflow: hidden;
  color: #526d83;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.permit-attachment-actions,
.permit-attachment-photo-choice {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.permit-attachment-actions .permit-attachment-remove {
  color: #8c302d;
}

.permit-attachment-slot .btn {
  min-width: 0;
  min-height: 44px;
  padding: 8px 9px;
  white-space: normal;
}

.permit-attachment-action-status {
  min-height: 34px;
  color: #526d83;
  font-size: 12px;
  line-height: 1.4;
}

.permit-attachment-slot.is-busy .permit-attachment-action-status::before {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 7px;
  border: 2px solid rgba(45, 112, 195, 0.25);
  border-top-color: #2d70c3;
  border-radius: 50%;
  animation: permit-attachment-spin 0.8s linear infinite;
  content: "";
  vertical-align: -2px;
}

@keyframes permit-attachment-spin {
  to { transform: rotate(360deg); }
}

.permit-attachment-load-error {
  color: #9b312d;
}

.mobile-field {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.mobile-field-label {
  color: #29455d;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.2;
}

.jobber-occupancy-selector {
  display: grid;
  grid-column: 1 / -1;
  gap: 8px;
  min-width: 0;
  margin: 0;
  padding: 12px;
  border: 1px solid rgba(74, 100, 124, 0.24);
  border-radius: 12px;
  background: rgba(244, 248, 251, 0.84);
}

.jobber-occupancy-selector legend {
  padding: 0 4px;
  color: #17314a;
  font-size: 14px;
  font-weight: 800;
}

.jobber-occupancy-help {
  color: #526d83;
  font-size: 12px;
  line-height: 1.4;
}

.jobber-occupancy-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.jobber-occupancy-options button {
  min-width: 0;
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid rgba(61, 92, 118, 0.28);
  border-radius: 10px;
  background: #ffffff;
  color: #294b64;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}

.jobber-occupancy-options button.is-selected {
  border-color: #2d70c3;
  color: #123f67;
  background: rgba(214, 233, 249, 0.96);
  box-shadow: inset 0 0 0 1px rgba(45, 112, 195, 0.2);
}

.jobber-occupancy-options button:focus-visible {
  outline: 3px solid rgba(45, 112, 195, 0.34);
  outline-offset: 2px;
}

.jobber-occupancy-error {
  min-height: 0;
  color: #8d2929;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}

.jobber-occupancy-error:empty {
  display: none;
}

.jobber-occupancy-selector.has-error {
  border-color: rgba(174, 65, 65, 0.5);
  background: rgba(252, 238, 238, 0.92);
}

.job-photo-input {
  display: grid;
  gap: 10px;
  min-width: 0;
  max-width: 780px;
  margin-top: 10px;
}

.job-photo-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.job-photo-heading strong {
  color: #17314a;
  font-size: 14px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.job-photo-heading span,
.job-photo-status {
  color: #42607a;
  font-size: 12px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.job-photo-status.is-error {
  color: #8d2929;
}

.job-photo-status.is-success {
  color: #176044;
}

.job-photo-slot-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  min-width: 0;
  max-width: 100%;
}

.job-photo-slot {
  display: grid;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(74, 100, 124, 0.24);
  border-radius: 12px;
  background: rgba(244, 248, 251, 0.96);
}

.job-photo-slot.is-empty {
  min-height: 118px;
  border-style: dashed;
  background: rgba(247, 250, 252, 0.72);
}

.job-photo-slot-add {
  display: flex;
  width: 100%;
  min-width: 0;
  min-height: 116px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 3px;
  padding: 10px 5px;
  border: 0;
  background: transparent;
  color: #244f70;
  cursor: pointer;
}

.job-photo-slot-add > span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  background: rgba(36, 83, 122, 0.1);
  font-size: 21px;
  line-height: 1;
}

.job-photo-slot-add strong {
  max-width: 100%;
  font-size: 12px;
  line-height: 1.15;
}

.job-photo-slot-add small {
  color: #60798d;
  font-size: 10px;
}

.job-photo-thumb {
  display: block;
  width: 100%;
  height: 74px;
  object-fit: cover;
  background: #dce7ef;
}

.job-photo-copy {
  min-width: 0;
  padding: 7px 7px 5px;
}

.job-photo-name {
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: #17314a;
  font-size: 11px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.job-photo-state {
  margin-top: 2px;
  color: #60798d;
  font-size: 10px;
  line-height: 1.25;
}

.job-photo-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  border-top: 1px solid rgba(74, 100, 124, 0.16);
}

.job-photo-actions button {
  min-width: 0;
  min-height: 44px;
  padding: 7px 3px;
  border: 0;
  background: rgba(255, 255, 255, 0.72);
  color: #244f70;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.job-photo-actions button + button {
  border-left: 1px solid rgba(74, 100, 124, 0.16);
}

.job-photo-actions .job-photo-remove {
  color: #8d2929;
}

.job-photo-slot button:focus-visible,
.job-photo-add-more:focus-visible {
  outline: 3px solid rgba(35, 102, 153, 0.34);
  outline-offset: -2px;
}

.job-photo-add-more {
  justify-self: start;
  min-height: 44px;
  padding: 9px 13px;
  border: 1px solid rgba(74, 100, 124, 0.24);
  border-radius: 10px;
  background: rgba(244, 248, 251, 0.96);
  color: #244f70;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}

.technical-readiness-banner {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
  padding: 16px 18px;
  border: 1px solid rgba(74, 100, 124, 0.24);
  border-radius: 16px;
  background: rgba(240, 245, 249, 0.96);
}

.technical-readiness-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.technical-readiness-heading strong {
  font-size: 17px;
}

.technical-readiness-status {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.technical-readiness-banner.is-ready {
  border-color: rgba(30, 137, 92, 0.35);
  background: linear-gradient(180deg, rgba(232, 247, 240, 0.98), rgba(220, 240, 231, 0.98));
}

.technical-readiness-banner.is-ready .technical-readiness-status {
  color: #12553a;
  background: rgba(30, 137, 92, 0.13);
  border: 1px solid rgba(30, 137, 92, 0.25);
}

.technical-readiness-banner.is-incomplete {
  border-color: rgba(181, 127, 29, 0.36);
  background: linear-gradient(180deg, rgba(253, 247, 230, 0.98), rgba(247, 237, 208, 0.98));
}

.technical-readiness-banner.is-incomplete .technical-readiness-status {
  color: #6b4b0b;
  background: rgba(181, 127, 29, 0.13);
  border: 1px solid rgba(181, 127, 29, 0.25);
}

.technical-readiness-banner.is-blocked {
  border-color: rgba(174, 65, 65, 0.38);
  background: linear-gradient(180deg, rgba(252, 238, 238, 0.98), rgba(246, 224, 224, 0.98));
}

.technical-readiness-banner.is-blocked .technical-readiness-status {
  color: #7f2424;
  background: rgba(174, 65, 65, 0.13);
  border: 1px solid rgba(174, 65, 65, 0.25);
}

.technical-readiness-banner ul {
  margin: 0;
  padding-left: 20px;
}

.technical-readiness-banner li + li {
  margin-top: 6px;
}

.technical-readiness-help {
  color: #425c70;
  font-size: 13px;
  line-height: 1.45;
}

.technical-readiness-action {
  justify-self: start;
  min-height: 44px;
  margin-top: 2px;
}

.trade-review-required-fields {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 16px;
  border: 1px solid rgba(181, 127, 29, 0.36);
  border-radius: 14px;
  background: rgba(255, 250, 238, 0.96);
  scroll-margin-top: 18px;
}

.project-review-photo-suggestion {
  display: grid;
  gap: 6px;
  margin-top: 8px;
  padding: 10px;
  border: 1px solid rgba(36, 83, 122, 0.2);
  border-radius: 10px;
  background: rgba(235, 244, 250, 0.82);
  color: #294b64;
  font-size: 12px;
  line-height: 1.4;
}

.project-review-photo-suggestion-note {
  color: #566f82;
}

.project-review-photo-suggestion .btn {
  justify-self: start;
  min-height: 40px;
}

.trade-review-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.trade-review-section-heading > strong {
  color: #4e370b;
  font-size: 15px;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

.required-count-badge,
.required-field-badge,
.optional-field-badge,
.confirmed-field-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.required-count-badge,
.required-field-badge {
  padding: 5px 8px;
  color: #6b4b0b;
  border: 1px solid rgba(181, 127, 29, 0.32);
  background: rgba(181, 127, 29, 0.12);
}

.required-field-badge,
.optional-field-badge,
.confirmed-field-badge {
  margin-left: 6px;
  padding: 4px 7px;
  vertical-align: middle;
}

.optional-field-badge {
  color: #476276;
  border: 1px solid rgba(71, 98, 118, 0.2);
  background: rgba(71, 98, 118, 0.08);
}

.confirmed-field-badge {
  color: #12553a;
  border: 1px solid rgba(30, 137, 92, 0.24);
  background: rgba(30, 137, 92, 0.1);
}

.project-review-requirement-help {
  margin-top: 7px;
  color: #5e4a1c;
  font-size: 12px;
  line-height: 1.45;
}

.trade-review-optional-fields {
  margin-top: 14px;
  border: 1px solid rgba(74, 100, 124, 0.2);
  border-radius: 14px;
  background: rgba(244, 248, 251, 0.76);
}

.trade-review-optional-fields > summary {
  min-height: 44px;
  padding: 12px 14px;
  color: #29455d;
  cursor: pointer;
  font-weight: 750;
}

.trade-review-optional-fields > summary span {
  margin-left: 6px;
  color: #60788b;
  font-size: 12px;
}

.trade-review-optional-fields[open] {
  padding-bottom: 14px;
}

.trade-review-optional-fields[open] > :not(summary) {
  margin-right: 14px;
  margin-left: 14px;
}

.trade-review-required-clear {
  margin-top: 14px;
  padding: 12px 14px;
  color: #12553a;
  border: 1px solid rgba(30, 137, 92, 0.25);
  border-radius: 12px;
  background: rgba(232, 247, 240, 0.76);
  font-weight: 700;
}

.estimator-summary-panel {
  border-color: rgba(54, 111, 188, 0.3) !important;
  background: linear-gradient(135deg, rgba(226, 237, 251, 0.99), rgba(217, 239, 235, 0.99)) !important;
}

.estimator-summary-panel > strong:first-child {
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.estimator-summary-panel .audit-field-row > div,
.estimator-summary-panel > div:last-child {
  color: #0e2f4b;
  font-size: clamp(24px, 4vw, 34px);
  font-weight: 850;
  letter-spacing: -0.02em;
}

.mobile-table-scroll {
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
}

.mobile-table-scroll:focus-visible {
  outline: 3px solid rgba(45, 112, 195, 0.35);
  outline-offset: 2px;
}

.contact-panel {
  max-width: 720px;
  margin: 56px auto;
  color: #17314a;
  background: linear-gradient(180deg, rgba(242, 247, 251, 0.99), rgba(227, 235, 242, 0.99));
  border: 1px solid rgba(92, 116, 140, 0.24);
}

.contact-panel h1 {
  margin: 8px 0 12px;
  color: #10263a;
}

.contact-panel .lead {
  color: #29445a;
}

.contact-email {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 10px 0;
}

.legacy-jobs-page {
  min-height: 100vh;
}

.packet-modal-readiness {
  padding: 12px 14px;
  border-radius: 12px;
  color: #29445a;
  background: rgba(229, 237, 244, 0.9);
  border: 1px solid rgba(91, 116, 140, 0.22);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.packet-modal-readiness.is-blocked {
  color: #762929;
  background: rgba(251, 234, 234, 0.98);
  border-color: rgba(174, 65, 65, 0.3);
}

#generatePacketBtn:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  filter: grayscale(0.45);
  box-shadow: none;
}

.packet-option-row {
  display: grid !important;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: start !important;
  gap: 10px !important;
  padding: 10px 12px;
  border: 1px solid rgba(91, 116, 140, 0.2);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.62);
}

.packet-option-row input {
  width: 20px !important;
  height: 20px;
  margin-top: 1px;
}

.packet-option-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.packet-option-label {
  overflow-wrap: anywhere;
}

.packet-option-status,
.packet-preference-save-status {
  color: #52697d;
  font-size: 12px;
  line-height: 1.4;
}

.packet-option-row.is-mandatory {
  border-left: 3px solid #2d70c3;
}

.packet-option-row.is-unavailable {
  background: rgba(245, 242, 232, 0.82);
  border-color: rgba(153, 120, 37, 0.28);
}

.packet-valuation-dashboard-grid,
.packet-output-dashboard-list {
  display: grid;
  gap: 9px;
  margin-top: 10px;
}

.packet-valuation-dashboard-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.packet-valuation-dashboard-grid > div,
.packet-output-dashboard-item {
  padding: 10px;
  border: 1px solid rgba(91, 116, 140, 0.18);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.62);
}

.packet-valuation-dashboard-grid > div {
  display: grid;
  gap: 3px;
}

.packet-valuation-dashboard-grid span,
.packet-output-dashboard-item span {
  color: #52697d;
  font-size: 12px;
}

.packet-valuation-dashboard-total {
  grid-column: 1 / -1;
  grid-template-columns: 1fr auto;
  align-items: center;
  border-top: 2px solid #2d70c3 !important;
}

.packet-output-dashboard-item > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.packet-output-dashboard-item p {
  margin: 5px 0 0;
  color: #5f4c26;
  font-size: 12px;
  line-height: 1.45;
}

@media (max-width: 760px) {
  .permit-attachment-section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .permit-attachment-section-heading > span {
    align-self: flex-start;
  }

  .permit-attachment-slot-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .permit-attachment-slot {
    padding: 14px 12px;
  }

  .permit-attachment-preview,
  .permit-attachment-empty-preview {
    height: 148px;
  }

  .permit-attachment-actions,
  .permit-attachment-photo-choice {
    grid-template-columns: minmax(0, 1fr);
  }

  .permit-attachment-included {
    max-width: 62%;
  }

  html {
    -webkit-text-size-adjust: 100%;
    scroll-padding-bottom: calc(96px + env(safe-area-inset-bottom));
  }

  body {
    max-width: 100%;
    overflow-x: clip;
  }

  .packet-option-row {
    min-height: 52px;
  }

  .packet-valuation-dashboard-grid {
    grid-template-columns: 1fr;
  }

  .packet-valuation-dashboard-total {
    grid-column: 1;
  }

  .packet-output-dashboard-item > div {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
  select,
  textarea {
    min-width: 0;
    font-size: 16px !important;
  }

  input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
  select,
  .btn,
  button:not(.mobile-nav-toggle) {
    min-height: 44px;
  }

  textarea {
    line-height: 1.5;
  }

  a:focus-visible,
  button:focus-visible,
  input:focus-visible,
  select:focus-visible,
  textarea:focus-visible {
    outline: 3px solid rgba(42, 116, 210, 0.38);
    outline-offset: 2px;
  }

  .site-header,
  body.dashboard-modern .site-header,
  body.profile-modern .site-header,
  body.subscription-page .site-header {
    position: relative;
    z-index: 500;
    min-height: 64px;
    padding: calc(10px + env(safe-area-inset-top)) 14px 10px;
    flex-wrap: nowrap;
    gap: 12px;
  }

  .site-header .brand,
  .site-header .auth-brand {
    min-width: 0;
    flex: 1 1 auto;
  }

  .site-header .brand img,
  body.dashboard-modern .brand img,
  body.profile-modern .brand img,
  body.subscription-page .brand img {
    display: block;
    width: auto;
    max-width: min(210px, 64vw);
    height: 42px !important;
    object-fit: contain;
    object-position: left center;
  }

  .mobile-nav-toggle {
    display: inline-flex;
    min-width: 76px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 12px;
    border: 1px solid rgba(87, 112, 137, 0.28);
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(245, 249, 252, 0.99), rgba(229, 237, 244, 0.99));
    color: #17314a;
    font: inherit;
    font-size: 14px;
    font-weight: 800;
    box-shadow: 0 8px 20px rgba(70, 88, 108, 0.10);
  }

  .mobile-nav-toggle > span:first-child {
    position: relative;
    width: 17px;
    height: 12px;
    border-top: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
  }

  .mobile-nav-toggle > span:first-child::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 4px;
    border-top: 2px solid currentColor;
  }

  .site-header .top-nav,
  body.dashboard-modern .top-nav,
  body.profile-modern .top-nav,
  body.subscription-page .top-nav {
    position: absolute;
    top: calc(100% - 4px);
    right: 12px;
    left: 12px;
    display: none !important;
    width: auto;
    max-height: min(70vh, 420px);
    overflow-y: auto;
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 12px;
    border: 1px solid rgba(90, 114, 137, 0.24);
    border-radius: 16px;
    background: rgba(241, 246, 250, 0.99);
    box-shadow: 0 22px 48px rgba(39, 58, 77, 0.24);
  }

  .site-header .top-nav.is-open,
  body.dashboard-modern .top-nav.is-open,
  body.profile-modern .top-nav.is-open,
  body.subscription-page .top-nav.is-open {
    display: grid !important;
  }

  .site-header .top-nav > a,
  .site-header .top-nav > button,
  body.dashboard-modern .top-nav .btn,
  body.profile-modern .top-nav > *,
  body.subscription-page .top-nav > * {
    display: flex;
    width: 100%;
    min-height: 46px;
    align-items: center;
    justify-content: flex-start;
    padding: 11px 14px;
    border-radius: 10px;
    color: #17314a;
    font-size: 15px;
    text-align: left;
    visibility: visible !important;
  }

  body.dashboard-modern .page-wrap,
  body.profile-modern .page-wrap,
  body.subscription-page .page-wrap {
    padding: 14px 12px 36px;
  }

  body.dashboard-modern #dashboardBody > .panel {
    padding: 12px;
    border-radius: 18px;
  }

  body.dashboard-modern #dashboardBody > .panel > div[style*="grid-template-columns"] {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 14px !important;
  }

  body.dashboard-modern #createJobCard,
  body.dashboard-modern .recent-jobs-card,
  body.dashboard-modern .engine-card.panel {
    padding: 17px 16px;
    border-radius: 18px;
  }

  body.dashboard-modern #createJobCard {
    height: auto;
  }

  .create-job-mobile-ready > h3 {
    order: -20;
    margin-bottom: 2px;
  }

  .create-job-toolbar {
    order: -19;
  }

  .create-job-toolbar > div:first-child {
    display: none;
  }

  .create-job-toolbar > div:last-child {
    display: none !important;
  }

  .create-job-progress {
    order: -10;
    margin-top: 4px !important;
  }

  .create-job-description {
    order: -17;
    margin-top: 10px !important;
  }

  .create-job-description > div:first-child {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: stretch !important;
    gap: 8px !important;
  }

  .create-job-description > div:first-child > div:first-child {
    grid-column: 1 / -1;
    color: #17314a !important;
    font-size: 15px !important;
    font-weight: 800;
  }

  .create-job-description #jobScopeMicBtn,
  .create-job-description > div:first-child > button {
    width: 100%;
    min-height: 48px;
    padding: 10px 8px !important;
    font-size: 13px !important;
  }

  #createJobCard #job_scope {
    min-height: 146px;
    resize: vertical;
  }

  [data-job-attachment-ui] {
    max-width: 100%;
  }

  .job-photo-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .job-photo-slot-grid {
    gap: 7px;
  }

  .job-photo-slot.is-empty,
  .job-photo-slot-add {
    min-height: 112px;
  }

  .job-photo-thumb {
    height: 68px;
  }

  .job-photo-actions button {
    min-height: 44px;
  }

  .job-photo-actions {
    grid-template-columns: minmax(0, 1fr);
  }

  .job-photo-actions button + button {
    border-top: 1px solid rgba(74, 100, 124, 0.16);
    border-left: 0;
  }

  .job-photo-add-more {
    width: 100%;
    min-height: 44px;
  }

  [data-job-attachment-status],
  #jobScopeMicStatus {
    min-height: 18px;
    font-size: 12px !important;
    line-height: 1.45;
  }

  .create-location-heading {
    order: -16;
    margin-top: 14px;
    color: #17314a;
    font-size: 15px;
    font-weight: 800;
  }

  .create-street-field {
    order: -15;
  }

  .create-location-grid {
    order: -14;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    gap: 10px !important;
  }

  .create-city-field {
    grid-column: 1 / -1;
  }

  .create-job-type-grid {
    order: -13;
    grid-template-columns: 1fr !important;
  }

  .create-client-group {
    order: -12;
    gap: 10px !important;
  }

  .create-client-group > div:first-child {
    margin-top: 4px;
    font-size: 15px;
    font-weight: 800 !important;
  }

  .mobile-create-submit {
    order: -11;
    display: inline-flex;
    width: 100%;
    min-height: 52px;
    align-items: center;
    justify-content: center;
    margin-top: 4px;
    font-size: 16px;
  }

  .recent-jobs-card {
    height: auto;
  }

  .recent-jobs-card > h3 {
    margin-top: 8px;
  }

  .mobile-job-list-item {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center !important;
    gap: 12px;
    padding: 13px !important;
  }

  .mobile-job-list-item > div {
    min-width: 0;
  }

  .mobile-job-list-item > div > div {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .mobile-load-button {
    min-width: 68px;
    min-height: 44px;
    padding: 9px 12px !important;
    font-size: 13px !important;
  }

  .job-list-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px !important;
  }

  .job-list-actions button {
    width: 100%;
    min-height: 44px;
    padding: 9px 10px !important;
  }

  .job-list-actions button:nth-last-child(-n + 2) {
    font-size: 12px !important;
  }

  .mobile-client-result {
    min-height: 52px;
    overflow-wrap: anywhere;
  }

  body.dashboard-modern #engineContainer.engine-grid,
  body.dashboard-modern #engineContainer.engine-grid.jobber-engine-grid {
    display: block;
    column-count: 1 !important;
    column-gap: 0 !important;
  }

  body.dashboard-modern .jobber-loaded-layout {
    display: flex;
    flex-direction: column;
    gap: 14px;
  }

  body.dashboard-modern .jobber-loaded-column {
    display: contents;
  }

  body.dashboard-modern .jobber-loaded-left .card-ahj-project {
    order: 1;
  }

  body.dashboard-modern .jobber-loaded-right .card-estimator-bom {
    order: 2;
  }

  body.dashboard-modern .jobber-loaded-left .card-scope {
    order: 3;
  }

  body.dashboard-modern .jobber-loaded-left .card-trade-review {
    order: 4;
  }

  body.dashboard-modern .jobber-loaded-right .preferred-materials-card {
    order: 5;
  }

  body.dashboard-modern .jobber-loaded-right > .engine-card:not(.card-estimator-bom):not(.preferred-materials-card) {
    order: 6;
  }

  body.dashboard-modern .engine-card.panel .panel,
  body.dashboard-modern .materials-panel,
  body.dashboard-modern .labor-panel,
  body.dashboard-modern .estimator-summary-panel,
  body.dashboard-modern .estimator-actions-panel,
  body.dashboard-modern .load-diagram-panel,
  body.dashboard-modern .load-calc-panel {
    padding: 14px;
    border-radius: 14px;
  }

  .estimator-summary-panel {
    padding: 18px 16px !important;
  }

  .estimator-summary-panel .audit-field-row > div,
  .estimator-summary-panel > div:last-child {
    font-size: 30px;
  }

  .materials-panel .estimate-line-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px 10px;
    padding: 12px 0 !important;
  }

  .materials-panel .material-task {
    grid-column: 1 / -1;
    overflow-wrap: anywhere;
  }

  .materials-panel .material-meta {
    margin-left: 0;
    white-space: normal;
  }

  .materials-panel .estimate-line-item .btn {
    min-width: 76px;
    min-height: 44px;
    justify-self: end;
    padding: 8px 12px !important;
  }

  .labor-panel .estimate-line-item {
    display: grid;
    grid-template-columns: 1fr;
    gap: 5px;
    padding: 12px 0 !important;
  }

  .labor-panel .labor-task,
  .labor-panel .labor-meta {
    overflow-wrap: anywhere;
  }

  .estimator-actions-panel > div[style*="display:flex"] {
    display: grid !important;
    grid-template-columns: 1fr !important;
    align-items: stretch !important;
  }

  .estimator-actions-panel .stack {
    width: 100%;
    min-width: 0 !important;
  }

  .estimator-actions-panel .estimator-actions,
  .estimator-actions-panel .estimator-actions .btn {
    width: 100%;
  }

  .bom-item-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: start;
  }

  .bom-item-row strong {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .preferred-materials-card .preferred-material-row,
  body.profile-modern .preferred-material-row {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    gap: 10px !important;
    padding: 14px;
    border: 1px solid rgba(96, 120, 143, 0.2);
    border-radius: 14px;
    background: rgba(245, 249, 252, 0.78);
  }

  .preferred-materials-card .preferred-material-row label:nth-of-type(1),
  .preferred-materials-card .preferred-material-row label:nth-of-type(4),
  body.profile-modern .preferred-material-row label:nth-of-type(1),
  body.profile-modern .preferred-material-row label:nth-of-type(4) {
    grid-column: 1 / -1;
  }

  .preferred-materials-card .preferred-material-row label[style*="display:flex"],
  body.profile-modern .preferred-material-row label[style*="display:flex"] {
    grid-column: 1;
    min-height: 44px;
    padding-bottom: 0 !important;
  }

  .preferred-materials-card .preferred-material-row > .btn,
  body.profile-modern .preferred-material-row > .btn {
    grid-column: 2;
    width: 100%;
    min-height: 44px;
    margin-bottom: 0 !important;
  }

  .technical-readiness-banner {
    margin: 0 0 14px;
    padding: 15px;
    border-radius: 14px;
  }

  .technical-readiness-heading {
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
  }

  .technical-readiness-status {
    width: fit-content;
  }

  .card-trade-review .project-review-input-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .card-trade-review .project-review-input-meta {
    align-items: center;
  }

  .card-trade-review .project-review-input-meta .btn {
    min-width: 72px;
    min-height: 44px;
  }

  .project-review-photo-suggestion .btn {
    width: 100%;
    min-height: 44px;
  }

  .trade-review-list {
    padding-left: 20px;
  }

  .diagram-stage {
    padding: 8px !important;
  }

  .diagram-surface {
    padding: 8px !important;
  }

  .mobile-diagram-toggle {
    display: inline-flex;
    width: 100%;
    align-items: center;
    justify-content: center;
    margin-top: 10px;
  }

  .card-diagram.is-diagram-expanded {
    position: relative;
    z-index: 9000;
  }

  .diagram-stage.is-mobile-expanded {
    position: fixed;
    z-index: 9000;
    inset: calc(58px + env(safe-area-inset-top)) 0 0;
    display: block;
    margin: 0;
    padding: 18px !important;
    overflow: auto;
    border: 0;
    border-radius: 0;
    background: rgba(228, 236, 243, 0.99);
  }

  .diagram-stage.is-mobile-expanded .diagram-surface {
    width: max(100%, 720px);
    min-height: 100%;
    align-items: flex-start;
  }

  .card-diagram.is-diagram-expanded .mobile-diagram-toggle {
    position: fixed;
    z-index: 9001;
    top: calc(8px + env(safe-area-inset-top));
    right: 12px;
    width: auto;
    min-width: 140px;
    margin: 0;
  }

  body.mobile-diagram-open {
    overflow: hidden;
  }

  .mobile-table-scroll {
    position: relative;
    margin-inline: -4px;
    padding-bottom: 6px;
  }

  .mobile-table-scroll table {
    min-width: 620px;
  }

  .mobile-job-actions {
    position: fixed;
    z-index: 800;
    right: max(12px, env(safe-area-inset-right));
    bottom: calc(14px + env(safe-area-inset-bottom));
    left: max(12px, env(safe-area-inset-left));
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    padding: 7px;
    border: 1px solid rgba(77, 102, 128, 0.24);
    border-radius: 16px;
    background: rgba(242, 247, 250, 0.96);
    box-shadow: 0 18px 44px rgba(35, 54, 74, 0.3);
    backdrop-filter: blur(14px);
  }

  #packetModalOverlay,
  #emailModalOverlay {
    align-items: flex-end !important;
    padding: 10px !important;
    padding-bottom: calc(10px + env(safe-area-inset-bottom)) !important;
  }

  #packetModalOverlay > .panel,
  #emailModalOverlay > .panel {
    width: 100% !important;
    max-width: 100% !important;
    max-height: min(88vh, 760px) !important;
    padding: 18px 16px !important;
    border-radius: 18px 18px 12px 12px !important;
  }

  #emailModalOverlay > .panel > div[style*="grid-template-columns"] {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  #packetModalOverlay input[type="checkbox"],
  #emailModalOverlay input[type="checkbox"] {
    width: 22px !important;
    height: 22px !important;
    flex: 0 0 22px;
  }

  #packetModalOverlay > .panel > div:last-child,
  #emailModalOverlay > .panel > div:last-child {
    display: grid !important;
    grid-template-columns: 1fr !important;
  }

  #packetModalOverlay > .panel > div:last-child .btn,
  #emailModalOverlay > .panel > div:last-child .btn {
    width: 100%;
  }

  .mobile-job-actions[hidden] {
    display: none;
  }

  .mobile-job-action {
    min-width: 0;
    min-height: 48px;
    padding: 8px 5px;
    border: 0;
    border-radius: 11px;
    background: linear-gradient(135deg, #4265f2, #1d91dc 55%, #16bfa3);
    color: #fff;
    font: inherit;
    font-size: 12px;
    font-weight: 850;
    box-shadow: 0 9px 18px rgba(44, 94, 180, 0.2);
  }

  .mobile-job-action:disabled {
    opacity: 0.48;
  }

  body.has-mobile-job-actions .page-wrap {
    padding-bottom: calc(122px + env(safe-area-inset-bottom)) !important;
  }

  .mobile-workflow-toggle {
    width: 100%;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
  }

  body.mobile-job-loaded .mobile-workflow-toggle:not([hidden]) {
    display: inline-flex;
  }

  body.mobile-job-loaded:not(.mobile-workflow-open) #dashboardBody > .panel:first-of-type {
    display: none;
  }

  body.mobile-job-loaded #engineContainer {
    scroll-margin-top: 10px;
  }

  body.profile-modern .profile-grid,
  body.profile-modern .profile-field-grid,
  body.profile-modern .profile-address-grid,
  body.profile-modern .profile-office-form,
  body.profile-modern .profile-license-row,
  body.profile-modern #licensesList > div {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body.profile-modern .profile-card {
    padding: 17px 16px;
  }

  body.profile-modern #logoPreview {
    max-width: 100%;
    height: auto;
  }

  body.subscription-page .subscription-shell {
    width: 100%;
    max-width: 100%;
    margin: 14px auto;
    padding: 0;
  }

  body.subscription-page .subscription-panel {
    width: 100%;
    max-width: 100%;
    padding: 20px 16px;
  }

  body.subscription-page .subscription-actions,
  body.subscription-page .subscription-actions .btn,
  body.subscription-page .subscription-action-card .btn {
    width: 100%;
  }

  body.subscription-page .subscription-plan-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  body.subscription-page .subscription-plan-card {
    min-width: 0;
    min-height: 92px;
  }

  body.signup-page,
  body.signup-page * {
    box-sizing: border-box;
  }

  body.signup-page {
    overflow-x: hidden;
  }

  body.auth-page .auth-wrap,
  body.signup-page .page-wrap.narrow {
    padding: 18px 12px 32px;
  }

  body.auth-page .login-panel,
  body.signup-page .trial-panel {
    width: 100%;
    max-width: 100%;
    margin: 28px auto;
    padding: 24px 20px;
  }

  body.auth-page .auth-brand img {
    max-width: 100%;
    height: 52px !important;
  }

  body.signup-page .trial-head h1 {
    font-size: clamp(30px, 9vw, 38px);
  }

  body.jobdrafter-light .site-header {
    align-items: center;
  }

  .contact-panel {
    margin: 20px auto;
    padding: 22px 18px;
  }

  .contact-email {
    width: 100%;
    min-height: 50px;
    overflow-wrap: anywhere;
    text-align: center;
  }

  .legacy-jobs-page .header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 12px;
  }

  .legacy-jobs-page .header .logo {
    min-width: 0;
    font-size: 20px;
    overflow: hidden;
  }

  .legacy-jobs-page .header .logo img {
    display: block;
    max-width: 190px;
    height: 40px !important;
    object-fit: contain;
  }

  .legacy-jobs-page .header .nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-column: 1 / -1;
    width: 100%;
    gap: 8px;
  }

  .legacy-create-job-page .header .nav {
    display: block;
    grid-column: 2;
  }

  .legacy-jobs-page .header .nav-btn,
  .legacy-jobs-page .header .user button {
    width: 100%;
    min-height: 44px;
  }

  .legacy-jobs-page .header .user {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    overflow-wrap: anywhere;
  }

  .legacy-jobs-page .container {
    width: 100%;
    max-width: 100%;
    padding: 18px 12px 40px;
  }

  .legacy-jobs-page .form-card {
    width: 100%;
    max-width: 100%;
    padding: 18px 16px;
  }

  .legacy-jobs-page .row,
  .legacy-jobs-page .tabs,
  .legacy-jobs-page .topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .legacy-jobs-page .tabs button,
  .legacy-jobs-page .primary.large,
  .legacy-jobs-page .topbar .primary {
    width: 100%;
    min-height: 48px;
  }

  .legacy-jobs-page .jobs-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body.jobdrafter-light .site-header .top-nav .btn-trial {
    max-width: none;
    padding: 11px 14px;
    font-size: 15px;
  }

  body.jobdrafter-light .site-header .top-nav .btn-trial span {
    max-width: 100%;
    overflow-wrap: anywhere;
    white-space: normal;
    text-align: center;
  }

  body.jobdrafter-light .site-header .top-nav .btn-trial small {
    display: block;
  }

  body.jobdrafter-light .site-header .top-nav .btn-secondary {
    width: 100%;
    min-height: 44px;
    justify-content: center;
    padding: 8px 10px;
    font-size: 13px;
  }

  body.auth-page .auth-foot a,
  body.jobdrafter-light .system-return-link {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    padding-block: 10px;
  }

  body.office-mobile-ready .page-wrap {
    width: 100%;
    max-width: 100%;
    padding: 14px 12px 40px;
  }

  body.office-mobile-ready #dashboardBody,
  body.office-mobile-ready #dashboardBody > section,
  body.office-mobile-ready #dashboardBody .panel {
    min-width: 0;
    max-width: 100%;
  }

  body.office-mobile-ready #dashboardBody [style*="grid-template-columns"] {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body.office-mobile-ready #dashboardBody > section > .panel,
  body.office-mobile-ready #dashboardBody section.panel {
    padding: 17px 16px !important;
  }

  body.office-mobile-ready #officeApplyClientFiltersBtn,
  body.office-mobile-ready #officeResetClientFiltersBtn,
  body.office-mobile-ready #officeApplyFiltersBtn,
  body.office-mobile-ready #officeResetFiltersBtn,
  body.office-mobile-ready #officePaySelectedBtn {
    width: 100%;
  }
}

/* Public Realtor discovery path. Kept additive so the existing landing-page
   hierarchy remains contractor/estimator-first. */
body.jobdrafter-light .realtor-entry-link {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding: 10px 14px;
  border: 1px solid rgba(67, 115, 197, 0.28);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(234, 242, 249, 0.96), rgba(218, 230, 240, 0.96));
  color: #17314a;
  box-shadow: 0 12px 24px rgba(70, 88, 108, 0.10);
  text-decoration: none;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

body.jobdrafter-light .realtor-entry-link:hover {
  border-color: rgba(49, 105, 166, 0.42);
  box-shadow: 0 16px 28px rgba(70, 88, 108, 0.14);
  transform: translateY(-1px);
}

body.jobdrafter-light .realtor-entry-link span {
  color: #35506b;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

body.jobdrafter-light .realtor-entry-link strong {
  color: #174f84;
  font-size: 14px;
}

body.jobdrafter-light .price-card-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  margin-top: 10px;
  color: #174f84;
  font-weight: 800;
  text-decoration: none;
}

body.jobdrafter-light .price-card-link:hover {
  color: #103d68;
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 520px) {
  body.jobdrafter-light .realtor-entry-link {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
    border-radius: 14px;
  }
}

@media (max-width: 340px) {
  .job-photo-slot-grid {
    gap: 5px;
  }

  .job-photo-slot-add {
    padding-right: 2px;
    padding-left: 2px;
  }

  .job-photo-slot-add strong,
  .job-photo-actions button {
    font-size: 10px;
  }

  .job-photo-copy {
    padding-right: 5px;
    padding-left: 5px;
  }

  .site-header .brand img,
  body.dashboard-modern .brand img,
  body.profile-modern .brand img,
  body.subscription-page .brand img {
    max-width: 190px;
    height: 38px !important;
  }

  .mobile-nav-toggle {
    min-width: 66px;
    padding-inline: 9px;
    font-size: 13px;
  }

  body.dashboard-modern .page-wrap,
  body.profile-modern .page-wrap,
  body.subscription-page .page-wrap {
    padding-inline: 8px;
  }

  body.dashboard-modern #dashboardBody > .panel {
    padding: 8px;
  }

  body.dashboard-modern #createJobCard,
  body.dashboard-modern .recent-jobs-card,
  body.dashboard-modern .engine-card.panel {
    padding-inline: 13px;
  }

  .create-job-description > div:first-child {
    grid-template-columns: 1fr;
  }

  .create-job-description > div:first-child > div:first-child {
    grid-column: 1;
  }

  .preferred-materials-card .preferred-material-row,
  body.profile-modern .preferred-material-row {
    grid-template-columns: 1fr !important;
  }

  .preferred-materials-card .preferred-material-row > .btn,
  body.profile-modern .preferred-material-row > .btn,
  .preferred-materials-card .preferred-material-row label,
  body.profile-modern .preferred-material-row label {
    grid-column: 1 !important;
  }
}

@media (min-width: 761px) {
  .mobile-field-label,
  .create-location-heading {
    display: none;
  }

  .mobile-field {
    display: contents;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/*
 * Portrait tablets do not have enough horizontal room for the full dashboard
 * navigation beside the brand. Keep the readable tablet card layout, but use
 * the compact navigation through 900px so the header never wraps off-grid.
 */
@media (min-width: 761px) and (max-width: 900px) {
  .site-header,
  body.dashboard-modern .site-header,
  body.profile-modern .site-header,
  body.subscription-page .site-header {
    position: relative;
    z-index: 500;
    min-height: 72px;
    padding: 12px 18px;
    flex-wrap: nowrap;
    gap: 14px;
  }

  .site-header .brand,
  .site-header .auth-brand {
    min-width: 0;
    flex: 1 1 auto;
  }

  .site-header .brand img,
  body.dashboard-modern .brand img,
  body.profile-modern .brand img,
  body.subscription-page .brand img {
    display: block;
    width: auto;
    max-width: min(250px, 58vw);
    height: 48px !important;
    object-fit: contain;
    object-position: left center;
  }

  .mobile-nav-toggle {
    display: inline-flex;
    min-width: 82px;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 13px;
    border: 1px solid rgba(87, 112, 137, 0.28);
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(245, 249, 252, 0.99), rgba(229, 237, 244, 0.99));
    color: #17314a;
    font: inherit;
    font-size: 14px;
    font-weight: 800;
    box-shadow: 0 8px 20px rgba(70, 88, 108, 0.10);
  }

  .mobile-nav-toggle > span:first-child {
    position: relative;
    width: 17px;
    height: 12px;
    border-top: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
  }

  .mobile-nav-toggle > span:first-child::after {
    content: "";
    position: absolute;
    right: 0;
    left: 0;
    top: 4px;
    border-top: 2px solid currentColor;
  }

  .site-header .top-nav,
  body.dashboard-modern .top-nav,
  body.profile-modern .top-nav,
  body.subscription-page .top-nav {
    position: absolute;
    top: calc(100% - 4px);
    right: 18px;
    left: 18px;
    display: none !important;
    width: auto;
    max-height: min(70vh, 420px);
    overflow-y: auto;
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 12px;
    border: 1px solid rgba(90, 114, 137, 0.24);
    border-radius: 16px;
    background: rgba(241, 246, 250, 0.99);
    box-shadow: 0 22px 48px rgba(39, 58, 77, 0.24);
  }

  .site-header .top-nav.is-open,
  body.dashboard-modern .top-nav.is-open,
  body.profile-modern .top-nav.is-open,
  body.subscription-page .top-nav.is-open {
    display: grid !important;
  }

  .site-header .top-nav > a,
  .site-header .top-nav > button,
  body.dashboard-modern .top-nav .btn,
  body.profile-modern .top-nav > *,
  body.subscription-page .top-nav > * {
    display: flex;
    width: 100%;
    min-height: 46px;
    align-items: center;
    justify-content: flex-start;
    padding: 11px 14px;
    border-radius: 10px;
    color: #17314a;
    font-size: 15px;
    text-align: left;
    visibility: visible !important;
  }
}

.profile-session-card {
  margin-top: 18px;
}

.session-device-list {
  display: grid;
  gap: 10px;
  margin: 14px 0;
}

.session-device-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px;
  border: 1px solid rgba(36, 83, 122, 0.22);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
}

.session-limit-list .btn {
  min-height: 44px;
  white-space: normal;
}

@media (max-width: 760px) {
  .trade-review-section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .trade-review-required-fields,
  .trade-review-optional-fields[open] {
    padding-right: 12px;
    padding-left: 12px;
  }

  .trade-review-optional-fields[open] > :not(summary) {
    margin-right: 0;
    margin-left: 0;
  }

  .technical-readiness-action {
    width: 100%;
  }

  .session-device-row {
    align-items: stretch;
    flex-direction: column;
  }

  .session-device-row .btn {
    min-height: 44px;
    width: 100%;
  }
}

/* Responsive treatment for the linked Realtor wordmark in the public
   landing-page brand lockup. */
@media (max-width: 900px) {
  body.jobdrafter-light .site-header .landing-brand-lockup {
    display: flex;
    align-items: center;
    gap: 9px;
  }

  body.jobdrafter-light .site-header .landing-brand-lockup > img {
    max-width: 205px;
    height: 44px !important;
  }

  body.jobdrafter-light .landing-realtor-wordmark {
    gap: 5px;
    font-size: 22px;
  }
}

@media (max-width: 760px) {
  body.jobdrafter-light .site-header .landing-brand-lockup {
    align-items: flex-start;
    flex-direction: column;
    gap: 1px;
  }

  body.jobdrafter-light .site-header .landing-brand-lockup > img {
    max-width: min(162px, 58vw);
    height: 32px !important;
  }

  body.jobdrafter-light .landing-realtor-wordmark {
    gap: 4px;
    padding: 1px 0 3px;
    font-size: 14px;
    letter-spacing: -0.025em;
  }

  body.jobdrafter-light .landing-realtor-wordmark::after {
    height: 1px;
  }
}
