@font-face {
  font-family: system;
  src: local("Inter");
}
:root {
  font-family:
    system,
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: #242526;
  background: #f9f9f7;
  font-synthesis: none;
  --surface: #fff;
  --subtle: #f1f2ef;
  --line: #e2e3dd;
  --muted: #737670;
  --ink: #242526;
  --accent: #466857;
  --button: #fff;
  --shadow: 0 20px 80px #16231925;
  color-scheme: light;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 10px 13px;
}
button:hover {
  background: var(--subtle);
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
.primary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--accent);
  color: var(--button);
  border: 0;
  padding: 14px 18px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 550;
}
.primary:hover {
  filter: brightness(1.08);
  background: var(--accent);
}
.quiet {
  border-color: transparent;
  background: transparent;
}
.danger {
  color: #b64747;
}
h1,
h2,
p {
  margin: 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 26px;
  text-decoration: none;
  color: inherit;
}
.brand span {
  font-size: 17px;
  font-weight: 650;
}
.brand small {
  display: block;
  font:
    10px ui-monospace,
    monospace;
  letter-spacing: 2.5px;
  color: var(--muted);
  margin-top: 5px;
}
[hidden] {
  display: none !important;
}
#workspace {
  display: grid;
  grid-template-columns: 245px 1fr;
  min-height: 100dvh;
}
aside {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  padding: 28px 20px;
  background: var(--surface);
  gap: 8px;
  position: sticky;
  top: 0;
  height: 100dvh;
  overflow: auto;
}
aside > .primary {
  margin: 34px 0 22px;
}
h2 {
  font-size: 10px;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--muted);
  margin: 19px 4px 12px;
}
aside label {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 5px;
  font-size: 13px;
  cursor: pointer;
}
aside input {
  accent-color: var(--accent);
}
.sidebar-bottom {
  margin-top: auto;
  padding-top: 30px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  font-size: 13px;
}
.sidebar-bottom > span {
  font-weight: 550;
}
main {
  min-width: 0;
  padding: 34px 38px;
}
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  gap: 20px;
}
header h1 {
  font-size: 30px;
  font-weight: 500;
  letter-spacing: -1px;
}
.eyebrow {
  font:
    10px ui-monospace,
    monospace;
  letter-spacing: 2px;
  color: var(--muted);
  margin-bottom: 10px;
}
nav {
  display: flex;
  gap: 7px;
}
#weekdays,
#grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}
#weekdays {
  font-size: 11px;
  color: var(--muted);
  padding-bottom: 12px;
  text-align: right;
}
#weekdays span {
  padding-right: 13px;
}
#grid {
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
}
.day {
  min-height: 126px;
  padding: 9px 5px;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
}
.day.outside {
  background: var(--subtle);
}
.date {
  display: block;
  margin: 0 3px 9px auto;
  border: 0;
  background: transparent;
  border-radius: 50%;
  width: 27px;
  height: 27px;
  padding: 0;
  font-size: 12px;
}
.date.current {
  background: var(--ink);
  color: var(--surface);
}
.outside .date {
  color: var(--muted);
}
.event {
  display: block;
  width: 100%;
  text-align: left;
  font-size: 11px;
  padding: 6px 7px;
  border: 1px solid transparent;
  border-left: 3px solid var(--source);
  border-radius: 5px;
  margin-bottom: 5px;
  background: var(--subtle);
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.event time {
  opacity: 0.75;
  padding-right: 4px;
}
.event.proposed {
  border: 1px dashed var(--source);
  border-left-width: 3px;
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 3px;
  background: var(--source);
  flex-shrink: 0;
}
.source-loopin {
  --source: #1e2a5a;
}
.source-website {
  --source: #997223;
}
.source-mail {
  --source: #53535b;
}
.source-calendar {
  --source: #466857;
}
.source-agent {
  --source: #716084;
}
footer {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  font-size: 11px;
  color: var(--muted);
  margin-top: 20px;
}
#notice,
#editor-error {
  border: 1px solid #d8b679;
  background: var(--surface);
  border-radius: 8px;
  padding: 12px;
  margin: 12px 0;
  font-size: 13px;
}
dialog {
  width: min(540px, calc(100vw - 24px));
  max-height: 90dvh;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
}
dialog::backdrop {
  background: #17241e60;
  backdrop-filter: blur(4px);
}
.dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.dialog-header p {
  margin: 0;
}
form > label,
.two > label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 16px;
}
input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  border-radius: 8px;
  padding: 11px 12px;
  font-size: 14px;
  outline: none;
}
input:focus,
textarea:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 16%, transparent);
}
input[type="checkbox"] {
  width: auto;
}
.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.hint {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
  margin: -4px 0 17px;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 16px;
}
.secondary-actions {
  padding-top: 13px;
  border-top: 1px solid var(--line);
  font-size: 11px;
}
.secondary-actions button {
  padding: 5px 0;
  margin-right: 10px;
}
#rsvp > p {
  font-size: 12px;
  color: var(--muted);
}
#login {
  width: min(460px, calc(100vw - 40px));
  margin: 13vh auto;
}
#login h1 {
  font-size: 48px;
  font-weight: 450;
  letter-spacing: -2px;
  line-height: 1.15;
  margin: 58px 0 22px;
}
#login p {
  font-size: 15px;
  line-height: 1.8;
  color: var(--muted);
  margin-bottom: 32px;
}
@media (prefers-color-scheme: dark) {
  :root {
    color: #e5e7e1;
    background: #111310;
    --surface: #181b17;
    --subtle: #21251f;
    --line: #30372d;
    --muted: #929b8d;
    --ink: #e5e7e1;
    --accent: #9bbdaa;
    --button: #16231c;
    --shadow: 0 20px 80px #0009;
    color-scheme: dark;
  }
  .source-loopin {
    --source: #ccd6f7;
  }
  .source-website {
    --source: #c99a3b;
  }
  .source-mail {
    --source: #b9b9c2;
  }
  .source-calendar {
    --source: #9bbdaa;
  }
  .source-agent {
    --source: #c3add9;
  }
}
@media (max-width: 1000px) {
  #workspace {
    grid-template-columns: 200px 1fr;
  }
  main {
    padding: 28px 20px;
  }
  .day {
    min-height: 110px;
  }
  aside {
    padding: 24px 14px;
  }
  .event {
    font-size: 10px;
  }
}
@media (max-width: 720px) {
  #workspace {
    display: block;
  }
  aside {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    display: grid;
    grid-template-columns: 1fr auto;
    padding: 18px;
    gap: 10px;
  }
  aside > .primary {
    margin: 0;
    font-size: 12px;
  }
  aside h2,
  aside .sidebar-bottom {
    display: none;
  }
  #calendars,
  #sources {
    grid-column: 1/-1;
    display: flex;
    flex-wrap: wrap;
  }
  aside label {
    font-size: 11px;
    padding: 4px;
  }
  .brand {
    font-size: 22px;
  }
  .brand span {
    font-size: 14px;
  }
  main {
    padding: 24px 12px;
  }
  header h1 {
    font-size: 25px;
  }
  header {
    margin-bottom: 22px;
  }
  nav button {
    padding: 8px;
  }
  #weekdays {
    display: none;
  }
  #grid {
    display: block;
    border: 0;
    background: transparent;
  }
  .day {
    min-height: 0;
    border: 0;
    padding: 0;
    margin: 0 0 18px;
  }
  .day.outside,
  .day.empty {
    display: none;
  }
  .date {
    width: auto;
    border-radius: 6px;
    margin: 0 0 6px;
    font-weight: 600;
    text-align: left;
    font-size: 12px;
  }
  .date.current {
    padding: 4px 8px;
    height: auto;
  }
  .event {
    font-size: 13px;
    padding: 12px;
    margin-bottom: 6px;
  }
  footer {
    line-height: 1.6;
  }
  .two {
    grid-template-columns: 1fr;
  }
}
