:root {
  color-scheme: light;
  --bg: #f5f7f8;
  --surface: #ffffff;
  --surface-strong: #eef3f5;
  --ink: #172026;
  --muted: #66747d;
  --line: #dce4e8;
  --accent: #0f7b6c;
  --accent-dark: #095b50;
  --gold: #d99b2b;
  --danger: #bc4b51;
  --shadow: 0 18px 45px rgba(30, 45, 56, 0.12);
}

* {
  box-sizing: border-box;
}

/* Listing loading must not remove the scrollbar and shift the header sideways. */
html { overflow-y: scroll; }

#detail-account-button[aria-busy="true"]::after {
  content: "";
  display: inline-block;
  width: 48px;
  height: 12px;
  border-radius: 3px;
  background: var(--line);
}

[hidden] { display: none !important; }
.account-section { max-width: 460px; margin: 0 auto; padding: 24px 0; }
.account-section h2 { margin-bottom: 20px; }
.profile-sections { max-width: 1000px; margin: 0 auto; display: grid; gap: 28px; }
.profile-sections > section { min-width: 0; border-top: 1px solid var(--line); padding-top: 20px; }
.profile-sections h3 { margin-bottom: 12px; }
#account-view:not(.profile-active) .profile-sections { display: none; }
.view.active.profile-active { display: grid; grid-template-columns: minmax(260px, 360px) minmax(0, 1fr); gap: 36px; align-items: start; }
.profile-active .account-section { width: 100%; margin: 0; }
.profile-active .profile-sections { width: 100%; margin: 24px 0 0; }
@media (max-width: 760px) {
  .view.active.profile-active { grid-template-columns: minmax(0, 1fr); gap: 16px; }
}
#auth-fields { display: grid; gap: 16px; }
.auth-links { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; }
.text-link { padding: 4px 0; border: 0; background: transparent; color: var(--accent); font-size: 0.8rem; text-decoration: underline; text-underline-offset: 3px; }
.sidebar a { text-decoration: none; }
.sidebar .brand { color: inherit; }
.status-message { line-height: 1.5; overflow-wrap: anywhere; }
.status-message:empty { display: none; }
.admin-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.admin-row > div { min-width: 0; }
.admin-row p { margin: 6px 0; color: var(--muted); }
.admin-row a { color: var(--accent); font-weight: 700; }
.admin-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.danger-action { color: var(--danger); }
#posting-contacts { display: grid; gap: 14px; }
.contact-lock a { overflow-wrap: anywhere; }
@media(max-width:640px) { .admin-row { align-items: flex-start; flex-wrap: wrap; } }
.photo-placeholder { display: grid; place-items: center; height: 100%; min-height: 120px; color: var(--muted); background: var(--surface-strong); }
.photo-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin: 16px 0; }
.photo-gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 4px; }
button:disabled { cursor: not-allowed; opacity: 0.6; }
input:disabled, select:disabled { background: var(--surface-strong); }
.detail-list div, #account-email, .wide-panel p { overflow-wrap: anywhere; }
.listing-category { color: var(--accent); font-size: 0.75rem; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  display: block;
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  z-index: 1200;
  background: #13272d;
  color: #f8fbfb;
  padding: 14px 24px;
  display: flex;
  /* The logo and language picker carry a caption above them; align by their boxes, not the captions. */
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 16px 28px;
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  min-width: 0;
}
.brand:focus-visible { outline: 3px solid var(--gold); outline-offset: 5px; }
/* Frame the original icon without the reference sheet's captions. */
.brand-logo { position: relative; overflow: hidden; width: 100px; height: 48px; min-height: 48px; max-height: 48px; flex: none; border-radius: 4px; }
.brand-logo img { display: block; width: 100%; height: 100%; object-fit: cover; }

