:root {
    --brand-terracotta: #b9563f;
    --brand-sage: #687f70;
    --brand-graphite: #102b36;
    --brand-terracotta-dark: #d98168;
    --brand-sage-dark: #a1b6a4;
    --brand-graphite-dark: #eef2ed;
    --bg: #f8f7f3;
    --surface: #fffefb;
    --ink: #303b36;
    --muted: #647066;
    --tab-ink: #59665d;
    --line: #dedfd5;
    --control: #899181;
    --error: #9a3e32;
    --sidebar-width: 304px;
    --sidebar-gutter: 16px;
    --page-gutter: 28px;
    --content-top: 28px;
    --orange: #ad5132;
    --orange-hover: #914129;
    --accent-soft: #f5eee6;
    --sage: #e4eddf;
    --peach: #fae7d8;
    --lavender: #ece6f5;
    --blue: #e3edf3;
    --rose: #f5e3e5;
    --mint: #dcf0e6;
    --teal: #d9eeed;
    --yellow: #f6efc9;
    --coral: #f6ddd5;
    --purple: #e7d9ee;
    --sand: #eee5d6;
    --gray: #e5e8eb;
    --workday: #f5e3e1
}

* {
    box-sizing: border-box
}

html {
    scrollbar-gutter: stable
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif
}

a {
    color: inherit;
    text-decoration: none
}

button, input, select, textarea {
    font: inherit
}

button, a, input, select, textarea {
    touch-action: manipulation
}

button, a {
    -webkit-tap-highlight-color: transparent
}

button {
    cursor: pointer
}

a:focus-visible, button:focus-visible, details:not(.calendar-navigation):not(.notification-menu) > summary:focus-visible {
    outline: 3px solid var(--orange);
    outline-offset: 3px
}

h1, h2, h3, p {
    margin-top: 0
}

h1 {
    font-size: 34px;
    line-height: 1.2;
    font-weight: 600;
    letter-spacing: -1.3px
}

h2 {
    font-weight: 600;
    letter-spacing: -.6px
}

h3 {
    font-size: 14px;
    font-weight: 600
}

small, .small {
    font-size: 12px
}

.muted {
    color: var(--muted)
}

.orange {
    color: var(--orange)
}

.eyebrow {
    font-size: 11px;
    letter-spacing: 1.4px;
    font-weight: 600;
    color: var(--muted);
    margin-bottom: 14px
}

.topbar {
    height: 84px;
    display: grid;
    grid-template-columns:var(--sidebar-width) minmax(0, 1fr);
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--page-gutter) 0 0;
    border-bottom: 1px solid var(--line);
    background: var(--surface)
}

.brand {
    display: flex;
    align-items: center
}

.topbar > .brand {
    height: 100%;
    padding: 0 var(--sidebar-gutter);
    border-right: 1px solid var(--line)
}

.brand-logo {
    display: block;
    width: 184px;
    height: auto
}

.landing-page .brand-logo {
    width: 208px
}

.brand-logo-compact {
    display: none
}

.brand--on-dark, [data-theme="dark"] .brand {
    --brand-terracotta: var(--brand-terracotta-dark);
    --brand-sage: var(--brand-sage-dark);
    --brand-graphite: var(--brand-graphite-dark)
}

.account {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px
}

.account form {
    margin-left: 8px
}

.avatar {
    width: 32px;
    height: 32px;
    display: grid;
    place-content: center;
    background: #e8ecdf;
    border-radius: 50%;
    color: #4d6649;
    --category-color: #4d6649;
}

.text-button {
    min-width: 44px;
    min-height: 44px;
    border: 0;
    background: none;
    color: var(--muted);
    padding: 8px 0
}

.text-button:hover, a:hover {
    color: var(--orange)
}

.button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    border: 1px solid var(--control);
    border-radius: 8px;
    background: var(--surface);
    color: var(--ink);
    padding: 10px 17px;
    font-weight: 500;
    font-size: 13px;
    white-space: nowrap
}

.button:hover {
    border-color: var(--orange);
    background: var(--accent-soft);
    color: var(--orange)
}

.primary {
    background: var(--orange);
    color: #fff;
    border-color: var(--orange)
}

.primary:hover {
    background: var(--orange-hover);
    color: #fff
}

.full {
    width: 100%
}

.app-layout {
    display: grid;
    grid-template-columns:var(--sidebar-width) minmax(0, 1fr);
    min-height: calc(100vh - 84px)
}

.sidebar {
    border-right: 1px solid var(--line);
    padding: var(--content-top) var(--sidebar-gutter);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: calc(100dvh - 84px);
    min-height: 0;
    align-self: start;
    overflow-y: auto
}

.sidebar h2 {
    font-size: 21px;
    margin-bottom: 24px
}

.sidebar .eyebrow {
    font-size: 11px;
    margin-bottom: 12px
}

.calendar-nav {
    display: grid;
    gap: 7px
}

.calendar-nav a {
    padding: 11px 13px;
    font-size: 13px;
    border-radius: 9px;
    display: flex;
    gap: 12px;
    align-items: center;
    overflow-wrap: anywhere
}

.calendar-nav .active {
    background: #e9ede3;
    color: #52634b;
    font-weight: 600
}

.calendar-nav .active span {
    font-size: 19px
}

.calendar-nav .new-calendar {
    color: var(--muted);
    font-size: 12px
}

.sidebar-section {
    margin-top: 32px;
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 1
}

.sidebar > :not(.sidebar-section), .sidebar-section-title, .template-section-content > :not(.template-list) {
    flex-shrink: 0
}

.sidebar-section-title {
    margin: 0
}

.template-section-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0
}

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font-weight: inherit;
    text-align: left;
    min-height: 44px
}

.section-heading h3 {
    margin: 0
}

.section-heading:focus-visible {
    outline: 3px solid var(--orange);
    outline-offset: 3px
}

.template-chevron {
    font-size: 22px
}

.section-heading[aria-expanded="true"] .template-chevron {
    transform: rotate(180deg)
}

.template-group[hidden], .template-group-cards[hidden], .template-section-content[hidden], [data-empty-library][hidden] {
    display: none
}

.icon-button {
    border: 1px solid var(--control);
    border-radius: 8px;
    width: 44px;
    height: 44px;
    display: inline-grid;
    place-content: center;
    font-size: 20px;
    background: transparent
}

.template-section-content > .muted {
    font-size: 12px;
    line-height: 1.6;
    margin-top: 10px;
    margin-bottom: 18px
}

.template-list {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
    align-content: start;
    min-height: 0;
    flex: 1;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--control) transparent;
    scrollbar-gutter: stable;
    padding: 4px;
    margin: 0
}

.template-list:hover, .template-list:focus-within {
    scrollbar-color: var(--orange) transparent
}

@media (forced-colors: active), (prefers-contrast: more) {
    .template-list, .template-list:hover, .template-list:focus-within {
        scrollbar-width: auto;
        scrollbar-color: auto
    }
}

.template-card {
    min-width: 0;
    border-radius: 10px;
    padding: 12px;
    cursor: grab;
    position: relative
}

.template-card[draggable] {
    user-select: none
}

.template-title {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    overflow-wrap: break-word
}

.template-title strong {
    font-size: 13px;
    font-weight: 500;
    flex: 1;
    min-width: 0;
    overflow-wrap: anywhere
}

.template-title .template-edit {
    min-width: 0;
    flex: 0 1 auto
}

.template-delete, .category-delete {
    margin: 0
}

.category-menu-toggle, .template-menu-toggle, .category-drag-handle {
    border: 0;
    padding: 0;
    background: none;
    color: var(--muted);
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    width: 44px;
    flex-shrink: 0;
    min-height: 44px;
    display: inline-grid;
    place-items: center
}

.template-menu-toggle {
    margin: -8px -8px -8px auto
}

.template-card small {
    display: block;
    font-size: 12px;
    margin: 4px 0 0 15px
}

.template-edit {
    display: block
}

.template-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px
}

.template-footer small {
    margin-top: 0
}

.template-add {
    display: inline-flex;
    align-items: center;
    margin-left: auto;
    min-height: 36px;
    font-size: 12px;
    white-space: nowrap
}

.template-title > .color-dot {
    margin-top: 7px
}

.template-card:hover, .template-card:focus-within {
    box-shadow: inset 0 0 0 1px currentColor
}

.color-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0
}

.sage {
    background: var(--sage);
    color: #4d6649;
    --category-color: #54852f;
}

.peach {
    background: var(--peach);
    color: #795234;
    --category-color: #d77720;
}

.lavender {
    background: var(--lavender);
    color: #625175;
    --category-color: #7960cf;
}

.blue {
    background: var(--blue);
    color: #3e6171;
    --category-color: #277fc3;
}

.rose {
    background: var(--rose);
    color: #7b4853;
    --category-color: #ce477c;
}

.mint {
    background: var(--mint);
    color: #356650;
    --category-color: #239767;
}

.teal {
    background: var(--teal);
    color: #326565;
    --category-color: #078c99;
}

.yellow {
    background: var(--yellow);
    color: #756322;
    --category-color: #b68c08;
}

.coral {
    background: var(--coral);
    color: #854b3b;
    --category-color: #dc5540;
}

.purple {
    background: var(--purple);
    color: #6c437e;
    --category-color: #a03eb8;
}

.sand {
    background: var(--sand);
    color: #706049;
    --category-color: #a77a42;
}

.gray {
    background: var(--gray);
    color: #53616d;
    --category-color: #63788e;
}

.sidebar-note {
    margin-top: auto;
    padding-top: 45px;
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--muted)
}

.sidebar-note span {
    font-size: 35px;
    color: #cba768
}

.sidebar-note p {
    font-size: 12px;
    margin: 0;
    line-height: 1.7
}

.empty-templates {
    padding: 22px 12px;
    text-align: center;
    border: 1px dashed #d9dfd0;
    border-radius: 9px;
    color: var(--muted);
    font-size: 12px
}

.empty-templates > span {
    font-size: 28px;
    color: #9caa87
}

.empty-templates p {
    margin: 8px 0
}

.empty-templates a {
    font-size: 12px;
    color: #4d6649;
    --category-color: #4d6649;
}

.calendar-main {
    padding: var(--content-top) var(--page-gutter) 24px;
    min-width: 0
}

.page-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 32px
}

.page-heading h1 {
    margin-bottom: 10px
}

.page-heading p {
    margin-bottom: 8px
}

.page-heading .eyebrow {
    margin-bottom: 12px
}

