:root {
  color-scheme: light;
  --ink: #181918;
  --muted: #777a76;
  --line: #e8e9e6;
  --soft: #f6f7f4;
  --white: #ffffff;
  --accent: #b7ef65;
  --accent-soft: #effbdc;
  --shadow: 0 20px 60px rgba(24, 25, 24, .08);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }

html { background: var(--white); }

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 0, rgba(183, 239, 101, .12), transparent 25rem),
    var(--white);
  min-width: 320px;
}

button, input, select { font: inherit; }
button { color: inherit; }

.app-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding-bottom: 64px;
}

.topbar {
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  text-decoration: none;
  font-size: 17px;
  font-weight: 750;
  letter-spacing: -.035em;
}

.brand-mark {
  width: 25px;
  height: 25px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3px;
  padding: 3px;
  background: var(--ink);
  border-radius: 8px;
}

.brand-mark i { background: var(--white); border-radius: 2px; }
.brand-mark i:first-child { grid-row: span 2; background: var(--accent); }

.top-actions, .modal-actions { display: flex; align-items: center; gap: 8px; }

.button, .icon-button, .month-label, .theme-chip, .text-button, .check-button, .delete-button {
  border: 0;
  cursor: pointer;
}

.button {
  min-height: 40px;
  padding: 0 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
}

.button svg, .icon-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.button-quiet { background: var(--soft); }
.button-quiet:hover { background: #eef0eb; }
.button-dark { background: var(--ink); color: var(--white); }
.button-dark:hover { background: #343633; }

.month-nav {
  width: min(620px, 100%);
  margin: 54px auto 60px;
  display: grid;
  grid-template-columns: 46px 1fr 46px;
  align-items: center;
  text-align: center;
}

.icon-button {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: var(--soft);
}

.icon-button:hover { background: var(--accent-soft); }

.icon-button svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
}

.month-label { background: transparent; }

.month-label span {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(42px, 6vw, 68px);
  line-height: .95;
  letter-spacing: -.055em;
}

.month-label small {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: .14em;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(290px, .8fr);
  gap: 56px;
  align-items: start;
}

.section-heading {
  margin-bottom: 20px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.section-heading h1, .section-heading h2, .modal-heading h2 {
  margin: 3px 0 0;
  line-height: 1.1;
  letter-spacing: -.035em;
}

.section-heading h1 { font-size: 26px; }
.section-heading h2, .modal-heading h2 { font-size: 21px; }

.eyebrow {
  margin: 0;
  color: #999c97;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .17em;
}

.count-pill {
  min-width: 28px;
  height: 28px;
  padding: 0 9px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: var(--accent-soft);
  font-size: 11px;
  font-weight: 800;
}

.count-pill.muted { background: var(--soft); }
.event-list { border-top: 1px solid var(--ink); }

.event-card {
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr) auto;
  gap: 22px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.date-block { padding-top: 2px; }
.date-block strong { display: block; font-size: 22px; letter-spacing: -.04em; }
.date-block span { color: var(--muted); font-size: 10px; font-weight: 750; text-transform: uppercase; letter-spacing: .1em; }
.event-content h3 { margin: 0 0 11px; font-size: 16px; letter-spacing: -.02em; }
.themes { display: flex; flex-wrap: wrap; gap: 6px; }

.theme-chip {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--white);
  color: #5e615c;
  font-size: 11px;
  text-align: left;
}

.theme-chip:hover { border-color: var(--ink); color: var(--ink); }

.event-add {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  align-self: start;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
  cursor: pointer;
  font-size: 20px;
  font-weight: 300;
}

.event-add:hover { background: var(--ink); color: var(--white); border-color: var(--ink); }
.side-panel { display: grid; gap: 42px; }
.compact-heading { margin-bottom: 14px; }
.idea-list, .done-list { border-top: 1px solid var(--ink); }

.idea-item {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.check-button {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  border: 1.5px solid #c9ccc6;
  border-radius: 6px;
  background: var(--white);
}

.check-button:hover { border-color: var(--ink); background: var(--accent-soft); }
.done-item .check-button { background: var(--ink); border-color: var(--ink); position: relative; }
.done-item .check-button::after { content: ""; position: absolute; left: 5px; top: 2px; width: 4px; height: 8px; border: solid white; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
.idea-copy { min-width: 0; }
.idea-copy strong { display: block; overflow-wrap: anywhere; font-size: 13px; line-height: 1.35; }
.done-item .idea-copy strong { color: #777a76; text-decoration: line-through; text-decoration-color: #b9bcb7; }
.idea-meta { margin-top: 6px; display: flex; flex-wrap: wrap; align-items: center; gap: 5px; color: #91948f; font-size: 10px; }
.category-tag { padding: 3px 6px; border-radius: 5px; background: var(--soft); color: #666963; font-weight: 750; }
.idea-menu { position: relative; }

.delete-button {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: transparent;
  color: #a5a8a2;
  font-size: 18px;
}

.delete-button:hover { background: #fff1f0; color: #bf3d33; }
.empty-state { padding: 24px 10px; text-align: center; color: #999c97; }
.empty-state p { margin: 8px 0 0; font-size: 11px; }
.empty-dot { display: inline-block; width: 8px; height: 8px; border: 2px solid #ced1cb; border-radius: 50%; }

.modal {
  width: min(470px, calc(100% - 28px));
  padding: 0;
  border: 0;
  border-radius: 22px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.modal::backdrop { background: rgba(22, 23, 22, .32); backdrop-filter: blur(3px); }
.modal-card { margin: 0; padding: 28px; }
.modal-heading { margin-bottom: 26px; display: flex; align-items: start; justify-content: space-between; gap: 20px; }
.close-button { width: 34px; height: 34px; }
.field { margin-bottom: 16px; display: grid; gap: 7px; }
.field span { color: #6f726d; font-size: 11px; font-weight: 700; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.field input, .field select, .category-form input {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  outline: 0;
  background: var(--white);
  color: var(--ink);
  font-size: 13px;
}

.field input:focus, .field select:focus, .category-form input:focus { border-color: #8b8f87; box-shadow: 0 0 0 3px var(--soft); }
.modal-actions { margin-top: 25px; justify-content: flex-end; }
.category-list { display: grid; gap: 6px; }

.category-item {
  min-height: 42px;
  padding: 0 8px 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 10px;
  background: var(--soft);
  font-size: 12px;
  font-weight: 700;
}

.category-form { margin-top: 18px; display: grid; grid-template-columns: 1fr auto; gap: 8px; }

@media (max-width: 800px) {
  .app-shell { width: min(100% - 28px, 620px); }
  .month-nav { margin: 38px auto 46px; }
  .workspace { grid-template-columns: 1fr; gap: 48px; }
  .side-panel { grid-template-columns: 1fr 1fr; gap: 28px; }
}

@media (max-width: 560px) {
  .topbar { min-height: 72px; }
  .top-actions .button-quiet { width: 40px; padding: 0; font-size: 0; }
  .month-nav { grid-template-columns: 42px 1fr 42px; }
  .event-card { grid-template-columns: 48px minmax(0, 1fr) auto; gap: 12px; }
  .date-block strong { font-size: 18px; }
  .side-panel { grid-template-columns: 1fr; }
  .field-grid { grid-template-columns: 1fr; gap: 0; }
  .modal-card { padding: 22px; }
}

@media (prefers-reduced-motion: no-preference) {
  .event-card { animation: enter .28s ease both; animation-delay: calc(var(--order, 0) * 35ms); }
  @keyframes enter { from { opacity: 0; transform: translateY(7px); } }
}
