.work-page {
    background: #f8fafc;
    font-family: Inter, ui-sans-serif, system-ui, sans-serif;
}
.work-page .work-container { max-width: 1280px; }
.work-page .work-hero {
    padding: 12px 0 14px;
    border-bottom: 1px solid #e2e8f0;
    background: linear-gradient(115deg, #fff6eb, #fff 52%, #edf6fc);
}
.work-breadcrumb { margin-bottom: 3px; font-size: 13px; }
.work-breadcrumb a { color: #285e95; font-weight: 700; }
.work-page .work-hero h1 { max-width: none; font-size: clamp(23px, 3.5vw, 34px); }
.work-page .work-demo-note { margin-top: 4px; color: #526174; font-size: 13px; line-height: 1.4; }
.work-directory {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: clamp(8px, 2vw, 24px);
    padding-top: 18px;
    padding-bottom: 32px;
}
.work-directory > section {
    --work-accent: #218450;
    --work-tint: #eaf6ee;
    min-width: 0;
    padding: clamp(7px, 1.5vw, 18px);
    border: 1px solid #dce5ef;
    border-top: 3px solid var(--work-accent);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 6px 18px rgb(16 42 67 / 5%);
}
.work-directory > section + section {
    --work-accent: #a55c15;
    --work-tint: #fff1e3;
}
.work-directory h2 { margin-bottom: 10px; font-size: clamp(17px, 2.5vw, 23px); }
.work-project-list { padding: 0; margin: 0; list-style: none; counter-reset: project; }
.work-project-list li { counter-increment: project; }
.work-project-list li + li { margin-top: 8px; }
.work-project-row {
    display: flex;
    width: 100%;
    align-items: baseline;
    gap: 7px;
    padding: 11px clamp(6px, 1.3vw, 15px);
    color: #102a43;
    cursor: pointer;
    text-align: left;
    border: 1px solid #dce5ef;
    border-radius: 12px;
    background: #f8fafc;
}
.work-project-row::before {
    content: counter(project) ".";
    flex: none;
    min-width: 1.35rem;
    border-radius: 5px;
    background: var(--work-tint);
    color: var(--work-accent);
    font-size: .8rem;
    font-weight: 700;
    line-height: 1.45;
    text-align: center;
}
.work-project-row > span { min-width: 0; overflow-wrap: anywhere; }
.work-project-row:hover { background: #edf5fc; border-color: #a8c4df; }
.work-project-row strong { display: block; font-size: clamp(14px, 2vw, 17px); line-height: 1.3; }
.work-project-row small, .work-dialog-header small {
    display: block;
    margin-top: 4px;
    color: #526174;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.45;
}
.work-page :focus-visible { outline: 2px solid #2366ad; outline-offset: 2px; }
body:has(.work-project-dialog[open]) { overflow: hidden; }
.work-project-dialog {
    position: fixed;
    inset: 0;
    width: min(1020px, calc(100% - 24px));
    max-height: min(88vh, 850px);
    max-height: min(88dvh, 850px);
    margin: auto;
    padding: 0;
    overflow: auto;
    overscroll-behavior: contain;
    color: #102a43;
    border: 1px solid #dce5ef;
    border-radius: 16px;
    background: #f8fafc;
}
.work-project-dialog::backdrop { background: rgb(15 31 51 / 59%); }
.work-dialog-header {
    position: sticky;
    top: 0;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 10px;
    padding: 12px clamp(14px, 3vw, 26px);
    border-bottom: 1px solid #e2e8f0;
    background: #fff;
}
.work-dialog-header h2 { font-size: clamp(17px, 3vw, 24px); }
.work-dialog-actions { display: flex; flex: none; align-items: center; gap: 8px; }
.work-dialog-actions a { color: #285e95; font-size: 14px; font-weight: 700; }
.work-dialog-actions form { margin: 0; }
.work-dialog-actions button {
    width: 34px;
    height: 34px;
    border: 1px solid #dce5ef;
    border-radius: 8px;
    background: #f8fafc;
    color: #102a43;
    font-size: 23px;
    line-height: 1;
    cursor: pointer;
}
.work-project-body { padding: clamp(14px, 3vw, 26px); }
.work-facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 145px), 1fr));
    gap: 10px 14px;
    margin: 0;
    color: #102a43;
}
.work-project-body > .work-facts {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 126px), 1fr));
    align-items: stretch;
    padding: 12px;
    border: 1px solid #dce5ef;
    border-radius: 13px;
    background: #fff;
}
.work-project-body > .work-facts > div { padding: 6px; }
.work-project-body > .work-facts > .work-completion {
    border-radius: 8px;
    background: #edf5fc;
}
.work-facts dt { color: #526174; font-size: 13px; font-weight: 500; }
.work-facts dd { margin: 0; font-size: 14px; font-weight: 650; overflow-wrap: anywhere; }
.work-page .work-timeline-title { margin: 24px 0 16px; font-size: 21px; }
.work-timeline { position: relative; list-style: none; padding: 0 0 0 24px; margin: 0; }
.work-timeline::before {
    content: "";
    position: absolute;
    inset: 29px auto 0 5px;
    width: 2px;
    background: #b4c8de;
}
.work-stage { position: relative; padding-bottom: 13px; }
.work-stage:last-child { padding-bottom: 0; }
.work-stage::before {
    content: "";
    position: absolute;
    top: 22px;
    left: -19px;
    width: 19px;
    height: 2px;
    background: #b4c8de;
    transform: rotate(-28deg);
    transform-origin: right center;
}
.work-stage::after {
    content: "";
    position: absolute;
    top: 26px;
    left: -23px;
    width: 10px;
    height: 10px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #218450;
    box-shadow: 0 0 0 1px #218450;
}
.work-stage--current::after { background: #b86615; box-shadow: 0 0 0 1px #b86615; }
.work-stage--planned::after { background: #fff; box-shadow: 0 0 0 1px #68839f; }
.work-stage-card { padding: 13px 15px; border: 1px solid #dce5ef; border-radius: 12px; background: #fff; }
.work-stage--current .work-stage-card { border-color: #e7be89; background: #fffaf3; }
.work-stage-meta { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 5px 10px; color: #526174; font-size: 13px; }
.work-status { padding: 1px 8px; border-radius: 30px; background: #e9f6ed; color: #205c3b; font-weight: 700; }
.work-stage--current .work-status { background: #fcebd0; color: #82450e; }
.work-stage--planned .work-status { background: #edf3fa; color: #375574; }
.work-stage-card h4 { margin: 7px 0 3px; color: #102a43; font-family: inherit; font-size: 16px; font-weight: 700; line-height: 1.4; }
.work-stage-card p { margin: 0; color: #526174; font-size: 14px; line-height: 1.55; }
.work-record { margin-top: 8px; }
.work-record summary { color: #235a92; cursor: pointer; font-size: 13px; font-weight: 700; }
.work-record .work-facts { margin-top: 8px; padding-top: 8px; border-top: 1px solid #dce5ef; }
@media (min-width: 710px) {
    .work-timeline { display: flow-root; padding-left: 0; }
    .work-timeline::before { left: calc(50% - 1px); }
    .work-stage { width: 50%; padding-right: 27px; }
    .work-stage:nth-child(even) { margin-left: 50%; padding: 0 0 13px 27px; }
    .work-stage:last-child { padding-bottom: 0; }
    .work-stage::before { left: auto; right: 0; width: 30px; transform: rotate(20deg); }
    .work-stage::after { left: auto; right: -5px; }
    .work-stage:nth-child(even)::before { left: 0; right: auto; transform: rotate(-20deg); transform-origin: left center; }
    .work-stage:nth-child(even)::after { left: -5px; right: auto; }
}
