.jom-form { max-width: 860px; display: grid; gap: 16px; }
.jom-field { display: grid; gap: 6px; font-weight: 600; }
.jom-field input, .jom-field textarea { width: 100%; padding: 10px; border: 1px solid #ccd0d4; border-radius: 6px; font: inherit; }
.jom-help { font-weight: 400; color: #666; }
.jom-submit, .jom-button { display: inline-flex; align-items: center; justify-content: center; width: 160px; min-height: 44px; padding: 10px 16px; border-radius: 7px; text-decoration: none; border: 1px solid #0f6fa4; cursor: pointer; background: #0f6fa4; color: #fff; font: inherit; font-weight: 700; line-height: 1.2; box-sizing: border-box; text-align: center; }
.jom-button:hover, .jom-submit:hover { filter: brightness(0.96); color: #fff; }
.jom-button-secondary { background: #fff; color: #0f6fa4; }
.jom-button-secondary:hover { color: #0f6fa4; background: #f7fbfd; }
.jom-notice { padding: 12px 14px; margin: 12px 0; border-radius: 6px; }
.jom-success { background: #ecf8ef; border: 1px solid #7bc989; }
.jom-error { background: #fff2f2; border: 1px solid #dc8888; }

.jom-opportunities { display: grid; gap: 22px; }
.jom-toolbar { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(220px, 320px) auto; gap: 18px 28px; align-items: end; margin: 6px 0 2px; }
.jom-toolbar label { display: grid; gap: 7px; font-weight: 700; }
.jom-search input, .jom-sort select { width: 100%; min-height: 48px; padding: 11px 14px; border: 1px solid #b8bec8; border-radius: 8px; font: inherit; background: #fff; box-sizing: border-box; }
.jom-layout-toggle { display: inline-flex; gap: 12px; align-items: center; justify-content: flex-end; }
.jom-layout-toggle button { min-width: 98px; min-height: 44px; padding: 10px 18px; border: 1px solid #0f6fa4; border-radius: 8px; background: #fff; color: #0f6fa4; cursor: pointer; font: inherit; font-weight: 700; box-shadow: none; }
.jom-layout-toggle button.is-active { color: #fff; background: #0f6fa4; }
.jom-results-count { font-size: 0.95em; color: #5f6673; margin-top: -8px; }

.jom-list.jom-layout-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 22px; align-items: start; }
.jom-card { border: 1px solid #dde1e7; border-radius: 14px; padding: 22px; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.04); box-sizing: border-box; }
.jom-card-main { display: grid; gap: 13px; }
.jom-card-head { display: grid; grid-template-columns: minmax(0,1fr) 170px; gap: 20px; align-items: start; }
.jom-title-block { min-width: 0; }
.jom-card h3 { margin: 0; line-height: 1.15; }
.jom-logo-wrap { width: 170px; height: 110px; display: flex; align-items: flex-start; justify-content: flex-end; overflow: hidden; }
.jom-logo { display: block; max-width: 170px !important; max-height: 110px !important; width: auto !important; height: auto !important; object-fit: contain; object-position: top right; }
.jom-meta { display: grid; gap: 5px; margin: 4px 0 2px; font-size: 0.96em; }
.jom-meta span { overflow-wrap: anywhere; }
.jom-excerpt { margin: 0; }
.jom-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 6px; }
.jom-details { border-top: 1px solid #e7eaf0; margin-top: 8px; padding-top: 14px; }
.jom-details h4 { margin: 14px 0 7px; }
.jom-details h4:first-child { margin-top: 0; }
.jom-filter-empty { margin: 0; }

/* Card mode: hide the compact list row. */
.jom-layout-cards .jom-list-summary { display: none; }

/* List mode: one opportunity per row, expandable downward. */
.jom-list.jom-layout-list { display: grid !important; grid-template-columns: 1fr !important; gap: 12px; }
.jom-layout-list .jom-card { padding: 0; overflow: hidden; }
.jom-layout-list .jom-list-summary { display: grid; grid-template-columns: 120px minmax(0,1fr) 170px; gap: 18px; align-items: center; min-height: 92px; padding: 16px 20px; cursor: pointer; }
.jom-layout-list .jom-list-summary:hover { background: #f8fafc; }
.jom-layout-list .jom-list-summary:focus { outline: 2px solid #0f6fa4; outline-offset: -2px; }
.jom-layout-list .jom-list-logo { width: 120px; height: 64px; display: flex; align-items: center; justify-content: flex-start; overflow: hidden; }
.jom-layout-list .jom-list-logo .jom-logo { max-width: 120px !important; max-height: 64px !important; object-fit: contain; object-position: center left; }
.jom-layout-list .jom-list-title { font-weight: 800; font-size: 1.2em; line-height: 1.25; overflow-wrap: anywhere; }
.jom-layout-list .jom-list-deadline { justify-self: end; text-align: right; display: grid; gap: 2px; }
.jom-layout-list .jom-list-deadline span { font-size: 0.78em; text-transform: uppercase; letter-spacing: 0.04em; color: #697386; font-weight: 700; }
.jom-layout-list .jom-list-deadline strong { font-weight: 800; white-space: nowrap; }
.jom-layout-list .jom-card-main { display: none; padding: 4px 20px 22px; border-top: 1px solid #e7eaf0; }
.jom-layout-list .jom-card.is-expanded .jom-card-main { display: grid; }
.jom-layout-list .jom-card-head, .jom-layout-list .jom-excerpt, .jom-layout-list .jom-actions .jom-view-toggle { display: none; }
.jom-layout-list .jom-card-main > .jom-meta { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 7px 18px; margin-top: 12px; }
.jom-layout-list .jom-details { display: block; border-top: 1px solid #e7eaf0; margin-top: 12px; padding-top: 12px; }
.jom-layout-list .jom-details[hidden] { display: none; }

@media (max-width: 760px) {
  .jom-toolbar { grid-template-columns: 1fr; }
  .jom-layout-toggle { justify-content: flex-start; }
  .jom-card-head { grid-template-columns: 1fr; }
  .jom-logo-wrap { justify-content: flex-start; width: 170px; height: 110px; order: 2; }
  .jom-logo { object-position: top left; }
  .jom-layout-list .jom-list-summary { grid-template-columns: 84px minmax(0,1fr); gap: 12px; }
  .jom-layout-list .jom-list-logo { width: 84px; height: 54px; }
  .jom-layout-list .jom-list-logo .jom-logo { max-width: 84px !important; max-height: 54px !important; }
  .jom-layout-list .jom-list-deadline { grid-column: 2; justify-self: start; text-align: left; }
}
