body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #1f2937;
    background: #f5f7fb;
    font-size:14px;
    line-height: 1.8;
}

main {
    margin: 0 auto;
}

.site-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    box-sizing: border-box;
}

.main-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 32px;
    align-items: start;
}

.content-panel {
    min-width: 0;
}

.right-sidebar {
    display: grid;
    gap: 24px;
    width: 300px;
}

.full-section {
    width: 100%;
}

.two-column-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 32px;
    align-items: stretch;
}

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

.search-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: 0 auto;
    padding: 14px 0;
}

.footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: 0 auto 24px;
    padding: 14px 0;
    font-size: 12px;
    color: #747474;
}

.search-header-logo {
    flex: 0 0 auto;
    color: #111827;
    font-size: 2.2em;
    font-weight: 800;
    text-decoration: none;
}

.search-header-branding {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 10px;
}

.search-header-branding .search-header-logo {
    margin-bottom: 0;
}

.search-header-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    margin-top:15px;
}

.search-header-nav-link {
    color: #334155;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.search-header-nav-link:hover,
.search-header-nav-link:focus {
    color: #193266;
}

.nav-toggle {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.nav-toggle-button {
    display: none;
}

.search-header-form {
    display: flex;
    flex: 1;
    justify-content: flex-end;
    gap: 8px;
    min-width: 0;
}

.search-header-input {
    flex: 1 1 420px;
    max-width: 520px;
    height: 40px;
    font-size: 15px;
    background: #fff;
}

.search-header-button {
    height: 42px;
    padding: 0 16px;
    font-size: 15px;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.panel {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 32px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.results-page .panel {
    padding: 28px;
}

.search-panel {
 /*   max-width: 760px; */
    margin: 0 auto 24px;
}

.recent-panel {
    max-width: 760px;
    margin: 24px auto 0;
}

.home-page .search-panel,
.home-page .recent-panel {
    max-width: none;
}

.home-page .search-panel {
    margin: 0 auto;
}

.public-jobs-section {
    margin-top: 24px;
}

.recent-card {
    display: flex;
    min-height: 80px;
    flex-direction: column;
    justify-content: space-between;
    gap: 14px;
    padding: 18px 18px 8px 18px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
}

.recent-card h2 {
    display: -webkit-box;
    min-height: 20px;
    margin: 0;
    overflow: hidden;
    color: #111827;
    font-size: 15px;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.recent-card p {
    display: -webkit-box;
    min-height: 48px;
    margin: 0;
    overflow: hidden;
    font-size: 13px;
    line-height: 1.6;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.job-preview-list {
    display: grid;
    gap: 10px;
    padding: 16px 0 0;
    border-top: 1px solid #e5e7eb;
}

.job-preview-item {
    display: grid;
    gap: 8px;
    padding: 14px 0;
    border-bottom: 1px solid #eef2f7;
}

.job-preview-item:last-child {
    border-bottom: 0;
}

.job-preview-item h2 {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    color: #111827;
    font-size: 16px;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.job-preview-item h2 a {
    color: inherit;
    text-decoration: none;
    font-weight: 500;
}

.job-preview-item h2 a:hover,
.job-preview-item h2 a:focus {
    color: #193266;
    text-decoration: underline;
}

.job-preview-item dl {
    display: grid;
    grid-template-columns: minmax(120px, 1.1fr) minmax(210px, 1.5fr) minmax(90px, 0.8fr);
    gap: 10px 16px;
    margin: 0;
    color: #64748b;
    font-size: 13px;
    line-height: 1.5;
}

.job-preview-item dl div {
    min-width: 0;
}

.job-preview-item dt {
    margin: 0;
    color: #94a3b8;
    font-size: 12px;
    font-weight: 700;
}

.job-preview-item dd {
    margin: 2px 0 0;
    overflow-wrap: anywhere;
}

.ad-sidebar,
.ad-banner {
    min-height: 220px;
}

.ad-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    color: #94a3b8;
    background: #f8fafc;
    font-weight: 700;
}

.same-region-panel {
    margin-top: 0;
}

.right-sidebar .panel {
    padding: 20px;
}

.right-sidebar h2 {
    font-size: 18px;
}


.section-header,
.header,
.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.section-header,
.header {
    align-items: flex-end;
    margin-bottom: 18px;
}

.header {
    margin-bottom: 20px;
}

.section + .section {
    margin-top: 30px;
    padding-top: 28px;
    border-top: 1px solid #e5e7eb;
}

h1 {
    margin: 0 0 8px;
    font-size: 20px;
    line-height: 1.5;
}

.results-page h1 {
    margin-bottom: 6px;
    font-size: 24px;
}

.detail-page h1 {
    margin-bottom: 24px;
    font-size: 24px;
    padding: 20px 25px;
    background-color: #002e7d;
    color: #fff;
    font-weight: 500;
    border-radius: 5px;
}

h2 {
    margin: 0 0 16px;
    font-size: 20px;
}

p {
    margin: 0 0 24px;
    color: #6b7280;
}

.section-header p,
.header p,
.detail-page p {
    margin: 0;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
}

.form-row {
    display: flex;
    gap: 10px;
}

input {
    flex: 1;
    min-width: 0;
    height: 44px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 0 14px;
    font-size: 16px;
}

button {
    height: 46px;
    border: 0;
    border-radius: 6px;
    padding: 0 18px;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    background: #2563eb;
    cursor: pointer;
}

.share-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px 14px;
    margin-top: 22px;
}

.share-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 0;
    background: transparent;
}

.share-button:hover,
.share-button:focus {
    opacity: 0.8;
}

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

.share-link-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    font-size: 12px;
    line-height: 1.4;
}

.share-link-list a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    color: #475569;
    text-decoration: none;
}

.share-link-list img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.share-link-list a:hover,
.share-link-list a:focus {
    color: #193266;
    opacity: 0.8;
}

.share-feedback {
    display: none;
    max-width: 320px;
    color: #166534;
    font-size: 13px;
    line-height: 1.5;
    text-align: right;
    overflow-wrap: anywhere;
}

.share-feedback.is-visible {
    display: block;
}

.alert {
    margin-bottom: 18px;
    padding: 12px 14px;
    border-radius: 6px;
    color: #991b1b;
    background: #fee2e2;
    border: 1px solid #fecaca;
}

.table-wrap {
    overflow-x: auto;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
}

.results-page table {
    min-width: 720px;
}

.detail-page table {
    min-width: 0;
    margin-top: 18px;
    font-size: 14px;
}

th,
td {
    padding: 13px 14px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
    vertical-align: top;
    font-size: 14px;
}

.detail-page th,
.detail-page td {
    padding: 10px 8px;
    text-align: right;
}

.detail-page th:first-child,
.detail-page td:first-child {
    text-align: left;
}

th {
    color: #475569;
    background: #f8fafc;
    font-weight: 700;
    white-space: nowrap;
}

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

td {
    overflow-wrap: anywhere;
}

dl {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 14px 18px;
    margin: 0;
}

dt {
    font-weight: 500;
    color: #475569;
}

dd {
    margin: 0;
    word-break: keep-all;
    overflow-wrap: anywhere;
}

.company {
    min-width: 170px;
    font-weight: 500;
}

.results-page .company {
    min-width: 160px;
}

.address {
    min-width: 240px;
}

.results-page .address {
    min-width: 220px;
}

.domain {
    min-width: 160px;
}

.muted,
.page-disabled {
    color: #94a3b8;
}

a,
.homepage-link,
.back-link {
    color: #193266;
    text-decoration: none;
}

.button-link,
.button {
    display: inline-block;
    min-width: 68px;
    padding: 8px 11px;
    border-radius: 6px;
    text-align: center;
    white-space: nowrap;
}

.page-link,
.page-disabled {
    display: inline-block;
    min-width: 35px;
    padding: 8px 5px;
    border-radius: 6px;
    text-align: center;
    white-space: nowrap;
}

.button-link,
.button {
    color: #fff;
    background: #2563eb;
}

.page-link {
    border: 1px solid #cbd5e1;
    color: #2563eb;
    background: #fff;
}

.page-disabled {
    border: 1px solid #e5e7eb;
    background: #f8fafc;
}

.pagination {
    margin-top: 18px;
}

.page-state {
    color: #475569;
    font-weight: 700;
}

.back {
    white-space: nowrap;
}

.back-link {
    display: inline-block;
}

.same-region-panel {
    margin-top: 24px;
}

.same-region-list {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.same-region-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 6px 0;
    border-bottom: 1px solid #e5e7eb;
}

.same-region-list li:last-child {
    border-bottom: 0;
}

.same-region-list span {
    color: #64748b;
    font-size: 14px;
    white-space: nowrap;
}

.right-sidebar .same-region-panel {
    margin-top: 0;
}

.recent-job-list {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.recent-job-list li {
    padding: 6px 0;
    border-bottom: 1px solid #e5e7eb;
    overflow-wrap: anywhere;
}

.recent-job-list li:last-child {
    border-bottom: 0;
}

.empty {
    margin: 0;
    color: #6b7280;
}

p.source {
    margin: 14px 0 14px;
    color: #797979;
    font-size: 12px;
}

.chart-area {
    position: relative;
    height: 200px;
    width: 100%;
}

@media (max-width: 1024px) {
    .main-layout,
    .two-column-section {
        grid-template-columns: 1fr;
    }

    .right-sidebar {
        width: 100%;
    }

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

@media (max-width: 640px) {

    .results-page .header,
    .results-page .pagination {
        display: block;
    }

    .back,
    .page-state {
        display: inline-block;
        margin-top: 14px;
    }

    .page-disabled,
    .page-link {
        margin-right: 6px;
    }

    input {
        padding: 10px 14px;
    }
}

@media (max-width: 560px) {
    input {
        padding: 10px 14px;
    }

    main {
        margin: 28px auto;
    }

    .site-container {
        padding: 0 16px;
    }

    .search-header {
        position: relative;
        display: flex;
        flex-wrap: wrap;
        margin-bottom: 18px;
        padding-top: 0;
    }

    .search-header-logo {
        display: inline-block;
        margin-bottom: 0;
    }

    .nav-toggle-button {
        display: inline-flex;
        flex: 0 0 auto;
        width: 42px;
        height: 42px;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        gap: 5px;
        border: 1px solid #cbd5e1;
        border-radius: 8px;
        background: #fff;
        cursor: pointer;
    }

    .nav-toggle-button span {
        display: block;
        width: 18px;
        height: 2px;
        border-radius: 999px;
        background: #334155;
        transition: transform 0.18s ease, opacity 0.18s ease;
    }

    .nav-toggle:checked + .nav-toggle-button span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .nav-toggle:checked + .nav-toggle-button span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle:checked + .nav-toggle-button span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .search-header-branding {
        display: none;
        flex: 1 0 100%;
        margin: 10px 0 0;
    }

    .nav-toggle:checked ~ .search-header-branding {
        display: block;
    }

    .search-header-nav {
        display: grid;
        gap: 0;
        margin-top: 0;
        overflow: hidden;
        border: 1px solid #e5e7eb;
        border-radius: 8px;
        background: #fff;
    }

    .search-header-nav-link {
        display: block;
        padding: 12px 14px;
        border-bottom: 1px solid #e5e7eb;
        font-size: 14px;
    }

    .search-header-nav-link:last-child {
        border-bottom: 0;
    }

    .search-header-form {
        flex-direction: column;
    }

    .search-header-input {
        flex-basis: auto;
        max-width: none;
        width: 100%;
        box-sizing: border-box;
    }

    .search-header-button {
        width: 100%;
    }

    .panel,
    .results-page .panel {
        padding: 20px;
    }

    .card-grid-5 {
        grid-template-columns: 1fr;
    }

    .two-column-section {
        gap: 20px;
    }

    .section-header {
        display: block;
    }

    .section-header p {
        margin-top: 6px;
    }

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

    .form-row {
        flex-direction: column;
    }

    button {
        width: 100%;
    }

    .share-actions {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
    }

    .share-button {
        flex: 0 0 30px;
        width: 30px;
    }

    .share-link-list {
        flex-wrap: nowrap;
        justify-content: center;
    }

    .share-feedback {
        flex-basis: 100%;
        max-width: none;
        text-align: center;
    }

    dl {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    dd {
        margin-bottom: 12px;
    }

    .chart-area {
        height: 260px;
    }
}


.contact-panel {
    max-width: 760px;
    margin: 0 auto;
}

.contact-form {
    display: grid;
    gap: 10px;
}

.contact-form input,
.contact-form textarea {
    box-sizing: border-box;
    width: 100%;
}

.contact-form textarea {
    resize: vertical;
}

.contact-form button {
    width: fit-content;
    margin-top: 8px;
}

.contact-errors {
    margin-bottom: 18px;
    padding: 12px 14px;
    border: 1px solid #fecaca;
    border-radius: 6px;
    color: #991b1b;
    background: #fef2f2;
}

.contact-errors ul {
    margin: 0;
    padding-left: 20px;
}

.contact-honeypot {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.footer-links {
    flex: 0 0 auto;
    white-space: nowrap;
}


.admin-page main {
    max-width: 920px;
}

.admin-panel {
    max-width: 820px;
    margin: 0 auto;
}

.admin-results {
    margin-top: 24px;
}

.admin-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}

.admin-header .search-header-logo {
    display: inline-block;
    margin-bottom: 12px;
}

.admin-form {
    display: grid;
    gap: 10px;
}

.admin-form input,
.admin-form textarea {
    box-sizing: border-box;
    width: 100%;
}

.admin-form button {
    width: fit-content;
    margin-top: 8px;
}

.admin-links {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.admin-confirm {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 8px;
}

.admin-confirm input {
    width: auto;
    margin-top: 7px;
}

.danger-button {
    background: #b91c1c;
}

.danger-button:hover,
.danger-button:focus {
    background: #991b1b;
}

.admin-result-summary {
    margin-bottom: 20px;
}

.notice {
    margin-bottom: 18px;
    padding: 12px 14px;
    border: 1px solid #fde68a;
    border-radius: 6px;
    color: #92400e;
    background: #fffbeb;
}

.admin-result-table {
    min-width: 760px;
}

.status-pill {
    display: inline-block;
    min-width: 68px;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
    background: #f1f5f9;
    color: #475569;
}

.status-success {
    color: #166534;
    background: #dcfce7;
}

.status-failed {
    color: #991b1b;
    background: #fee2e2;
}

.status-no_result,
.status-match_failed {
    color: #92400e;
    background: #fffbeb;
}

@media (max-width: 560px) {
    .admin-header {
        display: block;
    }

    .admin-form button,
    .contact-form button {
        width: 100%;
    }

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

.summary-text {
    color: #374151;
    line-height: 1.8;
    white-space: pre-line;
}

.job-detail-text {
    white-space: pre-wrap;
}
