/* 교체 대상 파일: style.css */

:root {
    color-scheme: light;
    font-family: Arial, "Malgun Gothic", sans-serif;
    line-height: 1.65;
    color: #202124;
    background: #f3f5f7;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #f3f5f7;
}

.page {
    width: min(1100px, calc(100% - 32px));
    margin: 32px auto 60px;
}

.header {
    margin-bottom: 20px;
}

.header h1 {
    margin: 0 0 8px;
    font-size: 30px;
}

.header p {
    margin: 0;
    color: #5f6368;
}



.service-guide {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.service-card {
    padding: 18px 20px;
    border: 1px solid #d8dee7;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.035);
}


.service-card-current {
    border-color: #98b7e8;
    box-shadow: 0 4px 16px rgba(21, 88, 176, 0.09);
}

.service-time-current {
    background: #eaf7ef;
    color: #17663a;
}

.service-card-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 9px;
}

.service-card h2 {
    margin: 0;
    font-size: 19px;
}

.service-card p {
    margin: 0;
    color: #3f4650;
}

.service-card p + p {
    margin-top: 10px;
}

.service-note {
    padding-top: 10px;
    border-top: 1px solid #e5e9ef;
    color: #5f6368 !important;
    font-size: 14px;
}

.service-time {
    flex: 0 0 auto;
    padding: 3px 9px;
    border-radius: 999px;
    background: #eef4ff;
    color: #1558b0;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.panel {
    background: #ffffff;
    border: 1px solid #dfe3e8;
    border-radius: 10px;
    padding: 22px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}


.question-panel {
    padding-top: 18px;
}

.question-scope-notice {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 18px;
    padding: 14px 16px;
    border: 1px solid #e0c46c;
    border-radius: 8px;
    background: #fff9e8;
}

