@import url("https://fonts.googleapis.com/css2?family=Akaya+Kanadaka&family=Syne:wght@400;500;600;700&display=swap");

:root {
    --cocoa: #3f2219;
    --brown: #592a1d;
    --brown-soft: #7c4b3a;
    --peach: #e1a570;
    --peach-light: #edc39e;
    --cream: #f7eee8;
    --paper: #fffaf6;
    --line: #d8bba8;
    --success: #286445;
    --success-bg: #e8f3eb;
    --danger: #9b1c1c;
    --danger-bg: #fae8e6;
    --warning: #594300;
    --warning-bg: #fff3cd;
    --shadow: 0 0.35rem 1.15rem rgb(63 34 25 / 10%);
}

.customer-balance--due {
    color: var(--danger);
}

* {
    box-sizing: border-box;
}

html {
    background: var(--cream);
}

body {
    margin: 0;
    color: var(--cocoa);
    background:
        linear-gradient(180deg, rgb(225 165 112 / 18%), transparent 18rem),
        var(--cream);
    font-family: "Syne", Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.5;
}

.record-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
    gap: 0.25rem 1rem;
    max-width: 70rem;
}

.record-form-grid p,
.record-form-grid label {
    display: grid;
}

.record-form-grid__wide {
    grid-column: 1 / -1;
}

.record-details {
    display: grid;
    grid-template-columns: max-content minmax(10rem, 42rem);
    gap: 0.5rem 1rem;
}

.record-details dt {
    font-weight: 700;
}

.record-details dd {
    margin: 0;
}

.recipe-component {
    margin-block: 1rem;
}

.recipe-lines select,
.recipe-lines input,
.recipe-step-fields textarea {
    width: 100%;
}

.recipe-step-fields li {
    margin-bottom: 0.75rem;
}

.permit-product {
    max-width: 70rem;
    margin-block: 2rem;
    padding-top: 1rem;
    border-top: 2px solid var(--line);
}

@media print {
    .site-header,
    .database-banner,
    .screen-only {
        display: none;
    }
}

h1,
h2,
h3,
h4,
legend {
    color: var(--cocoa);
    font-family: "Akaya Kanadaka", Georgia, serif;
    font-weight: 400;
    letter-spacing: -0.015em;
    line-height: 1.08;
}

h1 {
    margin: 0 0 1.25rem;
    font-size: clamp(2.4rem, 5vw, 3.4rem);
}

h2 {
    margin-top: 2rem;
    font-size: clamp(1.8rem, 3vw, 2.35rem);
}

h3 {
    font-size: 1.7rem;
}

a {
    color: var(--brown);
    font-weight: 600;
    text-decoration-color: var(--peach);
    text-decoration-thickness: 0.14em;
    text-underline-offset: 0.2em;
}

a:hover {
    color: var(--brown-soft);
    text-decoration-color: var(--brown-soft);
}

.database-banner {
    padding: 0.48rem 1.25rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-align: center;
    text-transform: uppercase;
}

.database-banner--live {
    color: white;
    background: var(--danger);
}

.database-banner--local {
    color: var(--warning);
    background: var(--warning-bg);
    border-bottom: 1px solid #ead98d;
}

.site-header {
    position: sticky;
    z-index: 100;
    top: 0;
    display: flex;
    align-items: center;
    gap: clamp(1rem, 3vw, 2.25rem);
    padding: 0.8rem clamp(1rem, 3vw, 2.5rem);
    color: var(--cream);
    background: var(--cocoa);
    border-bottom: 0.35rem solid var(--peach);
    box-shadow: var(--shadow);
}

.site-brand {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 0.8rem;
    color: var(--cream);
    text-decoration: none;
}

.site-brand:hover {
    color: var(--peach-light);
}

.site-logo {
    display: block;
    width: 5rem;
    height: 5rem;
    border: 2px solid var(--peach-light);
    border-radius: 50%;
    background: var(--cream);
}

.site-brand-text {
    display: grid;
    line-height: 1;
}

.site-brand-name {
    font-family: "Akaya Kanadaka", Georgia, serif;
    font-size: 1.85rem;
    font-weight: 400;
}

