:root {
    --red: #a72b2b;
    --red-dark: #852121;
    --beige: #F8F2E9;
    --canvas: #fbf7f0;
    --surface: #ffffff;
    --surface-soft: #fffaf4;
    --ink: #1f1a18;
    --muted: #6f6460;
    --muted-soft: #8a7f79;
    --line: #e5d6c3;
    --line-strong: #d8c5ad;
    --line-soft: #f0e4d4;
    --green: #426b53;
    --green-soft: #ecf3ee;
    --red-soft: #f7e9e6;
    --shadow: 0 18px 42px rgba(76, 54, 35, 0.10);
    --shadow-soft: 0 10px 28px rgba(76, 54, 35, 0.075);
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
}

body {
    margin: 0;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0) 360px),
        var(--beige);
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
}

body::before {
    display: block;
    width: 100%;
    height: 5px;
    background: var(--red);
    content: "";
}

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

a:hover {
    color: var(--red-dark);
}

input,
select,
button {
    font: inherit;
}

input,
select {
    width: 100%;
    min-height: 50px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0.8rem 0.95rem;
    background: var(--surface);
    color: var(--ink);
    font-size: 0.95rem;
    line-height: 1.2;
}

select {
    appearance: none;
    padding-right: 2.35rem;
    background-image:
        linear-gradient(45deg, transparent 50%, var(--muted) 50%),
        linear-gradient(135deg, var(--muted) 50%, transparent 50%);
    background-position:
        calc(100% - 1.05rem) 1.35rem,
        calc(100% - 0.72rem) 1.35rem;
    background-repeat: no-repeat;
    background-size: 0.38rem 0.38rem, 0.38rem 0.38rem;
}

select:disabled {
    background-color: #f6efe5;
    color: var(--muted-soft);
    cursor: not-allowed;
}

input::placeholder {
    color: #958982;
}

input:hover,
select:not(:disabled):hover {
    border-color: var(--line-strong);
    background-color: #ffffff;
}

input:focus,
select:focus,
button:focus,
a:focus {
    outline: 3px solid rgba(167, 43, 43, 0.22);
    outline-offset: 2px;
}

h1,
h2,
p {
    margin-top: 0;
}

h1,
h2 {
    color: var(--ink);
    font-family: inherit;
    letter-spacing: 0;
}

h1 {
    max-width: 760px;
    margin-bottom: 0.9rem;
    font-size: 2.45rem;
    line-height: 1.06;
    font-weight: 850;
}

h2 {
    margin-bottom: 0.7rem;
    font-size: 1.45rem;
    line-height: 1.2;
    font-weight: 850;
}

.page {
    width: min(1180px, calc(100% - 44px));
    margin: 0 auto;
    padding: 22px 0 64px;
}

.page-detail {
    width: min(1080px, calc(100% - 44px));
}

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

.brand-link {
    display: inline-flex;
    align-items: center;
    width: min(280px, 68vw);
    text-decoration: none;
}

.brand-logo {
    display: block;
    width: 100%;
    height: auto;
}

.language-toggle {
    display: inline-flex;
    gap: 4px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 4px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 8px 18px rgba(76, 54, 35, 0.06);
}

.language-toggle a {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    padding: 0.5rem 0.9rem;
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}

.language-toggle a:hover {
    background: #f4eadc;
    color: var(--red-dark);
}

.language-toggle a.is-active {
    background: var(--red);
    color: #ffffff;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(250px, 310px);
    gap: 24px;
    align-items: center;
    margin-bottom: 14px;
    padding: 6px 0 18px;
    border-bottom: 1px solid var(--line);
}

.page-index .hero h1 {
    max-width: 720px;
    margin-bottom: 0.55rem;
    font-size: clamp(2rem, 4vw, 3.15rem);
    line-height: 1.04;
}

