html,
body {
    margin: 0;
    min-height: 100%;
    font-family: "Segoe Print", Candara, sans-serif;
    color: #20334a;
    background: #f7fbff;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(rgba(38, 84, 124, .06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(38, 84, 124, .04) 1px, transparent 1px);
    background-size: 28px 28px;
}

button,
input,
select {
    font: inherit;
}

a {
    color: inherit;
}

.app-shell {
    width: min(1480px, calc(100% - 32px));
    margin: 0 auto;
    padding: 24px 0 40px;
}

.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.brand-mark,
.avatar {
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: var(--avatar, #2f80ed);
    color: #fff;
    font-weight: 900;
    box-shadow: 0 4px 0 rgba(32, 51, 74, .16);
}

.brand-mark {
    width: 44px;
    height: 44px;
    background: #7bd389;
    color: #20334a;
    border: 2px solid #20334a;
}

.avatar {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    border: 2px solid #fff;
    font-size: 13px;
}

.brand strong {
    display: block;
    font: 900 34px/1 Georgia, Cambria, serif;
}

.brand small {
    color: #5f6f7d;
    font-weight: 800;
}

.main-nav,
.people-filter,
.chip-row,
.check-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.main-nav a,
.nav-action,
.link-button,
button {
    border: 2px solid #20334a;
    border-radius: 8px;
    background: #fff;
    color: #20334a;
    padding: 9px 13px;
    font-weight: 900;
    text-decoration: none;
    box-shadow: 0 4px 0 rgba(32, 51, 74, .16);
}

.main-nav a.active,
button.active {
    background: #7bd389;
}

.link-button {
    background: #26547c;
    color: #fff;
}

.content-shell {
    display: grid;
    gap: 20px;
}

.page-heading,
.paper-panel,
.panel {
    background: #fffef9;
    border: 2px solid rgba(32, 51, 74, .8);
    border-radius: 10px;
    box-shadow: 0 18px 35px rgba(32, 51, 74, .16);
}

.page-heading {
    padding: 22px;
}

.eyebrow {
    color: #ef476f;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

h1,
h2,
h3,
p {
    margin: 0;
}

h1,
h2,
h3 {
    font-family: Georgia, Cambria, serif;
    line-height: 1.05;
}

h1 {
    font-size: clamp(34px, 5vw, 64px);
    margin-top: 8px;
}

.page-heading h1:focus {
    outline: none;
}

h2 {
    font-size: 25px;
}

p {
    margin-top: 8px;
    color: #5f6f7d;
    font-weight: 800;
}

.auth-page {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 18px;
    padding: 24px;
}

.welcome-card {
    min-height: 360px;
    display: grid;
    align-content: space-between;
    gap: 28px;
    padding: 24px;
    border: 2px solid #20334a;
    border-radius: 8px;
    background: #fff1a8;
}

.welcome-card h1 {
    max-width: 640px;
}

.mini-calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    max-width: 430px;
}

.mini-calendar span {
    aspect-ratio: 1.2;
    border: 1.5px solid rgba(32, 51, 74, .45);
    border-radius: 6px;
    background: #fff;
}

.mini-calendar .busy {
    background: #ffd166;
}

.mini-calendar .free {
    background: #7bd389;
}

.paper-form,
.profile-card,
.feeds-card,
.feed-form,
.processing-list {
    display: grid;
    gap: 14px;
}

.paper-form {
    align-content: center;
    padding: 20px;
    border: 1.5px solid rgba(32, 51, 74, .45);
    border-radius: 8px;
    background: #fff;
}

label {
    display: grid;
    gap: 6px;
    color: #5f6f7d;
    font-size: 13px;
    font-weight: 900;
}

input,
select {
    width: 100%;
    min-height: 42px;
    border: 1.5px solid rgba(32, 51, 74, .5);
    border-radius: 8px;
    background: #fbfdff;
    color: #20334a;
    padding: 9px 11px;
}

input[type="checkbox"] {
    width: 16px;
    min-height: 16px;
    accent-color: #ef476f;
}

.form-error {
    padding: 10px 12px;
    border: 1.5px solid #ef476f;
    border-radius: 8px;
    background: #fff5fb;
    color: #b21d45;
    font-weight: 900;
}

.profile-grid {
    display: grid;
    grid-template-columns: .78fr 1.22fr;
    gap: 18px;
}

.panel {
    padding: 18px;
}

.profile-line {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 14px;
}

.profile-line > div,
.feed-form {
    display: grid;
    gap: 12px;
}

.choice-row,
.form-row,
.time-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.field-with-help {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: end;
}

.icon-help-button,
.modal-close-button {
    width: 42px;
    height: 42px;
    display: inline-grid;
    place-items: center;
    padding: 0;
}

.icon-help-button {
    border-radius: 50%;
    background: #eef5ff;
    font-size: 22px;
    line-height: 1;
}

.panel-title,
.day-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.panel-note {
    margin: 0;
    color: #5f6f7d;
    font-size: 13px;
    font-weight: 900;
}

.feed-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.feed-item,
.event-card,
.mini-event {
    border: 1.5px solid rgba(32, 51, 74, .45);
    border-radius: 8px;
    background: #f6fbef;
    padding: 11px;
}

.feed-item {
    display: grid;
    gap: 7px;
}

.feed-actions,
.feed-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.feed-item button,
.feed-form-actions button {
    width: fit-content;
    padding: 7px 10px;
}

.danger-button {
    background: #ffe0e8;
    border-color: #9b1c3a;
    color: #9b1c3a;
}

.feed-item span,
.event-card span,
.mini-event span,
small {
    color: #5f6f7d;
    font-size: 12px;
    font-weight: 900;
}

.feed-item .sync-status {
    width: fit-content;
    border: 1.5px solid rgba(32, 51, 74, .45);
    border-radius: 8px;
    padding: 4px 8px;
}

.feed-item .sync-status-ok {
    background: #e1f7dd;
    color: #246137;
    border-color: rgba(36, 97, 55, .55);
}

.feed-item .sync-status-failed {
    background: #ffe0e8;
    color: #9b1c3a;
    border-color: rgba(155, 28, 58, .65);
}

.feed-item .details-button {
    background: #eef5ff;
}

.sync-details {
    border: 1.5px solid rgba(32, 51, 74, .45);
    border-left-width: 5px;
    border-radius: 8px;
    background: #fffef9;
    padding: 10px;
}

.sync-details-failed {
    border-left-color: #e44646;
}

.sync-details-ok {
    border-left-color: #4fa75c;
}

.sync-details-title {
    color: #20334a;
    font-size: 13px;
    font-weight: 950;
    margin-bottom: 8px;
}

.sync-details dl {
    display: grid;
    gap: 6px;
    margin: 0;
}

.sync-details dl > div {
    display: grid;
    grid-template-columns: minmax(110px, .42fr) minmax(0, 1fr);
    gap: 8px;
    align-items: start;
    border-top: 1px dashed rgba(32, 51, 74, .22);
    padding-top: 6px;
}

.sync-details dl > div:first-child {
    border-top: 0;
    padding-top: 0;
}

.sync-details dt,
.sync-details dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.sync-details dt {
    color: #5f6f7d;
    font-size: 11px;
    font-weight: 950;
    text-transform: uppercase;
}

.sync-details dd {
    color: #20334a;
    font-size: 12px;
    font-weight: 850;
}

.form-status {
    border: 1.5px solid rgba(32, 51, 74, .45);
    border-radius: 8px;
    background: #fff1a8;
    padding: 9px 11px;
    color: #20334a;
    font-size: 13px;
    font-weight: 900;
}

.admin-heading {
    background: #fff1a8;
}

.admin-unlock,
.admin-panel,
.admin-unlock-form {
    display: grid;
    gap: 14px;
}

.admin-unlock {
    max-width: 560px;
}

.admin-unlock-form {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
}

.admin-table-wrap {
    overflow-x: auto;
    border: 1.5px solid rgba(32, 51, 74, .45);
    border-radius: 8px;
    background: #fff;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 860px;
}

.admin-table th,
.admin-table td {
    padding: 11px;
    border-bottom: 1px dashed rgba(32, 51, 74, .25);
    text-align: left;
    vertical-align: top;
}

.admin-table th {
    background: #eef5ff;
    color: #20334a;
    font-size: 12px;
    font-weight: 950;
    text-transform: uppercase;
}

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

.admin-person,
.admin-email,
.admin-error,
.admin-actions {
    display: flex;
    gap: 8px;
}

.admin-person,
.admin-email,
.admin-error {
    align-items: flex-start;
}

.admin-email,
.admin-error {
    flex-direction: column;
}

.admin-actions {
    flex-wrap: wrap;
}

.admin-ok {
    display: inline-flex;
    width: fit-content;
    border: 1.5px solid rgba(36, 97, 55, .55);
    border-radius: 999px;
    background: #e1f7dd;
    color: #246137;
    padding: 3px 8px;
    font-size: 12px;
    font-weight: 950;
}

.admin-error {
    border-left: 5px solid #e44646;
    border-radius: 8px;
    background: #fff5fb;
    padding: 7px 9px;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 20;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(32, 51, 74, .38);
}

.provider-guide-modal {
    width: min(920px, 100%);
    max-height: min(820px, calc(100dvh - 36px));
    overflow: auto;
    border: 2px solid rgba(32, 51, 74, .85);
    border-radius: 10px;
    background: #fffef9;
    box-shadow: 8px 8px 0 rgba(32, 51, 74, .22);
    padding: 20px;
    display: grid;
    gap: 16px;
}

.modal-title {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: start;
}

.modal-title h3 {
    margin: 3px 0 5px;
    color: #20334a;
    font-size: 34px;
    line-height: 1;
}

.modal-title p {
    margin: 0;
    color: #5f6f7d;
    font-size: 13px;
    font-weight: 900;
}

.modal-close-button {
    border-radius: 8px;
    background: #ffe0e8;
    color: #9b1c3a;
    font-size: 22px;
}

.guide-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.guide-steps li {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 8px;
    align-items: center;
    border: 1.5px dashed rgba(32, 51, 74, .45);
    border-radius: 8px;
    background: #f6fbef;
    padding: 9px 10px;
    color: #20334a;
    font-size: 12px;
    font-weight: 900;
}

.guide-steps strong {
    width: 26px;
    height: 26px;
    display: inline-grid;
    place-items: center;
    border: 1.5px solid #20334a;
    border-radius: 999px;
    background: #fff1a8;
    line-height: 1;
}

.provider-guide-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.provider-guide-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    min-height: 138px;
    height: 100%;
    border: 1.5px solid rgba(32, 51, 74, .52);
    border-radius: 8px;
    background: #f6fbef;
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--provider, #2f80ed) 14%, transparent), transparent 58%),
        #f6fbef;
    color: #20334a;
    padding: 12px;
    text-decoration: none;
    position: relative;
}

