:root {
    color-scheme: light;
    --ink: #203031;
    --muted: #52696b;
    --teal: #125b56;
    --deep: #173d40;
    --line: #d6e2df;
    --bg: #f3f7f5;
    --surface: #fff;
}

* {
    box-sizing: border-box;
}

html {
    height: 100%;
}

body {
    min-height: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    color: var(--ink);
    font: 15px/1.65 system-ui,"PingFang SC","Microsoft YaHei",sans-serif;
}

a {
    color: var(--teal);
    text-underline-offset: 3px;
}

button,input {
    font: inherit;
}

button {
    cursor: pointer;
}

button:disabled {
    opacity: .6;
    cursor: wait;
}

button:focus-visible,a:focus-visible,input:focus-visible,summary:focus-visible {
    outline: 3px solid #39958a;
    outline-offset: 3px;
}

.mast {
    background: var(--deep);
    color: #fff;
}

.bar,.foot {
    width: min(1160px,calc(100% - 48px));
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.bar {
    min-height: 66px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    text-decoration: none;
    font-size: 20px;
    letter-spacing: .04em;
    font-weight: 700;
}

.brand-icon {
    position: relative;
    display: flex;
    align-items: center;
    gap: 3px;
    width: 34px;
    height: 32px;
    padding: 4px;
    transform: skew(-14deg);
}

.brand-icon i {
    display: block;
    width: 6px;
    border-radius: 1px;
    background: #bce6d3;
    height: 19px;
}

.brand-icon i:nth-child(2) {
    height: 25px;
    background: #fff;
}

.brand-icon i:nth-child(3) {
    height: 13px;
}

.bar nav {
    display: flex;
    gap: 22px;
}

.bar nav a {
    font-size: 13px;
    color: #e4ede9;
    text-decoration: none;
}

.bar nav a[aria-current] {
    font-weight: 650;
    border-bottom: 2px solid #accdbd;
}

main {
    width: min(832px,calc(100% - 40px));
    margin: 0 auto;
    flex: 1;
    padding: 58px 0 76px;
}

.admin-main {
    width: min(1160px,calc(100% - 48px));
    padding-top: 34px;
}

.intro,.admin-heading {
    margin-bottom: 26px;
}

.intro h1,.admin-heading h1 {
    margin: 0 0 8px;
    font-size: clamp(27px,4vw,39px);
    line-height: 1.26;
    font-weight: 660;
    letter-spacing: -.025em;
}

.intro p,.admin-heading p {
    margin: 0;
    color: var(--muted);
}

.panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
}

.lookup {
    padding: 24px 28px 27px;
    box-shadow: 0 3px 14px #173d4007;
}

label {
    display: block;
    margin-bottom: 7px;
    font-weight: 600;
    font-size: 14px;
}

.input-row,.action-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.input-row input {
    flex: 1;
    min-width: 0;
}

input:not([type=hidden]) {
    width: 100%;
    min-width: 0;
    height: 45px;
    padding: 0 13px;
    background: #fff;
    border: 1px solid #aebfbb;
    border-radius: 7px;
    color: var(--ink);
}

.lookup input {
    height: 51px;
    font-size: 16px;
}

.primary,.secondary {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 43px;
    padding: 8px 20px;
    border-radius: 7px;
    white-space: nowrap;
    font-weight: 630;
    text-decoration: none;
}

.primary {
    background: var(--teal);
    color: white;
    border: 1px solid var(--teal);
}

.primary:hover {
    background: #104d49;
}

.lookup button {
    min-height: 51px;
    padding-inline: 24px;
}

.secondary {
    background: #fff;
    border: 1px solid #adbfba;
    color: var(--teal);
}

.secondary:hover {
    background: #eef5f0;
}

.message {
    margin: 18px 0;
    padding: 12px 16px;
    border-left: 3px solid #659b8a;
    border-radius: 4px;
    background: #e6f1eb;
    color: #294c43;
    overflow-wrap: anywhere;
}

.message.error {
    border-color: #b57845;
    color: #713c1c;
    background: #fff3e8;
}

.summary,.section-title,.admin-heading,.table-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.summary {
    margin: 26px 0 14px;
}

.label,.subnote,.muted,.section-title span,.table-head span {
    color: var(--muted);
    font-size: 13px;
}

.summary p,.summary h2 {
    margin: 0;
}

.mono,.day,.timeline time,.stat strong,.price {
    font-variant-numeric: tabular-nums;
}

.mono {
    font-family: ui-monospace,Consolas,monospace;
    word-break: break-all;
    letter-spacing: .01em;
}

.summary h2 {
    font-size: 21px;
}

.status {
    padding: 4px 11px;
    border-radius: 20px;
    color: #214f43;
    background: #ddecdf;
    font-size: 13px;
}

.history {
    padding: 22px 28px 8px;
}

.section-title {
    border-bottom: 1px solid var(--line);
    padding-bottom: 15px;
}