.page-heading .muted {
    font-size: 14px
}

.share-button {
    background: transparent
}

.share-button span {
    font-size: 18px;
    line-height: 1
}

.calendar-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    gap: 15px
}

.month-nav {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap
}

.month-nav h2 {
    font-size: 21px;
    margin: 0 16px 0 0;
    text-transform: capitalize;
    white-space: nowrap
}

.today-button {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    font-size: 12px;
    border: 1px solid var(--control);
    border-radius: 8px;
    padding: 6px 11px;
    margin-left: 0
}

.toolbar-right {
    display: flex;
    gap: 20px;
    align-items: center
}

.view-label {
    font-size: 12px;
    color: var(--muted)
}

.calendar-surface {
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
    background: var(--surface)
}

.weekdays {
    display: grid;
    grid-template-columns:repeat(7, minmax(0, 1fr));
    background: #f2f3ed;
    border-bottom: 1px solid var(--line)
}

.weekdays span {
    padding: 13px 12px;
    font-size: 11px;
    letter-spacing: 1px;
    color: var(--muted)
}

.weekdays span:nth-last-child(-n+2) {
    color: #805f49
}

.month-grid {
    display: grid;
    grid-template-columns:repeat(7, minmax(0, 1fr))
}

.day {
    min-height: 122px;
    padding: 11px 8px;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    min-width: 0
}

.day:nth-child(7n) {
    border-right: 0;
    background: #fcfbf7
}

.day:nth-child(7n - 1) {
    background: #fcfbf7
}

.day:nth-last-child(-n+7) {
    border-bottom: 0
}

.day.outside {
    background: #f7f7f2
}

.outside .day-number {
    color: #6a7465
}

.day-heading {
    display: flex;
    flex-wrap: nowrap;
    column-gap: 6px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    min-height: 25px;
    padding: 0 4px
}

.day-number, .mobile-day, .add-day {
    flex-shrink: 0
}

.day-number {
    font-size: 12px
}

button.day-number {
    border: 0;
    padding: 0;
    background: transparent;
    color: inherit;
    line-height: inherit
}

.day:has([data-toggle-workday]) {
    cursor: pointer
}

.day[aria-busy="true"] {
    cursor: progress
}

.is-today .day-number {
    background: var(--orange);
    color: white;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    display: grid;
    place-content: center
}

.day.is-today {
    background: #fcf0e6;
    box-shadow: inset 0 0 0 1px rgba(173, 81, 50, .35)
}

.day.is-workday {
    background: var(--workday)
}

.day.is-past:not(.outside) {
    background: #f2f3ef
}

.day.is-past.is-workday:not(.outside) {
    background: #f1e8e5
}

.day.is-past:not(.outside) .day-number {
    color: var(--muted)
}

.workday-legend {
    display: inline-flex;
    align-items: center;
    gap: 7px
}

.workday-legend > span {
    width: 12px;
    height: 12px;
    border: 1px solid #b96760;
    border-radius: 3px;
    background: var(--workday)
}

.add-day {
    display: inline-grid;
    place-items: center;
    opacity: 0;
    font-size: 17px;
    color: var(--muted);
    padding: 0 4px;
    margin-left: auto
}

.day:hover .add-day, .day:focus-within .add-day {
    opacity: 1
}

.event-card {
    position: relative;
    border-radius: 8px;
    padding: 8px;
    margin-bottom: 7px;
    display: flex;
    gap: 8px;
    align-items: flex-start;
    cursor: grab
}

.event-card:not([draggable]), .template-card:not([draggable]) {
    cursor: default
}

.event-card[draggable] a {
    cursor: grab;
    user-select: none
}

.day.is-past .event-card {
    filter: saturate(.65)
}

.day.is-past .event-card:hover, .day.is-past .event-card:focus-within {
    filter: saturate(1)
}

.event-card a, .event-card > div {
    min-width: 0;
    flex: 1;
    overflow-wrap: anywhere
}

.event-card strong {
    font-size: 14px;
    font-weight: 500;
    display: block;
    overflow-wrap: anywhere;
    line-height: 1.4
}

.event-card small {
    font-size: 12px;
    display: block;
    margin-top: 5px
}

.day-event-sort {
    color: inherit;
    padding: 4px 0
}

.event-drop-before::before, .event-drop-after::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--ink);
    pointer-events: none
}

.event-drop-before::before {
    top: -5px;
}

.event-drop-after::after {
    bottom: -5px;
}

@media (any-pointer: coarse) {
    .day-event-sort {
        min-height: 44px;
    }
}

.event-move {
    position: relative;
    z-index: 1;
    display: none;
    margin-top: 6px;
    min-height: 44px;
    padding: 3px 0;
    font-size: 11px;
    color: inherit
}

.completed strong {
    text-decoration: line-through
}

.calendar-footer {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 12px;
    color: var(--muted);
    margin-top: 16px
}

.calendar-tip {
    display: flex;
    gap: 13px;
    padding: 20px;
    margin-top: 22px;
    margin-bottom: 20px;
    background: #eeeee5;
    border-radius: 9px;
    align-items: center;
    font-size: 12px;
    color: #536048
}

.calendar-tip > span {
    font-size: 24px
}

.calendar-tip p {
    margin: 0
}

.calendar-tip strong {
    font-weight: 500
}

.mobile-day {
    display: none
}

.drag-over {
    box-shadow: inset 0 0 0 2px var(--orange);
    background: #fff5e9 !important
}

.dragging {
    opacity: .5
}

.centered {
    max-width: 720px;
    margin: 55px auto;
    padding: 0 20px
}

.form-card {
    padding: 38px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px
}

.form-card h1 {
    font-size: 28px;
    margin: 22px 0
}

.form-card h2 {
    font-size: 24px
}

.form-card p {
    font-size: 14px
}

.form-card form p {
    margin-bottom: 20px
}

.form-card label, .template-picker label:not(.color-choice) {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 7px
}

input, textarea, select {
    width: 100%;
    border: 1px solid var(--control);
    border-radius: 9px;
    background: var(--surface);
    color: var(--ink);
    padding: 10px 12px;
    min-height: 46px
}

input:focus, textarea:focus, select:focus {
    outline: 3px solid var(--orange);
    outline-offset: 1px
}

select:not([multiple]):not([size]) {
    appearance: none;
    padding-right: 42px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ad5132' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px
}

details:not(.calendar-navigation):not(.notification-menu) > summary {
    display: flex;
    align-items: center;
    gap: 10px;
    list-style: none
}

details:not(.calendar-navigation):not(.notification-menu) > summary::-webkit-details-marker {
    display: none
}

details:not(.calendar-navigation):not(.notification-menu) > summary::before {
    content: "";
    width: 8px;
    height: 8px;
    flex-shrink: 0;
    border: solid var(--orange);
    border-width: 0 1.5px 1.5px 0;
    transform: rotate(-45deg)
}

details[open]:not(.calendar-navigation):not(.notification-menu) > summary::before {
    transform: rotate(45deg)
}

.helptext {
    font-size: 12px;
    color: var(--muted);
    display: block;
    margin-top: 6px
}

.helptext ul {
    padding-left: 16px;
    margin: 8px 0
}

.errorlist {
    font-size: 12px;
    color: #9c4034;
    list-style: none;
    padding: 0
}

.back {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    font-size: 14px;
    color: var(--muted)
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 25px
}

.form-card .schedule-replace {
    display: flex;
    align-items: flex-start;
    gap: 10px
}

.schedule-replace input {
    width: 18px;
    min-height: 18px;
    flex-shrink: 0;
    margin: 3px 0 0;
    accent-color: var(--orange)
}

.schedule-clear {
    border-top: 1px solid var(--line);
    margin-top: 28px;
    padding-top: 20px
}

.schedule-clear summary {
    cursor: pointer;
    font-weight: 500
}

.schedule-clear > p {
    margin-top: 16px
}

.delete-form {
    margin-top: 24px;
    border-top: 1px solid var(--line);
    padding-top: 18px
}

.danger {
    color: #9c4034
}

.form-footer {
    margin: 25px 0 0;
    text-align: center;
    color: var(--muted);
    font-size: 12px
}

.form-footer a {
    color: var(--orange)
}

.form-footer a, .landing-login a {
    display: inline-flex;
    align-items: center;
    min-width: 44px;
    min-height: 44px;
    justify-content: center;
}

.auth-layout {
    display: grid;
    grid-template-columns:1fr 420px;
    gap: 100px;
    max-width: 1100px;
    padding: 80px 30px;
    margin: 0 auto;
    align-items: center
}

.auth-intro h1 {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 52px;
    font-weight: 400;
    line-height: 1.13;
    letter-spacing: -1px;
    margin-bottom: 24px
}

.auth-intro h1 span {
    color: var(--orange)
}

.auth-intro > p:not(.eyebrow) {
    max-width: 340px;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.8
}

.intro-art {
    position: relative;
    height: 190px;
    margin-top: 30px
}

.intro-art > span {
    position: absolute;
    right: 55px;
    top: 0;
    font-size: 68px;
    color: #dbbd75
}

.intro-art > div {
    background: var(--sage);
    color: #4d6649;
    padding: 18px 22px;
    width: 250px;
    border-radius: 12px;
    transform: rotate(-4deg);
    position: absolute;
    top: 20px;
    left: 0;
    box-shadow: 0 4px 15px #303b3608
}

.intro-art small {
    font-size: 12px
}

.intro-art > div:last-child {
    background: var(--peach);
    color: #795234;
    top: 103px;
    left: 55px;
    transform: rotate(4deg)
}

.auth-card {
    box-shadow: 0 15px 45px #303b3605
}

.landing {
    max-width: 1160px;
    margin: 0 auto;
    padding: 48px 30px
}

.landing-page .topbar {
    display: flex;
    padding: 0 max(30px, calc((100% - 1100px) / 2))
}

.landing-page .topbar > .brand {
    padding: 0;
    border-right: 0
}

.landing-hero {
    max-width: 740px;
    margin: 0 auto 48px;
    text-align: center
}

.landing h1 {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 52px;
    font-weight: 400;
    line-height: 1.13;
    letter-spacing: -1px;
    margin-bottom: 24px
}

.landing h1 span {
    color: var(--orange)
}

.landing-description {
    max-width: 600px;
    margin: 0 auto 16px;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.8
}

.landing-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px
}

.landing-login {
    margin: 16px 0 0;
    color: var(--muted);
    font-size: 13px
}