.question-scope-title {
    flex: 0 0 auto;
    padding: 3px 10px;
    border-radius: 999px;
    background: #8a6500;
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.question-scope-text {
    color: #4c3b0c;
}


.question-scope-notice-bottom {
    margin-top: 18px;
    margin-bottom: 0;
}

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

.question-input-wrap {
    position: relative;
}

textarea {
    width: 100%;
    min-height: 245px;
    resize: vertical;
    padding: 14px 14px 118px;
    border: 1px solid #b9c0c8;
    border-radius: 7px;
    font: inherit;
    background: #fff;
}



.question-scope-inside[hidden],
.question-scope-inside[aria-hidden="true"] {
    display: none !important;
}

.question-scope-inside {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 12px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 11px 13px;
    border: 1px solid #e0c46c;
    border-radius: 7px;
    background: rgba(255, 249, 232, 0.97);
    color: #4c3b0c;
    pointer-events: none;
}

.question-scope-inside-title {
    flex: 0 0 auto;
    padding: 2px 9px;
    border-radius: 999px;
    background: #8a6500;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.question-scope-inside-text {
    font-size: 13px;
    line-height: 1.55;
}

textarea:focus {
    outline: 2px solid #b9d1ff;
    border-color: #4b78c2;
}

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

button {
    min-height: 44px;
    padding: 0 18px;
    border: 0;
    border-radius: 7px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

button.primary {
    background: #1558b0;
    color: #fff;
}

button.current-complete {
    background: #17663a;
    color: #fff;
}

button.current-complete:hover {
    background: #125431;
}

button.secondary {
    background: #4b5563;
    color: #fff;
}

button:disabled {
    opacity: 0.55;
    cursor: wait;
}

.status {
    display: none;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 7px;
    background: #fff6d8;
    color: #5f4600;
}

.status strong {
    margin-left: auto;
    white-space: nowrap;
}

.status-spinner {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    border: 3px solid rgba(95, 70, 0, 0.2);
    border-top-color: #8a6500;
    border-radius: 50%;
    animation: processing-spin 0.8s linear infinite;
}

.error {
    margin-top: 20px;
    padding: 16px;
    border: 1px solid #e1a4a4;
    border-radius: 8px;
    background: #fff0f0;
    color: #8a1f1f;
    white-space: pre-wrap;
}

.result {
    margin-top: 22px;
}

.result-title {
    margin: 0 0 12px;
    font-size: 23px;
}

.result-section {
    margin-top: 14px;
    padding: 20px;
    border: 1px solid #dfe3e8;
    border-radius: 9px;
    background: #fff;
}

.result-section h2 {
    margin: 0 0 14px;
    font-size: 20px;
}

.answer-text {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.reason {
    margin-top: 14px;
    padding: 15px;
    border-left: 4px solid #6379a8;
    background: #f7f9fc;
}

.reason:first-of-type {
    margin-top: 0;
}

.reason-title {
    margin: 0 0 8px;
    font-weight: 700;
}

.reason p {
    margin: 7px 0 0;
}

.meta {
    margin-top: 12px;
    color: #5f6368;
    font-size: 14px;
}

@media (max-width: 900px) {
    .service-guide {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .page {
        width: min(100% - 20px, 1100px);
        margin-top: 18px;
    }

    .service-guide {
        grid-template-columns: 1fr;
    }


    .service-card,
    .panel,
    .result-section {
        padding: 16px;
    }

    .service-card-heading {
        align-items: flex-start;
    }

    textarea {
        min-height: 330px;
        padding-bottom: 185px;
    }

    .question-scope-inside {
        display: block;
    }

    .question-scope-inside-title {
        display: inline-block;
        margin-bottom: 7px;
    }

    .actions {
        display: grid;
    }

    button {
        width: 100%;
    }
}

body.is-processing {
    cursor: wait;
}

.processing-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(20, 27, 38, 0.52);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.18s ease, visibility 0.18s ease;
}

.processing-overlay.is-visible {
    opacity: 1;
    visibility: visible;
}

.processing-dialog {
    width: min(520px, 100%);
    padding: 28px;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.24);
    text-align: center;
}

.processing-spinner {
    width: 54px;
    height: 54px;
    margin: 0 auto 18px;
    border: 6px solid #e6edf7;
    border-top-color: #1558b0;
    border-radius: 50%;
    animation: processing-spin 0.85s linear infinite;
}

.processing-title {
    margin-bottom: 9px;
    font-size: 22px;
    font-weight: 700;
    color: #202124;
}

.processing-message {
    min-height: 54px;
    color: #4b5563;
}

.processing-elapsed {
    margin-top: 12px;
    color: #5f6368;
}

.processing-elapsed strong {
    color: #1558b0;
    font-size: 18px;
}

.processing-progress {
    height: 6px;
    margin-top: 18px;
    overflow: hidden;
    border-radius: 999px;
    background: #e7ebf1;
}

.processing-progress-bar {
    width: 38%;
    height: 100%;
    border-radius: inherit;
    background: #1558b0;
    animation: processing-slide 1.35s ease-in-out infinite;
}

@keyframes processing-spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes processing-slide {
    0% {
        transform: translateX(-120%);
    }

    50% {
        transform: translateX(120%);
    }

    100% {
        transform: translateX(310%);
    }
}

/* 사이트 공통 메뉴 */
.site-navigation {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 22px;
    padding: 6px;
    border: 1px solid #dce2ea;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.035);
}

.site-nav-link {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 15px;
    border-radius: 7px;
    color: #4b5563;
    font-weight: 700;
    text-decoration: none;
}

.site-nav-link:hover {
    background: #f1f5fa;
    color: #1558b0;
}

.site-nav-link.is-active {
    background: #1558b0;
    color: #ffffff;
}

.site-nav-link.is-disabled {
    margin-left: auto;
    color: #8a9099;
    cursor: default;
}

.site-nav-link.is-disabled small {
    margin-left: 6px;
    font-size: 11px;
    font-weight: 700;
}

/* 소개 페이지 */
.about-hero {
    padding: 42px 44px;
    border-radius: 14px;
    background:
        linear-gradient(135deg, rgba(16, 75, 153, 0.96), rgba(31, 54, 91, 0.96)),
        #1558b0;
    color: #ffffff;
    box-shadow: 0 14px 40px rgba(18, 56, 105, 0.2);
}

.about-eyebrow {
    margin-bottom: 13px;
    color: #bed8ff;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.about-hero h1 {
    margin: 0;
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.32;
    letter-spacing: -0.035em;
}

.about-hero p {
    max-width: 820px;
    margin: 21px 0 0;
    color: #e3edfb;
    font-size: 17px;
    line-height: 1.8;
}

.about-home-button {
    display: inline-flex;
    align-items: center;
    min-height: 46px;
    margin-top: 26px;
    padding: 0 18px;
    border-radius: 8px;
    background: #ffffff;
    color: #1558b0;
    font-weight: 800;
    text-decoration: none;
}

.about-home-button:hover {
    background: #eef5ff;
}

.about-principles {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 20px 0;
}

.about-principles article {
    padding: 20px;
    border: 1px solid #dce2ea;
    border-radius: 11px;
    background: #ffffff;
}

.about-principles span {
    display: block;
    margin-bottom: 11px;
    color: #1558b0;
    font-size: 13px;
    font-weight: 800;
}

.about-principles h2 {
    margin: 0 0 8px;
    font-size: 20px;
}

.about-principles p {
    margin: 0;
    color: #5f6368;
    font-size: 14px;
}

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

.about-toc {
    position: sticky;
    top: 18px;
    padding: 18px;
    border: 1px solid #dce2ea;
    border-radius: 10px;
    background: #ffffff;
}

.about-toc-title {
    margin-bottom: 10px;
    font-weight: 800;
}

.about-toc a {
    display: block;
    padding: 8px 0;
    border-bottom: 1px solid #edf0f4;
    color: #4b5563;
    font-size: 14px;
    text-decoration: none;
}

.about-toc a:last-child {
    border-bottom: 0;
}

.about-toc a:hover {
    color: #1558b0;
}

.about-article {
    overflow: hidden;
    border: 1px solid #dce2ea;
    border-radius: 12px;
    background: #ffffff;
}

.about-section {
    padding: 34px 38px;
    border-bottom: 1px solid #e7ebf0;
    scroll-margin-top: 18px;
}

.about-section:last-of-type {
    border-bottom: 0;
}

.about-section h2 {
    margin: 0 0 24px;
    color: #15191f;
    font-size: 25px;
    line-height: 1.45;
}

.about-section p {
    margin: 0 0 20px;
    line-height: 1.9;
    text-align: justify;
    word-break: keep-all;
}

.about-section p:last-child {
    margin-bottom: 0;
}

.about-section blockquote {
    margin: 24px 0;
    padding: 20px 22px;
    border-left: 5px solid #1558b0;
    background: #f2f6fc;
    color: #253752;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.75;
}

.about-principle-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin: 20px 0 26px;
    padding: 0;
    list-style: none;
    counter-reset: principle;
}

.about-principle-list li {
    counter-increment: principle;
    padding: 15px 14px;
    border: 1px solid #d9e3f0;
    border-radius: 8px;
    background: #f7faff;
}

.about-principle-list li::before {
    content: counter(principle) ".";
    margin-right: 7px;
    color: #1558b0;
    font-weight: 800;
}

.about-article-footer {
    padding: 28px 38px 38px;
    text-align: center;
}

.about-article-footer a {
    display: inline-flex;
    align-items: center;
    min-height: 46px;
    padding: 0 20px;
    border-radius: 8px;
    background: #1558b0;
    color: #ffffff;
    font-weight: 800;
    text-decoration: none;
}

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

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

    .about-toc {
        position: static;
    }
}

@media (max-width: 640px) {
    .site-navigation {
        flex-wrap: wrap;
    }

    .site-nav-link {
        flex: 1 1 auto;
        justify-content: center;
    }

    .site-nav-link.is-disabled {
        margin-left: 0;
    }

    .about-hero {
        padding: 28px 22px;
    }

    .about-hero h1 {
        font-size: 30px;
    }

    .about-principles {
        grid-template-columns: 1fr;
    }

    .about-section {
        padding: 26px 20px;
    }

    .about-section h2 {
        font-size: 22px;
    }

    .about-section p {
        text-align: left;
    }

    .about-principle-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .about-article-footer {
        padding: 24px 20px 30px;
    }
}

