.postings-main {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 20px 80px;
}

.postings-loading {
  padding: 60px 0;
  color: var(--muted);
  font-weight: 700;
  text-align: center;
}

.section-lede {
  max-width: 46ch;
  color: var(--muted);
  font-weight: 600;
  line-height: 1.6;
}

/* ─── Login ───────────────────────────────────────────────────────────────── */
.login-card {
  padding: 28px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.login-steps {
  padding: 0;
  margin: 0 0 20px;
  list-style: none;
}

.login-step {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 14px;
  align-items: start;
  padding-bottom: 18px;
  opacity: 0.55;
  transition: opacity 160ms ease;
}

.login-step.is-active {
  opacity: 1;
}

.login-step[hidden] {
  display: none;
}

.login-step-num {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--mint);
  color: var(--green);
  font-size: 0.9rem;
  font-weight: 800;
}

.login-step-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 800;
}

.login-step-body input {
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 9px;
  font-weight: 700;
}

.login-card .button {
  width: 100%;
  margin-bottom: 10px;
}

/* ─── Posting card ────────────────────────────────────────────────────────── */
.posting-card {
  padding: 26px;
  margin-bottom: 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(20, 37, 29, 0.06);
}

.posting-card.is-empty {
  text-align: center;
}

.posting-top {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.status-pill {
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.status-pill.is-live {
  background: var(--mint);
  color: var(--green);
}

.status-pill.is-warn {
  background: #fdf0d9;
  color: #8a5a10;
}

.status-pill.is-done {
  background: var(--soft);
  color: var(--muted);
}

.posting-age {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.posting-route {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: baseline;
  margin: 0 0 6px;
  font-size: 1.3rem;
  line-height: 1.3;
}

.route-arrow {
  color: var(--green);
  font-weight: 800;
}

.posting-meta {
  margin: 0 0 22px;
  color: var(--muted);
  font-weight: 700;
}

.empty-note {
  padding: 16px 18px;
  margin: 0;
  background: var(--soft);
  border-radius: 11px;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.55;
}

.empty-note.is-warn {
  background: #fdf0d9;
  color: #8a5a10;
}

/* ─── Quotes ──────────────────────────────────────────────────────────────── */
.quotes-heading {
  margin: 0 0 14px;
  font-size: 0.95rem;
}

.quote {
  padding: 16px 18px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  transition: border-color 160ms ease;
}

.quote:hover {
  border-color: rgba(18, 98, 65, 0.4);
}

.quote.is-accepted {
  border-color: var(--green);
  background: rgba(217, 239, 228, 0.35);
}

/* Not the chosen quote — kept visible, but clearly out of the running. */
.quote.is-passed {
  opacity: 0.5;
}

.quote-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
  justify-content: space-between;
}

.quote-company {
  font-size: 1.02rem;
}

.quote-amount {
  font-size: 1.2rem;
  font-weight: 800;
  white-space: nowrap;
}

.quote-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.quote-rating,
.quote-badge {
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
}

.quote-rating {
  background: var(--soft);
  color: var(--muted);
}

.quote-badge.is-low {
  background: #fdf0d9;
  color: #8a5a10;
}

.quote-badge.is-won {
  background: var(--mint);
  color: var(--green);
}

.quote-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.5;
}

.quote-accept {
  width: 100%;
  min-height: 44px;
  margin-top: 14px;
}

/* ─── Collapsible panels ──────────────────────────────────────────────────── */
.panel {
  margin-top: 18px;
  border-top: 1px solid var(--line);
}

.panel > summary {
  padding: 16px 0 0;
  color: var(--green);
  font-weight: 800;
  cursor: pointer;
  list-style: none;
}

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

.panel > summary::after {
  content: " ▾";
}

.panel[open] > summary::after {
  content: " ▴";
}

.panel-body {
  padding-top: 16px;
}

.edit-field {
  display: block;
  margin-bottom: 14px;
  font-weight: 800;
}

.edit-field input[type="date"],
.edit-field select,
.rating-comment {
  width: 100%;
  padding: 12px 14px;
  margin-top: 6px;
  border: 1px solid var(--line);
  border-radius: 9px;
  font: inherit;
  font-weight: 700;
}

fieldset.edit-field {
  padding: 0;
  border: 0;
}

fieldset.edit-field legend {
  padding: 0;
  margin-bottom: 8px;
}

.edit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

/* ─── Rating ──────────────────────────────────────────────────────────────── */
.stars {
  display: flex;
  gap: 4px;
  margin-bottom: 14px;
}

.star {
  padding: 0 4px;
  border: 0;
  background: none;
  color: var(--line);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  transition: color 120ms ease, transform 120ms ease;
}

.star:hover {
  transform: scale(1.12);
}

.star.is-on {
  color: var(--gold);
}

.star:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
  border-radius: 4px;
}

.rating-comment {
  margin-bottom: 14px;
  resize: vertical;
}

@media (max-width: 600px) {
  .posting-card,
  .login-card {
    padding: 18px;
  }

  .posting-route {
    font-size: 1.15rem;
  }

  .edit-actions .button {
    width: 100%;
  }
}

/* ─── Quote detail ────────────────────────────────────────────────────────── */
.quote-badge.is-insured {
  background: var(--mint);
  color: var(--green);
}

/* A missing guarantee should read as absent, not as a feature. */
.quote-rating.is-missing {
  background: transparent;
  border: 1px dashed var(--line);
  color: var(--muted);
}

.quote-inclusions-label {
  margin: 12px 0 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.quote-inclusions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.quote-inclusions li {
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 700;
}

.quote-inclusions li::before {
  content: "✓ ";
  color: var(--green);
  font-weight: 800;
}