.landing-login a {
    color: var(--orange);
    text-decoration: underline;
    text-underline-offset: 3px
}

.landing-section {
    margin-bottom: 72px;
    scroll-margin-top: 24px
}

.landing-section > h2, .landing-cta h2 {
    font-size: 30px;
    line-height: 1.3;
    margin-bottom: 28px
}

.landing-section > h2:has(+ .landing-preview-description) {
    margin-bottom: 12px
}

.landing-preview-description {
    margin-bottom: 28px;
    color: var(--muted)
}

.landing-preview {
    margin: 0;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface);
    overflow: hidden
}

.landing-preview-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 24px 24px 8px
}

.landing-preview-heading h3 {
    margin: 0;
    font-size: 24px
}

.landing-preview-members {
    color: var(--muted);
    font-size: 12px
}

.landing-preview-month {
    padding: 0 24px;
    margin-bottom: 20px;
    font-size: 17px;
    font-weight: 500
}

.landing-preview-mobile-caption, .landing-preview-day-name, .landing-preview-empty {
    display: none
}

.landing-preview-weekdays, .landing-preview-grid {
    display: grid;
    grid-template-columns:repeat(7, minmax(0, 1fr))
}

.landing-preview-weekdays {
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    font-size: 11px;
    text-align: center;
    padding: 10px 0
}

.landing-preview-day {
    min-width: 0;
    min-height: 112px;
    padding: 10px;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line)
}

.landing-preview-day:nth-child(7n) {
    border-right: 0
}

.landing-preview-day:nth-last-child(-n+7) {
    border-bottom: 0
}

.landing-preview-outside {
    background: var(--bg);
    color: var(--muted)
}

.landing-preview-working {
    background: var(--workday)
}

.landing-preview-date {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
    font-size: 12px
}

.landing-preview-work-label {
    margin-left: auto;
    font-size: 12px;
    color: #79504b
}

.landing-preview-event {
    border-radius: 8px;
    padding: 10px;
    line-height: 1.4
}

.landing-preview-event strong {
    display: block;
    font-size: 12px;
    font-weight: 500;
    overflow-wrap: anywhere
}

.landing-preview-event small {
    display: block;
    font-size: 12px;
    margin-top: 5px
}

.landing-preview-event-shared {
    position: relative;
    margin-bottom: 28px
}

.landing-preview-cursor {
    --preview-cursor-color: var(--orange);
    --preview-cursor-x: -12px;
    --preview-cursor-y: -6px;
    position: absolute;
    top: calc(100% - 18px);
    left: calc(100% - 12px);
    z-index: 1;
    display: flex;
    align-items: flex-start;
    width: max-content;
    color: var(--preview-cursor-color);
    pointer-events: none;
    user-select: none
}

.landing-preview-cursor-partner {
    --preview-cursor-color: #47624d;
    --preview-cursor-x: 12px;
    --preview-cursor-y: -8px
}

.landing-preview-cursor svg {
    flex: none;
    filter: drop-shadow(0 1px 2px #303b3626)
}

.landing-preview-cursor > span {
    margin: 18px 0 0 -4px;
    padding: 6px 10px;
    border-radius: 0 8px 8px;
    background: var(--preview-cursor-color);
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.25;
    white-space: nowrap
}

@media (prefers-reduced-motion: no-preference) {
    .landing-preview-cursor.is-visible {
        animation: landing-preview-cursor-arrive 3s ease-in-out infinite alternate
    }

    .landing-preview-cursor-partner.is-visible {
        animation-duration: 3.7s
    }
}

@keyframes landing-preview-cursor-arrive {
    from {
        transform: translate(var(--preview-cursor-x), var(--preview-cursor-y))
    }

    to {
        transform: translate(0, 0)
    }
}

.landing-preview-sage {
    background: var(--sage)
}

.landing-preview-peach {
    background: var(--peach)
}

.landing-preview-blue {
    background: var(--blue)
}

.landing-preview-lavender {
    background: var(--lavender)
}

.landing-preview-caption {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
    border-top: 1px solid var(--line);
    padding: 16px 24px;
    color: var(--muted);
    font-size: 12px
}

.landing-preview-legend {
    display: inline-flex;
    align-items: center;
    gap: 7px
}

.landing-preview-legend > span {
    width: 12px;
    height: 12px;
    border: 1px solid #b96760;
    border-radius: 3px;
    background: var(--workday)
}

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

.landing-step-number {
    display: inline-grid;
    place-items: center;
    width: 40px;
    height: 40px;
    margin-bottom: 16px;
    border-radius: 50%;
    background: var(--peach);
    color: var(--orange);
    font-size: 13px
}

.landing-steps h3, .landing-features h3 {
    font-size: 20px;
    line-height: 1.4;
    margin-bottom: 12px
}

.landing-steps p {
    margin-bottom: 0;
    color: var(--muted)
}

.landing-features {
    display: grid;
    grid-template-columns:repeat(3, minmax(0, 1fr));
    gap: 20px
}

.landing-features .form-card {
    padding: 28px
}

.landing-features .form-card > p:last-child {
    margin-bottom: 0;
    color: var(--muted)
}

.landing-faq {
    max-width: 780px
}

.landing-faq details {
    border-bottom: 1px solid var(--line)
}

.landing-faq summary {
    padding: 20px 0;
    font-size: 17px;
    font-weight: 500;
    cursor: pointer
}

.landing-faq summary:focus-visible {
    outline: 3px solid var(--orange);
    outline-offset: 3px
}

.landing-faq details p {
    margin: 0 0 20px;
    color: var(--muted)
}

.landing-cta {
    padding: 40px 24px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--sage);
    text-align: center
}

.landing-cta h2 {
    margin-bottom: 12px
}

.landing-cta p {
    margin-bottom: 24px;
    color: var(--muted)
}

@media (max-width: 900px) {
    .landing {
        padding: 40px 20px
    }

    .landing-page .topbar {
        padding: 0 20px
    }

    .landing-hero {
        margin-bottom: 36px
    }

    .landing h1 {
        font-size: 38px
    }

    .landing-section {
        margin-bottom: 48px
    }

    .landing-section > h2, .landing-cta h2 {
        font-size: 26px
    }

    .landing-preview-heading {
        padding: 20px 16px 8px
    }

    .landing-preview-month {
        padding: 0 16px;
        margin-bottom: 8px
    }

    .landing-preview-mobile-caption {
        display: block;
        padding: 0 16px;
        margin-bottom: 16px;
        color: var(--muted);
        font-size: 12px
    }

    .landing-preview-weekdays, .landing-preview-day:not(.landing-preview-week) {
        display: none
    }

    .landing-preview-grid {
        display: block;
        border-top: 1px solid var(--line)
    }

    .landing-preview-grid .landing-preview-day {
        min-height: 80px;
        padding: 14px 16px;
        border-right: 0;
        border-bottom: 1px solid var(--line)
    }

    .landing-preview-day-name {
        display: inline;
        color: var(--muted)
    }

    .landing-preview-work-label {
        font-size: 12px
    }

    .landing-preview-empty {
        display: block;
        margin: 0;
        color: var(--muted);
        font-size: 12px
    }

    .landing-preview-event strong {
        font-size: 13px
    }

    .landing-preview-event-shared {
        margin-bottom: 0;
        padding-right: 106px
    }

    .landing-preview-cursor {
        top: auto;
        right: 10px;
        bottom: 8px;
        left: auto
    }

    .landing-preview-caption {
        border-top: 0;
        padding: 16px
    }

    .landing-steps, .landing-features {
        grid-template-columns:minmax(0, 1fr)
    }
}

.member-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--line);
    padding: 17px 0;
    margin-bottom: 10px;
    gap: 15px
}

.member-row small {
    display: block;
    color: var(--muted)
}

.pill {
    border-radius: 20px;
    background: var(--sage);
    font-size: 11px;
    padding: 4px 10px
}

.invitation {
    margin-top: 26px;
    border-top: 1px solid var(--line);
    padding-top: 22px
}

.copy-row {
    display: flex;
    gap: 8px;
    margin-bottom: 10px
}

.copy-row input {
    min-width: 0;
    font-size: 12px
}

.messages {
    margin: 15px auto;
    max-width: 720px;
    padding: 10px 20px;
    color: #52634b;
    background: var(--sage);
    border-radius: 8px
}

.messages p {
    margin: 0
}

.toast {
    position: fixed;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    max-width: 90vw;
    background: #384738;
    color: #fff;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 20px #0002;
    z-index: 10
}

@media (min-width: 1101px) and (max-width: 1499px) {
    :root {
        --sidebar-width: 240px;
        --page-gutter: 24px
    }

    .day {
        padding: 11px 4px
    }

    .weekdays span {
        padding: 13px 8px
    }

    .app-layout:not([data-calendar-view="agenda"]) .event-card {
        display: flow-root
    }

    .app-layout:not([data-calendar-view="agenda"]) .event-check {
        float: left;
        margin-right: 8px
    }

}

@media (min-width: 1500px) {
    :root {
        --page-gutter: 64px
    }

    .day {
        min-height: 145px
    }

    .event-card strong {
        font-size: 14px
    }

    .event-card small {
        font-size: 12px
    }
}

@media (max-width: 1100px) {
    :root {
        --page-gutter: 20px;
        --content-top: 14px
    }

    .month-nav h2 {
        margin-right: 8px;
        font-size: 18px
    }

    .toolbar-right {
        gap: 10px
    }

    .auth-layout {
        gap: 50px;
        padding-top: 60px
    }

    .auth-intro h1 {
        font-size: 44px
    }

    .day {
        padding: 8px 4px;
        min-height: 110px
    }
}