.eyebrow {
    margin: 0 0 0.7rem;
    color: var(--red);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.hero-text {
    max-width: 650px;
    margin-bottom: 0.4rem;
    color: var(--muted);
    font-size: 1.08rem;
}

.hero-text strong {
    color: var(--red);
    font-weight: 900;
}

.hero-note {
    margin-bottom: 0;
    color: #80746e;
    font-size: 0.92rem;
    font-weight: 720;
}

.source-note {
    max-width: 760px;
    margin-bottom: 0;
    color: #7d716b;
    font-size: 0.88rem;
    overflow-wrap: anywhere;
}

.site-footer {
    margin-top: 42px;
    border-top: 1px solid var(--line);
    padding-top: 18px;
}

.site-footer p {
    max-width: 860px;
    margin: 0;
    color: #7d716b;
    font-size: 0.86rem;
    overflow-wrap: anywhere;
}

.learning-card {
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.74);
    box-shadow: var(--shadow-soft);
}

.learning-card p {
    margin-bottom: 0.95rem;
    color: var(--muted);
    font-size: 0.95rem;
}

.learning-card .learning-title {
    margin-bottom: 0.22rem;
    color: var(--ink);
    font-size: 1rem;
    font-weight: 850;
}

.control-panel {
    display: grid;
    gap: 14px;
    margin-bottom: 22px;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    padding: 18px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 22px 48px rgba(76, 54, 35, 0.12);
}

.primary-search-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: end;
}

.primary-search-actions {
    display: flex;
    gap: 10px;
    align-items: end;
}

.primary-search-actions button,
.primary-search-actions .button-link {
    min-height: 62px;
    padding-right: 1.25rem;
    padding-left: 1.25rem;
}

.primary-search-field input {
    min-height: 62px;
    border-color: #dbc8af;
    padding-right: 1.15rem;
    padding-left: 1.15rem;
    font-size: 1.04rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.control-panel label span {
    display: block;
    margin-bottom: 0.42rem;
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 850;
}

.residency-filter {
    display: grid;
    gap: 4px;
    border-top: 1px solid #eee2d2;
    padding-top: 12px;
}

.checkbox-field {
    display: flex;
    width: fit-content;
    max-width: 100%;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    font-weight: 850;
    cursor: pointer;
}

.checkbox-field input[type="checkbox"] {
    width: 1.1rem;
    min-width: 1.1rem;
    height: 1.1rem;
    min-height: 1.1rem;
    margin: 0;
    accent-color: var(--red);
    cursor: pointer;
}

.control-panel .checkbox-field span {
    display: inline;
    margin-bottom: 0;
    color: var(--ink);
    font-size: 0.95rem;
}

.residency-filter p {
    margin: 0;
    color: var(--muted);
    font-size: 0.88rem;
}

.hero-content,
.learning-card,
.control-panel label,
.primary-search-row,
.filter-actions,
.notice {
    min-width: 0;
}

.advanced-filters {
    border-top: 1px solid #eee2d2;
    padding-top: 10px;
}

.advanced-filters summary {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    border-radius: 8px;
    color: var(--red);
    font-size: 0.95rem;
    font-weight: 850;
    cursor: pointer;
}

.advanced-filters summary:hover {
    color: var(--red-dark);
}

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

.advanced-filters summary::after {
    margin-left: 0.45rem;
    color: var(--muted);
    content: "↓";
    font-size: 0.9rem;
}

.advanced-filters[open] summary::after {
    content: "↑";
}

.advanced-filters .summary-less {
    display: none;
}

.advanced-filters[open] .summary-more {
    display: none;
}

.advanced-filters[open] .summary-less {
    display: inline;
}

.advanced-filter-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
    align-items: end;
    margin-top: 12px;
    border-radius: 8px;
    padding: 12px;
    background: #fffaf4;
}

.advanced-filter-location {
    grid-column: span 4;
}

.advanced-filter-radius {
    grid-column: span 2;
}

.advanced-filter-region,
.advanced-filter-municipality,
.advanced-filter-job-area,
.advanced-filter-occupation {
    grid-column: span 3;
}

.advanced-filter-occupation {
    align-self: start;
}

.advanced-filter-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 14px;
}

.advanced-filter-submit {
    min-width: 150px;
}

.location-autocomplete {
    position: relative;
    min-width: 0;
}

