.bw-body {
    --bw-line: rgba(255, 255, 255, 0.14);
    --bw-dim: rgba(255, 255, 255, 0.55);
    --bw-pink: #ffd6ec;
    --bw-lilac: #c9b8ff;
    --bw-gold: #ffe9a8;
    --bw-panel: rgba(255, 255, 255, 0.025);
}

.standard-main.bw-main {
    width: min(1000px, 94vw);
    margin: 28px auto 48px;
    padding: 22px 20px 40px;
}

.bw-lead {
    color: #d8d8e6;
    max-width: 62ch;
}

.bw-toc {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin: 14px 0 20px;
    padding: 8px 0;
    border-top: 1px solid var(--bw-line);
    border-bottom: 1px solid var(--bw-line);
    font-size: small;
}

.bw-toc a::before {
    content: "[ ";
    color: var(--bw-dim);
}

.bw-toc a::after {
    content: " ]";
    color: var(--bw-dim);
}

.bw-panel {
    border: 1px solid var(--bw-line);
    background: var(--bw-panel);
    padding: 14px 16px;
    margin: 16px 0;
}

.bw-h {
    margin: 0 0 10px;
    font-size: 1.05rem;
    letter-spacing: 0.04em;
}

.bw-sub {
    margin: 18px 0 4px;
    font-size: 0.92rem;
    color: var(--bw-lilac);
}

.bw-note {
    font-size: small;
    color: var(--bw-dim);
    margin: 6px 0;
    max-width: 70ch;
}

.bw-disclaimer {
    border-left: 3px solid var(--bw-lilac);
    padding-left: 10px;
}

.bw-seg {
    display: inline-flex;
    border: 1px solid var(--bw-line);
}

.bw-seg button {
    background: none;
    border: 0;
    padding: 7px 14px;
    cursor: pointer;
    color: var(--bw-dim);
    font: inherit;
}

.bw-seg button[aria-pressed="true"] {
    background: var(--bw-pink);
    color: #101018;
    font-weight: bold;
}

.bw-grid3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px 12px;
}

.bw-grid3 label,
.bw-full {
    display: block;
    font-size: small;
    color: var(--bw-dim);
}

.bw-full {
    margin-top: 14px;
}

.bw-grid3 input,
.bw-grid3 select,
.bw-full textarea {
    width: 100%;
    box-sizing: border-box;
    margin-top: 3px;
}

.bw-meds {
    margin-top: 10px;
}

.bw-medgroup {
    border: 0;
    border-left: 2px solid rgba(201, 184, 255, 0.3);
    padding: 2px 0 2px 10px;
    margin: 0 0 12px;
}

.bw-medgroup-h {
    padding: 0 6px 0 0;
    color: var(--bw-lilac);
    font-size: 0.9rem;
    letter-spacing: 0.04em;
}

.bw-meds-rows {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 6px 12px;
}

.bw-chip-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.bw-f-full {
    grid-column: 1 / -1;
}

.bw-f-last-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr) auto;
    gap: 5px;
    align-items: center;
}

.bw-chip-fields label > span:first-child {
    color: var(--bw-dim);
    font-size: x-small;
}

.bw-chip-fields select.bw-mlastunit {
    width: 100%;
}

.bw-chip {
    border: 1px solid var(--bw-line);
    padding: 5px 8px;
    background: rgba(0, 0, 0, 0.25);
}

.bw-chip-tick {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    background: none;
    border: 0;
    padding: 2px 0;
    color: inherit;
    font: inherit;
    font-size: small;
    text-align: left;
    cursor: pointer;
}

.bw-chip-box {
    flex: 0 0 auto;
    width: 13px;
    height: 13px;
    border: 1px solid var(--bw-dim);
    display: inline-block;
}

.bw-chip-tick[aria-pressed="true"] {
    color: var(--bw-pink);
}

.bw-chip-tick[aria-pressed="true"] .bw-chip-box {
    background: var(--bw-pink);
    box-shadow: inset 0 0 0 2px #101018;
}

.bw-chip-fields[hidden] {
    display: none;
}

.bw-chip-fields {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 6px 8px;
    align-items: end;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px dashed var(--bw-line);
}

.bw-chip-fields label {
    font-size: x-small;
    color: var(--bw-dim);
    display: grid;
    gap: 2px 5px;
    align-items: center;
    align-content: start;
}

.bw-chip-fields label.bw-f-dose,
.bw-chip-fields label.bw-f-every {
    grid-template-columns: minmax(0, 1fr);
}

.bw-chip-unit {
    white-space: nowrap;
}

.bw-chip-fields input {
    width: 100%;
    box-sizing: border-box;
    font-size: small;
}

