*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
}

img,
svg {
  max-width: 100%;
  display: block;
}

a {
  color: var(--blue);
}

a:hover {
  color: var(--blue-deep);
}

:focus-visible {
  outline: 3px solid var(--terracotta);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 20;
  padding: 0.5rem 0.85rem;
  background: var(--ink);
  color: var(--cream);
  text-decoration: none;
}

.skip-link:focus {
  top: 1rem;
}

.wrap {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.site-header {
  border-bottom: var(--line-width) solid var(--line);
  background: var(--paper);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
  flex-wrap: wrap;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: inherit;
  text-decoration: none;
}

.wordmark-mark {
  width: 1.7rem;
  height: 1.7rem;
  flex: none;
}

.wordmark-name {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.15rem;
}

.site-nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--blue);
}

.hero {
  padding: 4.5rem 0 4.25rem;
  border-bottom: var(--line-width) solid var(--line);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
}

.color-rule {
  display: flex;
  height: 10px;
  max-width: 13rem;
  gap: 3px;
  background: var(--ink);
  margin-bottom: 1.5rem;
}

.color-rule span {
  display: block;
}

.color-rule .b {
  width: 38%;
  background: var(--blue);
}

.color-rule .y {
  width: 16%;
  background: var(--yellow);
}

.color-rule .c {
  flex: 1;
  background: var(--paper);
}

.color-rule .t {
  width: 22%;
  background: var(--terracotta);
}

.eyebrow {
  margin: 0 0 0.75rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.35rem, 7vw, 4.15rem);
  font-weight: 500;
  font-optical-sizing: auto;
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.lede {
  margin: 1.25rem 0 0;
  max-width: 36rem;
  font-size: 1.125rem;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.85rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.85rem;
  padding: 0.55rem 1.15rem;
  border: var(--line-width) solid var(--line);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.98rem;
  overflow-wrap: anywhere;
}

.btn-primary {
  background: var(--blue);
  color: var(--paper);
  border-color: var(--blue-deep);
}

.btn-primary:hover {
  background: var(--blue-deep);
  color: var(--paper);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
}

.btn-ghost:hover {
  background: var(--paper);
  color: var(--ink);
}

.hero-note {
  margin: 1.25rem 0 1.75rem;
  font-size: 0.92rem;
  color: var(--muted);
}

.hero-email-link {
  color: var(--ink);
  font-weight: 600;
  text-decoration: underline;
}

.hero-art {
  width: 100%;
  max-width: 24rem;
  margin-inline: 0;
  aspect-ratio: 3.5 / 2;
}

/* Work Request Form */
.hero-form-container {
  width: 100%;
}

.hero-form-card {
  background: var(--paper);
  border: var(--line-width) solid var(--line);
  padding: 1.5rem;
}

.hero-form-card .form-header {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.hero-form-card .form-header h2 {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.5vw, 1.75rem);
  font-weight: 500;
  margin: 0.25rem 0 0.25rem;
  letter-spacing: -0.02em;
}

.hero-form-card .form-subtitle {
  font-size: 0.88rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.4;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-bottom: 0.85rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
}

@media (min-width: 540px) {
  .form-row {
    grid-template-columns: 1fr 1fr;
  }
}

.form-group label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
}

.req-star {
  color: var(--terra);
  font-weight: 700;
}

.opt-label {
  font-size: 0.75rem;
  font-weight: 400;
  text-transform: none;
  color: var(--muted);
}

.form-control {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: var(--line-width) solid var(--line);
  background: var(--white);
  font-family: var(--font-body);
  font-size: 0.92rem;
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  box-sizing: border-box;
}

.form-control:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(46, 76, 114, 0.18);
}

.form-control::placeholder {
  color: #888;
  font-size: 0.85rem;
}

textarea.form-control {
  resize: vertical;
  min-height: 4.85rem;
  line-height: 1.4;
}

/* File Upload Zone */
.file-drop-zone {
  position: relative;
  border: var(--line-width) dashed var(--line);
  background: var(--white);
  padding: 0.85rem;
  text-align: center;
  transition: background-color 0.15s ease, border-color 0.15s ease;
  cursor: pointer;
}

.file-drop-zone:hover,
.file-drop-zone.drag-over {
  background: #fdfbf7;
  border-color: var(--blue);
}

