:root {
    --navy: #14213d;
    --blue: #2563eb;
    --blue-dark: #1d4ed8;
    --teal: #0f766e;
    --ink: #182033;
    --muted: #667085;
    --line: #e4e8ef;
    --surface: #ffffff;
    --soft: #f5f7fb;
    --soft-blue: #eff6ff;
    --danger: #b42318;
    --radius: 18px;
    --shadow: 0 18px 50px rgba(20, 33, 61, 0.08);
}

* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

html {
    color: var(--ink);
    background: var(--soft);
    font-family: Pretendard, "Noto Sans KR", "Apple SD Gothic Neo", Inter, system-ui, sans-serif;
    line-height: 1.5;
    word-break: keep-all;
}

body {
    min-width: 320px;
    margin: 0;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
select,
input {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
summary:focus-visible,
select:focus-visible,
input:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.25);
    outline-offset: 2px;
}

.site-header {
    position: sticky;
    z-index: 10;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 70px;
    padding: 0 max(24px, calc((100% - 1180px) / 2));
    border-bottom: 1px solid rgba(228, 232, 239, 0.9);
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(12px);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    color: var(--navy);
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.brand-mark {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 10px;
    background: var(--navy);
    color: white;
    font-weight: 900;
}

.header-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 13px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: white;
    color: #475467;
    font-size: 0.84rem;
    font-weight: 700;
    transition: border-color 0.2s, color 0.2s;
}

.header-action:hover {
    border-color: #b9c5d8;
    color: var(--blue);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #98a2b3;
}

.header-action.connected .status-dot {
    background: #12b76a;
    box-shadow: 0 0 0 3px #d1fadf;
}

main {
    width: min(1180px, calc(100% - 48px));
    margin: 0 auto;
}

.hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 48px;
    padding: 78px 0 54px;
}

.hero-copy {
    max-width: 750px;
}

.eyebrow {
    margin: 0 0 7px;
    color: var(--blue);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.14em;
}

.hero h1,
.detail-hero h1 {
    margin: 0;
    color: var(--navy);
    font-size: clamp(2rem, 5vw, 3.5rem);
    line-height: 1.16;
    letter-spacing: -0.055em;
}

.hero-highlight {
    position: relative;
    z-index: 0;
    display: inline-block;
    color: var(--blue);
    white-space: nowrap;
}

.hero-highlight::after {
    position: absolute;
    z-index: -1;
    right: -0.08em;
    bottom: 0.06em;
    left: -0.08em;
    height: 0.28em;
    border-radius: 999px;
    background: #bfdbfe;
    content: "";
    transform: rotate(-1deg);
}

.hero-copy > p:last-child {
    max-width: 620px;
    margin: 19px 0 0;
    color: var(--muted);
    font-size: 1.05rem;
}

.hero-stat {
    flex: 0 0 auto;
    min-width: 148px;
    padding: 20px 22px;
    border-left: 3px solid var(--blue);
    background: var(--surface);
}

.hero-stat strong,
.hero-stat span {
    display: block;
}

.hero-stat strong {
    color: var(--navy);
    font-size: 2rem;
    line-height: 1.1;
}

.hero-stat span {
    margin-top: 4px;
    color: var(--muted);
    font-size: 0.82rem;
}

.search-panel,
.content-card,
.calendar-card,
.detail-hero {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.search-panel {
    overflow: hidden;
}

.search-toggle {
    display: flex;
    min-height: 76px;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 16px 22px;
    cursor: pointer;
    list-style: none;
}

.search-toggle::-webkit-details-marker {
    display: none;
}

.search-toggle-copy,
.search-toggle-action {
    display: flex;
    align-items: center;
}

.search-toggle-copy {
    gap: 13px;
}

.search-toggle-copy strong,
.search-toggle-copy small {
    display: block;
}

.search-toggle-copy strong {
    color: var(--navy);
    font-size: 1rem;
}

.search-toggle-copy small {
    margin-top: 1px;
    color: var(--muted);
    font-size: 0.75rem;
}

.search-icon {
    position: relative;
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    border-radius: 10px;
    background: var(--soft-blue);
}

.search-icon::before {
    position: absolute;
    top: 9px;
    left: 9px;
    width: 10px;
    height: 10px;
    border: 2px solid var(--blue);
    border-radius: 50%;
    content: "";
}

.search-icon::after {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 7px;
    height: 2px;
    border-radius: 999px;
    background: var(--blue);
    content: "";
    transform: rotate(45deg);
    transform-origin: left center;
}

.search-toggle-action {
    gap: 10px;
    color: var(--blue);
    font-size: 0.78rem;
    font-weight: 800;
}

.search-chevron {
    width: 9px;
    height: 9px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
    transition: transform 0.2s;
}

.search-panel[open] .search-chevron {
    transform: rotate(225deg) translate(-2px, -2px);
}

.search-panel[open] .search-toggle-label {
    font-size: 0;
}

.search-panel[open] .search-toggle-label::after {
    font-size: 0.78rem;
    content: "조건 접기";
}

.search-panel-body {
    padding: 19px 22px 22px;
    border-top: 1px solid var(--line);
}

.search-panel-tools {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #344054;
    font-size: 0.84rem;
}

.section-heading,
.results-heading,
.card-title-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
}

