:root {
  color-scheme: light;
  --ink: #25223b;
  --muted: #625c74;
  --accent: #49318a;
  --paper: #f7f6fb;
  --line: #ded9ea;
  font-family: "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
button, input, textarea, select { font: inherit; }
button, a { touch-action: manipulation; }
button { min-height: 44px; padding: .62rem .95rem; border: 1px solid var(--line); border-radius: 13px; background: white; color: var(--ink); cursor: pointer; font-weight: 600; }
button:hover { border-color: var(--accent); }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 3px solid #9063dc; outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
p { line-height: 1.55; }
.primary { background: var(--accent); color: white; border-color: var(--accent); }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 220px; padding: 34px 24px; display: flex; flex-direction: column; background: #fff; border-right: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: .6rem; font-size: 1.2rem; font-weight: 750; letter-spacing: -.04em; align-self: flex-start; }
.brand img, .auth-screen img { border-radius: 22%; }
[hidden] { display: none !important; }
.auth-screen { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.auth-screen .card { max-width: 480px; width: 100%; text-align: center; display: grid; justify-items: center; gap: 16px; }
.auth-screen h1 { font-size: clamp(2rem, 8vw, 3.5rem); }
#sign-out { margin-top: 12px; align-self: flex-start; }
nav { display: grid; gap: .45rem; margin-top: 3rem; }
nav a { min-height: 44px; padding: .75rem 1rem; border-radius: 12px; display: flex; justify-content: space-between; }
nav a[aria-current] { color: var(--accent); background: #efebfa; font-weight: 700; }
.sidebar p { margin-top: auto; font-size: .875rem; color: var(--muted); }
main { margin-left: 220px; max-width: 1410px; padding: 32px clamp(24px, 5vw, 80px) 48px; }
.top, .section-head, .actions { display: flex; gap: .65rem; align-items: center; flex-wrap: wrap; }
.top, .section-head { justify-content: space-between; }
.top { margin-bottom: 24px; color: var(--muted); }
.hero { position: relative; isolation: isolate; overflow: hidden; border-radius: 26px; padding: clamp(25px, 5vw, 60px); background: #ddd3f6; margin-bottom: 22px; }
.hero::after { content: ""; position: absolute; z-index: -1; right: -55px; top: -130px; width: 390px; height: 390px; border-radius: 50%; background: repeating-radial-gradient(circle, #beadeb 0 1px, transparent 2px 22px); opacity: .62; mask-image: linear-gradient(to left, black 60%, transparent); }
h1 { font-size: clamp(2.5rem, 6vw, 5rem); letter-spacing: -.075em; line-height: 1; }
.hero p { margin-top: .75rem; max-width: 36ch; color: #473963; }
.grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 18px; }
.card { border: 1px solid var(--line); background: white; border-radius: 22px; padding: clamp(18px, 3vw, 28px); min-width: 0; }
.focus { background: #eee9fb; }
.optional { background: #edf3eb; }
.card h2 { font-size: 1.34rem; letter-spacing: -.035em; }
.card h3 { line-height: 1.3; overflow-wrap: anywhere; }
.card p { color: var(--muted); overflow-wrap: anywhere; white-space: pre-wrap; }
.stack { display: grid; gap: 14px; }
.item { padding: 14px 0; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.tone-focus { --tone: #176247; --tag-ink: #fff; }
.tone-focus2 { --tone: #90cba1; --tag-ink: #143a29; }
.tone-focus3 { --tone: #d4eed8; --tag-ink: #143a29; }
.tone-fixed { --tone: #ece8f8; --tag-ink: #49318a; }
.tone-delegate { --tone: #d8e9ff; --tag-ink: #21476f; }
.tone-later { --tone: #e9e6ed; --tag-ink: #4c4359; }
.tone-quick { --tone: #ffecbd; --tag-ink: #634900; }
.tone-optional { --tone: #edf3eb; --tag-ink: #36503b; }
.is-done { --tone: #e4dced; --tag-ink: #4a3d61; }
.item.is-done {
  background: #f3eff8;
  border: 1px solid #ded5e9;
  border-radius: 13px;
  padding: 13px;
  margin-bottom: 8px;
}
.item.is-done h3 { color: var(--tag-ink); text-decoration: line-through; }
.is-canceled { --tone: #e5e7eb; --tag-ink: #424956; }
.item.is-canceled {
  background: #f6f7f9;
  border: 1px dashed #9ca3af;
  border-radius: 13px;
  padding: 13px;
  margin-bottom: 8px;
}
.item.is-canceled h3 { color: var(--tag-ink); text-decoration: line-through; }
.tag {
  justify-self: start;
  border-radius: 7px;
  background: var(--tone);
  color: var(--tag-ink);
  padding: .22rem .55rem;
  font-size: .875rem;
  font-weight: 650;
}
.section-head small { color: var(--muted); font-size: .875rem; font-weight: 500; margin-left: .35rem; white-space: nowrap; }
.calendar-details { margin-top: 18px; align-items: start; }
.calendar-add { margin-top: 14px; }
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.week button { display: grid; justify-items: center; gap: 3px; padding: .48rem .1rem; }
.week button[aria-pressed="true"] { border-color: var(--accent); background: #efebfa; box-shadow: inset 0 0 0 1px var(--accent); }
.week button span { font-size: .875rem; }
.dots { min-height: 8px; display: flex; align-items: center; gap: 2px; }
.dots i { background: var(--tone); border: 1px solid #17624780; width: 7px; height: 7px; border-radius: 50%; }
.dots i.is-done { border-color: #81748f; }
.section-head { margin-bottom: .65rem; }
.empty { padding: .6rem 0; }
dialog { border: 1px solid var(--line); border-radius: 24px; width: min(550px, calc(100% - 28px)); max-height: 90dvh; color: var(--ink); padding: 26px; }
dialog::backdrop { background: #25223b80; }
.close { float: right; font-size: 1.25rem; }
form h2 { padding: .4rem 0 1rem; }
#fields { display: grid; gap: 12px; margin-bottom: 16px; }
label { display: grid; gap: 5px; font-weight: 600; }
input, select, textarea { width: 100%; padding: .7rem; border: 1px solid #857c97; border-radius: 10px; background: white; color: var(--ink); }
textarea { min-height: 115px; resize: vertical; }
#status { color: var(--muted); margin-top: 12px; }
@media (max-width: 850px) {
  .sidebar { position: static; width: auto; padding: 12px 20px; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px 20px; border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar p { display: none; }
  nav { display: flex; flex-wrap: wrap; margin: 0; gap: 4px; }
  nav a { padding: .65rem .7rem; gap: 5px; }
  main { margin: 0; padding: 18px 16px 36px; }
}
@media (max-width: 600px) {
  .grid { grid-template-columns: 1fr; }
  .hero::after { opacity: .36; }
}
@media (max-width: 380px) {
  .calendar { padding-inline: 10px; }
  .week { gap: 2px; }
}