.file-input-hidden {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.file-drop-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  cursor: pointer;
  pointer-events: none;
}

.file-drop-icon {
  font-size: 1.35rem;
}

.file-drop-text {
  font-size: 0.85rem;
  color: var(--ink);
}

.file-drop-hint {
  font-size: 0.74rem;
  color: var(--muted);
}

.file-preview-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.file-preview-item {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--white);
  border: 1px solid var(--line);
  padding: 0.3rem 0.5rem 0.3rem 0.3rem;
  font-size: 0.8rem;
  max-width: 100%;
}

.file-preview-thumb {
  width: 2.25rem;
  height: 2.25rem;
  object-fit: cover;
  border: 1px solid var(--line);
  background: var(--paper);
}

.file-preview-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.file-preview-name {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 8.5rem;
}

.file-preview-size {
  font-size: 0.72rem;
  color: var(--muted);
}

.file-preview-remove {
  background: transparent;
  border: none;
  font-size: 1.15rem;
  line-height: 1;
  color: var(--terra);
  cursor: pointer;
  padding: 0 0.25rem;
  margin-left: auto;
}

.file-preview-remove:hover {
  font-weight: 700;
  color: #8a2412;
}

.btn-block {
  width: 100%;
  cursor: pointer;
  margin-top: 0.35rem;
  transition: background-color 0.15s ease;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.form-status {
  padding: 0.75rem 1rem;
  border: var(--line-width) solid var(--line);
  font-size: 0.88rem;
  line-height: 1.45;
  margin-bottom: 0.85rem;
}

.form-status-success {
  background: #eaf3ea;
  border-color: #2e6930;
  color: #1a4d1c;
  font-weight: 500;
}

.form-status-error {
  background: #fdf0ed;
  border-color: var(--terra);
  color: #8a2412;
  font-weight: 600;
}

/* Active Request Card for Returning Visitors */
.active-request-card {
  background: var(--paper);
  border: var(--line-width) solid var(--line);
  padding: 1.5rem;
}

.client-requests-list {
  max-height: 520px;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.client-request-item {
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.client-request-item:hover {
  border-color: var(--blue);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.active-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.active-card-title-group h2 {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.3vw, 1.65rem);
  font-weight: 500;
  margin: 0.25rem 0 0.15rem;
  letter-spacing: -0.02em;
}

.active-tracking-id {
  font-family: monospace;
  font-size: 0.8rem;
  color: var(--muted);
  word-break: break-all;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.65rem;
  border: var(--line-width) solid var(--line);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.badge-in-queue { background: var(--yellow); color: var(--ink); }
.badge-being-reviewed { background: var(--blue); color: var(--paper); }
.badge-in-progress { background: var(--terra); color: var(--paper); }
.badge-completed { background: #2e6930; color: #ffffff; }
.badge-closed { background: #3b3b3b; color: #ffffff; }

/* Closure Callout Box */
.active-closure-box {
  background: #fef0ec;
  border: var(--line-width) solid var(--terra);
  padding: 0.85rem 1rem;
  margin: 0.75rem 0 1rem;
}

.active-closure-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #8a2412;
  margin: 0 0 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.active-closure-text {
  margin: 0;
  font-size: 0.84rem;
  color: var(--ink);
  line-height: 1.4;
}

/* Timestamps Grid */
.active-timestamps-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.4rem;
  background: var(--white);
  border: 1px solid var(--line);
  padding: 0.75rem;
  margin-bottom: 0.85rem;
}

@media (min-width: 500px) {
  .active-timestamps-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.active-ts-item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.active-ts-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.active-ts-val {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ink);
}

/* Request Summary Details */
.active-details-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: var(--white);
  border: 1px solid var(--line);
  padding: 0.85rem;
  margin-bottom: 1.15rem;
  font-size: 0.86rem;
  line-height: 1.45;
}

.active-detail-row strong {
  color: var(--ink);
  font-weight: 600;
}

/* Action Buttons */
.active-actions-row {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.btn-danger-outline {
  border-color: var(--terra);
  color: #8a2412;
}

.btn-danger-outline:hover {
  background: #fdf0ed;
  border-color: #8a2412;
  color: #8a2412;
}

.btn-link-action {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 0.82rem;
  text-decoration: underline;
  cursor: pointer;
  padding: 0.25rem 0;
  text-align: center;
}

.btn-link-action:hover {
  color: var(--ink);
}

/* Edit Request Mode Banner */
.edit-banner {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
  background: #eef3f8;
  border: var(--line-width) solid var(--blue);
  padding: 0.7rem 0.85rem;
  margin-bottom: 1rem;
}

.edit-banner[hidden] {
  display: none !important;
}

.edit-banner-info {
  display: flex;
  align-items: center;
  gap: 0.55rem 0.75rem;
  flex-wrap: wrap;
  min-width: 0;
}

.edit-badge {
  display: inline-block;
  flex-shrink: 0;
  white-space: nowrap;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--blue);
  color: var(--paper);
  padding: 0.28rem 0.5rem;
}

.edit-id {
  font-family: monospace;
  font-size: 0.8rem;
  color: var(--ink);
  overflow-wrap: anywhere;
  word-break: break-all;
}

.edit-banner-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.75rem;
}

.btn-cancel-edit {
  background: transparent;
  border: 1px solid var(--line);
  padding: 0.4rem 0.75rem;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--ink);
  min-height: 2.5rem;
  flex: 1 1 auto;
  min-width: 10.5rem;
}

.btn-cancel-edit:hover {
  background: var(--white);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}

.section {
  padding: 4.25rem 0;
  border-bottom: var(--line-width) solid var(--line);
}

.section h2 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 4vw, 2.55rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.section-intro {
  margin: 0 0 2.25rem;
  max-width: 36rem;
  color: var(--muted);
}

.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.service {
  background: var(--paper);
  border: var(--line-width) solid var(--line);
  padding: 1.15rem 1.2rem 1.3rem;
}

.service-swatch {
  width: 2.35rem;
  height: 0.55rem;
  margin-bottom: 0.85rem;
  border: 2px solid var(--line);
}

.swatch-blue { background: var(--blue); }
.swatch-red { background: var(--terracotta); }
.swatch-yellow { background: var(--yellow); }
.swatch-cream {
  background: var(--cream);
}

.service h3 {
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
  font-size: 1.28rem;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.service p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.similar-note {
  margin: 1.5rem 0 0;
  padding: 1rem 1.15rem;
  border-left: 8px solid var(--yellow);
  background: var(--paper);
}

.similar-note p {
  margin: 0;
  color: var(--muted);
}

.how-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.step {
  padding: 0.2rem 0 0.2rem 0.2rem;
}

.step-num {
  display: inline-block;
  margin-bottom: 0.45rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue);
}

.step h3 {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 500;
}

.step p {
  margin: 0;
  color: var(--muted);
}

.about-split {
  display: grid;
  gap: 1.5rem;
}

.about-split p {
  margin: 0;
  max-width: 38rem;
}

.contact-panel {
  display: grid;
  gap: 1.5rem;
}

.contact-list {
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}

.contact-list span {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.contact-list a,
.contact-list strong {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}

.contact-list a:hover {
  color: var(--blue);
}

.site-footer {
  padding: 1.35rem 0 1.7rem;
  background: var(--paper);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.footer-inner a {
  color: inherit;
}

@media (min-width: 640px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .how-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.75rem;
  }
}

@media (min-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr 1.08fr;
    gap: 3.5rem;
    align-items: start;
  }

  .hero-content {
    display: flex;
    flex-direction: column;
  }

  .hero-art {
    max-width: 22rem;
  }

  .services-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .wrap {
    width: min(100% - 3.5rem, var(--max));
  }

  .hero {
    padding: 5.5rem 0 5rem;
  }
}

/* ==========================================================================
   Specialist & Contractor Portal
   ========================================================================== */

.pro-banner-callout {
  background: var(--paper);
  border: var(--line-width) solid var(--line);
  padding: 1.5rem 1.75rem;
  margin: 3.5rem 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.pro-banner-content h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  margin: 0.35rem 0 0.25rem;
  font-weight: 500;
}

.pro-banner-content p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--muted);
}