.provider-guide-card:hover,
.provider-guide-card:focus-visible {
    background: #eef5ff;
    box-shadow: 4px 4px 0 rgba(32, 51, 74, .16);
    transform: translate(-1px, -1px);
}

.provider-guide-card strong {
    display: block;
    font-size: 18px;
    line-height: 1;
}

.provider-guide-card small {
    display: block;
    margin-top: 5px;
    line-height: 1.25;
    color: rgba(32, 51, 74, .72);
    font-size: 12px;
    font-weight: 850;
}

.provider-mark {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border: 2px solid #fff;
    border-radius: 50%;
    background: var(--provider, #2f80ed);
    color: #fff;
    font-weight: 950;
    box-shadow: 0 4px 0 rgba(32, 51, 74, .16);
}

.provider-copy {
    min-width: 0;
}

.provider-action {
    grid-column: 1 / -1;
    align-self: end;
    width: fit-content;
    border: 1.5px solid rgba(32, 51, 74, .4);
    border-radius: 999px;
    background: #fff;
    color: #20334a;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 900;
}

.check-row label,
.processing-list label {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filters {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 14px;
    align-items: center;
    background: #fffef9;
    border: 2px solid rgba(32, 51, 74, .8);
    border-radius: 10px;
    padding: 14px;
}

.period-navigation {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    border: 2px solid rgba(32, 51, 74, .8);
    border-radius: 10px;
    background: #fffef9;
    padding: 18px;
    box-shadow: 0 18px 35px rgba(32, 51, 74, .16);
}

.period-title {
    min-width: 0;
}

.period-title h1 {
    margin-top: 4px;
    font-size: clamp(34px, 4vw, 58px);
}

.period-title small {
    display: block;
    margin-top: 4px;
    color: #5f6f7d;
    font-size: 13px;
    font-weight: 900;
}

.period-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.period-arrow {
    width: 44px;
    height: 44px;
    display: inline-grid;
    place-items: center;
    padding: 0;
    font-size: 22px;
    line-height: 1;
}

.period-today {
    padding: 8px 11px;
}

.segmented {
    display: inline-flex;
    gap: 4px;
    border: 1.5px solid rgba(32, 51, 74, .5);
    border-radius: 8px;
    padding: 4px;
    background: #fff;
}

.segmented button {
    box-shadow: none;
    padding: 8px 10px;
}

.people-filter label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 7px;
    border: 1.5px solid rgba(32, 51, 74, .3);
    border-radius: 8px;
    background: #fff;
}

.chip-row button {
    padding: 8px 10px;
}

.filter-chip-group {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.filter-chip-group + .filter-chip-group {
    border-left: 2px solid rgba(32, 51, 74, .55);
    padding-left: 14px;
    margin-left: 6px;
}

.calendar-scroll {
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(118px, 1fr));
    gap: 10px;
    min-width: 886px;
}

.weekday-header {
    border: 1.5px solid rgba(32, 51, 74, .5);
    border-radius: 8px;
    background: #fffef9;
    color: #20334a;
    padding: 7px 8px;
    text-align: center;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.calendar-empty {
    min-height: 170px;
    border: 1.5px dashed rgba(32, 51, 74, .22);
    border-radius: 8px;
    background: rgba(255, 254, 249, .38);
}

.day-cell,
.detail-day {
    min-height: 170px;
    display: grid;
    align-content: start;
    gap: 8px;
    border: 1.5px solid rgba(32, 51, 74, .45);
    border-radius: 8px;
    background: #f6fbef;
    padding: 11px;
}

.free-day {
    background: #e3ffe9;
}

.non-working-day {
    background:
        linear-gradient(135deg, rgba(255, 209, 102, .22), transparent 52%),
        #fff8df;
}

.non-working-day.free-day {
    background:
        linear-gradient(135deg, rgba(255, 209, 102, .32), transparent 52%),
        #ecffe8;
}

.today-day {
    position: relative;
    border-color: #ef476f;
    border-width: 3px;
    box-shadow: 0 0 0 4px rgba(239, 71, 111, .12), 0 10px 20px rgba(32, 51, 74, .12);
}

.today-day::after {
    content: "today";
    position: absolute;
    top: -12px;
    right: 12px;
    border: 1.5px solid #20334a;
    border-radius: 999px;
    background: #fff1a8;
    color: #20334a;
    padding: 1px 8px 2px;
    font-size: 10px;
    font-weight: 900;
}

.day-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    justify-content: stretch;
    gap: 6px;
}

.day-top strong {
    white-space: nowrap;
}

.day-top > div {
    min-width: 0;
}

.availability-counters {
    width: 100%;
    max-width: 100%;
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 3px;
    flex: 0 0 auto;
}

.availability-pill {
    display: inline-flex;
    align-items: baseline;
    justify-content: center;
    gap: 1px;
    border: 1.5px solid rgba(32, 51, 74, .45);
    border-radius: 6px;
    background: #fffef9;
    padding: 2px 4px;
    font-size: 10px;
    font-weight: 900;
    line-height: 1.15;
    white-space: nowrap;
}

.availability-key {
    color: #20334a;
    font-size: 8px;
    text-transform: uppercase;
}

.availability-busy {
    color: #ef476f;
}

.availability-free {
    color: #24744b;
}

.availability-divider {
    color: rgba(32, 51, 74, .65);
}

.day-kind {
    display: block;
    margin-top: 2px;
    color: #b57900;
    overflow-wrap: anywhere;
}

.free-note {
    color: #24744b;
    font-size: 12px;
    font-weight: 900;
}

.person-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 900;
}