@media (max-width: 1100px) {
    .topbar {
        height: 70px;
        display: flex;
        padding: 0 var(--page-gutter)
    }

    .topbar > .brand {
        height: auto;
        padding: 0;
        border-right: 0
    }

    .account {
        gap: 8px;
        margin-left: auto
    }

    .app-layout {
        display: flex;
        flex-direction: column
    }

    .sidebar {
        border-right: 0;
        border-bottom: 1px solid var(--line);
        padding: var(--content-top) var(--page-gutter);
        position: static;
        height: auto;
        align-self: stretch;
        overflow: visible
    }

    .sidebar > .eyebrow, .sidebar > h2, .sidebar-note {
        display: none
    }

    .calendar-nav {
        display: flex;
        overflow-x: auto;
        gap: 8px
    }

    .calendar-nav a {
        flex-shrink: 0
    }

    .sidebar-section {
        margin-top: 12px
    }

    .template-list {
        min-height: 0;
        overflow: visible;
        overscroll-behavior: auto
    }

    .empty-templates {
        display: flex;
        align-items: center;
        gap: 15px;
        width: 100%;
        padding: 12px;
        text-align: left
    }

    .empty-templates p {
        margin: 0
    }

    .calendar-main {
        padding: var(--content-top) var(--page-gutter)
    }

    .page-heading {
        margin-bottom: 14px
    }

    .page-heading h1 {
        font-size: 28px
    }

    .page-heading .eyebrow, .page-heading .muted {
        display: none
    }

    .calendar-toolbar {
        flex-wrap: wrap
    }

    .month-nav h2 {
        font-size: 20px
    }

    .weekdays {
        display: none
    }

    .month-grid {
        display: flex;
        flex-direction: column
    }

    .day {
        min-height: 80px;
        border-right: 0;
        padding: 12px 15px;
        border-bottom: 1px solid var(--line) !important
    }

    .day:last-child {
        border-bottom: 0 !important
    }

    .day.outside {
        display: none
    }

    .day-heading {
        justify-content: flex-start;
        gap: 12px
    }

    .day-number {
        font-size: 14px;
        width: 25px;
        text-align: center
    }

    .mobile-day {
        display: inline;
        font-size: 12px;
        color: var(--muted);
        text-transform: capitalize
    }

    .workday-label {
        font-size: 11px
    }

    .add-day {
        opacity: 1;
        margin-left: auto
    }

    .event-card {
        padding: 12px;
        margin-left: 37px;
        gap: 8px
    }

    .event-card strong {
        font-size: 14px
    }

    .event-card small {
        font-size: 12px
    }

    .event-move {
        display: block
    }

    .event-check {
        --event-check-size: 20px;
        width: 20px;
        height: 20px;
        font-size: 13px;
        line-height: 18px
    }

    .calendar-footer {
        font-size: 11px;
        flex-wrap: wrap
    }

    .view-label {
        display: none
    }

    .auth-layout {
        display: block;
        max-width: 500px;
        padding: 32px var(--page-gutter)
    }

    .auth-intro {
        display: none
    }

    .form-card {
        padding: 26px
    }

    .centered {
        margin-top: 25px
    }

    .toolbar-right .button {
        min-height: 44px;
        padding: 9px 14px
    }

    .calendar-tip {
        font-size: 12px
    }

    .copy-row {
        flex-direction: column
    }
}

@media (prefers-reduced-motion: no-preference) {
    a, button {
        transition: color .15s, background .15s, border-color .15s
    }
}

.event-description {
    white-space: pre-wrap;
    overflow-wrap: anywhere
}

.template-card a:hover, .event-card a:hover {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 3px
}

.account-name {
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap
}

@media (max-width: 1100px) {
    input, textarea, select {
        font-size: 16px
    }

    .topbar {
        height: auto;
        min-height: 70px;
        flex-wrap: wrap;
        gap: 12px;
        padding-top: 14px;
        padding-bottom: 14px
    }

    .page-heading {
        align-items: flex-start;
        flex-wrap: wrap
    }

    .account-name {
        max-width: 100px
    }
}

@media (pointer: coarse) {
    .icon-button {
        width: 44px;
        height: 44px
    }

    .today-button {
        min-height: 44px;
        display: inline-flex;
        align-items: center
    }

    .add-day {
        min-width: 44px;
        min-height: 44px;
        display: inline-grid;
        place-content: center
    }
}

.color-options {
    border: 0;
    padding: 0;
    margin: 0 0 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px
}

.color-options legend {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 7px
}

.form-card .color-choice, .template-picker .color-choice {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    margin: 0;
    border: 1px solid var(--control);
    border-radius: 9px;
    cursor: pointer
}

.color-choice input {
    width: 16px;
    min-height: 16px;
    margin: 0;
    accent-color: var(--orange)
}

.color-choice:has(input:checked) {
    border-color: var(--orange);
    box-shadow: inset 0 0 0 1px var(--orange)
}

.color-swatch {
    width: 22px;
    height: 22px;
    border: 1px solid currentColor;
    border-radius: 50%;
    flex-shrink: 0
}

.template-group {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
    min-width: 0;
    border-radius: 8px
}

.template-group h4 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
    min-width: 0;
    overflow-wrap: break-word;
    flex: 1
}

.template-group-heading {
    display: flex;
    min-width: 0;
    align-items: flex-start;
    gap: 0;
    min-height: 44px
}

.category-collapse {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    width: 100%;
    min-height: 44px;
    padding: 10px 0;
    border: 0;
    background: none;
    color: inherit;
    text-align: left;
    font-weight: inherit;
    line-height: 24px
}

.category-collapse [data-category-name] {
    min-width: 0;
    flex: 1
}

.category-chevron {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    margin-top: 4px
}

.category-collapse[aria-expanded="false"] .category-chevron {
    transform: rotate(-90deg)
}

.category-count {
    flex-shrink: 0;
    color: var(--muted);
    font-size: 11px;
    font-weight: 400
}

.category-empty {
    margin: 0;
    padding: 4px 12px 8px
}

.category-menu {
    position: fixed;
    inset: auto;
    margin: 0;
    width: 220px;
    max-width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px);
    overflow-y: auto;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    color: var(--ink);
    box-shadow: 0 8px 28px #303b3626
}

.category-menu:popover-open {
    display: grid
}

.category-menu button, .category-menu a {
    display: block;
    width: 100%;
    min-height: 44px;
    padding: 8px 12px;
    border: 0;
    border-radius: 7px;
    background: none;
    text-align: left;
    font-size: 13px;
    line-height: 1.6
}

.category-menu button:hover, .category-menu button:focus-visible, .category-menu a:hover, .category-menu a:focus-visible {
    background: var(--bg)
}

.category-menu button:disabled {
    color: var(--muted);
    opacity: .5;
    cursor: default
}

[data-category-drag-handle] {
    cursor: grab;
    touch-action: none;
    user-select: none
}

.template-group.category-dragging {
    opacity: .3
}

.template-group-drag-preview {
    position: fixed;
    pointer-events: none;
    z-index: 20;
    opacity: .9
}

.category-drop-marker {
    position: fixed;
    background: var(--orange);
    border-radius: 3px;
    pointer-events: none;
    z-index: 21
}

.template-group-cards {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    min-width: 0;
    gap: 8px
}

.card-description {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    overflow-wrap: anywhere;
    font-size: 11px;
    line-height: 1.4;
    margin-top: 5px
}

.template-picker {
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 24px;
    width: min(440px, calc(100% - 32px));
    max-height: 80vh;
    color: var(--ink);
    background: var(--surface)
}

.template-picker::backdrop {
    background: #303b3666
}

.picker-close {
    float: right
}

.template-picker h2 {
    font-size: 22px
}

#category-editor h2 {
    overflow-wrap: anywhere
}

.picker-label {
    margin-top: 24px
}

.picker-templates {
    display: grid;
    gap: 8px;
    margin-bottom: 20px
}

.template-choice {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    border: 0;
    border-radius: 8px;
    padding: 12px;
    text-align: left;
    overflow-wrap: anywhere
}

@media (max-width: 1100px) {
    .toolbar-right {
        flex-wrap: wrap
    }
}

.event-card.is-saved {
    outline: 3px solid var(--orange);
    outline-offset: 2px
}

.event-card {
    scroll-margin-top: 12px
}

.workday-label {
    flex: 1;
    min-width: 0;
    margin: 0;
    font-size: 12px;
    color: #79504b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis
}

.toast-action {
    border: 1px solid currentColor;
    border-radius: 4px;
    color: inherit;
    background: transparent;
    padding: 8px;
    margin: 6px 0 0 8px;
    min-height: 44px
}

.calendar-main .card-description {
    font-size: 12px
}

.field-error {
    display: block;
    color: var(--error);
    font-size: 13px;
    margin-top: 6px
}

input[aria-invalid="true"], textarea[aria-invalid="true"], select[aria-invalid="true"] {
    border-color: var(--error)
}

.calendar-role {
    font-size: 13px;
    color: var(--muted)
}

.invitation-actions {
    flex-wrap: wrap
}

/* Calendar navigation and explicit day actions. */
.calendar-toolbar {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--bg);
    padding: 12px 0;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--line);
}

.calendar-navigation {
    position: relative;
}

.calendar-navigation > summary {
    cursor: pointer;
}

.calendar-navigation[open] > .calendar-navigation-content {
    position: absolute;
    right: 0;
    top: 44px;
    width: min(290px, calc(100vw - 32px));
    padding: 16px;
    border: 1px solid var(--line);
    background: var(--surface);
    box-shadow: 0 10px 30px #303b361a;
    border-radius: 12px;
}

.calendar-navigation form > * {
    display: block;
    width: 100%;
    margin-bottom: 8px;
}

.calendar-navigation-content > a {
    margin-top: 8px;
}

.day, .event-card {
    scroll-margin-top: var(--calendar-toolbar-height, 150px);
}

.day-number {
    color: inherit;
    text-decoration: none;
}

.day-workday {
    font-size: 12px;
    margin-top: 8px;
    padding: 6px;
}

.compact-month {
    display: none;
}

[data-calendar-view="agenda"] .month-grid {
    display: block;
}

[data-calendar-view="agenda"] .calendar-surface > .weekdays,
[data-calendar-view="agenda"] .day.outside {
    display: none;
}

[data-calendar-view="agenda"] .day {
    min-height: 0;
    border-bottom: 1px solid var(--line);
}

[data-calendar-view="agenda"] .mobile-day {
    display: inline;
}

.empty-days {
    padding: 12px;
    border-bottom: 1px solid var(--line);
}

.empty-days > summary {
    cursor: pointer;
    color: var(--muted);
    padding: 10px 0;
}

