:root {
  color-scheme: light;
  --ink: #18202a;
  --muted: #617080;
  --line: #d8e1e8;
  --paper: #f8fbfc;
  --panel: #ffffff;
  --teal: #2f8f83;
  --teal-dark: #1f665f;
  --coral: #df6f53;
  --gold: #e9ba58;
  --shadow: 0 24px 70px rgba(21, 42, 55, 0.16);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background:
    linear-gradient(135deg, rgba(47, 143, 131, 0.15), transparent 36%),
    linear-gradient(315deg, rgba(223, 111, 83, 0.14), transparent 34%),
    var(--paper);
}

button,
a,
textarea {
  font: inherit;
}

.app-shell {
  width: min(1120px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  align-items: center;
  padding: 48px 0;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(320px, 1.1fr);
  overflow: hidden;
  border: 1px solid rgba(216, 225, 232, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
}

.profile-panel,
.todo-panel {
  min-width: 0;
  padding: clamp(24px, 5vw, 56px);
}

.profile-panel {
  display: flex;
  min-height: 560px;
  flex-direction: column;
  justify-content: flex-end;
  color: #fff;
  background:
    linear-gradient(180deg, rgba(19, 43, 45, 0.08), rgba(19, 43, 45, 0.76)),
    linear-gradient(145deg, #2f8f83, #314f7d 58%, #df6f53);
}

.profile-art {
  position: relative;
  width: min(100%, 360px);
  aspect-ratio: 1.08;
  margin: 0 auto auto;
}

.sun,
.desk,
.screen,
.plant {
  position: absolute;
}

.sun {
  top: 8%;
  right: 12%;
  width: 72px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 18px rgba(233, 186, 88, 0.24);
}

.desk {
  right: 5%;
  bottom: 15%;
  left: 6%;
  height: 24px;
  border-radius: 8px;
  background: #f3d2bd;
  box-shadow: 0 20px 0 rgba(35, 54, 63, 0.25);
}

.screen {
  right: 22%;
  bottom: 23%;
  width: 48%;
  height: 36%;
  border: 10px solid #203642;
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.28) 1px, transparent 1px) 0 0 /
      22px 22px,
    linear-gradient(#7bc6b8, #ecb68d);
}

.screen::after {
  position: absolute;
  right: 35%;
  bottom: -42px;
  width: 36px;
  height: 42px;
  border-radius: 0 0 8px 8px;
  background: #203642;
  content: "";
}

.plant {
  bottom: 23%;
  left: 13%;
  width: 54px;
  height: 82px;
  border-radius: 0 0 14px 14px;
  background: #f1b96f;
}

.plant::before {
  position: absolute;
  right: -12px;
  bottom: 42px;
  left: -12px;
  height: 54px;
  border-radius: 50% 50% 8px 8px;
  background:
    radial-gradient(circle at 24% 62%, #8ed1b8 0 16px, transparent 17px),
    radial-gradient(circle at 54% 28%, #bee189 0 18px, transparent 19px),
    radial-gradient(circle at 74% 58%, #6fbf96 0 17px, transparent 18px);
  content: "";
}

.eyebrow {
  margin: 0 0 10px;
  color: inherit;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
  opacity: 0.72;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(3.5rem, 9vw, 7.5rem);
}

h2 {
  font-size: clamp(2.25rem, 5vw, 4.6rem);
}

h3 {
  font-size: clamp(1.65rem, 3vw, 2.45rem);
}

.profile-copy {
  max-width: 34rem;
  margin: 20px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(1rem, 2vw, 1.16rem);
  line-height: 1.7;
}

.todo-panel {
  background: var(--panel);
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 34px;
}

.date-line {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.98rem;
  font-weight: 700;
}

.todo-panel .eyebrow {
  color: var(--teal-dark);
}

.icon-button,
.done-button {
  display: inline-grid;
  place-items: center;
  border: 0;
  cursor: pointer;
  transition:
    transform 160ms ease,
    background-color 160ms ease,
    color 160ms ease;
}

.icon-button {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 50%;
  color: var(--teal-dark);
  background: #e8f3f1;
  font-size: 1.25rem;
}

.icon-button:hover,
.done-button:hover {
  transform: translateY(-1px);
}

.todo-list {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.todo-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 18px;
  min-height: 92px;
  padding: 20px 18px 20px 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.todo-date {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.todo-title {
  margin: 0;
  font-size: clamp(1.05rem, 2.3vw, 1.35rem);
  font-weight: 800;
  line-height: 1.25;
}

.todo-link {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-top: 8px;
  color: var(--teal-dark);
  font-weight: 700;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.explanation-label {
  display: block;
  margin-top: 18px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.explanation-input {
  display: block;
  width: 100%;
  min-height: 92px;
  margin-top: 8px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--ink);
  background: #f8fbfc;
  line-height: 1.45;
}

.explanation-input::placeholder {
  color: #8794a0;
}

.done-button {
  width: 46px;
  height: 46px;
  margin-top: 24px;
  border-radius: 50%;
  color: #fff;
  background: var(--teal);
  font-size: 1.25rem;
  font-weight: 900;
}

.done-button:focus-visible,
.icon-button:focus-visible,
.todo-link:focus-visible,
.explanation-input:focus-visible {
  outline: 3px solid rgba(223, 111, 83, 0.55);
  outline-offset: 4px;
}

.empty-state {
  margin: 24px 0 0;
  padding: 28px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #f9fbfb;
  font-size: 1.05rem;
  line-height: 1.6;
}

.history-section {
  margin-top: 48px;
  padding-top: 30px;
  border-top: 1px solid var(--line);
}

.history-header {
  margin-bottom: 18px;
}

.history-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.history-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfc;
}

.history-title {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 800;
  line-height: 1.25;
}

.history-date {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.45;
}

.history-explanation {
  margin: 12px 0 0;
  color: var(--ink);
  font-size: 0.94rem;
  line-height: 1.55;
}

.history-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  min-height: 32px;
  border-radius: 999px;
  color: var(--teal-dark);
  background: #e8f3f1;
  font-size: 0.8rem;
  font-weight: 800;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

@media (max-width: 760px) {
  .app-shell {
    width: min(100% - 20px, 560px);
    align-items: start;
    padding: 10px 0;
  }

  .workspace {
    grid-template-columns: 1fr;
  }

  .profile-panel {
    min-height: 410px;
  }

  .profile-art {
    width: min(78vw, 300px);
  }

  .todo-item {
    grid-template-columns: 1fr;
  }

  .history-item {
    grid-template-columns: 1fr;
  }

  .history-badge {
    justify-self: start;
  }

  .done-button {
    justify-self: end;
  }
}