.person-periods {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.period {
    position: relative;
    width: 23px;
    height: 23px;
    display: inline-grid;
    place-items: center;
    border: 1.5px solid rgba(32, 51, 74, .45);
    border-radius: 999px;
    background: #fff;
    font-weight: 900;
}

.period-double {
    box-shadow: 0 0 0 2px rgba(239, 71, 111, .18);
}

.period-count {
    position: absolute;
    right: -6px;
    bottom: -6px;
    min-width: 15px;
    height: 15px;
    display: inline-grid;
    place-items: center;
    border: 1.5px solid #20334a;
    border-radius: 999px;
    background: #fff1a8;
    color: #20334a;
    font-size: 9px;
    line-height: 1;
}

.period-sun {
    color: #d99b00;
}

.period-day {
    color: #118ab2;
}

.period-moon {
    color: #ef476f;
}

.period-all-day {
    width: 19px;
    height: 19px;
    border: 2px solid #fff;
    background: #ef476f;
    color: transparent;
    box-shadow: 0 0 0 1.5px rgba(32, 51, 74, .35), 0 3px 0 rgba(32, 51, 74, .14);
}

.calendar-with-panel,
.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 14px;
    align-items: start;
}

.calendar-with-panel > .calendar-scroll,
.detail-layout > .calendar-scroll {
    min-width: 0;
}