.bw-chip-fields input {
    min-width: 0;
    width: 100%;
}

.bw-markers {
    margin-top: 8px;
}

.bw-mgrid {
    width: 100%;
    border-collapse: collapse;
    font-size: small;
}

.bw-mgrid th,
.bw-mgrid td {
    border: 1px solid var(--bw-line);
    padding: 3px 6px;
    text-align: left;
    vertical-align: middle;
}

.bw-mgrid th {
    width: 42%;
    font-weight: normal;
    color: var(--bw-lilac);
}

@media (max-width: 560px) {
    .bw-mgrid th {
        width: 34%;
        font-size: x-small;
    }

    .bw-mname {
        font-size: 0.62rem;
    }

    .bw-mgrid th,
    .bw-mgrid td {
        padding: 3px 3px;
    }
}

.bw-mname {
    display: block;
    color: var(--bw-dim);
    font-size: x-small;
    text-transform: none;
}

.bw-mgrid td input,
.bw-mgrid td select {
    width: 100%;
    box-sizing: border-box;
}

.bw-mgrid td:nth-child(2) {
    width: 26%;
}

.bw-mgrid td:nth-child(3) {
    width: 32%;
}



.bw-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    margin: 14px 0 0;
}

[hidden] {
    display: none !important;
}

.bw-filelabel {
    cursor: pointer;
    display: inline-block;
}

.bw-btn {
    font: inherit;
    font-size: small;
    line-height: 1.2;
    padding: 10px 16px;
    color: white;
    background: #2e497a;
    border: 2px solid #5bcefa;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.bw-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 12px rgba(91, 206, 250, 0.5);
}

.bw-btn-primary {
    background: #b30f74;
    border-color: hotpink;
}

.bw-btn-primary:hover {
    box-shadow: 0 0 12px rgba(255, 105, 180, 0.5);
}

.bw-btn-danger:hover {
    background: #7a2020;
    border-color: #ff6b6b;
    box-shadow: 0 0 12px rgba(255, 107, 107, 0.45);
}

.bw-status {
    font-size: small;
    color: var(--bw-gold);
}

.bw-lane {
    border: 1px solid var(--bw-line);
    margin: 10px 0;
    padding: 8px 10px 10px;
    background: rgba(0, 0, 0, 0.2);
}

.bw-lane-lead {
    border-color: rgba(255, 214, 236, 0.4);
}

.bw-lane-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 4px;
}

.bw-lane-head h4 {
    margin: 0;
    font-size: 0.92rem;
    color: var(--bw-pink);
}

.bw-unitpick {
    font-size: x-small;
    background: rgba(0, 0, 0, 0.4);
    color: var(--bw-dim);
    border: 1px solid var(--bw-line);
    padding: 2px 4px;
}

.bw-unit-fixed {
    font-family: inherit;
}

.bw-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    margin: 8px 0 4px;
    font-size: x-small;
    color: var(--bw-dim);
}

.bw-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.bw-sw {
    width: 16px;
    height: 9px;
    display: inline-block;
    flex: 0 0 auto;
}

.bw-sw-band {
    background: rgba(201, 184, 255, 0.25);
    border: 1px solid rgba(201, 184, 255, 0.6);
}

.bw-sw-dose {
    border-left: 2px dashed rgba(255, 233, 168, 0.8);
    height: 11px;
}

.bw-sw-med {
    background: var(--bw-gold);
    width: 11px;
    height: 11px;
    border-radius: 2px;
}

.bw-lane-cap {
    margin: 16px 0 2px;
    font-size: x-small;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--bw-dim);
}

.bw-cap-rest {
    margin-top: 20px;
}

.bw-svg {
    display: block;
    width: 100%;
    height: auto;
}

.bw-axis {
    stroke: rgba(255, 255, 255, 0.3);
    stroke-width: 1;
}

.bw-grid {
    stroke: rgba(255, 255, 255, 0.08);
    stroke-width: 1;
}

.bw-band {
    fill: rgba(201, 184, 255, 0.14);
    stroke: rgba(201, 184, 255, 0.35);
    stroke-width: 1;
}

.bw-bandid {
    fill: rgba(201, 184, 255, 0.8);
    font-size: 9px;
}

.bw-dose {
    stroke: rgba(255, 233, 168, 0.55);
    stroke-width: 1;
    stroke-dasharray: 3 3;
}

.bw-line {
    fill: none;
    stroke: var(--bw-pink);
    stroke-width: 1.5;
}

.bw-dot {
    fill: var(--bw-pink);
    stroke: #101018;
    stroke-width: 1;
}

.bw-dot:hover {
    fill: #fff;
}

.bw-ylab,
.bw-xlab,
.bw-unitlab {
    fill: rgba(255, 255, 255, 0.5);
    font-size: 10px;
}

