:root {
  --bg: #f8fafc;
  --fg: #1e293b;
  --muted: #64748b;
  --primary: #0f766e;
  --primary-fg: #fff;
  --primary-hover: #0d5e59;
  --secondary: #334155;
  --accent: #0ea5e9;
  --accent-hover: #0284c7;
  --err: #dc2626;
  --success: #16a34a;
  --warning: #ca8a04;
  --card: #ffffff;
  --border: #e2e8f0;
  --border-hover: #cbd5e1;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --radius: 12px;
  --radius-md: 16px;
  --transition: all 0.2s ease;
  --font-sans: 'Tajawal', 'Segoe UI', system-ui, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.7;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.brand {
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  font-size: 1.3rem;
  letter-spacing: -0.5px;
  display: inline-flex;
  align-items: center;
}

.brand-logo {
  height: 56px;
  width: auto;
  display: block;
}

/* Site footer */
.site-footer {
  margin-top: 48px;
  background: var(--surface-2, #f8fafc);
  border-top: 1px solid var(--border, #e2e8f0);
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 24px 16px;
  display: grid;
  grid-template-columns: 1.4fr 2fr;
  gap: 24px;
}
@media (max-width: 720px) {
  .footer-inner { grid-template-columns: 1fr; }
}
.foot-brand .foot-logo { height: 44px; width: auto; display: block; margin-bottom: 8px; }
.foot-brand p { margin: 0; line-height: 1.6; }
.foot-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.foot-nav h4 {
  margin: 0 0 8px;
  font-size: 0.95rem;
  color: var(--text, #0f172a);
  letter-spacing: 0.3px;
}
.foot-nav a {
  display: block;
  padding: 4px 0;
  color: var(--text-muted, #475569);
  text-decoration: none;
  font-size: 0.92rem;
}
.foot-nav a:hover { color: var(--primary, #0d9488); text-decoration: underline; }
.foot-bottom {
  border-top: 1px solid var(--border, #e2e8f0);
  padding: 12px 24px;
  text-align: center;
  color: var(--muted, #64748b);
  font-size: 0.82rem;
  max-width: 1100px;
  margin: 0 auto;
}

/* Terms-agreement checkbox on signup forms */
.agree {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin: 12px 0;
  font-size: 0.92rem;
  line-height: 1.5;
}
.agree input { margin-top: 4px; flex-shrink: 0; }
.agree a { color: var(--primary, #0d9488); }

nav {
  display: flex;
  gap: 16px;
  align-items: center;
}

nav a {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--fg);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: var(--radius);
  transition: var(--transition);
}

nav a:hover {
  background: rgba(15, 118, 110, 0.08);
  color: var(--primary);
}

.who {
  color: var(--muted);
  font-size: 0.95rem;
}

.container {
  max-width: 720px;
  margin: 32px auto;
  padding: 0 20px;
  width: 100%;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px;
  box-shadow: var(--shadow);
  transition: var(--transition);
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

.card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border-hover);
}

h1 {
  margin-top: 0;
  margin-bottom: 24px;
  font-weight: 700;
  color: var(--fg);
  font-size: 1.8rem;
}

h2 {
  margin-top: 0;
  margin-bottom: 16px;
  font-weight: 600;
  color: var(--fg);
  font-size: 1.5rem;
}

.muted {
  color: var(--muted);
}

.err {
  color: var(--err);
  font-size: 0.9rem;
  font-weight: 500;
}

.success {
  color: var(--success);
  font-size: 0.9rem;
  font-weight: 500;
}

.warning {
  color: var(--warning);
  font-size: 0.9rem;
  font-weight: 500;
}

.account-status-banner {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 16px 0;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--warning);
  background: rgba(245, 158, 11, 0.08);
  font-size: 0.95rem;
  line-height: 1.5;
}

.account-status-banner strong {
  color: var(--warning);
  font-size: 1rem;
}

.account-status-banner--blocked {
  border-color: var(--err);
  background: rgba(239, 68, 68, 0.08);
}

.account-status-banner--blocked strong {
  color: var(--err);
}

.demo-users-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  margin-top: 8px;
}

.demo-users-table th,
.demo-users-table td {
  padding: 6px 8px;
  text-align: right;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.demo-users-table th {
  background: #f8fafc;
  font-weight: 600;
  color: var(--muted, #475569);
  font-size: 0.8rem;
}

.demo-users-table tbody tr:hover {
  background: #fafafa;
}

.demo-users-table td[dir="ltr"] {
  font-variant-numeric: tabular-nums;
  unicode-bidi: embed;
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.4;
  border: 1px solid transparent;
}

.badge-ok {
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
  border-color: rgba(16, 185, 129, 0.4);
}

.badge-warn {
  background: rgba(245, 158, 11, 0.12);
  color: #b45309;
  border-color: rgba(245, 158, 11, 0.4);
}

.badge-bad {
  background: rgba(239, 68, 68, 0.12);
  color: #b91c1c;
  border-color: rgba(239, 68, 68, 0.4);
}

.badge-muted {
  background: #f1f5f9;
  color: #475569;
  border-color: #e2e8f0;
}

/* Notification bell + unread badge. The badge is a tiny dot counter that
   overlays the icon and is hidden when there are no unread items. */
.nav-bell {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.nav-bell-badge {
  display: inline-block;
  min-width: 18px;
  padding: 0 5px;
  margin-inline-start: 4px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  box-shadow: 0 0 0 2px var(--card);
}

/* Notification list rows */
.notif-list { list-style: none; padding: 0; margin: 0; }
.notif-item {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  margin-bottom: 8px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.notif-item--unread {
  background: #f0f9ff;
  border-color: #bae6fd;
}
.notif-item__icon {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(8, 145, 178, 0.12);
  color: #0e7490;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.notif-item__body { flex: 1 1 auto; min-width: 0; }
.notif-item__title { font-weight: 600; margin: 0 0 2px; }
.notif-item__text { color: var(--fg-muted); font-size: 0.92rem; margin: 0; }
.notif-item__time { color: var(--fg-muted); font-size: 0.78rem; margin-top: 4px; }
.notif-item__link { font-size: 0.85rem; margin-top: 4px; display: inline-block; }

label {
  display: block;
  margin: 16px 0 8px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--fg);
}

input[type="tel"],
input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
textarea,
select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: inherit;
  background: var(--card);
  transition: var(--transition);
}

input[type="tel"]:focus,
input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.15);
}

textarea {
  min-height: 100px;
  resize: vertical;
}

.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
  border: 0;
  cursor: pointer;
  font-size: 1rem;
  transition: var(--transition);
  font-family: inherit;
}

.btn-primary {
  background: var(--primary);
  color: var(--primary-fg);
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-ghost {
  background: var(--card);
  color: var(--primary);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  background: rgba(15, 118, 110, 0.08);
  border-color: var(--primary);
}

.btn-ghost:active {
  transform: scale(0.98);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  background: rgba(15, 118, 110, 0.08);
}

.hint {
  margin-top: 20px;
  color: var(--muted);
  font-size: 0.9rem;
}

.hint ul {
  margin-top: 8px;
  padding-inline-start: 24px;
}

.details {
  margin-top: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  background: #f8fafc;
}

.details summary {
  font-weight: 600;
  color: var(--fg);
  cursor: pointer;
  list-style: none;
}

.details summary::-webkit-details-marker {
  display: none;
}

.details summary::after {
  content: "▾";
  float: right;
  color: var(--muted);
  transition: transform 0.2s ease;
}

.details[open] summary::after {
  transform: rotate(180deg);
}

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 24px 0;
}

dl.meta {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 8px 16px;
  margin: 16px 0;
}

dl.meta dt {
  color: var(--muted);
  font-weight: 500;
}

dl.meta dd {
  margin: 0;
  color: var(--fg);
}

.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: capitalize;
  margin-inline-start: 8px;
}

.badge-open {
  background: #dbeafe;
  color: #1e40af;
}

.badge-accepted,
.badge-scheduled {
  background: #fef3c7;
  color: #92400e;
}

.badge-in_progress,
.badge-on_the_way {
  background: #fde68a;
  color: #78350f;
}

.badge-completed {
  background: #d1fae5;
  color: #065f46;
}

.badge-cancelled {
  background: #fee2e2;
  color: #991b1b;
}

.badge-lowest {
  background: #fef3c7;
  color: #92400e;
  margin-inline-start: 8px;
  font-size: 0.75rem;
}

.offer-list {
  list-style: none;
  padding: 0;
  margin: 20px 0 0;
  display: grid;
  gap: 16px;
}

.offer-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  background: #f8fafc;
  transition: var(--transition);
}

.offer-card:hover {
  background: #f1f5f9;
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.offer-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 12px;
}

.offer-price {
  text-align: end;
  min-width: 80px;
}

.price {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--primary);
}

.offer-card form {
  margin-top: 16px;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.checkbox-grid label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  cursor: pointer;
  transition: var(--transition);
}

.checkbox-grid label:hover {
  border-color: var(--border-hover);
  background: #f8fafc;
}

.checkbox-grid label:has(input:checked) {
  background: #f0fdfa;
  border-color: var(--primary);
}

.checkbox-grid input {
  margin: 0;
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.req-list {
  list-style: none;
  padding: 0;
  margin: 20px 0 0;
  display: grid;
  gap: 14px;
}

.req-link {
  display: block;
  padding: 16px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

.req-link:hover {
  background: #f1f5f9;
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.req-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.req-desc {
  margin: 8px 0 4px;
  color: var(--fg);
  line-height: 1.5;
}

.small {
  font-size: 0.85rem;
  color: var(--muted);
}

.table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
}

.table th,
.table td {
  padding: 12px 16px;
  text-align: right;
  border-bottom: 1px solid var(--border);
}

.table th {
  font-weight: 600;
  color: var(--muted);
  background: #f8fafc;
}

.table tr:hover {
  background: #f1f5f9;
}

.table tr:last-child td {
  border-bottom: 0;
}

/* ==== Icons ==== */
.icon {
  display: inline-block;
  flex-shrink: 0;
  vertical-align: middle;
}

/* ==== Hero / Image utilities ==== */
.hero {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary) 0%, #14b8a6 100%);
  color: white;
  padding: 48px 24px;
  text-align: center;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,0.18) 0, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(255,255,255,0.12) 0, transparent 45%);
  pointer-events: none;
}

.hero h1 {
  font-size: 2.2rem;
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}

.hero p {
  font-size: 1.1rem;
  opacity: 0.95;
  max-width: 600px;
  margin: 0 auto 24px;
  position: relative;
  z-index: 1;
}

.avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--border);
  border: 2px solid var(--card);
  box-shadow: var(--shadow-sm);
}

.avatar-sm {
  width: 36px;
  height: 36px;
}

.avatar-lg {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--border);
  border: 2px solid var(--card);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: block;
}