.pro-hero {
  padding: 4.5rem 0 3.5rem;
  border-bottom: var(--line-width) solid var(--line);
  background: var(--paper);
}

.pro-hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: start;
}

@media (min-width: 900px) {
  .pro-hero-grid {
    grid-template-columns: 1.15fr 0.85fr;
  }
}

.pro-pitch-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.35rem 0.75rem;
  margin-bottom: 1.25rem;
}

.pro-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4.5vw, 3.25rem);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin: 0 0 1.25rem;
}

.pro-hero-lede {
  font-size: 1.1rem;
  line-height: 1.55;
  color: var(--ink);
  margin-bottom: 1.75rem;
}

.pro-highlights-list {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.pro-highlights-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.95rem;
  line-height: 1.45;
}

.pro-highlights-list li .check-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  background: var(--blue);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

/* Trade Specialty Cards */
.specialty-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin: 2.25rem 0 0;
}

@media (min-width: 768px) {
  .specialty-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.specialty-card {
  background: var(--white);
  border: var(--line-width) solid var(--line);
  padding: 1.65rem 1.45rem;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.specialty-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.specialty-card-tag {
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.55rem;
  border: 1px solid var(--line);
  margin-bottom: 0.85rem;
}

.tag-solenoid { background: var(--yellow); color: var(--ink); }
.tag-fence { background: var(--terra); color: #fff; }
.tag-paint { background: var(--blue); color: #fff; }

.specialty-card h3 {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 500;
  margin: 0 0 0.65rem;
  letter-spacing: -0.02em;
}

.specialty-card-desc {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.45;
  margin-bottom: 1.15rem;
}

.specialty-tasks {
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem;
  font-size: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  border-top: 1px solid #eee;
  padding-top: 0.85rem;
}

.specialty-tasks li {
  position: relative;
  padding-left: 1.15rem;
  line-height: 1.35;
}

.specialty-tasks li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--terra);
  font-weight: 700;
}

.specialty-ai-box {
  margin-top: auto;
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 0.75rem 0.85rem;
  font-size: 0.82rem;
  line-height: 1.4;
}

.specialty-ai-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--blue);
  margin-bottom: 0.2rem;
}