.section-title h2,.table-head h2,.block h2 {
    margin: 0;
    font-size: 19px;
}

.day {
    margin: 21px 0 10px;
    font-size: 15px;
}

.timeline {
    padding: 0;
    margin: 0 0 9px;
    list-style: none;
}

.timeline li {
    position: relative;
    display: grid;
    grid-template-columns: 73px 14px 1fr;
    gap: 12px;
}

.timeline time {
    padding-top: 3px;
    color: var(--muted);
    font: 13px/1.7 ui-monospace,Consolas,monospace;
}

.timeline .dot {
    position: relative;
    height: 9px;
    width: 9px;
    margin-top: 9px;
    background: #79a294;
    border-radius: 50%;
    box-shadow: 0 0 0 3px #edf3ef;
}

.timeline li:not(:last-child):before {
    content: "";
    position: absolute;
    left: 89px;
    top: 19px;
    bottom: -7px;
    border-left: 1px solid #d4dfda;
}

.event-body {
    padding-bottom: 20px;
    min-width: 0;
}

.leg {
    display: inline-block;
    font-size: 11px;
    padding: 1px 6px;
    border-radius: 4px;
    color: #38614a;
    background: #e8f1e9;
}

.leg.domestic {
    color: #335778;
    background: #e9eff6;
}

.place {
    margin-left: 8px;
    font-size: 12px;
    color: var(--muted);
}

.event-body p {
    margin: 4px 0 0;
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.subnote {
    margin: 11px 3px;
}

footer {
    border-top: 1px solid var(--line);
    font-size: 12px;
    color: var(--muted);
}

.foot {
    min-height: 60px;
}

.foot a {
    text-decoration: none;
}

.admin-heading {
    align-items: flex-start;
}

.admin-heading h1 {
    font-size: 30px;
}

.login {
    max-width: 420px;
    margin: 24px auto;
    padding: 28px;
}

.login h1 {
    font-size: 25px;
    margin: 0 0 21px;
}

.login label:not(:first-child) {
    margin-top: 15px;
}

.login button {
    margin-top: 20px;
    width: 100%;
}

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

.stat {
    padding: 17px 18px;
}

.stat span {
    font-size: 13px;
    color: var(--muted);
}

.stat strong {
    display: block;
    font-size: 27px;
    color: var(--deep);
    line-height: 1.45;
}

.block {
    padding: 19px 22px;
    margin: 16px 0;
}

.table-head {
    margin-bottom: 12px;
}

.scroll {
    overflow-x: auto;
}

table {
    border-collapse: collapse;
    width: 100%;
    font-size: 13px;
}

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

th {
    color: var(--muted);
    font-weight: 600;
    background: #f4f7f4;
    white-space: nowrap;
}

tr:last-child td {
    border: 0;
}

.nowrap {
    white-space: nowrap;
}

.emptyrow {
    color: var(--muted);
    padding-block: 18px;
}

.simple-form {
    margin-top: 12px;
}

.simple-form input[type=number] {
    max-width: 150px;
}

.block details summary {
    cursor: pointer;
    color: var(--teal);
}

.meta-list {
    display: grid;
    grid-template-columns: minmax(110px,auto) 1fr;
    gap: 4px 18px;
    margin: 12px 0;
}

.meta-list dt {
    color: var(--muted);
}

.meta-list dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.small {
    font-size: 13px;
}

.admin-main .history {
    margin-top: 16px;
}

.admin-main .action-row {
    flex-wrap: wrap;
}

@media (max-width: 650px) {
    .bar,.foot {
        width: calc(100% - 32px);
    }

    .bar {
        min-height: 56px;
    }

    .brand {
        font-size: 18px;
    }

    .bar nav {
        gap: 12px;
    }

    main,.admin-main {
        width: calc(100% - 28px);
        padding: 33px 0 48px;
    }

    .intro {
        margin-bottom: 19px;
    }

    .intro p {
        font-size: 14px;
    }

    .lookup,.history,.block,.login {
        padding: 17px;
    }

    .lookup .input-row {
        flex-direction: column;
        align-items: stretch;
    }

    .lookup input {
        flex: auto;
    }

    .summary {
        align-items: flex-start;
    }

    .summary h2 {
        font-size: 17px;
    }

    .section-title span {
        font-size: 11px;
    }

    .timeline li {
        grid-template-columns: 58px 10px 1fr;
        gap: 8px;
    }

    .timeline li:not(:last-child):before {
        left: 70px;
    }

    .timeline time {
        font-size: 11px;
    }

    .event-body p {
        font-size: 14px;
    }

    .stats {
        grid-template-columns: repeat(2,minmax(0,1fr));
        gap: 8px;
    }

    .admin-heading h1 {
        font-size: 25px;
    }

    .admin-heading .secondary {
        padding: 6px 10px;
    }

    .block .input-row {
        gap: 7px;
    }

    .block button {
        padding-inline: 12px;
    }

    .meta-list {
        font-size: 13px;
    }
}