.section-heading h2,
.results-heading h2,
.content-card h2,
.calendar-card h2 {
    margin: 0;
    color: var(--navy);
    font-size: 1.3rem;
    letter-spacing: -0.035em;
}

.text-button,
.danger-text-button {
    padding: 5px;
    border: 0;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font-size: 0.84rem;
    font-weight: 700;
}

.text-button:hover {
    color: var(--blue);
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 15px;
}

.field {
    display: grid;
    gap: 8px;
}

.field > span,
.target-filter legend {
    color: #344054;
    font-size: 0.83rem;
    font-weight: 700;
}

select {
    width: 100%;
    height: 46px;
    padding: 0 38px 0 13px;
    border: 1px solid #d0d5dd;
    border-radius: 10px;
    background: white;
    color: var(--ink);
    cursor: pointer;
}

select:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.target-filter {
    margin: 17px 0 0;
    padding: 0;
    border: 0;
}

.chip-checks {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 9px;
}

.chip-checks input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.chip-checks span {
    display: inline-block;
    padding: 8px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--soft);
    color: #475467;
    cursor: pointer;
    font-size: 0.84rem;
    font-weight: 700;
    transition: all 0.18s;
}

.chip-checks input:checked + span {
    border-color: #bfdbfe;
    background: var(--soft-blue);
    color: var(--blue-dark);
}

.chip-checks input:focus-visible + span {
    outline: 3px solid rgba(37, 99, 235, 0.25);
}

.search-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 19px;
    padding-top: 17px;
    border-top: 1px solid var(--line);
}

.switch-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #344054;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 700;
}

.switch-label input {
    position: absolute;
    opacity: 0;
}

.switch {
    position: relative;
    width: 40px;
    height: 23px;
    border-radius: 999px;
    background: #d0d5dd;
    transition: background 0.2s;
}

.switch::after {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 17px;
    height: 17px;
    border-radius: 50%;
    background: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
    content: "";
    transition: transform 0.2s;
}

.switch-label input:checked + .switch {
    background: var(--blue);
}

.switch-label input:checked + .switch::after {
    transform: translateX(17px);
}

.primary-button,
.secondary-button,
.google-button {
    display: inline-flex;
    min-height: 43px;
    align-items: center;
    justify-content: center;
    padding: 0 18px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 800;
    transition: transform 0.16s, box-shadow 0.16s, background 0.16s;
}

.primary-button {
    border: 1px solid var(--blue);
    background: var(--blue);
    color: white;
}

.primary-button:hover {
    background: var(--blue-dark);
    box-shadow: 0 7px 16px rgba(37, 99, 235, 0.18);
    transform: translateY(-1px);
}

.secondary-button {
    border: 1px solid #cfd7e6;
    background: white;
    color: #344054;
}

.secondary-button:hover,
.google-button:hover {
    border-color: #98a2b3;
    transform: translateY(-1px);
}

button:disabled,
.disabled {
    cursor: wait;
    opacity: 0.55;
    pointer-events: none;
}

.results {
    padding: 55px 0 82px;
}

.results-heading p {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.job-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-top: 21px;
}

.job-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: var(--surface);
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.job-card:hover {
    border-color: #c5d2e8;
    box-shadow: 0 14px 32px rgba(20, 33, 61, 0.1);
    transform: translateY(-3px);
}

.job-card > a {
    display: grid;
    height: 100%;
    grid-template-rows: 122px 1fr;
}

.job-thumbnail {
    position: relative;
    display: grid;
    overflow: hidden;
    place-items: center;
    background: #e8eef8;
    color: #91a1bb;
    font-size: 2rem;
    font-weight: 900;
}

.job-thumbnail::before {
    position: absolute;
    width: 96px;
    height: 96px;
    border: 18px solid rgba(255, 255, 255, 0.34);
    border-radius: 50%;
    content: "";
}