.category-image {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--border);
}

.card-image {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  border-radius: var(--radius) var(--radius) 0 0;
  background: var(--border);
}

/* ==== Category cards with images ==== */
.category-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-hover);
}

.category-card-image {
  position: relative;
  aspect-ratio: 16/10;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f0fdfa 0%, #ccfbf1 60%, #99f6e4 100%);
  overflow: hidden;
}

.category-card-image::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,0.5) 0, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(255,255,255,0.3) 0, transparent 50%);
  pointer-events: none;
}

.category-card-image img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  transition: transform 0.3s ease;
  position: relative;
  z-index: 1;
}

.category-card:hover .category-card-image img {
  transform: scale(1.04);
}

/* ==== Per-trade color schemes — swap gradient + icon hue per category ==== */
.category-card.trade-electrician .category-card-image {
  background: linear-gradient(135deg, #fef9c3 0%, #fde047 60%, #facc15 100%);
}
.category-card.trade-electrician { --primary: #ca8a04; }

.category-card.trade-plumber .category-card-image {
  background: linear-gradient(135deg, #dbeafe 0%, #60a5fa 60%, #2563eb 100%);
}
.category-card.trade-plumber { --primary: #1d4ed8; }

.category-card.trade-ac .category-card-image {
  background: linear-gradient(135deg, #cffafe 0%, #22d3ee 60%, #06b6d4 100%);
}
.category-card.trade-ac { --primary: #0e7490; }

.category-card.trade-carpenter .category-card-image {
  background: linear-gradient(135deg, #fde6c2 0%, #d6a26b 60%, #a16207 100%);
}
.category-card.trade-carpenter { --primary: #92400e; }

.category-card.trade-painter .category-card-image {
  background: linear-gradient(135deg, #fce7f3 0%, #f472b6 60%, #db2777 100%);
}
.category-card.trade-painter { --primary: #be185d; }

.category-card.trade-tiles .category-card-image {
  background: linear-gradient(135deg, #ede9fe 0%, #a78bfa 60%, #7c3aed 100%);
}
.category-card.trade-tiles { --primary: #6d28d9; }

.category-card.trade-aluminum .category-card-image {
  background: linear-gradient(135deg, #f1f5f9 0%, #94a3b8 60%, #475569 100%);
}
.category-card.trade-aluminum { --primary: #334155; }

.category-card.trade-appliance .category-card-image {
  background: linear-gradient(135deg, #ffe4e6 0%, #fb7185 60%, #e11d48 100%);
}
.category-card.trade-appliance { --primary: #be123c; }

.category-card.trade-default .category-card-image {
  background: linear-gradient(135deg, #f0fdfa 0%, #ccfbf1 60%, #99f6e4 100%);
}
.category-card.trade-default { --primary: #0f766e; }

.category-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.5) 0%, transparent 60%);
}

.category-card-content {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.category-card-title {
  font-weight: 700;
  font-size: 1.1rem;
}

.category-card-meta {
  font-size: 0.85rem;
  color: var(--muted);
}

/* ==== Technician cards with avatars ==== */
.tech-card {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 16px;
  align-items: start;
  padding: 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: var(--transition);
}

.tech-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border-hover);
}

.tech-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--border);
}

.tech-info {
  min-width: 0;
}

.tech-name {
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.tech-meta {
  font-size: 0.9rem;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 8px;
}

.tech-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.tech-specialties {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tech-specialty {
  background: #f0fdfa;
  color: var(--primary);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
}

/* ==== Specialty icons in tech profile ==== */
.specialty-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary) 0%, #14b8a6 100%);
  color: white;
  font-size: 1.3rem;
}

.specialty-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
}

.specialty-info {
  flex: 1;
}

.specialty-name {
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.specialty-years {
  color: var(--muted);
  font-size: 0.95rem;
}

.specialty-input {
  width: 80px;
}

/* ==== Card grid for categories on home ==== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 24px;
}

/* ==== Mobile-first responsive overrides ==== */

/* Hamburger toggle — hidden on desktop */
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px 10px;
  cursor: pointer;
  color: var(--primary);
  align-items: center;
  justify-content: center;
}

/* Tablet / small desktop */
@media (max-width: 768px) {
  .topbar {
    flex-wrap: wrap;
    padding: 12px 16px;
    gap: 8px;
  }

  .brand {
    font-size: 1.1rem;
    flex: 1;
  }

  /* Show hamburger, hide nav by default */
  .nav-toggle {
    display: inline-flex;
  }

  nav {
    display: none;
    flex-direction: column;
    width: 100%;
    gap: 4px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border);
  }

  /* When opened via JS: show as full-width stack */
  .topbar.nav-open nav {
    display: flex;
  }

  nav a {
    width: 100%;
    text-align: start;
    padding: 10px 12px;
    font-size: 0.95rem;
  }

  .who {
    font-size: 0.9rem;
    width: 100%;
    padding: 8px 12px;
    margin-top: 4px;
    border-top: 1px solid var(--border);
  }

  .container {
    margin: 16px auto;
    padding: 0 12px;
  }

  .card {
    padding: 20px 16px;
    border-radius: var(--radius);
  }

  h1 {
    font-size: 1.5rem;
    margin-bottom: 16px;
  }

  h2 {
    font-size: 1.25rem;
    margin-bottom: 12px;
  }

  .hero {
    padding: 32px 20px;
  }

  .hero h1 {
    font-size: 1.6rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .card-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
  }

  .category-card-content {
    padding: 12px;
  }

  .category-card-title {
    font-size: 0.95rem;
  }

  /* Tables: scroll horizontally instead of squeezing */
  .table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Definition lists: stack instead of side-by-side */
  dl.meta {
    grid-template-columns: 1fr;
    gap: 4px 0;
  }

  dl.meta dt {
    margin-top: 8px;
    font-size: 0.85rem;
  }

  /* Offer cards: better small-screen layout */
  .offer-card {
    padding: 14px;
  }

  .offer-head {
    flex-direction: column;
    gap: 8px;
  }

  .offer-price {
    text-align: start;
    min-width: 0;
  }

  .price {
    font-size: 1.3rem;
  }

  /* Inputs: ensure 16px to avoid iOS zoom */
  input[type="tel"],
  input[type="text"],
  input[type="password"],
  input[type="email"],
  input[type="number"],
  input[type="date"],
  input[type="time"],
  textarea,
  select {
    font-size: 16px;
    padding: 10px 14px;
  }

  /* Buttons: easier to tap */
  .btn {
    padding: 10px 18px;
    font-size: 0.95rem;
  }

  /* Tech cards: stack avatar above info */
  .tech-card {
    grid-template-columns: 56px 1fr;
    gap: 12px;
    padding: 14px;
  }

  .tech-avatar {
    width: 56px;
    height: 56px;
  }

  .tech-name {
    font-size: 1rem;
  }

  .tech-meta {
    gap: 8px;
    font-size: 0.85rem;
  }

  /* Specialty rows: stack on small screens */
  .specialty-row {
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px;
  }

  .specialty-input {
    width: 100%;
  }

  /* Checkbox grid: 2 columns minimum */
  .checkbox-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 8px;
  }

  .checkbox-grid label {
    padding: 10px 12px;
    font-size: 0.9rem;
  }

  /* Req list: tighter padding */
  .req-link {
    padding: 12px 14px;
  }

  .req-list {
    gap: 10px;
  }

  /* Tech gallery thumbnails: smaller */
  .offer-thumbs img {
    width: 32px;
    height: 32px;
  }

  /* Hero on mobile */
  .hero {
    padding: 28px 16px;
  }

  .hero h1 {
    font-size: 1.4rem;
  }

  .hero p {
    font-size: 0.95rem;
  }

  /* Row between: stack on mobile */
  .row-between {
    flex-wrap: wrap;
    gap: 8px;
  }
}

/* Phone */
@media (max-width: 480px) {
  .topbar {
    padding: 10px 12px;
  }

  .brand {
    font-size: 1rem;
  }

  nav a {
    font-size: 0.8rem;
    padding: 5px 8px;
  }

  .who {
    font-size: 0.8rem;
  }

  .container {
    padding: 0 8px;
    margin: 12px auto;
  }

  .card {
    padding: 16px 12px;
  }

  h1 {
    font-size: 1.3rem;
  }

  h2 {
    font-size: 1.1rem;
  }

  .card-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .category-card-image {
    aspect-ratio: 1/1;
  }

  /* Form labels tighter */
  label {
    font-size: 0.9rem;
    margin: 12px 0 6px;
  }

  .btn {
    padding: 10px 16px;
    width: 100%;
    text-align: center;
  }

  .btn + .btn {
    margin-top: 8px;
  }

  /* Badges stay inline but smaller */
  .badge {
    font-size: 0.75rem;
    padding: 3px 8px;
  }

  /* Hero: smaller padding */
  .hero {
    padding: 24px 12px;
  }

  .hero h1 {
    font-size: 1.25rem;
  }

  /* Offer price: smaller */
  .price {
    font-size: 1.2rem;
  }
}

/* Very small phones */
@media (max-width: 360px) {
  .card-grid {
    grid-template-columns: 1fr;
  }

  nav {
    gap: 4px;
  }

  nav a {
    font-size: 0.75rem;
    padding: 4px 6px;
  }
}

/* Print: clean output */
@media print {
  .topbar, nav, .btn { display: none; }
  .container { max-width: 100%; margin: 0; padding: 0; }
  .card { box-shadow: none; border: 1px solid #ccc; }
}