html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.page-header {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.account-status {
    color: #d7dde5;
    font-size: .78rem;
    line-height: 1.2;
    margin-left: auto;
    max-width: 12rem;
    text-align: right;
}

.account-status a,
.account-status .btn-link {
    color: #fff;
    font-size: .78rem;
    text-decoration: none;
}

.account-status span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.status-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    margin-bottom: 1.5rem;
}

.metric-card,
.tool-panel,
.document-preview {
    background: #fff;
    border: 1px solid #d7dde5;
    border-radius: 8px;
    padding: 1rem;
}

.metric-card span {
    color: #5f6b7a;
    display: block;
    font-size: .85rem;
}

.metric-card strong {
    color: #17212f;
    display: block;
    font-size: 1.25rem;
    line-height: 1.25;
}

.workflow-list {
    display: grid;
    gap: .75rem;
}

.workflow-list a {
    border: 1px solid #d7dde5;
    border-radius: 8px;
    color: #17212f;
    display: grid;
    gap: .2rem;
    padding: 1rem;
    text-decoration: none;
}

.workflow-list a:hover {
    border-color: #1b6ec2;
}

.workflow-list span {
    color: #5f6b7a;
}

.workflow-board {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    margin-top: 1rem;
}

.workflow-card {
    background: #fff;
    border: 1px solid #d7dde5;
    border-radius: 8px;
    padding: 1rem;
}

.workflow-card h2 {
    font-size: 1rem;
    margin: 0 0 .5rem;
}

.workflow-card p {
    color: #344054;
    margin-bottom: .5rem;
}

.workflow-card small {
    color: #667085;
    font-weight: 600;
}

.form-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.form-grid label,
label.w-100 {
    color: #344054;
    font-weight: 600;
}

.form-control,
.form-select {
    font-weight: 400;
    margin-top: .25rem;
}

.save-message {
    color: #146c43;
    display: inline-block;
    font-weight: 600;
    margin-left: 1rem;
}

.voter-list {
    border: 1px solid #d7dde5;
    border-radius: 8px;
    max-height: 420px;
    overflow: auto;
    padding: .75rem;
}

.voter-list div {
    border-bottom: 1px solid #edf0f4;
    padding: .35rem 0;
}

.document-preview {
    margin-top: 1rem;
}

.timeline-panel {
    background: #f8fafc;
    border: 1px solid #d7dde5;
    border-radius: 8px;
    padding: 1rem;
}

.timeline-panel h2 {
    font-size: 1rem;
    margin-bottom: .75rem;
}

.timeline-grid {
    display: grid;
    gap: .75rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    margin-bottom: .75rem;
}

.timeline-grid div {
    background: #fff;
    border: 1px solid #e4e8ee;
    border-radius: 8px;
    padding: .75rem;
}

.timeline-grid span {
    color: #5f6b7a;
    display: block;
    font-size: .85rem;
}

.timeline-grid strong {
    display: block;
}

.generated-document {
    border-top: 1px solid #edf0f4;
    margin-top: .75rem;
    padding-top: .75rem;
}

.generated-document h1 {
    font-size: 1.35rem;
}

.label-like {
    color: #5f6b7a;
    display: block;
    font-size: .85rem;
    font-weight: 600;
}

.context-line {
    color: #475467;
    margin-top: -.5rem;
}

.paper-preview {
    margin-top: 1rem;
}

.calibration-grid {
    align-items: end;
}

.calibration-actions {
    display: flex;
    gap: .75rem;
    align-items: center;
}

.packet-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.packet-tabs a {
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    color: #17212f;
    padding: .4rem .65rem;
    text-decoration: none;
}

.packet-tabs a:hover {
    border-color: #1b6ec2;
}

.print-artifact {
    background: #fff;
    border: 1px dashed #9aa4b2;
    color: #111827;
    margin: 1rem 0;
    position: relative;
}

.envelope {
    padding: .35in;
}

.outgoing-envelope {
    aspect-ratio: 9.5 / 4.125;
    height: 4.125in;
    max-width: 9.5in;
    width: 9.5in;
}

.return-envelope {
    aspect-ratio: 8.875 / 3.875;
    height: 3.875in;
    max-width: 8.875in;
    width: 8.875in;
}