.job-thumbnail img {
    position: absolute;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.job-thumbnail.has-image span {
    display: none;
}

.job-thumbnail span {
    z-index: 1;
}

.job-card-body {
    display: flex;
    min-height: 210px;
    flex-direction: column;
    padding: 20px;
}

.institution-name {
    margin: 0;
    color: var(--blue);
    font-size: 0.78rem;
    font-weight: 800;
}

.job-card h3 {
    display: -webkit-box;
    overflow: hidden;
    margin: 8px 0 0;
    color: var(--navy);
    font-size: 1.05rem;
    line-height: 1.45;
    letter-spacing: -0.025em;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.job-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 13px;
    margin-top: 15px;
    color: var(--muted);
    font-size: 0.76rem;
}

.card-link {
    margin-top: auto;
    padding-top: 20px;
    color: #344054;
    font-size: 0.82rem;
    font-weight: 800;
}

.job-card:hover .card-link {
    color: var(--blue);
}

.loading-card,
.detail-loading {
    border-radius: 15px;
    background: #edf0f5;
    animation: loading 1.4s infinite;
}

.loading-card {
    height: 332px;
}

@keyframes loading {
    50% { opacity: 0.55; }
}

.state-card {
    padding: 38px;
    border: 1px dashed #cbd2df;
    border-radius: 15px;
    background: white;
    text-align: center;
}

.state-card strong {
    display: block;
    color: var(--navy);
    font-size: 1.05rem;
}

.state-card p {
    margin: 8px 0 19px;
    color: var(--muted);
    font-size: 0.88rem;
}

.state-card.error {
    border-color: #fecdca;
    background: #fffbfa;
}

.full-width {
    grid-column: 1 / -1;
}

footer {
    padding: 24px;
    border-top: 1px solid var(--line);
    background: white;
    color: #98a2b3;
    text-align: center;
    font-size: 0.77rem;
}

/* Detail */

.detail-main {
    padding: 36px 0 80px;
}

.back-link {
    display: inline-block;
    margin-bottom: 19px;
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 700;
}

.back-link:hover {
    color: var(--blue);
}

.detail-loading {
    min-height: 360px;
    padding: 45px;
}

.loading-line,
.loading-block {
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.7);
}

.loading-line {
    width: 45%;
    height: 27px;
    margin-bottom: 16px;
}

.loading-line.wide {
    width: 72%;
    height: 58px;
}

.loading-block {
    height: 160px;
    margin-top: 50px;
}

.detail-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 32px;
    padding: 42px;
}

.detail-hero-main {
    max-width: 780px;
}

.detail-hero h1 {
    margin-top: 9px;
    font-size: clamp(1.8rem, 4vw, 2.75rem);
}

.detail-hero-actions {
    display: flex;
    flex: 0 0 auto;
    gap: 9px;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 21px;
}

.tag {
    padding: 5px 10px;
    border-radius: 999px;
    background: #f2f4f7;
    color: #475467;
    font-size: 0.74rem;
    font-weight: 800;
}

.tag.accent {
    background: #ecfdf3;
    color: var(--teal);
}

.published {
    margin: 17px 0 0;
    color: var(--muted);
    font-size: 0.82rem;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(300px, 0.85fr);
    gap: 20px;
    margin-top: 20px;
}

.detail-column,
.side-column {
    display: grid;
    align-content: start;
    gap: 20px;
}

.content-card,
.calendar-card {
    padding: 29px;
}

.content-card > h2,
.calendar-card h2 {
    margin-bottom: 23px;
}

.timeline {
    margin: 25px 0 0;
    padding: 0;
    list-style: none;
}

.timeline li {
    position: relative;
    display: grid;
    grid-template-columns: 34px 1fr;
    gap: 14px;
    min-height: 75px;
}

.timeline li:not(:last-child)::after {
    position: absolute;
    top: 32px;
    bottom: 0;
    left: 16px;
    width: 2px;
    background: #dbe6f8;
    content: "";
}

.timeline-marker {
    z-index: 1;
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border: 1px solid #bfdbfe;
    border-radius: 50%;
    background: var(--soft-blue);
    color: var(--blue);
    font-size: 0.74rem;
    font-weight: 900;
}

.timeline strong,
.timeline div > span {
    display: block;
}

.timeline strong {
    color: #344054;
    font-size: 0.92rem;
}

.timeline div > span {
    margin-top: 3px;
    color: var(--muted);
    font-size: 0.8rem;
}

.category-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.category-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 15px 16px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: #fafbfc;
}

.category-item strong {
    font-size: 0.88rem;
}

.category-item span {
    flex: 0 0 auto;
    color: var(--blue);
    font-size: 0.78rem;
    font-weight: 800;
}

.calendar-card {
    position: relative;
    overflow: hidden;
    border-top: 4px solid var(--blue);
}

.calendar-icon {
    display: grid;
    width: 43px;
    height: 43px;
    margin-bottom: 22px;
    place-items: center;
    border: 1px solid #bfdbfe;
    border-radius: 11px;
    background: var(--soft-blue);
    color: var(--blue);
    font-size: 0.9rem;
    font-weight: 900;
}