.brand strong { display: block; font-size: 1rem; line-height: 1; color: #fff; }
.language-switcher { display: grid; gap: 5px; font-size: 0.8rem; }
.language-picker { position: relative; color: var(--ink); font-size: 0.85rem; font-weight: 500; }
.language-picker summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 38px; padding: 7px 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; cursor: pointer; list-style: none; min-width: 142px; }
.language-picker summary::-webkit-details-marker { display: none; }
.language-current, .language-options button { display: flex; align-items: center; gap: 9px; }
.language-options { position: absolute; right: 0; top: calc(100% + 6px); width: 185px; padding: 5px; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; box-shadow: var(--shadow); z-index: 20; }
.language-options button { width: 100%; border: 0; background: transparent; color: var(--ink); padding: 10px; border-radius: 4px; text-align: left; }
.language-options button:hover, .language-options button[aria-pressed="true"] { background: var(--surface-strong); }
.language-check { margin-left: auto; color: var(--accent); }
.language-picker summary:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.language-flag { display: inline-block; width: 22px; height: 22px; flex: 0 0 22px; border-radius: 50%; border: 1px solid rgba(23,32,38,0.18); overflow: hidden; }
.flag-bg { background: linear-gradient(#fff 0 33.33%, #00966e 33.33% 66.67%, #d62612 66.67%); }
.flag-de { background: linear-gradient(#171717 0 33.33%, #dd0000 33.33% 66.67%, #ffce00 66.67%); }
.flag-fr { background: linear-gradient(90deg, #002395 0 33.33%, #fff 33.33% 66.67%, #ed2939 66.67%); }
.flag-es { background: linear-gradient(#aa151b 0 25%, #f1bf00 25% 75%, #aa151b 75%); }
.flag-en { background: linear-gradient(90deg, transparent 40%, #c8102e 40% 60%, transparent 60%), linear-gradient(transparent 40%, #c8102e 40% 60%, transparent 60%), linear-gradient(90deg, transparent 33%, #fff 33% 67%, transparent 67%), linear-gradient(transparent 33%, #fff 33% 67%, transparent 67%), linear-gradient(45deg, transparent 42%, #fff 42% 47%, #c8102e 47% 53%, #fff 53% 58%, transparent 58%), linear-gradient(-45deg, #012169 42%, #fff 42% 47%, #c8102e 47% 53%, #fff 53% 58%, #012169 58%); }
.brand span { display: block; max-width: 260px; }
.sidebar .language-switcher { margin-left: auto; order: 2; color: #d8e2e5; font-size: 0.75rem; }
.sidebar .language-switcher select { min-height: 34px; padding: 5px 8px; width: 120px; }
.sidebar .language-picker summary { min-height: 44px; }

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--accent);
  font-weight: 800;
}

.brand span,
.member-box span,
.eyebrow,
.muted,
.section-heading span,
.plan span {
  color: var(--muted);
  font-size: 0.86rem;
}

.sidebar .brand span,
.sidebar .member-box span {
  color: #9fb1b8;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.nav-item {
  border: 0;
  border-radius: 8px;
  padding: 12px;
  background: transparent;
  color: #d8e2e5;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-item.active,
.nav-item:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.icon {
  display: none;
}

.favorites-nav-button {
  width: 44px;
  min-height: 44px;
  padding: 0;
  justify-content: center;
}

.favorites-nav-button .icon {
  display: block;
  color: #f1a4ae;
  font-size: 25px;
  line-height: 1;
}

.favorites-nav-button.active .icon,
.favorites-nav-button:hover .icon {
  color: #ffffff;
}

.member-box {
  display: none;
  margin-top: auto;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  gap: 10px;
  background: rgba(255, 255, 255, 0.06);
}

.main {
  padding: 22px 24px 40px;
  max-width: 1600px;
  margin: 0 auto;
  min-width: 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}

.topbar h1 {
  max-width: 780px;
  margin: 4px 0 0;
  font-size: 1.5rem;
  line-height: 1.03;
  letter-spacing: 0;
}

.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0;
  font-weight: 800;
  color: var(--accent);
}

.primary-button,
.secondary-button {
  border: 0;
  border-radius: 8px;
  padding: 11px 14px;
  min-height: 44px;
  font-weight: 750;
  white-space: normal;
}

.primary-button {
  background: var(--accent);
  color: #ffffff;
}

.primary-button:hover {
  background: var(--accent-dark);
}

.secondary-button {
  background: var(--surface-strong);
  color: var(--ink);
}

#clear-filters,
#sign-out {
  background: var(--surface);
  border: 2px solid var(--accent);
  color: var(--accent-dark);
  transition: background-color 0.15s, color 0.15s;
}

#clear-filters:hover,
#sign-out:hover {
  background: var(--accent);
  color: #ffffff;
}

#clear-filters:focus-visible, #sign-out:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* Filter row and sort control: same teal hover as Clear filters. */
.toolbar select,
.toolbar input,
.sort-control select {
  transition: border-color 0.15s, box-shadow 0.15s;
}
.toolbar select:not(:disabled),
.sort-control select:not(:disabled) { cursor: pointer; }
.toolbar select:not(:disabled):hover,
.toolbar input:not(:disabled):hover,
.sort-control select:not(:disabled):hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}
.toolbar select:focus,
.toolbar input:focus,
.sort-control select:focus { border-color: var(--accent); }

.inline-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.back-link {
  color: var(--accent);
  font-weight: 800;
  text-decoration: none;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.toolbar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
  padding: 16px 0 20px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  align-items: end;
}

label {
  display: grid;
  gap: 7px;
  color: #34464f;
  font-size: 0.9rem;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  padding: 11px 12px;
  min-height: 44px;
}

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

.content-grid {
  display: block;
}

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

h2 {
  margin: 0;
  font-size: 1.15rem;
  letter-spacing: 0;
}

.job-list {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.job-card,
.panel,
.detail-panel,
.plan {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: none;
}

.job-card {
  padding: 16px;
  display: grid;
  gap: 12px;
  color: inherit;
  text-align: left;
  text-decoration: none;
}

.job-card.selected {
  border-color: var(--accent);
}

.sort-control { display: flex; align-items: center; gap: 10px; font-weight: 400; }
.sort-control select { width: auto; max-width: 220px; min-height: 36px; padding: 6px 10px; }
.listing-card { padding: 0; display: flex; flex-direction: column; gap: 0; overflow: hidden; min-width: 0; border-radius: 4px; transition: border-color 150ms; }
.listing-card { position: relative; }
.listing-card-main { display: flex; flex: 1; flex-direction: column; color: inherit; text-decoration: none; min-width: 0; }
.listing-card:hover { border-color: var(--accent); }
.favorite-button { position: absolute; z-index: 2; top: 38px; right: 8px; display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: rgba(255,255,255,0.94); color: #65747a; font-size: 20px; line-height: 1; }
.favorite-button:hover { color: var(--danger); }
.favorite-button[aria-pressed="true"] { color: #c33f51; border-color: #c33f51; }
.listing-date { padding: 7px 10px; color: var(--muted); font-size: 0.7rem; }
.listing-media { position: relative; aspect-ratio: 1.8; background: var(--surface-strong); }
.listing-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.listing-budget { position: absolute; right: 7px; bottom: 7px; max-width: calc(100% - 14px); padding: 5px 8px; background: var(--surface); color: var(--accent-dark); border: 1px solid var(--accent); border-radius: 4px; font-size: 0.95rem; overflow-wrap: anywhere; }
.listing-body { display: flex; flex-direction: column; flex: 1; gap: 7px; padding: 12px; min-width: 0; }
.listing-budget-mobile { display: none; }
.members-layout { display: grid; grid-template-columns: minmax(200px, 1fr) minmax(0, 2fr); gap: 24px; margin-top: 20px; }
.member-directory-row { display: flex; flex-direction: column; gap: 6px; width: 100%; padding: 14px 8px; text-align: left; border: 0; border-bottom: 1px solid var(--line); background: transparent; overflow-wrap: anywhere; }
.member-directory-row:hover { background: var(--surface-strong); }
.member-review { padding: 16px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.member-review > span { margin-left: 12px; }
.contact-lines { display: flex; flex-direction: column; align-items: flex-start; gap: 9px; min-width: 0; }
.contact-lines > * { display: block; max-width: 100%; overflow-wrap: anywhere; }
.contact-lines a { color: var(--accent-dark); text-underline-offset: 3px; }
.contact-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; margin-top: 18px; }
.giver-profile-header { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; padding: 20px 0 28px; border-bottom: 1px solid var(--line); }
.giver-profile-header h2 { font-size: 1.5rem; margin-bottom: 12px; }
.giver-profile-header h3 { margin-bottom: 12px; }
.giver-jobs, .giver-feedback { padding: 24px 0; }
.giver-jobs > h3, .giver-feedback > h3 { margin-bottom: 18px; }
.giver-feedback { border-top: 1px solid var(--line); }
.giver-feedback-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 420px); gap: 32px; }
@media(max-width:640px) { .giver-profile-header, .giver-feedback-layout { grid-template-columns: minmax(0, 1fr); gap: 20px; } }
#profile-contact-form, #member-rating-form { display: grid; gap: 12px; max-width: 520px; margin: 20px 0; }
.star-rating { border: 0; padding: 0; margin: 0; min-width: 0; }
.messaging-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); border-top: 1px solid var(--line); min-height: 480px; }
#message-inbox { border-right: 1px solid var(--line); padding: 12px 16px 12px 0; max-height: 650px; overflow: auto; }
.conversation { display: grid; gap: 6px; width: 100%; text-align: left; padding: 14px; border: 0; border-bottom: 1px solid var(--line); background: transparent; cursor: pointer; }
.conversation.selected { background: #e2efed; }
.conversation span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.conversation small { color: var(--accent-dark); }
#message-thread { min-width: 0; padding: 16px 0 16px 24px; }
.message-thread-heading { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.message-thread-heading h3 { overflow-wrap: anywhere; }
.message-thread-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 12px; }
.message-unread-count { display: inline-block; width: 3ch; flex: 0 0 3ch; text-align: center; font-variant-numeric: tabular-nums; }
.message-log { display: flex; flex-direction: column; gap: 12px; height: clamp(220px, 42vh, 340px); overflow-y: auto; padding: 12px 4px; }
.chat-message { max-width: 85%; border-radius: 6px; padding: 10px 14px; background: #fff; border: 1px solid var(--line); align-self: flex-start; }
.chat-message.outgoing { align-self: flex-end; background: #e2efed; }
.chat-message p { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0 0 6px; }
.chat-message time { font-size: 11px; color: var(--muted); }
.message-compose { display: grid; gap: 10px; }
.message-compose textarea { min-height: 80px; }
.message-compose button { justify-self: end; min-width: 100px; }
@media(max-width: 700px) {
  .messaging-layout { grid-template-columns: minmax(0, 1fr); }
  #message-inbox { border-right: 0; border-bottom: 1px solid var(--line); padding: 0; max-height: 180px; }
  #message-thread { padding: 16px 0; }
  .message-log { height: 300px; }
}
.star-rating legend { font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.star-rating-options { display: flex; gap: 4px; width: max-content; }
.star-rating-option { position: relative; display: grid; place-items: center; width: 44px; height: 44px; cursor: pointer; }
.star-rating-option input { position: absolute; width: 1px; height: 1px; opacity: 0; padding: 0; }
.star-rating-option span { font-size: 36px; line-height: 1; color: #89959a; }
.star-rating-option:has(input:checked) span,
.star-rating-option:has(~ .star-rating-option input:checked) span { color: #b77706; }
@media (hover: hover) {
  .star-rating-options:hover .star-rating-option span { color: #89959a; }
  .star-rating-options .star-rating-option:hover span,
  .star-rating-options .star-rating-option:has(~ .star-rating-option:hover) span { color: #b77706; }
}
.star-rating-option:has(input:focus-visible) { outline: 2px solid var(--accent-dark); outline-offset: 2px; border-radius: 4px; }
@media(max-width:640px) { .members-layout { grid-template-columns: minmax(0,1fr); } }
.listing-body h3 { font-size: 1rem; line-height: 1.35; overflow-wrap: anywhere; }
.listing-body p { margin: 0; overflow-wrap: anywhere; }
.listing-route { font-size: 0.85rem; font-weight: 700; padding-top: 8px; border-top: 1px solid var(--line); }
.listing-route span { color: var(--accent); }
.listing-countries { color: var(--muted); font-size: 0.8rem; }
.listing-notes { color: var(--muted); font-size: 0.78rem; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.listing-link { display: flex; justify-content: space-between; color: var(--accent); font-size: 0.85rem; font-weight: 700; margin-top: auto; padding-top: 10px; }
.job-list > .panel { grid-column: 1 / -1; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.panel { border-radius: 0; box-shadow: none; }

.job-card-header,
.job-meta,
.score-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.job-card h3 {
  margin: 0;
  font-size: 1rem;
}

.tag {
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--surface-strong);
  color: #38515b;
  font-size: 0.78rem;
  font-weight: 800;
}

.tag.warning {
  background: #f8ead1;
  color: #8a5b09;
}

.tag.danger {
  background: #f8dcdf;
  color: #873038;
}

.job-meta {
  justify-content: flex-start;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.9rem;
}

.detail-panel,
.panel {
  padding: 18px;
}

.detail-panel {
  min-height: 420px;
}

.vehicle-photo {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 14px;
  background: var(--surface-strong);
}

.detail-panel h2,
.detail-panel h3 {
  margin-top: 0;
}

.detail-list {
  display: grid;
  gap: 10px;
  margin: 18px 0;
}

.detail-list div,
.score-row {
  padding: 10px;
  border-radius: 8px;
  background: var(--surface-strong);
}

.route-layout {
  display: grid;
  grid-template-columns: 420px minmax(0, 1fr);
  gap: 18px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

form {
  display: grid;
  gap: 14px;
}

.route-results {
  display: grid;
  align-content: start;
  gap: 12px;
}

.plans {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.plan {
  padding: 20px;
  display: grid;
  gap: 14px;
}

.plan h2 {
  font-size: 2rem;
}

.plan.featured {
  border-color: var(--accent);
  box-shadow: 0 20px 50px rgba(15, 123, 108, 0.18);
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  background: #13272d;
  color: #ffffff;
  padding: 13px 16px;
  border-radius: 8px;
  box-shadow: var(--shadow);
  z-index: 10;
}

.detail-page {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 24px 0 36px;
}

.detail-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.detail-language {
  width: min(220px, 100%);
}

.job-hero {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 4px;
  overflow: hidden;
  background: #e9eef0;
}

.job-hero img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.job-detail-heading { display: flex; justify-content: space-between; align-items: start; gap: 24px; padding: 8px 0 22px; margin-bottom: 22px; border-bottom: 1px solid var(--line); }
.job-detail-heading h1 { font-size: 28px; line-height: 1.2; margin: 12px 0; overflow-wrap: anywhere; }
.job-detail-heading p { margin: 0; color: var(--muted); }
.job-detail-budget { white-space: nowrap; color: var(--accent-dark); font-size: 20px; }
.job-detail-actions { display: flex; align-items: center; gap: 12px; }
.detail-favorite-button { display: grid; place-items: center; width: 42px; height: 42px; padding: 0; border: 1px solid #c7d1d4; border-radius: 50%; background: #e7edef; color: #52646a; box-shadow: inset 0 -2px 0 rgba(19,39,45,0.1), 0 2px 5px rgba(19,39,45,0.1); font-size: 25px; line-height: 1; transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease, box-shadow 150ms ease; }
.detail-favorite-button:hover { background: #dbe4e6; border-color: #9eafb4; color: #253a40; }
.detail-favorite-button[aria-pressed="true"] { background: #c33f51; border-color: #a72e40; color: #ffffff; box-shadow: 0 3px 8px rgba(195,63,81,0.28); }
.job-detail-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 28px; align-items: start; margin-bottom: 24px; }
.job-detail-summary { min-width: 0; }
.job-detail-summary > .panel { background: none; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 0 0 18px; margin-bottom: 18px; }
.job-detail-summary .section-heading { flex-wrap: wrap; gap: 8px; }
.job-detail-summary .detail-list div { background: none; padding: 4px 0; }
.job-media { min-width: 0; }
.job-media .photo-gallery { grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; margin: 12px 0 0; }
.photo-gallery button { padding: 2px; background: transparent; border: 2px solid transparent; border-radius: 4px; cursor: pointer; }
.photo-gallery button[aria-pressed="true"] { border-color: var(--accent-dark); }
.photo-gallery button:focus-visible { outline: 2px solid var(--accent-dark); outline-offset: 2px; }
.photo-gallery button img { display: block; }
.job-detail-layout + .detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 700px) {
  .job-detail-heading { flex-direction: column; gap: 12px; }
  .job-detail-heading h1 { font-size: 24px; }
  .job-detail-layout { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .job-media { grid-row: 1; }
  .job-detail-layout + .detail-grid { grid-template-columns: minmax(0, 1fr); }
}

.job-hero-copy {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 24px;
  max-width: 760px;
  color: #ffffff;
}

.job-hero-copy h1 {
  margin: 12px 0 8px;
  font-size: 2rem;
  line-height: 0.98;
  letter-spacing: 0;
}

.job-hero-copy p {
  margin: 0;
  font-size: 1.05rem;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.wide-panel {
  grid-column: span 2;
}

.contact-lock {
  align-content: start;
}

.detail-list.compact {
  margin-bottom: 0;
}

.route-line {
  display: grid;
  gap: 12px;
  margin: 16px 0;
}

.route-line div {
  display: grid;
  gap: 4px;
  padding-left: 14px;
  border-left: 3px solid var(--accent);
}

.route-line span {
  color: var(--muted);
}

@media (max-width: 1200px) {
  .job-list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 980px) {
  .job-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sidebar .nav { order: 3; width: 100%; }
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: sticky;
  }

  .nav {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .member-box {
    display: none;
  }

  .topbar,
  .content-grid,
  .route-layout,
  .plans,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .content-grid,
  .route-layout,
  .plans,
  .detail-grid {
    display: grid;
  }

  .wide-panel {
    grid-column: auto;
  }

  .toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .job-list { grid-template-columns: minmax(0, 1fr); gap: 0; background: var(--surface); }
  .brand span { display: none; }
  .brand strong { font-size: 0.9rem; }
  .brand-logo { width: 84px; height: 42px; min-height: 42px; max-height: 42px; }
  .sidebar { gap: 12px; }
  .sidebar .language-switcher { gap: 3px; }
  .sidebar .language-switcher select { width: 105px; }
  .sidebar .nav { display: grid; gap: 4px; }
  .nav-item { padding: 9px; font-size: 0.85rem; }
  .listing-card { display: grid; grid-template-columns: 40% minmax(0, 1fr); gap: 10px; padding: 10px 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
  .listing-card:hover { background: var(--surface-strong); }
  .listing-media { aspect-ratio: 4 / 3; align-self: start; margin-top: 2px; overflow: hidden; }
  .listing-body { padding: 0 8px 0 0; gap: 5px; }
  .listing-body h3 { font-size: 0.95rem; line-height: 1.25; }
  .listing-budget-mobile { display: block; align-self: flex-start; max-width: 100%; color: var(--accent-dark); font-size: 0.95rem; line-height: 1.25; overflow-wrap: anywhere; }
  .listing-date, .listing-media .listing-budget, .listing-category, .listing-notes, .listing-link { display: none; }
  .listing-route { padding: 0; border: 0; font-size: 0.78rem; line-height: 1.3; }
  .listing-countries { font-size: 0.7rem; line-height: 1.3; }
  .listing-condition .tag { font-size: 0.65rem; padding: 3px 6px; line-height: 1.2; }
  .sort-control { gap: 6px; }
  .sort-control > span { display: none; }
  .sort-control select { max-width: 175px; font-size: 0.85rem; }
  .main,
  .sidebar {
    padding: 18px;
  }
  .main { padding: 12px; }

  .topbar {
    display: grid;
  }

  .nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .detail-topbar {
    align-items: stretch;
    display: grid;
  }
}

@media (max-width: 380px) {
  .job-list { grid-template-columns: 1fr; }
  .toolbar { grid-template-columns: 1fr; }
}
/* Listing conversations and moderation share the existing compact controls. */
.chat-context:empty { display: none; }
.chat-context { border-block: 1px solid #d5e0e4; padding: 12px 0; margin: 8px 0; }
.chat-job { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; align-items: center; }
.chat-job:not(:has(img)) { grid-template-columns: minmax(0, 1fr); }
.chat-job img { width: 96px; height: 72px; object-fit: cover; border-radius: 4px; }
.chat-job p { margin: 4px 0; font-size: 13px; }
.chat-job small { display: block; }
.chat-job a { color: #087f73; }
#message-thread:has(.chat-job) .message-log { height: clamp(140px, 28vh, 240px); }
#message-thread:has(.chat-job) .message-log:empty { height: 80px; }
.candidate-status { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 10px; font-size: 13px; }
.candidate-status select { width: auto; min-width: 145px; padding: 8px; }
.conversation small { display: block; white-space: normal; overflow-wrap: anywhere; }
.report-button { font-size: 12px; color: #65777f; margin-top: 8px; }
.chat-message .report-button { display: block; }
.action-dialog { width: min(460px, calc(100% - 32px)); border: 1px solid #d5e0e4; border-radius: 8px; padding: 24px; color: #19282e; }
.action-dialog::backdrop { background: #14272da6; }
.review-dialog { width: min(600px, calc(100% - 32px)); max-height: 85vh; overflow: auto; }
.review-history { max-height: 40vh; overflow: auto; margin-bottom: 16px; }
.review-history article { padding: 12px 0; border-bottom: 1px solid #d5e0e4; }
.review-history p { white-space: pre-wrap; overflow-wrap: anywhere; margin: 6px 0; }
.action-dialog h2 { font-size: 20px; margin: 0 0 20px; }
.action-dialog textarea { width: 100%; box-sizing: border-box; resize: vertical; }
.dialog-actions, .billing-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.dialog-actions { justify-content: flex-end; }
.report-row { padding: 18px 0; border-bottom: 1px solid #d5e0e4; overflow-wrap: anywhere; }
.report-row header { display: flex; align-items: center; gap: 12px; }
.report-row blockquote { margin: 12px 0; padding-left: 12px; border-left: 3px solid #d5e0e4; white-space: pre-wrap; }
.report-row .admin-actions { margin-top: 12px; }
.audit-history { margin-top: 28px; }
.audit-history summary { cursor: pointer; font-weight: 600; }
#workflow-notice:empty { display: none; }
#billing-controls { padding-block: 20px; }
.city-options { position: absolute; top: 100%; left: 0; right: 0; background: #fff; border: 1px solid #bccfd4; box-shadow: 0 5px 16px #162b3320; max-height: 230px; overflow-y: auto; z-index: 1100; }
label:has(> .city-options) { position: relative; min-width: 0; }
.city-options button { display: block; width: 100%; text-align: left; padding: 10px; border: 0; border-radius: 0; background: #fff; color: #19282e; font-size: 13px; white-space: normal; }
.city-options button:hover, .city-options button[aria-selected=true] { background: #e4f2ef; }
.city-options span { display: block; padding: 10px; font-size: 13px; }
@media (max-width: 600px) {
  .chat-job { grid-template-columns: 72px minmax(0,1fr); gap: 8px; }
  .chat-job img { width: 72px; height: 60px; }
}

.city-options[hidden] { display: none; }

/* Signed-out visitors see no gaps where member-only links would be. */
.sidebar .nav-item[hidden] { display: none; }
.sidebar #messages-nav,
.sidebar #detail-messages-nav { width: 172px; flex: 0 0 172px; }
.sidebar #account-button,
.sidebar #detail-account-button {
  width: 104px;
  flex: 0 0 104px;
  min-height: 44px;
  text-align: center;
}
@media (max-width: 640px) {
  .sidebar {
    display: grid;
    grid-template-columns: 84px 80px minmax(0, 1fr);
    gap: 8px;
    padding: 12px;
  }
  .sidebar > .nav { grid-column: 1 / -1; }
  .sidebar #account-button,
  .sidebar #detail-account-button { width: 80px; font-size: 13px; }
  .sidebar .language-switcher { min-width: 0; margin-left: 0; }
  .sidebar .language-picker summary { min-width: 0; gap: 4px; padding: 7px; font-size: 12px; }
  .sidebar .language-current { gap: 4px; }
  .sidebar #messages-nav,
  .sidebar #detail-messages-nav { width: 136px; flex-basis: 136px; }
}
@media (max-width: 980px) {
  .sidebar > .nav:not([data-admin-only]) {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    min-height: 44px;
    align-items: center;
  }
  .sidebar > .nav > .nav-item { flex-shrink: 0; white-space: nowrap; }
}

/* Footer and legal pages */
.site-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; max-width: 1600px; margin: 0 auto; padding: 20px 24px 28px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.85rem; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.site-footer a { color: var(--muted); text-underline-offset: 3px; }
.site-footer a:hover, .site-footer a[aria-current="page"] { color: var(--accent); }
.consent-check { display: flex; align-items: flex-start; gap: 10px; font-weight: 500; line-height: 1.45; }
.consent-check input { flex: none; width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }
.consent-check a { color: var(--accent); }
.legal-page main { max-width: 760px; }
.legal-document { color: var(--ink); line-height: 1.65; overflow-wrap: anywhere; }
.legal-document h1 { margin: 0 0 6px; font-size: 1.8rem; }
.legal-document h2 { margin: 30px 0 8px; font-size: 1.1rem; }
.legal-document p, .legal-document ul { margin: 0 0 12px; }
.legal-document ul { padding-left: 22px; }
.legal-document li { margin-bottom: 6px; }
.legal-document a { color: var(--accent); }
.legal-updated { color: var(--muted); font-size: 0.9rem; }
.legal-notice { max-width: 760px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-strong); }
.legal-placeholder { padding: 0 3px; border-radius: 3px; background: #fdf0d5; color: #7a4f00; font-weight: 600; }

/* Launch mode banner on the Membership page. */
.plan.plan-free { grid-column: 1 / -1; border: 2px solid var(--accent); background: #eef7f5; }
.plan.plan-free h2 { color: var(--accent-dark); }
.plan.plan-free .primary-button { justify-self: start; }

/* Menu icons (nav-icons.js). */
.nav-svg { flex: none; display: block; }
.favorites-nav-button .nav-svg { width: 22px; height: 22px; color: #f1a4ae; fill: currentColor; }
.favorites-nav-button.active .nav-svg,
.favorites-nav-button:hover .nav-svg { color: #ffffff; }

/* 404 page. */
.not-found { display: grid; justify-items: center; gap: 14px; max-width: 560px; margin: 0 auto; padding: 64px 24px 72px; text-align: center; }
.not-found-code { margin: 0; font-size: 4.5rem; font-weight: 800; line-height: 1; color: var(--accent); }
.not-found h1 { margin: 0; font-size: 1.6rem; }
.not-found p { margin: 0; color: var(--muted); line-height: 1.6; }

/* Phones: search stays visible; the other filters open from the Filters button. */
.filters-toggle { display: none; }
@media (max-width: 640px) {
  .toolbar .search-field { order: -2; }
  .toolbar .filters-toggle { order: -1; display: inline-flex; align-items: center; justify-content: center; gap: 4px; }
  .toolbar:not(.filters-open) > label:not(.search-field),
  .toolbar:not(.filters-open) > #clear-filters { display: none; }
  .toolbar .filters-toggle[aria-expanded="true"] { border: 2px solid var(--accent); background: var(--surface); color: var(--accent-dark); }
}

/* Loading placeholders shaped like listing cards. */
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skeleton-card { pointer-events: none; }
.skeleton-card .listing-media,
.skeleton-line { background: linear-gradient(90deg, var(--surface-strong) 25%, #f7fafb 50%, var(--surface-strong) 75%); background-size: 200% 100%; animation: skeleton-shimmer 1.4s ease-in-out infinite; }
.skeleton-line { display: block; height: 12px; width: 70%; border-radius: 4px; }
.skeleton-line.wide { width: 90%; height: 16px; }
.skeleton-line.short { width: 40%; }
@keyframes skeleton-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .skeleton-card .listing-media, .skeleton-line { animation: none; } }

/* Saved searches. */
#save-search { border: 2px solid var(--accent); background: var(--surface); color: var(--accent-dark); }
#save-search:hover { background: var(--accent); color: #ffffff; }
.saved-search-list { display: grid; gap: 8px; margin: 12px 0 0; padding: 0; list-style: none; }
.saved-search-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); overflow-wrap: anywhere; }
@media (max-width: 640px) {
  .toolbar:not(.filters-open) > #save-search { display: none; }
}

/* Delete my account. */
.danger-zone { margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--line); }
.danger-zone .danger-action { font-size: 0.85rem; }
.danger-button { background: var(--danger); }
.danger-button:hover:not(:disabled) { background: #9c3a40; }
.danger-button:disabled { opacity: 0.5; cursor: not-allowed; }
.action-dialog label input { width: 100%; box-sizing: border-box; }

/* Status messages: errors in red, progress/info in teal. */
[role="status"][data-tone]:not(:empty) { display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; border-radius: 8px; font-weight: 600; line-height: 1.45; }
[role="status"][data-tone="error"]:not(:empty) { color: #9c2f36; background: #fdecee; border: 1px solid #f2c4c8; }
[role="status"][data-tone="error"]:not(:empty)::before { content: "!"; flex: none; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--danger); color: #ffffff; font-size: 0.8rem; font-weight: 800; }
[role="status"][data-tone="info"]:not(:empty) { color: var(--accent-dark); background: #eef7f5; border: 1px solid #cfe8e3; }