.detail-grid {
    grid-template-columns: repeat(7, minmax(104px, 1fr));
}

.detail-day {
    min-height: 440px;
}

.detail-empty {
    min-height: 440px;
}

.filtered-out-day {
    background: repeating-linear-gradient(
        135deg,
        rgba(32, 51, 74, .035),
        rgba(32, 51, 74, .035) 6px,
        rgba(255, 254, 249, .28) 6px,
        rgba(255, 254, 249, .28) 12px
    );
}

.mini-event {
    border-left: 5px solid var(--avatar);
    padding: 8px;
}

.mini-event strong {
    display: block;
    font-size: 11px;
    overflow-wrap: anywhere;
}

.mini-event-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    column-gap: 4px;
    row-gap: 1px;
}

.time-range {
    white-space: nowrap;
}

.side-panel {
    display: grid;
    align-content: start;
    gap: 10px;
    border: 2px solid rgba(32, 51, 74, .8);
    border-radius: 10px;
    background: #fff;
    padding: 14px;
    box-shadow: 0 12px 24px rgba(32, 51, 74, .12);
}

.availability-panel {
    position: sticky;
    top: 14px;
    background:
        linear-gradient(180deg, rgba(227, 255, 233, .5), transparent 120px),
        #fffef9;
}

.insight-panel-heading {
    display: grid;
    gap: 3px;
    padding-bottom: 4px;
}

