/* Moby house style, from moby.website (assets/css/site.css): paper, ink, blue, sun; Funnel Display + Inter. */
@import url('/fonts/fonts.css');

:root {
  --paper: #e1e7f9; --ink: #111110; --grey: #4f4f4c; --line: rgba(17, 17, 16, .18);
  --blue: #2648e6; --sun: #ffd446; --white: #ffffff;
  --tint: color-mix(in srgb, #2648e6 9%, #e1e7f9); --tint-strong: color-mix(in srgb, #2648e6 16%, #e1e7f9);
  --f-display: "Funnel Display", "Inter", system-ui, sans-serif;
  --f-body: "Inter", system-ui, sans-serif;
  /* names the modules and the login page use */
  --bg: var(--paper); --card: var(--white); --muted: var(--grey); --accent: var(--blue); --danger: #b42318; --radius: 14px;
  font-family: var(--f-body); font-size: 15px;
  color: var(--ink); background: var(--paper);
  color-scheme: light;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
body { margin: 0; padding-bottom: env(safe-area-inset-bottom); }
h1, h2, h3 { font-family: var(--f-display); font-weight: 600; letter-spacing: -.01em; }
button, input, textarea, select { font: inherit; }
button { border: 1px solid var(--line); background: var(--paper); color: var(--ink); border-radius: 999px; padding: 7px 14px; cursor: pointer; transition: background-color 120ms ease, color 120ms ease, border-color 120ms ease; }
button:hover { border-color: var(--blue); color: var(--blue); }
button.primary { background: var(--blue); color: var(--white); border-color: var(--blue); }
button.primary:hover { background: var(--sun); border-color: var(--sun); color: var(--ink); }
button.danger { color: var(--danger); margin-right: auto; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

.top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; padding: 20px clamp(16px, 3.4vw, 40px) 10px; }
.top h1 { font-size: clamp(1.5rem, 3vw, 1.9rem); line-height: 1.1; margin: 0; letter-spacing: -.035em; font-weight: 500; }
#today-label { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--blue); font-weight: 600; }

.tabs { display: flex; gap: 4px; margin: 0 clamp(16px, 3.4vw, 40px); padding: 4px; border-radius: 999px; background: var(--tint); overflow-x: auto; width: fit-content; max-width: calc(100% - 32px); }
.tabs button { border: 0; background: transparent; padding: 7px 16px; white-space: nowrap; color: var(--ink); }
.tabs button:hover { background: var(--tint-strong); color: var(--ink); }
.tabs button[aria-selected="true"] { background: var(--blue); color: var(--white); }

main { max-width: 1200px; margin: 0; padding: 20px clamp(16px, 3.4vw, 40px) 40px; }
.view[hidden] { display: none; }
.view.full { max-width: none; padding: 0; }

.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.filters { display: flex; flex-wrap: wrap; gap: 6px; }
.filters button { background: var(--white); }
.filters button[aria-pressed="true"] { background: var(--ink); color: var(--white); border-color: var(--ink); }

.group h2 { font-family: var(--f-body); font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--grey); font-weight: 600; margin: 24px 0 8px; }
.group.late h2 { color: var(--danger); }
.group details summary { cursor: pointer; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--grey); font-weight: 600; margin: 24px 0 8px; }
.todo { display: flex; align-items: center; gap: 12px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 6px; }
.todo input[type=checkbox] { width: 20px; height: 20px; flex: none; accent-color: var(--blue); }
.todo .title { flex: 1; cursor: pointer; background: none; border: 0; border-radius: 0; padding: 0; text-align: left; color: var(--ink); }
.todo .title:hover { color: var(--blue); }
.todo .due { color: var(--grey); font-size: 13px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.chip { display: inline-block; font-size: 12px; padding: 2px 9px; border-radius: 99px; color: #fff; margin-left: 4px; }
.empty { color: var(--grey); padding: 24px; background: var(--tint); border-radius: var(--radius); }

dialog { border: 0; border-radius: 20px; padding: 0; width: min(520px, 94vw); background: var(--white); color: var(--ink); }
dialog::backdrop { background: rgb(17 17 16 / .35); }
dialog form { padding: 22px; display: grid; gap: 12px; }
dialog h2 { margin: 0; font-size: 1.2rem; }
dialog label { display: grid; gap: 5px; font-size: 13px; color: var(--grey); }
dialog input, dialog textarea, dialog select { border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 10px; color: var(--ink); background: var(--paper); }
fieldset { border: 0; padding: 0; margin: 0; }
legend { font-size: 13px; color: var(--grey); margin-bottom: 6px; }
#label-picks { display: flex; gap: 8px; flex-wrap: wrap; }
#label-picks label { display: flex; align-items: center; gap: 6px; color: var(--ink); border: 1px solid var(--line); border-radius: 99px; padding: 4px 12px; font-size: 14px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.error { color: var(--danger); margin: 0; }

#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 999px; opacity: 0; pointer-events: none; transition: opacity .2s; }
#toast.show { opacity: 1; }

@media (max-width: 600px) {
  main { padding: 12px; }
  .todo { flex-wrap: wrap; }
  .todo .title { flex-basis: calc(100% - 40px); }
}
main:has(> .view.full:not([hidden])) { max-width: none; padding: 12px 0 0; }