.bw-unitlab {
    fill: var(--bw-dim);
    font-size: 9px;
}

.bw-mkey {
    fill: rgba(255, 255, 255, 0.62);
    font-size: 9px;
}

.bw-lane-bg {
    fill: rgba(255, 255, 255, 0.05);
}

.bw-lane-on {
    fill: var(--bw-gold);
}

.bw-lane-on:hover {
    fill: #fff;
}

.bw-band-note {
    margin: 4px 0 0;
    font-size: x-small;
}

.bw-band-src {
    color: rgba(201, 184, 255, 0.75);
}

.bw-lane-context {
    border-left: 3px solid var(--bw-lilac);
    padding-left: 8px;
    margin-top: 10px;
}

.bw-lane-context .bw-ctx {
    color: var(--bw-lilac);
    font-size: x-small;
}

.bw-tablewrap {
    overflow-x: auto;
}

.bw-table {
    width: 100%;
    border-collapse: collapse;
    font-size: small;
    margin-top: 8px;
}

.bw-table th,
.bw-table td {
    border: 1px solid var(--bw-line);
    padding: 4px 7px;
    text-align: left;
    vertical-align: top;
}

.bw-table thead th {
    background: rgba(0, 0, 0, 0.35);
    color: var(--bw-lilac);
    font-weight: normal;
    white-space: nowrap;
}

.bw-th-unit {
    display: block;
    color: var(--bw-dim);
    font-size: x-small;
}

.bw-sticky {
    white-space: nowrap;
    color: var(--bw-pink);
}

.bw-blank {
    color: rgba(255, 255, 255, 0.25);
}

.bw-delta {
    display: block;
    color: var(--bw-dim);
    font-size: x-small;
}

.bw-fast {
    color: var(--bw-dim);
    font-size: x-small;
}

.bw-medcell {
    min-width: 130px;
    color: var(--bw-gold);
}

.bw-restcell {
    color: var(--bw-dim);
    font-size: x-small;
}

.bw-rowacts {
    white-space: nowrap;
}

.bw-btn-more {
    margin-top: 8px;
    background: none;
    border-style: dashed;
    border-color: var(--bw-line);
    color: var(--bw-lilac);
    padding: 6px 12px;
}

.bw-btn-more:hover {
    color: white;
    background: #2e497a;
    border-color: #5bcefa;
    box-shadow: none;
    transform: none;
}

.bw-del,
.bw-edit {
    cursor: pointer;
    background: none;
    border: 1px solid var(--bw-line);
    color: var(--bw-dim);
    font: inherit;
    font-size: x-small;
    padding: 2px 6px;
    margin: 0 3px 3px 0;
}

.bw-edit:hover,
.bw-edit:focus-visible {
    color: var(--bw-pink);
    border-color: var(--bw-pink);
}

.bw-del:hover,
.bw-del:focus-visible {
    color: #ff9db0;
    border-color: #ff9db0;
}

.bw-share {
    width: 100%;
    box-sizing: border-box;
    font-size: x-small;
    margin-top: 8px;
}

.bw-print-sheet {
    display: none;
}

@media print {
    #banner, .bw-toc, .skip-link, .standard-actions, .bw-actions, form, .survival-widget,
    .bw-del, .bw-edit, #bw-share-out, #bw-charts, .bw-lane, .author-block,
    .bw-filelabel, .standard-eyebrow, .bw-panel, .bw-disclaimer, .lang-switch,
    .bw-print-sheet + .standard-actions {
        display: none !important;
    }

    .bw-main {
        width: 100%;
        margin: 0;
        padding: 0;
        border: 0;
        background: none;
    }

    body {
        background: #fff;
        color: #000;
    }

    .bw-print-sheet {
        display: block;
        margin-top: 18px;
    }

    .bw-print-title {
        margin: 0 0 4px;
        font-size: 1.05rem;
        color: #000;
    }

    .bw-print-meta {
        font-size: x-small;
        color: #333;
        margin: 0 0 10px;
    }

    .bw-print-table {
        width: 100%;
        border-collapse: collapse;
        font-size: 9pt;
    }

    .bw-print-table th,
    .bw-print-table td {
        border: 1px solid #999;
        color: #000;
        padding: 3px 5px;
        text-align: left;
    }

    .bw-print-table thead th {
        background: #eee;
        color: #000;
    }

    .bw-print-table tr {
        break-inside: avoid;
    }

    .bw-lead {
        color: #000;
    }

    a {
        color: #000;
        text-decoration: none;
    }
}

/* the phone rules for this page live in mobile.css, which the middleware
   inlines into every page so a cached stylesheet cannot hide them. */