.return-address {
    font-size: 11pt;
    left: 1.1in;
    line-height: 1.2;
    position: absolute;
    top: .78in;
}

.mail-to {
    font-size: 15pt;
    left: 4.45in;
    line-height: 1.35;
    position: absolute;
    top: 2.3in;
}

.return-voter-block {
    font-size: 9.5pt;
    left: 1.317in;
    line-height: 1.18;
    position: absolute;
    top: .88in;
    width: 4.35in;
}

.return-voter-block .label {
    color: #5f6b7a;
    font-size: 9pt;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.election-name-line {
    font-size: 8.5pt;
    font-weight: 700;
    line-height: 1.15;
    margin-top: .12in;
}

.return-mail-to {
    font-size: 13pt;
    left: 5.05in;
    line-height: 1.3;
    position: absolute;
    top: 2.15in;
}

.signature-line {
    font-size: 9.5pt;
    line-height: 1.1;
    margin-top: .22in;
    width: 3.75in;
}

.envelope-scan-row {
    display: flex;
    justify-content: flex-start;
    margin-top: .32in;
}

.envelope-scan-code {
    background: #fff;
    display: block;
    flex: 0 0 auto;
    height: .585in;
    padding: .07in;
    position: relative;
    width: .585in;
}

.envelope-scan-svg {
    display: block;
    height: 100%;
    width: 100%;
}

.artifact-election-name {
    color: #475467;
    font-size: 9pt;
    font-weight: 700;
    margin-bottom: .18in;
    text-transform: uppercase;
}

.document-header {
    border-bottom: 1px solid #d7dde5;
    margin-bottom: .24in;
    min-height: .22in;
}

.document-header .artifact-election-name {
    margin-bottom: .08in;
}

.scan-ballot {
    padding: .62in;
}

.ballot-id-row {
    align-items: end;
    display: flex;
    font-size: 9pt;
    justify-content: flex-end;
    margin-bottom: .18in;
}

.barcode-strip {
    align-items: end;
    border: 1px solid #111827;
    display: inline-flex;
    flex: 0 0 3.15in;
    height: .38in;
    min-width: 3.15in;
    padding: 4px;
    width: 3.15in;
}

.barcode-svg {
    display: block;
    flex: 0 0 100%;
    height: 100%;
    min-width: 100%;
    width: 100%;
}

.ballot-instruction-box {
    border: 1px solid #cbd5e1;
    font-size: 12pt;
    margin: .12in 0 .16in;
    padding: .1in;
}

.ballot-instruction-box p {
    font-size: 12pt;
    line-height: 1.35;
    margin-bottom: .12in;
}

.reg-mark {
    border: 4px solid #111827;
    height: .28in;
    position: absolute;
    width: .28in;
}

.reg-tl {
    border-bottom: 0;
    border-right: 0;
    left: .3in;
    top: .3in;
}

.reg-tr {
    border-bottom: 0;
    border-left: 0;
    right: .3in;
    top: .3in;
}

.reg-bl {
    border-right: 0;
    border-top: 0;
    bottom: .3in;
    left: .3in;
}

.reg-br {
    border-left: 0;
    border-top: 0;
    bottom: .3in;
    right: .3in;
}

.scan-grid-wrap {
    margin: .25in 0;
}

.scan-timing-row {
    display: grid;
    gap: .12in;
    grid-template-columns: minmax(2.4in, 1fr) repeat(var(--vote-columns, 5), .42in);
    margin: 0 .12in .05in;
}

.scan-timing-row span {
    background: #111827;
    height: .07in;
    justify-self: center;
    width: .07in;
}

.scan-grid {
    border: 1.5px solid #111827;
}

.scan-grid-header,
.scan-row {
    align-items: center;
    display: grid;
    gap: .12in;
    grid-template-columns: minmax(2.4in, 1fr) repeat(var(--vote-columns, 5), .42in);
    padding: .08in .12in;
}

.scan-grid-header {
    background: #f1f5f9;
    border-bottom: 1.5px solid #111827;
    font-size: 9pt;
    font-weight: 700;
}

.scan-candidate-cell {
    justify-self: start;
}

.scan-vote-cell {
    align-items: center;
    display: flex;
    justify-content: center;
    min-height: .28in;
    text-align: center;
    width: .42in;
}

.scan-row {
    border-bottom: 1px solid #d7dde5;
    min-height: .42in;
}

.scan-row:last-child {
    border-bottom: 0;
}

.scan-bubble {
    border: 2px solid #111827;
    border-radius: 999px;
    display: inline-block;
    height: .24in;
    width: .24in;
}

.measure-box {
    border: 1.5px solid #111827;
    margin: .14in 0;
    padding: .12in;
}

.measure-box h3 {
    font-size: 13pt;
    margin: 0 0 .08in;
}

.measure-vote-wrap {
    margin-top: .18in;
}

.letter-page {
    box-sizing: border-box;
    height: 11in;
    max-width: 8.5in;
    overflow: hidden;
    padding: .75in;
    width: 8.5in;
}

.letterhead {
    border-bottom: 1px solid #cbd5e1;
    font-size: 10pt;
    margin-bottom: .35in;
    padding-bottom: .12in;
    text-align: center;
}

.letter-page h1 {
    font-size: 18pt;
    margin-bottom: .1in;
}

.letter-page h2 {
    font-size: 14pt;
    margin-bottom: .2in;
}

.facts-grid {
    display: grid;
    gap: .15in;
    grid-template-columns: 1fr 1fr;
    margin-top: .25in;
}

.facts-grid div {
    border: 1px solid #d7dde5;
    padding: .12in;
}

.facts-grid dt {
    color: #5f6b7a;
    font-size: 9pt;
    font-weight: 700;
}

.facts-grid dd {
    margin: 0;
}

.template-letter {
    font-size: 10pt;
    line-height: 1.25;
}

.template-letter h1 {
    font-size: 15pt;
    margin: 0 0 .05in;
    text-align: center;
}

.notice-lede {
    font-size: 10.5pt;
    line-height: 1.25;
    margin: 0 0 .1in;
}

.notice-facts {
    gap: .11in;
    margin-top: .16in;
}

.notice-facts div {
    min-height: .58in;
    padding: .09in .1in;
}

.notice-facts dd {
    font-size: 10.5pt;
    line-height: 1.28;
    overflow-wrap: anywhere;
}

.meeting-qr-panel {
    align-items: center;
    border: 1px solid #d7dde5;
    display: grid;
    gap: .16in;
    grid-template-columns: 1fr .95in;
    margin: .16in 0 .18in;
    min-height: 1.1in;
    padding: .1in;
}

.meeting-qr-code {
    background: #fff;
    display: block;
    height: .82in;
    padding: .06in;
    width: .82in;
}

.meeting-qr-svg {
    display: block;
    height: 100%;
    width: 100%;
}

.qr-url {
    font-size: 9.2pt;
    line-height: 1.2;
    margin-top: .04in;
    overflow-wrap: anywhere;
}

.notice-facts-template {
    display: grid;
    gap: .06in;
    grid-template-columns: 1fr 1fr;
    margin: .1in 0 .12in;
}

.notice-facts-template > div {
    border: 1px solid #d7dde5;
    min-height: .58in;
    padding: .055in .07in;
}

.notice-facts-template dt {
    color: #5f6b7a;
    font-size: 8.2pt;
    font-weight: 700;
    line-height: 1.15;
    margin: 0 0 .025in;
}

.notice-facts-template .sub-dt {
    margin-top: .08in;
}

.notice-facts-template dd {
    font-size: 9.4pt;
    line-height: 1.18;
    margin: 0;
    overflow-wrap: anywhere;
}

.notice-split-cell {
    align-items: start;
    display: grid;
    gap: .06in;
    grid-template-columns: minmax(0, 1fr) .82in;
}

.notice-qr-code {
    align-self: center;
    background: #fff;
    display: block;
    height: .76in;
    justify-self: end;
    padding: .015in;
    width: .76in;
}

.notice-qr-code .meeting-qr-svg {
    display: block;
    height: 100%;
    width: 100%;
}

.notice-measures-cell {
    grid-column: 1 / -1;
}

.notice-measures-cell dd {
    font-size: 9.5pt;
}

.notice-measure-list {
    margin: 0;
    padding-left: .22in;
}

.notice-measure-list li {
    margin-bottom: .06in;
}

.notice-measure-list li:last-child {
    margin-bottom: 0;
}

.measure-requirement-line {
    color: #475467;
    font-size: 8.5pt;
    line-height: 1.15;
    margin-top: .025in;
}

.board-message {
    font-size: 8.7pt;
    line-height: 1.17;
    margin-top: .08in;
}

.board-message p {
    margin: 0 0 .075in;
}

.print-url,
.template-letter a {
    color: #111827;
    text-decoration: none;
}

.document-footer {
    border-top: 1px solid #d7dde5;
    bottom: .45in;
    color: #667085;
    font-size: 8.5pt;
    font-weight: 700;
    left: .75in;
    letter-spacing: .02em;
    padding-top: .06in;
    position: absolute;
    right: .75in;
    text-transform: uppercase;
}

.candidate-ballot-list {
    display: grid;
    gap: .18in;
    margin: .3in 0;
}

.checkbox-box {
    border: 1.5pt solid #111827;
    display: inline-block;
    height: .22in;
    margin-right: .18in;
    vertical-align: middle;
    width: .22in;
}

.form-row,
.blank-form-row,
.submitter-grid {
    display: grid;
    gap: .1in;
    grid-template-columns: 1.1fr 1.4fr 1.2fr;
}

.form-row span {
    color: #5f6b7a;
    font-size: 9pt;
    font-weight: 700;
}

.blank-form-row span {
    border-bottom: 1px solid #111827;
    height: .35in;
}

.statement-box {
    border: 1px solid #111827;
    height: 2.2in;
    margin: .15in 0 .25in;
    padding: .12in;
}

.submitter-grid {
    grid-template-columns: 1fr 1fr;
}

.fine-print {
    font-size: 9pt;
    margin-top: .25in;
}

.results-table input[type="number"] {
    min-width: 4.5rem;
}

.inspector-report h1 {
    font-size: 18pt;
    margin: .1in 0 .18in;
}

.inspector-report h2 {
    font-size: 13pt;
    margin: .2in 0 .08in;
}

.inspector-report p {
    font-size: 10.5pt;
    line-height: 1.35;
}

.report-results {
    border-collapse: collapse;
    font-size: 10pt;
    width: 100%;
}

.report-results th,
.report-results td {
    border: 1px solid #111827;
    padding: .06in;
    text-align: left;
    vertical-align: top;
}

.report-results th {
    background: #f1f5f9;
}

.report-facts {
    margin-top: .15in;
}

.signature-block {
    display: grid;
    gap: .15in;
    grid-template-columns: 1fr 1fr;
    margin-top: .35in;
}

@media print {
    @page {
        margin: 0;
        size: letter portrait;
    }

    .no-print,
    .sidebar,
    .top-row {
        display: none !important;
    }

    body,
    html,
    main,
    .page,
    .content {
        background: #fff !important;
        display: block !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .print-artifact {
        border: 0;
        box-sizing: border-box;
        break-after: page;
        break-inside: avoid;
        margin: 0 auto;
        overflow: hidden;
        page-break-inside: avoid;
        transform: translate(var(--print-offset-x, 0in), var(--print-offset-y, 0in)) scale(var(--print-scale, 1));
        transform-origin: top left;
    }

    .print-artifact:last-child {
        break-after: auto;
        page-break-after: auto;
    }

    .paper-preview {
        margin: 0 !important;
    }

    .envelope {
        max-width: none;
    }

    .outgoing-envelope {
        height: 4.125in;
        width: 9.5in;
    }

    .return-envelope {
        height: 3.875in;
        width: 8.875in;
    }

    .letter-page {
        height: 11in;
        max-width: none;
        width: 8.5in;
    }
}

@media print {
    body:has(.print-mode-outgoing) {
        width: 9.5in;
    }

    body:has(.print-mode-return) {
        width: 8.875in;
    }
}

@page outgoingEnvelope {
    margin: 0;
    size: 9.5in 4.125in;
}

@page returnEnvelope {
    margin: 0;
    size: 8.875in 3.875in;
}

@page letterSheet {
    margin: 0;
    size: letter portrait;
}

@media print {
    .print-mode-outgoing .print-artifact {
        page: outgoingEnvelope;
    }

    .print-mode-return .print-artifact {
        page: returnEnvelope;
    }

    .print-mode-letter .print-artifact {
        page: letterSheet;
    }
}
