:root {
    font-family: Inter, "Microsoft YaHei", sans-serif;
    color: #182e36;
    background: #f2f5f5;
    line-height: 1.65
}

* {
    box-sizing: border-box
}

[hidden] {
    display: none !important
}

body {
    margin: 0
}

header {
    background: #10393e;
    color: white;
    border-bottom: 3px solid #66c7b0
}

.bar,
main {
    max-width: 1160px;
    margin: auto;
    padding: 0 clamp(16px, 4vw, 48px)
}

.bar {
    height: 64px;
    display: flex;
    align-items: center;
    gap: 22px
}

.bar strong {
    font-size: 24px;
    letter-spacing: -1px
}

.bar span {
    border-left: 1px solid #598084;
    padding-left: 22px
}

main {
    padding-top: 32px;
    padding-bottom: 48px
}

h1 {
    font-size: clamp(30px, 4vw, 48px);
    letter-spacing: -.04em
}

h1,
h2,
h3,
h4 {
    line-height: 1.3;
    margin: 0 0 12px
}

p {
    margin: 10px 0 18px
}

h2 {
    font-size: 23px
}

h3 {
    font-size: 18px
}

.choices,
.columns {
    display: grid;
    gap: 18px
}

.choices {
    grid-template-columns: repeat(2, 1fr);
    margin-top: 26px
}

.columns {
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr)
}

.choices article,
.panel,
#batch {
    background: white;
    border: 1px solid #ccdada;
    border-radius: 10px;
    padding: clamp(16px, 2.5vw, 28px)
}

.choices article {
    border-top: 3px solid #23766d
}

.choices p,
.hint,
#progress {
    color: #4b636b
}

aside .panel+.panel {
    margin-top: 18px
}

button {
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    background: #17655f;
    color: white;
    border: 1px solid transparent;
    padding: 8px 15px;
    border-radius: 6px
}

button:hover {
    filter: brightness(.9)
}

button:disabled {
    opacity: .5
}

button:focus-visible,
summary:focus-visible {
    outline: 3px solid #378dce;
    outline-offset: 2px
}

.secondary,
nav button {
    background: white;
    color: #155b55;
    border-color: #aac5c0
}

nav,
.toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 18px
}

.toolbar {
    justify-content: space-between
}

.toolbar h2 {
    margin: 0;
    overflow-wrap: anywhere
}

#progress:empty,
#error:empty,
#status:empty {
    display: none
}

#error {
    color: #983e32
}

#ranking {
    background: #eef5f3;
    padding: 12px;
    border-radius: 6px
}

.table-scroll {
    overflow-x: auto
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: .94rem
}

td,
th {
    text-align: left;
    vertical-align: top;
    padding: 12px;
    border-bottom: 1px solid #dae2e3
}

td {
    overflow-wrap: anywhere
}

th {
    white-space: nowrap;
    background: #f4f7f7
}

#timeline tr {
    cursor: pointer
}

#timeline tr:hover,
#timeline tr:focus-within {
    background: #eff8f6
}

button.file-link {
    background: transparent;
    color: #135f59;
    text-align: left;
    text-decoration: underline;
    padding: 0;
    overflow-wrap: anywhere
}

details {
    margin: 16px 0
}

summary {
    cursor: pointer;
    color: #1b605d
}

dl {
    display: grid;
    grid-template-columns: minmax(85px, auto) 1fr;
    gap: 0;
    margin: 0
}

dt,
dd {
    padding: 8px 0;
    border-bottom: 1px solid #e2e9e9
}

dt {
    color: #52656b;
    padding-right: 16px
}

dd {
    margin: 0;
    overflow-wrap: anywhere
}

pre {
    max-height: 340px;
    overflow: auto;
    background: #f1f5f5;
    padding: 13px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    font: 14px/1.6 Consolas, monospace
}

#symbol-links,
#symbol-status,
#advice {
    overflow-wrap: anywhere
}

#advice {
    white-space: pre-wrap
}

a {
    color: #17655f
}

@media(max-width:760px) {

    .choices,
    .columns {
        grid-template-columns: 1fr
    }

    main {
        padding-top: 22px
    }

    .table-scroll table {
        min-width: 650px
    }
}
body:has(#home-footer:not([hidden])) {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body:has(#home-footer:not([hidden])) main {
    width: 100%;
    flex: 1;
}

#home-footer {
    padding: 16px;
    text-align: center;
    color: #4b636b;
    border-top: 1px solid #ccdada;
}
