@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: 1200px;
}

* {
    box-sizing: border-box
}

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

a:hover {
    text-decoration: underline
}

/* ===== Page Header ===== */
.page-header {
    position: relative;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: white;
    text-align: center;
}

.conf-logo {
    position: absolute;
    left: 30px;
    top: 50%;
    transform: translateY(-50%);
    height: 140px;
    width: auto;
}

@media screen and (min-width: 64em) {
    .page-header { padding: 4rem 6rem }
}
@media screen and (min-width: 42em) and (max-width: 64em) {
    .page-header { padding: 3rem 4rem }
}
@media screen and (max-width: 42em) {
    .page-header { padding: 2rem 1rem }
}

/* ===== 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;
}