.muted,
.empty-inline {
    color: var(--muted);
    font-size: 0.84rem;
}

.calendar-card .muted {
    margin: 15px 0 20px;
}

.calendar-actions {
    display: grid;
    gap: 9px;
}

.google-button {
    border: 1px solid #d0d5dd;
    background: white;
    color: #344054;
}

.google-g {
    margin-right: 10px;
    color: #4285f4;
    font-size: 1rem;
    font-weight: 900;
}

.full-button {
    width: 100%;
}

.danger-text-button {
    margin-top: 4px;
    color: var(--danger);
}

.action-message {
    min-height: 20px;
    margin: 14px 0 0;
    color: var(--teal);
    font-size: 0.78rem;
    font-weight: 700;
}

.error-text {
    color: var(--danger);
}

.salary-year {
    margin: -12px 0 13px;
    color: var(--muted);
    font-size: 0.75rem;
}

.salary-highlight {
    padding: 18px;
    border-radius: 12px;
    background: var(--navy);
    color: white;
}

.salary-summary {
    display: grid;
    gap: 10px;
}

.salary-highlight-total {
    background: var(--blue);
}

.salary-highlight span,
.salary-highlight strong {
    display: block;
}

.salary-highlight span {
    color: #c9d3e4;
    font-size: 0.76rem;
}

.salary-highlight strong {
    margin-top: 4px;
    font-size: 1.45rem;
    letter-spacing: -0.035em;
}

.salary-breakdown {
    margin: 14px 0 0;
}

.salary-breakdown > div {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 2px;
    border-bottom: 1px solid #eef0f4;
    font-size: 0.77rem;
}

.salary-breakdown dt {
    color: var(--muted);
}

.salary-breakdown dd {
    margin: 0;
    color: #344054;
    font-weight: 700;
    text-align: right;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
    white-space: nowrap;
}

th,
td {
    padding: 12px 13px;
    border-bottom: 1px solid var(--line);
    text-align: right;
}

thead th {
    background: #f8fafc;
    color: var(--muted);
    font-size: 0.75rem;
}

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

tbody th {
    color: #344054;
}

tbody td {
    color: var(--muted);
}

.statistics-table {
    min-width: 620px;
    table-layout: fixed;
}

.statistics-table th,
.statistics-table td {
    padding: 11px 9px;
    text-align: center;
}

.statistics-table th:first-child {
    width: 20%;
    text-align: left;
}

.statistics-table thead th span,
.statistics-table thead th small {
    display: block;
}

.statistics-table thead th small {
    margin-top: 3px;
    color: #98a2b3;
    font-size: 0.66rem;
    font-weight: 600;
}

.stage-statistic {
    font-variant-numeric: tabular-nums;
}

.stage-statistic span,
.stage-statistic strong {
    color: #475467;
    font-weight: 700;
}

.stage-statistic b {
    margin: 0 4px;
    color: #b5bdca;
    font-weight: 500;
}

.stage-statistic strong,
.competition-ratio {
    color: var(--blue);
}

.competition-ratio {
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

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

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

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

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

@media (max-width: 680px) {
    .site-header {
        min-height: 62px;
        padding: 0 17px;
    }

    .brand {
        font-size: 1rem;
    }

    .brand-mark {
        width: 31px;
        height: 31px;
    }

    .header-action {
        max-width: 175px;
        overflow: hidden;
        padding: 8px 10px;
        font-size: 0.74rem;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    main {
        width: min(100% - 28px, 1180px);
    }

    .hero {
        align-items: flex-start;
        flex-direction: column;
        gap: 25px;
        padding: 49px 0 35px;
    }

    .hero-stat {
        width: 100%;
    }

    .search-panel,
    .content-card,
    .calendar-card,
    .detail-hero {
        border-radius: 14px;
    }

    .content-card,
    .calendar-card,
    .detail-hero {
        padding: 22px;
    }

    .search-toggle {
        min-height: 68px;
        padding: 13px 16px;
    }

    .search-toggle-copy small {
        display: none;
    }

    .search-toggle-label {
        display: none;
    }

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

    .filter-grid,
    .job-grid,
    .side-column,
    .category-list {
        grid-template-columns: 1fr;
    }

    .search-actions {
        align-items: stretch;
        flex-direction: column;
        gap: 19px;
    }

    .search-actions .primary-button {
        width: 100%;
    }

    .results {
        padding: 42px 0 60px;
    }

    .results-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }

    .job-card > a {
        grid-template-rows: 105px 1fr;
    }

    .detail-main {
        padding: 25px 0 60px;
    }

    .detail-hero-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .detail-hero-actions > * {
        flex: 1;
    }

    .side-column {
        grid-row: auto;
    }

    th,
    td {
        padding: 10px;
    }
}