.insight-panel-heading h2 {
    margin: 0;
    font-size: 24px;
}

.insight-card {
    position: relative;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    overflow: hidden;
    border: 1.5px solid rgba(32, 51, 74, .48);
    border-radius: 8px;
    background: #fff;
    padding: 10px 10px 10px 14px;
}

.insight-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 6px;
    background: #118ab2;
}

.insight-perfect::before {
    background: #55d66b;
}

.insight-rest-day {
    background:
        linear-gradient(135deg, rgba(255, 209, 102, .24), transparent 58%),
        #fff;
}

.insight-empty {
    background: repeating-linear-gradient(
        135deg,
        rgba(32, 51, 74, .035),
        rgba(32, 51, 74, .035) 7px,
        #fff 7px,
        #fff 14px
    );
}

.insight-empty .insight-icon {
    color: rgba(32, 51, 74, .45);
    background: #fff;
}

.insight-icon {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    border: 1.5px solid rgba(32, 51, 74, .55);
    border-radius: 999px;
    background: #fff1a8;
    color: #20334a;
    font-size: 21px;
    font-weight: 900;
}

.insight-copy {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.insight-label {
    color: #ef476f;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.insight-copy strong {
    font: 900 22px/1 Georgia, Cambria, serif;
    color: #20334a;
    overflow-wrap: anywhere;
}

.insight-copy small {
    color: rgba(32, 51, 74, .78);
    font-weight: 800;
}

.insight-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 3px;
}