/* AI Matching Architecture Steps */
.ai-steps-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-top: 2rem;
}

@media (min-width: 680px) {
  .ai-steps-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 992px) {
  .ai-steps-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.ai-step-card {
  background: var(--white);
  border: var(--line-width) solid var(--line);
  padding: 1.45rem 1.25rem;
}

.ai-step-num {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--blue);
  line-height: 1;
  margin-bottom: 0.65rem;
}

.ai-step-card h4 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
}

.ai-step-card p {
  font-size: 0.86rem;
  color: var(--muted);
  line-height: 1.45;
  margin: 0;
}

/* Checkbox Cards in Registration Form */
.specialty-checkbox-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
  margin: 0.35rem 0 0.85rem;
}

@media (min-width: 540px) {
  .specialty-checkbox-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.checkbox-card {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  border: 1px solid var(--line);
  background: var(--white);
  padding: 0.75rem 0.85rem;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
  user-select: none;
}

.checkbox-card:hover {
  background: #fbf9f4;
  border-color: var(--blue);
}

.checkbox-card input[type="checkbox"] {
  margin-top: 0.2rem;
  accent-color: var(--blue);
  width: 1.05rem;
  height: 1.05rem;
  cursor: pointer;
}

.checkbox-card-content {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.checkbox-card-title {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink);
}

.checkbox-card-hint {
  font-size: 0.74rem;
  color: var(--muted);
  line-height: 1.3;
}

/* Contractor Success Card */
.pro-success-card {
  background: var(--paper);
  border: var(--line-width) solid var(--line);
  padding: 2rem;
  margin: 1.5rem 0;
}

.pro-success-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

.pro-success-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  background: #2e6930;
  color: #fff;
  font-size: 1.35rem;
  font-weight: 700;
  border-radius: 50%;
  flex-shrink: 0;
}

.pro-success-header h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: #1a4d1c;
}

/* Specialist Portal Tabs & Dashboard */
.pro-tabs-nav {
  display: flex;
  gap: 0.5rem;
  border-bottom: var(--line-width) solid var(--line);
  margin-bottom: 2rem;
  overflow-x: auto;
}

.pro-tab-btn {
  background: transparent;
  border: var(--line-width) solid transparent;
  border-bottom: none;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 700;
  padding: 0.75rem 1.25rem;
  cursor: pointer;
  color: var(--muted);
  white-space: nowrap;
  transition: all 0.15s ease;
}

.pro-tab-btn:hover {
  color: var(--ink);
}

