.chronology-tool {
    background: #f6f8fd;
}

.chronology-tool .tool-level {
    margin-bottom: .65rem;
    font-size: .9rem;
    font-weight: 700;
}

.chronology-tool .tool-section {
    padding-top: 2rem;
}

.chronology-tool .tool-container {
    max-width: 920px;
}

.tool-panel {
    padding: clamp(1rem, 4vw, 2rem);
    border: 1px solid #d7dfef;
    border-radius: 18px;
    background: white;
    box-shadow: 0 12px 28px rgb(25 58 115 / .07);
}

.tool-panel h2, .tool-resources h2 {
    margin: 0 0 1rem;
    color: #162c55;
    font-size: clamp(1.25rem, 3vw, 1.6rem);
    line-height: 1.3;
}

.tool-inputs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .9rem 1.2rem;
    margin-bottom: .95rem;
}

.tool-panel label {
    display: block;
    font-size: .95rem;
    font-weight: 650;
    color: #263b60;
}

.tool-panel input, .tool-panel select {
    display: block;
    width: 100%;
    min-height: 44px;
    margin-top: .28rem;
    padding: .48rem .7rem;
    border: 1px solid #a1b1cc;
    border-radius: 8px;
    background: white;
    color: #162c55;
    font: inherit;
    font-size: 1rem;
    font-weight: 500;
}

.tool-theme {
    max-width: 32rem;
    margin-bottom: .65rem;
}

.tool-help {
    margin: .3rem 0;
    font-size: .92rem;
    color: #475b7b;
}

.tool-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .65rem;
    margin-top: 1.2rem;
}

.tool-actions button {
    min-height: 44px;
    text-align: center;
    white-space: normal;
}

.tool-panel button:disabled {
    opacity: .55;
    cursor: default;
}

.tool-panel :is(button, input, select):focus-visible {
    outline: 2px solid #1d4ed8;
    outline-offset: 2px;
}

.tool-result {
    margin-top: 1.35rem;
    padding: 1rem;
    border: 1px solid #c3d2f1;
    border-radius: 12px;
    background: #edf4ff;
    color: #163767;
}

.tool-result p {
    margin: .4rem 0 0;
}

.tool-error {
    margin-top: 1rem;
    color: #9b2022;
    font-weight: 650;
}

.tool-axis {
    position: relative;
    height: 2.6rem;
    margin: 1.1rem 1px .2rem;
    border-top: 2px solid #3259ac;
}

.tool-tick {
    position: absolute;
    top: -2px;
    width: 0;
    height: 12px;
    border-left: 2px solid #3259ac;
}

.tool-tick span {
    position: absolute;
    top: 15px;
    transform: translateX(-50%);
    color: #233d71;
    font-size: .78rem;
    font-weight: 700;
    white-space: nowrap;
}

.tool-tick:first-child span {
    transform: none;
}

.tool-tick:last-child span {
    transform: translateX(-100%);
}

.order-cards {
    display: grid;
    gap: .45rem;
    margin: .9rem 0 0;
    padding: 0;
    list-style: none;
    counter-reset: order-position;
}

.order-cards li {
    display: grid;
    grid-template-columns: 1.6rem minmax(0, 1fr) auto;
    align-items: center;
    gap: .65rem;
    padding: .6rem .7rem;
    border: 1px solid #d7dfef;
    border-radius: 9px;
    background: #f6f8fd;
    color: #263b60;
    counter-increment: order-position;
}

.order-cards li::before {
    content: counter(order-position);
    align-self: start;
    padding-top: .25em;
    color: #365691;
    font-weight: 700;
}

.order-date {
    display: block;
    margin-top: .14rem;
    color: #274c8a;
    font-size: .9rem;
}

.order-controls {
    display: flex;
    gap: .35rem;
}

.order-controls button {
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid #bccef0;
    border-radius: 8px;
    background: #fff;
    color: #173f89;
    font: inherit;
    font-size: 1.3rem;
    cursor: pointer;
}

.order-controls button:enabled:hover {
    background: #e9f1ff;
}

.order-feedback {
    min-height: 1.6em;
    margin: .75rem 0 0;
    color: #264a89;
    font-weight: 650;
}

.tool-resources {
    margin-top: 2rem;
}

.tool-resources p {
    margin: .65rem 0;
}

.tool-resources ul {
    display: grid;
    gap: .4rem;
    margin: .85rem 0 0;
    padding-left: 1.3rem;
}

@media (max-width: 720px) {
    .tool-tick:not(.tool-tick-end, .tool-tick-center, .tool-tick-short) span {
        display: none;
    }
}

@media (max-width: 480px) {
    .tool-tick:not(.tool-tick-end, .tool-tick-center) span {
        display: none;
    }

    .order-cards li {
        grid-template-columns: 1rem minmax(0, 1fr) auto;
        gap: .4rem;
        padding: .55rem;
    }

    .order-controls {
        flex-direction: column;
    }
}