@media (max-width: 1100px) {
    .calendar-toolbar {
        gap: 8px;
    }

    .calendar-toolbar .month-nav {
        flex-wrap: nowrap;
        width: 100%;
        gap: 6px;
    }

    .calendar-toolbar .month-nav h2 {
        margin-right: auto;
        font-size: 19px;
    }

    .calendar-toolbar .toolbar-right {
        width: 100%;
        flex-wrap: nowrap;
        justify-content: space-between;
        gap: 6px;
    }

    .calendar-toolbar .toolbar-right > .button {
        margin: 0;
    }

    .calendar-toolbar .refresh-calendar {
        flex: 1;
        min-width: 0;
        text-align: center;
    }

    .calendar-toolbar .calendar-navigation {
        flex-shrink: 0;
    }

    [data-calendar-view="month"] .compact-month {
        display: block;
        margin: 12px 0;
    }

    .compact-month .weekdays {
        display: grid;
        grid-template-columns: repeat(7, 1fr);
    }

    .compact-month-grid {
        display: grid;
        grid-template-columns: repeat(7, 1fr);
    }

    .compact-date {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 6px 0 0;
        color: var(--ink);
        text-decoration: none;
        border-radius: 8px;
        min-height: 44px;
    }

    .compact-date small {
        line-height: 12px;
        min-height: 12px;
    }

    .compact-date.outside {
        opacity: .5;
    }

    .compact-date.is-workday {
        background: var(--workday);
    }

    .compact-date.is-today {
        box-shadow: inset 0 0 0 1px rgba(173, 81, 50, .35);
        font-weight: 600;
    }

    .compact-date[aria-current] {
        outline: 2px solid var(--ink);
        outline-offset: -4px;
    }

    [data-calendar-view="month"] .calendar-surface .day {
        display: none;
    }

    [data-calendar-view="month"] .calendar-surface .day[data-selected="true"] {
        display: block;
    }
}

@media (any-pointer: coarse) {
    .icon-button, .add-day, .day-number, .day-workday {
        min-width: 44px;
        min-height: 44px;
    }

    .day-number {
        display: inline-grid;
        place-content: center;
    }
}

@media (max-width: 1100px) and (any-pointer: coarse) {
    .event-check {
        width: 44px;
        height: 44px;
        justify-content: end
    }

    .event-check::before {
        right: 0;
        left: auto
    }
}

.event-details {
    margin-top: 22px;
    border-top: 1px solid var(--line);
    padding-top: 12px;
}

.event-details > summary {
    cursor: pointer;
    font-weight: 600;
    padding: 8px 0;
}

.event-details:not([open]) + .event-details-save {
    display: none;
}

.participant-options, .recurrence-options {
    margin: 20px 0 0;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 9px;
    min-width: 0;
}

.participant-options legend, .recurrence-options legend {
    padding: 0 6px;
    font-weight: 500;
}

.participant-options label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 6px 0;
    overflow-wrap: anywhere;
}

.participant-options input {
    width: auto;
}

.participant-list {
    margin: 8px 0 0 16px;
}

.participant-options:has([value="all"]:checked) .participant-list {
    opacity: .6;
}

.recurrence-options {
    margin-top: 20px;
}

.check-line, .form-card .check-line {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 10px 0;
}

.check-line input {
    width: auto;
}

.participant-options input, .check-line input {
    min-height: 0;
    width: 16px;
    height: 16px;
    padding: 0;
    margin: 3px 0 0;
    flex-shrink: 0;
}

.recurrence-fields fieldset {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

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

.notification-menu {
    position: relative;
    margin-left: auto;
    margin-right: 20px;
    font-size: 13px;
}

.notification-menu summary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 44px;
    list-style: none;
    cursor: pointer;
    padding: 10px 8px;
    border-radius: 8px;
}

.notification-menu[open] > summary {
    background: var(--accent-soft);
    color: var(--orange);
}

.notification-menu summary::-webkit-details-marker, .notification-menu [data-notification-count]:empty {
    display: none;
}

.notification-content {
    position: absolute;
    z-index: 30;
    right: 0;
    margin-top: 8px;
    width: min(360px, calc(100vw - 32px));
    background: var(--surface);
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 10px 30px #303b361a;
}

.notification-content ul {
    max-height: 50vh;
    overflow: auto;
    padding-left: 20px;
}

.notification-content li, .notification-history li {
    margin-bottom: 14px;
}

.notification-content button {
    display: block;
}

.refresh-calendar {
    font-size: 12px;
}

@media (max-width: 600px) {
    .topbar {
        flex-wrap: wrap;
    }

    .notification-menu {
        order: 3;
        width: 100%;
        margin-right: 0;
    }

    .notification-content {
        left: 0;
        right: auto;
    }
}

.reminder-settings {
    margin-top: 24px;
    border-top: 1px solid var(--line);
    padding-top: 14px;
}

.reminder-settings summary {
    cursor: pointer;
    font-weight: 600;
}

.reminder-settings .button {
    margin-top: 14px;
}

.hero-week {
    margin: 0;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--surface);
    box-shadow: 0 18px 50px #303b3610;
}

.hero-week figcaption {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
}

.hero-week-day {
    display: flex;
    flex-direction: column;
    margin: 12px 0;
    padding: 12px 16px;
    background: var(--workday);
    border-radius: 12px;
}

.hero-week-day span, .hero-week-day small {
    font-size: 13px;
}

.hero-week-day strong {
    font-size: 17px;
}

.hero-week-day.hero-free {
    background: #e5eadc;
}

.hero-week > p {
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 0;
}

.product-trust {
    max-width: 780px;
}

@media (min-width: 1000px) {
    .landing-hero {
        display: grid;
        grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
        gap: 60px;
        align-items: center;
        max-width: none;
        text-align: left;
    }

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

    .hero-week {
        width: 100%;
        max-width: 440px;
        justify-self: end;
    }

    .landing h1 {
        font-size: clamp(40px, 4vw, 60px);
    }
}

@media (max-width: 999px) {
    .hero-week {
        margin-top: 32px;
    }
}

@media (min-width: 1101px) {
    .topbar:has(.notification-menu) {
        grid-template-columns: var(--sidebar-width) minmax(0, 1fr) auto auto;
    }

    .topbar > .notification-menu {
        grid-column: 3;
    }

    .topbar > .account {
        grid-column: 4;
    }
}

.notification-icon {
    display: block;
    flex-shrink: 0;
}

@media (max-width: 600px) {
    .notification-menu {
        order: 0;
        width: auto;
        margin: 0 0 0 auto;
    }

    .notification-label {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip-path: inset(50%);
    }

    .notification-icon {
        display: inline;
        font-size: 24px;
    }

    .notification-menu summary {
        min-width: 44px;
        text-align: center;
    }

    .notification-content {
        left: auto;
        right: 0;
    }

    .account {
        order: 3;
        width: 100%;
        justify-content: flex-end;
    }
}

.calendar-navigation:not([open]) > .calendar-navigation-content {
    display: none;
}

.compact-month .weekdays {
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.compact-month .weekdays span {
    padding: 12px 0;
    text-align: center;
}

@media (max-width: 400px) {
    .calendar-toolbar .month-nav {
        gap: 4px;
    }

    .calendar-toolbar .month-nav h2 {
        font-size: 16px;
    }

    .calendar-toolbar .month-nav .icon-button {
        min-width: 44px;
        flex-shrink: 0;
    }

    .calendar-toolbar .today-button {
        padding: 6px;
        font-size: 11px;
    }
}

.site-app .topbar {
    display: flex;
    height: auto;
    min-height: 72px;
    gap: 20px;
    padding: 14px var(--page-gutter)
}

.site-app.landing-page .topbar {
    padding-left: max(30px, calc((100% - 1100px) / 2));
    padding-right: max(30px, calc((100% - 1100px) / 2));
}

.planner-page {
    --sidebar-width: 260px;
    --page-gutter: 24px;
    --sidebar-gutter: 24px;
}

.site-app.planner-page .topbar {
    flex-wrap: nowrap;
    padding-left: max(var(--page-gutter), calc((100% - 1800px) / 2 + var(--page-gutter)));
    padding-right: max(var(--page-gutter), calc((100% - 1800px) / 2 + var(--page-gutter)));
}

.site-app.planner-page .topbar > .brand {
    margin-right: 0;
}

.site-app.planner-page .topbar > .account {
    flex-shrink: 0;
    margin-left: 0;
}

.site-app.planner-page .notification-menu {
    flex-shrink: 0;
}

.site-app .topbar > .brand {
    height: auto;
    padding: 0;
    border: 0;
    margin-right: auto
}

.site-app .brand {
    flex-shrink: 0;
}

.site-app .notification-menu {
    margin: 0;
}

.site-app .account {
    min-width: 0;
}

.site-app .account-name {
    max-width: 200px;
    overflow-wrap: anywhere;
}

.account-profile {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 44px;
    min-height: 44px;
    justify-content: center;
    border-radius: 8px;
}

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

.profile-content h2 {
    font-size: 20px;
}

.profile-email {
    margin: 24px 0 12px;
    overflow-wrap: anywhere;
}

.profile-details > summary {
    cursor: pointer;
    padding: 10px 0;
}

.profile-details[open] > summary {
    margin-bottom: 12px;
}

.profile-preferences + .profile-preferences {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
}

.site-app .button:disabled {
    opacity: .55;
    cursor: default;
}

.site-app .avatar {
    background: var(--accent-soft);
    color: var(--orange);
    flex-shrink: 0;
}

.site-app input[aria-invalid="true"], .site-app textarea[aria-invalid="true"], .site-app select[aria-invalid="true"] {
    border-color: var(--error);
}

.planner-page .app-layout {
    display: grid;
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
    grid-template-areas: "library toolbar" "library main";
    grid-template-rows: min-content 1fr;
    column-gap: 24px;
    align-items: start;
    align-content: start;
    min-height: calc(100dvh - 72px);
    max-width: 1800px;
    margin: 0 auto;
    padding: 20px var(--page-gutter) 24px;
}

.planner-page .calendar-heading {
    position: relative;
    flex: 0 1 380px;
    min-width: 0;
    margin-right: auto;
    padding-left: 11px;
    border-left: 1px solid var(--line);
}

.calendar-heading-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 16px;
    min-width: 0;
}

.calendar-heading-title h1 {
    margin: 0;
    font-size: 20px;
}

.calendar-role {
    margin: 0;
    flex-basis: 100%;
    font-size: 12px;
    color: var(--muted);
}

.planner-page .calendar-main {
    grid-area: main;
    padding: 0;
}

.planner-page .sidebar {
    grid-area: library;
    margin-top: 0;
    padding: 0;
    height: auto;
    max-height: calc(100dvh - var(--template-library-top, 16px) - 16px);
    top: 16px;
    overflow: hidden;
    background: transparent;
    border: 0;
    border-radius: 0;
}

.planner-page .sidebar[hidden] {
    display: none;
}

.template-panel-toggle[hidden], .template-panel-close[hidden] {
    display: none;
}

.template-panel-toggle {
    display: inline-grid;
    place-items: center;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 8px;
    color: var(--muted);
}

