* { box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  margin: 0;
  background: #f1f0ec;
  color: #16181c;
  min-height: 100dvh;
  overflow: auto;
}

#upload-screen { min-height: 100dvh; }
.landing-topbar {
  background: #fff;
  border-bottom: 1px solid rgba(22, 24, 28, .14);
}
.topbar-inner {
  width: min(1280px, 100%);
  margin: 0 auto;
  padding: 14px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.landing-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.landing-logo {
  display: block;
  width: auto;
  height: 38px;
}
.brand-name {
  color: #16181c;
  padding-left: 12px;
  border-left: 1px solid rgba(22, 24, 28, .25);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -.01em;
}
.auth-rail {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 44px;
}
.auth-rail > [hidden] { display: none !important; }
.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-btn {
  appearance: none;
  border-radius: 6px;
  padding: 12px 20px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}
.nav-btn-outline {
  background: transparent;
  border: 1px solid rgba(22,24,28,.3);
  color: #16181c;
  font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.nav-btn-outline:hover {
  background: rgba(22,24,28,.06);
  border-color: rgba(22,24,28,.5);
}
.nav-btn-solid {
  background: #16181c;
  border: 1px solid #16181c;
  color: #fff;
}
.nav-btn-solid:hover {
  background: #2d3037;
  border-color: #2d3037;
}
.auth-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border: 1px solid rgba(22,24,28,.14);
  border-radius: 8px;
  background: #fff;
}
.auth-user img {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
}
.auth-user #auth-name {
  color: #16181c;
  font-size: 12px;
  font-weight: 700;
}
.auth-user #auth-email {
  color: #6a6f76;
  font-size: 11px;
}
.auth-link {
  border: 1px solid transparent;
  background: transparent;
  color: #16181c;
  padding: 9px 12px;
  border-radius: 6px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.auth-link:hover { background: rgba(22,24,28,.06); }

.landing-shell {
  width: min(1280px, 100%);
  margin: 0 auto;
  padding: clamp(32px, 6vh, 64px) 32px 48px;
}
.app-mode .landing-shell {
  max-width: 980px;
  padding-top: 26px;
}
.app-mode .hero-grid,
.app-mode .stats-row {
  display: none;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr);
  gap: 48px;
  align-items: center;
}
.hero-visual {
  display: flex;
  justify-content: center;
}
.ata-crane-widget {
  width: min(500px, 100%);
}
.app-mode .intake-card {
  width: 100%;
}
.app-mode #auth-panel {
  display: none;
}