.insight-meta span {
    border: 1.5px solid rgba(32, 51, 74, .35);
    border-radius: 999px;
    background: #f6fbef;
    color: #20334a;
    padding: 2px 7px;
    font-size: 11px;
    font-weight: 900;
}

.metric {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px;
    align-items: baseline;
    border: 2px solid #20334a;
    border-radius: 8px;
    background: #fff1a8;
    padding: 10px;
}

.metric strong {
    font: 900 32px/1 Georgia, Cambria, serif;
}

.event-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 8px;
    align-items: center;
    background: #fff;
}

#blazor-error-ui {
    display: none;
    position: fixed;
    inset: auto 0 0;
    z-index: 1000;
    background: #fff1a8;
    border-top: 2px solid #20334a;
    padding: .8rem 1rem;
}

@media (max-width: 980px) {
    .app-header,
    .auth-page,
    .profile-grid,
    .calendar-with-panel,
    .detail-layout,
    .period-navigation,
    .filters {
        grid-template-columns: 1fr;
    }

    .app-header {
        display: grid;
    }

    .calendar-grid,
    .detail-grid {
        grid-template-columns: repeat(7, minmax(118px, 1fr));
    }

    .filters {
        position: sticky;
        top: 0;
        z-index: 20;
    }

    .period-navigation {
        gap: 10px;
    }

    .period-actions {
        justify-content: flex-start;
    }

    .availability-panel {
        position: static;
    }
}

@media (max-width: 620px) {
    .app-shell {
        width: min(100% - 20px, 1480px);
        padding-top: 14px;
    }

    .brand strong {
        font-size: 26px;
    }

    .brand small {
        font-size: 12px;
    }

    .brand-mark {
        width: 38px;
        height: 38px;
    }

    .main-nav,
    .chip-row,
    .people-filter {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 5px;
        -webkit-overflow-scrolling: touch;
    }

    .filter-chip-group {
        flex: 0 0 auto;
        flex-wrap: nowrap;
        overflow: visible;
    }

    .main-nav a,
    .nav-action,
    .link-button,
    button {
        min-height: 42px;
        padding: 8px 11px;
        white-space: nowrap;
    }

    .page-heading {
        padding: 17px;
    }

    .period-navigation {
        padding: 16px;
    }

    h1 {
        font-size: 36px;
    }

    .period-title h1 {
        font-size: 36px;
    }

    .feed-list,
    .choice-row,
    .form-row,
    .time-row,
    .guide-steps,
    .provider-guide-list {
        grid-template-columns: 1fr;
    }

    .provider-guide-modal {
        padding: 14px;
    }

    .modal-title h3 {
        font-size: 26px;
    }

    .day-cell,
    .detail-day,
    .calendar-empty {
        min-height: 118px;
        gap: 7px;
    }

    .detail-day,
    .detail-empty {
        min-height: 180px;
    }

    .detail-layout {
        gap: 10px;
    }

    .filter-chip-group + .filter-chip-group {
        min-height: 42px;
    }

    .side-panel {
        order: -1;
    }

    .insight-card {
        grid-template-columns: 38px minmax(0, 1fr);
        gap: 8px;
        padding: 9px 9px 9px 13px;
    }

    .insight-icon {
        width: 34px;
        height: 34px;
        font-size: 18px;
    }

    .insight-copy strong {
        font-size: 20px;
    }

    .profile-line,
    .event-card {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .event-card .person-periods {
        grid-column: 2;
    }

    .sync-details dl > div {
        grid-template-columns: 1fr;
        gap: 2px;
    }
}
