:root {
    --forest: #193e35;
    --forest-2: #2e6654;
    --sage: #89aa92;
    --mint: #dceadf;
    --ivory: #fbfaf4;
    --paper: #fffef9;
    --ink: #19322c;
    --muted: #64766d;
    --line: #d9e1d6;
    --gold: #d7a83e;
    --coral: #ba5b4b;
    --blue: #447b82;
    --shadow: 0 12px 36px rgba(26, 62, 53, 0.08);
    --radius: 18px;
    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    color: var(--ink);
    background: var(--ivory);
    font-synthesis: none;
}
* {
    box-sizing: border-box;
}
body {
    margin: 0;
    min-width: 0;
    background:
        radial-gradient(circle at 88% -10%, #e4eee3 0, transparent 35%),
        var(--ivory);
}
button,
input,
select,
textarea {
    font: inherit;
}
button {
    cursor: pointer;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid rgba(68, 123, 130, 0.38);
    outline-offset: 2px;
}
a {
    color: var(--forest-2);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}
.noscript {
    max-width: 40rem;
    margin: 8rem auto;
    padding: 2rem;
}
.app-shell {
    min-height: 100vh;
}
.skip-link {
    position: fixed;
    top: 0.5rem;
    left: 0.5rem;
    z-index: 100;
    padding: 0.7rem 1rem;
    border-radius: 0.55rem;
    color: #fff;
    background: var(--forest);
    transform: translateY(-160%);
}
.skip-link:focus {
    transform: translateY(0);
}
.topbar {
    min-height: 74px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.8rem clamp(1rem, 4vw, 4rem);
    background: rgba(255, 254, 249, 0.9);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(14px);
}
.brand {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    font-size: 1.24rem;
    color: var(--forest);
}
.brand-mark {
    display: grid;
    place-items: center;
    width: 39px;
    height: 39px;
    border-radius: 13px;
    color: #fff;
    background: var(--forest);
    font-size: 1.35rem;
    box-shadow: 0 6px 14px rgba(25, 62, 53, 0.2);
}
.topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}
.user-chip {
    font-size: 0.82rem;
    color: var(--muted);
    display: none;
}
.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: var(--forest);
    background: var(--mint);
    font-weight: 800;
}
.app-layout {
    width: min(1280px, 100%);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 218px 1fr;
    gap: 2.2rem;
    padding: 2rem clamp(1rem, 4vw, 4rem) 4rem;
}
.sidebar {
    padding-top: 0.3rem;
}
.side-nav {
    display: grid;
    gap: 0.35rem;
    position: sticky;
    top: 100px;
}
.nav-button {
    border: 0;
    border-radius: 11px;
    text-align: left;
    padding: 0.72rem 0.85rem;
    color: var(--muted);
    background: transparent;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    font-weight: 650;
}
.nav-button:hover {
    background: var(--mint);
    color: var(--forest);
}
.nav-button.active {
    color: var(--forest);
    background: #e2eee2;
    box-shadow: inset 3px 0 var(--forest-2);
}
.side-note {
    margin-top: 2rem;
    padding: 1rem;
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1.55;
    border-top: 1px solid var(--line);
}
.main {
    min-width: 0;
}
.page-heading {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1rem;
    align-items: end;
    margin-bottom: 1.45rem;
}
.eyebrow {
    margin: 0 0 0.3rem;
    color: var(--forest-2);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.69rem;
    font-weight: 800;
}
h1,
h2,
h3,
p {
    margin-top: 0;
}
h1 {
    font-size: clamp(1.7rem, 4vw, 2.35rem);
    letter-spacing: -0.055em;
    line-height: 1.05;
    margin-bottom: 0.38rem;
}
h2 {
    font-size: 1.16rem;
    letter-spacing: -0.02em;
    margin-bottom: 0.8rem;
}
h3 {
    font-size: 0.96rem;
    margin-bottom: 0.4rem;
}
.subtle {
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.5;
}
.card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.18rem;
}
.grid {
    display: grid;
    gap: 1rem;
}
.grid.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.grid.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.grid.four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
.stack {
    display: grid;
    gap: 1rem;
}
.button {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    border: 1px solid transparent;
    border-radius: 11px;
    padding: 0.62rem 0.92rem;
    font-weight: 750;
    font-size: 0.88rem;
    transition: 0.18s ease;
}
.button.primary {
    background: var(--forest);
    color: white;
    box-shadow: 0 6px 14px rgba(25, 62, 53, 0.14);
}
.button.primary:hover {
    background: #24584a;
    transform: translateY(-1px);
}
.button.secondary {
    background: #edf4ec;
    color: var(--forest);
    border-color: #d6e4d7;
}
.button.ghost {
    color: var(--forest-2);
    background: transparent;
    border-color: var(--line);
}
.button.warn {
    color: #784238;
    background: #f9e8e2;
    border-color: #efd0c7;
}
.button:disabled {
    opacity: 0.55;
    cursor: wait;
    transform: none;
}
.animal-hero {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.15rem;
    margin-bottom: 1rem;
    background: linear-gradient(110deg, #edf4ea, #fffef9 70%);
    border-color: #d6e4d6;
}
.animal-photo {
    width: 70px;
    height: 70px;
    flex: 0 0 70px;
    border-radius: 22px;
    object-fit: cover;
    background: #d4e5d2;
    display: grid;
    place-items: center;
    font-size: 2rem;
    overflow: hidden;
}
.animal-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.animal-meta {
    flex: 1;
    min-width: 0;
}
.animal-meta h2 {
    margin-bottom: 0.18rem;
    font-size: 1.35rem;
}
.animal-select {
    max-width: 12rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 0.55rem 0.7rem;
    background: white;
}
.stat {
    padding: 0.9rem;
    border-radius: 14px;
    background: #f2f6ef;
    border: 1px solid #e2ebe0;
}
.stat-value {
    display: block;
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: var(--forest);
}
.stat-label {
    color: var(--muted);
    font-size: 0.75rem;
}
.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    margin-bottom: 0.75rem;
}
.section-head h2 {
    margin: 0;
}
.event-list,
.report-list,
.regimen-list,
.container-list {
    display: grid;
    gap: 0.65rem;
}
.event {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 0.85rem;
    align-items: center;
    padding: 0.86rem 0.9rem;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fffefa;
}
@media (min-width: 1280px) {
    .main > .grid.two .event > div:last-child {
        max-width: 9rem;
    }
}
@media (min-width: 601px) and (max-width: 1279px) {
    .event {
        grid-template-columns: auto minmax(0, 1fr);
    }
    .event > div:last-child {
        grid-column: 1 / -1;
        display: flex;
        flex-wrap: wrap;
        gap: 0.4rem;
        align-items: center;
    }
}
.event-time {
    font-weight: 800;
    color: var(--forest);
    font-size: 0.9rem;
    white-space: nowrap;
}
.event-title {
    font-weight: 700;
    font-size: 0.91rem;
}
.event-instruction {
    color: var(--muted);
    font-size: 0.79rem;
    margin-top: 0.18rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.event-review {
    margin-top: 0.4rem;
    padding: 0.38rem 0.5rem;
    border-left: 3px solid var(--gold);
    background: #fff8e9;
    color: #725529;
    font-size: 0.74rem;
    line-height: 1.35;
}
.event-badge,
.badge {
    display: inline-flex;
    align-items: center;
    min-height: 25px;
    padding: 0.22rem 0.48rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    white-space: nowrap;
}
.badge.due {
    color: #714515;
    background: #f9edcf;
}
.badge.reported {
    color: #27624a;
    background: #def0e4;
}
.badge.overdue,
.badge.review {
    color: #7a3c34;
    background: #f8dfd9;
}
.badge.upcoming {
    color: #35626b;
    background: #e1eff0;
}
.badge.unknown {
    color: #5d5960;
    background: #eceaed;
}
.empty {
    padding: 2.1rem 1.4rem;
    border: 1px dashed #cbd9cc;
    border-radius: 16px;
    color: var(--muted);
    text-align: center;
    background: #fafcf7;
}
.empty-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}
.notice {
    padding: 0.78rem 0.9rem;
    border-radius: 11px;
    font-size: 0.83rem;
    line-height: 1.45;
    background: #eef5ed;
    color: #365848;
    border: 1px solid #d5e5d7;
}
.notice.error {
    background: #fff0ec;
    border-color: #efcfc8;
    color: #7a3c34;
}
.notice.pending {
    background: #fff4dc;
    color: #73551a;
    border-color: #ead79e;
}
.auth-wrap {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 1.2rem;
    background:
        radial-gradient(circle at 13% 15%, #dceadf 0, transparent 33%),
        radial-gradient(circle at 93% 90%, #e7eed9 0, transparent 34%),
        var(--ivory);
}
.auth-card {
    width: min(440px, 100%);
    padding: clamp(1.4rem, 5vw, 2.35rem);
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: 0 20px 55px rgba(25, 62, 53, 0.12);
}
.auth-card-wide { width: min(760px, 100%); }
.auth-card .brand {
    margin-bottom: 2rem;
}
.auth-card h1 {
    font-size: 2rem;
}
.auth-card .subtle {
    margin-bottom: 1.5rem;
}
.auth-tabs {
    display: flex;
    gap: 0.35rem;
    margin-bottom: 1.2rem;
    padding: 0.25rem;
    background: #f0f4ed;
    border-radius: 12px;
}
.auth-tabs button {
    flex: 1;
    border: 0;
    border-radius: 9px;
    min-height: 40px;
    color: var(--muted);
    background: transparent;
    font-weight: 700;
}
.auth-tabs button.active {
    color: var(--forest);
    background: white;
    box-shadow: 0 2px 8px rgba(25, 62, 53, 0.08);
}
.form {
    display: grid;
    gap: 0.85rem;
}
.field {
    display: grid;
    gap: 0.32rem;
}
.field label {
    font-size: 0.78rem;
    color: #486157;
    font-weight: 750;
}
.field small {
    color: var(--muted);
    font-size: 0.73rem;
    line-height: 1.4;
}
.field input,
.field select,
.field textarea {
    width: 100%;
    min-height: 44px;
    border: 1px solid #cbd8ce;
    border-radius: 10px;
    padding: 0.62rem 0.72rem;
    background: #fff;
    color: var(--ink);
}
.field textarea {
    min-height: 84px;
    resize: vertical;
}
.field input::placeholder,
.field textarea::placeholder {
    color: #91a097;
}
.form-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.55rem;
    margin-top: 0.35rem;
}
.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 30;
    display: grid;
    place-items: center;
    padding: 1rem;
    background: rgba(25, 50, 44, 0.44);
}
.modal {
    position: relative;
    max-height: calc(100vh - 2rem);
    overflow: auto;
    width: min(650px, 100%);
    background: var(--paper);
    border-radius: 20px;
    border: 1px solid var(--line);
    box-shadow: 0 30px 80px rgba(25, 50, 44, 0.25);
    padding: 1.25rem;
}
.modal-header {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-right: 2.6rem;
}
.close {
    border: 0;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: #eef4ec;
    color: var(--forest);
    font-size: 1.2rem;
}
.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
}
.divider {
    border: 0;
    border-top: 1px solid var(--line);
    margin: 0.6rem 0;
}
.check {
    display: flex;
    align-items: start;
    gap: 0.55rem;
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1.45;
}
.check input {
    margin-top: 0.2rem;
    accent-color: var(--forest-2);
}
.table-wrap {
    overflow-x: auto;
}
.data-table {
    width: 100%;
    min-width: 560px;
    border-collapse: collapse;
    font-size: 0.82rem;
}
.data-table th,
.data-table td {
    text-align: left;
    padding: 0.72rem 0.55rem;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}