.hero-copy { max-width: 920px; }
.hero-copy h1 {
  margin: 0 0 24px;
  color: #131519;
  font-size: clamp(40px, 5.4vw, 76px);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -.035em;
}
.hero-accent {
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  font-weight: 500;
  letter-spacing: -.02em;
}
.hero-copy .sub {
  max-width: 620px;
  color: #3f434a;
  margin: 0;
  font-size: 18px;
  line-height: 1.55;
}
#auth-panel {
  display: grid;
  gap: 14px;
  margin-top: 30px;
}
#auth-panel[hidden],
#signed-in-panel[hidden] { display: none; }
#signed-in-panel { margin-top: 30px; }
#signed-in-panel h2 {
  margin: 0 0 6px;
  font-size: 24px;
  letter-spacing: -.02em;
  color: #131519;
}
#signed-in-panel .sub {
  margin: 0;
  color: #3f434a;
  font-size: 16px;
  line-height: 1.55;
}
.text-link {
  border: 0;
  padding: 0;
  background: transparent;
  color: #16181c;
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.text-link:hover { color: #2d3037; }
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.btn {
  appearance: none;
  border: 1px solid #16181c;
  border-radius: 6px;
  padding: 15px 26px;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -.01em;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.btn-solid {
  background: #16181c;
  color: #fff;
}
.btn-solid:hover {
  background: #2d3037;
  border-color: #2d3037;
}
.btn-outline {
  background: transparent;
  color: #16181c;
}
.btn-outline:hover { background: rgba(22,24,28,.07); }

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  max-width: 920px;
  margin-top: clamp(28px, 5vh, 56px);
  padding-top: 26px;
  border-top: 1px solid rgba(22,24,28,.22);
}
.stat + .stat {
  border-left: 1px solid rgba(22,24,28,.16);
  padding-left: 24px;
}
.stat-value {
  color: #131519;
  font-size: clamp(26px, 2.8vw, 38px);
  font-weight: 700;
  letter-spacing: -.025em;
  line-height: 1.1;
}
@media (max-height: 860px) {
  .landing-shell { padding-top: 26px; }
  .hero-copy h1 { margin-bottom: 18px; font-size: clamp(34px, 4.6vw, 58px); }
  #auth-panel, #signed-in-panel { margin-top: 22px; }
  .stats-row { margin-top: 24px; padding-top: 20px; }
  .ata-crane-widget { width: min(420px, 100%); }
}
.stat-label {
  margin-top: 10px;
  color: #6a6f76;
  font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.card {
  background: #fff;
  border: 1px solid rgba(22,24,28,.14);
  border-radius: 10px;
  padding: 34px 40px;
  width: min(760px, 100%);
}
.intake-card h2 { margin: 0 0 8px; font-size: 25px; letter-spacing: -.02em; color: #131519; }
.card .sub { color: #5f6670; margin: 0 0 24px; font-size: 14px; line-height: 1.5; }
.field { margin: 16px 0; }
.field label, label { display: block; font-weight: 700; font-size: 12px; margin: 14px 0 7px; color: #4b525b; }
.field input[type="email"] {
  width: 100%;
  border: 1px solid #cbd1d8;
  border-radius: 8px;
  padding: 11px 12px;
  font: inherit;
  font-size: 14px;
  color: #29313a;
  background: #fff;
}
.field input[type="email"]:focus {
  outline: 0;
  border-color: #16181c;
  box-shadow: 0 0 0 3px rgba(22,24,28,.1);
}
.dropzone {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 2px dashed #c8ced6;
  border-radius: 8px;
  padding: 18px;
  cursor: pointer;
  background: #fafbfc;
  color: #626a74;
  font-size: 13px;
  transition: border-color .15s, background .15s;
}
.dropzone > * { pointer-events: none; }
.dropzone:hover, .dropzone.dragover { border-color: #16181c; background: #f7f7f4; }
.dropzone.has-file { border-style: solid; border-color: #287a49; background: #f2faf5; color: #22633d; }
.dropzone.invalid-file { border-style: solid; border-color: #bd352a; background: #fff5f4; color: #8f2a22; }
.dz-icon { font-size: 21px; line-height: 1; }
.dz-text b { color: #16181c; text-decoration: underline; }
.dropzone.has-file .dz-text b { color: #1f663d; }
#file-list {
  margin: 10px 0 0;
  padding-left: 18px;
  max-height: 110px;
  overflow: auto;
  color: #4c535c;
  font-size: 12px;
  line-height: 1.55;
}
.file-error { color: #a82d24; font-weight: 700; }
.start {
  margin-top: 24px;
  background: #16181c;
  color: #fff;
  border: 1px solid #16181c;
  border-radius: 6px;
  padding: 13px 24px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.start:hover:not(:disabled) { background: #2d3037; border-color: #2d3037; }
.start:disabled { background: #b8bab6; border-color: #b8bab6; cursor: not-allowed; }
.note { font-size: 12px; color: #8a929c; margin-top: 14px; line-height: 1.45; }
.note.warn { color: #a82d24; font-weight: 700; }
#auth-panel .note { margin-top: 0; }
.permit-inquiry-form {
  display: grid;
  gap: 20px;
  margin-top: 24px;
}
.permit-inquiry-form[hidden] {
  display: none;
}
.permit-inquiry-form label {
  display: grid;
  gap: 8px;
}
.permit-inquiry-form span {
  color: #55595f;
  font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.permit-inquiry-form input,
.permit-inquiry-form textarea {
  width: 100%;
  border: 1px solid #d2d1cb;
  border-radius: 8px;
  padding: 14px 16px;
  font: inherit;
  font-size: 15px;
  color: #16181c;
  background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.permit-inquiry-form input::placeholder,
.permit-inquiry-form textarea::placeholder {
  color: #9a9e96;
}
.permit-inquiry-form input:focus,
.permit-inquiry-form textarea:focus {
  outline: 0;
  border-color: #16181c;
  box-shadow: 0 0 0 3px rgba(22,24,28,.1);
}
.permit-inquiry-form textarea {
  min-height: 220px;
  resize: vertical;
  line-height: 1.55;
}
.inquiry-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 20px;
}
.inquiry-helper {
  margin: -4px 0 0;
  color: #667483;
  font-size: 13px;
  line-height: 1.5;
}
.inquiry-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.inquiry-submit {
  margin-top: 0;
}
.inquiry-status {
  margin: 0;
  font-size: 13px;
  color: #5f6975;
}
.inquiry-status.is-success {
  color: #287a49;
  font-weight: 700;
}
.inquiry-status.is-error {
  color: #a82d24;
  font-weight: 700;
}
#inquiry-modal,
#signin-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(22, 24, 28, .5);
  z-index: 55;
}
#inquiry-modal.on,
#signin-modal.on {
  display: flex;
}
.signin-modal-card {
  width: min(440px, 100%);
  background: #fff;
  border: 1px solid rgba(22,24,28,.16);
  border-radius: 12px;
  box-shadow: 0 24px 64px rgba(20, 21, 24, .2);
  padding: 28px;
}
#signin-modal-title {
  color: #131519;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -.02em;
}
#signin-slot {
  display: flex;
  min-height: 44px;
  margin-top: 22px;
}
.inquiry-modal-card {
  width: min(980px, 100%);
  max-height: min(90vh, 960px);
  overflow: auto;
  background: #fff;
  border: 1px solid rgba(22,24,28,.16);
  border-radius: 12px;
  box-shadow: 0 24px 64px rgba(20, 21, 24, .2);
  padding: 34px 34px 30px;
}
.inquiry-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
#inquiry-modal-title {
  color: #131519;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -.03em;
}
.inquiry-modal-sub {
  margin-top: 6px;
  color: #55595f;
  font-size: 17px;
}
.hidden-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
#inquiry-modal-close,
#signin-modal-close {
  border: 1px solid rgba(22,24,28,.25);
  border-radius: 6px;
  padding: 11px 16px;
  background: transparent;
  color: #16181c;
  font-weight: 600;
}
#inquiry-modal-close:hover,
#signin-modal-close:hover { background: rgba(22,24,28,.06); }
.inquiry-submit {
  min-width: 200px;
  margin-top: 0;
  padding: 15px 24px;
}
.inquiry-status {
  max-width: 360px;
  line-height: 1.5;
}

#review { display: none; height: 100vh; }
#review.on { display: flex; }
#tracker {
  width: 310px;
  min-width: 310px;
  background: #f8f9fb;
  border-right: 1px solid #d9dee4;
  display: flex;
  flex-direction: column;
}
.trk-head {
  padding: 14px 15px 11px;
  border-bottom: 1px solid #e2e6eb;
  font-size: 13px;
  font-weight: 800;
}
#trk-count { color: #8a929c; font-weight: 700; }
#trk-list { overflow-y: auto; flex: 1; padding: 9px; }
.trk-item {
  background: #fff;
  border: 1px solid #e1e5ea;
  border-left: 4px solid #c8ced6;
  border-radius: 8px;
  padding: 9px 10px;
  margin-bottom: 8px;
  cursor: pointer;
}
.trk-item:hover { border-color: #aeb6c0; }
.trk-item.active { border-left-color: #bd352a; box-shadow: 0 0 0 2px rgba(189,53,42,.12); }
.trk-item.done,
.trk-item.confirmed { border-left-color: #287a49; }
.trk-item.skipped { border-left-color: #8f98a3; }
.trk-top { display: flex; align-items: center; gap: 7px; }
.trk-num {
  background: #bd352a;
  color: #fff;
  border-radius: 50%;
  width: 21px;
  height: 21px;
  line-height: 21px;
  text-align: center;
  font-size: 11px;
  font-weight: 800;
  flex: none;
}
.trk-item.done .trk-num,
.trk-item.confirmed .trk-num { background: #287a49; }
.trk-item.skipped .trk-num { background: #8f98a3; }
.trk-sheet {
  background: #eef1f4;
  color: #555e69;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 5px;
  max-width: 116px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.trk-state { margin-left: auto; font-size: 10px; font-weight: 800; color: #8b939c; }
.trk-text {
  font-size: 12px;
  color: #3f4650;
  margin-top: 7px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.trk-change {
  margin-top: 7px;
  padding-top: 7px;
  border-top: 1px dashed #dfe3e8;
  color: #22633d;
  font-size: 11px;
  line-height: 1.35;
}

#sidebar {
  width: 410px;
  min-width: 410px;
  background: #fff;
  border-right: 1px solid #d9dee4;
  display: flex;
  flex-direction: column;
}
#sidebar header { padding: 16px 20px 11px; border-bottom: 1px solid #eceff2; }
#sidebar h1 { font-size: 16px; margin: 0; letter-spacing: 0; }
.progress { font-size: 12px; color: #7b838d; margin-top: 4px; }
#comment-box { padding: 16px 20px; overflow-y: auto; flex: 1; }
.comment-num {
  display: inline-block;
  background: #bd352a;
  color: #fff;
  border-radius: 50%;
  width: 27px;
  height: 27px;
  line-height: 27px;
  text-align: center;
  font-weight: 800;
}
.sheet-hint {
  display: inline-block;
  margin-left: 8px;
  background: #f4e8e7;
  color: #9b2d24;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}
#comment-text { font-size: 14px; line-height: 1.55; margin: 13px 0 8px; }
#source-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
#source-meta span {
  background: #eef1f4;
  color: #57616d;
  border-radius: 6px;
  padding: 3px 7px;
  font-size: 11px;
  font-weight: 700;
}
#problem-discussion { margin: 0 0 13px; }
.architect-warning {
  margin: 0 0 10px;
  padding: 10px 12px;
  border: 1px solid #e6c3a3;
  border-radius: 8px;
  background: #fff6ed;
  color: #8a4a17;
  font-size: 12px;
  line-height: 1.5;
}
.architect-warning strong { color: #7a3d12; }
.discussion-list {
  margin: 0;
  padding-left: 19px;
  color: #444d57;
  font-size: 12px;
  line-height: 1.5;
}
.discussion-list li + li { margin-top: 6px; }
#location-list {
  margin: 0 0 13px;
  padding-left: 19px;
  color: #444d57;
  font-size: 12px;
  line-height: 1.45;
}
#location-list > li { margin-bottom: 8px; }
.page-link {
  border: 0;
  padding: 0;
  background: transparent;
  color: #9b2d24;
  font: inherit;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}
#identifier-pages { display: grid; gap: 8px; margin-bottom: 8px; }
.id-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px auto;
  gap: 8px;
  align-items: end;
  border: 1px solid #e1e5ea;
  border-radius: 8px;
  background: #fbfcfd;
  padding: 8px;
}
.id-row select { max-width: none; width: 100%; }
.id-count-label {
  margin: 0;
  font-size: 10px;
  color: #6d7680;
}
.id-count {
  display: block;
  width: 100%;
  margin-top: 3px;
  border: 1px solid #cbd1d8;
  border-radius: 6px;
  padding: 6px;
  font: inherit;
}
.id-remove {
  background: #f2e7e6;
  color: #9b2d24;
  padding: 7px 9px;
  font-size: 11px;
}
.inline-btn {
  background: #eef1f4;
  color: #303842;
  padding: 7px 10px;
  font-size: 12px;
  margin-bottom: 10px;
}
#edit-descriptions { display: grid; gap: 8px; margin-bottom: 14px; }
.edit-card {
  border: 1px solid #e1e5ea;
  border-left: 4px solid #bd352a;
  border-radius: 8px;
  background: #fbfcfd;
  padding: 9px 10px;
  color: #3f4650;
  font-size: 12px;
  line-height: 1.45;
}
.edit-card div + div { margin-top: 3px; }
.edit-card b { color: #29313a; }
.edit-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 7px;
}
.edit-meta span {
  background: #eef1f4;
  border-radius: 6px;
  color: #4f5964;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 6px;
}
.edit-desc {
  min-height: 92px;
  resize: vertical;
  background: #fff;
}
.edit-empty {
  border: 1px dashed #cbd1d8;
  border-radius: 8px;
  padding: 10px;
  color: #7d8792;
  font-size: 12px;
}
textarea {
  width: 100%;
  min-height: 190px;
  resize: vertical;
  border: 1px solid #cbd1d8;
  border-radius: 8px;
  padding: 10px;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.45;
}
textarea:disabled { background: #f5f6f8; color: #8a929c; }
.btnrow { padding: 12px 20px; border-top: 1px solid #eceff2; display: flex; gap: 10px; }
button {
  border: 0;
  border-radius: 8px;
  padding: 10px 15px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}
button:disabled { opacity: .55; cursor: not-allowed; }
.action-row { border-top: 1px solid #eceff2; }
#confirmbtn, #undobtn, #skipbtn { flex: 1; }
#confirmbtn { background: #287a49; color: #fff; }
#undobtn { background: #eef1f4; color: #303842; }
#skipbtn { background: #f2e7e6; color: #9b2d24; }

#main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
#toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: #fff;
  border-bottom: 1px solid #d9dee4;
  font-size: 13px;
}
select { max-width: 300px; border: 1px solid #cbd1d8; border-radius: 6px; padding: 5px; font-size: 13px; }
.zoombar { display: inline-flex; align-items: center; gap: 6px; }
.marknav { display: inline-flex; align-items: center; gap: 6px; color: #626b75; font-size: 12px; font-weight: 800; }
.zbtn {
  background: #eef1f4;
  color: #303842;
  border: 1px solid #d6dce3;
  border-radius: 6px;
  padding: 5px 9px;
}
.zbtn:hover { background: #e2e7ec; }
#zoomlbl { min-width: 40px; text-align: center; color: #656e79; font-size: 12px; }
#page-title {
  color: #626b75;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#costlbl { margin-left: auto; color: #22633d; font-weight: 800; font-size: 12px; }
.finishbtn {
  background: #287a49;
  color: #fff;
  border: 1px solid #22633d;
}
#viewer { flex: 1; overflow: auto; padding: 18px; }
#canvas-wrap { position: relative; display: inline-block; background: #fff; box-shadow: 0 2px 14px rgba(0,0,0,.16); }
#page-canvas { display: block; }
#mark-svg { position: absolute; inset: 0; pointer-events: none; overflow: visible; }
#mark-handles { position: absolute; inset: 0; pointer-events: none; }
.mark-move {
  position: absolute;
  border: 2px dashed rgba(189,53,42,.6);
  border-radius: 50%;
  background: rgba(189,53,42,.03);
  pointer-events: auto;
  cursor: move;
}
.mark-move:hover { background: rgba(189,53,42,.10); }
.mark-move.active { border-style: solid; background: rgba(189,53,42,.13); }
.mark-resize {
  position: absolute;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 2px solid #bd352a;
  background: #fff;
  pointer-events: auto;
  cursor: ew-resize;
}
.mark-resize.active { box-shadow: 0 0 0 4px rgba(189,53,42,.16); }

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  max-width: 420px;
  background: #28313b;
  color: #fff;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
  z-index: 50;
}
.toast.show { opacity: 1; }
#flow-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(24, 29, 35, .38);
  z-index: 55;
}
#flow-modal.on { display: flex; }
.flow-modal-card {
  width: min(520px, 100%);
  background: #fff;
  border: 1px solid #d9dee4;
  border-radius: 10px;
  box-shadow: 0 16px 54px rgba(0,0,0,.20);
  padding: 22px;
}
#flow-modal-title {
  font-size: 22px;
  font-weight: 800;
  color: #29313a;
}
#flow-modal-body {
  margin-top: 10px;
  color: #48515c;
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-line;
}
.flow-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}
#busy {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,.64);
  z-index: 60;
  color: #313942;
  font-weight: 800;
}
#busy.on { display: flex; }
.busy-card {
  width: min(440px, calc(100vw - 36px));
  background: #fff;
  border: 1px solid #dfe4ea;
  border-radius: 8px;
  padding: 18px 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,.12);
  display: grid;
  grid-template-columns: 58px 1fr auto;
  gap: 14px;
  align-items: center;
}
.house-agent {
  width: 48px;
  height: 48px;
  position: relative;
}
.house-roof {
  position: absolute;
  left: 10px;
  top: 4px;
  width: 28px;
  height: 28px;
  background: #bd352a;
  transform: rotate(45deg);
  border-radius: 3px 3px 0 3px;
}
.house-body {
  position: absolute;
  left: 8px;
  top: 19px;
  width: 32px;
  height: 24px;
  background: #fff;
  border: 3px solid #bd352a;
  border-radius: 4px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  padding: 5px;
}
.house-body span {
  background: #f2c9c5;
  border-radius: 2px;
  animation: windowPulse 1.1s ease-in-out infinite;
}
.house-body span:nth-child(2) { animation-delay: .18s; }
.house-body span:nth-child(3) { animation-delay: .36s; }
.agent-orbit {
  position: absolute;
  inset: 0;
  border: 2px solid rgba(189,53,42,.16);
  border-top-color: #bd352a;
  border-radius: 50%;
  animation: spin .9s linear infinite;
}
.busy-copy { min-width: 0; }
#busy-label { font-size: 15px; color: #252d36; }
#busy-detail {
  margin-top: 3px;
  color: #69737e;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.progress-track {
  grid-column: 1 / -1;
  height: 9px;
  background: #edf0f3;
  border-radius: 999px;
  overflow: hidden;
}
#busy-progress {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #bd352a, #287a49);
  border-radius: inherit;
  transition: width .25s ease;
}
#busy.indeterminate #busy-progress {
  width: 42%;
  animation: progressSweep 1.1s ease-in-out infinite;
}
#busy-percent {
  color: #287a49;
  font-size: 12px;
  font-weight: 900;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes windowPulse {
  0%, 100% { opacity: .45; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-1px); }
}
@keyframes progressSweep {
  0% { transform: translateX(-105%); }
  100% { transform: translateX(245%); }
}

@media (max-width: 980px) {
  body { overflow: auto; height: auto; }
  .topbar-inner {
    padding: 12px 20px;
    flex-wrap: wrap;
  }
  .auth-rail {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
  }
  .landing-shell {
    padding-left: 20px;
    padding-right: 20px;
  }
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .hero-visual {
    justify-content: flex-start;
  }
  .ata-crane-widget {
    width: min(360px, 100%);
  }
  .stats-row {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .stat + .stat {
    border-left: 0;
    padding-left: 0;
    border-top: 1px solid rgba(22,24,28,.14);
    padding-top: 18px;
  }
  #review.on { flex-direction: column; height: auto; min-height: 100vh; }
  #tracker, #sidebar { width: 100%; min-width: 0; max-height: none; }
  #tracker { height: 260px; }
  #main { min-height: 70vh; }
  .inquiry-grid { grid-template-columns: 1fr; }
}