.location-autocomplete label span {
    display: block;
    margin-bottom: 0.42rem;
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 850;
}

.location-suggestions {
    position: absolute;
    z-index: 30;
    right: 0;
    left: 0;
    max-height: 270px;
    margin-top: 6px;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    overflow-y: auto;
    background: var(--surface);
    box-shadow: 0 18px 36px rgba(76, 54, 35, 0.16);
}

.location-suggestion-option {
    display: block;
    width: 100%;
    min-height: 42px;
    border: 0;
    border-radius: 0;
    padding: 0.72rem 0.9rem;
    background: transparent;
    color: var(--ink);
    font-size: 0.95rem;
    font-weight: 700;
    text-align: left;
}

.location-suggestion-option:hover,
.location-suggestion-option.is-active {
    background: #f4eadc;
    color: var(--red-dark);
}

.location-suggestion-status {
    margin: 0.45rem 0 0;
    color: var(--muted);
    font-size: 0.86rem;
}

.occupation-combobox {
    position: relative;
    min-width: 0;
}

.occupation-combobox label span {
    display: block;
    margin-bottom: 0.42rem;
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 850;
}

.occupation-suggestions {
    position: absolute;
    z-index: 32;
    right: 0;
    left: 0;
    max-height: min(320px, 55vh);
    margin-top: 6px;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    overflow-y: auto;
    background: var(--surface);
    box-shadow: 0 18px 36px rgba(76, 54, 35, 0.16);
}

.occupation-suggestion-option {
    display: block;
    width: 100%;
    min-height: 42px;
    border: 0;
    border-radius: 0;
    padding: 0.72rem 0.9rem;
    background: transparent;
    color: var(--ink);
    font-size: 0.95rem;
    font-weight: 700;
    text-align: left;
}

.occupation-suggestion-option:hover,
.occupation-suggestion-option.is-active {
    background: #f4eadc;
    color: var(--red-dark);
}

.occupation-suggestion-empty {
    padding: 0.72rem 0.9rem;
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 700;
}

.occupation-noscript-select {
    margin-top: 0.55rem;
}

.filter-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

button,
.button-link,
.primary-link {
    display: inline-flex;
    min-height: 50px;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 8px;
    padding: 0.8rem 1.05rem;
    background: var(--red);
    color: #ffffff;
    font-weight: 850;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
    white-space: normal;
}

button:hover,
.primary-link:hover {
    background: var(--red-dark);
    color: #ffffff;
}

button:active,
.button-link:active,
.primary-link:active {
    transform: translateY(1px);
}

.button-link {
    border: 1px solid var(--line);
    background: #f4eadc;
    color: var(--red);
}

.button-link:hover {
    background: #eadcc9;
    color: var(--red-dark);
}

.has-custom-selects select[data-custom-select] {
    display: none;
}

.custom-select {
    position: relative;
    min-width: 0;
}

.custom-select-button {
    width: 100%;
    min-height: 50px;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0.8rem 2.35rem 0.8rem 0.95rem;
    background: var(--surface);
    color: var(--ink);
    font-size: 0.95rem;
    font-weight: 400;
    line-height: 1.2;
    text-align: left;
    box-shadow: none;
    white-space: normal;
}

.custom-select-button::after {
    position: absolute;
    top: 50%;
    right: 1rem;
    width: 0.54rem;
    height: 0.54rem;
    border-right: 2px solid var(--muted);
    border-bottom: 2px solid var(--muted);
    content: "";
    pointer-events: none;
    transform: translateY(-68%) rotate(45deg);
}

.custom-select-button:hover,
.custom-select.is-open .custom-select-button {
    border-color: var(--line-strong);
    background: #ffffff;
    color: var(--ink);
}

.custom-select-button:focus {
    outline: 3px solid rgba(167, 43, 43, 0.22);
    outline-offset: 2px;
}

.custom-select-button[aria-disabled="true"] {
    background: #f6efe5;
    color: var(--muted-soft);
    cursor: not-allowed;
}

