@import url("https://fonts.googleapis.com/css?family=Open+Sans:400,700");

html {
    font-family: sans-serif;
    -ms-text-size-adjust: 100%;
    -webkit-text-size-adjust: 100%
}

body {
    margin: 0;
    padding: 0;
    font-family: "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 18px;
    line-height: 1.6;
    color: #606c71;
    min-width: 768px;
}

* {
    box-sizing: border-box
}

a {
    color: #1e6bb8;
    text-decoration: none
}

a:hover {
    text-decoration: underline
}

/* ===== Page Header ===== */
/* Grid 3컬럼 대칭: [로고 | 제목 | 로고와 같은 폭의 spacer] → 제목 정중앙 + 절대 안 겹침 */
.page-header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    column-gap: 2rem;
    padding: 3rem 4rem;
    background: linear-gradient(135deg, #ffffff 0%, #eef2f8 100%);
    border-bottom: 1px solid #d8dee9;
    color: #0f3460;
}

/* 왼쪽 1fr 칸 안에서 로고를 왼쪽 정렬 */
.conf-logo {
    grid-column: 1;
    justify-self: start;
    height: 120px;
    width: auto;
}

/* 가운데 auto 칸: 제목. 양옆 1fr이 대칭이라 헤더 정중앙에 위치 */
.header-text {
    grid-column: 2;
    text-align: center;
    min-width: 0;
}

@media screen and (min-width: 64em) {
    .page-header { padding: 4rem 5rem; }
}
/* 좁은 화면: 1컬럼 세로 배치 (로고 위, 제목 아래, 둘 다 중앙) */
@media screen and (max-width: 60em) {
    .page-header {
        grid-template-columns: 1fr;
        justify-items: center;
        row-gap: 1rem;
        padding: 2rem 1.5rem;
    }
    .conf-logo { grid-column: 1; justify-self: center; height: 80px; }
    .header-text { grid-column: 1; }
}

/* ===== Main Content ===== */
.main-context {
    word-wrap: break-word;
}

@media screen and (min-width: 64em) {
    .main-context {
        max-width: 100rem;
        padding: 2rem 6rem;
        margin: 0 auto;
        font-size: 1.2rem
    }
}
@media screen and (min-width: 42em) and (max-width: 64em) {
    .main-context {
        padding: 2rem 4rem;
        font-size: 1.2rem
    }
}
@media screen and (max-width: 42em) {
    .main-context {
        padding: 2rem 1rem;
        font-size: 1.1rem
    }
}

.main-context h1, .main-context h2, .main-context h3,
.main-context h4, .main-context h5, .main-context h6 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: normal;
    color: #0f3460
}

/* ===== TOC ===== */
#toc_container {
    font-size: 20px;
}
#toc_container ol {
    padding-left: 20px;
}
#toc_container li {
    margin-bottom: 4px;
}

/* ===== Task Tabs ===== */
.task-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0;
    padding: 0 10px;
}
.task-tab {
    padding: 10px 24px;
    border: 2px solid #0f3460;
    border-radius: 6px;
    background: white;
    color: #0f3460;
    font-weight: 600;
    font-size: 17px;
    font-style: italic;
    cursor: pointer;
    transition: all 0.2s;
}
.task-tab:hover {
    background: #e8eef6;
}
.task-tab.active {
    background: #0f3460;
    color: white;
}

/* ===== Example Block ===== */
.example-block {
    border-top: 2px solid #ddd;
    margin: 25px 0;
    padding-top: 20px;
}

/* Input + Instruction side-by-side */
.input-row {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    margin: 10px 15px;
    flex-wrap: wrap;
}
.input-spec {
    flex: 1 1 320px;
    text-align: center;
}
.input-spec img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    border: 1px solid #ddd;
}
.input-spec audio {
    width: 100%;
}
.input-info {
    flex: 1 1 320px;
    padding: 20px;
    background-color: #f8f9fa;
    border-left: 4px solid #0f3460;
    line-height: 1.7;
    font-size: 22px;
}

/* Interval tag */
.interval-tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 1.05rem;
    font-weight: 600;
    margin: 2px 4px;
}
.interval-ref {
    background: #c0ddf9;
    color: #1a3a5c;
    border: 1px solid #8bbcef;
}
.interval-edit {
    background: #f2d4e0;
    color: #6b2043;
    border: 1px solid #e0a8c0;
}

/* ===== Comparison Grid ===== */
.comparison-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    padding: 0 15px;
    margin-top: 12px;
}

.method-card {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px;
    background: #fff;
    text-align: center;
}
.method-card.ours {
    border-color: #0f3460;
    border-width: 2px;
    background: #f0f4fa;
}
.method-card .method-name {
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 8px;
    color: #334155;
}
.method-card.ours .method-name {
    color: #0f3460;
}

.method-card img {
    width: 100%;
    border-radius: 4px;
    border: 1px solid #ddd;
    background: #fafafa;
}

.method-card audio {
    width: 100%;
    margin-top: 8px;
}

/* ===== Results Section ===== */
.results-img {
    max-width: 85%;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* ===== Key Ideas List ===== */
.key-ideas li {
    padding-left: 10px;
    padding-right: 10px;
    margin-bottom: 8px;
}

/* ===== Task Section (hidden by default for tab switching) ===== */
.task-section {
    display: none;
}
.task-section.active {
    display: block;
}

/* ===== Responsive audio in tables ===== */
audio {
    max-width: 100%;
}

figure {
    margin: 1em 0;
}
figcaption {
    margin-top: 6px;
    font-size: 0.9rem;
    color: #555;
    text-align: center;
}