.pro-tab-btn.active {
  background: var(--paper);
  border-color: var(--line);
  color: var(--ink);
  position: relative;
  top: var(--line-width);
  border-top: 3px solid var(--blue);
}

/* Specialist Dashboard Profile Banner */
.pro-profile-card {
  background: var(--paper);
  border: var(--line-width) solid var(--line);
  padding: 1.5rem 1.75rem;
  margin-bottom: 2rem;
}

.pro-profile-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 1rem;
}

.pro-profile-info h3 {
  font-family: var(--font-display);
  font-size: 1.45rem;
  margin: 0.25rem 0 0.2rem;
}

.pro-profile-sub {
  font-size: 0.88rem;
  color: var(--muted);
  margin: 0;
}

.pro-profile-specs {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  align-items: center;
}

.pro-ai-token-panel {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px dashed var(--line);
}

.pro-ai-token-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.pro-ai-token-title {
  font-weight: 700;
  color: var(--ink);
  font-size: 0.92rem;
}

.pro-ai-token-copy {
  margin: 0.2rem 0 0;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.4;
  max-width: 42rem;
}

.pro-ai-token-status {
  font-size: 0.84rem;
  color: var(--ink);
  margin-top: 0.55rem;
}

.pro-ai-token-secret-box {
  margin-top: 0.7rem;
  background: var(--white);
  border: 1px dashed #0b57d0;
  padding: 0.75rem 0.85rem;
}

.pro-ai-token-secret-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #0b57d0;
  margin-bottom: 0.35rem;
}

.pro-ai-token-secret {
  display: block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  word-break: break-all;
  color: var(--ink);
}

.pro-ai-token-secret-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.pro-ai-token-copy-status,
.pro-ai-token-action-status {
  font-size: 0.78rem;
  color: var(--muted);
}

.pro-ai-token-curl {
  margin: 0.55rem 0 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.72rem;
  white-space: pre-wrap;
  word-break: break-all;
  color: var(--muted);
  background: #f8f9fa;
  padding: 0.45rem 0.55rem;
}

.pro-ai-token-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}

@media (max-width: 640px) {
  .pro-ai-token-header {
    flex-direction: column;
  }
}

.pro-settings-panel {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px dashed var(--line);
}
.pro-settings-row {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  font-size: 0.84rem;
  margin: 0.5rem 0 0.75rem;
  cursor: pointer;
}
.pro-settings-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}
.pro-settings-webhook {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}
.pro-settings-webhook .form-control {
  flex: 1 1 16rem;
}
.quote-panel,
.pro-thread,
.pro-quote-summary {
  margin-top: 0.85rem;
  padding: 0.75rem 0.85rem;
  background: var(--white);
  border: 1px solid var(--line);
}
.status-extra-card {
  margin-top: 1.25rem;
  padding: 1.1rem 1.2rem;
  background: var(--white);
  border: var(--line-width) solid var(--line);
}
.status-extra-title {
  font-size: 1.05rem;
  margin: 0 0 0.4rem;
  font-family: var(--font-display, inherit);
}
.status-extra-copy,
.status-extra-meta {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0 0 0.75rem;
}
.status-extra-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 0.75rem 0;
}
.status-msg {
  border-left: 3px solid var(--line);
  padding: 0.35rem 0.65rem;
  margin-bottom: 0.45rem;
  background: #faf8f5;
}
.status-msg-specialist { border-left-color: var(--blue); }
.status-msg-homeowner { border-left-color: var(--terra); }
.status-msg-system { border-left-color: var(--yellow); font-size: 0.85rem; }
.status-msg-meta {
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 700;
}
.status-msg-form,
.pro-thread-compose {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-top: 0.65rem;
}
.status-stars {
  display: flex;
  gap: 0.2rem;
  margin: 0.35rem 0 0.65rem;
}
.status-star {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #c9a227;
  line-height: 1;
}
.status-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
  gap: 0.65rem;
}
.status-photo-grid img {
  width: 100%;
  height: 8rem;
  object-fit: cover;
  border: 1px solid var(--line);
}
.status-photo-grid figcaption {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 0.2rem;
}
.status-extra-sub {
  font-size: 0.82rem;
  margin: 0.75rem 0 0.4rem;
}