.template-panel-toggle:hover, .template-panel-toggle[aria-expanded="true"] {
    background: var(--accent-soft);
    color: var(--ink);
}

.template-panel-toggle svg {
    flex-shrink: 0;
}

.template-panel-toggle[aria-expanded="true"] {
    background: transparent;
    border-color: var(--control);
    color: var(--ink);
}

.template-panel-action, .template-panel-close {
    display: inline-grid;
    place-items: center;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 8px;
}

.template-panel-action {
    font-size: 22px;
}

.template-panel-action:hover, .template-panel-close:hover {
    background: var(--accent-soft);
}

.template-help-toggle {
    display: inline-grid;
    place-items: center;
    flex-shrink: 0;
    width: 28px;
    height: 44px;
    padding: 0;
    margin-right: auto;
    color: var(--muted);
}

.template-help-toggle:hover {
    color: var(--ink);
}

.template-help {
    position: fixed;
    inset: auto;
    width: 280px;
    max-width: calc(100vw - 16px);
    margin: 0;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--ink);
    box-shadow: 0 4px 16px #303b3614;
    font-size: 12px;
    line-height: 1.6;
}

.template-library-heading {
    min-height: 48px;
    position: relative;
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0 0 16px;
    flex-shrink: 0;
}

.planner-page .sidebar .template-library-heading h2 {
    min-width: 0;
    flex-shrink: 0;
    margin-right: auto;
    margin-bottom: 0;
    font-size: 18px;
}

.template-library-heading > .template-panel-close {
    display: none;
}

.template-library-date {
    display: none;
}

.planner-mobile-views {
    display: none;
}

.planner-page .sidebar-section {
    margin-top: 0;
}

.planner-page .sidebar h2 {
    font-size: 18px;
    margin-bottom: 8px;
}

.sidebar-section-title {
    scroll-margin-top: var(--calendar-toolbar-height, 150px);
}

.planner-page .app-layout[data-template-collapsed="true"] {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "toolbar" "main";
}

.planner-page .calendar-toolbar {
    grid-area: toolbar;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 16px;
    position: relative;
    top: 0;
    z-index: 15;
    padding: 0;
    background: var(--bg);
    border-bottom: 0;
    margin-bottom: 24px;
}

.planner-page .toolbar-right {
    width: auto;
    margin-left: auto;
    gap: 12px;
    flex-wrap: wrap;
}

.planner-page .calendar-toolbar .button {
    min-height: 48px;
}

.planner-views {
    display: inline-flex;
    gap: 24px;
    padding: 0;
    min-height: 48px;
    align-items: stretch;
}

.planner-views a {
    display: block;
    padding: 13px 0 10px;
    border-bottom: 2px solid transparent;
    font-size: 13px;
    line-height: 23px;
    color: var(--tab-ink);
}

.planner-views a[aria-current="page"] {
    border-bottom-color: var(--orange);
    color: var(--orange);
    font-weight: 600;
}

@media (prefers-reduced-motion: no-preference) {
    .planner-page .calendar-main {
        view-transition-name: calendar-view;
    }

    .planner-page .sidebar {
        view-transition-name: template-library;
    }

    ::view-transition-old(root), ::view-transition-new(root) {
        animation: none;
    }

    ::view-transition-group(calendar-view), ::view-transition-old(calendar-view), ::view-transition-new(calendar-view),
    ::view-transition-group(template-library), ::view-transition-old(template-library), ::view-transition-new(template-library) {
        animation-duration: .1s;
        animation-timing-function: ease-out;
    }
}

.calendar-period {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 20px;
}

@media (min-width: 1101px) {
    .planner-page .calendar-period {
        padding-top: 0;
        margin-bottom: 16px;
    }
}

.calendar-views {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.calendar-views a {
    padding: 8px 11px;
    border-radius: 7px;
    font-size: 12px;
    color: var(--muted);
}

.calendar-views a[aria-current="page"] {
    background: var(--accent-soft);
    color: var(--orange);
}

.calendar-navigation {
    position: relative;
}

.calendar-navigation > summary {
    list-style: none;
    cursor: pointer;
}

.calendar-navigation > summary::-webkit-details-marker {
    display: none;
}

.calendar-navigation-mobile-label {
    display: none;
}

.calendar-navigation-content {
    position: absolute;
    z-index: 25;
    right: 0;
    width: min(310px, calc(100vw - 40px));
    padding: 17px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
    box-shadow: 0 12px 35px #303b3615;
}

.calendar-navigation-content label {
    display: block;
    font-size: 13px;
    margin-bottom: 6px;
}

.calendar-navigation-content .button {
    margin-top: 10px;
}

.calendar-switcher[open] > .calendar-navigation-content {
    left: 0;
    right: auto;
    top: calc(100% + 8px);
    width: min(320px, calc(100vw - 40px));
    padding: 6px;
}

.calendar-switcher {
    width: 100%;
    min-width: 0;
    max-width: 100%;
}

.calendar-switcher > summary {
    display: flex;
    align-items: center;
    min-height: 44px;
    border-radius: 8px;
}

.calendar-switcher > summary h1 {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.calendar-switcher > summary h1 > span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.calendar-switcher-chevron {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    padding: 4px;
    border-radius: 8px;
    background: var(--surface);
    color: var(--muted);
}

.calendar-switcher > summary:hover .calendar-switcher-chevron {
    background: var(--accent-soft);
    color: var(--ink);
}

.calendar-switcher[open] .calendar-switcher-chevron {
    transform: rotate(180deg);
}

.calendar-switcher-list, .calendar-switcher-actions {
    display: grid;
    gap: 2px;
}

.calendar-switcher-list {
    max-height: min(360px, 40dvh);
    overflow-y: auto;
}

.calendar-switcher-list a, .calendar-switcher-actions a {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 10px 12px;
    border-radius: 7px;
    font-size: 13px;
    line-height: 1.5;
}

.calendar-switcher-list a > span, .calendar-switcher-actions a > span {
    flex: 1;
    min-width: 0;
    overflow-wrap: anywhere;
    font: inherit;
}

.calendar-switcher-list svg, .calendar-switcher-actions svg {
    flex-shrink: 0;
}

.calendar-switcher-list a[aria-current="page"] {
    background: #e9ede3;
    color: #52634b;
    font-weight: 600;
}

.calendar-switcher-list a:hover, .calendar-switcher-actions a:hover {
    background: var(--bg);
    color: var(--ink);
}

.calendar-switcher-actions {
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid var(--line);
    color: var(--muted);
}

.planner-page .weekdays {
    background: #f3f2ec;
}

.planner-page .calendar-surface {
    overflow: clip;
}

.planner-page .calendar-surface > .weekdays {
    position: sticky;
    top: 0;
    z-index: 14;
}

.planner-page .day.is-today:not(.is-workday) {
    background: var(--accent-soft);
}

.planner-page .day.is-today {
    box-shadow: inset 0 0 0 2px #ad51325c;
}

.planner-page .calendar-footer {
    gap: 12px;
    flex-wrap: wrap;
    font-size: 11px;
}

.day-navigation {
    display: flex;
    align-items: center;
    gap: 6px;
}

.day-dashboard {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 22px;
    align-items: start;
}

.planner-page .day-overview {
    min-height: 240px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    box-shadow: none;
    cursor: default;
}

.day-overview .day-heading {
    flex-wrap: wrap;
    margin-bottom: 18px;
    padding: 0;
    gap: 10px;
}

.day-overview .day-heading h2 {
    margin: 0;
    min-width: 0;
    flex: 1;
    font-size: 21px;
}

.day-overview .day-number {
    display: inline;
    width: auto;
    height: auto;
    border-radius: 0;
    background: transparent;
    color: var(--ink);
    font-size: inherit;
}

.day-overview .add-day {
    opacity: 1;
    min-width: 44px;
    min-height: 44px;
    text-align: center;
    margin: 0;
}

.day-overview .workday-label {
    display: block;
    padding: 12px 14px;
    border-radius: 7px;
    background: var(--sage);
    color: #325845;
    margin: 0 0 16px;
    font-size: 13px;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
}

.day-overview .workday-label[hidden], .day-no-work[hidden] {
    display: none;
}

.day-no-work {
    margin-bottom: 16px;
}

.day-overview .event-card {
    padding: 16px;
    margin: 12px 0 0;
}

.day-overview .event-move {
    display: inline-block;
}

.day-empty {
    padding: 22px 0;
    margin: 0;
    font-size: 14px;
    color: var(--muted);
}

.day-mini-calendar {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
}

.day-mini-calendar .month-nav {
    justify-content: space-between;
    gap: 4px;
    margin-bottom: 14px;
}

.day-mini-calendar .month-nav h2 {
    font-size: 14px;
    margin: 0 auto 0 0;
}

.day-mini-calendar .icon-button {
    min-width: 28px;
    width: 28px;
    min-height: 32px;
    height: 32px;
}

.day-mini-calendar .weekdays {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    border: 0;
    background: transparent;
}

.day-mini-calendar .weekdays span {
    padding: 8px 0;
    text-align: center;
    font-size: 10px;
    letter-spacing: 0;
}

.day-mini-calendar .compact-month-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 3px;
}

.day-mini-calendar .compact-date {
    min-height: 32px;
    padding: 3px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    border: 0;
    background: transparent;
    font-size: 11px;
    gap: 0;
}

.day-mini-calendar .compact-date.is-today {
    box-shadow: inset 0 0 0 1px rgba(173, 81, 50, .35);
    font-weight: 600;
}

.day-mini-calendar .compact-date small {
    font-size: 10px;
    line-height: 6px;
    height: 6px;
}

.day-mini-calendar .compact-date[aria-current="date"] {
    background: var(--orange);
    color: #fff;
}

.day-mini-calendar .compact-date.is-workday:not([aria-current="date"]) {
    background: var(--workday);
}

.day-mini-calendar .compact-date.outside {
    opacity: .5;
}

:is(.compact-month, .day-mini-calendar) a.compact-date.outside {
    opacity: 1;
}

:is(.compact-month, .day-mini-calendar) a.compact-date.outside:not([aria-current]) {
    color: var(--muted);
}

:is(.compact-month, .day-mini-calendar) a.compact-date.outside.is-workday:not([aria-current]) {
    color: var(--ink);
}

.day-mini-calendar > .button {
    margin-top: 16px;
}

.upcoming-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin: 28px 0 15px;
}

.upcoming-heading h2 {
    font-size: 20px;
    margin: 0;
}

