:root {
  color-scheme: light;
  font-family: Inter, system-ui, sans-serif;
  background: #f5f7f4;
  color: #182d25;
  line-height: 1.55;
}

* { box-sizing: border-box; }
body { margin: 0; }
a { color: #195c49; text-underline-offset: .2em; }
.header { background: #fff; border-bottom: 1px solid #d9e3da; }

nav, main {
  width: min(100% - 2rem, 52rem);
  margin-inline: auto;
}

nav, .heading, .week-navigation, .member-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}

nav { padding-block: 1rem; }
main { padding-block: 2rem; }
.brand { font-size: 1.25rem; font-weight: 750; text-decoration: none; }
h1 { margin: 0 0 1rem; line-height: 1.2; }
.heading h1 { margin: 0; }

.panel {
  background: white;
  border: 1px solid #d9e3da;
  border-radius: 1rem;
  padding: 1.25rem;
  margin-block: .75rem;
}

.week-controls h2, .calendar-day h2 { margin: 0 0 .65rem; font-size: 1rem; }
.week-navigation, .member-filter { justify-content: flex-start; }
.member-filter { margin-top: 1rem; }
.member-filter select { width: auto; max-width: 100%; }
.calendar-day { padding-block: .9rem; }
.current-day { border-left: .25rem solid #195c49; }
.calendar-day h2 small, .slot-members, .empty-day { color: #425b50; }
.calendar-day h2 small { margin-inline-start: .5rem; font-weight: 500; }
.empty-day { margin: 0; font-size: .9rem; }

.entries { list-style: none; padding: 0; margin: 0; }
.entry {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .2rem 1rem;
  padding-block: .55rem;
  border-top: 1px solid #e8eee8;
}
.slot-time { min-width: 8.5rem; font-variant-numeric: tabular-nums; }
.slot-summary { overflow-wrap: anywhere; }
.slot-summary small { margin-inline-start: .35rem; }
.slot-members { display: block; font-size: .9rem; }
dt { font-weight: 700; }
dd { margin: 0 0 .75rem; }

button, .button {
  display: inline-block;
  min-height: 2.75rem;
  border: 1px solid transparent;
  border-radius: .55rem;
  padding: .55rem .9rem;
  font: inherit;
  font-weight: 650;
  background: #195c49;
  color: white;
  text-decoration: none;
  cursor: pointer;
}

.secondary { background: white; color: #195c49; border-color: #a4bdb0; }
label { font-weight: 650; }
input:not([type=checkbox], [type=radio]), textarea, select {
  display: block;
  width: min(100%, 33rem);
  padding: .5rem;
  border: 1px solid #a4bdb0;
  border-radius: .4rem;
  font: inherit;
}

fieldset { border: 1px solid #d9e3da; border-radius: .4rem; }
.helptext { display: block; font-size: .9em; }
.errorlist { color: #8b2020; }
:focus-visible { outline: 3px solid #0078a1; outline-offset: 3px; }

@media (max-width: 32rem) {
  .week-navigation { gap: .4rem; }
  .week-navigation .button { padding-inline: .55rem; }
  .entry { flex-direction: column; }
}

.nav-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.notification-link {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .55rem .75rem;
  min-height: 2.75rem;
  border-radius: .65rem;
  font-weight: 650;
  text-decoration: none;
}
.notification-link:hover, .notification-link[aria-current] { background: #e9f1eb; }
.notification-bell { line-height: 1; }
.notification-count {
  padding: .1rem .4rem;
  min-width: 1.35rem;
  border-radius: 1rem;
  background: #a72137;
  color: white;
  font-size: .8rem;
  text-align: center;
}
.notification-card { border-inline-start: .25rem solid #195c49; }
.notification-kind { color: #425b50; font-size: .85rem; font-weight: 650; }
.notification-card h2 { margin: .25rem 0; font-size: 1.1rem; }
.notification-card p { margin: 0 0 .9rem; overflow-wrap: anywhere; }

.app-header {
  width: min(100% - 2rem, 42rem);
  margin-inline: auto;
  min-height: 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
}
.app-header form { margin: 0; }
.brand { display: inline-flex; align-items: center; gap: .55rem; }
.brand-icon { background: #195c49; color: white; border-radius: .65rem; padding: .25rem .42rem; font-size: .85rem; }
.sign-out { font-size: .85rem; padding-inline: .6rem; }
main { width: min(100% - 2rem, 42rem); padding-block: 1.4rem; }
.has-app-nav main { padding-bottom: calc(10rem + env(safe-area-inset-bottom)); }
.app-title { font-size: clamp(2rem, 7vw, 2.8rem); letter-spacing: -.045em; }
.view-tabs { display: grid; grid-template-columns: repeat(3, 1fr); padding: .25rem; gap: .15rem; border-radius: .9rem; background: #e5efe8; }
.view-tabs a, .member-chips a { text-decoration: none; color: #183b30; font-weight: 650; }
.view-tabs a { text-align: center; padding: .65rem .25rem; border-radius: .7rem; font-size: .9rem; }
.view-tabs a[aria-current], .member-chips a[aria-current] { background: #195c49; color: white; }

.calendar-picker { margin-block: 1rem; border: 1px solid #dbe7df; border-radius: 1.1rem; background: white; padding: .4rem; }
.calendar-heading { display: grid; align-items: center; grid-template-columns: 2.75rem 1fr 2.75rem; text-align: center; }
.calendar-heading h2 { font-size: 1.05rem; margin: 0; }
.calendar-heading a { font-size: 1.6rem; text-decoration: none; min-height: 2.75rem; border-radius: .7rem; }
.date-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .1rem; text-align: center; }
.date-grid > span { font-size: .75rem; color: #425b50; padding: .35rem 0; }
.calendar-date { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 3.35rem; color: #182d25; border-radius: .75rem; text-decoration: none; font-weight: 700; }
.calendar-date small { font-size: .72rem; font-weight: 600; }
.date-grid-month .calendar-date { min-height: 2.75rem; }
.calendar-date:hover, .calendar-heading a:hover { background: #edf4ef; }
.calendar-date[aria-current] { background: #195c49; color: white; }
.calendar-date i { min-height: .3rem; width: .3rem; margin-top: .2rem; border-radius: 50%; }
.calendar-date i.has-events { background: #258262; }
.calendar-date[aria-current] i.has-events { background: #fff; }

.member-chips { display: flex; gap: .45rem; overflow-x: auto; padding: .15rem .2rem .45rem; }
.member-chips a { padding: .55rem .75rem; border-radius: 2rem; white-space: nowrap; background: #e5efe8; }
.member-chips .lavender { background: #eee7f7; }
.member-chips .sand { background: #f8eacb; }
.member-chips .sky { background: #e2edf7; }

.day-agenda h2 { margin: 1rem 0 .75rem; font-size: 1.2rem; }
.appointment-card { display: grid; grid-template-columns: minmax(5rem, auto) 1fr; gap: .7rem; padding: .75rem; margin-bottom: .55rem; background: #eaf4ee; border-radius: .75rem; border-inline-start: .25rem solid #32836a; }
.appointment-busy { background: #f1ebf7; border-inline-start-color: #976fbd; }
.appointment-time { font-weight: 750; font-variant-numeric: tabular-nums; }
.appointment-time small { display: block; font-weight: 400; font-size: .72rem; }
.appointment-summary { min-width: 0; overflow-wrap: anywhere; }
.appointment-summary > a { font-weight: 750; }
.appointment-members { display: flex; flex-wrap: wrap; gap: .35rem .6rem; font-size: .85rem; }
.appointment-members b { display: inline-grid; place-items: center; height: 1.3rem; width: 1.3rem; background: #d3e9dc; border-radius: 50%; }
.appointment-busy .appointment-members b { background: #e4d6f0; }

.app-nav { position: fixed; inset-inline: 0; bottom: 0; z-index: 3; display: flex; justify-content: center; gap: clamp(.75rem, 8vw, 3rem); width: 100%; padding: .35rem 1rem calc(.35rem + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid #dbe7df; }
.app-nav a { position: relative; display: grid; justify-items: center; gap: .12rem; min-width: 7rem; padding: .28rem .4rem; border-radius: .65rem; color: #475851; text-decoration: none; font-size: .85rem; }
.app-nav a[aria-current] { color: #195c49; background: #edf4ef; font-weight: 750; }
.nav-calendar { display: block; width: 1.23rem; height: 1.17rem; margin-top: .12rem; border: .12rem solid currentColor; border-top-width: .3rem; border-radius: .22rem; }
.nav-bell { line-height: 1.3rem; }
.app-nav .notification-count { position: absolute; top: 0; left: calc(50% + .38rem); }
.floating-create {
  position: fixed;
  z-index: 2;
  right: max(1rem, calc((100vw - 42rem) / 2));
  bottom: calc(4.55rem + env(safe-area-inset-bottom));
  display: grid;
  place-items: center;
  width: 3.2rem;
  height: 3.2rem;
  border-radius: 50%;
  background: #195c49;
  color: white;
  text-decoration: none;
  font-size: 2rem;
  line-height: 1;
}

.invitation-panel {
  border-radius: 1.25rem;
  padding: clamp(.9rem, 4vw, 1.4rem);
}
.invitation-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1rem;
}
.invitation-header h2 { margin: 0; font-size: 1.1rem; overflow-wrap: anywhere; }
.invitation-header time, .invitation-header p { color: #425b50; font-size: .9rem; margin: 0; }
.invitation-date {
  display: grid;
  place-content: center;
  text-align: center;
  min-width: 3.25rem;
  min-height: 3.25rem;
  border-radius: .9rem;
  background: #e7f3ed;
  color: #195c49;
  line-height: 1.15;
}
.invitation-date strong { font-size: 1.35rem; }
.invitation-date span { font-size: .75rem; text-transform: uppercase; }
.invitation-status {
  margin-inline-start: auto;
  padding: .25rem .65rem;
  border-radius: 1rem;
  background: #eef1f5;
  color: #324355;
  font-size: .82rem;
  font-weight: 700;
}
.invitation-status[data-response="accepted"] { background: #e7f3ed; color: #195c49; }
.invitation-status[data-response="declined"] { background: #fceceb; color: #822c2c; }
.invitation-options { border: 0; margin: 0 0 1rem; padding: 0; }
.invitation-options legend { font-weight: 700; margin-bottom: .4rem; }
.invitation-option {
  display: flex;
  align-items: center;
  gap: .65rem;
  min-height: 2.75rem;
  margin-bottom: .4rem;
  padding: .55rem .75rem;
  border: 1px solid #d9e3da;
  border-radius: .75rem;
  cursor: pointer;
}
.invitation-option:has(:checked) { background: #e7f3ed; border-color: #195c49; }
.invitation-option input { accent-color: #195c49; }
.invitation-submit { width: 100%; margin-top: .85rem; border-radius: .75rem; }

.appointment-editor-page main {
  width: min(100%, 38rem);
  padding: 0 0 calc(1.25rem + env(safe-area-inset-bottom));
}
.appointment-editor { margin: 0; }
.editor-bar {
  position: sticky;
  z-index: 2;
  top: 0;
  display: grid;
  grid-template-columns: minmax(4.8rem, 1fr) minmax(0, 3fr) minmax(4.8rem, 1fr);
  align-items: center;
  gap: .5rem;
  padding: calc(.55rem + env(safe-area-inset-top)) .75rem .55rem;
  background: #195c49;
  color: white;
  text-align: center;
}
.editor-bar h1 { margin: 0; font-size: clamp(1rem, 4.4vw, 1.3rem); }
.editor-bar button, .editor-close {
  font-size: .9rem;
  display: grid;
  place-items: center;
  min-height: 2.75rem;
  padding: .25rem;
  border-radius: .65rem;
  color: white;
  background: #ffffff22;
  text-decoration: none;
}
.editor-close { font-size: 1.5rem; justify-self: start; width: 2.75rem; }
.editor-group {
  min-width: 0;
  margin: .7rem .75rem 0;
  padding: .65rem .9rem;
  border: 1px solid #d9e3da;
  border-radius: 1rem;
  background: white;
}
.editor-title-label { display: block; color: #425b50; font-size: .85rem; }
.editor-group #id_title { font-size: 1.15rem; font-weight: 650; }
.editor-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr);
  align-items: center;
  gap: .5rem;
  min-height: 3.5rem;
}
.editor-row + .editor-row { border-top: 1px solid #e5ede7; }
.editor-row input, .editor-row select, .editor-group #id_title {
  min-width: 0;
  min-height: 2.75rem;
  width: 100%;
  background: #f2f6f3;
  color: #182d25;
  border: 1px solid #d9e3da;
  border-radius: .65rem;
}
.editor-group:has(#id_frequency option[value=""]:checked) .editor-series-end { display: none; }
.editor-help { margin: .25rem 0; font-size: .85rem; color: #425b50; }
.editor-participants legend { padding-inline: .3rem; font-weight: 750; }
.editor-participation { display: flex; align-items: center; gap: .5rem; min-height: 2.75rem; }
.editor-member-list { display: flex; flex-wrap: wrap; gap: .5rem; }
.editor-member {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: .2rem;
  min-width: 3.5rem;
  max-width: 8rem;
  padding: .35rem;
  border: 1px solid transparent;
  border-radius: .8rem;
  font-size: .85rem;
  text-align: center;
  overflow-wrap: anywhere;
  cursor: pointer;
}
.editor-member input { position: absolute; opacity: 0; }
.editor-member:has(:focus-visible) { outline: 3px solid #0078a1; }
.editor-member-avatar {
  position: relative;
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  background: #eef3f0;
  color: #244d3e;
}
.editor-member:has(:checked) { border-color: #195c49; background: #e7f3ed; }
.editor-member :checked + .editor-member-avatar { color: white; background: #195c49; }
.editor-member :checked + .editor-member-avatar::after {
  content: "✓";
  position: absolute;
  top: -.15rem;
  right: -.25rem;
  padding-inline: .2rem;
  border-radius: 50%;
  background: white;
  color: #195c49;
}
.editor-details summary { min-height: 2.75rem; align-content: center; font-weight: 650; cursor: pointer; }
.editor-details label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

/* Shared layout for the planning, appointment and account screens. */
.panel h2, .editor-group h2 { margin: 0 0 .65rem; font-size: 1.1rem; overflow-wrap: anywhere; }
.invitation-header h2, .notification-card h2 { margin: 0; }
.app-title { overflow-wrap: anywhere; }
.appointment-detail .app-title { font-size: clamp(1.5rem, 6vw, 2.2rem); }
.back-link { display: inline-flex; align-items: center; min-height: 2.75rem; font-weight: 650; text-decoration: none; }
.event-overview { display: flex; align-items: start; gap: .75rem; padding: .85rem; border-radius: .8rem; background: #f2f6f3; }
.event-overview > div { min-width: 0; overflow-wrap: anywhere; }
.event-overview time, .event-overview strong { font-weight: 700; }
.event-overview p { margin: .12rem 0 0; color: #425b50; }
.event-overview p time { font-weight: inherit; }
.detail-fields { margin-bottom: 0; overflow-wrap: anywhere; }
.appointment-detail .nav-actions { margin-top: 1rem; }
.danger { background: #942d38; }
.danger-outline { background: #fff; color: #942d38; border-color: #e3b3b8; }
.response-list li { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .75rem; padding-block: .6rem; border-top: 1px solid #e5ede7; overflow-wrap: anywhere; }
.response-list small { display: block; color: #425b50; }
.notification-kind { display: block; margin-bottom: .25rem; }
.account-panel { max-width: 28rem; margin: clamp(1rem, 8vw, 3rem) auto 0; text-align: center; }
.account-panel form button { width: 100%; }
.appointment-card { position: relative; }
.appointment-link { text-decoration: none; }
.appointment-link::after { content: ""; position: absolute; inset: 0; border-radius: .75rem; }
.appointment-link:hover { text-decoration: underline; }
.appointment-link:focus-visible::after { outline: 3px solid #0078a1; outline-offset: 2px; }
@media (max-width: 28rem) {
  .appointment-detail .nav-actions > * { flex: 1 1 auto; text-align: center; }
  .editor-row input, .editor-row select, .editor-details input, .editor-details textarea { font-size: 1rem; }
}