/* Dashboard Filter Bar */
.pro-filters-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.pro-filter-tabs {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.pro-filter-tab {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.15s ease;
}

.pro-filter-tab:hover {
  background: #fdfbf7;
  border-color: var(--blue);
}

.pro-filter-tab.active {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.filter-badge-count {
  font-size: 0.72rem;
  padding: 0.1rem 0.35rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.1);
}

.pro-filter-tab.active .filter-badge-count {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}

/* Request Cards for Contractor View */
.pro-requests-feed {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.pro-req-card {
  background: var(--white);
  border: var(--line-width) solid var(--line);
  padding: 1.5rem 1.65rem;
  transition: box-shadow 0.15s ease;
}

.pro-req-card:hover {
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}

.pro-req-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
}

.pro-req-id-group {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.pro-req-id {
  font-family: monospace;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink);
}

.pro-req-match-pill {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.5rem;
  border: 1px solid var(--line);
}

.pro-req-coordination {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  background: #fdfbf7;
  border: 1px solid var(--line);
  padding: 0.95rem 1.15rem;
  margin: 0.85rem 0 1rem;
}

@media (min-width: 600px) {
  .pro-req-coordination {
    grid-template-columns: 1.2fr 1fr;
  }
}

.coordination-item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  font-size: 0.88rem;
}

.coordination-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.coordination-val a {
  color: var(--blue);
  font-weight: 600;
  text-decoration: none;
}

.coordination-val a:hover {
  text-decoration: underline;
}

.pro-req-scope {
  font-size: 0.94rem;
  line-height: 1.5;
  color: var(--ink);
  margin-bottom: 1rem;
  background: var(--white);
  padding: 0.75rem 0.9rem;
  border-left: 3px solid var(--line);
}

.pro-req-closure-box {
  background: #fef0ec;
  border: var(--line-width) solid var(--terra);
  padding: 0.85rem 1rem;
  margin: 0.75rem 0 1rem;
}

.pro-req-actions-bar {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  align-items: center;
  padding-top: 0.85rem;
  border-top: 1px solid #eee;
}

/* Denial Reason Panel */
.denial-panel {
  background: #fdf3f0;
  border: var(--line-width) solid var(--terra);
  padding: 1.15rem 1.25rem;
  margin-top: 0.85rem;
}

.denial-presets {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin: 0.5rem 0 0.75rem;
}

.denial-preset-chip {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 0.25rem 0.55rem;
  font-size: 0.74rem;
  cursor: pointer;
  font-family: var(--font-body);
  transition: all 0.15s ease;
}

.denial-preset-chip:hover {
  background: #fbeae5;
  border-color: var(--terra);
}

/* Location Selection Pills in Registration */
.locations-checkbox-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.35rem;
}

.location-pill-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--line);
  background: var(--white);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  user-select: none;
  transition: all 0.15s ease;
}

.location-pill-checkbox:hover {
  border-color: var(--blue);
  background: #fdfbf7;
}

.location-pill-checkbox input[type="checkbox"] {
  accent-color: var(--blue);
  width: 1rem;
  height: 1rem;
  cursor: pointer;
}

.location-pill-checkbox:has(input:checked) {
  background: #f0f6fc;
  border-color: var(--blue);
  color: var(--blue);
}

/* AI Estimate & Scope Guess Box in Contractor Cards */
.pro-req-ai-guess {
  background: #f4f9fd;
  border: 1px solid #b6d4fe;
  border-left: 4px solid var(--blue);
  padding: 0.85rem 1rem;
  margin: 0.75rem 0 1rem;
}

.ai-guess-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.4rem;
}

.ai-guess-badge {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #0b57d0;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.ai-guess-hours {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink);
  background: #e8f4fd;
  padding: 0.15rem 0.5rem;
  border: 1px solid #b6d4fe;
}

.ai-guess-price-box {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 0.35rem 0;
  background: #ffffff;
  padding: 0.45rem 0.75rem;
  border: 1px solid #d0e2ff;
}

.ai-guess-price-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
}

.ai-guess-price-val {
  font-size: 1.15rem;
  font-weight: 700;
  color: #137333;
}

.ai-guess-lump-sum {
  font-size: 0.83rem;
  color: #493000;
  background: #fef8e7;
  border: 1px solid #ffe7a3;
  padding: 0.35rem 0.65rem;
  margin-top: 0.35rem;
  line-height: 1.35;
}