.upcoming-events {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.upcoming-card {
    display: block;
    min-width: 0;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
}

.upcoming-card:hover {
    border-color: var(--control);
    color: var(--ink);
}

.upcoming-card strong {
    display: block;
    font-weight: 500;
    font-size: 14px;
    overflow-wrap: anywhere;
}

.upcoming-card small {
    display: block;
    font-size: 12px;
    color: var(--muted);
    margin-top: 7px;
}

.upcoming-date {
    display: block;
    color: var(--muted);
    font-size: 12px;
    margin-bottom: 20px;
}

.site-app .form-card {
    border-radius: 12px;
    box-shadow: 0 4px 22px #303b3604;
}

.site-app .form-card p:not(.helptext), .site-app .form-card input:not([type="checkbox"]):not([type="radio"]), .site-app .form-card textarea, .site-app .form-card select {
    font-size: 16px;
}

.site-app .form-card h1, .site-app .form-card h2 {
    letter-spacing: -.7px;
    overflow-wrap: anywhere;
}

.site-app .form-card h1 {
    font-size: 28px;
    line-height: 1.25;
}

.site-app .form-card .back {
    color: var(--orange);
}

.site-app .form-actions {
    flex-wrap: wrap;
}

.site-app input[type="checkbox"], .site-app input[type="radio"] {
    accent-color: var(--orange);
}

.site-app .member-row {
    gap: 16px;
}

.site-app .member-row > span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.site-app .member-row:has(form) {
    flex-wrap: wrap;
}

.site-app .member-row:has(form) > span {
    flex: 1 1 160px;
}

.site-app .member-row form {
    flex-shrink: 0;
}

.site-app .notification-history {
    list-style: none;
    padding: 0;
}

.site-app .notification-history li {
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
}

.site-app .notification-history li a {
    overflow-wrap: anywhere;
}

.site-app .notification-content {
    box-shadow: 0 10px 30px #303b3612;
}

.site-app .auth-intro h1, .site-app .landing h1 {
    font-family: inherit;
    font-weight: 650;
    letter-spacing: -1.8px;
}

.site-app .auth-intro h1 {
    font-size: 46px;
}

.site-app .intro-art > span {
    display: none;
}

.site-app .landing-description {
    line-height: 1.65;
}

.site-app .hero-day {
    border-radius: 14px;
    padding: 26px;
    box-shadow: 0 12px 40px #303b3608;
    text-align: left;
}

.hero-day figcaption {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.hero-day figcaption span {
    font-size: 12px;
    font-weight: 400;
    color: var(--muted);
}

.hero-day .hero-day-work {
    padding: 12px 14px;
    background: var(--sage);
    border-radius: 7px;
    color: #325845;
    font-size: 13px;
}

.hero-day-plan {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    padding: 20px 0;
    border-bottom: 1px solid var(--line);
}

.hero-day-plan time {
    font-size: 13px;
    color: var(--muted);
    padding-top: 2px;
}

.hero-day-plan strong {
    display: block;
    font-weight: 500;
    font-size: 15px;
}

.hero-day-plan small {
    display: block;
    font-size: 12px;
    color: var(--muted);
    margin-top: 5px;
}

.landing-preview-views {
    display: inline-flex;
    gap: 3px;
    margin: 8px 24px 18px;
    padding: 4px;
    border-radius: 9px;
    background: #eeeae2;
}

.landing-preview-views span {
    padding: 7px 12px;
    font-size: 12px;
    color: var(--tab-ink);
    border-radius: 6px;
}

.landing-preview-views .active {
    background: var(--surface);
    color: var(--orange);
}

.hero-day .landing-preview-views {
    display: flex;
    margin: 20px 0 17px;
}

.hero-day .landing-preview-views span {
    flex: 1;
    text-align: center;
}

.site-app .landing-cta {
    background: var(--accent-soft);
    border-radius: 12px;
}

.site-app .landing-steps > li::before {
    background: var(--accent-soft);
    color: var(--orange);
}

.site-app .landing-preview {
    border-radius: 12px;
}

@media (max-width: 900px) {
    .site-app.landing-page .topbar {
        padding-left: 20px;
        padding-right: 20px;
    }
}

@media (max-width: 1100px) {
    .planner-page {
        --page-gutter: 20px;
        --sidebar-gutter: 20px;
    }

    .planner-page .app-layout {
        display: block;
    }

    .calendar-switcher {
        position: static;
    }

    .calendar-switcher[open] > .calendar-navigation-content {
        top: calc(100% + 8px);
        left: 0;
        right: auto;
        width: min(320px, calc(100vw - var(--page-gutter) * 2));
    }

    .calendar-switcher .calendar-nav {
        display: grid;
    }

    .planner-page .sidebar {
        position: static;
        height: auto;
        overflow: visible;
        margin: 0 var(--page-gutter) 24px;
        border: 1px solid var(--line);
        border-radius: 12px;
    }

    .planner-page.template-library-open {
        overflow: hidden;
    }

    .planner-page.template-library-open .sidebar {
        position: fixed;
        inset: 0;
        z-index: 50;
        width: 100%;
        height: 100dvh;
        max-height: none;
        margin: 0;
        padding: max(var(--page-gutter), env(safe-area-inset-top)) var(--page-gutter) max(var(--page-gutter), env(safe-area-inset-bottom));
        border: 0;
        border-radius: 0;
        overflow: hidden;
        overscroll-behavior: contain;
    }

    .planner-page.template-library-open .template-list {
        overflow-y: auto;
        overscroll-behavior: contain;
    }

    .template-library-heading > .template-panel-close:not([hidden]) {
        display: inline-grid;
    }

    .template-library-date {
        display: block;
        flex-shrink: 0;
        color: var(--muted);
        margin: 0 0 20px;
        font-size: 13px;
    }

    .day-dashboard {
        grid-template-columns: minmax(0, 1fr) 240px;
        gap: 16px;
    }
}

@media (max-width: 900px) {
    .site-app.planner-page .topbar {
        flex-wrap: wrap;
        row-gap: 0;
    }

    .site-app.planner-page .topbar > .brand {
        margin-right: auto;
    }

    .planner-page .calendar-heading {
        order: 1;
        flex-basis: 100%;
        padding-left: 0;
        border-left: 0;
    }
}

@media (max-width: 767px) {
    .day-dashboard {
        grid-template-columns: minmax(0, 1fr);
    }

    .day-mini-calendar {
        display: none;
    }
}

@media (max-width: 600px) {
    .planner-page {
        --page-gutter: 16px;
    }

    .calendar-heading-title h1 {
        font-size: 18px;
    }

    .planner-page .app-layout {
        padding: 16px;
    }

    .planner-page .calendar-main {
        padding-top: 0;
    }

    .planner-page .calendar-toolbar {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr) 48px;
        gap: 12px;
        padding: 0;
        margin-bottom: 20px;
    }

    .planner-views {
        grid-column: 1 / 3;
        min-width: 0;
    }

    .template-panel-toggle {
        grid-column: 1;
        grid-row: 2;
        margin-left: 0;
        padding-left: 12px;
        padding-right: 12px;
    }

    .planner-views a {
        flex: 1;
        text-align: center;
        padding-left: 6px;
        padding-right: 6px;
        white-space: nowrap;
    }

    .planner-page .toolbar-right {
        display: contents;
    }

    .planner-page .toolbar-right > .primary {
        grid-column: 2 / 4;
        grid-row: 2;
        justify-self: end;
    }

    .planner-more {
        grid-column: 3;
        grid-row: 1;
        justify-self: end;
    }

    .planner-more > summary.button {
        width: 48px;
        padding: 0;
        border: 0;
        background: transparent;
        font-size: 24px;
    }

    .planner-page .toolbar-right .button {
        padding-left: 12px;
        padding-right: 12px;
    }

    .calendar-navigation-label {
        display: none;
    }

    .calendar-navigation-mobile-label {
        display: inline;
    }

    .calendar-period {
        gap: 8px;
    }

    .calendar-period .month-nav {
        width: 100%;
        flex-wrap: nowrap;
        gap: 4px;
    }

    .calendar-period .month-nav h2 {
        flex: 1;
        margin: 0;
        font-size: 20px;
    }

    .calendar-period .month-nav .icon-button {
        width: 32px;
        min-width: 32px;
        border-color: transparent;
    }

    .calendar-period .calendar-views {
        display: none;
    }

    .planner-mobile-views {
        display: grid;
        gap: 8px;
    }

    .planner-mobile-views a[aria-current="page"] {
        background: var(--accent-soft);
        border-color: var(--orange);
        color: var(--orange);
        font-weight: 600;
    }

    .planner-page .compact-month .weekdays {
        background: transparent;
        border: 0;
    }

    .planner-page .compact-date {
        padding-top: 0;
    }

    .planner-page .compact-date > span {
        display: grid;
        place-items: center;
        width: 34px;
        height: 34px;
        border-radius: 50%;
    }

    .planner-page .compact-date[aria-current], .planner-page .compact-date.is-today {
        outline: 0;
        box-shadow: none;
    }

    .planner-page .compact-date.is-today > span {
        box-shadow: inset 0 0 0 1px var(--orange);
    }

    .planner-page .compact-date[aria-current] > span {
        background: var(--orange);
        color: #fff;
    }

    .planner-page [data-calendar-view="month"] .calendar-surface {
        border: 0;
        border-top: 1px solid var(--line);
        border-radius: 0;
        background: transparent;
    }

    .planner-page [data-calendar-view="month"] .day[data-selected="true"] {
        padding: 16px 0;
        box-shadow: none;
        background: transparent;
    }

    .planner-page [data-calendar-view="month"] .day[data-selected="true"].is-workday {
        background: var(--workday);
    }

    .planner-page [data-calendar-view="month"] .event-card {
        margin-left: 0;
    }

    .planner-page .day-overview {
        padding: 17px;
    }

    .day-overview .day-heading h2 {
        font-size: 18px;
        flex-basis: 100%;
    }

    .day-overview .day-heading [data-day-event-count] {
        margin-right: auto;
    }

    .upcoming-events {
        grid-template-columns: minmax(0, 1fr);
    }

    .upcoming-card {
        display: grid;
        grid-template-columns: 90px minmax(0, 1fr);
        gap: 5px 12px;
        padding: 16px;
    }

    .upcoming-card .upcoming-date {
        grid-row: 1 / span 3;
        margin: 0;
    }

    .upcoming-card > :not(.upcoming-date) {
        grid-column: 2;
    }

    .upcoming-card small {
        margin: 0;
    }

    .site-app .form-card {
        padding: 24px;
    }

    .site-app .form-card h1 {
        font-size: 25px;
    }

    .site-app .landing h1 {
        font-size: 37px;
        letter-spacing: -1.3px;
    }

    .site-app .hero-day {
        padding: 20px;
    }

    .landing-preview-views {
        margin-left: 16px;
        margin-right: 16px;
    }
}

@media (max-width: 600px) {
    .site-app .topbar {
        position: relative;
        gap: 6px;
        padding: 13px 16px;
    }

    .site-app.planner-page .topbar {
        min-height: 60px;
        padding-top: 7px;
        padding-bottom: 7px;
        padding-left: 16px;
        padding-right: 16px;
    }

    .site-app .notification-menu {
        position: static;
    }

    .site-app .notification-content {
        top: 100%;
        left: 16px;
        right: 16px;
        width: auto;
    }

    .site-app .brand-logo {
        display: none;
    }

    .site-app .brand-logo-compact {
        display: block;
        width: 148px;
    }

    .site-app .account {
        order: 0;
        width: auto;
        gap: 8px;
    }

    .site-app .account-name {
        display: none;
    }

    .site-app .account form {
        margin-left: 0;
    }

    .site-app .account .text-button {
        font-size: 12px;
    }
}

@media (max-width: 400px) {
    .site-app .topbar {
        gap: 4px;
    }

    .site-app .account {
        gap: 6px;
    }

    .site-app .brand-logo-compact {
        width: 136px;
    }
}

/* Notification history and compact feed. */
.notification-page {
    max-width: 860px;
}

.site-app .notification-history-card {
    width: 100%;
    max-width: 820px;
}

.notification-heading, .notification-actions, .notification-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.notification-heading {
    justify-content: space-between;
}

.notification-heading h1 {
    margin: 0;
}

.notification-history-card .notification-heading {
    margin-top: 22px;
}

.notification-meta, .notification-context {
    color: var(--muted);
    font-size: 12px;
}

.notification-kind, .notification-unread-label {
    font-weight: 600;
    color: var(--orange);
}

.notification-kind.is-reminder {
    color: #526e9b;
}

.site-app .notification-history .notification-card, .notification-content .notification-card {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow-wrap: anywhere;
}

.site-app .notification-card.is-unread {
    border-left: 3px solid var(--orange);
    background: var(--surface);
}

.notification-card h3, .notification-title {
    display: block;
    font-size: 15px;
    line-height: 1.5;
    margin: 10px 0;
    font-weight: 600;
}

.notification-card p {
    margin: 8px 0;
}

.site-app .notification-history-card .notification-date {
    font-size: 14px;
    margin-top: 28px;
}

.notification-changes {
    margin: 16px 0;
    font-size: 13px;
}

.notification-changes > div {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 12px;
    padding: 7px 0;
}

.notification-changes dt {
    color: var(--muted);
}

.notification-changes dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.notification-before, .notification-after {
    white-space: pre-wrap;
}

.notification-before {
    color: var(--muted);
}

.notification-after {
    font-weight: 600;
}

.notification-details summary, .notification-changes summary {
    cursor: pointer;
}

.notification-detail {
    margin: 12px 0;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}

.notification-actions {
    margin-top: 16px;
    font-size: 12px;
}

.notification-filters {
    display: flex;
    align-items: end;
    flex-wrap: wrap;
    gap: 12px;
    margin: 24px 0;
}

.notification-filters label {
    min-width: 0;
    flex: 1 1 180px;
    margin-bottom: 0;
}

.notification-filters .notification-unread-filter {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 46px;
    font-size: 13px;
}

.notification-unread-filter input {
    width: 16px;
    height: 16px;
    min-height: 0;
    padding: 0;
    flex-shrink: 0;
}

.notification-content [hidden] {
    display: none;
}

.notification-content ul {
    list-style: none;
    padding: 0;
}

.notification-content .notification-preview {
    font-size: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notification-warning, .notification-error {
    font-size: 13px;
    color: var(--orange);
}

@media (max-width: 600px) {
    .notification-changes > div {
        grid-template-columns: minmax(0, 1fr);
        gap: 4px;
    }

    .notification-filters label {
        flex-basis: 100%;
    }
}

/* Shared axes for the header, library and calendar. */
.site-app.planner-page .topbar {
    gap: 12px;
}

.site-app.planner-page .topbar > .brand {
    width: calc(var(--sidebar-width) - 56px);
}

.planner-page .template-card {
    background: color-mix(in srgb, var(--category-color) 14.08%, var(--surface));
    color: var(--ink);
    border: 0;
    border-left: 3px solid var(--category-marker, var(--category-color));
    border-radius: 8px;
}

.planner-page .template-card small {
    margin-left: 0;
    color: var(--muted);
}

.planner-page .template-title {
    display: flex;
}

.category-dot {
    width: 7px;
    height: 7px;
    margin-top: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    background: var(--category-color);
}

.category-sort-label {
    padding: 12px 12px 4px;
    margin: 4px 0 0;
    border-top: 1px solid var(--line);
    font-size: 11px;
    color: var(--muted);
}

.category-menu [aria-checked="true"] {
    color: var(--orange);
    font-weight: 600;
}

.category-menu [aria-checked="true"]::after {
    content: ' ✓';
}

.planner-page .event-card {
    display: block;
    padding: 8px;
    border-left: 3px solid var(--category-marker, var(--category-color));
    background: color-mix(in srgb, var(--category-color) 14.08%, var(--surface));
    color: var(--ink);
    filter: none;
}

.event-card .event-time {
    margin: 0 0 4px;
    padding-right: 28px;
    min-height: 24px;
    line-height: 24px;
    color: var(--muted);
}

.event-check-target {
    position: absolute;
    z-index: 2;
    top: 4px;
    right: 3px;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    margin: 0;
    cursor: pointer;
}

.planner-page .event-card input.event-check {
    appearance: none;
    display: grid;
    place-content: center;
    float: none;
    width: 16px;
    height: 16px;
    min-height: 0;
    padding: 0;
    margin: 0;
    border: 1.5px solid var(--category-color);
    border-radius: 5px;
    background: var(--surface);
    cursor: pointer;
}

.planner-page .event-card input.event-check:checked {
    background: var(--category-color);
}

.planner-page .event-card input.event-check:checked::after {
    content: "";
    width: 8px;
    height: 5px;
    margin-top: -2px;
    border: solid #fff;
    border-width: 0 0 2px 2px;
    transform: rotate(-45deg);
}

.planner-page .event-card input.event-check:focus-visible {
    outline: 2px solid var(--ink);
    outline-offset: 3px;
}

.planner-page .event-card input.event-check:disabled {
    opacity: .5;
    cursor: wait;
}

@media (forced-colors: active) {
    .planner-page .event-card input.event-check {
        appearance: auto;
    }

    .planner-page .event-card input.event-check::after {
        content: none;
    }
}

.planner-page .event-card.completed {
    background: color-mix(in srgb, var(--category-color) 5.12%, var(--surface));
}

.event-card.completed strong {
    color: var(--muted);
}

.event-category-label {
    display: block;
    margin-top: 6px;
    font-size: 11px;
    color: var(--muted);
}

@media (min-width: 1101px) {
    .planner-page [data-calendar-view="month"] .event-card {
        padding: 5px;
    }

    [data-calendar-view="month"] .event-card strong {
        font-size: 12px;
        overflow-wrap: normal;
    }

    [data-calendar-view="month"] .event-card strong a {
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        overflow: hidden;
        overflow-wrap: anywhere;
    }

    [data-calendar-view="month"] .event-card .event-time {
        line-height: 18px;
        padding-right: 24px;
    }

    [data-calendar-view="month"] .event-category-label {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip-path: inset(50%);
    }
}

@media (max-width: 1100px) {
    .planner-page.template-library-open .sidebar {
        background: var(--bg);
    }

    .event-check-target {
        width: 44px;
        height: 44px;
        top: 0;
        right: 0;
    }

    .event-card .event-time {
        padding-right: 40px;
    }
}

@media (max-width: 900px) {
    .site-app.planner-page .topbar > .brand {
        width: auto;
        margin-right: 0;
    }

    .planner-page .template-panel-toggle {
        margin-right: auto;
    }
}

@media (max-width: 600px) {
    .site-app.planner-page .topbar {
        gap: 4px;
    }

    .planner-page .brand-logo-compact {
        width: 116px;
    }

    .planner-page .calendar-toolbar {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 8px;
    }

    .planner-views {
        grid-column: 1 / -1;
        grid-row: 1;
        gap: 16px;
    }

    .planner-views a {
        flex: 0 1 auto;
        padding-left: 0;
        padding-right: 0;
        text-align: left;
    }

    .planner-page .toolbar-right > .primary {
        grid-column: 1;
        grid-row: 2;
        justify-self: start;
    }

    .planner-more {
        grid-column: 2;
        grid-row: 2;
    }
}

@media (max-width: 400px) {
    .planner-page .brand-logo-compact {
        width: 100px;
    }

    .planner-views {
        gap: 12px;
    }
}

.event-category-sage {
    --category-marker: #54852f;
}

.event-category-peach {
    --category-marker: #d77720;
}

.event-category-lavender {
    --category-marker: #7960cf;
}

.event-category-blue {
    --category-marker: #277fc3;
}

.event-category-rose {
    --category-marker: #ce477c;
}

.event-category-mint {
    --category-marker: #239767;
}

.event-category-teal {
    --category-marker: #078c99;
}

.event-category-yellow {
    --category-marker: #b68c08;
}

.event-category-coral {
    --category-marker: #dc5540;
}

.event-category-purple {
    --category-marker: #a03eb8;
}

.event-category-sand {
    --category-marker: #a77a42;
}

.event-category-gray {
    --category-marker: #63788e;
}

@media (max-width: 600px) {
    .day-overview .day-heading {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 44px;
        gap: 8px;
    }

    .day-overview .day-heading h2 {
        grid-column: 1 / -1;
    }

    .day-overview .day-navigation {
        grid-row: 2;
        grid-column: 1;
    }

    .day-overview .day-heading .add-day {
        grid-row: 2;
        grid-column: 2;
    }

    .day-overview [data-day-event-count] {
        grid-column: 1 / -1;
        grid-row: 3;
    }

    .planner-page [data-calendar-view="agenda"] .event-card {
        margin-left: 0;
    }
}