.site-brand-role {
    margin-top: 0.25rem;
    color: var(--peach-light);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.site-nav a {
    padding: 0.5rem 0.7rem;
    color: var(--cream);
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
}

.site-nav a:hover {
    color: var(--cocoa);
    background: var(--peach);
}

.site-nav-menu {
    position: relative;
}

.site-nav-menu summary {
    padding: 0.5rem 0.7rem;
    border-radius: 999px;
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 600;
    list-style: none;
}

.site-nav-menu summary::-webkit-details-marker {
    display: none;
}

.site-nav-menu summary::after {
    content: " ▾";
    color: var(--peach-light);
}

.site-nav-menu[open] summary,
.site-nav-menu summary:hover {
    color: var(--cocoa);
    background: var(--peach);
}

.site-nav-menu[open] summary::after {
    color: inherit;
    content: " ▴";
}

.site-nav-menu__items {
    position: absolute;
    z-index: 20;
    top: calc(100% + 0.35rem);
    left: 0;
    display: grid;
    width: max-content;
    min-width: 10rem;
    padding: 0.4rem;
    background: var(--cocoa);
    border: 1px solid var(--peach);
    border-radius: 0.55rem;
    box-shadow: var(--shadow);
}

.site-nav-menu__items a {
    border-radius: 0.35rem;
}

.action-menu {
    position: relative;
    display: inline-block;
}

.action-menu-trigger {
    display: inline;
    padding: 0;
    color: var(--brown);
    background: transparent;
    border: 0;
    border-bottom: 2px solid var(--peach);
    border-radius: 0;
    box-shadow: none;
    font: inherit;
    font-weight: 600;
    text-align: left;
}

.action-menu-trigger:hover,
.action-menu-trigger:focus-visible {
    color: var(--cocoa);
    background: transparent;
}

.action-menu-trigger:active {
    transform: none;
}

.action-menu summary {
    padding: 0.58rem 1rem;
    color: var(--cocoa);
    background: var(--peach);
    border: 1px solid #bd7e4d;
    border-radius: 999px;
    box-shadow: 0 2px 0 #9b6138;
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 700;
    list-style: none;
}

.action-menu summary::-webkit-details-marker {
    display: none;
}

.action-menu summary::after {
    content: " ▾";
}

.action-menu[open] summary,
.action-menu summary:hover {
    background: var(--peach-light);
}

.action-menu[open] summary {
    box-shadow: none;
    transform: translateY(2px);
}

.action-menu[open] summary::after {
    content: " ▴";
}

.action-menu__items {
    position: fixed;
    z-index: 30;
    display: grid;
    width: max-content;
    min-width: 14rem;
    max-width: min(25rem, calc(100vw - 2rem));
    padding: 0.45rem;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 0.55rem;
    box-shadow: var(--shadow);
}

.action-menu__items a,
.action-menu__items button,
.action-menu__items input[type="submit"] {
    width: 100%;
    padding: 0.55rem 0.65rem;
    color: var(--brown);
    background: transparent;
    border: 0;
    border-radius: 0.35rem;
    box-shadow: none;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: left;
    text-decoration: none;
}

.action-menu__items a:hover,
.action-menu__items button:hover,
.action-menu__items input[type="submit"]:hover {
    color: var(--cocoa);
    background: rgb(225 165 112 / 22%);
}

.action-menu__items button:active,
.action-menu__items input[type="submit"]:active {
    transform: none;
}

.action-menu__items .button_to {
    display: block;
    margin: 0;
}

.action-menu__divider {
    height: 1px;
    margin: 0.35rem 0;
    background: var(--line);
}

.action-menu__items .action-menu__danger {
    color: var(--danger);
}

.action-menu--compact summary {
    min-width: 2.35rem;
    padding: 0.35rem 0.6rem;
    text-align: center;
}

.action-menu--compact summary::after {
    content: "";
}

.production-schedule-step-order {
    white-space: nowrap;
}

.production-schedule-step-handle {
    display: inline-block;
    padding: 0.35rem 0.45rem;
    cursor: grab;
    font-size: 1.2rem;
    line-height: 1;
    user-select: none;
}

.production-schedule-step-handle:active {
    cursor: grabbing;
}

.production-schedule-step--dragging {
    opacity: 0.45;
}

.secondary-panel {
    max-width: 44rem;
    margin: 0 0 1.5rem;
    padding: 0.75rem 1rem;
    border: 1px solid var(--line);
    border-radius: 0.55rem;
    background: rgb(255 255 255 / 28%);
}

.secondary-panel summary {
    cursor: pointer;
    font-weight: 700;
}

.batch-selection-actions {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    margin-bottom: 1rem;
}

.app-shell {
    width: min(100% - 2rem, 92rem);
    min-height: calc(100vh - 9rem);
    margin: 0 auto;
    padding: clamp(1.5rem, 4vw, 3rem) 0 4rem;
}

.app-shell--wide {
    width: calc(100% - 2rem);
    max-width: none;
}

.flash {
    max-width: 50rem;
    margin: 0 0 1.25rem;
    padding: 0.75rem 1rem;
    border: 1px solid;
    border-radius: 0.45rem;
    font-weight: 600;
}

.flash--notice {
    color: var(--success);
    background: var(--success-bg);
    border-color: #a6ceb2;
}

.flash--alert {
    color: var(--danger);
    background: var(--danger-bg);
    border-color: #e2aaa5;
}

table {
    width: 100%;
    margin: 1rem 0 1.5rem;
    background: var(--paper);
    border: 1px solid var(--line);
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 0.55rem;
    box-shadow: var(--shadow);
}

th,
td {
    padding: 0.68rem 0.78rem;
    border-bottom: 1px solid #ead8cc;
    text-align: left;
    vertical-align: top;
}

th {
    color: var(--cream);
    background: var(--brown);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.035em;
}

th a {
    color: inherit;
}

th a:hover {
    color: var(--peach-light);
}

.sales-report-table > thead th {
    position: sticky;
    z-index: 10;
    top: var(--sales-sticky-top, 0);
}

.sales-report-table .sales-group-summary > th {
    position: sticky;
    z-index: 9;
    top: calc(var(--sales-sticky-top, 0px) + var(--sales-column-header-height, 2.5rem));
}

.sales-report-table .sales-grand-total > th {
    border-top: 0.2rem solid var(--peach);
}

.sales-report-table .sales-grand-total--top > th {
    border-top: 0;
    border-bottom: 0.2rem solid var(--peach);
}

th:first-child {
    border-top-left-radius: 0.45rem;
}

th:last-child {
    border-top-right-radius: 0.45rem;
}

tbody tr:nth-child(even) td {
    background: rgb(225 165 112 / 10%);
}

tbody tr:hover td {
    background: rgb(225 165 112 / 22%);
}

.sales-group-toggle {
    width: 100%;
    padding: 0;
    color: inherit;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    text-align: left;
}

.sales-group-toggle:hover,
.sales-group-toggle:active {
    color: var(--peach-light);
    background: transparent;
    box-shadow: none;
    transform: none;
}

.sales-group-toggle:focus-visible {
    outline: 2px solid var(--peach-light);
    outline-offset: 3px;
}

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

.order-summary-table {
    width: min(100%, 56rem);
    min-width: 0;
}

.order-summary-table th {
    width: 14rem;
    color: var(--brown);
    background: rgb(225 165 112 / 16%);
    letter-spacing: normal;
}

.order-summary-table th:first-child,
.order-summary-table th:last-child {
    border-radius: 0;
}

.order-summary-table td {
    background: var(--paper);
}

.product-types-table-wrapper {
    max-width: 100%;
    overflow-x: auto;
}

.product-types-table {
    min-width: 78rem;
}

.product-types-table code {
    white-space: nowrap;
}

.numeric {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.negative-balance {
  color: #b42318;
  font-weight: 700;
}

.numeric input[type="number"] {
    text-align: right;
}

form p {
    margin: 0.8rem 0 1rem;
}

.sales-date-shortcuts {
    display: flex;
    align-items: center;
    gap: 0.3rem 0.6rem;
    flex-wrap: wrap;
}

.sales-date-shortcuts button {
    padding: 0;
    color: var(--brown);
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    text-decoration: underline;
    text-decoration-color: var(--peach);
    text-underline-offset: 0.2rem;
}

.sales-date-shortcuts button:hover,
.sales-date-shortcuts button:active {
    color: var(--cocoa);
    background: transparent;
    box-shadow: none;
    transform: none;
}

.date-time-fields {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

label {
    color: var(--brown);
    font-size: 0.9rem;
    font-weight: 700;
}

input,
select,
textarea,
button {
    max-width: 100%;
    color: var(--cocoa);
    font: inherit;
}

input[type="text"],
input[type="password"],
input[type="tel"],
input[type="date"],
input[type="time"],
input[type="number"],
input[type="search"],
select,
textarea {
    padding: 0.52rem 0.65rem;
    background: white;
    border: 1px solid #bb9580;
    border-radius: 0.35rem;
    box-shadow: inset 0 1px 2px rgb(63 34 25 / 8%);
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--brown);
    outline: 3px solid rgb(225 165 112 / 42%);
    outline-offset: 1px;
}

input[type="checkbox"],
input[type="radio"] {
    accent-color: var(--brown);
}

.customer-lookup {
    display: grid;
    grid-template-columns: max-content minmax(18rem, 32rem);
    gap: 0.45rem 0.65rem;
    align-items: center;
}

.customer-lookup input[list],
.customer-lookup-field input {
    width: 100%;
    color-scheme: light;
}

.customer-lookup-field { position: relative; min-width: 0; }
.customer-lookup-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 50;
    max-height: 18rem;
    overflow-y: auto;
    overscroll-behavior: contain;
    color: #3f2219;
    background: #fffaf6;
    color-scheme: light;
    border: 1px solid #7c4b3a;
    border-radius: 0.45rem;
    box-shadow: var(--shadow);
}
.customer-lookup-options[hidden] { display: none; }
.customer-lookup-options [role="option"], .customer-lookup-empty {
    padding: .65rem .8rem;
    min-height: 44px;
    overflow-wrap: anywhere;
}
.customer-lookup-options [role="option"] { cursor: pointer; color: #3f2219; background: #fffaf6; }
.customer-lookup-options [role="option"]:hover,
.customer-lookup-options [aria-selected="true"] { color: #3f2219; background: #edc39e; }
.customer-lookup-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

@media (max-width: 40rem) {
    .customer-lookup {
        grid-template-columns: minmax(0, 1fr);
    }
}

input[type="submit"],
button,
.button_to button {
    padding: 0.58rem 1rem;
    color: var(--cocoa);
    background: var(--peach);
    border: 1px solid #bd7e4d;
    border-radius: 999px;
    box-shadow: 0 2px 0 #9b6138;
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 700;
}

input[type="submit"]:hover,
button:hover,
.button_to button:hover {
    background: var(--peach-light);
}

input[type="submit"]:active,
button:active,
.button_to button:active {
    box-shadow: none;
    transform: translateY(2px);
}

.button_to {
    display: inline-block;
}

.site-header > .button_to {
    margin-left: auto;
}

.plan-page {
    width: min(100%, 76rem);
}

.plan-page__header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.plan-page__header h1 {
    margin-bottom: 0.5rem;
}

.plan-page__header h2 {
    margin: 0;
}

.plan-page__status {
    display: grid;
    min-width: 10rem;
    margin: 0;
    padding: 0.65rem 0.9rem;
    color: var(--warning);
    background: var(--warning-bg);
    border: 1px solid #ead98d;
    border-radius: 0.55rem;
    text-align: right;
}

.plan-page__status span {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.plan-page__status--batches-created {
    color: var(--success);
    background: var(--success-bg);
    border-color: #a6ceb2;
}

.plan-page__status--cancelled {
    color: var(--danger);
    background: var(--danger-bg);
    border-color: #e2aaa5;
}

.plan-page__pending {
    color: var(--brown-soft);
    font-size: 0.88rem;
}

.plan-page__total {
    text-align: right;
}

.plan-page__notes {
    margin-top: 2rem;
    padding: 1rem 1.2rem;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 0.55rem;
    box-shadow: var(--shadow);
}

.plan-page__notes h2 {
    margin: 0 0 0.75rem;
}

.plan-page__notes p:last-child {
    margin-bottom: 0;
}

.plan-page__actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem 1.1rem;
    margin-top: 2rem;
}

.plan-page__actions .button_to {
    margin: 0;
}

.plan-suggestions {
    margin-bottom: 2rem;
    padding: clamp(1rem, 3vw, 1.5rem);
    background: rgb(225 165 112 / 10%);
    border: 1px solid var(--line);
    border-radius: 0.65rem;
}

.plan-suggestions > h2 {
    margin-top: 0;
}

.plan-suggestion + .plan-suggestion {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--line);
}

.plan-suggestion h3 {
    margin-bottom: 0.5rem;
}

.plan-suggestion .button_to {
    margin-top: 1rem;
}

.plan-suggestions__covered {
    margin-bottom: 0;
    color: var(--success);
    font-weight: 700;
}

@media (max-width: 42rem) {
    .plan-page__header {
        display: grid;
        align-items: start;
    }

    .plan-page__status {
        min-width: 0;
        text-align: left;
    }
}

.sign-out-button {
    white-space: nowrap;
}

.login-panel {
    width: min(100%, 28rem);
    margin: clamp(1rem, 7vh, 5rem) auto;
    padding: clamp(1.5rem, 5vw, 2.5rem);
    background: var(--paper);
    border: 1px solid var(--line);
    border-top: 0.4rem solid var(--peach);
    border-radius: 0.65rem;
    box-shadow: var(--shadow);
}

.login-panel h1 {
    margin-bottom: 0.5rem;
}

.login-panel > p {
    margin-top: 0;
    color: var(--brown-soft);
}

.login-panel input[type="text"],
.login-panel input[type="password"] {
    width: 100%;
}

fieldset {
    margin: 1.25rem 0;
    padding: 1rem;
    background: rgb(255 250 246 / 75%);
    border: 1px solid var(--line);
    border-radius: 0.55rem;
}

legend {
    padding: 0 0.4rem;
    font-size: 1.45rem;
}

dl {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: 0.3rem 1rem;
}

dt {
    color: var(--brown);
    font-weight: 700;
}

dd {
    margin: 0;
}

.order-details {
    max-width: 42rem;
    padding: 1rem;
    overflow-wrap: anywhere;
    background: var(--paper);
    border: 1px solid var(--line);
    border-left: 0.35rem solid var(--peach);
    border-radius: 0.45rem;
    box-shadow: var(--shadow);
}

.order-details p {
    margin: 0;
}

.order-details p + p {
    margin-top: 0.75rem;
}

.account-summary {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin: 1rem 0;
}

.account-summary > div {
    min-width: 10rem;
    padding: 0.85rem 1rem;
    background: var(--paper);
    border: 1px solid var(--line);
    border-top: 0.3rem solid var(--peach);
    border-radius: 0.45rem;
    box-shadow: var(--shadow);
}

.account-summary span,
.account-summary strong {
    display: block;
}

.account-summary span {
    color: var(--brown-soft);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.account-summary strong {
    margin-top: 0.3rem;
    color: var(--cocoa);
    font-family: "Akaya Kanadaka", Georgia, serif;
    font-size: 1.45rem;
    font-weight: 400;
}

.public-order-page {
    min-width: 20rem;
    background:
        radial-gradient(circle at 92% 8%, rgb(225 165 112 / 24%), transparent 25rem),
        linear-gradient(180deg, #fffaf6 0, var(--cream) 34rem);
}

.public-header {
    border-bottom: 0.3rem solid var(--peach);
    color: var(--cream);
    background: var(--cocoa);
    box-shadow: 0 0.6rem 2rem rgb(63 34 25 / 14%);
}

.public-header__inner {
    display: flex;
    width: min(100% - 2rem, 68rem);
    min-height: 6.4rem;
    margin: 0 auto;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.public-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.9rem;
    color: var(--cream);
    text-decoration: none;
}

.public-brand:hover {
    color: var(--peach-light);
}

.public-brand__logo {
    width: 4.7rem;
    height: 4.7rem;
    border: 2px solid var(--peach-light);
    border-radius: 50%;
    background: var(--cream);
}

.public-brand > span {
    display: grid;
    line-height: 1;
}

.public-brand__name {
    font-family: "Akaya Kanadaka", Georgia, serif;
    font-size: 2rem;
}

.public-brand__location {
    margin-top: 0.3rem;
    color: var(--peach-light);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.public-header__link {
    padding: 0.6rem 0.9rem;
    color: var(--cream);
    border: 1px solid var(--peach-light);
    border-radius: 999px;
    text-decoration: none;
}

.public-header__link:hover {
    color: var(--cocoa);
    background: var(--peach);
}

.public-header__links {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.65rem;
}

.public-order-shell {
    width: min(100% - 2rem, 68rem);
    margin: 0 auto;
    padding: clamp(2.5rem, 6vw, 5rem) 0;
}

.order-hero {
    max-width: 50rem;
    margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.order-hero h1,
.order-thanks h1 {
    margin-bottom: 1rem;
    font-size: clamp(3.5rem, 8vw, 6rem);
}

.order-hero > p:last-child,
.order-thanks > p {
    color: var(--brown-soft);
    font-size: clamp(1.05rem, 2vw, 1.25rem);
}

.order-eyebrow {
    margin-bottom: 0.7rem;
    color: var(--brown-soft);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.public-order-form {
    display: grid;
    gap: 1.5rem;
}

.order-form-section,
.order-errors,
.order-thanks {
    padding: clamp(1.5rem, 4vw, 2.75rem);
    border: 1px solid var(--line);
    border-radius: 1.1rem;
    background: var(--paper);
    box-shadow: 0 1rem 2.5rem rgb(63 34 25 / 9%);
}

.order-errors {
    color: var(--danger);
    background: var(--danger-bg);
    border-color: #e2aaa5;
}

.order-errors h2 {
    margin: 0 0 0.75rem;
}

.order-errors ul {
    margin-bottom: 0;
}

.order-section-heading {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.order-section-heading > span {
    display: inline-flex;
    width: 2.2rem;
    height: 2.2rem;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    color: var(--cream);
    background: var(--brown);
    border-radius: 50%;
    font-weight: 700;
}

.order-section-heading h2 {
    margin: 0 0 0.2rem;
    font-size: clamp(2rem, 4vw, 2.8rem);
}

.order-section-heading p {
    margin: 0;
    color: var(--brown-soft);
}

.order-fields {
    display: grid;
    gap: 1rem;
}

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

.order-fields label,
.order-notes label {
    display: block;
    margin-bottom: 0.35rem;
}

.order-fields input,
.order-notes textarea {
    width: 100%;
}

.order-choice-group {
    margin: 1.5rem 0 0;
    padding: 0;
    background: transparent;
    border: 0;
}

.order-choice-group legend {
    margin-bottom: 0.7rem;
    padding: 0;
    font-family: "Syne", Arial, sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
}

.order-choice-row,
.order-location-grid {
    display: flex;
    gap: 0.75rem;
}

.order-choice-row--wrap {
    flex-wrap: wrap;
}

.order-location-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.order-choice {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.75rem 0.9rem;
    border: 1px solid var(--line);
    border-radius: 0.65rem;
    background: white;
    cursor: pointer;
}

.order-choice:has(input:checked) {
    border-color: var(--brown);
    background: rgb(225 165 112 / 20%);
    box-shadow: 0 0 0 2px rgb(225 165 112 / 35%);
}

.order-choice--location {
    min-height: 4rem;
}

.order-products {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 0.75rem;
}

.order-product {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.15rem;
    background: white;
}

.order-product + .order-product {
    border-top: 1px solid var(--line);
}

.order-product h3 {
    margin: 0 0 0.25rem;
    font-family: "Syne", Arial, sans-serif;
    font-size: 1rem;
    font-weight: 700;
}

.order-product p {
    margin: 0;
    color: var(--brown-soft);
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
}

.order-product__quantity {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 0.75rem;
}

.order-product__price {
    font-weight: 700;
}

.order-product--coming-soon {
    background: var(--cream);
}

.order-product__coming-soon {
    flex: 0 0 auto;
    padding: 0.45rem 0.7rem;
    border: 1px solid var(--peach);
    border-radius: 999px;
    color: var(--brown);
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.order-product select {
    min-width: 4rem;
}

.order-payment-note {
    margin: 1rem 0 0;
    color: var(--brown-soft);
    font-size: 0.9rem;
}

.order-notes {
    margin-top: 1.5rem;
}

.website-field {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.order-submit {
    padding: 0.75rem 0 0;
    text-align: center;
}

.order-submit input[type="submit"],
.order-home-link {
    display: inline-flex;
    min-height: 3.5rem;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.5rem;
    border: 2px solid var(--brown);
    border-radius: 999px;
    color: var(--cream);
    background: var(--brown);
    box-shadow: 0 0.35rem 0 var(--peach);
    font-weight: 700;
    text-decoration: none;
}

.order-submit p {
    margin: 0.9rem 0 0;
    color: var(--brown-soft);
    font-size: 0.88rem;
}

.order-thanks {
    max-width: 48rem;
    margin: clamp(1rem, 6vh, 4rem) auto;
    text-align: center;
}

.customer-access {
    max-width: 44rem;
    margin: clamp(1rem, 6vh, 4rem) auto;
    padding: clamp(1.5rem, 4vw, 2.75rem);
    border: 1px solid var(--line);
    border-radius: 1.1rem;
    background: var(--paper);
    box-shadow: 0 1rem 2.5rem rgb(63 34 25 / 9%);
}

.customer-access h1 {
    margin-bottom: 1rem;
    font-size: clamp(3rem, 7vw, 5rem);
}

.customer-access--centered {
    text-align: center;
}

.customer-access__form {
    display: flex;
    align-items: flex-end;
    gap: 0.8rem;
    margin-top: 2rem;
}

.customer-access__form > div {
    flex: 1 1 auto;
}

.customer-access__form label {
    display: block;
    margin-bottom: 0.35rem;
}

.customer-access__form input[type="tel"] {
    width: 100%;
}

.customer-access__form input[type="submit"],
.customer-sign-out {
    min-height: 2.9rem;
    padding: 0.6rem 1rem;
    border: 2px solid var(--brown);
    border-radius: 999px;
    color: var(--cream);
    background: var(--brown);
    font-weight: 700;
}

.customer-access__help {
    margin: 1.5rem 0 0;
    color: var(--brown-soft);
    font-size: 0.9rem;
}

.standing-orders-heading {
    display: flex;
    max-width: 64rem;
    margin: 0 auto 2rem;
    align-items: flex-start;
    justify-content: space-between;
    gap: 2rem;
}

.standing-orders-heading h1 {
    margin-bottom: 0.7rem;
}

.standing-orders-heading p:last-child {
    color: var(--brown-soft);
}

.standing-order-list {
    display: grid;
    max-width: 64rem;
    margin: 0 auto;
    gap: 1.25rem;
}

.standing-order-card {
    padding: clamp(1.4rem, 4vw, 2.4rem);
    border: 1px solid var(--line);
    border-radius: 1.1rem;
    background: var(--paper);
    box-shadow: var(--shadow);
}

.standing-order-card__heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.standing-order-card__heading h2 {
    margin: 0.3rem 0 0;
}

.standing-order-card__status {
    display: inline-block;
    margin: 0;
    padding: 0.2rem 0.55rem;
    color: var(--success);
    background: var(--success-bg);
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.standing-order-card__status--inactive {
    color: var(--brown-soft);
    background: var(--cream);
}

.standing-order-card__start {
    margin: 0;
    color: var(--brown-soft);
    text-align: right;
}

.standing-order-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.standing-order-details div {
    padding: 1rem;
    background: var(--cream);
    border-radius: 0.7rem;
}

.standing-order-details dt {
    color: var(--brown-soft);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.standing-order-details dd {
    margin: 0.35rem 0 0;
    font-weight: 600;
}

.standing-order-upcoming h3 {
    margin-bottom: 0.7rem;
    font-family: "Syne", Arial, sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
}

.standing-order-upcoming ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.standing-order-upcoming li {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.55rem 0;
    border-top: 1px solid var(--line);
}

.standing-order-upcoming li span:last-child {
    color: var(--brown-soft);
}

.standing-orders-help {
    max-width: 64rem;
    margin: 1.5rem auto 0;
    text-align: center;
}

.order-home-link {
    margin-top: 1rem;
}

.public-footer {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    padding: 2rem 1rem;
    color: var(--cream);
    background: var(--cocoa);
    text-align: center;
}

.public-footer p {
    margin: 0;
}

.public-footer a {
    color: var(--peach-light);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.label-controls {
    max-width: 52rem;
}

.label-position-form fieldset {
    padding: 1rem;
}

.label-position-grid {
    display: grid;
    max-width: 32rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
}

.label-position {
    display: flex;
    min-height: 4.4rem;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem;
    border: 1px solid var(--line);
    border-radius: 0.55rem;
    background: white;
    cursor: pointer;
}

.label-position:has(input:checked) {
    border-color: var(--brown);
    background: rgb(225 165 112 / 20%);
    box-shadow: 0 0 0 2px rgb(225 165 112 / 35%);
}

.label-position span,
.label-position strong {
    display: block;
}

.label-position strong {
    font-size: 1.2rem;
}

.label-price-grid {
    display: grid;
    max-width: 40rem;
    margin-top: 0.65rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
}

.label-price-option {
    display: flex;
    min-height: 3.5rem;
    align-items: center;
    gap: 0.65rem;
    padding: 0.7rem;
    border: 1px solid var(--line);
    border-radius: 0.55rem;
    background: white;
    cursor: pointer;
}

.label-price-option:has(input:checked) {
    border-color: var(--brown);
    background: rgb(225 165 112 / 20%);
    box-shadow: 0 0 0 2px rgb(225 165 112 / 35%);
}

.label-price-option span,
.label-price-option strong {
    display: block;
}

.label-price-option--all {
    max-width: 40rem;
    min-height: auto;
}

.label-warning {
    margin-top: 1.5rem;
    padding: 1rem 1.2rem;
    color: var(--danger);
    background: var(--danger-bg);
    border: 1px solid #e2aaa5;
    border-radius: 0.55rem;
}

.label-warning h2 {
    margin: 0 0 0.75rem;
    color: inherit;
    font-family: "Syne", Arial, sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
}

.label-print-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
}

.label-print-actions p {
    max-width: 38rem;
    margin: 0;
    color: var(--brown-soft);
    font-size: 0.85rem;
}

.label-print-preview {
    display: grid;
    gap: 2rem;
    margin-top: 2rem;
}

.label-sheet {
    display: grid;
    width: min(100%, 51rem);
    aspect-ratio: 8.5 / 11;
    padding: 3% 1.84%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(3, minmax(0, 1fr));
    column-gap: 2.2%;
    background: white;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.loaf-label {
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 0;
    padding: clamp(0.35rem, 1vw, 0.75rem);
    overflow: hidden;
    flex-direction: column;
    color: var(--cocoa);
    background: var(--cream);
    border: 2px solid var(--peach);
    border-radius: 0.45rem;
    font-family: "Syne", Arial, sans-serif;
    line-height: 1.25;
}

.loaf-label p {
    margin: 0;
}

.loaf-label__header {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--peach);
}

.loaf-label__header img {
    width: clamp(2.5rem, 6vw, 4.2rem);
    height: clamp(2.5rem, 6vw, 4.2rem);
    flex: 0 0 auto;
    border-radius: 50%;
}

.loaf-label__header p {
    color: var(--brown-soft);
    font-size: clamp(0.5rem, 1vw, 0.7rem);
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.loaf-label__header h2 {
    margin: 0.08rem 0 0;
    font-size: clamp(0.85rem, 2vw, 1.45rem);
}

.loaf-label__trace {
    padding: 0.45rem 0;
    font-size: clamp(0.5rem, 1vw, 0.7rem);
}

.loaf-label__trace span {
    padding: 0 0.2rem;
}

.loaf-label__price {
    margin: -1.2rem 0 0.35rem !important;
    font-size: clamp(0.8rem, 1.8vw, 1.2rem);
    font-weight: 800;
    text-align: right;
}

.loaf-label__food-details {
    display: grid;
    gap: 0.25rem;
    font-size: clamp(0.48rem, 1vw, 0.68rem);
}

.loaf-label__qr-codes {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: auto 0 0.25rem;
}

.loaf-label__qr-codes figure {
    display: grid;
    margin: 0;
    justify-items: center;
}

.loaf-label__qr-code {
    display: block;
    width: clamp(2.8rem, 6vw, 4.4rem);
    height: clamp(2.8rem, 6vw, 4.4rem);
    background: white;
}

.loaf-label__qr-codes div:has(> .loaf-label__qr-code) {
    line-height: 0;
}

.loaf-label__qr-code path {
    fill: #000;
}

.public-batch-details {
    max-width: 50rem;
}

.public-batch-freshness {
    display: grid;
    max-width: 50rem;
    gap: 0.2rem;
    margin-top: 1.25rem;
    padding: 0.9rem 1rem;
    background: rgb(225 165 112 / 15%);
    border-left: 0.3rem solid var(--peach);
    border-radius: 0 0.55rem 0.55rem 0;
}

.public-batch-freshness strong {
    color: var(--brown);
}

.public-batch-order-callout {
    display: flex;
    width: min(100%, 50rem);
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    margin: 1.5rem 0;
    padding: clamp(1.25rem, 4vw, 2rem);
    color: var(--cream);
    background: var(--brown);
    border: 2px solid var(--peach);
    border-radius: 1rem;
    box-shadow: var(--shadow);
}

.public-batch-order-callout .order-eyebrow {
    color: var(--peach);
}

.public-batch-order-callout h2 {
    margin: 0.2rem 0 0.35rem;
    color: var(--cream);
}

.public-batch-order-callout p {
    margin-bottom: 0;
}

.public-batch-order-callout__button {
    display: inline-flex;
    min-height: 3.5rem;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.4rem;
    color: var(--cocoa);
    background: var(--peach);
    border: 2px solid var(--cream);
    border-radius: 999px;
    box-shadow: 0 0.3rem 0 rgb(0 0 0 / 25%);
    font-weight: 800;
    text-decoration: none;
}

.public-batch-order-callout__button:hover {
    color: var(--cocoa);
    background: var(--peach-light);
}

.public-batch-details h2 {
    margin-top: 0;
}

.public-batch-details dl {
    display: grid;
    gap: 1rem;
    margin: 1.5rem 0 2rem;
}

.public-batch-details dl div {
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--line);
}

.public-batch-details dt {
    color: var(--brown-soft);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.public-batch-details dd {
    margin: 0.25rem 0 0;
}

.public-batch-care {
    max-width: 50rem;
}

.public-batch-care h2 {
    margin-top: 0;
}

.public-batch-care__guidance {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.public-batch-care__guidance article {
    padding: 1rem;
    background: rgb(255 255 255 / 42%);
    border: 1px solid var(--line);
    border-radius: 0.75rem;
}

.public-batch-care__guidance h3 {
    margin: 0 0 0.35rem;
}

.public-batch-care__guidance p {
    margin: 0;
}

@media (max-width: 42rem) {
    .public-batch-order-callout {
        align-items: stretch;
        flex-direction: column;
    }

    .public-batch-order-callout__button {
        width: 100%;
    }

    .public-batch-care__guidance {
        grid-template-columns: 1fr;
    }
}

.loaf-label__qr-codes figcaption {
    margin-top: 0.12rem;
    font-size: clamp(0.4rem, 0.85vw, 0.58rem);
    font-weight: 700;
}

.loaf-label__footer {
    margin-top: auto;
    padding-top: 0.4rem;
    border-top: 1px solid var(--peach);
    font-size: clamp(0.43rem, 0.9vw, 0.6rem);
}

.loaf-label__statement {
    margin-top: 0.25rem !important;
    font-size: 0.88em;
}

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

    html,
    body {
        width: 8.5in;
        margin: 0;
        padding: 0;
        background: white;
    }

    .database-banner,
    .site-header,
    .flash,
    .label-controls {
        display: none !important;
    }

    .app-shell {
        width: auto;
        min-height: 0;
        margin: 0 !important;
        padding: 0 !important;
        overflow: visible;
    }

    .label-print-preview {
        display: block;
        margin: 0 !important;
        padding: 0 !important;
    }

    .label-sheet {
        page: labels;
        position: relative;
        display: block;
        width: 8.5in;
        /*
         * Three 85mm rows beginning 9mm from the CSS page origin end at
         * 274mm. The printer adds about 6mm above that origin, placing the
         * first printed border 17mm from the physical paper edge. Keeping
         * the sheet container to that actual content height avoids an
         * otherwise blank overflow page in browser and printer pagination.
         */
        height: 274mm;
        margin: 0;
        padding: 0;
        overflow: hidden;
        break-inside: avoid;
        page-break-inside: avoid;
        border: 0;
        box-shadow: none;
    }

    .label-sheet > * {
        position: absolute;
        width: 101mm;
        height: 85mm;
    }

    .label-sheet + .label-sheet {
        break-before: page;
        page-break-before: always;
    }

    .label-sheet > :nth-child(1),
    .label-sheet > :nth-child(2) {
        top: 9mm;
    }

    .label-sheet > :nth-child(3),
    .label-sheet > :nth-child(4) {
        top: 99mm;
    }

    .label-sheet > :nth-child(5),
    .label-sheet > :nth-child(6) {
        top: 189mm;
    }

    .label-sheet > :nth-child(odd) {
        left: -2mm;
    }

    .label-sheet > :nth-child(even) {
        left: 113.9mm;
    }

    .loaf-label {
        padding: 0.14in;
        color: #3f2219;
        background: #f7eee8;
        border: 0;
        border-radius: 0;
        print-color-adjust: exact;
    }

    .loaf-label::after {
        position: absolute;
        z-index: 2;
        top: 2mm;
        left: 2mm;
        width: 97mm;
        height: 81mm;
        border: 0.02in solid #e1a570;
        border-radius: 0.08in;
        content: "";
        pointer-events: none;
    }

    .loaf-label__header {
        gap: 0.09in;
        padding-bottom: 0.06in;
    }

    .loaf-label__header img {
        width: 0.62in;
        height: 0.62in;
    }

    .loaf-label__header p {
        font-size: 6pt;
    }

    .loaf-label__header h2 {
        font-size: 14pt;
    }

    .loaf-label__trace {
        padding: 0.07in 0;
        font-size: 7.5pt;
    }

    .loaf-label__price {
        margin: -0.18in 0 0.04in !important;
        font-size: 12pt;
    }

    .loaf-label__food-details {
        gap: 0.035in;
        font-size: 7.5pt;
    }

    .loaf-label__qr-codes {
        margin-bottom: 0.04in;
    }

    .loaf-label__qr-code {
        width: 0.86in;
        height: 0.86in;
    }

    .loaf-label__qr-codes figcaption {
        margin-top: 0.02in;
        font-size: 5.5pt;
    }

    .loaf-label__footer {
        padding-top: 0.055in;
        font-size: 6.6pt;
    }
}

.unpaid-sales-customer + .unpaid-sales-customer {
    margin-top: 2rem;
}

.unpaid-sales-customer__heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.invoice {
    max-width: 58rem;
    margin: 0 auto;
    padding: 2rem;
    background: #fffdfb;
    color: #3f2118;
    border: 1px solid #e2b68e;
    border-radius: 0.75rem;
}

.invoice__header,
.invoice__brand,
.invoice__actions {
    display: flex;
    align-items: center;
}

.invoice__header {
    justify-content: space-between;
    gap: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #e1a570;
}

.invoice__brand {
    gap: 1rem;
}

.invoice__brand img {
    width: 5rem;
    height: 5rem;
}

.invoice__brand p,
.invoice__title p,
.invoice__bill-to p {
    margin: 0.15rem 0;
}

.invoice__business-name {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.invoice__title {
    text-align: right;
}

.invoice__title h1 {
    margin: 0;
}

.invoice__bill-to {
    margin: 1.5rem 0;
}

.invoice__bill-to h2 {
    margin-bottom: 0.25rem;
    font-size: 1rem;
    text-transform: uppercase;
}

.invoice__totals {
    display: block;
    width: min(100%, 24rem);
    margin: 1.5rem 0 1.5rem auto;
}

.invoice__totals div {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    padding: 0.35rem 0;
}

.invoice__totals dt,
.invoice__totals dd {
    margin: 0;
}

.invoice__amount-due {
    margin-top: 0.4rem;
    padding-top: 0.75rem !important;
    border-top: 2px solid #e1a570;
    font-size: 1.2rem;
    font-weight: 700;
}

.invoice__thanks {
    margin-top: 2rem;
    text-align: center;
}

.invoice__actions {
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

@media print {
    .database-banner,
    .site-header,
    .invoice__actions {
        display: none !important;
    }

    body,
    .app-shell {
        background: #fff;
    }

    .app-shell {
        width: 100%;
        padding: 0;
    }

    .invoice {
        max-width: none;
        padding: 0;
        border: 0;
        box-shadow: none;
    }

    .invoice table {
        font-size: 10pt;
    }
}

@media (max-width: 52rem) {
    .label-price-grid {
        grid-template-columns: 1fr;
    }

    .site-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.75rem;
    }

    .site-logo {
        width: 4rem;
        height: 4rem;
    }

    .site-nav {
        width: 100%;
    }

    .site-nav-menu__items {
        position: static;
        margin-top: 0.25rem;
        box-shadow: none;
    }

    .site-header > .button_to {
        margin-left: 0;
    }

    .public-header__inner,
    .standing-orders-heading,
    .standing-order-card__heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .public-header__inner {
        padding: 1rem 0;
    }

    .public-header__links {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .customer-access__form {
        align-items: stretch;
        flex-direction: column;
    }

    .standing-order-details {
        grid-template-columns: 1fr;
    }

    .standing-order-card__start {
        text-align: left;
    }

    .site-nav a {
        padding: 0.38rem 0.52rem;
        font-size: 0.8rem;
    }

    .app-shell {
        width: min(100% - 1.25rem, 92rem);
        padding-top: 1.5rem;
        overflow-x: auto;
    }

    table {
        min-width: 42rem;
        font-size: 0.88rem;
    }

    dl {
        grid-template-columns: 1fr;
    }

    dd + dt {
        margin-top: 0.65rem;
    }

    .public-header__inner {
        min-height: 5.5rem;
    }

    .public-brand__logo {
        width: 4rem;
        height: 4rem;
    }

    .public-brand__name {
        font-size: 1.55rem;
    }

    .public-brand__location,
    .public-header__link {
        display: none;
    }

    .order-fields--two,
    .order-location-grid {
        grid-template-columns: 1fr;
    }

    .order-product {
        align-items: flex-start;
    }

    .public-footer {
        display: block;
    }

    .public-footer p + p {
        margin-top: 0.35rem;
    }
}

@media print {
    @page invoice {
        size: letter portrait;
        margin: 0.4in;
    }

    html,
    body {
        width: auto !important;
        min-width: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .app-shell {
        width: auto !important;
        max-width: none !important;
        overflow: visible !important;
    }

    .invoice {
        page: invoice;
        width: 100%;
        max-width: none;
        margin: 0;
        padding: 0;
        overflow: visible;
        font-size: 10.5pt;
        line-height: 1.3;
    }

    .invoice__header {
        gap: 1rem;
    }

    .invoice__brand img {
        width: 0.8in;
        height: 0.8in;
    }

    .invoice__title {
        flex: 0 0 auto;
    }

    .invoice table {
        width: 100%;
        min-width: 0 !important;
        table-layout: fixed;
        font-size: 9.5pt;
    }

    .invoice th,
    .invoice td {
        padding: 0.075in 0.08in;
        overflow-wrap: anywhere;
    }

    .invoice__business-name {
        font-size: 14pt;
    }

    .invoice__title h1 {
        font-size: 20pt;
    }

    .invoice__totals {
        width: 3.5in;
        margin-top: 0.65rem;
        margin-bottom: 0.5rem;
        font-size: 10.5pt;
        break-inside: avoid;
    }

    .invoice__amount-due {
        font-size: 13pt;
    }

    .invoice__thanks {
        margin-top: 0.5rem;
        font-size: 10pt;
        break-inside: avoid;
    }

    .invoice__items th:nth-child(1) { width: 16%; }
    .invoice__items th:nth-child(2) { width: 36%; }
    .invoice__items th:nth-child(3) { width: 16%; }
    .invoice__items th:nth-child(4),
    .invoice__items th:nth-child(5),
    .invoice__items th:nth-child(6) { width: 10.66%; }
}