.ai-guess-rationale {
  font-size: 0.83rem;
  color: var(--ink);
  line-height: 1.4;
  margin-top: 0.35rem;
}

.ai-guess-hardware {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 0.25rem;
}

/* Pricing Model Selection in Registration */
.pricing-model-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.6rem;
  margin: 0.5rem 0 1rem;
}

@media (min-width: 650px) {
  .pricing-model-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.pricing-model-card {
  display: flex;
  flex-direction: column;
  padding: 0.85rem;
  border: 1px solid var(--line);
  background: var(--white);
  cursor: pointer;
  transition: all 0.15s ease;
}

.pricing-model-card:hover {
  border-color: var(--blue);
  background: #f8fbff;
}

.pricing-model-card:has(input[type="radio"]:checked) {
  border-color: var(--blue);
  background: #f0f6fc;
}

.pricing-card-title {
  font-weight: 700;
  font-size: 0.88rem;
  margin-bottom: 0.2rem;
  color: var(--ink);
}

.pricing-card-desc {
  font-size: 0.77rem;
  color: var(--muted);
  line-height: 1.35;
}

@media print {
  .site-header,
  .hero-actions,
  .skip-link {
    display: none;
  }

  body {
    background: white;
  }

  .hero,
  .section {
    border-bottom: 1px solid #ccc;
    padding: 1.25rem 0;
    break-inside: avoid;
  }

  a[href^="tel"],
  a[href^="mailto"] {
    color: inherit;
    text-decoration: none;
  }
}

#cg-toast-host {
  position: fixed;
  z-index: 4000;
  right: 1rem;
  bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  max-width: min(22rem, calc(100vw - 2rem));
  pointer-events: none;
}
.cg-toast {
  pointer-events: auto;
  background: var(--paper, #faf6ee);
  border: var(--line-width, 2px) solid var(--line, #1b1b1b);
  box-shadow: 4px 4px 0 var(--ink, #1b1b1b);
  padding: 0.75rem 2rem 0.85rem 0.9rem;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  animation: cg-toast-in 0.2s ease-out;
}
.cg-toast-out {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.cg-toast-title {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--ink);
}
.cg-toast-body {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 0.2rem;
  line-height: 1.4;
}
.cg-toast-timer {
  margin-top: 0.55rem;
}
.cg-toast-timer-label {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);
  margin-bottom: 0.3rem;
}
.cg-toast-timer-count {
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.cg-toast-timer-bar {
  display: block;
  height: 3px;
  width: 100%;
  background: var(--blue, #2e4c72);
  transform-origin: left center;
  transform: scaleX(1);
  will-change: transform;
}
.cg-toast-paused .cg-toast-timer-label::after {
  content: " (paused)";
}
.cg-toast-close {
  position: absolute;
  top: 0.25rem;
  right: 0.35rem;
  border: none;
  background: none;
  font-size: 1.1rem;
  cursor: pointer;
  color: var(--muted);
  line-height: 1;
}
@keyframes cg-toast-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.cg-notify-enable {
  margin-top: 0.85rem;
  margin-bottom: 0.35rem;
}

.hero-form-card .cg-notify-enable {
  display: flex;
  width: 100%;
  margin: 0.85rem 0 1.15rem;
}

@media (max-width: 640px) {
  .edit-banner {
    flex-direction: column;
    align-items: stretch;
    gap: 0.85rem;
  }

  .edit-banner-info {
    flex: 1 1 auto;
    width: 100%;
    gap: 0.55rem;
  }

  .edit-banner-actions {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 0.7rem;
  }

  .edit-banner-actions .btn-cancel-edit {
    flex: none;
    width: 100%;
    min-width: 0;
    min-height: 2.6rem;
    height: auto;
    text-align: center;
  }

  .btn-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .btn-row .btn {
    width: 100%;
  }

  .status-wrap .status-actions,
  .status-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .status-wrap .status-actions .btn,
  .status-actions .btn {
    width: 100%;
  }

  .status-extra-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 0.7rem;
  }

  .status-extra-actions .btn {
    width: 100%;
  }

  .pro-settings-panel .cg-notify-enable {
    width: 100%;
    margin-top: 1rem;
  }

  .pro-req-actions-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .pro-req-actions-bar .btn {
    width: 100%;
  }
}