.custom-select-button[aria-disabled="true"]::after {
    border-color: var(--muted-soft);
}

.custom-select-value {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.custom-select-options {
    position: absolute;
    z-index: 36;
    right: 0;
    left: 0;
    max-height: min(320px, 55vh);
    margin-top: 6px;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    overflow-y: auto;
    background: var(--surface);
    box-shadow: 0 18px 36px rgba(76, 54, 35, 0.16);
}

.custom-select-option {
    display: block;
    width: 100%;
    min-height: 42px;
    border: 0;
    border-radius: 0;
    padding: 0.72rem 0.9rem;
    background: transparent;
    color: var(--ink);
    font-size: 0.95rem;
    font-weight: 700;
    text-align: left;
}

.custom-select-option:hover,
.custom-select-option.is-active,
.custom-select-option.is-selected {
    background: #f4eadc;
    color: var(--red-dark);
}

.custom-select-option[aria-disabled="true"] {
    color: var(--muted-soft);
    cursor: not-allowed;
}

.learning-link {
    min-height: 44px;
    width: 100%;
}

.active-criteria {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 12px;
    align-items: center;
    margin: -8px 0 24px;
}

.active-criteria p {
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 850;
}

.criteria-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.criteria-chip {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    gap: 8px;
    border: 1px solid #dcc9b1;
    border-radius: 999px;
    padding: 0.35rem 0.65rem 0.35rem 0.78rem;
    background: rgba(255, 255, 255, 0.86);
    color: var(--red);
    font-size: 0.88rem;
    font-weight: 850;
    text-decoration: none;
    box-shadow: 0 8px 18px rgba(76, 54, 35, 0.055);
}

.criteria-chip:hover {
    border-color: var(--line-strong);
    background: #f4eadc;
    color: var(--red-dark);
}

.criteria-chip strong {
    font-size: 1.08rem;
    line-height: 1;
}

.results-header {
    display: flex;
    gap: 20px;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 14px;
    color: var(--muted);
}

.results-header h2,
.results-header p {
    margin-bottom: 0;
}

.results-header h2 {
    color: var(--ink);
    font-size: 1.32rem;
}

.results-query {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem 0.9rem;
    margin-top: 0.2rem;
    color: var(--muted);
}

.results-query span {
    display: inline-flex;
}

.results-sort {
    flex: 0 0 auto;
    min-width: 240px;
}

.results-sort label {
    display: block;
    width: 100%;
}

.results-sort label span {
    display: block;
    margin-bottom: 0.42rem;
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 850;
}

.results-sort select {
    font-size: 0.95rem;
    font-weight: 850;
    cursor: pointer;
}

.results-sort noscript button {
    margin-top: 8px;
    min-height: 40px;
    width: 100%;
}

.notice,
.empty-state,
.job-detail {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.notice {
    padding: 24px;
}

.notice-compact {
    margin-bottom: 18px;
    padding: 14px 16px;
    color: var(--muted);
    font-size: 0.94rem;
}

.empty-state {
    padding: 44px;
}

.empty-state p {
    max-width: 620px;
    color: var(--muted);
}

.job-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 14px;
    align-items: stretch;
}

.job-card {
    display: flex;
    height: 100%;
    min-height: 238px;
    flex-direction: column;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    padding: 18px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 10px 24px rgba(76, 54, 35, 0.065);
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.job-card:hover {
    border-color: #d7bfa3;
    box-shadow: 0 18px 36px rgba(76, 54, 35, 0.115);
    transform: translateY(-2px);
}

.job-card-main {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.job-card-top {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 13px;
}

.badge {
    display: inline-flex;
    min-height: 28px;
    align-items: center;
    border-radius: 999px;
    padding: 0.28rem 0.66rem;
    font-size: 0.78rem;
    font-weight: 850;
}

.badge-active {
    background: var(--green-soft);
    color: var(--green);
}

.deadline {
    display: grid;
    justify-items: end;
    text-align: right;
}

.deadline span {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 850;
}

.deadline time,
.deadline strong {
    color: var(--red);
    font-size: 0.95rem;
    font-weight: 850;
}

.job-card h2 {
    margin-bottom: 0.62rem;
    color: var(--ink);
    font-size: 1.08rem;
    line-height: 1.22;
}

.job-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 0.68rem;
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 750;
}

.job-card-meta span + span::before {
    margin-right: 8px;
    color: var(--line-strong);
    content: "/";
}

.job-card-excerpt {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
    margin-bottom: 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.job-card-bottom {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    margin-top: auto;
}

.job-card-dates,
.job-facts {
    margin: 0;
}

.job-card-dates {
    display: grid;
    flex: 0 0 auto;
    gap: 10px;
    padding: 12px 0 14px;
}

.job-card-dates div,
.job-facts div {
    min-width: 0;
}

dt {
    margin-bottom: 0.15rem;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 850;
}

dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.job-card-footer {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: flex-end;
    border-top: 1px solid #eee2d2;
    padding-top: 14px;
}

.job-card-footer .primary-link {
    min-height: 44px;
    padding: 0.66rem 0.9rem;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: center;
    margin-top: 30px;
}

.pagination a,
.pagination-current,
.pagination-gap {
    display: inline-flex;
    min-width: 42px;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0.55rem 0.78rem;
    background: var(--surface);
    color: var(--red);
    font-weight: 850;
    text-decoration: none;
}

.pagination a:hover {
    background: #f4eadc;
    color: var(--red-dark);
}

.pagination-current {
    border-color: var(--red);
    background: var(--red);
    color: #ffffff;
}

.pagination-gap {
    border-color: transparent;
    background: transparent;
    color: var(--muted);
}

.back-link {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    margin-bottom: 22px;
    padding: 0.58rem 0.82rem;
    background: rgba(255, 255, 255, 0.74);
    color: var(--red);
    font-weight: 850;
    text-decoration: none;
    box-shadow: 0 8px 18px rgba(76, 54, 35, 0.055);
}

.back-link::before {
    margin-right: 0.45rem;
    content: "←";
}

.back-link:hover {
    border-color: var(--line-strong);
    background: var(--surface);
    color: var(--red-dark);
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(270px, 320px);
    gap: 18px;
    align-items: start;
}

.detail-sidebar {
    display: grid;
    gap: 14px;
    position: sticky;
    top: 22px;
}

.detail-sidebar .primary-link,
.detail-sidebar .button-link {
    width: 100%;
}

.detail-sidebar .learning-card {
    max-width: none;
}

.job-detail {
    padding: 34px;
}

.job-detail-header {
    display: grid;
    gap: 10px;
    margin-bottom: 24px;
    border-bottom: 1px solid #eee2d2;
    padding-bottom: 22px;
}

.job-detail-kicker {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.job-detail-kicker .eyebrow {
    margin-bottom: 0;
}

.job-detail-header h1 {
    margin-bottom: 0.15rem;
    font-size: 2rem;
    line-height: 1.12;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 1rem;
    font-weight: 750;
}

.detail-meta span + span::before {
    margin-right: 8px;
    color: var(--line-strong);
    content: "/";
}

.job-detail-header .badge {
    width: fit-content;
}

.info-box {
    margin-bottom: 24px;
    border-left: 4px solid var(--red);
    border-radius: 8px;
    padding: 16px 18px;
    background: var(--surface-soft);
    color: #4a403a;
}

.detail-status {
    border: 1px solid var(--line);
    border-left: 4px solid var(--red);
    background: linear-gradient(180deg, #fffdfa, var(--surface-soft));
}

.detail-status h2 {
    margin-bottom: 0.35rem;
    font-size: 1.08rem;
}

.detail-status p {
    margin-bottom: 0;
    color: var(--muted);
}

.detail-section h2 {
    margin-bottom: 13px;
    font-size: 1.15rem;
}

.detail-body-section {
    margin-bottom: 28px;
}

.job-body {
    color: #342c28;
    font-size: 1.02rem;
}

.job-body h2,
.job-body h3,
.job-body h4 {
    margin-top: 1.35rem;
    margin-bottom: 0.55rem;
    font-size: 1.2rem;
}

.job-body p,
.job-body ul,
.job-body ol {
    margin-bottom: 1rem;
}

.job-body li + li {
    margin-top: 0.35rem;
}

.job-body a {
    font-weight: 800;
}

.job-facts {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-soft);
}

.job-facts div {
    display: grid;
    grid-template-columns: minmax(120px, 0.62fr) minmax(0, 1.38fr);
    gap: 14px;
    align-items: baseline;
    border-bottom: 1px solid #eee2d2;
    padding: 13px 16px;
}

.job-facts div:last-child {
    border-bottom: 0;
}

.job-feature-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.job-feature-tags span {
    display: inline-flex;
    min-height: 32px;
    align-items: center;
    border: 1px solid #d9c8b1;
    border-radius: 999px;
    padding: 0.34rem 0.72rem;
    background: #fffaf4;
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 850;
}

.side-back-link {
    box-shadow: 0 8px 18px rgba(76, 54, 35, 0.055);
}

.deadline-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 18px;
    background: linear-gradient(180deg, var(--surface), var(--surface-soft));
    box-shadow: 0 12px 26px rgba(76, 54, 35, 0.075);
}

.side-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 18px;
    background: var(--surface);
    box-shadow: 0 12px 26px rgba(76, 54, 35, 0.06);
}

.side-card h2 {
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.side-card p {
    margin-bottom: 0.7rem;
    color: var(--muted);
    font-size: 0.94rem;
}

.side-card p:last-child {
    margin-bottom: 0;
}

.side-card .primary-link {
    margin-top: 0.25rem;
}

.deadline-card p {
    margin-bottom: 0.35rem;
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 850;
}

.deadline-card time,
.deadline-card strong {
    display: block;
    color: var(--red);
    font-size: 1.38rem;
    font-weight: 900;
    line-height: 1.15;
}

@media (max-width: 980px) {
    h1 {
        font-size: 2.25rem;
    }

    .detail-layout {
        grid-template-columns: 1fr;
    }

    .detail-sidebar {
        position: static;
    }

    .control-panel {
        grid-template-columns: 1fr;
    }

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

    .advanced-filter-location,
    .advanced-filter-radius,
    .advanced-filter-region,
    .advanced-filter-municipality,
    .advanced-filter-job-area,
    .advanced-filter-occupation {
        grid-column: auto;
    }

    .hero {
        grid-template-columns: 1fr;
    }

    .learning-card {
        max-width: 560px;
    }

    .results-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .results-sort {
        width: fit-content;
    }
}

@media (max-width: 700px) {
    .page,
    .page-detail {
        width: min(100% - 24px, 1180px);
        padding: 22px 0 44px;
    }

    .site-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 16px;
        margin-bottom: 28px;
    }

    .brand-link {
        width: min(230px, 62vw);
    }

    .language-toggle {
        width: 100%;
    }

    .language-toggle a {
        flex: 1;
    }

    h1,
    .job-detail-header h1 {
        font-size: 2rem;
        line-height: 1.12;
    }

    .job-detail {
        padding: 24px;
    }

    .hero {
        gap: 22px;
        padding-bottom: 24px;
    }

    .results-sort {
        width: 100%;
    }

    .results-query span {
        display: inline-flex;
    }

    .job-grid {
        grid-template-columns: 1fr;
    }

    .job-facts div {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .filter-actions {
        flex-direction: column;
        width: 100%;
    }

    .primary-search-row,
    .advanced-filter-grid {
        grid-template-columns: 1fr;
    }

    .advanced-filter-actions {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }

    .advanced-filter-submit,
    .advanced-filter-actions .button-link {
        width: 100%;
    }

    .primary-search-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        width: 100%;
    }

    button,
    .button-link,
    .primary-link {
        width: 100%;
    }
}

@media (max-width: 460px) {
    .primary-search-actions {
        grid-template-columns: 1fr;
    }

    .job-card-top {
        align-items: flex-start;
        flex-direction: column;
    }

    .deadline {
        justify-items: start;
        text-align: left;
    }
}