.data-table th {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 750;
}
.data-table td strong {
    display: block;
}
.data-table td small {
    display: block;
    color: var(--muted);
    margin-top: 0.18rem;
}
.entered-error td {
    background: #fff6f2;
}
.amendment-list {
    display: grid;
    gap: 0.25rem;
    margin-top: 0.45rem;
}
.amendment {
    padding: 0.35rem 0.48rem;
    border-left: 3px solid var(--coral);
    background: #fff3ee;
    color: #75443d;
    font-size: 0.72rem;
    line-height: 1.35;
}
.regimen,
.container-row,
.grant-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    padding: 0.9rem;
    border: 1px solid var(--line);
    border-radius: 14px;
}
.row-main {
    min-width: 0;
    flex: 1;
}
.row-main p {
    margin: 0;
}
.grant-row-ended {
    background: #f7f8f5;
    color: var(--muted);
}
.previous-access {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
}
.previous-access > summary {
    cursor: pointer;
    color: var(--forest);
    font-weight: 700;
}
.previous-access[open] > summary {
    margin-bottom: 0.65rem;
}
.row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.42rem;
}
.stock-projection {
    display: grid;
    gap: 0.12rem;
    margin-top: 0.42rem;
    color: var(--muted);
    font-size: 0.74rem;
    line-height: 1.35;
}
.stock-projection strong {
    color: var(--forest);
    font-size: 0.76rem;
}
.stock-projection.low {
    padding: 0.38rem 0.5rem;
    border-left: 3px solid var(--coral);
    background: #fff4ef;
    color: #75443d;
}
.stock-projection.low strong {
    color: #8b3d32;
}
.inline-form {
    display: flex;
    align-items: stretch;
    gap: 0.45rem;
}
.inline-form input {
    flex: 1;
    min-width: 0;
}
.catalog-results {
    display: grid;
    gap: 0.35rem;
    margin-top: 0.45rem;
}
.catalog-result {
    display: grid;
    gap: 0.1rem;
    width: 100%;
    padding: 0.48rem 0.58rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fbfdf8;
    color: var(--ink);
    text-align: left;
    cursor: pointer;
}
.catalog-result:hover,
.catalog-result:focus-visible {
    border-color: var(--sage);
    background: #f0f7ed;
}
.catalog-result span,
.selected-catalog {
    color: var(--muted);
    font-size: 0.74rem;
}
.selected-catalog {
    padding: 0.4rem 0.5rem;
    border-left: 3px solid var(--sage);
    background: #f2f7ef;
}
.med-title {
    font-weight: 800;
}
.med-facts {
    color: var(--muted);
    font-size: 0.78rem;
    margin-top: 0.22rem;
}
.label-pill {
    padding: 0.18rem 0.45rem;
    border-radius: 5px;
    background: #f0f4ee;
    font-size: 0.7rem;
    color: var(--muted);
}
.photo-drop {
    display: grid;
    place-items: center;
    min-height: 100px;
    border: 1px dashed #b8cdbb;
    border-radius: 12px;
    background: #f5faf2;
    color: var(--muted);
    text-align: center;
    padding: 0.8rem;
}
.photo-drop input {
    width: 100%;
}
.connection {
    font-size: 0.72rem;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 0.35rem;
}
.connection::before {
    content: "";
    width: 7px;
    height: 7px;
    background: #7cad87;
    border-radius: 50%;
}
.connection.offline::before {
    background: var(--coral);
}
.connection.pending::before {
    background: var(--gold);
}
.invite-card {
    display: flex;
    align-items: center;
    gap: 1.1rem;
}
.invite-qr {
    flex: 0 0 180px;
    text-align: center;
    color: var(--muted);
    font-size: 0.72rem;
}
.invite-qr canvas {
    margin: auto;
    border: 8px solid #fffef9;
}
.invite-copy {
    min-width: 0;
    flex: 1;
}
.invite-link {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 0.62rem 0.72rem;
    background: #fff;
    color: var(--forest-2);
}
.mobile-nav {
    display: none;
}
@media (max-width: 860px) {
    .app-layout {
        grid-template-columns: 1fr;
        padding-top: 1.2rem;
    }
    .sidebar {
        display: none;
    }
    .mobile-nav {
        display: flex;
        position: fixed;
        z-index: 15;
        left: 0.75rem;
        right: 0.75rem;
        bottom: 0.75rem;
        justify-content: space-around;
        gap: 0.2rem;
        padding: 0.4rem;
        background: rgba(255, 254, 249, 0.95);
        border: 1px solid var(--line);
        box-shadow: 0 10px 30px rgba(25, 62, 53, 0.14);
        border-radius: 17px;
        backdrop-filter: blur(16px);
    }
    .mobile-nav .nav-button {
        min-height: 44px;
        padding: 0.35rem 0.55rem;
        display: grid;
        gap: 0;
        place-items: center;
        text-align: center;
        font-size: 0.68rem;
    }
    .mobile-nav .nav-button span:first-child {
        font-size: 1rem;
    }
    .main {
        padding-bottom: 4.8rem;
    }
}
@media (min-width: 560px) {
    .user-chip {
        display: inline;
    }
}
@media (max-width: 600px) {
    .topbar {
        min-height: 65px;
        padding: 0.7rem 1rem;
    }
    .app-layout {
        padding-inline: 0.85rem;
    }
    .grid.two,
    .grid.three {
        grid-template-columns: 1fr;
    }
    .event {
        grid-template-columns: 1fr auto;
    }
    .event-time {
        grid-column: 1/-1;
        font-size: 0.78rem;
    }
    .event .button {
        grid-column: 2;
        grid-row: 2/4;
    }
    .animal-hero {
        align-items: start;
        flex-wrap: wrap;
    }
    .animal-select {
        max-width: none;
        width: 100%;
    }
    .page-heading {
        align-items: start;
    }
    .page-heading .button {
        width: 100%;
    }
    .form-actions .button {
        flex: 1;
    }
    .card {
        padding: 0.95rem;
    }
}
@media (max-width: 600px) {
    .invite-card {
        align-items: stretch;
        flex-direction: column;
    }
    .invite-qr {
        flex-basis: auto;
    }
}
@media (prefers-reduced-motion: reduce) {
    * {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}

[hidden] { display: none !important; }
.event-time small { display:block; font-size:.65rem; font-weight:400; line-height:1.5; overflow-wrap:anywhere; margin-top:.35rem; }
.amendment-change { display:block; margin:.25rem 0; }
.container-row .notice { margin:.6rem 0; }
.animal-hero { flex-wrap:wrap; }
.animal-meta { min-width:180px; }
.container-row, .event, .row-main { min-width:0; overflow-wrap:anywhere; }
.modal .notice.error { position:relative; margin:0 2rem 1rem 0; }
@media (max-width:600px) {
  .animal-hero { display:grid; grid-template-columns:56px minmax(0,1fr); align-items:start; gap:.75rem; }
  .animal-photo { width:56px; height:56px; border-radius:16px; }
  .animal-meta { min-width:0; width:auto; }
  .animal-meta h2 { font-size:1.25rem; word-break:normal; overflow-wrap:break-word; }
  .animal-hero > .field, .animal-hero > .button { grid-column:1 / -1; width:100%; }
  .animal-select { width:100%; max-width:none; }
  .animal-hero .eyebrow { font-size:.64rem; }
  .event { grid-template-columns:minmax(0,1fr); }
  .event-time { display:block; }
  .event-time small { display:inline; margin-left:.5rem; }
  .event-time small br { display:none; }
  .event > div:last-child { display:flex; flex-wrap:wrap; gap:.4rem; align-items:center; }
  .container-row { flex-wrap:wrap; }
  .topbar .user-chip { display:none; }
}

.compact-hero > .button { display:none; }
@media (max-width:600px) {
 .main > .grid.three { grid-template-columns:repeat(3,minmax(0,1fr)); gap:.5rem; }
 .main > .grid.three .stat { padding:.75rem .5rem; }
 .main > .grid.three .stat-value { font-size:1.5rem; }
 .main > .grid.three .stat-label { font-size:.66rem; }
}
/* Closed-beta notices stay readable in both the sign-in card and the main area. */
.beta-policy { margin: .8rem 0; }
.beta-policy p { max-width: 72ch; line-height: 1.6; }
.beta-policy .check { margin-top: .8rem; }
.auth-card .beta-policy { padding: 1rem; }


/* Product-level species scope stays legible alongside catalog choices. */
.catalog-species-scope { display: grid; gap: .5rem; margin: .75rem 0; }
.catalog-species-scope > p { margin: 0; }
.catalog-species-scope > .button { justify-self: start; }
.selected-catalog > small { display: block; margin-top: .3rem; }
.selected-catalog > p { margin: .4rem 0; }
.catalog-result [data-formulation] { display: block; width: 100%; text-align: left; }
.catalog-result [data-formulation] > small { display: block; margin-top: .25rem; }

/* Guided setup, household overview and caregiver handoff. */
.scope-switch { margin-bottom: 1rem; }
.scope-switch [aria-pressed="true"] { background: #244e3a; color: #fff; }
.first-care, .refill-attention { margin-bottom: 1rem; }
.household-companions { margin-bottom: 1.25rem; }
.household-event { display: grid; grid-template-columns: minmax(0, 1fr) minmax(11rem, 14rem); align-items: center; gap: 1rem; padding: 1rem 0; border-top: 1px solid #dce5dc; }
.household-event > div { min-width: 0; overflow-wrap: break-word; }
.household-event > button { width: 100%; max-width: 14rem; white-space: normal; }
.household-event h3 { margin: .25rem 0; }
.care-review { display: grid; grid-template-columns: minmax(8rem,1fr) minmax(0,2fr); gap: .5rem 1rem; }
.care-review dt { font-weight: 600; text-transform: capitalize; }
.care-review dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.handoff-entry { border-top: 1px solid #dce5dc; margin-top: 1rem; padding-top: 1rem; }
.catalog-product { padding: .6rem 0; }
.catalog-product > button { width: 100%; text-align: left; white-space: normal; }
.catalog-product details { margin: .5rem 0; }
.setup-steps { padding-left: 1.3rem; }
.setup-steps li { padding-bottom: .5rem; }
.email-test { margin-top: 1.25rem; border-top: 1px solid #dce5dc; padding-top: 1rem; }
[data-medication-step] .grid { margin-bottom: .7rem; }
@media(max-width:600px) {
    .household-event { grid-template-columns: minmax(0,1fr); align-items: stretch; }
    .household-event > button { width: auto; max-width: 100%; justify-self: start; }
    .care-review { grid-template-columns: minmax(0,1fr); }
    .care-review dd { margin-bottom: .6rem; }
}
.grid.household-companions { grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); }
.household-companions .card { min-width: 0; overflow-wrap: anywhere; }

/* Usability pass: keep clinical context and long evidence readable. */
.context-banner { position:sticky; top:0; z-index:2; display:grid; gap:.2rem; margin:-.25rem 0 1rem; padding:.75rem 1rem; border:1px solid #dce5dc; border-radius:.75rem; background:#f4fbf8; }
.preserved-original { margin-bottom:1rem; padding:1rem; border-left:4px solid #244e3a; background:#f7faf8; border-radius:.35rem; }
.schedule-builder,.export-scope { padding:.75rem; border:1px solid #dce5dc; border-radius:.65rem; background:#fbfcfb; }
.chip-list,.weekday-toggles { display:flex; flex-wrap:wrap; gap:.45rem; margin-top:.55rem; }
.chip,.weekday-toggles span { border:1px solid #dce5dc; border-radius:999px; background:#fff; padding:.42rem .68rem; color:#17231f; }
.weekday-toggles input { position:absolute; opacity:0; pointer-events:none; }
.weekday-toggles input:checked + span { background:#244e3a; color:#fff; border-color:#244e3a; }
.more-card { appearance:none; text-align:left; display:grid; gap:.45rem; cursor:pointer; color:#17231f; }
.more-card strong { font-size:1.05rem; }
.more-card span { color:#60706a; font-weight:400; }
.demo-filter { width:max-content; margin:0 0 1rem auto; }
.media-card { display:grid; grid-template-columns:4rem minmax(0,1fr); gap:.75rem; align-items:center; padding:.75rem 0; border-top:1px solid #dce5dc; }
.media-card img { width:4rem; height:4rem; object-fit:cover; border-radius:.5rem; }
.media-card > div { min-width:0; display:grid; gap:.25rem; }
.media-file-icon { display:grid; place-items:center; width:4rem; height:4rem; border-radius:.5rem; background:#eef4f0; font-size:1.5rem; }
.form-group { margin:0; padding:1rem; border:1px solid #dce5dc; border-radius:.7rem; }
.form-group legend,.form-group summary { font-weight:700; color:#244e3a; }
.form-group > :last-child { margin-bottom:0; }
.sierra-catalog-admin,.sierra-catalog-admin * { min-width:0; overflow-wrap:anywhere; }
.sierra-catalog-admin .sc-table,.sierra-catalog-admin .sc-artifacts { display:block; max-width:100%; overflow-x:auto; }
.sierra-catalog-admin pre,.sierra-catalog-admin code,.sierra-catalog-admin small { overflow-wrap:anywhere; word-break:break-word; }
.event > *,.event-title,.event-instruction { min-width:0; max-width:100%; }
.event-title { overflow-wrap:anywhere; }

/* Daily-use pass: progress, setup, multi-medication, delivery, and touch clarity. */
.care-progress { display:grid; grid-template-columns:minmax(12rem,1fr) minmax(10rem,2fr) auto; align-items:center; gap:1rem; margin:0 0 1rem; padding:1rem; border:1px solid #cddfd5; border-radius:.8rem; background:#f4fbf8; }
.care-progress > div:first-child { display:grid; gap:.2rem; }
.care-progress span { color:#52625c; }
.progress-track { height:.7rem; overflow:hidden; border-radius:999px; background:#dce8e1; }
.progress-track > span { display:block; height:100%; border-radius:inherit; background:#2f7355; }
.setup-checklist { margin-bottom:1rem; }
.checklist-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(11rem,1fr)); gap:.65rem; }
.checklist-item { min-height:4.6rem; display:grid; grid-template-columns:auto 1fr; grid-template-rows:auto auto; gap:.15rem .55rem; align-items:center; padding:.75rem; border:1px solid #d7e2dc; border-radius:.7rem; background:#fff; color:#17231f; text-align:left; cursor:pointer; }
.checklist-item > span:first-child { grid-row:1 / 3; font-size:1.35rem; color:#2f7355; }
.checklist-item small { color:#60706a; }
.checklist-item.complete { background:#f3f8f5; }
.medication-glance { margin-bottom:1rem; }
.medication-glance-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,15rem),1fr)); gap:.65rem; }
.medication-glance-grid article { display:grid; gap:.25rem; padding:.8rem; border:1px solid #dce5dc; border-radius:.65rem; background:#fbfcfb; }
.medication-glance-grid span,.medication-glance-grid small { color:#52625c; }
.history-filters { margin-bottom:1rem; }
.inventory-summary,.handoff-summary { margin-bottom:1rem; }
.schedule-guidance { margin-bottom:1rem; }
.next-care { margin-bottom:1rem; border-left:4px solid #2f7355; }
.notification-list { display:grid; gap:.8rem; margin-top:1rem; }
.notification-card { padding:1rem; border:1px solid #dce5dc; border-radius:.75rem; background:#fbfcfb; }
.notification-card small { display:block; margin-top:.2rem; }
.delivery-journey { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:.35rem; margin:1rem 0 0; padding:0; list-style:none; }
.delivery-journey li { display:grid; gap:.25rem; min-width:0; padding:.55rem; border-radius:.55rem; background:#eef3f0; color:#60706a; font-size:.78rem; }
.delivery-journey li span { font-size:1rem; }
.delivery-journey li.done { background:#e4f2e9; color:#1e583e; }
.delivery-journey li.problem { background:#fff0ed; color:#8d2f22; }
.onboarding-path { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:.55rem; margin:0 0 1rem; padding:0; list-style:none; }
.onboarding-path li { display:grid; gap:.25rem; padding:.85rem; border:1px solid #dce5dc; border-radius:.7rem; background:#fff; }
.onboarding-path li.current { border-color:#2f7355; background:#f4fbf8; }
.onboarding-path span { color:#60706a; font-size:.82rem; }
.button,.nav-button,.auth-tabs button,.chip { min-height:44px; }
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,[tabindex]:focus-visible { outline:3px solid #e0a52b; outline-offset:2px; }
input,select,textarea { scroll-margin-top:5rem; }
.care-mode { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:1rem; align-items:center; margin-bottom:1rem; border-left:5px solid #2f7355; background:#f4fbf8; }
.care-mode h2 { margin:.2rem 0; }
.care-mode-actions { display:grid; gap:.55rem; min-width:12rem; }
.event-list-disclosure { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:.75rem; margin-top:1rem; padding:1rem; border:1px solid #dce5dc; border-radius:.75rem; background:#f8faf8; }
.event-list-disclosure p { margin:0; }
.label-panel,.vet-package { margin-bottom:1rem; }
.label-review { display:grid; grid-template-columns:minmax(5rem,9rem) minmax(0,1fr); gap:1rem; align-items:center; }
.label-review img { width:100%; max-height:8rem; object-fit:contain; border:1px solid #dce5dc; border-radius:.6rem; background:#fff; }
.next-household { display:grid; gap:.2rem; margin:.7rem 0; padding:.7rem; border-radius:.6rem; background:#f4f8f5; }
.catalog-optional { padding:.8rem; border:1px solid #dce5dc; border-radius:.65rem; }
.catalog-optional > summary { cursor:pointer; font-weight:700; color:#244e3a; }

@media(max-width:720px) {
    .care-mode { grid-template-columns:1fr; }
    .care-mode-actions { min-width:0; }
    .label-review { grid-template-columns:1fr; }
    .care-progress { grid-template-columns:1fr auto; }
    .care-progress .progress-track { grid-column:1 / -1; grid-row:2; }
    .delivery-journey { grid-template-columns:1fr 1fr; }
    .onboarding-path { grid-template-columns:1fr; }
    .page-heading > .row-actions { width:100%; }
    .page-heading > .row-actions .button { flex:1 1 12rem; }
    .table-wrap { overflow:visible; }
    .data-table { min-width:0; }
    .data-table,.data-table tbody,.data-table tr,.data-table td { display:block; width:100%; }
    .data-table thead { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); }
    .data-table tr { margin-bottom:1rem; padding:1rem; border:1px solid #dce5dc; border-radius:.8rem; background:#fff; }
    .data-table td { padding:.55rem 0; border:0; white-space:normal; }
    .data-table td:nth-child(1)::before { content:"Actual occurrence"; }
    .data-table td:nth-child(2)::before { content:"Original and corrections"; }
    .data-table td:nth-child(3)::before { content:"Performer and recorder"; }
    .data-table td:nth-child(4)::before { content:"Entered"; }
    .data-table td::before { display:block; margin-bottom:.25rem; color:#60706a; font-size:.72rem; font-weight:700; letter-spacing:.06em; text-transform:uppercase; }
    .event { grid-template-columns:1fr; }
    .event-time { display:flex; gap:.5rem; align-items:baseline; }
    .modal { max-width:calc(100vw - 1rem); }
    .sc-inline-fields,.sc-grid-two,.sc-count-grid { grid-template-columns:1fr !important; }
    .grid.four { grid-template-columns:1fr 1fr; }
}

@media(max-width:460px) {
    .delivery-journey { grid-template-columns:1fr; }
    .checklist-grid { grid-template-columns:1fr; }
    .row-actions .button { white-space:normal; }
    .grid.four { grid-template-columns:1fr; }
}

@media(prefers-reduced-motion:reduce) {
    *,*::before,*::after { scroll-behavior:auto !important; animation-duration:.01ms !important; animation-iteration-count:1 !important; transition-duration:.01ms !important; }
}

@media print {
    .topbar,.sidebar,.mobile-nav,.button,.row-actions,.photo-drop { display:none !important; }
    .app-layout,.main { display:block; margin:0; padding:0; max-width:none; }
    .card { box-shadow:none; break-inside:avoid; }
}

.trend-chart { align-items: end; display: grid; gap: .75rem; grid-template-columns: repeat(7, minmax(3rem, 1fr)); min-height: 12rem; }
.trend-chart article { align-items: center; display: flex; flex-direction: column; gap: .35rem; justify-content: end; text-align: center; }
.trend-bar { align-items: start; background: linear-gradient(180deg, var(--primary, #2f7161), #9bc8ba); border-radius: .55rem .55rem .2rem .2rem; color: white; display: flex; justify-content: center; min-width: 2.2rem; padding-top: .25rem; }
.trend-chart small { color: var(--muted, #5e6c67); }
@media (max-width: 620px) { .trend-chart { gap: .3rem; overflow-x: auto; } .trend-chart article { min-width: 3.2rem; } }
